query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
8ee1c676f9d9e0272581e6aa0948cce9 | 1a583f43b96227b58b4af2eca3af63cb | Program entrypoint. | {
ApplicationSettings settings;
std::shared_ptr<Application> game = Application::Create<TestGame>(settings);
std::shared_ptr<Engine> engine = Engine::Create(game);
return (engine->Run() ? 0 : -1);
} | 1 |
44b68adbf69d4fefe76c1764d60f6c16 | e1d9c10eae3cb2783f0c9efaee177505 | 创建迁移job,创建job之后无法修改迁移配置 | {
Dictionary<string, string> urlParam = new Dictionary<string, string>();
string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/migration-task",urlParam);
SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json;charset=UTF-8", createMigrationTaskRequest);
... | 1 |
1b108ea5208410a5be8bad28f97947e1 | 3288bf92a4667b038d6a03c9b6f08736 | 跳转Activity并获取返回值并传递bundle | Class<? extends BasicActivity> clazz,Bundle bundle,int requestCode
)
{
Intent intent = new Intent(getContext(),clazz);
if (bundle != null) {
intent.putExtra("Bundle",bundle);
}
startActivityForResult(intent,requestCode);
} | 1 |
0c5e596801b4e84864442778f2e3474e | 45960c9557f32ec76fee8e092e12e66e | Получение компонент связности для неориентированного графа | {
Dictionary<int, List<int>> ls = new Dictionary<int, List<int>>();
int[][] graph;
var g = new List<int[]>();
for (int i = 0; i < adjacency.Length; i++)
{
for (int j = 0; j < adjacency[i].Length; j++)
{
... | 0 |
d00841bd764dfa96c72ca17d7694773a | f17bfd6f0ca4dcdec086af004b20ed00 | Sets the text.
arg: text (string): the new text
raise: InvalidArgument - ``text`` is invalid
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
raise: NullArgument - ``text`` is ``null``
*compliance: mandatory -- This method must be implemented.* | class CaseSearch(object):
def text(self, text):
if text is None:
raise ValueError("Invalid value for `text`, must not be `None`")
self._text = text | 1 |
9178d407bb0afe124d2f7ad3ee92e809 | ff5d3ffed098a01474e0a40ad97ebc46 | 取得JavaBean对应的<code>org.dom4j.Document</code>对象 | public class Dom4JReader
public static Document getDocument(Reader reader)
throws DocumentException, IOException
{
SAXReader saxReader = new SAXReader();
Document document = null;
try
{
document = saxReader.read(reader);
}
catch (DocumentException e)
{
throw e;
}
finally
{
if (reader != ... | 1 |
d186559e3fb44535a88ba75cbf3f52b1 | 224b6cdbe2c29b81370cb348d6d62f5b | 组装gps报文\n
mobile:手机号\n
jin: 经度\n
wei: 纬度\n
high: 高度\n
speed:速度\n
totalmileage:里程\n
fx: 方向(1-360),不传就随机\n
return: gps报文 | log.debug("[sms gps data pack]");
GpsInfo gif = getGpsInfo();
if(gif == null)
return null;
String str = "CA:";
str += gif.longitude + ":" + gif.latitude + ":";
str += (gif.UTC.getTime()/1000) + ":" + emergency_status + ":";
boolean flag = Math.abs(gif.UTC.getTime() - System.currentTimeMillis()) < 20*10... | 0 |
cfa7c5a76c5dcc5c4cbdeec2ce39967c | ccdc09e007961d208417c25494b37ce6 | 根据DataPrivId查询数据权限的基本信息 | public Priv findById(long id); | 1 |
65362929106143f1d0c17baf88d53383 | f089071fd511e7c8a637c9e67e5f44e5 | Construct the foreign keys from the raw row data. | {
$this->foreignKeys = [];
foreach ($foreignKeys as $foreign_key)
{
foreach ($foreign_key as $col_names)
{
$this->foreignKeys[] = new ForeignKeyMetadata($col_names['constraint_name'],
$col_names['table_name'],
... | 1 |
ec2d983ea27faa199146b7ac174e79b2 | 3bcd9ca70df71b4dad19f11702c98551 | 如果点击的是工具菜单按钮 | public class Scene_Game extends GameScene implements GameCallBack
private void _touchEvent_tools(MotionEvent event) {
if (mUI_toolsBar.onTouch(event))
if (mSp_digTools.getTouchable() == true)
changeMainDigItem(mUI_toolsBar.mItems[0].id);
} | 1 |
9cccea17bdafbc9346280a46eb390d8b | 78366a5bbaf511712e8128a0e400e426 | 根据采编名字得到所有 未审核 的软文 | @Select("SELECT\n" +
"fmweibo.wid,\n" +
"fmweibo.wname,\n" +
"fmweibo.wfollower,\n" +
"fmweibo.wauth,\n" +
"fmweibo.eid,\n" +
"fmweibo.eimage,\n" +
"fmweibo.ename,\n" +
"fmuser.Fmuname,\n" +
"fmauthentication.Aut... | 0 |
5dbb02b6b69916e371624e6ee90ef6bd | 41c2bb2c83144c7efabcc914c229a8f7 | # 带正则化的代价函数 | def regularized_cost_function(coefficients, x, y, regularization_rate):
c = np.reshape(coefficients[1:coefficients.size], (coefficients.size - 1, 1))
return cost_function(coefficients, x, y) \
+ regularization_rate / (2 * y.shape[0]) * (c.transpose() @ c)[0, 0] | 1 |
bd409fb17d91540d26b48b13d0725b90 | 3d63a9ded7322a679676c519c31099b5 | Gets the root property selector. If this selector is the root selector, then this will just
return itself. It it is a child selector, it will walk up its parent tree until it reaches the root. | {
return universalSelectorTree == null ? null : new UniversalSelectorNode(
CreateNamespacePrefixNode(universalSelectorTree.Children(T(CssParser.SELECTOR_NAMESPACE_PREFIX)).FirstOrDefault()));
} | 0 |
f71fa2355a5c964b6674f0a3c7df0af1 | e906ae0e2e9acbadc020bc7db93269ff | Returns the value of the '<em><b>Classifier To Feature</b></em>'
attribute. <!-- begin-user-doc --> <!-- end-user-doc --> <!--
begin-model-doc --> Identifies if the mapping is from Classifiers
(source) to Features (target). The default is true. <!-- end-model-doc | String getClassifier(); | 1 |
f0b08f95f49e9410b66f676a0c144297 | b1eb6cfeded61d0cd21e081dd3e78e8b | render the location photo path (used in image html tag) | if($photo["img"] > 0){
return "img/" . $photo["img"];
}else
{
return "img/no-user.jpg";
}
} | 1 |
9c077efe13d7e2b6e4be758541bb20fc | e0159d1eeee2d1259abeb3c21a83a027 | Sends the given room to the backend and saves its connection to the given Dungeon in the Database | namespace DM___Client.GUIPages
public partial class GUILobbyRoom : Page
public void joinRoom(int roomID)
{
ctrl.send(new Models.ClientMessage("JOINROOM", new List<string>() { roomID.ToString() }));
} | 0 |
d247ff446042e8926749645ab6ac80af | 25f253e01a669d476276cab05a8bece9 | Converts a binary coded decimal number into an integer | def bcdtodec(bcd):
return ((bcd >> 4) * 10) + (bcd & 0x0F) | 1 |
f85020db559bc12742690cb917e583a7 | 02b566b44e53319931c8d01c788fe5d4 | Приблизить/отдалить карту | namespace zpr
void MapView::zoomViewAt(float zoom)
{
if (zoom < 0)
this->mapView_.zoom(1.f/abs(zoom));
else
this->mapView_.zoom(zoom);
} | 1 |
a2e67e4dc1f257d66b9c4f6d24ef15b7 | 1fa2cab43f0dcdde70618eb7fa88a1f6 | 验证当前客户是否为不良客户 | int invaildCustomerVisit(Map<String, Object> paramMap) throws BaseException; | 1 |
390f99952129a4beeb7c4057e6f5e7b6 | 343f6b9e9b50164787cf3882bdb7a49c | Interpolate missing sounding data.
This function is similar to the MR_MISS subroutine in GEMPAK. | size = len(merged['HGHT'])
psfc = merged['PRES'][0]
zsfc = merged['HGHT'][0]
if self.prod_desc.missing_float not in [
psfc,
zsfc
] and size >= 2:
more = True
zold = merged['HGHT'][0]
znxt = merged['HGHT'][1]
... | 1 |
0dd69250a86d9c321ab655239e6a4495 | 20ee7456892258056318fd4051527aa9 | Minus one week. | {
$lastWeek = new static([
'day' => $this->day,
'time' => $this->time,
'length' => $this->length,
'timezone' => $this->timezone,
]);
$lastWeek->moveOpening($lastWeek->opensAt()->subWeek());
return $lastWeek;
} | 1 |
ad1654b608f8ec947cb957daa762754a | 9a4df0f2ab7289774854bcc2606fbc53 | Standard deviation of a tensor, alongside the specificied axis. | def std(x, dim=0, keepdim=False):
return torch.std(x, dim, keepdim) | 1 |
6f0b30380c84191bf3856715e22ec3ca | aa392a9c31fc027725db2e0ce65ed276 | 通过辅助工具Assist的条件删除RDepartmentWorker | Future<Integer> deleteByAssist(SqlAssist assist); | 1 |
45c205909d630d17be01873a2f7b6c8b | 854fbd8d43caaabf6e3d89a26a7ae751 | Setter of 晋职声望 | public class Jibenxinxi extends BaseEntity
public void setZhiye(String zhiye) {
this.zhiye = zhiye == null ? null : zhiye.trim();
} | 0 |
18741788b685210994c58ad38b53972a | fec8ce3890cf4ded72e143efb99e0e8e | ORIGINAL LINE: public static byte[] ReadStream(Stream stream, uint count) | namespace Xenko.Core.Serialization
public static class SerializerExtensions
[NotNull]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static byte[] ReadBytes([NotNull] this SerializationStream stream, int count)
{
var value = new byte[count];
stream.Serializ... | 0 |
f2d4f780bbe44147295c9933ed4ec26b | 71b8720efe037f96432c1f96254ae52f | 对匿名内部类进行归一 | public class AnonymousClassDiffMarker
public void diff(DiffContext diffContext,
DexClassNode oldOuterDcn,
DexClassNode newOuterDcn) {
HashSet<DexType> oldAnonyTypes = AnonymousClassMarker.getAnonymousClassType(oldOuterDcn);
HashSet<DexType> newAnonyTypes = Ano... | 1 |
a2a09c0224dff95e7684979ffe6b9508 | 2db4b69ef181e85fef8e5e29ef7fa1a1 | Gets location of this event, which represents as the name of room holds this event | public String getLocalizationEventName(); | 0 |
cc97ee5a1fc11a698eed68d14e7dc42b | cdb1ffa2ffb4c0ddd85ebdc3ea04de8e | Iterate the Snapshot table, check the status
for every snapshot and update OMMetrics. | iteration = 1
while True:
self.check_es_connection()
self.metrics_controller(iteration)
iteration += 1
time.sleep(interval) | 0 |
1bb0729cd2a931aea7a41297e9b2ca6b | 7b43123b10c8b4e3792ccc200259c641 | 获取商家,评论,菜单信息 | const params = {'expand': 'shop,profile,demands,wallet'};
this.business.getBusiness(params).subscribe(
res => {
this.sellerInfo = res;
}
)
} | 0 |
98de9d2020be522edae5a31ae4d682d0 | 01e14dc49a78da46a78c3d08363e6661 | we create the menu entries dynamically, dependent on the existing translations. | {
try
{
Gtk::MenuItem * item = 0;
XmlRef->get_widget<Gtk::MenuItem>("menu_beenden1",item);
item->signal_activate().connect(sigc::mem_fun(*(this->window),&Gtk::Window::hide));
XmlRef->get_widget<Gtk::MenuItem>("add_language1",item);
item->signal_activate().connect(sigc::me... | 0 |
931597c8d64d58e0f7af9f0dbb9965da | 06a94363d0b137ef5938b8ca366251a3 | Проверить сообщение-карточка пользователя | def check_message(message):
if (
CONFIGS.get("ACTION") in message
and message[CONFIGS.get("ACTION")] == CONFIGS.get("PRESENCE")
and CONFIGS.get("TIME") in message
and CONFIGS.get("USER") in message
and message[CONFIGS.get("USER")][CONFIGS.get("ACCOUNT_NAME")] == "Trofimowova"... | 1 |
27212ae0e72769ff1a9c6c7ae390eade | c2a5c59cbb8d5b105ee314412a5144e2 | 通知Context Property,当新的Context构造完成时,则进入Freeze状态(通常情况下,Freeze方法仅提供一个空的实现) | void acquireContext(); | 0 |
4d4283f3731421864dbf6b484f6741c2 | 2942d68a4eb3b1b7226fc8d22c414470 | @brief refresh the scalar values of the ieee8021SpanningTreeTable.
Normally the values retrieved from the operating system are cached. When the agent receives a
SIGPOLL from an open STREAMS configuration or administrative driver Stream, the STREAMS subsystem
indicates to the agent that the cache has been invalidated a... | store_ieee8021MstpPortTable(int majorID, int minorID, void *serverarg, void *clientarg)
{
char line[SNMP_MAXBUF];
char *cptr;
size_t tmpsize;
struct ieee8021MstpPortTable_data *StorageTmp;
struct header_complex_index *hcindex;
DEBUGMSGTL(("ieee8021MstpMib", "store_ieee8021MstpPortTable: storing data... "));
ref... | 0 |
193c75ea06315cd74391819a0f92f8b5 | d6e36e000191598994b45eee2000319c | sphere is close enough to plane for an intersection? | {
for (INT i = 0; i < 6; i++)
{
if (XMVectorGetX(XMPlaneDotCoord(m_planes[i], XMLoadFloat4(&XMFLOAT4(xCenter, yCenter, zCenter, 1.0f)))) < -radius)
{
return false;
}
}
return true;
} | 0 |
8a171529802903cf229ae9011bc1f1fa | 289351dcc4d485975c548bff8185d5a1 | uncheck donation amount when subscription amount is selected and vise versa | class DonateActivity : AppCompatActivity()
fun selectAmount(view: View) {
var tag = view.getTag().toString().toInt()
displaySelectedDonationView.text = tag.toString()
selectDonation = tag.toString()
} | 0 |
dde1662628d2884289a430d3719ac72a | af36dd4a947ee898768579a2bceaf772 | This strategy never successfully draws a value and will always reject on
an attempt to draw. | class SampleStockfish:
def respond_draw(self):
return False | 1 |
f83e45a9351e68441cb9ccedeeb619c5 | 28fcb29758e61e1ba6f0c971abaf3058 | 获取同级的最后一行 | abstract class Kohana_ORM_Nested_Sets extends ORM{
public function get_last_child()
{
return $this->and_scope(
self::factory(self::object_name())
->where($this->right_column, '=', $this->{$this->right_column} - 1)
)->find();
} | 1 |
18a06cb038dc6ed847a36b6ab1f63eaa | 1db403b94168b69cd461f12f7d957aed | Saves the data frame to a compressed stream. | {
using (var dataStream = await data.AsStreamAsync().ConfigureAwait(false))
{
await WriteStreamCompressedAsync(file, dataStream, compressor).ConfigureAwait(false);
}
} | 1 |
9a781ebe280438de91e910d4e11e1a0c | 522a02dba158b21905369352014c7b0e | Informs the client about who's turn it currently is by sending them the mark of that player. | class Server(dispatcher):
def playerTurn(self, clientID):
for i in range(NUM_PLY):
if clientID == i:
self.sessions[i].sendServerMessage("YOUR_TURN")
else:
self.sessions[i].sendServerMessage("OPP_TURN", clientID) | 1 |
c42656cd105399be42227f55f5408240 | ea8e7f5fa247f22a47610b95bf4f2d3d | transform the 10 vector by the matrixed formed by the 0 and 6 vectors as columns | void b6tVector(matrix **b6t,matrix *xsubx0,matrix *ysuby0,matrix *zsubz0,matrix *ParP)
{
float *ptrParP = ParP->data;
float a = ptrParP[3]; float b = ptrParP[4]; float c = ptrParP[5];
float ro = ptrParP[6]; float fi = ptrParP[7]; float la = ptrParP[8];
matrix *aux0 = makeMatrix(1,xsubx0->col);
matrix *aux1 = mak... | 0 |
e1a9962e40dc12531e7f3217e9c073f4 | 0a0950305604e3895f91d8dbd2595b7e | Visszaadja a keresett oszlop stílusát | CString __stdcall EREResultSetX::GetColumnStyle( DAX::ColumnIndex_t nColumnIndex )
{
if(nColumnIndex >= 0 && nColumnIndex<m_xColumnStyles.GetSize())
{
return m_xColumnStyles.GetAt(nColumnIndex);
}
return _T("");
} | 1 |
ff06c82242697f87b724069519ff2781 | a7b76c6e2958fecaa707a3420a4b73c3 | Finds tests in the form:
it("test name").config { } | if(!left || !right)return false;
if(right === 'setup' || right === 'teardown'){
result[right].push(left);
}else{
var test = {
left: wrapEval(left),
title: (left + ' // ' + right).replace(/"/g, '\\"')
};
if(right === 'throws'){
test.type = right;
test.right = '';
}else... | 0 |
d193e9e1544dbe3c8476ac32386fd9cf | 416044ad6f4bc4e6fb550a4129c63e7c | 将mutations的方法封装一层存入_mutations中,commit调用的时候调用此封装方法wrappedMutationHandler | export default class Module
forEachMutation (fn) {
if (this._rawModule.mutations) {
forEachValue(this._rawModule.mutations, fn)
}
} | 0 |
5407324cc87839fb1520724ba096b1bc | 937269f50d081bbb54e6be49ff49d488 | Ensures that the specified backup email is, if present, a user registered
in the system. | {
if (!$constraint instanceof UniqueBackendUserEmail) {
throw new \InvalidArgumentException();
}
$root = $this->context->getRoot();
if ($root instanceof UpdateBackendUser) {
$user = $this->userRepository->find($root->getId());
if ($user->getEmail()... | 0 |
e33b552647e183cc9d621bf8f856949f | c7f2d22c8d8c3c217a10e57421e3aec6 | fill the table using information from experiment dictionary | for row in range(1, dispatch_sheet.max_row):
dispatch_sheet.cell(row=row, column=5).value = 'Project_name'
dispatch_sheet.cell(row=row, column=6).value = 'Company_name'
dispatch_sheet.cell(row=row, column=12).value = 'XSel15min'
dispatch_sheet.cell(row=row, column=14).value = 'no_salt'
NBID_value = [dispa... | 1 |
ca72c63a5fbd568b5b53ad074fdf4c2a | e556ef9920cc7c76fd59d2774121a9ce | Create the object of COM by its ProgID
If your php is compiled with x64, you need to use CryptoKit.standard.x64.dll, its ProgID is:CryptoKit.CryptoAgent.Server.Standard.x64.1
If your php is compiled with x86, you need to use CryptoKit.standard.x86.dll, its ProgID is:CryptoKit.CryptoAgent.Server.Standard.x86.1
Change ne... | static $obj = null;
if (!is_null($obj)){
return $obj;
}
$className = __CLASS__ . SERVER_AGENT;
$classFile = __API__ . '/lib/' . SERVER_AGENT . '/' . $className . '.class.php';
if (file_exists($classFile)) {
include $classFile;
$obj = new $className();
} else {
$obj = new self();
}
return $... | 0 |
09e88dce2816321caa63df5caa73a3f6 | 5b88e789f82e170742b5a8ba3be50ca3 | 去掉0x | class MainWindow(QtWidgets.QMainWindow, Ui_From):
def low_hex2(self, string_hex):
str_new = '0x'
str_new += string_hex[-2:]
return str_new | 0 |
fb7ad3cded3e67ddb2483391ba264743 | efccd9ec9757e71d6540869f4bba9e0f | <p>
Get the value of the requested fieldName field in a <code>Parcel</code> object instance.
</p> | class VersionedParcelParcel extends VersionedParcel
@Override
public CharSequence mo9331g() {
return (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(this.f3802e);
} | 0 |
5c8a67a8b9abb5b5c470a26df9ca45a9 | 37c3dadc7e84547f69c682694c1f1fd4 | 设置每个棋子的大小和位置 | {
m_logic->initChessBoard();
ui->label_Jiang->setGeometry(QRect(370, 730, 80, 60));
ui->label_Jiang->show();
ui->label_ShiB2->setGeometry(QRect(450, 730, 80, 60));
ui->label_ShiB2->show();
ui->label_ZuB3->setGeometry(QRect(370, 490, 80, 60));
ui->label_ZuB3->show();
... | 1 |
50b764cf5cf6d46b8dd34298b5cb20b6 | b3c23b48f6272107450d9bf7bebd1861 | スクリプトの作成 | public class KeyDefineCreator
: AssetPostprocessor
[MenuItem(ITEM_NAME)]
public static void Create()
{
if (!CanCreate())
{
return;
}
CreateScript();
DefineCreatorUtility.ShowCompleteDialog(FILENAME );
} | 1 |
2186671ec46c6a41e288c1660f5f6b51 | f9d21fb8dee76e303cbdcbdde9812aff | Erzeugt ein Array der gewählten Anzahl und Typ von Booten | function randomNumberOfBalls(){
amountOfBalls = random([2,5,9,16]);
var ballList = [];
for(var i = 0; i<amountOfBalls; i++){
ballList.push(addRandomBall());
}
return ballList;
} | 0 |
f30a46bb482cff6239d6f5257148c64f | 22e6d86a5999af894f324e7d803da70a | Удаление и восстановление БД начальными значениями | class DatabaseSeeder extends Seeder
public function run()
{
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
User::truncate();
PostsCategories::truncate();
Posts::truncate();
Pages::truncate();
Faq::truncate();
Settings::truncate();
Currency::truncate();
... | 1 |
eb0e8f6a8e15c389b87b6b8b519d76a2 | f2e80e136fecf6339bd6b852a644a7df | Handle the fact that this channel is shutting down normally.
If implementor methods have returned any Futures, this method must
complete those Futures.
This is guaranteed to be the last method called by the protocol, and
it's guaranteed not to be called twice. | impl Channel
fn on_channel_flow_ok_received(&self, method: protocol::channel::FlowOk, wait_handle: WaitHandle<Boolean>) -> Result<(), Error> {
wait_handle.finish(method.active);
Ok(())
} | 0 |
630f63466359287ed14567d7fd5146ee | c0d92fce1ae2a38461b87f3378b45668 | it describes what each output row is going to look like | public class PrintfSample
public static void main(String[] args) {
System.out.println("year interest balance newdeposit newbalance");
balances();
} | 1 |
96b9f25ea1f395077b2752fa8e3c63a5 | fa4c8bbf58e0f2fb774858c32879fe5f | email欄の値をstateに保存 | [GET_USER_INFO](state, emaill) {
state.account.email = emaill;
state.account = Object.assign({}, state.account);
} | 1 |
8725c8af3df278b1f0b862fca045ea7d | 9a7278b60f479ef3112ce014fa038d7f | 为Helper添加MultiStatusLayout | customLayout: View,
@IdRes vararg clickViewID: Int
) {
replaceLayoutHelper.showStatusLayout(customLayout)
if (onStatusChildClickListener == null) {
return
}
for (aClickViewID in clickViewID) {
val clickView =
customLayout.findVi... | 0 |
ad785e2532257208896e5740c11aff23 | 5d34b6b003304472e0436cf22ef56c82 | Extern function to initialize the targets for the RISCV backend | void LLVMInitializeNewTargetTarget() {
RegisterTargetMachine<NewTargetMachine> X(TheNewTarget);
} | 0 |
5d46df4500ff6135f22833d4b490ea35 | c71a61e7a4b4d565608da5145a5ff6df | Renvoie un tableau : la liste des colonnes formant la PK d'une table | lookup = {
"s" : ['bra_id_s', 'cnae_id_s'],
"r" : ['bra_id_r', 'cnae_id_r'],
"p" : ["hs_id"],
"c" : ["cfop_class"]
}
pk_cols = []
for letter in table_name:
pk_cols += lookup[letter]
print "PK_cols" , pk_cols
return pk_cols | 1 |
dafaade3b9abc59a480d05a531f3a086 | a745fa62ab5ccf4f8f074b033a461e34 | set the position of the text (relative to the button) | namespace ke
void Button::setTextPosition(int position, const sf::Vector2f& text_shift)
{
m_text_position = position;
m_text_shift = text_shift;
this->fullTextUpdate();
} | 1 |
b7bfd8ef4b96b0b66bfd8f8b0e36f76c | d61cf1e6a145427a857a14cec061db5e | 如果总页数小于最多显示的页码个数,就显示全部 | if(page_num<=5){
if(page_num>1){
render(1,page_num);
$('.page_btn_box').show();
}else{
$('.page_btn_box').hide();
}
}else{
render(1,5);
$('.page_btn_box').show();
}
} | 0 |
a5a008356f504eba031020ee2dc18957 | 7f7342f156ab716041f1017cde320d97 | Funkcja sprawdza ile linii znajduje się w pliku, nie uwzględnia linii pustych. | int lines(char *name)
{
int linie = 0;
FILE* plik;
plik = fopen(name, "r");
int w;
do
{
fscanf(plik, "%s", spis[linie].imie);
fscanf(plik, "%s", spis[linie].nazwisko);
w = fscanf(plik, "%i", &spis[linie].pensja);
linie++;
} while(w != EOF);
fclose(plik);
return linie-1;
} | 0 |
49bbbb1c5d412f260b0ffd80dc1c10fe | 3cb4ada7aca9da7ea453e15a2837fb76 | Initialize the maximum allowed coefficient of variation for
the weights in TMCMC | void MCMC::initTMCMCCv(double tmcmc_cv)
{
methodinfo_.tmcmc_cv=tmcmc_cv;
tmcmcCvInit_=true;
return;
} | 1 |
6528fec5a6eace1c92fca822cc60a3d8 | 3b4430540cb25dd0ad334cc66857e4f3 | 从cookie中获取role | export class AuthenticationService implements OnDestroy
_extractRole(token?: string): string {
return this._role = (!!token && JSON.parse(atob(token.split('.')[1])).role) || '';
} | 0 |
309899c2d3fcc06e9edb4da79857f670 | 00b0028ba23b008ae1fbcfba8c2089e3 | Gets a list of all attribute keys stored against an object. You can use this method to find out
the owner of a key for use with <see cref="GetAttribute{T}"/>. Hive allows attributes to share
key names if they are by different owners, to ensure that users can not overwrite the attributes
set against an object by anoth... | Collection<Object> getAttributeKeys(SessionKey sessionKey) throws InvalidSessionException; | 1 |
5b6936b23611368dd1a5dfec938360b8 | ea5d264a486db32d4d96d6ad29de6f19 | This subroutine shmooths the corners of the solution by averaging | {
int i,j;
for(i=0;i<SearchAgents_no;i++){
for(j=1;j<dim;j++){
if (( sample[i].positions1[j] - sample[i].positions1[j-1] )*( sample[i].positions1[j+1] - sample[i].positions1[j] )<0);
sample[i].positions1[j]=(sample[i].positions1[j-1]+sample[i].positions1[j+1])/2;
}
}
for(i=0;i<SearchAgents_no;i++){
for(j=1... | 1 |
d055e1c5f4f0990459d976edfdb075cb | 4c54a93e2934d654c69392e2e711327a | IOリストのデータソースとなるBindingListを取得します。 | {
Type sourceType = ListBindingHelper.GetListItemType(dbSet.Local);
MethodInfo method = typeof(ObservableCollectionExtensions).GetMethod(nameof(ObservableCollectionExtensions.ToBindingList));
return method.MakeGenericMethod(sourceType).Invoke(null, new[] { dbSet.Local }) as I... | 1 |
2e29378ac87242ce196399040ee2e553 | cec22ba2cbd83030ad3db60c4d4e3623 | Responsive Background Image Function | function bg_image( $image, $size, $options = array() ) {
if ( ! isset( $image ) || ! $image ) {
return false;
}
$options['size'] = ( isset( $options['size'] ) ? $options['size'] : 'cover' );
$options['repeat'] = ( isset( $options['repeat'] ) ? $options['repeat'] : 'no-repeat' );
$optio... | 1 |
afb1cc88d87f9380fa9220e0ae12e319 | 3451c928f5f2d92d0492faca5c110de8 | @brief Set source origin starting address. | void DMA_SetSrcAddr(M4_DMA_TypeDef *DMAx, uint8_t u8Ch, uint32_t u32Addr)
{
DDL_ASSERT(IS_DMA_UNIT(DMAx));
DDL_ASSERT(IS_DMA_CH(u8Ch));
WRITE_REG32(DMA_CH_REG(DMAx->SAR0, u8Ch), u32Addr);
} | 1 |
616cdb7d35f0608cad445f54af2c8cdf | bd2a25a2e3e6203c769ff4e3b75bdc9c | Removes all the recent item data for the authenticated user. | namespace Projector
public static class PersistentState
public static void ClearRecent()
{
recent.Clear();
Backup();
} | 1 |
402fe37cb91d6ca8adc6ad62a251f211 | 184bf2aff99c2f450801fcd8d24f7674 | key -> RPC identifier, value -> RPC handler | func Map() jsonrpc.FuncMap {
return jsonrpc.FuncMap{
"auth.login": login,
}
} | 1 |
f4830496369a6c10d2384bdd967e9f69 | 19c88a4b801b7a23347a24674e8ac990 | 指定したカテゴリ番号のタイトル配列を返す | {
if (titleIndex < 0 || titleIndex >= _titles.Count)
return null;
return _titles[titleIndex];
} | 0 |
230d2164acc2085ffcaae65785624457 | 3753f3da0fdf94d385f568dc6c985ff3 | 上传剪切板图片 | namespace Gourenga
public partial class MainWindow : Window
private void MyButtonFromClipboard_Click(object sender, RoutedEventArgs e)
{
AddFromClipboardImage();
} | 1 |
8dfd1eb6378220237a7d530c55d25ff8 | 0c2d372cfb1eacdc096d8b33a4638b4a | NewConn create websocket connection by spec url | conn, err := newWriteToConn(addr)
if err != nil {
return nil, err
}
return newClient(conn, 0), nil
} | 0 |
4b78ea0e2f308129111df4aabb88ce52 | 2071ebb25e01ea2a07ad739cb7535375 | Gets the complete row of the given cell. | {
var dict =
new Dictionary<Languages, string>
{
{Languages.Russian, _russianWorksheet.Cell(row, column).Value.ToString()}
};
if (_englishWorksheet != null)
dict[Languages.English] = _englishWorksheet.Cel... | 0 |
ea774ab1c75832a1bceafe192ee322e8 | 331c0e2d8aade325a3f80b43df5ab030 | Update an ACL
Update an ACL for a particular service and version. | java.util.concurrent.Future<UpdateACLResult> updateACLAsync(UpdateACLRequest updateACLRequest,
com.amazonaws.handlers.AsyncHandler<UpdateACLRequest, UpdateACLResult> asyncHandler); | 1 |
b407673094cb78ac5a08952c13eac5f3 | a1e0fe806389d1251e079374a4699a10 | TRACKING LOG
Metode ini hanya untuk demonstrasi
berfungsi untuk mencatat proses pencarian yang nantinya akan di tampilkan pada halam demo kode | class Go extends CI_Controller
function log_redirect()
{
$data = array(
'pmstamp' => date("Y-m-d H:i:s"),
'ip' => $this->input->ip_address(),
'agent' => $this->input->user_agent(),
'linq' => $this->uri->uri_string(),
'ref' => $this->agent->referrer(),
'browser' => $this-... | 1 |
e77bad4f79e4aa2da33a229d520fce63 | 843f4913be4217fbcfac89d100f529c2 | Returns the name of a partial copy-and-multiply (scale) function. | {
if(isTypeBitfield(encoded))
{
std::string longbit;
if(typeLength(encoded) > 4)
longbit = "Long";
if(isTypeFloating(source))
return "def " + typeSigName(source) + "ScaledFrom" + longbit + "Bitfield(value: int, minimum: float, invscaler: float) -> float:\n";
... | 1 |
a1e14a0693d4e7f3b146edd85fa6cb97 | 4141c4ceb2693b69296297313550a74e | Get the tolerance in seconds allowed for {@link #getMinDate()} and {@link #getMaxDate()} overshooting. | public class SpacecraftToObservedBody implements Serializable
public double getOvershootTolerance() {
return overshootTolerance;
} | 1 |
80de312120c1b67185e7e7b69687f4d0 | 9bf1098432168d72879a4946af50c0a1 | Refreshes the size of every gif on the scene | {
foreach (var current in this.m_listXUIListItem)
{
if (current != null)
{
current.RefreshSize();
}
}
} | 0 |
0f16879f9e961ada44ff732173997f34 | fffd0eeafbcb2ef62cb5f83b282819a1 | Unselects all records in all pages. | namespace Rhino.DocObjects.Tables
public sealed class ObjectTable : IEnumerable<Rhino.DocObjects.RhinoObject>
public int UnselectAll()
{
return UnselectAll(false);
} | 0 |
8a41180d292445198a60e7bc24ccd34f | 912a4694d8dda9ea8e3ab20bbe55ded4 | Gets estimated average of x coordinate of gyroscope sensed angular rate.
This value will depend of body location and orientation, hence it should never
be used as a calibration bias. | public class KnownFrameGyroscopeNonLinearLeastSquaresCalibrator implements
KnownFrameGyroscopeCalibrator<StandardDeviationFrameBodyKinematics,
KnownFrameGyroscopeNonLinearLeastSquaresCalibratorListener>,
GyroscopeNonLinearCalibrator, UnknownBiasNonLinearGyroscopeCalibrator,
Gyros... | 0 |
75a8a5ad9a673f857f8cfed80ace8766 | 007541b600706587f679f24b0d8fd73e | Sets the small image url of this video entry. | public class HeroBean implements Serializable
public void setVideoThumbnail(String videoThumbnail) {
this.videoThumbnail = videoThumbnail;
} | 1 |
297107597e114e8f93d7ac3eb97d5ef7 | f16c6125d7d6f3e7fcfbea1470be85a9 | 依通訊埠狀態取得應用程式本身的連線表 | {
$result = array();
$listActiveConnector = self::getListActiveConnector();
foreach ($listActiveConnector as $id => $value)
{
if(Status::getInstance($id, $lineId)->isStatus())
$result[$id] = $value;
}
return $result;
} | 1 |
c6ba69a8edcd3e89548181e785d24470 | 3ead70baae28b6656b5de4fa8699d6be | Apply condition to a record before normalization kicked in.
Returns:
bool: Return True if the value of the condition path matches to the condition, otherwise
return False. It is False if the path doesn't exist. | if any([
self._column is None,
self._value is None
]):
self._debug("no column or value")
return True
column_object = getattr(self._table_cls, self._column)
if self._comparison is not None:
return getattr(column_object, self._com... | 1 |
5a8b9f4b9525d8accb2e33b3a30a6a48 | 1ccab343e41605ee88ecf7a10bfb6492 | POPULATE EPS USER NAMES FOR A PARTICULAR JOB CODE FROM JOB USER DIRECTORY | public class PersistentFacade implements Serializable
public List getUserByJob(Job job) {
return null;
} | 0 |
8431b9f8994b37a3ec4b5a519a0ba6ab | db83f50c0d8fc06368f88500f08e094e | Sets up bounds and starting values | public class Player : MonoBehaviour
void Start()
{
SetUpMoveBoundaries();
} | 1 |
1be8e25b318eeb7e0b4b0fb1ff8d1821 | c90810d59f9314d4c34b70a16b4448ef | returns whether plugins with sub-SCIPs that could cause recursion have been disabled | boolean needPluginCalls(DecisionState ds, ActionContext actionContext); | 0 |
3bdf91b9a554608bfd38eab54be36b1a | f46be579c5de2e1a56cc8799937d4a94 | Test putting x number of urls on the queue to check http status | futures = []
queue = taskqueue.Queue(_TASK_QUEUE_NAME)
for start_index in range(0, len(test_paths), _MAX_TESTS_TO_PUT_AT_ONCE):
group = test_paths[start_index:start_index + _MAX_TESTS_TO_PUT_AT_ONCE]
urlsafe_keys = [utils.TestKey(t).urlsafe() for t in group]
t = taskqueue.Task(
url='/put_entit... | 0 |
d7c80acd75dfa75fcf69f376d95ff875 | ed74dd0f574c5e0e27e451446886f34e | Calls the child flow WITH output plugins. | public class UiFlow extends AbstractUiFlow{
public void startChildFlow(Thing childFlow){
UiFlow child = new UiFlow(childFlow, this);
child.initModelGraphs();
if(childFlow.getBoolean("startOnLoad")){
child.start();
}
} | 0 |
34d9900f9d3629f4de6014264f0e01bd | 4e532e12952eacaba8974a6ec72282a4 | 加载composer的autoload | {
spl_autoload_register('verb\\Loader::autoLoad', true, true);
$rootPath = self::getRootPath();
self::$composerPath = $rootPath . 'vendor' . DIRECTORY_SEPARATOR;
self::$Separator= DIRECTORY_SEPARATOR=='\\'?'/':'\\';
if (is_dir(self::$composerPath)) {
if (is_file(s... | 1 |
aac24d9a3eca0bee1930590429061f5f | 4d93731084ff1e3345fa14ab7d1ca6bf | 객체가 가지고 있는 메버필드의 값 얻기 | public Object fieldGet(Object obj) {
try {
return field.get(obj);
} catch (IllegalAccessException e) {
throw new IllegalAccessRuntimeException(e);
}
} | 1 |
4bacdad21bcaa02115ac9abe05847f91 | e253bfc54191835d61182aa4d174f089 | Тестирует свойства UsersFinder | {
$id = mt_rand(1, 10);
$user = $this->repository->find($id);
$this->assertInstanceOf(UserEntity::class, $user);
$this->assertEquals($id, $user->getId());
$this->assertTrue(property_exists($user, 'id'));
$this->assertTrue(property_exists($user, 'name'));
$this... | 1 |
fa29f86378b6df8b3a1b72c09c9aeed4 | 67083aa6d6add96278282e45133aa4a2 | Function to parse app data from TLV data buffer (first found TLV object is parsed.) | {
TLV_STATUS status = TLV_FAIL;
tlv_app_data_t * p_tlv_app_data = NULL;
p_tlv_app_data = (tlv_app_data_t *)calloc(1U, sizeof(tlv_app_data_t));
if (p_tlv_app_data != NULL)
{
p_tlv_app_data->b_container = TRUE;
p_tlv_app_data->b_has_parent = FALSE;
p_tlv_app_data->u_size.child_... | 0 |
17a9ee3984063a9f33b007ce8c59b4c9 | 73890f89708fb3e12c38c4dc4f304e85 | Change current view of application to chosen one. | public class CLI extends Client
public void switchView(int ID) {
view = ID;
if (view == 0) {
Draw.drawTable(getTable());
} else {
Draw.drawBoard(getBoards().get(view));
}
} | 1 |
44da2b4ecb3b0afb872f0bd94004b602 | b09f7599d908375dea27fd0e422065a3 | Compute an array of indices indicating which systems in a simulated physical catalog contain at least one conditioned planet. | total_planets = len(a)
planet_indices = np.arange(total_planets)
potential_planet_indices = planet_indices[potential_planets]
a_p = a[potential_planets]
e_p = e[potential_planets]
M0_p = M0[potential_planets]
I_p = I[potential_planets]
w_p = w[potential_planets]
Rp_p = Rp[potential... | 1 |
417ab753cba9133779206beb68257a70 | a2e9ef75efd4b3c90e0cf97c4d40aaf2 | 得到当前的所有已经更新的K线数据的开盘日 | Timestamp now = Timestamp.valueOf(LocalDateTime.now());
Condition timeCon = COOPEN.START_DATE.lessThan(now).and(COOPEN.END_DATE.greaterThan(now));
Condition timeCon1 = COOPEN.IS_FOREVER.eq(INTEGER_ONE);
Condition condition = COOPEN.DEL_FLAG.eq(BYTE_ZERO)
.and(timeCon.or(timeC... | 0 |
9df838ae9f53f134069d2428476c51a0 | 05a9b6e5454585fe07dd26e3d4a6e300 | Insert a node at the first position of the lru list. | node.prev = lru.head
node.next = lru.head.next
lru.head.next.prev = node
lru.head.next = node
} | 1 |
011d476810e29b7b9297066e181330ad | ac0968ae40d1d3ea40035d4f8c6b9bb5 | 汇报对象,参数1:部门ID,参数2:页面select的id | function getDirectorByDeptId2(deptId, objSelect, objUserId){
if (deptId==null || deptId+""=="") {
alert("部门不能为空");
return;
}
isLoaded = false;
$(objSelect).html('<option value="">加载中...</option>');
$.getJSON("user/ajaxDirectorByDeptIdUser.do?param.deptId="+deptId, function(data){
if (data.err && data.err!=''... | 1 |
d0ace6c9b99a40c192b3a19e8a191d29 | 548112703c527fee4155fdcd2d6093de | Find by UserId and CourseId | String userId = this.getUserId();
McLearningCourse mcLearningCourse = mcLearningCourseRepository.findByUserIdAndCourseId(userId, courseId);
return new CommonResponseResult(CommonCode.SUCCESS, mcLearningCourse);
} | 1 |
f63a73043606d2048870ab7141426ee1 | 5a0e3299870d859b5089822c25bfef1b | Get all pending friend requests from other users. | sent = Friendship.get_accepted_sent_request()
received = Friendship.get_accepted_received_requests()
return sent + received | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.