query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
0f005e7999854f43f5b731f5960ff3a0 | fb779196450642bf9559ab53c72405e5 | Gets or sets the name of the event to listen to. | abstract class EventDataItemBase extends BoundRepeaterFieldModelBase implements IEventTrigger
public function setEventName($value)
{
if (is_string($value) === false)
throw new SystemException(SystemException::EX_INVALIDPARAMETER, 'Parameter = value');
$this->eventName = $value;
} | 1 |
ed6e3438d68cda12a5ab9ae5aef4e855 | 5203bc77e682837693b437b532579bf6 | 获取所有的日志文件路径 | $file_path = [];
foreach (self::$log_modules as $module){
$log_path = ROOT_PATH.'runtime/'.$module.'/log/';
$file_item = self::getFoldersFile($log_path,'log');
$file_path[] = [
'module'=>$module,
'list'=>$file_item,
];
... | 1 |
7402b4a2b321201c52eafa3e49fe536d | 9bd205cbe0db5de73d0246f9e1c9eb72 | 格式化三级分销金额数据(分销层级) | {
foreach ($unPayLists as $un => $unPayList) {
$unPayLists[$un]['preferential_money'] = $unPayList['preferential_money'] = $unPayList['preferential_money'] ? $unPayList['preferential_money'] : 0;
$unPayLists[$un]['penalty'] = $unPayList['penalty'] = $unPayList['penalty'] ?: 0;
... | 0 |
90ff3603a24a9cb4e10f551417d651fb | 1c62b0ff2af0544edcd004d997d4a8fe | Универсальный метод для выравнивания до кратного 8 и обратного действия. | namespace CommonCoreLibrary.Serialisation
internal static class SrlHelper
internal static BitArray Normalize(this BitArray array)
{
if (array.Count % 8 == 0)
return new BitArray(array);
BitArray var1 = new BitArray(array);
var1.Length += array.Count % 8;
... | 1 |
d84e30e85c973d985d9eb6d0d5b1bcf1 | 9fafa89574d3cb17749b436f14558aa1 | ## return a list of nodes with which a given node is connected | id = NULL,
private = FALSE,
maxdepth = 5) {
config <- get_config(private)
url_osf <- construct_link(sprintf("nodes/%s/children", id))
call <- httr::GET(url_osf, config)
res <- process_json(call)
sel <- unlist(res)
sel <- sel[names(sel) == "data.id"]
i <- 1
tmp <- sel
while (!length(res$data) ==... | 1 |
e273cfd86d5527a1131705a6715ae76a | 1c55cf2b1dfb349617b77d34e4e902fd | 根据状态获取上架或下架字符串 | $arr = array(
'0' => '删除',
'1' => '上架中',
'-1' => '已下架',
);
return $arr[$key];
} | 1 |
fd0468e6e715e6102a6b32308acf8a33 | a8a10a1eaaf7b53692334ce4ee01d4be | Update the acceleration to the given value | public class SmoothActor extends Actor
protected void setAccelaration(Vector newAcc)
{
acc.setX(newAcc.getX());
acc.setY(newAcc.getY());
} | 1 |
ba891001f0752ec5ade7aaa41bd1b42f | b5f7a318a8d26737489761fbd729fd99 | Test case for get_download_content | headers = {
'Accept': 'application/json',
}
response = self.client.open(
'/RadonCTT/testartifact/{testartifact_uuid}/download'.format(testartifact_uuid='testartifact_uuid_example'),
method='GET',
headers=headers)
self.assert200(response,
... | 1 |
96dcfa5c0016b86964a021d11403c0cd | cc501c9ae28996955b6a6a8cda4f40cd | Append a straight line segment from the current point to the specified one.
The new current point shall be the one specified. | namespace com.epl.geometry
[System.Serializable]
internal sealed class MultiPathImpl : com.epl.geometry.MultiVertexGeometryImpl
public void LineTo(double x, double y)
{
_beforeNewSegment(1);
SetXY(m_pointCount - 1, x, y);
_finishLineTo();
} | 1 |
3c720ac802bd31a8c84d0d11a66d41ce | 60b6ccb18122bac0db7f1943b7256c3b | Defines multiplictaion of values and errors. | try:
val = self.raw*other.raw
unc = abs(val)*math.sqrt(
(self.rawUncertainty/self.raw)**2 +
(other.rawUncertainty/other.raw)**2)
except Exception:
val = float(other)*self.raw
unc = abs(float(other)*self.rawUncertainty)
... | 1 |
adabc43f8572e3ebf366ba94d5242b22 | 675aaa8264dfd3cca97bdf6f5619c16c | 退出登录(后端未提供接口,所以只能清除本地登录日志) | this.clearLogin({ needClearAuth });
return { code: 0, errMsg: 'ok' };
} | 1 |
ddcf17a2bc4ce347ad69679980ef6820 | f36968524228e2d50e877927a9155fef | toggle the current phase of the traffic light between red and green and send an update
to the message queue using move semantics. The cycle duration is a random value between 4 and 6 seconds.
Using std::this_thread::sleep_for to wait 1ms between two cycles. | static void vTunnelTask(void *pvParameters)
{
(void) pvParameters;
for (;;) {
setTraficLight(DIR_EAST, STATE_RED);
setTraficLight(DIR_WEST, STATE_RED);
vTaskDelay(waitTimeMs / portTICK_PERIOD_MS);
setTraficLight(DIR_EAST, STATE_GREEN);
setTraficLight(DIR_WEST, STATE_RED);... | 0 |
e09bad7234ef941a0fb7ddd6d6901e1f | 66031e3a7699c205b2031dd6518ad1f3 | 为特定createdTime的todo指定newAssignedTime | class TODOList
@action updateTodosData(todos, generateTime) {
this.todos = todos;
this.generateTime = generateTime;
} | 0 |
dbb10c9196dd558a77e238ea96bbf142 | 8dfb053d74c987d8f7f964f371393c42 | getter per la FORM CancellaCategoria | $s = $fldvalue;
if($rs["stato_ben"] != "C")
$s = " ";
return $s;
} | 0 |
a0096f54daf1b02c843623f2a19f4bd0 | 5196a5af1b4e6f0c44975267259d9e00 | Test of toString2 method, of class IEEEParser. | String test = "(CH3)3C^{+} + 3H2(g);" +
"CH3^{+} + 3CH4 -> (CH3)3C^{+} + 3H2(g);" +
"Na++Cl-+3H2(g);" +
"3H2(g) + (CH3)3C^{+};" +
"(CH3)3C^{+};" + ... | 0 |
a09ebc01dee4acc84dd2d115f6d26083 | b7074698ae7dd0fc846571ebcba7e31b | The following function reinitialize the specified FRU device.
It must be called by FRU device modules when switching to the M0 state. | UI8 nFlashDevice
)
{
SFlashDevice *pFlashDevice=&mFlashDevices[nFlashDevice] ;
#if DEBUGLEVEL >= 3
sprintf(mbaMessage,"Device=%u",nFlashDevice);
UpgradeUI_Message_S(UNREGISTER_DEVICE, mbaMessage);
#endif
if(nFlashDevice >= MAX_FLASH_DEVICES_IN_MODULE)
{
return UWRESULTCODE_UWF_INVAL... | 0 |
098422b0615dd5fcfc96175efbf18fa7 | 3f3e1ca5df366c7cc55cdc6d1b48dd47 | 删除屏蔽层 | local swallowLayer = NodeUtils:getTopViewByName("swallow_layer")
if swallowLayer then
swallowLayer:removeFromParent(true)
end
end | 1 |
95f82980de9744472f620f3a2b78cdd3 | 968b977f6a6de457a7b1d23020bcc589 | 根据左上角和右下角计算控件坐标的方形 | const position = this.getAbsolutePosition(left + width / 2, top + height / 2, width, height, rotate);
const l = Math.min(...this.getAxisListByPosition('x', [position]));
const r = Math.max(...this.getAxisListByPosition('x', [position]));
const t = Math.min(...this.getAxisListByPosition('y', [position]))... | 0 |
a4b64b897fe4c4b40db2da3b4294d185 | a0de4262792e73626af41d08c82c6231 | For a given type code, returns its name. | const char *DPSNameFromIndex(int namecode)
{
return DPSNameFromTypeAndIndex(-1, namecode);
} | 0 |
c5111bd10d3361c25c2aac329a1fe806 | be330e2ed70aca43ef5311097d782211 | 通过shader文件名创建program | void MainView::createShaderProgram( QOpenGLShaderProgram& shaderProgram, const QString& name ) {
shaderProgram.addShaderFromSourceFile(QOpenGLShader::Vertex,
":/shaders/" + name + "_vertshader.glsl");
shaderProgram.addShaderFromSourceFile(QOpenGLShader::Fragment,
... | 1 |
2c126d11f935ccc66ac1aa74b6485e6c | 47b63991b35c8dcc17b560361c4b0624 | make all undefined symbols external | uint32 j;
uint32 ExtSymNum = 0;
if (NumExternalSymbols > 0) {
ToFile.StartRecord(OMF_EXTDEF);
for (j = 0; j < SymbolBuffer.GetNumEntries(); j++) {
if (SymbolBuffer[j].Scope == S_EXTERNAL && SymbolBuf... | 0 |
a696ad46a67f1125b58a40b4dc2c16aa | 4a2f3e320176c9c537b0b18ce68e93a0 | updates force with WCA forces | {
tVector wind_force = mWindStrength * mWindDir;
tVector res = mCloth.GetRes();
for (int v = 0; v < res[1] - 1; ++v)
{
for (int u = 0; u < res[0] - 1; ++u)
{
int v0 = mCloth.GetVertID(u, v);
int v1 = mCloth.GetVertID(u + 1, v);
int v2 = mCloth.GetVertID(u + 1, v + 1);
int v3 = mCloth.GetVertID(u, v ... | 0 |
66ee55e3adefd27b665f1e10492b22fb | d1a81cdcc26d0680b4c990a33b89f59c | 检查积分达成回调 | function onGetAchieveInfo( cbFlag, dictData, bRet )
if (bRet) then
ShareModel.setAchieveInfo(dictData.ret)
getShareInfo()
end
end | 1 |
933a6e3c3b1ca8e965ea8b06304b4f20 | d0f712e43f214990daadacf86b9025a0 | @brief subtract two matrices | {
matrix out;
out.rows = A.rows;
out.columns = A.columns;
if (A.rows == B.rows && A.columns == B.columns && out.columns == A.columns && out.rows == A.rows)
{
int x;
int y;
for(x=0;x<A.rows;x++)
{
for(y=0;y<A.columns;y++)
{
out.data[x*A.columns+y] = A.data[x*A.columns+y]-B.data[x*A.columns+y];
... | 1 |
f9382feb9e059093cc1b560b21847eed | de79a5fd4528eee8777da457ac346197 | Log to stdout, thread safe | if level > self.level:
return
if self.timestamps:
timestamp = time.strftime(u'%H:%M:%S ')
else:
timestamp = u''
with lock:
if self.context:
self.stream.write(u'%s%s> ' % (timestamp, self.context))
elif self.conte... | 1 |
d4fb4a38b43d5895032dba7f5614d86a | abf0b00a072e4db6f8803e8209b0c443 | Generate depot capacities. | idle_cap_l = self.locoms.add_freight_service(ton, dist)
idle_cap_w = self.wagons.add_freight_service(ton, dist)
return (idle_cap_l, idle_cap_w) | 0 |
9181f71b193446bb7055616f021d3c6d | 637a0bac592e358a5328349060210c59 | TIKLANAN SATIRI HÜCRELERE DOLDURMA | {
satir = e.RowIndex;
if (satir > -1)
{
txtUYE_REFNO.Text = dataGridView1.Rows[satir].Cells["UYE_REFNO"].Value.ToString();
txtADI_SOYAD.Text = dataGridView1.Rows[satir].Cells["ADI_SOYAD"].Value.ToString();
txtADRES.Text = dataGr... | 1 |
269036fd88baa073f380d847c7060b70 | 1255af850b197a921e3e0e9261f439b9 | Merge account custom fields. | {
if (!empty($this->customFields)) {
$allCustomFields = $this->getAllCustomFields([]);
if (is_array($allCustomFields)) {
foreach ($this->customFields as $key => $value) {
$allCustomFields[$key] = $value;
}
}
... | 1 |
6e45ba60b408bbbd5834e1dcfe794544 | a2a3c89f2ef7fced953a80337893a8d6 | Loads customer main screen. This method takes the user to the customer main screen. | public class ReportsSchedulesController implements Initializable
@FXML
void customerInformationButton(ActionEvent event) throws IOException {
stage = (Stage)((Button)event.getSource()).getScene().getWindow();
scene = FXMLLoader.load(getClass().getResource("/view/CustomerMenu.fxml"));
stage.s... | 1 |
a78512b0127ef837c6fd9838c02a7f16 | 38dfff30eb2b701c2f6082b499d88b0c | Setter for passwordAlgorithm | class Builder extends \Yana\Core\StdObject implements \Yana\Security\Passwords\Providers\IsBuilder
protected function _getPasswordAlgorithm(): \Yana\Security\Passwords\IsAlgorithm
{
return $this->_passwordAlgorithm;
} | 0 |
34b9723826a169b6a95bd1db01321101 | 5bfcacb41c561f27114b7e2b1a56293a | @brief Tests that database connection is closed properly. | TEST_F(TestClient, CloseConnection){
EXPECT_TRUE(client->closeConnection(close_str));
} | 1 |
51dfbf2d39afdd34ee0ac6e2e7d3de38 | c12b63571d817e1793d63cc93b8f7d1c | タイトル変更関数 | char title_menu(int *cmd)
{
int ch;
int last;
last = *cmd;
print_title();
timeout(50);
ch = getch();
if(ch == KEY_DOWN){
(*cmd)++;
}
else if(ch == KEY_UP){
(*cmd)--;
}
if(*cmd > TITLE_MENU_MAX){
*cmd = TITLE_MENU_MAX;
}
else if(*cmd < TITLE_MENU_MIN){
*cmd = TITLE_MENU_MIN;
}... | 0 |
44eb870b61b89c38627ce9a1f960f909 | 1f41e6494f7eacfcb158ec77f140e19c | 直接加载原始图片, 不做宽高处理 | public class ImageUtils
public static void loadImage(Activity activity, Object model, ImageView imageView) {
loadImage(activity, model, 0, 0, imageView);
} | 1 |
9af1f2abeb0fdd2a041d183e17dd8238 | c550a6625268da9934b8b7851fe316cf | 触摸事件,让滑动的图片重新回到原来的样子 | public class LoopViewPager extends ViewPager
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
stopImageTimerTask();
break;
case MotionEvent.ACTION_UP:
if (getAda... | 0 |
4ce322f88e4dee407cfd8f2c7dd7b06e | fc3e11e9243c94635a215774ba8a7f41 | 通过key播放bgm | function play_bgm(state)
if bgm and bgm:isPlaying() and bgm_table[state] == bgm then
return
end
if bgm then
bgm:stop()
end
bgm = bgm_table[state]
bgm:setVolume(options.music_volume)
bgm:play()
end | 1 |
99e38a25438a5863701f2ff88b44705e | 3125099c04a5e361a0aadac42b2c3ae0 | Verify that strings which contain incomplete specifications are parsed
correctly. In some instances, this means not being parsed at all, and
returning an appropriate error. | class EventsDataSourceTestCase(GrokTestCase):
def testIncompleteSettingsFail(self):
self.assertRaises(GrokError, self.e.getSpec) | 1 |
59751671c5cb842fa70ac6c2d928a230 | aab86b323684cedcc06bdcc662dee9af | Returns the plz invocation for a subprocess. | class Cmd(_CmdBase, metaclass=MetaCmd):
def subprocess(self):
kw = vars(self).copy()
kw['args'] = self._processargs(kw['args'])
return Subprocess(**kw) | 0 |
172650a6c87a88541cbbf6d27c0b0049 | b2fd8d24fd096b7a4e610d9c65854c14 | Sets the acceleration constraints for this maneuver | class SingleAxisTrajectory:
def set_goal_acceleration(self, accf):
self._accGoalDefined = True
self._af = accf | 1 |
c4d6363f46c942ae24179e13a290dbb7 | a9827309eb7e35cfbb6744f4d7599d87 | Given a page from the xml file, the shot number under consideration, and
the image attributes array for all the stone position images after each
shot, returns a dictionary of the shot data with keys ["team",
"player_name", "type", "turn", "percent_score", "max_elt_index"]
max_elt_index is the index of the page element ... | processed = 0
players = []
for i,c in enumerate(text):
if c == '(':
player_name = text[processed:i-1]
processed = i
elif c == ')':
player_number = int(text[processed+1:i])
players.append(Player(player_number, player_name))
processed = i+2
elif c == ':':
shot_type = text[processed:i-9]
p... | 0 |
1ea994353164f1bd43463de04c075bf5 | 91c551c83a98f273ddaea4428c957dfe | Client connects to the provider and starts to get the data from. | public function connectToProvider(RequestData\iConnectProvider $createProviderConnectionRequest); | 1 |
b3c87fe601f1f20f5fbf6440cbadc525 | a2091dbb98ec7c8485ce300e8e2ccdb7 | This function maps a node id to the associated
grid coordinate | class Coordinate_Dictionaries:
def gridToPoint(self, gridid):
y, x = np.where(self.grid == gridid)
lon = self.londict_rev[int(x[0])]
lat = self.latdict_rev[int(y[0])]
point = {"points": [{"longitude": lon, "latitude": lat}]}
return point | 0 |
522668b69bd18a37207cb77dc5e6eb5e | 83bdb2c46c4abff45af79bdaef854ddc | Only select historic process instances with incidents | namespace org.camunda.bpm.engine
HistoricIncidentQuery createHistoricIncidentQuery(); | 1 |
e9bc66cec2a57306ad2a2146a7b32c9a | 5d078f23fcc7de6fb7834554c6ed642b | 设置canvas并监听大小 | canvas.style.display = "block";
canvas.width = width;
canvas.height = height;
var halfWidth = width / 2;
canvas.style.marginLeft = "-" + halfWidth + "px";
} | 0 |
0bd8f7eab1e7adc756dfd7ea745dd0a2 | 164a27a2585d58eb36936130be4f849d | Compares two words and returns the number of non-identical characters | class WordPathKeeper:
def num_mismatched_letters(self, word1:str, word2:str)-> int:
assert(len(word1) == len(word2))
count = 0
return count | 1 |
91ba3bb450d0022c74ac627927aa17c5 | b1618d3007347e33e62e619629812eff | Init bzip2 lib for decopression | {
pZip->pfnDecompress = rtZipBZlibDecompress;
pZip->pfnDestroy = rtZipBZlibDecompDestroy;
memset(&pZip->u.BZlib, 0, sizeof(pZip->u.BZlib));
pZip->u.BZlib.opaque = pZip;
int rc = BZ2_bzDecompressInit(&pZip->u.BZlib, 0, 0);
return rc >= 0 ? VINF_SUCCESS : zipErrConvertFromBZlib(rc);
} | 1 |
6a21ff2f1c6d7c09231e29b94a4b068d | aef829632e9605af414ddf7d90a26f5a | 获取当前组件在屏幕上的范围坐标 | return if (startOrientation == START_ORIENTATION_LEFT) {
RectF(currentCol * w, currentRow * h, currentCol * w + w, currentRow * h + h)
} else {
RectF(width - (currentCol + 1) * w, currentRow * h, width - (currentCol + 1) * w + w,
currentRow * h + h)
}
... | 1 |
ce8c75457251ea88096cf8c74844b061 | 7f61448ad6da3ef0f9cb03f40c5be655 | ================================= __MAIN__ =================================== | cases like (1) | 0 |
0493e3f561961bec91bbb4563431fe30 | 5bdd5e8bd12b0f375068829731ab5022 | 入口文件夹变动初始化 | watcher, err := fsnotify.NewWatcher()
if err != nil {
log.Fatal(err)
}
filepath.Walk(Dir_Templates, func(path string, fileinfo os.FileInfo, err error)error{
if fileinfo.IsDir(){
err = watcher.Add(path)
if err != nil {
log.Fatal(err)
}
}
return err
})
go func() {
for {
select {
case ev... | 1 |
42facdb72266e9685f72b24a866c3568 | df4ed7bbf6e1738dffc3ea0372e4d82e | 设置子节点,如果存在指定名称,则覆盖该子节点,否则添加子节点 | if (typeof name !== 'string') {
console.error(new TypeError('name is not a string'));
return false;
}
if (!(child instanceof ChannelNode)) {
console.error(new TypeError('child is not a ChannelNode'));
return false;
}
if (this.hasChild(name)) {
console.error(new Error('t... | 0 |
20cadeb9086c55b2809522849de35c20 | 8e28cb90df02023f5ad8b0867bb7e4f5 | Calculate and display the results for a pin-loaded machine. | _return = False
_attributes = AssessmentResults.do_load_page(self, **kwargs)
self.txtPiU.set_text(str(self.fmt.format(_attributes['piU'])))
self.txtPiA.set_text(str(self.fmt.format(_attributes['piA'])))
if (_attributes['hazard_rate_method_id'] == 1
and _attributes... | 0 |
b810769d3c9cbfe07b881f57c4450912 | b0f26d6de58cd6326c3e5f8a8e09c04e | Validate that the geneshot outputs have all expected data. | if os.path.exists(self.filename):
with HDF5IO(self.filename, manager=get_manager(), mode='r') as io:
errors = common_validate(io, experimental=experimental)
if errors:
for err in errors:
raise Exception(err)
if os.pa... | 1 |
fff069475b030d033812e4f9855c16c7 | 15f7bdc371e0ca43dfb43947cdf48341 | Method to get the user ids that currently authenticated user does not want to see retweets from. | namespace Twitterizer
public static class TwitterFriendshipAsync
public static IAsyncResult NoRetweetIDs(OAuthTokens tokens, OptionalProperties options, TimeSpan timeout, Action<TwitterAsyncResponse<UserIdCollection>> function)
{
return AsyncUtility.ExecuteAsyncMethod(tokens, options, timeout, T... | 1 |
fe2f1ad1757aca438ec652640b05bee6 | b883a0012538b47edfd794633f05bf53 | VIEW ASSIGNED DOCTORS PROFILE | class DoctorController extends Controller
public function show(Request $request,Doctor $doctor)
{
$doctor=DB::table('doctors')
->where('userId','=',Auth::user()->id)
->get();
if(count($doctor)) {
return view('doctor.index')->with('user', $doctor[0]);
}
... | 0 |
036b2ae7b73fd2b2db863a7967f85946 | bd9b6cf23c478e3933f9cb4249d0d3a9 | 获取变动后总余额 | class CoinAccount extends BaseService
public function getSumRechangeAmount($where)
{
$res = $this->model('CoinAccount')->field("sum(c.rechargeamount) sellTotalMoney")->where($where)->find();
return $res['selltotalmoney'];
} | 0 |
3e39d6e51084a6eb7482af417640ae4c | c6016e404a9055ea525052b6769a037e | Erzeugt eine Kopie der aktuellen Gruppe mit ihren Zugriffsrechten | SblGroup result = new SblGroup(Name);
foreach(SblNode item in Items){
result.Items.Add(item.Clone());
}
return result;
} | 0 |
900135c75bb98420dd56a9c5ec5688b3 | 291e684a3308025cbdb9a0b75bb12e56 | Deletes a particular phone number ID for a person. | namespace Tsi.Web.Api
public partial class ContactsApi : IContactsApi
public async System.Threading.Tasks.Task<ApiResponse<TsiWebResponse>> ContactsDeletePhoneNumberAsyncWithHttpInfo (int? contactNumber, int? id)
{
if (contactNumber == null)
throw new ApiException(400, "Missing r... | 1 |
37040b0beb922366c5b6a74cbfbf9ef1 | d2e622765c3ccd029f657e8cb83f3329 | Given the UUID of a provider, set the inventory records for the
provider to the supplied dict of resources. | self._provdict = provdict
for k, prov in provdict.items():
subtree = self._project_tree.subtree(k)
for record in prov.get_records():
if record.is_relation():
self.store_with_activity(record, subtree)
for n in self._project_tree.leaves()... | 0 |
c43e9718a884b7725a61915fa67ca97f | b66fef3e99379690667b5778cdd2538e | Computes Locally linear embedding technique. | def LLE(X, d, k):
embedding = LocallyLinearEmbedding(n_neighbors=k, n_components=d)
X_embedded = embedding.fit_transform(X)
return X_embedded | 1 |
317ad62ed424b22978c4e7d1e218a8e1 | be1c9177ef950effcf9ab582dbb1a255 | modified slightly from https://gist.github.com/grappler/7060277#file-plugin-name-php | {
$clean_name = strtr($string, array('Š' => 'S','Ž' => 'Z','š' => 's','ž' => 'z','Ÿ' => 'Y','À' => 'A','Á' => 'A','Â' => 'A','Ã' => 'A','Ä' => 'A','Å' => 'A','Ç' => 'C','È' => 'E','É' => 'E','Ê' => 'E','Ë' => 'E','Ì' => 'I','Í' => 'I','Î' => 'I','Ï' => 'I','Ñ' => 'N','Ò' => 'O','Ó' => 'O','Ô' => 'O','Õ' => ... | 1 |
48b19edccbc44c4f2ba29c8eb14bde74 | 1c00e5d1ba18d4c64af481e36393fe3b | Returns a list of processes currently running on the BPEL engine. This
list may be optionally filtered by passing a filter object. | class RedisAPI(BehaviorAPI):
def list_processes(self):
return self.get_running_processes() | 0 |
d655e5433a117abeff9ae3484315178a | bd6bfb0d3469f9c291e448de7b0ad1d2 | Gets the full file name path (dir + name + extension). | abstract class UploadableEntity
public function getFullFileName() {
return $this->getImageName() . '.' . $this->getFileExtension();
} | 0 |
72ff9511f13ccb0e7b67ba8488706e2d | 4b626bc786c4428dad66ac13df65ea2f | Gets the email address key. | public class MailWriterService extends ServiceBase
implements MessageWriter, MailWriterServiceMBean{
public String getSenderAddressKey(){
return senderAddressKey;
} | 1 |
9241883f3aefd3c7efa02c136de21075 | 276bf05be4f9367b29e274c3ae212d89 | Converts selected action from one-hot-encoded output from
the ann back to an action that is understandable for the game | one_hot_action = []
for i in range(20):
if i == idx:
one_hot_action.append(1)
else:
one_hot_action.append(0)
return one_hot_action | 0 |
4d4c1beca08fdd997eba8b8087db8d4a | 5d3b04f2e11f0e9cc7bc8ea23b915572 | Выполнение запроса с результатом в виде списка рекламных слов | namespace Rental
class MoyaReklama
public List<Advert> GetAdvertList(string pageListContent)
{
List<Advert> result = new List<Advert>();
if (!String.IsNullOrEmpty(pageListContent))
{
#region 1. Collect all links from page
Match m = Regex.Ma... | 0 |
e5d7bf2862f17996aeaba7ca28178c49 | d8180990b692ec7842aadf851bb816fc | Clear any existing connection pools (forced in case of major
authentication service changes, for example). | public class PooledDataSource implements DataSource
public void forceCloseAll() {
synchronized (state) {
expectedConnectionTypeCode = assembleConnectionTypeCode(dataSource.getUrl(), dataSource.getUsername(), dataSource.getPassword());
for (int i = state.activeConnections.size(); i > 0; i--) {
t... | 1 |
1c034992d2e82cf59389f3359986c545 | e5c574a43ed8e0118af7c8e148d8ea7f | skip opening / | file_name_is_safe(char* s)
{
size_t l = strlen(s);
if(s[0] != '/')
return 0;
if(strstr(s, "/../"))
return 0;
if(l>=3 && s[l-1]=='.' && s[l-2]=='.' && s[l-3]=='/')
return 0;
return 1;
} | 0 |
914bea8255ae762ceb9d83d20eb16480 | 4648f6f58baea0f3f0fb6d9a9268f896 | 通过资源名异步获取指定prefab的一个克隆 | GameObject obj = null;
if (Prefabs.TryGetValue (name, out obj)) {
obj = Instantiate (obj);
}
return obj;
} | 0 |
574a6b1c84f7272b10cc4755ae98d714 | c7a5d49aa277e2ebda48fbf2b9f87755 | Collect samples into buffer for the pre-train stage | best_train_samples = PriorityQueue(buffer_size + 1)
best_val_samples = PriorityQueue(buffer_size + 1)
worst_train_samples = PriorityQueue(buffer_size + 1)
worst_val_samples = PriorityQueue(buffer_size + 1)
for element in train_dataset:
pred_y = self.forward(element['x... | 1 |
54828ae150687f4fb87ceb5198b40b70 | dbcaaa6040baefa9a64c450c474a6fe7 | 查询数据实体中被参数指定的多边形包围的空间对象 | namespace Sino.Extensions.YingYan.Space
Task<PolygonSearchReply> PolygonSearchAsync(PolygonSearchRequest requestValue); | 1 |
5c31d307441394a18be47539372c3322 | 1fb7f137b8516b76dc411ca5dc02b886 | Constructor method for InternationalCustomerTaxID | class IFT_FaturasInternationalCustomerTaxID extends AbstractStructBase
public function __construct($taxIDNumber = null, $taxIDCountry = null)
{
$this
->setTaxIDNumber($taxIDNumber)
->setTaxIDCountry($taxIDCountry);
} | 1 |
f99799fb64a4bb903b4168723b4dc870 | 5d1a898f090ed7dc3998fe968e08379e | Print the C implementation of actions to the GUI fields specific statements. | static gboolean _e2_output_print_action (gpointer from, E2_ActionRuntime *art)
{
gchar *real_message = e2_utils_str_replace ((gchar *)art->data , "\\n", "\n");
e2_output_print (&app.tab, real_message, NULL, FALSE, NULL);
g_free (real_message);
return TRUE;
} | 1 |
031eb6b60078a727f48ba84f5feef326 | 86f5d45af999dee5eb6b5c0eec3d023b | 初始化积分奖励信息 | public class HumanRechargeManager implements IHumanPersistenceManager,
ILoginManager, IEventListener, ICachableComponent
private void initTotalRechargeRewardInfo() {
Map<Integer, TotalRechargeTemplate> totalRechargeTemplates = rechargeTemplateManager
.getTotalRechargeRewards();
for (Integer gradeId : totalRec... | 1 |
128747fd3c60b648b7e2d62877894ee2 | e3fd25e0c528eecab65087fa92c8c20b | delete one storage group. | payload = {'editStorageGroupActionParam': {
'expandStorageGroupParam': {
'addExistingStorageGroupParam': {
'storageGroupId': [child_sg]}}}}
return self.modify_storage_group(parent_sg, payload) | 0 |
369f1a78d334a8a7f44d22f133fe1dbd | 146b2d3f53a43d0b44f3e835169ae84a | #Lissage de signal à partir de moyenne mobile | n.j <- nb.jours.mois(anc)
l <- length(vx[!is.na(vx)])
vx.corrige <- vx[1:l] * 30 / n.j[1:l]
vx.corrige
} | 0 |
6a15063bf0db75310ab58251ec6de4fa | 3743a29a53e7f6603627e202b51a54e7 | Removes all exired values from the store | const rightNow = Math.floor(Date.now() / 1000);
for (const [key, value] of this.store.entries()) {
if (value[0] < rightNow) {
this.store.delete(key);
}
}
} | 1 |
b857ce6585527b234de3e37424986177 | 68644cb6b2f1131db7662eec9fe3e8cf | Calculate the objects coordinates on screen (based on camera position) | class Camera:
def updateWithObject(self):
self.x = self.obsObj.realX - 502
self.y = self.obsObj.realY - 375 | 0 |
9c6abfc8d657b8dfdfae87ace9df6c9d | 2089fb28d26349288cef3f894cb27756 | 如果当路径为根路径,那么跳转默认路由 | $route(route) {
if (route.path.startsWith("/redirect/")) {
return;
}
this.getBreadcrumb();
} | 0 |
e319a5f4e2efcc401e5ec60992d040e5 | d9647e75e44d00694701cbb6cce42cc1 | The results for specific vendor. | {
$url="";
$searchedBy="";
$search="";
if ($request->has('search')){
$searchedBy = "Search results for ";
$url = "search={$request->query('search')}";
$searchPName = "%{$request->query('search')}%";
$search = "{$request->query('search')... | 0 |
5fece3baf1540020b3cd8b8d3562d09f | b9dea790579a5a108ea880a664fdfa40 | Reverse of encode_apdu_command to parse an encoded command. | if len(info) < 2 {
err = ErrUnderlength
return
}
lstr := strings.Split(info[0], ",")
var l int
l, err = strconv.Atoi(lstr[len(lstr)-1])
if err != nil {
return
}
var pdu *pdumode.PDU
pdu, err = pdumode.UnmarshalHexString(info[1])
if err != nil {
return
}
if int(l) != len(pdu.TPDU) {
err = fmt.Error... | 1 |
b796d5efa6471f5f5328f6a971e6db4c | 4a982d773e1aba0cb6d139c1d9b8b766 | Récupère les ressources d'une équipe et leurs affectations et projet
on ne prend que les affectations et ressources qui correspondent à la période | {
try
{
List<PM_ProjectResources> ResList = new List<PM_ProjectResources>();
List<PM_ProjectResources> ResourceList = null;
List<PM_ProjectResources> ResourceList2 = null;
Hashtable HTResource = new Hashtable();
... | 1 |
42e7670b419249b3e033589df5ac449f | 71bad0e93069b359783d4b8cf8b41297 | Liefert true wenn die Aktion dem Heimteam zugeordnet ist. | bool Ball::doesHisTeamHaveTheBall(Player* somePlayer) {
return (this->player->getTeam() == somePlayer->getTeam());
} | 0 |
fe831ae130e6a5aec83fc859f25001ea | 850ec17d4e0c76c62bdf6bc4178a3889 | adiciona aresta no inicio da lista | {
Grafo *novo = (Grafo*)malloc(sizeof(Grafo));
novo->destino=destino;
novo->custo=custo;
if(g == NULL)
{
g = novo;
g->prox=NULL;
}
else
{
novo->prox = g;
g = novo;
}
return g;
} | 1 |
2d2659f3402d3eba9191d188b9d0a4f5 | 704faabe16350b40efd56028c01d4d12 | Function updates the saved experiment dates. It first creates text
files which lists all the dates which have been designated for the
experiments, which is then used to update the google calendar.
Text files are created to serve as an offline reference, and in case
of any errors which occur after this. | published_date = input("Enter date(YYYY-MM-DD) for NYT bestsellers lists: ")
get_nyt_data(published_date)
init_db(DBNAME)
insert_nyt_data(published_date)
insert_google_books_data(published_date)
update_relations_google_books() | 0 |
b2f43cbeb66be1e259865df3445d384e | 6f847efaa8a11c1047ef96dd49c1bc7a | Metodo que cria a animacao de destruicao do objeto
e o esconde. | $(planet).animate({
'margin-top': $(window).height()
}, {
duration: duracao,
easing: 'linear',
complete: function(){
$(planet).remove();
},
progress: function(){
colisao(planet);
}
});
} | 1 |
4996b15a65da69356bbe5cb80c3d6161 | 8b5e69322ca59610413b1960b14b24d5 | check we hit the peak value (and don't iterate more than we need to) | bool Ostap::Math::Bukin::setPeak ( const double value )
{
if ( s_equal ( value , m_peak ) ) { return false ; }
m_peak = value ;
const double xi_ = m_xi / std::sqrt ( 1 + m_xi * m_xi ) ;
m_x1 = m_peak + m_sigma * s_Bukin * ( xi_ - 1 ) ;
m_x2 = m_peak + m_sigma * s_Bukin * ( xi_ + 1 ) ;
return true... | 0 |
5f6c02f126c60cf9bb0f4569e9e57473 | ce5ff643d5ae950bf4eedadaf2ea975f | returns a list of the formats of all the inputs | List<String> getFormats(); | 1 |
2fb50fff6a4054e2a3c97f7168c7a3d0 | 58385958416e2c993a3cf6a59c22089d | 删除配送路线中的指定小区 | @Controller
@RequestMapping("/logistics/")
public class LogisticsContoiller extends BaseController
@RequestMapping(value = "/delarea")
public void delarea(HttpServletResponse response) throws Exception {
try {
PageData pd = this.getPageData();
if (logisticsService.delArea(pd)) {
super.outJson(response, sup... | 1 |
71cc5b5c16ceef824f4510ac93a02087 | e7b1ee4762b43977f6d100fb78d7b02f | 使用适当的深度缩进打印字符串 | export default class PrintUtils
printIndented(level, content) {
for (var i = 0; i < level; i++) {
process.stdout.write(" ");
}
process.stdout.write(content + "\n");
} | 1 |
4fb20d59433ca72f772ded53f03bc2c8 | ef48e179638203266cf365eb083b80cb | Updates the current color to be closer to the target color, depending on current pecentage. | {
float pc = value * 1.0F / 100;
int ca = c.A, cr = c.R, cg = c.G, cb = c.B;
int c2a = c2.A, c2r = c2.R, c2g = c2.G, c2b = c2.B;
int a = (int)Math.Abs(ca + (ca - c2a) * pc);
int r = (int)Math.Abs(cr - ((cr - c2r) * pc));
... | 1 |
c72da88eb3a446476e3a6024e3f0d181 | 0d0e1d42a967b6ff612ed6eeb61aee48 | POST /areas
POST /areas.xml | namespace simeAlcatraz.Controllers
public class areasController : ApiController
public void Post(area ar)
{
if (ModelState.IsValid)
{
myEntity.areas.Add(ar);
myEntity.SaveChanges();
}
} | 1 |
4f183134dd5999437707b4a4af0236ae | 07632893c2e6f05ea65e1f8398724b8e | Updates Flags property from items in list | String[] flagsArray = flagsAsString.split(",");
this.flags = new Flag[flagsArray.length];
for (int i = 0; i < flagsArray.length; i++) {
this.flags[i] = Flag.valueOf(flagsArray[i]);
}
} | 1 |
fe7b60a1b4b66660f0a910779d712a1e | 642b4fc59deb0d35101b180d5e9f0559 | skrzyżowanie dwóch tras w celu uzyskania dzieci | def crossover(s_1 , s_2):
child_1 = s_1[:2] + s_2[2:]
child_2 = s_2[:2] + s_1[2:]
return [child_1 , child_2] | 1 |
56ec40ce1bc5d157418b201b2df076dd | f2a4c91355a4371b0958e0d18b175d80 | given a pose, return pose reached by turning left along circle of radius 'radius'
direction = 'f' for forward, 'b' for backward
d = arc length of turn (in cm). turn through a quadrant by default | void left2(int degrees,int radius)
{
int turnlspeed;
long turnl=(long)round(((float)(2*radius-ks)*PI)*(float)degrees/360.);
long turnr=(long)round(((float)(2*radius+ks)*PI)*(float)degrees/360.);
if(turnr == 0l) return;
turnlspeed = round((float)turnl/(float)turnr*250.);
mrp(MOT_RIGHT, 250*.9,turnr);
if(turnlspee... | 0 |
2cf0429be5889688f537d5446d6616dc | 99b712bd4f4a9e21ed55cdcd1ea9679c | Check to see if ScriptId property is set | namespace Amazon.AmplifyUIBuilder.Model
public partial class ReactStartCodegenJobData
internal bool IsSetScript()
{
return this._script != null;
} | 0 |
939fb1cc47a3d9726ca5758b43ad6712 | 8e5ef5321233bd1116e3683a7c7bac10 | method to get Permission name which are having parents permission id is zero | namespace SpiderDocsModule
public class PermissionController
public static string GetMenuPermissionGroupName(int IdPermission)
{
Dictionary<int, string> ans = GetMenuPermissionGroupNames(IdPermission);
if(0 < ans.Count)
return ans[IdPermission];
else
return "";
} | 0 |
b263bf31169fad1d5239a8002a1e47d5 | fe28f665cd5ec1b3aab848d18c87a8ce | Saves the item list and corresponding Platinum and Ducat prices of each item to an external Excel file. | boolean saveCurrencyList()throws IndexerServiceException; | 0 |
7bd10e3b6b5c84ed4803a5e15ebf3012 | a7bc5155c4142f37ceb64ad212bd3613 | When user tap Types button, app is going to display a list showing the types of coffee | this.coffeeService.sendIngredients(this.coffeeIngredients, this.milkIngredients, this.waterIngredients, this.chocolateIngredients);
this.coffeeService.toggleJustStartedState(false);
this.coffeeService.toggleFinishedChoosingState(true);
this.undisplayFull();
this.disableIngredientsBtn();
let... | 0 |
494266a770b132d662d4c82776b8fefe | 3271519001d2398143156e41ed224cd5 | # Normalizar cada variable de características, esto es. aplicarle una función al intervalo [0, 1]. | regularize <- function(df,Categorias,dfTest){
VarFac<-as.character(df$VARIABLE)
if (length(VarFac)>0){
for(variable in VarFac){
media <- mean(df[,variable],na.rm = T)
st_dev <- sd(df[,variable],na.rm = T)
df[,variable]<-(df[,variable]-media)/st_dev
}
}
return(df)
} | 0 |
8b517a25be021f1bff4b439d834f5715 | b59e99003935cd5f245c86880bf45743 | 根据流程实例查询流程定义对象 | public FlowInfo getFlowDefine(String flowInstId) {
return RestfulHttpRequest.getResponseObject(appSession,
"/flow/engine/instDef/"+flowInstId, FlowInfo.class);
} | 1 |
ef8b80fd77d3c8669a914158b5960038 | 04b9a68f662f5c909d0b0f36b45fbcd5 | Returns map of group numbers to field term counts | def get_oo_map(oopath):
result = dict()
with open_file(oopath, "rt") as f:
reader = csv.DictReader(f, delimiter="\t", quotechar="\"")
for row in reader:
term1 = row["term1"]
score = float(row["score"])
if term1 not in result:
result[term... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.