query_id
string
corpus_id
string
query
string
code
string
label
int64
6b5e07d7bbb8aa37a99e339db24a11b3
e05c33f52f15fafa8def8722309ccbde
新增布局(仅支持插入链表最后)
const row = new RowLayoutView({rowLength: this.rowsLength()}); this.getRows().push(row); row.add(...view); this.rebuild(); return this; }
1
c64993350d6ee69c40063ced894b5b4b
84be3e7fd5f5f9b9acf9ae474d00ddc5
Captures this instance.
namespace Coffee.UIExtensions [AddComponentMenu("UI/UIEffect/UIEffectCapturedImage", 200)] public class UIEffectCapturedImage : RawImage #if UNITY_EDITOR , ISerializationCallbackReceiver #endif public void Capture() { var rootCanvas = canvas.rootCanvas; if (m_FitToScreen) { var rootTransform = rootCa...
1
d850bbb1f857e3213073d78e2ec59a54
e5dfce8cb34d8eb9895d9c896cd3c4c5
Symmetrically encrypt a payload and post it. This function is currently only called for posting URLs.
req: PostQuantumCryptoEncryptRequest, cb?: (error: string, rep: PostQuantumCryptoEncryptResponse) => void ): Promise<PostQuantumCryptoEncryptResponse> { return this.request("PostQuantumCryptoEncrypt", req, cb) }
0
2d6dcb497a8b8b815033ecf1a0e19f56
b8f9f25b8955f43a3890d0f0f39e2f21
Initialize the Mandelbrot functions
void mandelbrot_on_heap() { }
0
07e9bd5f813908e95dd95f0a9b365ce1
41a4c8317709bf24b8b94cb3b5d8737b
tests initialization of hash table
{ globus_hashtable_t hash_table; printf("1..8\n"); ok(globus_hashtable_init(&hash_table, 256, globus_hashtable_int_hash, globus_hashtable_int_keyeq) == 0, "hashtable_init"); ok(globus_hashtable_insert(&hash_table, ...
1
9b541bcfdfceb5f6ed448e36a0d2584f
9dc06f9f84f8207a303f63a2fd55c6df
修改虚拟币充值记录
namespace Hyt.DataAccess.Balance public abstract class CrRechargeDao : DaoBase<CrRechargeDao> public abstract int UpdateCrRecharge(CrRecharge model);
1
24d6ceac0492836471f1a63384656c27
edeb8442e2be381bb5a531904d09c1f7
Computes the convolution measure on the entire autosimilarity matrix, with a defined and fixed kernel size.
rateMapCopy = np.copy(rateMap) numRowsinputArr = np.shape(rateMap)[0] numColsinputArr = np.shape(rateMap)[1] numRowsAutoCorr = 2*np.shape(rateMap)[0]-1 numColsAutoCorr = 2*np.shape(rateMap)[1]-1 spatialAutoCorr = np.empty((numColsAutoCorr, numRowsAutoCorr)) for i in range(-numRowsinputArr+1...
0
3f6183a037b854add5be5bcb0e8b04c5
0c0d8ce358a531a7308455ca35395c97
Gets the reboot command.
public abstract class OperatingSystem public abstract String getApacheRestartCommand();
0
2951af0a6b8cdd987b168302b642726d
646ce4126b97d00180ea85f65af831e0
异步:登录阿里巴巴
public final class AliBaichuanHandle public void login(MethodCall call, final MethodChannel.Result result) { AlibcLogin alibcLogin = AlibcLogin.getInstance(); final Map<String, Object> res = new HashMap<>(); alibcLogin.showLogin(new AlibcLoginCallback() { @Override public...
1
488d7976e6aeb65afa320a31371857a5
f9ef486c18f595c29f8bdfe82aa765ee
проверка на наличие повторяющихся стилей для одной работы
namespace VRA public partial class AddTransactionWindow private bool workAtGalery(WorkDto work) { return WorkDtos().Contains(work); }
0
080700c8aefbb56b682900e360931802
ca9ca3212c6bf4edbb07b068f34bc56d
Flags suppressed records
class SuppressEvent(tables.BatchAction): def allowed(self, request, datum): if datum.suppression_status == stx_api.fm.FM_SUPPRESSED: return False return True
0
f7f0570b30be2cd914ad7290dc5a1a13
b345708446a9ed9724c1fa828c59af74
# トランザクション中じゃなかったらロールバックもしない。 # Pickles Framework 0.3.0
class CO_DB_mysql_api extends CO_DB_API{ protected function _transRollback(){ $this->_query('ROLLBACK'); $this->_query('SET AUTOCOMMIT=1'); return true; }
0
e83894e99d6038ec804a3bfcfaed6f4d
d74ed1f88711b3eebb875105f02c2328
List of indexes whose values will be strings.
return ( "boolean0", "byte0", "char0", "short0", "int0", "long0", "longLong0", "octet0", "unsignedShort0", "unsignedInt0", "unsignedLong0", "float0", "double0", "string0")
0
90ae5d579996ad7f4b31ebb2b178277c
6cbe29c9250de2f98cf050a62d6a4017
Performs content assertions using a custom assertion checker. E.g. Hamcrest or AssertJ.
void contentStringAssert() { var penTextPath = Paths.get("src/test/resources/txt/pen.txt"); var penTextFile = penTextPath.toFile(); Assertions.assertThat(penTextPath).content() .startsWith("This is a"); Assertions.assertThat(penTextFile).content() .startsWith("This is a"); var noUtf8TextPath = Paths....
0
ed8e70b341d6330c01be7d28b641992f
9498d4a32f3115e68e5e7303f4264d91
Режим корректировки. Возвращает полный список должностей для управления доступом на просмотр и на регистрацию.
{ return array( array('allow', 'actions'=>array('create', 'remove', 'changeStatusFrom'), 'roles'=>array('instruct.set'), ), array('allow', 'actions'=>array('index', 'changeStatus',), 'users'=>array('@'),...
0
5ec1230372d23509a84d7cf2d3e672b6
ef7c3cf4e49d18edffe9881700f4eb83
Equivalent to `fseek()' for memory mapped files.
static loff_t mem_llseek(struct file *filp, loff_t offset, int whence) { loff_t newpos; switch (whence) { case 0: newpos = offset; break; case 1: newpos = filp->f_pos + offset; break; case 2: newpos = MEMDEV_SIZE - 1 + offset; break; default: return -EINVAL; } if ((newpos < 0) || (newpos > MEMD...
1
4f884cad02d961a0961e43233326b932
9320cfa223691cb27e2bc33e10e1748c
Sets the user ID of this journey.
@NamedQueries({@NamedQuery(name = "VWCustomerVisitList.getScheduledCustomers", query = "select cv from VWCustomerVisitList cv where " + "cv.visitDate>= :fromDate and " + "cv.visitDate<= :toDate and " + "cv.userId = :userId ")}) @Entity @Table(name = "[mobile].[vwCustomerVisitList]") public class VWCustomerVisitList pu...
0
7d527594c6981d8299ef6c6319e091ad
beb5ae82636f30dc75b8a5eb2c264935
Sets the header of this ScheduleInfo. The official header text of this schedule. # noqa: E501
public class SurveyForm implements Serializable public SurveyForm header(String header) { this.header = header; return this; }
0
d60d076d67066a0713fe391c43df3fe1
30006c05bd5fc79020a305abe054a4e2
隐藏更多面板容器
var menuObj = $("#morePortal",parent.document); if (menuObj.length > 0) menuObj.hide(); }
1
ae13b185e08c9be4411d0f2927a4cd8a
efc54433c62cb287f63e179a40115638
更新技能回合数
namespace TGG.Module.Skill.Service public partial class Common public void UpdateSkill(tg_role_fight_skill skill) { skill.skill_time = 0; skill.skill_level = skill.skill_level + 1; skill.skill_state = (int)SkillLearnType.LEARNED; skill.Update(); }
0
40cd880cfefb2366ee18bd73371a1c50
d374ad564a0af0d8d0273bb249299e57
Initialized the variables that seperate the canvas from the map that is printed on the canvas. Gives border room for the directional buttons.
public class GameCanvas extends BaseCanvas public void initializeVariables() { logo = Utils.loadImage(root,"background2.png"); logow = proportionWidth(logo.getWidth()); logoh = proportionWidth(logo.getHeight()); touchDownPoint = new int[3][2]; touchUpPoint = new int[3][2]; ...
0
fa685fb70f90c97f5c9a42caf63b6533
9d1ac8acbf6af2180c554f6e0c4dae0e
Colors the selected objects or optionally passed list.
export class EmphasizeElements implements FeatureOverrideProvider public overrideSelectedElements(vp: Viewport, color: ColorDef, override: FeatureOverrideType = FeatureOverrideType.ColorOnly, replace: boolean = false, clearSelection: boolean = true): boolean { const selection = vp.view.iModel.selectionSet; if (...
1
545f118d34beb564c602de8e254db57e
2de78f052d46c19a78b76cdd451367a8
Creates an <see cref="ObservableValue{TValue}"/> available as a property via data binding, and affected by a command also available via data binding, with an observable that determines if it can be executed. You can optionally expose that observable via a "Can" + commandName property.
namespace TappauMVVM.Commands public class Command : CommandBase public Command ObservesProperty<T>(Expression<Func<T>> propertyExpression) { ObservesPropertyInternal(propertyExpression); return this; }
0
e2c64d47868e23a3d52f98b2649100ee
92e698a06585977ddec39dd864528290
Get the Job Ad assocaited to the job application.
{ $ja = JobApplication::find($id); if($ja){ $message = $ja; } else{ $message = "This job application does not exist or may have been deleted"; } return response()->json($message); }
0
37e56bfe6d98e5141cddbfadce58bd27
aa531870a15ea70f938931d964789188
Add new team with empty name
{ $response = $this->json('POST', '/teams/store', ['nama' => $this->faker->words(3, true)]); $response->assertStatus(200); }
0
9b116090b0bf4aadd375e2f315a881b3
6a6fd2b7f1d71a63a980a3979df95270
Sets up an Mvc application to act as an open id authentication server.
namespace demo.authorization.oidc.server public class Startup public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app.UseIdentityServer(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseMv...
1
dfae94707e2a729158ac660c084cabde
f3c1b7ad6c748d215cac3dd482f7b456
Setzt die selektierten Objekte um eine Ebene nach oben auf dem Zeichenfeld.
UniverseObject highest = null; if (objects[0] != null) { for (int i = 0; i < selectedIndex + 1; i++) { if (selectedIndex > 0) { if (highest == null) { highest = objects[0]; } else { ...
0
fe4c4dcd98450379b172eddde0ac7c2e
befdd916d250d460f4ccac00b3b8391d
decrypts a BigInteger encrypted number to the user's input string.
char* decrypt(const char encrypted[], NODE * root) { char* decrypted = (char*)malloc(sizeof(char)*MAXN); int counter = 0; int len = strlen(encrypted); int i = 0; while (i<len) { NODE * node = root; while (node->leftChild!=NULL || node->rightChild !=NULL) { char c = encrypted[i++]; if (c=='0') { ...
0
da2b0cce44c51d74939d0682b166fb3d
8b43f17d2b82823cab29e59c323a4806
Given the response text of a webpage try to parse the CSRF token out.
async def _get_csrf(ses: aiohttp.ClientSession, proxy: str) -> Optional[str]: async with ses.get(URL, proxy=proxy) as resp: if not resp.ok: return None content = await resp.read() tree = lxml.html.fromstring(content) els = tree.xpath("//input[@name='csrf_token']") if not els:...
1
a595a15815fec5353dcda87cae2af9b3
fc8e46412cf1f06937ecb3cb36c87d76
Add the replica group to the broker. The replication must already be configured on the group.
class ReplicationGroup(TestGroup): def add_data_to_replicate2(self): self.test_runner.run_add_data_to_replicate2()
0
8391bbbb0482dd487e3b25418c3d9999
8794a1697d1d1f25c76afc0d7ddfa650
Get a VMware vCloud vDC entity.
self.response = Http.get(self.host + "/api/sc/instances/%s" % instance_id, headers=self._get_vcloud_headers(), verify=self.verify, logger=self.logger) if self.response.history and self.response.history[-1]...
1
e7def638fd7bb25c01c3bfc58cedc4fb
3023da653a8022a0e54278dfa4fa1e90
Gets called after the user's data is received from googleSignInClient. An attempt to create AuthCredentials is made using the GoogleSignInAccount object and if the authCredentials object is passed into another method to start the authentication process
public class GoogleSignInService public Task<GoogleSignInAccount> completeSignIn(Intent data) { Task<GoogleSignInAccount> task = null; try { task = GoogleSignIn.getSignedInAccountFromIntent(data); setAccount(task.getResult(ApiException.class)); } catch (ApiException e) { } return task; ...
0
52c945ba28892ba30c9dbe4e065d50d9
5d5bbe6f3b70572258ccd6717a77e6b5
Current date time shortcode output handler.
if ( 'delivery_date' == $name ) { echo do_shortcode( "[wdts_shipping_time id='" . get_the_ID() . "']" ); } }
0
90df3ffa3fea2216c0054a49c6da1124
b1f876d8d85107d3e8986c8aab8fbbd8
Helper method that creates a HTML row to display a CR count category and the 4 week counts
if ($fromPeriod == - 1) { return ''; } if (! $display_allocated_hours) { return ''; } $s = new apm_Utilities_Date ( $fromPeriod ); $e = new apm_Utilities_Date ( $toPeriod ); $sw = getBeginWeek ( $s ); $dw = ceil ( $e->dateDiff ( $s ) / 7 ); $ew = $sw + $dw; $row = ''; for($i = $sw; $i <= $ew; $i ++) { ...
0
00d6ff38af6be66c7a560de895fadece
018308b6e775985eaa2ca67ff1e7781d
查询命令模板列表
public class CommandDao public List<Command> queryCommandList(Command command) { SqlSession sqlSession = null; List<Command> commandList = null; try { sqlSession = DBAccess.getSqlSession(); commandList = sqlSession.selectList("Command.queryCommandList", command); ...
1
06dd6b62a3f5bd8d068fc819f94d1ba5
24b266f540a7a722c4c274ca9377016f
Get selected option(s) values. If no value was explicitly defined in setOptions(), addOption(), or the constructor just use the option string. The string(s) returned by this method can be used in getOptionElement($value) to retrieve the option Element.
class MultiselectElement extends SelectElement public function getValue() { $this->_eventManager->dispatchEvent(['get_value'], [(string) $this->_locator]); return $this->_getWrappedElement()->selectedLabels(); }
1
790bd5baa440f220d19997a3f59e50ea
0b99c9c78707e8e2a07339d8a1bb75a1
Sets the value of the timetaken property.
set timein(value) { elements.timein.value = value; this.fields.timein = value; }
0
d86cc4be5ad6da4ea206a0644a55fedc
90574a276dff069c541913363e5cecd9
This method is to get text for electronics section
public class About_company extends Fragment public String getText(){ String selection="id= ?"; String [] selection_Args ={"4"}; String returnS; Cursor cursor = FuncClass.get_cursor(sd,selection,selection_Args,"qfr3h_content"); int li=cursor.getColumnIndex("introtext"); cursor.m...
0
cfae855a27db29282b5441edbd6c182f
c805ca1bbaf8d25030652618c22559b8
再次合并直线
namespace LoowooTech.Traffic.Common public class RoadMerger public static List<IPolyline> SplitLine(List<IPolyline> srcLines) { var list = new List<IPolyline>(); for (var i = 0; i < srcLines.Count; i++) { var line = srcLines[i]; var topo = ...
0
c0bd227cd70bf19c73b469a30412dff9
fe2776ae029997c743ed38933113aade
根据响应式变化的宽度来定放多少项在平铺的blockmenu中
handleScaleUp() { let visibleCount = this.calculateVisibleCount(); let actions = this.getReactChildren(); let newIsMenuButtonShow = visibleCount < actions.length; if (newIsMenuButtonShow) { let _visibleCount = this.calculateVisibleCount( -this.getMenuButtonWidth() ); if (_visibleCount == act...
1
6de22e1ff5ab89e37eb862a68065eff7
32efec19f0ef2671831880c66ce30ef1
停止系统默认启动的activity
PackageManager packageManager = context.getPackageManager(); PackageInfo appinfo = packageManager.getPackageInfo(context.getPackageName(), GET_UNINSTALLED_PACKAGES | PackageManager .GET_ACTIVITIES); ActivityInfo[] activitys = appinfo.activities; if (activitys.length <= 0)...
0
487d3eb973adf3b0e59d791f2c21cd13
49df46ac8ea5962bb464997c03d1a5e1
计算地图 map_1 到地图 map_N 的变换关系
int map_1[16][26]={ 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 6, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 6, 6, 0, 0, 0, 0, 0, 0, ...
0
eef0afc58663da1c8e3497ed9bee0e43
b7bd49c57c3fa578d07af381ccc14ab4
행렬 곱 구하기 - 곱한 결과 행렬 반환
void Matrix_multi(long long X[5][5], long long Y[5][5]) { for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) { temp[i][j] = 0; for (int k = 0; k < N; k++) temp[i][j] += (X[i][k] * Y[k][j]); temp[i][j] %= 1000; } for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) X[i][j] = temp[i][j]...
0
61e09d0e2f0d02073cb442e1a7a9e734
36d71068d41159630181cbc4800d5bfa
Get a gray scale value from reference image (bilinear interpolated)
int Feature::L(int x, int y) { return (int)grayImage.at<uchar>(y, x); }
0
94c94028cdcba3a800c8c83a5b8fcf3b
0730d51af2b590d77cb6d335c84b9411
Gets detailed information about the current state of the specified collection rule.
{ var options = new InvokeOptions(); options.RequestMarshaller = GetRulesRequestMarshaller.Instance; options.ResponseUnmarshaller = GetRulesResponseUnmarshaller.Instance; return Invoke<GetRulesResponse>(request, options); }
0
1aca6c694e37bdc0001180553f6c539c
9a9056578e4303cf1e3552bcc8b4ab35
List all Employees filtered by Division
namespace Hulcher.OneSource.CustomerService.Core.DaoInterfaces IList<CS_Employee> ListAllFIltered(long divisionId);
1
b830e4b2b6547114b5a83220682ddbd2
6b1f452bc156da7832de4bde609df7f1
#generate lognormal RVs
ran = function(N){ n = N/2 u1 = runif(n, 0, 1/2) u2 = runif(n, 1/2, 1) x1 = log(2 * u1) x2 = -log(2 - 2 * u2) return(c(x1, x2)) }
0
8024ff0816b4e24067a0bc1da0f76ef1
f416470217edda42555986c4420e429a
Set the value of [cssversion] column.
class Reference extends \App\Entities\Reference implements \Doctrine\ORM\Proxy\Proxy public function setVersion() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setVersion', []); return parent::setVersion(); }
0
eee4eb97c0098a2b93e1b61d0d27230e
1b2eec2f0095450cc0fc57bc003f820c
deviceTypeからデバイス名を取得.
if (deviceName.isNotBlank()) { return deviceName } val manufacturer = additionalInfo.getOrDefault("Manufacturer", "") val model = additionalInfo.getOrDefault("Model", "") val displayName = "${manufacturer} ${model}".trim() if (displayName.isNotBlank()) { return displayName } return id }
0
529f0a7f25c4fba2324c03725acdefd8
cdbaac4293748b1a7fc89c91587ab712
新浪社会化登录(跳转链接)
class MemberAction extends CommonAction public function wb_login() { vendor('OpenLogin.Sina.API.index'); $o = new SaeTOAuthV2(WB_AKEY, WB_SKEY); $code_url = $o->getAuthorizeURL(WB_CALLBACK_URL) . '&forcelogin=true'; header("Location: $code_url"); }
1
9c0e28f63ae14e5863e7a948e90349ba
2ff21eb2fdfde784e6dfc86f7e13ec1d
A method which returns true if the horse is male, using the other flags object
public class Gastonia extends EatingAnimal public boolean getIsMale() { return isMale; }
0
713054948af35ff9e7f2534e854895c4
a0bc849161fc113c2aac612b0c7816e7
Gibt zurück, ob das Feld begehbar ist.
public class JMapCell extends JComponent{ public boolean isPassable() { return passable; }
1
9c9682da45b7180cec580ffe99fca2d1
4a05525790556905e57fd976ef4ab4e3
Add a new data in cache with the given session and key
class Widget implements \Limbonia\Interfaces\Tag protected function setSessionCache($sName, $xData) { $_SESSION[$this->sType][$sName] = $xData; }
1
fd550a4001b3022414896ab8185342a4
3d4fbbdd9cb2be7606ffb75397c62933
Get mapping from envelope names to functions that create them.
def get_func_lookup(): return { "randomstr": randomstr, "random": random, "sha256": sha256, "ed25519": ed25519_private_key, "rsa": rsa_private_key, "rsapublic": rsa_public_key, "publickey": public_key, "reveal": reveal, "loweralphanum": loweral...
1
7d5f40087d8a50d16cb135eca64bc7ca
10d26936887e9c25d7acda0d341f19e8
Removing MongoDB document ID's as they don't convert well to JSON.
function removeMongoProperties(model) { var copy = JSON.parse(JSON.stringify(model)); delete copy._id; delete copy.__v; return copy; }
1
d79f52d99584b2dda2c812698ece56df
88c88c24785896a1b6704e01be03adf1
Decides if incontent_player slot should be active.
local bolA = GetPlayerController(p) == MAP_CONTROL_USER local bolB = GetPlayerSlotState(p) == PLAYER_SLOT_STATE_PLAYING return bolA and bolB end
1
74b0459bcfa055665f0b2867cb71ea50
23cfe630bf71e527c0941f73bd43a514
Восполняет здоровье и ману персонажа.
{ maxHealth = baseHealth + additionalHealth; maxMana = baseMana + additionalMana; }
0
d3cd03a0984dc56caea4c425580a6c78
82f5d97a6ef6bfa5976d8fdccc46b9e5
This is used to free read leaf and index locks.
static ZH_BOOL zh_ntxTagUnLockRead( LPTAGINFO pTag ) { return zh_ntxIndexUnLockRead( pTag->pIndex ); }
1
367987322b9171fb0d718dd8316abc29
8aadf0e3d994476bb1a3f69f4a7a3183
根据Id立即获取PO实例; <br/> 立即加载,马上执行SQL语句,获取到的是真是对象,若数据不存在,则返回null,不会报错;
SpecialPO selectOneById(Integer id);
1
e3950bec7edf19912232fe3749c8c6fb
a4a691587f360f2c6f185cb3d56338b9
Adds a path relative to <see cref="VisualEngine.BasePath"/>
namespace Vizistata [Serializable()] [ImmutableObject(true)] public sealed class RelativePath : Object, IEquatable<RelativePath>, IEquatable<String>, IComparable<RelativePath>, IComparable public RelativePath Append(String path) { return this.Append(path, false); }
0
ed31be1f10b1b556ee4175c82029517f
707de4ca1f7ae839efce4f017ab213f0
entry point for our program
int main(void){
1
769dbc27ac9908773064200c5e410973
c136995c72db7bd8d0e66bcbea0fab61
https://elixir.bootlin.com/linux/v5.14.15/source/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c#L610
get_vrr_range(data_t *data, igt_output_t *output) { char buf[256]; char *start_loc; int fd, res; range_t range; fd = igt_debugfs_connector_dir(data->drm_fd, output->name, O_RDONLY); igt_assert(fd >= 0); res = igt_debugfs_simple_read(fd, "vrr_range", buf, sizeof(buf)); igt_require(res > 0); close(fd); igt_asse...
1
e3dfa72aae5f9281c4f999b3f527293a
8acb0a16f0003729dae2cfb674b5e50d
AJAX DELETE request to delete data for a given id, passed via the key "id" in an object
class metodosAjaxController extends Controller public function destroy($id) { return response()->json([ 'msg' => 'respuesta DELETE = [ id:'.$id.' ]', ]); }
1
77cfec2985627dac8534016439183198
bc06e25008caf8d490d3d4355595aa39
Enumerate new importable items from the source when FindAllItems button is clicked
namespace TiaPortalOpennessDemo.ViewModels public class MainWindowViewModel : ViewModelBase, IDisposable private void ImportElementCommand_Executed(object sender, EventArgs e) { if (ProjectTree.SelectedItem != null) { var current = ProjectTree.SelectedItem.Tag; ...
0
a63de60f3c4fcd35986492a486e73578
4efb3bec354f4b06c93da8e2d283e61d
The method can be called to clear all current property values from the event. The version is left unchanged.
namespace CustomFunction [Guid("996DC8E5-086B-41b5-919A-A3B9B86F2B30")] [ClassInterface(ClassInterfaceType.None)] [ProgId("CustomFunction.WatermarkFunctionArguments")] [ComVisible(true)] public class WatermarkFunctionArguments : IWatermarkFunctionArguments, ...
1
3ebf697aead596aae480f9ee0c4e3cd4
093001960f808cbe208098b8cdd1a3af
Getting single friend
{ if(false === $username) { return $this->friend; } if(isset($this->friend[$username])) { return $this->friend[$username]; } return false; }
1
0a538ce92fdd5de83db289dcb7b5e037
679bdbe11559f039acc6fd92a62efa88
Test groups entries by weekday
class PresenceAnalyzerUtilsTestCase(unittest.TestCase): def test_group_by_weekday(self): data = utils.get_data() expected = { 0: [], 1: [30047], 2: [24465], 3: [23705], 4: [], 5: [], 6: [], } expected_2 =...
1
f1d05f70f3bd35d27fe1e77a773d26b9
a6307e6748eab7d2a2eb65abee24da39
This method ensures that all links are set to "external" If a user adds a link in markedown that doesn't have the correct "target", the app *will* open it in the current webview, which is obviously bad. This works together with a CSS animation, which is defined in /public/assets/inject/css/all.css
protected function _decorateTarget($string) { $decorator = function ($matches) { $out = ''; $url = $matches[1]; if (substr($url, -3) === '://') { return $matches[0]; } $parsedUrl = @parse_url($url); if (isset($parsedUrl['host'])) { if ($parsedUrl['host'] !== env('SERVER_NAME') && $p...
1
9ca5d561293a32b609697c581dc3241c
287053bc69c46ba476f0329613c9c16e
Metodo para seleccionar en el spinner la respuesta.
public class InputActivity extends AppCompatActivity private void spinnerSelectAction(AdapterView<?> adapterView) { conversion = adapterView.getSelectedItemPosition(); }
1
b102b5629754f99d6aebb388ed971b23
ba098152c4098b94face9f8338db5b1a
주민번호를 인자로 전달받아 객체배열에 저장된 정보를 검색한후 일치하는 경우에만 이름을 반환한다.
public abstract List<?> retrieveWsJuminNo (Map map) throws Exception;
0
25a0a5093742a6c747f6f97fe531b2e7
d8e4df7b0263bcb7708f1fcdbed1641a
Returns a pointer to a new empty stack struct
typestack *ts = malloc(sizeof(typestack)); ts->num = 0; ts->root=NULL; return ts; }
1
ac806adce8f510b568f7a2ea772a031a
d757b8fdd161dfc1fb70ae07d2ce3a28
Deixa todos os carrinhos ativos de um cliente sem carrinho selecionado "Default".
namespace BntWeb.Logistics.Services void SetDefault(Guid shippingId);
0
9ed5ae82ed76f1f8e93ab35a0fbaf366
c865072ed2e61e93edfdc0b473c38f70
流量转换函数
class tf(): def TF(self, F): Tc = F * 1.8 + 32 print(Tc)
0
354178820bcdcec3b5c516cc8f118ac4
75e05afdadd707236a1b88d1e861cf95
Check optional metrics - there should be at least `at_least` matches
expected = set(expected) collected = set(collected) missing_metrics = expected.difference(collected) if missing_metrics: msg = "Expected metrics not found: {}" app["logger"].warn(msg.format(",".join(missing_metrics))) return not missing_metrics
0
fa40ae9f5dbb454bfb2e541ed8791e17
c7365156ea16d76868227ca8b9acf6cf
Undo the last move made.
class ChessBoard: def undo_move(self): if not self.last_state: print("No past moves.") return False self.set_state(self.last_state) self.set_castle_variables(self.last_castle_variables) return True
1
70f92f8db1e9e569f799427835db5f34
39a631014a8dbb72ad3c6a6d8fb48461
Rotate camera to look at the array centerpoint
namespace KT [RequireComponent( typeof( Camera ) )] public class RotationalMovement : MonoBehaviour void LookCenter () { transform.LookAt( ptCenter , transform.up ); }
1
fce8bf1580e6ea424f84025b0e61199a
8b5f6183235ac0b469b7e1a9f4dbef90
Set up the Entur public transport sensor.
async def async_setup_entry(hass, config_entry, async_add_devices): _LOGGER.debug(f"async_setup_entry config_entry.data {config_entry.data}") async_add_devices([CZPubTranSensor(hass, config_entry.data)], True)
1
280c48360501f7c38cbb48ee3d4cfbff
f5ee06b9488da1ba8023a52dfc0106c6
Resets counter/current sequence if we haven't hit a key within the timeframe, or counts down to the next keypress if we have
if (0 == key->counter) { if (0==key->key_cd) key->pressed = 1; key->key_cd = COLDDOWN; } else if (key-> key_cd > 0) key->key_cd --; key->counter = 0; }
1
5d4b47fc323bd7e6efe293380c36ffe3
7d10cc92d658a2ece353ddd17b303d8e
返回s开始的不重复子串的长度
func notRepaetingSubString(s string) int{ lastOccurred := make(map[byte]int) start := 0 maxLength := 0; for index, value := range []byte(s) { if count, exists := lastOccurred[value]; exists && count >= start { start = count + 1 } if index - start + 1 > maxLength { maxLength = index - s...
1
c543019ce54120e89daf0fce4357d4a3
c274df3ad838d42aa50abe7d981ba2be
导入用户配置的公共文件
@PostMapping("import") public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) { try { int successNum = 0; int failureNum = 0; StringBuilder failureMsg = new StringBuilder(); ImportExcel ei = new ImportExcel(file, 1, 0); List...
1
36d91c0a4a8a56159a8b4679fe769f2e
2be5cad663d45939641bf527a54f31bb
是否是根设备,没有父设备的设备,即为根设备。一般网关子设备不是根设备,其他的都是
bool ComponentInfo::isRoot() { return mIsRoot; }
1
5809811eac1aa035d83e359ccb5d5915
953fcc00f037a2a5b5cf50dc22cb346c
Set the state of the 'Log' check box
class MainGUI(QtGui.QMainWindow, mainUI.Ui_mainUi): def _setLogVis(self, state): self.logSplitter.setSizes([1, state]) self._setLogChecks()
0
ea10ee5a7a52c3557c7f45e4ea43d2e4
44f595f37dacdf1dfc82270a70b280ab
八进制转成十六进制
void bajinshiliu(num1){ int m,i,daan; int san[9]={0},ans[9]={0}; int num2,n,a,b; char c,ca,cb; printf("\n请输入您的八进制数字: "); scanf("%d",&num1); i=daan=0; do{ if(num1>0){ m=num1%10; if(m>7){ printf("error!"); exit(0); } if(m-4>=0){ m=m-4; san[i]=1; } i++; if(m-2>=0){ m=...
1
51a145b40c7bb3ef7d0230f8e5610b50
c6c57de320299444d6139e591041944c
Parses the PDB atom records
idAtom = line[12:16] base = line[17:20] x = float(line[30:38]) y = float(line[38:46]) z = float(line[46:54]) return {'base':base, 'idAtom':idAtom, 'x':x, 'y':y, 'z':z}
1
6bd5ee65be504ef45169dd085e7e315d
644d0eba9c51c042415deee7b23560ed
Test for updating custom xml part.
{ $localFile = "DocumentElements/CustomXmlParts/MultipleCustomXmlParts.docx"; $requestDocument = realpath(__DIR__ . '/../../..') . '/TestData/' . $localFile; $request = new DeleteCustomXmlPartsOnlineRequest( $requestDocument, NULL, NULL, NULL, ...
0
f8a86ed425965358faaaab9688b84473
76874b283a9fb055c494aa4348affd3d
näytösten haku funktio katsoo mikä teatteri on valittuna ja hakee sitten sen teatterin näytösten tiedot
{ try { connection.Open(); SqlCommand cmd = new SqlCommand("1SelectShowsSP", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@SelectedDate", DisplaySelectedDatesShows.Selected...
0
a3e6869c62902c059b2d6e4662b4c8c9
cc701890db64282d01031af1966722ae
only rerender if something relevant has changed
export default class ArticlePanel extends Component shouldRerender (newProps, newState) { return ( newProps.articleSession !== this.props.articleSession || newProps.pubMetaDbSession !== this.props.pubMetaDbSession || newProps.config !== this.props.config || !isEqual(newState, this.state) ...
1
0b6e6b1b9fe4325d5e5adf9a11ffc014
0caaedf411a5bc1507057b7ce5122bbd
Function to mark a quest complete
if(player == null || date == null) return; PreparedStatement statement = null; Connection con = null; try { con = connectFactory.getConnection(); statement = con.prepareStatement(FINISH_QUEST); statement.setLong(1, date.getTime()); statement.setInt(2, player.getObjectId()); statement.setInt(3,...
1
434182c3b59ebfbf1163545d5bad7847
64858cd050c8a0434e985bbb2a209f14
This method will insert a FastASeq object into this FASTA instance. Behaviourally this is the same as a list .insert() since our underlying datastructure of the .seq attribute is a list.
class Alignment: def insert_sample(self, i, name, description, sequence, copy=False): self.insert_samples_from_lists( i, [name], [description], [sequence], copy=copy )
0
ab91100b94b3678d657f6885515cbb45
da1b65ad4813338dd3638d17a4a8aba6
gera operandos aleatórios para subtração, de acordo com o nível de dificuldade
if level == "1": arg1 = random.randint(2, 9) operator = random.choice("+-*") arg2 = random.randint(2, 9) return str(arg1) + " " + operator + " " + str(arg2) else: return random.randint(11, 29)
0
5e0b0a92299172f7252f0e5687355f6d
a97ffcb3ac1af96b488aca3e377ba9ed
This method checks for UIDs that we already have in our database and discards them (as we don't want to try to fetch them again).
public class MailSenderServiceImpl implements MailSenderService, Cloneable private boolean isUidExist(String inputUid, String[] existingUids){ boolean isUidExist = false; inputUid = inputUid.trim(); for(int counter = 0 ; counter < existingUids.length ; counter++){ if(inputUid.equals(...
1
3ce885b292822ba6d5d6585c7a9728a7
29356eb7660136cb969cfc7f98722d80
Fold all batch_norm layers in a model into corresponding conv layers
def bn_to_affine_block(block): for name in block._forward: l = getattr(block, name) l.bn1.avg_mean = cupy.zeros(l.bn1.avg_mean.shape, dtype=np.float32) l.bn1.avg_var = cupy.ones(l.bn1.avg_var.shape, dtype=np.float32) - l.bn1.eps l.bn2.avg_mean = cupy.zeros(l.b...
1
e1b646d2f1fcf9dd5086b70934f463db
c06a3705af72c3fc89500e0c0c1de807
测试搜索取消功能
message_page = MessagePage() message_page.open_message_page() time.sleep(2) message_page.scroll_to_top() time.sleep(2) message_page.click_search() time.sleep(2) search_page = SearchPage() if search_page.mobile.is_keyboard_shown(): searc...
0
360ad86677f9583175c364cdea86d705
ff870e78a990641d9712de19a1394d48
Metod för att beräkna kostanden för leveransen.
namespace BikeRentalApi.Controllers public class CostCalculator public double CalculateTotalCosts(Rental rental) { var duration = rental.RentalEnd - rental.RentalBegin; double totalCost = 0; if (duration.TotalMinutes <= 15) { return totalCost; ...
0
bc2025485d10eca5106448485b52532f
ce11520a823d2d2afa07f7bd671c4a36
复制模板中的英雄数据到城市英雄表
$errNo = T_ErrNo::ERR_ACTION; $data = array(); $objPlayer = $this->objPlayer; $cityInfo = $objPlayer->getCityBase(); $vipLevel = intval($vipLevel); $vipConf = M_Vip::getVipConfig(); $strHero = isset($vipConf['HERO_AWARD'][$vipLevel]) ? $vipConf['HERO_AWARD'][$vipLevel] : ''; $arrQual = explode(...
1
398364cf05e54d86c8a19efc4adff38e
dd39186bbe31e2506c897db07af922a8
Gets the average active time, in nanoseconds, per execution, excluding own time.
public final class ReflectionExecutor public static double normalExecAvgMillis() { return ((normal_exec_duration_nanos / (double) normal_exec_count) / Math.pow(10, 6)); }
0
431f56f5b9dce532e4c33fd17e5a9ea9
65494d6942e8fb1f9b0b1d240281a7a1
testDeleteTab_ByOlder: Attempt to delete tabs with a Older filter works
public void OldDutyChangesDeleted() { List<PairingDutyChange> dutyChanges = GetDutyChanges(); IDataAccess dataAccess = GetMockDataAccess(dutyChanges); var sut = new UpdateCPDutyJob(); JobResult result = this.RunJob(sut, dataAccess); Assert.AreE...
0
614b38122bbb685a86fa1277a64b6043
33ffd9dfbd9679dee7d3af5cfaec587d
kolejne wywolania to uruchomienie po kolei testow z zachowaniem odpowiedniej kolejnosci, tzn testy zostaly wywolane w takiej kolejnosci aby nie korzystaly z niesprawdzonych jeszcze funkcji
assert fixtures_test_module.TestSecondFixtures.get_order_of_operations() == [ 'setup_class', 'setup_method', 'test_a_regular_case', 'teardown_method', 'setup_method', 'test_another_regular_case', 'teardown_method', 'setup_method', 'teardown_m...
1
820595e9440459c38e9b206adf4ea83d
45e21d978a2bdda3f4b8513cfac80606
načíta inzeráty zvolenej agentúry
Vector<Ezaugarria> ezaugarriZer = new Vector<Ezaugarria>(); CallableStatement st; ResultSet rs=null; try { st = konexioa.prepareCall("SELECT IrteeraDeskribapena, IrteeraId " + "FROM Irteerak " + "WHERE AgenteId=" + id +" ORDER BY IrteeraId"); rs = st.executeQuery(); whil...
1
e4cd6409b656794a05c33af6878e8d9f
70822d159f3094ac55126b6d8f3f9995
Construct a bounded context.
namespace Lykke.Cqrs.Configuration [PublicAPI] public static class Register public static IBoundedContextRegistration BoundedContext(string name) { return new BoundedContextRegistration(name); }
1