query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
0f1f2cf1f2d2798a0aa5f629dde4e4f9 | 412bb91bc9dae774392b4742a565ed22 | convertToFahrenheit should give known results | var testCases = map[tempconv.Kelvin]tempconv.Fahrenheit{
-39: -529.87,
-1: -461.47,
0: -459.67,
9: -443.47,
39: -389.47,
}
for k, v := range testCases {
result := tempconv.KToF(k)
if int(result) != int(v) {
t.Fatalf("should be %f, got %f", v, result)
}
}
} | 1 |
f597d901b77ce2dddee5a14cfbacf3c4 | faa0b8a75122c62c26d8a03a8c8fd9c6 | Starts the socket server, and start the timer for updating the GUI. | class Server
fun startServer() {
try {
println("Starting server at port $portNumber...\nWaiting for clients...")
serverGUI.logText.concatText("Starting server at port $portNumber...\nServer started at port ${portNumber}\nWaiting for clients...\n")
serverGUI.serverLabel.text =... | 0 |
9919ad8cc9e8f3c66304dda84aabb98e | 38784977509e8129deb5f2614056c087 | % weight=19 help=game/is-touching-edge
% blockId=neoGame_sprite_touching_edge block="%sprite|touching edge?" blockGap=8 | function onEdge(y, x)
return y == 1 or y == ymax or x == 1 or x == xmax
end | 1 |
029adb97c449f165357e228cfba23468 | 52a9718f111a10fc62854329f7795fe2 | Carga los efectos de sonido | public class EfectosSonidos: MonoBehaviour
void Start()
{
} | 0 |
f7e3d4443bffe10df041452b26474e49 | 18ed8dac4717e839bcc11e1b9e59764b | Get All Products & Search Products | async getAll(req, res) {
try {
const {page, perPage} = req.query;
const options = {
page: parseInt(page, 10) || 1,
limit: parseInt(perPage, 10) || 10,
populate: {
path: 'artist',
select: 'firstName la... | 0 |
af39c598ca4329636f57888f766e911a | 20d17f00fba5cef6b830bf7be7afdb6a | 测试缓存单个Connection | JedisPool pool=getJedisPool(0);
RedisUtil.saveString(pool,"test","test");
pool=getJedisPool(0);
String re=RedisUtil.getValue(pool,"test");
if(re==null||!re.equals("test")){
logger.error("#########连接redis失败!!!!!");
}else{
logger.info("redis连接成功");
... | 1 |
7c57486b92f2fd1cfe7a679a6036944a | cebb8d7534f0bc9979e599c8090722e0 | Queries the PhotoDNA API for all the images in dirName (and its subdirectories).
Outputs a CSV file with the following fields:
path,image_type,response_code,trackingID,isMatch,matchString
here matchString will contain all the labels for matched images in form source(violation), separated by a /. E.g. IWF(B2)/NMEC(B1)
T... | File dir = new File(directory);
File[] files = dir.listFiles();
if(files == null || files.length == 0){
logger.log(Level.INFO, "No files to analyze in the specified directory!");
}
else {
logger.log(Level.INFO, "ANALIZING: " + directory + "\n\n");
... | 0 |
16c81fc8c1c1bb313263895f0c5be343 | 58350e93a249bbf6c76b8625b7637568 | Indicates which operations can be performed by the Power BI
Resource Provider. | class PowerBIEmbeddedManagementClient(SDKClient):
def get_available_operations(
self, custom_headers=None, raw=False, **operation_config):
url = self.get_available_operations.metadata['url']
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_versi... | 1 |
774aa4fb928276f3d9a87fb419099fc3 | f24a93a8c86b7f0c8459a10ba492cb7f | Displays a song timer. | function showSongTime() {
var currentTime = myAudio.currentTime;
var minutes = parseInt(currentTime / 60);
var seconds = parseInt(currentTime - (minutes * 60));
if (minutes >= 10) {
$('.basebar .song-minutes').text(minutes + ':');
} else {
$('.basebar .song-minutes').text('0' + minut... | 1 |
e3671844954d230ff7fd0ed4df314a0d | efd01c0bfc96f93ce4c53940c4f05a85 | Needs to be overridden in the subclass. | class ClassificationModel(object):
def _classify_data(self, data):
assert False, "Should be subclassed" | 1 |
b436040e2db811b609e2944854d1ad0d | a4b3d3b9c52710c62b8bc65fbc6a53d7 | 协议相关的工具类 | return {
tools : {
merge : merge,
isString : isString
},
appendModule : appendModule
};
} | 0 |
fbc5c641c92c80098ec1a686e8cbdd3a | 08f5852ab6c26b8d51354fb56b70f4cd | Clears all dependee references from the reference node and returns the number of references that were cleared | class Distance extends \DrSlump\Protobuf\Message
public function clearRef(){
return $this->_clear(3);
} | 0 |
86a977fe4b080264281eb5f8675b7cc9 | 0e0926c414f1a9caf796ee02e7da88b1 | Initializes the configuration functions in the utility module.
The only thing this function does at the moment is scan for a local configuration file | class Utility{
function initialize() {
global $obj;
global $cfg;
$result =& $obj['db']->query("select c_title, c_bitmask from t_flag");
while ($row =& $result->fetchRow()) {
$cfg['flag'][$row['c_title']] = intval($row['c_bitmask']);
}
$result =& $obj['db']->qu... | 0 |
6d89a922fd8b595ede19da93469a1b18 | 0ddd06edb4d769f854d204928e1c0226 | get the local ip address so that it does not have to be set manually | {
int sock;
struct ifreq iFreq;
struct sockaddr_in *saddr;
if ((sock = socket(AF_INET, SOCK_RAW, htons(0x0806))) < 0)
{
forceExit("creating socket failed while establishing local IP - are you root?");
}
strcpy(iFreq.ifr_name, device);
if (ioctl(sock, SIOCGIFADDR, &iFreq) < 0)
... | 1 |
ac08788b589dfa0a25cae0cf11742cda | 5fcdc8135fdbbbcb98365a66d7133798 | Getter method for packet_count, mapped from YANG variable /openflow_state/group/group_info_list/packet_count (uint64)
YANG Description: Packet Count | class lsngroup_stats(base_resource) :
def lsngrptottcpdrppkts(self) :
try :
return self._lsngrptottcpdrppkts
except Exception as e:
raise e | 0 |
aa5e2d3302aebe12c0a0944768745d02 | 63067ed15f88c6fc9d302dd47ae3cd13 | #' @return A list with: `mf` a model frame stripped of the optmatch argument, `match` the matched factor, `oname` the name of the outcome variable, `fmla` an updated formula without the matching vector | modelPar3 <- function(
parOpt
,fModel
,parDefault=parOpt
,...
){
pars <- structure( as.numeric(parDefault), names=c("x0","r0","mumax"))
pars[names(parOpt)] <- parOpt
fModel( pars[1], pars[2], pars[3], ...)
} | 0 |
326abbd61414d1fadedd08eff1cf63f7 | cace7f93336173944d8ae64d6f735b58 | Record earliest date of first and second vaccinations.
In some cases, a patient will have only one covadm1/2_dat and covrx1/2_dat. | last_epi_visit = redcap_data.loc[record_ids, 'int_date']
last_epi_visit = last_epi_visit[last_epi_visit.notnull()]
last_epi_visit = pandas.to_datetime(last_epi_visit)
last_epi_visit = last_epi_visit.reset_index()
idx = last_epi_visit.groupby('record_id')['int_date'].transform(max) == last_epi_visit[... | 0 |
3f81170d54146e3b162e17501c2b6688 | 194daca34640ff45ebdcb23f3234d5ca | showing scene overhead (enabling secondary camera) | public class updateFog : MonoBehaviour
void Update () {
if (Input.GetKeyDown("c")) {
otherCamera.SetActive(true);
this.gameObject.SetActive(false);
}
} | 1 |
5865af0a93f85bb2a3b1e9fc944ce36d | 132bf8d46ed6aa25b7f045b45a7ddf4f | Retrieving all the Routes(Edges) from the databse and initiliazing the Dijkstras graph | public class ExecutionService
public void updateMap() throws Exception {
ArrayList<Route> routes = new ArrayList<>();
routes = dbConnection.getAllRoutes();
map.clear();
for(Route r : routes){
map.put(r.getId(), r);
}
} | 1 |
185159a334c0418e6efbb33ac12e9075 | 9bd97292426197c697df20e136188220 | kasuj identyfikator sesji, wymuś logowanie | class Auth
public static function logout() {
Zend_Auth::getInstance()->clearIdentity();
Zend_Session::forgetMe();
} | 1 |
9755457c86388d4e81087005948c3773 | add6720c69004138f6b77c5716d78875 | Return autotvm.measure_option result to be used for autotuning this model task. | extra_opt_str = ''
if extra_option_name == ExtraOption.SCORE_THRESH:
extra_opt_str += f' MODEL.ROI_HEADS.SCORE_THRESH_TEST {extra_option_value}'
elif extra_option_name == ExtraOption.ALPHA_WEIGHTING:
raise NotImplementedError
elif extra_option_name == ExtraOption.... | 0 |
0e24a51c5819ecfa3527ff9ece19efbe | 6737eb1c703f5263121decf7a7d373a4 | Determines whether the sequence is non-decreasing.
and that must be checked. | let count = 0;
for(let i = 0; i < sequence.length; i++){
if(sequence[i] <= sequence[i - 1]){
count++;
if(sequence[i] <= sequence[i - 2]
&& sequence[i + 1] <= sequence[i - 1]){
return false;
}
}
}
return count ... | 0 |
66cabf3e70153c652b110ba18d136deb | 8af5a5e40afd070146897f95a7ebc053 | Gets rid of newlines and other junk characters and replaces them with spaces. | public abstract class DiagnosticLogger : IDiagnosticLogger
private static string ScrubNewlines(string s)
{
var sb = new StringBuilder(s.Length);
for (var i = 0; i < s.Length; i++)
{
var c = s[i];
switch (c)
{
case '\r':
... | 1 |
3d992a149828a4b5a3f67be318c0c1a2 | 020eeed9d18b66aaebd5491fee129c64 | This Function Uses the Microsoft.Practices.EnterpriseLibrary.Data to Update Dataset for table EmployeeDocumentType using Stored Procedure
and return number of rows effected of the EmployeeDocumentType | {
int rowAffects = 0;
var dynamicParam = MappingData(entity);
rowAffects = _dbConnection.Execute($"Proc_Update{_tableName}", dynamicParam, commandType: CommandType.StoredProcedure);
return rowAffects;
} | 1 |
76068ef87e9f5350a82d0d2bd98171c9 | c70ca6c6da99e8d7e0e406c49f870ec9 | Убедиться, что значение объекта не равно <c>null</c>.
Валидация осуществляется с помощью <see cref="RequiredValidator"/>. | namespace ViennaNET.Validation.Rules.FluentRule
public static class RuleValidationMemberBuilderExtensionsAsync
public static CurrentValidatorHolder<T, Task<TProperty>> NotNull<T, TProperty>(
this RuleValidationMemberBuilder<T, Task<TProperty>> obj) where TProperty : class
{
return obj.SetValidator(new... | 0 |
42a775f01a61bac6c3ba8cf3399d24a5 | 5a6b96367b9d925883910cce40688e39 | Returns a specification for building/editing a widget | return {'control_type':'input_box',
'subtype':self.subtype,
'default':self.default,
'width':self.width,
'height':self.height,
'evaluate': False,
'keypress': self.keypress,
'label':self.label} | 1 |
581653c70c66dd2fde76d565e4e6eab5 | e3ad563b8ef7f531687d3bfdd558c6da | Initialize a defaults value from manifest data. | def DefaultSettings(site_params):
defaults = config_lib.DefaultSettings()
defaults['manifest_repo_url'] = site_params['MANIFEST_URL']
return defaults | 1 |
93d6b61d694c417fd304aa926c4809de | b02f9cd47fbaa9272cd3c45195e4e4db | Sample contacts created is the same for every call | contact = Contact.objects.create(org=self.unicef, uuid=None, is_stub=True, urns=["tel:+1234"])
self.add_identity_store_search_callback(
"details__addresses__msisdn=%2B1234", self.identity_store_no_matches_callback
)
self.add_identity_store_create_callback(self.identity_store_... | 0 |
3ab2995d302f804234fbad1e31b1af73 | 1515555a6112769255dbf438d5b3307e | 選挙資格情報を設定します。 | public class NyujokenIkkatsuEntity
public void set選挙資格情報(AfT113SenkyoShikakuEntity 選挙資格情報) {
this.選挙資格情報 = 選挙資格情報;
} | 1 |
efb518b991cec21f8c374617e1f57f29 | a49f7038820dcd84c0b421dc2338fe8f | Get the log directory for the given attempt. | char *get_task_log_dir(const char *log_dir, const char *attempt_id) {
return concatenate(ATTEMPT_LOG_DIR_PATTERN, "task_log_dir", 2, log_dir,
attempt_id);
} | 1 |
770da6bc8748a9df4f0c461e8476b0da | cc820d7517e929a79db05c9ae8812684 | This method was generated by MyBatis Generator.
This method returns the value of the database column me_voucher.ma_media_id | @SuppressWarnings("serial")
public class PicInputMsg extends BaseMsgModel implements Serializable
public String getMediaId() {
return MediaId;
} | 0 |
01a118c77326ff78e03464a07dac142a | 814499a0af6efa8996c8a2057a9c8dbd | Close the device using the <f midiInClose> API. | namespace Synthesizer.Extensions
internal static class NativeMethods
internal static class MidiOutput
[DllImport(WinmmDll)]
internal static extern MMRESULT midiOutClose([In] IntPtr midiOut); | 0 |
bb0f40b4d1fd72179f3f3e99df42231c | f9ab5e3d4a26c516ee154693a75c9ba5 | Test of compareTo method, of class Hand. | def test_compare4():
hand = poker.PokerHand('8H 8S 8C 3D 3S')
other = poker.PokerHand('TH JS QH KD AS')
assert (hand.compare_with(other) == 'Win') | 1 |
2136162e969e2d3db40b40ebef62a844 | 1b4113ab0f408a9edae21ab41eaec75f | Delivers the online highscore. | sendMessage(new ServerMessage(mClientId, ServerMessage.ServerMessageType.HIGH_SCORES, String.valueOf(gameId)));
HighScoreData scores = new HighScoreData(gameId);
try {
Message msg = Server.waitForMessage(ServerMessage.ServerMessageType.HIGH_SCORES.type(), 0);
if (msg.getData().length() > 0) {
String[] d... | 1 |
e38136974ce4ddae937d8d4dcdab888b | d399778020b51f03976f0dcc0ce6e700 | Get invoices function builds a query string and executes it and returns a list of invoices. | q_status = None
q_search = None
if self.filter_form.is_valid():
status_filters = ['paid', 'unpaid', 'refunded', 'canceled']
for status in status_filters:
if self.filter_form.cleaned_data[status]:
if not q_status:
... | 1 |
71c75efe18b0adbfd0ab4d8462eefbd2 | 693b6b6df5f9d960bcb9ebaf18624b22 | Stop proxyconfig by destroying mutexes | static int proxy_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
apr_pool_t *ptemp)
{
+ apr_status_t rv = ap_mutex_register(pconf, proxy_id, NULL,
+ APR_LOCK_DEFAULT, 0);
+ if (rv != APR_SUCCESS) {
+ ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(02480)
+ ... | 0 |
a8fe01d61b54fdda1025029e7da4a49b | 7281b2cabe6722d525e1d4b64e1ce4cb | Create a string "X-Y" to be used as a key to a data frame. | def create_key(row):
railcar, ship_date = row
ship_date = ship_date.strftime('%m%Y')
return f'{ship_date}{railcar}' | 0 |
ba882e82105b6a0b01940c87d4ae8379 | ea854ab307401d53e68bf7b9c6a974cc | 异步加载列表标题 | if (!state.titleTypes) {
state.titleTypes = await getTitleTypes()
commit('selectAll')
}
} | 1 |
651fb097718aceff4592e6c219fb838f | bd752e568eab656f6e0e4c01978e2865 | Queue에서 객체 하나를 가져옵니다. 만약 Queue가 비어있는 상태라면 객체가 추가될 때 까지 대기합니다.
반환되는 객체는 Queue에서 제거됩니다. | Monitor.Enter(queue);
try {
if (queue.Count > 0) {
obj = queue.Dequeue();
volatileCount = queue.Count;
return true;
} else {
obj = default(T);
return false;
}
} finally {
Monitor.Exit(queue);
}
} | 0 |
927bfb709ec38689f07beea553bdc3b3 | 19ae78f0b6b0075374f3d16327fbdcb0 | Характеристики на которые влияет навык | class Museum extends Model
public function characteristics()
{
return $this->hasMany('Travelestt\Models\Museum_characteristic', 'id', 'id');
} | 0 |
6fc5a657933e59b739b8ef2082020d51 | f39cee3c8f862e386b91848cc0fe57b5 | Given a map of headers (as returned either by {@link URLConnection#getHeaderFields()}
or by {@link HttpsFetcher#fetchURL(URL)}, determines if the content type of the
response is HTML. | def accepts_html(accept_header):
return (accept_header is not None
and _accepts_html_re.search(accept_header) is not None) | 0 |
a64ca5e1bef23586703ce59ef442d8a2 | 3d19e808670891c970e5f6457b48c71e | GET: Cs | namespace RealFontShoppingMall.Controllers
public class CsController : Controller
public ActionResult Index()
{
return View();
} | 1 |
399ef4eb4fbefd731d05f874b411aeb0 | a066b92d9ef5f15f541d34f68db7edf4 | Callback function for services section | function showServices(divId) {
var secondDivID = '';
if(divId == 'divServices')
{
divId = 'divServices';
secondDivID= 'divServices2';
}
else
{
divId = 'divServices2';
secondDivID= 'di... | 0 |
0c399c9b265bb294e523ae33fff9c17c | a01fc1decb487ed43650330ce835c500 | Test if posts are assigned their chronological id's properly | class PostRepositoryTest extends TestCase
public function testLatest5()
{
$posts = $this->repository->latest(5);
$iID = 30;
foreach($posts as $post) {
$this->assertEquals($iID, $post->id);
$iID -= 1;
}
} | 1 |
80cb605f964cb336d568202194ca348a | 2ccb75f7c4d0c65c3311e613dabe59f4 | Retrieve the list of teachers (and their id's) associated with the provided school | namespace ClassroomOverview.Domain.Services
public sealed class TeacherService : BaseService, ITeacherService
public async Task<OperationResult> GetTeachersByTeacherIdIdAsync(long schoolId)
{
List<TeacherModel> teachers = await this.TeacherRepository.GetTeachersBySchoolIdAsync(schoolId);
... | 1 |
859d52421d1b619f5d4702959f16f1ca | b3ec09af70f6cc982178251c1dcb39fc | Disable CMB2 styles on front end forms. | class WebformCustomComposite extends WebformCompositeBase
public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state);
unset($form['multiple']['#states']);
return $form;
} | 0 |
84296fa7332c8d533b5d72bb7ea9fd20 | 5d7c2fd106211ae095c896b1df65865c | Check if ``query_circle`` is in ``target_circles``
Minor error on center point and radius are allowed | def check_inside_circle(x, y, x_c, y_c, r):
return (x - x_c) * (x - x_c) + (y - y_c) * (y - y_c) < r * r | 0 |
efc3f15fd8770b6cb95cf5e7ae361d56 | a3a35b2c2b3901a596773336f9450b3a | Posts server count | class Server
fetchCount () {
return this.post(CONFIG.FETCH_COUNT)
} | 0 |
f9fb38d39b2cec3e6ed6b1b973438045 | 5e7f7fc89c63202040f8953f5643ae54 | Insert a record into the contribution_tracking table | class PayflowProGateway extends UnlistedSpecialPage
public function updateContributionTracking( &$data, $force = false ) {
if ( !$force &&
!preg_match( "/cc[0-9]/", $data[ 'utm_source' ] ) &&
is_numeric( $data[ 'contribution_tracking_id' ] ) ) {
return;
}
$optout = self::determineOptOut( $data );
$db... | 1 |
a4c34c55411dac976b723430aca1152e | 89948878c119c9eed136aaaa900ff48b | "Выводит" сообщение об успешном сохранении настроек страницы модуля. | function msuccess($message)
{
mrender("mtemplates/success.php", array("message" => $message));
exit;
} | 1 |
57e6a1e6e25bde18bbe7568910361e1e | 95fdc7c05ed012e166cc9d45bb123a11 | Returns True if this is a dictionary type. | def isDict( obj ):
return isinstance( obj, dict ) | 1 |
17b7315ed368e984694d2ad9bcb681e9 | 1e665df046b69edb4d616c29e9e50325 | <para>Checks if the application has been loaded over HTTP.</para> | {
var webConfig = WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.Path);
var httpCookiesSection = (HttpCookiesSection)webConfig.GetSection("system.web/httpCookies");
return httpCookiesSection == null || httpCookiesSection.RequireSSL;
} | 0 |
80bdcf4cef724ca1b7db853af2d5c18c | 691f53e4ce26c6168fb4f8d6e2f39484 | 封装从book读数据的方法 | fs.readFile('./mock/book.json', 'utf8', (err, data) => {
if (err || data == '') return callback([]);
callback(JSON.parse(data));
})
} | 1 |
b5a50aff82d223d65bcfd656c8ae7b46 | 29742d714045038b8ac25581437f3ffa | Returns the meta object for the containment reference list '{@link es.gva.cit.simapa.Aplicaciones#getAplicaciones <em>Aplicaciones</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getAplicacao(); | 0 |
eca8e402cebe81a7e0fc59f0f1ac8862 | 05e077c58b60c55ace5007e834da1403 | Undefines tint for drawing images. | abstract class ImageDecorator<W extends ImageView> extends WidgetDecorator<W>
abstract void superSetImageTintList(ColorStateList tint); | 0 |
c8a50230cee7d0298dcc4e7330b81147 | a9dd4c9909f6c3f30f9adfd7890132af | hasmany嵌套table时,需要重新设置行的默认key | class DisplayTable extends BluePrintsMethodBuilderBase
private function PreModelProcess(){
$modelDefinition = $this->MethodDefinition['model'] ?? false;
if (false !== $modelDefinition && isset($modelDefinition->with) && !empty($modelDefinition->with)) {
foreach (($modelDefinition->with) as ... | 0 |
43894919017b1f3d15c58986e405763f | 14113957740918749a4221f915c623d2 | Méthode permettant d'obtenir la propriété chrono. | public class FenetrePrincipale extends JFrame{
public int getTime () {
return this.time;
} | 1 |
9078f2a2ab11351dd5a5e0c2650f7ee6 | bd705cdfc2d7a64945d60a87f76b6cd5 | Checks for the instruction restrictions from page 37 ("Summary of
Instruction Restrictions"). | public abstract class OpcodeDecoder
private void checkValidity(Instruction instruction) {
checkAddressing(instruction);
checkIndexation(instruction);
checkAcc(instruction);
checkOperand(instruction);
} | 1 |
6f7c9c28c81fd2a83c876ec43f79286f | 9a12654d1f6875a1e8443092d9fb9dfa | Function to merge a list of yaml report files into a report object | if env is None:
env = os.environ
configs = []
if yaml:
configs.extend(collect_yaml(paths=paths))
return merge(*configs) | 1 |
3c8ef8b9006aa704408f7daa9737e2c3 | 39efc708069637041a7017345cec1b68 | Multiply the instance by a power of 2. | Vector3f pow(double pow); | 0 |
5da16383ac5ce641dbce91455ba3f5ce | 95ff3e9b2327b693826945d120394a47 | 编辑页面调整明细数量 | class Index extends DmpAdminController{
public function count_edit(){
if(IS_GET){
return $this->edit(
array(
'url'=>'/dmp_admin/index/count_edit_data',
'params' =>array(
'id' => I('id')
)
... | 1 |
50c140ace9c8c86754326044e5e38e32 | f2243e88087844f087975016a7ef3aa9 | 根据选中父节点的值获取对应的出入库类型 | if(search.get("sparentid").getValue()!=""){
var str = "";
for(var i =0;i<sparenttype.length;i++){
if(search.get("sparentid").getValue()==sparenttype[i].sid){
str = sparenttype[i].sparenttype;
}
}
var orgtype = str.split(",");
itype.setValue(orgtype);
}else{
itype.setValue(Globle.constant.AuditOr... | 1 |
1b1dc0d696db4b364248507ff6dd672b | 4f40efabfe3b9d1e2b46235b585d2fe9 | r"""Adds a new label element to an existing CenterNet target.
The new label will be concatenated to along the heatmap channel dimension
immediately preceeding the regression component of the heatmap. | target_size = (args.resolution, args.resolution)
add_time_ids = list(original_size + crops_coords_top_left + target_size)
add_time_ids = torch.tensor([add_time_ids])
add_time_ids = add_time_ids.to(accelerator.device, dtype=weight_dtype)
... | 0 |
74080c87f0748548a1b3e5853d93be0e | f260c04724a0260439f04d3589709c01 | 接收处理:成就分享通知 | local achievementId = proto.parse_proto_req(cmd, content, len).AchievementId
local ret = receive_achievement_point(account_info, achievementId)
local resp = {
Ret = ret,
AchievementId = achievementId
}
return send_response(cmd, resp)
end | 0 |
7598a6d3fcefe3ceb9d6376d98f68d56 | 1597c45ba12c186b5eb5a2b37a6fc596 | Indicates the value that the luma channel must have when the chroma channel is at its maximum value, if the color is to remain valid within the RGB color space. | class ChannelEncoderSettingsVideoDescriptionCodecSettingsH265SettingsColorSpaceSettingsHdr10SettingsArgs:
def max_cll(self) -> Optional[pulumi.Input[int]]:
return pulumi.get(self, "max_cll") | 0 |
f4b4cc27c39ae66c6923c396df15edc5 | 0ad8e28e0964168259f95a5152500c3e | Retrieves a {@link Message} from the list of messages and deletes the
{@link Message} from the list.
no messages | class MessageInBox
public synchronized String nextMessage() {
return messages.removeFirst();
} | 1 |
8f713a9b6a9c8510c2e3fc68062e0705 | ce9b295ea89d3919fb765160fba98ef2 | Saves filing fee. For AJAX | $("#emloader").addClass("emloader");
var form = new FormData($("#edit_fee_form")[0]);
$.ajax({
url: 'parse.php',
type: 'post',
data: form,
processData: false,
contentType: false,
success: function(data) {
$("#emloader").removeClass("emloader");
if(data != "") {
if(data == "success") {
load... | 1 |
121fffd041e4c0c7331298b3e6128bfb | 701f30ceb294ce4cb692d7d656695d38 | 리스트 페이지 체크박스 토글 | function chkBoxTr(e){
if(document.getElementById("ck"+e).checked){
document.getElementById("ck"+e).checked=false;
}else{
document.getElementById("ck"+e).checked=true;
}
} | 1 |
f8e0547d3febbc4ed7d356a423e9ae26 | e2010bb698e46ea521ea293765eb6914 | Найти ID счета последней активной операции пользователя по источнику | DateTime closeBankDate = Convert.ToDateTime(ubs.UbsWssParam("CommonDate", "Закрытый операционный день"));
connection.ClearParameters();
connection.CmdText =
"select isnull(sum(d.OBOROT_DB), 0)" +
" from OD_DOC_0 d, OD_DOC_0_DAR dar, OD_DOC_0_FOLDER f, ... | 0 |
516774ed3a0dba0df3608bf44d4f7a67 | 1afc4a12c8f2bd1f634adc4a6214b92e | This method was generated by MyBatis Generator. This method returns the
value of the database column T_AIOT_RESOURCE.SYSTEM_RESERVE5 | public class SysRole extends BaseModel implements Serializable
public java.lang.String getReserve4(){
return this.reserve4;
} | 0 |
d919125a286120c64259484a58462715 | b040c5fc88ae4bb9898def97117fe18b | Encrypts a string using monoalphabetic substitution | encrypted = ""
for char in s:
encrypted += d[char]
return encrypted | 1 |
5686df6bd81144d3ea2ef6f3cf8b30f9 | ca03d6e49ee07298662b4d26f074111d | Create coords from given line parameters | def get_coords(line):
numbers = line.split()
return (int(numbers[1]), int(numbers[0])) | 1 |
4aa2c9d47b6b250d6550dc5678971207 | 90a90cccb53a53274c2cf8be5dfe2147 | 通过账单日期获取总手续费 | Query queryFee = new Query();
queryFee.addCriteria(Criteria.where("feeid").is(account.getFeeid()));
queryFee.addCriteria(Criteria.where("fee").gte(0));
if("yesterday".equals(dateType)){
Date yesterdayStart = getDayByType("yesterdayStart");
Date yesterdayEnd = getD... | 1 |
e95ff03468e6a0204169a18892155265 | 05e95f9942ee6fd53b37c1545d6d2609 | Number of years a student has been in a particular programme | {
$newstd_result = mssql_query("SELECT std_enrollyear, count([std_stdno]) as num FROM [SOAA].[SoAA].[dbo].[vw_bigdata_student] where std_academyno like '$academe' and std_depno like '$dep_no' and std_enrollyear >= $start_year and std_enrollyear <= $end_year and std_degree = 1 and std_enrolltype != 3 and (std_schoo... | 0 |
4b936b6dd96b910ae8816e38657f9c44 | 5d3329f9f53278b6e2b034c0a782d489 | Gets all districts and inserts them into DDDB | namespace Data_Access.DB_Access
class DB_Connection
public List<District> GetAllDistricts()
{
List<District> districts = new List<District>();
using (SqlConnection con = new SqlConnection())
{
try
{
con.ConnectionString ... | 0 |
263a0810d86f111fd0e7a8569064c691 | ee5e7bf8479a2c4fb7321de72da29dca | 向伺服器請求玩家狀態 | NetworkSystem.RequestObject.SuccessAction _onSuccess = (res) => {
player = DataLoader.load(player, res, "player");
onSuccess?.Invoke();
};
getStatus(player.id, _onSuccess, onError);
} | 1 |
96b522b912cc9f1f6cd41126f8f0d79e | c1b54ad0c4d61020b208a3ae14385cb9 | Converts an array of integers into an array of doubles | namespace DeconTools.Backend
public class XYData
public static double[] ConvertIntsToDouble(int[] inputVals)
{
if (inputVals == null)
{
return null;
}
if (inputVals.Length == 0)
{
return null;
}
... | 1 |
3b6c341c018bdd0444945d9c6ce054f8 | 40eaf0c7fcd5b351cd66f63759330201 | 最新试卷列表 | var backArr = ["blue",'orange','pink'];
var book = JSON.parse(sessionStorage.getItem('book'));
var params = {
"ctbcode":book.ctbcode ,
"subjectCode": book.subject,
"gradeCode": book.grade,
"bookType": book.bookType
}
$.post(basepath+'lsd/diagnosis/paperList',{params :... | 1 |
b59950096f63ea50ac0dab4b18b61743 | ea59c3a603e52f64b1c03140957b8a61 | Returns the current simulation step time in ms. | public final class Universe extends ExtendableObject
implements NotificationListener
public long getTime()
{
return currentTime*stepDuration;
} | 1 |
f25e9f190a96d6ccf182c095ba17ab66 | 6b5b1565d9db10319557b84b568ea98f | 在SFTP内部移动文件
源文件名
目标文件名 | try {
connectServer();
ftpClient.rename(oldFileName, newFileName);
} catch (IOException ioe) {
logger.debug("", ioe);
}
} | 0 |
3f20e4d879e26eacc1b7ad35fd8706d1 | f7f70776db4dfcb23065059a3671bf3b | Returns halving time of spread after peak (in days). | class Channel(ABC):
def phase_jump_time(self) -> int:
return self.rise_time * 2 | 0 |
d29bc316de603c19d7e3bd47e53a6d4d | 338ee4305b67bd1944072202b1f593d0 | スコアをテキストファイルに書き込むメソッド | {
std::string newInput = std::to_string(points);
std::ofstream file2(score_file, std::ios::app | std::ios::binary);
file2 << newInput << std::endl;
file2.close();
} | 1 |
9b131a54964f9bba8ccc2770503fa554 | 7d296856b20d08a9219baf394fd9d097 | Returns whether the SDK is the Oreo release or later.
SDK가 Oreo 릴리즈인지 이후 버전인지 반환함 | fun isOreoOrHigher() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O | 1 |
c10763a404d8fc4aa66320395996e500 | bdb51e5d681ab2233d9624aad252af0d | Configures the Twitter external login provider. | namespace Social_Semantics
public partial class Startup
public void ConfigureAuth(IAppBuilder app)
{
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathSt... | 1 |
f86df872d25b7a98619be34a32a63745 | 1f2a82a53a8ebf03ac86a4013cb38a85 | Compares 2 IEE802.15.4 addresses | {
if (addr1 == null)
{
throw new ArgumentNullException("addr1");
}
if (addr2 == null)
{
throw new ArgumentNullException("addr2");
}
byte[] a1 = addr1.GetAddressBytes();
byte[] a2 = add... | 1 |
38a02aead47533b1ab597f56e0383488 | 60bbdc40036d905a93c8c2fb2c19fc83 | builds a recipe object from entered information and saves it to array | class App extends Component
addRecipe(newrecipe) {
let updatedrecipes = this.state.recipes;
updatedrecipes.push(newrecipe);
this.saveLocalStorage(updatedrecipes);
this.setState({recipes: updatedrecipes})
} | 1 |
7056a420d389cdb8b8ee818f21e43beb | b5f1184c4cfa71f363cc99dbd26d61fc | Load Transaction Line Schema | try:
client_transaction_uuid = request.query_params.get('client_transaction_uuid')
client_uuid = find_client_uuid(request)
txns = Transaction.objects.filter(client_uuid = client_uuid)
txn_lines = TransactionLines.objects.filter(transaction_uuid__in = txns, client_transaction_uuid = c... | 1 |
59f2b28eca3f9d880407f8954593c580 | d82d37df2e7ab5186854ab597bc99f63 | Error, invalid argument.
This triggers error in type checking and in runtime. | def test_format_safe_invalid_arg():
with pytest.raises(TypeError):
choose._format_safe(None) | 1 |
028c22669e5f9e5833c941bdb4682d53 | 84a9adfa9f16449e464954a9d88edeb5 | 每个交易日结束后,将指定的成员变量进行更新,比如可用数量(指可以卖出的证券数量)等 | {
CThostFtdcQrySettlementInfoField req;
memset(&req, 0, sizeof(req));
strcpy(req.BrokerID, _brokerID.c_str());
strcpy(req.InvestorID, _investorID.c_str());
while(true)
{
int day=_begin.day_of_week();
if((day==0)||(day==6))
{
_begin+=days(1);
conti... | 0 |
ce7380f7c6d47159f1afc7baf8370da6 | 5e0b18d9d74ca297c8604363151d3fed | Removes extra related entity configurations. | {
modelBuilder.Conventions.Remove<System.Data.Entity.ModelConfiguration.Conventions.OneToManyCascadeDeleteConvention>();
modelBuilder.Ignore<AchievementItem>();
modelBuilder.Ignore<RewardItem>();
modelBuilder.Entity<Account>().ToTable("Accounts");
mode... | 1 |
ddd723875b2ba0c20ca8300c7786f942 | b343e7adb740e96e067bcecbb52c922c | Training for L2-regularised Least-Squares loss with Stochastic Gradient Descent | def least_squares_SGD(y, tx, initial_w, max_iters, gamma, batch_size=1, lambda_=0, min_loss_threshold = 0):
print_step = np.maximum(int(max_iters/10), 1)
w = initial_w
loss_change = min_loss_threshold + 1
loss = compute_loss_least_squares(y, tx, w, lambda_)
n_iter = 0
while (n_iter < max_iters)... | 1 |
e01a086bbcb4d92f297cb51e5f8c16c7 | 2190657d9c979bc8030b9223c65fb66f | 获取缩略图的字节数组 | try {
Bitmap bm = getImageThumbnail(data, width, height);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bm.compress(Bitmap.CompressFormat.JPEG, quality, baos);
byte[] bmBytes = baos.toByteArray();
baos.close();
bm.recycle();
return bmBytes;
} catch (IOException e) {
e.printStackT... | 1 |
3c7d205109d1d657d069be279d469bff | 2199f154c3e7aa1dce90dfc999a98a5a | Return True if entity can move in the given direction. | for cell in self.occupiedCells:
moveToRow = 0
moveToCol = 0
toCellValue = 0
if direction == MoveDir.up.value:
moveToRow = cell.row - 1
moveToCol = cell.col
elif direction == MoveDir.down.value:
moveToRow ... | 1 |
7ea2452440b6aa409e5bfbb1ccf98e0f | 1d26a9de5765be76df7a0371c122b003 | 通过促销活动的查询条件和分页条件,查找出数量 | public class IPromotionCouponRepositoryImpl
@SuppressWarnings("unchecked")
public Page<PromotionCouponEntity> searchAllCouponByPromotionCouponEntity(PromotionCouponEntity promotionCouponEntity, Pageable page){
long recordCount = this.searchCountAllCouponByPromotionCouponEntity(promotionCouponEntity);
... | 1 |
47a4ececdb962791099c42c4281fdb77 | 135732d328db48912002288ffb72b241 | 锁定事件与协程队列 | if self._stopEvent is None:
raise NotStartCoroutineException("协程池还未开启")
if self._stopEvent.is_set():
return
self._stopEvent.set()
asyncio.run_coroutine_threadsafe(self._stop(), self._loop)
asyncio.run_coroutine_threadsafe(self._stop_on_wait(), self._loop) | 0 |
bb38f48291ca959e615f121adb1d619f | 0dd07b6f225e548b5aec2ad3cfbf8567 | getting text and trimming space from beginning and end of the line. | string trimText(string text)
{
string ans = "";
for (int i=0; i<text.size(); ++i)
{
if(text[i] == '\n' || text[i] == ' ')
{
text.erase(text.begin()+i);
--i;
}
else
{
ans.push_back(text[i]);
}
}
return ans;
} | 0 |
760b497b83ef727392ca1c55c945e47f | 70ae2a5c98b57970da10bcb8250f60b9 | Test case for com_adobe_cq_social_connect_oauth_impl_facebook_provider_impl | class ConfigmgrApiTest extends \PHPUnit_Framework_TestCase
public function testComAdobeCqSocialCommonsEmailreplyImplIOSEmailClientProvider() {
} | 0 |
001265baa75e12e2e199cb851fdbf9f7 | 67d0d2d16c015412e4f2512d74c83388 | Used for specific test case to check if timeouts are working in ScanningResultIterator. | public async Task TestTimeoutEvenWhenServerHangs()
{
await using var harness = await new MiniKuduClusterBuilder()
.AddTabletServerFlag("--scanner_inject_latency_on_each_batch_ms=200000")
.BuildHarnessAsync();
await using var client = harness.CreateClient();
var ta... | 1 |
37f94bbf503f741b87a49c03855e9623 | 3007403adf8ade30a0cdf23b3ce2121e | colonne ADRESSE (propriete adresse) aggregee par la fonction min() a utiliser dans les requetes. | class AdresseAdmin extends Admin
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
$datagridMapper
->add('nom')
->add('ligne1')
->add('ligne2')
->add('ligne3')
;
} | 0 |
9c97adc545b35bbb5595ac16ac1d47a9 | d24d09b274db593b3b7e55b3db5e6008 | Hook for gathering user registration validators, implementers must return
a callable that accepts a
:class:`~flaskbb.core.auth.registration.UserRegistrationInfo` and raises
a :class:`~flaskbb.core.exceptions.ValidationError` if the registration
is invalid or :class:`~flaskbb.core.exceptions.StopValidation` if
validatio... | def register_validator(instance, **options):
get_component(ValidatorPackage.COMPONENT_NAME).register_validator(instance, **options) | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.