query_id
string
corpus_id
string
query
string
code
string
label
int64
38ccb5b8cbfc4ea2525602550800ed77
e021fec9e80257004b431c855570eb06
Dequeue the given process from the wait queue on the given resource.
{ READ_MODIFY(MEMORY_INTERLOCK_BASE + 1, DO_LOCK, SUSPEND_UNTIL_LOCKED, &LockResult); QRemoveHead(ReadyID); READ_MODIFY(MEMORY_INTERLOCK_BASE + 1, DO_UNLOCK, SUSPEND_UNTIL_LOCKED, &LockResult); }
1
c3feefda9db5fc5992719079e8afe173
c0c2fa71bb55112307ec7887f34627ec
设置ExpandCollapseToggle背景颜色附加属性
class StringExpandUtils private constructor(private val mTextView: TextView) fun setOpenSuffixColor(@ColorInt openSuffixColor: Int): StringExpandUtils { mOpenSuffixColor = openSuffixColor return this }
0
b8fdcb74df4a9cf6bf04afb38c5501a5
802e7c7f6cb961eb448af18b0dba109e
Factory method that creates the input attribute map for a newly created {@link FlowExecution}. This implementation uses the registered input mapper, if any.
public final class ArchetypeDescriptor public InputFlow inputFlow() { return inputFlow; }
0
94ad84efd1edb03a39f0882455ce4a67
723088a9c6d0675b23c1a67ebe365eb2
Mastermetod för att uppdatera alla prisliste-combos i systemet.. 4 ställen Anropas i början och vid ändring i prislistor..
function updateAllCosts() { var count = parseInt(document.getElementById("countProduct").value) || 0; var countTwo = parseInt(document.getElementById("countProductTwo").value) || 0; document.getElementById("subtotalPrizeTable").innerHTML = MONEY_SYMBOL + count * 100; document.getElementById("subtotalPri...
1
bd0d32392a552a074243c727df4a86bc
a9be744f4657af3fe4243f4e29758cb3
GetTopicMessagesCollectionDataProvider constructor.
CoreHelper $helper, Context $context, CollectionFactory $collectionFactory ) { parent::__construct($context); $this->helper = $helper; $this->collectionFactory = $collectionFactory; }
1
e51076430dfed3ab2adf13f443359961
7c360506eb76192cf5e90ed28b7ad4c6
날짜를 지정하면 20190601식으로 리스트를 반환합니다.
public class DateUtil public String getDate(int year, int month, int day, String gubun) { String date = ""; String yearStr = String.valueOf(year); String monthStr = (month < 10) ? "0" + month : "" + month; String dayStr = (day < 10) ? "0" + day : "" + day; date = yearStr + gubun + monthStr + gubun + daySt...
1
ba792cf2f23ab82e13b59049805cd517
acaa90b7e26fd55c91f791809a1cf2ff
Calculate the outer minus Equivalent to the outer product, but with the product operator replaced by minus
class pytorch_backend: def outer(self, tensor_in_1, tensor_in_2): return torch.outer(tensor_in_1, tensor_in_2)
0
0b94ab57c7b2c21e5a3e20d05e5fba31
8bcbae9c5f6804fc8e7849efbad22547
Check each custom attribute of the property for the "Required" attribute.
{ if (propertyInfo.GetAttribute<RequiredAttribute>(true) != null) return true; if (propertyInfo.PropertyType.IsPrimitive) return true; switch (propertyInfo.PropertyType.Name) { case "DateTime": case "Decimal": re...
1
a69d082b5579225554d7718110927c8d
d90710a021007bab020321abdf02d142
Enable masks for [reset, start, stop, trigger] signals
{ sigset_t sigset; sigemptyset(&sigset); sigaddset(&sigset, SIGALRM); sigaddset(&sigset, SIGCHLD); if (sigprocmask(SIG_UNBLOCK, &sigset, NULL) < 0) { perror("signals_enable: sigprocmask"); exit(1); } }
0
9419c0f2c677e45998b1cbe921173959
14370e8dcd878744afda466c6242e869
Send a message to all players in the room, optionally exclude up to two players
List<Player> l_dest = habitantes.getAll(); l_dest.removeAll(Arrays.asList(except)); for (Player p : l_dest) { p.getControl().send(msg); } }
1
276ebdd776db80c04cc3affdfd950db2
fc12d50e4f9365d108e59094c15ca9f7
Simply ensure that attrArg is a dictionary
class AttrDict(dict): def __setitem__(self, key, value): if type(value) == dict: value = AttrDict(value) super(AttrDict, self).__setitem__(key, value)
0
9fda7fa99f2e5f9bb347c21ff652dd0b
6aafbf2244aac6a0aa3aa4a3cbf7140d
Closes replies from a comment.
c = get_comment(comment_id) if c: if not c.can_close(user): return c.is_open = False c.save() return c
1
a70b70d91057e7ff970a7e76c18729e9
4de0558711f240ee82c6d74065afebf4
Остановка воспроизведения КА
namespace MatStudioROBOT2016.Models public class Sound public void Stop() { if (source == -1) return; AL.SourcePause(source); }
1
ccb5c554f6e300c6eb7f2ddf8a4b744b
fb7efed25a9bea283e07175fdd4957b3
individual relations until no more variables can be updated. You are not allowed to modify this function.
def initialize_interdependent_variables(session, vars_list, feed_dict): vars_left = vars_list while len(vars_left) > 0: new_vars_left = [] for v in vars_left: try: session.run(tf.variables_initializer([v]), feed_dict) except tf.errors.FailedPreconditionErr...
1
998d7cc083507f1763deaa01195021c5
b6b02f6048e8c1c9cb2e4c619dfb1ae5
Control the 3D secure parameter setting.
public class GenericCardFormBuilder<T> extends GenericFormBuilder<T> @SuppressWarnings("unchecked") public T exitIframeOn3ds(Boolean exitIframeOn3ds) { addNameValuePair(FormBuilderConstants.SPH_EXIT_IFRAME_ON_THREE_D_SECURE, exitIframeOn3ds); return (T) this; }
1
66d4e57d46c735541fe1782e80e29045
b8ffa000316ddcf764156243d4856412
frees all dynamically allocated memory associated with a smallSectorBoard
BBIS_HANDLE *brdH, int32 retCode ) { if( brdH->smbH ) { if( !brdH->alreadyInitialized ) { ((SMB_HANDLE*)brdH->smbH)->Exit( &brdH->smbH ); OSS_SetSmbHdl( brdH->osH, brdH->smbBusNbr, NULL); } } if (brdH->descH) DESC_Exit(&brdH->descH); DBGEXIT((&DBH)); if( brd...
1
ec6d6c321f44fe42d0a54b1cd1ca4eb0
3b21976c1b9386eddd109ffceb462eda
判断实际到期日,如果是,则计息日为实际到期日,否则,查找第一个工作日为实际到期日
public class SettRule extends BaseEntity private Date calculateNextSettleDay() { Calendar calendar = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Date date = new Date(); Integer type = this.settCycleType; String[] data = this.settCycleData.split(","); if (type == Sett...
0
07c1a49ae54fed037c3dfb35c69ac7dc
252f007ca0b8cdfb1906fd0938f49ad8
Calculates the right-hand side of dP/dm.
n = Aexpm.shape[1] for q in range(m): grad += Aexpm[q*n:(q+1)*n,:].T.dot(dXmPi.dot(Aexpm[(m-1-q)*n:(m-q)*n,:].T))
1
08630ca6854c70f2d08c0b0c84456c23
1c06fee7c02e2977bd3fe458bfa1b869
Fetch the user-friendly name for a role
{ cancellationToken.ThrowIfCancellationRequested(); if (role == null) { throw new ArgumentNullException(nameof(role)); } return Task.FromResult(role.NormalizedName); }
0
e322d35e6570e0b3833330d062088c06
53faa53b997c053c15c6b7f6fdc989ba
remove the key specified by this publicKey.
class Client(object): def keys_delete(self, pubkey): return self.call(method='DELETE', path='/keys/{0}'.format(pubkey))
1
7c85825314114bb641ed56dabbc92adb
56efc3efcc12aa482249680335278329
Computes the distance between two circles' centers
def distance_between_circles(c1, c2): dist_squared = ( (c2['x_pos'] - c1['x_pos'])**2 + (c2['y_pos'] - c1['y_pos'])**2 ) dist = math.sqrt( dist_squared ) return dist
1
8be3e26b773db07c0218958a542bcaec
bdc3b8aa791911c5c27fde4884e18d76
对静态成员执行动作
{ if (act != null) { ActionHandler h = act.GetStaticHandler(); if (h != null) { if (h.handlers.ContainsKey(target)) { ActionHandler.ActionHandlerDelegate d = h.handlers[target]; if (d == null) return h.handle...
1
d926a2f649ad65fd3c7cbc3138526fc5
459dd0303ed256134820d5d7c37430b0
Compare analytic coc, dipole and quadrupole moments.
def test_get_mo(qcp): cmo = qcp.get_mo() npt.assert_allclose(cmo, [[.54884227, -1.212451936], [.54884227, 1.21245193]])
0
b64a9cbef7cd73573502a5589b0342c7
9c0f31250b26ac78e1e8f9f80ed2bebe
A tree is "visible" if it is visible from at least one side (left, right, top, bottom) of it.
def visible_from_outside(i, j): return any(visible_from_direction(i, j, d) for d in DIRS)
1
c35aa67fa4dd82421cdaaa64d1822703
e311b2ea666418c733629b9049baac99
Holds a DataFrame along with associated columns of interest.
class DataFrameModel(QAbstractTableModel): def __init__(self): super(DataFrameModel, self).__init__() self.df = DataFrame()
1
ad77c4c397bdc4fed754779f4514d870
3ee311e39592209b2cf08a3403835ada
The number of test cases is the number of rows
try{ int ncases = Integer.parseInt(br.readLine()); for(int i=0; i<ncases; i++) { String[] line = br.readLine().split(" "); int rows = Integer.parseInt(line[0]); int cols = Integer.parseInt(line[1]); int holes = (rows-1)*(cols-1); pw.println("Case #"+(i+1)+": "+holes); } }catch(Number...
0
b877fe3c79b36b4f94143f9c6ae6d66f
0d0eb464a38de9c3e71b43e06be6f9ee
Same as DynamicSubqueryPruning, but the subquery is not executed. Thus, we fail.
const auto query = "SELECT ?, (SELECT ? + MAX(b) + (SELECT int_float2.a + ? + int_float2.b) " "FROM int_float2) " "FROM (SELECT a + ? AS k " "FROM int_float) s1 WHERE k > (SELECT ? " "FROM int_string)"; const auto [actual_lqp, transl...
0
9e84d2d61699329d81dcfc21b283fcf3
0bcbcc75ae0a7f2be5ceb3eacf026687
创建留言数据库
ids = [int(data['mid']) for data in self.datas] if not ids: mid = '00000' else: mid = '{:0>5}'.format(max(ids) + 1) if context is None or context.strip() is '': return False, "留言不能为空!" message = { 'mid': mid, 'now_time':...
0
5e23bdbbae61193dbdbbd07a3854d047
b32e25ea23b76ace11d02ee77f32c938
Called when the X axis JScrollBar changes.
void Plot::horzScrollBarChanged(int value) { if (qAbs(ui_plot->plot->xAxis->range().center() - value / 100.0) > 0.01){ ui_plot->plot->xAxis->setRange(value / 100.0, ui_plot->plot->xAxis->range().size(), Qt::AlignCenter); ui_plot->plot->replot(); } return; }
1
2a91eeee57d6d69b61f9921e6731b4d6
af71a19315b04c1f9c3f7926293c1e4a
Export downloaded images report to file.
{ string extension = ReportService.GetExtensionByFormat(exportFormat); string fileName = response.FileName; fileName = Lers.Utils.FileUtils.SanitizeFileName(fileName); string directoryName = StorageDirectoryService.Get(); string fullName = Lers.Utils.FileUtils.CreateFullFileName(directoryName, fileName...
1
5696db53a8b14575f4827cda27e4cb6b
feccc18a9fb2cd667bf928d07acce3b6
删除采购单主表
@ResponseBody public Map<String,Object> deleteMatPurMain(@RequestParam Map<String,Object> mapVo,Model mode) throws Exception { if(mapVo.get("group_id") == null){ mapVo.put("group_id", SessionManager.getGroupId()); } if(mapVo.get("hos_id") == null){ mapVo.put("hos_id", SessionManager.getHosId()); } if(...
1
80f8a0cb8125649d55fec423bb8e614b
4b0e58fc35e7caa9450999f1d54a926d
Обновить баннер
namespace Explore.Services.Content public partial class BannerService: IBannerService public virtual void UpdateBanner(Banner banner) { if (banner == null) throw new ArgumentNullException("banner"); _bannerRepository.Update(banner); }
1
11931bca453927275f2894f1baa9c93f
86056b29722051b1d68e4bf8222b7e66
Tries to print all 256 colors
def printAvailableColors(): for i in list(color.keys()): print(i)
0
748a6ada01e3cedc9c82408d200d8fd5
9927f3f367cc92fd6d74ed2714b6074e
Функція, яка записує розмір картинки, що буде передаватися сцені
class ImageContainer extends React.Component setRenderSize ({ width, height }) { this.setState({ 'renderSize': { width, height } }) }
1
d25ff77e51fc97490ffa769c0ae713e2
09438476b7d9c247481c62a52660d0e8
Handle new task return of each host.
host = result._host self._write_to_save({ "host": host.name, "result": result._result, "task": result.task_name, "status": "unreachable" })
1
74ee42e858705df5afdcb683ecc18723
e949c7452cce20f5c00d5b07e89fabfc
Returns a list of links to explore sorted by similarity to the dest
List<Link> linkList = null; if( destNode.getPrevLink() != null ) { linkList = new ArrayList<>(); Link prevLink = destNode.getPrevLink(); while( prevLink != null ) { linkList.add(prevLink); prevLink = prevLink.getUpNode().getPrevLink(); } Collections.reverse(linkList); } return linkList; ...
0
9d73d4495705c32ccdb2fa36103dde2a
49a291eaf51ef302ab6f215652607050
就是以一定的速度比例t,平滑的从start位置移动到end位置;
{ float dx = end.X - start.X; float dy = end.Y - start.Y; Func<float, float> x = (time) => (start.X + dx * time * speed); Func<float, float> y = (time) => (start.Y + dy * time * speed); return new Movement(x, y); }
1
5e6913a76d1d402520f4344c216146fa
df46922582f64c0be65e05d3123b10a0
将日期时间格式的数值还原为日期类型
dateFromString(time) { dtstr = time.replace(/\D/g," "); let dtcomps = dtstr.split(" "); dtcomps[1]--; let date = new Date(Date.UTC(dtcomps[0],dtcomps[1],dtcomps[2],dtcomps[3],dtcomps[4],dtcomps[5])); return date; }
1
e076e12bdab7c5306d3e3100d5d14c38
76cfe9ca35a6f70cb4456477c4f60b79
查找备付金账号创建日期
{ List<AccountDateResultDTO> result = null; var tcdmse = SingleQueryObject.GetObj(); var pp = tcdmse.master_AccountDateInfo.AsNoTracking(); result = Mapper.Map<List<master_AccountDateInfo>, List<AccountDateResultDTO>>(pp.OrderBy(o => o.AccountDateYear).ThenBy(o =>...
0
30245b4121cd31b30830ea036732f88e
99e0d59aa91457f93437010a370e575a
Lists all FeedsFavoritos models.
{ $searchModel = new FeedDataSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
0
e7835e42565da393a2b313315feaed0b
7a38feeafa99f7a311c7aeedf5797af8
Calcule la distance Hamming entre les formes binaire de deux adresses IEML http://fr.wikipedia.org/wiki/Distance_de_Hamming
class Flux_Ieml extends Flux_Site{ function getDistanceHamming($bin1, $bin2){ $ham1 = gmp_init($bin1); $ham2 = gmp_init($bin2); $d = gmp_hamdist($ham1, $ham2); return $d; }
1
1f5bcb975af65c074a7af19288c6253c
22aa2e97514423f7d9b047aa349be6ee
Gets the delta value as an object.
IDelta getDelta();
1
812e8f1e2aefdf010ac3e4126ef3539d
a4eb1b662eff393d976fe5173a1c3ef2
This function is used to determine the rotated angles of each side of the square.
tl,tr,br,bl = listPoint return [FindAngleFromTwoLines(bl, tl, tr), FindAngleFromTwoLines(tl, tr, br), FindAngleFromTwoLines(tr, br, bl), FindAngleFromTwoLines(br, bl, tl) ]
1
0e7bd3b704fa8dbce05245fc2e74c3fb
537fdfa5703d7f2eb6bbb50c9713c368
Queries if the encoder will handle granule marking. MT safe.
{ Q_ASSERT(GetFrameType() == IEC104_U_TYPE ); BYTE nControlByte1 = GetUIntValue(2,1); return (nControlByte1&0x20)!=0; }
0
bcc82150f421fe2652c27214feeb85c0
8734defe3d502d814e3f682d4e52977c
Getter de la liste des ordinateurs connectés à l'imprimante
{ List<String> fPrinters = new List<string>(); fPrinters.Add(DefaultPrinter); foreach (String fPrinterName in PrinterSettings.InstalledPrinters) { if (!fPrinters.Contains(fPrinterName)) fPrinters.Add(fPrinterName); ...
0
73cf07c1e18cffa67d40962f477a67a1
8159cf0a21280de00e8a4227ac123a21
Get arrival master by Id for edit data fetch
{ return $this->fetch([ "{$this->col_masterDeviceId} = ?" => $id, ]); }
1
7d80c38964a6caf7336584e464c75105
c2f3c8bdb507ea057f24a79550d3587a
Creates the dynamic type without loading it.
namespace DynamicLoad object CreateInstance(string typeName);
0
2ac2c2752df168e5f4323afb2538515b
0e96078f910de4b5dfdf0690cc63e3a8
Conteggia i valori unici assunti da un determinato attributo, per ogni valore unico indica il numero di occorrenze.
def get_attr_values_dicts(data_class): dicts = [{} for _ in range(data_class.attr_count)] for i in range(data_class.len): for j in range(data_class.attr_count): if data_class.data[i][j] not in dicts[j]: dicts[j][data_class.data[i][j]] = 1 else: dic...
1
a2f047ccbe4c7ac6813cfd0763b04dac
b5d1b9892ba7d732f5522db1da9c772b
获取离开天数
class User extends ActiveRecord implements IdentityInterface public function getLeaveTimeDays(){ return $this->getLeaveTimeInDays($this->time_unit,$this->birthday); }
1
f5f67471920bb1f3e3d1a69918b5bfaf
1dc0fdf83f4c67870ba0de5e0694c56c
获取价格标记值
class ApiController extends Controller public function actionGetPriceTag() { $post = \Yii::$app->request->post(); $house_id = empty($post['house_id']) ? 0 : $post['house_id']; $seat_id = empty($post['seat_id']) ? 0 : $post['seat_id']; if (empty($house_id) || empty($seat_id)) { ...
1
dc4648938f3675c00dafca32a21d7648
2b11e8082555fa47e57a2af616925665
返回绝对的包围盒,就是说,如果节点是运动的,经过变换的,返回的包围盒也会是经过变换的。
function ArmatureRender:getBox() return self.render:getBoundingBox() end
1
eaffbd39a806cdda4613f329d87897e8
b00fb3d7aa5d1b7d6f437de6194b4681
xác định hs giỏi có dtb >=8
function hsgioi() { var table = document.getElementById("mytable").getElementsByTagName("tbody")[0]; for (var i = 0; i < table.rows.length; i ++) { var tbcRow = table.rows[i].cells[5].innerHTML; if (tbcRow >= 8) { table.rows[i].style.color = "red"; } } }
1
044a57c73145ac94c2b16254fe307b9e
a68ff828542a371ad8c8a7147ed98a72
根据Redis中保存的两个set集合进行差值计算,获得垃圾图片名称集合
public class ClearImgJob public void clearImg(){ Set<String> set = jedisPool.getResource().sdiff(RedisConstant.SETMEAL_PIC_RESOURCES, RedisConstant.SETMEAL_PIC_DB_RESOURCES); if (set != null && set.size() > 0) { for (String picName : set) { jedisPool.getResource().srem(RedisC...
1
7efca5c6f41ddf170cd003fc4f34affc
5e7fd4414f9a24b994de3825b1b3777e
Enables traversal through torrent listing via j/k keys.
public class Display extends Container @Override public boolean isKeyTraversalRoot() { return true; }
0
959051a5451a2849c57bfbc3be0515e8
8199a038fe9a9a59534f70001c2e0835
<h2>根据提供的领取优惠券请求生成 RowKey, 只可以在领取优惠券的时候使用</h2>
@Slf4j public class RowKeyGenUtil public static String genPassRowKey(GainPassTemplateRequest request) { return new StringBuilder(String.valueOf(request.getUserId())).reverse().toString() + (Long.MAX_VALUE - System.currentTimeMillis()) + genPassTemplateRowKey(request.getPassTempla...
1
4890d78b6d5c8e36bab9ab186265afbb
2e9fdb8a754349adb70cf325a19cee68
Method for getting other user profiles
let otherUsername = context.params.username.substr(1); context.otherUsername = otherUsername; let username = sessionStorage.getItem('username'); context.username = username; let chirpsRequest = requester.get('appdata', `chirps?query={"author":"${otherUsername}"}`, 'kinvey'); let followingRequest...
1
6110ca15de41bbf4e4527260fe145d89
761a5e9f2f62bff299232fd2da424729
Returns the set of optical slots occupied in all the traversed fibers of this lightpath
public List<OpticalPortListModel> getOpticalPortList(ParameterModel model);
0
e0ce52cd0924a59ce026ada4ac32d771
f5f8db516d35de035ba58d110b90993a
Ensures that the three argument constructor throws an IllegalArgumentException when given a zero identifier.
public class MatchIdentifierTest @Test(expected = IllegalArgumentException.class) public void testOne() { String a="AAAAA"; new MatchIdentifier(a,null,null,null); }
0
60b90a9f47bb85f3a9d9ffd8e254565a
d688fb8d492542b9cf25fd3f2083bd91
Cancels out the lower two bits which can be used to store information.
public final class InitialByte implements Comparable<InitialByte> public static int maskBits(int initialByte) { return initialByte & 0x1f; }
1
176a40f05722912b02c6108b4477fdf8
086846646bec05dbd8c241ffbeabf781
函数介绍:读取同步所需标定点 输入参数:无 输出参数:无 返回值 :成功返回true,失败返回false
bool DeviceStatusAnalysis::Init() { if(!m_dataSetPoints.Init(Config::GetInstance()->GetDatasetDaPointFile())) { LOG_ERROR("1 NULL load file fail"); return false; } else { WgjFunctionEx::GetInstance()->LogSend(LOGINFO::INFO,LOGINFO::NORMAL,Config::GetInstance()->GetDatasetDaPointFil...
1
58d8367002f92dd013b28d9472afc0d3
b56d5a124266feb6c38a97708aaa14c0
Update the network with new events. If the network has accumulated enough events this function will also train it
namespace NICE_Networking [RequireComponent(typeof(ClientManager))] public class ClientBehaviour : MonoBehaviour private void updateNetworkEvents() { if (networkEndPoint != null) { networkDriver.ScheduleUpdate().Complete(); } }
0
8cf918b22efeb9c4c2dcc2b038bba143
159568691fcd72af62cf5c1ad941aee8
Autentica no Active Directory
class adLDAPUsers public function authenticate($username, $password, $preventRebind = false) { return $this->adldap->authenticate($username, $password, $preventRebind); }
1
85cb4a2bace372107e9dd0606b7f4f03
29ab8478563baa5c81eeb70b90250a6d
某段时间的注册用户回到本月的用户
{ var newRegistered = memberAll.Where(r => r.CreateTime >= bgnDate && r.CreateTime < endDate); return newRegistered; }
0
c04f0a5aa5bc8875c765cabb048e8e5a
1ce03e197f8aa42d242fa8c0814fbc56
Performs compilation of a Cap'n Proto file into it's binary representation
async function compileWat( watPath: string, optionsOverrides: WasmFeatures = {} ) { const wabt = await initWabt(); return wabt .parseWat(watPath, readFileSync(watPath, "utf8"), { ...defaultWabtOptions, ...optionsOverrides, }) .toBinary({ write_debug_names: true }); }
0
7a4fa1f6624bfeeb91be856fecdfc899
fa797023592a1fd24d09987b9be62c5e
Positions and draws the correct keyframe in the thumbnail.
namespace Solutionizer.Controls public partial class FluidProgressBar : UserControl, IDisposable private void UpdateKeyFrames() { var width = ActualWidth; if (width > 0.0 && Visibility == Visibility.Visible) { var Point0 = -10.0; var PointA = width*KeyFrameA; ...
1
da48aac0252a8bac40c48b32bf0e430a
374c179081ef12da3d5fc3037c5c60ea
Handle custom events, mainly flushUpdates
public class JDasherView extends javax.swing.JPanel implements MouseListener, KeyListener, JDasherMenuBarListener, JDasherHost, dasher.utils.FontListener public void handleEvent(dasher.events.CEvent event) { if (event.m_iEventType == 1) { dasher.events.CParameterNotificationEvent evt = (dasher.even...
0
8aec1e51dd3e25a2caa03b07ac524189
30ad9ceb1a7c1c8402ad9da7746cc0a5
Store the displays flag indicating if a palette is used
void rdp_select_palette( uint8_t pal ) { use_palette = pal & 15; }
0
42286eabab38d8e4ace03fe24b8f4dd7
0293cb622523358e13257926ea4a41e4
Enter safe for GC state. When thread is in safe state it is allowed to execute code at the same time with the GC. Returns current state to restore later.
namespace Azos.Collections internal class state internal void recycle() { m_CallDepth = 0; m_Flow.Clear(); m_Visited.Clear(); Thread.MemoryBarrier(); if (null == Interlocked.CompareExchange(ref s_Cache1, this, null)) return; if (null == Interlocked.CompareExcha...
0
fc4df9751b5f1ae64b9bbf762c75ee2a
d25e47c6ab6914844596af8ab30d09fd
Ставим оценку лектору
class Reviewer(Mentor): def rate_st(self, student, course, grade): if isinstance(student, Student) and course in self.courses_attached and course in student.courses_in_progress: if course in student.grades_students: student.grades_students[course] += [grade] else: ...
0
42cc673f7aaf7a3a691bca5bf3325505
815cbdcd632093704a0fefc5ef5a2c5b
CombineTransform [GDI32.@] Combines two transformation matrices. PARAMS xformResult [O] Stores the result of combining the two matrices xform1 [I] Specifies the first matrix to apply xform2 [I] Specifies the second matrix to apply REMARKS The same matrix can be passed in for more than one of the parameters. R...
string transformationType, HTuple px, HTuple py, HTuple l1x, HTuple l1y, HTuple l2x, HTuple l2y) { IntPtr proc = HalconAPI.PreCall(265); HalconAPI.StoreS(proc, 0, transformationType); HalconAPI.Store(proc, ...
0
6b4061930df19202a555d8d9387b053f
36ceab0037bdc04ff3a6c4da6ef2aa4b
Get updates from friends. Calls the delgate once for each status object received.
begin self.friends.delete_all friend_ids = client.friend_ids(user_id: self.uid).to_a friends = friend_ids.each_slice(100).to_a.inject ([]) do |users, ids| users.concat(client.users(ids)) end user_friends = [] friends.each do |f| friend = Friend.new(user: self, uid...
0
8abd70fde51c787fa57a156512b69da3
a88e3418b9b182533fbe602aa54c2565
索引方法,返回api列表.
class Index extends KuMEXApi public function getList(array $params, array $pagination = []) { $response = $this->call(Request::METHOD_GET, '/api/v1/index/query', $params + $pagination); return $response->getApiData(); }
1
4605265d7152decfdd49191a42768c99
408ea85de513c28cd4501ffe8f53a186
Ebay 广告费
class TeamAd_Model extends CI_Model function ads_cost($dateS='',$dateE='') { $dateS = strtotime($dateS); $dateE = strtotime($dateE); $dateA = $dateE-$dateS; if($dateA>0){ return ($dateA)/(3600*24)*1; }else{ return 0; } }
0
0f750ecd75f0542604ccd50cc63657a8
303e211392d2b6ba22ddc77b9d63e7f6
@brief Read metadata about siblings.
public class KBCaller public String siblings( String exp ) throws IOException { return launch_http( "/siblings/" + encode( exp ) ); }
1
ca4e229f9acdbbcc7bbf0b324eaff06c
7a38c55007bac2da4251ba0155c9685a
Función que recibe el formulario con la petición de búsqueda y envía los resultados a las vista correspondiente
$.ajax({ type : "POST", async: false, url : "../controllers/SolicitudController.php", data : { llamadoAjax : "true", opcion : "buscarSolicitud", titulo: $("#tbxTitulo").val(), isbn: $("#tbxIsbn").val(), codTopografico: $("#tbxCodTopografico").val(), codUsuario: $("#tbxCodUsuari...
1
d6dd3462bef4581b6bae891e3d7fd146
0a0c3d1cd2bc6c0606de4c43ce8902ad
in deze functie komt alles te staan wat er moet gebeuren als het spel is afgelopen
{ Definitions::tft->setCursor(10, 10); Definitions::tft->setTextSize(3); Definitions::tft->setTextColor(ILI9341_BLACK); if(winner == 0) { Definitions::tft->fillScreen(ILI9341_ORANGE); Definitions::tft->setCursor(10, 10); Definitions::tft->println("Gelijkspel"); } els...
1
3f3e1a2b4bd5f2cf6ed64271a0ae3ef8
c8e920749687ebb0ee80b7cf17237f39
Determine the standard keyword arguments to pass to list() method.
listkey_options = ['listkey_count', 'listkey_start'] listkey_args = {k: kwargs[k] for k in kwargs if k in listkey_options} return listkey_args
0
5735404d188a270b1f010fab9c259a40
76eb04ef246d2c8a2282feef80414006
处理sop大件日历信息显示
{ DailyGoods_visualizeinfo objvisualizeinfo = DailyGoods_visualizeinfo.GetDailyGoods_visualizeinfo(this.ROW_NO.ToString()); madename = objvisualizeinfo.MADENAME; madetime = objvisualizeinfo.MADETIME.ToShortDateString(); dependencematters = objvisualizeinfo.DEPEND...
1
709b985b8f50f69e2e90e1a037abad9e
3b269abcf1516ad37f004f779f218b24
Reindexed products with price which depends on date
class Bootic_Bootic_Helper_Product_Inventory extends Mage_CatalogInventory_Model_Observer public function reindexOrderInventory(Mage_Sales_Model_Order $order) { $productIds = array(); foreach ($order->getAllItems() as $item) { $productIds[$item->getProductId()] = $item->getProductId(); ...
0
749c60754ce7ccbe9b0a35335cf53303
e59a6cfb7d1128d9265e556c8cd68a1d
Constructs a multinomial probability distribution.
class MultinomialDistribution(ClassDistribution): def __init__(self, random, probs): super().__init__(random) self._probs = probs
1
bdc04cd768a187aa296a63e98cadf3d4
f9f5959221c2f32dbc5d6e018d0643e5
Answer the redzone size plus space for any signal handlers to run in. N.B. Space for signal handers may include space for the dynamic linker to run in since signal handlers may reference other functions, and linking may be lazy. The reportheadroom switch can be used to check empirically that there is sufficient headro...
{ if ( !enabled ) return 0i64; if ( bufferSize < 0x400 ) bufferSize = 1024i64; return bufferSize + 176; }
0
e99e584c2002f44bbd9463461aa8a31c
a09fd420bab383cf2f711085f2d8ff8b
[initToolBar 初始化工具栏的按钮状态]
public partial class CAA_CAA131 : WUI.BaseSecurePage private void ToolBarInit() { GMToolbar1.PageProgramCode = this.PageProgramCode; GMToolbar1.PageCode = this.PageCode; GMToolbar1.GMToolbarStatus = WUI_GMToolbarV.GMToolbarStatusEnum.Other; GMToolbar1.ButtonEnableControl(WUI_GMToolba...
1
94aafcc89c2b2c519138029c9872731c
615bef2e4fa3df208996ccecdba84f1c
Find the file path in local PC of depot file @depot_file Note: p4 where does not check file exists is local or not. So local path of file that already removed from depot will also found
public String getLocalOldPath(String filePackage) { String localDir = GitRepoUtil.getLocalDir(super.versionController.getRepoUrl(),customizeConfig.getGitLocalBaseRepoDir(),""); return PathUtils.getClassFilePath(localDir,versionController.getBaseVersion(),filePackage); }
0
f4dce22e92df978184f54bb33501681f
5c399b10d911f24c988968b22763fb16
驱散部分怪物(怪物放入缓存池中)
Monster monster=null; List<Monster> delList=new ArrayList<>(); for(int i=0;i<monsterList.size();i++){ monster=monsterList.get(i); if(null==monster){ continue; } monster.updateShift(shift); if(monster.getX()<0){ ...
0
a8c302bcfeadc2e2ce80446bd2e78562
157086baffff1cd85878d17c0b2bbdb5
======================================================= Actually filters out quickchecks, but shows all OHW =======================================================
from_url = url_for('whoswhat_report') chaps = get_chapters() user_filter_states = [] ufs = get_userfilters() for uf in ufs: uf_selected = uf.id in checked_ufs uf_tmp = {'id': uf.id, 'summary': uf.summary, 'description': uf.description, 'checked': uf_selected} user_filter_stat...
0
e6d84e1dc58118a6f7d57280b2f3da59
b6e0f586572033cf5c0eb9692275deab
将一串以默认逗号分隔的数字转换为Long的list
@Slf4j public class StringUtil public static List<Long> toLongList(String longs) { if (isEmpty(longs)) { return Collections.emptyList(); } String[] strNumbers = longs.split(","); List<Long> list = new ArrayList<Long>(strNumbers.length); for (String str : strNumbers) { list.add(Long.valueOf(str)); } ...
1
449f8c4b31a6b8b5122f981641925513
7f266065986a8fbffd1baa319b2be92f
編集コマンドを実行する(ブロックの開始と終了を伴う)
{ bool needssave = false; UpdateDocument(new Action(delegate() { for (int i = start; i <= count; i++) { var elementname = String.Format("editcommand{0}", i); var element = _GuiHost.Document.GetElementById...
0
f80e1a53f13ba2bdb200da0869515833
77f2e6cd5de2a1e2e63c27c594e6b284
Radius of curvature of the parabola
def parabola(x): return (x**2)/(4*focal_length)
0
1019ec0dc06cc627e8412cb8bfb75447
11a465101acc008cc060e59f36ceb927
Convenience method to provide audit logging to other services.
public class NopService implements AuditLogService @Override public void logEntry(AuditLogEntry logEntry) { }
0
d893cbd6cb5139bb5f27c82c1d3e6cae
df0992238bcf94e02a67beafe1999317
包含全选操作权限头部指令
return [ '<a class="update" href="javascript:;" onclick="updateAction()" data-toggle="tooltip" title="Edit"><i class="glyphicon glyphicon-edit"></i></a> ', '<a class="delete" href="javascript:;" onclick="deleteAction()" data-toggle="tooltip" title="Remove"><i class="glyphicon glyphicon-remove"></i><...
0
a106092a305915ac7a991fdf7a9f0a8a
4b752fdb7cc1e925897e7a1dc0f68b2f
计算每个店铺(所有店铺级优惠活动)总共优惠多少金额
class m_group extends CI_Model public function get_product_total_money_coupons($all_product) { $total_money = 0; foreach ($all_product as $k => $v) { if ($k == 'group') { foreach ($v as $group) { $shop_price = round(...
0
5b5563c18357baf87f57c2aba113bf10
60f6df91ca9fa545418107407723c42d
切换其他模型
if(!modelVec.empty()) { if(modelVec.at(ui->comboBoxModelSelect->currentIndex()).visible) { ui->btnModelShow->setDisabled(true); ui->btnModelHide->setEnabled(true); }else { ui->btnModelShow->setEnabled(true); ui->btnModelHide->setDisabled(true); ...
0
d8fa1baa13bfbdb5f96c41120e500a4f
e7e90746601ed81f169ee057d551ce30
Clear Watchdog time-out flag and Watchdog Interrupt flag
void WDT_IRQHandler(void) { WDT_CLEAR_TIMEOUT_INT_FLAG(); }
1
62b72af501f0e3120410063a1cbdad01
8f31b8cfb0b3856d32b841d2fa6aa501
Registers a configuration instance which default <see cref="SqliteStoringOptions"/> will bind against.
namespace Cofoundry.Core.DependencyInjection IContainerRegister RegisterInstance<TRegisterAs>(TRegisterAs instance, RegistrationOptions options = null);
0
21c48821017973a69f897499f29da694
a3db93ec0723e45b0c7027ca867fdaaa
function for character count
function charCount() { var countElement = this.parentNode.getElementsByClassName("entryTextCount")[0]; var charCount = this.value.length; countElement.innerHTML = charCount + "/" + MAX_CHAR_COUNT; }
1
a96d17c61a34ee464b7a22a0ae12f6ad
50ceaae96eddf438535cb8fb15a9c1b8
查询自己在讨论组内的信息
@Query(value="select * from discusses u where u.discuss_id like ?1",nativeQuery=true) List<DiscussesEntity> findDiscussInfo(int id);
0
f135b71aba2b6c6e6900b2c334e8a244
76cdd9f82f48d0ccb5556f552bffa028
Displays the editor of the building appearance.
{ Animator animator = EditMode_BuildingsPanel.GetComponent<Animator>(); if (animator != null) { animator.SetBool("IsVisible", false); } }
0
ab1f1ac5bf73680bce635cffb1d30f2f
da868e1d606566940ee055a9df226f98
Convolutional Neural Network model class, used with input set to model type 1. Should be paired with EMNIST data, set to data type 1.
super(NN_Classifier_1,self).__init__() self.conv1 = nn.Conv2d(1, 32, 3, 1, 1) self.relu1 = nn.ReLU() self.pool1 = nn.MaxPool2d(3) self.conv2 = nn.Conv2d(32, 64, 3, 1, 1) self.relu2 = nn.ReLU() self.fc1 = nn.Linear(64*50*50, 256) self.dropout = nn.Dro...
1
8249b253c846ceb19347414b24af6b32
dcb670f33c32ff31f00697fdc1812a9a
add the tabbed widget to the interface
class MainWindow(QWidget): def add_tab(self, tabClass, text): newTab = tabClass(self, decomp) self.tabWidget.addTab(newTab, text) self.tabs.append(newTab)
1
336f8f808b6fe9ccd2e3d976cfe93675
a2ddb7fa90b8e2625adfa6a9acc19a65
返回 ``delta`` 个季度后的报告期
date_series = Date().get_normal_date_series(period="S") month = self.change_to_datetime(date).month if month in [1, 2, 3, 4, 5, 6]: quarter_date = self.get_normal_date_offset(date, -90) else: quarter_date = self.get_normal_date_offset(date, -60) date_serie...
0