query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
854924f2e77ac68083e6ee0af26f5d96 | 53cbcc8b521031501af7aa8b4deae0a3 | 视图函数,修改店铺绑定的经营者的账户 | $saler_id = $request->session()->get('saler_id');
$store_id = $request->input('store_id');$store_id = intval($store_id);
$seller_model = Saler::find($saler_id);
if($seller_model->id>0){
$seller_model->store = $store_id;
$seller_model->verified = 0;
$sa... | 1 |
63bbac6a355419260dc0e3e188246b4a | 33d39f021c137e475dec5bb6e8124bb5 | @brief Function to load Full SDR information to database | if (is_network_seed()){
network_seed(false);
SPDLOG_INFO("Transiver was seeding. Seed stoped.");
};
#define CHK_BD(msg) \
if (!db_res){\
SPDLOG_ERROR("Data load from database failed. {}", msg);\
throw(std::runtime_error(msg));\
}
#define CHK_VAL() \
if (ch_res.error){\
SPDLOG_ERROR("{}", ch_res.msg.... | 0 |
0d9bf70d3dbce735dcc5c07ca7a030ea | 4c958728e7df0a20e6f4bb9598245589 | Test whether codes can be retrieved for primitive types and their wrapper class | public class CodecRegistryTest
@Test
public void testCodecRetrivalForPrimitiveTypes() {
assertEquals(IntCodec.getInstance(), TEST_REGISTRY.getCodec(int.class));
assertEquals(IntCodec.getInstance(), TEST_REGISTRY.getCodec(Integer.class));
} | 1 |
1699cdb704692893191d4639bf050f52 | ccebf4b3c8b1139a19f8a9b76e565092 | 发送延迟消息,开源版本只支持18个level的延迟
1s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h | @Slf4j
@Service
public class DocOrderServiceImpl implements IDocOrderService
public synchronized void sendDelayMsg(DocOrderMsg msg, Long delay) throws Exception {
String delayMessageKey = Constants.RABBITMQ + ":" + "delayMessageId";
redisTemplate.opsForValue().increment(delayMessageKey);
Messag... | 0 |
9d32dcdedde97d182d6879f34d39ecb3 | a1866291e24337a929b14d88d9935112 | method for getting hit by laser | namespace Blaster
public class ASTEROID : MONOBEHAVIOUR
void OnCollisionEnter(UnityEngine.Collision other)
{
if (other.gameObject.tag == "Laser")
{
FlashValue = 1;
Hit(1);
}
} | 1 |
224182eaa33c033cb853751fb35b19e9 | 5b5864d84464b9628c304c5445a0ed78 | 获得闪避 | local baseMiss = self._heroBaseData.miss
local missBuffAdd = self._buffMgr:getCachedAffectValue(enums.BuffAffectType.AddMiss)
return baseMiss + missBuffAdd + self._attrAdd.MISS
end | 0 |
c029234af44c88591230a12e5b27a3b2 | 5df00d17c42a4a085a9502cb3885fc89 | Get the vertical velocity array | def get_vel_y(fname):
return fname["Velocity"][:,1] | 1 |
c300dd6eb0bfa3341370bd1084c07de2 | f1f6f66e98ff60982ad53389f02d7804 | Если данные помещаются в одну посылку | {
ushort checkcrs;
byte[] arrName = Encoding.UTF8.GetBytes(Name);
byte[] arrPocCount = BitConverter.GetBytes(pocCount);
byte[] arrPocNum = BitConverter.GetBytes(pocNum);
byte[] arrLenghtData = BitConverter.GetBytes(LengthData);
byte[] arrDa... | 0 |
2edb45d5f1510cd1c5737610edbd069c | 2b16c234fb6b36a422e2bb15cc762e5f | Create a process per item in the list
Items in the list should be tuples, where
the first item in the tuple is a function
and the second item in the tuple is another
tuple for the arguments to that function.
The process objects are returned as a list. | class Main_InvertedPendulum(simulation.Main.Main):
def getProcesses(self):
import SimulatedProcess,SimulatedProcessParameter,RealProcess
return \
[
("Simulation",SimulatedProcess.SimulatedProcess(),SimulatedProcessParameter.Open),
("Real hardware",RealProcess.RealProcess... | 0 |
58d7f1df181dd2da7264e6b51491a83e | ca7b729c5ad8b5b673ccd17fd2707cc9 | Metodo que atualiza um Grupo de Pesquisa que já existe na base de dados | public class ControllerGrupoProduto
public boolean atualizarGrupoProdutoController(ModelGrupoProduto pModelGrupoProduto) {
return this.daoGrupoProduto.atualizarGrupoProdutoDAO(pModelGrupoProduto);
} | 1 |
20c25b924d51e332eb8c2c2101fb1df2 | 15fea81b4f5b2d6d0975053d185cceaa | Metodo que permite llenar la entidad de páginación para grillas sin filtros | {
$this->total_resultados = array_values($this->getAndSetconsulta("count(*)")->get()->result_array()[0])[0];
$this->consulta = $this->db->select($this->campos)->from($this->tabla);
$this->total_paginas = intval(ceil($this->total_resultados / $this->resultados_por_pagina));
} | 1 |
2a5fd590f8cc5137c6af5ed22feaf385 | 2985148975ab1a320423be4e0d8041c3 | Selects the supplied date cell. | if (activeCell) {
activeCell.removeAttribute('active');
}
activeCell = cell;
activeCell.setAttribute('active', '');
let date = activeCell.id.split('-');
currentDay.setFullYear(date[0], date[1]-1, date[2]);
} | 1 |
6e6a0db570c2d96c227497542108f480 | 98e4bf0215d59e1d0ae85ef74728beea | convert a CarParameter object to a parameter vector (list of float) | index = 0
parameters = list()
parameters.append(self._paramFrictionViscousOut)
parameters.append(self._paramFrictionCoulombOut)
parameters.append(self._paramInertiaOut)
index+=3
if self._featureFrictionStribeck:
parameters.append(self._paramFrictionVel... | 1 |
8a97df0a4427692a37595ad0904a84ee | f56119d473cf485213ef936bf9206709 | 根据物品组ID,物品刷新等级区间 | function i3k_sbean.equip_batchlevelup(posLevels, pos)
local data = i3k_sbean.equip_batchlevelup_req.new()
data.posLevels = posLevels
data.pos = pos
i3k_game_send_str_cmd(data, "equip_batchlevelup_res")
end | 0 |
f1c94a7cc4f8a50c35a1ed13fde17290 | 0aeb62e6d2e64ca9559f686cc0899fa5 | SignToken 为userName签发token,token包含了用户名 | claims := make(jwt.MapClaims)
claims["username"] = username
if username == "suummmmer"{
claims["admin"] = "admin"
} else{
claims["admin"] = "noadmin"
}
claims["uid"] = uid
claims["exp"] = time.Now().Add(time.Hour * 480).Unix()
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
tokenString, err ... | 1 |
de8bec96327489a2c98940f56a15fab6 | 7a414c6dff2d64c368ca265bbf8e96cd | hss受理日志查询页面 | function pageInit2( lsh, rwlxbm ){
$('#dgSgzxck').datagrid({
nowrap : false,
fit : true,
rownumbers : true,
pagination : true,
fitColumns : true,
method: "post",
url: "/oa/yw_jhrw/yw_jhrw_003/yw_jhrw_003_view/sgzxjh_sel_view",
queryParams: {
... | 1 |
2f1a7eea1faeba64b9f2d308f0e43611 | 7fcc3a164a7a723851caceee9934e609 | If the Watchdog Non-Maskable Interrupt (NMI) is called,
loop until the device resets. Some devices will invoke
this callback upon watchdog expiration while others will
reset. See the device specific watchdog driver documentation
for your device. | STATIC mp_obj_t modmachine_watchdog_reset(void) {
WatchDog_KeepAlive();
return mp_const_none;
} | 0 |
aa70dfcedf00bae2c2c21e168e959111 | 9a70cb1f6704332246cd65a60b57f3a7 | 爬取解析医疗保险 | String year) {
tracer.addTag("CrawlerBaseInfoService.crawlerBaseInfo:开始爬取解析工伤保险", parameter.toString());
WebClient webClient = WebCrawler.getInstance().getNewWebClient();
Set<Cookie> cookies = CommonUnit.transferJsonToSet(taskInsurance.getCookies());
for (Cookie cookie : cookies) {
webClient.getCookieMana... | 0 |
d58e6091375bf04106df6b19a33435ac | 2251646d2c45c2221787951b8e0a941d | Generic chain class. Very similar to itertools.chain except this object
can be iterated over multiple times. | class ChainMapper(MapperClass):
def __init__(self, *mapper_classes):
self.mapper_classes = mapper_classes | 0 |
8b94c0fd29d1f4cc3c4bcfee5213008a | e6dfd14ff3cbe391a8528f4f59bb51c2 | return the current position of the "joystick" controller | namespace Joystick_code
public static class JoystickAPI
[DllImport("winmm.dll")]
public static extern int joyGetPosEx(int uJoyID, ref JOYINFOEX pji); | 1 |
58c549f07b02c24fde0698248034fe8c | e08b3d524d07128ceb95997433c71747 | 品牌Banner加载,即品牌专题最上面的一张图的加载,后来确认是从促销那边拿的一段html代码 | var code = $("#areaCode").val();
if (code == "") {
code = "45";
}
$.post("../ccpAdvert/loadAdvertIndex.do?advertPostion=1&advertType=A&version=" + new Date().getTime(), '', function (data) {
if (data != undefined && data != null && data != "" && data.length > 0) {
$("#banner ... | 1 |
5982cb3ae8b55dae3042b0207a28ce6d | 44c889879067ef2ebfc8b6433762f6ef | 返回当前所有的皮肤类型 | namespace DAL
List<ClientSkinDM> GetAllSkins(); | 1 |
e246f5b8b10ca53496eec0b84b2a6bf5 | 0a3026f90be93f8030f7d99a9b84ba81 | Marks the local storage as dirty | export default class PersistenceEngine
setChanged(){
this.hasChanged = true;
this.persistLocalstore();
} | 1 |
7a6026a88b8652380313b1863236b0d5 | 4e0efe7c42ac6c272c8697ca08d5444a | 电瓶是否在位 | class DeviceLogic extends BaseLogic
public static function isBatteryConnect($imei)
{
$data = RedisLogic::getDevDataByImei($imei);
if (!empty($data['charge']) && $data['charge'] == 1) {
return true;
} else {
return false;
}
} | 1 |
7f7a56454afc96d12990eb758d49f781 | 13bef297917ed998a8c25b25b85167d3 | 当每个聊天被点击显示该用户详细信息弹窗 | public class StartLiveActivity extends ShowLiveActivityBase implements ITXLivePushListener, SearchMusicDialogFragment.SearchMusicFragmentInterface, BeautyDialogFragment.OnBeautyParamsChangeListener, TCLivePushListenerImpl.ITCLivePushListener, TCLivePlayListenerImpl.ITCLivePlayListener
public void chatListItemClick(Chat... | 1 |
1d17650d19adaebd7e6f36103166366f | 74435734169b5f03c134f52cfae59176 | Получить символьный код инфоблока | {
$sections = \CIBlockSection::GetList(
['sort' => 'asc', 'id' => 'asc'],
['ACTIVE' => 'Y', 'IBLOCK_ID' => $ibId],
false,
['CODE']
);
return ($section = $sections->Fetch())
? $section['CODE']
: '';
} | 0 |
d30dcd19f0764db7ff249d860973949c | 8d2c9b2475e5654a36ee6a8e9d8acd27 | 是否有通路,直接使用并查集 | class UF_quickUnionWeight
public boolean connect(int p, int q) {
return find(p) == find(q);
} | 1 |
1a7209021e3affac316f048539c5ada0 | 69ab67925fb70234499683c3a97cdcd0 | #### isNegativeZero :: Number -> Boolean | func isNumeric_Data_Negative(numdataP TNumericData) bool {
return (numdataP.digit[0] & 0x80000000) != 0
} | 0 |
7742fc95f7f01a072604e23874795541 | 0c1606a2cc9c057350b62b05380a670a | Sets (as xml) the "text_nl" attribute | public class TextNlAttributeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.abctech.transition.xmladbeans.sologstrand.TextNlAttribute
public void xsetTextNl(org.apache.xmlbeans.XmlString textNl)
{
synchronized (monitor())
{
check_orphaned();
... | 1 |
b26c407b5da605a57e56f931931633b5 | a8ce34b280b56a4e727d41999528b919 | Gets the x payment return denial claims. | abstract class PurchaseOrder implements ActiveRecordInterface
public function getPohdreturnspo()
{
return $this->pohdreturnspo;
} | 0 |
04e931dbde9ac369a54e8548009aa21f | cbb9df6aaad1d347395b92b7dcd78606 | This adds a property descriptor for the SPX Board Number feature.
<!-- begin-user-doc -->
<!-- end-user-doc --> | itemPropertyDescriptors
.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EsxFile_numSongsEmpty_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_EsxFile_numSongsEmpty... | 0 |
1c748fc269cb8bee4e8ddf5e33898b63 | a99816fe6575d9f2e3e6bb6456bb65aa | 读取course表格的所有数据 | courses = dict()
courses['course_name'] = table.caption.string.strip()
l_course = []
tbody_list = table.contents
for t in tbody_list:
if not t == '\n':
l_temp = list(t.stripped_strings)
if len(l_temp) == 7:
width = float(l_temp[2].replace("%", '')) / 1... | 1 |
207e1921a462f013feef2dc7d43b1083 | 284a42427ff182ada3e5748c8fe40f1c | Coroutine that makes the enemy ships do evasive maneuvers | canvas()
if s<0 : s = int(randint(min(combatants),1+max(combatants),1))
save = e[s]; e[s] = True
print(s)
for time in times :
sail(s)
showship(s)
e[s] = save | 0 |
638ab90ab517f2891b3b0a3ee25b71b4 | cd7e7f1de37ac23bbf8b1e91179bb29d | Sets the ownersCount | class InseeVitelogeStats
public function setCount($count)
{
$this->count = $count;
return $this;
} | 0 |
2322094fff2f3020812487da455eb3b7 | c91d3f384339a26d452e34a332c4c6ce | ajusta o final da string após o uso de fgets | fgets(str, size, stdin);
int i = strlen(str) - 1;
if(str[i] == '\n') str[i] = '\0';
} | 1 |
a4b01dc74922f76323f31e5099020eb2 | 18b6f32d1bbbf15dea273ef7c86aa584 | 无参数lambda | auto func = [](){std::cout << "Lambda" << std::endl;};
func();
} | 1 |
c387a49d9e9b069ff42984531c15ccb5 | 1eda2769158f51a06d14ebec04523df9 | 查询队头数据 不取出 | bool out_seqqueue(seq_pqueue q,datatype *D)
{
if(is_empty_seqqueue(q)){
printf("队列已空!\n");
return false;
}
q->front=(q->front+1)%MAXSIZE;
*D=q->data[q->front];
return true;
} | 0 |
9b549fd74dae037a9b27baf3f0126f68 | 8dea20eac6203826432302eef70e0b69 | 查询最新5张玩家原画 | $res = $this->dbConnection->createCommand()
->select('times')
->from('trendstime')
->where('uid = :uid ',array(':uid'=>$uid))
->queryScalar();
if($res){
$rows =$this->dbConnection->createCommand()
->select('ruid')
... | 1 |
94df4fcc3ab5ea79a95e06ce1dbb94e5 | d15c50d46ae2bd1aed0573bd415c43b7 | chequea si es feriado ese dia | function esDiaFeriado($fecha) {
$dias_feriados_2018 = [
"1/01" => "Año nuevo",
"12/02" => "Carnaval",
"13/02" => "Carnaval",
"30/03" => "Viernes Santo",
"30/04" => "Día del Trabajo",
"25/05" => "Batalla del Pichincha",
"10/08" => "Primer Grito de la Independencia",
"12/10" => "Indep... | 1 |
9eeb98b0c3b19e5538e2f52cb0a973b3 | e2896ee3fd83c6a291e300b979ec708d | find the last block of a file | block_list = open(block_filename)
position = 1
for block_user_id in block_list:
if user_id == block_user_id[:-1]:
return position
position = position + 1
return 0 | 0 |
84dd20c20b04ed5c5b763ba387dba451 | 70a719303cf7f2fee013dee1b12b1615 | OCR API entry point. | print(request)
print(request.remote_addr)
data=json.loads(request.data)
file_content = data["file"]
try:
ocr_text=extract_text(file_content)
data=process_ocr_text(ocr_text)
if not data:
resp=jsonify(error="Unknown receipt format")
resp.status_code=418 ... | 1 |
defbc731b9193f2e03840e5b28db9440 | 1a906e7314f969864d57019fa87aae7a | Method to validate the new position created in VV Admin Portal for a client | public async Task<PartialViewResult> NewPosition()
{
var categories = new List<Category>();
var client = new Client();
var response = await this.GetHttpClient().GetAsync("Category");
if (response.IsSuccessStatusCode)
{
categori... | 0 |
cc8d97632f854cbb1fad58f79500d423 | 386987e0ea72e01fc12e28de7f528608 | Return coordinate weights for (selected) atoms. | class Select(object):
def _getCoords(self):
if self._coords is None:
self._coords = self._atoms._getCoords()
return self._coords | 0 |
52ae5caf1fb6a4ea8df6acd03d72bba4 | 9aceb4627d08f1309097a4069c369989 | Author: John Vance
Purpose: Allows for the food to be placed on the plate in the Kitchen and Cafeteria scenes | public class plate4 extends kitchens
public void checkFood()
{
Bokchoi f = (Bokchoi)getOneObjectAtOffset(0,0,Bokchoi.class);
broccoli b = (broccoli)getOneObjectAtOffset(0,0,broccoli.class);
beef cow = (beef)getOneObjectAtOffset(0,0,beef.class);
chicken c = (chicken)getOneObjectAtOffs... | 0 |
e5366d3d15f15a9a50e685e38921334a | bcce823e6f48a9ec976ede3e70b78dee | 自动设置div高度 | {
var divs = $("div ."+classname);
var max = 0;
for(var i=0; i<divs.length; i++) {
max = Math.max(max, $(divs[i]).height());
}
$(divs).css('min-height', 3+max+'px');
} | 1 |
64e2004724b66a5b81008b3987ff99d2 | 6cb0722ef818ca0784a1731103f30dc5 | Method is_ge_today
大于等于今天验证方法 | class TimeUtil
public static checkToday(t:number):boolean{
let today0 = Math.floor(TimeUtil.getTodayZero() / 1000);
return t >= today0;
} | 1 |
642fcbcf2067be95448e31579e590515 | 0583c46fd981541dd8ac955e9e2df28f | 複数削除エラー、postデータなし | class ItemsController
def destroy_multi
Log.add_info(request, params.inspect)
raise(RequestPostOnlyException) unless request.post?
if params[:check_item].nil?
list
render(:action => 'list')
return
end
is_admin = @login_user.admin?(User::AUTH_ITEM)
count = 0
params[:check_it... | 1 |
09e5274ca0cee9f9820be8088689ed08 | bd89b039971e9ab721b2679738a6f28b | Remove o utilizador selecionado do sistema. | class UserController extends Controller
public function destroy($id)
{
$user = User::findorfail($id);
session()->flash(
'error',
'Utilizador: ' . $user->name . ' foi apagado!'
);
$user->delete();
return redirect('/admin/users');
} | 1 |
d0a4eeb4089bab90c54766579efb2c48 | 01ca8145f47e61092ed3ee47d05d434f | Método responsável pela execução da escala da estrutura
selecionada a partir da informação dos fatores de transformação. | namespace KAOS.States
public class ModelState : AbstractState
void scale(float x, float y, float z) {
float[] aux = new float[16];
setScaleMatrix(aux,x,y,z);
multMatrix(modelMatrix,aux);
setModelMatrix();
} | 1 |
f9c8860eec93c2e1cbd1fade94fe049c | 0662f5db1bfe8601ac58b420880c3983 | 正しい:1 正しくない:0
以上を元にして,両方が正しい時認証出来たと出力する
それ以外の際は認証できなかったと出力する | class Auth(object):
def login_auth(self):
if self.username in settings.USER_PASS:
if self.password == settings.USER_PASS[self.username]:
return 0
else:
return 2
else:
return 1 | 0 |
a9f00d5cc85ec308b07e3cecb6136d83 | 762847f6183cb9dbde84e5da7c456810 | Perform initial parsing of a list of untyped data objects. | {
for (vector<const Declaration*>::const_iterator it = getType().subElements().begin();
it != getType().subElements().end();
it++) {
const Declaration& dec = **it;
if (dec.isList()) {
add(new DataObjectList(ref(), dec, n));
}
else {
... | 1 |
723038da75542382d4a922acbd643f49 | a9da901aa9fe52110ce4ea824b46584a | 获取 活动适用城市ID | public class SharedPreferencesHelper
public String getCityId() {
return settings.getString(PREFS_CITY_ID, "519188");
} | 1 |
d0a9346c09437656db964a09a018fc56 | f36f30a5c8a73e846d1bbe118e9fa056 | Search customer by the hierarchy | class AuthController extends Controller
public function SearchCustomer(Request $request)
{
$emp = DB::select('call spCustomer (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', [
null,
102,
null,
null,
null,
null,
null,
... | 0 |
9cb3e4296235cb4bc9863aea5eb8f5e1 | 755e6f96bf355ba1ba3579a4b5e28cb7 | Take values from farseer and apply to our object | string cmd = (string)e.Params["cmd"];
ISFSObject objIn = (SFSObject)e.Params["params"];
switch (cmd) {
case "ShipTransform":
switch(Application.loadedLevelName) {
case "InGamePilot":
GameObject pilotObject = GameObject.Find("Pilot");
PilotControlls pilotScript = (PilotControlls) pilotObject.GetCo... | 1 |
a2880d5abd41fae5c08e954977446307 | d8907cd71bc783a4e792ea8e28a22d0e | Database configures the database on an InfluxReporter. | if err := configurate.Init(options.CfgPath); err != nil {
return err
}
dburi, err := configurate.C.String("db.uri")
if err != nil {
return err
}
logcabin.Info.Printf("DB URI: %s\n", dburi)
db, err = sql.Open("postgres", dburi)
if err != nil {
return err
}
if err := db.Ping(); err != nil {
return err
... | 0 |
e9caa4265a09c022f460f2e154ba4d6f | b354b06c46eade5fdf2eebe0729789b5 | Getter for X coordinate of circle's center. | export default class Circle
getX(): number {
return this.x + Circle.OX;
} | 0 |
8aededb11329f87a484e733b24bb8af3 | 775b53b429d41bb4133a932157aeab1a | Преобразует текущую матрицу в матрицу вращения
вокруг произвольной оси на заданный угол | {
float cos = (float)(Math.Cos((double)(angle)));
float sin = (float)(Math.Sin((double)(angle)));
result.M11 = cos;
result.M12 = 0.0f;
result.M13 = -sin;
result.M21 = 0.0f;
result.M22 = 1.0f;
result.M23 = 0.0f;
... | 0 |
c58538bca9eebcb93d128e5cc3dac36e | 4969b5c9175d8d2d075b303a39e04558 | 隐藏菜单及入口; | function hidemenu()
{
var elements=getMenuElement();
var obj=null;
var event=getEvent();
var obj=event.srcElement||event.target;
if(obj.className=="drop")
{
return;
}
for(var i=0;i<elements.length;i++)
{
obj=elements[i];
var nextobj=obj.nextSibling.nextSibling;
var parentObj=... | 1 |
6ba2b3f348602e21f5a498c82e48f231 | e29b9ac8bab0641f73078f6d32967df0 | Stores the data here to the aligned address given. | void
storeRegister(SIZE_TYPE *reg, SIZE_TYPE memory_addr) {
SIZE_TYPE reg_value = *reg;
writeIntoMemory(memory_addr, NUM_BYTES_IN_WORD, (data_ptr) ®_value);
} | 1 |
e3ce71629abb77435c5e0b1c3f2ce0e6 | f71cf5512646bd08bc9f3a9b10eb369b | 是否有幺九 | class GameHuaNan extends BaseGame
public function _is_have19($chair)
{
$bHave1_9 = false;
for ($i = ConstConfig::PAI_TYPE_WAN; $i <= ConstConfig::PAI_TYPE_TONG; $i++)
{
if ($this->m_sPlayer[$chair]->card[$i][1] > 0||$this->m_sPlayer[$chair]->card[$i][9] > 0)
{
... | 1 |
d3152ecb18486c40e62309cdbb3d19e8 | ce3d31a3111f0de947fbefc0ff773cc2 | @brief Efuse read xtal capcode 3 inout configuration | void hal_boot2_get_efuse_cfg(boot2_efuse_hw_config *efuse_cfg)
{
uint32_t timeout_cnt = 0;
uint32_t i = 0;
struct boot_efuse_sw_cfg0_t sw_cfg0;
EF_Ctrl_Load_Efuse_R0();
EF_Ctrl_Load_Efuse_R1();
while (EF_Ctrl_AutoLoad_Done() != SET && timeout_cnt < 80) {
arch_delay_us(1);
timeout... | 0 |
cc82572e0669811dd5ccf48ce960274e | f5bec57e2d0fee3fc5f4368439ff7246 | 方法2: 对一宫内,如果某个格子的可选值里面,有个值其他格子都没有,那么这个格子就是这个值 | class solution(object):
def check(self, x, y, value):
for row_item in self.b[x]:
if row_item == value:
return False
for row_all in self.b:
if row_all[y] == value:
return False
row, col = int(x / 3) * 3, int(y / 3) * 3
row3col3 = s... | 0 |
4648d6e07674f5ef69117a75e722815c | ed18612639b5b5c577ca21cb6f05a268 | display kernel as 1 or 0 in the debug window. | class CUDAKernel
void enableVerbose() {
flagVerbose = true;
} | 0 |
ab3a312ccdad6af5c468527dc5f77ce3 | 24e917f57cffc6beb46cf4ff74fb86ce | Функция деактивирует элемент с указанным кодом | public static function remove(string $code); | 1 |
cd4400f8e31da3f25963284da2e61480 | a5d248528cb4a7cfcbcd0e690de33467 | プレイヤーからレーザー出して当たったキャラの情報を取得 | {
Vector3 down = this.transform.TransformDirection(Vector3.down);
RaycastHit[] hits = Physics.RaycastAll(transform.position, down);
for (int i = 0; i < hits.Length; i++)
{
if (hits[i].collider.tag != "Hime")
{
if(hits[i].collider.tag == "Player")
{
... | 1 |
68b35a85691dddbd1e542fe46916fb0a | ad6396513f5f9ea873bb1c924364ce10 | Calls the schema manager and installs the tables | class inventorymanagementviasms_Install
public function run_install()
{
$this->db->query('CREATE TABLE IF NOT EXISTS `'.Kohana::config('database.default.table_prefix').'inventorymanagementviasms` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`delimiter` varchar(1) NOT NULL,
`code_word` varchar(1... | 1 |
5c2d8b92a31924f3c6f5ab4ea651ff54 | 449e7d91ffc41c0207b570a7c96594c3 | <p>
単価 を設定します。
</p> | public class SalesFlow
public void setUnitPrice(double unitPrice) {
this.unitPrice = unitPrice;
} | 1 |
031d008a835984aa890ebb052d8e9753 | 6cb5d1f96f6eb14ef9f290c241f4c87c | 调用dom4j接口将Document对象保存为文件 | public class Dom4jWriter
public static void writeDocument(Document document, File file) {
try {
OutputFormat format = OutputFormat.createPrettyPrint();
XMLWriter writer = new XMLWriter(new FileOutputStream(file), format);
writer.write(document);
writer.close();
}
catch (IOException e) {
throw new R... | 1 |
24592c1b3404b2b33765b078602c66c9 | 04e98e30913f3d7e0146f6a9c24cc108 | Builds a Direct2D rendering subsystem for the application. | {
var dpiScale = 1.0;
if (PresentationSource.FromVisual(this)?.CompositionTarget is HwndTarget hwndTarget)
{
dpiScale = hwndTarget.TransformToDevice.M11;
}
var surfWidth = (int)(this.viewport.Width <= 0 ? 1 : Math.Ceiling(this.viewport... | 1 |
61567ff37f83c9010d887c67982aba33 | fe032c621e8fe05270b1d83900656d0e | Zeichnet alle 3D-Graphen in Kugelkoordinaten. | super.paintComponent(g);
ZoomModel Zoom = TranslationModel.TrackplanEnvironment.CurrentEnvironment.Zoom;
TranslationModel T_Model = TranslationModel.getInstance();
Graphics2D g2d = (Graphics2D) g;
g2d.setPaint(Color.black);
g2d.setFont(new Font("Century Schoolbook", Font.... | 0 |
e310ea2015c6b873d1d6b575835c82bf | d55333475314e052b496a627636cafbb | Add new cell on the grid with probabily 9/10 add a 2 and 1/10 add a 4 | {
int k = 0;
Tuple empty[LEN*LEN];
for (int i=0; i<LEN; i++)
{
for (int j=0; j<LEN; j++)
{
if(grid[i][j] == 0)
{
empty[k].x = i;
empty[k].y = j;
k++;
}
}
}
if (k == 0)
return false;
int num = (rand()/double(RAND_MAX) < 0.9)? 2 : 4;
int pos = rand()%k;
grid[empty[pos].x][empty[pos].... | 1 |
882f8b2e76e9d8018dd4c774b249e4a4 | 2f6cbd6054999e2dd88449145c2187d7 | Sichtbarkeit des Scoreboards und seinen Labels/Buttons | function toggleButtons() {
$('.button').toggleClass('hidden');
$('.score').toggleClass('hidden');
} | 1 |
f884fac62dcc7fa6c8e91f3c3b6f633f | 40c881bbf72c5a12c6f2fb6f8c5cfc06 | 取消编辑表单,同时重置表单 | cancelEdit() {
this.setData({
isEdit: false
})
} | 0 |
0b3113dc4eb9c5c4f7087d0406600da7 | 05dad7d872bb5c708aaa8e3823b7b287 | Método que devuelve un audio aleatorio dentro de una lista de audios | public class Game
public AudioClip getRandomSound ()
{
return mySounds.get(myGenerator.nextInt(mySounds.size()));
} | 1 |
78634eed8450d1bcd13cc7f68a8a2194 | 30c6cbecd62264a464c447edec5ed586 | Show the form for creating a new Worker_labor. | class WorkerController extends Controller
public function create()
{
return view('admin.workers.create');
} | 1 |
6459ad93712c36282bee0a54771d4e2e | aace64ac53cf6cd3d4190e546cdbcdb8 | Set default center position, etc. for DIANA
Variables are passed by reference (not value), so that they are set and returned to caller.
HBT DIANA 28-Dec-2009 | double zz0, double Rc0,double Wvol0,double Wsur0,
double Ri0, double ai0)
{
mu = mu0;
V = V0;
VE = VE0;
R = R0;
a = a0;
zz = zz0;
Rc = Rc0;
RealpotPara->init(1.,R,a);
muhbar = kconstant*mu;
Wsur = Wsur0;
Wvol = Wvol0;
Ri = Ri0;
ai = ai0;
ImagVpotPara->init(1.,Ri,ai)... | 1 |
4769b1bbcf40424edab0a91a17326f35 | ad1a821ff8a1ef9938abdc3ab45f3298 | Get all (active & inactive) projects | class ManagerAPI
public function getAllProjects() {
$path = $this->PATH_GET_ALL_PROJECTS;
return $this->sendRequest('GET', $path);
} | 1 |
d3bc4f30362749f56bc72e1b0b05180e | 779887e8d50783329446a2311228073c | Not an action method. Used only in test environment, get the Thread object executing
background services, so you can #join on it to wait for bg
services to complete. | public class DefaultExecutor
public PriorityThreadPoolExecutor getForBackgroundTasks() {
return mForBackgroundTasks;
} | 0 |
eb53389ad241a0d9b1b925d6b7941900 | b0937997b9d107778d07375fdd23a439 | Getter method for instantiation_parameters, mapped from YANG variable /nst/netslice_subnet/instantiation_parameters (container) | class yc_internal_connection_point_nst__nst_netslice_subnet_instantiation_parameters_vnf_internal_vld_internal_connection_point(PybindBase):
def _get_ip_address(self):
return self.__ip_address | 0 |
917404f967f07dbaabf88be840bddf4f | 583bbfbc5dc548a22652d00eed58c3dd | Get data items from recycle bin, by user id. | result = RecycleBinItemCollection(self.context)
payload = {
"rowLimit": row_limit,
"isAscending": is_ascending,
"pagingInfo": paging_info,
"orderBy": order_by,
"itemState": item_state
}
qry = ServiceOperationQuery(self, "GetRecy... | 0 |
1a7654f52e9e830f72dd6462f41e1f73 | cdc7cd3d47362febff0521cd6cc4aa8e | Creates a dictionary of unknown arguments passed into script. | d = {}
prev=None
for a in argv:
if "--" in a:
prev = a[2:]
else:
d[prev] = a
return d | 1 |
c970fed511aa29b75bbd376e7023e693 | e670a071f25b0bc9c9ce15a682a670d8 | функция обновления прогресс бара | {
QMap<QString,QString> status_bar_info = statusInfo->get_status_info();
QString Status_string="Количество процессов: "+ QString::number(RowCount) + " | ";
foreach(QString status_punct, status_puncts)
{
Status_string+=status_punct + ": " + status_bar_info[status_punct] + " | ";
}
... | 0 |
ffe3f08a8fa1f3751a3fa8c7393591f9 | 4a1f917adfedd04c810b5ada89c01299 | 教练图片路径,多张以英文逗号","分隔 | @Table(name = "whg_tra_teacher")
public class WhgTraTeacher
public void setTeacherpic(String teacherpic) {
this.teacherpic = teacherpic == null ? null : teacherpic.trim();
} | 0 |
3c93f2908c946ad5cd4a15a51ec9eb65 | 7b58b04f6c121c979c0d3b56031ca55e | Initialize with a dictionary, another Struct, or data. | class Struct(object):
def __init__(self, data=None, **kwargs):
self.__dict__ = data or kwargs | 1 |
c04921ebb63882e871aaffb3685f0830 | 9fc583b14631e00271ba159b06ddcfe2 | Performs the reaction of a bloon after it's been shot at | public void onHit(Bullet bullet) {
addHealth(-1 * bullet.getWeapon().getDamage());
bleed();
if (getHealth() <= 0) {
deathSound.play();
return;
}
onHitSound.play();
} | 1 |
715bac562ccf950cb7c37b0c779838b8 | 8e71dd2f0412d505ce5a3a3712fc1864 | リスト項目が何も選択されない場合の処理
(初期状態では、呼び出されず、選択がなくなった時に呼ばれる) | class Main2Activity : AppCompatActivity() override fun onCreate(savedInstanceState: Bundle?)
override fun onNothingSelected(adapterview: AdapterView<*>) {
} | 1 |
63ed7d71a5c2abe9aa33a93149b54da5 | b73b059fa2dd9133f2728f483c130b9c | Checks if the system has the correct license | namespace X64Service
[MethodImplAttribute(MethodImplOptions.PreserveSig)]
int CheckLicense(); | 1 |
9a479b908dd134ef057638c3851a3366 | ee7acd4cc2a44748f4fd9d0453eaf733 | returns the default editor target name if not syncing pcbs or Target isn't specified | namespace UnrealGameSync
partial class WorkspaceControl : UserControl, IMainWindowTabPanel
private string TryGetEditorNameFromArchive()
{
if(ShouldSyncPrecompiledEditor)
{
List<IArchiveInfo> Archives = GetSelectedArchives(PerforceMonitor.AvailableArchives);
foreach(IArchiveInfo Archive in Archives)
... | 1 |
6aa74109f8310bf702f9983123d0e6e1 | bf4a90e28cbd46cbfb0ee40ced4f8973 | Este metodo se encarga de reproducir todos los elementos del repositorio | if not self.activo:
print('Necesitas estar conectado a una factoria')
return None
lista_canciones = self.cliente.scheduler.getSongList()
if not lista_canciones:
print('Ninguna canción descargada')
else:
for song in lista_canciones:
... | 0 |
43ceb62192bccf65a5dd269d807a135e | 79d647329bd4085e827b5e6558490ade | Создание перегородок; | public class WallManager : MonoBehaviour
public void CreateWalls()
{
for (int i = 0; i < 2; i++)
{
CreateWall(Random.Range(0, 5), 3);
}
} | 1 |
e0c6ac70bcb9a0dc2f2c8f8a61edc254 | b4bd34f77356da2fc2bed092271c4603 | Method to return the normalized input user query sentence. It puts the spaces between each groups which are
matched by the given regex. NOTE: regex should be properly grouped | if not doc:
return "", []
rv = []
tmp_doc = doc.lower()
try:
l_keyword_regex = [keyword_regex for keyword_regex in self.l_keyword_regex if
keyword_regex[1].search(" " + tmp_doc + " ")]
for i, keyword_regex in enumerate(l_... | 1 |
5fb1da1d8f9a49832d679c70c48c8e42 | 61d6a451d2892300a6a9b6f01f2593a0 | 公開済みのレシピをランダムに取得 | let url = 'https://www.themealdb.com/api/json/v1/1/random.php'
try {
let recipe = await fetch(url)
const resData = await recipe.json()
const randomMeal = resData.meals[0]
getRecipeList(randomMeal, true)
console.log('random Meal', randomMeal);
} catch (error) {
console.log('Request Failed',... | 1 |
a63e828c9d109476fd51091534f8bec4 | 7527a0325f5d6a727b33d8c7bbc8c715 | Vérifie si la planète est colonisable | namespace Civ
bool PuedeColonizar (Stack stack); | 1 |
5416812e5459796dce06e652f88a0fc5 | 6f5b91135f0bb16364ca79f88887d6a9 | Get the margin options. (Scintilla feature 2557) | namespace Kbg.NppPluginNET.PluginInfrastructure
public class ScintillaGateway : IScintillaGateway
public void SetMarginTypeN(int margin, MarginType marginType)
{
Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINTYPEN, (IntPtr) margin, (IntPtr) marginType);
} | 0 |
b525b4c514b33e4cbbd62abdecca2fbf | 178733c86b09d168bc2ac75ffb2a8550 | Sends all entity and player updates to the <see cref="Connection"/>. | {
foreach (RailServerPeer clientPeer in this.clients.Values)
clientPeer.SendPacket(
this.Room.Tick,
this.Room.Entities,
this.destroyedEntities.Values);
} | 1 |
505b96734bad601cd7841fc68a7250ea | 841e0532aa8ac49ff07d64144e9c9e6f | Flush existing commands to the GPU and optinally wait for completion. | void VContext::flushCommandBuffer(VkCommandBuffer commandBuffer, VkQueue queue, bool free) const
{
if (commandBuffer == nullptr)
{
return;
}
vkEndCommandBuffer(commandBuffer);
VkSubmitInfo submitInfo = Initializers::submitInfo();
submitInfo.commandBufferCount = 1;
submitInfo.pCommand... | 1 |
400e81d570c40e6c3e8a0e2d26816c4c | bf72f92d524c697653690e14c9d55303 | サブセットを追加する.
サブセット名 | namespace PEHandler
public class RsrcEntry
public RsrcEntry AddSubEntry(string name)
{
RsrcEntry e = AddSubEntry();
e.Name = name ?? throw new ArgumentNullException("name");
return e;
} | 1 |
9863d19cce508cd62a69a798e24110a1 | 1f0ae4a83e20ed2b636cec152871b219 | Lists all of the peerings under the given subscription. | {
using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
} | 1 |
a7cb09ebc4d19e220b4a9d9f3be02c8f | a24c7f6bbe7282f15c3e158ac7fdb5e4 | Evaluate this polynomial <c>p</c> at a value <c>e</c> (in <c>GF(2^m)</c>) with the Horner scheme | Poly PolyPow(const Poly *p, poly_exp_t e) {
Poly r = PolyFromCoeff(1);
Poly q = PolyClone(p);
Poly nr;
Poly nq;
while (e) {
if (e & 1) {
nr = PolyMul(&r, &q);
PolyDestroy(&r);
r = nr;
}
e >>= 1;
nq = PolyMul(&q, &q);
PolyDestroy(&q);
q = nq;
}
PolyDestroy(&q);
return r;
} | 0 |
b5126a830a7a4998ed0bfe6dca1c6c6c | 99509358ea06cfb13198f10a8de5b6a5 | @brief Territory::updateDisplay - just update the display
graphics items, not recalculating territory data objects. | void painting_t::display() const
{
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.