query_id
string
corpus_id
string
query
string
code
string
label
int64
a1a15ddd6dafda10a545c66d25fad177
1038d8520d92a081c8c7c1013c1ca4ed
Pre-fil input in the view with the data got from the model. Only available if the user is connected.
public abstract class AbstractWorkWithSpooledFilesView extends ViewPart implements IPinableView, IWaitForRseConnectionPostRun, ILoadSpooledFilesPostRun, ITableItemChangeListener, IAutoRefreshView, ISelectionChangedListener public void refreshData() { if (!ISphereHelper.checkISphereLibrary(getShell(), input...
1
968ec20b05dfb93792e09dfaed7a030d
f4b66b3b8759b5ef374f8e66da217f17
Checks if EndOfPost event already happened
{ return IsPost && _bytesWritten == 0 && StatusCode == 0; }
1
840353b4f5c6d1c6ddfbd3c65f103419
aee7c89bebbee84bebe0e5539e29f089
Adds a hasPart property value.<p>
public com.ibm.adtech.jastor.Thing addHas__group() throws com.ibm.adtech.jastor.JastorException;
0
594dff7ca53b368e57dc7c80bf0a4400
66878b6dcbb5acb27ef80e737819d129
Returns table state, value 1 represents attacked squires, value 2 successful hit, value 0 unaffected sector
public int getState(int x, int y);
1
9416b1242bac22939f37427d089b21ce
b08a66eb9b26ac82d65c98f44565c203
Show the form for creating a new TlgProfile.
class TlgProfileController extends AppBaseController public function index() { $tlgProfiles = $this->tlgProfileRepository->paginate(10); return view('tlgProfiles.index') ->with('tlgProfiles', $tlgProfiles); }
0
6a8ec36e08ac614fa1445fc4d566a80c
1717e0704e4a0e6502eee3459e17e394
计算猜拳结果,返回相应数值
rand.Seed(time.Now().Unix()) num := rand.Intn(100) fmt.Println("生成的数字为:", num) var putIn int for i := 1; i <= 10; i++ { fmt.Scanln(&putIn) if putIn == num { caishuziCount = i break } else { fmt.Println("没猜对,继续") } } if caishuziCount == 1 { fmt.Println("你真是个天才") } else if caishuziCount >= 2 &&...
0
6dfd8d029665806f7fc9aed921e0bfde
a44d43e62d49a3d8bf37e7a22fe59439
Load a serialized model from an HDF5 file, created previously from a ROM object's save_model() method.
class ReducedOrderModel(): def load(fname): with open(fname, 'rb') as output: rom = pickle.load(output) return rom
0
8a4007664c90392b59a61b8c530d3547
1fcdd256e712a15e3636c11207dae734
Return array of measurement values for a named ring-width series.
def rings(self, sources, nrings): r=self.walkNodeFront(startat=sources,nsteps=nrings, front_increment=1) ar, rr= arange(len(r)), range(r.max()+1) return [ar[r==i] for i in rr ]
0
b9cb1e35b7d45ebce97225426355ec69
625aed86c554d5211d30eaf877857627
Set trialFrequency.
@Entity @org.hibernate.annotations.Proxy(lazy=false) @Table(name="SNCHA_GEOLOCATION") @Inheritance(strategy=InheritanceType.SINGLE_TABLE) @javax.xml.bind.annotation.XmlRootElement(name="geolocation") @javax.xml.bind.annotation.XmlAccessorType(value=javax.xml.bind.annotation.XmlAccessType.FIELD) @XmlDiscriminatorValue("...
0
e082e37211e66425de1d2113b25a7f60
2124643479a9b33cbf71f37b25f31777
리스트에서 추천하기(1개 or 여러개)
function get_recommend_items_list($dbh, $user_id) { try { $sql = 'SELECT history.item_id FROM history WHERE history.user_id = ? ORDER BY history.createdate DESC LIMIT 1'; $stmt = db_prepare($dbh, $sql); $stmt->bindValue(1, $user_id, PDO::PARAM_INT); $...
1
6d9bcb3cb3ce1995bce092ffcc6a9b85
338d990ded0b0d5b0b1311e9fcf6ab69
returns list of matches in this round
namespace Tournament.Structure List<IMatch> GetRound(int _round);
1
3f926c5a6fa4132612ae5ae1edf78754
5559074e07cbef37bcef7f93be05746c
testing symmetry of input matrix
CRS graph=createCRS(matrix); vector <vector<double>> matrix2; matrix2=createNormal(graph); assert(matrix.size()==matrix2.size()); assert(matrix[0].size()==matrix[2].size()); unsigned long size = matrix.size(); for (unsigned long i=0;i<size;i++){ for (unsigned long j=0; j<size;j++){ if (matrix[i][j]==matrix[...
0
691e7803452ecb819f53332b31967219
624f3b1fa6b9a0a2c47a4dc1315dd1c8
T29. Decrement the view id variable, used to maintain the list view and view text on root view when user deletes a view
if(root.type == "leaf" && root.data["id"] == viewId){ root = null; } else { var u = getParentNodeFromId(root, viewId); if(u == null){ console.log("parent of viewId not found"); return; } console.log(u); if(u.first["ref"].type == "leaf" && u.first["ref"].data["id"] == viewId){ u.type = u.second["...
0
7a7c1ad88ec2ef61a9acda2107630479
043a770178667c8f29eb011571554217
This functions tests if two independent integrations produce the same output given the same input
class TestScatteringDataFieldAzimuthallyRandom: def test_integration(self): i_ref = self.data.integrate_scattering_angles() i1 = self.data.scattering_data_gridded.integrate_scattering_angles() i2 = self.data.scattering_data_spectral.integrate_scattering_angles() return i_ref, i2 ...
1
510bcd81bb717935f52401f4f1a0e6be
9c17dc109d620a371d607de93c64922b
Initiates the asynchronous execution of the DeletePlatformVersion operation.
namespace Amazon.OpsWorks IAsyncResult BeginDeleteLayer(DeleteLayerRequest request, AsyncCallback callback, object state);
0
4e2ce94a680e3f3f1d01d631e1568aca
01049863e40e8f90895d210d1c2e2cd8
The name of the resource property that will be stored in the index. Defaults to the element name.
public class GeoShapeQueryBuilder extends BaseQueryBuilder implements BoostableQueryBuilder<GeoShapeQueryBuilder> public GeoShapeQueryBuilder indexedShapeFieldName(String indexedShapeFieldName) { this.indexedShapeFieldName = indexedShapeFieldName; return this; }
1
7c2deaffe2a6ded899eb0f1db8760e36
f65a5c2ad8a3a93585c93d132291dace
生成京东签名
function getSign($Obj) { var_dump($Obj); foreach ($Obj as $k => $v) { $Parameters[$k] = $v; } ksort($Parameters); $String = formatBizQueryParaMap($Parameters, false); $String = $String."&key=6cd1c9cab639cb399cb371cbd893e15e"; $String = md5($String); $result_ = strtoupper($String); return $result_; }
1
5bb2509ebfe81f4183c2939648ea0b21
f38320bfaa960e85c39d61f77edac0a8
Evaluate everything inside of a parentheses first, until it becomes only one number, recurse as needed
expression = tokens counter = 0 while len(expression) > 1: if containsParenthesis(expression): for x in range (len(expression)): if expression[x] == "(": openingIndex = x elif expression[x] == ")": closingIndex = x ...
1
80c70a213a6b13cda526797d9bdd49d0
b254ff3b5dd1115223e8fbec0196d842
Create a new options object with the same style, size, and color. This is used so that parent style and size changes are handled correctly.
if (!props) return this.defaults; props = tryConvertLegacyProps(props); if (!props.displacement && !props.scalar && undefined === props.normalChannelName) return this.defaults; return new AnalysisStyle(props); }
0
127f8ee072d8374aa5de2854c4020d24
946a2f50401a554d935c23693d6e0f5b
Returns true if all debugging is disabled
expect fun enableDebugLogging()
0
68b0fcf0584f3171f7b61a266cc73b05
a51089d7c4055d2000dc864cf6e07b6e
Get the column names in specified index range of data table.
namespace Reassigner.Infrastructure.FileHandling.Abstractions public abstract class DataTableBase public IEnumerable<T> GetColumn<T>(int index) => Enumerable.Range(0, _dataTable.Rows.Count - 1).Select(i => (T)_dataTable.Rows[i].ItemArray[index]);
0
e91dd20f1afe51df7c5b0b5a1bc28119
d945d699c00b9f4d2c58860dcccb878f
Gets the profit report by variant.
public class ReportScreenController private void profitReport() { }
0
42bf155d7a28ed55bd034d9cc2882476
812323f85a105a15b249a5677d797f5d
Read the value of a vector of bytes as a u32 value in little-endian format.
assert!(buf.len() > 3); let data = [buf[0], buf[1], buf[2], buf[3]]; u32::from_be_bytes(data) }
0
df7a46d4498c2401215b7fd89442fa49
6e249239a850453c165e9f54796d7b19
Recursively lookup an item in a nested dictionary, using an array of indexes
def recursive_getitem(obj, keys: list): if len(keys) == 0: return obj return recursive_getitem(obj[keys[0]], keys[1:])
1
6e1a8e4f66e6df504084e5e3b27002f2
4575ede9237cad55a7c43574f6c1ef94
Get the otherConditions value.
if (getConsent() == null) return ""; else return getConsent().getDiagnosisOther(); }
0
c05084d49b69835f790504693644074e
ca9837ea38cc6e7d82d5cff3c6c2b539
Sets the iosOnboarded Partner onboarded for ios devices.
class ComplianceManagementPartner extends Entity public function setIosOnboarded($val) { $this->_propDict["iosOnboarded"] = boolval($val); return $this; }
1
352fcaebb9cd796f25cafac49196b71b
ef6758751a00ecedda802ebe5e089188
Truncates decimal numbers to given decimal points
class MicrophoneSensor(SensorBase): def truncate(f, n): s = '{}'.format(f) if 'e' in s or 'E' in s: return '{0:.{1}f}'.format(f, n) i, p, d = s.partition('.') return float('.'.join([i, (d + '0' * n)[:n]]))
1
73dcf833a1ad72979cda9406f555813d
587bc571e8dcb33df1a4f944f39f32db
Search student by last name # noqa: E501
def get_student_by_last_name(last_name=None): res = student_service.get_student_by_last_name(last_name) if res: return res return 'Not Found', 404
1
60c377f27d8c71805ec830ffa0a92533
89afa74ae312145c35a8d2c696965c97
This function employs BFS search to mark all vertices from the final residual graph that starts at the "Sink" vertex.
LinkedList<Vertex> queue = new LinkedList<Vertex>(); queue.add(sink_); HashSet<Vertex> observed = new HashSet<Vertex>(); int n = residualGraph_.getNumberOfVertices(); while (!queue.isEmpty()) { Vertex v = queue.pop(); int dv = distances_.get(v); observed.add(v); for (Arc uv : v.getIngoingArcs()) {...
1
eed1d336d847b34f26ba3a08226b993d
9aedfcd65855c61353bd62eee5cb8d08
根据代金券id,订单号,获取抵用金额
$orderPrice = D('Order')->getOrderBySn($orderSn)['priceall']; $vUseMoney = $this->getVoucherById($vId)['vUseMoney']; if(empty($vUseMoney)){ $UseMoneyByVoucher = 0 ; }else{ if($vUseMoney >= $orderPrice){ $UseMoneyByVoucher = $orderPrice; ...
1
0392ae3c4204dded1c8c585816d20f35
b5e5a2d3bcfc127c7aa844f857f3985d
Compute a default multiline description for this sales order line. In most cases the product description is enough but sometimes we need to append information that only exists on the sale order line itself. e.g: - custom attributes and attributes that don't create variants, both introduced by the "product configurator"...
return "%s-%s-%s-%s-%s-%s-%s" % ( invoice_line['account_id'], invoice_line.get('tax_ids', 'False'), invoice_line.get('tax_line_id', 'False'), invoice_line.get('product_id', 'False'), invoice_line.get('analytic_account_id', 'False'), invoice...
0
07b90a56bd58f61adf1e190d0c421b2f
b10a2a429aef13cdf5ffe42a561313a6
Play failure dialogue sequentially
public class SequenceDisplay : MonoBehaviour public void FailAnimation() { IsRunning = true; float originalSize = displayObject.sizeDelta.x; LeanTween.value(this.gameObject, UpdateDeltaSize, originalSize, 0.78f * originalSize, .5f).setOnComplete( () => LeanTween.value(this.gameObj...
0
af58eba7ec898313d8626307085f1751
bfb6a9dc01f43388f17e67ac69d3bcbf
Returns the rotation time for a specific teletext page
{ try { if (_cardHandler.DataBaseCard.Enabled == false) { return new TimeSpan(0, 0, 0, 15); } int subchannelId = _cardHandler.UserManagement.GetSubChannelIdByChannelId(userName, _cardHandler.UserManagement.GetTimeshiftingSubChannel(userNam...
1
c7aeb085c4bbdfcbe1d74ee8d4772a41
4ea2495116516c5fef2688457fcf220e
获取评分前5的课程
ArrayList<Score> scores = new ArrayList<Score>(); Cursor c = db.query("score",null,null,null,null,null,"time asc","0,5"); while (c.moveToNext()){ Score score = new Score(); score.name=c.getString(c.getColumnIndex("name")); score.time=c.getInt(c.getColumnIndex(...
0
34df1193205003d801333391e76391b8
e7026530def15543fd28f1d3ff003e58
Display an NxMx3 numpy array as a color (RGB) image.
def display_grayscale_array(array: np.ndarray, title: str = '', ax: matplotlib.axes.Axes = None) -> None: ax = ax or plt.gca() if len(array.shape) == 3: array = array[..., 0] ax.imshow(array, cmap=plt.cm.binary) ax.axes.set_yticks([]) ax.axes.set_xticks([]) if title: ax.set_title...
0
421d82316bd580879f17a9fcc637ccbd
7e32a248fb7c99f0f2912776db941e34
The form to create a category plugin should only list leaf category pages in the select box when the setting is activated.
folder = self.portal.testfolder folder.invokeFactory(id=FOLDER["id"], type_name="Folder") folder2 = getattr(folder, FOLDER["id"]) folder.setTitle(FOLDER["title"]) folder2.reindexObject() folder_fti = self.portal.portal_types["Folder"] folder_fti.manage_changePrope...
0
70e2823fedd7ef5fbce84f0cfb10e918
58fa99aa32ee2a29737967c712a4c03a
Match zero or one tokens
fn occur(b: Buf) -> ParseResult<Occurs> fn one_or_more(b: Buf) -> ParseResult<Occurs> { let (i, _) = char_is('+')(b)?; Ok(( i, Occurs::OnePlus, )) }
0
d5547ed8c7765e15f170a4fb80ed2499
03ad623ba71f9d51926eeb96b315fd9a
Get the TV show credits for a person.
return axios .get(`/person/${id}/movie_credits?api_key=${KEY}`) .then(response => { return response.data; }); }
0
2f3ba946857fd42234b7c26618711718
8cb387ab3c790b6c1a595acb7a93aea4
Передать данные автоматического устройства расчетов для кассового чека (БСО) коррекции (0x3F)
if (FiscalNumber == undefined) { FiscalNumber = 0; }; if (NumberCopies == undefined) { NumberCopies = 1; }; var Data = { Command: "GetDataCheck", NumDevice: varKKMSNumDevice, IdCommand: guid(), FiscalNumber: FiscalNumber, NumberCopies: 1 };...
0
dc7508234011fb69ee559b658a7e29c8
29b20b04e6c19e8fee669a3f6ee5feeb
Returns true if the set can be used to pay for the required resource set
public boolean canAfford();
1
db31d561d0b7cad449809b7027b63e05
05a7a56cebec8aafef79a68272986cad
when above ground, show space above player, otherwise focus on below
if (!IsValid(LocalPlayer())) then return end self:SetCamPos( Vector( 0, 20, 0 ) ) self:SetLookAt( Vector( 0, 0, 0 ) ) local TargetDir = LocalPlayer():GetNWVector( "CPDir", Vector(0,0,0) ) if ( TargetDir == Vector(0,0,0) && self.Visible ) then self:MoveTo( ScrW()-1, 0, 1, 0, 0.5 ) self.Visible = false elseif (...
0
8499daa05da0761d1cb9596032efcff7
2623f5a391a3916f663a94a25eebcc92
跳转到主页面,同时读取数据库显示贴子
public String selectArticle(Model model) { List<Article> articles = articleService.selectArticle(); List<User> users = userService.selectHosts(); List<Article> articleshost = articleService.selectArticle(); List<C_Record> c_records = articleService.selectLike(); model.addAttr...
1
d751bd279835b88c9cc1b492ddc8b15b
1918ec9410f584677cbd0f56b8b0759f
获取flutter引擎
public class MyApplication extends Application @Override public void onCreate() { super.onCreate(); FlutterEngine flutterEngine = new FlutterEngine(this); flutterEngine.getDartExecutor().executeDartEntrypoint(DartExecutor.DartEntrypoint.createDefault()); FlutterEngineCache.getInstanc...
1
c5348f20ed5f57e0cd672f4bebf01fd6
4f04a0882af1c96a17ec5be83aa631ec
выбор дня недели (вызывается при выборе дня из списка)
function setSelectedDayOnClick() { setSelectedDay(this.parentNode, true); }
1
3724aeb2f0ebcb15e0ed2c91999358e9
246cb6a791985e1be90a2658058291ac
Dispatched when the Deactivate School request fails
function deactivateStudentRequestFailure(error) { return { type: Constants.DEACTIVATE_STUDENT_REQUEST_FAILURE, error, }; }
0
39863761d0681d7b2490ac30cc240edf
602afa493829ab92d3fb7bd2ee0b648a
Asserts the access token.
def test_access_token(logged_user): username, access_token, headers = logged_user parts = access_token.split(".") assert len(parts) == 3 header = decode_base64_dict_from_str(parts[0]) payload = decode_base64_dict_from_str(parts[1]) assert header == {"alg": "HS256", "typ": "JWT"} assert set(p...
1
078bf8a153c1cd7fabb047fea7002cee
c0dd6e72aea21b99e5d015fc17b79b05
This method flips the image on its vertical axis. 1'st row becomes last row, 2'nd row becomes 2'nd last row etc.
{ Color tempColor; Color color1; int limit1 = this.getWidth(); int limit2 = this.getHeight()/2; Pixel bottomPixel = null; Pixel topPixel = null; for(int i = 0; i < limit1; i++) { for(int j = 0; j < limit2; j++) { tempColor = this.getPixel(i,getHeight()-1-j).getColo...
0
08cdc7598518e997e18d8edc0e1a16aa
a07f98c9a0cf70c572d4ec2ea4a22e29
Request the current block header by height
{ var chainID = engine.CurrentContext.EvaluationStack.Pop().GetByteArray(); var height = engine.CurrentContext.EvaluationStack.Pop().GetBigInteger().ToByteArray(); var contract = engine.CurrentContext.ScriptHash; var storageContext = new StorageContext ...
1
e1d0eb502f698db84e9750b34868418b
ea9304368b198255b0486746771acb5c
设备状态-切换子页面
R.id.rl_status_maintenance, R.id.rl_status_maintenance_keeping, R.id.rl_status_inspection, R.id.rl_status_repair_keeping, R.id.rl_status_error, R.id.rl_status_repair_waiting}) public void toDeviceList(View view) { startActivity(DeviceListActivity.newIntent(mContext, CommonUtils.getSt...
1
a1163c90b6a580ac20e5b6d0e831671b
e92b50ca008beb00c7781241c47e3f31
Defines a config of type 'int'.
class EnviType(object): def integer(cls, required=True, default=None, validate=lambda x: None): return cls(extractor=get_int, cast=None, required=required, default=default, validate=validate)
1
eac287380429edaf8e631213fe0cd658
3fcdd91f5dcedb2a4c5595d5de80ad5b
returns array of var keys.
function arK($data){ if ($data==0) return $a=[]; else return array_keys($data); }
1
78eab6bb7f35459c3fb1ce1612d32957
ff1c87923b339bee188161d4aa7481be
! \brief GUI::AddUser::on_txt_eMailInput_textChanged Wird aufgerufen, wenn sich die eingegebene Mail-Adresse geändert hat um diese zu überprüfen und bei Ungültigkeit einen entsprechenen Text anzuzeigen
void NutzerView::lineEdited() { ui->lineEdit_email->setStyleSheet(""); ui->lineEdit_kennwort->setStyleSheet(""); ui->lineEdit_kennwort2->setStyleSheet(""); ui->lineEdit_nachname->setStyleSheet(""); ui->lineEdit_vorname->setStyleSheet(""); ui->label_wrong->setText(""); }
0
98a51dac23568e267aebd7b300c05a6b
6328084b5e7bd118b21e48e7fbeb3969
General framework for testing unary operators on Xrange arrays
warnings.filterwarnings("ignore", message="invalid value encountered") r1 = self.r1 r1_f32 = self.r1_f32 r1_nodata = self.r1_nodata r2 = self.r2 r2_zero = self.r2_zero satimg = self.satimg array = np.random.randint(1, 255, (self.height, self.width)).astype...
0
a443ac7fcab031301599edf874e5132a
78c0f73346af4e82768fb1107945cf3e
Validates the input and prints appropriate error messages to the console.
if (!validate(input)) { System.out.println(); System.out.println("Illegal expression. Invalid characters."); System.out.println(); return; } if (!checkParens(input)) { System.out.println(); System.out.println("Illegal expression. Parentheses do not match."); System....
1
eefccd1e5eb3b42a0124ed06a828fb3f
9febbdd09f81e101eb1e6ac085fc0933
检查用户登录是否一致,如果没有登录过则保存用户session id,如果登录过则校验session id是否一致
public class LoginUtil public static boolean vaildateLogin(String userCode, HttpSession session){ String oldSessionId = sessionMap.get(userCode); if(oldSessionId != null && !oldSessionId.equals(session.getId())){ return false; } return true; }
1
751586349a0768effcda0a018e81d9c2
364b9d14696555459aa5600fc39a61e0
SEARCH x (вывести строку, связанную с ключом, имеющим порядковый номер x)
TKnot* TAVL::SearchKey(void* X, TKnot* p) { TKnot* result = 0; int Comp = 0; if (p == 0) result = 0; else { Comp = Compare(p->key, X); if (Comp == 1) result = SearchKey(X, p->left); else if (Comp == -1) result = SearchKey(X, p->right); else result = p; } return resul...
0
7fb88f063dd1cdc382ca988d559c751f
1f1310e72557abc8812940199258b745
统计指定职务cj_id的用户数
String sql="SELECT COUNT(jishu) FROM (SELECT COUNT(id) AS jishu,cl03_time FROM sd_new_jkyx INNER JOIN sdcms_user ON sdcms_user.USER_ID=sd_new_jkyx.cl03_ren WHERE cl03_ren=? AND cl03_status<>0 "; Object[] object=new Object[]{userId}; if(!name.equals("")){ sql+=" and sdcms_user.NAME like '%"+name+"%' "; } i...
0
29bdfdaa84f4045f849eb6b1c4bbcf64
7cb515570afd4b7d2bfd7e272d3d2b75
Metodo che restituisce il numero di componenti connesse del grafo
namespace Graph public class Component public int Count() { return ccount; }
0
b701ea81865174f8f2311ccba9886f4a
61eeae95f4111751ac7aacc08a5c7319
获取商品活动id
{ $filter = self::query()->where('productActivityId', '=', $activityId)->fields('id')->orderBy('id', 'desc')->first(); return $filter['id']; }
0
d9851650efc1a6eef6f6c6e094556515
2a9fed89aee6badbc83eaed4b04950f9
Attributes of the atom. @rtype: list
class Experiment( psimi.Base ): def attrib( self ): if 'attList' in self._raw.keys(): return self._raw['attList'] else: return None
1
a1904a2b63e2a1ca19ac46ddccf71ac6
95926d09b24850830c7f1eaf3293aab5
centers the joint markers on the corresponding joints
std::vector<std::string> actual_joint_names = robot_.getJointNames(); std::vector<unsigned int> mapping; mapping.resize(actual_joint_names.size(), actual_joint_names.size()); for (unsigned int i = 0; i < traj.joint_names.size(); i++) { for (unsigned int j = 0; j < actual_joint_names.size(); j++) { if (tr...
0
cb17b0befdfa1f9b0e9cc0e7b57e6d9c
f1c480a61ee23bf2753de0cf60eb17bb
Gets the value of Grid.Row attached property from a specified element
namespace AuditTools public class DataGridBehavior public static bool GetDisplayRowNumber(DependencyObject target) { return (bool)target.GetValue(DisplayRowNumberProperty); }
0
825c7c78c7f7d89cbb53ffaa0c4b28a9
8f087a50fcc9fdda11491b8037407cd8
Provide values of right types.
namespace Smooth.Algebraics public static Either<L, R> Right(R value) { return new Either<L, R>(false, default(L), value); }
1
01871de22396a3d81cdbccac5731c98b
b4ef5cf5b67f8d9d87f00ea68bbf6cde
Haberi günceller
@ManagedBean(name="MakaleBean") @RequestScoped public class MakaleBean implements Serializable public String GUNCELLE(){ if(makale.getId()>0){ EntityManagerFactory emf = Persistence.createEntityManagerFactory("projePU"); EntityManager em = emf.createEntityManager(); em.g...
1
00c7601d6400a7775a112cb123232468
d4f8fae37b76eaccbf1503446a2c714f
Create a new snapshot of an existing volume.
parameters = {'name': name} if optional: parameters = self._mergeDict(parameters, optional) info = {'action': 'createSnapshot', 'parameters': parameters} response, body = self.http.post('/volumesets/%s' % copyOfName, bod...
1
9b1d0e1629ffef0b5008dfee8ea7c970
b399561ab3cad4d97fb06772e7faa7ef
Calls the web service to refresh the unread notification and message counters.
namespace SACS.Library.Soap Task RefreshAsync();
1
797dc1535bdb3edc1c231ef998be1efc
c77449383d7d510e94fe544534a8bc78
This function generates the nth Fibonacci number in a fast way.
LL fibonacci_fast(int n, int m) { if (n==1 or n==2) return 1; if (M.find(n) == M.end()) { LL a = fibonacci_fast(n/2, m); LL b = fibonacci_fast(n/2+1, m); if (n%2 == 0) M[n] = (a*(2*b-a))%m; else M[n] = (a*a + b*b)%m; } return M[n]; }
1
dd303b8b2c197f1f5d380818d7d1f0f1
dc51c252c2a61710c4a42ecb13f692b4
Collects the models in an aggregate ordered such that they are safe to attach to an EF context grapsh in a manner that will ensure that attaching to each, in turn, will cause EF to detected updated vs added entities.
{ Ensure.IsNotNull(collection, nameof(collection)); Ensure.IsNotNull(session, nameof(session)); return AsQueryableHelper(collection, session, aggregateOptions); }
0
6f354d2702616f82f420740f1e4819e5
7fa6c1d3c43ab28fd3d0b884d6b643f7
Kiem tra user da dang nhap hay chua
export class SieuThiComponent implements OnInit ngOnInit() { var username = sessionStorage.getItem('username'); if (username == undefined) { this.router.navigateByUrl("", {skipLocationChange: true}); } }
1
f380f953814d7330d9b71951c713363f
9d5f2b91e25f5e0da9df2a207a12cb56
判断文件是否已经存在,存在则不操作。不存在才下载。
File file = new File(filePath); if (!file.exists()) { file.mkdir(); } if (downloadFile == null) { String fileName = fixDownloadFilePath(); downloadFile = new File(fileName); downloadFile.createNewFile(); } }
0
e83e56e0eabc91835b38645fa7cd4ca7
5f57a43c4aa2eeef7509c89c80a84947
Get list of matching interactions Returns the list of matching interactions
class InteractionsController def index @q = Interaction.ransack(params[:q]) @interactions = @q.result.page(params[:page]) end
1
079bf0e3dc3fa5386a626be63fddbca5
81b87005b0d03cda61e1bf71d7d091c8
Save all titles of chapters/pages
async function saveChaptersAsJsonFile(url) { let chapters = await getchapters(url) let jsondata = [] for(let i = 0; i < chapters.length; i++) jsondata.push({ index: i + 1, title: chapters[i].children[0].data, href: chapters[i].attribs.href }) jf.writeF...
1
308e4ecad608bdd7d95ad18e86021851
43877531793c904830658e3f96bf869a
지정 축의 Servo-On 신호의 출력 상태를 반환한다.
{ if (!_isInitialized) return false; return ((GetMotionIoStatus(axisNo) >> (int)APS_Define.MIO_SVON) & 1) == 1; }
1
6ea6f9b53a5daa39b57ce035d94b3c1b
3fddbb74797e66fa24283f44cb024aab
Produce an array of arrays containing duplicate ContentItems
IEnumerable<T> ContentCopy();
0
106f6d2be77ead2f6695a34d0651d3ae
aac523452d6574e956c2bbfdc7a5ec6c
trains the gan based on the type: dcgan, wgan, infogan
super(DCGAN, self).__init__() if generator_type == 'deconv': self.generator = DeconvGenerator() elif generator_type == 'nearest_neighbor': self.generator = NNGenerator() elif generator_type == 'bilinear': self.generator = BilinearGenerator() self.name = 'dcgan_' + generator_type self.discr...
0
522b69b5f8e236c555f2409f97a9a477
079f1fba003916949bad4e89a7b09a8b
Based on the user's location, set bounds for the addresses that can be suggested based on their distance from the location
let input = document.getElementById('pac-input'); let searchBox = new google.maps.places.SearchBox(input); this.map.addListener('bounds_changed', () => { searchBox.setBounds(this.map.getBounds()); }); searchBox.addListener('places_changed', () => { let places = searchBox.getPlaces(); ...
0
04b802e927e2f11c4f24bd96d6867923
188a9beb5ff63523f7cabf5969fe85a8
@brief 设置游戏id函数
@Table(name = "korea_server..game_config") public class GameConfig public void setGameId(Integer gameId) { this.gameId = gameId; }
1
01974eaff1e33057b957bfd1e225d5c2
2a23a12498ef29db6e1a4353130d97e5
Go through the entire protocol flow at once.
startSeleniumClient(browserData); startServer(); startFlow(); waitForLoginPage(); login(); waitForAttributeReleasePage(); releaseAllAttributes(); rememberConsent(); submitForm(); waitForResponsePage(); validateResponse(); dr...
1
a56c0b5b649395462aa75eb80277df7b
08a0640c5cbf49ac4c3945d0ed51d55c
Updates an existing Reference model. If update is successful, the browser will be redirected to the 'view' page.
{ $model = $this->findModel($id); if ($model->load(Yii::$app->request->post())) { $model->create_date = strtotime($model->create_date); $model->update_date = strtotime($model->update_date); if($model->save()){ return $this->redirect(['update','id'=>$id]);...
0
5a42913ae5e52f647530a4c0259cd892
5fbb930492175a8463a3166b24fccd90
set player prefs for current state of the game
{ long board = settings.getLong(BOARD_PREF, BOARD_DEFAULT); int score = settings.getInt(SCORE_PREF, SCORE_DEFAULT); if (board != BOARD_DEFAULT) { game.setBoard(board); game.setScore(score); gameBoardFragment.updateBoard(game); scoreBoar...
1
b6b4116ab1ffefaed493a95886adb6b1
ccf3bf293de0aff48b2c9017e5f166cd
getDefaultTags - returns the list of valid tags as strings
{ List<string> validTags = new List<string>(); string[] tags = UnityEditorInternal.InternalEditorUtility.tags; for (int i = 0; i < tags.Length; i++) { string tag = tags[i]; tag = tag.Replace(' ', '_'); if (!string.Is...
1
7e902f480fb53e2053c44bb7254918d9
278f141e70a8497e8d621b6c815507c1
Orientation constructor.
class OrmManager extends LibOrmManager public function __construct(DatabaseManager $databaseManager, ModelLoader $modelLoader, ValidationFactory $validationFactory, DependencyInjector $dependencyInjector, $defaultNamespace) { parent::__construct($dependencyInjector->getReflectionHelper(), $databaseManager, $mod...
0
e870844dbdaaf63e8daa11c19fb11a86
058e14f0bb2e716771400a3e68d124ec
Inputs object with appropriate setters for the GetSalesPercentiles Choreo.
class Box_Comments_GetComment extends Temboo_Choreography public function newInputs($inputs = array()) { return new Box_Comments_GetComment_Inputs($inputs); }
0
3e10512553c9cf287cf5bad12a5c1152
ad5766f7768bc4a6f56f751b104f1031
获取未来几天的时间
public class DateUtil public static String getNextDate(int days) throws Exception { Calendar now = Calendar.getInstance(); now.add(Calendar.DATE, days); String time = new SimpleDateFormat(yyyy_MM_dd).format(now.getTime()); return time; }
1
044aa9942ac19114e68e2af13841c0fc
fd38228b0e431f5772e597c462b14482
Returns the value of field user_service_id
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.8.5" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class ServiceRecord extends UpdatableRecordImpl<ServiceRecord> implements Record13<Integer, String, String, String,...
0
0fc3e09e1f421479e1c7a2a4b9e0d25f
11957a3d23c62585f90e047c37523789
Finds the target that is closest to the given position.
namespace Nucleus.Geometry public static class IPositionExtensions public static T FindClosest<T>(this IEnumerable<T> positions, IPosition toThis) where T:class, IPosition { T result = null; double minDist = 0; foreach (T position in positions) { ...
1
0bb9dc6a8273703e596d269c4c68366e
41040338484a5fdc0cda401611861378
return the list S&P 500 company symbols
tickers = [] url = 'http://en.wikipedia.org/wiki/List_of_S%26P_500_companies' response = requests.get(url) site = response.content soup = BeautifulSoup(site, 'html.parser') table = soup.find('table', {'class': 'wikitable sortable'}) for row in table.findAll('tr')[1:]: ticker = row.fi...
1
47caa28bdf74691b34c4091d2bb0fd24
5a100ff1dc464969bd002687160ddb28
Determines if a region has no indentation (i.e. it is a 'root' selector)
{ if (range.Text == "\r") { return true; } if (!string.IsNullOrWhiteSpace(range.Text)) { return false; } foreach (Range ch in range.Characters) { if (ch.Underline != Wd...
0
14756aa5b39fed5b01867d000e5fe2ac
a8dc67feb41a7e606c647d054b317191
Test that the view redirects to the login page if the user isn't a member of staff.
someone = factories.ProfileFactory.create(school_staff=False) response = client.get( reverse('add_student'), user=someone.user, status=302).follow() response.mustcontain("don't have access"), response.html
1
cf7834699496cd56c363df3035b0aeed
07202ee4bbd4ae0fbc95377db53a10d7
returns the name of the rovers direction
try { return ro.getName() .getValue(); } catch (NullPointerException npe) { return "No Name"; } }
0
5787bafdbb608f3dda4390e0248eb574
a9074b47b861b2165bb625aff3dc7ed6
<Summary> Called when the scroll view stops performing this activity. </Summary>
{ EventHandler evt; lock (eventLock) { evt = (EventHandler)eventHandlers[ScrollAnimStopEvtKey]; } evt?.Invoke(this, e); }
1
01f17b128c046d19bbedfd391010bbb6
332511970661b050e4445ba19232bd54
콜백으로 Result 데이터클래스 받기 위한 인터페이스
namespace IFramework TResult GetResult();
0
d831b49e0037ac2cc78eaa3f3fca4f2b
8b34991176904c8d6d89e21d0526cd68
Makes the header information for the page and css data for the page
class ReservesPage public function getHeader($reservesUser) { $mobileClass = $reservesUser->isMobile() ? ' class="mobile"' : ''; import('general.Config'); $config = new Config(); include_once ("/www/core/inc/func.php"); echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml...
1
bc412da747bfd5ac601cd484ed3741c8
cd9b966f7b36ebd48dc6d2d619c7264a
############################################################### # Name = PremierTour # Arguments = Joueurs(liste des noms des joueurs) # Effect = renvoi le score des joueurs a la fin du premier tour ###############################################################
liste_globale_triee = sorted(joueurs, key=lambda x: x.total_points, reverse=True) scores_egalite = [] for joueur in liste_globale_triee: joueurs_egalite = [x for x in liste_globale_triee if x.total_points == joueur.total_points] if len(joueurs_egalite) > 1: ...
0
a25551306f3bc6d740eeab59bbacb1d3
10f6453a3d62456eff0b5086dcf122f9
当更改记录类别时
@NotifyChange({ "sclasslist", "standardlist" }) public void class_change(@BindingParam("cpst_name") Chosenbox chosenbox) { if (!cop.getCopr_type().isEmpty()) { sclasslist.clear(); for (CoPclassModel m : classlist) { if (!cop.getCopr_type().equals(m.getCopc_type1())) { continue; } sclasslist.a...
1
3e97a9a1e03c527b2ea5a369e1720527
fd755178f5a2edeb15f0cbb28cfc6b63
Function to return yesterday's low - today's low Input: list of size n Output: list of size n-1 What it means: If positive, means yesterday's low is bigger than today's The price is varying up.
class ChaikinMoneyFlow(object): def low_price(self): low_list = [] for index in range(len(self.data_set)): low = self.data_set.iloc[index, self.low_index] low_list.append(low) return np.array(low_list)
0
076086dc2fc154255742a9dbf3f8d987
28698105fc55ad3bc06835ca4bd213a7
Setter method for takedate. <br> The new value is set only if compareTo() says it is different, or if one of either the new value or the current value is null. In case the new value is different, it is set and the field is marked as 'modified'.
void setDate(Object aDate);
0
5c63a833cd23decf5d01516df163a377
2060b346c05962e9a5c595fe6ddf408e
获得公司常用的出港城市列表[只包含城市ID]
class xiecheng_quotations extends quotations_action implements \quotations\data protected function _get_city_list() { $city_arr = $this->curl_get($this->city_url); unset($city_arr[0]); $city_ids = array(); foreach ($city_arr as $value) { foreach ($value['left'] as $lv) { ...
1
ceab537dbcf0b82b0aa8d81fd3566347
b495fcc29ea7d600028594ec6a840013
表单提交成功时,重新设置"表单是否已点击了保存"标识为false(只针对表单提交后的,回调)
refreshFormVerify() { this.setData({ isFormVerify: this.getFormVerify() }); }
0
66a73ba9338841a2fc63bf3ced2733ee
2f610d8a20e3789b374d087b2fb0ad75
根据申请id查询对应的审批集合
public List<FlowAudit> getFlowAudits(String applyId);
1