query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
b969389cf235989c7e5d9881c04d95cd | 8b30335702d8b488b3984da8693d6c53 | examines the video url and return the host | val regex = "http://127.0.0.1:+\\d+/"
val patterns = Pattern.compile(regex)
val matcher = patterns.matcher(videoUrl)
if (matcher.find()) {
matcher.group(0)?.let {
return videoUrl.substring(it.length)
}
}
return videoUrl
} | 0 |
5d155a8d42ce0743e2a8fe44c99bb6d1 | b58d5ba5bebae3dcb6272e09cf5bf565 | Generate rhyming couplet | def generate_couplet(rhymes):
while 1:
i = random.randrange(len(rhymes.keys()))
if len(rhymes[i]) >= 1:
pool = rhymes[i] + [i]
return random.sample(set(pool), 2) | 1 |
43ac9800098c04b44f4f70cd07f126d0 | 728553fbbf222cfbe70f4e95657f468c | 入参是否是本周 | {
if (times == null)
return false;
return IsSameWeekByCn(times.ToList());
} | 1 |
f95558a8cb26613f623ea6fd98e95247 | c16cc6682cd65fafb6686c7896b96d0a | Omogucava cekanje da bi nam bile vidljivije promene tokom testa | public class GraphVisualisatorTest
private void pause(){
try {
Thread.sleep(1500);
} catch (InterruptedException e) {
e.printStackTrace();
}
} | 1 |
bc5108112b3a9dbbfd611602aca08679 | e459e8cd5b07b408a2e3c6ce557bd77e | Gets the value of the processed property. | public class Processor
public String getPropValue() {
return propValue;
} | 1 |
c4dbfa49fa27971f1dc0f3977bae32dd | eaf18c709abb4fd668169d3487a94184 | Downloads videos and images. | r = requests.get(f"https://www.instagram.com/p/{shortcode}/?__a=1")
num = 1
for edge in r.json()['graphql']['shortcode_media']['edge_sidecar_to_children']['edges']:
is_video = edge['node']['is_video']
if not is_video:
display_url = edge['node']['display_url']
file_nam... | 1 |
294c3e6dd0217926430262ec690571f1 | 4c119b1d5defa3ff3120ff530f48ee78 | 获取此实例所表示的日期是星期几(中文) | inline fun Date.getChineseWeek(): String = SimpleDateFormat("E", Locale.CHINA).format(this) | 1 |
7b47e6ef282d1925fb57901a6fc1d444 | 240b227c403cea49f50193b2067343e9 | Method which clears the list of used magical equipment | namespace StJude2021
class GameManager
void RemoveCosplayEquipment()
{
if (Hook.RightHand1 >= 3000000)
PreviousEquipment["RH1"] = 900000;
if (Hook.RightHand2 >= 3000000)
PreviousEquipment["RH2"] = 900000;
if (Hook.LeftHand1 >= 3000000)
... | 0 |
595256875aecc85c063f2e460a6f6333 | f3e2878954200286000dac55283dc457 | Returns list of all selected units. | class Level:
def getSelectedUnits(self):
units = [x for x in self.units if x.isSelected()]
if units:
self.last = units[0]
return units
return self.units | 1 |
838dd6ee4f970401c8b7f057c2e47c2c | 80ac19f0faba103284995b03119025b2 | This routine sets the lock bits. Note that unlocking is only
possible by doing a full chip erase, not available from software. | extern void Flash_voidLock (void)
{
FLASH_CR |= FLASH_CR_LOCK;
} | 1 |
d1b21872622003158ffddc5ac864f6a4 | 45961229ee005074259d180008cda83f | 先查 再保存或更新 | @Service
public class ProjectsServiceImpl extends ServiceImpl<ProjectsMapper, Projects> implements IProjectsService
public ObjectResult<Projects> saveOrUpdate1(Projects projects) {
ObjectResult<Projects> result = new ObjectResult<>();
Projects n = null;
result.setMsg("操作失败!");
if (this.s... | 0 |
bb5ad5c1b1ab792e201ee0f42fc3c0e4 | 753ccc34e55e331681c7eb7a7b28ceda | 49. Write a JavaScript program to replace every character in a given string with the character
following it in the alphabet. | $str_input = $_POST['input'];
$input = str_split($str_input);
$result = array();
for ($i=1; $i <= sizeof($input) ; $i++) {
if($i%2==0){
$ascii = ord($input[$i-1]);
$ascii -= $i;
array_push($result, chr($ascii));
}
else{
$ascii = ord($input[$i-1]);
$ascii += $i;
array_push($resul... | 0 |
3fd7889d80932e2a04d1f08c3dde4b2f | e1428e8d834007d1f4c0531bd9594343 | Optional hook; default implementation checks that the input type is of the correct type. | namespace MFT_GrayscaleAsync
[ComVisible(true),
Guid("E6AAA34E-A092-418A-A037-6634EED63CB5"),
ClassInterface(ClassInterfaceType.None)]
public sealed class GrayscaleAsync : AsyncMFTBase
override protected HResult OnCheckInputType(IMFMediaType pmt)
{
HResult hr = HResult.S_OK;
... | 1 |
3aa250c494eeceade4b1e9b1d215760a | 0d26b6500d8a678aed35322f994e02f9 | Sets the contact person phone. | public class RegistrationForm
public void setContactPhone(final String m_strContactPhone) {
this.m_strContactPhone = m_strContactPhone;
} | 1 |
dcdfb4e5f16c2b827daff91c2685f31e | d8bbf2e1588e9cafa3e486d7d9d591dd | Sorting by polar angle and finds nearests | def SortCorners(points):
C=np.mean(points,axis=0)[0]
angle=[]
for i in range(len(points)):
a=(points[i])[0]
angle.append(math.atan2(a[1]-C[1],a[0]-C[0]))
ID=np.argsort(angle)
sorted_p=points[ID]
return sorted_p | 1 |
ef33a93e13e6e5a75b5401ce326babe3 | 010394fb11a72df28e2ffde16ae49102 | 根据法币单位获取与ETH汇率 | class IcoPart
public function getEthRate()
{
return $this->ethZnxRate;
} | 0 |
40d7d75f91973e765144a114b149dc33 | 3fd6f398d986f422d620beabd35819d0 | function to crop image and save image to disk | class Driver:
def img_crop(filename, box, output=None):
if output is None:
output = filename
with Image.open(filename) as img:
img = img.crop(box)
img.save(output) | 1 |
b705595dc69b29b783e8d2b1a51d723c | 544ff1107e2058a60eb94498983d6205 | 按照一级分类查找商品 | public List<Goods> findGoodsByCategory(String categoryID); | 1 |
9f1cc598c8c3fcf20457acef967e39cf | 65b988746ec0dd8e715d07fb8b1dbb3e | Takes a list of peptides, generate automatic names for the peptides and write the results to the disk as FASTA files | def main(dir_name):
OUT = open(os.path.join(dir_name,"plasmid_features.csv"),"w")
order = ["CDS","promoter","terminator","LTR","misc_feature"]
ret = dict((x,[]) for x in order)
OUT.write("Name,")
OUT.write(",".join(order))
OUT.write(",filepath" + "\n")
ls = [os.path.join(r,fi) for r,d,f in os.walk(dir_name) for ... | 0 |
bb64383eae7ce1394c8d9d7a703ecfc5 | e348021b2a1105b6bb007968e37a313d | Return the polar angle step used to walk over the elliptical
path.
The polar angle step is defined by the actual integrator
subclass.
Returns | class FourierPlanarCurve(Curve):
def r_n(self):
return self._r_n | 0 |
9869f37ad90f0d192c8ba7a72e78b502 | aeb47cb2ed4f2c5a43a520be7b6d532b | Pop and return the next shift. | static size_t _pop_shift_queue()
{
if(_shift_queue.num == 0) return 0;
_shift_queue.num--;
return _shift_queue.shifts[_shift_queue.num];
} | 1 |
e0552de4f68be9e9b63ce99ec38622d4 | cbac03cb4c7e3d084721b7ac86163d89 | Processes document setting tags (and placeholders). | rgx_body = re.compile(r'(\t*)([^\t]*.*)$')
rgx_tp_tsk = re.compile(r'^(\t*)(\-\s.*)$')
rgx_tp_prj = re.compile(r'^(\t*)(\s*)([^-\s].*\:)$')
def _read_tags(dct_node):
str_text = dct_node[ATT_TEXT]
bln_mode = False
str_point = str_text
str_s_point = str_point.rstrip()
... | 1 |
d4f8ba227fbd45a84965f4a0a8374193 | 75f0d9ad17da3909bfebba02386ec7ab | Returns Mink instance. | abstract class BaseMinkContext extends BehatContext implements TranslatedContextInterface
abstract public function getMink(); | 1 |
e80873a385f63a423d566ae328cd9896 | c30d42a217405897ffe1b44e5d104626 | Gets a general error description with parameters and returns it as a throwable exception. | ParcelableErrorInfo parcelableErrorInfo = parameters.getParcelable(Parameter.ERROR);
return parcelableErrorInfo != null ? parcelableErrorInfo.errorInfo : null;
} | 0 |
ef275f8eaedd14733db640e20a08eaf9 | ee5b7ff2e30844f767c7b318956968a2 | Create an instance of {@link KoeretoejSupplerendeKarrosseriTypeStrukturType } | @XmlRegistry
public class ObjectFactory
public KoeretoejMiljoeOplysningStrukturType createKoeretoejMiljoeOplysningStrukturType() {
return new KoeretoejMiljoeOplysningStrukturType();
} | 0 |
504461677117fd29daf956832f7fb19c | 8c253e665234587e549a8fb524e87513 | 會員進入活動頁時的資格審查 | Success = True
Return = False
if Success:
try:
Info = []
TheUser = User.objects.get(OpenID = TheUserID)
TheActivity = Activity.objects.get(ID = TheActivityID)
Info = JoinInformation.objects.get(UserId = TheUser, ActivityId = TheActivity)
if Info.Role == Constants.USER_ROLE_CREATOR:
Return = True... | 1 |
37a4589654e141396e00f09da8e1b336 | 41ee6945f057cda52b44ef11d383d744 | File extension for the file attachment. | @Nullable
@Index(47)
String fileType(); | 0 |
c7462f07de2aa68c6aca05fd18518b2d | 9d7800f9974934ce20e5c7b5eb6392d6 | return the number of file with an unknown name in this ``Farc`` file | class FuzzyMatch(object):
def n_files(self):
return len(self._library) | 0 |
7aee54f1b0135a3f656911bc758b2783 | 52679d902196696f1eeb182517c2f059 | Замена вхождений блоков СБ на блоки АР | class Page
public static function prepareBlocks(array $blocks, $wrap = false)
{
$content = '';
$replacements = [];
if (!empty($blocks)) {
foreach ($blocks as $block) {
switch ($block->type_id) {
case 1:
$data = unserialize($block->content);
$module = array_shift($data);
$classNames... | 0 |
bd54efc71cb02c2e3a5176a6b41b3de6 | 59008acb62d8f99a2f87351ad3916613 | ミュートユーザーリストの結果をアプリで必要な情報だけに絞り込む | function summarizeMutedUsersInfo($users_obj)
{
$error_status = TwitterAPIErrorCheck($users_obj);
if ($error_status !== "OK") {
return $error_status;
}
if (! property_exists($users_obj, "users")) {
dd($users_obj);
}
$users = $users_obj->users;
$simple_users_array = [];
for... | 1 |
ccf5a0573cd665d947b8ee804d7bc337 | 390e266309134c16a9467e6bab86f4c7 | Bert Tokenizer으로 tokenization한 결과를 sentence로 복원해주는 함수 | def postprocess(hypotheses, idx2token):
_hypotheses = []
for h in hypotheses:
sent = "".join(idx2token[idx] for idx in h)
sent = sent.split("</s>")[0].strip()
sent = sent.replace("▁", " ")
_hypotheses.append(sent.strip())
return _hypotheses | 1 |
2f3964746381f29fa91dae22d67033d7 | 4d3a64b6c7b6bef9b042f5324faf514d | Given a Month and Day, calculate the corresponding Julian Date
Julian Date = the number of days past 01 January | def JulianDay (month, day, year, hour):
year_r = year+4800-floor((14-month)/12.0)
month_r = month+12*floor((14-month)/12.0)-3
JulianDay = day + floor((153*month_r+2)/5.0) + 365*year_r \
+ floor(year_r/4.0) - floor(year_r/100.0) + \
floor(year_r/400.0) - 32045 + (hour-12.0)/24.0
return ... | 1 |
23e373f30faf501770e4f973f0c1d797 | 82a23fdd33cb4e475ea5bfa7f540a453 | Create a HTML table with the specified column names. The content has the
same number of columns as there are column names. | public class PDFTable
public static PdfPTable createTable(int nrColumns, ArrayList<String> columnNames) {
PdfPTable table = new PdfPTable(nrColumns);
table.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
for (String c : columnNames)
table.addCell(c);
table.setH... | 0 |
731db47ea641c017c35ffca31431abe8 | add5114a1d65c41de1b656c62e26a653 | Raises the <see cref="MediaPlayer.MediaPlayerRateChanged"/> event | namespace LibVLC.NET.Presentation
public class MediaElement
: FrameworkElement
protected virtual void OnPlaying(RoutedEventArgs e)
{
RaiseEvent(e);
} | 0 |
f420f901ec7337623e073e010170dcfd | 4e963367d09a9c4a24d3ee991b377ca7 | GET /account_payables
GET /account_payables.json | class Cashes::CashInvoicesController
def index
end | 0 |
580ba583951d65d3d7f785afbaa2ce71 | a38fe711027b6efbcb413d8ae550ca98 | 判断某 id 商品在数组中是否存在,
存在则返回其在数组中的下标,-1表示不存在 | if(id == null) {
return 0;
}
for(var i = 0; i < array.length; i++) {
if(array[i].id == id) {
return i;
}
}
return 0;
} | 0 |
e4d4c1b5a333bd600b0c7c3f6889f6ff | 8e79d31885e4cf04b196fba8dc77245c | Computes the SHA-3-512 of the <password + salt> concatenated string.
Returns a 128 characters long string. | System.Security.Cryptography.SHA1 cspSha512 =
new System.Security.Cryptography.SHA1CryptoServiceProvider();
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
string hash = ByteArrayToString(cspSha512.ComputeHash(enc.GetBytes(password + salt)));
... | 0 |
b301acdc18c3aa6fb63dd0844d437aae | ee329e46ec85e43d1d237314ab8deaec | 添加一个cv物体到场景里 | function cvscene(ainode,world)
{
if(CheckMeshObj(world,ainode.GetName()))
{
System.exitcode = 23;
alert("Error Code 23 : meshobj with the name " + ainode.GetName() + " is exists!");
exit();
}
var pos = ainode.GetName().indexOf("#");
var factName = ainode.GetName().substring(0,pos);
if(!VFS.Exis... | 1 |
6afe4680642cd968d10a93db87b49972 | 2d614e3a90c13b403738be063f4bafa3 | return features of layer where field=val | {
int fieldsCount = layerIn->getNumFields();
int featuresCount = layerIn->getFeatureCount();
bool ret = false;
for (int iFeature = 0; iFeature < featuresCount; ++iFeature) {
GeoFeature* feature = layerIn->getFeature(iFeature);
for (int iField = 0; iField < fieldsCount; ++iField) {
GeoFieldDefn* fieldDefn = l... | 1 |
cb953f44a1d812f2b3bbcef411cc7142 | 375dd0e216e1a2f9afb2e009a8c8da35 | Represents the text of a ruby annotation . | class GoogleCloudDialogflowV2beta1IntentMessageResponse(dict):
def rbm_text(self) -> 'outputs.GoogleCloudDialogflowV2beta1IntentMessageRbmTextResponse':
return pulumi.get(self, "rbm_text") | 0 |
9fab48cbaca76158898a8b1400c5e48e | ca22291d9534ce7c8bbfa8e0cddb3f5a | After a save, we generate the binary MO file | class Flux_Ieml extends Flux_Site{
function saveBinary(){
$this->dbIEML = new Model_DbTable_Flux_Ieml($this->db);
$arr = $this->dbIEML->getAll();
foreach ($arr as $r) {
if($r['parse']!="" && $r['binary']==""){
$xml = simplexml_load_string($r['parse']);
$bin = $xml->xpath($this->XPATH_... | 0 |
f13e3f192d89c4839ea77e598ff29053 | cc496c30da24bdca39420c432c12c070 | Возвращает пересечение элементов двух массивов | function _intersection(a, b) {
inx = [];
for(var i = 0; i < a.length; i++) {
for(var j = 0; j < b.length; j++) {
if(a[i] == b[j]) {
inx.push(a[i]);
break;
}
}
}
inx = inx.filter(function (v, i, a) { return a.indexOf (v) == i });
return inx;
} | 1 |
eac2d1047187e94a4a77ee85e9a18c9c | 475bcc42facaaa5623e596fce51d60df | curl批量下载文件 | {
if (!$url) {
return false;
}
$i = 0;
while ($i <= $retry) {
$filename = $filename ? $filename : 'download_' . time();
if (!file_exists($save_path)) {
mkdir($save_path,0755,true);
}
$file = $save_path . $f... | 0 |
fe7ff7ca81d2019933ba6fd937d272ad | afac7395bee68859609ae50539efc4be | Is this package an update to the currently installed FOF? If not (we're a downgrade) we will return false
and prevent the installation from going on. | if( installedVersion.compareTo( currentVersion ) == 0 ) {
return false;
}
return true;
} | 1 |
85357b8e2c7f221d49b3f5f4be91be41 | 18d91d4d01a5986d0cc95e116ab3b784 | method returning the id of the associated que | public class JSON{
public String qid() throws JSONException{
return json.getString( "qid" );
} | 1 |
040bbd0f23d62695206128c64031b1ef | be3af6f819d5ed9455b4f1c6194e2829 | creates calendar event and submits to the DB | @calendar_event = CalendarEvent.new_assign_attributes(calendar_event_params)
if @calendar_event.valid?
@calendar_event.save if @calendar_event.changed?
calendar_fields = @calendar_event.fields.clone
calendar_fields['id'] = @calendar_event.id
if @calendar_event.type == 'Event'
Cal... | 1 |
8880ddcfbc164f30e1e479d5ee7209fc | b30f13fde77376b5cd236f79a5a8a6ee | This function should never be called, but helps babel generate better code. | function noop(..._args: any[]): any {} | 1 |
54b69435e9d4c6a6e110ac74ff38b0a2 | e3e196e3f8df2bb545d4a6f91f24aea0 | Aggregate the same user's multiple ratings on the same movie by only keeping the highest rating | predictions = dict()
nearest_neighbors = get_neighbors(userID, train_dict, k, movieID)
for neighborID in nearest_neighbors.keys():
if train_dict[neighborID][movieID] not in predictions.keys():
predictions[train_dict[neighborID][movieID]] = 0.0
predictions[train_dict[neighborID][m... | 0 |
16f24506511d088e863ee1e17b549ca6 | 09f426bfd8ada8b628b85775b9553652 | Check if diagnostics is enabled from the command line | int checkDebug (int argc, char * argv[]) {
if (argc == 1) return 0;
else if (strcmp(argv[1],"-d") == 0) return 1;
return 0;
} | 1 |
1a1a756e95e0f1f5a1186783a4e5d06a | 4ad0094aa6c13b81bd12e66abbaee3be | List the pairs used by the relative motions | class H36m(data.Dataset):
def bone_pairs(self):
return ((0, 3), (1, 4), (2, 5), (10, 13), (11, 14), (12, 15)) | 1 |
7369b1082a53f04c29bc99bda9872b34 | cbe54ad4e5cc6519a2ead6b06d44b571 | 将InputDTO对象转换成Json
InputDTO对象 | String json = "";
try {
json = objectMapper.writeValueAsString(request);
} catch (Exception e) {
e.printStackTrace();
}
return json;
} | 1 |
fc0fdda567be4cdfab6a05fe2852e240 | a285fe095679afcadbcb2e61e8d4b578 | Gets the allowGuestUsers | class Maketok_ProductReviews_Helper_Data extends Mage_Core_Helper_Abstract
public function isGuestAllowed()
{
return Mage::getStoreConfigFlag('productreviews/general/guest_allowed');
} | 1 |
89290e7fc9bea25f86160563d98bee62 | 39a2b5c4eac69e6fd0b93bd781b06332 | Сравнение трех чисел. | def maximum3(a, b, c): | 1 |
bdddef965a0ac4c2f1d8a17a60275a64 | 18c4572a4f791fc31d61794acf0db7c6 | Removes all changes of tempo that occurred since the specified time. | namespace Melanchall.DryWetMidi.Interaction
public sealed class TempoMapManager : IDisposable
public void ClearTempo(long startTime)
{
ThrowIfTimeArgument.StartIsNegative(nameof(startTime), startTime);
TempoMap.TempoLine.DeleteValues(startTime);
} | 1 |
4b82bddb44819dcbcbb05aa56b721586 | 541585e8979c6e2c194a8b3bd328072b | データdを辞書に挿入 | int
cmd_dset(struct client_t *client)
{
obj_t *obj;
char *key;
char *val;
int i;
dict_t *dict;
if ((client->argc - 2) % 2 != 0) {
strcpy(client->reply_buf, "ARGUMENT ERROR -- EXPECT EVEN ARGUMENTS\r\n");
return CMD_ERR;
}
obj = db_get(client->db, client->argv[1]);
if ... | 1 |
a97a0772e99556524d9c31505df1462f | c622bacb9a77ebb199475d6f96a7509c | 재귀적으로 트리에 있는 모든 노드 값을 오름차순으로 출력 | if( T[idx] != 0 ){
inorder(T, 2*idx);
printf("%d ", T[idx]);
inorder(T, 2*idx+1);
}
} | 1 |
18a210f73ccec393fb63195450adccd6 | 5a6d290d5f7cb04004dd14b01fcdea87 | 根据索引获取技能数据 | public class SkillManager : SingleTon<SkillManager>
private int GetSkillDataIndex(int id)
{
int index = -1;
for (int i = 0; i < skillingDatas.Count; i++)
{
if (skillingDatas[i].Id == id)
{
index = i;
}
}
return index;
} | 0 |
4415747f0da495d5c0588760e821170c | 62635337734478fe42e147ccbf68cb03 | Convert predicted box parameters to label format. | ann = results['ann_info']
cares = results['cares']
gt_labels = []
gt_labels_ignore = []
tmp_labels = ann.get('labels', None)
bboxes_length = len(ann['bboxes']) if 'bboxes' in ann else 1
levels = 1
if len(gt_labels) > 0:
levels = len(gt_labels[0... | 1 |
99e8fa674f7d3979fc927a926f6b57b2 | badec98c508c024c41e5f5b2b43a2e61 | 获取指定段落的文本 | def getPageText(doc, pno, output = "text"):
return doc[pno].getText(output) | 1 |
64064b83f069d5d44f61987d38c06b66 | daf7bfd049b080d147f1d32ab343e5d9 | 方法描述:判断选择的板卡是否有侦查统计任务 | String cxlhx = request.getParameter("cxlhx");
String dxlhx = request.getParameter("dxlhx");
String hxtgcl = request.getParameter("hxtgcl");
String hkzlxd = request.getParameter("hkzlxd");
String zlsbjcs = request.getParameter("zlsbjcs");
String zlsbxdsjx = request.getParameter("zlsbxdsjx");
String rq = re... | 1 |
c94b82d115e8ac2baa9ec5bb6db1d3e7 | aa57435e3c23d74a75d2754eda542071 | 七牛云 文件删除,删除多个 | {
$result = array('result' => true);
try{
$auth = new Auth(config('config.qiniu.access_key'), config('config.qiniu.secret_key'));
$bucketMgr = new BucketManager($auth);
foreach (Request::input('ids') as $value) {
$photo = Model\Photo::find($value);... | 1 |
a58e4a004a92bcd1a893fb42bda3dc5a | 31f7a3c2919c2f8ab58db062a3b34487 | A function that reads a text file of words and randomly selects one to use as the secret word
from the list.
Returns:
string: The secret word to be used in the spaceman guessing game | def random_word(self): | 0 |
649b96fb1929e599fba9f9e85274dac8 | 14b074f628a8208072e929fed9bd6cf6 | 保存Error | setSaveError (state, {code} = {}) {
Vue.set(state.saveError, code, true)
} | 1 |
7ea363e7886f491193afe97ddb3971d2 | 641014640cf590a5353cfccc71a505a0 | Get authorization code for underlying authUrl | public String getAuthCode(OAuthCodeRequest request)
throws CredentialsIncorrectException, TwoFactorRequiredException, TwoFactorIncorrectException, CoinbaseException, IOException; | 1 |
23a528e35a070873c9201121be86de63 | 707e237c3cb7245950a243d55efcbcfd | 表单项管理页面——table表格加载接口 | function getTable() {
console.log("加载基本表格数据项");
return fetch({
url: '/api/tables/table',
method: 'get',
})
} | 1 |
0b2fa36e0e6e5f20bf7bc98c27b4b34e | 41046fdff926dbddeef14dceaeb12491 | Synchronously saves the document on the server | {
$req = [
'id' => $doc->id,
'text' => $doc->title . '\n\n' . $doc->content,
'document' => [
'id' => $doc->id,
'project_id' => $doc->project_id,
],
];
$resp = $this->client->post("/api/index?dat... | 1 |
9b9d1bc97bd4a17dc03c8079252af6d7 | a221e378fb79f3f98d100504e783dcb8 | 멘션 자동완성 박스 숨기는 기능 | $('#form').find('input[type="text"]').each(function() {
var self = $(this);
if (self.val().indexOf('*') !== -1) {
self.addClass('fn-hide');
}
});
} | 0 |
7a1361ba6cfa1a476eb0beba9ddbd799 | 95e1dbc80bcb75aa18a0f3c04665ed7f | 日韓単語翻訳結果を1つの文字列で返す | def translate_ja_to_ko(text,category):
POST_URL = "https://naveropenapi.apigw.ntruss.com/nmt/v1/translation"
request_body = {'source': 'ja',
'target': 'ko',
'text': text}
headers = {"X-NCP-APIGW-API-KEY-ID":CLIENT_ID,
"X-NCP-APIGW-API-KEY": CLIENT_SECRE... | 1 |
e9315d6df5bd6415975679355fa97b1a | 0943ba5b970d7a13373a22e4220ead74 | Returns a user-friendly name for this <code>CryptoImplementation</code>. | public class BasicCustomAuthenticator extends AbstractApplicationAuthenticator
implements LocalApplicationAuthenticator
@Override
public String getFriendlyName() {
return BasicCustomAuthenticatorConstants.AUTHENTICATOR_FRIENDLY_NAME;
} | 0 |
eeaa8ea8e29a31563deb0d11c8efdb57 | a1bc3832ac53ebf83ba70ab7c929ded2 | Provides an example which shows that pattern variables created by instanceof are also in scope within an
expression used in the condition of an if statement, as well as the block, but only when the earlier part of the
expression has definitely matched the pattern. | if (ast is if_statement) {
if_statement ifst = (if_statement)ast;
if (ifst.expr is is_expression && ifst.elsepart is if_statement
&& ((if_statement)ifst.elsepart).expr is is_expression)
Console.WriteLine("{0}: Possible typeswitch pattern", ast.begin);
}
} | 0 |
5cfc78ae4d1ca88083efd2ba23e69f8a | 83d153e1c06227b6b83e50a4c96cc998 | 根据roleId、用户id判断此用户是否拥有审批权限 | public String checkReviewUser(@Param("reviewId") long reviewId, @Param("userId") long userId) throws Exception; | 0 |
f8c210f8dda13dc73cf88a40598c16a2 | 42f75971d1b7f0d1c57fbb0f44d49517 | Renders a error if no data is found. | function noDataFound()
{
var table = document.getElementById('load_table');
table.innerHTML = "";
var row = table.insertRow(0);
var cell = row.insertCell(0);
cell.innerHTML = "No data found!";
} | 1 |
bf8dcbf8d154d3ed1e02d1f22141d9ec | d38f1860d9026a136da9475ecb6959af | 获取机房下所有的机柜 | export class BladeUnitDetailService
public getAllRoom(callback) {
this.$proxy.get(`/itm/rooms`, callback);
} | 0 |
45e817bc42c752be7910eb7cba768e76 | 138bf94c3c0d4771ec8556acaa136576 | Sets the textbox focus to true or false | public class ShowAllListView extends ListView{
public void setFocus(boolean focus){
this.focus = focus;
} | 0 |
df79bda1d2067b28db50a42e5aa0ac0e | f93280c382547d1312dc7b21457e5519 | Método para testar remoção de fotos dos utilizadores. | class UsersApiTest extends TestCase
public function testUsersDeletePhoto()
{
} | 1 |
0db267c4832fe0a4c01168c0ef99ba0c | 9333eee1ddd51e9e8b004cec20d93339 | Produit le fichier .DVI à partir de `source.tex`
Notes
* La commande `latex` se trouve à `/usr/texbin/latex`
* Je suis obligé d'utiliser '/usr/texbin/latex' ci-dessous pour
l'utilisation depuis Firefox. Dans le cas contraire, le bash n'étant pas
chargé, la méthode ne trouve pas l'application. | class RLatex
def make_dvi
unless File.exists? document.path_source
dlog "### ERREUR Document source introuvable : #{document.path_source}"
raise "Document source introuvable : #{document.path_source}"
end
dlog "Source : #{document.path_source}"
dlog "Folder : #{folder}"
`/... | 1 |
a3a73b0f12e935db0ed9abf63b4c648f | 059120a5086532a2ce1a0b52dc7f7381 | Überprüft, ob eine Datei auf dem FTP-Server in dem angegebenen Verzeichnis vorhanden ist. | class Ftp extends AbstractFtpAdapter
public function has($path)
{
} | 1 |
1b6cb15164818238492cd9eb594fc85e | 828ee73c032f847eb85b32caafec8219 | 获取确认中充币信息(顶部轮播) | function getReplenishMarquee() {
dispatch({
type: "standingThree/fetchReplenishMarquee",
});
} | 1 |
b04ebd24d80c6d026ec87076b2254451 | 1fac9548e4abfd83994a6c5cfda45ed6 | 授权码管理策略
向容器注入JdbcAuthorizationCodeServices,用来用Jdbc管理授权码 | @Configuration
public class SecurityBeanConfig
@Bean
public AuthorizationCodeServices authorizationCodeServices() {
return new InMemoryAuthorizationCodeServices();
} | 0 |
c8eed97602f0dd23dfacbc2b71e24dc1 | 764b2a63068798f4dbf662cdfa899426 | Opens the chat and starts typing a message | class SlackBot
async openChat(userId) {
try {
const convo = await this.bot.conversations.open({ users: userId })
return convo
} catch (err) {
if (err.code === ErrorCode.PlatformError) {
console.error(err.data)
} else {
console.error(err.message)
}
}
} | 0 |
c3d6cacfe09f57ae6ce2f68a5816e7db | fc2594509770e69cffa4aef3e831412d | Identical to wiringPiSetup, however it allows the calling programs to use the physical pin numbers on the P1 connector only.
This function needs to be called with root privileges. | void WiringPiInit() {
wiringPiSetup();
} | 0 |
50a9935c10d78806440f33cbac3f5519 | 1af2ddc91bf79e641667e5b0e2aa6fad | 计算图中不可满足节点,从不相交的节点队出发,分别计算他们所有的子节点
最后不相交节点的子节点集合的交就是不可满足的概念
为了节省后续MIPPs的计算时间,我们对这些结点进行了精练 | global sdc
n = len(T)
C2 = []
for l in range(len(L) - 1):
if sup_count[L[l]] / n >= MIS[L[l]]:
for h in range(l + 1, len(L)):
if sup_count[L[h]] / n >= MIS[L[l]] and abs((sup_count[L[h]] / n) - (sup_count[L[l]] / n)) <= sdc:
can2 = []
... | 0 |
1f7e04b732cc7874d65ef9f2acb6e182 | 7fe4bdb66a6d4272569b377a065817f1 | Fetch records that have <code>domain IN (values)</code> | {
$ids = $this->getParamsFetcher()->getParam('ids');
$domainId = $this->getDomainId();
return $this->model->fetchRecordsByIds($domainId, $ids);
} | 0 |
537f89be9f409c91b16d15743d24373f | 1523ed4e6eed025abed7bbb2d29bc30e | 获取道路road对象 | @POST("getRoad")
Observable<HttpResult<List<Child>>> getRoad(@Body Map<String,String> params); | 1 |
9d9c21aff22ce4541b534013ad65560e | d65cf6f1f4bf123dcf61056a76dafb59 | Decreases the Y scale | namespace LabInstruments
public class Oscilloscope
public bool DecreaseYScale()
{
if (ypointer == 0)
return false;
this.ypointer--;
this.setYAxis();
return true;
} | 1 |
71411c4457a1d28feeb32c67a0a3cb63 | 37415169cd9ab8bece8451f97d08bcec | Turn title music off and begin game loops | public class TitleMaker
public static void startGame(JFrame frame)
{
frame.dispose();
music.getClip().stop();
PvzWorld.selectWorld();
} | 1 |
f04c258e2c6505bfbd6401137d3f0478 | 45412f3a95636cd4c274496502c776ba | The name of the toolkit.
Returns | class BanditToolPlugin(ToolPlugin):
def get_name(self) -> str:
return "bandit" | 1 |
53df4b1a8fa0d9721e08031851c7293c | 1a719f4b73713ccb6cb4e9e034bbf395 | 生活在剑桥的交易员的所有交易额 | public void test6(){
Transaction.getTransaction().stream()
.filter(transaction -> transaction.getTrader().getCity().equals("Cambridge"))
.forEach(transaction -> System.out.println(transaction.getTrader().getName() + ":" + transaction.getYear() + ":" + transaction.getValue()))... | 1 |
c17a6d86311e80cfe1de0dd12a70e3fc | ee1865f3008a54c7b52a1546a436cf07 | 全角转半角字符串 | def full_to_half(ustring):
ustring_ed = ''
for ustr in ustring:
ustr_code = ord(ustr)
if ustr_code == 12288:
ustr_code = 32
elif ustr_code >= 65281 and ustr_code <= 65374:
ustr_code = ustr_code - 65248
ustr_ed = unichr(ustr_code)
ustring_ed = us... | 1 |
8d3d88d8b13bf9657e498c6faf1a53cb | 93f7b26d6c9ea807ee556a350cda361d | Validates a SIN number. Uses method from http://www.ryerson.ca/JavaScript/lectures/forms/textValidation/sinProject.html | {
var days = new Array(31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
var check = new Array(2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5);
var ssn = new Array(13);
var temp, year, month, day, tot, chkNum, i;
if ((ssn1.length != 6) || (ssn2.length != 7))
return false;
for (i = 0; i < 13; i++)
{
if (i < 6)
ssn[i] = ... | 1 |
77aba0faa1a11f6bf990032fdec10997 | 971d40e9bbe0a4bca7182ad59f094c7e | Create an instance of {@link STXCmdStatus } | @XmlRegistry
public class ObjectFactory
public StatusLayout createStatusLayout() {
return new StatusLayout();
} | 0 |
3f3b0ad5ecebdd9ca1ef0afb1c321ce2 | 298fe6dc7076c01915c983a61be837d6 | @brief 3DNR disable function | {
cal_cal_SetCAL3WithMask(QN_CALIB, CALIB_MASK_ROS_CAL_REQ, MASK_DISABLE);
cal_cal_SetCAL3WithMask(QN_CALIB, CALIB_MASK_ROS_CAL_REQ, MASK_ENABLE);
#if CONFIG_CALIB_ENABLE_INTERRUPT==FALSE
while (!(cal_cal_GetSR(QN_CALIB) & CALIB_MASK_ROS_DONE_IF));
cal_cal_ClrSR(QN_CALIB, CALIB_MASK_ROS_DONE_IF);
#if ... | 0 |
6ce50212f35edc017ad2af594c826da2 | 15329e15ebe508ecf219b31b1ed00184 | Solve the upper triangular system using back-substitution | def solve_upper_tri(r, b):
x_list = []
for n in range(b.shape[0]-1, -1, -1):
x_left = b[n]
for i in range(len(x_list)):
x_left -= x_list[i] * r[n, b.shape[0]-1-i]
x = x_left / r[n, n]
x_list.append(x)
x_list = x_list[::-1]
x = np.array(x_list)
return x | 1 |
f513651d82a944a02ffdadb7683b72e7 | 0de751278a25eac1e5f14db2d687724e | Checks if all cases and controls have been checked. | class SledControl_MainWindow(QtGui.QMainWindow,Ui_SledControl_MainWindow):
def isControlGroupBoxChecked(self):
value = False
value = value or self.modeGroupBox.isChecked()
value = value or self.joystickGroupBox.isChecked()
value = value or self.feedbackGroupBox.isChecked()
return... | 0 |
13a4a25db3c0b9d9f725dfa17beac3f4 | cb3889cf49bfb540f5e8af9b1a0d2b48 | Specifies list of files/folders to delete before build step. Accepts glob patterns. | class TriggerBuildArtifactsArgs:
def objects(self) -> Optional[pulumi.Input['TriggerBuildArtifactsObjectsArgs']]:
return pulumi.get(self, "objects") | 0 |
c49de74fdc9b21c9b36f88ed2a77a1ab | f3f527760b32390547cee32f9fa15d3a | ConfigSettingsLoader constructor. | class ModuleConfigLoader extends ConfigLoader
protected function __construct() {
parent::__construct();
} | 0 |
7c4829e89c5c6ffec6707c6ee59ae1b5 | b2304cbc28c126aea0d55fc06d397e7e | 跳转到对账单下载页面 | public String toDetailPage(@Param("fpDm")String fpDm){
FpcyJgMobileVo fpcyJgMobileVo = checkFpAndUser(fpDm);
if(fpcyJgMobileVo == null){
return "forward:/wxqyzh/myBill/illegalPage.html";
}else{
return "weixinqy/invoice/details";
}
} | 0 |
c098e75bc5efc4c8c9ebdcdbac5f9ca2 | 9a5b6f32f6bb4f7eb6dd758fd2075fd3 | Computes the plane's geometry. | function PlaneGeometry(width, height, widthSegments, heightSegments) {
Geometry.call(this);
this.buildGeometry(width, height, widthSegments, heightSegments);
} | 1 |
e115ebbece4fc216b37f12f77864730c | ebab1f6b66712149fc7761b860237ef9 | Return information about the first video found in a collection with the
supplied file name. | namespace MCEBuddy.Globals
[OperationContract]
MediaInfo GetFileInfo(string videoFilePath); | 0 |
4cb175362c1b96bc02a2c55843e7f1e6 | f6e242e93774581caa0f3a9eb54ae7e9 | This will load the microcode to the processors. | EFI_STATUS
ReLoadMicrocodePatch (
IN EFI_MP_SERVICES_PROTOCOL *MpServices
)
{
UINT32 FailedRevision;
UINTN CpuNumber;
EFI_STATUS Status;
Status = InitializeMicrocode (
mMicrocodePointerBuffer,
&FailedRevision
);
WhoAmI (
&mMpService,... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.