query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
ada0335e36525ff881880b6802bc0a34 | ded5ad6a46193b0a5437bb020ed98357 | Convertit les minuscules d'un mot en majuscule. | {
var texte = trim(str);
var t = new Array();
var i;
for(i=0 ; i < texte.length ;i++) {
t[i] = texte.substr(i,1).toLowerCase();
if((i == 0)||(t[i-1]==" ")||(t[i-1]=="-"))
{
t[i] = texte.substr(i,1).toUpperCase();
}
}
return t.join('');
} | 0 |
7f830635b2c757e451bb25323ade9d87 | ada4d047eec385850936ffd7245f66c5 | Updates a <b>CommRule</b> object to the database. | string Name,
string Description,
string Tags,
bool IsMaster,
EvalType EvType,
int EvMinVal,
bool EvLockBool,
bool UpdateView,
EvalType StepEvType,
Double MaxValue,
Int64 TemplateId,
... | 1 |
5bbc92ebc7c1c1d78b41a2c1d1747176 | 24860e0fcdb78bab032d0063169ecc0a | calcul du nombre d'erreur directe (par rapport au plus grand score de prediction de chaque image) | int penalite = 0;
int k = 0;
int s = 0;
int sommeDiag;
for(int i = (img->n)-1; i >= 0; i--){
k = 0;
sommeDiag = 0;
for (int j = 0; j < (img->n)-i; j++) {
k = i + j;
sommeDiag += img->tab[k][j];
}
penalite += abs(signature->diagD[s] - ... | 0 |
adf7ecf237889459677a0568cb3a5824 | c951a59b1b9a5dbe514a8e77a79c2630 | 글 번호로 작성된 댓글 목록을 찾아 반환하는 메서드 | public ArrayList<Comment> selectList(String writerid) {
List<Comment> list = CommentDao.selectList(writerid);
return (ArrayList<Comment>) list;
} | 0 |
97e93c88463b930c6d5e2cd2df1805c2 | d832cb59c560f5a3d642eb14eae4de8e | Lists a touch cancelled event. | void Controller::ccTouchCancelled(cocos2d::CCTouch *ptouch, cocos2d::CCEvent *pEvent) {
puts("touch cancesl");
} | 1 |
e88160a434f0f64b1fde4e4b2117fd8b | 8cded41a43a98833518ca935d00da793 | Get outside air temperature at specified times | processors_path = settings.I2MAPS_PATH + 'processors/'
rast = i2maps.datasets.NDimRaster(processors_path + 'example2/irl_temp')
tsteps = rast.ref['tsteps']
if time == None:
time = tsteps[-1]
z = len(tsteps) - 1
else:
time_obj = datetime.strptim... | 1 |
63498d45251c8fb53fa3c00096827ff5 | a1c96af7d21ab20afe9af3916a2dfea0 | Sets the lambda 0, or central meridian in radial coordinates. | void
setdcenter (ra, dec)
double ra, dec;
{ ra0 = ra; dec0 = dec; return; } | 0 |
41e09aaaa150355ad0c10b6102db01c5 | 95e15e2dea6e216d717000da7e0305d8 | Get the trs suivi dt liv. | class SuiviClient
public function getTsaCommentaireDate() {
return $this->tsaCommentaireDate;
} | 0 |
8da152a2f34cc49da2a5575959793de1 | bf9c8f589838de786bedbfb1888247d8 | 只保留字串中的數字並轉為number | function cton($str)
{
if($str=="")return 0;
$result="";
for($i=0;$i<strlen($str);$i++)
{
$j=substr($str,$i,1);
if(isnumber($j)||$j==".")$result.=$j;
}
return (int)$result;
} | 1 |
a383ee744ebea30df667f1a87c5eec17 | 93b4eabe2800d7bea5cda8c733da846d | Thread that is responsible for receiving ACLMessages | log_DEBUG("TSRE| Starting. ProcessId: ", integer(syscall(SYS_gettid)), " CPU: ", integer(sched_getcpu()));
log_DEBUG("TSRE| Entering threadedSafeguardReceiver()");
static timeHandler timing(inputH.get_timingMethod());
uint32_t maxWriteAttemptsOnSocket = inputH.get_maxWriteAttemptsOnSocket();
int *so... | 1 |
e6f14e061a8a8f656d06164a9f038956 | 1b1967d8c142864e328d4ec802ff0bb4 | 检查主板状态 | r1 = False
r2 = False
try:
try:
x = serial.Serial(com, bsp,timeout=0.3)
except Exception as e:
print(e)
return_dict['return_info'] = '串口链接超时'
myinput = bytes([0xFE, 0x02, 0x00, 0x00, 0x00, 0x04, 0x6D, 0xC6])
x.write(myinput)
myout... | 1 |
3f1b7167af8fdaaeaa61463fb75746f6 | fd184545d04a00963cdc74d7c0dd00f7 | Sorts the Movie IDs based on ascending order and returns the array list | ArrayList<Integer> listOfMovieIDs = new ArrayList<Integer>();
for(MovieAndShowtimes n: listOfMovieAndShowtimes){
listOfMovieIDs.add(n.getMovieID());
}
return listOfMovieIDs;
} | 0 |
da3ae5489cbae7d2671d4d068e3702f4 | 9bc9247bcabb64483ff3687deff90a6b | Tests that the constructor throws an illegal argument exception if a negative number of zeros
is specified | public class OperatorAgentTest
@Test(expected = IllegalArgumentException.class)
public void testConstructorException() {
new OperatorAgent(new Position(10, 10), 0.2, 80, null);
} | 0 |
910e1fb8fcb1e93d88ac6515f38afeb0 | 03e247b82e94e79cec6c4f1d2628407c | Test case for list_identities
List Identities # noqa: E501 | class TestAuthApi(unittest.TestCase):
def test_delete_mapping_identities(self):
pass | 0 |
8ab7b18240f441e9b10ad3b647160ad3 | b197af50c7b8c7eb551a0454f8cf51f9 | Display a line based on start pos and line size | line = buffer[start_line]
(line[start_pos, line.size] || "" ) + "\n"
end | 1 |
1e1c64319d6a5d820bb251830df981aa | 788b836405f52f750318360b160d5be9 | Determines if this cell is in an incorrect state. | public class mxCellState extends mxRectangle
public boolean isInvalid() {
return invalid;
} | 1 |
d4e58c84fac995f58045684924ef16ed | a8535eaff691a519ab3de95325acc9c9 | Set categories to be temporarily isolated in the view. | class BIM_Views:
def isolate(self):
vm = findWidget()
if vm:
onnames = [item.toolTip(0) for item in vm.tree.selectedItems()]
for i in range(vm.tree.topLevelItemCount()):
item = vm.tree.topLevelItem(i)
if item.toolTip(0) not in onnames:
... | 1 |
b70c8af2c454593b2542130d4f743a99 | 32e41d5fd6dfc25881c922d8df603d66 | Creates a gRPC server builder for the given port. | @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1785")
public final class OkHttpServerBuilder extends ForwardingServerBuilder<OkHttpServerBuilder>
public static OkHttpServerBuilder forPort(int port, ServerCredentials creds) {
return forPort(new InetSocketAddress(port), creds);
} | 1 |
ccb13d9fb12344a6f300b9abb0c1c0e5 | ffa1f0b2ac89bd4563fb299738647f52 | Depending on the job's requested service time, makes it depart immediately, or schedules a suitable departure event.
<p>
Performs sanity checks on the fly (job present; job not yet started; requested service time zero or positive).
The time argument must match the result from {@link #getLastUpdateTime} (and is thus onl... | protected final void removeJobFromQueueUponDeparture (final J departingJob, final double time)
{
} | 0 |
aeddab76f80d46d58faaf05a7b94ff2a | 03b54113dfded47b07e152831da490ce | Checks whether a time slot is reserved | val result = isSlotAvailable(
formattedDate,
formattedStartTime,
formattedEndTime
)
if (!result) {
Toast.makeText(this, R.string.text_timings_overlap, Toast.LENGTH_SHORT)
.show()
}
return result
} | 1 |
e4d1438b466e475e9422e08ee0b396af | 88b575c81b842ef0deb00bbea4dde54c | Scales the model coodinates accodring to changes to the layout scale. | public class RandomMove extends AbstractLayout<Integer, Integer> implements IterativeContext
public void scaleToDisplaySize() {
dd = getSize();
double height = dd.getHeight();
double width = dd.getWidth();
double max_x = -java.lang.Double.MAX_VALUE;
double max_y = -java.lang.Doub... | 1 |
88ffba04dea592594d797f541b2b5950 | 4ec40571cb38ea74d441331a395ce1ba | Vérification d'un même produit en stock | $DB = new DB();
$statement = $DB->dbQuery('SELECT * FROM produits WHERE id = :id AND quantite != 0', array('id' => $idProduit));
return $statement[0];
} | 1 |
bfac3a3504a2e438f0ee314b28c53e2f | 874d7070cff7efcd3a6478e097909793 | 現在のログインユーザおよびそのフォローユーザ、両方のツイートとリツイートおよびプロフィール画像を取得 | @items = @user.following_by_type('Item').order("created_at DESC")
@collections = @user.collections
@mentions = @user.mentions
end | 0 |
7446898da8cfff4c1cd218067086a10f | e73ebc462f5634e8c5f7764fc86792f6 | Gets the audit records operations available to the partner. | namespace Microsoft.Store.PartnerCenter.Samples.SDK.Explorer.Controllers
[AuthorizationFilter(ClaimType = ClaimTypes.Role, ClaimValue = "PartnerAdmin")]
public class AuditController : Controller
public async Task<PartialViewResult> GetRecords(DateTime endDate, DateTime startDate)
{
IAggregat... | 1 |
33ebfbc0298c038ab09ed586b9508efd | a4266755846d6193b6127f10bd7a5d09 | Alternate Constructor: | m_pNext = NULL;
m_iCharacterTraits = new int [6];
strcpy_s(m_sName, "");
m_iClass = 0;
m_iAlignment = 0;
m_iHitPoints = 0;
for (int i = 0; i < 6; ++i) {
m_iCharacterTraits[i] = 0;
}
m_pBattleItems = new Possessions();
m_pTreasureItems = new Possessions();
} | 0 |
f7019bf92141f4a87349f22e63187874 | 956cc2105300b97a1482d78751a6573a | QYXX_STOCK_FREEZE股权冻结信息 | {
string errorInfo = inter.GetMessage();
try
{
List<FreezeInfo> list = new List<FreezeInfo>();
inter.SetResultset(datasetName);
string str = string.Empty;
do
{
FreezeInfo freez... | 1 |
60383a7f85fef3b4670b216d8dcc3f32 | 8932ab5db5011640dab5b6c2386295aa | add the parallel plate capacitance between the relevant subnodes of a point | def capacitance_parallel_plates(d=1,A=1,epsr=1):
C=epsr*constants.eps0*A/d/1000/(10**(-12))
return C | 0 |
46a2264924fcf3479dbf373538e2d50b | ddacd41e03fb41f6dbe70ea4e04bf789 | Adds a specific L{ExceptionHandler} to the HTTP client
@warning: SHOULD ONLY BE CALLED FROM A PROVIDER THROUGH A TEST
FIXTURE | assert callable(fn), \
f"{fn}: expected callable, got {type(fn)}"
if origin == None:
origin = commonl.origin_get(2)
cls._report_exception_hooks[fn] = origin | 0 |
cb7a8cdd67afdc25d3492ebff3176253 | e4d28a779e11165e7d451ab3941bb128 | Processes the airline RDD to obtain answers to the 4 questions in assignment. | def q1():
conn = psycopg2.connect(database=DBNAME)
cursor = conn.cursor()
cursor.execute(question1)
results = cursor.fetchall()
q1_results.append(results)
conn.close() | 0 |
a86d7704598fb8c140cbc9abe7c94406 | 991d0ba0df7d3c964ff3a4e7851b2ce1 | 아래에 코드를 작성하시오.
word는 소문자로만 구성 되어있습니다.
word에서 가장 많이 발생한 알파벳 하나를 반환합니다. | def max_word():
count_dict = {}
file = open("CountWord.txt", 'r')
lines = file.readlines()
for line in lines:
reform = line.strip().split(' ')
for word in reform:
word = word.strip('.?!').strip()
if word == '':
continue
eli... | 0 |
ab04d5fdb98191a788354afb27a452a2 | b5796435dc0ba6005300be0f49920f73 | Get log titles | {
return [
'logsync_id' => 'Logsync ID',
'tblname' => 'Tblname',
'recordID' => 'Record ID',
'datetime' => 'Datetime',
'rstl_id' => 'Rstl ID',
'user_id' => 'User ID',
];
} | 0 |
2acc52c01c5134bd20e8abafbe1956e5 | 68616720ffaaf9c11b644a009cf6cb31 | Функция загрузки выбранного изображения продукта в облачное хранилище firebase. | File localFile = null;
try {
localFile = File.createTempFile("firebase_images", "jpg");
} catch (IOException e) {
e.printStackTrace();
}
assert localFile != null;
storageReference.getFile(localFile)
.addOnSuccessListener(new OnSucce... | 0 |
44522af31e52623aac773eb172a9c3a2 | a2f13111d906c198482a1cc7d3f4604e | The servers to send all outgoing mail through | class XRSmtp:
# ssl port
def smtp_listAll(self):
smtp_servers = []
smtp_servers.append("Gmail")
smtp_servers.append("Yahoo")
smtp_servers.append("Yahoo Plus")
smtp_servers.append("Hotmail")
smtp_servers.append("Outlook")
smtp_servers.append("Office365")
smtp_servers.app... | 1 |
34403e4bf6f0c2d8a2a2847aea679e1b | e49c9229d1411f5cef9ed78aff7f0f14 | constructor that sets up a master slave arrangement on the 4051s | AH_MCP4922::AH_MCP4922(int CS, int LDAC, int SHDN)
{
_SLAVESELECT = CS;
_LDAC = LDAC;
_SHUTDOWN = SHDN;
pinMode(_SLAVESELECT,OUTPUT);
digitalWrite(_SLAVESELECT,HIGH);
pinMode(_LDAC,OUTPUT);
digitalWrite(_LDAC,HIGH);
pinMode(_SHUTDOWN,OUTPUT);
digitalWrite(_SHUTDOWN,HIGH);
SPI.begin();
outputA(0,0,0); ... | 0 |
0e2710fde5c3bf308e8d08a2c1657152 | 2167f2731d16df1151586933134d92cd | Copiar para área de transferência | namespace Editor
public partial class FrmEditor : Form
private void colarToolStripMenuItem_Click(object sender, EventArgs e)
{
txtTexto.SelectedText = Clipboard.GetText();
} | 0 |
d95df421af8a06bad5943868bff99fa9 | f58d088e0eef23620e21ba2164d7d57a | GET: ShiftWorker | {
ViewBag.Employee_ID = new SelectList(db.RS_Employee, "Employee_ID", "Employee_Name");
ViewBag.Shift_ID = new SelectList(db.RS_Shift, "Shift_ID", "Shift_Name");
return View();
} | 1 |
ed9a44f704ec3892219850179507c3f6 | b4dbfde5fff3ffeb1b249ec37a5904a5 | Prueba que verifica que el validador de fechas funciona correctamente. | {
$date = $example[0];
$format = $example[1];
$validation = new Validation();
$validation->add(
'date',
new Date(
[
'format' => $format,
]
)
);
$messages = $validation->validate(... | 1 |
958fc2a97f0c04dae45952b9c9ca0a75 | 8b72efdfacdc70107f4f69c2ad716668 | 根据照片搜索条件构建lucene查询条件 | {
LuceneSearchBuilder searchBuilder = new LuceneSearchBuilder();
Dictionary<string, BoostLevel> fieldNameAndBoosts = new Dictionary<string, BoostLevel>();
if (blogQuery.IsRelationBlog)
{
fieldNameAndBoosts.Add(BlogIndexDocument.Subject, BoostLevel.... | 0 |
4608ae1b8e512a1263c190618dbd2cf2 | 61708c72c603dd0288da501ab9b5827e | [io_endianness] | main()
{
std::stringstream stream;
fcppt::io::write(
stream,
42u,
fcppt::endianness::format::big
);
fcppt::optional::maybe_void(
fcppt::io::read<
unsigned
>(
stream,
fcppt::endianness::format::big
),
[](
unsigned const _result
)
{
fcppt::io::cout()
<< _result
<< FCPPT_TEXT('... | 1 |
1b7e66caa1e6009ddcf6cd468af5c435 | 017d918f94dfba971702b7a915857ef4 | Checks if release timer has not expired | class amzn_flex(object):
def check_timer(self):
return not time.time() > self.timeout | 1 |
17f87247669b14ef3d083ea26a4f5409 | 0c137a1a008de46bd8b57c63eb12bf1d | Fonction qui retourne les scores stockés en DB | function getScores(req, res, next) {
model.getScores()
.then(function (data){
res.send({data})
})
.catch(next)
} | 1 |
4226a3a7befb96b7c3000cdbe66c94ef | fa26ea26dde859dadd232c8c462ff4d3 | Calculates the level from the current xp
Returns 1-50 | public class GameManager : MonoBehaviour
int XPFunction(int completedLevels)
{
float playerLevel = Mathf.Pow((completedLevels / 3), 0.75f);
return Mathf.FloorToInt(playerLevel);
} | 0 |
f81165d7c48e9e26e5b9e30ffd668422 | 1f3a5c59fdaea562bdef72b1b7df083a | Resets the shader parameters. | namespace CSharpGL.Objects
void ResetShaderProgram(); | 1 |
ffa6460d9644ca1ac6a9076af1d3c469 | fc3101d3eaa160c22542c5360b4fb58a | Visit an Async node. | async = &Async{}
async.init(graph)
if err = dfsScan(graph); err != nil {
return
}
return
} | 0 |
33860fcc385ee12c3c73eb2396c727b2 | affc66c8e3266a05181fa198375d8c43 | as is | function id(x) {
return x;
} | 1 |
540f3de4b429a725030379001789b8fa | e8c0bad083844933fa88b8e890910c09 | Perform post-removal tasks | protected function beforeRemoving()
{
} | 0 |
0196dab917de901f5efcfe0f93a0ee72 | 55c4d842d25fbeaf59081bb272c6f579 | 执行活动添加操作 | ea.clickByJS(amp.add_Button());
modifyFrame(amp.iframe_addOrUpdate());
ea.typeByJS(amp.activityName_area(), activityStr + dataStr);
ea.switchToDefaultFrame();
ea.clickByJS(amp.confirm_btn());
ea.switchToFrame(amp.iframe_activity());
} | 1 |
1f3b4d0b5329660092b655388593de37 | 8fe003a3fa2c03f510123eccb4a6cb23 | 根据时间获得当前的心情值 | public class MealTimeJudgment
public static String get() {
String nowTime = getNowDate();
int nowTimeint = Integer.parseInt(nowTime);
if (nowTimeint >= 4 && nowTimeint <= 10) {
MealTime = "Morning";
return MealTime;
} else if (nowTimeint >= 11 && nowTimeint <= 14) {
MealTime = "Lunch";
return MealTi... | 0 |
b99cafb2342de392b7b025dc5cb551f7 | 8e2ec92cd5f3cf90a0fede3d9836d29e | Recursively construct input states | to_return = [self._prev_states[0][0], self._prev_states[0][1]] + self._prev_states[1:]
outputs = self._sess.run(to_return, feed_dict={self._enc_in: inputs[0],
self._enc_pad_mask: inputs[1],
self... | 0 |
0725e00a0afa47b8f424de7e2c5b4ef6 | e206499bae7d7d5acb1d8203a3b27128 | Purpose - This method will remove the borrower | public class ProspectiveBorrowerHome extends BaseHome
public void deletePBorrower(Long id)
{
log.debug("removing ProspectiveBorrower instance");
try{
ProspectiveBorrower pborrower= (ProspectiveBorrower) getSession().load(ProspectiveBorrower.class, id);
if (pborrower.getId() > 0)
{
getSession().delete(pbo... | 1 |
b94dc00f95482a7a4acf7f7ed30d9204 | 3ee40496a6046bb847c2c94170538780 | gmtOffset returns the date's timezone offset to UTC as a string. | function getGTMDifference(date)
{
var offset = getTimezoneOffset(date)/3600;
if (offset>0)
return "+" + insertLeadingZero(offset) + "00";
else
return "-" + insertLeadingZero(offset*(-1)) + "00";
} | 1 |
f4586720749f20509d7997c72477023f | c985e48ba98387ba688e029b832597ba | 计算宠物挂机经验 | if user == nil or npc == nil then
local info = string.format("[怪物掉落经验], 计算出现异常: %s, %s", tostring(nil), tostring(npc))
cPlusLogError(info)
return 0
end
local npclv = npc:getLevel()
local deltalv = npc:getLevel() - user:getLevel()
local npcbaseexp = npc:getBaseExp()
local npctype = npc:getNpcType... | 0 |
ab189d2a29857e63e347ed374e6c46b0 | fe43a9bd16c6e42390ca6d7093881a3f | Configura a barra de ferramentas e ações de janela e teclado. | AccessibilityManager.setAccessibility(this);
initComponents();
Styles.internalFrame(this, 600, 500);
createBaseLayout();
setTitle(Methods.getTranslation("Ajuda"));
addTopContent(Methods.getTranslation("Ajuda"));
addCenterContent();
this.addWindowListener(n... | 0 |
ac3ede7a9dd5e2c4ad91851cd341234c | db15aeae4c9ad31e8cda75f25bc64c0a | Método auxiliar para retornar a quantidade de armas equipadas | public int getNewArmeen(); | 0 |
cc6c68184e98885f572e948fb194624d | 4e89ca147d831f5ad8cff10e2fc1cbc8 | Test updating coverage when empty. | self.__opener.html = '<tfoot><tr>' \
'<td>Total</td><td class="bar">0 of 0</td>' \
'<td class="ctr2">0%</td><td class="bar">0 of 0</td>' \
'<td class="ctr2">0%</td><td class="ctr1">0</td>' \
'<td class="ctr2">0</td><td class="ctr1">0</td>' \
'<td class... | 1 |
210932d6683628d90a1acbacf4cfa2da | 6f17d44a63d9defe52752a38458616b2 | Retorna um relatorio de um anúncio pelo nome. | {
SqlCommand command = new SqlCommand("select a.Id, a.Cliente, FORMAT(a.Data_Inicio, 'dd/MM/yyyy') as Data_Inicio, FORMAT(a.Data_Termino, 'dd/MM/yyyy') as " +
"Data_Termino, FORMAT(r.Valor_Total_Investido, 'c', 'pt-br') as Investimento_Total, r.Qtd_Maxima_Visualizacoes as Qtd_Max_Vis... | 0 |
3a5cae5d6d1b29dc73c8666ef8470841 | 9a7679aafaced99f1a314713ac19bfe8 | 获取缓存项目。 如果它还没有在缓存中,则加载并缓存它 | {
var data = GetCache(cacheKey);
if (data != null) return (T) data;
data = getData();
SetCache(cacheKey, data, absoluteExpiration);
return (T)data;
} | 1 |
a2e2e90cab12cd07262a4885986db537 | ae8422e0e4bc5c7908847aa79292791f | 获取附近维修点的,根据半径进行筛选 | public GoogleAdd6ByAdd5 getpointnew(@RequestBody Getnearbypoint getnearbypoint) {
Double lat = Double.parseDouble(getnearbypoint.getLat());
Double lng = Double.parseDouble(getnearbypoint.getLng());
Integer range = Integer.parseInt(getnearbypoint.getRange());
Long staff_id = Long.pars... | 1 |
b07ac4cfe790b3efbfe2e756d7abe3fe | 7d6e20e7c3aadeb79f99014779dfd867 | Returns parsed urls for all profiles on a single page in HTML format. | class PdoSearcher implements SearcherInterface
public function getAll(SearchOptions $options): array
{
$page = $options['page'];
$direction = $options['direction'];
$perPage = $options['perPage'];
$url = $options['conditions']['url'] ?? '';
$totalRows = $this->db->countByUrl(... | 0 |
f01c53b2835893440f78300c88acad72 | bc5eba0a047d786758799467f8bca803 | O usuário poderá ver todas as classes presentes até o momento, qualquer um pode realizar essa ação. | class ClsController extends Controller
public function index()
{
$classes = Cls::where('user_id',Auth::user()->id)->paginate(10);
return view('classes.index')->withClasses($classes);
} | 0 |
676c0a5b7bf8710bd490e4dff262b510 | 674e9b7b5663d1b8da23c8bbc3a199a2 | Generates a VGSL spec block from the layer instance. | {
#if !ENABLE_HYBRID_RENDERER_V2
var builder = new ShaderStringBuilder();
var batchAll = (mode == GenerationMode.Preview);
var hybridHLSLProps = BuildHLSLPropertyList().Where(h => h.declaration == HLSLDeclaration.HybridPerInstance);
if (hybridHLSLProps.Any())
... | 0 |
33be9623ec03e613638da2b24f820f39 | e3f1df1136d42af9b4e3ef33ac72c4d7 | Очищает все файлы из дериктории рекурсивно со всеми поддиректориями. | namespace At.Okr.OKrBook.Auter
public partial class Main : Form
private void ClearDirectory(String path)
{
if (Directory.Exists(path))
{
String[] files = Directory.GetFileSystemEntries(path);
foreach (var file in files)
{
... | 1 |
0fc1ed3d2c9f2acdfbd9ae4fd0eeb676 | 62675c691ab155a058f9f6a2816b132b | Number of float predictions per timestep. | class Grid:
def get_num_pred(self):
return len(self._preddict) | 0 |
e17398743d29ef1e16d7d9db2ede6c11 | 00baa1fa87f7cd2692b12cf6b72bc862 | compress the image bytes before storing it in the database | public class DataBase extends AppCompatActivity
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR1)
private byte[] profileImage(Bitmap b) {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
b.compress(Bitmap.CompressFormat.PNG, 0, bos);
return bos.toByteArray();
} | 1 |
9141395cf52efca32dc1e84b95d1583f | 7ca3ea1d0b17efc9820706d79e4ccdb9 | Функция для получения сервисов в JSON формате | switch($_REQUEST['call']) {
case 'get_all_services':
$data = $this->oep->get_all_services();
break;
}
if(!$data) {
echo 0;
} else {
echo json_encode($data);
}
wp_die();
} | 1 |
d056ad6e7a837f05264d42dc98d2b4b2 | 56104da335f1988ff867062f05c19c51 | ページタイトルをボタン形式で表示 | def page_titles(action_name, controller_name)
divider = " | "
baseTitle = "アラビア語検索ナビ MilaaHa"
if controller_name == "lessons" && action_name == "index"
return "単元別単語メニュー" + divider + baseTitle
elsif controller_name == "lessons" && action_name == "show"
return "LV" + params[:lv] + "テキスト" + divider ... | 0 |
973e3fe8d0ec0384c1a56b41032bfa83 | fc95e133576f14f8228f5c5df0a32248 | 初始化玩家的任务数值 | class TaskManager
initTaskPlayer(){
let data = {};
data.curProg = 0;
data.status = CSProto.TASK.status.noComplete;
data.noStopwinNum = 0;
return data;
} | 1 |
389bac74c4d9f27f45223ed778913d31 | f718f9746850befdb765f6061b10184e | include degenerate patient items iff
1) degen procedure items are being included, and
2) advanced search is not being used, or it is being used and all non-patient search criteria are empty | class Fhir::R4::ApiController
def search_patients(options, if_none_exist: false)
query = accessible_patients.includes(:jurisdiction, :creator, :common_exposure_cohorts, { transfers: %i[from_jurisdiction to_jurisdiction who] })
return [] if if_none_exist && (options.keys & VALID_PATIENT_SEARCH_PARAMS).empty?
... | 0 |
f21d8d44c15f1ffdd0f9c48da96a5043 | 80e8e503c843da0096f4b0545689c1f0 | 메인 페이지 -> 내가 쓴 댓글 | try:
user = request.session['user_name']
except:
return redirect('../../unloginpage')
user_id = User.objects.get(nick_name = user).id
user_posts = Post.objects.filter(username = user_id)
user_posts_idlist = []
for post in user_posts:
user_posts_idlist.append(post.id)
comments = {}
for post ... | 0 |
3f056da0e08e586194fdb178645aa23c | dded1dec5e7ce4270ddebfe8d90b004d | 求列表lst中元素的排列(默认是全排列),同时去重。
len可取值:'ALL' 或 正整数(小于等于列表lst的长度) | if lst == []:
return [[]]
prev_perms = list_perms(lst[1:])
result = []
for perm in prev_perms:
for i in range(len(lst)):
result += [perm[i:] + [lst[0]] + perm[:i]]
return result | 0 |
2d733ddf29dd47586bac9d1e8bb0cb11 | 6a2cd06898cf03461aa52900c60c4dab | Get 背景水印宽度。默认宽度1920。 | public class PresetLayoutConfig extends AbstractModel{
public Long getImageWidth() {
return this.ImageWidth;
} | 0 |
3917f803a2ad6faf307a911329c64862 | b997443b036a6d8ded0b711be3432820 | 根据索引返回参数名称 | {
var index = GetIndexColName();
foreach (var item in this.ParamNames)
{
if (item != index)
{
return item;
}
}
return "";
} | 0 |
b58eeb804079584874779639f0d5f945 | 2bd69717f4e903e5949182f56e9630ae | Returns the criteria for checking the last name. | class UserSearch
public function getLastNameSearch()
{
return $this->lastNameSearch;
} | 1 |
1dcfe6cf4796fbbfc7f2d70442f42bd7 | e399a3ad2f913e115015ae3e63d23b71 | 返回每一个页面的电影url列表 | def get_film_urls(response):
bs_info = BeautifulSoup(response.text, 'html.parser')
film_urls = []
for tags in bs_info.find_all('div', attrs={'class': 'channel-detail movie-item-title'}, limit=10):
film_urls.append(tags.find('a').get('href'))
film_urls = ['https://maoyan.com' + film_url for film_... | 1 |
aabf307dff1dcba496b8ca8f1205bbce | f59a51a4b30843b1794355d7ee4d8542 | Don't include untranslated nodes in the resulting YAML file. | const _ = require('lodash')
const filterDeep = require('deepdash/getFilterDeep')(_)
return filterDeep(
obj,
function (_value, key, _parent, context) {
return (
!(key.endsWith('url') && key !== 'html_url') &&
key !== 'node_id' &&
context.parent.key !== 'tree' &&
contex... | 0 |
6a252925ddaade6eb5cf4ef82b2facad | 60e1622b1bec53e7dee016ce1cb804c3 | Ensure that the font can be rasterized by FreeType. | static int
gf_rasterise(f, l, h)
struct font *f;
int l, h;
{
panic("gf_rasterise(%s, %d, %d)", f->f_path, l, h);
} | 0 |
0104307d30079f3694f82ec4345c1a40 | 7abdbb6cd4404d59a51ab32e1ac270e1 | Test that it can automatically switch classes | v_classes = [c for c in dir(v.generated) if c.startswith("__") is False]
v_classes = [c for c in v_classes if c != "VuetifyWidget"]
option = "ma-5"
for c in v_classes:
if c in ["Alert", "Tooltip", "Banner", "DatePicker", "Radio", "RadioGroup"]:
continue
w = getattr(sw, c)(cla... | 1 |
29abb9c4fa2e067cdf23d58226cd454e | 09c4aadb2291b80a00373ee1683e3d59 | Add config for Panoptic-DeepLab. | def add_posenet_config(cfg):
_C = cfg
_C.MODEL.MOBILENETV3 = CN()
_C.MODEL.MOBILENETV3.NORM = "FrozenBN"
_C.MODEL.MOBILENETV3.CHANNEL_MULTIPLIER = 1.0
_C.MODEL.MOBILENETV3.OUT_FEATURES = ["res3", "res4", "res5"]
_C.MODEL.RPN.DWEXPAND_FACTOR = 6
_C.MODEL.RPN.NORM = "GN"
_C.MODEL.ROI_BOX_H... | 0 |
52ce1ccbb885a2674542f048000b2e0a | d90e38acf5e28dae80ec12fdc1132c01 | 15.FIJA LA CÁMARA PARA LA PELEA CONTRA EL BOSS | {
if (bossCam == null)
throw new ElementNotDefined("Error, other camera not defined.");
if (bossCam == Camera.main)
{
bossCam.GetComponent<Camera>().enabled = false;
bossCam.tag = NO_TAG;
this.GetComponent<Camera>().enabled = true;
... | 1 |
7d58e3edbc9752467e32d030e0b268c6 | b95ee4ab05dea55b8ed993e821c4719a | Sets neighborhood type for current simulation- taking into account cell shape and user input (torodial or finite) | class Generator():
def set_road_type(self):
for x in range(self.finalxSize):
for y in range(self.finalySize):
if self.walled_field[x][y] > 0 and self.walled_field[x][y] < 20:
count_neigh = 0
if (x+1) < (self.finalxSize):
... | 0 |
14ee6033466ca8c3f471c124711798a6 | 26e3ad617c8a036806330ccb07c33e69 | Overrides the security level for this config. | class ApiConfigHandlerResponse(dict):
def security_level(self) -> str:
return pulumi.get(self, "security_level") | 0 |
e684cdf2d59d3951b6e4b2b24998e8c4 | 0e8efb74743bbecc728166cb3c5c0fc4 | Returns the number of bankses. | public class BankRecyclerAdapter extends RecyclerView.Adapter <BankRecyclerAdapter.ViewHolder>
@Override
public int getItemCount() {
return bankList.size();
} | 1 |
65b759ac08dd3dcb3dd064349b1fb6f7 | a5fc37825528a892bbc165c127b1ecd1 | 将新密码替换旧密码 | namespace Wizard.Cinema.Domain.Wizard
public class Wizards
public void ChangePassword(string oldPassward, string newPassward)
{
if (oldPassward.ToMd5() != Password)
throw new DomainException("旧密码匹配失败,请填写正确的密码");
this.Password = newPassward.ToMd5();
} | 1 |
e4339384089bb1be3acce7b50ea96c35 | a9d3b95d2a73660c0d2e2bae1fae4d68 | Return the version the properties on this object were last updated | class CandidateMirror(PropertyManager):
def last_updated(self): | 1 |
ff9cfc19a9422eafc7feb6b1dca8a626 | 11fa7e806f1199c067e01968f46bb6a5 | 根据文件名获取子路径 | class UploadFile extends Component{
private function getSubPath($filename) {
$subpath = '';
$rule = $this->subName;
if ($this->autoSub && !empty($rule)) {
$subpath = $this->getName($rule, $filename) . '/';
if(!empty($subpath) && !$this->mkdir($this->savePath . $sub... | 1 |
598db27ffac1aa9b05b65f7fb13cb54a | 11c2336a076259fdfad16466973ce677 | Gets the border insets. | public class AbstractListComponent extends Component
public Insets getInsets() {
return (Insets) getProperty(PROPERTY_INSETS);
} | 1 |
8db3138482bfed9624324116c87ba80c | 9a4f287067ac651cc0c9ff69494eaf39 | Checks if a survey exists in SQL. If so, the MySQL id is returned. | public boolean getSurvey(SqlMapClient smc, String surveyCode) throws SQLException; | 0 |
960e9aad8be7a4b29d349bb4ca68e2b3 | 2d8e6ae2325b7672809e2ee5e81d4062 | Encode the supplied message into bytes using the supplied byte buffer. | namespace Org.Apache.Hadoop.Crypto
void Encrypt(ByteBuffer inBuffer, ByteBuffer outBuffer); | 0 |
a5ac45f3310ea8a89498003e97d73c6e | 226501166a59a4338294de5d479a496d | Creates a standard button with the specified name.
When the button is clicked, the callback will be invoked. | namespace Raygui_cs
[SuppressUnmanagedCodeSecurity]
public static class Raygui
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool GuiButton(Rectangle bounds, string text); | 0 |
58c1398d76a371d62405433b4f5e7aa3 | fb8b04a9909eeed678059927301b1a59 | Create a message builder to send follow-up messages for this interaction.
You can send, edit and delete follow-up messages for up to 15 minutes after you received the interaction. | class DiscordApiClient
def create_followup_message(interaction_token, allowed_mentions: { parse: [] }, **options)
post("/webhooks/#{application_id}/#{interaction_token}", {
allowed_mentions: allowed_mentions,
**options
})
end | 1 |
0b5326b18e1e4eef58e65a9e7e4c5cbf | 4971de8996062a9a1404b001c31fb7db | Given a java type, determine the proper cast type name. | String name = cla.getCanonicalName();
if (name.equals(int.class.getCanonicalName()))
return Integer.class.getCanonicalName();
else if (name.equals(long.class.getCanonicalName()))
return Long.class.getCanonicalName();
else if (name.equals(float.class.getCanonicalNa... | 1 |
4e63df57b3efbca8560d4b6f327f845d | a30b95d7abda65de04bf218f44cc1d44 | ksz8851Init() initializes the ksz8851. | BYTE pdrv
)
{
Stat = STA_NOINIT;
if(pdrv)
{
return Stat;
}
uint8_t cmd0[6] = {0x40, 0x00, 0x00, 0x00, 0x00, 0x95};
uint8_t cmd55[6] = {0x40 | 55, 0x00, 0x00, 0x00, 0x00, 0x65};
uint8_t cmd41[6] = {0x40 | 41, 0x40, 0x00, 0x00, 0x00, 0x77};
uint8_t cmd8[6] = {0x40 | 8, 0x00, 0x00, ... | 0 |
4e1c8457a76ed211acd34d45d82abf2d | 996598de760f4ad12996428a5cf179f5 | 检查集群是否有资源启动AppMaster | public class Master implements Watcher
private void masterExists(){
zooKeeper.exists("/master",masterExistsWatcher,masterExistsCallback,null);
} | 1 |
0ebc5e185d765567c3f091c231c77351 | cdaf26f13eac1840174d0762d0314dfc | Dump Lua bytecode of the supplied function | int strip) {
DumpState D;
D.L = L;
D.writer = w;
D.data = data;
D.strip = strip;
D.status = 0;
dumpHeader(&D);
dumpByte(&D, f->sizeupvalues);
dumpFunction(&D, f, NULL);
return D.status;
} | 1 |
063a8906338fa8587308d16f24e40958 | 8208962794726414c0b6d3c6c8ce7809 | Run the stored procedure to get state vectors of the planets | lens = self.table.query("dbRECORD_COUNT")
if lens == 0:
sys.exit("EXIT: No events found")
else:
for x in range(0, lens):
self.table.record = x
result = self.table.getv(
"orid",
"evid",
... | 0 |
1f64b9ba99b9cd0c14284c1151d8e9f7 | b68710bb332752921e94989a0b5c7fc2 | Cancels the local notification associated with the specified <paramref name="id"/> and <paramref name="tag"/>. | abstract class BaseNotification(protected val isForeground: Boolean = false)
protected fun cancel(notificationId: Int) {
notificationManager?.cancel(tag, notificationId)
} | 0 |
143090d45b7e8e9df0576e19f670212c | 63c75aafef534411d927291952be3522 | 显示数字 2 | {
delay(1000);
if(k2==0)
{
TR0=0;
TR1=1;
Second2=1;
while(Second2<21)
{
DisplayData[0] = 0x00;
DisplayData[1] = 0x00;
DisplayData[2] = smgduan[(21 - Second2) % 100 / 10];
DisplayData[3] = smgduan[(21 - Second2) %10];
DisplayData[4] = 0x00;
DisplayData[5] = 0x00;
DisplayData[6] ... | 0 |
2b56844f39292cccb43e77e6fad45b45 | 6847848406456d13fdd37c94150621e9 | GET api/Avisos | class AvisController extends Controller
public function index()
{
$avis = Avi::withTrashed()->get();
return view('avis.index',compact('avis'));
} | 0 |
12f2223372f5229aa8d3e3ae4cfc7c70 | 9ce18d6bb77f37ba884c99e83f9e8108 | Reverse routing. | def url(name, *args, **kwargs):
return django_reverse(name, args=args, kwargs=kwargs) | 1 |
0d6b8babc3351f03e5523dfd7e2ea341 | 0c5446381dc49300db1559b6b7256276 | Checks whether the Pixel from the Image sample is transparent or not | class Compressor
private function ifTransparent($image)
{
for ($x = 0; $x < imagesx($image); $x++) {
for ($y = 0; $y < imagesy($image); $y++) {
if ((imagecolorat($image, $x, $y) & 0x7F000000) >> 24) {
return true;
}
}
}
... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.