query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
211dd0e729bf16b7b43e23f9cc0f5152 | 1071107fb8e143f969b6704254e30d8c | Returns the specified experiment as dictionary. | if experiment in EXPERIMENTS['record_only']:
return {}
if 'PS4' in experiment:
specs = ramutils.parameters.PS4ExperimentSpecs()
elif 'TICL' in experiment:
specs = ramutils.parameters.TICLExperimentSpecs()
elif experiment == "LocationSearch":
specs = ramutils.parameters.Lo... | 1 |
ff61ad9c4c4ff05627a72f8228a1925f | ee26d33ca9dc113f2974d4b4c3ffa1b4 | Compare two port's path for the sort in initPortsContainer
First compare the port code and sort alphabetically, second compare the number part, sort from small to big | static int
compare_ports(const void *a_, const void *b_)
{
const struct ofputil_phy_port *a = a_;
const struct ofputil_phy_port *b = b_;
uint16_t ap = ofp_to_u16(a->port_no);
uint16_t bp = ofp_to_u16(b->port_no);
return ap < bp ? -1 : ap > bp;
} | 0 |
b2f1b966035e591f776c1b74490017e6 | baddf78d5606aadcb54f53f8a46e99e1 | Adds a disconnected vertex to the geometry with the given coordinates, UV coordinates and normal vector | namespace TGC.MonoGame.TP.Geometries
public abstract class GeometricPrimitive : IDisposable
protected void AddVertex(Vector3 position, Color color, Vector3 normal)
{
Vertices.Add(new VertexPositionColorNormal(position, color, normal));
} | 0 |
330872e3c84a943716097a0fafbd12aa | 05c76f149b7bb0690684eee24ebae014 | This method returns results of passing tests for certain user. | {
SqlCommand cmd = new SqlCommand("[dbo].[GetUserTestingResults]", connection);
cmd.Parameters.Add("@userID", SqlDbType.UniqueIdentifier).Value = userID;
cmd.Parameters.Add("@testID", SqlDbType.Int).Value = testID;
cmd.CommandType = CommandType.StoredProcedure;
... | 1 |
4d787307fc8bf5883d53a5f6fed54ae2 | cfb34eb7fb9eac353cfa2b24833c5b92 | Sets the stats of a campaign. | {
$parameters = [
'id' => (string) $id,
'field' => (string) $field,
'value' => $value
];
return (bool) $this->apiClient->doCall('updateCampaign', $parameters);
} | 0 |
7ed3619f0e3ad410d597356952d22a0e | 652b52b4275e4357b6b9ee3f935afe7e | Method to change address field positions | if (addressType == AddressType.WORK) {
val alternateAddress = Cache(requireContext()).getWorkAddress()
binding.etZip.setText(alternateAddress.zip, TextView.BufferType.EDITABLE)
binding.etStreet1.setText(alternateAddress.line_1, TextView.BufferType.EDITABLE)
binding.etCity.setText(alternateAd... | 0 |
c18cea6dff03db3ebc0ff70958a45e54 | 80b9e5f3511c5038be5bae2be8df35a8 | Возвращает ид офферов по указанному типу оффера | {
$type = $this->getTypeByName($name);
if (!$type)
return [];
$query = $this->itemObjectQuery;
return $query->andTypeId($type->type_id)->all();
} | 1 |
4dd32e607601187e091edce068629648 | 3d29d7c0c35e068159c906fdc9128263 | Deletes record is clerk exists, ignores otherwise | class ClerksController extends Controller
public function destroy(User $clerk)
{
$user = Auth::guard('api')->user();
if ($clerk->id == $user->id) {
return $this->forbidden('不能移除自己哦', 40007);
}
if (!$user->is_manager) {
return $this->forbidden(ErrcodeMap::$errc... | 0 |
7be2927ffc5cc022af494745c4521df5 | 7c0a4fd7a7599c8bd80dde6fdb0542f9 | Returns the image width of the contained dicom image. | Int32 getImageSourceWidth()
throws ComException; | 1 |
e20d320786ecaf55287b238a1dc883cf | 232e9263d86fd634017e7522a7ea0ec5 | =======================================================================================
inthandler0c関数
プログラムが変なことをしたら飛んでくる割り込みを受け付ける関数
一般保護例外
======================================================================================= | void inthandler20(int *esp)
{
io_out8(PIC0_OCW2, 0x60);
timerctl.count++;
return ;
} | 0 |
4d85a790111f1f73a3aa4d0cbb4dfb9b | 72fa844cae9841f8df0d642d97e8f64b | convert the stored dwell time (sec) to milliseconds | double msec;
msec = (double) (1000 * pow(2.0, (double) (t) / 1200.0));
return (int) msec;
} | 0 |
764df3cdd99832654453df5b7b87be2e | f9cc184f19cb843571d105bf8e499d8f | Get the login options. | public static function getLoginFlags(array $options); | 1 |
fff788a28a5acc444ce1a92fb6253f48 | b029965fcb0c4e0bf2069d1843fe9b9f | Navigates through an array and sanitizes the field.
default (text). Custom single argument callable allowed. | abstract class Tribe__Editor__Meta
implements Tribe__Editor__Meta_Interface
public function sanitize_text_array( $value ) {
if ( is_array( $value ) ) {
return array_map( 'sanitize_text_field', $value );
} else {
return sanitize_text_field( $value );
}
} | 1 |
bada1fdfac7d063da37577abbdb8cb6e | 0dd87d643d64bb6c059c8c5634eb1ddb | Checks the specified phone number, to see if it is valid. | long phone = Long.parseLong(phoneNumber);
PhoneNumber pn = new PhoneNumber();
pn.setCountryCode(countryCode);
pn.setNationalNumber(phone);
return phoneNumberUtil.isValidNumber(pn);
} | 1 |
ea9753ce402a13610634a7f480ea71c4 | 85d94f445a985d48b2bf9521ee72eab4 | finds the arguments of a function from the extended class | class parse_expr:
def get_arguments(self, f_name):
s = self.expression.find(f_name)
if s > -1:
s += len(f_name)
fn = parse.get_op(self.expression,s)
self.content = fn[1:len(fn)-1].split(',')
else:
self.content = None | 1 |
da361b3e8973f2e102c46cd0987b449a | 825358ecbeee3c35d090f4b627face0f | Test coaddition of spectra with different wavelength grids | sum_1 = (self.data.scattering_data
+ self.data.scattering_data
+ self.data.scattering_data)
sum_2 = (self.data.scattering_data_spectral
+ self.data.scattering_data_spectral
+ self.data.scattering_data_spectral)
sum_3 = (self.dat... | 1 |
6bcea5579429d62adcaea7a1d1860738 | bc1f0ed5cb19a079d357ae424f915eb3 | 盘点时,将某货品的库存数设置为盘点数
本来货品的库存数是实时计算的,但是由于各种原因,库存数和盘点数对不上
因此根据老敏要求,盘点时直接将库存数修改为盘点数 | void updateStockCheckRealCheckQuantity(@NotNull @Valid StockCheckCheckedVo stockCheckCheckedVo, @NotNull Long shopId) throws ParseException; | 1 |
5f1fa3fdb705d2a1fab35fddb3ff8364 | 8bcd5949c080890302216063c12a01ae | Lists all coordonnee entities. | class LocationController extends AbstractController
public function index(ContinentRepository $continentRepository, CountryRestApi $countryRestApi): Response
{
return $this->render('location/index.html.twig', [
'locationContinent' => $continentRepository->findAll(),
]);
} | 0 |
e9456fb654a7c4e82dbfd8cb7148b1e8 | e53edcd016c1a3edb2cf74c1fd356e3e | Method for getting all Graph Dimension Names | String IS_NAME = "dimension_Label_Eng";
List<String> dimensionNames = new ArrayList<>();
String [] headers = stream.readNext();
for(int i = 0; i < headers.length - 1; i++) { dimensionNames.add(headers[i]); }
return dimensionNames;
} | 1 |
0440984716dbd140ea0b2aeaad1b0fb8 | 041fa171d503d5428adfc217ee8ca1d3 | Returns average rupture length for a given magnitude from Wells and Coppersmith | class Suckale2016mb_USGS(MSCE):
def get_mean(self, mb):
MW = 0.7813 * mb + 1.5175
return MW | 0 |
0a1e54b4dd5a8994edaa1e12f2858fe3 | b1c647c3df3eba5a318fd7aac682603a | 判断绘制的多边形是否在倾斜摄影图层上 | {
GSOPoint3ds polygonPots = e.Polygon[0];
if (!lfpLayer.LatLonBounds.Left.Equals(0.0) &&
!lfpLayer.LatLonBounds.Bottom.Equals(0.0) &&
!lfpLayer.LatLonBounds.Top.Equals(0.0) &&
!lfpLayer.LatLonBounds.Right... | 1 |
83ff16b4d914e0f8010c46c81aa84bb5 | f90cc3a38652cfc595da4639f0e4b035 | Set the maximum amount of stamina for the player. | public class Status_Player : MonoBehaviour
public void SpendStamina(int amount)
{
this.stamina = Mathf.Clamp(this.stamina - amount, 0, this.maxStamina);
this.gc.SetStaminaUI();
} | 0 |
aeea0250c946698cddfa7beafc325d76 | c7fdf95f4fcf4f8ff9ca60c6b933d939 | Permet de réinitialiser le champion de référence | class ChampionBenchmarkController extends Controller
public function removeReferenceChampionAction()
{
$comparisonManager = $this->get('mvnerds.champion_comparison_manager');
$comparisonManager->cleanReferenceChampion();
return $this->redirect($this->generateUrl('champion_benchmark_compare'));
} | 1 |
983f17b9989bc131528b749b1ede5b59 | cc37f3ee27ba8d22477b6ac213bd36cd | Method used to add an operation to a transaction | class Chain() : Serializable
fun addOperation(operation: String, vararg params: ByteArray) {
this.currentCommit.addOperation(operation, arrayOf(*params))
} | 1 |
adada29393be097ff19b13bd76728756 | bdb5290cdf66bc1a7b28cafe45dad1f5 | 获得所有城市,技术以及技术所属分类,然后request城市X技术的url | sel = Selector(response)
allcities = sel.xpath('/html/body/div[1]/div[3]//a')
reload(sys)
sys.setdefaultencoding(response.headers['Content-Type'][response.headers['Content-Type'].find('charset=')+len('charset='):])
if self.para:
para_cities = self.para.split(u',')
... | 0 |
0a993b234d4b8b4b85b7cf35a76a1e01 | 61d2d9e6000387ab9360647d7fe8494d | 根据商品类型和商品品牌获得全部商品 | namespace ERP.SAL.Interface
List<GoodsBaseModel> GetGoodsItemList
(int? goodsKindType, Guid? brandId, string goodsNameOrCode); | 1 |
41fcc4dee9cb04fd8c0aef45539d5ec7 | 48619d2def48dc598bb63d8333bb5512 | Test the Presidential Papers Resource Endpoint. | endpoint = "/lc/analysis/"
presenter = 'z3950'
payload = self.create_payload(presenter)
result_id = payload['result_id']
self.app_post_json(endpoint, data=payload)
mock_analyse_single.assert_called_once_with(result_id, presenter) | 0 |
061f21eb675b360703d5ec0dd3fddb0a | 77e6e8cd62bab86554c7642ea3764445 | whether the test has run to completion and gotten results, regardless of outcome | export class Run
get completed(): boolean {
return !!this.endAt
} | 1 |
ed3b73885cb12b6b2f600926fcb7bce9 | fd7c498118aba2bde2063e7239a22d27 | Update a notary | class NotaryServer(LineReceiver):
def lineReceived(self, line):
log.msg("{} sent to us {}".format(self.transport.getPeer(), line))
try:
cert, host, port = line.split(';')
port = int(port)
except ValueError:
self.report(NOTARY_ERROR)
return
try:
conn = sqlite3.connect(self.cachefile)
c = conn... | 1 |
06ded9cf02e688511322c57fcb5dac53 | 81879c14bb241aa25410b634166a2b58 | FUNCTION
DESCRIPTION
This function check whether the certificate is valid or not
PARAMETERS
void
RETURNS
void | {
SendDebug(DEBUG_INFO, BT_DEBUG_ID, "%s, %d\n", __FUNCTION__, __LINE__);
BOOL result = FALSE;
BIO *certbio = NULL;
BIO *outbio = NULL;
X509 *error_cert = NULL;
X509 *fwupdat_cert = NULL;
X509_NAME *certsubject = NULL;
X509_STORE ... | 1 |
26a2514202602bda52119f66c6b3c202 | 6e8ea0e2178beeb559479c8e79f6a957 | Convert temperature data to null-terminated string. | return os_sprintf(buffer, "{\"t\":%d, \"h\":%d, \"habs\":%d, \"cnt\":%d}\0",
(int)(sensor->temperature * 100),
(int)(sensor->humidity * 100),
(int)(sensor->humidity_a * 100),
sensor->counter
);
} | 1 |
18395df81cda94f224adc1d091eed172 | 0866e33fabec70c4000a37f3ce3127f6 | Gets a list of records for teams in the league. | {
$where = array(
'r.sid' => $sid,
'r.lid' => $lid
);
$query = $this->db->select('t.id, t.name')
->from('team t')
->join('league_reg r', 't.id = r.tid', 'inner')
->where($where)
->order_by('t.id');
return $query->get()->result();
} | 1 |
879442d274f7511ce750c5b03ef1e6fc | 2b0e111f3c2cfb718347cba5057b2798 | 通过id删除所有选中的User信息 | public class UserAction extends ActionSupport
public String deleteSelected(){
if (selectedRow != null){
for (String id : selectedRow){
userService.deleteUserById(id);
}
}
return SUCCESS;
} | 1 |
407dfdd5c9b93b5711f214cee0c5c425 | 86a007c74c69ded4372898385c747f62 | 序列化 CPK 节点到流中。 | namespace Ceeji.Data.BinaryPackage public class CPKNode : IEnumerable
public void SerializeToStream(Stream stream) {
var binName = getBinaryWithLength(Encoding.UTF8.GetBytes(Name));
stream.Write(binName, 0, binName.Length);
Value.SerializeToStream(stream);
} | 1 |
f4b5f7257e9076eafd5c4d82e1be6feb | c4c88034cb008aeda92256f47a19d5ee | Show full itinerary | class ItineraryController extends Controller
public function show($id)
{
if(!Auth::check() || Auth::user()->admin == 0) {
return Redirect::to("/");
} else {
$user = User::find($id);
$name = $user->firstName." ".$user->lastName;
return View("ItineraryForm",
["prices" => Price::all(),
"user_id" =... | 0 |
af2c9eabc4c7534ee9a3ff06ec58ce6b | b527b687a22b522a7d65d56546fa4074 | Returns only the ORFs longer than threshold | def gene_finder(dna, threshold):
return [coding_strand_to_AA(i) for i in find_all_ORFs_both_strands(dna) if len(i) >= threshold] | 1 |
520d97dc8bd934cdb95660e31111ef7f | 87fb8d419ce7d97e24a84eda1e39656c | 单个标签节点的代码生成 | String linkCode = nodeNameFrom + " -> " + nodeNameTo + "[label=\"" + label + "\"]" + "\r\n";
this.code.append(linkCode);
} | 0 |
b2abc37221be982aa39698032cacd09d | 4ecc1ac121a2a9ed638f8cec69ed79ae | Test the reponse to an unknown river direction | class ComputeNextGridCellTestCase(unittest.TestCase):
def testUnknownRiverDirectionResponse(self):
self.SinkPointReponseTestHelper(10,4)
self.SinkPointReponseTestHelper(-177,4) | 1 |
e87011559780d3e8ac02b327661079ce | e945f6e4e9ae241629d1e2b3ba4f1a00 | A visitor can see the front page. | class CommonTest extends TestCase
public function testVisit()
{
$this->client->request('GET', '/');
$this->assertTrue($this->client->getResponse()->isOk());
} | 1 |
23e4cb9384e4d61b6320dedac1d3b36f | d7e5b18effb6f418c42b55f2242aa879 | 既にステージタスクとして登録されていたら登録せずに帰る。 | public class StageGenerator : MonoBehaviour
void UpdateStage(int toTipIndex) {
if(toTipIndex <= currentTipIndex) {
return;
}
for(int i = currentTipIndex + 1; i <= toTipIndex; ++i) {
GameObject stageObject = GenerateStage(i);
generatedStageList.Add(stageObject);
}
while(generatedStageList.Count > preI... | 0 |
14b75b7b789d9c3d3ccecea0f1ab8bb0 | a6962006a20cf797c42e15610b5aaa02 | Change progress wheel state | void progressWheel( String message ); | 0 |
bac2ff18e766ddecbb9d0ccf1ee7f6aa | 6369261d2d5cc112fee39f0f1f1f9d97 | 查询预约信息数量,并展示 | List<Tutor> list = tutorService.searchAllStuAppointTime();
if (!list.isEmpty()) {
HttpSession session = request.getSession();
session.setAttribute("list2", list);
response.sendRedirect("/searchAllTime.jsp");
} else {
throw new CustomerErrorMsgExcep... | 0 |
efa1f8ca4548ac5e07a11133f5fbcf7a | a03fe7f6e39b9c2fc248906a298b707b | 将int转为16进制的字节 | val hexString = intToHexStr(i)
val highByte: Byte
val lowByte: Byte
val hexStringMinLength = 2
if (hexString.length > hexStringMinLength) {
var substring = hexString.substring(0, hexString.length - 2)
highByte = Integer.parseInt(substring, 16).toByte()
... | 1 |
7337ed0a260166de08a59e2762b759f4 | cb1c374d015a88a0ae47f46db80e1dc9 | Connection to the SQLite DB with enabled FK support and custom methods. | class WofKov(object):
def __init__(self):
self._conn = sqlite3.connect(os.path.join(os.path.dirname(os.path.realpath(__file__)), "db.sqlite"))
self._c = self._conn.cursor() | 0 |
e5d6f3ce63b159d435863b0efc3cd487 | 374889b872411b87a9aa2f15cb7e6054 | Color the seam in the image. | def findSeam(color_img):
img = cv2.cvtColor(color_img,cv2.COLOR_BGR2GRAY)
height = img.shape[0]
width = img.shape[1]
im_dx = cv2.Sobel(img,cv2.CV_32F,1,0)
im_dy = cv2.Sobel(img,cv2.CV_32F,0,1)
energies = abs(im_dx) + abs(im_dy)
W = energies
W[:,0] = 1000000
W[:,-1] = 1000000
for... | 0 |
8fe119207f3dab1b5148651f7c9c2c8c | 7378fe53ef59635d4a3ca272ddb730ad | 添加角色id和角色名绑定关系 | int addRoleInfo(@Param("roleName") String roleName, @Param("description") String description,
@Param("uuid") String uuid); | 0 |
1937434516f036c4a4bfd4dd49512d5e | 4eb21fe4895d35dfe32e9d302df3c994 | Load data from a subscription preview node. | namespace Bulldozer
public partial class SelectPage : Page
private void PreviewData( string selectedNodeId )
{
BackgroundWorker bwLoadPreview = new BackgroundWorker();
bwLoadPreview.DoWork += bwLoadPreview_DoWork;
bwLoadPreview.RunWorkerCompleted += bwLoadPreview_RunWorke... | 1 |
1087dfa734c68f503bac2a177823f8a9 | b1e9883168a8c51738900751934d1163 | 배치 내 할당되지 않은 주문을 컷오프 시킨다. | {
for (std::list<FUUUOrder>::iterator it=o1.begin(); it != o1.end(); )
{
FUUUOrder &order = *it;
if (order._madeCount >= order._targetCount)
{
FUUUCell &cell = f1[order._address];
cell._cellType = fuuu_empty;
it = o1.erase(it);
}
else
{
++it;
}
}
} | 1 |
8c32bd1344e1d9477108c79b4c0804ba | 5e5c9af08630b32b5e93ca665c258d3c | Вывод думпа переменной | function dump($var) {
ob_start ();
var_dump ( $var );
$output = ob_get_clean ();
if (! extension_loaded ( 'xdebug' )) {
$output = preg_replace ( "/\]\=\>\n(\s+)/m", "] => ", $output );
$output = '<pre style="text-align:left">' . htmlspecialchars ( $output, ENT_QUOTES ) . '</pre>';
}
echo '<meta http-equiv="Co... | 1 |
386d259ead6b38f9ddfe3f185569880d | ccca0956a4552e78cbd93e8021e31705 | convierte HH:MM a MM | s = s.replace("00:","24:")
if s[:1] == '0':
return s[1:2]
else:
return s[:2] | 0 |
352d662c75fb56358a26708d80e7d5d9 | dcb03ec399e4a672560ee53de83f4fcc | Calculate refdt_offset boundaries. | self.dref = np.loadtxt(self.fref, comments='#')
self.wmin = np.amin(self.dref[:,0])
self.wmax = np.amax(self.dref[:,0])
self.nw = len(self.dref[:,0]) | 0 |
e45e4413206bd47aa56f8299110de8be | 033b5c21296a396db71d6f42566ffd2c | Pre-process a tweet (i.e. sentence):
- remove urls hashtags & some special charachters
- separate punctuation from the word so they are tokenized separately | def processTweet(tweet):
tweet = re.sub('[\s]+', ' ', tweet)
tweet = re.sub(r'#([^\s]+)', r'\1', tweet)
tweet = re.sub('rt','', tweet)
tweet = tweet.lower()
tweet = re.sub('((www\.[^\s]+)|(https?://[^\s]+))', 'URL', tweet)
tweet = re.sub('@[^\s]+', 'AT_USER', tweet)
tweet = tweet... | 0 |
3179c1487f9b37e0325b5ca8c474491d | 14811363fe3e48c82ed40ca39f72a9eb | Проверка равенства кораблей | if (orient == 2 and (s + deck - 1) >= self.n) or (orient == 1 and (c + deck -1) >= self.n):
print('Не лезет!!!')
return False
if orient == 1:
for i in range(s-1, s+2):
for j in range(c-1, c + deck + 1):
if 0 <= i <= 9 and 0 <= j <= ... | 0 |
d2a308f09696dfa8504f6681b4f32b8f | 2fda513028ed50a60ea5e70e28f462c5 | sets the image file storing the player icons | public class XHuntPlayer
public void setPlayerIconID(int playerIconID) {
this.playerIcon = playerIconID;
} | 0 |
54e4fb50256a94b226e2c80713a3edb7 | 5cf5507d835deeec68ec87ab18fbae1c | Configure USCI_B0 for SPI operation | P2SEL0 |= BIT3 | BIT4 | BIT5;
SYSCFG2 |= USCIBRMP;
UCB0CTLW0 |= UCSWRST;
UCB0CTLW0 |= UCMST | UCSYNC | UCSSEL_2;
UCB0CTLW0 &= ~UCSWRST;
UCB0BR0 = 17;
} | 1 |
39020c60a187fb527fac3f08b7b07c57 | b44dfd7e79a33709e714888dfda670e5 | 通过权限主表Id获取对应的自权限数据集合 | @Query("from AuthorityDataDetailCopy t where t.authorityDataId=?1 order by t.showOrder")
public List<AuthorityDataDetailCopy> getByAuthorityDataId(String authorityDataId); | 1 |
0dcd3f33fbe2893b68cc897b34be49b7 | 2ac4d20bdae73cf9123649412c554e6a | 订单保存到中台 | const rdata = await Vue.axios.post('/market/wpOrder/save', data);
if (rdata.data.statusCode === 200) {
} else {
Toast(rdata.data.message);
return;
}
return rdata;
} | 1 |
f7de9127a731f111becf23789c5b3e58 | 52d4b02fb403d7e2924b98ee899ec1d7 | Retrieves the client rectangle representing the requested interval | export class PdfFormatItemEventArgs extends wijmo.grid.CellRangeEventArgs
get clientRect(): Rect {
return this._clientRect;
} | 1 |
aee5760be5ba8e0467d713b4a92f8668 | 1ecd1b6db7d2d42a4a86cb41e79b6e35 | wrong while statement: missing statement | def testSyntaxCheck11():
compileString("""
program p;
begin
while true writeln
end
""") | 1 |
379de0057bf8005d256f734a47d779d6 | 972ac2f960ad459d5126832a9317f2b3 | Returns a new object of class '<em>Controller Segment Element</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getControllerElement(); | 0 |
d023c727609cdbbaecc4ff8f79f6d408 | 3e457ea8f1a0e6e191fa4c5f50d2cab1 | Get The ciphertext data to be decrypted. | class TkipDecryptor():
def getCipherText(self):
if (self.fcsPresent):
return self.packet.wepdata[4:]
else:
icvStr = struct.pack('>I',self.packet.icv)
return self.packet.wepdata[4:] + icvStr | 1 |
2c3c820d7ebaf711f325c7d99d0a3b55 | f58c1ebe0e46c87bd21103434975d588 | Get the global user id. Same as ``os.getuid()`` | def get_current_uid():
return os.getuid() | 1 |
bf1ce393a415c4fef148f9836596318d | fd812641b1dca73f2a9c100bab8ed54a | 删除自动创建的默认线路加速,前提没有存在依赖与他的其他线路加速 | public class ExpressLineService implements IExpressLineService
@Override
@Transactional
public void deleteLineList(List<String> virtualCodes, String modifyUser) {
if (CollectionUtils.isEmpty(virtualCodes) || StringUtils.isBlank(modifyUser)) {
return;
}
for (String virtualCode : virtualCodes) {
chec... | 1 |
7eb3ecb8e1b0fc02e3524fc7892f03bd | def9cf3c5ddea8f2e5302a80260ee3b8 | This method returns whether the menu is displayed or not | export class Menu
isVisible():boolean
{
return this.menuVisible;
} | 1 |
aaef74ae051c1e3354521fb26a7f966c | a6c24eca740c77fc7237beaab36751c5 | Interrupt Service Routine for TouchScreen | int ScreenTouched( void ) {
return (*TS_ReceiverFifo & 0x1);
} | 0 |
a3718a101db69460b33945bcfe9c878d | b78b6a33b197dd755cc7d5a3c128ee20 | Write a context number into the BLR buffer. Check for possible overflow. | void rebcmp_blit(REBCMP_CTX* ctx)
{
} | 0 |
96b19cf6242011fd9579848f7481ae83 | bf9163aa554d5f428dc147299e6532a7 | Register the parameters used to call ``setup`` at local machine.
This information will be sent to remote workers to re-setup the experiments.
This private method is for parallel processing. | os.environ["RANK"] = os.environ["OMPI_COMM_WORLD_RANK"]
os.environ['LOCAL_RANK'] = os.environ["OMPI_COMM_WORLD_LOCAL_RANK"]
os.environ["WORLD_SIZE"] = os.environ["OMPI_COMM_WORLD_SIZE"]
if verbose:
utils.logger.info(
"Discovered AWS SageMaker settings of world_rank={}, local_rank={},... | 1 |
0fd474416aea5ec5c006d777e20b7ba7 | 3c5434974c4455d45fe6d220e4011ed4 | Sorts the elements of an option in descending order. | namespace BytecodeApi.Extensions
public static class IEnumerableExtensions
public static IOrderedEnumerable<TSource> SortDescending<TSource>(this IEnumerable<TSource> source, IComparer<TSource> comparer)
{
Check.ArgumentNull(source, nameof(source));
return source.OrderByDescending(itm => itm, comparer);
} | 1 |
03a6854da869604901f99ca3f2e65f7b | 6de6268d3af7d9c251d2f73fb2d2bec0 | This function is used to eliminate classes with examples less than threshold | public class Classifier implements Protocol
public void applyThreshold() {
for (classes c : classes.values()) {
HashMap<String, Integer> classMap = vocabulary.get(c.name());
HashMap<String, Integer> subSet = new HashMap<String, Integer>();
for (String s : classMap.keySet()){
... | 0 |
f24289450465ca4efebad3cb78c2caf0 | 75494db9a22bc57300558840b5088327 | The time at which the final video load request will be made (the final video may not finish loading until shortly after this time) | class CustomPlayerBuildStatus extends \BitmovinApiSdk\Common\ApiResource
public function eta(int $eta)
{
$this->eta = $eta;
return $this;
} | 1 |
369a9552d1b7067fc2e70983b676e8d5 | 7d9544402ee11ac3f5eee6e3c1e5952c | Given two nodes in a binary search tree, finds their lowest common ancestor | public class BinaryTreeInt
private Node findLowestCommonAncestor(Node root, int value1, int value2) {
Node leftLCA = null;
Node rightLCA = null;
if (root == null) {
return null;
}
else {
int value = root.item;
if (value == value1 || value == value2) {
return root;
}
... | 1 |
6263c357ece517a2d931356eb725a961 | 12151089b86b63ebdd4e8585955f0612 | Retorna Dados dos produtos e serviços da NF-e | namespace WindowsFormsApplication2
class LeituraXML
public ProdutosNFe getProdutosNfe() {
return dadosProdutos;
} | 1 |
4ee43a2d762c0a6f0acb2b14a3063d6b | 5a3aa39b4fe4c5e450497f267d1c5d8e | Counts of days where wind is flowing westerly (W, WSW, WNW) which suggests that
the mid-latitude jet-stream is not propogating vertically over this cell. | df = wind_direction_df(vwnd_file=vwnd_file, uwnd_file=uwnd_file,
startdate=startdate, enddate=enddate,
level=level, level2=level2 lon=lon, lat=lat, s=False, ret=True)
dfW = df.loc[((df['cardinal direction'].str.startswith('W') == True))]
dicts = {}
j... | 1 |
cd0913cc814925d5599bccd215667fc1 | 779f80ff8034afa9067abfe85e06f4ec | Returns the length of the longest location in the project.
Returns | class BasicSample(object):
def nloc(self):
return self._nloc | 0 |
7d272cbb57cfae32fcdc4b49c5a02e8f | 4ce61a7874adc27cedcc3c49632ec215 | function that will check and see if the process is meant to be ran in the background | ActivityManager activityManager = (ActivityManager) context
.getSystemService(Context.ACTIVITY_SERVICE);
List<RunningAppProcessInfo> appProcesses = activityManager
.getRunningAppProcesses();
for (RunningAppProcessInfo appProcess : appProcesses) {
if (a... | 1 |
378d339b38ed0a68e43bf88003c8f96d | 2b945956047b4cd507f40c41e3183cf3 | returns a string with an expression to evaluate to retrieve the target object | export class ObservableObject
returnTargetProperty(pathToObject, getParent = false) {
let targetChild = this.dataObjectProxy;
let splitPath = pathToObject.split('.');
if (splitPath[0] == "root") {
targetChild = zk.root_model;
}
if (splitPath[0] == "$parentModel") {
... | 0 |
c36aa1a14acfead0de70e145249184c2 | 09d19481bb46fe60742046f7c7c0c9c6 | Adds a course prereq to a course objects's prereq attribute
and checks if the course has been added to prereq | namespace Avocada
public partial class AdminWindow : UserControl
private void BtnAddPrereq_Click(object sender, RoutedEventArgs e)
{
LbxPrereq.Items.Add(LbxCourses.SelectedItem.ToString());
} | 0 |
5f1149f710989e1ecf88c0c00ac32a90 | 238688defb0ac90850352e590b0059bc | 拖拽消息列表结束 (鼠标按键松开或鼠标移出边界) | console.log('dragEnd', e.target.dataset)
$('#treeViewList li').removeClass('can-drop');
$('#treeViewList li').removeClass('cant-drop');
$('#treeViewList li').removeClass('enter');
dragingDocEle = null;
} | 1 |
89ec7bcd979365babb46adb43caa19e2 | 5e5d9bcd968c1c0661924f378a66e931 | Reset native callbacks; we need to do this or we get
CallbackOnCollectedDelegate exceptions. | NewFrameDelegate^ delegate = gcnew NewFrameDelegate(this, &FrameListenerSharp::ItHappened);
IntPtr stubPointer = Marshal::GetFunctionPointerForDelegate(delegate);
MYCALLBACK functionPointer = static_cast<MYCALLBACK>(stubPointer.ToPointer());
m_frameListener = new ConcreteNativeFrameListener(functionPointer);
} | 0 |
2b60c1556d1042512d4b90a6f03ffe88 | ce827ff8d8a4a6105f0c3c7975eb00be | 缓存策略是否只允许 ALL | boolean isCacheAllowed(); | 0 |
2b9af02aa3eeb01ec260b12391773b18 | 2e2ed94ef499a5df017bda4771144103 | Exists - This is called to verify a resource still exists. It is called prior to Read,
and lowers the burden of Read to be able to assume the resource exists. | namespace BlueBoxMoon.Data.EntityFramework.Migrations
bool Exists(); | 1 |
2da79080492e83d16c85baa927de584d | abbd65e8cade577b8cd6224002f3c5b9 | routine for assembling pdu with given length. The actual time is
written to the pdu | {
uint8_t ui8IndexTemp = 0;
pui8PduBufferPtr[ui8IndexTemp++] = (g_ui8dsapValue << 2) | \
((LLCP_RR_PDU & 0xFC) >> 2);
pui8PduBufferPtr[ui8IndexTemp++] = ( (LLCP_RR_PDU & 0x03) << 6) | \
g_ui8ssapValue;
g_ui8NSNR = (g_ui8NSNR ... | 0 |
ad1857cdccb92e8fa9f409d5a099b71e | 4947aaab871c69ba7225db3f825ad5f1 | Get group code by field. | {
foreach ($this->fieldValues as $fieldValue) {
$field = $fieldValue->getField();
if ($field->getCode() === $fieldCode) {
return $fieldValue;
}
}
return null;
} | 0 |
f951bf7847b15fa39e69fc535241587c | 1f2b6287fcf914655b2f761853c40f18 | fonction qui renvoie un pointeur sur la case mémoire correspondant
aux coordonnées fournies | content get_content(cgame game, int col, int line)
{
if(!game)
{
fprintf(stderr,"pointeur null dans get_content\n");
exit(EXIT_FAILURE);
}
if(col<0 || col>3 || line<0 || line>3)
{
fprintf(stderr,"col et line prennent des valeurs comprises entre 0 et 3\n");
exit(EXIT_FAILURE);
}
return game... | 1 |
cb2cabc343a9994393cb7326da35364d | afa670119d9d9df35fd671598662be3f | Tests if the game ends when one player reaches high score | class GreedGame
def game_ending?
@first_score > 3000 || @second_score > 3000
end | 1 |
2b42fdc14ca1b7a5f3af7dd9e478c84e | 3dff43592e2f170cfb353c40f38f5004 | Total number of segment across all lines. | class Multisegment(Indexable[Scalar], Linear[Scalar]):
def length(self) -> Scalar:
return self._context.multisegment_length(self) | 0 |
70688c2454650565662df34606c5890a | f5adeb56fc83880bf7ef9747cf8f6eff | 向下移动字段 | public class FieldDefinitionsPanel extends BasePanel
private void downButtonClick(ActionEvent evt) {
check();
int b;
if (((b = this.list.getSelectedIndex()) == -1)
|| (b == this.C.getSize() - 1)) {
return;
}
Object a = this.C.getElementAt(b);
this.C.removeElementAt(b);
this.C.insertElementAt(a, b +... | 1 |
81c6381337440ef77410eb63b6e54496 | f9a3df9274d504f59b952988c77f394a | Ensure URL resolves with pretty format and trailing slash | def test_enabled_has_trailing_slash_view_index():
resp = client.get("/enabled-trailing-yes/")
eq_(b"Index", resp.data)
resp = client.get("/enabled-trailing-yes")
eq_(resp.status_code, 308) | 1 |
5939b3855fc724cecf693a07a72915f6 | 004a47b8b1e6254f0a75691b516f4899 | Clicks panel header link and returns Favorites page. | {
Label titleFavorites = new Label(favoritesTitle);
wait.UntilItemIsDisplayed(titleFavorites);
titleFavorites.FindElement();
wait.UntilItemIsDisplayed(titleFavorites);
return titleFavorites.GetElement();
} | 0 |
be82b2a8de8fc66fab56b5102e809187 | 826549e7a03fdee2d8179f00c9eb3cbf | An init function that is used to create and update the game board object. | class GameBoard(GameObject):
def __init__(self,name,*args,**kwargs):
super(GameBoard,self).__init__(name = name, *args, **kwargs)
self.my_grid = [[i for i in range(8)] for j in range(8)] | 1 |
fd68b2c9fab8b17c6cc412862f91a976 | 4d841022a2aa3af443d6bc758113294b | Noop - here for backwards compatibility | class OpRing
def noop
end | 1 |
d8b41f7d4236e9d2912226977b2c4dd8 | 906f3326655773b9a7633855c4baba58 | Initialize a list of booleans, one for each node, determining whether
the node is wearing a mask or not. | def get_init_mask_map(image):
return np.zeros_like(image) | 0 |
b8be1920efb282910cdeb5fdee000f68 | 0419373628dcc0eae2c85eae7b27c15f | Number of items on last page | class Catalog
async getNumOfPages() {
const numOfPages = await this.driver.findElement(By.css(`.shop-catalog-paging__item:nth-last-child(2)`));
return +await numOfPages.getText();
} | 0 |
477f8c8f9978f804dad3cb9cbf8c195a | e801af551557ac25ee5415a6adaacc2a | 根据颜色编号查询尺码; | @WebResult( targetNamespace = "http://tempuri.org/" )
@WebMethod(action="http://tempuri.org/Get_Goods_ColorSize_StockNumber")
@XmlElement(required = true)
public String Get_Goods_ColorSize_StockNumber(String PDA_Number, String SignCode, String UserID, String BillNamestring, String ClientID, String StoreID, ... | 0 |
bf4c2e11c2002432d78f7359f0a6e1f3 | d910668b54457cbadea8df4e991c75a2 | Tracks the (ajax) add-to-cart event. | function akysz_ajax_add_to_cart_handler() {
WC_Form_Handler::add_to_cart_action();
WC_AJAX::get_refreshed_fragments();
} | 1 |
c8fe2b8c0b14e8ef7ff6374a5b61970d | 93aa9b53879bcb231cb70856059d5da6 | 进入游戏进入空闲阶段 | GameManager.getInstance().gameState = GameType.GameState.PLAYING;
let ui: MainScenceUI = core.UIManager.getUI(core.UIConst.MainScenceUI);
egret.setTimeout(() => {
GameManager.getInstance().enterCanStopState();
}, this, 100);
ui.addListeber();
ui.hideAllWin1();
ui.hideHouzi();
} | 0 |
0f989771c436af1b7c49333cf08ba651 | cace0488d7bc6bd3a29b36d4754fc56f | Редактирование поля "Модуль" | {
if($this->diafan->edit)
return '';
$this->upload();
$html = '<script type="text/javascript" src="'.BASE_PATH.'modules/comments/admin/comments.admin.param.js"></script>
<p>'.$this->diafan->_('Модуль').': <select rel="'.$this->diafan->get_admin_url('cat', 'site').'" class="inpselect" name="module_name" id="... | 1 |
57ee2034e157e99586c9939925aac149 | 5fabd19e4c328c0aa9fa373a6aadb779 | Generates workout reference sheet | with doc.create(Section('Week ' + str(no))):
for i in range(len(main_lifts)):
title = main_lifts[i][0]
with doc.create(Subsection(title)):
doc.append('Date: ')
doc.append(LineBreak())
doc.append('Weight: ')
print_workout... | 1 |
fd1ba663988a25aaabdea919c5416941 | 406302f1fd83090955d6a288eea57515 | Get the logged in user id from the Security Token Storage. | [HttpGet]
[TokenAuthentication]
[Authorize]
public int GetUserIdFromToken()
{
NLogger.Logger.Debug("Called");
if (!(Thread.CurrentPrincipal is UserPrincipal))
{
NLogger.Logger.Fatal("Principal is not set");
throw... | 1 |
989b01c92f762c31ed36a3d4fa58077d | 18ca164f1765866ba0daf4d8af521166 | Gets the information approver id. | class RequestApproval
public function getId()
{
return $this->id;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.