query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
ee0a9ab67ee74b41e420500cd6e06376 | 39f027dc9cf97898712204d8f9e28060 | Insert new accounts into the database, as needed | if accountStyle == "teacher":
DatabaseController.insertNewPersonAccountRecord(accountTypes[1], 0, personId, password)
else:
DatabaseController.insertNewPersonAccountRecord(accountTypes[2], 0, personId, password) | 1 |
6c11b00e0b981152032baaef33b371cc | dfbd41061c7ac0ead900efe4356720cb | Makes a dir fills it then deletes it while it is full. | {
for (var i = 5; i >0; i--)
{
try
{
DeleteRecursive(fileOrDir);
break;
}
catch (Exception ex)
{
if (i == 1)
throw;
... | 0 |
63c39c5cda8e46c338887c8ac3b7f61f | 30a86e9ab8b2a40129f88d1e61830197 | This method enables CRC Checking. | class CC1111NIC_Server(cmd.Cmd):
def do_crc(self, line):
if len(line):
if line.startswith("off") or line.startswith("OFF"):
self.nic.setEnablePktCRC(False)
else:
self.nic.setEnablePktCRC(True)
else:
self.Print(self.nic.getEnablePktCRC()... | 1 |
8e44e9235ffa32efae4baad02e764de0 | e1e3e9c65979d2b588ccd4be4803466d | trim all space, include chinese blank character | public class StringUtils
public static String trimAll(String str) {
return str.trim().replace(" ", "").replace(" ", "").replace(" ", "").replace(" ", "");
} | 1 |
9ac533886d1229cab187ddcc248651d8 | 25d09b5210f60c843b40f0a5a39873f5 | Called when the active tasks change in desktop mode. | public class DesktopModeController implements RemoteCallable<DesktopModeController>
public void showDesktopApps() {
ArraySet<Integer> activeTasks = mDesktopModeTaskRepository.getActiveTasks();
ProtoLog.d(WM_SHELL_DESKTOP_MODE, "bringDesktopAppsToFront: tasks=%s", activeTasks.size());
ArrayList<R... | 0 |
c712895a02712f436e1c2f6fc72fcd5f | 328cb08e55e1ac240a3ced9c39b0c650 | Run imagemagick against the provided source path and generate crops or
rescales of the image. | applyDefaultsToBaseOptions(options);
upgradeCropOptions(options);
applyDefaultsToRescropOptions(options);
checkForMissingOptions(options, ["src", "cropWidth", "width"]);
await ensureDestinationDirectoryExists(options);
const args: string[] = [options.src];
applyBaseOptionsToArgs(options, arg... | 1 |
960c6d40234a621044286483d239bd7f | b950322b10474e76a9aca516cbfb95e3 | Removes a track from the queue. | namespace Halloumi.Shuffler.Controls
public partial class PlaylistControl : BaseUserControl
private void RemoveTrack(TrackModel trackToRemove)
{
if (trackToRemove == null) return;
var tracksToRemove = new[] {trackToRemove}.ToList();
RemoveTracks(tracksToRemove);
} | 1 |
5a8d03f73d1f0bd3d45dee6a1e8a67c5 | 0e3b3106b35ae431a9946dcf85983ed2 | Subscribe for hand contact and grasp events | bool USLReachAndPreGraspMonitor::SubscribeForManipulatorEvents()
{
if(USLManipulatorMonitor* ManipulatorMonitor = CastChecked<USLManipulatorMonitor>(
GetOwner()->GetComponentByClass(USLManipulatorMonitor::StaticClass())))
{
ManipulatorMonitor->OnBeginManipulatorContact.AddUObject(this, &USLReachAndPreGraspMonitor... | 1 |
853fe65d3c96bb0344d7b3f38ddea3f8 | 03174de27dee4e1392604f56d31d2132 | 对比自动字幕和脚本字幕的匹配度,分数越高越匹配;c代表自动字幕,h代表脚本字幕 | class Utils():
def getMatchScore(self, title1, title2):
result = int(difflib.SequenceMatcher(None, title1, title2).ratio() * 100)
return result | 1 |
17be3e3531b8746ef3352cad8bc3f07c | 9ac7137df829803bd93754b98e164d12 | case 1: book was returned on and before expected date | checkout_url = reverse('book-checkout', kwargs={'pk': self.book.id})
checkout_response = self.client.post(checkout_url)
rental = Rental.objects.get(book=self.book, active_rental=True)
rental.due_date = datetime.date.today()
self.assertEqual(rental.due_date, datetime.date.today())... | 0 |
5a5fc6d03997cf8f7b68a6a6c4547d3b | 5ca23fc1c6faf6f4f74de6adc35ac228 | 设置lng | public class PubDriver extends BaseParam{
public void setLng(double lng){
this.lng=lng;
} | 1 |
ab240b7c2b21692a686463ab6976b0d1 | e5762285ec5df454b8676beae3c1d7a0 | This tests that resolving 2 different service are truly different, but internally these 2 service will share a common singleton object | {
$container = new Container();
$container->registerServices([
'service' => 'stdClass',
'second-service' => 'stdClass'
]);
$service = $container->service('service');
$service1 = $container->service('service');
$this->assertEquals($servi... | 0 |
01d9a5a591bd9f7e987d0c4928f3b08b | 5e46c4a997b1751a8a21b81feed019ac | 管理员移动保存按钮 | {
$admin = D('admin');
$data = $admin->adn_Save();
$this->assign('data',$data);
$this->display();
} | 0 |
3993f01ee9ae1cd2a33c1b7e295d17da | 79833a098e559502c390c488444448d5 | @brief Calcula a area de um retangulo | namespace Calculo //Feito por MIM!!!!!!!!!!!!
public class Calculadora
public double CalcularRetangulo(double bbase, double altura)
{
return bbase * altura;
} | 1 |
64faaf8f63583b8fd5ae3f689d9a75de | 51122f7c5043112da50c2628d38d3a8d | Handles the SelectionChangeCommitted event of the CboProduct control. | {
if (productsCV.CurrentItem != null)
CurrentProduct = productsCV.CurrentItem as ProductModel;
} | 0 |
b76876b1db8163a77cff264bf0c1e397 | 0da6536682a35ed70c223528080fa23a | Informationen zu einem Schüler einholen | namespace Infoscreen_Verwaltung.classes
public class DatenbankAbrufen
static public Structuren.User GetUserInfo (string _benutzer)
{
string befehl;
DataTable daten;
Structuren.User userinfo = new Structuren.User();
userinfo.Lehrer = false;
userinfo... | 0 |
add841fa63a99a8bea594d1360210f7f | f7191a6be7712752a452c91d5944b874 | 利用Camera拍攝時記錄的白平衡設定參數來進行白平衡處理 | namespace BaslerCameraCtrl.BaslerCamera
class BaslerCameraDoNet
public bool SetCameraBalanceAuto(string balanceVal)
{
try
{
camera.Parameters[PLCamera.BalanceWhiteAuto].TrySetValue(balanceVal);
}
catch (System.Exception ex)
{
... | 0 |
7af17db117954f9b0e32da5eb7727d71 | 3fd7154e51f984929faff2734b504dcb | Sets the function audio name. Ex: "DLC_Dmod_Prop_Editor_Sounds" | namespace Assets.Script
class GameManager
public void SetAudioByName(string audioName)
{
audioScript.SetAudioByName(audioName);
} | 1 |
bf69d688a62199abededc0b6ea1bdeac | 5f95df289415a5687457e59f9d349ba1 | Write Log on CLI / Shell / Terminal.
DEBUG | final class Logger
public static function display(...$params) {
if (!is_cli()) {
$message = self::createMessage($params, null, true);
echo '<p style="border-bottom:1px solid #efefef; padding:4px;">' . $message . '</p>';
} else {
$message = self::createMessage($params, null);
echo $messag... | 1 |
ef994bfee6eee2fd975d8b7dd5d343e3 | 564e28e11b4e6adaf53d2333f1a42610 | Close the chage org scope modal and notify all listeners | export class DashboardComponent implements OnInit, OnDestroy
closeChangelogsModal() {
this.openChangelogModal = false;
this.changelogs = undefined;
} | 0 |
bf84d11c0eedcbe9e502a36260395201 | 4bd08b9bf335837c0762304f47373eec | Shows the reversal notes. | var notes = document.getElementsByClassName("center-notes");
notes[0].style.display = "none";
var translate = document.getElementsByClassName("center-translate");
translate[0].style.display = "inline-block";
} | 0 |
1ef316eb2c4ddc183930e7e2489b7782 | a6819eb2966dbf52d237365619da6e12 | Removes the timestamp from the file. | def get_timestamp_dict(timestamp_dict):
def remove_time(s):
return s.split('time_')[1] | 0 |
4cf12e81a2e281b69511b3a84c93274a | d192a174582479c5ada0f0951c20010f | Adds a ptm secondary location | if not 'url' in args:
raise RuntimeError("Missing required argument 'url'")
return self.request('addSecondaryStorage', args) | 1 |
078d107c4593c103fea28b641d9b2dda | d49a91936f6ae327ef83a63ee466fe4e | ### function to view all features that have NAs | check.na.df <- function (df,margin) {
temp=unlist(apply(df,margin,function(x)all(is.na(x))))
if (margin==1) {out=which(temp==F)}
else {out=names(temp[temp==F])}
return(out)
} | 1 |
f6b406c9bb205e77a7feab9bf75d9f25 | c774f4cf2edc681bd02e4541ae682161 | 选择算法后自动绑定对应的权重选项(暂未实现权重选择功能) | class GUI(Frame):
def onSelect(self, event=None):
print('----------------------------')
if event:
self.algorithmChoose = event.widget.get()
print("choose alogorthm:", self.algorithmChoose) | 0 |
d9d3e6d325cc3ee2ec40d9c6aec8eb5f | 1b7d88a0e4c9189a9080c07fdf8030de | 将loading状态文字隐藏 | hideLoading () {
wx.hideLoading();
} | 0 |
f418cb984671201059ea4341b7f88b4a | 5186d47cfc27bd2cfcb705ffae3e8a05 | overrides parent method
Adds category specific fields to manufacturer object | protected void initializeFields() {
super.initializeFields();
addField(new DcField(DcProperty._A_NAME, getIndex(), "Name",
false, true, false, true,
255, ComponentFactory._SHORTTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,
"Name"));
... | 1 |
80d957bbc40b9fb0e55e8bb3ac9e597a | 386d365161dc084e614f478163563eb6 | Asynchronously updates multiple Beers in the repository. | namespace Insight.Database.Sample
partial class BeerRepository : IBeerRepository
public Task DeleteBeersAsync(IEnumerable<int> id)
{
return _connectionFactory().ExecuteAsync("DeleteBeers", id);
} | 0 |
7700c5a5ac9fc577607c4a480acce0e8 | 08e1201efe55b727a79cc2f06f71dccf | Wrapper around :py:class:`cral.tracking.entities.Run` to enable using
Python ``with`` syntax. | def __enter__(self):
return self._run_experiment() | 1 |
27a106f3e82bbda328d4f70ca20152e0 | ad6deb7ae2a8b7b90a1a3dc8893d96e2 | Performs protocol specific asynchronous 'Receive' operation. | {
var receiveBuffer = this.bufferManager.Pop();
while (receiveBuffer == null)
{
receiveBuffer = this.bufferManager.Pop();
}
this.receiveArgs.UserToken = receiveBuffer;
this.receiveArgs.SetBuffer(receiveBuffer.Data, receiveBu... | 1 |
561792eeffb5b657e28ef04754ad0850 | 7e55f043dad8b51d875c8c31308148a2 | Gets the tokenLifetimePolicies
The tokenLifetimePolicies assigned to this service principal. Supports $expand. | class PoliciesRequestBuilder(BaseRequestBuilder):
def token_lifetime_policies(self) -> TokenLifetimePoliciesRequestBuilder:
from .token_lifetime_policies.token_lifetime_policies_request_builder import TokenLifetimePoliciesRequestBuilder
return TokenLifetimePoliciesRequestBuilder(self.request_adapter, se... | 1 |
6b7520192f64ea125a48a177f8ca17d8 | 366568ac92f11a67f411164b9c829150 | 根据ID查询头条 | Bigthing queryOneById(String id); | 1 |
f09551824b749bbd17772d41fa491c83 | 59705d5f113686137019169ebebca4ce | Executor pool.
Returns:
concurrent.futures.Executor: Executor pool. | def create_executor() -> futures.ThreadPoolExecutor:
return futures.ThreadPoolExecutor(EXECUTOR_THREAD_COUNT) | 1 |
773bbca3c6da457bc7cfefb5076e99b7 | 8315539cb50f2c489fb0ec77ac4fce10 | Dessine un arrière-plan en mouvement (Voir le fichier credit.txt) | namespace IFM20884
public abstract class MondeImages : Monde
public override void DrawArrierePlan(Camera camera, SpriteBatch spriteBatch)
{
this.Draw(camera, spriteBatch);
} | 0 |
f655fb8d4bf6612ba4acc5607211818b | b1ae925caf193c7fcf7e7872bc172075 | Tests the getter-method for the DFS-tree. | public class TestScheduler
@Test
public void testDFSSchedulerWithTestGraph() { checkDFSScheduler(PATH_TO_TEST); } | 0 |
7fdf8a76be064dfa439b862dad70fcfb | 80df114cec881db8866ce55bf5e48331 | Adds exclusion ranges based on HTML comments | test_case = """<html><body><h1>It works!</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>
<!-- -->
<!-- highroller: exclude start -->
dont show me
<!-- highroller: exclude end -->
<!-- highroller: additional start --><a href="ind... | 1 |
1f64ec014607a887414d0a34c553ffa4 | f7eeb3844d57fff732b8bc716257f4fc | 將個人設定物件快速帶入搜尋面板 | let chara = this.charaList[index];
this.type = chara.Setting.type;
this.race = chara.Setting.race;
this.job = chara.Setting.job;
this.images = chara.Setting.images;
this.name = chara.Setting.character.name;
this.gender = chara.Setting.character.gender;
this.age = chara.Setting.character.... | 1 |
78154733ff4b9d95b11a742a4509c354 | e5b300528467db59e241264a291be516 | returns 0 if the date range is violated, otherwise, it will return
the quantity remaining under the stock limit. | class TokyocabinetDriver(AbstractDriver):
## Tokyo Tyrant provides one connection per *table*, not per database.
## Config files have no hierarchy. Let's set up our own hierarchy as a
## stringfied dictionary and evaluate it later.
## Each table connection defines the host and port location of the Tokyo
## Tyr... | 0 |
4daa0366988556a6ec2128fa2270b675 | 7d8768ac897de5354f84e9ead3f18da6 | Comparison function (operation > ) to determine the order between two elements.
Will be used by sort function | int compare_element(const void * a, const void * b)
{
if ( *(ELEMENT_T *)a > *(ELEMENT_T *)b ) {
return 1;
} else if ( *(ELEMENT_T *)a == *(ELEMENT_T *)b ) {
return 0;
}
return -1;
} | 1 |
b88bcf5c3919616bf085d07e6dba7716 | 3b0f004f742d6195d0927600ae621e7e | 根据父类CODE和等级读取类目列表。
用户查询品牌类目的绑定关系列表以及其他需要查询类似数据的页面。 | public List<CodeBookDomain> doGetCodeBookListByParent(String parentValue,String parentType,String childType)throws Exception; | 1 |
a33aef22e67d21d9add1d9dda7f7730a | 25e0c3a0f6c64a968d28d3f87b39f787 | Defines the stop price of the order to be made.
NAME: stop_price
DESC: The stop price at which to execute the order.
TYPE: Float | class SetTradeDependentOrdersBody(object):
def trailing_stop_loss(self):
return self._trailing_stop_loss | 0 |
082354134c6d2fc43c6bfd1d528af4ee | bf17a334d235a9706a31c1c22969cae7 | Rotates the camera about the X axis. | namespace VitPro.Engine partial class RenderState
public static void RotateX(double angle) {
Rotate(1, 0, 0, angle);
} | 1 |
6a87c083310b50d8635d0c5f33b0cd75 | 7780ffaedaa898898874e2bf395db35d | 获取Ick列表总数 | int getIconListCount(Map params) throws Exception; | 1 |
e0c22691fe5ae17d75f995ddb9a95807 | c037a5135757dbbf7d0868439acbc893 | 格式化提交的交通工具表数据 | var id = $('#vehicleid').val();id = $.trim(id);
var transporttype = $('#_transporttype').val();transporttype = $.trim(transporttype);
var vehicleno = $('#_vehicleno').val();vehicleno = $.trim(vehicleno);
var vehicletype = $('#_vehicletype').val();vehicletype = $.trim(vehicletype);
var transportunit = $('#_tra... | 1 |
c8ec539e99ebb5e20ff0f6aa7be378d6 | 740dbad7791f70743bc3eb3a42eff490 | A connection event handler that is listening for a 'reconnecting' event.
Event is emitted if the connection has been lost unexpectedly and is automatically attempting to reconnect. | function ReconnectConnectionHandler(modeling) {
this._modeling = modeling;
} | 0 |
40439ad30eeeac4b4116f24a5be4305c | d80e2d487349aa6feb4368ea2014eafd | Add Cloudflare account. | class GoogleCloudAccount(Dome9Resource):
def create(self, body: GoogleCloudAccountPost) -> Dict:
return self._post(route=GoogleCloudAccountConsts.GOOGLE_CLOUD_ACCOUNT.value, body=body) | 0 |
4863ce600560e05f4781ad49ba06e98d | ea42ef0357eee87c0459b9ce3d17d7ff | This function will save 3k details in DB
Once Data is saved in ANX1_3k, data will be stored in ITEM_DEtails and then Summary will be calculated | logger.log("info", "Entering save3K : %s :: %s", new Date().getTime(), new Date().toString());
await db.saveRow(anx1aQueries.table3KA.save,
[
headerList.odocref,
headerList.octin,
headerList.olegalname,
headerList.odoctyp,
headerList.onum,
headerList.odt,
headerList.o... | 1 |
6c69ead2cc91500d83b79f35658d7750 | 1e6d6fd63aa83de9b570bd833a8f6b7b | print the usage message but do not abort. | void print_usage()
{
printf("/xarpd <interface> [<interfaces>]\n");
exit(1);
} | 0 |
bb215f8759700078744b2ede4dc019ac | 1ba3fe849c02abdb1e9291d29c1aa957 | Processes an outgoing pre-enveloped message. The message will be wrapped, encrypted, and signed. | namespace System.Runtime.Remoting.Messaging
[SecurityCritical]
IMessage SyncProcessMessage(IMessage msg); | 0 |
45b9eac1f465a455dfa527babc4229c5 | 5b4e1303a5e9c1133aaf567fc03c503f | A property mutex for the scope property. | constructor() {
super();
this[propCacheSym] = {};
} | 0 |
91ee9f4e898445f46219fc248a48f1f8 | cf123916e72615880fcadd1b679edeaa | removes last kitten from array | function initial(array) {
array.pop()
return array
} | 1 |
7507bf1a727ea032b4fe4a55f6e1cb43 | 9294fba3c820e35477aa2e2e155ea41a | take the input file, ingest content to support spec/aggregated lists, and
store in an internal representation. | public Object importAggregate (String filePath, Settings settings) throws IOException; | 1 |
1a35cc7e604ef82af1d13f93b0568eb9 | 6e9cb798299faf38720c7a838c90cde6 | This method stops this Snmp Agent | namespace Apache.NMS.ActiveMQ.Transport.Discovery.Http
public class HttpDiscoveryAgent : AbstractDiscoveryAgent, ISuspendable
protected override void DoStopAgent()
{
Resume();
} | 0 |
871227af064f765fcb843acfd5f31fba | ff4986fe43037b65ad162c5cf44f893d | Disable id check. | namespace Core.Data public class ConfigureData : BaseData
protected override bool idEnable() { return false; } | 1 |
16b195eb075af8037a28561a0b27df8d | 8ae025803209c2a3b8a04e00854ecc51 | test,测试堆栈压栈元素2后,是否可以成功返回栈顶元素 | public class ListStackTest
@Test
public void testTop() {
StackInterface stack = new ArrayStack();
stack.push(0);
stack.push(80);
Assert.assertEquals(80, stack.top());
} | 1 |
5b02a61aeac48e0e11bf64702a42a6df | 136fab47589a6afaf8d5f7c07402d15c | Perform redirect after content creation | {
bx_import('FormsEntryHelper', $this->_aModule);
$sClass = $this->_aModule['class_prefix'] . 'FormsEntryHelper';
$oFormsHelper = new $sClass($this);
$oFormsHelper->redirectAfterAdd($aContentInfo);
} | 1 |
b4677c39cbcb1c2598a577112c8a7ab8 | bb0f2cf034d1d7f54f9df754eda66074 | Parses a literal according to https://tools.ietf.org/html/rfc3501#section-9 | class Parser
parseLiteral(isKey) {
const pos = this.pos;
const options = this.options;
const litend = this.findLiteralEnd();
if (isKey === undefined) {
isKey = this.ordinal(litend) == CHAR_COLON;
}
if (litend <= pos) {
const emptyOK = isKey
? this.options.allowEmptyUnquotedKe... | 1 |
d53fc3b248be7db9206e5a8ffa75e5b1 | 86fe3b562f37ada27556535d0385fe7e | Set offsets for the sticky navigation | $offset = $this->get_option($this->post_type.'_items_offset', 0);
if($offset == '' && !class_exists('Dfd_Theme_extensions') && !is_single()) {
$offset = 20;
}
$style = $this->get_option($this->post_type.'_style', 'masonry');
$disabled_offset_styles = array('metro', 'justified');
$units = 'px';
... | 0 |
96e1dbf9bcb92dea05c318ecca157e7d | 5dbb5084ac5fafe20f4f18ba0003fd87 | Protocol method to get the media rules for the stylesheet. | return [
[
"rel" => 'stylesheet',
"href" => $url,
"media" => 'all',
],
];
} | 0 |
a127578de02b3c7ddeaf4d001ea673d8 | 748c41d720850e9d02eb759336800612 | 過去の二点タッチ距離を更新する | {
if(Input.touchCount > 0)
{
Touch touch = Input.GetTouch(0);
m_curFirPos = touch.position;
if(Input.touchCount > 1)
{
touch = Input.GetTouch(1);
m_curSndPos = touch.position;
... | 1 |
ddb18c8d596ff03ee177b5dc6c798e02 | 9913b318a684b9ce18c1bbbf32cda73e | Get the request when group id and request id is given. | class GroupService(object):
def search_request(cls, sid, group_id, request_id):
request_key = rediskey_config.GROUP_REQUEST_KEY % (sid, group_id)
for i in range(redis_client.llen(request_key)):
result = redis_client.lindex(request_key, i)
result1 = cls.build_group_member_data(res... | 1 |
670d0630a81b17dcf8396f5f508b53fd | dfecca94e0914ffc9bf0de9e16d3fe73 | Calcule la densité de commentaires pour une méthode | {
Dictionary<ImageExp, List<Observation>> dictionary = e.Argument as Dictionary<ImageExp, List<Observation>>;
Dictionary<ImageExp, List<double[,]>> dictionaryDensite = new Dictionary<ImageExp,List<double[,]>>();
int counterTauxImage = 0;
foreach (ImageExp i in dic... | 0 |
66bbed886d67daad997529b38cce1426 | 46c6a86fccdb1b798b9555d65649e9ff | Returns all the classes found for the package. | String scannedPath = scannedPackage.replace(PKG_SEPARATOR, DIR_SEPARATOR);
URL scannedUrl = Thread.currentThread().getContextClassLoader().getResource(scannedPath);
if (scannedUrl == null) {
throw new IllegalArgumentException(String.format(BAD_PACKAGE_ERROR, scannedPath, scannedPacka... | 1 |
1233017e211e5deed2c660b685788557 | 1d0f0ec83b4e6f324c73091ed846dceb | Configures OpenLayers layer style. | function applyStyle(placeid) {
let styleStrokeOnly = ({
strokeColor: strokeColorPicker.value,
strokeOpacity: 1.0,
strokeWeight: 2.0,
fillColor: "white",
fillOpacity: 0.1,
});
let styleStrokeFill = ({
strokeColor: strokeColorPicker.value,
strokeOpacity: 1.0,
strokeWeight: 2.0,
... | 1 |
c1ca3fe7f06781f64c0fd297f29604d7 | fcf3074116c1fdb68d8ca93de55b5d32 | Sets the value of the '{@link org.eclipse.bpmn2.SequenceFlow#getSourceRef <em>Source Ref</em>}' reference.
<!-- begin-user-doc -->
<!-- end-user-doc --> | void setSourceReference(Reference value); | 1 |
5b271bf0a13ecefa2fac85d59a8cafef | c458b319c3e47fadb95c8b26458d9de9 | 執筆TextBoxに書かれたTextをModelsCompositeに設定する | namespace DclTestFormWPy
public partial class DclTestFormWPy : Form
void EditCommandToTextBox(object sender, EventArgs e)
{
} | 0 |
4a9e7c8268687f78c41f1990a24a49bb | f79cf7b59ef777513a01a3f43f6c8b80 | Get featured image path | class GenimoWordpress extends stdClass
public static function getPropertyFeaturedImage($property) {
$dsPath = null;
if (strlen($property->nmFileNameSpotlight) > 0) {
$dsPath = $dsUrlBaseGenimo . "/media/" . $property->idProperty . "/" . $property->nmFileNameSpotlight;
} else {
... | 1 |
6163af78d316dd13122bc0db94e81734 | cec98733981ca8254c8eb68ef5d1c9ff | 如果是合服后的名字 | if self.name == nil or self.name == "" then
return TI18N("二哈")
else
return self.name
end
end | 0 |
e42a0f39f283a48635e2f2f1a06fae54 | dd171b897b3e370cd1c117cc9bb209a8 | This method contains an implementation of longest common subsequence algorithm. | int[][] lengths = new int[sequence1.length + 1][sequence2.length + 1];
for (int i = 1; i <= sequence1.length; i++) {
for (int j = 1; j <= sequence2.length; j++) {
if (sequence1[i - 1] == sequence2[j - 1]) {
lengths[i][j] = lengths[i - 1][j - 1] + 1;
} else if (lengths[i - 1][j] >= lengths[i][j - 1])... | 1 |
5f0ebd988a08ae7207931c17acfb5012 | 43379eb7bda42a8e4d74a2c4553ff8bf | Create the database for the new customer, named after the company, inheriting everything from sample_co. | public class Global
static public bool CreateDB(string sCompany)
{
string sPath = HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["VirtualDir"]);
int idx = sPath.LastIndexOf('\\');
sPath = sPath.Substring(0, idx + 1);
string sDestDir =sPath+ string.Format("databas... | 1 |
aa3627da7da6d80770180c23cd5b26d4 | 5e2a6ee6e93a4a0a0d780ef22cfd1b2c | Check the standard size of the various format characters. | void __________cc_datatype_check__________()
{
COMPILER_ASSERT(CC_1B_LEN - sizeof(cc_uint8));
COMPILER_ASSERT(CC_2B_LEN - sizeof(cc_uint16));
COMPILER_ASSERT(CC_4B_LEN - sizeof(cc_uint32));
COMPILER_ASSERT(CC_8B_LEN - sizeof(cc_uint64));
COMPILER_ASSERT(CC_4B_LEN - sizeof(cc_float32));
COMPILER_ASSERT(CC_8B_LEN -... | 1 |
8b11d0b729ac6fa531b9b73787bf2eb6 | 96acd1c22296a13c985806e2cf8e5ee9 | 直接选择当前队列的第一个目标 | function BehaviorAttackBlackholeTargets:Begin()
local r = RandomInt(1, #self.targetsInBlackhole)
self.order.TargetIndex = self.targetsInBlackhole[r]:entindex()
end | 0 |
3894217c256161105f7166c4a761bf2d | cd208758f51d7f5d21d8b0f33aadd213 | Returns a list of articles. Loads from cache if available. | class ArticlesRelated extends WidgetAbstract
public function articles(): Collection
{
if (empty($this->cacheTime())) {
return $this->resolveArticles();
}
return $this->cache->remember(
$this->cacheKey(),
$this->cacheTime(),
function () {
... | 1 |
9a2923762c27241b4daf232b856ed1a6 | cc01d3ea1c1168815f9449ebc6a50830 | Create a new FUSE adapter. | self.device = device
self.mountpoint = mountpoint
self.filesystem = filesystem
self.options = options
self.format = "" | 0 |
f6298ed0106fe6102c50ee54114e0e59 | 03fa4297828371e3ad5c6260a5dc9b21 | 发行token | class FtMgr
static async issue(
genesisWif,
genesisId,
tokenAmount,
address,
allowIncreaseIssues
) {
const issuerPrivateKey = new bsv.PrivateKey(genesisWif);
const issuerPublicKey = bsv.PublicKey.fromPrivateKey(issuerPrivateKey);
const issuerAddress = issuerPrivateKey.toAddress(this.ne... | 1 |
948df5e8d396acac1fd7082440f50c50 | 29f769ac4ddda17b80979b7be098d014 | ExtraeEspectaculares -> Devuelve la coleccion de Espectaculares a la vista | public class ListaEspectaculos
public List<Espectaculo> getListaEspectaculos() {
return listaEspectaculos;
} | 1 |
e86e364659687ca96c8ec449df6f2dcf | fa1d62aa18a7fd2b0431b1462bf3ba28 | Returns all possible words in the storage that begin with the specified characters. | public IActionResult Find([FromQuery]string characters)
{
if (string.IsNullOrWhiteSpace(characters))
return BadRequest("Missing characters");
var words = _wordService.Find(characters);
return Ok(words);
} | 1 |
4ca0be2ab8b205db5672aa838d0ab973 | 370ff635cb332e5499e351eddf12032e | Clears array contents, then free any memory held by the array, but not the array itself | void StackArray_clear(struct StackArray *this) {
assert(this != NULL);
for(size_t i = 0; i < this->elements; i++) {
free(this->values[i]);
}
free(this->values);
free(this);
} | 0 |
3d92063ea38b1fe4dd8d36d246b256ec | 9c07e208ddd07298754a1e31e15c4367 | 根据地址编码查询街路巷(小区)
地址编码 | public Object queryAddress(String code); | 1 |
fb12bb342e286bd80d747e6024b111b5 | 11799f0f9106c5c98293d30c5218d4b4 | Check we don't move with no force | class Testworkshop(unittest.TestCase):
def test_dragForce(self):
dampingCoef = 0.1
velocity = 10
result = langevin.dragForce(dampingCoef,velocity)
self.assertEquals(result,-1) | 0 |
95b0abb61274024c6680d3be3cd05f7b | e9854d7b4dd3fc534e4cf5c84de8b49b | ________________________________________字符串模板String templates | fun stringTemplates() {
var a = 1
val s1 = "a is $a"
a = 2
val s2 = "${s1.replace("is", "was")}, but now is $a"
println(s1)
println(s2)
} | 1 |
e329fdedabfdc94b84ea6c3e92dbfdda | 62b9c2ba5fea14b04e9385780f5071ea | Remove all files from the static virtual filesystem. | class Filesystem
deleteAll(path) {
const driver = this._resolveDriver()
return driver.deleteAll(path)
} | 1 |
398fe6a085726443dfd46d65fd67fb36 | 5aff53ca0a90923cd83e97f9047df67b | setter method for share price | public class Currency
public void setSp(int sp) {
this.sp = sp;
} | 0 |
9e9602ad151f8a31fab498235bd1e91a | f09990cf940c62f5d1208ae1017dcf1a | Build a large network consistent with the DeepMind Nature paper. | root='~/.mxnet/models', norm_layer=BatchNorm, norm_kwargs=None, **kwargs):
net = MobileNetV3Large(multiplier, norm_layer=BatchNorm, norm_kwargs=None, **kwargs)
return net | 0 |
1e46ee1b5cb6ebf7c9483b8c9030e392 | 4140c0927be2662672f58529ff8d7896 | Because Text frames have a text encoding we need to check the text
String does not contain characters that cannot be encoded in
encoding. | function stringIsText(text) {
var isText = true;
var sampleSize = Math.min(100, text.length);
for (var i = 0; i < sampleSize; i++) {
var charCode = text.charCodeAt(i);
if (charCode === 65533 || charCode <= 8) {
isText = false;
break;
}
}
return isText;... | 1 |
c3e1176b71a8fa4948e36707440875eb | 21c51ada15a19473362613c995414f07 | 测试RandFloat | func TestRandomBool(tt *testing.T) {
r := NewRandomUnsafe()
var t, f int
for i := 0; i < testsRandomNumber; i++ {
b := r.Bool()
if b {
t++
} else {
f++
}
}
min := testsRandomNumber/2 - (testsRandomNumber * 10 / 100)
max := testsRandomNumber/2 + (testsRandomNumber * 10 / 100)
if t < min || t > max |... | 0 |
f4f2a2664d6fbcf475465148114c7a8c | 8e790063a7007f2d88e16575cfe2ec5c | Call a method on the remote Pyro object this proxy is for. | ObjectRef callActor(PyActorHandle pyActor, PyActorMethod pyActorMethod, Object[] args); | 1 |
06e5394eae4a660fa2bf99a09914f0a7 | ff029c48f7654b5abfb769fefae0bd57 | Sets up a Grid<string> for the Cube with two options:
1) PC: Random Order and letters in the front of the Cubes
2) User: Uses the user's input to set up the cubes and letters | void AGridScapeGameController::GeneratePuzzle()
{
TSubclassOf<AActor> CubeClass = GameModel->GetCubeClass();
FLevelStruct* CurrentLevel = GameModel->GetCurrentLevel();
SetValidMoves(CurrentLevel);
const int32 Length = CurrentLevel->Dimensions.X;
const int32 Width = CurrentLevel->Dimensions.Y;
const int32 Height ... | 0 |
0c8f533a8ef8b1f3005cc08934fe3368 | 96f651feebf6034449324866cfe1cafd | Get path to button list page | class Detail extends Template
public function getListUrl()
{
return $this->_urlBuilder->getUrl(self::URL_PATH_LIST);
} | 1 |
d794071e752d9f55616724e3d344d5f9 | 4cf9f36f7ca99695336d3a5a398bba7e | Take a string runtime in various formats and try to output this in minutes | time = str(time)
time = time.split(':')
if time[0] == '0':
time = time[1] + " minutes"
elif time[0] == '1':
time = time[0] + " hr and " + time[1] + " minutes"
else:
time = time[0] + " hrs and " + time[1] + " minutes"
return time | 0 |
b8ded3eb576ff81848e8d6c71af8d03c | 9d003b13e3b554cb5f778db6a87e9907 | 自定义注解标记的类才能被扫描到 | public class ClassTest
@Test
public void isAnnotationPresent() {
assert Person.class.isAnnotationPresent(JavaBean.class);
} | 1 |
03528b4d7e343bb2b83190888588332e | 60658c5cd7cacf094f492a33b67af591 | 瓦片图的离线添加 | export default class LeafletUtil
addWMStile(url, options = {}) {
const wmsTileLayer = L.tileLayer.wms(url, Object.assign({
layers: '',
format: 'image/png',
transparent: true,
version: '',
styles: '',
}, options));
this.map.addLayer(wmsT... | 0 |
df3262271e2bfdf86cbb551d25c7434b | 76e7beea727c009ba93dd54c0eb8081f | Buscar áreas comuns por condomínio | {
$cnaes = Cnae::where('areas_id','=',Crypt::decrypt($request->value))->orderBy('descricao', 'ASC')->paginate(50);
return view('coordenador/cnaes_coordenador', ['cnaes' => $cnaes]);
} | 0 |
7726ef1656cdcbbe4b345af57ecb283b | cffedc077f15086bc2b6c2b2802086ae | Starts the gacha open animation. | {
if (mPlayOpenSysRoutine != null)
return;
mPlayOpenSysRoutine = SafeCoroutine.CoroutineManager.StartCoroutine(PlayOpenSysAnimRoutine());
} | 1 |
2031a3e7150c0e8daec03bb4b4303d7e | 3e26f986c3c2678b06110904e32eb8bf | 对 E2PROM进行字节写操作
data:待写的数据 | class Loader():
def write_data(self, address, data):
start = 0
stop = 0
while start < len(data):
stop = min(start + 256, len(data))
stdout.write('\rwriting {:#8x}...'.format(address + start))
_, status = self.apdu.sendreceive(
b'D',
... | 1 |
92bd040140eb48e20d03b7e1f137ec81 | 4409020212397e50aae0a86b09e89c95 | create a sizer containing a button and a text ctrl | class SingletonDialog(wx.Dialog):
def SetupWindow(self):
self.field = wx.TextCtrl(self)
self.check = wx.CheckBox(self, label="Enable Foo")
vsizer = wx.BoxSizer(wx.VERTICAL)
label = wx.StaticText(self, label="Foobar")
hsizer = wx.BoxSizer(wx.HORIZONTAL)
hsizer.AddMany([(la... | 0 |
4ebdc481f094b8964beefc6a5b3a444a | 0741bdd4da1ed0c62173d21c02c12994 | Clear gene names that haven't been found in multi-gene DE search | to_be_removed = set()
for gene_name in expr.index:
if gene_name not in genes_sel.index:
to_be_removed.add(gene_name)
for gene_name in to_be_removed:
expr = expr.drop(gene_name, axis=0)
return expr | 1 |
d902c1556d6343a66739fdf3d156f76f | 0a257466e0b86707749c570abd6aace7 | Инициирует Google Pay API, определяет доступность совершения платежей на устройстве | try {
Class.forName(PaymentsClient.class.getName());
} catch (ClassNotFoundException | NoClassDefFoundError e) {
listener.onResponse(false);
return;
}
fragment.waitForConfiguration(new ConfigurationListener() {
@Override
public ... | 1 |
a2eef8b07096ab89dd21348c17679937 | b8572478787276226860721ec47a5334 | 対象の故人情報を取得する | HumanDtoInterface getHuman(String personalId, int targetYear, int targetMonth) throws MospException; | 1 |
12003b69f021e76130217348aff25704 | b98cf616051863c2740296eed54c87e0 | Test that dollars are converted into euros | public void WhenConvertingEurosToDollars_ThenConversionShouldBeCorrect()
{
Money converted = fx.Convert(Money.Euro(100.99M));
Assert.AreEqual(dollar, converted.Currency);
Assert.AreEqual(127.16M, converted.Amount);
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.