query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
7f04b3393bc086436eb4e8558e2b9216 | 2046d52de9b7706db8621f52bd3edeb4 | Get default compound special price | class Eav_View_Model implements Amhsoft_Data_Db_Model_Interface
public function getSpecialPrice() {
return $this->special_price;
} | 0 |
5f2930fcb1d37c3f327f73b25bd02570 | dce8b4ddbca8fd819389ec192d30a31c | Use this method to get the starting board for the problem 2. | board = [
[[0,0], [0,1],[0,2]],[[1,0], [1,1],[1,2]],[[2,0], [2,1],[2,2]],
[[0,0], [1,0],[2,0]],[[0,1], [1,1],[2,1]],[[0,2], [1,2],[2,2]],
[[0,0], [1,1],[2,2]],[[2,0], [1,1],[0,2]]
]
return board | 1 |
8139293f3d1a9fe74c405b04bd790bbd | 216cc7255aedf011e2943e9a95a0f6ee | Test no error occurs in normal pause/resume metering mode during a short period of time | self.do_delay(1)
self.assertEqual(self.inject_time, self.dut.timeLast)
self.assertNotEqual(self.inject_time, self.dut.timeNow)
self.assertTrue(self.check_tolerance(round(self.dut.get_hertz()), 1))
self.assertTrue(self.check_tolerance(round(self.dut.get_per_minute()), 60))
... | 0 |
d7eca958b62d426573d035f1c29f6329 | 8d465da17a9b1b5f1cf0decc5708b316 | 获取访客物理地址(采用淘宝api) | namespace TzCA.Common.TzExtensions
public class TzClientHelper : ITzClientHelper
public string GetTaobaoLocation(string ip = null)
{
var taobaoLocation = GetTaobaoLocationAll(ip);
var result = taobaoLocation.Data.Region + "·" + taobaoLocation.Data.City;
return result;
... | 1 |
8f6e7484b2fd9dd82b59fbb296156dca | b26c72265b2575bbc52ece74223430e9 | Returns the 8-bit "node ID" portion (1st field) of the machine ID | export class CommandClass
public static getNodeId(ccData: Buffer): number {
return ccData[0];
} | 1 |
eae7544330ff7db8ddadf25a2f056b18 | 5bb8ba8c0f464579ee122d7d511c3477 | Updates existing anime in user's list. | export class AnimeService extends AbstractAnimeService
async userUpdates(
id: number,
page = 1,
): Promise<Readonly<AnimeUserUpdates> | undefined> {
try {
ow(id, ow.number.integer)
ow(id, ow.number.positive)
ow(page, ow.optional.number)
ow(page, ow.number.positive)
ow(page, o... | 0 |
2335e77bdadfcc975291c4d8456494fa | 0f89c2f8b78fa7f77bf932a2c1a98cf8 | 根据下载序号获取文件相关信息 | export default class ArchivesModle
public getPreserBySerial(serial:number){
let infoOnce:ArchivesType = new ArchivesType();
let infoArr = ArchivesServer.instance.getPreserArr();
for(let i = 0; i < infoArr.length; ++i)
{
if(infoArr[i].serial == serial){
infoOnc... | 1 |
307034eae60a87e2f9ae3ccdc45a4d23 | 0ed50324072b703e36c5e9fb3d9ceec2 | Updates the list of plays from the database | class PlaylistBrowser(BaseListBox):
def update(self):
self.clear()
for playlist in self.app.playlist_db.get_playlists():
self.append(PlaylistBrowserEntry(
playlist['playlist_id'],
playlist['playlist_name'])) | 1 |
fd3ebe4b13a9d08f1f8c234bf042beda | 543c7317e2155612c9b164a667f1826f | Generate unique persistent page ID. | var id = makeIdentifier('page');
return function() {
return id;
}
} | 0 |
f8181d66c62c37408747304bbde6e8f3 | 36b5faab990af07b369e37a4f7c179d1 | 3.1)添加吐槽 | HashMap map = new HashMap();
map.put("sid", sid);
map.put("c", content);
post(Url.HOSTNAME + Url.DEMANDCOMMENT_ADD, map, new GsonResHandler<Result<Comment>>() {
@Override
public void onFailed(int i, String s) {
}
@Override
publi... | 1 |
fa08b1d64697f5463d309d4bfa684d88 | 5fa4bf8a37e26c85789b25e2557621e5 | 根据example取得CourseStudy列表 | List<T> getByExample(Example example); | 1 |
db7fdf5d82da3464a1cbd3d400d0541e | 62c442b877df8a223d96044e2e147669 | Create a [HistoryState] from [int]. | {
IntObserved value = new IntObserved();
value.SetValue(Int32.Parse(data));
return value;
} | 0 |
11d8a452ce098209b3d9504c98440a39 | 433fdb606cd06fca090b6674fbe5f5f2 | KL divergence against a uniform categorical prior | class BaseLoss(object):
def kl_log_uniform(self, normal):
mu = normal.loc
logvar = normal.scale.pow(2).log()
log_alpha = BaseLoss.compute_log_alpha(mu, logvar)
k1, k2, k3 = 0.63576, 1.8732, 1.48695
neg_kl = (k1 * torch.sigmoid(k2 + k3 * log_alpha) - 0.5 *
torch.... | 1 |
47a093b54d6426b8d5361184f3bda89f | b774acedb2ea310a700c13114def8224 | ========== get only the visible inputs, selects and texareas ========== | export class Lohnsteuer2006Big implements TaxJs
public getInputs() : String[] {
return [
"AJAHR","ALTER1","HINZUR","JFREIB","JHINZU","JRE4","JVBEZ","KRV","LZZ","R","RE4","SONSTB","STERBE","STKL","VBEZ","VBEZM","VBEZS","VBS","VJAHR","VKAPA","VMT","WFUNDF","ZKF","ZMVB",
];
} | 0 |
a5c2ce93aebb6641e35846282f9682d4 | f344c8214623413c4d51726dfb8826bd | calculates the costs of taxi expenses covered by the company | {
float TotalAmount = 0.0;
for (int i = 1; i <= TimeSpent; i++){
if (CarType NOTEQUAL 'S'){
if (i EQUAL 1){
if (CarType EQUAL 'C')
TotalAmount += 0.20;
else
TotalAmount += 0.40;
}
if (i EQUAL 2){
if (CarType EQUAL 'C')
TotalAmount += 0.20;
else
TotalAmount += 0.25;
}
... | 1 |
675128173131ee4c44efc5b3b0cdced0 | e2d73c501b4deceefae70e044171a3b6 | Calculate distance between two 3d cartesian points. | class TLDetector(object):
def distance_between_points(self, point1, point2):
return math.sqrt(math.pow(point1.x - point2.x, 2) + math.pow(point1.y - point2.y, 2) + math.pow(point1.z - point2.z, 2)) | 1 |
2a7140f394c6c378318d27171108816d | dd92cde92a86e0a163c6b32b352c1d13 | 导航到正在开发中页面 | def undeveloped(request):
return render(request, 'web/' + request.session['lang'] + '/undeveloped.html', {}) | 0 |
4653418a36cc9430cea77ddec6b0e2db | 09603041e8aac4cd677260236b9f7ee8 | Returns {@code true} if empty, {@code false} otherwise. | @Override
default boolean isEmpty() {
return length() == 0;
} | 1 |
5c6035fadd7aa083e369be08ea791afa | 8fd45d3ec397a5fc753628dc5e9e4e2f | 转换机构简介为可编辑状态 | if(list!=null && list.size()>0){
for(TrainOrg to : list){
String addr =to.getOrgAddr()==null ? "" : to.getOrgAddr().length()>20 ? to.getOrgAddr().substring(0, 20)+"..." : to.getOrgAddr();
String range =to.getOrgManageRange()==null ? "" : to.getOrgManageRange().length()>20 ? to.getOrgManageRange()... | 0 |
4c6cedcb98de2d214c64c255c8232ad5 | 4fd7965a7ae2b8c47ccab27619e94196 | Method invoked when the region is changed | export default class MapPage extends Component
onRegionChange(region) {
this.setState({ region });
} | 1 |
ac2d8b5e766046c8bf5befafff21f994 | b735a193183cd79de8c06d1720a6280f | Wether the user should be prompted or not.
Determined by the existed of ``CI`` in the environment.
Inverse of ``is_interactive`` property.
Returns:
bool | class IO(Formatter):
def is_interactive(self):
return self._input.is_interactive() | 0 |
678a923c5c8c6ae5743d4aed6edfcef1 | 6dafda2239f91915c26a9b84368b6f8c | 得到下一级的若干节点,以字典形式给定 | def get_nodes_by_layer(id,layer):
list = []
list.append([id,0])
for node in list:
if node[1] == layer:
break
else:
results = load_down_node(node[0],"Part_of")
for result in results:
list.append([int(result['data']['id']),node[1]+1])
ret... | 0 |
d769c019b12d18baa769a9195e80848f | 7f20641f8702979bac0d5196afad34d6 | remove duplicados e retorna a contagem de index | let checked = [];
let uniques = [];
for (let index = 0; index < arr.length; index++) {
let current = arr[index];
if (!checked.includes(current)) {
checked.push(current);
if (!uniques.includeds(current)){
uniques.push(current);
} else {
uniques = uniques.filter( val=> val!... | 0 |
0f4479084ad1a897117edf9e150281f5 | 33792905c33800b5471e9d2b5eab98e9 | find all comments by specific instructor id. | class Section(db.Model):
def lookup_by_instructor_id(instructor_id):
return Section.query.filter_by(instructor_id=instructor_id) | 0 |
3d3f7b971e33d601d7de24efcbebe83f | a544408d5141b29ff6f01cc7eff0d246 | create X-window as a root window. | void Renderer::BeginXWindowInit(string displayName) {
ECHO_FUNCTION(5);
mDisplay = XOpenDisplay(displayName.c_str());
if (!mDisplay) {
QString err("cannot open display '%1'");
ERROR(err.arg(displayName.c_str()));
return ;
}
if (mXSync) {
(void) XSynchronize(mDisplay, True);
}
if (mParent... | 0 |
d556fc16730c4de9da9f85f2033f0fa8 | 7e39988f01240156be781e2b7febec88 | 处理实体的分页ajax请求 | @ResponseBody
public PageResults ajaxData(String aoData, String paraData,
HttpSession session) {
JSONObject jsonObject = getJsonPara(paraData, session);
JSONArray jsonArray = JSONArray.fromObject(aoData);
PageHelp pageHelp = JSONTools.toPageHelp(jsonArray);
PageResults pageResults = useService.findUsePage(... | 1 |
a46bea345646dd38a9e7c8f9047b60b8 | ba868db2794be2a6aef3b093b95ff9a9 | 设置编辑框变化监听 | class CustomFormatEditText : android.support.v7.widget.AppCompatEditText, TextWatcher
fun setOnEditTextChange(onEditTextChange: (String) -> Unit) {
mOnEditTextChange = onEditTextChange
} | 1 |
3854cfaa36b9cb62b36295f7e599bfc9 | 4b0aa556fe1cc0c6f8acd864b62acdd5 | 获取货物产地列表 | getOriginList(data) {
let options = {
url: `/origin/search`,
method: 'POST',
data: this._handlePage(data)
};
return this._getData(options);
} | 1 |
cbbf6c5c6a1737aa897be2a1940daa55 | dd940473687c28a8557d50eb08bdd5aa | 根据 当前 时间 计算 最新的 时间
如果 最新的时间为空 则等于当前时间
如果 最新时间小于当前时间 则 设置等于当前时间 | public class MyDateTime implements Cloneable, Serializable
public void setDateTimeWithCurrentTime() {
if (m_dtDate == null) {
m_dtDate = new java.util.Date(System.currentTimeMillis());
} else {
m_dtDate.setTime(System.currentTimeMillis());
}
} | 1 |
4a50fc0db2d82ce3663bf3070ac4ad47 | 02d0a0cc5b1809a59a3fc416b4b68df7 | 计算本次登录与最近几次登录的地区差异 | st_last = time.localtime(last_time)
st_now = time.localtime(now_time)
month_day = day_month(st_last[0], st_last[1])
if st_last[0] == st_now[0] and st_last[1] == st_now[1] and st_last[2] == st_now[2]:
print "user login the same day"
elif st_last[0] == st_now[0] and st_last[1] == st_now[1] and st_last[2] + 1 == st... | 0 |
1db4246e4f265151fcc41af3df5515ff | 9af255006893ec3f9a5fbbc9bfb3ae8f | Create and return full path to folder, with ending backslash. | namespace UnitTests
class TestFolder
public static string File(string name)
{
return Path.GetFullPath(TEST_FOLDER + name);
} | 0 |
c0fbca1647e7cd508049f3c2d0f17e4f | e38805298a1185174bd2fb2bd8b5856f | Compares DataDefinitions by Name. | public int compareTo( IDataStockMetaData o ) {
return Collator.getInstance().compare( this.getName(), o.getName() );
} | 1 |
b6176554195cea35fd011d1255c2df18 | cba03c13f0d6c8f4ad8367a75d61c42d | getOutputTraintuple takes as input a traintuple key and returns the outputTraintuple | class controller:
def getOutL(self,x):
return self._repo.getOutL(x) | 0 |
670af6b01456d3378c35e1121ec6894e | 131b8f6b53bdc567690d19936ed5a0ce | 部屋に入った時に呼ばれる | public class OnlineManager : MonoBehaviour
void OnJoinedRoom() {
Debug.Log("ルームへ入室しました");
PhotonNetwork.Instantiate(
"Player",
new Vector3(0, 0, 0),
Quaternion.Euler(0, 180, 0),
0
);
} | 1 |
f401c91cebb33c627c427a550ca282bf | e8a06ca9aea498b88c7d6a5705c91681 | @brief - This function enables or disables peripheral clock for the given SPI | void SPI_PeriClockControl(SPI_RegDef_t* pSPIx, uint8_t enOrDi){
if(enOrDi == ENABLE){
if(pSPIx == SPI1){
SPI1_PCLK_EN();
} else if (pSPIx == SPI2){
SPI2_PCLK_EN();
} else if (pSPIx == SPI3){
SPI3_PCLK_EN();
}
} else {
if(pSPIx == SPI1){
SPI1_PCLK_DI();
} else if (pSPIx == SPI2){
... | 1 |
e51156f8732a92a0ceb50a4a70fa8936 | e5cbe101a20083e989a55b82155d34a3 | animates tracks as they come into view | function OnView(ele = '.onview')
{
let items = document.querySelectorAll(ele);
items.forEach((i) =>
{
let cl = i.dataset.animation;
let wh = window.innerHeight - 50;
let ws = window.scrollY;
let offset = i.offsetTop;
let wt = offset - ws;
if(wt < wh) { i.classList.add(cl); }
console.log("Offset", offse... | 1 |
07dc7003350207095e98862b8c1f9444 | ba071768bf9b66f1b896c9b8c9128c49 | Validate fields before saving, do not need to give fields focus | if(this.state.page === 0){
await this.props.validateWithoutPreservingErrors({
user_name: this.state.user_name,
user_email: this.state.user_email,
meeting_name: this.state.meeting_name,
meeting_description: this.state.meeting_description... | 1 |
dcf4a1b98d9061e870374299917b1dcb | 3ded23de092ea7d07f8999b6211829bc | 伤害输出函数 | if self.mInjuredStiff ~= 0 and _victim then
_victim.mBeatCon:BeatStiff(self.mInjuredStiff,self.mInjuredShake,self.mInjuredType,self.mRole)
end
end | 0 |
2a9c43d31b437a34e08ab94ffeededde | 65f77f0d419ed8feb2b0716f14cc6094 | Display a listing of the Programs that child has registered for. | class ProgramStudiesController extends Controller
public function index()
{
$programs = ProgramStudy::all();
return view('programstudi.program', compact('programs'));
} | 0 |
66d91121278f4d42b6a744bc163cc705 | 40eccbc5d2f929b44ac0b405f8cf365c | Deletes the user configuration. Calling this method results in a call to EWS. | class CCLDAPConfiguration
def delete_configuration
super
end | 0 |
b632b272b4017084d79e32b3789a0657 | be128e062a1d49e4caa75135a1016983 | Restocks the shop command. | namespace UOX
void restockNPC( CChar& i, bool stockAll )
{
if( !i.IsShop() )
return;
CItem *ci = i.GetItemAtLayer( IL_SELLCONTAINER );
if( ValidateObject( ci ) )
{
CDataList< CItem * > *ciCont = ci->GetContainsList();
for( CItem *c = ciCont->First(); !ciCont->Finished(); c = ciCont->Next() )
{
if( Valid... | 1 |
0fdea6d6f1d9841bc5843b0e34992a0b | 8c98cecb46cc58b835d759dd169cb470 | Finds all of the ServiceCallTicket values for the specified service calls. | {
if (transactionManager.IsOpen)
GetByservice_call_id(transactionManager, null, service_call_id, start, pagelen, ds, tableName);
else
GetByservice_call_id(null, transactionManager.ConnectionString, service_call_id, start, pagelen, ds, tableName);
} | 1 |
fff1ad2fbd8897f8006cebbd2dfd961b | a643ab374057b2d1017c44d043301aa4 | IP header data initialization | {
ipHdr->ip_hl = oldIpHdr->ip_hl;
ipHdr->ip_v = oldIpHdr->ip_v;
ipHdr->ip_tos = oldIpHdr->ip_tos;
ipHdr->ip_len = htons(newPktLen - sizeof(sr_ethernet_hdr_t));
ipHdr->ip_id = 0;
ipHdr->ip_off = htons (IP_DF | 0);
ipHdr->ip_ttl = INIT_TTL;
ipHdr->ip_p = IPPROTO_ICMP;
ipHdr->ip_dst = newDest;
if (icmp... | 1 |
2aad7c6619a0ecb0dd50159bdb4f6e63 | 320701cce3ea6c6eb1459148d601584b | Updates select tags with relevant option tags.
Should be called whenever higher order select field is changed | created() {
if (theme.blog.all_tags) {
const createSelectOptions = tagType => {
const validTags = theme.blog.all_tags.filter(tag => this.checkForTagType(tag, tagType));
if (validTags) {
this.selectOptions[tagType] = validTags.map(tag => this.convertTagToObject(tag... | 0 |
f984dbef0f53c34723c0c8bb353c151b | 064beca1afe5c62285d6896db2c9d1e9 | Reset special guest conditions. | class VMOps(object):
def guest_reset(self, userid):
self._zvmclient.guest_reset(userid) | 1 |
22d99715ed1f9fb53ba2679e41a7d0b0 | c7b675ee62b71973854152aaa65c7d7e | Check if the Transition is loaded.
To be loaded it must have at least one input and one output. | {
var transitionBases = gameObject.GetComponents<TransitionBase>();
return transitionBases.Length != 0;
} | 0 |
4b922657f83ceda4b7141d2542691fd6 | f950ee065bc35f46ed4e3cb225d5fe9d | func for finding xls files in the NGA directory | for roots,dirs,files in os.walk(path):
if roots != path:
break
else:
for file in files:
if os.path.splitext(file)[1]=='.docx' and file.split('_')[0]=='NGS':
return file | 0 |
69ab89ed73f21c5a3abf12f3095d4351 | 3daa666732f79a91332c78d212d711cc | GET: api/CrudTareas | namespace Web.Controllers
[SesionFilter]
public class TareaController : Controller
public ActionResult Index(string mensaje = "")
{
ViewBag.Mensaje = mensaje;
return View();
} | 0 |
dcf84015aec32002c6863be9f6e96e96 | d0285d7c6791786cae8e7b0aa840ee5e | 判断是否关注,并处理 | class PublicFunction(TaskSet):
def FocusOnly(self,header,userItem):
if userItem["code"] == 200 and "data" in userItem and userItem["data"]["isatten"] == 0:
action_num = 1
self.followUser(header,userItem,action_num)
else:
action_num = 0 | 1 |
1e96bc9df71af9504e345ca60a4f3297 | d573cc07c44597f328c76042d9a94b67 | Lists multiplayer server sessions for a build. | class GseClient(AbstractClient):
def SearchGameServerSessions(self, request):
try:
params = request._serialize()
headers = request.headers
body = self.call("SearchGameServerSessions", params, headers=headers)
response = json.loads(body)
model = models.... | 1 |
6de8338846a788277dae830829c00091 | d9bb621e584a0f5df77fb61ac5fc7026 | Удаляет выбранный фиттинг. | function Floot(flootInfo, selectedUser, showDelete, actions)
function deleteFloot() {
actions.deleteFloot(flootInfo.id, selectedUser);
} | 1 |
8d05c256b39544546cd94d06a1c1af9b | 1a33ecf5070a97e5b0469db446cf21fd | Removes messages waiting for ARP response that have timed out | {
ARPENTRY *ae = ifn->arpTable;
ARPENTRY **aep = &ifn->arpTable;
while (ae) {
if (ae->ae_flags & ATF_REM) {
NutEventBroadcastAsync(&ae->ae_tq);
#ifdef NUTDEBUG
if (__tcp_trf & NET_DBG_ARP) {
fprintf(__tcp_trs, "[ARP-DEL %s]", inet_ntoa(ae->ae_ip));
... | 1 |
56456c82026a52f483a0222fce1a3a3e | 7988e30a4ae01acd6a3227356316c3aa | <p>
Starts a job to import a resource to Amazon Lex.
</p>
Documentation</a> | {
var options = new InvokeOptions();
options.RequestMarshaller = StartFHIRImportJobRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartFHIRImportJobResponseUnmarshaller.Instance;
return Invoke<StartFHIRImportJobResponse>(request, options);
} | 0 |
113a616abb233c991be0b24024cb43da | 5e311cd30085211639f702a02d0d9ee5 | 对浮点数四舍五入; | {
if (dotCount <= 0)
{
dotCount = 0;
}
return Math.Round(num, dotCount, MidpointRounding.ToEven);
} | 1 |
9c8d9af563bb22ecfe86f197d4574b82 | a85849bb3f64ed31ebff1e3fadcbe47a | @brief 设置直角的X方向向量 | STK_STATUS Stk_Feat_RightAngleArrow::SetDirY(STK_DIR32 i_dirY)
{
m_dirY = i_dirY;
return STK_SUCCESS;
} | 0 |
a42cca356862664b1f0cef4f6509f160 | 1da5ed4bcbdc8512ad729ced28d59702 | ファイルから記事の特徴語TF-IDFベクトルを読み取る | doc_id = file_path.lstrip('abcdefghijklmnopqrstuvwxyz/-_ABCDEFGHIJKLMNOPQRSTUVWXYZ').partition('.')[0]
with open(file_path, 'r') as f:
embed_file = np.array([vocab[token] if token in vocab.keys() else vocab['UNK'] for token in f.readline().split(' ')])
return embed_file | 0 |
c4094c48028e9a3c9d995bcac2db0c69 | 0892da5e0316838997fa451ef102e2c7 | Returns last error that happened to SNIP | class ITLA:
def ITLALastError(self):
return (self._error) | 0 |
8de696bcba577730c1d84403b1d28e1e | 9b1e4985a06d7a9cfc04af5b74e586dc | POST: api/Offices | @RestController
@RequestMapping(value ="/api/office", produces = APPLICATION_JSON_VALUE)
public class OfficeController
@PostMapping("/save")
public void save(@RequestBody OfficeNewDto parametrs){
service.saveOffice(parametrs);
} | 1 |
f3ce0404774ad571695ef33ecf77c714 | 9cb0bd5013f4f0be2a7461d1f1c05221 | Fetch an object from the queue to the GUI | if(!mProcessQueue.isEmpty()) {
QueueableProcess<QObject*>* lProcess = mProcessQueue.head();
if(lProcess != NULL) {
mGUI->StageDescriptionLabel->setText(lProcess->describeProcess());
mCurrentWatcher->setFuture((QFuture<QObject*>)lProcess->runProcess());
}
} else {
... | 1 |
c645220aa39c2000760aa4364fbedf74 | f85415c478d3cb448a3bd51fab39cb37 | TP_SAC_0003 - Sort awarded contractors | if (isTableEmpty("tblAgreementList")) {
ra.showMessage("wrn299");
return;
}
TableData td = (TableData) ra.getAttribute("AgreementListLDB", "tblAgreementList");
Vector row = (Vector) td.getSelectedRowData();
String lista = (String) row.elementAt(1);
if (!(lista.equalsIgnoreCase("0"))) {
... | 0 |
0f90968048c20e4e4d682091536d7996 | 96317819ab68f5f628cbf0b20646f017 | Game mode for player vs computer. | class ConnectFour
def get_game_mode
puts "Would you like to play against the computer (1), or against another player (2)?"
input = gets.chomp.to_i
until [1, 2].include?(input)
puts "Invalid input. Please input a '1' or a '2'."
input = gets.chomp.to_i
end
input
end | 1 |
cff450068458001ee784563467006738 | 7f61448ad6da3ef0f9cb03f40c5be655 | This handler will run in both the regular as well as the fault out flow | cases like (1) | 0 |
be364f4c6fdba435c91dc12de69451c9 | 95d175d504f61b5925d0728f1af43507 | 依據 swagger 類型,轉換成 TypeScript 類型 | switch (type) {
case ParserType.swaggerJson:
return (data) => JSONParser(data);
default:
return (data) => JSONParser(data);
}
} | 0 |
3b65976306025d5fd92d0890375e8d2a | 24900ca2b9679c32015c477351c4c5a5 | lists the albums in the user's list | function showAlbums() {
$('#userAlbums').show();
} | 0 |
6cce7c3acf8f3ecad1661957d1934ed0 | 6141cc61f1d8634ac00e3aef2621caa0 | create a new CatGuestListEntry entry | {
self::unguard();
list($listRowNumber, $clientRowNumber) = self::getNewRowNumberWithoutClient(
$roomingList->room_type_inventory->race_hotel_id
);
return self::create(
[
'rooming_list_id' => $roomingList->id,
'race_hotel_id' =>... | 1 |
9f1da643f28579989d6adb84df94fd4f | 3532fcecff805366e97bcb20d8cfa7f6 | @brief Encode the data item length of the unconnected data segment | HC_STATUS HC_EncodeLength(
UINT32 nLength,
BYTE* pbWspHeader,
UINT32* pnWspHdrLen)
{
HC_STATUS nRet = WPS_HC_STATUS_OK;
if (nLength < WPS_HC_LENGTH_QUOTE)
{
nRet = HC_EncodeOctet ((BYTE)nLength, pbWspHeader, pnWspHdrLen);
}
else
{
nRet = HC_Enco... | 1 |
54ff9fd85c1c2b59897b4130d61c033c | 23c71090eb339809f696c8106dbbc278 | function to display co-op records | class Datamg extends Controller
public function Datacoop(){
$data['coop']=cooper::loadDatacoop(1);
return view('datacoop',$data);
} | 1 |
e437b3a19bd1b9c73fa5ec3fbdd13ab7 | 09e3f9229820de8ac2335b1bbbf87724 | Writes a module to a new memory buffer and returns it. | int WriteTypedDataPhysical(
[In] ulong Offset,
[In] ulong Module,
[In] uint TypeId,
[In] IntPtr Buffer,
[In] uint BufferSize,
[Out] out uint BytesWritten); | 0 |
3bbb2310b6cdc4fb3dceda7dd4611f34 | d46350c0ce6429e21954a8f62ff4f84e | Get a hubo-standard joint name from the openhubo name (mostly the same,
but they differ slightly for some joints. | function partNameMap(part){
var partMap = { "hip" : "hipline" ,
"hipline" : "hip" ,
"leftLowerArm" : "leftForearm" ,
"leftForearm" : "leftLowerArm" ,
"rightLowerArm" : "rightForearm" ,
"rightForearm" : "rightLowerArm" ,
"leftShank" : "leftLeg" ,
"leftLeg" : "leftSh... | 1 |
6d6a697c540dc41a0ce9d9d947f4a801 | d9b5cee1ab8754cec7c00d2781d08d6a | Return xyz numpy array of camera position of associated data | def py_pos(cont):
locx = cont.loc(0)
locy = cont.loc(1)
locz = cont.loc(2)
pos = np.array([locx,locy,locz]).transpose()
return pos | 1 |
04ad052efdf625217e4d633b956ea174 | d743eba0e06db7c2062efec312cc6916 | Get all categories with relations. | class CategoryController extends Controller
public function index()
{
return response()->json($this->categoryService->withRelationships());
} | 1 |
a5322038f47dc916d1b52ea3e1143a3e | d3e93b367be5a632a0d0b2a595ac7468 | Add the current transformation matrix to the current OpenGL transformation
matrix (matrix multiplication) | void SDL::pushMatrix()
{
m_transformations.push_back({{0,0}, {1,1}});
m_scale = GetCurrentScale();
m_translation = GetCurrentTranslation();
} | 0 |
bd8a8a2d7b32e115923d8f5b1cbabab9 | 215e2df79d1679c77afa3f6a0554cf95 | 下一分组按钮响应 | public class MultiMyButtonPanel : UIBase
private void btnNextSplitClick()
{
Dispatch(AreaCode.AUDIO, AudioEvent.PLAY_EFFECT_AUDIO, "card_deal");
btnNextSplit.gameObject.SetActive(false);
socketMsg.Change(OpCode._21Multi, _21MultiCode.SPLIT_NEXT_CREQ, null);
Dispatch(AreaCode.NET, 0, ... | 1 |
3a2ac9b6915a0e2bd88f7546139daa66 | 38b4710051c0e547e4d740b34b30f760 | Returns the party site identifier. | class _InsightSIPTest(SIPFunctionalTestCase):
def getsiteid(self):
return "PDS_GEO" | 1 |
777e5608a0ec631d98d472bb365cd88b | 0cd8da47b3ae37fe90b3b071b1e106a8 | Configure BGP on router. | def tg_bgp_config(**kwargs):
ret = {}
def_conf_var = { 'mode' : 'enable',
'active_connect_enable' : '1'
}
def_route_var = { 'mode' : 'add',
}
def_ctrl_var = { 'mode' : 'start',
}
_log_call("tg_bgp_config", **kwargs)
... | 1 |
bc0de9977d7eed60d84641562d9a8fc2 | f29f12e0f8f6047365ca8d0bf7359609 | 分页enter按键处理函数 | {
ROW* p;
ROW* q;
int endline;
int endcol;
int count=0;
int jump_be = -1;
int jump_ab = -1;
p=head;
if(page!=1){
while(p!=NULL){
if(p->row_pos==20*(page-1)+1)
break;
p=p->next;
}
}
for(q=p;q->row_pos!=cy-2+... | 0 |
c691a744419a7a63ad27bde4810f0461 | a9cebd6a63828e3ba8ceb6e55633e645 | this methos doe not return anything, but simple prints hello world | public class HelloWorld
public static void main(String[] args) {
System.out.println("Hellow World")
} | 1 |
927fcc96f67c1b6e4eaa1866521b2199 | 47a3dff657ac408dffa77ef685d6d766 | 不需要网络序列化同步给其他人 | class single
public function __sleep()
{
throw new \Exception("禁止单例序列化");
} | 1 |
5e532cbcab68a071761d0940eb3fd69b | fb2ddd4063a2bd747da6dfe628ba6c95 | 插入多条记录到员工工作经历表t_emp_work_experience | int batchInsert(List<EmployeeWorkPo> pos); | 1 |
9bdd65a5a3aca9589a47e25f7c43fdf2 | 17b20930d32d80478905212a11a0f264 | Return the base json data to transmit to the innertube API. | $ret = parent::getData();
$ret['event_items'] = $this->getJson($this->getItems());
$ret['item_type'] = $this->getItemType();
$ret['item_external_id'] = $this->getItemExternalId();
$ret['item_external_name'] = $this->getItemName();
$ret['file_type'] = $this->getFileType();
$ret['file_id'] = $this->getFileI... | 1 |
abe92ea7029f62804defbacb692cacd8 | 88a1e2f64c154e44a219632287f77980 | After each play, the moves will be checked.
If the user makes a mistake, the game ends.
If the user completes the entry, the next sequence will be started.
If all ten rounds are done correctly, they win. | for i in range(10):
if self.move_counter >= 5 and self.check_winner():
break
self.make_a_move(self.turn)
self.move_counter += 1
if self.move_counter == 9:
print("Game over.")
print("It's a tie!")
brea... | 0 |
e178316488de2f69bc347be8db2150c2 | 4d9a5c3d264d753f14c15745e68c1080 | Call the BaseConnectors init first | assert(self.on_publish_data, "on_publish_data missing!!!")
assert(self.on_publish_data_list, "on_publish_data_list missing!!!")
self:_init_cov()
self:_init_pb()
self:_init_fb()
self:connect()
self._log:debug("MQTT Connector Started!")
return true
end | 0 |
566b863ae9e9b2d2e0ec7602618a7f4c | 43cb4e994bd147cd411dd5b46d76ce9c | Fetch the given bootstrap file from the website. Return the file location. | local_filename = os.path.join(gettempdir(), filename)
if not os.path.exists(local_filename):
local_filename, _ = urllib.request.urlretrieve(url + filename, local_filename)
statinfo = os.stat(local_filename)
if statinfo.st_size == expected_bytes:
print('Found and verified', filename)
... | 1 |
46bbc2eac0412c0fbdce57f7f5ba01e2 | 66e1fc269fda16b03fbf3b4b072a92a4 | Deve um simular uma alteração em um gato na API, verificando se as informações enviadas não sofreram alterações durante o envio, e se o código recebido foi 200 | class TestCatsAPI:
def test_patch_cat(self):
atualizar_raca = {
"breed": "Siamês Patch Test",
}
resposta = requests.patch(url=f'{self.url_base_cats}2/', headers=self.headers, data=atualizar_raca)
assert resposta.status_code == 200
assert resposta.json()['breed'] == at... | 1 |
04ba8c9dc517b5ddf8a1cf92aea293b9 | e9766ec46c2fc20ed9cbb6871394b120 | 检测ip 在 machine 表中是否存在 | class UserModelClass(object):
## 查询接口 ##
def checkUserMachineExists(self, user, machine_id):
sql = '''select id from upgrade_user where name=%s and machine_id=%s'''
data = self.__cursorQuery(sql, [user, machine_id])
try:
rid = data[0][0]
if rid != '':
... | 0 |
457c24ee0e62b6af57f83c6f62aeb3c4 | 1185a0f09a6904e62d95aa80cd503fb7 | from https://github.com/openstack/python-neutronclient/blob/6.14.0/
neutronclient/v2_0/client.py#L2009-L2011 | def remove_neutron_ports(task, params):
client = get_client(context=task.context)
node_uuid = task.node.uuid
try:
ports = client.ports(**params)
except openstack_exc.OpenStackCloudException as e:
msg = (_('Could not get given network VIF for %(node)s '
'from neutron, pos... | 0 |
85581017cffca9f1d73462feeae4364a | 71917b1d602823b921eb9ffad7204cb7 | We need the complete path here,
otherwise the file would be expected in the default location,
i.e. the Windows-directory. | export class FileDebNonexistent extends Task
protected get path () {
return path.resolve(this.worker.workspace, 'package')
} | 1 |
93516373321764fa8338a6a9174235c9 | b7b0a15325317b20da5b5b42e086ec2f | test msgs are received in correct order (when sent in a synchronised manner) | class TimerTest(unittest.TestCase):
def test_msg_receive(self):
self.timer.tell({'cmd': 'start'})
time.sleep(0.2)
self.timer.tell({'cmd': 'stop'})
self.assertTrue(self.rec.proxy().timer_event_count.get(1.0) > 0) | 0 |
8974477c7900569a9c4f99991b4cd7c1 | 00e319babbcc513c574fd93f6d3037b3 | 电梯下发/删除卡号 | int iLen;
int iRet;
int iCardLen;
char sLenBuf[10];
char sSendBuf[1024];
char sCardBuf[20];
memset(secbuf_in, 0, sizeof ( secbuf_in));
memset(secbuf_out, 0, sizeof ( secbuf_out));
memset(sSendBuf, 0, sizeof ( sSendBuf));
memset(sLenBuf, 0, sizeof ( sLenBuf));
strcat(sSendBuf,... | 0 |
ee3c4a5582e848ad886ca03d027e9ba4 | 87419c3216cc6d92bd03e96b87741db4 | Removes the permission to do its task | try:
DRIVE_SERVICE.permissions().delete(fileId=FILE_ID, permissionId=PERMISSION_ID).execute()
except errors.HttpError as err:
print('An error occurred: '+str(err))
return False
return True | 1 |
4539f4b8bb51c13cd0193f1b9a3e4cdb | 0fd06d5f01932dec2c9e6d587cb1e291 | modifie la référence du livre stockée dans la collection | this.http.post(this.urlLivre, { idBook: idBook, stock: quantity }, Globals.HTTP_OPTIONS).map(res => res.json()).subscribe(
reponse => {
if (!reponse.success) {
console.log(reponse.message);
}
}
);
} | 0 |
39589797a663d0666738982a21fd33a8 | d9352eb094b85d2d9f6e12d688cd808e | Map the Asterisk hangup causes to easy to understand strings. | $this->codeMap = array('464'=>'0',
'23'=>'1',
'245'=>'2',
'242'=>'3',
'233'=>'4',
'674'=>'5',
'685'=>'6',
'343'=>'7',
'377'=>'8',
'266'=>'9'
);
} | 0 |
d4b4329d29bb99985f874b07191c466e | 198375b7770effdce4f86a8c1847117f | don't show the error code, lines etc. | {
if ($this->displayErrorDetails) {
return $messages;
}
foreach ($messages as &$message) {
unset($message['meta']);
unset($message['source']);
}
return $messages;
} | 1 |
7309bb5f69304597b47ba7c1f76fa61e | 5942c3a417e697b390e28f913a137a3e | Convert Ethernet address in the standard hex-digits-and-colons to binary
representation.
Re-entrant version (GNU extensions) | guint8 *
nm_utils_hwaddr_aton (const char *asc, int type, gpointer buffer)
{
const char *in = asc;
guint8 *out = (guint8 *)buffer;
int left = nm_utils_hwaddr_len (type);
while (left && *in) {
guint8 d1 = in[0], d2 = in[1];
if (!g_ascii_isxdigit (d1))
return NULL;
if (d2 && g_ascii_isxdigit (d2)) {
*out+... | 1 |
0d9f18a93cfed766b1dee9070e41bd0c | c7e3e680d45a907b5f3aa6287899c38e | Construct dataframes that interpret each visit of the given patient | try {
Collection<Visit> visits = new ArrayList<Visit>();
String qry = "select visitID from VISIT where patientID = ?";
PreparedStatement pstmt = conn.prepareStatement(qry);
pstmt.setInt(1, patientID);
ResultSet rs = pstmt.executeQuery();
wh... | 0 |
832107a28fa9282aeb353b7346c5bd90 | 36e6851c3f58c0f29f41a55a5a8f3681 | Get the [certifications] column value. | class Education extends \Kazist\Table\BaseTable
public function getCertificationId()
{
return $this->certification_id;
} | 1 |
cdba4caa3c557ff8a34d8014920af68d | eca95d0104a8a7b48b5c496cd52fbf20 | Removes all connection event listeners. | class SocketClient
removeListeners() {
this.unlistenEvents.forEach((unlisten) => {
unlisten();
});
this.unlistenEvents = [];
} | 1 |
7b2a86348c3e406961f59fd7bc42ccb4 | 2450bb3583b52839e655fe3ae5cd3aa2 | Sets the the capacity to the actual item count. | {
if (Items.Capacity < capacity)
{
Items.Capacity = capacity;
}
} | 0 |
ff823614d9c48fbb93bdf7bafb8f9796 | e305917de4cbcc254e013b9f4b9a4e3e | [AST] speculative?
Returns True if speculative parsing is enabled, False otherwise | class ExpectBase():
def thrifty(self) -> bool:
return self._thrifty | 0 |
148acabc63ef8e217a88d7b0e8a99a08 | 27f367a036ea2c0fd9ef7acdd6055239 | 存款金额 | @Table(name = "tbl_temp_withdraw")
public class TempWithdraw
public BigDecimal getAmount() {
return amount;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.