query_id
string
corpus_id
string
query
string
code
string
label
int64
dcd65685f9bd5721ffa7af7b95c7d748
c0c21187dbcc76537752ac0c7ad6a67c
Map the deeplink generator model to deeplink entity.
namespace ewApps.Core.AppDeeplinkService public class AppDeeplinkManager:IAppDeeplinkManager private AppDeeplink mapProperties(AppDeeplinkPayloadDTO appDeeplinkPayloadDTO, long number, string shortUrl, bool isAdd) { AppDeeplink apppDeepLink = new AppDeeplink(); apppDeepLink.ActionData = appD...
1
8f5c78e2a185585ae694824693fa78f0
fa9e227825d9c2231baf026e8f2c4842
ジャンケンを実行する関数
def janken(num) if num == "1" then puts "じゃんけん..." else puts "あいこで..." end puts "0(グー)1(チョキ)2(パー)3(戦わない)" jan_type = gets.chomp.to_s jan = chg_jan(jan_type) pc_jan = chg_jan(rand(0..3).to_s) if num == "1" then puts "ホイ!" else puts "ショ!" end put...
1
2f2ec7baef4aebf5e40bcf42f7daeb3e
c484c1deb1eb0322c1fbdb0c4aeb8bc7
Data provider with arguments for the test that tests the consumers __call method.
class ConsollyBuilderTest extends TestCase public function getWithDistributorArguments(): array { return $this->dataProvider->getWithDistributorArguments(); }
0
17d0e2b07b876052e8415282c236b55d
639c69115d15cd178e72c8bb53e78a73
Adds debugging messages for objects that failed to save for any reason
static void WarnUserAboutFailedSave( const TArray<UPackage*>& InFailedPackages ) { if ( InFailedPackages.Num() > 0 ) { FString FailedPackages; for ( TArray<UPackage*>::TConstIterator FailedIter( InFailedPackages ); FailedIter; ++FailedIter ) { FailedPackages += FString::Printf( TEXT("\n%s"), *( (*FailedIter)...
0
9bf5120ceaba2993b4fe53a4decf507e
ba9f27a352911b9d48413d4ad1ca4df8
Prices and revenues are handled as integers at the model level, so part of serialization is converting cents to dollars
class InvoiceItem def total_price_in_dollars self.total_price_in_cents / 100.0 end
1
e8572e83017bd1c6283d958786f8f6f3
a604bae5ab18973417dc53100f29344f
Reads and parses a USB ('Unsubscribe') request.
va_list args; const uint8_t *const start = buf; ssize_t rv; struct mqtt_fixed_header fixed_header; unsigned int num_subs = 0; unsigned int i; const char *topic[MQTT_UNSUBSCRIBE_REQUEST_MAX_NUM_TOPICS]; va_start(args, packet_id); for(;;) { topic[num_subs] = va_arg(args, const ...
0
4baa0582748332a4a56158dcd6c6323e
f78b323632f01a180d22807a7ee414f1
Ignore auth messages.
class Tutor_LoginController extends Model_Controller_Tutor public function init() { $this->_requireAuth = false; parent::init(); }
1
8a487a074f83d78ac84022a763f2a9fe
7285ebd1089e41c6f5389bf2de6a798b
Log out button to take user back to login page from virtual garage page:
public class MainActivity extends AppCompatActivity implements TimePickerDialog.OnTimeSetListener,DatePickerDialog.OnDateSetListener, GoogleApiClient.OnConnectionFailedListener{ public void goToLogout(View view) { new KeyValueManager(this).setLoginStatus(false); finish(); startActivity(new Inten...
1
bed6767f59113abd2a03d5a3e51e1c05
76e2eb2aa9be8c2fc470215ebb122527
saves the changes to the excel sheet when done editing it
namespace WordStatistics public partial class Form1 : Form private void savebtn_Click(object sender, EventArgs e) { setExcel(dataGridView1); }
1
f5cb36cfe6bed514385c9069870edabd
d811eae7d3f0c1ffdd625bfab378dcd4
Gets the runtime OID of the model element. <p> Contrary to the element OID, runtime element OIDs are guaranteed to be stable over model versions for model elements of same type and identical fully qualified IDs. </p> <p> The fully qualified ID of a model element consists of the concatenation of the fully qualified elem...
long getRuntimeElementOID();
1
3b3c35bbd129d188c2f28e36c0b15c2d
4354180b31388e436ca38ab88318194a
Indique si le mot passé en paramètre est présent dans la table
namespace ConsoleApp1 internal class Program public static bool isInWord(char letter, string motADeviner) { return false; }
0
618e59d6043a021fe5c743021b8f9bd2
d388650c4360bb50fda17990ee639e95
Set information if reprovision of node is pending (ongoing).
public abstract class AbstractStateQueueKeeper protected boolean isProvisioningPending() { return this.provisionTimeStart!=null; }
0
dcc2c9291a74898acdf4a6eaec858013
5ac0b684905df3a100b6bfb376c063b8
Modify the now black and white image from the threshold. First change the white space to green or red, Then modify the black to be white. Return an image that is green/white or red/white with no other colors present Doc: https://stackoverflow.com/questions/3752476/python-pil-replace-a-single-rgba-color
def do_with_image2(im,threshold = 68): width, height = im.size im=im.resize((int(width*12/height),12)) width, height = im.size source = im.split() R, G, B = 0, 1, 2 mtr = np.array(source[G]) r = source[R] tmp = Image.new("RGB", (width, height,), "black") tmp_r, tmp_g, tmp_b = tmp.s...
0
347ebdd2d6962a1fc95fd9db0ec8d5c8
685937e212c515e1d9c3d4825940f8b3
查询该期期次的期刊是否收藏过
public int searchalex(int subId,int stuId);
0
153411bb8137258bb35801e41b555da5
94d7406b6a673dcf1c2d6a6d108ead7a
找出铺砖方案
l = int(input('Insert lenth of wall: ')) w = int(input('Insert width of wall: ')) bl = int(input('Insert lenth of brick: ')) bw = int(input('Insert width of brick: ')) wall = generate(l,w) add(wall,bl,bw,[]) for i in range(len(result)): print('Method'+str(i+1)+': ') print(res...
1
eb3256d9fcb6e285ea2615b4123a1280
ba3ea2b303a29762fe05e6eb81dcf2b8
ignore - this dataset never changes
public class IsoTestDataSource implements IsoDataSource @Override public void update() { }
1
b6bb6d12e98354a040df910b47d891fc
6ad2ad7b7c368998e81fcda4d1111c2e
Gets the flag that indicates whether or not the exam has been started.
boolean hasStarted();
1
54afd8ee584501d6b272ded048e5e343
65c69069a54762dc159b6d8b6394a918
determine players distance away from the current ships location
volatile uint16_t ship_x_coord, volatile uint16_t ship_y_coord, uint8_t ship_height, uint8_t ship_width, volatile uint16_t invader_x_coord, volatile uint16_t invader_y_coord, uint8_t invader_height, uint8_t invader_width ) { int x_diff; int x_dist...
0
15139e30e2c50c7341edc935ef23a8dd
0578f84d3c8a8c6b018aab9d80b7dcd6
설문템플릿 화이트리스트를 조회한다.
@Controller public class SurvQuesController extends BaseController @RequestMapping("/system/system/survey/survQues/selectItemList.do") public ModelAndView selectItemList(@ModelAttribute("searchVO") SurvQuesVO searchVO) throws Exception { return makeJsonListData(survQuesService.selectItemList(searchVO)); }
0
62ca98ba6ae747a8acc6ba23e4bcb944
e0ae7446a9f68036ae69f8a539cee08b
查询许可证编号是否存在
namespace Uniex.DAL public partial class Lease public int Exists(string LeaseCode) { int count = 0; string sql = "select count(*) from Lease where LeaseCode='" + LeaseCode + "'"; using (SqlDataReader read = DBHelperSQL.ExecuteReader(sql)) { whi...
1
f473533071d3f05b51fa5c51bd9b6481
fe96448448921921c9aecefa14d918ce
Creates the sets.
class SyntaxTable(): def build_sets(self): self.first = self.build_first_set() self.follow = self.build_follow_set()
1
a240a7a32ff8adc953a71e24d9cc5c59
916a06bb5d92fc19f5e3c5e73a6c3c1a
Gets the name of the current node that is loaded within the GUI Returns: str: The name of the node which is currently loaded
class DialogueManager(): def get_current_node(self): return self._node
0
b9441cb66c7ee4276ba42ddc771ffed9
b7a3be6c1e39d696937d1cab09743851
Gets a job parameter with the given name, preferentially using the specified parameter section
public function get(string $sParameterName, string $sSection = 'GLOBAL'): string;
1
df12420526a6361f343b35ef228ef701
fcfd0be072cdc3bb66f2271ebdc4c94f
Check if the requestCode and [Intent] is for [Source] authentication. The [Intent] should be retrieved from the result from `Activity#onActivityResult(int, int, Intent)}}` by [Activity] started with [authenticateSource].
abstract class SSPGuardAuthenticator extends AbstractGuardAuthenticator public function supports(Request $request) { $match = $this->router->match($request->getPathInfo()); return 'ssp_guard_check' === $match['_route'] && $this->authSourceId === $match['authSource']; }
0
0ac53369c1df271f0c52041863848d01
17deda2d021c80ba55cf51450598a787
重新整理固定收件人 1. 跑固定收件人迴圈一一跟選擇成員比對 2. 以選擇的成員ID過濾出固定收件人
drawLots() { const allUsers = values(self.users).slice(); let remaining = allUsers.slice(); allUsers.forEach(user => { if (remaining.length === 1 && remaining[0] === user) { const remaining2 = allUsers.filter(u => u.id !== user.id); const swapWith = ...
0
a8af870d2699ee31a55bf902e6416a1b
80ca6eee697d564b19640113d866c0f7
Provides the target wait time.
class WaitTime(object): def get_wait_time(self): return self.m_wait_time
1
786624a9041cb9d5fe98c54f6d80e281
3d763935c5bc26eacc319efafe965e8a
获得用户uid的好友列表,每个页面显示9个好友,page从0开始,没有好友返回空数组
{ $this->user_id = !$this->user_id ? $this->mid : $this->user_id; return model('Follow')->getFriendsForApi($this->mid, $this->user_id, $this->since_id, $this->max_id, $this->count, $this->page); }
1
1ff144e86783192397d7a3d7610398fe
903ffd59718a5731c6874654fadb78a9
Returns four 128-bit byte strings that can be used as 128-bit keys
def keygen(u_password): password_provided = u_password password = password_provided.encode() salt_s = b'\x91\xabr\xebx\xc5\x9dx^b_7\xb6\x8a\xbb5' salt_y = b'\x1cy8\r\x7f\xf8,\xe2Pu!/\x043\xdc\x0e' salt_z = b'\x9b\xd0\xb6\x85!J\xde\xe5\xc8\xb3\xc9\xa2\tqPy' kdf_s = PBKDF2HMAC( algorithm=hashes.SHA256(), ...
0
5831914563c76ef7c8bb5320e97db7da
2867181568f6196aaaeaf82d19965f98
Orders by <code>value()</code>'s lexicographic ordering.
public class ValuedComparator<V extends Comparable<V>> extends AbstractSortOrderComparator<Valued<V>> @Override protected int compareImpl(final Valued<V> object1, final Valued<V> object2) { return Comparables.compare(object1.getValue(), object2.getValue()); }
1
1ae3550c8696b2a5bea4721e5998ca7b
61b729f9a530583cef7d1d0a1a498d5f
格子坐标转换成Unity坐标
position = transform.InverseTransformPoint (position); TransformToGrid (position, out x, out y); }
0
d674398db6fcd96095cc1b28dc7e7ea0
fcdfbcf1a740ffb168a6fdf565e7c673
An empty square only equals other empty squares.
class BoardTest(TestCase): def test_squares_equal_with_blank_squares(self): board = Board() self.assertFalse(board.squares_equal((1, 2, 3)))
0
23b9cebd6adc9e03e8226f76dee8ba86
e57b0c87d41faa99ea95ab8f8a6a4571
将整个数组空间初始化为一个静态链表
void InitSpace(SLinkList L){ int i; for (i = 0; i < MAX_SIZE-1; i ++) { L[i].cur = i + 1; } L[MAX_SIZE -1].cur = 0; }
1
a526b8ba425fdd3a921f6abdfaa1ceae
04a99b6dc5847db0c7470f3ac83b5b0a
オンゲキ のプレイ回数を取得
class Player: # ジャンケンの手を表す定数 def get_win_count(self): return self.win_count
0
6cd1541164bdfdc734d5d2b57431e28a
d3f7e1fdc10ece76851d66770b4b83a5
Returns the initializer for the FNV hash function
fnvHash(const char* key) { hash_t hash; for (hash = FNVHashSeed; *key != 0; ++key) { hash ^= *key; hash *= FNVHashPrime; } return hash; }
0
e90016cd43c25858a096bb1e2ec20d0e
fb0582120dc5ee30f1c425e383f7c7cd
Gets the "NumberConfiguration" element
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "soapPrePayment", propOrder = { "recordid", "paymentid", "curid", "managerid", "authtype", "status", "agrmid", "amount", "curname", "receipt", "mgrlogin", "comment", "number", "paydate", "canceldate" }) @Ge...
0
a94020c1ee4dfe72a1e4257b57fc9610
e751477979a36a049ac8ed7f942dd1b4
聯誼類型儲存
function store_type_of_industry() { return array( 1=>'店舗型風俗', 2=>'無店舗型風俗', 3=>'ホスト・ガールズウォーター', ); }
0
42feb0a7a6a22ba0857b8a5ac61d7bbe
40529546eafbcfb0c04036db0f7e9a55
Called when a mode takes control as the active mode.
public class ScriptEvalCommandProcessor implements CommandProcessor public void onModeActivate(GameConsole console) { }
1
d0431feb4ef4dfbc128c9dbbfc425c0a
6be35a4fa17644aa578508e727b84a97
Obtiene un manejador del Servidor FTP
if (!self::$_instance) { self::$_instance = new Ftp(); } return self::$_instance; }
1
b6776cf33efc8a859354683c16450856
1ff8da42b3354ee3e8535369a1d0039a
Remove old directories, create new one. Randomly choose pictures from large dataset and copy them to created folders
old_cwd = os.getcwd() try: os.makedirs(dir_to, exist_ok=True) for curr in os.listdir(ds_dir): if not os.path.isdir(curr): continue photo = os.path.join(curr, 'photo') if os.path.exists(photo + '.jpg'): os.rename(photo + '.jpg', ...
0
afb8c9df7dbdb8f04001ead5689b0dfd
e574faa55ca44f9e7943df5afaa92f7a
Implementation of ":cscope" and ":lcscope"
init_diff() local file = scite_CurrentFile() dir = path_of(file) if check_git() then dbg('Working on', file, 'in', dir) editor:MarkerDeleteAll(22) local diff = git_command("diff "..file) local line = diff:read() while line do while not line:match"^@@" do line = diff:read() end dbg(line) local old...
0
7a55ad04b52c520b5313d0e915d28b74
483b6ca82f65a5b4170791c3b9e6418b
Gets the number_of_active_runners of this MarketDefinition.
int getNumberOfUnmappedSourceRunners(Long marketId, Long connectorId);
0
6781728aadf96b2031f0001b917f7b73
668ba6e7f2845ffc8adfcf9eda082cbc
Al cambiar el texto actualiza el numero economico en el modelo
namespace BPMO.SDNI.Contratos.FSL.UI public partial class EditarLineasContratoFSLUI : Page, IEditarLineasContratoFSLVIS public void PermitirNumeroEconomico(bool permitir) { txtNumeroEconomico.Enabled = permitir; }
0
c85459dfd5a38371c5e3b8293f74a19f
430c657a2406d4c83abfa008898fc791
fails before any allocations happen
void AllocWithoutMakeAllocatorCall() { Allocator allocator; assert(allocator.alloc(1) == nullptr); }
1
69a47bbaed53b86189de6e17b8f8e09e
054f3eb5da6e9a6bf17f7733df382bce
Llama al a API para almacenar un neuvo tipo en la BD
{ $this->config['newType'] = ActividadType::class; $response = parent::createAction($request); return $response; }
0
923fd81e122240f294a93913b3e014bc
fd61bc000d1ca66dcd420e58baaf77fc
Getter for <code>appcenter_mall_data.t_mall_managers.UserName</code>. 用户名称
public class CarGarageProductWrapper extends BaseModelWrapper<CarGarageProduct> implements CarGarageProduct, ModelWrapper<CarGarageProduct> @Override public String getUserName() { return model.getUserName(); }
0
070a8ce93b248f134e1b74f92ba4c382
d6221e00d8affc366801e0a3dbe072f8
近傍のエージェントに修復を行います.
namespace Antymology.Terrain public class AntBehaviour : MonoBehaviour void Share(){ for (int i = 0; i < Sharing.GetLength(0); ++i){ if (Sharing[i].gameObject.GetComponent<AntBehaviour>() == null || !Sharing[i].gameObject.activeSelf) continue; int friendHp...
1
a98803218cb1df625829360e99663afd
d4685c84e31a96c246bd64e1448cb29b
moves the given queen down until it finds a safe space; if no safe space can be found, the queen is left in the last row and the method returns false
if (row == this.board.length) { this.displayBoard(); return true; } for (int col = 0; col < this.board.length; col++) { if (this.isSafe(row, col)) { this.placeQueen(row, col); if (this.findSolution(row + 1)) { ...
0
af2b2b9b7c0bf789eba2fbe1a413c091
c5f9a39afa0eb114d06ac6c84f1b25e3
@brief 编辑步骤编号使用的功能键F5回调函数
static void edit_step_num_f6_cb(KEY_MESSAGE *key_msg) { back_win(key_msg->user_data); }
0
51f40ff20c59a38962ef086b7af6c387
d37594bf3196a0544ac0fbdf1ff4f26b
Return a list of image tracks that can be switched to. If the player has not loaded content, this will return an empty list.
class IPressRoom(Interface): def getClips():
0
48c0db0770e2f1c2eedd8177ba21153c
ad782913b7c726804cb477756f9581fd
Gets or sets the callback telephone number
namespace ca.uhn.hl7v2.model.v22.segment{[Serializable] public class ORC : AbstractSegment public TN[] getCallBackPhoneNumber() { TN[] ret = null; try { Type[] t = this.getField(14); ret = new TN[t.Length]; for (int i = 0; i < ret.Length; i++) { ret[i] = (TN)t[i]; ...
1
a0f04d912ac4f4ca0bc9d69a1d4bdd17
40d37b68e60c513e860d794cb55e653c
Actualizar los datos de un tipo de equipo.
namespace Wass.Back.Empresa.Controllers.v1 [Produces("application/json")] [Route("api/v1/[controller]")] [ApiController] public class ActivosEquiposController : ControllerBase [HttpPut] [Route("")] [ProducesResponseType((int)HttpStatusCode.InternalServerError)] [ProducesResponseT...
1
2e03f61d535a6e0cd523cb398bf127ac
3cba37cfc288f8584fdb915bbb2fece8
通过出版社 查询isbn信息
public class BookDao public PageBean<Book> findByPress(String press, int pc) throws SQLException{ List<Expression> exprList = new ArrayList<Expression>(); exprList.add(new Expression("press","like","%"+press+"%")); return findByCriteria(exprList, pc); }
0
912262b773bf136f147889787afc0b6f
e785b3e40b08f8a166bdf74adbf1e351
Периметр треугольника по длинам трёх его сторон
{ double P = (a + b + c) / 2; return Math.Round(Math.Sqrt(P * (P - a) * (P - b) * (P - c)),1); }
0
0c5d6da994de73d03df99be8ece21151
a31ca63f2bbf85d44c3cd63fe302abc5
tests whether this is a "countable" (non-UTF-8-interior character)
{ switch (property->category) { case UTF8PROC_CATEGORY_ZL: case UTF8PROC_CATEGORY_ZP: return true; case UTF8PROC_CATEGORY_CC: switch(property->boundclass) { case UTF8PROC_BOUNDCLASS_CR: case UTF8PROC_BOUNDCLASS_LF: return true; ...
1
36fbe290d490ce124b03d8e7757150de
32930cfadfefed946430ee8741d7c46b
Method for reading data in text fields then constructing a course object from the data properties
void nextFrame(ActionEvent event) throws IOException { if (nametxtFX.getText().equals("") || hourstxtFX.getText().equals("") || teachingtxtFX.getText().equals("")) { requestFX1.setText("Please fill all the fields and try again."); } else { String result = AdminController.setNewCourse(nametxtFX.getText...
0
7043f42fd5f8ca14a085f19c1ac935f2
ef10d234c14bd46e0a2e0daad3ae578b
This function returns the sum of all the leaf nodes in the binary tree which are the left child of their parent node.
{ int sum = 0; if (root == null) { return(0); } if ((root.left != null) && is_leaf(root.left)) { return(root.left.data + find_sum_of_left_leaves(root.right)); } return(find_sum_of_left_leaves(root.left) ...
1
45fdd4ce451fb79b475fffd5d8fbde2c
e3a0d31e8bd5621b88693ccd0751dbb0
Parse out the dict from a visit {content, metaData, links} and add to db. We'll try to add dates to successfully-addded content).
url = response.meta['wayback_machine_url'] title = None content = None try: m = re.search('.+\/([^\/]+)\/(\d{4}\/\d{2}\/\d{2})\/.+', url) topic = m.group(1) date = tuple(m.group(2).split("/")) title, content, err = self.parse1(response, url...
0
6bc6e2802f22faed6bfa0440e5d33fd2
7ae707b5299f64887dc361def136fc6f
Test that a v2 notebook converted to current passes validation
with self.fopen(u'test4.ipynb', u'r') as f: nb = read(f, as_version=4) validate(nb) self.assertEqual(isvalid(nb), True)
0
326564db2bcfa60d5b3ef8c2d5e3194e
e51e394f8f386a523f8663ccee018461
Method to get linked list for the hash value
public class ProjectHashMap public ProjectLinkedList getValuesList() { ProjectLinkedList<Object> returnList = new ProjectLinkedList(); for(int i = 0; i < buckets.length; i++) { ProjectEntry curr = buckets[i]; while(curr != null) { returnList.add(curr.value); ...
1
aa937283872d8e7ccff6a522b86b58f7
088fb893985afa5d5667cae8896cf41b
References check
class Connect_RentguaranteeController extends RRPConnectAbstractController private function referenceSatisfiesCriteria(RentRecoveryPlusReference $reference) { $policyCriteria = new PolicyCriteria($reference, $this->getContainer()->get('rrp.utility.rrp_guarantor_reference_creator')); $referenceSatisf...
1
8a5bc8dfad3c6a681d4ebe31ed6fe09b
92f2fd5ba047ee6b0f17375036e631ae
create several streams in a team
func CreateTeam() error { t1, err := newTorTeam(1) t2, err := newTorTeam(2) t3, err := newTorTeam(3) if err != nil { return err } teamList[1] = t1 teamList[2] = t2 teamList[3] = t3 return nil }
0
a8e110b0747899c7b3d61ad1a60c6d84
d768b435dd049182eea8901584f2d182
Power settings management for Ondemand CPU frequency scaling mode
static void power_manage(void) { #if defined(NRF52) #define FPU_EXCEPTION_MASK 0x0000009F __set_FPSCR(__get_FPSCR() & ~(FPU_EXCEPTION_MASK)); (void) __get_FPSCR(); NVIC_ClearPendingIRQ(FPU_IRQn); #endif uint32_t err_code = 0; err_code = sd_app_evt_wait(); APP_ERROR_CHECK(err_code); sentek_app_...
0
58b50b588cfd74a8facb4247f694ddec
f534370812ddd813bdc30f42c6f1dd8e
See if the field is actively set: ChgDate (PAYMENT_TRANS.chg_date)
public class DepositObjectFilter extends BaseFilter implements Serializable public boolean getChgDateFetch () { return this.ChgDateFetch; }
0
6be525c316c876436554fd5b62e3bad6
bcb2e533a8731c9dd57f7de2a7c7ea5a
按照id查询商品上下架状态
public ToolProductUpDown queryToolProductUpDownByProductId(String productId) throws HsException;
1
b55655e0715389e28f53d633218679b2
f0767aad5129733382285524d8efd548
returns current image based off direction
if (degrees >= 23 && degrees < 68){ return("img/ne.png"); } else if (degrees >= 68 && degrees < 129){ return("img/e.png"); } else if (degrees >= 129 && degrees < 158){ return("img/se.png"); } else if (degrees >= 158 && degrees < 203){ return("img/s.png"); } else if (degrees >= 203 && degrees < 248){ ...
1
f8556c9c5521debc8949812fc4c5e7e9
c27cd3f8ad98656e2e8741b2441f9c3b
Returns all country calling codes the library has metadata for, covering both non-geographical entities (global network calling codes) and those used for geographical entities. This could be used to populate a drop-down box of country calling codes for a phone-number widget, for instance.
Map getAllCodes() throws CodeLookupException;
1
a3ddad0d34d7f50ef84e209b0d1be000
9c57a5bcc01208049c6b75554ab9190b
判断字符串是否是日期 例:20110101,2011-01-01,2011/01/01
namespace Nest.Framework.Utility public class Common public static bool IsDate(string strValue) { return Regex.IsMatch(strValue, @"^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3...
1
3ac8ed584325d4dfebc8f656e6d463f1
446b4f6e1eb4495b77fa8ca4311bc58c
<p> Retrieves information about all the message templates that are associated with your Amazon Pinpoint account. </p> Documentation</a>
export class Mobiletargeting extends PolicyStatement public listTemplates() { this.add('mobiletargeting:ListTemplates'); return this; }
1
0e647a30c008e560f1d247c011b8edbb
faa9bc88e3a269076491ee2557a1b614
Получить имя метода в выражении
class bslHelper getFuncName() { let regex = /(.+?)(?:\((.*))?$/.exec(this.lastExpression); return regex && 1 < regex.length ? regex[1] : ''; }
1
4057e26fbc1471d7c7907a4732220a5d
289d8941b6d144f451802258e6214719
根据cookie保存的教室信息初始化课表
class MainActivity : BaseActivity() private fun loadCourseTable(table: CourseTable?) { val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this) courseView.startOfWeek = sharedPreferences.getString("start_of_week", "1")?.toInt() ?: 1 courseView.courseHeight = (share...
0
f4e011230b112b95434f286a223e8fd1
e36cca8d6f6f32bcee978cddc5f2b445
Test that the data within the coord is as expected with the expected units, when the input cube has a forecast_period coordinate.
self.cube1h.coord("forecast_period").bounds = None name = generate_file_name(self.cube1h, include_period=True) self.assertIsInstance(name, str) self.assertEqual( name, "20151119T0115Z-PT0001H00M-air_temperature-PT01H.nc")
0
ed3f30a68caf929d2f565e52f60fcc41
b2c2f6b89f3e5303eece72848e506a95
测试Automapper的extension
public void Test_MapTo_CustomProfile() { var source = new AutoMapperSourceSample { SourceStringValue = "666" }; var target = source.MapTo<AutoMapperTargetSample>(); Assert.Equal("666-001", target.TargetSampleValue); }
1
a23b0a85052f723609edcffde86750b1
c708bda205ae03c9fdbdbef051a7b535
Creates a timer to perform scheduled updates for the specified profile.
class CPUTimeProfiler(object): def StartTiming(self, profile_name): if profile_name not in self._profile_measurements: self._profile_measurements[profile_name] = CPUTimeMeasurements() self._profile_measurements[profile_name].SampleStart()
0
2cc2f46843f7d53cf468bf9a2fc12639
ac77949877f693a1ff34de8820f09e7b
останавливает сервис синхронизации мультибуфера
public class st extends IKeyboard implements IKbdSettings public static void stopSyncServise() { if (ClipbrdSyncService.inst!=null) if (ServiceJbKbd.inst!=null) ClipbrdSyncService.inst.delete(ServiceJbKbd.inst); st.fl_sync = false; }
1
59047970f95fbb4f14d28a876d4a8f97
badba97afb3d217604b3d9209ad08a5d
加载停用词信息
def load_stopword(): stopword_file = './info/stopwords-master/cn_stopwords_khan.txt' f_stop = open(stopword_file, encoding='utf-8') sw = [line.strip() for line in f_stop] f_stop.close() return sw
1
decada109802bf75c9861e57335a59ac
b50740f73e266142e84a9fae014ed078
A userlist_collection should support the userlist type.
class DefaultMemberCollection extends Collection public function getType() { return 'user'; }
0
d910df1bbf03c4bb845d9082a25a89d4
219673610dc8d001ade8f8b550c3468b
Returns confidence (score) of the current tracker output Returns: float: Score between 0 and 1 (where 1 is more confident)
output = 0.95*confidence output = output + self.count_neighbours() return output
0
542208d7cbdc0cb25bf0ff7960c3d4bb
fe79cfc64fddd1577ce9a9fbc7deba13
Handling the fetching of an animal as per animal id
class AnimalController extends Controller public function show(Animal $animal) { $animal = Animal::findOrFail($animal->id); return $animal; }
1
7940d6c4ba40dc0b33fb372fa8f92088
0ee062f964f15702f01fe62200ac1698
Gets the <see cref="ILog"/> implementation for this factory.
{ var configKey = _settings.GetSetting("DefaultLog"); var returnValue = _provider.Resolve<ILog>(configKey); return returnValue; }
1
8258e70ee2fd2f407b684a0fe6d16bd8
9ef0fca954b91084133e2ffc2d1194d0
Función que devuelve la matriz adjunta de la matriz que la mande a llamar.
public class TMatrizTest @Test public void testAdjunta_0args() { TMatriz A=new TMatriz(3,3); A.setValue(0, 0, 0);A.setValue(0, 1, 1);A.setValue(0, 2, 0); A.setValue(1, 0, 1);A.setValue(1, 1, 0);A.setValue(1, 2, 0); A.setValue(2, 0, 1);A.setValue(2, 1, 0);A.setValue(2, 2, 1); TMatriz B=A.adj...
1
50280e7d7ced025f1a361c0749f02455
465430e650b198b3eb81393f07b1b005
Returns a new object of class '<em>CONTEXTRESTRICTIONCONSTRAINT Type</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
RestrictionType1 getRestriction();
0
9d9dd824a6067c7784a6c7e84360f12c
8ff947a6982b5e7ac2998ffd09d147c5
Convenience function to join two road segments together, end to end.
public class Segment public Segment connect(Segment segment) { int[] l; if (end == segment.start) { l = ArrayUtils.addAll(this.list, Arrays.copyOfRange(segment.list, 1, segment.list.length)); } else if (data.raw_dist[end][segment.start] < MyParameter.BIG_NUM) { l ...
1
d83377302b3d6689009a84a3f065bedb
edd2fd15451deb99478cefdab1d1a8c8
Returns the next power of two greater than or equal to the given value.
class GlacierWrapper(object): def _next_power_of_2(self, v): if v == 0: return 1 v -= 1 v |= v >> 1 v |= v >> 2 v |= v >> 4 v |= v >> 8 v |= v >> 16 return v + 1
1
b4782c8fca0113f489cf222b13500f64
2e4abe03377f616862303ca8eb2ffe1c
Converts markdown to HTML using the showdown converter
var converter = new Markdown.getSanitizingConverter(); var editor = new Markdown.Editor(converter); if (hooks) { hooks(editor); } editor.hooks.chain("onPreviewRefresh", function () { highlightCode(); }); editor.run(); }
0
4472078031bea4f6d0d7d01c815577b3
9f933a41ab90c98c082b27226192e70d
Adicionando CSS e JS no plugin GDPR Compliance
{ echo '<script src="https://kit.fontawesome.com/a054ec7c89.js" crossorigin="anonymous"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="assets/js/datatables.js"></script> <script type="text/javascript" src="assets/js/main.js"></...
0
f2bda53bd81e4b7c1e8c40127a1e2f9f
a9cec033888374181e94ce6be07270df
Keeps track of an SMS that has been sent to the RIL, until it has successfully been sent, or we're done trying.
{ SmsIncMsgStoredResult_t *pSmsIndex = (SmsIncMsgStoredResult_t *) data; KRIL_DEBUG(DBG_INFO, "ProcessSMSIndexInSIM::result:%d rec_no:%d waitState:%d\n", pSmsIndex->result, pSmsIndex->rec_no, pSmsIndex->waitState); if(SIMACCESS_SUCCESS == pSmsIndex->result) { KrilMsgIndexInfo_t msg; msg....
0
10fe2b71d5eebc8e6dbbd1722ed38df7
f2f83f7dfd02c27335c308eb8d94220f
Request a new Safeguard API access token with the underlying credentials used to initial create the connection.
ValueTask<AccessTokenResult> RequestAccessToken(AccessTokenRequestOptions options);
1
c02008c0954806cb375a388b5e1cc1c2
fcf845d05a75436459e72e4a4c512d09
対象デポの最新の承認日を取得
$re = M('approval')->where('adate = '.(int)$id)->select(); if ($re) return $re[0]['adate']; else return ''; }
1
b5337f7b25d7909191246d8613c1cd64
8049b2f5d7f5f7143e3bf3b2593dd9c1
Gets the http connection read timeout in milliseconds.
public class MagnetDefaultSettings public int getHttpReadTimeoutMillis() { int result; Integer defVal = getIntValue(TAG_HTTP, ATTRIB_READ_TIMEOUT); result = (defVal != null) ? defVal.intValue() : 30000; return result; }
1
43d17fcd173dd6e129e7bc126cf9a5f4
23ef57bda7bf21968c2e66f7a6c1a181
Translates the model used to translate CAST to AIR into the final AIR structure.
namespace Blade.Compiler.Translation internal class TranslationProcess : ICompilationProcess public void Execute(CompilationContext context) { if (context == null || context.Model == null) return; if (context.OutputStream == null || !context.OutputStream.CanWrite) ...
1
61eedf725444ef4d77e5351ff6d59d22
a9c2d5b9fe6fd68a00b1f52a6ad14daf
Изменение статусов у нескольких подписчиков
if (!is_array($responseStatuses)) { return false; } $Logger = RocketJump::getInstance()->getLogger(); foreach ($responseStatuses as $userResponse) { $isStatusUpdated = false; try { $id = $userResponse[RocketJumpApiSender::KEY_USER][...
1
6fd8b076d1876508c22233e967a57138
b3fb82d855ccdf5be6948ec262ab21a9
Performs common validation for Maintenance Document saves.
if self.pk: return if not self.is_vm(): self.validate_warranty() self.validate_serial() if not self.system_status: self.system_status, _ = SystemStatus.objects.get_or_create( status='building' ) self.validate_all...
1
c3bae0db4f93fbce287760114a89900f
1a3a2482a4666c08b5bb152342315f68
查询自定义报表配置列表
getReports() { return request.get('/report/customReport/getAuthorized') }
1
e447d8848259b0ed4b3e1ba590176053
d0bc8dc586090437615e9e7ad0214a34
Returns the number of RANSAC inliers.
class SoftmaxRegression: def num_in(self): return self._num_in + self._intercept
0
153d8b2429218cd47ac7e1c658d815d1
20c1e6d01616402794ab230cdc39eaa1
Find X recently added products.
{ (new CountValidate())->goCheck(); $result = ProductModel::getMostRecent($count); if ($result->isEmpty()) { throw new ProductException(); } $result = $result->hidden(['summary']); return $result; }
1
c0316fadc5f26b651fc10431d6738e91
e4d4f7f0d09412a50781284db3fc3795
Verifica se planilha está aberta
namespace MCD.RLPlanning.Client.AppCode public class WinAPI public static bool CheckFileIsOpen(string xlsPath) { bool result = false; IntPtr vHandle = WinAPI._lopen(xlsPath, WinAPI.OF_READWRITE | WinAPI.OF_SHARE_DENY_NONE); if (vHandle == WinAPI.HFILE_ERROR) {...
1
079af49c8d4d1406259ce64a7d9b4624
1db48f6318ec1cdcde04fc098aa207d6
Do some work to make time pass.
func doWork() { time.Sleep(time.Second) }
1
f810990cf35aaea3b28d4911c10a252d
5381b23fd4d43a8720495104ae1fe070
Plays a given song of index i in music.
public class Pitch{ public void playSpecific(int i){ playNote(i); }
0
4f3ea6d81009b5d1bbaf2ce907440ad1
6991b15c45a789e97e7a5c9bb282d1ce
szukamy, czy istnieją 2 liczby pierwsze X,Y takie, że dowolna liczba naturalna N idzie być zapisana jako N = X + Y
{ while (1) { uint64_t aVal, bVal; int ok = generator_Next(a, previous, &aVal); if (!ok) return 0; ok = generator_Next(b, previous, &bVal); if (!ok) return 0; if (bVal == aVal) {*res = bVal; return 1;} previous = aVal < bVal ? aVal : bVal; } return 0; }
0
76cfbeef9eea4740f67e64b7d4a5df9e
f71b13347aeb643b1273eb180f33e0fd
Loads the report builders.
namespace CambridgeSoft.COE.Framework.COEReportingService public class COEReporting public static List<ReportBuilderMeta> GetDatabaseReportBuilders(string user, string applicationName, int dataviewId, COEReportType? type, string category) { List<ReportBuilderMeta> reportbuildersMeta = new List<R...
1