query_id
string
corpus_id
string
query
string
code
string
label
int64
0fba7175f33375b2e176434896d598f7
d1fb4eff7ce1204c4ead162b139565d6
confirm the cell's text is '.' if the cell is not alive
public class GameOfLife static boolean updateCell(boolean matrix[][], int row, int col) { if (matrix[row][col] == true) return(false); else return(true); }
0
9b8ffcdb7a6caad40908d950e771f8fb
b41b51056a726e79f91bffaf54d259ad
打乱从题库中挑选题目的顺序
console.log('%cshuffleArrayOrder', "color:red;font-family:system-ui;font-size:1rem;-webkit-text-stroke: 1px black;font-weight:bold") let question_note_name_array = this.state.question_note_name_array let question_array = [] $.when() .then(() => { for (var item...
1
964cdfb0a319f6676b0802a4bb03b4e4
8ed84a85fde8053f8b1d7a31631429fd
复写该类的保存方法save(),让每次数据存储时都能更新修改时间
try: if self.modified_fields(): self.update_time = datetime.datetime.now() self.save() return self except Exception, e: current_app.logger.error(e)
1
6d838c52ca8a14e8c45babb12aaa1f1c
bfb84d13f6771cf967bd88f049e17ff4
Map wordpiece token labels to word labels.
class CUT: def label2word(self, labels, sent): labellist = [] tmp = [] for index in range(len(labels)): word = sent[index] tag = labels[index] if tag == 'S': if tmp: labellist.append(tmp) tmp = [word] ...
1
8e83747660ad53d3b0e7750850c0b91e
de36d397dfb81203b69e5c73d06abab3
A setter to set if a vehicle has entered today.
class ImportWorkshift extends MY_Controller public function setMarkToday($markToday) { $this->markToday = $markToday; }
0
b169c94b5231d7dccdc385b539227cde
fa608b8f5773715ec07c5280415b9fc5
stampo il logo del gioco
System.out.print(" ___ _ _ \n"); System.out.print(" / | | | | | \n"); System.out.print(" ___ _ __ __ _ / /| | ___ | | __ _ ___ | | __ \n"); System.out.print("/ __|| '_ \\ / _` |/ /_| |/ __|| | / _` | / __|| |/ / \n"); Syst...
1
8d47fce83100798c435e3adea13f1a0c
0ff7b891cacefd330260f1e42b030735
Getter method for property <tt>regType</tt>.
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CompanyBaseData", propOrder = { "mainAddress", "companyRegistrationData", "companyDetailData", "companyHistoryItems", "registryType", "activityStatus", "activityStatusOriginal", "legalFormType", "legalFormTypeOriginal", "lega...
0
d665fde1b792bf02f553a634c8553ae4
c3f6c8e3c3ce15f831d29ff76d04646a
入力された文字列から接続先番組を取得する
public static BroadcastType get(String selected, String recChName, String chCode) { if ( "EpgDataCap_Bon".equals(selected) || "TVTest".equals(selected) ) { if ( chCode != null ) { String chid = ContentIdEDCB.getChId(chCode); if ( chid != null ) { if ( chid.startsWith("0004") ) { return BS; ...
0
3dbf23d8888455316bddf455d7e2996b
cb73fe6a230733e81338693e83420edc
El siguiente método recibe un Id de Artista y devuelve un arreglo con todos los calendarios que tiene el artista
public function getAlbumsInfo (string $artist_id);
0
3ac170ba51812b6d218ee34f81cbc5f8
9e55e42c8c8651c23232f70d83867a8e
The tab bar delegate is informed of tab bar events, like selecting a tab.
namespace Ancho namespace PageAction HRESULT Proxy::onTabNavigate(INT aTabId) { if (mPageActionToolbar) { return mPageActionToolbar->onTabNavigate(aTabId); } return S_FALSE; }
1
f1f36f90bfe5a9f900bbe88b364b81c6
8fc731bc633f927e08aef28545509db4
将商品默认添加到投放区域,并关联所有小区
class GoodsStockPileAction extends GoodsCommAction{ public function goodsToArea($giftCode){ $mgsStockPileModel = D('MgsStockPile'); $xiaoquList = $mgsStockPileModel->AddGoodsArea(); print_r($xiaoquList); $i = 0; for($i=0; $i<count($xiaoquList); $i++){ echo $xiaoquList[$i]['scode'] .'--'. $xiaoquList[$i]['s...
1
42e355f15e87a98aaad33e82908f38d0
58df9fc51a058cf6e55cfed8eaee8935
Creates a client cert and key for testing.
func newTestKeyPair(serial int64, org, dnsName string) (string, string) { privateKey, err := rsa.GenerateKey(rand.Reader, 2048) if err != nil { panic(err) } certTemplate := x509.Certificate{ SerialNumber: big.NewInt(serial), Subject: pkix.Name{Organization: []string{org}}, DNSNames: []string{dnsNam...
1
04e6a21139c67d22de20a1455a9f01c9
2132b62b89a4ac765147b9b2a6513d49
returns quotient of 2 passed Fraction objects.
Fraction quotFrac; quotFrac.denominator = fractionB.denominator*fractionA.numerator; quotFrac.numerator = fractionA.denominator*fractionB.numerator; reduceFraction(&quotFrac); return quotFrac; }
1
efc0aeee13ecdf09c29aff67b98f8e80
f15b2eefdbc4d9c0a935bf594faa84ee
Add new project into projects list
def addProject(request): c_project = ProjectControllerClass() id = c_project.addProject(request) return JsonResponse(id, safe=False)
1
219d1278456790e531966550ccecf1fa
4c65e65c4889d1c2cf4caf345d303b9a
Returns the result of interpreting the object as an instance of '<em>Relation3</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
public class ErSwitch<T> extends Switch<T> public T caseRelationshipConcept(RelationshipConcept object) { return null; }
1
a728bfef7bbba5fbf4f68c04932594eb
3a8290187eef323e8a0d50a6d5443492
Возвращает элемент по ключу, если он существует. Иначе возвращает элемент, который подходит для вставки нового элемента с указанным ключом.
class HashTable T& operator[](const Key& key) { Item* item = std::get<1>(GetItem(key)); if (item == nullptr) { Insert(key, 0); return (std::get<1>(GetItem(key)))->value; } return item->value; }
1
ff6bdaa6b53ed98664653f35d800c78c
b820bd2a05914980c8f594e6daf66ced
Returns a JSON object containing the freesound API response given an endpoint and paramenters.
class Ludopedia: def get_endpoint(self, endpoint, **kwargs): url = self._mount_url(endpoint, **kwargs) response = self._request_json(url) return response
1
3bdea1a24cf99298bea3d27ff12dbdea
c4c5d8122c25dd2b057a20223f8f9dac
Deletes all rows from the es_cities table.
{ if (null === $con) { $con = Propel::getServiceContainer()->getWriteConnection(EsCitiesTableMap::DATABASE_NAME); } return $con->transaction(function () use ($con) { $affectedRows = 0; $affectedRows += parent::doDeleteAll($con); EsCitiesTableM...
1
e342db41f5f35af0efb25632acad9eba
e540dcd26c3e57a895244b6e674533b4
Get a rollup job from the cluster. See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-put-job.html"> the docs</a> for more.
namespace Nest DeleteRollupJobResponse DeleteRollupJob(Id id, Func<DeleteRollupJobDescriptor, IDeleteRollupJobRequest> selector = null);
0
fac8bc879c8a68d68c69e8823afd9674
6d4113f0948d30ea72b1bcf84a990f78
Goes back to LoginActivity
public class LoginActivity extends AppCompatActivity public void cancelLogin(View v){ finish(); }
0
d0d9d3ee56e49ba3f3bb3ee2d23137cd
fb6dcf45d7f967949f3749469da5aa3e
Creates MoveIt List
var li = document.createElement("li"); var inputValue = document.getElementById("movementInput").value; var t = document.createTextNode(inputValue); li.appendChild(t); if (inputValue === "") { alert("You must write something!"); } else { document.getElementById("moveUL").appendChild(li); } docum...
1
f9e37182531f1565b959db5e02091350
3b44a3b2b8215d5c80a7844301e03192
Returns the URL from where to download the file or None if it can't find the URL.
class LazyFile(object): def loc(self): if self._loc is None: self.download() return self._loc
0
8485d88b3e7d374a9df5fde6c96ee01b
55b8006e4960c92ac0be9b441a2dc1e7
Black-Scholes-Merton Option price
def black_scholes(r, sigma, S, K, T): x = (np.log(S / K) + (r + sigma ** 2 / 2) * T) / (sigma * np.sqrt(T)) return S * norm.cdf(x) - K * np.exp(-r * T) * norm.cdf(x - sigma * np.sqrt(T))
1
cc1b58053e33542a147c218de913e91d
35bbeef68e758cd50a470cfb42ea3c42
This method is used to calculate the number of pauses made indicated by chat symbol (.)
{ int count = 0; int i = 0; do { if ((sentence[i+1] == ' ' && (sentence[i] != '.') && (sentence[i] != ' ')) || (sentence[i+1] == '.' && (sentence[i] != '.') && (sentence[i] != ' '))) { count++; } i++; } while (sentence[i] != '.' && sentence[i+1] != '\0' ); return count; }
0
b8f3ebbc7d09fa7f80b75ea4bbd5b08e
20dfb97fc1f2cf2e2ad5acf16495cc48
Проверяет возможность отправки с использованием указанной метки.
{ return this.configuration.SenderConfigurations.Any(pc => pc.Label.Equals(label) || (pc.Alias != null && pc.Alias.Equals(label.Name))); }
1
47a497b854e7e1881e69b61900bcdf63
9b60b743abe20f8b634381c40cbed159
Sends a message to the Server with the user's username when they logoff
public class ClientService public void logoutRequest(String username){ protocol.sendLogout(username); }
1
33439bf9bde7540e56d4b85f97049ad1
00888335c9c396ec4be60fb425a8cff6
Formats a content size to be in the form of bytes, kilobytes, megabytes, etc
$from = array( 'bytes' => function ($value) { return $value; }, 'kb' => function ($value) { return $value * 1024; }, 'mb' => function ($value) { return $value * 1024 * 1024; } ); foreach ($from as $match => $formula) { if (stripos($formatted_...
0
2b0ed0928d2838ccd4cf409c934c6935
7fff1ed291f9f74dc311a3c3358a6ca7
对所有敌人进行射击,将被击中的敌人指向为空,返回一个撞毁的敌人
ArrayList<EnemyEntity> spawnBullet();
0
69235a3941bfddff168b8c8fe7098f27
06280ff486348328adbd2dad44c9afa9
Returns all employees by department id sorted with specific sort.
@Path(AlisaURI.GET_EMPLOYEES) public Response getEmployees(@FormParam("id") final String id) { LOG.debug("department id: " + id); try { Integer depId = Integer.valueOf(id); List<Employee> list = dbService.getEmployeesByDepartment(depId); StringBuilder sb = new...
0
b1e679f1a1892414d0d921c5f24ba496
a9e3f502ff87831f89bb2be52a546ca5
Débloque le compte actuel si la clée est bonne
{ if( !empty($this->id) ) { if( empty($this->actkey) ) $this->set_error('ERR_ACTKEY_FIELD_EMPTY'); } else $this->set_error('ERR_ID_FIELD_EMPTY'); if( !$this->has_error() ) { $sql = 'SELECT * FROM mwl_users WHERE id_user = '.$this->id; if( $req = $this->mysqli->my_query($sql) ) { if( ...
1
6585dc1f7ee65096ffa170ef34bdde0d
0ec9d7f3ba4ef39588a5f8c80558865a
returns true if any bulbs are on, false otherwise
class Adafruit_TrellisSet(object): def readSwitches(self): return any(map(lambda matrix: matrix.readSwitches(), self._matrices))
0
112d82d07c048be2b60b1074b1e7b13d
43e4f6754cc5b6e486e8371150732233
LexRankで文章を要約する.
class SentenceRank(Summarizer): def __init__(self, compression_rate:float = 0.65, lang:str = 'th'): super().__init__(compression_rate=compression_rate, lang=lang)
0
74fa6ddac0c5a8e3c518f98445276345
56dfb20e86a4a838855c8d6d0bbb44b0
续费Ckafka实例, 目前只支持国内站包年包月实例续费
class ClsClient(AbstractClient): def ModifyKafkaRecharge(self, request): try: params = request._serialize() headers = request.headers body = self.call("ModifyKafkaRecharge", params, headers=headers) response = json.loads(body) model = models.ModifyKafk...
1
3ec6037c2cd62738e7fbbfe26d53e141
825352d6f6877fb4a3d8f06dad4b3a5e
31、买家逾期未付款,系统自动违约,通知卖家
$Order = new Order(); $Trade = new Trade(); $User = new User(); $UserCoin = new UserCoin(); $UserMessage = new UserMessage(); $done_time = Db::name('config') -> where('key','LAST_DONE_TIME') -> value('value'); $set_time = $done_time*60*60; $time...
0
9b6269c22ed6ad8dbed5929ba4355db2
5a5e9069f107487c06bdab891add9391
Determine a world space position where the person is looking.
public abstract class CameraController : MonoBehaviour public abstract Vector3 GetWorldLookPosition();
1
c58074687c64333e49acf1ff63bd7a20
fda7f648347fe3e96638c319566a87f2
Get 是否自动使用代金券。1(是),0(否),默认不使用。
public class DescribePurchaseStateInfoResponse extends AbstractModel{ public Long getAutomaticRenewal() { return this.AutomaticRenewal; }
0
0377e079db3a03622ec5c9008dd3f8ec
7aadd32af5a373082ffc3bb0eeab0cd7
Sets up the GUI and the DukeBot functionality.
public class Nim_GUI extends ARepl implements ActionListener{ @Override public void Setup() { pilesAndPebbles(); nim_gui.setTitle("Nim GUI"); nim_gui.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); nim_gui.setSize(FRAME_WIDTH, FRAME_HEIGHT); nim_gui.setLocationRelativeTo(null); nim_g...
1
e89d9c6fbf71400621ea0765c2d280d5
6504b9d826621599df4ab4ac459750f8
Пересчет статистики по всем пользователям контекста
class ActionPeople extends Action protected function GetStats() { $aStat=$this->User_GetStatUsers(); $this->Viewer_Assign('aStat', $aStat); }
1
a69ccb7d04e1ab1c40d5a568b311353c
36514ebd7520f2272d7a3f6eccad3a95
CopyTexSubImage1D(target, level, offset, x, y, width)
namespace OpenTK.Graphics.OpenGLES1 public static unsafe partial class GL public static void TexSubImage2D(TextureTarget target, int level, int xoffset, int yoffset, int width, int height, PixelFormat format, PixelType type, void* pixels) => GLPointers._TexSubImage2D_fnptr((uint)target, level, xoffset, yoffset, wid...
0
33ab7b5f89c54ac0a16e30dfbab58fcd
4808a48cab847e76c6a0f13afb68d04b
Compute the correlation between 2 RSMs (2nd order correlations)
class rho(corr): def __init__(self, m1, m2): self.name = rho_name(m1, m2) corr.__init__(self, m1, m2)
0
45981da5a9e385b416fb2e1c1c566683
82b04122a620181b40baabf369f6f072
继承HttpAgent初始化方法
self.activeweb = ActiveWeb() self.loginpage = LoginPage() url = "%s/nereus/agent/v/#/login" % WEB_URL_TITLE self.activeweb.getUrl(url) pass
0
148b702a231c878c3421675a366b385a
408803cbff962a0304364b4813cf972a
Callback for highlight event.
namespace LogExpert public partial class LogWindow : DockContent, ILogPaintContext, ILogView private void highlightThread_HighlightDoneEvent(object sender, HighlightEventArgs e) { this.BeginInvoke(new HighlightEventFx(HighlightDoneEventWorker), new object[] {e}); }
1
fb2e449587eb4848b7da399c0a8fbb43
fa24155b29f15a8263eb70d72dde8feb
Configuration for all physical data sources used by the relay.
pressureProbes=dict(), humidityProbes=dict(), name=None): self.pressureProbes = pressureProbes self.temperatureProbes = temperatureProbes self.humidityProbes = humidityProbes self.name = name
1
13e28c26e702948f747b182be96cde38
50d72b6d58824aace17714102a4b05af
Returns the request for the existing Firewall resource.
namespace Pulumi.GoogleNative.Compute.Beta public static class GetFirewall public static Output<GetFirewallResult> Invoke(GetFirewallInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke<GetFirewallResult>("google-native:compute/beta:getFirewall", args ?? new GetFi...
1
c2e5f3221700480eab6dc9d51c350731
bba40f2ccb95b7ce28c3cd146cc67058
Test __init__ that has invalid count
class TestExtensionName(TestCase): def test_init_with_invalid(self): self._test_init(0)
1
6cf0ac3e15eec3321f2ab0852dae9527
d86c5f64fdd414926a920c15f09061d2
创建HDFS的java客户端对象
public class HdfsDemo @Before public void init()throws Exception{ Configuration conf = new Configuration(); URI uri = new URI("hdfs://192.168.37.100:9000"); fs = FileSystem.get(uri, conf,"root"); }
1
be8e9dad146785890a33425d15992743
2aa6f8068829ed017f15b1e3a59b7243
Функция, вызываемая для получения зашифрованного сообщения.
class AnswerAdmin(admin.ModelAdmin): def _decrypted(self, obj): return decrypt(obj.body, settings.TEXT_SECRET_CODE)
0
97f07c61e40c94192533a04174cb15f3
a0f6a7b6469b631f2a8ea19ccfdc4dc1
汇总借据在计息表中的所有利息金额
BigDecimal getInterestSum(Integer userId);
1
1cc93b0b6833361872242576e3363fbe
37f5f177d0086e9ea601362b05a8f829
Returns the params to be used in the invoke given a card number.
{ $nonce = self::generateNonce(16); $time = time(); $params = array( MasterCardSignatureInterceptor::OAUTH_CONSUMER_KEY => $config->consumerKey, MasterCardSignatureInterceptor::OAUTH_SIGNATURE_METHOD => MasterCardSignatureInterceptor::signatureMethod, MasterCardSignatureInterceptor::OAUTH_NONCE ...
0
9e2a5d22bc0f8ba632fa0d7ac6334296
6f89296335435f02684e3d7d0c2cb6c1
Returns the hop distance to the coordinator This function may not be synchronized. Otherwise, a deadlock can occur.
public class NeighborDiscoveryData extends ReceivedDataMap public int getHopDistance() { return hopDistance; }
1
de59c4704f3b67e5303f387cc4b3eb50
4aec591ff5f45dcbc37f78af4622d27b
Sets name of the record element of the XML document. This will be used to determine offset of the first record of a bundle created from the XML document. This is a required parameter.
public class XMLData public void setRootElementName(String rootElementName) { this.rootElementName = rootElementName; }
1
f10c5383b0d327b99ada8e51ab4b42a0
e007998678914f1fec12ec6fbf6e9056
Check if the connection does not already exists and if it does not, add it to the list of connections. Otherwise report a warning and do nothing.
if (connections[ip]) { return; } const ws = new WebSocket(ip); connections[ip] = ws; ws.on('error', function (error) { if (this.url && connections[this.url]) { connections[this.url].close(); delete connections[this.url]; } }); ws.on('close', function (error) { if (this.url && c...
1
9c1ac1bcfa972be4ea41423a4ee8ec14
59e68e55aa3c6bfb78e5feb2d7ec7dd2
Bans a specified tag
class Ban(commands.Cog): async def ban(self, ctx, target:discord.Member, *, banReason:str="none"): await ctx.guild.ban(user=target, reason=banReason) await ctx.send('{0} has been banned from {1} with the reason of: {2}.'.format(target, ctx.guild.name, banReason))
0
ec4ea235c220083d5834de57174d7d9b
3dabf29292c2040da65e8db10b363aee
将crf_test命令预测出的文件中匹配到的实体提取返回
public class CRFModelGenerator void getEntitiesFromFile (String corpusDir, String pipeDir){ File[] corpusFiles = new File(corpusDir).listFiles(); for(File corpusFile : corpusFiles) { List<String> pipeDelimitedLines = null; String corpuslines = null; try { corpuslines = FileUtils.readFileToString(corpu...
0
8a54111f1b7a39b0159c46ba59d484f2
f6a0a48808f6d52e734f5198ee2128fc
Reconstruct one or more hosts from the local inventory
import psutil import socket retval = {} my_addresses = {} my_interfaces = psutil.net_if_addrs() for interface in my_interfaces: for nic in my_interfaces[interface]: if nic.family in [socket.AF_INET, socket.AF_INET6]: my_addr...
1
b49049c5b783c799eb085904be54911f
055b3a9e87819817e6e319d327889f12
Calculates x distance for the drawing methods
namespace Diagram_Generator public class CoordinateManager : ListManager<Coordinate> public float GetXIntervalAsPoints(float drawingAreaX, int offSetX, int intervalX) { CalculateXCoordinatesAsPoints(drawingAreaX, offSetX); return intervalX * scalingfactorX; }
1
20568b79ddaadae4c881c8a71ed31d31
7271d99b341b5ed056101f80dc81948b
Handle material creation.
{ Schema::create('materials', function (Blueprint $table) { $table->increments('id'); $table->timestamps(); $table->string('name'); $table->string('damage_category')->default(''); $table->string('surface_category')->default(''); $table-...
1
f48ebb5c72addef3199417ffa647aac4
fed01820918b85fea6d037f806612a30
This adds a property descriptor for the Mip Cuts GUB Covers feature. <!-- begin-user-doc --> <!-- end-user-doc -->
{ itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MDEntity_generateController_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MDEntity_gener...
0
de3ac961125d38a31836aa3e3b69c07a
59a660e98fb3cc0d0412de4d557b0c69
Initialize the data structure to store the command-line options (number of nodes, program to run ect)
void setup(int argc, char **argv) { argc_ = argc; argv_ = argv; }
0
56e91d5527aad6f2f81167d5adf24296
42dbc7eb5904b0b3f4af1c5c35cb7a30
Emit the code to generate a break statement. If no condition is specified, this does an immediate jump to the exit label on the scope. If a condition is specified, the condition is evaluated and a break to the exit label on the scope occurs if the condition is true.
InterInst* _exit) { _block = new InterInst(); _step = new InterInst(); if (cond) { if (cond->isVoid()) cond = Var::getTrue(); else if (cond->isRef()) cond = genAssign(cond); symtab.addInst(new InterInst(OP_JF, _exit, cond))...
1
2f0c8d50d726fd5ca972cf53c10cfbb1
a96dfb16728f3cddacc1d036603d4fd1
获取文件的名称,带有后缀 <para>IN : D:\User\JZY\File.xml</para> <para>OUT: File.xml</para>
namespace DME.Base.Helper public static class DME_Path public static string GetFileName(string fullPath) { return System.IO.Path.GetFileName(fullPath); }
1
dfe7d454dd40b7df541137a411a461dc
0f6f3c3f03b8689c7bb6b3d1927d417f
Returns the user groups. Collection of user groups is lazy loaded on demand.
@SuppressWarnings({"ThrowableInstanceNeverThrown"}) public final class FxEnvironmentImpl implements FxEnvironment @Override public List<UserGroup> getUserGroups() { return userGroups; }
0
2c81d9da0ae47b2cc08ddef2e66979c0
3ce07fe4630f3e0139fe47b1a5f17a8a
Define o número da página
class Pagination setPage(page) { if (validator.isNumeric(page)) { let newPage = parseInt(page); if (newPage > 0) { this._page = newPage; } } return this; }
1
52baca8f4bbe0819df0e570a1f7f7a96
f780f4ab44c08568e57f8ff308249bcb
扫描webapps下的所有项目文件夹并加载
public class Host private void scanWarOnWebAppsFolder() { File folder = FileUtil.file(Constant.webappsFolder); File[] files = Optional.ofNullable(folder.listFiles()).orElse(new File[]{}); for (File file : files) { if(!file.getName().toLowerCase().endsWith(".war")) con...
0
b49b92a339ab11e763154753b80e7890
8273d5455ed7fd95c0eec245d481e63e
Convert component name to CamelCase
function transComponentName(tmpName, postfix) { const newName = tmpName[0].toUpperCase() + tmpName.slice(1).replace(/[-_\s]+(.)?/g, function (match, c) { return c ? c.toUpperCase() : ''; }); return newName + postfix; }
1
ce63fb99e51cb3a3f97f17eda007c82b
5a86a69d0d9dfa8908e47271e18f4bd5
Get list of YANG list names used in xpath expression
class NcclientKeywords(object): def get_yang_modules(self): return self.yang_modules
0
663a161c5b115b751ce9fad88ac79822
25084b6dd6719a0d5c522b45d67856df
减去状态栏和标题栏的高度,并且计算出点击的RectF的中心点,赋值给mCenterPoint
public class MoveImageView extends android.support.v7.widget.AppCompatImageView{ void getClickPointLocation(int centerPointX, int centerPointY);
0
404ead25de652e908ead79f4fb6ec526
04b6c5a52ac484fcb8498ce6f5260f2f
Getter for tts_response path. This returns the path for audio output.
StringBuffer tempBuffer = new StringBuffer(); tempBuffer.append(ResourceUtil.generateResourcePath(this, RESOURCE_TYPE.assets, "tts/common.jet")); tempBuffer.append(";"); tempBuffer.append(ResourceUtil.generateResourcePath(this, RESOURCE_TYPE.assets, "tts/"+MainActivity.voicerLocal+".jet")); return tempBu...
0
84daa93cebe6807021c4691dc5135aac
8b30b039eb246a20808bb2f009f6df52
Should not return other users accounts
class AccountsTestCase(LiveServerTestCase): def test_super_delete_other(self): self.get_login('a@a.com', 'p') response = self.delete_detail(self.user_two.id) self.assertEqual(response.status_code, 204)
0
76840605f0b8bcaa70520ce471f0eebe
19a5e9e2bd796fa3618e86f640460289
Setter for <code>bot.GPT_SCHEDULE.SUB_VERSION</code>.
public void setVersion(java.lang.Integer value);
0
86f7efd045389886bf8e0f9385f813ff
b05418f0506c75789cfb3814bc94732b
Sets the ave commute time.
void setArrTime(double arrTime);
0
4046658e3217797ee3873a68a612f76f
211b3cf89a36a9259247628a3e39ef32
Sets the value of the minScore property.
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "workload", "performance" }) @XmlRootElement(name = "SimilarityData") public class SimilarityData @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "timeBehaviour", "capacity", "resource...
0
3df8e2637115c4de099b746483d447ca
a4fe72da1aa03548203e39c14f0639d2
Save the store to store.ser
def save_cart(cart): pickle.dump(cart, open("cart.p", "wb"))
0
d1b3e6c33ae509635af369ecfec9cedf
ad0276e15d4ab03f48fe8cbcaa914b29
单击主页面漏射束发生的事件
void GameWindow::mousePressEvent(QMouseEvent *ev) { if (ev->button() != Qt::LeftButton) return; if (DisplayRange) { if (MouClickRegion(DisplayRangeX + 10, 60 , DisplayRangeY - 80, 60)) { for (auto defei : TowerparVec) if (defei->GetUpLeftX() == DisplayRang...
0
5a08bea4b8797f1a4eb9f528f04fd013
09f7e7380c099ecde7e4f6a0045e0ea9
命中率计算函数
isHit = [0,1,2,3,6,14] H = df[df.HIT_RESULT.isin(isHit)].HIT_RESULT.count() AB = df.HIT_RESULT.count() return H/AB
1
30ccc94cb5da4173f92484d9fdf89460
5a10e6699acc45601801f18172411c6e
Checks whether or not a six-digit string is a valid mmddyy date.
result = None try: datetime.strptime(date_string, "%Y%m%d") result = True except ValueError: result = False return result
0
93eb57eb27a86804af5c814c9fa2a0e8
c483f40cc7d6cd254065298a8855830e
Creates a deep copy of the current instance.
namespace NIntegrate.Data [DataContract(Namespace = "http://nintegrate.com")] [KnownType("KnownTypes")] public sealed class QueryCriteria : ICloneable public QueryCriteria Clone() { var clone = new QueryCriteria(); clone._assignments.AddRange(_assignments); clon...
1
6d98a36e188d314ffcc53e22510c3a56
dc9bf1ce69a34ed1ba0123862051175b
Returns the meta object for the attribute '{@link edu.kit.ipd.sdq.mmm.OperationParam#getParamValue <em>Param Value</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getParamValue();
1
c243ed871489db9162a6ecea9696fa7b
4ddbabd8dceac6550ae7bf261fee9caf
Scroll the visible layout, returns if the screen needs to be repainted.
if (isScrollingPerformed) { notifyScrollingListenersAboutEnd(); isScrollingPerformed = false; } invalidateLayouts(); invalidate(); }
0
8480bb23e41a56b199cab0977934635f
dee979a6ffe98983ec9feadcdb4fa93e
<description> Reset the scale of the selection. </description>
void ScaleTransformable::cancel(QMouseEvent* event) foreach(QString meshName, panel->scene()->meshes()) { Mesh* mesh = panel->scene()->mesh(meshName); if (mesh->isSelected()) mesh->setScale(mesh->scaleReference()); }
1
1168337026c1c696f7d433f9b2527d40
501174251c22c7fb1849757a24f75bba
Fixture to load a known PGP key into the configured keychain.
class BDEFileWithKeyChainTest(test_lib.ImageFileTestCase): def setUp(self): super(BDEFileWithKeyChainTest, self).setUp() test_path = self._GetTestFilePath(['bdetogo.raw']) self._SkipIfPathNotExists(test_path) self._os_path_spec = path_spec_factory.Factory.NewPathSpec( definitions.TYPE_INDICATOR_...
0
b3703257972a8d8356e8182b98376ddc
f464df18d4b77a24e407478fb84800ac
test dynamic array allocation and deallocation
ba->printlist(); char * mem = ba->alloc (1); ba->printlist (); ba->free (mem); ba->printlist(); }
1
0dcdd3f626a43a916c6e10a404d4b8c7
824e8af94a02fff68d67ae348b20695b
Binary cross entropy loss ponderee par le vecteur w (pour réduire class imbalance)
p = 1 / ( 1 + np.exp(-x.dot(wgts)) ) summ = y.T.dot( np.log(p) ) + (1 - y).T.dot( np.log(1 - p) ) return summ
0
fdeebdd6f7f364ea8752848ab5437c86
74e8418dd58aee7554d21c029cabe231
Calculate the mean distance of the specified coord from all of the other coords using the provided distance metric.
@SuppressWarnings("serial") public class Units extends ArrayList<Unit> public double getAverageDistanceFrom(Vector2D point) { return (new AverageRealAggregator(new DistanceSelector(point))).aggregate(this); }
1
de34127be759897c4ef07fe3c43e5800
1d618843c88e0b57042345e26e494b6a
宠物类
Character.__init__(self, petId, name) self.setCharacterType(self.PETTYPE) self.templateId = templateId self._owner = owner self.level = PetLevelComponent(self,level=level) self.attribute = PetAttributeComponent(self) self.chuancheng = False self._chuanchen...
1
a7c5c3e66c36b021d56b99ebab51da85
56af97c8bf35d989fccfe5931e5a2eb5
Adds a new rule. A rule consists of a match pattern and a replacement string, or a block that returns the replacment value. The block gets the regex match object as argument.
class Ubbcode public static function addReplace($replace, $dst = '') { if (is_array($replace)) { self::$replaceRules = array_replace_recursive(self::$replaceRules, $replace); } else if (is_string($replace)) { self::$replaceRules[$replace] = $dst; } }
0
21c3952d6b0b01597bf9c410f1eac5d4
7bdbad0b21655dbcb67cd155da7b9f80
\brief Enables GMII for the sliver.
{ unsigned int sgmiis[] = TARGET_SGMII_BASE_ADDRESSES; SGMII_ACCESS(port, TARGET_SGMII_CONTROL) = 0; #ifdef TARGET_SGMII_EXTERNAL_SERDES targetSgmiiSerdesConfig (port, (void *)iblSgmii); #else SGMII_ACCESS(port, TARGET_SGMII_TX_CFG) = iblSgmii->txConfig; SGMII_ACCESS(port, TARGET_SGMII_RX_CFG) = i...
0
51c23805025d957d6b7e316a7a788ca2
f6ce383bad73d0919918150ba943a927
根据分组编号和任务名查找任务
public JobStatus getByNameAndGroup(String name,String group);
1
5af38264c69629b8a349f9b0e3ecddb4
d0e8b7daae4dbd06f6450e7f6ca6bad6
A list of allowed link types (asynchronously) Get a list of allowed link types that can be used for the &#39;links.linkType&#39; attribute of external organizations <table summary="Response Details" border="1"> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Succe...
public function getLinkType(AccessToken $token, $id, $requestBodyParameters = []) { return $this->executeAndParse(self::METHOD_GET, "{$this->getBaseApiUrl()}/link_types/{$id}", $token, $requestBodyParameters); }
0
873019c8a2e1bd970223cfd9168fb3c0
2f3c614237c713d5f85e0e367a0d77b4
Obtain addresses from Google maps API.
escaped_addr = CGI.escape(addr) response = Net::HTTP.get(URI.parse(YANDEX_MAPS_URI % escaped_addr)) doc = Hpricot.XML(response) [parse_yandex_response(doc),response] end
0
25d20cdc21f6bcc58f8edcdaff360b14
3017c0a4f0c53e9d34f2e8634da5f325
subscribe to route params and fetch the product based on productId
const { match } = this.props; if (match.params && match.params.id) { this.params.productId = match.params.id; this.loadData(false); } }
1
af438ffcf27f97c838168268980e06ae
ba3da8d3ec46ac891ad1847fdd17a75e
Returns cached global pipeline list or causes a fetch
onFetchSuccess: (data: ApiResult) => void, onFetchError: (err: Error) => void, onPipelineComplete: () => void, interval = 3000 ) { let isComplete = false; async function fetchPipelineData() { try { const res = await fetch("graph"); const result = await res.json(); onFetchSuccess(result...
0
3b98831bd665b065abb177c5dc1cc446
13286a7ff2d3007e022805b764e0371e
POST: Shop/Create
namespace Fisheries.Seller.Controllers public class SellerEventsController : Controller public ActionResult Create() { var userId = User.Identity.GetUserId(); ViewBag.ShopId = new SelectList(db.Shops.Where(s => s.ApplicationUserId == userId), "Id", "Name"); return View();...
0
eae9307a981d4386dee5f04425e16492
6d978bb57b0104100e5e2f82d5049b89
Checks visibility of the token
public function isVisible(): bool;
1
235a188b48f85ecedfe8ec3020e691eb
992cb7b47f6ed5235f615e9a557dfea2
Lookup a GLSL program object.
namespace rcube GLint ShaderProgram::uniformLocation(const std::string &name) const { return glGetUniformLocation(location_, name.c_str()); }
0
c33dcad348fac7559e2f6b722fb9f6a6
09c04c57f4802fe546ca3cb97f6526bd
Parse UTMZ GA Cookies
$utm = Mage::helper ( 'core' )->decrypt ( $cookie_value ); $data = explode('_', $utm); $source = ''; $websiteId = $data[0]; $customerId = $data[1]; if (isset($data[2])) $source = $data[2]; }
1
8a87471613009ac3fd2e4bccb875369f
795bc31a50aaa2d77bedf03cd081ecd8
update cytoscape graph based on state of checkboxes
function updateVisualization() { svgTime.call(tool_tip); svgTime.selectAll(".event").remove(); var checked = []; d3.selectAll("#school-history").each(function(d) { cb = d3.select(this); if(cb.property("checked")){ checked.push(cb.property("value")); } }); if (...
0
4322e98e0265af398aeb3983098af7db
dc455eb1e1b387f774fde78b94d14783
This method is used to verify ingredient element list.
@RunWith(AndroidJUnit4.class) @android.support.test.filters.LargeTest public class BakingTest @Test public void clickListViewItem() { onView(allOf(withId(R.id.recycler_view), isDisplayed())); }
0
c0ba6c77860a9aedb7e04e9f1ff44bfc
dcc22afff67fd8858077158e54389e62
获取公司及其子公司信息
def get_company(url, referer, data): headers = get_headers(referer) company_info = requests.post(url=url, headers=headers, data=data) try: company_data = json.loads(company_info.text)['result'] if len(company_data) is 0: return False for i in company_data: try...
0
0e0b2df5a7ff41c5fed3652bc8775483
2b4dd591975333efe6833b10c251f92b
Sets the value of the '{@link de.uni_hildesheim.sse.vil.templatelang.templateLang.VilDef#getProtected <em>Protected</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
public function setProtected($protected);
1