query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
72c8edc8cdc3c1f1893fd31065989836 | 5eaad01ab3ec4d66237f84f031df222e | 对fund table 的数据进行备份 | f = request.FILES.get('file')
df = pd.read_excel(f)
df = df.fillna('')
queryset = fundBasicInfo.objects.order_by("-index").values()[0]
index = queryset.get('index')
for i in range(len(df)):
data = df.iloc[i]
if type(data['投委会通过日期']) != datetime and type(data['投委会通过日期']) != pd.Tim... | 0 |
a586aadce1de4eaf3f822f46ae393341 | 647f511a99ec58675bf452320dfeb83f | Vector value negation operator (return Vector using new values) | TEmitter Neg() => Emit(OpCodes.Neg); | 0 |
56a0c925333fcc1028390de0c8183aad | f719fe3a1259203dba187c35168fb9e0 | Ensure we read a function properly along with the function data. | self.perform_function_detection(
['asm(',
' "stmdb sp!, {r1-r3}" "\n"',
');'],
{'name': 'asm',
'modifiers_and_return_type': '',
'function_name_start_position': (0, 0),
'parameter_start_position': (0, 3),
'para... | 1 |
abda0015c2647c436761b32a152077f5 | 60889625f7f77fc1c7bdf94a63cca6b2 | resetting the input fields to blank | function reset(){
document.getElementById("name").value ='';
document.getElementById("banknum").value ='';
} | 1 |
300ba36b071f7e285992c1c42f7ac45b | cb19adb8ef0292e4f89aceae25ec1d74 | The absolute path to the assembly folder, that is used to hold the temp files until they get archived | namespace Hypnocube
public static class FileTools
public static string AssemblyPath()
{
return System.Reflection.Assembly.GetExecutingAssembly().Location;
} | 0 |
a745b64031575165b76302c777365624 | 86bed430693892cfca1ab6fa0701d253 | handles the full `node_modules` being symlinked (this is uncommon, but sometimes
be useful for test harnesses to avoid multiple `npm install` invocations) | if (!importer.specifiers) return
importer.dependencies = importer.dependencies ?? {}
importer.devDependencies = importer.devDependencies ?? {}
importer.optionalDependencies = importer.optionalDependencies ?? {}
for (const { alias, pref } of wantedDeps) {
if (alias && importer.specifiers[alias] !== pref) {... | 0 |
de69d71caf631f445ad24a30a10b42d3 | f2464e6c901933c8510b7ef3644be912 | Fetches followers for a user | {
$id = $this->getEntityId($user);
$response = $this->send('GET', 'users/'.$id.'/followers', ['query' => $this->paginaton_query]);
$user_arr = $response->json();
$users = [];
foreach ($user_arr as $var) {
$user = new User();
$user->arrayToEntity($var);... | 1 |
b46fd5615e3f5543c4888ced49e7bc31 | 832054e8a707cf3694539b05481b4254 | Ensures the text field on the user control is highlighted for the sake of the barcode reader | namespace Central_Control.AD
public partial class Connect : Page
private void AD_UsernameTextBox_GotFocus(object sender, RoutedEventArgs e)
{
AD_UsernameTextBox.SelectAll();
AD_UsernameTextBox.Style = FindResource("TextBox") as Style;
} | 0 |
73a52a5f08aaca65a33f78731c06d2ea | 77a776b618dd25851f4335511e3357a7 | This method was generated by MyBatis Generator.
This method returns the value of the database column shopping_cart_item_his.RELA_TYPE | public class OrdOfferResInstRelDO extends BaseDO{
public java.lang.String getRelType() {
return this.relType;
} | 0 |
672f51b2eb3a6b6a23a895e9a9a50dc1 | 86f38ec78b0bfcd123c457c4a329290c | POST - 取得公告列表 | {
try
{
new PortalBase();
string weburl = SPContext.Current.Web.Url;
List<object> AnnouncementList = new List<object>();
SPSecurity.RunWithElevatedPrivileges(() =>
{
using (SPSite spSite =... | 1 |
7c9b69df66d6fc8f0314220b9d476275 | cf301a347f76e28868a752989454870c | Compute minimal distance between target and line under the constraint, that it has
to lay between the points building the line and not on the extension of it. | public class PointToLineSource extends ProbEqkSource implements
java.io.Serializable
public double getMinDistance(Site site) {
return LocationUtils.horzDistance(site.getLocation(), location)
- maxLength / 2;
} | 0 |
ca616b5dabff4e5634a4d69917e81571 | ee25c4b3ad816c08c62a4bb3352a664d | We generate a new temp based on the furnace/fan and outside_factors | int generateTemp()
{
int newTemp = old_temp;
if (furnace_running == 1)
newTemp = old_temp + 1;
else if (fan_running == 1)
newTemp = old_temp - 1;
int tempTemp = outsideFactors(newTemp);
old_temp = tempTemp;
return tempTemp;
} | 1 |
85d5df538fb81cbe66ecb2cff216a021 | 4597b6baee9a0328c54a01087602f788 | Set the value related to the column: allow_op_advance | @SuppressWarnings("serial")
public class Preferences implements Serializable
public void setOpIp(boolean charge) {
opIp = charge;
} | 0 |
caeb4fc68f84a477cafdeafc63702343 | 94f8014128bb870e6658e3943fe83ad5 | Create a design by attaching all underlying patches to axes. | class LeParcDesign(metaclass=ABCMeta):
def plot_and_save_design(self):
self.format_canvas()
self.create_design()
self.format_plt()
plt.tight_layout()
plt.savefig(
"img/{}/replication_of_original.png".format(self.save_to_dir),
format="png",
bbox... | 0 |
8ab366622de5722e71c0a17830a14f71 | eb18993dd2eaf3b1cb324f615283e6ab | Funcion para saber si hay atributos repetidos | {
if (dicAtributos.ContainsKey(strNombreTabla))
{
foreach (Atributo a in dicAtributos[strNombreTabla])
{
if (a.Key == 1)
{
return false;
}
}
... | 0 |
a5ad9b9de05a66a3eb0dfb7af5a1f86a | 2880f9d87d44b2dbfb30a08e47d3078c | gets the id associated with the different log date/time formats (https://golang.org/src/log/log.go?s=2383:2675#L27) | switch strings.ToLower(mode) {
case "production":
return ModeProd
case "development":
return ModeDev
default:
panic(fmt.Sprintf("unknown log mode: %s", mode))
}
} | 0 |
c693d02a9d47e62dc16311ac05885f33 | 5b54a1b500f7b9a4009215d4d0920561 | Font Selection for internal CGROM
When FNCR0 B7 = 0 and B5 = 0, Internal CGROM supports the
8x16 character sets with the standard coding of ISO/IEC 8859-1~4,
which supports English and most of European country languages.
00b : ISO/IEC 8859-1.
01b : ISO/IEC 8859-2.
10b : ISO/IEC 8859-3.
11b : ISO/IEC 8859-4. | int PMS_CGIFfont( FSP PFONTCONTEXT fc )
{
return CGIFfont(FSA fc);
} | 0 |
06e6cd9958277d001723bbfab56300e6 | fd65b831b6f2c69efe237a54acbc8c24 | 記錄使用者訊息 | $log = PHP_EOL;
$log .= "[displayName] => {$this->user['displayName']}".PHP_EOL;
$log .= "[userId] => {$this->user['userId']}".PHP_EOL;
$log .= "[pictureUrl] => {$this->user['pictureUrl']}".PHP_EOL;
$log .= "[statusMessage] => {$this->user['statusMessage']}".PHP_EOL;
$log .= "[message] => {$this->receive[0]... | 1 |
00686566db9aba02820ef2f1f4f7b817 | 2e911036b35edff2306037b6797f04b3 | 取得Gを計算して返す | namespace Win32API
public class GDI
public static byte GetGValue(int color)
{
return (byte)(((short)color) >> 8);
} | 1 |
19f208fcf8aa267ec9f4a4faf667473a | b1bdbe20fd599bdbe731242a8a9c905b | Proxy must throw an exception if the state does not exist in switch state method. | {
try {
$this->proxy->registerState('', $this->state1);
} catch (Exception\IllegalName $e) {
return;
} catch (\Exception $e) {
$this->fail($e->getMessage());
}
$this->fail('Error, the proxy must throw an Exception\IllegalName exception when... | 0 |
62d70c9b552b7df2e42cda818efaded5 | ac4ff36d574ee9617b009171a67af2c9 | Muda as coordenadas para serem compatíveis com a resolução da imagem de saída | {
_x = _y = 0;
_w_sz = width()/_Col;
_h_sz = height()/_Rows;
pos_x_atua_p1 = (float) _p1->getX()/width();
pos_y_atua_p1 = (float) _p1->getY()/height();
pos_x_atua_p2 = (float) _p2->getX()/width();
pos_y_atua_p2 = (float) _p2->getY()/height();
} | 1 |
0ee73392cb928ee8a1960d145e39e5c4 | d980b7dd85bd88155862f8bc119c55b4 | user_profile表列名转前端列名 | {
string result = name;
if (name == "id")
{
result = "sourceid";
}
if (name == "name")
{
result = "username";
}
if (name == "phone")
{
result = "mobile";
... | 1 |
bb2891523e023edebd4347ff866fdde7 | 28d8f9a0fe50df79e274260d4e2054d2 | Set the enable pin. High level to turn it ON, and a Low level
to turn it off | void USRangeSensor::setEnabled(boolean enabled) {
digitalWrite(_enable_pin, enabled ? HIGH : LOW);
} | 1 |
99615ffd3739b1e34b1118b28a4047ad | 2f3d3e59f6102398f356270b33fea380 | Nothing to parse. See makeParamString above. | void KHalfEdgeObjParser::onGroup(char *group)
{
(void)group;
} | 1 |
be58ea64a637c403254e22a63c7c7dd6 | 55700ca5691682efab32060d796ff6e2 | Converts a given note value in the range [0, 127] to a string | def to_string(note):
return PIANO_NOTES[note % 12] + str(note // 12 + 4) | 1 |
457f1e9dc5d45eebb0643f29eaef4933 | cd84b237c9674567d68489cb19c64ee5 | Borrow on record from the second index node to the first index node. The
second node is the next node of the first node. | int parentIdx = getParentEntry(next);
IndexEntry downerKey = parent.getEntries().get(parentIdx);
entries.add(downerKey);
parent.getEntries().remove(parentIdx);
parent.getEntries().add(parentIdx, next.getEntries().get(0));
next.getEntries().remove(0);
BPNode borrow... | 1 |
f0ce2651931f90e601caba576b26c362 | 568f2c1facb09b60863580f31a415b6b | 获取该坐标相邻的六个点坐标 | var x = curPoint.x,
y = curPoint.y;
return [{
x: x - 1,
y: y - 1
}, {
x: x,
y: y - 1
}, {
x: x + 1,
y: y - 1
}, {
x: x + 1,
y: y
}, {
x: x + 1,
y: y + 1
}, {
x: x,
y: y + 1
}, {
x: x - 1,
y: y + 1
}, {
x: x - 1,
y: y
}]
} | 0 |
9b25a928292c99c1d05774e89e2fb86b | 5a6146bfea7913cb5c566b9a9316922c | 填充函数
处理后应满足bits≡448(mod512),字节就是bytes≡56(mode64)
填充方式为先加一个1,其它位补零
最后加上64位的原来长度 | def sha512(m):
def padding(m):
def bitListToList(lst):
lst2 = [0]*((8-len(lst)%8)%8)+lst
return [reduce(lambda x,y:(x<<1)+y,lst2[i*8:i*8+8])
for i in range(len(lst2)//8)]
def intToBitList(number):
return list(map(int,list(bin(number)[2:])))
... | 1 |
ddb73d9fd642884d770cdfbe1c4d8188 | edb5a0401cf60143ab81546f8d6d7483 | Perform K-Fold Cross validation for Ridge regression.
For a given design matrix X and an outputs z,
This function performs k-fold Cross Validation
and calculates the RIDGE fit for a given Lambda for each k.
The output is the estimate (average over k performs) for the mean square error. | def crossval(y, X, lambda_vals = np.exp(np.linspace(-2,6,100)), k = 10):
tests, trains = folds(X, k)
errors = [[] for i in range(k)]
i = 0
for test, train in zip(tests, trains):
betas = ridgeHelper(y[train], X[train, ], lambda_vals)
for row in betas:
yhat = X[test,] @ row.res... | 1 |
3117928de53055c4108ccb6705a4fe4e | 718f033f82c45773b972f63dd5ecc365 | This method adds all Player Handbook information to the master Libraries | class FileLibrary(FileRep):
def doImport(self,textFile):
self.loadText(textFile)
self.getBooks()
self.genLibData()
self.genLibCells()
self.sortRecords() | 0 |
4956b80e8aedac239aeb84bc6c54b8cb | 64e5a25459171593f00b6cf4313ade47 | 将字符串转换为short,如失败则返回null | {
if(str == null)
{
return defaults;
}
try
{
return Short.parseShort(str);
}
catch(Exception e)
{
return defaults;
}
} | 0 |
63c434bd34633d15b10966032afa5b5e | 45b90e4c79449956b495f05d35c1a499 | attention - show an important message with no frills. | {
Show(
text: message,
caption: ErrorMessage.TitleAttention,
buttons: MessageBoxButtons.OK,
icon: MessageBoxIcon.Exclamation);
} | 1 |
61630c4c7145ff9539a2596fea2fd44e | 65aebf61b3452f6071035990a0254595 | 设置加载完毕 | function setLoadead(){
return {
type: SET_LOADED
}
} | 1 |
1185350be5ca2aa60663872feb1d1c52 | 38276fef2f3e122fefb80498cd57382e | Validates if we can restore state from snapshot. | try:
self.restore_snapshot(
"fake_%s" % uuidutils.generate_uuid(dashed=False), "")
except netapp_api.NaApiError as e:
no_license = 'is not licensed'
LOG.debug('Fake restore_snapshot request failed: %s', e)
return not (e.code == netapp_api.E... | 1 |
73cbe11362eb985ac10f9ab44c0fbf9d | 9681681d8da2876a7d03a21778ec0c0f | 获取子控制器 | {
$ctrl = new Controller();
return $ctrl->getController($uses[0], $uses[1], $this->params, $folder);
} | 1 |
fa106f14b089cbc803ca0b60495c8932 | efd10abfafcb2b57415e158d0d47fbcd | Handles the RowCommand event of the control. | public partial class LeadSearchForDuplicates : EntityBoundSmartPartInfoProvider
protected void grdMatches_OnRowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.Equals("Open"))
{
int rowIndex = Convert.ToInt32(e.CommandArgument);
string Id = grdMatches.Da... | 1 |
89695cdfa9f93bcfda66b66a9dfa217a | c915fee10253f74b9074d5094681554d | Sets the xField field. | def JNI_SetXField(_JNIEnv, _jobject, _jfieldID, X):
_jobject.fields.set(unicode(_jfieldID.name), X, descriptor(_jfieldID.sig)) | 1 |
ff0720376fe4fe76e794ed9637cb914d | 0df38e589d7b9fedc43c9b83285201da | Sets the number of Adjacent Mines | public class Square{
public void setAdjacentMines(int num){
adjacentMines = num;
} | 1 |
11cfbbffeb325974b26a190a18891de6 | e71274c409c194caa1937a503c4d058a | consulta los tipos de servicios disponibles | {
List<cargaTipoServicio> cargaTiposServicios = new List<cargaTipoServicio>();
using (SqlConnection conn = Conexion.Conectar())
{
SqlCommand comando = new SqlCommand(string.Format("SELECT * FROM TIPO_SERVICIO"), conn);
SqlDataReader reader = co... | 1 |
7c099ec1e9e9d93b099dee60f3dcb1d0 | 5fce00f192753310465095053f87355c | 获取论文数量前5的作者 | public JSONObject getTopRankAuthor(int limit); | 1 |
df07b5ea571129de12ec3a5293160619 | f03e09609dc92c2b009daadca45a4560 | Hoists Dealloc instructions right after their last use. | namespace
void unpoisonDynamicAllocas() {
for (Instruction *Ret : RetVec)
unpoisonDynamicAllocasBeforeInst(Ret, DynamicAllocaLayout);
for (Instruction *StackRestoreInst : StackRestoreVec)
unpoisonDynamicAllocasBeforeInst(StackRestoreInst,
StackRestoreInst->getO... | 0 |
336aa496a9044fa3e2efd060d6ad08a5 | 86281a995c14f520c175265618be73d6 | 上传视频到本地服务器目录 | try {
$uploader = new AliyunVodUploader($accessKeyId, $accessKeySecret);
$uploadVideoRequest = new UploadVideoRequest($filePath, $videoName);
$res = $uploader->uploadLocalVideo($uploadVideoRequest);
return $res;
} catch (Exception $e) {
printf(... | 0 |
75c1b855ded7a06423a0d3b6447a90ad | 3872b1a87bffc3ad6b40dc05d7dd0bd7 | Parses the input and initializes a class member to hold a "map" of the tree positions. A value of True in the
map indicates that a tree is at that position. | class Toontown_Map:
def __init__(self):
self.vertices = {}
self.num_vertices = 0
self.__initialize_map() | 0 |
d93d48e4e4c6dd007f3ad6e5d75f6e39 | b786b6046e447b2346962bf2011f5efa | @brief Judge if the Message Queue is empty | {
BaseType_t xReturn;
configASSERT( pxQueue );
if( ( ( Queue_t * ) pxQueue )->uxMessagesWaiting == 0 )
{
xReturn = pdTRUE;
}
else
{
xReturn = pdFALSE;
}
return xReturn;
} | 1 |
d5b65207100bae3a3989a497b429a5ba | f036a461095dc56e927eda434fdfe42c | get image/file method (hex to binary) | {
var file = document.getElementById("file").files[0];
var reader = new FileReader();
reader.readAsBinaryString(file);
reader.onload = function(f)
{
var result=document.getElementById("result");
result.innerHTML=this.result;
}
} | 0 |
47c550fee4a0c30ee8cbb0679615a60c | 7d27e6bb2f5f3a30e6418c959c6dda65 | Remove any lines containing only whitespace from the test results. | class RenderingTestParser
private function cleanSections($sections) {
foreach ($sections as $sectionName => $sectionLines) {
if (array_values($sectionLines) === $sectionLines) {
$sections[$sectionName] = trim(implode('', $sectionLines));
}
}
return $sectio... | 0 |
5f82215bd6436a87c467a0925ef99fef | e945e4a003e20da635aa680ff5f91852 | Set <needMoney> value | class GoodCheck extends \DrSlump\Protobuf\Message
public function getNeedMoneyType(){
return $this->_get(5);
} | 0 |
4410cd04ae7c55add4a9f051898dd818 | 00c2187a7343b512b931a3265da63fe4 | Dumps out debugging info for the given active list
@param al the active list to dump | class AdvancedTools(ToolsBase):
async def do_print_aldb(self, *args, **kwargs):
await self._print_aldb(*args) | 0 |
448ee3a7c6c126916c9d225b1add7d02 | 76c6d20fa199600de62b898e994c94f7 | 転リース元契約情報_物件名称 を取得する | public class Enq220Form extends Enq210Form
public String getEnq220SyuruiName() {
return enq220SyuruiName__;
} | 0 |
78b2a09a3621007f65b530631fc8ca73 | 215071d1c43be32b61816b890c00db7b | funkcia vypocita tangens uhlu pomocou tayleroveho radu | double result = tan(args[0]->ev.floval);
*returntype = TYPE_FLO;
returnval->floval = result;
} | 0 |
fd0566c4fd4af3df7c852f1d8baa9d4d | 21efe7d938754bffe294a3bf6426d76e | Funcao que calcula o MSE a partir dos dados reais e preditos. | def mse(x, y, wT):
pred = []
for i in range(0, len(x)):
y_pred = model(x[i, 0], x[i, 1])
y_real = y[0, i]
pred.append((y_pred - y_real)**2)
return sum(pred) // len(x) | 1 |
563f38d954e61b4757a528976e67de12 | af7b78c6804af6eb2f73121348b6170b | Represents ah HBase table and operation that can be performed on an HBase table. | self.table_name = table_name
self.connection = connection
self.last_number_of_rows = None
self.first_row = {} | 0 |
fa5c1fb20cd3fa76e1d6d9ecf4b733e5 | 195397aaa443ff083693a07df9d2127f | 阻止弹窗穿透方法 | function _noscroll(e) {
!$(e.target).closest('.popup-overlay, .popup').length && e.preventDefault();
} | 1 |
dccb762d3360a09a69877bf50a6b3011 | 73831033a2f2ef039645cb4018f742ce | Set the tag name the node is associated with | class element extends Node
public function setTagName($tagName)
{
$this->tagName = $tagName;
} | 1 |
b91073915aec0fb1be84b2db667f0b29 | 2036df0b9c67538ce81d862717d50b54 | Clone the dictionary, and extend size of the dictionary by a given length | ibis::dictionary::dictionary(const ibis::dictionary& old)
: raw_(old.raw_.size()), buffer_(1) {
if (old.key_.empty()) {
buffer_.clear();
return;
}
const uint32_t nraw = old.raw_.size();
size_t sz = 0;
for (size_t i = 0; i < nraw; ++ i) {
if (old.raw_[i] != 0) {
... | 0 |
6c8c418d55d2e71deb25bc89221de113 | f55c05236b0d6c8a7b50a34cebce66ba | Gets the name for the cookie based on the user ID. | class RapidCampaign_Promotions_Block_Widget_Promotion extends Mage_Core_Block_Template implements Mage_Widget_Block_Interface
protected function getCookieName($promotionUniqueId)
{
return self::COOKIE_PREFIX . $promotionUniqueId;
} | 0 |
926e9406564031bd56e07d071b7757db | 97ebd5aba7bd2b81a7d7e340e2a8f8b8 | スプレッド存在チェック | {
ArrayList msgList = new ArrayList();
if ( this.dmSpreadKeiyakuJouhou_Sheet1.Rows.Count <= 0 )
{
msgList.Clear();
msgList.Add( "検索未実施" );
msgList.Add( "申請書印刷" );
ScrEventUtil.ShowMessageArea( this, FConst.MSGCD.MSG_00140, msgList );
return false;
}
else
{
return t... | 1 |
f6693ca1a6435a40227b1d56ddbb0ad2 | 565113a672c2330217d2ae894b7ca8f4 | Функция выборки слов без использования модуля Counter | def words(path):
with open(path, 'r') as f:
str = f.read()
return re.findall('[a-z]+', str.lower()) | 1 |
02efb542ec1bbf8c9020ee426d607ead | d53ca1f0e3e14d9e38ad9dc13e8c693e | Return value casted to float or the original value, if the cast is impossible | class MOCServerClass(BaseQuery):
def _cast_to_float(value):
try:
return float(value)
except (ValueError, TypeError):
return value | 1 |
7ce19ff619c3492370bc6bbe5ae28505 | d5d8dcb1e14f7fb89681086c6cd29137 | Update the labels for the intensity sliders. | slider_value = MainUI.intensity_slider.value()
if (slider_value >= 1 and slider_value <= 33):
MainUI.final_intensity_label.setText("低强度")
elif (slider_value >= 34 and slider_value <= 66):
MainUI.final_intensity_label.setText("中强度")
else:
MainUI.final_i... | 1 |
fde7e947e3d0e9b6ca12a4325efe368b | 70f03f7f732e3083401baed3c9db1b24 | Wyświetl ukończone zadania | function ShowCompleted()
{
var element;
for (var i = 0; i < arrayTasks.length; ++i)
{
element = document.getElementById(i.toString());
if (arrayTasks[i].statusTask)
{
element.style.display = "block";
}
else
{
element.style.display = "none";
}
}
ExpandTaskFromFilters();
} | 1 |
29eb42df5e8b60076137026a571da9cc | fc70a3fef981054309d5bf328619edbe | Asserts that error message is showed. size must be between 1 and 30 | class NotesFormTestCase(TestCase):
def test_note_size_error(self):
short_name = 'Hi!'
short_body = 'There!'
form = NotesForm({
'name': short_name,
'body': short_body,
})
self.assertFalse(form.is_valid())
self.assertEqual(form.errors, {
... | 0 |
aec65080dbd162d60a8ca7f51f855072 | eeebe6c6329b7617fecab33c7c313145 | The unit's remaining gas or movement points. | class BaseUnit(object):
def fuelMax(self):
return self._sumNestedProperty('fuel_max', 'fuelMax') | 0 |
6d2ddc2fb5e28bc9e92b00ecfcef38f4 | 3eb3bc262154b7090fee25eac4c5c906 | Tests solar azimuth angle function. Values from Duffie and Beckman | public void runErfaTests() {
double xi = -0.03;
double eta = 0.07;
double ra = 1.3;
double dec = 1.5;
double[] v = new double[3];
S2c.s2c(ra, dec, v);
double[] vz1 = new double[3];
double[] vz2 = new double[3];
final int status = Tporv.tporv(xi, eta, v, vz1, vz2);
assertEquals(... | 0 |
21620b08314b89c398cc29895ecc2672 | cd44f18f683ac0c5715d1510039f9239 | 是否有默认银行卡 | class WithdrawController extends CommonController
public function default_card(){
$this->_request_check();
$this->need_param=array('openid','sign');
$this->_need_param();
$this->_check_sign();
$do=D('WithdrawAccountRelation');
$rs=$do->relation(true)->cache(true,C('CACHE_LEVEL.... | 1 |
850d5244761d25efd45c3dfca2448781 | 492ea8ce9858baf347096bb3640d3991 | 同步时间到模块中的命令 | namespace Sys.Safety.Services
public partial class NetworkModuleService : INetworkModuleService
public BasicResponse SetNetworkModuleSyncTime()
{
BasicResponse result = new BasicResponse();
NetworkModuleCacheGetAllRequest networkModuleCacheRequest = new NetworkModuleCacheGetAllReques... | 1 |
15194ab09de0b24fd8192bf622b43875 | 0f3fa3527ea3372b440a1d6807a1650b | Returns the target utility of our Bid on this round- | public class MrBeanFusion extends AbstractNegotiationParty
public double getTargetUtility(double k, double b) {
return Umax + (Umin - Umax)*(k + (1-k)*Math.pow((getTimeLine().getTime()), b));
} | 1 |
a0d96969d04f4933f7091bf4c5535bd4 | de7a358e9f6f1cf7ef8234fbd1aec0db | Returns the current value of the maskClass property. | public class Component
@JsonProperty("isMask")
public boolean getIsMask() { return isMask; } | 0 |
ab2d1b283c436ea8fcb34c20c8bb43ff | babf7a61dcbdeff5d15480db847681a6 | Sets the internal timestamp to end of the current hour | public function startOfHour(); | 0 |
25d011076e25c80e8b2963c00a930835 | 9598cd4d1309c167fc663b228c87a8fb | 绑定手术信息 | @FormUrlEncoded
@POST("/api/app/patient/bundinfo")
Observable<BindEntry> bindInfo(@Field("token") String token); | 0 |
4a36d2f435d3da5afe9f81e2a1376688 | c5471cf1c36f6416cc7808a5ad4381c5 | 树状数组, 注意下标01转换
注意此题的update是值的覆盖, 而传统树状数组是值的累加
所以需要额外维护一个原数组, 得到当前val和之前val的差值, 作为累加项, 同时注意需要更新原数组该下标的值为新的val | class BinaryIndexedTree:
def update(self, index: int, val: int) -> None:
while index <= self.n:
self.arr[index] += val
index += self.lowbit(index) | 0 |
78d46cf88511ef67e7e74c6c144401ed | 85022a920fe00976c12bd92dbfc73fee | Initiates the asynchronous execution of the ListElasticsearchInstanceTypes operation. | namespace Amazon.OpenSearchService
ListInstanceTypeDetailsResponse ListInstanceTypeDetails(ListInstanceTypeDetailsRequest request); | 0 |
4decbd49eacc0e42fc3d9bfab9f48b73 | 133b5b858bf53e1a6a581397db4cd09d | @brief Initializes the AOP server component | {
#ifndef CSR101x_A05
g_app_nvm_offset = NVM_OFFSET_GAIA_OTA_SERVICE;
GAIAInitServerService(g_app_nvm_fresh, &g_app_nvm_offset);
#ifdef GAIA_OTAU_SUPPORT
AppGaiaOtauInit();
#endif
#ifdef GAIA_OTAU_RELAY_SUPPORT
GaiaInitClientService(g_app_nvm_fresh, &g_app_nvm_offset);
#endif
g_app_nvm_offset = N... | 0 |
0250bb709c6706c6be714c51e6fddf2c | 7b5113fe72696924e844635823f07a92 | Verifies if the '* Changes saved' message is displayed. | {
waitForVisible("css=.info");
assertText("css=tr.info td:nth-of-type(2)", "No entries to display *");
} | 0 |
4794e8559d06053792564dd7a48c8f20 | 10518dff903ed9af7405119401ac54c8 | Returns value of 'arrive_time' property | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ResGuestType", propOrder = {"profiles"})
public class ResGuestType
public String getArrivalTime() {
return arrivalTime;
} | 0 |
664470606ac9b3d2747025862e03968a | c1c581484a7f89d799212c38e4ca9327 | 更换下单地址(前往用户地址页面) | class OrderHandle(BaseHandle):
def to_addresspage(self):
element = self.driver.get_element(self.orderpage.get_addressmg_link())
self.click_element(element) | 1 |
4ca318aa62e13dbec084539d32bd3dc0 | 6ff74207e4c13b910340b15f42f089ed | Wrappers around Sentry's span to minimize exposure of sentry elsewhere in the codebase and for single-responsibility | def wrap_iter_with_end_span(response_iter):
for response in response_iter:
yield response
execution_context.get_opencensus_tracer().end_span() | 0 |
139b86a8ad1237af1b3b420fd03f14e8 | a1c1b39c2757feaffe31e697886b2374 | Authorise read completed review. | $articleId = (int) array_shift($args);
$reviewId = (int) array_shift($args);
$accept = $request->getUserVar('accept')?true:false;
$this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
$submission =& $this->submission;
SectionEditorAction::confirmReviewForReviewer($reviewId, $accept, $request);
$reque... | 0 |
ce1603178697643d065549439cddb180 | 56f6d96d8247e7abe634afe56030b064 | reference:https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/discuss/28335/My-accepted-Java-code | public class RemoveDuplicatesFromSortedListII
public ListNode deleteDuplicates(ListNode head) {
if(head == null || head.next == null) return head;
ListNode dump = new ListNode(0);
dump.next = head;
ListNode prev = dump, cur = head;
while(cur != null) {
while(cur.next ... | 1 |
f62844b3e4bb0ba103717278ae9654b5 | 867016b029cd7429828805a182f8866a | Creates new instance of the parser duplex stream. | export class InStream
public constructor() {
} | 0 |
4dd3bd0f9c4e04a2a48e65ad8d2fe31c | 22ca97c4025350ec4483f2af76013912 | A term lister for the current document. | if type(self.document) is bs4.element.Tag:
self.document = self.document.next_sibling
while type(self.document) is not bs4.element.Tag:
if self.document is None:
file_path = self.get_next_file_path()
if file_path is None:
break
... | 1 |
eb07ca1409fe5aaa72a62e1147baca1a | 49f005507eb5d53e9de05de8728c5c22 | List of SBML files that meet a given condition | class COPASI_SBML_Cleaner:
def load(self, sbml_filename: str):
self.sbml = etree.parse(sbml_filename) | 0 |
bc1ef82430459863fa86fc3bc8ca6681 | 28ccc68a197786aba6d0db0c7f1e5018 | Open a connection to be used for the pre-pack phase.
Returns (conn, cursor). | def preauth_connect(controlAddr="127.0.0.1", controlPort=9051,
ConnClass=Connection):
conn = None
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((controlAddr, controlPort))
conn = ConnClass(s)
authType, authValue = conn.get_auth_type(), ""
if authType ==... | 0 |
a3b2fdee3ba8c4422bbec95430f62046 | 6ed66841e6218f717f0bfa1bb9b8713b | Reset the "tie breaker" filename counter used by GenerateUniqueFileName(). | void CTimeDomainMetric::ResetNoiseBlockCounter()
{
m_uNoiseBlocksCounter = 0;
} | 0 |
df0c9a4dc1ba52103fc1829283df3437 | d971d3336c513677f11e3c0a4188f3e3 | Ensure that both the source and target paths exist | def check_files(tiles_path, target_file):
if not os.path.exists(tiles_path):
print("{} does not exist".format(tiles_path))
sys.exit()
if not os.path.exists(target_file):
print("{} does not exist".format(target_file))
sys.exit() | 1 |
a0cf19a81ed6a2b796a232e4a0336e65 | 7ad83c19044e37ddee063dabef75127d | Check if a user is naughty | r = [
v for v in video_set if v.is_naughty == is_naughty
]
return r | 0 |
02fcc58da2c4af38d949fbd2ffc34b69 | 1388687499a618d941cf57bd811a42d1 | Attempt to expand the Edison Smart Meters portion of the Energy Manager UI.
These are additional services that by default are hidden. | hass: HomeAssistant, entity_registry: er.EntityRegistry
) -> None:
yaml_config = {
"utility_meter": {
"energy_bill": {
"name": "Provider A",
"unique_id": "1",
"source": "sensor.energy",
"tariffs": ["onpeak", "midpeak", "offpeak"... | 0 |
ff063bf31895b5d890b8c5f0fba9cbbb | b397f5a62a7b78e7f171ade1a82d935f | 根据人员ID删除相关联的岗位信息 | @Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService
@Transactional(rollbackOn = Exception.class)
public void deleteUserPosition(String userId) {
QueryWrapper<SysUserPosition> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id", us... | 1 |
d72aecc7537a05f0b7ddfb4d09142be4 | 582024d4c9c5dcf1a8837618aca40cc1 | Programa un proceso que se repite cada cierto tiempo | func main() {
for {
fmt.Println("Hola mundo")
}
} | 0 |
b79742063a2673dcc73bbf2505735859 | 1de244342317cdbb128984482f5cca17 | プロトコルを HTTP/2 へ変更 | request = (
b"GET / HTTP/1.1\r\n" +
b"Host: localhost\r\n" +
b"Upgrade: h2c\r\n" +
b"HTTP2-Settings: " + settings + b"\r\n" +
b"\r\n"
)
connection.sendall(request) | 1 |
24e1bbaeafb23e5687e9b6ba2948c3b0 | 808dcdda42df29918e06d48e27349359 | 根据一周的时间系列串获取设置开始时间和结束时间 | @Slf4j
public class HttpRequestUtil
public static Map<String,String> getStartEndTimeByLast(String last){
Map<String,String> map = new HashMap<>();
if(null!=last&&""!=last){
String[] lastArgs = last.split("-");
if(lastArgs.length==2){
LocalDateTime now = LocalDateT... | 1 |
ae25e46e8f926674057eee6d6abcd8d2 | 466feccca826d11aa4e5a2efdb22fd43 | müşteriyi bulup verilerini yazdıran metot | namespace AracOtomasyon
class Program
static void YazdirServis(object[] servis, int no)
{
Console.WriteLine("\nNo : " + no);
object[] siparis = (object[])siparisler[Convert.ToInt32(servis[0])];
int musteriNo = Convert.ToInt32(siparis[0]);
string must... | 1 |
ecc61ecdffdc6df287899377431649a6 | 86af05f2e1005ab33f4e1f9bee49d947 | u"""
Получить значения счетчиков в виде массива значений. | class OTCI(object):
def counter_names(self):
return tuple(self.execute_command('counters')) | 0 |
7893d20f3bb18a100f35878ffe53a6eb | 1fcae0b98facdb12bf2b3a6a5faefc8d | FUNCTION
OV5640AfDefaultZone
DESCRIPTION
This function set and launch custom zone configuration
PARAMETERS
RETURNS
None
LOCAL AFFECTED | {
Ref->SensorAERef.AeRefLV05Shutter = 3816;
Ref->SensorAERef.AeRefLV05Gain = 896;
Ref->SensorAERef.AeRefLV13Shutter = 99;
Ref->SensorAERef.AeRefLV13Gain = 1 * 128;
Ref->SensorAwbGainRef.AwbRefD65Rgain = 210;
Ref->SensorAwbGainRef.AwbRefD65Bgain = 149;
Ref->SensorAwbGainRef.AwbRefCWFR... | 0 |
b3221fae19f80d348271a5f2630b92f0 | 533ba64558149c5b4a03ea07ccabb4d2 | Gets the value of the start property.
<p>
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there is not a <CODE>set</CODE> method for the start property.
<p>
For example, to add a new i... | org.landxml.schema.landXML11.PointType getStart(); | 1 |
89b26dcb0ba02245c44d98fb6b693c3a | 237eb5ebb4a784b7412db538c94aa013 | 获取未解析的文章 | List<ArticleInfo> getUnPublishArticle(UserInfoDto userInfoDto); | 0 |
6ad93a24e6e093b6f74dd8866b0106ac | 7b783b66bc482509678d8976b0fe94b2 | 更具硬件架构方案生成采购清单和连接关系 | public void generateContractFromParities(List<Parity> parities) {
List<String> tempStringList = new ArrayList<String>();
Map<String, Parity> tempMap = new HashMap<String, Parity>();
Map<String,BigDecimal> amout = new HashMap<String,BigDecimal>();
for (Parity parity : parities) {
String tempString = parity.g... | 0 |
a334be5e694d90fb80e37d2b394319fa | 0ef1acb82026b6b7a74e67469b24cc02 | Gets the <c>Language</c> property of the page. | @Slf4j
public class PageSequence extends AbstractPageSequence implements
WritingModeTraitsGetter
public String getLanguage() {
return this.language;
} | 1 |
4e5d24153940dc50fc6e1fe1574d88e0 | 4df836ad5cfc0b6d9bc335665c0caae6 | List a connection port's virtual circuits
List the virtual circuit record(s) associatiated with a particular connection port. | class Network:
def list_vcns(self, compartment_id):
return oci.pagination.list_call_get_all_results(self.network_client.list_vcns, compartment_id = compartment_id, retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY).data | 0 |
4b2ccc01a1f97d08896e901ff9073957 | 98ecb439e4853d46297178b250058d64 | The absolute Filename of the .jks-Certificate the XMPP use. | String getCertChainFilename(); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.