query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
0fa5752232db010f82ac42ceb2627b39 | 87039b7d729ace79b20d2f8350b059a2 | 将一个大数组切割成多个最大不超过blockSize的小数组 | def splitby(block, size):
return [block[loc:loc+size] for loc in range(0, len(block), size)] | 1 |
de45506ac8c59f1e756e7be25c19f491 | 59d4432d27b3560854d2d961e0c6c504 | The action to delete the selected test set. | if self.add_test_tablewidget.selectionModel().selectedIndexes():
index = self.add_test_tablewidget.selectionModel().currentIndex().row()
self.add_test_tablewidget.removeRow(index)
else:
self.add_test_tablewidget.removeRow(self.add_test_tablewidget.rowCount() - 1) | 1 |
8e53001400b1e62d2c516dc95ce2fe6a | f1ba38a782377adfb2298547b51f0793 | Returns the displacement required to unstick both the shapes. | class SimpleCamera(GameObject):
def computeShift(self, gameobject):
xFollow, yFollow, _, _ = gameobject.rect
xStart, yStart, w, h = self.rect
xFinal = -xFollow + self.HALF_WIDTH
yFinal = -yFollow + self.HALF_HEIGHT
dx = xFinal - xStart
dy = yFinal - yStart
return ... | 0 |
a2004d0133e1144d16bc4988e091da4e | 28d6ae3aaf7ff206eefdc24794321cdb | Find by access uri. | class TokenManager implements DataAccessInterface
public function find(DataRequest $dataRequest)
{
return $this->accessControlManager->find(self::ACCESS_ENTITY_TYPE, $dataRequest);
} | 0 |
a43621fa3cf34effeff3d6adb59a1236 | a2aa85beb887da78635c7724c3c93c71 | 根据审批用户ID和状态返回已审批请假单传输对象 | namespace GDSBG.MiABU.Attendance.IDAL.Hr.KQM.KaoQinData
DataTable getLeaveApply(string id); | 0 |
8b82c1a62558b0e8f34608e1ec20c8a2 | c91ce19383ae3d58991ff410f7452d96 | Initializes a new bandpass or bandstop filter object with
filter coefficients in lists a and b. | class FilterHardware(object):
def set_coefficients(self, coeff_b, coeff_a=None):
self.b = tuple(coeff_b)
if coeff_a is not None:
self.a = tuple(coeff_a) | 0 |
f1d8b2cf1dc6a053f232e94aa620255f | e027be8c762e0d4f62580e79db0cee3e | Sets the label type | class FedEx_RateService_LabelSpecification
extends FedEx_AbstractComplexType
public function setLabelFormatType(FedEx_RateService_LabelFormatType $labelFormatType)
{
$this->LabelFormatType = $labelFormatType;
return $this;
} | 1 |
adf46eab0bdb1378a3110832b1866cf3 | 534439221429fcd074e26f87bafbe0a8 | Returns the image cache service, which acts like a singleton
within the current configuration instance. | public class CacheManager
public static ImageCache getImageCache() {
return ImageCacheManager.getImageCache();
} | 1 |
9bac3743f3ab0c908c7ec6f746b41993 | 395e3fe449d519955e6618c02ca5c7d0 | The unit of distance used to calculate the fare (either mile or km). | public class SKToolsNavigationConfiguration
public void setDistanceUnitType(SKMaps.SKDistanceUnitType distanceUnitType) {
this.distanceUnitType = distanceUnitType;
} | 1 |
31be9d43ebcda6d802ec07e533308abb | 3cda1703d234498700e9067580d7fc88 | 判断用户能够查看横向项目等级 | namespace Srims.Server.Business.Documents
public static class ContractPermissionExtension
public static bool HasPermission_CensorHorizontalProjectContracts(this User user, IDatabase database)
{
return user.HasPermission_EditHorizontalProject(database);
} | 0 |
460008b987b3e6e7044e56bfc0a079b1 | eaff1c69716ae31542a8e258bcb489eb | Return str object containing encoded field value.
This is an abstract method and it must be overriden in child classes. | class RenderBase(object):
def decode(cls, field_value):
return field_value | 0 |
8b358b071f2a0e61d95d3ac8412172b6 | 5cdfd5c2a28979f458dbd307d5f8a463 | Parses stdout of md-workbench into dictionary format | dt = {}
for L in lines:
if L.startswith('#'):
continue
p = L.split(None, 1)
dt[p[0]] = p[1].split(', ')
return dt | 1 |
18819729ebae706b4ee5eb879eb87983 | 9427f9a304b4bf4ae28ff2975c726f25 | 今日DQ准确率 | {
$current_time = microtime(true);
$ret = array(
'status'=>0,
'html'=>''
);
$qd_info = json_decode(file_get_contents(RACEROOT.'data/qdinfo.json'),true);
$end_time = $qd_info['StartTime'] + $qd_info['Delay'] + $qd_info['TimeOut'];
if ($current_t... | 0 |
affca2c2fb1a5b8f7b3bdbfc6fedf4e6 | 5a01af36732f136f39430dc5461c19ce | BRIEF: get the connector information for the instance for attaching to
volumes. | params = list()
pool, project, volume_name = self._get_pool_project_volume_name(volume)
params.append('%s/%s/%s/%s' % (pool,
TEGILE_LOCAL_CONTAINER_NAME,
project,
volume_name))
... | 1 |
8295f2770d52fd1fee00a1237f6ee01d | 0d5967faaa094982e9e1bd525ca37d16 | first_weekday(最初に表示される曜日)にあわせて、week_namesをシフトする | for (i in 1..examWeeks + normalWeeks) {
if(i <= normalWeeks / 2) {
weekViews[i - 1]?.setSelected(true)
}
else{
weekViews[i - 1]?.setSelected(false)
}
}
} | 0 |
5aea1784abfecb3def722ff905036331 | 253a3f0c8e29d42668383723400de4e4 | Allocate an image buffer for use with TurboJPEG. | static void *
vips__openexr_start( VipsImage *out, void *a, void *b )
{
Read *read = (Read *) a;
ImfRgba *imf_buffer;
if( !(imf_buffer = VIPS_ARRAY( out,
read->tile_width * read->tile_height, ImfRgba )) )
return( NULL );
return( imf_buffer );
} | 0 |
ba319c2a3533c83666aa6358d120912c | 208f298bdf05c2909c158925895811a6 | finds the indices of elements of l1 in l2 | eq = []
for t in l1:
for k in l2:
if t == k and t not in eq:
eq.append(t)
return eq | 0 |
f0095d134b7629a8e0c8e35a736edf01 | 8466fc7c77261f785f9881b9b7b1f871 | Key setup. It is the user's responsibility to select the values of
keysize and ivsize from the set of supported values specified
above. | keySystem() {} | 0 |
c06a00aec2e76ed4b66e715e5c0bf53a | 1fe63c04f8037508269fd22eefba5a7c | @brief This function handles BOD Handler. | void BOD_IRQHandler(void)
{
NVIC_DisableIRQ(BOD_IRQn);
gpio_set_cdc_led(GPIO_LED_OFF);
power_off_sequence();
while(1)
{
delay(100);
gpio_set_hid_led(GPIO_LED_ON);
delay(100);
gpio_set_hid_led(GPIO_LED_OFF);
}
} | 1 |
78f4bd2bfbfdd90a3f1cbc4adc1837c3 | 4f60b2ee07c4d8019dc1f2472157b937 | Returns the current session start time. This may be null if the server is disconnected. | long getServerStartTime(); | 0 |
df85ebd7b32b4869bf506ff3067147d3 | 1a07773a12c4e863552d1b01e525af39 | 直接旋转像素 | function rotate(imageData,degree){
var w = imageData.width,
h = imageData.height,
result = createImageData(w,h),
rdata = result.data,
sdata = imageData.data,
rx = Math.round(w/2),
ry = Math.round(h/2);
for(var i=0;i<rdata.length;i++... | 1 |
8441b9c542ab03384eb6883ca83d4c7e | 22c6280865ffec4781da7bff925b1924 | Sets the folderId attribute of the Assignment object | public void setFolderId(long folderId); | 1 |
d6454c4de295d196d2c8e7b3416851ae | 786902c05d5e70d83cd839dfa3ea1e7b | Ignore activities that are not messages | private fun shouldHandleMessage(message: MimeMessage): Boolean {
if (message.flags.contains(Flags.Flag.DELETED)) {
log.trace("ignore deleted message")
return false
}
if (message.flags.contains(Flags.Flag.SEEN)) {
return false
}
if (message.from == null || message.from.size == 0) {
log.trace("igno... | 0 |
eda5b8d16c245d07f18ad11410c99811 | 06cfd61d6ada5fd253344b62b7b37f81 | Check hit to mesh by cursor and return mesh | {
selectedMeshSect = NULL;
csMeshWrapper *closestMesh = NULL;
csVector3 v;
csVector2 p (screenCoord->x, screenCoord->y);
camera->InvPerspective (p, 1, v);
csVector3 vw = camera->Camera2World (v);
csSector* sector = view->GetCamera ()->GetSector ();
csVector3 origin = camera->GetW2CTranslation ();
csVector3 ise... | 1 |
bd3120b740d6cb3e558be8eb363d60a7 | aac672f37e83b067b860f69f234ae6e5 | a와 b를 더한 것을 돌려준다. | {
int c = a + b;
return c;
} | 1 |
9c5f92c200ba02395558aee6c220e910 | dc6cea41d0f1862c9b5c207ba77fb988 | 初始化500个男,女许愿用户表 | fun homeSexToys(): MutableList<SexToyEntity.SexToys> {
var sexToys = ArrayList<SexToyEntity.SexToys>()
for (i in 0 until 5) {
sexToys.add(SexToyEntity().SexToys())
}
return sexToys
} | 0 |
744248811e48984e4a11b6cd767e7219 | 05a46042d8d408a200db04fe2f8cc159 | 게시판 옵션 상세 데이터 조회 | @Repository("BbsOptnDAO")
public class BbsOptnDAO extends EgovComAbstractDAO
public void updateBbsOptn(BbsOptnVO vo) throws SQLException {
update("updateBbsOptn", vo);
} | 0 |
fe0170d73c459d940b73ca2753777f24 | ec761b403030781d9b489231e9a90cb2 | Set a font face name for a style. | class ImagickDraw
public function setFontStyle(int $style): bool {} | 0 |
82062f17aac652a5371194729d48c276 | 24a7a55a7e3d2c938ef0deee656cee60 | 验证流程分类下是否存在流程,如果存在不允许删除流程分类 | namespace GSP3.SP.Service
public partial class GAppvalProcService : EntServiceBase<GAppvalProcModel>, IGAppvalProcService
public void PostDeleteProc(long approvalTypeId, string bType, string proc_code, List<long> orgids, string uCode) {
List<GAppvalProcModel> existProcModels = GAppvalProcFacade.GetAppva... | 0 |
385d86ffc92b27df2d92825ef47216c9 | 48740896711f482ec06ce5b70292d7ea | 获取默认的扩展类的实现。{@linkplain SPI#value()} 中指定的值, | final class ExtensionClassCache<T>
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
protected ExtensionClassCache<?> computeValue(Class<?> type) {
return new ExtensionClassCache(type);
} | 0 |
877d38d597145c1424f6cdf65e678df3 | 78905258458ca9d5198243826b70ca36 | Runs the visualizer using a set of trajectories. This should not be called
from robot code, but instead used only when testing on development machines.
It can be used by putting a main method in the command file of the profile,
and then running that main method from within VSCode - this ensures it is
never called on th... | class Sim:
def run(self, show_2d=True, show_3d=True):
self.vis.run(self.f, self.df_dx, self.df_dy, self.gd_trails, show_2d=show_2d, show_3d=show_3d) | 1 |
9f6ca88c89c34932d88c228c8689b8e7 | 421b9f26548016fae7f252a9fd86a3cd | Класс отвечает за формирование списка плановых документов начисления процентов | debt = debt or sbis.Money()
fact = defaultdict(sbis.Money)
plan = self._calc_real_plan(date_begin, date_end, debt, is_last_sub_period)
self.prev_plan = plan
id_row = str(date_end).replace('-', '')
row = sbis.Record(self.result_format)
row['@Документ'].From('{},{}'... | 1 |
2098accfa964a4575833bfa8438d2aea | e6d4de6ceb56b5981e94a57dcb7e947a | 全講師のリストを返す | namespace EASYS.Controllers
[Route("api/[controller]/[action]")]
[ApiController]
public class CurriculumController : ControllerBase
public string getTeacherList()
{
string sql = $"SELECT user_cd, user_nm FROM m_user WHERE distinction = '1' AND del_flg = '0'";
DataTable dt = D... | 1 |
57da2edb49d6730289cf094e7c4d4c0d | 7a0a7f917fa07d0d85f27067086e1639 | 重载len()运算,返回coordinates长度 | int length() | 0 |
c08956100737be8cae4c11c55b1086d2 | d9b3f00da815dbd2bc5b4dee8ccaeccb | Writes the given data to disk. | class NvmeDevice(object):
def write(self, metadata, data):
size = os.path.getsize(data)
subprocess.check_call([
'./nvme', 'write', self.device,
'--block-count=' + str(blocks(size)),
'--data-size=' + str(size),
'--data=' + data,
'--metadata=' + ... | 1 |
42751a7916d08b8336e3d4562392c123 | 0b202d54d70febcb8573248ce026b185 | Create SDP setup offer for mobile to mobile (see RFC6135, RFC4145) | MediaConstraints sdpMediaConstraints = new MediaConstraints();
sdpMediaConstraints.mandatory.add(new MediaConstraints.KeyValuePair("OfferToReceiveAudio", "true"));
sdpMediaConstraints.mandatory.add(new MediaConstraints.KeyValuePair("OfferToReceiveVideo", "true"));
sdpMediaConstraints.opt... | 1 |
8082886c28779deac332f4548df04b7d | a2331e9765c6f7b786e2871c6c50afa3 | Tilføjer key-column | public class TableModificationBuilderImpl implements TableModificationBuilder
@Override public TableModificationBuilder addKeyColumn(Column column) {
if (table.hasColumn(column.name()))
throw new IllegalArgumentException("Duplicate column: name=" + column.name() + '\'');
return this;
} | 1 |
c992f271a6ca6e5cbc79978dd11e1939 | 31f4d201e3e801dc8997dd47decb7240 | Este metodo devuelve todos los datos en un solo conjunto con las variables de entrada por un lado y la salida
por otro. | Object getDatos(); | 0 |
0bb01b5e1c07ae955044cf3c8fabd2fc | 1732733a8dd97d92c4dafed129b4d11d | Iterates all messages in the store | public function getIterator(): MessageIteratorInterface; | 1 |
6fc4a5e4ffb9fdf45851cac7f2d8ba77 | 1a1e7b371570674d3d045159eff660a3 | 销毁ONENET接入设备实例 | try:
params = request._serialize()
body = self.call("DestroyPostpaidInstance", params)
response = json.loads(body)
if "Error" not in response["Response"]:
model = models.DestroyPostpaidInstanceResponse()
model._deserialize(response[... | 0 |
1eb895d19a3a970ccd63c6f9365455de | 587a5a1b0ec5523c73b0462d0db6bc19 | Returns the meta object for the containment reference list '{@link intermediateWorkflow.IwPluginBinding#getInBindings <em>In Bindings</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getIwNodeConnection_InBinding(); | 0 |
f69e8c5f737d739c8560631c980cfee8 | 1d323f0babeed45ddefd6b6568208a75 | 第一人称 | namespace Spacebuilder.Common
public static class UserProfileExtension
public static string ThirdPerson(this UserProfile userProfile)
{
if (userProfile == null)
{
return string.Empty;
}
if (UserContext.CurrentUser != null && UserContext.Current... | 1 |
047d51ca00213f14898ed96cd40ed1e3 | 29f1c5da9b1e05f28d2bedc19c1c908e | We should not try to add the same artist multiple times to the graph, so filter
out any duplicates. | curs = dbi.dict_cursor(conn)
curs.execute('''select count(artist_id) from coda_artist
where artist_name = %s''', [artist_name])
result = curs.fetchone()
return result['count(artist_id)'] == 0 | 1 |
89f4286379e75a1995c9d569a6c630e0 | 55ca3aba98f99ec44fa567f86ed68862 | 更新个人天计划 | @RestController
@RequestMapping("planday")
public class PlanDayAction extends BaseFileAction
@PutMapping("v1/update/{id}")
public Result update(@Validated(EDIT.class) PlanDayTO to, BindingResult result, HttpServletRequest request) throws ActException {
try {
planDayAPI.update(to);
re... | 1 |
db6f36ea09ca10694acc5a0c6829e446 | 5abb9cce984ae19b7240366f897152a2 | given a user does not have permissions
when trying to access page for adding new timers
then he is redirected back to dashboard | class Dashboard extends Component
componentWillMount() {
if (!ReactionCore.hasPermission("dashboard", Meteor.userId())) {
this.props.replace({
pathname: "/unauthorized",
state: { prevPath: this.props.location.pathname }
});
}
} | 0 |
648ed4464774c163aff08b594548d140 | 867f1c657784a5aeac1f79071f38bcb7 | Test case for getArtifactDep
. | class TestBuildTypeApi(unittest.TestCase):
def test_get_artifact_dep(self):
pass | 1 |
991644c61102a2af80de368080dadbd4 | dc5c84b88f5acc40b2ff4af989dbac92 | Plays registered patterns in order. | class Pattern:
def play(self):
pass | 0 |
2bcde57f7085a41fb3291b9875ed7144 | f1c5d6c6ec7f0227192170778fbbecf0 | e recupera, do servidor, o dicionário contendo os ids sequenciais e o endereço de cada nó do anel | self._conn.send(b'listar')
dados = b''
while True:
d= self._conn.recv(2048)
dados += d
if len(d)< 2048:
break
L = json.loads(dados.decode(),object_hook=MyEncoder.decode)
return L | 1 |
647dad2c086f2b66a3d99702f70ac202 | f13a73dbb1289cc70a44f9c068d99b2e | GET: _MachinePart | namespace MaterialsWEB.Controllers
public class PartNumbersController : Controller
public ActionResult Index()
{
return View();
} | 0 |
d6be4f37ebd32e09c333b0d35bdf7f1a | 068f5fa74eff98b8ec18c08f5ebda6c1 | decide to re-fetch the data from gravatar or not | class TestUpdateUserProfile(TestServices):
def update_avatar_test(self):
self.req.POST = {"use_gravatar" : "true"}
update_user(self.req)
self.assertEqual(
True,
self._driver.retrieve_user(self.tested_user._id).use_gravatar
) | 1 |
06b75a75bdd541125fb57510dd1fc247 | 6b29bfcc08b2438abddf0c2a5ddb17dc | 复制公司公告实例 | @RequestMapping(value="/copyXtPost",method={RequestMethod.POST,RequestMethod.GET})
public String copyXtPost(String xt_post_id,HttpServletRequest request){
int i = 0;
XtPost xt_Post = xtPostService.getXtPostById(xt_post_id);
if(null != xt_Post && !"".equals(xt_Post)){
xt_Post.setXt_post_id(UUID.toUUID());
... | 1 |
88bfeca02e3cc54c3f4fda99f1cc1fb0 | 032a86c2e4421630b555dbbc3ea1a642 | increment both unique counts in one go | void CTrialSaccadesDlg::IncrementCount(CSaccadeTrial::STIM_CODE code, bool correct)
{
m_totalsTracker.Incr(correct);
m_trialTrackers.at(code).Incr(correct);
RefreshCountsDisplay();
} | 1 |
b53b87b066730d8314241a0715a313b0 | d97cae809cb937aac0be7e8fa4c3ea04 | Compute panoptic metrics: panoptic/segmentation/recognition quality.
More computation details in https://arxiv.org/pdf/1801.00868.pdf. | confusion = calc_semantic_segmentation_confusion(pred_labels, gt_labels, num_class)
iou = calc_semantic_segmentation_iou(confusion)
pixel_accuracy = np.diag(confusion).sum() / confusion.sum()
return {'iou': iou,
'miou': np.nanmean(iou),
'PA': pixel_accuracy,
} | 0 |
876cd415c83372fede23ea9e77518829 | 4a88641fafe0b906a3b1614fa7a222f4 | <statement ends> ::= SEMICOLON * | preceded(
space0,
context(
"end of statement",
map(terminated(opt(line_comment), eol_or_eof), |_| ()),
),
)(input)
} | 0 |
429857ad10ed7ecceb643c9b7f503cd4 | e3928301c89daf7954b9412118086473 | <p>
Retrieves the language field from the given document.
</p> | public class LegalDraftDocumentWrapper
extends BaseModelWrapper<LegalDraftDocument>
implements LegalDraftDocument, ModelWrapper<LegalDraftDocument>
@Override
public String getLanguage() {
return model.getLanguage();
} | 1 |
217c8f036f96d184846ae297ff29f25a | c2543ed2e2129b8356167f6af32942f7 | calculates the updated stamina based on the formula provided for
assignment 2. | def calcDemonicSta (value, correct):
return value/3 + correct | 1 |
b7d5e41e523a669dd0bcb3533f3defd8 | 5e58cca728b0a314447655e8494b42c1 | Transform an array to its key:value representation | function key(array $array) {} | 0 |
15fb161748fb7c7136ca7be3f1292d41 | 460473dc8f59bb4684694381c5f97aec | This method is passed to the initialize method of
Retain::Fields. It is called when the first getter of an SDI
object that has been specified by the set_fetch_sdi class call
and then calls the sendit method on it passing in model's fields
instance variable as well as any options specified when the
instance of the mode... | stored = {}
fields.each { |f| stored[f] = send(f) }
yield
fields.each { |f| send("#{f}=", stored[f]) }
end | 0 |
17144de4600d8b76bfa138ab17a6456c | 209aeaf7f483c9d19c1f2cdddd320c8b | Test that Pool removes explicitly closed socket. | def test_remove_closed_sockets():
socket1 = Mock(WebSocket)
socket1.closed = False
socket2 = Mock(WebSocket)
socket2.closed = False
socket3 = Mock(WebSocket)
socket3.closed = True
connections = [socket1, socket2, socket3]
result = remove_closed_sockets(connections)
assert result == [... | 1 |
e96fffec6592c12bd416a2c8d6541618 | d22084afdffed4756120d15927b45922 | Visualizes performance over uncertainty for both train and test data | class CVTMAPElites(MAPElitesBase):
def visualize(self):
self.plot_fitness()
self.plot_behaviour_space() | 0 |
16c1b08f380a1f8bfc251c94798f7dd6 | 2f64f22117ed729ae4b44e1495878c54 | Method that checks if specified username exists in JSON file. | public class UserRecordsImpl extends FileOperationsAdapter implements UserRecords
@Override
public boolean isPresent(final String name) throws IOException {
this.loadFile(this.jsonPath);
return this.users.containsKey(name);
} | 1 |
8d8c287c07f6d04fba548b76fc549112 | 65ff2790800b0833e50409c8950dc0ad | Test animal shelter class exist. | def test_it_exists():
dan = Dragon('Dan', 'Gold', 'James')
assert type(dan) == Dragon | 0 |
e8d284bf5fe5e9fedd99bea9f3d48755 | 6ba818d72386cc8482b0e52b178a78ce | Returns the objectid of the base to respawn the player at. | namespace BombermanServer.Models.Snapshots
public int GetRespawnTime(); | 0 |
06418a623a48765d4686bf1733d4aea1 | da2cbfe32d0a9071db89747b79a5b079 | Verify restore for bookmark bar visibility. | class PolicyTest(policy_base.PolicyTestBase):
def testBookmarkBarPolicy(self):
self.NavigateToURL('about:blank')
self.assertFalse(self.GetBookmarkBarVisibility())
self.assertFalse(self.IsBookmarkBarDetached())
self.NavigateToURL('chrome://newtab')
self.assertFalse(self.GetBookmarkBarVisibility())
... | 1 |
68223bd711bb8417fb64184aff805a15 | b335c917db84878a76357c422098078e | Converts time in seconds to time in hours, minutes and seconds | function seconds_to_hms($time_in_secs) {
$secs = $time_in_secs % 60;
$time_in_secs -= $secs;
$time_in_secs /= 60;
$mins = $time_in_secs % 60;
$time_in_secs -= $mins;
$time_in_secs /= 60;
$hours = $time_in_secs % 24;
$time_in_secs -= $hours;
$time_in_secs /= 24;
return str_pad($hours,... | 1 |
d93f45d33916a21412a75bc03798b210 | 61613fe22e47e5f10bd6f54351809693 | void UnHookDebuger(void)
Unhooks all Linux IDT entries by reverting to the original saved values. | void HooksDetach()
{
#ifdef DEBUG
OutputDebugString("[cuckoo] Uninstalling Hooks...");
#endif
HookDetach(CreateFileW,Real_CreateFileW);
HookDetach(DeleteFileW,Real_DeleteFileW);
HookDetach(MoveFileExW,Real_MoveFileExW);
HookDetach(ReadFile,Real_ReadFile);
HookDetach(WriteFile,Real_WriteFile);
HookDetach(RegOpenK... | 0 |
c5d6ba54acfac5226092d3eeee25fa2d | fd81183b463f2f2688dad6ba41bd9230 | Compute a quaternion from it's scalar and vector parts. | void SJCQuaterniond::
set( const SJCVector3d& s, const SJCVector3d& d, const SJCVector3d& r )
{
SJCVector3d source = s.normal();
SJCVector3d destination = d.normal();
SJCVector3d rotAxis = r.normal();
double dotProd1 = source * rotAxis;
double dotProd2 = destination * rotAxis;
SJCVector3d v1 = source - dot... | 0 |
b5f5ecab82d63ef0c752d189ce3e0867 | 71a352e245ac08d8ed4edd10bd5e6eba | Возвращает номер вагона. | class Train implements TrainInterface
public function length()
{
return sizeof($this->wagons);
} | 0 |
68a8ee2353fc4502a3f7cfee776bb56e | 388f394c6cd32930c1a7bf9223431ac7 | Clears trace and updates UI | logging.info('Clearing plot %s...', self._name)
for trace_id in list(self._traces.keys()): self.remove_trace(trace_id, update=False)
if update: self.update() | 1 |
d545f9957daa6db7a825a6bdb8a5b688 | c5376c2786be8681ce093bbb9a9818c0 | Turn on the related ralay based on the user's action and update the
button's display situation. | {
AircraftClass *playerAC = SimDriver.GetPlayerAircraft();
if (playerAC == NULL)
{
return;
}
CPButtonObject *pCPButton = (CPButtonObject*) pButton;
switch (playerAC->RALTStatus)
{
case AircraftClass::ROFF:
pCPButton->SetCurrentState(0);
break;
... | 0 |
70a5a49058060ee1b83c91fa1e1f20a6 | ff2a6510b3ad41f7b699d859210ef6b1 | dodawanie nowego odbiorcy i zwracanie jego numeru id | $this->db->insert('sender', [
'name' => $sender->name,
'email' => $sender->email,
]);
return $this->db->lastInsertId();
} | 0 |
b0dfd881c2ce21a868bb8162016ee169 | 28b4dfe8f0c48b8d8c27ed76646f475b | @brief Send Get Network Key Confirmation message | zbStatus_t ZllTouchlink_SendNetworkStartReq(zllCommissioning_TouchlinkRemoteTarget_t remoteTarget)
{
zllCommissioning_NetworkStartReq_t ntwStartReq;
zbProfileId_t zllProfileId = {gZllProfileIdentifier_d};
zbAESKey_t zllkey;
zbStatus_t status;
uint16_t ntwAddress = (uint16_t)GetRandomNumber();
uint16_t addr... | 0 |
c70aafd0f826d1a0e996aaa20c5ab9f3 | f90eff5d5343be0a3d64151d2f15ded1 | Check if signals work on object update event | class SignalTestCase(LocalPluginTest):
def test_signal_update(self):
sig = SignalHolder()
self.plugin.connect_to_update("x?t=0", sig.empty_sig)
self.stale_widget.send_value(4)
self.event_loop(0.01)
self.assertEqual(self.stale_widget.value, 4,
msg="t=0 widgets do not u... | 1 |
2e0ad5533e822d85f7dc77508bbc75b9 | 1f7e6d6a48ebeb6d64e62c06edb0781d | 参数是一个string类型,代表一个part,作用是将这个part连接到私有成员expression后面 | {
if (expression.Expression != null && expression.Expression.NodeType == ExpressionType.Parameter)
{
if (!__select.IsEmpty && __needdelimiter)
__select.Append(", ");
__select.Append(this.GetColumnName(expression));
}
... | 0 |
77da48ee2b5b0204097e4c96bcbc046d | 95c6d518bcba5f0d4159e366a21660ee | Metóda na zistenie, či daný tovar má príznak, že bol vymazaný. | {
var remnants = 0;
using (_context = new WarehouseContext())
{
if (_context.Operations.Any(x => x.GoodId == goodId && x.OperType == OperationType.Income))
remnants =
_context.Operations.Where(x => x.GoodId == goodId... | 0 |
f8ed9b19ba41821edd96d569fb7c9fcd | 13a5527130d0be8231a18571b6185845 | Shows after a successful editing of an account | void showCreateAccountSuccess(); | 0 |
49ffd9b2c397356f05d7f357fec8a2ad | caa511968166b473ebd6e8db4ebe18bd | 哈希计算(使用BouncyCastle) | try {
return getHash(algorithm, text.getBytes("UTF-8"));
} catch (final Exception ex) {
throw new RuntimeException(ex.getMessage());
}
} | 0 |
7de6a6b6571dedd663e448fad95db6cb | b52a7c27d16226ed256b4a1a5ff35123 | isProtectedActionOnNode checks if the request is to update a node | {
global $__LogFileAccess;
global $__LogRecordAccess;
global $__LogDataNodeAccess;
$sk = $_REQUEST["sk"];
$UID = $_REQUEST["UID"];
$NID = $_REQUEST["n"];
$NewPassword = $_REQUEST["pwd"];
try
{
$res = GetDataNodeFieldsDetail($NID);
return '{"ObjType":"Bool","value":'.json_encode($res).'}';
}
catch(Excepti... | 0 |
c194aa1e9100223527c3cb4a3798f372 | 2fe4956dd81cd1c8db76f0fc0f772b29 | Sets the flag indicating we got EINVAL error from `sendmsg` or `sendmmsg` syscall. | __posix_sendmsg (int socket, const struct msghdr* message, int flags)
{
errno = ENOSYS;
return -1;
} | 0 |
c8c26546f0d270c33ecb5ee702c9b246 | e1fc1fc80fe4ad13d4916ab5be53733b | Tarjan's offline lowest common ancestor. | public class TreeUtilsAlignmentRepair
public static int LCA(NAryTree tree, int a, int b) {
if (a == 0 || b == 0) {
return 0;
}
byte boo[] = new byte[tree.size()];
do {
a = tree.getParentFast(a);
boo[a] = 1;
} while (a != 0);
do {
b = tree.getParentFast(b);
if (boo[b] == 1) {
return b;
... | 0 |
1c741915534ddd1f9aa1542347530000 | c9248bf8b70e43e83f9df2e30a45e9da | Collects the outputs and stores them to the hdf file | if self.error:
return
with h5py.File(out_file, 'w') as h5:
for k in self.out_data:
h5.create_dataset(k, dtype='f4',
data=self.out_data[k],
compression='gzip', compression_opts=1,
... | 1 |
f9c4c24be0b548364f031d130007b9d7 | 13bb377c21a8778cb5ed10ec881fa6ca | 判断是否开启自动滑动 | public class SlidingMenu extends FrameLayout
public boolean isSlidingEnabled() {
return mSlidingEnabled;
} | 0 |
08c90ce4d45d98124dd802d84a4d0c61 | 3fe5dd1906db79a543a230abc49d3999 | Utility function to get the default sort state of a column | public abstract class PagedSortableListDataModel<T> extends
PagedListDataModel<T>
protected abstract boolean isDefaultAscending(String sortColumn); | 1 |
8514dfc1b8134baa07bf43799593bae6 | 76b9c4554162cb53efb857ef1046c7f3 | 通过商品图标获取商品数据 | function XXLTaskPass:getGoodsIcon(nPacketPicID, spriteNode)
local function linster(bSuccess,sprite)
if tolua.isnull(spriteNode) then
return
end
if bSuccess then
spriteNode:removeAllChildren()
sprite:setContentSize(cc.size(150,150))
sprite:setPosition(cc.p(60,60))
... | 0 |
13caaff51d29a185a39fad4a3e704b9f | b9f9b93b50a6d4b0a05e4442e5529702 | Can this data object self reference itself? | public boolean isSelfLoop(); | 1 |
7d3d01df77dd1d19275b70b65dc9a12a | b8bd0e080e8ef8cb8284f1ba5c98ff77 | Установка цвета фона ячейки | var cellObj = $(cell);
var hex = cellObj.attr("fill");
var colorIsLight = function (r, g, b) {
var a = 1 - (0.299 * r + 0.587 * g + 0.114 * b) / 255;
return (a < 0.5);
}
fu... | 0 |
c9ee4e0be9d6cdcde890f6ad483d51c2 | 4a6977f73d2be0c41bfca13d671983e3 | Resolves the resource's attributes.
Heat extension: "InstanceList" returns comma delimited list of server
ip addresses. | {
parent::resolve($resource, $attribute);
$this->resourceIds = is_array($this->value) ? $this->value : [$this->value];
$this->resourceIds = array_map(function ($id) {
return (int) $id;
}, $this->resourceIds);
$this->selectedResourcesDisplay = collect($this->resour... | 0 |
d62915af6618ba55b2367a69ccc3b56f | dbf8a34a9c332e80241841136a1979d5 | Returns the value of the virial kinetic energy correction term. | double LocalAction::virialKinCorrection(const int slice) {
double vKC = 0.0;
eo = (slice % 2);
if ( gradVFactor[eo] > EPS ) {
vKC += gradVSquared(slice);
vKC *= gradVFactor[eo] * pow(tau(),3) * constants()->lambda();
}
return ( vKC );
} | 1 |
773148b261c89d0ebf0eca38050d0c28 | 6572f2d80ad3df78fdcd0ab893e2dbe7 | 弹出流量统计界面窗口 | self.PointUserActionAnl()
selector = "a[href='/imp/a/ubas/business/track/statistics/page']"
EleO = self.PO.FindElement("css", selector)
if not EleO.IsDisplayed():
self.PointUserActionAnl()
EleO.Wait_Until_Visib(5, 0.5)
EleO.Click()
return True | 1 |
b56d05fa2e1296b1bcd587fa4481e3b3 | e37881a536589eb4904967716610824c | 获取没有分配考勤组的人员信息 | namespace LL.POS.Transfer
public class UploadInfoBLL
public DataTable GetNoneUploadMember(String connectionString)
{
return UploadInfoDAL.GetNonUploadMember(connectionString);
} | 0 |
ff7c39463a84a5875f1643c0ad6b43b7 | 0284b8d09c57ac41dc968f1a5b873d95 | Sets value of 'picUrl' property | class Product implements MongoDB\BSON\Serializable, MongoDB\BSON\Unserializable
public function setPicture_url($picture_url)
{
$this->picture_url = $picture_url;
return $this;
} | 0 |
11629683a610810ce16cbbebc4195cc9 | 0a5fa65d1ada455428636ce8b874235b | Indicator to the :class:`.protocol.Responder` about whether it
should assemble request blocks to a single request and extract the
requested blocks from a complete-resource answer (True), or whether
the resource will do that by itself (False). | class HTMLOptions
def requestAs=(value)
@requestAs = value
end | 0 |
bd2a2c73808a4ff89b14da35f9c2a029 | 16406e6b1158bec00e32b060952cba30 | =================پیدا کردن یک رشته در رشته دیگر و باز گرداندن اندیس مربوطه===================== | namespace PaizaTest4
static class nmootan
public static int GetFindStrInStr(string str1, string str2)
{
return str1.IndexOf(str2);
} | 1 |
95baf09e3d76e40ada04734e76603aac | edd718a1ca3725ab39220ee6625eed04 | 同意俱乐部申请 | function ClanCtrl:C_AgreeApply(id)
local msg=guild_pb.C_AgreeApply()
msg.applyId = id
self:SendMsg("C_AgreeApply", msg)
end | 1 |
a92af921ffee418aab7f4a0ec5ea31fd | 18c77b21e765eadca3b1d8050afb3a94 | 文字単位で、改行文字と折り返し文字数を基準に切り分けた配列を返します。 | namespace BLK10.Text
public class StringBuffer : IEnumerator, IEnumerable, IComparable, IComparable<StringBuffer>, IEquatable<StringBuffer>
public string[] Split(string[] delimiter)
{
return (this.Split(delimiter, int.MaxValue, StringSplitOptions.None));
} | 0 |
2c03c1c6d2a8cb703f63adf8ea0f26cf | eef84cf9d96eaee9d34664c31f15d34c | 원판을 지울것인지 확인하는 함수 | def freeSpace(board, move):
if board[move] in "1 2 3 4 5 6 7 8 9".split():
emptySpace = True
else:
emptySpace = False
return emptySpace | 0 |
ed07a107215d98968e2a2e5143afb243 | dda0a6f1759c77edfe1e4a930574aee2 | Внесение данных из заказа в массив | class Model extends AbstractModel
public function fillFromOrder($order)
{
$this->setOrder($order);
$this->orderDate = $this->orderFields['DATE_INSERT'];
$this->price = $this->orderFields['PRICE'] - $this->orderFields['PRICE_DELIVERY'];
$this->priceDelivery = $this->orderFields['PRICE_DELIV... | 1 |
53d0d32d4338e792ec38d0af221f3f48 | 4b6aac25991c4bbad5d7e80bcb661f2a | 启用bootstrap风格的tooltips | jQuery('.btn-list .tool-title-div').poshytip({
className:'tip-yellowsimple',
content: function(){
var tipMsg = jQuery("<div>",{
'class' : 'btn-tip-msg'
})
var tipName = jQuery("<div>",{
'class' : 'btn-tip-name',
'html' : jQuery(this).attr("tooltitle")
})
tipMsg.append(tipN... | 0 |
267d7fd4cb7aa8f6784c3b0c96517539 | 23f8cfaba80bbb45d3bc0fad7c4ad480 | 判断是否是登录界面 | namespace worker.Framework.MH.Service
public class ValidateStatus
public static bool isLoginPage(IntPtr hwnd)
{
var rectangle = new Rectangle(470, 220, 100, 50);
var image= Capture.CaptureWindowRectangle(hwnd, rectangle);
image.Save("a.png");
var color= image.G... | 1 |
4ec66ebe9ca8dea5c79d6f671fad0e28 | 56cd2e37f4e9f937b2c068926e40ce57 | What to do at the end of the task, called from abort() Should include things such as resetting
component controllers and internal state The task should be in the same state as it was before
it was run after calling this method | class Task(object):
def finish(self):
pass | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.