query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
184a1af6d03afaf6305c0c3e62d7a46b | ed42da765bd83c98ceb19cb9a7fa2e81 | Detect if user uses iOS phone | if (user_agent.include?(DEVICE_IPHONE) &&
!detect_ipad() &&
!detect_ipod())
return true
end
return false
end | 1 |
41c0db074831b0e548356efc94dd758a | ca11ec5783cebbff32d2c3310f68500b | Get Markov parameters from state space model. | theta_T = mean(T)
theta_E = ones([E.shape[1], 2, 2], dtype=float)
for e in range(E.shape[1]):
E_col = E[:, e]
def objective((alpha, beta), t_state):
ix = E_col != MISSING_VALUE
ix = np.logical_and(ix, T == t_state)
densi... | 0 |
30eb3d355a710241dc78eef8442e5daa | c07d0bbbf97552d15acdd60fdd35bac6 | Get NAT网关个数 | public class DescribeNatRuleOverviewResponse extends AbstractModel{
public Long getDnatNum() {
return this.DnatNum;
} | 0 |
8b0a9bd7740c577c69f250c65dcc696f | 192a4a4600f9edf0d669182fa2ed810d | 商店每天免费购买物品 | local function checkBanType(baseData)
local numBanType = baseData:getConfig().num_ban_type
local buyCount = baseData:getBuyCount()
if numBanType == 1 then
if buyCount >= 1 then
return true
end
return false
end
return false
... | 0 |
491955b4e9e12f92c60f95f0d03061f5 | 00d9ee01e9623136a227f7722c5d9561 | 往上滑 | class Base:
def swipe_up(self):
size = self.driver.get_window_size()
width = size['width']
height = size['height']
self.driver.swipe(width * 0.2, height * 0.8, width * 0.2, height * 0.2, duration=5000) | 1 |
ad72f89a23270a8e930af312370fb9e0 | b0a45056af1522362c3cac94c2cec44f | Показує або сховує бокову панель | public class InfoBoxes : MonoBehaviour
public void BoothPanel()
{
if (boothPanel.activeSelf)
boothPanel.SetActive(false);
else
boothPanel.SetActive(true);
} | 1 |
794bd11d538f65f1cad0aa766ec5139a | 995623ae92fa536f93c5ad21b3215ad0 | 请求电影搜索,影院搜索数据 | class serviceCinema extends serviceBase
public function GewaraSearchCinemasmovSort(array $arrInput = [])
{
$movieid = self::getParam($arrInput, 'movieId');
$city = self::getParam($arrInput, 'city');
$tpid = self::getParam($arrInput, 'channelId');
$return = self::getStOut();
i... | 1 |
0d7c002f62b9944b19aae599a75b929c | ea296f3f30ba5fab9e40a7f9611f7658 | 獲得Hp Contract相关的Group | Map<String,Object> params = new HashMap<>();
params.put("tsId", UserMessage.getInstance(getActivity()).getTsId());
params.put("type",1);
Type type =new TypeToken<Result<List<GroupInfoVo>>>(){}.getType();
OkHttps.sendPost(type,Apiurl.MESSAGE_GETGTOUP,params,this,2,"contract_class"... | 1 |
6d6ad245520172ef5b5f3c15d544f687 | 5d6684e63c5d112cca46939840c94ef5 | This method returns the secondaryRoadColor of the colorScheme. | public class ColorScheme
public String getSecondaryColor() {
return getColor(1);
} | 0 |
d7847ed86f4610e4055c24be018e443a | 052808be11c9ad55a8c52530d95454f0 | 自定义过滤器接口,此接口在生成列表数据的时候被调用
返回一个经过处理的列表数据,进而生成列表视图 | {
if (isset($this->_filter) && '' == trim($this->_filter)) {
$this->_filter = $this->original_filter;
}
$content = parent::renderList();
return $content;
} | 0 |
75320ec465e0f00af8b833e53f7595af | 47ce22a87a04c81722a164c46e7b6fca | 等待drbd资源同步 | class ProcessHandler(object):
def drbd_health_check(self):
logger.info("server recv drbd health check")
return self.__drbd_task.health_check() | 0 |
e07bc111b7713fb78a0b2438eae7d09a | 61fd56d116dc447145bdd70c1058bfaf | 忘记密码发送验证码划动验证 | template_image = self.get_template_image()
while not template_image:
ActionChains(self.driver).click(self.re_btn).perform()
template_image = self.get_template_image()
captcha_image = self.get_captcha_image()
distance = self.get_distance(template_image, captcha_ima... | 1 |
f322ecfc9d73b630b7be645e7049b55c | 2d5e010b0cb70d536e7f26e4e9624233 | Moves this Shape object by some amount. | namespace CompositeShapes.Interfaces
void Move(double dx, double dy); | 1 |
2f8295cf49f8ee4f7ea4b17329cbbd84 | 0b32c4163e88e4d3f0c8d1a44447fabd | вывод подсказки над картой при попадании курсора на объект | class GUI(ttk.Frame):
def ShowHint(self, event, _text):
Coordinates = self.RecCalculatingCoordinates(event.widget, self.MouseX, 0)
self.update()
wdg = event.widget
ClientX = self.master.winfo_width()
px = Coordinates[0]
self.HintLabel['text'] = _text
py = Coordina... | 1 |
fb8ee0b755b2803e365b7f5b933dfcae | db9a0a5b8f0f96bedbb6d8e67552ac57 | Returns a set of tuples (definition, score) for chance that they are a defn.
Scores are in real numbers | tab = {}
for i,t in enumerate('whqestx'):
sym = t
rat = Fraction(1, 2**i)
for d in range(0,7-i):
tab[sym+('.'*d)] = rat * (2 - Fraction(1, 2**d))
for pre in [3]:
amt = Fraction(pre-1,pre)
tab[str(pre)+sym+('.'*d)] = (amt * rat * (2 ... | 0 |
8748e01f0a2fe674c736622a5019e34f | b8b77a424483cb01a38a7bdb49436438 | 更新主题图标id | return new Promise((resolve, reject) => {
data.then(res => {
res.data.forEach(data => {
data.theme_icon = IMAGEPREFIX + data.theme_icon
})
resolve(res)
})
})
} | 0 |
8554be90300ce204e115322757616f47 | f969fbb68296fcf5fb727ed39ae7b74e | Creates a builder for an unordered bulk operation. Write requests included in the bulk operation will be executed in an undefined
order, and all requests will be executed even if some fail. | @ThreadSafe
@SuppressWarnings({"rawtypes", "deprecation"})
public class DBCollection
public BulkWriteOperation initializeOrderedBulkOperation() {
return new BulkWriteOperation(true, this);
} | 0 |
5b00a76d267262d10a7d3edc25ea79f8 | 601ea32728c6537cb8353b74dd643210 | Adding details to the sample list collection. | while (true) {
if (dataDetailList.Count > 0) {
DataDetail dataDetail = null;
lock (dataDetailLock) {
dataDetail = dataDetailList[0];
dataDetailList.RemoveAt(0);
}
i... | 1 |
d017fd372bb38d25a6a931fb1575b7c5 | b8b141ff781d2662736d0a7f9791fb61 | Request a handle for making eve API requests. All but one of these
requests do not require credentials. The one request which does require
credentials (CharacterInfo) accepts these credentials on the methods
call. | class SlackClient:
def handle_api(self):
response = self.handle_comic_request(1481)
return response | 0 |
93b5c9ef903a4692292bbfc0714f4002 | b1a972521e10957ab2d84860327bce53 | function to generate an print a random char in range [A..Z] as well as spaces | {
for ( int i = 0; i < x; i++ )
{
printf( "%c", 97 + rand() % 26 );
}
} | 0 |
c0ec1f68b231ee1561c1c60f40dd0c89 | c896b924b731aef0f32eac4d3ef4f148 | replaces brackets with '-' and removes ',* | def None_to_str(item_):
return str(item_).replace('-','').replace(',','') | 0 |
8e4dc8473fd84fb5acebcff5ee9367a2 | 695efd22fbbe4923063c47dd2229b134 | Inizializza le velocità delle animazioni in modo tale da riportarle alla normalità senza sfasarle | namespace BlockBreaker
public class Ball : Sprite
public virtual void TotalVelocityReset(int lunghezzaClientIniziale, int altezzaClientIniziale,
int lunghezzaClient, int altezzaClient)
{
Velocity.Y = Velocity.Y * altezzaClient / altezzaClientIniziale;
Velocity.X = Velocit... | 1 |
b85be2e04cf5047002943ad032d432d1 | ab296148ca7c466fa977e037c275db9f | If true will not serialize null values | namespace Nuget.Server.V2.Infrastructure
internal static class ODataEndpointRouteExtensions
public static IEndpointRouteBuilder SetSerializeNullDynamicProperty(this IEndpointRouteBuilder builder, bool serialize)
{
if (builder == null)
{
throw new ArgumentNullException("builder");
}
ODataOptions defau... | 0 |
d377f5c8dda363cb657ff8daaf3df4e0 | e211a2430b1cd3d9837b8afb36b7b641 | The 'select' system query option allows the clients to requests a limited set of properties for each entity | export class QueryableInstance extends Queryable
public select(...selects: string[]): this {
this._query.add("$select", selects.join(","));
return this;
} | 1 |
5602989b6d41c6e841140de0b21903ce | 4862cb7902f987157c67759aad3d1a07 | Hiển thị thanh toán | class HomeController extends Controller
public function thanh_toan_gio_hang()
{
return view('home.thanh_toan_gio_hang');
} | 1 |
7f5379571a111cfe5ad8885818bcc489 | 27626a6200e485682846d3aeba03621f | 学号升序 | class StudentManagerController:
# 编号:系统自动生成
def order_by_student(self):
for r in range(len(self.__stu_list) - 1):
for c in range(r + 1, len(self.__stu_list)):
if self.__stu_list[r].score > self.__stu_list[c].score:
self.__stu_list[r], self.__stu_list[c] = self... | 0 |
5699c7e2adce3595b9f57f853e465ed6 | 7ef3abd417c3a847fda9f4a59dc6f278 | Fetch all likes for all users | {
$data = User::with('Likes');
$response = [
'success' => true,
'message' => null,
'data' => $data,
];
return response($response);
} | 0 |
958d70c0371036f89798a118b8cf5dde | afdecf017fa873b428b3928f21c11c17 | Get the quality map based on the phase derivative variance (pages 76-79, Ghiglia and Pritt) | def phase_max_grad(wrapped_phase: np.ndarray, window_step: int):
ksize = (2 * window_step + 1, 2 * window_step + 1)
columns_derivative = wrapped_phase[1:-1, 2:] - wrapped_phase[1:-1, :-2]
columns_derivative = np.arctan2(np.sin(columns_derivative), np.cos(columns_derivative))
rows_derivative = wrapp... | 0 |
247ee24a5d560ff00e23edb22e9aa6e5 | d49716312af3639d0a47e02f95e75a8d | Convert tuple of (PLAYERS_TEAM_SCORE,OTHER_TEAMS_SCORE) -> -(integer) if down, 0 if tied, +(integer) if leading | global_team_id = self.globalize_id(player_id)
other_team_id = self.globalize_id(player_id + 1)
return self.score[global_team_id] <= self.score[other_team_id] - 100 | 0 |
61c2152162b3e067a2957f5bae163e67 | 4069ec38151040c56d1e63ce45822b5b | 返回Hashtable对象的String表达方式,一系列以括号和逗号,空格分隔的Entry,如{key1=value1, key2=value2} | StringBuilder sb = new StringBuilder();
for (Entry<K, V> entry : mymap.entrySet()) {
sb.append(entry.getKey());
sb.append('=');
sb.append(entry.getValue());
sb.append(';');
}
return sb.toString();
} | 0 |
08d42e544b0c7fe151140dd44bedf5f5 | 8788023ede51bda4edec25c4474c28d3 | Deletes the specified MailboxUsageStorage. | namespace Microsoft.Graph
IReportRootGetMailboxUsageStorageRequestBuilder GetMailboxUsageStorage(
string period); | 0 |
cf103213c89e2310ccaad6af17820e64 | 497d7bb5a7c61bf3fa642f35eddd0122 | 仅仅调试用,根据数值获取到字段名称 注意:如果在Release模式下,使用Proguard则获取到的名称是混淆后的,无参考意义 | public Object getFieldValue(String fieldName,Integer fieldIndex) {
if (fieldName != null && fieldName.length() > 0) {
if (FLD_GATEWAY_ID.equals(fieldName)) {
return GATEWAY_ID;
}
if (FLD_DEVICE_ID.equals(fieldName)) {
return DEVICE_ID;
}
if (FLD_BIND_TIME.equals(field... | 0 |
cd4422b0e9713bf118f48fdb606bbdd3 | dfd6f35ee2b26e3fbe2bd76565d5ef3e | 设置 交易ID 默认值 | class SearchTradeMultiOutput extends BaseOutput
function setTranId($transactionId){
$this->transactionId = $transactionId;
} | 0 |
709e5fa5462840def4f3ede9777283b2 | e50ab97bfd5a36baa3db3739e53ab5b6 | Set the id of the only HTML element in the web page that should be used to extract tables from | function InputTableBuilder_Class()
function setTableDivName(str) {
Intern_TableDivName = str;
Intern_TableDivElem = $("#" + str);
} | 1 |
56fab8f5cabf873f48f9e28f805bae7c | 46c2beeaa588f0ddae81b4145e00429b | ## FUNCTION:
## SPECIFICATION:
Writing the pocket information file to the output directory
## PARAMETRES:
## RETURN:
void | FILE *fp;
fp = fopen(path, "w+");
if(fp == NULL){
fprintf(stderr, "can't open file for writing %s\n",path);
exit(1);
}
fprintf(fp,"ind=%d\n",p->ind);
fprintf(fp,"cycles=%d\n",p->cycles);
fprintf(fp,"n=%d\n",p->n);
fprintf(fp,"l=%d\n",p->l);
fprintf(fp,"batch_length=%l... | 1 |
0db4cd7f04ff64b9dc18fe8eb904f80d | 35b73537b79b546ef81ac46212d848e5 | Действие отображения списка регионов | {
$data = array(
'content' => View::make('regions.index')
);
return View::make('main', $data);
} | 1 |
1f4e13aa0f91d809587e63f6c441ec82 | b78f62949c1e35858b5da52d318b6e56 | {GTK2}.gtk_text_buffer_get_end_iter | int
clip_GTK_TEXTBUFFERGETITERATLINEOFFSET(ClipMachine * cm)
{
C_object *cbuffer = _fetch_co_arg(cm);
ClipVar *cviter = _clip_par(cm, 2);
gint line = _clip_parni(cm, 3);
gint offset = _clip_parni(cm, 4);
C_object *citer ;
CHECKARG(1,MAP_t); CHECKCOBJ(cbuffer, GTK_IS_TEXT_BUFF... | 0 |
c6c138a8ad663c27d0f441cc698a349f | 125f931f4bb7f9f1acba99f5c4776bab | https://gist.github.com/bsudekum/93da2c80cf439aee4c08 | function copyTextToClipboard(text) {
var textArea = document.createElement('textarea');
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
textArea.style.width = '2em';
textArea.style.height = '2em';
textArea.style.padding = 0;
textArea.style.border = 'no... | 1 |
1196b9768b0a845a865cfba6f064d9fa | 885f6632f866b8caf6b3ff1e69cb7de4 | adds side button event listener logic for img switch animation | const scrollLeft = (this.state.leftImages > 0);
const scrollRight = (this.state.leftImages + 4 < this.props.images.length + 1);
if ($(e.target).hasClass('left')) {
if (!scrollLeft) return;
this.setState({
leftImages: this.state.leftImages - 1
});
$('.scroll-wrap').animate({
... | 1 |
eab51d18b77d69b292022a2a245295e1 | 361a9b763ffcf43d010030924872780c | add Node-Images that can be dragged onto the network in order to insert them | public class Nodepage extends SafeActions
public void ClickOnNodeImages(){
safeJavaScriptClick(NodeImages(), VERYLONGWAIT);
} | 0 |
3e1456395073a8bbe5e6f8556f301740 | c60c230470764d8051a1ddf3858cac41 | Calculates and returns the zero point energy for the system. | class QRRHOVib(_ModelBase):
def get_ZPE(self):
return 0.5 * c.kb('eV/K') * np.dot(self._valid_vib_temperatures,
self._valid_scaled_wavenumbers) | 1 |
ae87a8c0b814f937e26a727c9a0115a5 | d7f8139ddace1aa68d943712ad964aeb | when task over, delete its record in array | var result = [];
var allTasksArr = queryTasks();
for (var i = 0; i < allTasksArr.length; i++) {
if (allTasksArr[i].id == id) {
result = deleteInArray(allTasksArr, i);
}
}
localStorage.task = JSON.stringify(result);
} | 1 |
76f900388e368cb0fa775bc72a69a523 | 87603bd54cb72153566039f45dbb5285 | Metodo que sirve para indicar que una caja en la que se encuentra un cliente está siendo atendida | self.tipo = tipo
self.inicio = reloj_inicio
self.caja = caja
self.cliente = cliente | 0 |
695ef20cef4f508a6cc2ec1919db56d1 | 05996765f1a4938d0a224bbd74289db7 | 初始化
设置上传文件的临时目录与上传文件的最大限制 | {
@set_time_limit(0);
if (isset($options['tmpDir'])) {
$this->_tmpDir = $options['tmpDir'];
if (!is_dir($this->_tmpDir)) {
@mkdir($this->_tmpDir);
}
} else {
$this->_tmpDir = "/tmp";
}
if (!isset($options['upload... | 1 |
96daa809e565ff4a8246c55096059250 | c006ccc362b94966184079cf4ce9ddfd | \brief
This function sends the Transmit Confirmation to the upper layer driver. | {
uint8_t irq_status;
ADF7242_issue_command(CMD_RC_PHY_RDY);
ADF7242_wait_state(RC_PHY_RDY_MASK);
ADF7242_MEM_read(REG_IRQ1_SRC1, 1, &irq_status);
if((irq_status & IRQ_RX_PKT_RCVD)) {
return -1;
}
ADF7242_PKT_write(pTxbuf, txlen);
if(TRX_config_params.ieee_802_15_4_oper_mode & IEEE_802_15_4_AUTO_CSM... | 0 |
7394a44df2419c3530eb52b492845d2e | 552ff4628846481aeb286ff0de9b0a46 | 获取设定客户端的refresh_token的有效时间值(单位:秒),可选, 若不设定值则使用默认的有效时间值(60 * 60 * 24 * 30, 30天). | class GrantAuthCode
extends aGrant
function setTtlRefreshToken(\DateInterval $dateInterval)
{
$this->ttlRefreshToken = $dateInterval;
return $this;
} | 0 |
712f8a12c1262998a5a31ae83eddf4c7 | ffd6a7d4ab1e6c4bb2aad9bbfb741e79 | Triggered when a character is added to the editor. | namespace ScintillaNET
[Docking(DockingBehavior.Ask)]
public class Scintilla : Control
protected virtual void OnCharAdded(CharAddedEventArgs e)
{
var handler = Events[charAddedEventKey] as EventHandler<CharAddedEventArgs>;
if (handler != null)
handler(this, e);
... | 1 |
799ce59b21532036368f53c602223a48 | fe163180fa084f824315e72642bdf0b1 | returns true if the instruction is out of the usage range. | boolean isWithinInstruction(); | 0 |
64ca8ce6acfe9588145c124c9a914c66 | 1b0f4e82072a6211fb2a3c2afb7ca620 | add comparison indicator to allow custom sorting of items | class SingleAdapterConfiguration<T>
@ConfigurationDsl
fun withItemsComparator(itemsComparator: (T, T) -> Boolean) {
this.itemsComparator = itemsComparator
} | 1 |
2f7800f3f2694b3a5265faf1c0a0cec3 | 0031122dc67b2039026d93f1970f078d | Get the first level keys in this registry. | Iterable<String> getKeys(); | 1 |
bf2b5fb9c0ddef373bd1e94a8adc3e07 | b7ca2834b293f27c3733f1b1010a2b81 | Sets the IsPlaying property. This dependency property
indicates whether the storyboard is playing. | {
if (IsStoryboaredBusy == true || mediaElement.CurrentState == MediaElementState.Paused)
return;
IsStoryboaredBusy = true;
if (PlayBtn.Visibility == Visibility.Collapsed)
{
PlayControlVisibleStoryboard.Begin();
}
... | 0 |
f84e33568f6a4c140e29277351fb4d23 | 2d3f2dc01b8a57084870972b1a1626de | Sends a list of RGB data over the serial interface.
Shows a whole animation of one picture. | void sendLine()
{
int x;
Serial.write(1);
for (x = 0; x < PIXEL_COUNT; ++x)
{
uint16_t fullbyte = pixelBuffer[x];
uint8_t lowbyte = fullbyte & 0xff;
uint8_t highbyte = (fullbyte >> 8);
Serial.write(lowbyte);
Serial.write(highbyte);
}
} | 1 |
53d1d873666c148c17032caff4b4b97b | 1715ee4d7fda9a7caefb4eec9983a696 | GET: RiskItem | namespace ArchpointMvcPHR.Controllers
[Microsoft.AspNetCore.Authorization.Authorize]
public class AlcoholRisksController : Controller
public async Task<IActionResult> Index()
{
return View(await _context.AlcoholRisk.ToListAsync());
} | 0 |
793b8e99fdeebcdc7cee2fea7a70aaa8 | ad290b3e6205d41a8f7a872036065484 | Makes sure that directories are only searched once. | namespace o3d
void TarGenerator::AddDirectoryEntryIfNeeded(const std::string& _FileName)
{
string::size_type index = _FileName.find_last_of( '/' );
if ( index == string::npos )
return;
std::string DirectoryName = _FileName.substr(0, index + 1);
if ( !m_DirectoryMap[DirectoryName] )
{
m_DirectoryMap[D... | 1 |
61d04f61061de6a4f870ed2f140f37fd | abd4a2ba3070c4f3746d1f718a90a4e5 | Name: create_full_process | static process_t *create_process_common(const char *name, const char *args)
{
process_t *proc;
proc = (process_t *)kmalloc(sizeof(process_t));
if(!proc)
return NULL;
memset(proc, 0, sizeof(process_t));
if(name) {
proc->name = kstrdup(name);
if(!proc->name)
goto er... | 0 |
bff45342fa29118eac1f2acc28a7eda9 | e909176c08d470d05e6bfa9c7472cf2a | Set on-air Power Amplifier gain | class HP83630A(object):
def setAmp(self, amp):
self.query("POW {:g}".format(amp)) | 1 |
f91946303c4f087c02910d0bf745317a | ce9b0eff6597d95f54c7a52cd219f15b | Check result of form submission for cross scripting
against value stored in current persisted session | {
$result = $_SESSION["CSRF_TOKEN"] === $_POST["CSRF_TOKEN"];
unset($_SESSION["CSRF_TOKEN"]);
return $result;
} | 1 |
7d58f914aad030ba5cd0951aa0b71dda | 9bdf1d4d473091733d9315dc4491859c | Display a listing of the Permissions for Master Records. | class PermissionController extends Controller
public function index()
{
$permissions = Permission::paginate(config('PAGINATION_MAX_REC',10));
$params = [
'title' => 'Permissions Listing',
'permissions' => $permissions,
];
return view('admin.permissions.permiss... | 1 |
94fca98944c9801bf561c58899722126 | eb1d10898138b3d3c742b4a3696972bf | Sets the character's deck screen as necessary. | {
IntPtr popcornCore = ReadValue<IntPtr>(addresses.popcornCoreDataAddress);
popcornCore = ReadValue<IntPtr>(popcornCore + addresses.popcornCoreOffset);
IntPtr deckEditBaseAddress = ReadValue<IntPtr>(popcornCore + addresses.deckEditBaseOffset);
if (forceEnterDeckEd... | 1 |
00dbfa156114c0128fe049f6081bfa91 | aac0ad3daac49cbd4ced90bbd0a00d51 | funkcija koja pronalazi najvecu vrednost u nizu celih brojeva | public class Main
public static int getMax(int[] Niza) {
int maxValue = Niza[0];
for (int i = 1; i < Niza.length; i++) {
if (Niza[i] > maxValue) {
maxValue = Niza[i];
}
}
return maxValue;
} | 1 |
275592c5684948beb90fa26ecf0ef93a | 0f019db786665ebd5b4d8c124282ae65 | Creates country properties to be used by the tests. | {
$this->country = \tabs\api\core\Country::factory(
'GB',
'United Kingdom',
'GBR',
'826'
);
} | 1 |
0c85c7173eb72964003f5cca01ec6d18 | 2ea814bfad35c4287336ddd7d95bc326 | Wagen am Anfang einfügen | var truckFrame = game.add.sprite(width*0.25, height*0.4, "truck");
truck = new Vehicle(truckFrame);
truck.frame.body.clearShapes();
truck.frame.body.loadPolygon("physics", "truck");
game.camera.follow(truck.frame);
var distBelowTruck = 24;
initWheel([55, distBelowTruck]);
initWheel([-52, distBelowTruck]);
} | 1 |
b9998b8df9bd83fcfc80351ea083c8bf | df6628fc857c7d807c0fc481cf65819c | Measure the overhead for each redis hash that is added to the server. | #ifndef NO_TIMING
struct timeval start, end;
uint64_t partition_time, build_time, probe_time;
#endif
uint32_t nbuckets = relR->num_tuples;
auto ht = allocate_hashtable(nbuckets);
#ifdef PERF_COUNTERS
PCM_initPerformanceMonitor(NULL, NULL);
PCM_start();
#endif
#ifndef NO_TIMING
gettimeofday(&start, NULL);
... | 0 |
450722d9db2819ea9d3b50bf5d02dcaf | c5d6eed8162833e4eb7a501354d06496 | 链式存储入队 | bool enQueue(LQueue *lq, TYPE data){
struct Link *newD = (struct Link*)malloc(sizeof(struct Link));
newD->node = data;
lq->rear->next = newD;
lq->rear = newD;
lq->rear->next = NULL;
return true;
} | 1 |
767fe5c2d84e27c21823a0937e206007 | 9b85ab627f3bb65a14a09c092e8f9512 | Работаем по ссылке.
Приводит две дроби к одинаковому знаменателю. | {
for (int i = (o1.denomerator>o2.denomerator?o1.denomerator:o2.denomerator);; i+=i)
{
if (i % o1.denomerator == i % o2.denomerator)
{
o1.numerator *= i / o1.denomerator;
o2.numerator *= i / o2.denomerator;
... | 1 |
8cd1c07d2a013692a671f324dc119dbb | 30b87a650d7472c3490492462276dafb | Returns the meta object for class '{@link de.dc.spring.mm.OneToOne <em>One To One</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getONEOFConstraint(); | 0 |
d19dd02b1ad5dcb3ce6a6bac93709d73 | 830f81f5bd35cde9b50b161c618c0ad6 | Метод возвращает объект действия по ключу. | ActionObject getActionObject(String name); | 1 |
d573e2834808ffc11b04c6dc343cf32e | f4fa13b2c676ce9f444a40335b4c1a08 | Prints one or more arguments to strings in the best way possible to standard error line. | namespace SharpKit.NodeJs
class Utilities
public JsString print(params JsString[] strings) { return null; } | 0 |
7106d373717611c25e9d58d1b712d473 | b522a72c4539957bc7e4a2e2711ef2b8 | Collects gameplay experiences by playing one step of a puzzle
and stores the gameplay experiences in buffer. | self.number_of_steps += 1
self.previous_state = self.state
if len(self.experiences[0][POSITION]) != 0:
self.state = self.experiences[0][POSITION].pop(0)
self.goal = self.experiences[0][GOAL].pop(0)
if len(self.experiences[0][POSITION]) == 0 or self.goal == self.st... | 0 |
90cdc258c59e19c3fec9d21d510b0d5f | ddc62cfa1cde4fa2836b5b727e2d39af | Get the processor family via cpuid instruction intrinsic | x86::cpuid_regs_t cpuid_regs {};
x86::cpu_id(MAX_PHYSWIDTH_CPUID_LEAF, cpuid_regs);
return cpuid_regs.eax & 0xff;
} | 1 |
230dadd9bca3be800611589aca6e45d8 | 845a85a2522cbe66a6741054b7ac6e6a | Get send to other recipient list | public class DescribePolicyGroupInfoReceiverInfo extends AbstractModel{
public String [] getSendFor() {
return this.SendFor;
} | 1 |
9e59007d026d703fe81bf9559f45086f | e642439e43133a8f670308bd12f78e82 | 自动选用版本编码字符串 目前 仅实现了字节流模式的编码 | public abstract class StyleRowWriter
public byte[] encode(String content) throws UnsupportedEncodingException {
if (!CharsetType.isCharset(charset)) {
return content.getBytes();
}
String who = CharsetType.translate(charset);
return content.getBytes(who);
} | 1 |
875b0af762e667bb19738a2bf94f3894 | c462d70216e0bc1edfa3d6236951619b | 根据总返现金额获取客户端多返金额(单位元) | public class RefundUtils
public static float getRouteMoreMobileRefundYuan(Long maxCashRefund) {
return getMoreMobileRefundYuan(maxCashRefund,
Constant.PRODUCT_TYPE.ROUTE.getCode());
} | 1 |
6bbc78a8aded69a487ca87a1ad5828be | 85319f35086f63a0e997e27497325501 | Returns the condition key for current provider. | {
$data = array(
'provider' => $this->provider->get('service_url')
);
$user = $this->provider->get('username');
if (!empty($user)) {
$data['provider_data']['username'] = $user;
}
return self::getCacheKey($data);
} | 1 |
44ec612cc1d4eb685e0be3156ac154b6 | 6c96307ec81b20b1bf2bcbf33c443049 | 添加钱的标识(¥) | class Line
public function setAmountSign($amountSign) {
$this->amountSign = $amountSign;
return $this;
} | 1 |
9c98ebc7ea9c189c94f6ff82d3d56e7d | e31394f3837a74e52814f73aea67e307 | Updates the lock table when a page is discarded. | function ouwiki_override_lock($pageid) {
global $DB;
try {
$DB->delete_records('ouwiki_locks', array('pageid' => $pageid));
} catch (Exception $e) {
ouwiki_error("Unable to delete lock record.");
}
} | 0 |
f8606b6296d9e0ed9d877e8d397a87ee | 174a45206cfb6e1802cbbc5e61b95431 | 指定されたコードポイントが半角 ASCII か判定します。 | namespace FEZTradeBot public static class TextFinder
public static bool IsHalfWidthCharacter( char c ) {
return GetEncoder().GetByteCount( new char[] { c }, 0, 1, true ) == 1;
} | 1 |
1f99cf57a02295912215826f49e5f4d1 | a8d01b505642e4e47871d46760b2e174 | {@code POST /proprietaire-actions} : Create a new proprietaireAction. | @RestController
@RequestMapping("/api")
@Transactional
public class ProprietaireActionResource
@PostMapping("/proprietaire-actions")
public ResponseEntity<ProprietaireAction> createProprietaireAction(@RequestBody ProprietaireAction proprietaireAction) throws URISyntaxException {
log.debug("REST request to s... | 1 |
66ea943ab767a618252e3fe9cc9f72e4 | 99d2ea79e4b6e6dea8b03ab360002b21 | get the number of controllers of a particular type | try {
return getHardware(type).size();
} catch (Exception e) {
}
return 0;
} | 1 |
f8b2c3201dc180c8267ab40505a79e49 | 993202df31b2715834e61ed4252402a7 | รายงานการจ่ายยานอกเวลา | public String reportForUnloadInShop(Map<String, Object> model,
@RequestParam(value = "dateFrom", required = false) Date dateFrom,
@RequestParam(value = "dateTo", required = false) Date dateTo) {
setInfoForCommonPage(model);
dateFrom = getDateFrom(dateFrom);
dateTo = g... | 0 |
cb0ca1335b64bd35b5693c250978e474 | 0ad93f8953f7cf6d3d3c6db056fe708b | Proxy passthrough method to the IntegerConstraint to get the
minimumn value below which warnings will be issued. | public final class IntegerPropertyDefinition extends
PropertyDefinition<Integer>
public int getLowerLimit() {
return lowerLimit;
} | 0 |
92b5045882bbdf844fc4c16fdb3a5f1b | 4d4f76c3eeed3d1f62df7b423297b8e2 | Get the Narrative ID. | public final class Story
public int getId() {
return id;
} | 1 |
840a3540f681fc1404e5551cd043569a | 5a019037ab3451f041b4542184518d4c | 只保存Manager 元素 | loadManager(idx) {
var info = this.managerInfoList[idx];
var curItem = this.managerUIList[idx];
if (curItem == null) {
curItem = cc.instantiate(this.managerItem);
this.managerUIList[idx] = curItem;
this.managerUIList[idx].head = cc.find("Head", curItem).getCom... | 0 |
caadc9b668bed43cfa1fc8e63a841743 | d8adc69ecc382e339bb5c4571e9ec49b | This method used to convert selected font object to correct format string | {
string ret = "";
ret = "ScriptUI.newFont(";
ret += "\""+fnt.FontFamily.Name+"\",";
if ((fnt.Bold==false)&&(fnt.Italic==false))
{
ret += "ScriptUI.FontStyle.REGULAR";
}
else if ((fnt.Bold==true)&&(fnt.Italic==false))
{
ret += "ScriptUI.FontStyle.BOLD";
}
else if ((fnt.Bold==fals... | 1 |
b5dc4cddc764a45fbc25c7b3eec8dab9 | be4007a874cd9f77836cfc0c25414d6f | Returns the value of the '<em><b>Coord Bx</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Coord Bx</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | public Integer getB(); | 0 |
83956b8b5b7236fbbeb4e736ec0dfcbf | 37ba9741693725c32a9196b5a8230817 | Checks if user can take attendance for an eighth activity.
Returns:
Boolean | if (self.attended_tour
and self.eval_date
and self.status != '2'
and self.teacher_rec_form
and not self.sent_offer_letter
):
return True | 0 |
afba89c2ca79ef4285823fa65b6076a8 | f4c6e7a018e3d499e17f9084a5ad186f | 从原始数据中得到字典信息,比如将字符转换为索引,得到词典,将一些属性转换,
最后写入待使用的文件,分为训练集和测试集 | class DataSet():
def get_dataset_dic(self,tran_data_path,test_data_path):
tokenizer = spacy.load('en_core_web_sm')
dataset_list=list()
word_to_id=dict()
id_to_word=list()
test_data=pd.read_csv("yelp_dataset/data/test.csv",names=['star','review'])
train_data=pd.read_csv(... | 1 |
9f9bbc31753e9b5d4609fdee90972f4e | 447e65f2fb958e3f0b3484b671b46092 | Saves the player's weapon preferences. | Player::save(stream);
for(int i=0; i < NUMSELECTEDLISTS; i++) {
stream.writeUint32Set(selectedLists[i]);
}
} | 0 |
eb0ac1d279182c872fc8a4b52cc1cf08 | 7f3f5f71904bc48d580986a8fd9bea7e | Returns a new {@link CUDA_MEMSET_NODE_PARAMS.Buffer} instance allocated on the specified {@link MemoryStack}. | @NativeType("struct aiNodeAnim")
public class AINodeAnim extends Struct<AINodeAnim> implements NativeResource
public static AINodeAnim.Buffer calloc(int capacity, MemoryStack stack) {
return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity);
} | 0 |
9b7d6d65d7f1a5cedfad0d142a0382a4 | 82237c0231ea9e47895f73e2b3644989 | 根据userId和项目Id修改总金额和剩余金额 | int updateMoneyByUserId(int userId, BigDecimal drawMoney, String money); | 0 |
ab52349aadb68e92e49fa92d9e9db80d | 0d0d9d3f0ec26441e4636bd1ad4bd98c | 显示选中幻化卡牌信息 | {
HideAllButton();
if (card is Mon_Card)
{
fromHandCardMc=(Mon_Card)card;
this.NameLabel1.Text = fromHandCardMc.GiveCardState()+ fromHandCardMc.Name;
this.LevelLabel.Text = Levelstar(fromHandCardMc.Level);
this.D... | 1 |
6fdb5e1951e37e1300d1a910890e28ed | 13636510881e718f9b8db6539abaff3a | Takes a games sequence and constructs a players feature sequence | player_columns=[]
game_columns=[]
for c in df_train.columns:
if len(set(df_train[c][:22]))!= 1:
player_columns.append(c)
else:
game_columns.append(c)
all_columns=game_columns
for c in player_columns:
for i in range(22):
all_columns.append(c... | 1 |
ba9e9f98c5a5e4d2fd0d00b6d9827ea2 | d421f42925e7ba723897522150361cea | Similar to [call] but `true` if the function succeded and `false` if it failed. | var done = false;
var res = tryCallTwo(fn, function (value) {
if (done) return;
done = true;
resolve(promise, value);
}, function (reason) {
if (done) return;
done = true;
reject(promise, reason);
})
if (!done && res === IS_ERROR) {
done = true;
reject(promise, LAST_ERROR);
}... | 0 |
3548ca689754aa40ef71be96792840e9 | ae0870f28f84e7ce5bf199ec8d1cf780 | 根据任务id 和图片id 查询当前问题 | ProblemViewPO queryProblemViewByProblemId(Integer problemId); | 0 |
ec35c48487225ce1aea111f6a5103250 | bac0cb271b75a503dfb3d62320e599e1 | 获取所有的已发布决策表 | DecisionTable getPublishDecisionTable(String workspaceCode, String decisionCode); | 0 |
5aa0040bf6000055b344639d4a539178 | f0db0d84d437299280fffac5b2660e2d | 베스트 답변 | class Question extends Model
public function mostThumbAnswer()
{
return $this->hasMany('App\Answer')
->get()
->sortByDesc(function ($answer, $key) {
return $answer->countVote();
});
} | 1 |
6a9aed434b25f3f4afe867a223e6faf4 | d9c3331420c66735769295c767bc8e48 | Returns name without custom label | class CohortManagementSection(PageObject):
def _cohort_name(self, label):
return label.split(' (')[0] | 1 |
2c2115326d9b50b1bd1bf48ec78f1720 | 207f1b82ad13441ace6c42d100d32579 | Create the variables for the options dropdown menu | function make_options() {
var options_list = document.getElementById("options_list");
for (var i = 0; i < options.length; i++) {
var checkbox = document.createElement("INPUT");
checkbox.setAttribute("type", "checkbox");
checkbox.setAttribute("name", options[i][0]);
checkbox.setAttribute("id", option... | 0 |
fac82dffbc67849c5dad2554642df728 | 4841919ae85cce7a847d3e8c20b3b13a | 查询对应项目的总线路条数 | @Component("lineservice")
public class LineServiceImp implements ILineService
public int getTotalCount(int con, String convalue) {
String queryString = "select count(*) from Line mo where 1=1 ";
Object[] p = null;
if(con!=0&&convalue!=null&&!convalue.equals("")){
if(con==1){
queryString += "and mo.name lik... | 1 |
e4332b89c9eaf8135d2a043bae5a1774 | 6aa95ca4d0f6a429ee2f3e8dee495b7b | Keeping track of 2 things:
1. Whether the entred bookid was issued or not
2. whether the book is returned in time or not | class LibraryController:
def rentBook(self, rentalId, bookID, clientId, rentedDate, dueDate, returnedDate):
return self._repo.rentBook(rentalId, bookID, clientId, rentedDate, dueDate, returnedDate) | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.