query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
922177539ae3a9678ae0ac5a4f422944 | c3cca1b269bfb4d3ad21bad059a35364 | Write a program to print a histogram of the lengths of words in its input.
It is easy to draw the histogram with the bars horizontal; a vertical orientation is more challenging. | int main() {
int c, i, j, state;
int wordsLength[10];
for (i = 0; i < 10; ++i) {
wordsLength[i] = 0;
}
state = OUT;
i = 0;
while ((c = getchar()) != EOF) {
if (state == IN) {
++wordsLength[i];
}
if (c == '\t' || c == ' ' || c == '\n') {
... | 1 |
eae8fb47715dad76c39208fcd5adcd0e | ff2b64e13a12d6930f537754d9bfd5fb | Generates a version of the <see cref="Message"/> with the specified expected and actual values. | {
if (Comparer.Equals(Expected, Actual))
return NoProblem;
else
return OwnProblem.Concat(_SubMessage("Expected", Expected)).Concat(_SubMessage("Actual", Actual));
} | 1 |
c695db52b7b4948f665c6cec5eacfb95 | 0fd94cbd1830ef95a1d4dc5dbe08d500 | Deletes a map choosed by user from the maps list. | class MapsController extends Controller
public function destroy($id)
{
Map::destroy($id);
$this->redirect();
} | 1 |
f7ac936e617b3ee76801c33005f9a396 | 99608f8415d9c48ed96ab97cf9757ad2 | 获取所有的JobGroupName | public class JobScheduler
public List<String> getJobGroupNames() throws SchedulerException {
return scheduler.getJobGroupNames();
} | 1 |
edbd3906522e6e91155b52d702e78822 | 68a1121523f71b6df2c415ee7bc0fc76 | Tipbox class to track single-tip usage. Tips are taken/placed column-wise
starting from {row,column} given in 'origin', where row is 1 or 8 and column
is 1 or 12 | function Tipbox(tips, origin) {
if(origin.row === 1) {
this.getRow = rowFromIndexReverse;
} else if(origin.row === 8) {
this.getRow = rowFromIndex;
} else {
throw "UnknownStartPositionException: \"" + origin.row + "\"";
}
if(origin.column === 1) {
this.getColumn = columnFromIndexReverse;
} else if(origin.... | 1 |
de7b913aebee411370bee7e2f88b4a36 | 09cf23482716b29ec510ca9b3f3dca3d | return the 5 trigrams with the highest PMI | def metrics():
finder = BigramCollocationFinder.from_documents(reform())
finder.apply_freq_filter(10)
pmi_met = sorted(finder.nbest(bigram_measures.pmi, 10))
log_met = sorted(finder.nbest(bigram_measures.likelihood_ratio, 10))
raw_met = sorted(finder.nbest(bigram_measures.raw_freq, 10))
stt_met ... | 0 |
da9061aaaf815bf8bf8c306e25cfa6cf | b5f48d0259212850e0c35ba8b625cf42 | Start the pc input loop. | SIGNAL (SIG_PCINT)
{
handle_inputs();
} | 0 |
92fc184c22665b503323aa147197175f | 9fc1682bfb4f7234a4cb43595f78a299 | Set an ok message to be displayed in the status bar | function _setStatusBar(msg: string) {
if (msg.length > 0) {
myStatusBarItem.text = msg;
showingText = msg;
myStatusBarItem.show();
} else {
myStatusBarItem.hide();
}
} | 1 |
72521a0bbb0660d70b170248c1b46ed6 | b4e2cf8734cc5ff169da5c46d1481ddc | A valid query that returns 0 results should return an empty JSON list. | class WorkListViewTestCase(LibraryAPITestCase):
def test_get_work_list_with_query_empty(self):
self.authenticate(self.user)
self.work_query_test("", [self.work1, self.work2, self.work3]) | 0 |
8fca47b9b4e5aa0b6d5992123e1eaf73 | 269211cf9fd8d8d4f0440234418c966e | Determine Pch Series based on Device Id | IsPchN (
VOID
)
{
return (PchSeries () == PCH_N);
} | 0 |
16f1442aa5ad6a308c72920eb5cb652b | 7cbcae513b3dcbb1bc1403411382cf44 | Calculates time left on the timer as ms | time_left(ErlTimer *p)
{
Uint left;
long dt;
tiw_read_lock();
if (!p->active) {
tiw_read_unlock();
return 0;
}
if (p->slot < tiw_pos)
left = (p->count + 1) * TIW_SIZE + p->slot - tiw_pos;
else
left = p->count * TIW_SIZE + p->slot - tiw_pos;
dt = do_time_read();
if (left < dt)
le... | 1 |
d34f84e00d84f39b33dadb87b944fdc1 | 6c054d56e32a893902ff1d2bb956c137 | function to update temperature, humidity and alarms on display | public class MainActivity extends Activity
public void updateDisplay() {
((TextView) findViewById(R.id.displayTime)).setText(currentAlarum.toString());
((TextView) findViewById(R.id.displayDayOfWeek)).setText(currentAlarum.getDay());
} | 0 |
bcdcbe43f3a4ee38d1c8264d3c9e0cf8 | a3357a16ceef9143df1dd92d88d015c5 | ふりがなを取得する | public class EmployeeSearchForm
public String getNyushabi() {
return nyushabi;
} | 0 |
fee84a1bf4a469e48909989ca017477e | 87de1f5acc11101d879cc55b8bc93c30 | Определение параметров пагинации из Query String запроса.
Параметры:
- page (int) — Опеределяет номер страницы резльтатов, по умолчанию 1
- per_page (int) — Определяет количество результатов на одной странице, по умолчанию 10. \
Максимальное значение 100
- offset (int) — Начало отсчета для страницы, вычисляемое, если о... | def get_pagination_params(request):
page = max(int(request.query.get("_page", 1)), 1)
limit = min(int(request.query.get("_limit", 1000)), 10000)
order = request.query.get("_order")
reverse_order = order is not None and order.startswith("-row")
return limit, page, reverse_order | 1 |
a9c36f04b96c9ef7edff7debe75fe746 | 07c110127241441343a8a17990960a67 | 获取up的粉丝数 | class bilibili:
def get_up_followers(self, uid):
url = "https://api.bilibili.com/x/relation/followers?vmid=" + str(uid)
followers_page = json.loads(requests.get(url).text)
logging.info(followers_page['data']['total'])
return followers_page['data']['total'] | 1 |
644a3f981e7ca7b6efdcbd93b500ba29 | ba08cd5e5d4e5c23eeb577d4353a5812 | 史実年度前の研究に必要な日数を取得する | {
$limit_to_year = date('Y', strtotime($regularization_date)) + 1 + $in_year_qty;
$limit_to_date = $limit_to_year.'-'.date('m-d', strtotime($regularization_date));
$qty_left = (strtotime($limit_to_date) - strtotime(date('Y-m-d'))) / (3600 * 24);
$qty = $qty_left <= 0 ? 0 : $qty_left;... | 0 |
6b9114bd4e50fbf006af6494a1c73ed3 | 99073d68873af0d6781dde70c3132c68 | Handles the OnSelectedIndexChanged event of the ucResponsible control. | {
if (AD_WF_Responsible_ID <= 0) Set_Value("AD_WF_Responsible_ID", null);
else
Set_Value("AD_WF_Responsible_ID", AD_WF_Responsible_ID);
} | 0 |
41a4a4878b4c81cc185774b702b8cd8f | 19eb30ab436a7bee8132ab7e2c10b1a1 | calculate the wavelength of a diffracted photon given its angle of diffraction | def wv(z, w0v):
return w0v*np.sqrt(1 + (z/(pi*w0v**2/lambda_Dipole))**2) | 0 |
2c36594b7a7c4c907383fc7bb37236f0 | 3b6513ef1823b0d9c19fb01fb140f701 | 字符串判空(字符串为空的时候,返回true,不为空返回false) | function isNullStr(str) {
var s = false;
str = trim(str);
if ("" != str && null != str) {
s = true;
}
return s;
} | 0 |
65f190e02c7c681349af59d71734e218 | 8f1ecd035f01732f3527b7b4271b498e | 引数として受け取ったカードを
ループ処理で手札(Humanクラスで定義した変数=myCards)に追加 | for(int i = 0;
i<cards.size ();
i++ )
myCards.add(cards.get(i));
} | 1 |
c72b9b3461ad5048115d1775d6580e7c | dae4d389147dfceb20b5f199d7142e86 | Asynchronously creates a matching table: Matching Key => Data Object.
Note; must be called upon construction | public function createSyncMatching(
int $syncId,
array $data
); | 0 |
fb3bfd8ab68f7ac87da2254e5139237e | 9d98f2e31fe01f6a7fc192cec0fc262e | // 道庭解锁技能更新 | if CheckSkillUpdate(topology, skillId) {
skill := topology.SkillIdMap[skillId]
skill.Level = skill.Level + 1
skill.SkillFunc()
topology.SkillIdMap[skillId] = skill
RefreshParent(skill)
RefreshChildren(skill)
return
}
panic("技能未达到解锁要求")
} | 1 |
d843992f08e695218ace92cf2887eb1d | 5afac5b6f6b1043177c88e48ec3bd733 | Returns the meta object for the containment reference '{@link activity.PeriodicActivity#getStart <em>Start</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IfcScheduleTimeControl_ScheduleStart_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IfcScheduleTimeControl_Schedul... | 0 |
92b8a5241973c78a3dbf85aff15e591f | a6400d5e613ad7c663759afc4bc2e8f7 | Calculates test positivity and joins it with the input, if successful. | def addPositives(derivation, paths, positives):
for path in paths:
loopListsByPath = getLoopListsByPath(derivation, None, path)
geometryOutput = triangle_mesh.getPillarsOutput(loopListsByPath)
positives.append(geometryOutput) | 0 |
a652771d505fd57ba8da48ca734ad344 | 1d9956876feafb476d5f83733bffcc87 | there are more IP types than these, but I'm only handling the
ones I expect to see | class OTX
def valid_type?
%w[ip domain].include? type
end | 1 |
bffa5234793c54365a624abf61efdd02 | 64a3f47e2a9b199ea7767757bd9ac373 | Performs one-way synchronization from source directory tree to destination directory tree | {
this.SynchronizeDirectory(sourceDirectory, targetDirectory, true, false);
DirectoryInfo[] directories;
if (this.Recursive)
{
directories = sourceDirectory.GetDirectories("*.*", SearchOption.AllDirectories);
directories.ToList().Fo... | 1 |
b80f2233d6e72cbc1e33b21fd99c343e | bc933e1d991968623ee7c6422971f4cf | 根据员工编号获得非安转产通知 | @ResponseBody
public List<FarmWork> getNongByFenChang(int id){
List<FarmWork> list = farmWorkService.getNongByFenChang(id);
return list;
} | 0 |
e2a8a2dd87e3171d2aaae1e104a5fc1a | 6970ca1049ce4ac34871717b2ccee2c9 | Returns the data types of decoded item values, e.g. {@link NotesItem#TYPE_TEXT},
{@link NotesItem#TYPE_TEXT_LIST}, {@link NotesItem#TYPE_NUMBER},
{@link NotesItem#TYPE_NUMBER_RANGE} | public Class[] getTypeSequenceData(); | 1 |
2f647d61d60dad03780c6bc3f2d1ecbd | 94e69e195ca9da37e55beca21840e8ba | main work method for the DLL as far as Imagine is concerned | bool ExexpFBTarget::ImageIsDll()
{
return false;
} | 0 |
2a35350218ad84420f1f23ee0e852b0c | e0313f3427a8e585f786f56f0dc5df0c | Create the token contract. | function createToken(accountAddress, accountPassword) {
return createContract(accountAddress, accountPassword, CU.GetHahaCoinAbi())
} | 1 |
5b168f5134c52e1026d780eed116fcd0 | 7c094c40ef4966d73045675842f0cd05 | NewNSExecDriver creates the nsexecDriver | s := &service{
nodeID: config.DriverName,
config: config,
}
if config.ExecHooks != nil {
s.hooksVm = otto.New()
s.hooksVm.Run(grpcJSCodes)
_, err := s.hooksVm.Run(s.config.ExecHooks.Globals)
if err != nil {
fmt.Printf("Error encountered in the global exec hook: %v. Exiting\n", err)
os.Exit(1)
}
... | 0 |
9a1d9cf741c6213d39c9380d55054cdd | 77dc73b7b4a2a3346e202c197a0be483 | 添加字典数据
有相同的覆盖,没有就新添加
[不会删除]传入数据键值相关的所有数据 | if (this.itemsIdxByValue.containsKey(dictdata.getValue())
&& this.itemsIdxByName.containsKey(dictdata.getName()))
return;
this.items.add(dictdata);
this.itemsIdxByName.put(dictdata.getName(), dictdata);
this.itemsIdxByValue.put(dictdata.getValue(), dictdata);
} | 1 |
0c41b7c5d980f155cd745ddbc4de1937 | 9bddf44194b30c5a8ffc36c74c7c376c | Permission check for secret header. | {
if (
!WebSec::isReferer() ||
!WebSec::isContentLength() ||
!WebSec::isUserAgent() ||
!WebSec::isHTTPAccept() ||
!WebSec::isAcceptEncoding() ||
!WebSec::isAcceptLanguage() ||
!WebSec::isHTTPConnection()
) {
return false;
} else {
return true;
}
... | 0 |
5082402530e8a3646e88a60fedd24c7e | ed0e49d66cda3a402e0c9f22f01bd445 | 회원 취미 선택 통계 | @Controller
public class CountController
@RequestMapping("/studentHobbyCount")
public String studentHobbyCount(ModelMap modelMap){
HashMap<String, Long> hobbyCount = studentService.studentHobbyCount();
modelMap.addAttribute("hobbyCount", hobbyCount);
return "Admin/studentHobbyCount";
} | 1 |
31881b553c44a6640f41aafa923dda3f | 8dd7b99c8d1fbae428f5381d703a2058 | Handles the user clicking on the calibration button | namespace WTXModbusExamples
partial class Gui : Form
private void calculateCalibrationToolStripMenuItem_Click(object sender, EventArgs e)
{
_wtxObj.StopTimer();
_calcCalObj = new CalcCalibration(_wtxObj, _wtxObj.getConnection.IsConnected);
DialogResult res = _calcCalObj.S... | 1 |
36c5762495739c96f95554880aced319 | e6b73789ab8c6edc7d88686426e0f24e | Operaci�n que realiza la funcionalidad de consultar los
"avisos de posibles hechos delictivos" de acuerdo al estatus que se
recibe.
:idEstatus | def obtener_avisos_siniestro(request):
dajax = Dajax()
try:
cursor = connections['siobicx'].cursor()
sql_string = "SELECT * FROM vlistadoavisossiniestro"
cursor.execute(sql_string)
result = cursor.fetchall()
except:
return dajax.json()
return simplejson.dumps({'a... | 0 |
c5cdec498e301f021142f134636a9b9e | 14fb996f8796aa044c89580773a88969 | Gets the number of pairs in a hand | int size = 0;
for (String value : hand.keySet()) {
size += hand.get(value);
}
return size;
} | 0 |
62b657d60b76f6c894b88d6261c29888 | 5064fd385bd950608067ecba5e736efa | 查看childPhoto中所有的数据 | let sql = 'select * from childPhoto';
let ret = await pgdb.query(sql);
if(ret.rowCount<=0){
return 1
}else{
return ret.rows
}
} | 1 |
626b972cde4820e5422b72bbcc8ce0d8 | 146de25a526b9832f860295e1661c825 | Initialize pattern BMP load command.
DMD GUI calls this "PATMEM_LOAD_INIT_MASTER"
When the initialize pattern BMP load command is issued, the patterns in the flash are not used until the pattern
mode is disabled by command. This command should be followed by the pattern_bmp_load() command to load images.
The images sho... | gx_dc_pattern_load(gx_device_color * pdevc, const gs_imager_state * pis,
gx_device * dev, gs_color_select_t select)
{
int code = 0;
FINISH_PATTERN_LOAD
} | 0 |
cf6318e9dc31a332d2867e19f9de7633 | 8e081a8977a66b853857595f42b398f1 | Additive gains for a single feature. See additive_gains for explanation of additive gains | def get_gain(p, hdr, name=None, return_value=False):
return get_param(p, hdr, 'kw_gain', name, return_value) | 0 |
84a6c0ec597175ac1ca9fccfaa78c7aa | 38c9d5a5d44fc24be0e449009a864c8e | Verifica se um dado fornecedor está presente na comunidade | namespace BLL.Fornecedores public class FornecedorConsultaBL : DefaultBL, IFornecedorConsultaBL{
public bool existe(Fornecedor OFornecedor) {
string nroDocumento = UtilString.onlyNumber(OFornecedor.Pessoa.nroDocumento);
var query = this.query().Where(x => x.id != OFornecedor.id);
query = que... | 1 |
5dd9c40c142482805070c84428f26af0 | 08b2d30a511a217248bf70061adefecc | search the poetry db for results | function show_poetry(){
var now_text = $("#input").val();
var isbeing = false;
$(".txt_wrap").html("");
clearTimeout(outTimer);
outTimer = setTimeout(function(){
$.ajax({
type:"get",
url:"data/poetry.json",
dataType:"json",
success:function(data){
if (now_text == "") return false;
... | 1 |
3ff1b068c8735323d568d914254f9bf4 | 7f62b62d39f152432c02a943036d89a4 | 跳转到视图过期提示页面 | public ModelAndView sessionTimeout(UifFormBase form, BindingResult result,
HttpServletRequest request, HttpServletResponse response); | 1 |
7fa384ad3f1ac16f0ec7f1767528d2e6 | e52706b82155ceaf2c87151b96c68196 | Kicks off the bazel build task, returning a corresponding {@link ListenableFuture}. | CommandEnvironment env,
BuildRequest request,
BuildOptions buildOptions,
AnalysisResult analysisResult)
throws InterruptedException, ViewCreationFailedException {} | 0 |
4a40f77f49a9dc05bf6f61f80625e78f | 7c0fd46c60142f9eb1aa0b9f10122cad | Test if the incentive record is active.
Active means available for employers to use in for engagement programs. | public function isActive(): bool
{
return (bool) $this['UF_ACTIVE'];
} | 1 |
d0526187a97146e9eb0bea61eacb70c0 | 9510de273e1f7ed81f0009e3d872f94f | Enable pooling of arrays. This should reduce garbage collection during inert()/put(),
update() and delete() operations. | NetServer setUsePooledBuffers(boolean pooledBuffers); | 1 |
c7e86cd07efa6cf4fc6913faeb7c2078 | eb0ca0c8fbe7212edb693f337cc813c2 | 获取商店的名字和id的列表 | @Repository
public class StoreRepository extends BulkDataRepository<Integer>
@SuppressWarnings("unchecked")
public List<BasicDynaBean> getStoresNamesAndIds() {
return ConversionUtils.copyListDynaBeansToMap(
DatabaseHelper.queryToDynaList(STORES_NAMESAND_iDS));
} | 1 |
01200bd8b8a5005fd2e10c1dd16b87d7 | aa6c47e0c44bdb0c6f1e06c45e70b1df | Get checkout buyer email | class PayPalGetExpressCheckoutReply implements IPayPalGetExpressCheckoutReply
public function getPayerEmail()
{
return $this->payerEmail;
} | 1 |
4c66d57fce603307f286a954422b8fc4 | 5312b6b57814f01a1d5d1890aeed04c7 | funzione che legge le dimensioni di righe e colonne della matrice | printf("Please enter first matrix dimensions (row col):\n");
scanf(" %d %d", &row, &column);
if (row < 1 || column < 1) {
printf("Error\n");
GetRowCol();
}
} | 1 |
e3c33d7068610fdd371571ce48f61e4a | c71dbe765f1acc80ebc3cb23d87dc4f5 | Returns the application servers directory keys for the directories that
has to be cleaned up on startup. | class FilePermissions
public function getApplicationNonWritableDirectories()
{
if (!$this->applicationNonWritableDirectories) {
$data = [
DirectoryList::CONFIG,
];
foreach ($data as $code) {
$this->applicationNonWritableDirectories[$code] =... | 0 |
00529707bc1b32d874f186e55d11030d | 62f9282c36eafaab246d5b1198c48081 | Opens a dialog box to save the target merged XML file. | if (mergeDataDlg == null || mergeDataDlg.isDisposed() == true) {
Shell platformShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
mergeDataDlg = new MergedGridBiasDlg(platformShell);
mergeDataDlg.open();
}
} | 0 |
3464b717b7ef8e3963dbbc7a056c8ef0 | b65eee89ce3e209b36e04f723c756d6e | Create a particle cloud of size `num_particles` from the given occupancy grid. | (int, float) = 0.9):
self.N_particles = N_particles
self.reduced_rho = reduced_rho
self.box_length = np.cbrt(self.N_particles / self.reduced_rho)
self.coordinates = (0.5 - np.random.rand(self.N_particles, 3)) * \
self.box_length | 0 |
ce440dfb007d0cfeaefd30b5698bc383 | 5861a3bf8b6c4040fd45074565ea9492 | Draw multiple lines. | def draw_lines(ctx, ab_lines, stroke, stroke_width=1):
ctx.set_line_width(stroke_width)
if isinstance(stroke, gz.ColorGradient):
stroke.set_source(ctx)
elif isinstance(stroke, gz.ImagePattern):
ctx.set_source(stroke.make_cairo_pattern())
elif hasattr(stroke, '__len__'):
if len(st... | 1 |
9dfdbc2241f6947a67435a521da222ad | 762c1733b38b0ac08af7abb8820e2d2a | !
\brief Disable the divider of subout pin | static void UartDivisorLatchDisable(uint32_t baseAdd) {
reg32a(baseAdd, UART_LCR, ~(UART_LCR_DIV_EN));
} | 1 |
2532df069e1c59396e7aaf67e3fb1f69 | 6388d1057ee6040a16636920c82d53e0 | poll status register of chip until it's not busy or we timeout | def HRF_pollreg(addr, mask, value):
while not HRF_checkreg(addr, mask, value):
pass | 0 |
6ffcff79b1264d0379da2bdf7a01d6fe | bfe1dd5242014d4e4cb5404e252d360e | Check to see if InputSpecification property is set | public class InspireConformity
public boolean isSetInspireSpecification() {
return getInspireSpecification() != null;
} | 0 |
a7e3a3a1d9c9e29b5f792d0fe5ec6229 | 392f172add80c29263266bfc25377711 | Returns the html markup for a "sync users" action | {
$html = array();
$html[] = $this->renderGroupDetails();
$html[] = $this->renderGroupUsersTable();
return implode($html, "\n");
} | 0 |
60b49ee8eab575f1fd78e18c94818074 | 867543d2be058057efd499e8bec7ee78 | Smarty addparam modifier plugin | $objFormParam->addParam('mode', 'mode', INT_LEN, '', array('ALPHA_CHECK', 'MAX_LENGTH_CHECK'));
$objFormParam->addParam('plugin_id', 'plugin_id', INT_LEN, '', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
$objFormParam->addParam('plugin_code', 'plugin_code', MTEXT_LEN, '', array('ALPHA_CHECK', 'MAX_L... | 0 |
976bad42426269c8d8386ae69b6af7a4 | 925c563f5e9577c2d0b4e2f6f50f82c4 | ISO8601(UTC)形式の文字列をepoch timeに変換 | class SolrWatch:
def get_epoch(self, date_str):
pattern = "%Y-%m-%dT%H:%M:00Z"
return int(time.mktime(time.strptime(date_str, pattern))) | 1 |
e31ee9f1a4907b53fde2eb940614b4be | a5527142ef20bc0b79e1de72a69f734e | 去除细化后图片中堆积点,使之成为单像素宽 | class code_two_pixel_line():
def remove_pi(self):
self.remove_ridge()
while 1:
remove_point=0
for x in range(1,self.width-1):
for y in range(1,self.height-1):
r, g, b = self.pix[x , y]
if r == 255 and g == 255 and b == 255:
... | 1 |
33fdd957cc693961e45508381456247b | 6df31c8f2014c919a7d602b84a3c366a | constructor method, invoked while object being instantiated. | class vehicle ():
def __init__(self):
print("Calling constructor i.e.__init__")
self.val=0
self.cost=10000 | 1 |
8f2c4515279ce6144d65b6a4949ecf11 | 850f3cfec1b425a98bc896dbe0bd8dde | 根据老师ID获取该老师申报的课题清单 | @Service
public class SubjectServiceImpl implements SubjectService
@Override
public List<SubjectImpl> loadSubmittedSubjectByTno(String teacherId){
return mapper.loadSubmittedSubjectByTno(teacherId);
} | 1 |
5ace891ea757c361a6e32774a5378895 | 7fc72c63238a3062d8054b2a82b3a20c | ## meta model GP negative log likelihood function | g <- function(theta, gpsepi, dab)
{
newparamsGPsep(gpsepi, d=theta)
-dllikGPsep(gpsepi, param="d", ab=dab)
} | 1 |
caecc8975832e2c435b14d997f15c1af | c5959ee113115a37e0f01053ff56fb5a | Valida inscri��o estadual do estado do Distrito Federal | @WebService
public class InscricaoEstadual
private void validaIEParana(String ie) throws Exception {
if (ie.length() != 10) {
throw new Exception(this.QUANTIDADE_DE_DIGITOS_INVALIDA);
}
int soma = 0;
int pesoInicio = 3;
int pesoFim = 7;
int d1 = -1;
for (int i = 0; i < ie.length() - 2; i++) {
if (... | 0 |
b98b8c6e9ed65a570f17493a4a5b96b9 | 6f81d336d4463db26a16b249293a2ee7 | This function handles the timer for vision loss.
It also controls the inefficiency multiplier due to loss of vision. | {
if (map.get_torus_y() && map.get_yl() < 3 * map.get_screen_yl()) {
const double ratio = map.get_yl() / map.get_screen_yl();
ttl = static_cast <int> (ttl * (0.20 + 0.26 * ratio));
}
} | 1 |
cf1d6219ebdcaeeb65cf469787e22f65 | 3f82aca05fa3d119316773183f440591 | change from window coordinates to view coordinates | function UpdateViewWindow()
{
if(initialYPositionOfViewWindow > endingYPositionOfViewWindow)
{
let temp = endingYPositionOfViewWindow;
endingYPositionOfViewWindow = initialYPositionOfViewWindow;
initialYPositionOfViewWindow = temp;
}
if(initialXPositionOfViewWindow > endingXPositionOfViewWindow)
{... | 1 |
7c75ca181ec5098fce4e38965764cf75 | ec43530c6688dbc6632817a65099e423 | Downloads a new map image of the specified size to be shown in the {@link MapPanel}
matching the specifed {@link Address}. | Image image = null;
JLabel mapImage;
ImageIcon icon;
try {
URL u = new URL( url );
image = ImageIO.read(u);
icon = new ImageIcon(image);
mapImage = new JLabel( icon );
mapImage.setSize(icon.getIconWidth(), icon.getIconHeight());... | 0 |
351e971a756719c8570e0dbb0279587f | 5aa3a37303260fec49565f3e4edbbed2 | Функция возвращает публичный ключ в виде массива байт | public class KeyGenerater
public byte[] getPubKey() {
return pubKey;
} | 1 |
66f033df09ac85b026007e048cb051f8 | 132f433f70c516483820a2384937e7c4 | metodo para agregar raza | {
$pagActual = 'razas';
$razas = Raza::where('raza','<>','Mestizo')->paginate(10);
return view('administrador.mantto.razas', compact('razas','pagActual'));
} | 0 |
2569d49605651037140df7c3aa5fc19e | 0465b44b645587100c63a06df55c4195 | Función para que el estudiante pueda ver los compañeros del curso y su información básica | {
$estudiante = Estudiantes::find($id);
$carrera = Carreras::find($estudiante->carrera_fk);
return View::make('estudiantes.show')->with('estudiantes',$estudiante)->with('carrera',$carrera);
} | 0 |
b1cc6f36fe95866a4b071e11e2eaa301 | 63654cbe185fd4ea11e7d3b224f95da5 | 所有时区ID | function timezone_identifiers()
{
return \DateTimeZone::listIdentifiers();
} | 1 |
6d1d43f058154b3a454cbc3be43b5c1a | 9d583aa9da8062fe6baa3f73a0f8c60b | Test the Mooring Area View API endpoint POST response when logged in as admin user. | class PromoAreaViewSetTestCase(TestSetup):
def test_api_post_admin(self):
self.client.login(email=self.adminUN, password='pass')
response = self.client.post(self.url)
self.assertEqual(response.status_code, 400) | 1 |
3b3b7e2a5014ea027b06cb5f7fe387aa | 607670e3b6311356b5ce0b4b51ae0a77 | Creates a Lua string wrapper from a byte slice. | TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
return luaS_newlstr(ls->LP, str, l);
} | 1 |
52c553a87ebf44f0408240b3bcdfd8fc | ebe81b581b3dfac24990bb5695a694c5 | Method to display reviewer and reviewee Schedule details | this.growlMessage = [];
this.stringMode = "UPDATE"
this.editTrue = false;
this.createTrue = false;
this.disableButton = false;
this.schItem.SCHEDULE_ID = this.SCHEDULE_ID;
this.schItem.DESCRIPTION = this.DESCRIPTION;
this.schItem.ORG_GROUP_ID = this.ORG_GR... | 0 |
4c9aad37e6ada200b52833bd5c059137 | 30fcbd0f89955f7be8b630d97b953816 | 입력에 맞추어 좌우 이동방향 선택 | global way_move
if (keys[pygame.K_LEFT] or keys[pygame.K_a]) and (way_move != 'right'):
way_move = 'left'
if (keys[pygame.K_RIGHT] or keys[pygame.K_d]) and (way_move != 'left'):
way_move = 'right'
if (keys[pygame.K_DOWN] or keys[pygame.K_s]) and (way_move != 'up'):
way_move = 'do... | 1 |
9b518a1d3e668fbdbb129ed9d719adad | 940ef7575390c1fda2e6c7256e78db67 | 根据物料id查询车系数量 | int selectCount(Integer commodTypeId); | 0 |
f3decfde2383cd7831d5867da5f4df2f | 79987691ae74ed75a9e702af188ab70c | Returns the parsed syntactic tree of the compilation unit | public AbstractSyntaxTree getAST(); | 1 |
d4b456360e889a4751fd07821c8ec16e | c56abab301b63419ede09b448fa76105 | Apply filters in reverse order, so they are executed in the order they were registered | public class ReceptionsModel implements DAOListener{
public void applyFiltersSequently(List<ReceptionsFilter> filters) {
log.info("Applying filters sequently..");
List<Reception> newFilteredReceptions = new ArrayList<Reception>();
notifyListeners(ServiceState.FILTERING);
for (Reception r... | 0 |
c70de9d21fa0e3590686fd6defd20cd3 | 05ba5afe11953df1e430b7808b22d7c7 | Removes the user from all groups and from the users list. | void removeUserFromGroup(User user); | 0 |
7219a2a8009ffa2ba0dc07e3190bfad8 | ffa9b08fbf5d594a500c31db6239b214 | 4D distance | class StatManager(object):
def dist_3d(self, pos1, pos2):
if pos1 and len(pos1) == 4 and pos2 and len(pos2) == 4:
x_dist = math.pow(pos2[0] - pos1[0], 2)
y_dist = math.pow(pos2[2] - pos1[2], 2)
z_dist = math.pow(pos2[1] - pos1[1], 2)
return math.sqrt(x_dist + y_di... | 0 |
28a66dd4b076eba7fff4ea3c29b201b6 | 5db2cd5210e4377435d87294e506e614 | Extract the sample names and variant sequencing information. | self.datasheet_cols = ['sample_name','fastq_fwd_file_name','fastq_rev_file_name','sample_type','host_phylum',
'host_class','host_order','host_family','host_genus','host_species','collection_latitude','collection_longitude',
'collection_date','collection_depth']
self.rows = []
sel... | 0 |
3dbceee0c64208fd51692d9ea531cd69 | 868ab3e6fed75756d6875fc67cea6d92 | Since chelli_shift seems to compute better results on small arays and relatively bad ones on big arays, we are going to write a function splitting the input into several parts, computing the shift on each part and then computing the average shift using the shifts computed no each part. We will use it in our algorithms.... | try:
if N == None:
N = min(multiprocessing.cpu_count(), len(partitions))
partitions_evenly = divy_lists(partitions, N)
pool = multiprocessing.Pool()
result_queue = manager.Queue()
if N == 1:
align_partitions(partitions_evenly[0], (outrootdir, img2flip)... | 0 |
23d2a80cb2ccbc987ae99e9c3b583ae4 | 9ceaff8468ab6ec23e970f9fd4848cfb | Do nothing here, as it seems we are better without it. | public class SleeNetworkActivityParser extends AbstractSanchoParser
@Override
public void fillContent(Footcloth fc) {
} | 1 |
d2a6c815fc90902007b65b0881a13d7b | 45cf0fd41dae89d4ee07438ad2f06953 | Check to see if WorkloadRemarks property is set | namespace Amazon.DatabaseMigrationService.Model
public partial class RecommendationSettings
internal bool IsSetWorkloadType()
{
return this._workloadType != null;
} | 0 |
971d0796fe07706972c5d615595c2643 | 9b69d767d8e9da4661204411cc0e069b | Returns the group spawn radius | public int getSpawnRadius(); | 1 |
cf496eb50e3f1a4d28089cc0ca4137ce | 57967c30d4033754e455df98f76fa970 | This is used to automate qsub submission of an array job to the CS
cluster at UCL, for processing a list of structural MRI (T1)
provided in a text file. | def qsubGIF(workingDir, textFileListOfFilenames, GIFversion = 3, JOBNAME = 'bigGIF'):
if GIFversion==2:
EXEC_LOC = '/cluster/project0/MS_LATA/GIF_old/bin'
GIFDB = '/cluster/project0/MS_LATA/NewGIFDB/db.xml'
elif GIFversion==3:
EXEC_LOC = '/share/apps/cmic/GIF/gif_3ab700e/bin'
GI... | 1 |
e5e4d015c74740aa88b78e3df434a394 | 37d08e9bc287efcf68e705ae9bc9f63e | 清除主题分类 | @Component
public class TopicBiz extends BaseBiz
public void delTopicClassify(String lastModifyUserId, Long id) {
topicService.delTopicClassify(lastModifyUserId, id);
} | 1 |
a3fe5deadd5488073a7e2f51cb02719f | eec50ad3a4f44d65d8fe3aae41703ff7 | Filters out todays assignments. | class ToDoItemService
async getTodaysItems (): Promise<Array<ToDoItem>> {
const allToDoItems = await ToDoItemRepository.getAll();
return allToDoItems.filter((toDoItem: any) => {
const itemDateCreated = toDoItem.createdAt;
itemDateCreated.setHours(0, 0, 0, 0);
const currentDate = new Date();
currentDate.... | 1 |
5ec6ec24f8452c74adb87f8fc287f5d7 | 6e2ad96ec5b96393bc0c1bc113352ec3 | Get current assignment for logged student. | class APILoggedTeacherAssignmentsController extends Controller
public function index(TeacherListAssignment $request)
{
return Auth::user()->createdAssignments;
} | 0 |
6dee968f04648cb930dd84cb08b29ed2 | fdd4e1a3d4fc79f747e318aff87c3ba2 | Get the height at a particular index, indices are clamped | namespace OSGB36.Interfaces
float GetHeightValue(int pIndex); | 0 |
7f5d1b2d96be22a11b9f9741c7531ab6 | 0b189c961171ed44fc132f9e30e79871 | 从nest map 取到指定key subKey的cfg | now = self._configDict
for subKey in key.split("."):
if subKey not in now:
return default
now = now[subKey]
return now if now != ConfigWrapper.SIGN_EMPTY else default | 1 |
d73efe8add6ae547c12f1de0689d8ac2 | 1239e48271c0ee77d7f8a307775ce53d | 根据用户ID得到用户的信息,第2个返回值表示在数组中的索引位置 | function getUserinf($userID){
try{
$dsn="mysql:host=localhost;dbname=web;charset=utf8";
$pdo=new PDO($dsn,"root",'');
$stmt=$pdo->prepare("select * from web_user where userID=:userID");
$stmt->execute(array(':userID'=>$userID));
if($stmt->rowCount()){
while($row=$stmt->fe... | 0 |
cf9adea971a09054c804ce737632acf7 | 2b6ccc4e842023e4d2fa9a3865e311b1 | Check if user wants to start program in terminal mode or execute a script | def start_from_terminal(app): | 0 |
55f6960724e7ee8229a5286885fea67e | f19a4054b15a451c9d89c5bd947bb21f | Fait une convolution avec une matrice 3x3 sur une coordonnée | int convolution2D(int posy, int posx, const unsigned char *input, char operator[][3]) {
int i, j, res;
res = 0;
res += input[(posy - 1)*SIZE + posx - 1] * operator[-1+1][-1+1];
res += input[(posy - 1)*SIZE + posx + 0] * operator[-1+1][0+1];
res += input[(posy - 1)*SIZE + posx + 1] * operator[-1+1][1+1];
res += in... | 1 |
4ab721b91f0491031f89fd44b02edd6e | cebacb8910e51e03382a9c26d9d63f1b | Specifies how the input video will be resized to fit the desired output resolution(s). Default is None | @SuppressWarnings("BooleanMethodIsAlwaysInverted")
public class LoadOptions extends DownloadOptions
@NonNull
public LoadOptions setResize(@Nullable Resize resize) {
this.resize = resize;
return this;
} | 1 |
7129b841d637b59744615a1421c51ca5 | 5772f51b73fc69ca0e1c54cba58e33e1 | 获取 预计发车时间. | public class SscDeliveryPlanBasic extends BaseEntity{
public java.util.Date getEta() {
return eta;
} | 1 |
18c2ea708a60e2e6d86cae394581ac43 | e8be730c271536e272492b52f3a4fe18 | ดึงข้อมูล BOConfig | $prototype = (object)array('id'=>null, 'name'=>null, 'value'=>null, 'bconfig_id'=>null);
if(func_num_args()===0)return $prototype;
$name = func_get_arg(0);
$query = $this->getDatabase()->prepare('SELECT * FROM `bconfig` AS `table` WHERE `table`.`name` LIKE :name');
$query->bindP... | 1 |
86e2ce2127aa89f771d192c695cd3088 | 5606750909819eb2328c9065182e6e60 | 查询该代理商名称在标签表里是否有信息 | {
$this->load->model("agentinfo_model");
$res = $this->agentinfo_model->findUseName(trim($this->input->get('name', true)) );
echo json_encode( array('code'=>'200', 'data'=>$res ), true, 300 );
} | 0 |
b1609c700b895b70476c85c566ca8f4c | 5ef0c255a560f90f2911ef53ed37c9c3 | Returns the number of related Employeetermination objects. | abstract class Employe implements ActiveRecordInterface
public function countPermissions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
{
$partial = $this->collPermissionsPartial && !$this->isNew();
if (null === $this->collPermissions || null !== $criteria || $partial... | 0 |
5d7f7fa69235fe30a114c6ed6f58ebff | 96d184a1442268b3cb2b40313c3909e5 | Funkcja odpowiadająca za usunięcie albumu z bazy danych po double-clicku itemu w listboxie | {
if (e.RowIndex != -1)
{
if (e.ColumnIndex == 5)
{
MovieInfo.GetMovieInfo(Int32.Parse(dgvScrapeList.Rows[e.RowIndex].Cells["ID"].Value.ToString()), dgvScrapeList.Columns["path"].HeaderText);
MovieInfo.GetPoster(dgvS... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.