query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
6ce39e59a9abafd377569cfa4d686c7d | 047ac7186c4853c1e7b26c7ad240475b | Returns a list of stylesheet file names. | class_vars = class_dict(self)
loader = functools.partial(self.load_resource_stylesheet, subs=class_vars)
sheets = list(map(loader, self.stylesheet_names))
return sheets | 0 |
a28c3d6409db6b1527229e1f726ad289 | 548e9528c7040d68f46131f1a73c54c4 | 获取交易所实例 | class HuobiMarket
public static function getHuobiInterfaceInstance()
{
if (!self::$huobiInterfaceInstance) {
$account_id = self::getConfig('account_id');
$access_key = self::getConfig('access_key');
$secret_key = self::getConfig('secret_key');
self::$huobiInte... | 1 |
9fdec74d1aa861190cda7c672dbbed82 | df2f1f07204dd2737e3c2052f1b800db | 案例2.给定一个有序数组,在给定一个整数,请在数组中找到给定数出现的最左边的位置 | if (arr == null || arr.length == 0) {
return -1;
}
int L = 0;
int R = arr.length - 1;
int index = -1;
int mid = 0;
while (L <= R) {
mid = L + ((R - L) >> 1);
if (arr[mid] <= num) {
L = mid + 1;
in... | 1 |
8283f1e2463fc86700974dbebf5329f8 | d213f5d460292c3c86ba75afc8577c34 | Returns stage of proposal by it's id | class PlanModel extends AbstractModel
public function getStageById($stageId)
{
$dbResult = [
2 => 'Имплантация',
10 => 'Ортодонтия'];
return isset($dbResult[$stageId]) ? $dbResult[$stageId] : null;
} | 1 |
db225039ab18eae07a85daa3ba0ff574 | e7f5e5f63f05dabe7012674f6e3e414e | Generate a medium-strength random integer within the given range. | impl Rng
pub fn randint(&mut self, min: u32, max: u32) -> u32 {
(self.next().unwrap() * (max - min)) >> 15 + min
} | 1 |
e7a42ca9b438e28812dfda69998644e4 | d5c2c651b7751257ab0c8eb54996010e | Get idChart | var user = dashboard.data('user');
if (!user.chartid) {
user.chartid = dashboard.data('data').DEFAULTCHARTID;
}
return user.chartid;
} | 1 |
638e7cd3bfeb986267991afa6e1ab4a7 | 3f4f33a55752226b2e289907512716c9 | Die AutoComboBoxen für die Spieler werden befüllt und das Design wird verändert | void GameGUI::updatePlayerComboBox()
{
CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton();
CEGUI::Combobox* playerComboBox = static_cast<CEGUI::Combobox*>(winMgr.getWindow("/Server/admin/cmbPlayers"));
CEGUI::Editbox* healthTextBox = static_cast<CEGUI::Editbox*>( winMgr.get... | 1 |
08d317ce0fbc471ae88ef93ca9d4e1a6 | f9d33549bb59513f47f281197ac54f24 | Write Data to Excel by Ole DB | {
ExcelUtility.LoadExcel(excelItem);
ExcelUtility.BuildOleConnection();
try
{
ExcelUtility.OpenOleConnection();
String firstSheetName = ExcelUtility.GetFirstSheetName();
String sqlImport = string.Format("SE... | 0 |
091f1a94e9a41148e51cafcd45a3ae7e | 3857dc125d1094d77fdcaafcff723972 | Returns the value of the '<em><b>Output Dependency Connection</b></em>' containment reference list.
The list contents are of type {@link org.smartfrog.authoringtool.emf.OutputDependencyConnection}.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Output Dependency Connection</em>' containment reference list isn't... | EList getConnection(); | 1 |
6071fbfa75a971c69652656c2d30e70f | ed01226d77fb7a0f009b3e0e78651079 | Test case for community_content_get_community_live_statuses_for_friends | class CommunityContent
getCommunityLiveStatusesForClanmates( partnershipType, sort, page = 0 ){
return Promise.all( [
Ml.enumLookup( partnershipType, this.Enums.partnershipType ),
Ml.enumLookup( sort, this.Enums.communityStatusSort )
] ).then( enums => {
partnershipType = enums[ 0 ];
sort = enums[ 1 ];
... | 0 |
574a69d9c067c0a07e424698e8d230e6 | b4b61471e9fd59f2ba3a05fe6ae8df4b | 随机质心在整个数据集的边界内 | class kmeans():
# Aggregation-7,flame-2,R15,mix-24
def center_init(self):
first = random.randint(0,self.data_num-1)
self.data_center[0,:] = self.data_loc[first,:]
data_distance = []
sum = 0
for i in range(self.data_num):
data_distance.append(self.euclid_distance(self.data_loc[i,:],self.data_center[0,:]))... | 0 |
d7f91deb502022e0b3d02893e53b2fb7 | bfc90ed06faefc3a49523c8881b14358 | check if n can be divided by 2. If yes, divide n by 2 and check it repeatedly,
until it can not be divided by 2. then check if it equals 1. | if n == 2:
return 1
if n <= 1 or not n % 2:
return 0
for div in range(3, n):
if n % div == 0:
return 0
return 1 | 0 |
72c82b6a0abe65b5128b0fdb74fab43b | d427e750c875f4f17bf9af8a6fa15029 | Visits the specified method implementations. | {
if (this.stopTraversal) return;
foreach (IMethodReference methodReference in methodReferences) {
this.Visit(methodReference);
if (this.stopTraversal) break;
}
} | 1 |
1f27ec72d94b88a2c9014ae4c8810e8b | 6f198b66f4215f7fda125a3757ebd8af | Función para cambiar estilo según avatar seleccionado | if(posicionAvatarBiologia>=limiteAvatar){
posicionAvatarBiologia =0;
}
switch(posicionAvatarBiologia){
case 0:
document.getElementById('avatarBienvenidaCelula').src = "Vista/imagenes/universo/conjuntos/avatarBocaCerrada.png";
break;
case 1:
... | 1 |
0fab37c8bd930a2436b9ea4bdebe43a9 | af7217a5b73fefe5d7f3506524451c3e | Return type t such that values from both t1 and t2 can be assigned to t without an
explicit cast. If strict, does not consider conversions that would result in loss
of precision (e.g. converting decimal to float). Returns INVALID_TYPE if there is
no such type or if any of t1 and t2 is INVALID_TYPE. | PrimitiveType promote(Type t1, Type t2) throws SemanticException; | 1 |
1b5cd85a55b5a800f96114fc5de2dd5a | 211e1c95df621da4dac1f10471b08b62 | Converts a hexademical value returned by the camera registers to a floating
point number. | val = int('0x' + str(hx), 16)
if val & (1 << (16-1)):
val -= 1 << 16
return float(val) / 1000 | 1 |
26e51f6848c39d184093fdff84d9484c | ffda873ca59eea54dd65a4aad673b755 | a) L2 cost function to evaluate registration quality | x_N = len(l_x)
y_N = len(l_y)
if x_N != y_N:
return -1
else:
l_y_shift = np.concatenate((l_y[1:y_N], l_y[0]),axis=None)
x_sum = np.dot(l_x,l_y_shift, out=None)
l_x_shift = np.concatenate((l_x[1:x_N],l_x[0]),axis=None)
y_sum = np.dot(l_y,l_x_shift, out=None)
... | 0 |
0105faea409888ef1b9a8e3909ad4767 | 7fa7d7dc4b2e0fdfea032aba6a34def4 | 后序非递归遍历二叉树并线索化 | {
if (node == NULL)
return;
postThreading(node->lchild);
postThreading(node->rchild);
if (node->lchild == NULL)
{
node->ltag = TreeNode::PointerTag::Thread;
node->lchild = pre;
}
if (pre != NULL && pre->rchild == NULL)
{
pre->rtag = TreeNode::PointerTag::Thread;
pre->rchild = node;
}
pre = node;
} | 0 |
20b278f51fa3d6e4d4b7a7fcbbe3b865 | 7e21c5e66421095951b2d3809640de9d | Specify which concrete stack to instantiate. | namespace DataStructuresAlgorithms.Tests.DataStructures
public class StackArrayTests : StackTests
protected override IStack<T> GetStackImplementation<T>()
{
return new StackArray<T>(99);
} | 1 |
7198f0c460d4d16df87734f5a29655bb | 3128d4a4ef8793c50501d2b8e78ee23e | u"""模糊搜索--只输入存在的SSID名称的一个或多个字符(testlink_ID:1284_2) | class View():
def testWifiExist_result(self):
TWE = twe.TWE().go_scan()
for wifiname in TWE:
self.text.insert(tkinter.END, wifiname.ssid+"__MAC:"+wifiname.bssid+"\n") | 0 |
8f022fbd4fb8731c7d94d7d21e3bb74d | 5e8fc44aa67e4c1fb2a6d3c56133fab0 | Test case for generate_saml_assert
Generate SAML Assertion # noqa: E501 | try :
self._samlbinding = samlbinding
except Exception as e:
raise e | 0 |
cdb1be637430b360a89ef0294c81b804 | 07a6ca509dab0786c141fca1f270edcc | read data from fifo
return 0 = ok, 1 = err | char *buf, size_t count)
{
u16 data_len;
int res;
if (kfifo_len(fifo)) {
res = kfifo_out(fifo, (unsigned char *)&data_len, sizeof(u16));
ntrig_dbg(
"%s: raw message size %d, count = %d\n",
__func__, data_len, count);
if (data_len > count)
data_len = count;
res = kfifo_out(fifo, buf, data_len);... | 0 |
25940cda78d59d703367d2479e57205f | 4a2f3bc842471a59dd5728000fe218ab | Loads persistent keys from a file. WPILib will do this automatically
on a robot server. | try {
BufferedReader loader = new BufferedReader(new FileReader(filePath));
String line = loader.readLine();
int lineNumber = 1;
while (line != null) {
String[] lineData = line.split(" ");
try {
switch (lineData[... | 1 |
5e47aba6dddf0613d3ba5acf8ab421dd | 8af2cf999a793c6d9bc6abbc96f10491 | Adds the localized price value for a product variation and a specific localized currency. | int quantity, decimal price)
{
var dbItem = DBProviderManager<DBProductProvider>.Provider.InsertTierPrice(productVariantId, quantity, price);
var tierPrice = DBMapping(dbItem);
if (ProductManager.CacheEnabled)
{
NopCache.RemoveByPattern... | 0 |
997c19d91f63a7953c2c7d66c81c5cc0 | bbc702b293a7e370a3de76bd0e189e6c | Sets additional data that will be provided as a second argument to {@link \Sentry\startTransaction()}. | public function setExtras($extras); | 1 |
537a654066be8e47b1dc4420e2f457bc | 051b513cafc5027d63f11eb23ef654b9 | @brief Request from RRC to PHY to Unbind the CTF interface SAP. | RTI_PairAbortReq( void )
{
tRemoTIMsg sMsg;
sMsg.ui8SubSystem = RPC_SYS_RCAF;
sMsg.ui8CommandID = RTIS_CMD_ID_RTI_PAIR_ABORT_REQ;
sMsg.ui8Length = 0;
NPI_SendAsynchData(&sMsg);
} | 0 |
a047b15511dba87afb185d4534448380 | cb3b2eb03673cb526adca2bc699595a5 | Gets a configuration value by passing them through stdWrap first and taking a default value if stdWrap doesn't yield a result. | public class NTierConfigurator
public static String getConfiguratorSettingValue(String name, String defaultValue, int AD_Client_ID) {
String result = MSysConfig.getValue(name, defaultValue, AD_Client_ID );
return result;
} | 0 |
e99927d5977c48f3144a13ab073fb3d3 | 64d8fcfbf9be5a594cb787397d5179d6 | generate the allele matrix entry for each isolate for each replicon | class Affinity_Visualization:
def generate_image_mat(self):
mat_list = []
self.get_allele_numbering()
self.allele_numbering["Allele #"] = "Allele name"
name_list = []
for key in sorted(self.allele_numbering.keys()):
name_list.append(self.allele_numbering[key])
... | 1 |
ee7bc3b529499fd9a211f66396a36740 | cf54e4b5b2a99e90dc60668b98db2a6a | Stop all Kafka listeners | class FuseKafkaService:
def stop(self):
subprocess.call(["pkill", "-f", " ".join(self.prefix)]) | 1 |
dfaa3dcf72c6efa8c261f941c87cb6f5 | 526172f058ea188b1b1bb9de4a98120c | Sets the eye clip plane position. | public ClipPlane setPlane(float[] newValue); | 1 |
2c25acfbdb9236ad81ea1d4c1c920ee7 | 702cf147e9674c001d32d8b39d02a9da | 返回/结束行程的公共方法 | AsyncHttpClient client = new AsyncHttpClient();
String url = AppUtils.HOST + ApiUtils.API_MATCH_END_TRAVEL;
RequestParams param = new RequestParams();
param.put("token",AppUtils.getToken(getApplicationContext()));
client.post(url, param, new JsonHttpResponseHandler() {
... | 1 |
8c0ee1293d9b0b3fa9b6be4e94388fd5 | 59f3c0e54d8b6ebf581781b4b1d2e29e | Проверка выбрасывания ошибки при неправильном возрасте | def test_update_inform_about_pet_incorrect_age(name=pet_name, animal_type=pet_type, age=invalid_age):
_, auth_key = pf.get_api_key(valid_email,valid_password)
_, my_pets = pf.get_list_of_pets(auth_key, "my_pets")
if len(my_pets['pets']) > 0:
status, result = pf.update_pet_info(auth_key, my_pets['pet... | 1 |
e89995c25a18ff1da4448a13a29891b8 | 979ff17ceab03db76e57ea0f052e1ee7 | \brief Loading a bitmap resource (from file) to memory. | HBITMAP TEAM_COLOR::LoadBitmap(INT BitmapId)
{
return ::LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(BitmapId));
} | 0 |
1af62f4941e1e0f8a65b7c8a223c86f8 | a8998742899f1038632576bfb5fcf132 | Xor two input ascii string and returns resultant ascii string | orxstr=""
for i in range(0,len(str2)-1):
rst=ord(list(str1)[i])^ord(list(str2)[i])
orxstr=orxstr+ chr(rst)
return orxstr | 1 |
b0be12c9c0ee23c03696a66521cc07be | 0239a15e5831217e38de6a6f1cb7f07f | 设置发送指定字节的原始数据(发送时指定字节的数据不执行压缩、加密操作) | {
pkt.Send(out byte[] val, out int index, out int len);
Send(val, index, len);
} | 1 |
a5ceeaecd7ed32b68ec1710db395f351 | 1f678b14c5ef98b8db232b7af4ea12db | @brief Check if the debug session is enabled (a debugger is connected) | ZF_IN_OPT zfbool isEnabled )
{
return zfDebugSessionStart(_ZFP_ZFDebugGlobalSession, callback, isEnabled);
} | 0 |
5df48574c53f62aba4f431b89a0613ea | f9c3b211f0a78694260e8d6700d8a08f | handle checkbox menu item changes (dimension checkboxes) | ComboBoxItem selected_dimension = (ComboBoxItem)(dimension_ComboBox.SelectedValue);
string dimension_str = (string)(selected_dimension.Content);
switch (dimension_str) {
case "2D":
lattice_dimension = LatticeDimension._2D;
break... | 0 |
b4157ed8d127591635bbe91102cf09a0 | a7d1bff88712fbc170878d631c3add4b | Executes the query contained in this ResponseList, and
stores the Responses resulting from this query in this
ResponseList. | public abstract class OSQLQuery<T extends ORecordSchemaAware<?>> extends OQueryAbstract<T> implements OSerializableStream
public List<T> execute(final int iLimit) {
limit = iLimit;
return database.getStorage().getCommandExecutor().execute(this, iLimit);
} | 0 |
350b1bf9deeeb04b7df5f44847de376f | ba7f9c711232fda0c0f50b1fd447cd76 | Reset Password.
This function performs a `POST` to the `/api/v1/users/{userId}/lifecycle/reset_password` endpoint.
Generates a one-time token (OTT) that can be used to reset a user's password. The OTT link can be automatically emailed to the user or returned to the API caller and distributed using a custom flow.
Param... | string authorization = null)
{
PostUsersIDPasswordWithHttpInfo(userID, passwordResetBody, zapTraceSpan, authorization);
} | 1 |
dd49323e3ea931d63cd793d78a545fa6 | a9b87b25a98109d3373c0d2a3e8ebab0 | Helper to clean the KEGG attributes `MODULE` or `PATHWAY` | f = string.replace(f, "cl-lm::", "")
f = string.replace(f, "kbasr3::", "")
f = string.replace(f, "cxgp::", "")
f = string.replace(f, " ", "+")
f = string.replace(f, "-by-frequency-or-string", "")
f = string.replace(f, "-first-or-string", "")
return f | 1 |
2413f2ae11d3822505e409eebd41ee13 | d94f126849c6c45c75ffecc53ec7ecc7 | 判断人员所在部门是否是集团直属部门,用于控制许愿端显示本省 | {
if(string.IsNullOrEmpty(option.AccessToken))
option.AccessToken = AccessTokenContainer.TryGetToken(option.CorpId, option.Secret);
GetDepartmentMemberInfoResult membersinfo = MailListApi.GetDepartmentMemberInfo(option.AccessToken, 1, 1);
GetMemberResult user ... | 1 |
90bd9629d54d42462110c2e387d33979 | 940bc6870fecdb682be4fee657d75603 | Report the result of an action by providing the current scene. | {
textReport.setText("Report: ");
textReport.addLine("Ideal cost: $" + idealC + " You spent: $" + userC);
int score = calculateScore();
if (score > Game.getCurrentUser().getScenarioScore(scenario))
{
if (Settings.DEBUG)
System.out.println("Score: " + score);
if (Settings.DEBUG)
System.out.print... | 1 |
518115fd685936db0556e73467a65498 | 024364fd028c21551059b25d12144db0 | Cele mai solicitate carti. | class CartController extends Controller
public function index()
{
$mighAlsoLike = Produit::where('quantity', '>', '0')->inRandomOrder()->take(8)->get();
return view('pages.product.cart',compact('mighAlsoLike'));
} | 0 |
d777d3f9f045e5a86a2aa15f97d0cdd4 | d672bab169b31a2a0a0431d730c2c8e1 | 指定したタイルを削除(EmptyTileに変更)する | if (pos == null || tile == null) {
Debug.LogWarning("posとtileがNULLです");
return;
}
Collider2D col2d = Physics2D.OverlapPoint(pos);
if (col2d == null) {
Debug.LogWarning("col2dがNULLです");
return;
}
GameObject clone = Instantiat... | 0 |
176027839d4b88ebf05c237bda78b95c | 32f6f0a69f5eb3dee0810d803abd6e75 | 拼接进度表列表 | function getList() {
var yearList = data.yearList;
var monthList = data.monthList;
var dayList = data.dayList;
var hourList = data.hourList;
var minuteList = data.minuteList;
var listTotal = data.listTotal;
var type = data.type;
var StartYear = doListStr(y... | 0 |
90b4f95a4741e1308ecdc77c2f3a2b34 | 384883d7ddfc73254fa6e7cecedc76f7 | @brief Returns the current maximum value of a progressbar. | int CustomDialPlot::getMax() const
{
return m_nMaxValue;
} | 1 |
125804b499ce57d3257b0acb7c12eeb9 | 36713ce10c6d254664fdb77893b6962c | 获取ExamPaperTemplate数据表的全部数据 | namespace ExamBusiness
public class ExamPaperTemplateBusiness : GeneralBusinesser
public ExamPaperTemplateData GetData(EntityExamPaperTemplate exampapertemplate, PageParams pageparams, out int totalCount)
{
#region
DBConditions querybusinessparams = new DBConditions(pageparams);
... | 0 |
12c9a060b6dd6ec713e926af4797559b | 7d56a7723956a5370633cf67213941f6 | Test for a scene that implements item post processes | namespace UnitTest
TEST_CLASS(GeometryEngineTests)
TEST_METHOD(GeometryPostProcessTest)
{
executeSceneTest<CGeometryPostProcessTest>();
} | 1 |
2c7f4b99826eb130289916bdbe4b5e47 | 6aa45b063f382ff54fa52ae7d694cb3f | Remove all of the callbacks from a list. | namespace UIWidgets
[AddComponentMenu("UI/UIWidgets/ListView")]
public class ListView : ListViewBase
void RemoveCallbacks()
{
components.ForEach(RemoveCallback);
callbacksEnter.Clear();
callbacksExit.Clear();
} | 1 |
4e298e117f6873a6efa8475deb20a515 | a31be7cee88aabaf32342650dba53811 | Fold the collection from the right to the left. | public function foldr(callable $fn, $init)
{
if (count($this->arr) == 0) {
return $init;
}
$end = count($this->arr) - 1;
$out = call_user_func($fn, $this->arr[$end], $init);
for ($i = $end - 1; $i >= 0; $i--) {
$out = call_user_func($fn, $this->arr[$i]... | 1 |
b6da271017aa1a654ed66b49b0edfd24 | 4ab9136d035d06c81a3eb2bdf8a2738f | Returns the URL object relating to the lessor's listing. | class ListingImage
public function getListing()
{
return $this->listing;
} | 0 |
0e7e34fcd6d4af2901edafc170531c80 | 87631dbbcb88f5cd7acce5f46bff23ef | Get the number of rows of [Group] in database for checking if the database is empty | {
$sql = $this->db->query("SELECT COUNT(*) as c FROM permission_groups");
$row = $sql->fetch();
return $row['c'];
} | 1 |
703e95d51d4ad0ab40ce8a7583a94929 | 8a621dbec9aae0897cce8f62d53546b2 | Ensure that flipping a coin produces either heads or tails and nothing else | r = random.randint(0, 1)
if (r == 0):
await self.bot.say(embed = discord.Embed(title ="⚫ , heads!"))
outcome = "heads"
else:
await self.bot.say(embed = discord.Embed(title ='⚪ , tails!'))
outcome = "tails"
pr... | 1 |
3a759e80c6377196c6d9adf20c6df0c3 | 21279980799d5a956f4fa169d4aa2b87 | Hydrates a many association (one to many and many to many) collection and hydrates the related entities | {
$sql = $this->_getSelectManyToManyEntityCollectionSQL($assoc, $criteria);
$params = array_values($criteria);
$stmt = $this->_conn->executeQuery($sql, $params);
while ($result = $stmt->fetch(PDO::FETCH_ASSOC)) {
$coll->hydrateAdd($this->_createEntity($result));
}... | 1 |
be93543bff426e67a694baf82db08ca5 | 287b8757669802e4d179dccf9cd3b0f0 | Checks if the given point is inside the given rectangle. | public abstract class Calculator
public static final boolean pointInRectangle(final Point point, final Rectangle rectangle) {
return point.getX() >= rectangle.getX() &&
point.getY() >= rectangle.getY() &&
point.getX() <= rectangle.getWidth() + rectangle.getX() &&
point.getY() <= rectangle.getHeight() + recta... | 1 |
234c311b4b4ccbe31b4be1106e27983d | 17a58905f88a49c2645a4bf9f0291c4e | Formatea una cadena para su uso en direcciones web. | $url = strtolower($url);
$find = array('á', 'é', 'í', 'ó', 'ú', 'ñ');
$repl = array('a', 'e', 'i', 'o', 'u', 'n');
$url = str_replace ($find, $repl, $url);
$find = array(' ', '&', '\r\n', '\n', '+');
$url = str_replace ($find, '-', $url);
$find = array('/[^a-z0-9\-<>]/', '/[\-]+/', '/<[^>]*>/');
$repl = array('... | 1 |
a0ff380db2a19b13556a3f1cdf566938 | a311cdb20a2632b0afb71c1548dddb7e | 如果能够后退(多层),则navigaetBack,否则调用navigateTo | export default class UniUtil
public static navigateBack(backDelta: number = 1) {
let options: UniApp.NavigateBackOptions = {
delta: backDelta,
};
uni.navigateBack(options);
} | 0 |
15e8e63b1873c71c4f995f8e55fe1584 | 1ddff73c47deeac39da6d43277a6f69a | HTTP GET method which returns view response containing posts list. | class PostController extends Controller
public function index(Request $request)
{
if ($request->wantsJson()) {
return Post::latest()->paginate();
}
return view($this->baseViewPath . '.index');
} | 1 |
3780bad38e0d2e603f806ed837723ec1 | be26b70de8796da17d150af0de7d79f0 | Append results to the dataset and keep track of count. | public class PBDataSetProxy implements DataSet
public long append(RecordSet rset, Plan plan) {
Utilities.checkNotNullArgument(rset, "RecordSet is null");
Utilities.checkNotNullArgument(plan, "Plan is null");
PlanBuilder builder = plan.toBuilder();
switch ( builder.getLastOperatorProto().getOperatorCase() ) {
... | 1 |
90bf5941d901db67621ab60469f3eca7 | c92300a701e3cc7be248ce9382670520 | 判断是否有界面正在显示 | namespace CoffeeBean
public class CUIMuti<T> : CUIBase where T : CUIMuti<T>
public static bool HasUI()
{
return _uinsts != null && _uinsts.Count > 0;
} | 1 |
1e55213e952d8e48be9d820e9cee35b7 | ede6849a14ae191c0e46955c63e64b71 | 出力スロットにアイテムを入れれない時のテスト | Item bottledWater = new Item();
bottledWater.setName("エビアン");
warehouse.take(bottledWater);
specify(warehouse, must.be.empty());
} | 0 |
2eeb6320a969b37900835485c9677c2b | 427491433963d4347d852b58f9d71872 | When the previous is clicked, shows the previous popular movie. | public class AddFilm extends javax.swing.JFrame
private void jButtonPreviousActionPerformed(java.awt.event.ActionEvent evt) {
CardLayout layout = (CardLayout) jPanelBase.getLayout();
switch (currentCard) {
case "card2":
layout.show(jPanelBase, "card1");
jButto... | 0 |
ad37fcbe767449de3d74ebde6583f182 | 2606ff6828f9eea1c674bdd6d88e119d | Sends information about all interfaces of a device. It is up to the core to
determine what has changed. | static void
CompositeIfaceChange(tCompositeEntry *psCompDevice, uint8_t ui8Old,
uint8_t ui8New)
{
uint8_t pui8Interfaces[2];
if(psCompDevice->psDevInfo->psCallbacks->pfnDeviceHandler)
{
pui8Interfaces[0] = ui8Old;
pui8Interfaces[1] = ui8New;
psCompDevice->psDevIn... | 0 |
270780066fe6d9f919a81d368824135e | 32f3ebf6a5f6903580c5c4205145b76b | If set, prefetching will be scaled with the number of in-flight incoming receive requests
made to the client. The advantage of this is reducing the number of outgoing requests
made to SQS when incoming requests are reduced: in particular, if all incoming requests
stop no future requests to SQS will be made. The disadva... | public class QueueBufferConfig
public boolean isAdapativePrefetching() {
return adaptivePrefetching;
} | 1 |
ec6cc46b626a5f14d53cbd18172187aa | 3f83a25c317d1f347851ac18bf53b9ef | ランクを一つ増加させる | {
$objQuery =& SC_Query_Ex::getSingletonInstance();
$objQuery->begin();
$where = "$colname = ?";
if ($andwhere != '') {
$where.= " AND $andwhere";
}
$rank = $objQuery->get('rank', $table, $where, array($id));
$maxrank = $objQuery->max('rank', $tabl... | 1 |
71f437bee39937bfb3861dc091bbe8e3 | 4b2e21606fb5a7be51670db0b3f30768 | Generates a code expression that verifies if all matched fields are null. | class DictionaryFilter extends AbstractMultiChoiceFilter
protected function buildNullValueExpr(
FilterDatasourceAdapterInterface $ds,
$comparisonType,
$fieldName
) {
return $this->manyRelationBuilder->buildNullValueExpr(
$ds,
$fieldName,
$this->get... | 0 |
f4872142252d72c91f1cc3e6cddab5d4 | 700b9af812b850a9ca6bc96b957d4db7 | 获取小说封面图 | public class CrawlerDoubanUtils
public static String getBookCoverImg(Document doc) {
String bookCoverImg = "";
try {
Element element = doc.getElementById("mainpic");
Element element1 = element.getElementsByTag("a").first();
Element element2 = element1.getElementsByTag... | 1 |
a3605610ded441d8bc94e7abf7c80b6b | 3fabd17e3ed42156d57346fae09cd2ff | <p>
Returns the url for the JavaScript Source for DFP
</p> | public abstract class BasePageServlet extends HttpServlet
protected List<String> getJavaScriptSourceURLs() {
final String[] scripts = {"/lib/jquery-1.11.3.js",
"/lib/bootstrap-3.3.5-dist/js/bootstrap.js"};
return Arrays.asList(scripts);
} | 0 |
c2bfd011828b344fbbf308585aa74b03 | a567217956a7f6e38d566f14d0688d94 | 유클리드 호제법 (최대 공약수 계산) | public class M3_2981_4th
public static int euclidean(int a, int b) {
if(b == 0) return a;
int r = a % b;
return euclidean(b, r);
} | 1 |
ee103431def4195a81ff4ec42cd0f78a | 006715d7bfd0c3332f3e96a7143e9213 | Place-holder implementation of vectorize; provides a unigram representation
of the tweet example's text. | if not isinstance(text, str) or len(text) == 0:
return empty_vect
tokens = stk.tokenize(text)
vects = np.array(list(map(lambda token: np.array(lookup_dict[token]), tokens)))
return np.mean(vects, axis=0) | 1 |
9173ca45a9f767cfecba2ba519aaf3d5 | d8c3f8c5fb81258e3581ec213696a2c4 | Return a list of the first n prime numbers (not to be confused with a list of primes up to n). | def listOfPrimes(n):
try:
sieveList = listOfPrimePowers.biggestList
except AttributeError:
listOfPrimePowers.biggestList = [0, 0, 1, 1, 0, 1]
sieveList = listOfPrimePowers.biggestList
if len(sieveList)>n:
pass
else:
prevN = len(sieveList)-1
sieveList = s... | 0 |
933106ff5bb66d0add807c76293ffc6c | ab5dc1422d4ee82592db297c68a2577a | Returns the meta object for the containment reference list '{@link org.qwork.qiraa.QiraaModel#getMarjee <em>Marjee</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getQiraaModel_Marjee(); | 1 |
78cb3ce5ef62bad22d94417b975a49ce | 15642f8538da069efd629720b7982fb8 | ! \fn void timer1_Tick(object sender, EventArgs e)
\brief A timer function.
\details It is used to set advertisement transition
\param sender an object.
\param e an EventArgs.
\return void | {
static uint8_t count = 0;
count ++;
if((count % 128) == 0)
{
seconds = seconds + 1;
if(seconds == 60)
{
sum = sum + 1;
seconds = 0;
}
}
if(state == 3)
{
... | 0 |
74d819f0f93e7bed21bba51e5494304f | c2a4d6500e4fe2d8721154228dd619b1 | Support triple quote strings. Doesn't deal with escaped quotes. | $str = '';
$closeQuote = $c;
$this->updateTokenPos();
$startPos = $this->getTokenPos();
$this->inMultiLineString = false;
if ($this->nextChar(2) == "''") {
$this->next(2);
$this->inMultiLineString = true;
if ($this->nextChar() !== "\n")... | 1 |
2184f292804e5486d6bd6a2721336cfb | 3fc7ceb7433e7dc7eadb84ebd00a866e | Método que borra de la memoria los MB innecesarios al cargar el listado | public class MbLogin implements Serializable{
@PostConstruct
public void init(){
listMbActivos = new ArrayList();
} | 0 |
fc6bc298d34505ff6b2a52971f0a2e19 | be17d39b3c5a7daeddc0e696f1bc1426 | Read word from configuration space (PCI only) | uint32_t readPCIConfigWord(uint8_t bus, uint8_t slot, uint8_t func,
uint8_t offset) {
uint32_t address;
uint32_t lbus = (uint32_t) bus;
uint32_t lslot = (uint32_t) slot;
uint32_t lfunc = (uint32_t) func;
uint32_t tmp = 0;
address = (uint32_t)(
(lbus << 16) | (lslot << 11) | (lfunc << 8) | (offset & 0xfc)
... | 1 |
734f1321ae41d257d65f4253764d0317 | fb1f5f6cb4200089110716b869deee0d | 更新对应obj的发送状态 | namespace LeaRun.Application.Busines.MessageManage
public class IMContentBLL
public void UpDateSatus(string userId, string sendId,string status)
{
server.Update(userId, sendId, status);
} | 1 |
fd209d121c199d09cbd5ab1d92073c18 | 0bb3a118ef577d18198667327d518f8d | Find and draw epipolar lines | def compute_epipoles(F):
e1 = None
e2 = None
pass
return e1, e2 | 0 |
399e4f80d0d7f9320f9b32266d65dc18 | 22938f7b284b34f3bf6bf96fc322028c | Check singularity was defined.
This routine checks if user provided a singularity location.
Default behavior is to use the upper limit of integration
as the singularity location. | def singularity26(function):
def wrapper(*args, **kwargs):
hpccm.config.g_ctype = container_type.SINGULARITY
hpccm.config.g_singularity_version = StrictVersion('2.6')
return function(*args, **kwargs) | 0 |
696ea4269929d69b104790094f4ca20a | b43a42fd8c72bd6d59ca5760e3ecee7f | 在搜索框输入酒店id直接定位到一个具体的酒店,跳转到修改酒店信息界面 | @Controller
@RequestMapping(value = "admin")
public class AdminController
@RequestMapping(value = "hoteledit", method = RequestMethod.GET)
public String hotelEdit(Integer hid, Model model) {
Hotel hotel = hotelDao.selectByPrimaryKey(hid);
List<City> cities=cityDao.selectAllCity();
model.addAttribute("cities", ci... | 1 |
903dae4e57799bb5f4fd318fb5d1058d | c5e0d5efe407ef260c8a8b361d8679e0 | Diese Funktion speichert die Bildkoordinate der Cursors beim Drücken der Maustaste. | document.getElementById("imgMap").style.cursor = "default";
isLastPointerPositioned = 1;
var positionX = e.clientX;
var positionY = e.clientY;
var imgMap = document.getElementById("imgMap");
positionX -= imgMap.offsetLeft;
positionY -=imgMap.offsetTop;
var arrayCoord = document.getElementById("inputHiddenInfoCo... | 1 |
a7f40559a8fe4f26e9dea56a78771f59 | ff7d245081ad259a5b3391e5feefd0b8 | Build the youtube-dl command line string. | def build_command(
options_list: "list[str]", url: str, cli_backend: str = YOUTUBEDL_BIN
) -> str:
def escape(option: str) -> str:
special_symbols: "list[str]" = [" ", "(", ")"]
for symbol in special_symbols:
if symbol in option:
return f'"{option}"'
return op... | 1 |
67d3f430946137271054cf0cc715bd54 | dd0b4a37166dc188059e0405c23f56c6 | Získa hodnotu schválania komentára. | class ModuleComment_EntityComment extends Entity
public function getRating()
{
return number_format(round($this->_getDataOne('comment_rating'), 2), 0, '.', '');
} | 0 |
320492af5d4c1c5e1c285e288291e9ce | 767ad466b76714266ff8028dddd9b7a7 | checks if there is a parameter witch is not a function with the name "name" in all the scope we start checking from the current scope | void check_for_param_redeclarations(struct decl *d) {
if (d == NULL) return;
struct symbol *sym = scope_lookup_current(d->name);
if (sym != NULL && sym->kind == SYMBOL_PARAM) {
error_name_resolution("Local variable cannot redeclare parameter name", d->name);
}
check_for_param_redeclarations(d->next);
} | 0 |
e68c797df1f73bccb524e2c521b60095 | 791884777dacb02c708e8d95fc3333f8 | Sets the radius of the wander circle. | void setRadius(int x); | 1 |
d7e49544c27f62474620bdc62fe2db7d | 4fc84c427f041903bf577a0e9eca3110 | 点击弹出用户详情 | function infoClick(param) {
var user = $('.user_div');
if (!param && user.css('display') === 'none') {
user.fadeIn(200);
} else {
user.fadeOut(200);
}
} | 1 |
3a12496ff483a9f5dcbedb832ebb76a1 | 7b658d35b1218f52b4dc7de0c86fc26a | elimino messaggio piu' vecchio (primo inserito rispetto agli altri) solo se coda NON e' vuota | Model &cola::outputFunction( const InternalMessage &msg )
{
if( (elements.size() > 0) && ocupado==0 )
{ this->sendOutput( msg.time(), out, elements.front() ) ;
elements.pop_front() ;
}
return *this ;
} | 1 |
b9795860d14980fccc6eba53d9a72c6a | aec4b2c8e117d07298eb502206f4edff | decode方法可以解析十六进制,八进制,二进制,有小数会报错 | public void decode_case_test() {
byte[] res = HexUtil.decodeHex("0A1000FF");
byte[] res2 = HexUtil.decodeHex("0a1000ff");
final int l = res.length;
assertEquals(l, res2.length);
for (int i = 0; i < l; i++) {
assertEquals(res2[i], res[i]);
}
} | 0 |
154ee3d82e758a8fe7c83d916a649327 | 6140ccb50c634af715b0ba8150f7c253 | 迭代读入一个目录中的所有图片,但是不会递归读取。 | class MovieImageArrayFile:
def _read_from_dir(self):
image_paths = []
for one_image_path in self.dir_path.glob("*.png"):
image_paths.append(one_image_path)
self.image_paths = image_paths | 1 |
0d1fb816af53f252f145670a632a7687 | 01a76ddd7414f9a233129509af904b8c | 年齢の数(食べる豆の数)を記録する処理。家族全員の年齢を入力するまで、ループする。 | {
SqlConnection conn = new SqlConnection(connectionString);
if (!Sqlconnection(conn))
{
return -1;
}
string code_年齢 = cmb_記録分類.Text;
string code_園児 = this.gridView_保育経過記録一覧.CurrentRow.Cells["園児"].Value.ToString().Split(' ')[... | 0 |
771ba57c69ef79f9d68f39a3e5e14fea | b6689c2a53fb00ae543a0ccb57b1d10a | 인접한 타일을 검사하여 g,h,f값 계산, 부모 지정, 열린노드지정 처리 | if (mapMaze[x * TiledMapUI._height + y].s_style == 0) {
if (!mapMaze[x * TiledMapUI._height + y].s_is_in_closetable) {
if (mapMaze[x * TiledMapUI._height + y].s_is_in_opentable) {
if (mapMaze[x * TiledMapUI._height + y].s_g > curr_node.s_g + w) {
... | 1 |
440f28667309be27db9a1120d50fdf55 | c356a165642795fe5d6f59f9013fbad1 | 旋转因子的计算 | public class HarborTile extends Tile
public double calculateRotateFactor() {
TileEdge harbor = getHarborSide();
int factor = rotateHarbor2Land(harbor, harborPlace);
setRotateFactor(factor);
return factor;
} | 1 |
73ac0a8f22011f1c1909824967f8d17d | d833fe8fc5b22d87f03fde18030c0910 | Gets the value of the fileId property.
possible object is
{@link String } | public class TbReviewFileRelationEntity
public String getFileId() {
return fileId;
} | 1 |
d4cc65949c43ce4a7a4482a4dff000f5 | 8e8df1d71280fe97c8b00ac5409000e0 | Retrieve the delegates property | public class CompoundSnapToHelper
extends SnapToHelper
protected SnapToHelper[] getDelegates() {
return delegates;
} | 1 |
b4ed236fc25fdb25fd6268b8280356e4 | 7f61448ad6da3ef0f9cb03f40c5be655 | telnet:// | cases like (1) | 0 |
e0b3505fc24d6fd14c8cd3476fd058ef | 1328480c08bca429f83add1255c118b3 | Computes the eigen values and eigen vectors of the covariance matrix | def feature_eigenvalues(covM):
ret = np.linalg.eigvals(covM).flatten()
names = ['eigenval_' + str(i) for i in range(covM.shape[0])]
return ret, names | 0 |
d8f224104f892e2d2f523edf91ce7915 | b9621bdf284ef5d38da7edd793c7a312 | 功能描述:保存给定的项目实体对象,并返回保存后的实体对象<br>
如果project为null,则不保存,并且返回null | Result save(Project project); | 1 |
6dc10479a8c39d1d98637939dd25ac81 | a07775f50e34e0bc4ee2416f345708ab | Получает идентификатор пакета персонажей | {
$value = $this->get(self::PACK_ID);
return $value === null ? (integer)$value : $value;
} | 1 |
4d96ddfb31f2cf4679336e2b3fd16062 | 94f9786881fb6576e4e211f95c480ba3 | 세팅 데이터를 실제 반영시키고, 세팅데이터를 정말로, SaveLoadManager를 통해 저장합니다. | public class GameManager : MonoBehaviour
private void setGame(Save save)
{
foreach (GameObject target in targetGameObjects)
{
target.GetComponent<TargetManager>().UpdateMonster();
}
for (int i = 0; i < save.livingTargetPosition.Count; i++)
{
int positi... | 0 |
1c9dac4549ed759b0f6a61cdb7ef269a | 5eb59b32a6054d3d978bb3165c70843b | Get sorted columns on client-side already on the same order as the client requested.
The method checks if the column is bound and if it's ordered on client-side. | get sortOnServer(): boolean {
return this._sortOnServer;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.