query_id
string
corpus_id
string
query
string
code
string
label
int64
180ffca6e7cf53b06edbfa146983f5e0
f25bdf65faa34c64d1e4f5530d84bc3f
Package Name from appxmanifest.xml.
def __getPackageName(): if os.path.exists(MENIFEST_FILE): with open(MENIFEST_FILE, 'r') as mfile: for line in mfile: m = re.search('package=\".*\"', line) if m: oldStr = m.group(0) return oldStr[oldStr.find('\"') + 1:oldStr....
1
a73b22d0ccdad9b8acc952fec15914f1
70472f2578e3bd01bd625f203221f8be
Clicking anywhere on the game field pause/resume the game.
if (Greenfoot.mouseClicked(buttonPauseGame)) { buttonPauseGame.increaseSize(); buttonPauseGame.playClickSound(); Greenfoot.delay(5); Greenfoot.setWorld(new Paused(this)); } }
0
34451f455e3d9ba38580d8280946f72b
53bda1afd91b888efd147e61b8fa91fc
Solve loopy belief propagation
class RPS(object): def _solve_sbl(self): A = self.L.T self.N = np.zeros((self.M.shape[0], 3)) if self.foreground_ind is None: indices = range(self.M.shape[0]) else: indices = self.foreground_ind for index in indices: b = np.array([self.M[index,...
0
1b799518fd81f8b69ae07d4032035a22
90d94d622347c67cff8222c159571f89
控制桩点信息的文字是否显示
namespace EarthView namespace World namespace Spatial2D namespace Analyst public class RouteLayer : EarthView.World.Spatial2D.Analyst.NetworkAnalystLayer public virtual void SetShowTip_NoVirtual(bool show) { EarthView_World_Spatial2D_Analyst_CRouteLayer_setShowTip_void_ev_bool_NoVirtual(this.Native...
1
6741640ebdd81310d85bd496c1bf6836
a820d21fa2b43e2666fd86b8cf9f89bd
限制只刷新相同Tag的组,为空时不限制
if (Variable.getRelateTags().isEmpty()) { return; } List<RelateTag> tmpList = new ArrayList<>(); tmpList.addAll(Variable.getRelateTags()); Collections.sort(tmpList, new Comparator<RelateTag>() { @Override public int compare(RelateTag a, RelateTag b) { ...
0
ec59f616355eb037c0d67cbc7cdac55d
d41708de66c19821c94b69d35d20866a
Delete all documents from Solr.
class sfSolr public function removeAllDocuments() { $this->_solrInstance->deleteByQuery('*:*'); }
1
e79bf2590c60ec8d2960633ea8bba209
ded849545abb9d0bfa3e41113207b24d
Determine experience gains for a gang after a battle.
{ uint16_t expfact = rp_ptr->r_exp; PlayerRace pr(player_ptr); if (!pr.equals(PlayerRaceType::ANDROID)) { expfact += cp_ptr->c_exp; } auto is_race_gaining_additional_speed = pr.equals(PlayerRaceType::KLACKON) || pr.equals(PlayerRaceType::SPRITE); auto is_class_gaining_additional_speed = ...
0
f39e6a4ef59a782a3be3bbd0df8889dd
9dc2fb6b0c0d9835d89216e92a96d7ca
Check if QInt is zero
namespace SSVector3 static void mthd_zeroQ(SSInvokedMethod * scope_p, SSInstance ** result_pp) { if (result_pp) { *result_pp = SSBoolean::pool_new(scope_p->this_as<FVector>()->IsZero()); } }
0
ae408b48655e455b23c41a69b86b8ae9
51befe2d303d96668e821faf9f980baf
Returns the maximum packet size as specified by the remote end.
public class HttpServerOptions public int getMaxPacketSize() { return maxPacketSize; }
0
133f8b79dbe1c396dc6b0fdd82e7fbd3
898d5f285fc1c281d0cccc5c67d13255
Checks if column drop is allowed when the schema changes.
@Experimental public final class MigrationConfiguration public final MigrationConfiguration alterTableDropCascade(boolean newAlterTableDropCascade) { return new MigrationConfiguration( alterTableAddMultiple, alterTableDropMultiple, dropSchemaCascade, dropTableCasc...
0
36fd65ac4707d66003ea900089632573
98a46bbb929d82a17f91ed594f940d2f
This API is used to reset the password of a TencentDB account. Note: accounts with the same username but different hosts are different accounts.
namespace TencentCloud.Sqlserver.V20180328 public class SqlserverClient : AbstractClient{ public ResetAccountPasswordResponse ResetAccountPasswordSync(ResetAccountPasswordRequest req) { JsonResponseModel<ResetAccountPasswordResponse> rsp = null; try { v...
1
4e5e1eb42326dc8b3046eef8b698093a
d4382de2e5ee080e81f0f80ff1f6ba40
Generator for leave-one-out cross-validation
dataset_ori = LoadFile(p=p_dataset_ori) kf = model_selection.KFold(n_splits=proportion, shuffle=is_shuffle, random_state=32) for train_data_index, cv_data_index in kf.split(dataset_ori): train_data, cv_data = dataset_ori[train_data_index], dataset_ori[cv_data_index] yield train_data, cv_data
0
aed9cabbdb28ebdc8760ea69e4fa20ae
2c56862de7bbc0edf19de648a1e354ad
Metoda řekne zda byla hra vyhrána nebo ne
public class Board private boolean isEndGame(String[][] board) { if (board[0][0].equals("X") && board[0][1].equals("X") && board[0][2].equals("X")) { System.out.println("Good game! Player 1 wins!"); return true; } if ((board[0][0]).equals("O") && (board[0][1]).equals("O")...
1
dc7451b32373b036613470d228cb8f00
48beb0f84e25bdb97683297214652b9c
Push channel buffer context into container.
class ListMemory: def pushctx(self, ctx): self.ctx.append(ctx)
1
d4e8c8152279554dbe09dfc56aadeff9
1872f30802895822d567da571e746cd0
The waveOutGetVolume function retrieves the current volume level of the specified waveform-audio output device.
{ DIOC_REGISTERS reg; BOOL bResult; DWORD cb; reg.reg_EAX = 0x440d; reg.reg_EBX = volume; reg.reg_ECX = 0x0840; reg.reg_EDX = (DWORD)pParam; reg.reg_Flags = 1; bResult = DeviceIoControl( hVWin32Device, VWIN32_DIOC_DOS_IOCTL, &reg, sizeof( reg ), &reg, sizeof( reg ), &cb, 0 ); if...
0
7eab8f5f975b85f26bde6eaa3fe6cfe4
fc3ba15e709b72ce5dfd670dbd064fd5
Removes the ID3V2 tag from a file
namespace AudioGenie public static class AudioGenie2 public static bool ID3V2RemoveTagFromFile(string fileName) { return Convert.ToBoolean(ID3V2RemoveTagFromFileW(fileName)); }
1
d422df15f20d112b0552b4a1fa7c0d4b
be284aec7eddb6612b01008a63eaadab
Открытие каталога с изображениями
namespace CatalogPdf public partial class frmMain : Form private void открытьРасположениеToolStripMenuItem_Click(object sender, EventArgs e) { string path = Settings.Default.CurrentCatalogPath; if (Directory.Exists(path)) { Process.Start(path); ...
1
e519c8f6a1b89e9cfaaf4933bed2a441
b9c8ee8d46677092eae4221dceb0c2a3
郵便番号のエラーメッセージ テスト
{ string zipcode = obj.ToString(); if(!Regex.IsMatch(zipcode, @"(\d{3})-(\d{4})")) { return (@"正しい郵便番号形式で入力してください", 1); } else { return ("", 0); } }
1
27f8db09d5b7a8409acb5f0fc153ede3
9129dfe32c39229705d9d78284116645
Permanently deletes a vertex from the graph.
void deleteVertex(String v) throws RuntimeException;
1
21c71d8e8c00e5fdbe29aa1e7609bce0
839f355534f359fc90777c2632063eec
对 http://s.weibo.com/user/&work=%E7%BB%AB%E8%87%B4&page=2 的html响应做解析 返回搜索结果的uid 集合
u_list = [] data_soup = BeautifulSoup(html_data, 'html.parser', from_encoding='utf-8') sin_list = data_soup.find_all('a', onclick=re.compile(r"document(.+)")) for u in sin_list: u_list.append(u['href'].split('/')[-1]) return u_list
1
131a5e22ad1804727b3f15bed25db7e6
d3fe97c042bb4df69bd0d82b1854d668
Slices videos into N sections.
def video_clip_split(args): frames_out_path = "" if args.split_option == "equal": sLength = 5 in_path = '/mnt/data/raw_video_files' out_path = '/mnt/data/small_video_clips' indexed_movies_lst = [] for ind_name in os.listdir(out_path): indexed_movies_lst.append(ind_name) for fname in os.listdir(in_pa...
1
89eaa623f57b69dc2ba3f7d7398abe3b
9d47a038dd9f7aed508e923f3df3f9c0
Set up API list action tests.
super().setUp() if not self.model or not self.route_url: self.skipTest('self.model or self.route_url not implemented!') self.model_fields_related_models = { f.name: f.related_model for f in self.model._meta.fields if f.related_model } ...
1
2eeaca21808fef5aab78c204b1facdef
3dc0b726906cc80b8a3ada71e0cb3af5
Writes attributes of EnvelopeType complex type
public class XMLStreamBindings extends AbstractXMLStreamBindings public void writeCIContactTypeAttributes(XMLStreamWriter writer, CIContact bean) throws XMLStreamException { ns1Bindings.writeAbstractObjectTypeAttributes(writer, bean); }
0
278ff8bf51ae78d090ebc5bee54e5d54
8c6ab6262d9d796705efd662cc3fb289
get_all_named_actions gets the list of objects that show up in the current named policy.
func GetAllNamedRoles() []string { e := GetEnforcer() allNamedRoles := e.GetAllNamedRoles("g") return allNamedRoles }
0
a4de4f106b120eca61913904757211e7
95aad597a97eb3c82759e3e356659d14
* Fetch all steps with pagination
class StepController extends Controller public function index(): JsonResponse { $steps = Step::all(); return $this->successResponse(new StepResource($steps)); }
0
4cfb56e84250ff8783ae3543be1129b0
11a406a5e36592e402b542e1ab899faf
Метод, вызывающий анимацию движения кубиков
Cubic = Cube() for i in players: i.set_cub(Cubic.get_cube()) print('Игрок {0} выбросил {1}'.format(i.name_player(), i.get_cub()))
0
bcf447e889cb2249163c44f0efb6e425
5e9c399c9c50d8b92b3e73180dab9f3c
Calculates the ratio of our compressed file to our original file.
def calcCompessionRatio(uncompressedSize,compressedSize): return round((float(compressedSize) / uncompressedSize) * 100,1)
1
f8146f3502d05a97d66592a572d20627
2a271038185d8bb318ffc017f7872fad
! オイラー法(1次精度)
double newton_raphson(double ex, double ey, double ez, double ux, double uy, double uz, int i){ double l, lOld, temp; double dot1, dot2; int count=0; lOld = ux*ux + uy*uy + uz*uz; dot1 = ex*ux + ey*uy + ez*uz; dot2 = ux*ux + uy*uy + uz*uz; if(isnan(ux)==0 && isnan(uy)==0 && isnan(uz)==0){ while(fabs(l -...
0
8a034c9d2889d58af90cac78fc9079a3
eee69b49c9d9ead16034ee1858d71353
Use this data source to get information of an available OpenStack Magnum node group. ## Example Usage ```typescript import * as pulumi from "@pulumi/pulumi"; import * as openstack from "@pulumi/openstack"; const nodegroup1 = openstack.containerinfra.getNodeGroup({ }); ```
@javax.annotation.Generated( value = "by gRPC proto compiler (version 1.43.2)", comments = "Source: yandex/cloud/k8s/v1/node_group_service.proto") @io.grpc.stub.annotations.GrpcGenerated public final class NodeGroupServiceGrpc public static final class NodeGroupServiceStub extends io.grpc.stub.AbstractAsyncSt...
0
bf75d2ce871fc4d32b4d12fbde10c6c2
0ce9edb144402b3e4102b41ba4764611
================================================================= Gets the Bird velocity =================================================================
SDL_Point cBullet::getBulletVelocity() { return this->bulletVelocity; }
0
59c9afd2d8acdcd2917bc639f37280ff
da7cd81f67bdfe1f7cb58063bd5fcd05
个股公告(个股分析页面)
response = requests.get(url, headers = headers) response.encoding = 'utf-8' html = response.text h2 = re.findall(r'(<h2>.*?净值走势</h2>)', html)[0] h2Obj = BeautifulSoup(h2, 'lxml') print(h2Obj.text)
0
fc45f5b78f62457512f3cc948633c80f
d5ecbf899af0fb7dc0400ec8c9d04d05
Returns DOM Strings
function DOMExtract(domobj){ if ('innerText' in domobj) { return sent = domobj.innerText.split("\n").filter(function(n){ if(n.indexOf('.') !== -1 || n.indexOf('?') !== -1 || n.indexOf('!') !== -1 ) return n }); } else { return sent = domobj.innerHTML.replace(/<\/?[^>]+>/gi,"").split("\n").filter(functio...
0
3558c7b76957ab0f37cf106b6589df7e
89598f0446ad89a63293178cd82f5189
BCD码转换为字节
{ byte[] rcByte = new byte[val.Length]; for (int cntByte = 0; cntByte < val.Length; ++cntByte) { rcByte[cntByte] = BcdToBin(val[cntByte]); } return rcByte; }
1
c2a00372216bd6af1fea4ab62a89c1a5
534b5f10c0348f82a050088f665c4168
返回sys_ApplicationsTable实体类的ArrayList对象
Object listApplicationFlags();
0
ea7b6f4b9d39bbdce9efca29ddf5e92d
cdaa0b339cc84673c8abc4bb582977d5
Determines whether the given member maps to a column participating in an isnull condition. Useful to determine if a nullability constraint violation is going to cause roundtripping problems (e.g. if type is based on nullability of a 'non-nullable' property of a derived entity type)
{ foreach (var column in _domainMap.NonConditionMembers(_viewgenContext.Extent)) { var isColumnSimpleType = (column.EdmType as SimpleType) != null; if (!column.IsNullable && isColumnSimpleType) { var cFragment = AddNullC...
1
5d6ced1fa885be1b948ec6aa755e70c3
66d643aeba08033ef4b62c8a52e8f7cd
Convert Ncbi geneId to uniprot
class FetchDetails: def translateID(self, id, translate_from, translate_to): allowed_translations = ( 'P_ENTREZGENEID', 'ID', 'ACC+ID', 'P_REFSEQ_AC', 'REFSEQ_NT_ID', ) url = 'http://www.uniprot.org/mapping/' if translate_f...
1
35b5365feb839190a02a431be7c2e9ad
5170911a760671927c42c5dfaf9c1f8d
Create an instance of {@link TsResponse }
@XmlRegistry public class ObjectFactory public LTResponse createLTResponse() { return new LTResponse(); }
0
f2a3b15dc98910121f14f07d84018d6e
3fbdbb2c08ddb8fd49e0dc40bc1ee746
Convert pipeline output to component output for pipeline component.
class PipelineComponent(Generic[PackType]): def flush(self): pass
0
6c8f0c70fddfbcad108c950bec6e5b0a
6ec31591f074dfa52931140710464511
Remplis le tableau des arguments a partir de la commande. Renvoie le nombre d'éléments.
int parseCommand(char* cmd, int cur, char** array) { int arg_n = 1; char* arg; while (cur < strlen(cmd)) { switch (cmd[cur]) { case ' ': cur++; break; case '\"': { arg = new char[256]; int j = 0; ...
1
71cb49459628bbb8e284d0cc3b12cb14
66a1898963cdfda390a4f325120f9c78
Another test that the scraper correctly matches documents to the committee that published them
def test_parse_judgement_information_for_scraper(): actual = ScraperAZMaricopaJustice().parse_judgement_information(case_detail) expected = expected_result[2]['judgements'] assert actual == expected
0
c4f2cfbad3412b0214441872c0dce807
3fc534f0e98872d56d4753eb4ef81ef3
创建算符优先关系表
terminator = [i for i in self.terminator_set] if '\xce\xb5' in terminator: terminator.remove('\xce\xb5') terminator.append('#') table = [[''] * len(terminator) for _ in range(len(self.non_terminator_set))] for p in self.produce: for i in p.right: ...
0
8d7e723770d4ae0bf70b9ade5401d935
37ccb2c9e72a1e40e741d52a49ba4fd0
Returns the string representation of an object. For most objects, this will be the same as "ToString()", but for Crops, it will give the crop name.
def __repr__(self): return "{}({})".format(self.__class__.__name__, self.crop_name)
1
55780ca5a10d3621a02ad9f3bfccd945
c4fceacaa13739439815d8d20e64fd19
获取医生文章信息,并写入文件
articleNum = self.countArtical() f = open('text1.txt','w') f.write('[') for i in range(1,articleNum+1,2): article = self.getString() num1 = article.find('<h1') num2 = article.find('</h1>') s = article[num1:num2] re_h = re.compil...
1
05a4150c0f0ef1a4bd701c699a6b39b2
1e337e935906cafaf2dbeff601e6dd39
触发剧情,did剧情id(int), onComplete当剧情结束回调
{ GUIStory guiStory = GameManager.GetInstance().GetGUIManager().GetGUI(GUI_DEFINE.GUIID_STORY) as GUIStory; guiStory.Show(story_id, call_back); }
1
ccb478685346a236b44e37be1e2dd07a
0e2e4c6dddee941ce3d14c763629aebb
Returns the current value of the messagesProcessed" stat.
public class JMSResource extends EnterpriseResource public String getMessagesDeletedCurrentCount() { return messagesDeletedCurrentCount; }
0
623cd2d05c794ec485b5b5140a58a904
b5a21ee05383e197abf7267c8f8793eb
Set the heading to face east
def face_east(): while not_facing_east(): turn_left()
1
bf5c11b53ca5f598f458d039f6b11ddc
28e98a3234363e60840a5cf542c8e8f0
判断字符串属于哪种选择器
if (not comboSelector) then return end comboSelector = string.gsub(comboSelector, "%s*$", ""); local selector = string.match(comboSelector, "%s* ([^%s%+%~%>]-)$"); if (selector) then return selector, " ", string.gsub(comboSelector, "%s* [^%s%+%~%>]-$", "") end selector = string.match(comboSelector, ...
1
ec4241f12bd04eadfa3182f4af2245c1
0b1e35d700dffeeb4abae3c6a17dfb4d
search a sorted array of string that contains empty strings
int sparseSearch(vector<string> array, string target) { int start = 0, end = array.size() - 1; while (start <= end) { int mid = start + (end - start) / 2; if (array[mid] == "") { int tmp = mid; while (tmp > start && array[tmp] == "") { tmp--; ...
1
08818b6cf8bc96e5fc4ee964e13b3bb5
2401e4781b8fc5265a10d8f352bf3c9e
The chosen map implementation is a <code>TreeMap</code>.
@Activate public class WebxComponentsLoader extends ContextLoader implements Container public static <K, V> TreeMap<K, V> createTreeMap() { return new TreeMap<K, V>(); }
1
99659cbc2b8ba3dc9d47ed1dadb0ac9a
8a3c7efcf7a1db8b8ecec4497816bbdb
지정된 초 수를 더한 새로운 (UTC) System.DateTime을 반환합니다.
{ long ticks = (t.Ticks + (_increment.Ticks / 2) + 1) / _increment.Ticks; return new DateTime(ticks * _increment.Ticks); }
0
3c9fcc28eb1fbe92519a38e4f1590e1c
163869ed5d5680bf2090f5b92f8efc4f
移除攻击者
class FightersTable extends Table public function destroy($fighterAttacked) { $this->delete($fighterAttacked); }
0
a6d3c8b721730a1c86125b481eef4eb7
2673ab082e40f900841b4b66c9e96d0d
64-bit hashing function
{ h ^= h >> 16; h *= 0x85ebca6b; h ^= h >> 13; h *= 0xc2b2ae35; h ^= h >> 16; return h; }
0
6a8ac08bcc4fa4a29659299766265bbc
c097edd97b7b8f2fc281adfbcc88cd36
解析字符串,一组数据中用分号隔开,同一组数据中的每个元素用|隔开
String[] split = string.split("\\|"); List<String> list = new ArrayList<String>(); for (int i = 0; i < split.length; i++) { list.add(split[i]); } return list; }
0
cd6435a17ac8a3a5afc4925bdaf1ffc1
67896e01b2d6a6704e4766f841432ed8
查詢特定城市所有訂單
namespace Delivery.Managers List<Order> GetByCity(string city);
1
7bbb9618c8cdfd5c993552088a075ad4
7210807d3089e73bfa7f1336fb000cad
Gibt zurück, ob die Welt existiert
class BlockBoxFactory(Factory): def world_exists(self, world_id): return os.path.isdir("mapdata/worlds/%s/" % world_id)
1
21d309e3971f73b18a5919f1e8c1dc9c
39bc9707ee309b93396e3af6a0424eab
\brief This method turns the led on the button on
void button3_ISR_routine() { Ext_LED = LED_ON; }
1
c83c11341d329f4a658ad6ab6fbba03c
d657e3e7e1f4164c76c1b021862c0795
将传入的对象转换为Element形式返回(实际为DOMElement) 可以指定节点名称(主要用于处理字段时名称问�?)
Node node = (Node) this.document.createElement(nodeName); if(nodeValue!=null || !"".equals(nodeValue.trim())){ node.setTextContent(nodeValue); } return node; }
1
81b2e5c289d4ae8d687fadfd9fb6845f
4380d589b58d78f70ee62b46b2cb1816
target: test collection without vectors method: create collection only with int field expected: raise exception
class TestInsertInvalid(object): def test_insert_with_invalid_field_entity_value(self, connect, collection, get_field_vectors_value): tmp_entity = copy.deepcopy(default_entity) src_vector = tmp_entity[-1]["values"] src_vector[0][1] = get_field_vectors_value with pytest.raises(Exception):...
0
924e7ea941edd12394f2f7e7ce6cbf11
ca80700ffc8950bd0a3166980fe66f7f
=================================================================================================== compare two speBuf ===================================================================================================
bool spath_eq ( const SPATH * p1, const SPATH * p2 ) { if ( p1->npts == p2->npts ){ static int32 i; static bool ret; ret = TRUE; for ( i=0; i<p1->npts; i++ ){ if ( ! spoint_eq ( &p1->p[i], &p2->p[i]) ){ ret = FALSE; break; } } return ( r...
0
2b84a8f817895fea05f0a4a6c36bdede
8367faf41c708df5bd5c80d2394096fd
sets weights to random values and fills deltas with zeros to the same size as weight matrix
void nnet::initialize_weights(double sigma) { default_random_engine generator; normal_distribution<double> distribution(0,sigma); for (int k = 0; k < L; k++) { matrix A(d[k]+1,d[k+1]); for (int i = 0 ; i < d[k]+1; i++) { for (int j = 0; j < d[k+1]; j++) { A.mod(i,j,distribution(generator)); } } w[...
0
28e1d0ee4278c20314375318db48f2bd
d53ca36f265c53afe87ae914afeef844
r""" Return True if the number field that defines this element is not real. This does not imply that the element itself is definitely non-real, as in the example below.
self._validate_number() self._validate_real() if not math.isinf(self.val): return self.error('Expected <%s> to be <Inf>, but was not.' % self.val) return self
0
c335c17f7b40ad5a30bb85c2719c1e24
7c6c19292e26820315fc25c82f6d16a7
根据课程ID获取首页预览显示图片
@Service @Slf4j @EnableConfigurationProperties(CoursePublish.class) public class CourseService public CoursePic findCoursePicList(String courseId) { if (StringUtils.isEmpty(courseId)) { ExceptionCast.cast(CommonCode.INVALID_PARAM); } CoursePic coursePic = null; Optional<Cours...
1
ffceb36bc90d80d33083724bfa3fe53f
0b65ad80952b4fd3037db97c10e6378f
跳转至个人基本资料页面。
class EmployeeInformationPage(PrePage): def goto_personal_information_page(self): self.base_page.find(*self._edit).click() return PersonalInformationPage(self.base_page)
1
cf87b5614fe5420ac52252ff7e85fac6
e6b1b09a55d33e271937b9e6605c8968
获取茶青收购记录详情
@Service("ybxShangHuService") public class YbxShangHuService public PageData getDataOfJiFenZhuCe(PageData pd) throws Exception{ return (PageData) dao.findForObject("ybxShangHuMapper.getDataOfJiFenZhuCe", pd); }
0
04185d373d1d64b63b21c27a9aee34a2
f39b547f66e5c5d2e70ebb203838ab19
시작전 -> 진행중으로 갈 챌린지 id
@Service public class ChallengeServiceImpl implements ChallengeService @Override public int[] selectBefoToIng() { return challengeDAO.selectBefoToIng(); }
1
567d8c5643cf5703810d6742bc03f5dc
39d4bb84d8b1f643613e0fc7f08e582f
数牌であればtrue,字牌であればfalse
{ if ( Character.getType(c) == Character.LETTER_NUMBER ) return true; return false; }
0
1b06c768ad25c4799c3b1c1d331c2945
eace612ae9299ec646dbb427be26659c
選択されたアピールアイコンの情報を取得します。
$param = array(); $valueList = array(); foreach (AutoAffirmInfo::$mediaCompanyIdArray as $k=>$v) { $valueList[] = '?'; $param[] = $v; } $values = implode(', ', $valueList); $db =& $this->_core->getDB(); $sql = <<<SQL select TA.anken_id, TA.media_id, TA.api_key, TA.asp_anken_id, TA.result_id, TA.than...
0
71281bae235734544d70a088e8a988f0
16e2cae2f46176cd14b828fee11ca98e
A convenience method to get the previous height level according to the order in which they were declared.
int levelHeight() throws IllegalStateException;
0
26aee01835bb7e9106b9e94e73f9f13e
19cf96b8bf6446d8e88fd3b71f1cc90e
全フレームのスコアの合計を取得 単純にスコアを合計して返す (スペア、ストライク等の考慮なし)
public class Frame public int getSimpleScore() { return ball1 + ball2; }
1
072904309a826cdd43b70c319833319b
fe9bba60fb34219c47962f4aee2b4349
获取MediaRecorder实例
if (audioRecorder == null) { synchronized (AudioRecord.class) { if (audioRecorder == null) { audioRecorder = new AudioRecorder(); iAudioCallback = iAudio; } } } return audioRecorder; }
0
4343a3a9d7811547032d464b18d905a8
33b9e4de56f1fbdb20e75039b3e6ea50
Checks if the sharding spec is compatible with the provided tensor.
if not check_dimensions(self.output): return False if not check_valid_dtypes([self.input, self.output], supported_dtypes=[np.int8]): return False return True
0
ea8e22bbb0dad1895ee43a6fb169722e
7106360d11c64c7ae17d1d3b1ac5f791
拖动改变左右列宽度
cols = parent.treeFrame.cols; if("0"==cols.split(",")[0]){ cols = "190"+cols.substring(cols.indexOf(","),cols.length); $(div_left).style.display = "block"; }else{ cols = "0"+cols.substring(cols.indexOf(","),cols.length); $(div_left).style.display = "none"; } parent.treeFrame.cols = cols; }
0
2154b6e812ac9f5a9a1bb52f3ccefc48
60d4aedea7215c4e4eb6f70e69e9c18c
Método auxilar para tratar fechamento de escopos. Quando um END reduz o contador de escopos abertos e chega a zero (nenhum escopo aberto), esta função é chamada. Ela retira da pilha todas variáveis existentes do escopo atual, só parando ao chegar no caractere separador de escopos, depois também o remove.
ASSERT(cu->scopeDepth > -1, "upmost scope can`t exit!"); int localIdx = cu->localVarNum - 1; while (localIdx >= 0 && cu->localVars[localIdx].scopeDepth >= scopeDepth) { if (cu->localVars[localIdx].isUpvalue) { writeByte(cu, OPCODE_CLOSE_UPVALUE); } else { writeByte(cu, OPCODE_POP...
1
fc252896197d0480eb1f58b13572b72d
143cd0734aa284d44c282ab6b75bf49b
指定したカテゴリ属性番号に合致するカテゴリ属性を削除します。 <p> <dl> <ol> <li>トランザクションを開始します。</li> <li>カテゴリ属性テーブルから、引数で受け取ったカテゴリコードとカテゴリ属性番号を持つデータをすべて削除します。</li> <li>指定したカテゴリ属性番号に合致するカテゴリ属性値を削除します。</li> <li>カテゴリ属性値テーブルから、引数で受け取ったカテゴリコードとカテゴリ属性番号を持つデータをすべて削除します。</li> <li>トランザクションを終了します。</li> </dd> </dl> </p> <p> <dl> <dd>categoryCodeがnullでないこと。</dd...
void delete(Long customerAttributeNo, Long customerAttributeChoicesNo);
0
2ea2be32d6ec64c3d42bca21fa25e7d1
4d0e21ee49dac79c31c397cce10de788
Verify passwords cannot be changed when new password matches old password
target = base_function.BasePage(self.driver) BP = booking_functions.Booking(self.driver) BP.Navigate_workoutscreen() self.driver.back() assert self.driver.find_element_by_css_selector('#settingsForm > p:nth-child(14)').text == 'Change Password' target.password_field().sen...
0
863c0c9cba6d862438f23e2c676de748
a9df4a49272d1accca7ee796df5c7abe
Rekurzív segéd metódus az odds tömb kiszámításához a GetOdds() függvényen belül.
{ int num = SelectedCount - 1; if (num > 19) { num = 19; } else if (num < 0) { num = 0; } oddsRatio.Value = GameData.Shared.Type.Value == GameType.Omaha ? OmahaOddsNums[num] : NormalOddsNums[num]; }
0
58e3ecc7fdf248b3201ce8f4522b6a42
317eaa1aba6ecf6e638a2ce3e8f5bd13
清空图片文件夹
class HtmlController extends BaseController private function folderClear() { $dir = public_path('customers/' . $this->customer . '/cache_images/'); if (is_dir($dir)) { $opendir = opendir($dir); while ($file = readdir($opendir)) { if ($file != "." && $file != "...
1
201b4114b3a5f9fbd51a0bcdfe0ff6e3
825825e945076add283d4ee03ced9383
Intercept the server request and check for URL prefix.
{ if(context.Request.Url.AbsolutePath.Equals(ClientReversePrefix)) { ReversePxClient(context); context.ApplicationInstance.CompleteRequest(); return true; } return false; }
1
9bcd2f83f8b0c5ea7fc409a5c4082c03
3fdf5200640f4107f3689e3cce3022f3
Saves the commands history to use it in the future sessions
class MainFrame(wx.Frame): def save_history(self): history_config = wx.FileConfig() self.GetMenuBar().file_history.Save(history_config) with open(ivonet.HISTORY_FILE, "wb") as fo: history_config.Save(fo)
1
0d8040e77a3d6161385d220fff827183
b5c6e95884a585044b0ba093f9084a16
Deletes the walls between.
public class Maze public void DestroyWall(Cell firstCell, Cell secondCell) { if (firstCell.Id == ((secondCell.Id) - Width)) { firstCell.SouthWall = false; secondCell.NorthWall = false; } else if (firstCell.Id == ((secondCell.Id) + Width)) { ...
1
6c7911b8e0b01c87341b18e09e31f3ad
3abe95b36a0b73a56dc5a35c474d7dfc
Retourne Vrai ssi il existe une mise en sachets possible, i.e. si l’instance du pb est positive.
public boolean isPositiveInstance();
1
fdc0d6f5ab0a70bf7a43a314baafb1f6
351a44c24041b80dd06f1ebf6de25502
Converts `self` to its inner value as `W`, truncating on too large or small of a value. # Examples This has the same exact behavior as an [`as` cast](https://doc.rust-lang.org/stable/reference/expressions/operator-expr.html#type-cast-expressions) between integer primitives in Rust: ``` # rosy::vm::init().unwrap(); #...
let l: u64 = self.0[0].into(); let u: u64 = self.0[1].into(); (u << 32) | l }
0
220b597bd9d2ed3b1e836969f3a6ff7e
6457e5aed2b461da73c81fb88c60d65d
Getter method for vendor_ref, mapped from YANG variable /ped_catalog/peds/targets/vendor_ref (string) YANG Description: Vendor part of the reference
class yc_netslice_vld_nst__nst_netslice_vld(PybindBase): def _get_vendor(self): return self.__vendor
0
dc429d80233c78bba4d2108630ddd10d
2e69c80d40bc5535d4475c3b2f8d765c
TEST: testing update date and time changing, when comment has been changed
old = self.user.updated_at self.user.save() self.assertLess(old, self.user.updated_at) with open("file.json", "r") as f: self.assertIn("User." + self.user.id, f.read())
1
6664ce425445f2740a577a0b725ad329
5ce7f32754e88004a8482da0fbd219cb
初始化全部病人信息,从数据库中读取相关信息
{ dataBindNational(); dataSectioninfo(); dataSickareainfo(); DataBindNationlity(); dataBingProvince(); dataBindMarred(); dataBingNativePlaceS(); dataBingNowAddressS(); dataBindRelation(); data...
1
29e4ac050cc1de4a6367cbd009aaa82c
8d575ebe30d3b3176d1e7fb838061aa2
Post请求,返回JSONArray
public class HttpUtils public static JSONArray httpPostWithResponseJSONArray(String url, List<NameValuePair> paramList, Header[] headers) throws Exception { String responseStr = httpPostWithResponseString(url, paramList, headers); return JSONArray.parseArray(responseStr); }
1
327b90c597d5355b7f6b04afd951f9eb
b582626232d3bc6d979bc5db57604fd0
获取GameObject上的所有组件
namespace GameSystem.GameCore public sealed class GameObject : GameSource public Component[] GetComponents<T>() where T : Component { return container.GetComponents<T>(); }
1
7d69693dc7fc53f9fa861253eba4a118
f3b6e166f0130a9362975575887c95ac
function for adding up distances of points between two grids
def grid_point_dists(grid_x, grid_y, ob_x, ob_y): return N.hypot(grid_x[...,N.newaxis] - ob_x[N.newaxis,N.newaxis,...], grid_y[...,N.newaxis] - ob_y[N.newaxis,N.newaxis,...])
0
43b1710ae5f715a21abaadc1ed504ccb
3d1eaace22471f408391b298753fd5bd
Check if <income> has a value
public class ItemCategory extends AbstractCategory<ItemCategory> public boolean isIncome() { return getNetItemAmount().doubleValue() >= 0; }
0
d12896530bcc83e39b759dfdb412d6ce
a3644c0af992e9a9eba643e790b2485b
Checa si el pt del Lambda b esta en el rango requerido, sí = 1, no = 0.
TLorentzVector pB( B.momentum().Px(), B.momentum().Py(), B.momentum().Pz(), B.momentum().E() ); TLorentzVector pLambda( Lambda.momentum().Px(), Lambda.momentum().Py(), Lambda.momentum().Pz(), Lambda.momentum().E() ); TLorentzVector xLambda( rLambda.x(), rLambda.y(), rLambda.z(), sqrt(rLambda.Mag2()) / ( Lambda....
0
d09542d6a507ac5912e16f4f0d787122
3d1f64b8fc35af7362c76ca6fa8a5870
Look for a specific record in the DNS records of a specific domain.
{ $this->_connect(); $zonedata = array(); $query = 'SELECT d.id AS domain_id, r.id AS id, d.name AS domain, ' . 'r.name AS name, r.type AS type, r.content AS content, ' . 'r.ttl AS ttl, r.prio AS prio FROM ' . $this->_params['domains_table'...
1
69c39ef2b44fccf8871d38c19bed8cf3
d1b4b40cab0eb510d493ed2bb141fcc2
Parses the Any/All portion of the query
log.Debugf("Parsing %#v", selector) tokens, err := tokenizer.Tokenize(selector) if err != nil { return } if tokens[0].Kind == tokenizer.TokEOF { return &selectorRoot{root: &AllNode{}}, nil } log.Debugf("Tokens %v", tokens) node, remTokens, err := parseOrExpression(tokens) if err != nil { return } if le...
1
51cffe1804351e3e2e4dae2d27250964
303ad6f4851128b7d6faba11d7a95885
! Przekazuje informacje do pamięci współdzielonej
{ ifstream myfile ("zmienne.txt"); if (!myfile.is_open()) { ofstream myfile; myfile.open ("zmienne.txt"); myfile << x << " " << n; myfile.close(); } }
0
186c653b30c02af6b0d1f31321fc122a
ce944dcb04ee299ca4dc21885bb16f12
Test method for {@link edu.depaul.se.account.IAccountManager#getAllAccounts()}.
public void testFindAllAccount ( ) throws Exception { List<Account> account = accountDao.findAllAccount( ); for ( Account act : account ) { System.out.println( act ); } }
0
7a221893fdfd8d0168d1e6976f7c1c0e
102ea1c2af443042a06ffe694a29d407
Adds a new method to the class, with the given name and method signature.
symtable_add_method(Symtable *symtable, char *name, int type, int argcount) { assert(symtable != NULL); symtable_add_symbol(symtable, symbol_create_method(name, type, argcount)); }
1
1eaab76b0add9a87fb6becf12585f6b0
4ea22a6bf1f45ee9a8e859c34ea29a3e
Clear all the labels on the QRZ display panel.
namespace Zoll_2015 public class Zoll_2015 : System.Windows.Forms.Form private void ClearLabels(bool ClearSerialNum) { int i; MaxChan = 8; for (i=0; i < MaxChan; ++i) { if (ClearSerialNum) { lblSerialNum[i].Text = " "; txtPackSerNum[i].Text = ""; TestChannel[i] = false; } ...
1
e65bcdc699d41a69c07cc889f89f4143
2b56794a7c170a8ef0228adb7bf2dde5
Marks a B2BUserGroup as inactive
impl Usergroups pub async fn disable(&self) -> Result<crate::types::UsergroupsCreateSchema> { let url = "/usergroups.disable".to_string(); self.client.post(&url, None).await }
1
606216b69f179133495c8aafb4082366
421dcdf5e3816e2fd190c1167999dd0e
TestGetUsersJSON verifies that /api/users returns proper JSON output
namespace GymTracker.Web.Tests.Controllers [TestClass] public class UserControllerTests [TestMethod] public async Task Check_All_Clients_Returns_Valid_Json() { IEnumerable<UserDto> employees = new List<UserDto>() { new UserDto { Id = 1, Forename = "Nick", ...
1
6a8275e9ab81167644b4457b5ba30da1
160db3466ed44e08efb929e326fde8c4
将两个tcp数据串起来,两个tcpstream数据之间相互转发数据
func proxyTCP(in, out *net.TCPConn) { var wg sync.WaitGroup wg.Add(2) glog.Infof("Creating proxy between %v <-> %v <-> %v <-> %v", in.RemoteAddr(), in.LocalAddr(), out.LocalAddr(), out.RemoteAddr()) go copyBytes(in, out, &wg) go copyBytes(out, in, &wg) wg.Wait() in.Close() out.Close() }
1
c77de6b78d30a21539bfde1a78f6cd2e
716f6532592d09c0b1d53ecd3c57dca0
Returns the training algorithm that is used by fann_train_on_data and associated functions
namespace Neural [Serializable] public class Neuron public NeuronTraining GetTrainer() { return training; }
0