query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
18b08ee792e77f3930f0621d638d3c4c | 6cf74836b218a3a6106a4b116a33f613 | 功能:获取所有训练模式的信息
返回:二维数组 | class Article extends \yii\base\Model
public static function getAllTocMode() {
return Section::getAllCommentMode();
} | 0 |
2e5ab12ae3d1d28e9877c305eb0a831f | d0a436f52aef9d3bff5d3fa50e6449e8 | 打开盘点窗口 | if helper.logged(helper.PRIV_USER,'POS_AUDIT'):
render = helper.create_render()
user_data=web.input(cat='2')
db_shop = helper.get_shop_by_uid()
db_audit = db.shop_audit.find_one({'shop':db_shop['shop'], 'status':'OPEN'})
if db_audit==None:
return render.info('未查到未结束的盘点账期数据!')
audit_stock = db_au... | 1 |
410a124dcfae677150a18f4c2f3cfff1 | cb9efe86047e4a9006b67b6894051e73 | 推送不同市场分区的交易对信息 | protected void subscribe(WebSocket ws)
{
String topic_spot1 = getDepthTopic(DEPTH_SPOT, "BTC-USDT");
ws.send(topic_spot1);
String topic_spot2 = getDepthTopic(DEPTH_SPOT, "ETH-USDT");
ws.send(topic_spot2);
List<String> currencys = Arrays.asList(TradeConst.triangular_curren... | 1 |
84ae7e2286e00073c6d27514a7b5a6d2 | 954b276a796ca444793b1c9ff436c538 | 检索指定展览下的地图 | public class DBHelper
public Cursor getDbExhibitionList(int UnitNo) {
return Base("SELECT AutoNum,FileNo,FileName,UnitNo,Floor,Year,Size,Producers,X,Y FROM CHINESE WHERE UnitNo =" + "'" + UnitNo + "'");
} | 1 |
dee17b658522d2759a347180a31869f3 | 458cbdf705b4c01fa23ccc9c4a95d5c1 | Attempts to parse operands of [BaseR]. | try!(self.bump());
if self.current() != '=' {
return Ok(base);
} else {
try!(self.bump());
return Ok(eq);
}
} | 0 |
ea019d3ae93c1e04548348a23056030f | a6bb33fc802f08556112cf04aa325117 | ツーペアを判定する | {
var pairCount = new int[NumberOfCardsPerSuit];
for(var index = 0; index < cards.Count; index++)
{
pairCount[cards[index].CardValue - 1]++;
}
var twoPairsCount = 0;
for(var index = 0; index < pairCount.Length; index++)
{
if(pairCount[i... | 1 |
53d890316e0970c05d1cb60665e34a69 | 817f591c7cdb0c8cdc3ab445c868d734 | Getter method for enabled, mapped from YANG variable /nst/netslice_subnet/instantiation_parameters/vld/ip_profile/dhcp_params/enabled (boolean) | class yc_state_openconfig_relay_agent__relay_agent_dhcp_interfaces_interface_state(PybindBase):
def _get_enable(self):
return self.__enable | 0 |
7d55d1f69fbb3ae948e5e425813488be | a59a85b2890c2a34bccb1e03a91a5f38 | Attempts to schedule the specified packet to send through the
specified link at the specified time. | tsch_queue_add_packet(const linkaddr_t *addr, uint8_t max_transmissions,
mac_callback_t sent, void *ptr)
{
struct tsch_neighbor *n = NULL;
int16_t put_index = -1;
struct tsch_packet *p = NULL;
#ifdef TSCH_CALLBACK_PACKET_READY
if(TSCH_CALLBACK_PACKET_READY() < 0) {
LOG_DBG("tsch_queue_... | 0 |
a44f39ca57a0683a1682d9a2a39eba24 | 360ed1321f5504d5c905219610e4bcb8 | 初始化标题栏颜色 | class LoginActivity : BaseActivity(), View.OnClickListener
private fun initData() {
StatusBarCompat.setStatusBarColor(this, resources.getColor(R.color.colorWhite), true)
titlebar_title.setText(getString(R.string.login_title))
} | 0 |
6147062a0a16250c0fcb11e763dd1847 | 7d3cd3a793b8b5a62dfbae00b2ce81f2 | get list of files, load first one as preview | void CMainFrame::OnFilesLoaded()
{
m_filesToAdd.clear();
HTREEITEM item = GetViewTree().GetFirstVisible();
GetViewTree().SelectItem(0);
GetViewTree().SelectItem(item);
} | 0 |
f7092e158f34459ef8ee99ffb1b75381 | 404c2046242812f765a33aeda41c33ac | public accessor method - get the two norm value | double NegReg::getV2() {
return v2;
} | 0 |
477d7cf97a814656262871f48076133a | f8b1f34e6c43c77995c77bef5ba53c9d | Reify the encoded argument types from the format produced by arg_types_to_json. | make_arguments(nargs, fargs, input_typeids, function_typeids)
int nargs;
List fargs;
ObjectId *input_typeids;
ObjectId *function_typeids;
{
List current_fargs;
LispValue current_arg;
int i;
for (i=0, current_fargs = fargs;
i<nargs;
i++, current_fargs = CDR(current_fargs)) {
if (... | 0 |
5fe8a4624cc16a5fc23c7b88477c4c55 | 1cdf75eb4952cc2c3cf2eb9b2faaf000 | 从淘宝店铺中删除商品 | $xml = '<?xml version="1.0" encoding="UTF-8" ?>
<Request>
<Product>
<SellerSku>' . $sellerSku . '</SellerSku>
</Product>
</Request>';
$reuslt = LazadaTokenService::request($site_id, 'ProductRemove', $xml);
return $reuslt;
} | 0 |
a41581331bd9577ffc02040c8d6dbcd6 | 66b77ff84d8c258e827d5383d5efaab5 | Constants | function Constants(){
Object.defineProperties(this, {
CHALLENGE_DATA_FILE_NAME: {
value: 'nextChallenge.dat'
},
CONNECTED_STATUS: {
value: 'connected'
},
COUNTRIES:{
value: 'countries.csv'
},
DISCONNECTED_STATUS: {
... | 1 |
d87014ffff100752be77d7e08e095680 | 6e53da7eb369d882eb8b14f6e42a6bf4 | updates the portraits and decks based on what the user chooses | public class DropdownTest : MonoBehaviour
void changeCards()
{
if (changeCaract.value == 0)
{
cardSing.SetActive(true);
cardSing1.SetActive(true);
cardSing2.SetActive(true);
cardSing3.SetActive(true);
cardGuitar.SetActive(false);
... | 1 |
36b4505c92f892201decd51ca4782d81 | 982042fb04b226b6ca2206b94fb18764 | mmuMipsPageTablePtrToKmemPtr - Convert Page Table Addr to a Kmem Addr
The MIPS TLB Miss handler cannot use a Virtual Address to access the
Page Tables. This function converts the Page Table address used by the
Miss handler to a Virtual address.
VIRT_ADDR mmuMipsPageTablePtrToKmemPtr (VIRT_ADDR page) | {
if (msr.PSR.DMME)
{
vm_addr_t vpn = va >> VPN_SHIFT;
int offset = vpn & (dmmu_tlb_count-1);
if (msr.DTLBL[offset].V && msr.DTLBL[offset].VPN == vpn)
{
if (msr.PSR.RM)
{
if ((store_insn && !msr.DTLBH[offset].RW) ||
(!store_insn && !... | 0 |
3b4304a9f55a9442d5d6f1b0649b2dc3 | 94828f4f1e1265fe31acbf00714531a3 | Iterates over the entire list | class LinkedList:
def __iter__(self):
return self | 0 |
8e9b3b8153199c9b38a62e8d5d203558 | 0fe5cc767bdb1e4e42a878fb39a7f068 | 制动控制算法 | {
dce.p_error = _location - motor_control.est_location;
dce.v_error = (_speed - motor_control.est_speed) >> 7;
if(dce.p_error > ( 3200)) dce.p_error = ( 3200);
if(dce.p_error < (-3200)) dce.p_error = (-3200);
if(dce.v_error > ( 4000)) dce.v_error = ( 4000);
if(dce.v_error < (-4000)) dce.v_error = (-4000)... | 0 |
cd712040a84030ac5809cb07f52cd90b | 3f59bed246064a9f2a49df4e94d13c40 | 部分ロードか? | namespace serial
bool isPartLoad(const char* name)
{
return isPartLoad() && isLoadTarget(name);
} | 1 |
9efd4e4575ea57f15d29dd89fd050fec | 0a4f44c7a8f77c5f82a4ba6928e94e9f | An input element for a bulk delete form. | Widget.__init__(self)
self.css_class = css_class
self.options = _normalise_options(options)
if none_option is not UNSET:
self.none_option = none_option | 0 |
a942c7a9baff9e08565e0d9f1b2bed74 | 90b2f5cbd3cefa27fef89e67d1ad857d | 加入輸入提示和輸入框 | default_msg_str="Hello"
def ClearPlaceholder(ev):
ev.currentTarget.placeholder=""
def RecoverPlaceholder(ev):
ev.currentTarget.placeholder=default_msg_str
div_elt=DIV(style={"margin-left":"5px"})
sele... | 1 |
22db456d127dee78e8d4a9e385c8c248 | 2fd03f9e5d5cfd7b06f821f8782484fc | Find a Questionnaire by a campaign id | $response = $this->mailjet->get(Resources::$Campaign, ['id' => $CampaignId]);
if (!$response->success()) {
$this->throwError("CampaignManager:findByCampaignId() failed", $response);
}
return $response->getData();
} | 0 |
07016aea886b426e22afb3ae1cfe4d45 | ee17c458e46ea7cdc33d4f811f9f45f3 | dummy test to give travis something to do | BOOST_AUTO_TEST_CASE(dummyTest)
{
} | 1 |
77c35d3056392eb658509f13034c43ae | c08cdf3bcd8f0c6432ebbc41b4379809 | Download chunks of data, process them, and write to files. | def split_data(args):
sizes = []
total_size = 0
covered_size = 0
start_positions = {}
for f in args.observe_matrix:
print '# splitting ', f
X = sp.load(f).astype(sp.int8)
total_size += X.shape[1]
density = X.sum(axis=0).sum(axis=1)
gk = _gauss_kernel(args.wi... | 1 |
eb3f7e1b107d801b4c1be4dff3e1cb58 | c638e34088e2f7b6c968acca1ed16843 | 构造函数 - 私有 | class FError
private function __construct() {
self::$errNo = 0 ;
self::$errText = "" ;
self::$errMod = "" ;
} | 1 |
5920c28aa169ecdc6bd36c0efbfcabb6 | 2efcce6c571fec1e8f84fc0ccd00334e | Fonction lors du clic sur le bouton de nouveau salon | var params = [];
params.push({key: "salon", value: $("#name_salon").val()});
params.push({key: "pseudo", value: getCookie("username")});
Ajax.sendPostRequest('../api/salons', params, Ajax.JSON, successNewChannel, errorNewChannel, true, Ajax.FORM_URL_ENCODE);
} | 1 |
2060184c19d2bc1c0b87f334b29c2454 | b3e51bc4a193cd6bdff04e0be3227266 | When the application is launched, the current exchange rates are read from the European Central Bank website using the XML parsing service | {
var builder = new UriBuilder(url);
using (var client = new HttpClient())
{
var result = client.GetAsync(builder.Uri).Result;
using (StreamReader sr = new StreamReader(result.Content.ReadAsStreamAsync().Result))
{ ... | 0 |
49a5b1dc4d4e83d7775b42fbbefc29dd | 5e0c5bf5a33503e98c0048eff5fef586 | Action : WPROCESSITEMS_Q<p>
加工作业查询单 | {
sSQL = "select * from dbo.WorkProcess order by WorkProcessNO ";
DataTable dtProcess = clsSQLCommond.ExecQuery(sSQL);
ItemLookUpEditWorkProcess.DataSource = dtProcess;
} | 0 |
7b1c4e987e3a75cf09d6de3c8fe6c5d6 | 428e78edce5baa0d50269a0a1560087d | 各プレイヤーの順番を引数で受け取り、そのプレイヤーの初期手札を返す | class NonPlayer
def generate_hand
@hand = HAND_TYPE.keys.to_a.sample.to_i
puts "あいては、#{HAND_TYPE[@hand]}を出しました"
end | 0 |
cb283f4539e52388e421ce6f20c74934 | b3ea61b110b0f05137568b0db6e677dc | 模块下课程列表 | namespace RetechWing.WebUI.Controllers
public class ModuleController : BaseController
public ActionResult Course()
{
int total;
var courseList = new CourseManager().GetCourseList(out total, CurrentTenant.TenantId, -1, "", "", -1, -1, 99, 1,
5);
ViewBag.tot... | 1 |
51ee4e232962dc874ae8ffac86947edc | 1386c2c04f0bda3dd766f787bf8b2a3b | when cancel button is clicked, the textarea, save and cancel button are hidden | public class EquationSaver
@FXML
protected void cancelSave(){
stage.hide();
eternityController.navMenuSlide();
} | 0 |
ed714ff0be4aba854b4fd680cf4a0911 | eb5f6b89c6c299658db9fe74f982303d | 更新服务器的列表信息 | class GameDataManager{
public saveServerInfoList(data:any,lastServer:any):void
{
this.curServerInfo = new ServerInfoVo();
for (var key in lastServer) {
if (lastServer.hasOwnProperty(key)) {
this.curServerInfo[key] = lastServer[key];
}
}
this.se... | 1 |
3472872e4dce27c1ee7c7c5ee4d98bee | 0e4364d61a4ce5b744477fe0427296c9 | Test error raising if invalid shape for Hamiltonian model. | A = 1j * np.ones([6, 6])
with pytest.raises(ValueError, match="Input matrix must be real"):
hafnian(A, approx=True) | 0 |
54e96854b4f28fc472837421bb447cd8 | 7b09e7db5ef40a2acf041ef262473104 | @brief Description : Reads the flash memory and returns the value of the
parameter | StatusWord_t CC8531Class::UtilityClass::getFlash(Flash_param_t* FlashParam, u8* nData) {
cmdReq(0x2B, 1, FlashParam);
return read(4, nData);
} | 1 |
d07924cfa151b3cc9bf8d9998b03f8a6 | 0f07b01b4526a4e0065dcaa1e28b3240 | Mounts a device. | def mounted?(device)
mounted = shell_out("grep -q '#{device}' /proc/mounts").exitstatus != 0 ? nil : shell_out("grep -q '#{device}' /proc/mounts").exitstatus
mounted
end | 0 |
0cc240e18534c04c77635ed3b36ed5e1 | c351f6272104a89852ad52dc013b025b | in-reply-to = "In-Reply-To:" 1*msg-id CRLF | t = """
Package: mypackage
Version: 1.0
:
"""
c = StringIO(t)
k = list(RFC822(c).messages())
print(k) | 0 |
7f3a2b24e911731dc9c79ca60b1de939 | 89ae06f6253ddc146256fb4109d218f3 | Gets the selected values of source shape and saves it to list. | {
int widthSelection = (int)GridWidthSelection.Value;
int heightSelection = (int)GridHeightSelection.Value;
int boxSizeSelection = (int)GridBoxSizeSelection.Value;
return (widthSelection,heightSelection,boxSizeSelection);
} | 0 |
bcc956a0c89de5d46c1bce8b281e0163 | 3f8c89cb1a2541d4baf64ee174b193e3 | 0-1范围,其中0为无反弹,1为完全反射。 | public class WheelView<T> extends View implements Runnable
public void setRefractRatio(@FloatRange(from = 0.0f, to = 1.0f) float refractRatio) {
float tempRefractRatio = mRefractRatio;
mRefractRatio = refractRatio;
if (mRefractRatio > 1f) {
mRefractRatio = 1.0f;
} else if (mR... | 1 |
41278cf97c8c0c1890afc7cbd83d68a5 | de8348ee4c8ac2865e1b6e84dc2dcd1e | Interrupt Service Routine for counter-timer0 overflow | ISR(TIMER0_COMPA_vect){
count++;
TIFR0 =_BV(OCF0A);
} | 0 |
c0e07081527430e5c69155077595c5e4 | 5dec50e9b9d4cde2dd033a553c6d5c89 | Get single/multiple group of listed published topics with filter key
as index of each returned group. | class TopicController extends FeController
public function getGroupTopics(Request $request)
{
$topicGroups = $this->getGroupedEntities($request->all(),
null, null);
return $this->success($topicGroups);
} | 1 |
0affc676c66d866e5f154327a8a3df06 | 58d17ddc662fb5dba6c71f3bb7d4633d | Send start command whether or not we have GPS to RemoteControllerService in MMF apps | public class RemoteCommunication
protected void startCommand() {
if (RemoteManager.DETAIL_LOG) {
Log.e(RemoteManager.TAG, "RemoteCommunication ++ startCommand() ++");
}
try {
mService.send(Message.obtain(null,
REMOTE_CONTROLLER_CLIENT_COMMAND_START));
... | 1 |
2137519ed11fdddc151c2fa6e9ae9280 | 9b36bca23f2b97e16860b7162954e97b | 检查是否有尖括号 | var a = '<';
var b = '>';
if (str.indexOf(a) > -1 && str.indexOf(b) > -1) {
return true;
} else {
return false;
}
} | 1 |
254b19bff583de8f397b0e9b4afb9727 | d39aa79780e5bf9065097b5b578e85d9 | Establece el Nombre calificado de las clases que se intentó compilar. | public class DeclaracionClase
public void setLlaveC(SimboloLexico llaveC) {
this.llaveC = llaveC;
} | 0 |
236fa6d1d7a7127ffb64cb2cb902056d | d08005758797ef9acef637aac032415f | Obtiene el listado de maniobras activas (ordenadas por hora) de un registro de represas | List<ManiobraBean> obtenerManiobrasActivas(Integer codRepresas) throws Exception; | 1 |
5a02642abb0e98fa0ad435c82ee52860 | 4b7279e0373dcf20f6614d8fde1b42a6 | Cluster associated with this manager object. | class Cluster(Model):
def owned_by(self):
return self._owned_by | 0 |
c7ea44cba9cf1b3a41e1782e50554bea | 6527102f350dbcead71b315ca2a8baea | Sets the group_path_prefix of this OrgApacheJackrabbitOakSpiSecurityAuthenticationExternalImplDeProperties. | class OrgApacheJackrabbitOakSecurityAuthenticationLdapImplLdapIdentiProperties(object):
def group_base_dn(self, group_base_dn):
self._group_base_dn = group_base_dn | 0 |
d5791bcd5831b04b55ce0bab356c1628 | d1b0809a064252fd8109a54ff439f10a | Initializes portfolio pinterest | var portList = $('.edgtf-portfolio-list-holder-outer.edgtf-ptf-load-more');
if(portList.length){
portList.each(function(){
var thisPortList = $(this);
var thisPortListInner = thisPortList.find('.edgtf-portfolio-list-holder');
var nextPage;
... | 0 |
2ed3dbfa990d8c4b84d19026918e4199 | 90c5bb1493d6c1d5836fc38dfee35358 | counting nodes of degree two | int Dualf(struct tiling G)
{
int i;
int f2 = 0;
for (i=0; i<G.v; i++)
if (G.doV[i] == 0) f2++;
return f2;
} | 0 |
c228ccf55c5e54cdec7aa91da0d1208c | 9c9ff70596a091915cd15bd2d17a5ab8 | onClick method when click on the button "Ajouter un numéro de téléphone" | public class MainActivity extends AppCompatActivity
public void onClickButtonAddPhone(View view) {
addNewPhoneFromFields();
} | 1 |
214502ce32fdeb86371ac570c6a86b27 | f4d5ac3db59380c262eb48ed8357e472 | 写入bunch对象 | def bunchOp(type):
fenciPath = "F:/python_wks/text_clustering_small/" + type + "/yes/"
bunchPath = "F:/python_wks/text_clustering_small/" + type + "/bunch/" + type + "_set.dat"
bunch = Bunch(target_name=[], label=[], filenames=[], contents=[])
categoryList = os.listdir(fenciPath)
bunch.target_name... | 1 |
e011ebc48d67813e2c43a0b861b27907 | ece6d6f2de20188732b0c2b95447f1fa | Action Name : GetMarriageLineByShopID
Description : Action is used to return the list of lines. If lineId is provided it returns all line
including end line, excluding provided line. If line id is not provided, it returns all line except end line.
Author, Timestamp : Jitendra Maha... | {
return View(_lineItemBL.GetAllLineItems(p_storeId)
.Select(item => new LineItemVM(item))
.ToList()
);
} | 0 |
9bc574420d3aef612ad5d578be387e76 | d04d7b97767ea054e502f668e7cda906 | Draws an X centered at (x,y). The width and height of the X are each 2 * size. | public class GameJPanel extends javax.swing.JPanel
private void drawX(Graphics2D g2d, Point p){
double width = 100, height = 100;
g2d.draw(new Line2D.Double(
p.getX() - width / 2,
p.getY() - height / 2,
p.getX() + width / 2,
p.getY() + h... | 1 |
3f2987b94cc70cc2c3644ffa7fde8f51 | e6af9252b189389dc32b944c9cc9fb92 | Get the current reconnect count. | class DbPdo extends AbstractBase implements IDb
function getReconnectTimes() {
return $this->reconnect_times;
} | 1 |
aa28a97868ff32ca47b003c012c3d1ff | 3b20a6bc6c889e78b3191f5b0bb8d817 | Mendapatkan daftar harga jual barang | {
$detail = PenjualanDetail::leftJoin('produk', 'produk.kode_produk', '=', 'penjualan_detail.kode_produk')
->where('id_penjualan', '=', $id)
->get();
$no = 0;
$data = array();
foreach($detail as $list){
$no++;
$row =... | 1 |
b6cea361f8c1c5141a865330f861d125 | 216c0cb86bd461fde810cb8e881df368 | 获取已缓存但未发送的字节数 | long unflushedSize(); | 1 |
817362ea590bd073d6cd0716529eea8e | 0cb959f4709426dcc6346e5be6814bfb | OwnerController constructor. | class OldController extends Controller
public function __construct(Old $old)
{
$this->old = $old;
} | 0 |
b988cf77b0fb4292ddf7788dc6c6351d | 26f9a2b329a4df8a75006fcc33374169 | Implementation of hook_menu() | $element = $variables['element'];
$sub_menu = '';
if ($element['#below']) {
$sub_menu = drupal_render($element['#below']);
}
$element['#localized_options']['html'] = TRUE;
$linktext = '<span>' . $element['#title'] . '</span>';
$output = l($linktext, $element['#href'], $element['#localized_options']);
... | 0 |
aabd91f9d7776dc31c335b27ca31dac5 | 80217cc4d842ac0c7ad50ddc46ef1eda | When this surface is used as the destination of a drawing operation,
returns whether the drawing operation is performed in RAM or by the GPU.
By default, this setting is true and all drawing operations are performed
in RAM.
Otherwise, when 2D acceleration is active, drawing operations are delayed
and performed by the G... | public boolean useFastDraw(); | 1 |
ae055619c0648ed024f6c4f950ada199 | cdc9dfa299f6616b27979fdda49b52aa | 拖动进度条的过程暂停 | public class MusicPlayerActivity extends BaseActivity
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
mMusicPlayerProxy.pause();
} | 1 |
9212026f654faf31a23d7f5a35ba5143 | 2fd135e9ac0b27248d22bd15f7577cdb | Ищет слова, которые являются наиболее близкими к неправильному слову. | def find_near_matches(data, word):
guess_words = [word.lower(), word.upper(), word.title()]
words = []
for guess_word in guess_words:
words.extend(difflib.get_close_matches(guess_word, data.keys()))
return words | 1 |
0c4bc01b8b8ee2f4e01efdadce6ecbc8 | 9c20243a9f5760098ccb17b2eddeee8d | Fired when the "Reset device" menu item is clicked. | void onResetClicked(); | 1 |
fad8ae43697db89721257a80227f0fc5 | 522d1ee84fda5b709a0cc8ed041bacc8 | Adds Token to ignore | class SEO
public function addIgnore($string) {
if (!empty($string)) {
$this->_ignored[] = $string;
}
} | 1 |
4308e18fddfb48e41a85f7a8f5bc5b04 | 639004b8ab1e3ee3af1205d87863f4bf | 根据课程id查询 最终发布信息 | getPublishInfo(courseId){
return request({
url: `/admin/edu/course/getPublishInfo/${courseId}`,
method: 'get'
})
} | 1 |
9387c0c82d10e85272aa08ad733193c2 | fb41ead9c23b0c52baaaf595fcac0d1d | Ensure that the user is not removing all the orders if this is the only collection on the job. | {
$orders = $this->getCollection()
->addFilter('order_id', 0);
foreach ($orders as $order) {
$order->delete();
}
} | 0 |
49db69e56c75e854e4565982a3956c42 | 0055aa0f046b5d9e967f36f823401cf4 | WithResponseMetadataCallback sets the response metadata callback. | class MarketplaceWebServiceProducts_Model_GetMyPriceForASINResponse extends MarketplaceWebServiceProducts_Model
public function withResponseMetadata($value)
{
$this->setResponseMetadata($value);
return $this;
} | 0 |
113c49cc193104af6096b69fb411ec1f | 27b2d100bb9e30112d3bdc1afd2fa7b2 | エネルギー配列初期化 | {
for (unsigned int x = 0; x < ARRAY_SIZE(gEnergyChoice) - 1; x++) {
gEnergyChoice[x + 1] = gEnergyChoice[x];
}
} | 0 |
db138a8cbb0204e1738d18e554015fb7 | 9377d754ccfc297e2af322d6f73a479f | 地磁気の生データを整数値で返す | int bytes2Mag(char *HighReg, char *LowReg)
{
char NewBuffer[4];
NewBuffer[0] = LowReg[0];
NewBuffer[1] = HighReg[0];
NewBuffer[2] = 0x00;
NewBuffer[3] = 0x00;
int num = 0;
num = (num << 8) + NewBuffer[3];
num = (num << 8) + NewBuffer[2];
num = (num << 8) + NewBuffer[1];
num =... | 1 |
3f88f7e28feb09ccaee0df5553683c65 | 6b5e546bdc260c0ce391d89dbaf2bbfd | 创建一个技能item | function item.create_item(name,poi,hide,p)
local items = setmetatable({},item)
local data = ac.skill[name]
data.owner = ac.dummy
data:update_data()
for k, v in pairs(data) do
items[k] = v
end
items.owner = nil
local data = ac.table.ItemData[name]
items.lni_data = data
if data then
for k, v in sortpairs(d... | 1 |
5f5a5ea0e10bc2f1721e9ce432a816f4 | ce3a1efff8b5cd13e6fc7164914b122b | # Sort a column by descending order | sort.dataframe <- function(dataframe, key, key.numeric = function(v) as.numeric(v), desc = FALSE) {
dataframe[order(key.numeric(dataframe[, key]), decreasing = desc), ];
} | 1 |
3c69bfb80861e50f3edb6443d604b27b | 87de3edaff7f28f730992d7fca543266 | Update a users fields except password | class UserDAO implements IDAO
public function updateWithoutPassword($data) {
try {
$query = "UPDATE ".$this->tableName." SET email = :email, name = :name, surname= :surname, is_admin = :is_admin WHERE id_user = :id_user";
$parameters["id_user"] = $data['id_user'];
$parameters... | 1 |
6a572f5ace7a3fc4915bbdead126cf87 | 00b574408b9514205bd81c39fcdc7910 | Stops SPI_1_CARD component. | {
if(hspi->Instance==SPI1)
{
__HAL_RCC_SPI1_CLK_DISABLE();
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_6|GPIO_PIN_7);
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_3);
HAL_DMA_DeInit(hspi->hdmarx);
HAL_DMA_DeInit(hspi->hdmatx);
}
} | 1 |
aac8322c98d9c7c794da10e9a1326f9f | 098e53b874432c2357cf703356da37d4 | This method is responsible for drawing the areas to define where the player should expect to see the cards
appear on the screen | class Data:
def drawAreasOfInterest(self):
for area in self.interestList:
cv2.rectangle(self.video, (area.leftX, area.topY), (area.rightX, area.bottomY), (255, 194, 31)) | 1 |
d3d1e335865eaf12545d8cb38574861f | 06b5fbab184dd32ba9bfabc1f3f4649b | パーツモデルのメッシュON/OFF取得 | var model = transform.Find( "Model" );
var meshR = model.GetComponent<MeshRenderer>();
if( meshR != null ) {
meshR.enabled = !hidden;
}
var childMeshR = model.GetComponentsInChildren<MeshRenderer>();
for( int i = 0; i < childMeshR.Length; ++i ) {
... | 1 |
78b0d90ce48c538870f9e648ad41f1aa | ada8ff14cca401dee455aefb08c39fd4 | 请求结束
<p>不管请求成功还是失败,都会回调onEnd</p> | void onEnd(CeTask ceTask); | 1 |
4c6f5f0ada6739780a8c05f9bb0b6349 | 55235dff58092a981efbf8b0f0c6edf4 | Retrieve a GameObject by ID and modify it. | class SafeSandbox:
def GetGameObject(self, obId):
gameobject = objmgr.GetObject(obId)
return _GetProtectedObject(gameobject) | 0 |
11bd16d5bf8eeaaccaa085ebd1ba71b6 | 5f85c222d8e60767f31e4005e8b796db | Checks if the exporter is excluded via webform.settings.
TRUE if the exporter is excluded. | public function isExcluded(); | 1 |
106dbcb93b029ad4d790d2f35efac733 | c1747006fbc56659441c44ebf5a24c20 | LDRSB rd, [rn, immed] | {
UINT32 disp = opcode & 0xff;
m_ea = m_gbr + disp;
m_r[0] = (UINT32)(INT32)(INT16)(INT8) RB( m_ea );
} | 1 |
28a140768837298a3de2f586c228df99 | 4cca87d5e6a31f771df0cab3e6ede2cc | 将缓存的登入状态都设置为0 | namespace NetdiskManager
public class FunctionReset:SqlAction
public void ResetLoginStatus(IDatabase redisdb)
{
NetCarInfo netCarInfo = NetCar.GetNetCarMac();
string delkey = String.Format($"loginstatus{netCarInfo.NetCarMac}");
string delprokey = String.Format($"projectpa... | 0 |
e15802205983fa66894dd0378b4d9e98 | 347276abb24c088aee6cab9392779d20 | 通过代理id获取代理信息 | class Agent extends Model
public function getAgentOne($pid){
if(!empty($pid) && !is_numeric($pid))return false;
$agentInfo = DBQ::getOne('agent', '*', [
'id' => $pid
]);
if(!empty($agentInfo)){
return $agentInfo;
}
return false;
} | 1 |
05407e5545d7a5e101f164f76f1c8688 | 4656c09994bfeafc2a8a3d144e8e627e | Q値から最善の行動を返す | list_max_action = []
max_q_value = float('-inf')
for action, qobj in action_map_qobj.items():
q_value = qobj['q_value']
if q_value > max_q_value:
list_max_action = [action]
max_q_value = q_value
elif q_value == max_q_value:
... | 1 |
e8eed19d5a5e194b0929200043203c87 | 18ca13c4a3931e18244dfbc1f384e39d | Handles the Click event of the ButtonResetPan control. | {
if ((DataContext?.ManualVertexEditor?.ResetOffsetCommand == null) || (!DataContext.ManualVertexEditor.ResetOffsetCommand.CanExecute(null)))
{
return;
}
DataContext.ManualVertexEditor.ResetOffsetCommand.Execute(null);
ValidateButtons()... | 1 |
77fc2e6cdcab41abb69cf7523c9a8b3e | c49d84b04be213fe4c795779696e2f8d | Get the voter turnout results | return Response([
{'date': d.strftime("%Y-%m-%d"), 'count': c}
for (d,c) in Vote.objects.response_timeseries()
]) | 0 |
df4f9ed2fc89c95aef9ea7bbee909482 | 3d056c52d154d8ed26b8f78f7834fbcd | 返回输出到控制台的行数 | class ProcessOutputReader
public int getOutputLineCnt() {
return lineCnt;
} | 1 |
61c7190a34a74fb8db02fddb969af79a | 0e587b5e1a4b6b82d25d66e596a35845 | 判断是否自己 的评论 | abstract class CommentDelegate<T>
protected fun isOwnComment(userId: String?): Boolean{
return DynamicQueue.mLastUserId == userId
} | 1 |
660bddddee6352f25e4043f624448dfd | 1be08c9daee271441baf74ea5da4232a | Attach trees t1 and t2, respectively, as the left and right subtrees of the external Position p.
As a side effect, set t1 and t2 to empty.
Raise TypeError if trees t1 and t2 do not match type of this tree.
Raise ValueError if Position p is invalid or not external. | class LinkedBinaryTree(BinaryTree):
def attach(self,p,t1,t2):
node = self._validate(p)
if not self.is_leaf(p):
raise ValueError('Node referred by Position p is internal node')
if not (type(self) is type(t1) is type(t2)):
raise TypeError('Tree t1 and Tree t2 must be of sam... | 1 |
3fd571ad6b6e49709add951980560ffc | 50c5fbb6b73ac654351c12c4c854280b | Query 2 – Cars from make Toyota | {
IEnumerable filteredList = new List<Car>();
filteredList = from c in Cars
where c.Brand == "BMW"
select c;
foreach(Car car in filteredList)
{
Console.WriteLine(car.Brand + " , " + car.Model);
... | 0 |
d9f74efa7a4ee5174d1ce5cd6f334fb3 | a0d3d2504685a1a521128233e8e9912f | активация/отключение поля даты смерти | {
if (e.ColumnIndex == ColBirthdate.Index)
{
_Rectangle = xfDataGridView2.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, true);
dtp.Size = new Size(_Rectangle.Width, _Rectangle.Height);
dtp.Location = new Point(_Rectangle.X, _Rectangl... | 0 |
74608b0fcc14226b51fc74d3ca8b52ff | eefcb603e7a1d331c1b4d4df70b890a6 | Check for equality of Lists without word order in consideration | public class GoldStandardCalculator
extends JCasAnnotator_ImplBase
public static <T> boolean listEqualsNoOrder(List<T> l1, List<T> l2) {
final Set<T> s1 = new HashSet<>(l1);
final Set<T> s2 = new HashSet<>(l2);
return s1.equals(s2);
} | 1 |
cc50cfa43096d35e3cc8f01c55688114 | 602bfae43649846798f684b629033905 | Calculates if the Owner should reveal his Hand | {
return player.GetHandValue() > _dealer.GetHandValue() || _dealer.GetHandValue() > BLACKJACK;
} | 0 |
e724e97b644d9f8ddfaf9da365413e45 | c096d8e094d736d970e58e7892a4cf59 | open load file dialog and load a saved order | {
DialogResult result;
string filename;
OpenOrderFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
OpenOrderFileDialog.InitialDirectory = Directory.GetCurrentDirectory();
result = OpenOrderFileDialog.ShowDialog();
if (resu... | 1 |
4e724f77739100ea362c50a0bad8ca4d | 5e999a4b57fa9257526b634c25b5e5a7 | Lists all cfgPais entities. | namespace TPAzure.Controllers
public class PaisController : Controller
public async Task<IActionResult> Index(string keySearch = null)
{
ViewBag.keySearch = keySearch;
return View(await _paisHttpService.GetAllAsync(keySearch));
} | 1 |
643799f0f374a133ae6d26b91b5b6e64 | 5ba2119ce60d10309b5f688801d42ca3 | Respsonsible for rendering a read-only view of the control. | class SimpleChoice extends HtChoice{
function renderReadonly(){
$this->renderSimpleChoiceOptions();
} | 1 |
2112fad702aef21305476c1ab2d2d796 | 9641a147623f4babeb1fa3503a7c3934 | Make a small version of the frame. | void FrameCanvas(CNVID cnv)
{
int w = CBCanvasWidth(cnv)-1;
int h = CBCanvasHeight(cnv)-1;
CBCanvasDrawLine(cnv, 0, 0, w, 0, rgb(200, 200, 200));
CBCanvasDrawLine(cnv, 0, 0, 0, h, rgb(200, 200, 200));
CBCanvasDrawLine(cnv, w, 0, w, h, rgb(200, 200, 200));
CBCanvasDrawLine(cnv, 0, h, w, h, rgb(200, 200, 200));
CB... | 1 |
8b5571c818318833875055e86bd033f7 | 7dba31755686c7bd95b1d8b861a768ee | ===========================================================================================
Returns a pointer to the data of feed-buffer and length in bytes.
=========================================================================================== | const char* ReadEventSink::get_data(int& size) const
{
size = _in_use;
return _buf;
} | 1 |
b23ddc48436b608f39fa1c6b7eb93f97 | b31b20797c16c1d949a7d2cb72c303f9 | Generate the text for the specified message type,
using a single post-processing action | {
string title = string.Empty;
switch (messageType)
{
case SystemEnum.MessageType.Information:
title = "Information";
break;
case SystemEnum.MessageType.Warning:
title = "Warning Messa... | 1 |
aca364987b1660596f69fd225c887999 | adcd96f862465438004185d8f94dc3fc | --------------------------------------------------------------------------
Export Selected Items to Excel
-------------------------------------------------------------------------- | namespace Layton.AuditWizard.Applications
[SmartPart]
public partial class ApplicationsTabView : UserControl, ILaytonView
private void ExportXlsToolStripMenuItem_Click(object sender, EventArgs e)
{
ExportToXLS();
} | 1 |
7ad64b9c9d0da649a9cefcca1fe766f2 | 1d02284128cd0d1e4fe79ffe3e3a9341 | test case where there are no elements in any of the final lists | class Test_find_max_sum_intervals(unittest.TestCase):
def test_emptyList(self):
self.testList = []
self.assertEqual(find_max_sum_intervals(self.testList), [0, -1]) | 1 |
ba315c2fddf748bbb7f227edda4c92ad | 656da128f558c9407f6b2deb7511efda | 当在 positionStart的位置开始插入itemCount条数据时会调用该方法 | public class Myadapter extends RecyclerView.Adapter<Myadapter.ViewHoider>
public void addDatas(int position) {
datasSet.add(position, "add on");
notifyItemInserted(position);
} | 0 |
814eaa3a7796a9ec3772e7c466037568 | da11dbb9a31a8ff34abd8133a5d3372c | 语音按钮点击事件 | public class Launcher extends Activity
implements View.OnClickListener, OnLongClickListener, LauncherModel.Callbacks,
View.OnTouchListener
public void onClickVoiceButton(View v){
v.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
startVoice();
} | 1 |
c5c18699bf4233838e5f74b007839911 | b45f37eb32bcf25471a11e37663fb64d | Calculate the symmetric difference of this list and another | class Array
def ^(other)
return (self|other)-(self&other)
end | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.