query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
b622b9b50ce33c30ac6820ec4ad941c8 | fc0759bcc11478b6991ff201595a0114 | 打印一个字符串全部的子序列 包括空字符串 | public class SubsequenceFindSubstring
public static void allSSubStr(String s){
if (null==s||s.length()==0){
return ;
}
for (int i=0;i<s.length();i++){
for (int j=i+1;j<=s.length();j++){
subStringList.add(s.substring(i,j));
}
}
} | 0 |
d160cae00dc58b284325de7e301c117c | 5b5d1881c4b96cb4562c3290cda8a84a | Build standard validation / testing transformation for Histology networks. It includes, resizing, and normalization. | class ImageNetValTransform(object):
def __init__(self,
ds_metainfo):
self.input_image_size = ds_metainfo.input_image_size
self.resize_value = calc_val_resize_value(
input_image_size=ds_metainfo.input_image_size,
resize_inv_factor=ds_metainfo.resize_inv_factor)
... | 1 |
ba90df5454e10abed0b1144481124992 | d07d212de7ce2bec29f5845031356fa5 | desfaz a conclusão da cotação e marca como em andamento | namespace Glass.Data.DAL
public sealed class CotacaoCompraDAO : BaseDAO<CotacaoCompra, CotacaoCompraDAO>
public void Finalizar(GDASession session, uint idCotacaoCompra, CotacaoCompra.TipoCalculoCotacao tipoCalculo)
{
objPersistence.ExecuteCommand(session, @"update cotacao_compra set situacao=" +... | 0 |
80ed063625cd6addac1ba95c31ae4505 | 1da5c76a3412175bf523aa833ca565ac | Test that a user can NOT approve a content view request for content that
they do NOT own | response = self.client.get(odlcs_review_url)
self.assertEqual(403, response.status_code)
response = self.client.put(odlcs_review_id_url(args=[1]))
self.assertEqual(403, response.status_code) | 1 |
657d392959a2a18453b5f698126fcc8b | a1490a0c8f39155805d6c1f1badb21f1 | Stores and computes collision frequencies | Nisom = len(self.isomers)
Ngrains = len(self.Elist)
NJ = 1 if self.Jlist is None else len(self.Jlist)
collFreq = numpy.zeros(Nisom, numpy.float64)
Mcoll = numpy.zeros((Nisom,Ngrains,NJ,Ngrains,NJ), numpy.float64)
for i, isomer in enumerate(self.isomers):
collF... | 1 |
6d425b0db13a198eb5106a518fd8c403 | 2e2e84691f1f001ad0071b98aae4ec87 | 模糊查询商品 | List<TGoodsPO> like(Dto pDto); | 1 |
3f0663adb98a85550e70078e9b0c22ac | 3ffee1a57e191a7dad7a68f3c3ca16c5 | 02. Создание с кешированием,
при первой подписке начинается генерация чисел,
при каждой следующей числа достаются из кэша. | class MainActivity : AppCompatActivity()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
Observable.range(1,20)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
... | 0 |
354174edfb7b9e88cff57e629e9a874d | a01003a221667bfbdb389ecc4c8bbf0f | Get the currently active structure layer for this terrain. | {
unsafe
{
if(mTerrain == IntPtr.Zero)
return System.Guid.Empty;
Guid matId = System.Guid.Empty;
DllImportAPI.vTerrain_GetBaseLayerMaterial(mTerrain, &matId);
return matId;
}
} | 0 |
7dc85f719d7893ca4a022fab43c044b2 | 22c11c99ab2c052451875c797404624d | 直接执行单个系统命令并重定向到文件 | namespace ExecCommandHelper
public class ExecCommand
public int ExecSync(string exe_file, string args, string exec_dir)
{
_errcode = 0;
_errmsg = "";
_stdout = "";
_stderr = "";
try
{
ProcessStartInfo psi = new ProcessSt... | 0 |
8913191c11a831c61f5ebf8f2ba05de8 | f7e7a24f44cfc4d228359ae52ecfa3ec | \brief Switch UDP (USB) clock source selection to UPLL clock. | void pmc_switch_udpck_to_upllck(uint32_t ul_usbdiv)
{
PMC->PMC_USB = PMC_USB_USBS | PMC_USB_USBDIV(ul_usbdiv);
} | 1 |
e69e8d4bd728d5e65083dfa7c0a6f47a | f02bd5e71134c79bc8ee9fcd38c5611a | Gets called at the beginning of ``evaluate()``
Default implementation loads the best-performing checkpoint for
evaluation, based on stored metrics. | class ReactiveNavigationTrainerKeras(BaseRLTrainer):
def _eval_checkpoint(self, checkpoint_path: str, writer: TensorboardWriter, checkpoint_index: int = 0) -> None:
raise NotImplementedError | 0 |
d1752069e8a6b894754def84bfc79436 | 5c85d7c877dae708a0184d5361e129ab | Update the users notified dates
Setting this date enables us to throttle notifications sent to a user based on when
we last sent her one. We don't do anything with this information currently.
This could become a hot spot in patch storms, and can be disabled without ill effect.
It is tested, so if you need to disable it... | class ReviewAssignment extends DataObject
function setDateNotified($dateNotified) {
$this->setData('dateNotified', $dateNotified);
} | 1 |
67d21055fcaa225d05fade7e5e2f55c5 | 079f10b003add30b5e8823efe6a74561 | Disable the model used to view the node in editor mode. | {
#if UNITY_EDITOR
if (_meshRenderer == null)
{
_meshRenderer = GetComponent <MeshRenderer>();
}
#endif
if (_meshRenderer)
{
_meshRenderer.enabled = false;
}
} | 1 |
60ca584b46efdd0a67003744e96181eb | 04e86e28200bdf245e0e98be3eb9dad6 | 通过车主姓名查询缴费信息 | Connection conn = null;
ResultSet rs = null;
PreparedStatement ps = null;
try {
conn = ConnectionUtils.getConnection();
ps = conn.prepareStatement(findByName);
ps.setString(1,name);
rs = ps.executeQuery();
Fee fee = null;
... | 1 |
0dd046e8fad6990cb2b2eadd1811f91f | e1b69b5df890fb8933ccd2619586d145 | Sets user TrainingDone. | export class TrainingPlanViewComponent extends ProtectedComponent implements OnInit, OnChanges
setAsCompleted(id: number) {
this.planService.setTrainingPlanAsComplete(this.id, this.trainingSessionId).subscribe(response => {
this.checkResponse(response, resp => {
if (this.userManager.... | 1 |
0c4db213426a52dbbb24643526e8c88c | adfb8dd3398e8cc8191c4dae6f86d7a8 | GetIgnoreDirs returns dirs which should be ignored. | func WithGetIgnore(ignore []int) GetOption {
return func(r *transport.Request) {
}
} | 0 |
e270bfddcba6865b3f9ee9b485da3ea0 | 8ce9ba5faf7fa7b29d971ec947727a00 | State that the command should run in the foreground | ExternalCommand::ExternalCommand(const char *cmd_line):Command(cmd_line),cmd(cmd_line),isFg(false){
if(cmd.find("&") == std::string::npos){
this->isFg = true;
}
} | 1 |
c01ed945dbc227127a10ea4bba650f24 | 61897ba075dfe969c0b11e719dde33e8 | This method will be called to constantly lower the timer on the button buffer. | public void decrementPowerTimer(); | 1 |
5970e1fb133b310cf3eeea761d2213c6 | bf6d3305d610bebbd01d97038f267d0a | 班级对话框 | namespace Xmu.Crms.Web.ViceVersa.Controllers
[Route("/Student")]
public class StudentController : Controller
[Route("/Student/DiscussionClass")]
public IActionResult DiscussionClass()
{
return View();
} | 1 |
50ff72ec5c850374f8f9fd8e6b51d21d | f190f80be2dc69425ea926d5968565c8 | remove value from domain and check for any violations in the given sub-grid | var changeCount = 0;
for (var r = 0; r < 9; r++) {
if ((r < startExclusionR) || (r > endExclusionR)) {
var currentValue = gridValues[colNumber + (r * 9)];
if (hasUniqueValue(currentValue) == 0 && containsDigit(currentValue, valueSearched)) {
gridValues[colNumber +... | 0 |
8be1ad4299dcd9a2b80ed950d4bd5865 | 9af6e026218d607d2766756fb135c526 | 根据手机号和厂家编号获取用户信息 | namespace hc.epm.Service.ClientSite
[OperationContract]
Result<Base_User> GetUserInfoByNameAndPhone(string userName, string phone); | 0 |
127bce324e12b2e65123046c5d279f72 | 13b5e8a15c1e701162a1e3c88ef6c1d3 | Unity.Entities.Entity Unity.Tiny.Interpolation.LinearCurveFloat::GetKeysEntity() | IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float3_tB3DB6E304B40D8C4DA63622603E1671D83A2FDF7 InterpolationService_EvaluateStepCurveFloat3_m866F35758769100140D435B21A3642DB82F7DC6C (EntityManager_tD03BBAE8A03BE6E803E142278B44DADB1F999C14 * ___mgr0, float ___time1, Entity_t514FBEC5923A575B6549FFCE0A7E0928BBB9F3D8 ___entity2)
{
... | 0 |
1c15e9877bdd6b604e83476fe6fd32e6 | 7aec9557d0778e9adc4218e329413649 | 产生系统流水号,默认为四位 | if (s == "" || s == null) {
s = "0000";
}else {
s = s.substring(s.length()-4);
Integer codes = Integer.parseInt(s) + 1;
s = codes.toString();
int len = s.length();
if(len<4){
int prefixNum = 4-len;
for(int i = 0; i < prefixNum; i++){
s = "0" + s;
}
}
}
return s;
} | 1 |
d7a7f93b5de4ff72a98ff266d2a1fce8 | f0ba76f0e865fd5c6b0cc22db2ce299c | Configura y setea los adapters a sus respectivos elementos. | public class MainActivity extends AbstractActivity
protected void setUpAdapters() {
layoutManager = new LinearLayoutManager(this);
neoRecycler.setLayoutManager(layoutManager);
} | 0 |
1ab7a3eb2702f0bc576533706cf49c47 | f2f2cbf51138e75488da8ec38ddf3730 | returns the properties of a teacher in a readable single-line format | class Teacher(Employee):
def __repr__(self):
return f"Teacher('{self.first_name}', '{self.last_name}', {self.pay})" | 1 |
9e53173d85ba0d826f2930703ea7f4d5 | 31b88f9de63dd2fa8da064101fec8651 | The hasDigit method determines whether a string
has at least one numeric digit. | def has_digit(inputString):
return any(char.isdigit() for char in inputString) | 1 |
716a753636374d1e0168fabce22bc581 | 6f78e83927c8e4ce844fcb6254840175 | 根据学生或教师账号获取选题记录信息 | namespace PMS.BLL
public class TitleRecordBll
public TitleRecord getRtIdByTea(string stuAccount, string teaAccount)
{
return dao.getRtIdByTea(stuAccount,teaAccount);
} | 1 |
6e4e27725a71e8aac0f952e4afa3dbff | 6e6409be7a17ddd8dfb5a34c09c56a2f | Get the Int32Col Table interface for the schema. | ICFDbTestId32GenTable getTableId32Gen(); | 0 |
5bd5ccbc05452a682cceba167dbb64e8 | c8109db614cdd5fc4a8496aa14ddd4d6 | Visits the first page of the gamebook after the "Play Again" button has been clicked by the user. | namespace GameWinForm
public partial class GameForm : Form
private void nextButton_Click(object sender, EventArgs e)
{
shop.StepToNextGame();
currentGame = shop.CurrentlyViewedGame;
DisplayGame(currentGame);
} | 0 |
c747bcff12c6c2c224e004fda324f7eb | d5ec6aa5cc4887b066e0ca1623e92510 | Shape of grids. | class Obstacle(object):
def shape(self):
return (self._nx, self._ny) | 1 |
1f1c68c71ba09c389baeb5c6df19d902 | 75c599c8f2fee930575f12512c4afc8a | 测试删除区服 | result = True
api_name = '游戏区服下线删除计划-'
msg = api_name + '接口调用成功'
try:
url = CMDB_URL + 'GameServerOff.Delete/'
post_data = {
"project": "ssss",
"area": "cn",
"srv_id": '["5800001", "2100000023"]',
"... | 1 |
778ab9483d972130ec20e88198be5b84 | 8ce1c299d2de3d94135c791ae1faa138 | Returns if the user can fire on the spot that they click on. | class Player:
def can_fire_at(self, spot):
if spot in self.shots_fired:
return False
return True | 1 |
bd56949e01940fde364dbde255df761b | e6ec1577ef56a4b8e6317f55bfd44a0a | Show mentor registration form | class MentorController extends Controller
public function showEditForm($id)
{
$pageTitle = 'Edit mentor';
$language = "en";
$mentor = $this->mentorManager->getMentor($id);
$loggedInUser = Auth::user();
$enableSpecialtiesInsertion = !empty($loggedInUser);
if (!empty($l... | 0 |
9432ca53aaa96f56070c9dd1976ef732 | 5cafe7676d10473f95583914ab341b9a | Loads a .yaml calibration file, as generated by RGBDemo | FileStorage fs;
try{
fs = FileStorage("Matrix/stereoCalibrateUndistorted_432x240.yml", FileStorage::READ);
if (fs.isOpened()){
fs["MX1"] >> mx1;
fs["MY1"] >> my1;
fs["MX2"] >> mx2;
fs["MY2"] >> my2;
CalibrationMatrixLoaded = true;}
fs.release();}
catch(...){System::Windows::Forms::MessageB... | 1 |
f58d4e1800dbc63f58bd478accdb65f4 | 99c04902c8468514f5fee519d4cce73e | Called when the "Add..." button is pressed to let the user choose a
plugin to be added to the testing chain. | {
QFileDialog apDialog(NULL, "Add Plugin");
QString pluginDirTemp = projectDir();
if (!QFile::exists(pluginDirTemp)) {
pluginDirTemp = QDir::homePath();
}
qDebug() << "ProjectPropertiesDialog::on_addPluginButton_clicked - pluginDirTemp: " << pluginDirTemp;
apDialog.setFileMode(QFileDialo... | 1 |
b885c7e7291d0e8c7b81b163f1fc8c2c | c1cae8ac187cd48bb013812189d1a9e7 | Called when user click to item on the sub-category list. | {
sessionData.isAllCat = true;
Categories c = (Categories)e.ClickedItem;
this.Frame.Navigate(typeof(ItemDetailPage), c.category);
} | 1 |
5727110cc4e3e9ca14c190fde249f48c | d681d9be8a36c76605dd4b9df55632df | Wait for the asynchronous load of tournament music to finish. | public class GameManager : MonoBehaviour
private IEnumerator WaitForMusicEnd()
{
yield return new WaitUntil(() => (!musicSource.isPlaying && isGameEnd));
isMusicEnd = true;
} | 0 |
28b8e4879b6b57e06891c66bdef748ab | 606799f015c83f8858cc92a5abf97490 | Añadir extensión a un nombre base para generar un nombre de archivo completo para
una solicitud de firmado | String outDefaultName = inDefaultName;
if (inDefaultName.contains("$datetime")) {
SimpleDateFormat sd = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault());
outDefaultName = inDefaultName.replaceAll("\\$datetime", sd.format(new Date()));
}
return outDefau... | 1 |
904d14250d3e2893340d3846f12a0df2 | a3e94c08da3cbd05da4fe80e075fc25d | 判断节点列表中是否存在一个节点,用户对其有权限 | function haveNodes(node, node_list){
for(var i=0;i<node_list.length;i++){
if(node_list[i].name==node.name){
return true;
}
}
return false;
} | 0 |
d4c1a0df90a224578b58706890e3589b | ac50caf4cc6c880222896fedecf69b87 | @brief Resultat::afficherRes Affiche les résultats d'un morceau.
Affiche une partition avec le resultat. | void afficherResultat() {
for (int i = 0; i < (nbrDeFrac * 2); i = i + 2)
{
std::cout << std::endl << tabFraction[i] << "/" << tabFraction[i + 1] << " >>> ";
simplifieFrac(&tabFraction[i], &tabFraction[i + 1], calculerPGCD(tabFraction[i], tabFraction[i + 1]));
std::cout << tabFraction[i] << "/" << tabFraction[i... | 1 |
b85563f8eb44cff572cebf1db028a5bc | a6bc2064a0655f3256f68d3fdfcce948 | <p>
根据查询条件导出客户开发表中的数据<br/>
</p> | public void export(BusCustomerQuery query, HttpServletResponse response) throws Exception {
busCustomerService.exportCustomer(query,response);
} | 1 |
d8ecde0c9ac285117ef0864741a5ba17 | dfaadac563c428e096b331cd5198af2f | Delete generated question field from form. | class ConfirmDeleteForm extends ConfirmFormBase
public function buildForm(array $form, FormStateInterface $form_state, string $id = NULL) {
$this->id = (int)$id;
$this->getQuestion();
return parent::buildForm($form, $form_state);
} | 0 |
e5671dc35564d1bb67e79e61efad5002 | 05d9169d988dc510001bd80a8ef9799b | Return a new string based on s in which all letters have been converted
to uppercase and whitespace and punctuation characters have been stripped
from both ends. Inner punctuation and whitespace is left untouched. | op = unicodedata.normalize('NFKD', s.strip().lower()).encode('ascii', 'ignore')
op = str(op, 'utf-8')
op = re.sub('[\n\t\r]+', ' ', op)
return op | 0 |
f035f5c9c41b1f31bb0962874aef25a0 | 052f5843c8dada4d7bac8691f0667416 | Creates the SQLite database file on the disk and creates the desired tables within the database | {
try
{
var connection = new SQLiteConnection(getPathToDatabase());
connection.CreateTable<AppGlobals>();
connection.CreateTable<Activity>();
connection.CreateTable<Amenity>();
connection.CreateTable<MapTile>();
connection.CreateTable<Organization>();
connection.CreateTable<Role>();
... | 1 |
24bf40faf895e28c54ba6f3113633db1 | d42176884f02e68389b48826f949ddfd | @brief Set BCLK sampling edge for RX module | GD_RES_CODE brd_drv_set_rx_data_dir(e_brd_drv_dir_t e_rx_data_dir)
{
volatile avr32_gpio_port_t *gpio_port;
if(e_rx_data_dir == brd_drv_dir_in)
{
BRD_DRV_IO_HIGH(BRD_DRV_RX_EN_B_PIN);
}
else if(e_rx_data_dir == brd_drv_dir_hiz)
{
BRD_DRV_IO_LOW(BRD_DRV_RX_EN_B_PIN);
}
else
{
return GD_INCO... | 0 |
3734ed4861cae28ef3745f6f7a7132cc | 838339b4faae4e78976484d2b9c47e26 | Get Order total default multiplier value | class FinancingProgram
public function getFinancingProgramCartSizeMaxOrderTotal()
{
return $this->affirmPaymentConfig->getMfpValue('financing_program_cart_size_max_order_total');
} | 0 |
b074aa53117fafbc096ef50171a280d3 | 2e5a835442f645f6b096df2c6dae6244 | Complex fft wrapper (COMPLEX16Time ->COMPLEX16Freq. No error checking or padding! | class Frequency{
std::vector<std::complex <double> > FFT(std::vector<std::complex <double> >ar)
{
int n = ar.size();
if (n == 1){
return ar;
}else{
std::vector<std::complex <double> > fev;
std::vector<std::complex <double> > fo... | 1 |
712232bde19098b54e532bd6f4a01d86 | a149cc6704dab156f4b903721c01f896 | Called by test client to verify connection is ready. If this call throws
an exception, most likely the service has not finished starting yet. Returns
false if the main form has not finished loading yet. | public PsyBoolean psyReady()
throws PsyException; | 1 |
4c54a57b4fb99950c64863d330c1897b | a5b0ea3979fcf30e130288cc2b553775 | #医院及门诊列表接口 type 1为医院 2为门诊 3为药店 | def getBasicClinicInfos(type,S_id):
list = []
message = {}
try:
values = Clinic.objects.filter(type = type, S_id = S_id).values_list('id','lung3','date','detail')
keys = ['Cli_id','lung3','date','detail']
for value in values:
message = tools.dictPackage(keys, value)
... | 1 |
9b2e21c6b64c79a972628f6150ca7f3e | 856b4b397833ed244abc1c92adef9bb7 | Lexical Analyser | int main()
{
int a;
cin>>a;
SymbolTable st(a);
while(1)
{
char ch;
cin>>ch;
if(ch=='I')
{
string a,b;
cin>>a>>b;
SymbolInfo *s = new SymbolInfo(a,b);
st.insertSym(*s);
}
else if(ch=='D')
{
... | 0 |
e9f8ca702ff0bd77e37041496ef77468 | b5923a864757636b0e32c3890257367d | GET: Project
Returns the Create project site for logged in users. | namespace AuditReport.Controllers
[Authorize]
public class ProjectSitesController : Controller
public ActionResult Create(int? id)
{
if(id!=null)
{
ViewBag.ProjectId = new SelectList(db.Project, "Id", "Name",id);
}
else
{
... | 1 |
6b882a1d8cc12bc4f7d556d42d013be0 | 60c67589a22b29e1dc801366f1d928d0 | Getter for <code>Permission._ID</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.6.0"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class StlWebservicePermissionRecord extends UpdatableRecordImpl<StlWebservicePermissionRecord> implements Record4<Integer, String, StlWe... | 0 |
fd8fc9b7a9d52164a8c9fe6e8a4b4103 | 6c7fbab6190436fe1aa94f5dd146ce72 | check duplication timeoff with othertimeoff | @Repository
public class EssAppCheckDaoImpl extends SqlMapClientSupport implements EssAppCheckDao
@SuppressWarnings({ "unchecked", "rawtypes" })
private void otConflictWithOtApp(Map paraMap) {
try {
List<LinkedHashMap> returnList = new ArrayList<LinkedHashMap>();
returnList = this.q... | 1 |
6f010a62be5f9a96447e85d2b093012a | 12d45a966dd8367ee6aab6376893d2dd | 功能描述:设置扫地机线速度角速度
全局影响:无
输入:线速度值与角速度值
输出:无
2017-x-x 新建 | {
*rightSpeed = speedRight;
*leftSpeed = speedLeft ;
return 0;
} | 0 |
109c10c87c4afde3493f71e90865c2e7 | e09895444aab8c59db86a35df90f9fbc | 显示一个用邻接矩阵存储的图 | func AdjacencyMatrixTest() {
array := [...]string{"A", "B", "C", "D", "E"}
adjacencyMatrix := graphic.NewAdjacencyMatrix(len(array))
for i := 0; i < len(array); i++ {
adjacencyMatrix.AddNode(array[i])
}
adjacencyMatrix.AddEdge(0, 1, 1)
adjacencyMatrix.AddEdge(0, 2, 1)
adjacencyMatrix.AddEdge(1, 2, 1)
adjacenc... | 1 |
0b54b2ee8e1c6585745dd6b8b3c657e6 | fc2bcf538a74609681f499b1b6e426b1 | returns whether the Jython classes are present or not, i.e. whether the
classes are in the classpath or not | public class JavaGnome
public boolean isFound() {
return versionClass != null;
} | 0 |
f7e8db5bc25e8f750ab662f6010033eb | a53ca9e30a295f0ab02980890d239ecb | Test case for com_adobe_granite_bundles_hc_impl_sling_get_servlet_health_check | class TestConfigmgrApi(unittest.TestCase):
def test_com_adobe_cq_security_hc_bundles_impl_wcm_filter_health_check(self):
pass | 0 |
1e2909bd1fefebe21f5d517b4091ff33 | 11483d639c401b8eb68545be004fa3c7 | 根据题目获取对应的解题、解析、答案 | public class ExtractInfo implements Runnable
public void getInfoOfQuestion(Pair p){
String question_page=Request.sendGet(p.getText());
Matcher key_matcher=KEY_PATTERN.matcher(question_page);
Matcher question_content_matcher=QESTION_CONTENT_PATTERN.matcher(question_page);
int satisfaction_answer_idx=question_p... | 1 |
a6ad3abf37b5be7dfb81d76148bbbdc2 | 19c7c36404008ba3e00e2ef7f451238e | All enumeration types return [] if not provided with any variants. | {
lily_introspect_EnumEntry *introspect_entry = ARG_EnumEntry(s, 0);
lily_class *entry = introspect_entry->entry;
int is_scoped = entry->item_kind == ITEM_ENUM_SCOPED;
if (is_scoped) {
lily_named_sym *source = entry->members;
lily_named_sym *source_iter = source;
BUILD_LIST_FROM_... | 0 |
24a5c4558296d252414b102ba31f1fd8 | 62d3d0c274481ba22c6a9cd644dfefc2 | There must always be a valid material blueprint resource listener instance | if(vfMaterial != null)
vfMaterial.addMaterialColorListener(l);
if(colorListeners == null)
colorListeners = new ArrayList<MaterialColorListener>();
if(!colorListeners.contains(l))
colorListeners.add(l);
} | 0 |
81cbf619ee2b1cdd1c3c7af85d210134 | 3ae6201778d605bb7433a240ec9aa43a | Вернуться в корневой каталог. | public class Manager implements ManagerInterface
@Override
public void goToRoot() {
this.currentDir = this.rootDir;
this.show();
} | 1 |
f711e0cb5b5701d9916b90698db0487b | 2967dfd1a4639d5f315fbf2c76bd638f | Save the episode list in preferences | class ShowProgramFragment : Fragment(), OnItemClickListener, OnDeleteButtonClick
override fun onStop() {
preferences.save(APP_PREFERENCES_NAME, jsonHelper.robotCommandsArrayToJsonString(viewModel.programList.value!!))
super.onStop()
} | 1 |
77bd95bf044ee87862ce06ff2e2b4a20 | 102714e5a8754370807475621c26eb99 | Launch incoming task observer | Task Start(ObserverSubscription subscription); | 1 |
1f80fd38e105d0628913d259dbfa9dbf | 41ac57475523db615d9aaed258b9acd2 | Retourne la valeur à afficher par la JSP pour la zone : ST_CREANCIER Date
de création : (10/08/11 09:33:52) | public class OeAGENTCharge extends BasicProcess
public String getVAL_ST_DATE_FIN(int i) {
return getZone(getNOM_ST_DATE_FIN(i));
} | 0 |
0941242b66c871a34d9f72368d5a28d2 | 0cf91bf5c96bef717351b592acaa42e8 | Whether the Driver supports specifying a connection encoding | public void setParameterEncoding(boolean value) throws VersionNotSupportedException; | 1 |
06996b840f417876a889f2b6c6127b17 | 291a2068d1e91fd5f1a2d50942fa9fc1 | 更新专业信息 | "update t_professional",
"set user_id = #{userId,jdbcType=BIGINT},",
"professional_name = #{professionalName,jdbcType=VARCHAR},",
"professional_type_id = #{professionalTypeId,jdbcType=INTEGER},",
"region_id = #{regionId,jdbcType=INTEGER},",
"profes... | 1 |
cdbf04ed2c374e04fddf190b297d8b1d | bb5c40c403c4935d737e8d7c2c90b25b | Updates the map based on whether take away or sit in is requested. | if (!hasInternetConnection) {
return;
}
removeAll();
prevSize = mapSize;
String destinationAddress = address == null ?
"" : address.getAddressLine() + ","+ address.getPostalCode();
try {
String urlString = "http://maps.google.com/maps/api/staticmap?size="
+ mapSize.width + "x" + m... | 0 |
a6c16043eb467248e35a8c82c7a67fc4 | df56130f951ca4742004b5fbbd9da73f | Prints out tweets with username, text, and tweet information | namespace DeskTweetConsole
class Program
private static void PrintTweets(IQueryable<Status> statusTweets)
{
foreach (var statusTweet in statusTweets)
{
Console.WriteLine(Encoding.Unicode.GetString(Encoding.Default.GetBytes(statusTweet.Text)));
Console.... | 1 |
072dbdd47977f6baaa361a39b383168e | f9e2cd686d7cc6a605de0e2aba50d59e | 设置华为刘海屏手机不使用刘海区 | fun notDisplayInNotch(window: Window?) {
window ?: return
val layoutParams = window.attributes
try {
val layoutParamsExCls =
Class.forName("com.huawei.android.view.LayoutParamsEx")
val constructor =
layoutParamsExCls.getConstructor(WindowMa... | 1 |
2cb62ce30588aa0691d89f306fca0b97 | 0fc65c1a67072ef4051a5faf8301f97a | Summary:
图片/直播/故事集广场九宫格元素 | class BasePage:
# 系统九宫格图案
def get_nine_patter_grid(self,num:int):
if 1 > num or num > 9:
raise ValueError
nine_gird_ele = self.find_element_by_locator(self.nine_grid_locator)
rect = nine_gird_ele.rect
rect_x = rect['x']
rect_y = rect['y']
rect_height = rec... | 1 |
45d8a12a5e08fefa698d08654e44e10d | 301248731b74bef5d7681bccb454f3cb | Searching for enemy in character pool | {
SelectScriptablePool(prefabIndex);
m_CurrentEnemy = m_CurrentScriptablePool.Rent(true);
m_CurrentEnemyController = m_CurrentEnemy.GetComponent<EnemyController>();
m_CurrentEnemyController.ResetPosition(spawnPosition);
m_CurrentEnemyController.Reset();
ActiveEnemyCon... | 0 |
b86c72732f266a43aa973b69ecb3f598 | 45ee67fa536f84bf9dbbacff6a0ffb66 | Number of background threads that will simultaneously write to TSDB. | public class RocksDBConfigurationBuilder
public RocksDBConfigurationBuilder backgroundThreadCount(final int backgroundThreadCount) {
this.backgroundThreadCount = backgroundThreadCount;
return this;
} | 1 |
e12739798141fcd5e15d0c0f605ffeca | 6083aefa3d22b01ff0fe5d55272748e8 | Return the value of a defined variable, or throws
if the variable is not defined | class Context
public function getVariable($name)
{
if (false === $this->_variables->offsetExists($name)) {
throw new Exception\UnknownVariable(
'Variable %s does not exist.',
4,
$name
);
}
return $this->_variables[$name]... | 1 |
29409eccfac5231a650af4bf4355153f | eca19ba2af9272fc1265847ab954f1f4 | Selects one of the possible board locations to place tile | public class RandomAI extends BasicPlayer{
public int choose(Board myBoard){
int choice = rando.nextInt(myBoard.size()*myBoard.size());
try{
while(!myBoard.check(choice, getPawn())){
choice = rando.nextInt(myBoard.size()*myBoard.size());
}
}
catch(InvalidBoardException e){
System.out.println(e.getM... | 1 |
eb97d3b333cd5fb484b50aa3eb28a22e | 256d161bf527544ac0fea8b72c45574b | We want it as big as possible in the window, but still
maintaining the correct aspect ratio, and always
having an integer pixel size. | def aspect_scale(img):
(bx, by) = globals.SCREEN_SIZE
ix, iy = img.get_size()
if ix > iy:
scale_factor = bx / float(ix)
sy = scale_factor * iy
if sy > by:
scale_factor = by / float(iy)
sx = scale_factor * ix
sy = by
else:
sx = b... | 1 |
ab773b7c27bf307e006e79518b81ebdd | 37ce2dc1a5451ccd8b394d0103f6441d | Method that validates a signed PDF document. | {
Validation.ValidateArgumentRequired("signedDocument", signedDocument);
Validation.ValidateArgumentRequired("certificateVerifier", certificateVerifier);
ISignedContainerProfileService signedContainerService = XspFactory.Instance.GetSignedContainerProfileService(XspVersion.V_... | 1 |
643407554412f0ebd13b5413b16463d4 | b373585e5bdfd0e3db2e0573101f3dfa | 根据ip池id获取ip段列表 | function getIpList (options) {
return axios.get('/ip/subnetwork_list', {
params: options
})
} | 1 |
d8ad65cbaec0d47d084361e27191e689 | 6a9e791876ad3f5158e3b90133ac002a | @brief Initializes the USCI CC110x interface
The NWK layer will define its callback structure and pass the pointer to
this function. An application can also declare its own structure and call
this function in order to use the same interface. | {
#if (USC_MODE == USC_MODE_ECHO)
TIM_Config();
GPIO_Config();
#else
uart2_init();
kyLinkInit(&USC_PORT_HANDLE, kyNULL);
pRx = GetRxPackage(&USC_PORT_HANDLE);
#endif
} | 0 |
1ff872b1a268373447874cfeaa6b48df | 547dda8209aaf2736dde41cacb083c96 | 新增勋章 | medalTypeName, String medalTypeInfo, String medalTypeMig, DataCallback httpBack) {
OkHttpUtils.getInstance().post().url(getUrl(R.string.saveMedalType))
.addParams("c", c)
.addParams("collegeId", MUtils.getMUtils().getMem("collegeId","45"))
.addParams("... | 1 |
b28d5767f2349e4bf1ce67dcde759f6e | 20165f88a85961239493b07cd4014f82 | [ok]c2 | qs = u'\u305a'
res, results = self._common_normalize(qs, 'wiki', version=2)
DEBUG('results', results)
assert_equal(len(results), 1)
r = results[0]
c2 = u'\u3059\u3099'
assert_equal(r['text'], c2) | 1 |
f983d287c360aa7980ff3514e8a5bae8 | 4ce3df441529de8e6516454109e0f25f | This method returns the Sql Server User | public class DataAccess
public String getUser() {
return user;
} | 0 |
e1536c6e008e2cca32f8a58712c995f9 | 1b617b2f2a2af02f9ce2b3f77f73c045 | Take zonal stats of raster based on polygons in a shapefile. Note: this is meant for classifications. | shapes = ((geometry, burn_value) for feature in features for geometry in geojson_reproject(feature, srid, 3857))
bounds = tile_bbox(tile, mercator=True)
transform = from_bounds(*bounds, *ts)
try:
return rasterize(shapes, out_shape=ts, transform=transform)
except:
return None | 0 |
a555532d7741ac3678f07e8dd085fbbe | 1514a1963db0700fd6a41e2a2a216054 | This method is called when the "Product Barcode" field in the add item
batch view is changed by the user. | function onItemBarInputChange(e) {
var itemBar = $(e.currentTarget).val();
if(itemBar) {
getItem(itemBar);
}
} | 1 |
74e1fbc3ca1c286487c8e953ae5dfc66 | 23131d34172a789bc07b2cb90dac13e2 | MakeErrorComment adds a comment to the PR indicating failure. | func MarkdownComment(c *reviewdog.Comment) string {
var sb strings.Builder
if s := severity(c); s != "" {
sb.WriteString(s)
sb.WriteString(" ")
}
if tool := toolName(c); tool != "" {
sb.WriteString(fmt.Sprintf("**[%s]** ", tool))
}
if code := c.Result.Diagnostic.GetCode().GetValue(); code != "" {
if url :... | 0 |
d06e411dfcd726d5d024c534cfeee673 | 3fd6d26aa2b8236bc92ca12f6e0e7d6e | --| If the user double clicks on the notification icon, we display the program and remove the icon from taskbar | namespace CloudFlareDDNS
public partial class frmMain : Form
void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
ShowInTaskbar = true;
WindowState = FormWindowState.Normal;
} | 0 |
72ef9d02c3819167b667ab6372c2d4b8 | 2b2a9068aa54f6e3ea04e70d39bd8d1e | Le pide al usuario que ingrese su lugar a estacionar | class Place extends MY_Controller
public function agregarLugar()
{
$data = array('user' => $_GET['user']);
$this->load->view('place/agregarLugar', $data);
} | 0 |
ef72144015a6113adaf1daae2b4e3a64 | 85acadfa9e6035a0ea583700da585aaa | 将测试数据集合设置从头开始读取 | public class KafkaConsumer
public KafkaConsumer setConsumeFromBeginning(boolean consumeFromBeginning) {
this.consumeFromBeginning = consumeFromBeginning;
return this;
} | 1 |
f58a8cf8673ecbd0d4e93f6a46f8b2a6 | b8586be8ef1547eb87e60ed134a18e08 | 先释放之前的AudioBufferSourceNode对象
然后再重新连接
因为不允许在一个Node上start两次 | {
if (this._source)
{
this.enableTicker(false);
this._source.onended = null;
this._source.stop(0);
this._source.disconnect();
try
{
this._source.buffer = null;
}
catch (err)
{... | 1 |
d381ca587cfde3d0480745195b62b4d0 | 17f069b8900624e36c95f64b358409f7 | select auditor with less number of task pending to publish | {
string query = "SELECT Name, result.count FROM (SELECT EmployerID, COUNT(ID) AS count FROM Tasks WHERE Deadline < SYSDATETIME() AND NOT TaskState = 'Finished' GROUP BY EmployerID HAVING COUNT(ID) = (SELECT MAX(count) AS min FROM (SELECT COUNT(ID) AS count FROM Tasks WHERE NOT TaskState = 'Finished... | 0 |
0935de257a2cd9c322474557718340ca | 673ad60b38dc6b6c7daf8a2114e7a763 | Checks that dynamically defined and altered routes work correctly. | {
$request = ServerRequestFactory::fromGlobals(['REQUEST_URI' => '/articles']);
$handler = new TestRequestHandler(function ($req) {
$this->assertInstanceOf(Route::class, $req->getAttribute('route'));
$this->assertSame('/articles', $req->getAttribute('route')->staticPath());
... | 0 |
6488a61d25d17ef3f8fb55a2bcecf3f2 | 02f945a2c848020273fad74fd5e09779 | Modulate percent hue, saturation, and brightness of an image | class Modulate extends Transformation
public function transform(array $params) {
$brightness = isset($params['b']) ? (int) $params['b'] : 100;
$saturation = isset($params['s']) ? (int) $params['s'] : 100;
$hue = isset($params['h']) ? (int) $params['h'] : 100;
try {
$this->ima... | 1 |
3c8ca8fa4b9d439c8156dd98dcd365fe | 67d145caa56c4fa90781394276d93d86 | 实例化并返回一个头部View的Holder | abstract class AbsRvAdapter(private var datas: List<Any>) : RecyclerView.Adapter<AbsViewHolder>()
protected abstract fun createHolder(parent: ViewGroup, viewType: Int): AbsViewHolder | 0 |
70e9f5e0b1335197ec3cf813f833a756 | 2c4a4695d705c2945702ec61c1ea7ddb | show saved location data from database | public class NewMessageActivity extends AppCompatActivity implements LocationListener
private void setupExistingLocations() {
existingLocations = new HashMap<String, MessageLocation>();
final DatabaseReference ref = database.child("Locations").getRef();
ref.addValueEventListener(new ValueEventL... | 1 |
5527de7f88fbffe9d116467505c9f179 | 4186ea9a165a608b6dedc0749e3d11fc | map position value in pixels to position value on data axis | int halfbit;
if (gsw->w.g.width < gsw->w.g.height) {
if (gsw->dpos >= gsw->w.g.height-GWIN_SLIDER_DEAD_BAND)
return gsw->min;
if (gsw->dpos < GWIN_SLIDER_DEAD_BAND)
return gsw->max;
halfbit = gsw->w.g.height/2-GWIN_SLIDER_DEAD_BAND;
if (gsw->min > gsw->max)
halfbit = -halfbit;
return (((int)(gsw->... | 1 |
9608031a549a875245ac754db90b39ed | ace2c73a9c5c40edc9e3f58604f794ca | 根据mchId查询详情 | @Component
public class PlatformGlobalComponent
public ResponseData<MchResponseModel> getMchDetailForBusiness(String mchId) {
GetMchDetailForBusinessRequest request = new GetMchDetailForBusinessRequest(getAccessToken(),mchId);
ResponseData<MchResponseModel> responseData = execute(request);
logger.info("getMchDeta... | 1 |
bed6d62961a096fddfa9080772b57511 | ec537da3e492426903d223d39d62002a | déplace la pièce sur la gauche | square = self.blocs[nb]
old_value=self.ground[square.y_begin][square.x_begin]
y_new=square.y_begin
x_new=square.x_begin-1
if square.x_begin==0:
x_new=self.get_ground_x_len()-square.len
self.set_ground_by_pos(square... | 1 |
ca1578ab7a639e081ed8a49bf82027cf | eb8017724f66e0f1555128a54d1d4dd0 | Generator that iterates through a list repeatedly | def emp_gen(lst, n=0):
yield n % len(lst)
yield from emp_gen(lst, n + 1) | 1 |
1fb9cca912920b17d0413933366dd82d | a0090238098ae61061f91fc7f37abc0c | Get prefix from an OTP if present | {
if (preg_match('/^000>1([0-9]{11})/', $lines[1], $match)) {
return ltrim($match[1], '0');
}
return null;
} | 0 |
78733ae980af0e4e83b7b18bc5ef178a | 1243c6334b782d744f4c8340f70cff18 | 그리드와 교차하는 벽체를 절단한다. | {
for (int i = 0; i < grids.Count; i++)
{
if (!grids[i].IsWall)
{
for (int j = 0; j < width; j++)
{
if ((i >= j * length) && (i < (j + 1) * length - 1))
{
... | 1 |
f24a45159ae4e9bf24033836f2f7bfc8 | 77b04c2a71e38f5bc90f15c932373688 | 进入房间,完成发牌,然后创建子线程来进行房间内各玩家的通信 | SoundCtrl.getInstance().playSoundByActionButton(1);
int roundNumber = 4;
bool isZimo=false;
bool hasHong=false;
bool isSevenDoube =false;
bool isFollowBank = false;
bool isHuangJinSevenDouble = false;
bool isHaveFen=false;
int maCount = 0;
for (int i = 0; i < zhuanzhuanRoomCards.C... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.