query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
8dc076482cd8400f52d26cad2331f1b4 | cb71e36310a40afed17fdca0b349d5c9 | Get the count of not completed rows. | abstract class DataSource extends \canis\base\Component
public function getDone()
{
return $this->total - $this->remaining;
} | 0 |
b94ea9f6f1b9373d55cbddee48bc505d | 98a717c59c0213a5b2e7d1e99f621172 | Make selection cursor follow the cursor. | class ProjectBrowserPage(ConfigurationPageBase, Ui_ProjectBrowserPage):
def on_followCursorLineCheckBox_toggled(self, checked):
if checked:
self.followEditorCheckBox.setChecked(True) | 1 |
ec6099970516e0ec999921d3bec1c46b | 8248489a825d738158af6df1e68596ab | Register the javascript block of Form.Onsubmit and Form.OnLoad
Put the content from hiddenfield to editonpro in Form.Onload
Put the contrent from editonpro to hiddenfield in Form.Onsubmit | {
$url_script = Yii::app()->getAssetManager()->publish(dirname(__FILE__).'/js');
$url_onfly = Yii::app()->getController()->createUrl(Yii::app()->getController()->id . '/onflyedit');
if( empty($this->dropDown) )
$this->renderTextScript($url_script, $url_onfly);
else
$this->renderDropDownSc... | 0 |
969a8acb3cd929364dbf670f044965b5 | ebc49ceae4fed86a8339a9a92c04a12b | Test that ATM adds fee transaction | t1 = Transaction(
self.account1,
self.account2,
10,
'ACME, Inc.',
datetime.date.today(),
"January's Salary'"
)
db.session.add(t1)
t2 = Transaction(
self.account1,
self.account2,
10... | 0 |
6715f9c17c7232f3e7257cafe1231c60 | 0830af41949a8328c93eb5019dbbeab6 | 渲染-编辑个人简介区域 | if (!record){
return;
}
var html = '';
var field;
if(ICON){
html += '<a href="' + tek.common.getRootPath() + 'http/ican/person/read.html?profile_id=' + record.id +'&show-close=1&refresh-opener=1" target="_blank">'
+ '<img id="user_icon" src="' + ICON + '" alt="" class="img-respoonsive" />'
+ '</a>';
}
... | 1 |
872a964c0dbbfc1581373e0d56cc69f2 | 41cb24bd073a7cecb79acdd6d77eae82 | 设置关于Em的全局监听 | appContext = context;
connectionListener = new EMConnectionListener() {
@Override
public void onDisconnected(int error) {
EMLog.d("global listener", "onDisconnect" + error);
}
@Override
public void onConnected() {
}
... | 1 |
3f3b0b2a8bb56c8661b1063b8e7a8abd | 9a4df0f2ab7289774854bcc2606fbc53 | Calculate the standard deviation of values of all elements in each dimension of a given Matrix. | def std(x, dim=0, keepdim=False):
return torch.std(x, dim, keepdim) | 1 |
55fde65286ee18a936509dd6468a3bd7 | d75b2496e1234dc2cf02d90d8515b99d | [Tin.Nguyen] - Lấy danh sách dữ liệu bảng Tỉnh/Thành Phố (Cat_Province) | namespace HRM.Presentation.Hr.Service.Controllers
public class Cat_GetDataController : BaseController
[HttpPost]
public ActionResult GetProvinceList([DataSourceRequest] DataSourceRequest request, CatProvinceSearchModel model)
{
return GetListDataAndReturn<CatProvinceModel, Cat_ProvinceEn... | 1 |
79285c327505d6ca09ec05acf08f217d | 3b8d52b068d957873d9c4089abb8043e | Returns the largest integer less than or equal to the specified double-precision floating-point number. | public static class MathExtensions
public static int FlooredToInt(double d) => (int)Math.Floor(d); | 1 |
6bedeefcea64a5fe3d1f22d4e1dd1af4 | 8e4ffcc8c4741b61ccf18f9b4120bf62 | Gets the script material question list. | def list_questions(wake, scriptid):
data = (yield from serverdata[0].select('question', ('id', 'type', 'description'), ('=', 'script', scriptid), wake = wake))
return [{'id': d[0], 'type': d[1], 'description': d[2]} for d in data] | 1 |
1625f7968be066b78190c31c6962d5bd | e4c4a60f3c55601056ff53e793e0ecbe | 时分秒加1 | void Time_AddSecond(TFullDateTime * pNow)
{
uint16 nDaysInMonth;
pNow->s++;
if(pNow->s >= 60)
{
pNow->s = 0;
pNow->min++;
if(pNow->min >= 60)
{
pNow->min = 0;
pNow->h++;
if(pNow->h >= 24)
{
pNow->h = 0;
... | 1 |
5487f72e98b89b701a3809600a6e57c3 | 87ca13c703503eec2eedd6c18ecea664 | Returns a click test runner (for shiv-info). | def runner():
return click.testing.CliRunner() | 1 |
65af327266d92ecdad56b79045b18547 | b2ee281c13b361608809f9b70a80ca60 | localizedcontroltype for ServerLoginControl | HBRUSH EXELicenseInformationDialog::OnCtlColor(CDC* pxDC, CWnd* pxWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor( pxDC, pxWnd, nCtlColor );
if ( pxWnd->GetDlgCtrlID() == IDC_EDIT_LICENSING_SERVER_PATH )
{
if( m_InitialServerPath.GetLength() < 1 && this->IsDirty() == false )
{
... | 0 |
80bab944cf0bcae1bc256d7de6959a17 | a97f8f5ab3735c755b42d8035c962dbb | Create an instance of {@link PositionTypeRHSRQ } | @XmlRegistry
public class ObjectFactory
public Position createPosition() {
return new Position();
} | 0 |
86e99f3c56b85b4c3be7239da640938e | db95bb5bf97908ddb01dd212acf08bfa | Check if an addon is part of the community repo. | def addonExists(addonName):
return os.path.isdir(getGameDir('addons/eventscripts/gungame/included_addons/%s' % addonName)) or os.path.isdir(getGameDir('addons/eventscripts/gungame/custom_addons/%s' % addonName)) | 0 |
69a7f907c8f9229e5618e2f0f518b1e2 | 6c22f06cd2b47b1170de70fde6616057 | Create primary (default) routing DataSource. | public DataSourceRouting getDateSourceRouting(); | 0 |
fc15fcf54e3168ec9d123ea965ddcf2b | 227cb1ed2b4da59db1315e3cd26d77a0 | Implements generic interface method to calculate the desired metric, in this case, the sensitivity. | pathogenicity_class_map=default_pathogencity_class_map) -> float:
confusion_matrix = ConfusionMatrix().calculate(score, interpreted_classes)
return confusion_matrix["tp"] + confusion_matrix["tn"] | 0 |
c01bead638a1077fcfc081eb898ae8b1 | c8177c3de9b2743b46a18a2c6f8775b9 | @brief Find the next empty space in the list from the start | {
int retorno = -1;
int i;
if(list != NULL && len > 0)
{
for(i = 0;i<len;i++)
{
if(list[i].isEmpty == TRUE)
{
*pIndex = i;
retorno = 0;
break;
}
}
}
return retorno;
} | 1 |
7fa3a8f0322f4824352461f2100ccfc6 | 477aa675801816e228236587855d10c6 | Returns statement for frequently used DB statements | {
beginTransactionStatement = conn.prepareStatement(BEGIN_TRANSACTION_SQL);
commitTransactionStatement = conn.prepareStatement(COMMIT_SQL);
rollbackTransactionStatement = conn.prepareStatement(ROLLBACK_SQL);
checkFlightCapacityStatement = conn.prepareStatement(CHECK_FLIGHT_CAPACITY);
safeSearchQue... | 1 |
2668aaa54944612e5513c7bd463289ef | 60393bc5e01250a22cc738cd470b6a74 | 获取所有安装的语言输入法 | public class AndroidInfo
public static List<String> getInputMethodList(String udid) {
List<String> list = ADBUtil.returnlist(udid, CAndroidCMD.GET_INPUT_METHOD_LIST);
return list;
} | 1 |
764ce8b5164ef4f349190c359d5e98e4 | b1a3256ed2dbb60b95dd2b1ae904e0a3 | Get the exposure cohort incidence rates. This function is not using a
proper incidence rate so this should be viewed as informational only
and not as a report | def get_rate(ages, kind):
if kind == 'mannucci':
return 5.3e-8 + 1.6e-5 * np.exp(-0.5 * ((ages - 50) / 10) ** 2)
elif kind == 'maoz':
return 2e-7 * (ages / 1e3) ** -1.1
assert ia_kind in ['mannucci', 'maoz']
if np.isscalar(ages):
... | 1 |
c2e48ec7bc29b9606a01021681572465 | bd7761a55f8c03c5e7de245359a9a652 | 存在しない url にアクセス | class TestMainPage(TestCase):
def test_access_denied(self):
self.assertEqual(302, self.client.get(self.url).status_code) | 0 |
70c2927ba2484577d58d0456c740e68f | de619a8f7b3f1964ad62b88b38e5472a | Gibt zurück, wie der Klassifikator ein gegebenes Sample klassifizieren würde | class NaiveBayes(Classifier):
def _predict_one_sample(self, sample: ndarray) -> int:
keys = self.dict_p_label.keys()
labels = list(keys)
probabilities = [self.dict_p_label[key] * np.prod([self.dict_p_feature_based_label[key][s] for s in sample]) for
key in keys]
... | 1 |
3a820fc8346d5fe0917d1e419b1b4fa4 | 11510042653f12235e50f284a1991f5c | Callback for Icon Button
This callback is activated when an icon button is clicked
NOTICE : it is used into mathml palette and SVG palette (the buttons displayed) | var iconIndex: string = $(event.target).data("iconIndex");
var iconId = this.icons[iconIndex].id;
this.updatePaneBorder(iconId);
this.apply(this.configurationKey, iconId);
} | 1 |
361ce26755c9bec3369797f6c7b7dc05 | ab6bd8d4bd813bd17e1e4dff30404807 | Returns the next nonce parameter | void ICHIPWIFI::getNextParam() {
sendCmd("WNXT", GET_PARAM);
} | 0 |
c417d8776cb208244fc8fec5c4dd84db | 75da8107ee4f2a2b9e46b587aa2b5fea | 将指定的路线隐藏 | namespace AWM.MapTileGeneration
public class BaseMapTile : MonoBehaviour
public void HideAllRouteMarker()
{
for (int routeMarkerIndex = 0; routeMarkerIndex < m_routeMarkerMappings.Count; routeMarkerIndex++)
{
m_routeMarkerMappings[routeMarkerIndex].m_RouteMarkerPrefab... | 1 |
48f1402df791d4f50c3ad1b72d8a3938 | e468f4fe68d5e67edde6964d9cc983ad | all the customers have been served | class Teller implements Runnable, Comparable<Teller>
public synchronized void doSomethingElse() {
customersServed = 0;
servingCoustomerLine = false;
} | 0 |
bad0b02379d314992c5afd6116a401be | 45aa0c42c7dc79ee40e66f9a950f699e | Generating the home score in the match. | matchres = get_matchres(playing_stat)
cum_pts = get_cuml_points(matchres)
HTP = []
ATP = []
j = 0
for i in range(380):
ht = playing_stat.iloc[i].HomeTeam
at = playing_stat.iloc[i].AwayTeam
HTP.append(cum_pts.loc[ht][j])
ATP.append(cum_pts.loc[at][j])
if ((... | 0 |
f0c001f0590255e3d8dab63316bb47bf | 22968922e249244f56c4b9fa073db36a | Возвращает средний индекс загруженности по всем шагам | if(($mark_count = count($marks = self::getMarks()))) {
$sum = 0;
foreach($marks as $mark) $sum += $mark['since_last_mark'];
return $sum / $mark_count;
}
return false;
} | 1 |
cb8f8ed1253bb19fb50b34bbe5283dc9 | ec5cfc997887ae5fb5b7c79e5c2af3fe | testIsFlagPassedYes creates a flag and mimics it being passed. Then, it confirms the flag was passed. | static Bool LOCAL_examplePassed ( Uint8 pruNum )
{
Uint32 *ptrflag;
Uint8 result_0;
Uint8 result_1;
ptrflag = (Uint32 *)&EXTERNAL_RAM_START;
result_0 =ptrflag[0];
result_1 =ptrflag[1];
return ((result_0 == FLAG1) & (result_1 == FLAG2) ) ;
} | 0 |
e01c1735118f66449625d291b03ca81f | f1e3ffc61454c327c6991e8a93c8e6ab | 跳转到云盘资源下载界面 | public ModelAndView home() {
ModelAndView view = new ModelAndView();
view.setViewName("WEB-INF/clouddisk/cloud");
return view;
} | 1 |
385ee16488569b2ab753362bd6511378 | 0cb998689f06aa2cc03b45bb4396f830 | To get the height each number takes. | height = max(ar)
count = 0
for i in range(len(ar)):
if ar[i] == height:
count += 1
print(count)
return count | 0 |
13b646231d33d6c373cbbe96cf726165 | 6c7bc8ca8f499033e145c1c08124113f | @brief Unlock the FLASH Option Bytes Registers access. | FLASH_OBProgramInitTypeDef OptionsBytesStruct1;
HAL_FLASH_Unlock();
HAL_FLASH_OB_Unlock();
OptionsBytesStruct1.RDPLevel = OB_RDP_LEVEL_0;
OptionsBytesStruct1.OptionType = OPTIONBYTE_WRP;
OptionsBytesStruct1.WRPArea = OB_WRPAREA_BANK2_AREAA;
OptionsBytesStruct1.WRPEndOffset = 0x00;
Option... | 1 |
0f81cb67525aa710eb19f67a41114a99 | 15ccd5b41a30ac905e984ab71f2c0938 | 设置附件数量 | $.ajax({
type: "POST",
url: "/iwebap/filenum/" + openbillid,
dataType: "json",
success: function(result) {
if(!result.success){
$.showMessageDialog({type: "info",title: "查询附件数量",msg: '查询附件数量失败!',backdrop:true});
}else{
$('#accessorymanagement').find("span").html(result.fileNum);
}
... | 0 |
bcfe526883d861e6d2ba30599b0ea8d6 | 5b7a4bcae4a38a03d8b5bf722431c024 | деление на минимальный | void Delenie(St &s)
{
Time m=Min(s);
Vec v;
Time t;
while(!s.empty())
{
t = s.top();
v.push_back(t/m);
s.pop();
}
s=copy_vector_to_stack(v);
} | 1 |
c850cd4ff8c064b53cfc485cdf339eae | 04948a1863ef6412fba1c5e0b8e05fe3 | Returns all the arrivals for a station for the current local time
CAUTION: This makes 2 API calls | start_time = request.GET.get('start_time')
end_time = request.GET.get('end_time')
route_tag = request.GET.get('route_tag')
stop_tag = request.GET.get('stop_tag')
validation_errors = {}
if start_time is None:
validation_errors['start_time'] = 'start_time is required'
try:
star... | 0 |
5e3c9c81aa39db4ca7ea0970e2653b4c | 5a8db96ef0efd28fa9312d2ab82e8739 | Lists all Visit models. | class VisitController extends Controller
public function index(): AnonymousResourceCollection
{
return VisitResource::collection(Visit::all());
} | 1 |
736a7c0b857e3f60fb1974f02df7e78b | 0e2a98595e6730010e1fd88e069de4f2 | this function is running to handle only one GET request or bunch of pipelined POST requests | @WebServlet(name = "pipelineSingle", urlPatterns = {"/pipelineSingle"})
public class pipelineSingle extends HttpServlet
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | 0 |
574ac7b5e8185c9307e74395ea90648c | 13d2d31763d244291562cf8c9b56e418 | リレー接続中の視聴制限タイマー満了時に通知される | namespace Replay
public sealed partial class MainPage : Page
private async void MediaCapture_RecordLimitationExceeded(MediaCapture sender)
{
await StopRecordingAsync();
} | 0 |
d136f7025e2bb601b20971bb9e4b2ffe | ec34bab1dde0c3ab7cfde53d986836f9 | Tests that a Translate builder with no source cannot construct modules. | class FTLResourceTests(FormatTestsMixin, TestCase):
def test_init_missing_resource_with_source(self):
path = self.get_nonexistant_file_path()
translated_resource = self.get_nonexistant_file_resource(path)
assert len(translated_resource.translations) == 1
assert translated_resource.transl... | 0 |
ff074e24fd4299595ed29fff23b148cc | 821e52418e65eae9f487dcf1a6e6a085 | @brief 初始化网关监听 | local res = lxnet.init(4096, 100, 2, 10, 1)
s_netmgr.listen = listener.create()
assert(s_netmgr.listen, "create listener object failed!")
if randport then
local beginport = 6000
while true do
if listener.listen(s_netmgr.listen, beginport, 1) then
break
end
beginport = beginport + 1
end
s_netmgr... | 1 |
77c217d72333f98414ed254889615368 | b29a62ee49473ed0482f836be626b87a | An implementation of saving to imitate arbitrary latency. | @Service
class PingService()
private suspend fun fakeLatency(fakeIt: Boolean) {
if (fakeIt) {
val sleep = Random.nextLong().absoluteValue % 10
if (sleep % 5 == 0L)
throw IOException()
delay(sleep)
}
} | 1 |
68bfb50ecc54585a9298617095f1aff9 | 409942c7aa3308fdd69fc86a770ea85d | 异步执行操作,将callable函数的操作结果做为func函数的参数 | def async_exec(func):
def wrapper(*args, **kwargs):
thr = Thread(target=func, args=args, kwargs=kwargs)
thr.start()
return wrapper | 0 |
006b2a313db3028a33b088bf49c5fb5e | e95ceda9a2d05a8db0010b19d398f749 | Get the buffered reader object from the file | public class IOUtils
public static BufferedReader getBufferedReader(String inFilename) {
try {
return new BufferedReader(new FileReader(inFilename));
} catch (IOException e) {
e.printStackTrace();
System.exit(-1);
}
return null;
} | 1 |
c2aee7179e7c1379f7589a9919e70f03 | ce5f2974305f0a2df1891d010c2e7ea0 | 控制显示一般兼职或者是勤工校招兼职 | {
$model = new jobwantModel();
$post = $this->request->param();
$where = array();
if (isset($post['keywords']) and !empty($post['keywords'])) {
$where['gjw.post'] = ['like', '%' . $post['keywords'] . '%'];
}
if (isset($post['tele']) and !empty($post['tele'... | 0 |
948288026a8a9a11758c06eb03a4f243 | ac3c9ed36fec3e1d8e1041562436037c | 编辑被选中的记录 | namespace FineUIPro.Web.Emergency
public partial class EmergencyProcess : PageBase
void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.Reg... | 1 |
b2d47090d006848b93761fbd7b40a67b | 0db6ef95114cbe9ece56068890f82740 | Check if any of the listening IDs are equal to the event ID and trigger the event | namespace SendKeyboard
class KeyboardManager
public bool CheckEvent(Event @event)
{
return events.Where(e => e.triggerKey == @event.triggerKey && e.triggerType == @event.triggerType).Count() > 0;
} | 0 |
33c9fdbda220cffea2c481c42313d3cb | 3312a868986298e9f67517cf147a1365 | Colors the picturebox property of this object to a specified value. | {
if (isDisplayBorder)
{
Bd.Visibility = Visibility.Visible;
switch (color)
{
case 1:
Bd.BorderBrush = Brushes.Red;
break;
case 2:
Bd.BorderBrush = Brushes.LawnGreen;
break;
case 3:
Bd.BorderBrush = Brushes.Blue;
break;
case 4:
Bd.BorderB... | 0 |
c3e38f5f5ce48519c7c1fad46e6e3520 | f504797ceba235e8316a1ffe9cce0ffc | multiple GUID pattern test. (invalid GUID)
source GUIDs are generated by Guid.NewGuid()
source data and output data are exactly same. | namespace Util.Tests [TestClass]
public class ConvTest
[TestMethod]
public void TestToGuidOrNull_Invalid() {
Assert.IsNull( Util.Conv.ToGuidOrNull( "1A" ) );
} | 0 |
ab206333bd3ac88f9d44698fefd6fcda | 239329997d0dea9e3eb764bde392d6ec | SI no hay proyectos al arrancar, creamos 3 para hacer pruebas. | def inicio(request):
pyc=proyecto.objects.all()
c = pyc.count()
return render(request, 'proyecto/inicio.html', {'i':i, 'c':c}) | 0 |
37ad1d71ab5ffe5300031f5041e201d5 | 2f74de3da5bbfaa0b04485032799ea01 | 检查是否是关键字或保留字,不允许定义为变量或函数的名称 | for(auto to: cur){
if((to >= 'a' and to <= 'z') or (to >= 'A' and to <= 'Z') or (to >= '0' and to <= '9') or (to == '_'))
continue;
return false;
}
if((cur[0] >= 'a' and cur[0] <= 'z') or (cur[0] >= 'A' and cur[0] <= 'Z') or (cur[0] == '_'))
return true;
return false;
} | 0 |
9b2d8f7ed21a34f7bcbf3f5c36b46de5 | 326b3c8e69c5f16cf4dd46944b9c2fd8 | Retrieves the configuration information for this site and checks
that the expected paths are all defined.
Will raise KeyError if an expected path has not been defined | class _ConfigBase(object):
def validate(self):
pass | 0 |
9f60e17b6c59dd2fe85591a8f1a661d5 | 624eb7ad404ac518c0e619bbf2debfe9 | Returns true if animations are enabled. | @Suppress("unused")
@OptIn(UiToolingDataApi::class)
internal class ComposeViewAdapter : FrameLayout
fun hasAnimations() = hasAnimations | 1 |
25cc2d8d931f05a8132caaa1b42b3694 | b42d5a488922089efca4e8c89b4bbb83 | shows error message and list of files with wrong checksum | $file_list = $this->checksum->getFileChecksums();
if(empty($file_list)) { echo "Nothing to check\n"; exit; }
foreach($file_list as $file) {
$current_checksum = $this->createChecksum($file['temp_file_path']);
Utils::writeEvent($file['id'], 11);
if($current_checksum == false) {
Utils::writeError($file[... | 1 |
683fb63bc90c5d341003174f5e0e4843 | d260f311f805ae8f014ac3b0109f9c79 | Graba en el archivo una l�nea con un dato num�rico sin decimales (int, long) | try {
dos.writeFloat(x);
} catch (IOException ex) {
System.out.println("Error al grabar el float.");
}
} | 0 |
d3d12e354f5de09caf08279b5eea6323 | 7a0a9c671e57bb22f44e31e8519eaa7c | 获取识别结果的区域坐标。数组包含 4 个元素 [x1,y1,x2,y2],依次表示区域左上点、右下点的横纵坐标。 | public class Algorithm
public native com.YinanSoft.phoneface.common.OtcRect[] Detect(int[] hPosit,
Bitmap srcBmp,
int nOptCfg,
long hEnvSet
); | 1 |
c09044d7eb1a9b8be6af13188dfef9bb | 252025e497de5f4d7e348c35e7828ccd | find the average encoder valuse of both right motors | public class Drive extends Subsystem implements SmartDashboardSource, Periodic{
public double getEncoderAverageDistance() {
return (getEncoderLeftDistance() + getEncoderRightDistance()) / 2;
} | 1 |
74adf0761f20d0a999dc136e5b91f4f9 | 17bb1a7acffd386920324d0a0fd81770 | 変更前を設定する。 | public class Difference implements IAuditDifference
public void setBefore(String before) {
this.before = before;
} | 1 |
6d76a25697150b1db1db2eb8cfa6ee6a | 480d16e53d03a30b6dd5adf467762d04 | Method to check the if the field is a currency field | public function isFieldType(); | 0 |
618986bfe1ea92cda798adb128ef4fa1 | 8a68209028e7a78919b72e4a0b6a45da | Remove all resource pools. | {
foreach (var spawnPool in SpawnPools)
{
spawnPool.Value.Clear();
}
} | 0 |
540ded9c9929f1ac13d8d3a36a0ac8cb | 673dc5ade80cad689ebc822850acfe93 | https://dom.spec.whatwg.org/#dom-node-issamenode | class DOMDocument extends \DOMNode
public function isSameNode(\DOMNode $node): bool {} | 1 |
383bdfe25061c6747740d4850cf700aa | 9ae7588300a9962fde8d59b2ca853594 | Gets the value of electrical power at the settlement. | public java.math.BigDecimal getElectricangle()
throws java.rmi.RemoteException; | 0 |
1722ae74726268e3560f5b4adedcd9e7 | ad3f48f7ced53f78f14db30fe17a94d1 | Enter a parse tree produced by {@link Protobuf3Parser#reserved}. | @SuppressWarnings("CheckReturnValue")
public class JavaScriptParserBaseListener implements JavaScriptParserListener
@Override public void enterReservedWord(JSParser.ReservedWordContext ctx) { } | 0 |
4e162f6034d8744be2e60e69c1fdea43 | 3bcd0d0507d9e3a90ab1a43810339c5e | Run an iterator function that might throw an exception. Call the callback with the exception
if it does or null if it finishes without throwing an exception. | EXECUTOR_SERVICE.submit(() ->
{
try {
func.run();
Optional.ofNullable(callback).ifPresent(runnable -> runnable.run());
} catch (RuntimeException ex) {
throw ex;
}
});
} | 0 |
5000c86d90414f36cefbecb6f88431ec | 17742b9f9060e8d05802b0c0e9f152e2 | Obtener los custom fields de ACF, dependiendo de el lengaje actual. | if ( !function_exists( 'pll_current_language' ) ) {
return $value;
}
if ( is_admin() || !self::is_option_page( $post_id ) ) {
return $value;
}
if ( !is_null( $value ) ) {
if ( is_array( $value ) ) {
$is_empty = array_filter( $value, function ( $value_c ) {
return "" !== $value_c;
} );
... | 1 |
fa1d18076a28aeed788df6e08c3c6b39 | f87f1bb47ce8aa08f5d5d1564cf1e5e4 | Permet d'avancer un horaire lors d'une modification d'horaire | class AdminServiceController extends AbstractController{
public function modifHoraire(Service $service, Request $request){
$formModifHeure = $this->createForm(ServiceType::class, $service);
$formModifHeure->handleRequest($request);
if($formModifHeure->isSubmitted() && $formModifHeure->isValid())... | 0 |
cf8059e5e0976b65cb0a532bcad28a5a | fcfd314c90201dfdf95997bf3e8ff418 | ボールの削除と落下アニメーション | {
GameObject[] piyos = GameObject.FindGameObjectsWithTag("Respawn");
foreach (GameObject obs in piyos)
{
Destroy(obs);
}
BallScript.ballList_yellow = new List<GameObject>();
BallScript.ballList_blue = new List<GameObject>();
BallScript.ballList_red = new List<GameObject>();
BallScript.ball... | 1 |
36c5f98387c9e0a017ba3c2456c64d63 | cfffae248efeab7aafcbeb11a7cd59f5 | IsErrorResponse checks if the message holds a standard JetStream error | if e, ok := err.(*Error); ok {
return e.Message == "Invalid token."
}
return false
} | 0 |
e03e33598a0b0b7de1e64706185364be | ebca42a6468d5e441ceeda66d83ad7ca | Garbage collection removes the unresponsive neighbors row from the routing table | public class RoutingTable implements Serializable
public synchronized void setUnresponsiveContact(Node n) {
int bucketId = getBucketId(n.getNodeId());
buckets[bucketId].removeContact(n, false);
} | 0 |
71aa401dc9945873751197e6f234f819 | de732295e929560bbd9cc8fabf2d7776 | Deletes an object Cntry from database | export class CountryService
static async delete(countryId: string): Promise<boolean> {
const retVal = await this.countryRepository.delete(countryId);
return retVal;
} | 1 |
b13470058ffcf8de87c21bfd36009fdc | d1fec6d3c402a037f24a90054ca9a7d4 | 更新T_QY_130222Int型字段 | public int create_t_qy_130408_UpdateInteger(String FieldName,int Num,int sid) throws Exception; | 0 |
0a5854db71eacedfa8bb8ad285ea3d89 | a95c617b78c16f9092c2d585319b2a56 | This method parses the given response and returns chart of
accounts object. | List<StockModel> processData (String pResponseData)
throws StockVisualizationException; | 0 |
b63b596a9143014a6a357d4fa2bdd7b3 | cc9965189caa127e8ba5db838d3544aa | @brief 고정된 크기의 오브젝트 풀을 만들고 타입별 분류를 위해 배열형 리스트를 타입수만큼 만든다. | public class LevelGeneratorBak : MonoBehaviour
void SortCellPrefabs()
{
roomPrefabs = new List<Cell>();
corridorPrefabs = new List<Cell>();
bigCellPrefabs = new List<Cell>();
foreach (var item in cellPrefabs)
{
if (item.type == Cell.Type.Room)
room... | 1 |
3df2d4be93a6ea4a49ba1b3118f949e9 | 7a5ed8c6be4af5632e83fc265d994785 | Decodes a base64 string (formed by long_encode) into a long | function base62decode(s) {
var digits = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
var result = 0;
for (var i=0 ; i<s.length ; i++) {
var p = digits.indexOf(s[i]);
if (p < 0) {
return NaN;
}
result += p * Math.pow(digits.length, s.length - i - 1);
}
return result;
... | 0 |
e8b267c5a99a5a3c429054ed367b865a | 1bcd2b183a2a42472d9273784e313237 | 获取出库单号. | @Entity
@Table(name="lm_delivery_order_t")
public class LmDeliveryOrderEntity implements Serializable
public String getShipmentOutStorehouseNo() {
return this.shipmentOutStorehouseNo;
} | 0 |
4a9eb92e3e8a8102ef38a7c64eea02d5 | 2b04168d8ade1be2e98e2ff7e013822d | Initializes this shader-ring set object. | public class GlowRing : MonoBehaviour
void Start () {
} | 0 |
d090b68aa44b1d4e0bd0470c39de83dd | 85735d42af23f00d38c7a387a5c0c5b1 | sorts the words based on their part of speech; some go in multiple arrays | let sortedWords = words.map( item => item.split('').sort().join('') );
let uniqueWords = [ ...new Set( sortedWords ) ];
let countMap = {};
for ( let item of uniqueWords ) {
let arrIndex = sortedWords.reduce( ( acc, word, index ) => {
if ( item === word ) {
acc.push(index);
}
return... | 0 |
5b213943ff450c83649813cd3cfc2996 | 275f9b0ded348580066944ee95de0c84 | OR between 2 IndexList objects. What it does is take 2 IndexList
objects and OR's each element in the first and second list
respectively. | int r,count=0,l1=0,l2=0;
INT_list newlist;
int *tmplist;
int found;
tmplist=(int*)malloc(sizeof(int)*(list1->nr+list2->nr));
while(l1<list1->nr || l2<list2->nr) {
if(l1<list1->nr) {
tmplist[count]=list1->i[l1];
count++;
l1++;
}
found=0;
if(l2<list2->nr) {
for(r=0;r<co... | 0 |
09d25f069569577dc7ca885263f298a4 | 66b0e7d1ad983b887bbc8c9a0899a275 | 6A Calcular un �rbol de expansi�n m�nima (MST) con criterio distancia,
utilizando el algoritmo de Prim, aplicado al componente conectado (subgrafo)
m�s grande. | {
double MSTEdgesSum = 0;
int numberOfDistinctColors = distinctHashtable.Count;
MSTresult = new MinimumHeap(numberOfDistinctColors - 1);
Edge tmpEdge;
MinimumHeap edges = new MinimumHeap(numberOfDistinctColors - 1);
indeciesInQueue = new int[numberOfDistinctColors];
... | 1 |
afa9756b91d6db98c8ba3388628fe4a1 | 8ef231558bbc75ebc9e37e291bc1700a | calculates ambient occlusion value for a vertex | float Scene::ao(glm::vec3 *pt, glm::vec3 *n, float falloff, float intensity)
{
vec3 offset = *pt + *n;
float proximity = closest(&offset);
if (proximity <= falloff)
{
proximity = mCLAMP(proximity, 0.0f, falloff);
float colorMag = proximity / falloff;
colorMag = colorMag * intensity + (1.0f... | 1 |
da6a450c30e48259479013d00ee4608f | 69cdeea291b314027aaa5340f8d9e870 | Adds the Ness framework services to the application while
also pulling the application settings from the configuration. | namespace ScrobbleBot.Mapping
public static class StartupExtensions
public static IServiceCollection AddApplicationServices(this IServiceCollection serviceCollection, IConfiguration configuration)
{
serviceCollection.AddOptions();
serviceCollection.Configure<ScrobbleBotConfiguration>... | 0 |
03b0e98e7236d5260d68041ec1a47c70 | af449efcbca905420547e928ef01a17b | Populate Exams Data | let selectBar = document.querySelector('#selectBar');
exams.map((exam)=>{
let opt = document.createElement('option');
opt.setAttribute('value', exam.name);
opt.innerHTML = exam.name;
selectBar.appendChild(opt);
});
} | 1 |
877295f9c9ca88b4421254bee5b8b7ce | 5de211adec9a21339d494f57f4f64261 | 绝对值表示设置点数,增多补0,减少截取,正负号表示设置方向 | {
if (bool_point && display_number.size()>0) {
ui.lcdNumber->display(display_number += StrPoint);
bool_point = false;
}
} | 0 |
10f23fee774ea1791ae9395c709c00a7 | 7f61448ad6da3ef0f9cb03f40c5be655 | From includes/functions.php | cases like (1) | 0 |
57e5abc7638b96207375d2df9c332a1e | dd79e627235b54f07ac4862e9e87280e | Oculto el precio del producto. | export class ProductDetailsPage implements OnInit
ionViewDidLeave() {
this.seePrice = false;
} | 1 |
6266d9bb96d8203a2f15aef56ede6dc9 | 61ce3294b82eab65f003145def8d62b2 | Compares the department type of two Employee objects. | public class Executive extends Manager{
public boolean equals(Executive e) {
return(super.equals(e) && this.getOfficeLocation().equals(e.getOfficeLocation()));
} | 0 |
426203b565b7f80c17ef627e7bbb5f75 | 5b7482afb3961671123fbba5dfb52f78 | Tests that `_containerHas()` works correctly when using integers to check for numeric string keys in `stdClass` objects`. | class ContainerHasCapableTraitTest extends TestCase
public function testContainerHasArrayNotFound()
{
$subject = $this->createInstance();
$reflect = $this->reflect($subject);
$wrongKey = uniqid('key-');
$realKey = uniqid('key-');
$expected = false;
$container = [];
... | 0 |
61327b1ca8a21d748d1c9eb562fee7b5 | 8b1f9eb9728230133cfda3d6de78e969 | 返回GUID前缀 | namespace Mor.Common
public class Guider
public static string Create()
{
return Guid.NewGuid().ToString().Replace("-", "").ToUpper();
} | 0 |
dd861756e6c4fbfc588f1b436712961b | b9e2a73e40782cc86931920a5ee45c24 | Format dictionary data into InfluxDB string for upload | strings = []
for (key, val) in d.items():
if type(val) in [float, np.float64, np.float32]:
val = f"{val:.6}"
strings.append(f"{key}:{val}")
return ",".join(strings) | 1 |
136615424c9828e4389c54ae9c751e60 | 67bcc1fe44ec5c3fed5aa478d121f407 | иммитация кнопки добавления элемента в грид | function append() {
hide_notifications();
var node = $('#tg').treegrid('getSelected');
if (node) {
parent_id = node.id;
} else {
parent_id = 0;
}
$.post("/index.php/treegrid/edit/", {oper: "add", parent_id: parent_id, name: "Новый элемент", description: "Описание элемента"}, func... | 1 |
eb6e4d28dc346863656b0f92c9d12399 | 80da00bfe078585a6749a81dab4d4fcf | a student must have a first name | class FirstNameRequiredMixin(object):
def __init__(self, *args, **kwargs):
super(FirstNameRequiredMixin, self).__init__(*args, **kwargs)
self.fields['first_name'].required = True | 1 |
5aab2ef0ccfcd3a1650629b31b208be6 | fd568420c1af838a1ff09c7f363e4def | A convenience function used to set the upper and lower bounds in one call. | {
LiteralInteger lowerBound = factory.createLiteralInteger();
lowerBound.setValue(lower);
LiteralUnlimitedNatural upperBound = factory.createLiteralUnlimitedNatural();
upperBound.setValue(upper);
property.setLowerValue(lowerBound);
property.setUpperValue(upperBound);
} | 1 |
b07003b87d92b4373776fe2297008010 | d2c82bad95c0a938a35fc12446d72a22 | 添加几何点到指定索引处 | {
uint ret=EarthView_World_Spatial_Geometry_CCoordinateSequence_add_ev_uint32_CCoordinateSequence_ev_int32(this.NativeObject, object.Equals(coords, null) ? IntPtr.Zero : coords.NativeObject, index);
return ret;
} | 1 |
7a303dd666fb20c59dfad92c1fbcddc2 | fb4943c4c4922af219ca9a056daafeb6 | add or update module_admin | {
if ($request->has('module') ) {
if ($request->has('action') && $request->input('action') === 'add' ) {
CustomModules::toggleUserModule($request->input('module'), Auth::user()->id);
return redirect()->to(url()->current().'?'.http_build_query($request->except("act... | 0 |
c8774a7f3f64dddfe4ee2db9623fbfbf | 988d9b76af42a2360f7f62f7ec1fbbfe | 获取部门年度工资统计信息 | {
if (model == null || model.CompanyId < 1) return null;
return idal.GetEarningsDepartStatistic(model, base.HaveUserIds);
} | 1 |
adb0bb95234ea6fa94fd148ab7950a74 | 80424a21c55170cdad8dae39e5dcb14b | adapted from: https://stackoverflow.com/a/2533142 | function copyTextToClipboard(text) {
var textArea = document.createElement("textarea");
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
textArea.style.width = '2em';
textArea.style.height = '2em';
textArea.style.padding = 0;
... | 1 |
9a0126df3f2bbad379f5ba6a60b97e71 | c2a6d3e7936da31fdeb38e215f09123b | Update the notification dismissal option | class Whip_WPDismissOption implements Whip_DismissStorage
public function set( $dismissedValue ) {
return update_option( $this->optionName, $dismissedValue );
} | 1 |
edb6f08ab66d277a25635bcf0c32b105 | 7ad6befe822da84099d87c532621b4ad | Funkcija za zamjenu dva stupca generirajuce matrice | public class InitSudoku
private int[][] changeRows(int[][] array) {
int rows1 = random1.nextInt(gameType);
int rows2 = random1.nextInt(gameType);
int[][] array1 = new int[gameNumbers][gameNumbers];
for (int i = 0; i < gameNumbers; i++) {
for (int j = 0; j < gameNumbers; j++) ... | 0 |
63a13d8d26e6a73ec335c3bd60fcabff | c724d31cca0104aee45ac84e3a5b9a84 | Save contact list | public class ContactsDB
private static void saveContactDB(LinkedList cLst, PrintWriter pw) {
if (cLst.getFirst() != null) {
Node cur = cLst.getFirst();
do {
pw.print( cur.getName() + '\n' + cur.getNumber() + '\n' );
cur = cur.getNext();
}
... | 1 |
37fe2007d96f86833f31bb745844a625 | e13b0c8fff6b3e2a0f4093551b062eb0 | 增设课程种类:开设的课程将被添加到COURSE_DATA,课程序号添加到校区course_list属性中 | class School(object):
def add_schoolcourse(self, course_name, course_cycle, course_price):
newcourse = Course(course_name, course_cycle, course_price)
self.school_course[course_name] = newcourse | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.