query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
170af8d11b02757866a3aac799471838 | fa2b15501600ec97be98d526f9ab56d5 | チューニングの FormArray の Getter | export class ProductComponent implements OnInit
public get productVersionArray(): FormArray {
return <FormArray>this.productForm.get('productVersion');
} | 1 |
efd5c9c7ae807cdc71ef37daf4923b21 | 4c954a1b65091f5680c4fcd17c5e082a | Adds a Quantity Discount | {
$store_id = getValue('store_id', 'int', 'POST', 0);
$product_id = getValue('product_id', 'int', 'POST', 0);
$quantity = 0;
$db_query = new db_query('SELECT pro_quantity FROM product_quantity
WHERE store_id =' . $store_id... | 0 |
8df9249deec1c20d1b2500909d30b57c | 96e483f0c086e784d8f70ae94ada3705 | Gets the admin city add status. | {
$admin = $this->get_user();
if ($admin && $admin->loaded())
{
return $admin->has('cities', $city_id);
}
return FALSE;
} | 1 |
0140ef4cc8520e66af374d6a09102077 | d7513dac033b5e9ca43a1c33c863ce63 | Lines 28-51 | local asset_tweak_data = tweak_data.crime_spree.assets[params.asset_id]
local dialog_data = {
title = managers.localization:text("dialog_assets_buy_title"),
text = managers.localization:text("dialog_mission_asset_buy", {
asset_desc = managers.localization:text(asset_tweak_data.unlock_desc_id or "menu_asset_unk... | 1 |
8845498c638375b586c6ac596ec822f9 | 3445390916cd90642c2121583c82f30b | 优先使用用户输入的-Xjre选项作为jre目录。如果没有输入该
选项,则在当前目录下寻找jre目录。如果找不到,尝试使用
JAVA_HOME环境变量 | if (javaHome == null) {
javaHome = recoverJavaHome();
}
return javaHome;
} | 0 |
581244b97ae8d0f78ceb2291cb262419 | b1cb76af0da3c6c717dc3c35f0e9e3ba | 所有景点 | class Scenic extends admin
public function index()
{
$map = array();
if($keywords = Request::instance()->param('keywords')){
$map['name'] = ['like','%'.$keywords.'%'];
}
$list = ScenicModel::getList($map);
$this->assign('list',$list);
return $this->fetch('admin/scenic');
} | 1 |
57d835e086ae78b30598dd27f2f2b769 | b51c640c35c63bb3e1d0991bae857c79 | Returns a publisher's id from db given their name | {
$errorCode;
$message;
$db = Db::getInstance();
$sql = "SELECT authorID FROM author WHERE UPPER(name) = UPPER(?)";
$data = array($name);
$authorlist = array();
try
{
$stmt = $db->prepare($sql);
$stmt->execute($data);
$r = $stmt->fetch(PDO::FETCH_ASSOC);
... | 0 |
c768b498ef39aa9cfabdbd113a2fd19f | 86b4bc7a13f8c7c48c24da0424dba0fd | 使用样例 | corpus = np.array([0, 1, 2, 3, 4, 1, 2, 3])
power = 0.75
sample_size = 2
sampler = UnigramSampler(corpus, power, sample_size)
target = np.array([1, 3, 0])
print("target: ", target)
negative_sample = sampler.get_negative_sample(target)
print("negative_sample: ", negative_sample) | 1 |
f840bd9aa3968e9385706518966c5d50 | 64766ac80ef7c02fb81a43ef9c5b3af4 | выбор номера порта | char port[MAX_BUFFER];
bzero(port, '\0');
int res = readFromKeyboard(port, MAX_PORT);
EvalResult(res, NULL, 0);
int portNumber;
EvalResult(portNumber = atoi(port), NULL, 0);
return portNumber;
} | 1 |
091b3cff988220cab829d16182d2b780 | 0849b27a452e49d4f8dcaa767d6a6327 | Esse tipo de ReportBuilder não é navegável, o relatório é formatado para leitura (csv) | {
if (!_loadSubreport)
e.DataSources.Add(new ReportDataSource("Produto", new Produto[0]));
else
base.report_SubreportProcessing(sender, e);
} | 0 |
0dfebe5c65110a41832bda4bf0209dd2 | f5dc232d375f034fa5918902030b8c83 | Intraclass Correlation Analysis ported from R package psych (not completely)
Output matches R and SPSS output | def interclassvariance(data, threshold):
length = len(data)
noise = 1
noisepower = 0
signal = 1
signalpower = 0
for e in data:
if e >= threshold:
signal += 1
signalpower += e
else:
noise += 1
noisepower += e
signalratio = signa... | 0 |
895021056da74e076c2221780efdb1f4 | ce20b41dd6de17ed079655fb0bd6e9e6 | check if the Piece on the specified position is a first move Pawn. | if pieceType == 'WP' and fromPos[0] == 1:
return True
elif pieceType[0] == 'W' and fromPos[0] == 0:
return True
if pieceType == 'BP' and fromPos[0] == 6:
return True
elif pieceType[0] == 'B' and fromPos[0] == 7:
return True
return False | 1 |
b227b1e86b663ec8ea4b00cbb0729fbc | d3d393bf27b06e5cdcfe8cbc78a2f0cc | 判断字符串t是否为s的重排后组成的单词 | {
if (s.Length != t.Length)
return false;
if (s == t)
return true;
List<char> ss = new List<char>(s.ToCharArray());
List<char> tt = new List<char>(t.ToCharArray());
for (int i = 0; i < ss.Count; i++)
{
... | 1 |
9183ce00d49c06f6570e99f7363d24a8 | e0cd883041cacf88665bcf7e2ea4576f | Get the pixel movement of various important pixels
uses the previously passed frame
(either through last call of this function or init() )
and compares points of interest | class ClassicMethod(PersonDetection):
def __get_motion_pixels(self, gray_frame):
if self.__auxiliar_frame is None:
self.__auxiliar_frame=gray_frame
dif_frame = np.abs(gray_frame * 1.0 - self.__auxiliar_frame * 1.0)
return cv2.threshold(dif_frame, self.__motion_thr, 255.0, cv2.THRESH_... | 1 |
9319c504c5ee70904e6b4f1337910340 | c534598d4848c5545517814435c1fbeb | 比较两个数据库的区别,输出SQL | DatabaseConfig.switchDatasource(DatabaseConfig.DATASOURCE_1);
List<TablePO> db1Tables = tableMapper.selectByDbName(databaseConfig.getDs1Db());
DatabaseConfig.switchDatasource(DatabaseConfig.DATASOURCE_2);
List<TablePO> db2Tables = tableMapper.selectByDbName(databaseConfig.getDs2Db());
... | 0 |
dd395d13b6c464a8eaf2a6df6ce756cb | 046749cf2021a36c81a00b6b3585a407 | Record execution span for a task phase. | public class Blocks
public static <T, E extends Exception> T recordSpan(
String projectName,
String taskPath,
GradleBuildProfileSpan.ExecutionType type,
ThrowingBlockWithReturn<T, E> block)
throws E {
ProfileMBean profileMBean = GradlePluginMBeans.INST... | 1 |
92e28ea378fac076baa47aed021a5d90 | 361d4fdc67bac5f2bcedd3dff211222b | добавляет параметры поиска к табам | $configTabs = $this->getConfigTabs();
if ($configTabs instanceof iAdminModuleTabs) {
$configTabs->add('config');
$configTabs->add('megaindex');
$configTabs->add('yandex');
}
$commonTabs = $this->getCommonTabs();
if ($commonTabs instanceof iAdminModuleTabs) {
$commonTabs->add('webmaster');... | 0 |
decc403a4acdffa98704f67520a845fe | 2d36b4d8ab08738c6f25a2b51d9c239c | create a mock promise that returns data param | function mockSync(ret) {
return () => ret
} | 0 |
6fb9f8602ef786cf26a2a75e321fd5e5 | 02b10307bfe95fac170c1c4fb6ed1362 | This displays the last mini-game's prize and a congratulatory message.
This also lets users to see the farm with the prizes that he/she got.
Furthermore, it also let the user continue to the next level or go back to the page where the levels are displayed.
This function will be called whenever a level ends, which is af... | ImageIcon masterChefIcon = new ImageIcon("src/img/MASTER_LOGO.jpg");;
JOptionPane.showMessageDialog(null, "You are a very good chef at your little restaurant downtown.\n"
+ "Lately this hasn't been enough to you...you want to be famous!\n"
+ "You want to have your own TV show, write your book and se... | 0 |
578c541bdfb0eb3d63fa8abed8110d78 | 9d258213aed358c6ce2d8ed0fedb0f1d | Fires an event informing all {@link CssRuleContentListener}s that property <code>key</code> changed. | log.trace("Notifying listeners for key '" + key + "', value '" + value + "'");
routeService.notifyListeners(key, value.hashCode());
} | 1 |
2f7e75e612fa6b2fe599b9687791de6e | bec22e233aa8a428421caeb2c7407db9 | when an "ok" is received the new album will be added to the albums repository | {
if (e.Error != null)
{
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
MessageBox.Show(e.Error.Message);
});
}
else
{
EyeemRootObject root = new EyeemRootObject();
... | 0 |
5042b6a8895e60638abd3131fd3e21db | e3b4fe544f6c9d75145d5c87d9a8a82f | Creates a Discrete distribution which is uniform over values in
multiple ranges specified by pairs of start and end values. These pairs
are specified as adjacent values in an enumerable whose length must therefore be
even. | {
RequireNonNegative(count, nameof(count));
return new AsyncEnumerableRange(start, start + count);
} | 0 |
5f9452e1f6f530d9f79a50443696e5ad | e7aa8fa5567c5a59db49f41c423e6ba5 | apply the all permission policy to all of our classes and packages. | class OrgAuthPolicy
def apply!
instance_eval(&self.class.default_policy)
end | 0 |
17c65831e94c6e8d71fda1831d03de08 | fd8839412c50bfc6e303f399532cdb1b | Removes the <paramref name="currentGalleryObjectId" /> and the <paramref name="mediaIds" /> from the media conversion queue,
if they exist there. | namespace Imgur.API.Endpoints
Task<bool> RemoveFromGalleryAsync(string galleryItemId); | 0 |
322fd71718bbb8144564234d58e6828f | 05637ca921d2e62ace5953017975f9c4 | Enable disabled GPIO module clocks. | am_bsp_ios_pins_disable(uint32_t ui32Module, uint32_t ui32IOSMode)
{
uint32_t ui32Combined;
if ( ui32Module >= AM_REG_IOSLAVE_NUM_MODULES )
{
return;
}
ui32Combined = ((ui32Module << 2) | ui32IOSMode);
switch ( ui32Combined )
{
case ((0 << 2) | AM_HAL_IOS_USE_SPI):
#if define... | 0 |
002f1c053b4eef35855d00355a152c1e | af5f591ae033f0913c3655a691422e3d | Thread name prefix that executor will use while creating new thread(s). | String getThreadNamePattern(); | 1 |
bb0c0d71121a78a73a4764c55a94a737 | 34a85c5c13ba59d399e6851c0d27ec57 | Gets the id divisa. | public class CarteDivinite extends Carte{
public CarteDivinite getDivinite(int id){
return this;
} | 0 |
93523ffddb96a0370b9de1f109faa7cd | 73a96686f696e5e77e47a1862b20a290 | Processes the edit next of kin. | namespace ESSV2.Controllers
[Authorize]
public class ValuesController : Controller
public JsonResult GetNextOfKin()
{
var nextOfKins = ServicesDTO.GetNextOfKins(ServicesDTO.GetCurrentUser().EmployeeNumber);
return Json(nextOfKins, JsonRequestBehavior.AllowGet);
} | 0 |
ef3c073de85c654aac015f663390ed4e | 62779103ede8cfd16df4877e1bb4645e | Получить сумму проданных товаров сотрудника за прошлый месяц. | {
$month_employees = static::with([
'expenses',
'clients.orders' => function ($query) use ($date) {
$query->whereYear('purchase_at', $date->year)->whereMonth('purchase_at', $date->month);
}
])->whereHas('clients.orders', function ($query) use ($dat... | 1 |
cb585b346ad9ddf5c46444ee99954da1 | dfdd857f7136941e986779e7cd35f839 | метод, составляющий URL для получения расписания конкретной группы | expected_result = 'http://localhost:3000/Groups/Dnipro/' \
+ group_name + '/shedule'
self.group_page.select_group_by_name(group_name)
self.group_page.group_calendar_button().click()
self.assertEqual(self.group_page.get_current_url(), expected_result) | 1 |
4d8653b3843480d8b84887306676d605 | ccbec2b7ab3c0828d5798158b176e719 | метод, в котором реализован бег | public class lvl_1_task_13 extends Thread
public void move() {
for (Horse horse : horses) {
horse.move();
}
} | 1 |
402b02345ed0ffa903efbf38fcf9b427 | a819528431c23e6fb363a5191a0a3a5e | funkcja tworząca Hash (32-bitowa liczba) podanego tekstu | DWORD gethash(char *s)
{
DWORD h = 0;
while (*s != 0) {
h ^= *s;
h = RotateLeft32(h, 3) + 1;
s++;
}
return h;
} | 1 |
cab029fa4c00db73d4a5505953b21b8d | 26b4ba1e06f4bf2ffd2f3b9301b96cba | Set a target, or fruit, or whatever, to a random location. | public class SwarmMinion : DamageableObject
void Start () {
targetPosition = randomLocation();
} | 1 |
bc134ff1cbec71c70a49bec3ac2a782b | 45ec1b6c8aa76edb4181ac059b1e677a | Get all hours of a particular worker by id | @Controller
public class TimeSheetRESTController
@RequestMapping(value = "/getHours", method = RequestMethod.GET, produces = "application/json")
public @ResponseBody HoursWorked getHours(@RequestParam("employee") Employee employee, @RequestParam("period") String period) {
HoursWorked hoursWorked = hoursWork... | 1 |
b7bd124f670faec3e94febd268e554be | 8b8a69a20f1135a8ed6fcfda4197f734 | ProcedurePool 에서 보내려는 패킷을 처리할 델리게이트를 지정 | public class NetworkSampleManager : MonoBehaviour
public void RegisterPacketHandler()
{
ProtobufManager.Instance().SetHandler<LOBBY.SC_LOG_IN>(opcode.SC_LOG_IN, handler_SC_LOG_IN);
ProtobufManager.Instance().SetHandler<GAME.SC_PING>(opcode.SC_PING, handler_SC_PING);
} | 0 |
4b29831ce102e29b01eea1124c07e6a2 | 3c21d73430e4f0cbf98eebeed7368335 | Setter for _out_extent.
Preconditions: extent is either "BASE", "WARP", or "DEF". | if not isinstance(units, myokit.Unit):
raise SBMLError(
'<' + str(units) + '> needs to be instance of myokit.Unit')
self._extent_units = units | 0 |
b29b278b2aab09d68ab706a002c9103b | ac026356706792256a51b481a2dd0a05 | 从字母中随机获取固定个数字符进行拼接 | public class RandomUtils
public static String getLetterString(int length) {
StringBuilder sb = new StringBuilder();
Random random = new Random();
for (int i = 0; i < length; i++) {
sb.append(LETTER_CHAR.charAt(random.nextInt(LETTER_CHAR.length())));
}
return sb.toStri... | 1 |
9e29e491f5bb5e5ce113065580a83447 | e8c8922cb507dedd522b12798a36bbb7 | Updates the publisher-specific custom data for the user which can only be read by the client | namespace PlayFab
public static class PlayFabServerAPI
public static void GetUserPublisherData(GetUserDataRequest request, GetUserPublisherDataCallback resultCallback, ErrorCallback errorCallback, object customData = null)
{
if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception("Mu... | 0 |
0d2f17b4115c438f649123eab74897b0 | 42d913cd618af90418590d10ac2b999d | POST: api/Blob | public IActionResult Post()
{
var database = _client.GetDatabase("UploadDB");
GridFSBucket g = new GridFSBucket(database);
List<string> result = new List<string>();
var files = Request.Form.Files;
foreach (var file in files)
{
... | 1 |
4274ec348b4f084ca6cfdeb1e920b82c | 085e7c809f5ecc62935a3f78a6a49e74 | Constructs a spherical polynomial from an array. | Ostap::Math::Positive2D::Positive2D
( const std::vector<double>& pars ,
const unsigned short nX ,
const unsigned short nY ,
const double xmin ,
const double xmax ,
const double ymin ,
const double ymax )
: m_bernstein ( nX , nY , xm... | 1 |
a443b427f71d6657cefade1b53062237 | b68d8ce1e24bb42a787d9c6b2195d049 | 引数のクエリでElasticSearchからWebページを検索し、結果のリストを返す。 | function query(schema,query) {
_ctrl.loading = true;
var queryParameters = {
'q': query,
'sort': 'createdDate_dt desc',
'fl': 'identifier_s,hostGovernments_ss',
'wt': 'json',
'start': 0,
'rows': 50000,
'facet': true,
'facet.field': ['s... | 1 |
6afd47863eda81da8140a974b9f0b4d8 | 43cbecf08b5b1e88622a64721d6e1273 | 每天定时执行一次的任务 | @Configuration
public class WeatherSchedule
@Scheduled(cron = "0 01 12 * * ?")
public void deal() {
log.info("WeatherSchedule thread is start,currenttime is " + new Date());
dealTask();
log.info("WeatherSchedule thread is end,currenttime is " + new Date());
} | 1 |
d8ca89807381d872348a712988f06541 | 4418a3c27f04726fd46e4cc0490632e0 | Obtiene estado del S2. | public function getS28()
{
return $this->s28;
} | 0 |
4db56ed3ab2959ce6ca372b65c653918 | 0d2fe913e09c21e56c0614077772e983 | creates an Employee struct from random generated data fields | struct Employee* makeEmployee(int birth, int start, const char *name) {
struct Employee* e = (struct Employee*) malloc(sizeof(struct Employee));
e->birth_year = birth;
e->start_year = start;
strcpy(e->name, name);
return e;
} | 0 |
da312db5a7aaa3cdeab3b249481847fc | 2288566114f50bdbd1e248b39f30a5db | Set manually matched params from rewrite route matching process into
current route object. Use this method only on currently matched route!
Passed array must have keys as param names and values as matched values
and it must contain all only matched rewrite params and route controller
and route action if any. | public function SetMatchedParams ($matchedParams = []); | 1 |
81fff74b4a1462a27a64bcccd8cb1666 | 0b7c5e60fbef813d711c0de430b2e7b6 | Runs two actions concurrently, synchronizing their
execution as much as possible and waiting
for them to finish. Exceptions from
either of them are re-thrown. | public class ConcurrencyTest
static <V> Vector<V> runConcurrently (List<Callable<V>> calls) throws InterruptedException {
final Vector<V> results = new Vector<V>();
final CountDownLatch allDone = new CountDownLatch(calls.size());
for (final Callable<V> logic : calls) {
new Thread() {
@Override public void ... | 0 |
78b87c263b4cb4168963729a7f99fd8f | 97368ad3cde47f1b890b28b59c839429 | Gets the guild count from the bot object | class Miscellaneous:
def get_server_count():
return len(ex.client.guilds) | 1 |
b627b18153bb7df2ddd2152377c99f7a | caefeee5bf94c912861d385700ce6084 | ユーザ名とパスワードから詳細を取得する | function get_user_for_login($dbh, $password, $user_name) {
$sql = "
select
user_id
,user_name
,user_img
from
users
where
password = '$password'
and user_name = '$user_name'
;";
return get_as_array($dbh, $sql);
} | 1 |
b91150fa749cb69200b700fca0a4bf7c | dde9d18f628c5aee60704bbc42ac7d62 | Formatter that chops excessive logging argument strings to a defined
limit. Useful e.g. to restrict logging output from request bodies.
To use, pass a key "output_limit" to the "extra" argument in your
logging calls. The logging message will then be truncated to the specified
length. | if record.args and hasattr(record, 'output_limit'):
record.args = tuple([truncate(arg, limit=record.output_limit)
for arg in record.args])
return Formatter.format(self, record) | 1 |
f547d23a6f34ca98ae7a3b34b3f3695f | 6ce0292df4a2d600044822fc92fe57ce | Takes the EHR text file and converts content onto RichEditBox | namespace SitaffRibbon
public partial class EnvoyerMail : Window
void LoadRTBContent(Object sender, RoutedEventArgs args)
{
} | 0 |
960c236779961ee508cc41d55cf82851 | d54cf04c2c1e2c397cb0d2a0805a5aac | Уведомляет, что ресурсы устройства могут быть пересозданы. | void DestructibleEnvironmentMain::OnDeviceRestored()
{
CreateWindowSizeDependentResources();
} | 1 |
a099deda098ccee7126dfb7b2f41e817 | 00049cca822c1afed7d843a4065f1d75 | 如果有更新背包列表 本地刷新右侧的ScrollView数据 | if self.panel4_list == nil then
self:CreateLogList()
else
if self.panel4_list.scroller.isActiveAndEnabled then
self.panel4_list.scroller:ReloadData(0)
end
end
end | 1 |
7dbfff8e9fed9809a2d04c3b092d474c | d82a52b4eedbe1c7142f5bf5d6e399f5 | Ensure that we can check if a query parameter is set. | {
$this -> assertEquals ('The quick brown fox jumps over the lazy dog.', $this -> object -> getQueryParam ('queryParam2'));
} | 0 |
effb0ef51920d0cc9f959bc534ed9b66 | d82d1ad4b6fd281e7b1ee6989c4735b1 | Metodo para definir la operacion sql para buscar horarios de un espacio con su id y segun el dia de la semana | class funcion_registroCambiarGrupoInscripcionesEstudiante extends funcionGeneral
function buscarHorarioEstudiante($espaciosInscritos) {
$horarioEstudiante=$this->procedimientos->buscarHorario($espaciosInscritos);
return $horarioEstudiante;
} | 0 |
0f9235a6be5e4c855a593e477c6ca472 | 6bb85de0e74ae151be21884c8b7533fe | 对queries进行分词,每个用户的所有查询词组成一个文本 | search_words = search_word.split()
query_words = []
for word in search_words:
query_words.append("kw" + word)
return "_".join(query_words) | 0 |
55c60950d878bae000ed152079a6b303 | bbf38c4e48efd06eb15e3f54cc2c262b | Formats the options for the warning service message. | {
$messages = [
'ipv6NotAllowed' => $this->ipv6NotAllowed,
'ipv4NotAllowed' => $this->ipv4NotAllowed,
'message' => $this->message,
'noSubnet' => $this->noSubnet,
'hasSubnet' => $this->hasSubnet,
];
foreach ($messages as &$message) {... | 1 |
56a58461cf2c03841b141541a14a2c63 | 4108bc8ec4c27dabd11b4cfd6571f98c | Gets an instance of type PhD with the given name. Does not modify the underlying ontology. | return {
"date": self._get_phd_year(response),
"institutions": [{"name": "Brown University"}],
"degree_type": "PhD",
} | 0 |
b4aea89f3ffd968326652cb9e5cae3f0 | 6555f3876eb20a862bd0fef4d9670e9d | Indicates if the client has OAuth Application
client_id and secret credentials to make anonymous
requests at a higher rate limit | class FabAirflowSecurityManagerOverride(
FabAirflowSecurityManagerOverrideDb, FabAirflowSecurityManagerOverrideOauth
):
def is_auth_limited(self) -> bool:
return self.appbuilder.app.config["AUTH_RATE_LIMITED"] | 0 |
b545c0a12cb989367e3ce21c0a325856 | 883810a072cf65c89357d293c43d74c7 | Returns the number of map units in each column. | class MatrixTable(wx.grid.PyGridTableBase):
def GetNumberCols(self):
return len(self._panel._units) | 0 |
617158ade9b487c5ea838f108987fdc8 | f0f133385cabd754070ba26e270b6bfd | SupportByVersion Word 9, 10, 11, 12, 14, 15, 16
MSDN Online Documentation: http://msdn.microsoft.com/en-us/en-us/library/office/ff193977.aspx | namespace NetOffice.WordApi
[SupportByVersionAttribute("Word", 9,10,11,12,14,15,16)]
[EntityTypeAttribute(EntityType.IsDispatchInterface)]
public class Envelope : COMObject
[CustomMethodAttribute]
[SupportByVersionAttribute("Word", 9,10,11,12,14,15,16)]
public void Insert(object extractAddress, object address, o... | 1 |
a266005349dfa0abe519c12e1218cfcf | 7c8326c8b437969982ac70b62892f7d6 | Dwarf unwind information is precise about whether a pc is covered or not,
but arm unwind information only has ranges of pc. In order to avoid
incorrectly doing a bad unwind using arm unwind information for a
different function, always try and unwind with the dwarf information first. | {
for (int i = 0; i < ARRAY_SIZE(exceptions); i++) {
uint32_t start = (uint32_t)exceptions[i].start & ~0x1U;
uint32_t end = (uint32_t)exceptions[i].end & ~0x1U;
if (esf->basic.pc >= start && esf->basic.pc < end) {
esf->basic.pc = (uint32_t)(exceptions[i].fixup);
return true;
}
}
return false;
} | 0 |
f25300e8579f78260ffa13b81a7ca0dd | 5f17f6ba1b9e0cebf3eb32daad72ab0a | Function called from the html, that reads the id of the question and deletes it | namespace Kali_Web.Quiz
public partial class ConfigureQuiz : System.Web.UI.Page
protected void DeleteQuestion(object sender, EventArgs e)
{
var questionId = ((HtmlAnchor)sender).Attributes["question-id"];
DeleteQuestionFromDatabase(int.Parse(questionId));
Page_Load(null, ... | 1 |
a318a6ccd013761c2bd08d6956480c70 | ce56bb24bd23c4653aa68d277e54b1db | 画垂直的圆进度 | float startAngle = START_ANGLE;
for (int i = 0; i < circlePercentDatas.size(); i++) {
CirclePercentLineView.CirclePercentData circlePercentData = circlePercentDatas.get(i);
int v = (int) (circlePercentData.num / totalNum * 360);
if (currentProgress[i] < v + 1) {
... | 0 |
90db62c4671fab21c3ceff5cff3691c0 | b9ad839a50f1b61d8e8e01d53bc68ab5 | Removes all the actions associated with a particular trigger. A convenience method. | {
foreach (TriggerAction triggerAction in this)
{
triggerAction.Detach();
}
} | 1 |
55de3c0557e5da0b638fb49f81b2ed2e | 5cb63b7248cd71fbd5faeba2330d3ca2 | gets value by the last name e.g
t2/myaccount/valuex
returns value or empty string if nothing is found | {
if(isset($this->dataset[$key]))
return $this->dataset[$key];
if($load_database == true)
{
$datarow = $this
->where('is_deleted', 0)
->where('name', $key)
->orderby('date_created', 'desc')
->find();
... | 1 |
a893104bfee99e6260a45f52c9552e47 | 26e18487cf751ee60faf83ecba581536 | BST递归查找 | if (root== nullptr){
return nullptr;
}
if (val==root->val){
return root;
}else{
return val>root->val?searchBST(root->right,val):searchBST(root->left,val);
}
} | 1 |
df3d0a779c7589a69d30e569ae44cf55 | 71ba3276a496cebd50e9491e03438431 | Aktif siparişlerimizi veritabanından çeken fonksiyon | namespace KaracaCafe
public partial class Form7 : Form
private void button1_Click(object sender, EventArgs e)
{
tablo.Clear();
OleDbDataAdapter adtr = new OleDbDataAdapter("Select * From siparis Where masano='"+textBox1.Text+"'", rapor);
adtr.Fill(tablo);
... | 0 |
b1a31fe71982339e379482abd0f43579 | 21d986ddd9d00123de81cb777179c516 | 更新产品列表,传入最大页面和已有的最大产品ID | var url = listUrl + '?pageIndex=' + pageIndex + '&pageSize=' + pageSize
+ '&productCategoryId=' + productCategoryId + '&productName='
+ productName + '&shopId=' + shopId;
loading = true;
$
.getJSON(
url,
function (data) {
if (data.success) {
maxItems = data.count;
var html = '';
... | 0 |
2bf39677d6abc81b2e651294e27c4899 | 0ec8af5c9fb6ad4e434f6f02d558ed4f | Associe un modèle cette vue, qui devient observateur du modèle | void notifierObservateursModele(); | 0 |
be9c2711c43b574215abdd59c6ee1c77 | d315cef776d6ee12aaf489e5bf826355 | End training, prevent validation | avg_loss = torch.stack([x['val_loss'] for x in outputs]).mean()
print(self.confmat)
global_correct, average_row_correct, IoU, mean_iou = self.confmat.stats()
self.confmat = ConfusionMatrix(self.hparams.num_classes)
self.student.train()
return {
'val_loss': av... | 0 |
bcf768d8deb6906e90dd1b08c06d395f | 9603ad241286b61e3fcaf142cca80a9c | Recupera atividades em progresso de projetos por gerente. | public List<Atividade> recuperaAtividadesEmProgressoDeProjetosPorScrumMaster(String login); | 1 |
47a4f7dedbeb5d4ec28186789b0e928b | 7aac24d9c3165cb1a4fe3f971f08546e | associates a field or fieldset with the given fieldset by creating a fieldset child | fieldsets, new_fields, block=None, position=-1, blockname=None, blockattrs=None
):
if blockattrs is None:
blockattrs = dict()
if block is None:
fs = (
list(fieldsets[:position] if position != -1 else fieldsets)
+ [
(
blockname,
... | 1 |
7ddf015dfecc5d08f5afcd91bc596f2c | edee1051c107d71cb4b9823035d9836c | Set industryId | set_industryId(state, info) {
state.industryId = info;
} | 1 |
12fc3f3478bdbe402bc2e11e16785ae6 | ea55f95aeea6157114817d19312bb492 | Type guard for RoccClientError. | if (value instanceof CustomError) {
handleError(value);
return false;
}
return true;
} | 0 |
890ecac578684409357f23bc4a4592a2 | 94af9f66cd46d6695d0f082ad615cc2b | 金融機関支店コードを取得します | public class BukkenSearchServiceBean
public String getShopCode() {
return shopCode;
} | 0 |
177ea0489a4f03d3dcc01f19c002e9ff | 391e1dacc6640241d78357fd538e2bd6 | 批量关注资源 | namespace DAL
public class ResourceDAL : BaseDAL
public static List<Model.ResourceModel> GetAttentionList(int playerId, int resourceTypeId, int resourceTagId, ref Model.PageInfo pageInfo)
{
using (var Conn = GetConn())
{
Conn.Open();
string sql = "";
if (resourceTagId > 0)
{
sql = string.F... | 0 |
7f137e394e5f742f8ca173bbce69b968 | 41a4b4aac1038a4723e062d332553a37 | Returns the position of the given absolute rank within the (virtual or non-virtual) internal 1-dimensional array.
Default implementation. Override, if necessary. | public abstract class NdArrayImpl implements NdArray
protected int indexPosition(int [] coords) {
return helper.getIdx(coords);
} | 1 |
7f04b51e5cc63c10da87005c575fb64a | 358b9130954ee5d72b2c7bc3d9d9fa04 | The group control number upper bound. | public class EpicsETLController extends DeviceBase implements InitializationListener
public int getUpperLimit() throws CAException, TimeoutException, InterruptedException {
return controller.cagetInt(ulimrbv);
} | 1 |
2cd57aab85195fa5b9f379cd9d30f2ea | 30c7bcfebb135c7d295761e76fb3aa0b | Returns current db end escape char | class CsvSheet extends Sheet
public function getCsvReadEscape() {
return $this->csvReadEscape;
} | 0 |
c9860462a6c9fcfa84a4303bc210603a | 828c7c8bb5ba2d62bc5be26b75ff5aa2 | For base class, clear customizable elements.
Actual rendering will be performed by extending class. | class AGUIElement
AGUIElement::~AGUIElement()
{
} | 0 |
642571304e25d9375f97367f00ebeb6d | 9eb79ad61f4a09fddce6c60333362a4a | Returns the part associated with this site | public String getSite(); | 0 |
2ad02ba4005c2b48f62af3bd526d8816 | 0eb378c60c1973a4aae728098123fb73 | 限制消息占用内存 | public class BaseApplication extends Application
@Override
public void onLowMemory() {
super.onLowMemory();
} | 0 |
7feac3de91a138a82bf301a4f6f401fe | ae004863ba83c0d35e583b11327e616f | process MIDI input | void loop()
{
MIDI.read();
} | 1 |
9daf54cbb71b617af30cf87b07c2493f | c7283197b14098561f9f06fc353bd55e | 返回指定元素的文本内容或设置其文本内容为第二个参数 | function setInnerText(elememt, text) {
if (typeof elememt.textContent == 'string') {
elememt.textContent = text;
} else {
elememt.innerText = text;
}
} | 0 |
b7e21a364f59e30661aab50def14eedc | 8c4958a40d2eaf74a1538461c5b5d788 | Executes the scheduled copies. | {
if (this.Config != null)
{
for (int i = 0; i < this.Config.Executes.Count; i++)
{
try
{
((IScheduledTaskExecute) Activator.CreateInstance(Type.GetType(this.Config.Executes[i]), true)).Execut... | 1 |
1ffe05060ef98d71354513a2cf369aab | decbea18d2036737c1967f64294ef092 | 16进制数自增1 | class CHugeInt
CHugeInt & operator++ () {
string tmp = "1";
num = addString(num, tmp);
return *this;
} | 0 |
daaa227a7330487227424c8dc5c1abfe | f8899235a47da6128feab4a6746efc04 | Parancsok beolvasasa egy megadott fajlbol. | def beolvas(): | 0 |
b034bb68b3d9b5790871152dbf418d7d | b627fa4cd0ca95019112f4db2508f119 | Проверяет есть ли папка для сохранения из конфига. если нету то сохраняет в месте вызова | Run_CheckSaveDir():
Self {
$Dir = $this->ParseStringVariables($this->Config->SaveDir);
if(file_exists($Dir)) {
if(!is_dir($Dir))
throw new Exception("{$Dir} is not a directory");
if(!is_writable($Dir))
throw new Exception("{$Dir} is not writable");
}
else {
if(!@mkdir($Dir,0777,true))
throw ... | 1 |
518d6904fe9f8bdb5098ac82487cf524 | 3d725c47c044d55aef420445cda0138b | 索引自身不完整 | public class FourSum
private static void next(int[] index, int next, int len) {
if (next < 0) {
index[3] = 0;
return;
}
if (index[next] < len - (index.length - next)) {
index[next] += 1;
if (next < index.length - 1) {
int add = 1;
... | 0 |
8a383151c67385f23f9a76eefaa202b5 | d00d0335efb57896911b42a9eaa6aabc | Get an author by its position | {
$authors = $this->getAuthors();
if (isset($authors[$index])) {
return $authors[$index];
}
return null;
} | 1 |
7e0a5e6906dbbcaa1718536bf99b7d6f | d3dd920a17ea5d719cfd4f67e554146e | checking if there is pre storaged values, if not assigning them to defaults | sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
isStarted = sharedPreferences.getString("compoundButton", "false");
myCondition = sharedPreferences.getString("myStatementNow", "low");
allSocials = sharedPreferences.getString("allSocials", "0");
s... | 1 |
3f1aad0fb039b56b5e886c4cbdc50a52 | 1a4e10c0850ac7b5d0ec7340aee3dd95 | Purpose: Customize the number of sections in the table view. | class PostsTableViewController
def numberOfSectionsInTableView(tableView)
1
end | 1 |
7687557901de89580134b6c6daa443c6 | a5ab0289b38c9f03b82f4147b8a69c8e | 批量删除交通事故处理 | public class ListAccidentBillAction extends ValueListAction
public String delete() {
this.accidentBillManager.deleteAllAccidentBils(toolingAccidentBills);
this.addActionMessage(this.getText("accidentBill.delete.success"));
return SUCCESS;
} | 1 |
e6829c13acc8956e2063843dabd15151 | 279ce9c663df220ce510bb92506387a0 | Fired whenever an active document stylesheet is added. | @WebkitUnsupported
public class WebkitCSS extends WebkitDomain
public void styleSheetAdded(String styleSheetId); | 1 |
e5f1414c053d74dce75392746ef231e2 | e51e7e1072e9a8d0ea7ba03913b27a86 | 校验STBID | {
if (txt_STBID.Text.Trim().Length == 16 && HDIC_Func.CheckObjectIsInteger(txt_STBID.Text.Trim()))
{
printInfo(txt_STBID.Text.Trim());
}
} | 1 |
497fc7a4f7d306b5dd7fe6eae9e8137e | 45aa0ef7199f549f3d8d70dbcc2bc3ec | 使用WebClient 傳送資料 | {
if (uri == null)
throw new ArgumentNullException("uri");
if ((values == null || values.Count == 0) && (files == null || files.Length == 0))
throw new ArgumentException("values 與 files 不可同時為空值。");
Task.Factory.StartNew(() =>
{
try
{
WebRequest req = this.GetWebRequest(uri);
req.... | 0 |
cb991678630018bf768874522d9c0b13 | 248b2e7e42ff3b36da28bb83c75d5bb8 | Tests that if a piece is marked as not relevant, it is ignored. | public void testBishopBetrayal() {
Mockito.when(mockBoard.getPieceAt(anyChar(), anyInt()))
.thenAnswer(allMixedUpBoardAnswer);
assertFalse(checker.checkMove('f', 4, 'g', 5));
} | 0 |
e4ddc9a96db0902d56c17220cf096dd5 | 5a2aaa3d5cd96b6ef976164b133627d5 | Calculate the population energy of current redistricting | if self.county_ids == None:
return 0
county_district_map = self.county_district_mapping(graph)
county_district_counter = {county: len(color) for county, color in county_district_map.items()}
two_colors = 0
more_than_two_colors = 0
w2e = 0
w3e = 0
... | 1 |
05335625fe3032e7dce8f0a751ccd806 | 0780a500a7d21867c85332a7cca42502 | build sql Not in expression | if (stripos($in, '(') === false) {
$in = '('.$in.')';
}
$this->where[] = [$field.' NOT IN '.$in, 1];
return $this;
} | 1 |
277a0d2c1116131108abc247286bd357 | 0cfae3b28486df37c86fa99f38845176 | Busqueda de todas las normas existentes en el sistema | {
using (Context db = new Context())
{
var querynorm = from norm in db.NORM
where norm.ACTIVE == 1
orderby norm.SORT
select norm;
return querynorm.ToList();
... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.