query_id
string
corpus_id
string
query
string
code
string
label
int64
7f33382761343ad075904a0373edbc5f
21974fa71e365690e8e50ef16e17d6d5
Ocenia algorytm używając podziału walidacji krzyżowej
public class SingleLayerFeedForwardNeuralNetwork extends FeedForwardNeuralNetwork public double kFoldCrossValidate(List<Example> examples, int k, double alpha) { NeuralNetwork.Trainer trainer = new NeuralNetwork.Trainer() { public void train(NeuralNetwork network, List<Example> examples) { ((SingleLayerFeedFor...
1
c0c9e65902d90c1b55a25e6b9009d648
cd38d8c9e1f5257b46243640dc308bc1
Метод проверяет есть цифры в тексте или нет
def numbers(text): return len([letter for letter in list(text) if letter.isdigit()])
1
0512db34228649bca679eda3081311c3
1c3a9504a86c74f2c0cbb00b47f809e3
Request the top-level navigational entities and show them in the page
class NavigationController extends BaseController public function index() { $nav = $this->navigation->findFirstLevel(); return static::response($nav->toArray()); }
1
c06fa218d92aec61ae83738d3ca36a6c
d538ef2011e518bd5540b41f4732a578
add BOS and EOS to the instances index
def feature_extractor(X): crfutils.apply_templates(X, templates) if X: X[0]['F'].append('__BOS__') X[-1]['F'].append('__EOS__')
1
bb742b6716b69558a2c15ff13f8237ec
9d7dbef8c115f6a57a36dc51665c2604
Trigger removal of duplicated cookies on every page load
class Response implements \ArrayAccess public function _uniquizeCookies() { $unique = array(); $cookieHdr = $this->_normalizeHeaderKey("Set-Cookie"); if (!empty($this->_headers[$cookieHdr])) { foreach((array) $this->_headers[$cookieHdr] as $str) { $name = trim(sub...
1
d50a5c643e43b1c8330657aa76d63ac3
a231741438ccf603cc2c0c7e36ac5191
隐藏input框
closeInput() { this.setData({ inputValue: "" }); }
0
9aad2b82fc1461de0fcd71cf816bcf88
9996698f88f41057ef6731bbbcd3beac
Sets the ngay tao of this yeu cau dang ky cong dan.
public class DoanhNghiepWrapper implements DoanhNghiep, ModelWrapper<DoanhNghiep> public void setNgayDangKyKinhDoanh(java.util.Date ngayDangKyKinhDoanh) { _doanhNghiep.setNgayDangKyKinhDoanh(ngayDangKyKinhDoanh); }
0
3aa95ee3b32ae7d25c7cbf4e0eca7fa7
9e34db8678402144eb7d60f6db06d29d
计算解锁新障碍的关卡的成就等级
{ if (Player.MyInstance.MyLevel <= 7) { return 5; } else if (Player.MyInstance.MyLevel >= 8 && Player.MyInstance.MyLevel <= 9) { return 6; } else if (Player.MyInstance.MyLevel >= 10 && Player.MyInstance.MyLevel <= 11) { ...
1
8c689afbc7593632df4da218156f10f6
b97ce82584b68d888bb6cf68adae10e2
* To avoid collision between libraries, macro names should be prefixed with the name of the library.
{ #if defined __DAVAENGINE_MACOS__ return name + QStringLiteral(" "); #else return name; #endif }
0
dbb6cc503878e3f3bac34929f4e4a3b3
49f68b213e4ec1128c6568ef8f74481c
获取所有技能和天赋
class CharList extends \MyApp\Controller public function SkillsData(){ $skills = new \MyApp\Model\Char(); list($res,$res2) = $skills->skills_data(); return [$res,$res2]; }
1
098829b6b7370697c7d88082901064d6
e89045fd833070df091d88777ee2dbe4
Enter a parse tree produced by SolidityParser#stateVariableIdentifier.
class SolidityListener(ParseTreeListener): # Enter a parse tree produced by SolidityParser#parts. def enterStateVariableIdentifier(self, ctx:SolidityParser.StateVariableIdentifierContext): pass
1
35cacae531378f49069e09f0049dd320
5dbde134ad3a38a50704e95747a2382d
Return icon for pick value button.
class ColorPickerFieldType extends DataFieldType public static function getIcon(){ return 'fa fa-paint-brush'; }
1
91ee70de80c661bd4c2c1c9c13747001
119d9cc7bf15fec3126837d448462240
Lists all transparencium entities.
class TipoTraspController extends Controller public function index() { $tipotranp = TipoTranp::where('deleted_at', NULL)->paginate(15); return view('tipotranp.index', compact('tipotranp')); }
0
2a6f18ef3de0f29286f0b4029eb20145
af75c584ed2ff5838c48a0f555bc6049
Decorates a store with any number of viewAction definitions.
public function configureAction(Definition $definition);
0
376d79e4bfccbdc216c3449c0e0d3bf2
424830d5de5865a9fe19c3f125f41eea
Gets/Sets the view mapping that is used with the control.
{ if (iControl) { ((CImageEditorControlBase *)iControl)->SetView(aView); } iEditorView = aView; }
1
0b39b91c522ff58808bbf8801a2d23ca
3ac9d698d0246f63f31ee31ac06ff821
My implementation of the diffie-hellman algorithm.
class Encryption: def receive_diffie_hellman(cls, friend, received_key): if friend.lower() not in cls.private_keys: cls.add_private_key(friend.lower(), 160) return pow(int(received_key), cls.private_keys[friend.lower()], cls.p)
1
160912da95fc9cca689d3fe7c4a72ff0
6d5100715b3200d5a01a4a4e67468889
POST /talks
@meeting = Meeting.new(params[:meeting]) if @meeting.save flash[:success] = 'Meeting was successfully created.' redirect_to meetings_path else render :action => "new" end end
0
dabc1fb6eb7f831e75a83b989888fc8d
bd9f23b9ab2324c41fb234b700c976ac
新增CompensatingCalculator
@Controller @RequestMapping("/compensatingCalculator") public class CompensatingCalculatorController extends BaseController @RequestMapping("/compensatingCalculator_add") public String compensatingCalculatorAdd() { return PREFIX + "compensatingCalculator_add.html"; }
1
1b5830de5c4cea85d20c21d4515c2fc8
8fb345fa10c35e9d1eb57b27ea031f75
Calculates multipication of two value and their errors
{ int n_calc; n_calc = _a.size()-1; int n_exp; n_exp = _b.size()-1; for (int ie=0; ie<=n_exp; ie++) { for (int ic = 0; ic <= n_calc; ic++) { if (_d[ie] == _c[ic]) { re=abs((_a[ic] - _b[ie])/(_b[ie]))*100; Err.push_back(re); } } } return Err; }
0
a7bec0d0ec44dd3348e3679aad99abba
e849de775b365b65ba4841a501cf6a41
Sets the query string property based off of the query variable property. The 'query_string' filter is deprecated, but still works. Plugins should use the 'request' filter instead.
public function setQueryString(SequenceInterface $queryString = null): void;
0
eee8fe41c3e5307f39f76b6f3c497d93
44093113b038b432ddeba38b9718daa6
Resets the value of the "last_cmd_sent" text on the GUI
class Send_Command_Button(QPushButton): def Reset_GUI(self): self.setStyleSheet(GUI_Style.sendButton)
0
0e0ee5e490c9966428e803597c3b3fdd
66a2576be91b0e8aaffbc5757573ece1
Represents a field in the Reversi game field
class Field def initialize(x, y, piece = nil) @piece = piece @coordinates = Coordinates.new(x, y) @covered = {Color::RED => 0,Color::BLUE => 0} @covered_by_tower = {Color::RED => 0,Color::BLUE => 0} end
1
692d22cd11044acb51843ff2d276138e
010d3010001bdfa147bfe09cb84fef16
Determines whether the specified job is executing.
public abstract class JobStoreSupport : AdoConstants, IJobStore protected virtual async ValueTask<bool> JobExists( ConnectionAndTransactionHolder conn, JobKey jobKey, CancellationToken cancellationToken = default) { try { return await Delegate.JobExists(conn, jobK...
0
8bba02338bac39461bd5e1e0fb87b7e7
a23a8a5c659a6be8d5a1e05271fb5de5
Returns the PlayerConnection object of the Player.
namespace Monkey.Games.Pandemic public class PandemicHub : GameHub private PandemicPlayer GetPlayer() { return (PandemicPlayer)gameManager.GetPlayer(Context.ConnectionId).GamePlayer; }
0
a35be54dfccc86838d7bdbd3f48e7555
558ca87ac864cd5ddb23ecc9b658f511
Increments the entities power
self.power += 20 if self.power > 100: self.power = 100
1
74ab8484cd4ecbdac6a7584fc0492be9
888d553c1a9014a1637fedaca430b724
Test library data including energy group information and number of compositions.
class TestCompxs(unittest.TestCase): def test_libraryData(self): self.assertEqual(11, self.numGroups) self.assertEqual(14190675.0, max(self.lib.neutronEnergyUpperBounds)) self.assertAlmostEqual(0.41745778918, min(self.lib.neutronEnergyUpperBounds))
1
7f4e7cfcf25bedf1d6ee69417d1bdbb0
fc4b84011ac44132e6ab7615e505f652
根据片区统计连续梁的信息
$("#warnInfoTitleSpan").html(lxlInfoTmp.name+"超限梁段未处置详情"); $.ajax({ async : true, cache : false, type : 'POST', dataType : 'json', url : "homeSection/getLxlWarnInfo", data : { "conbeamID" : lxlInfoTmp.conbeamid }, error : function() { alert("服务器异常!"); }, success : function(data) { if (da...
0
d92a6091fb4b09e36cbb0833801365bd
06ac18d74ad1f6e86a15ee1426f6db45
Same as `DeeType_InheritsFrom()', but also check `tp_mro' for matches. This function should be used when `implemented_type' is an abstract type.
class zope_interface_test(TestCase): def getImplementedBy(self, klass): from zope.interface import implementedBy return implementedBy(klass)
0
7d242a966541296f9d8126cd26e283bd
25cfed9338ca741766ff10c2602e88d7
Filter the query by a related SalesPatientsparents object
{ $qb = parent::getQueryBuilder($alias); $qb->andWhere($alias . '.salesOrder = :salesorder'); $qb->setParameter('salesorder',$this->salesOrder->getId()); return $qb; }
0
a7ff372ed536adf9161d15375517ebb5
3af8a6cfd1ebc6893f9d22c0615dbd99
This method retrieves the error rate for the data transmission
public class MobileLinkQualityInfo extends LinkQualityInfo public int getGsmErrorRate() { return mGsmErrorRate; }
1
33dfd542d24d311197ba6fb0c7144093
5979dc1527470ec2e8a52b222caa3621
PdoDriver constructor.
{ $dsn = 'mysql:dbname=' . $this->database . ';host=' . $this->host; try { $this->connection = new PdoDriver($dsn, $user, $password, [PdoDriver::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'"]); } catch (PDOException $e) { Error::set(sprintf(self::ERROR...
1
f53af57332eaa65b76e928ad52059818
9187b9d417f9f85897e11e3f48551e36
获取待上课的排期
List<CourseScheduleEntity> entities = courseScheduleDao.loadWaitConductSchedule(null); if(entities.isEmpty()){ return Collections.emptyList(); } Set<Long> courseList = Sets.newHashSet(); List<Long> longList = new ArrayList<>(); for (CourseScheduleEntity entity...
1
e41096a0fb3fe254fd3c3c8378631ced
089349ea35af4b45035ed88234564e8e
根据病人编号查询处方信息
throws ServletException, IOException { try { List<Map<String, Object>> rItemList = new ArrayList<>(); int recordID = Integer.parseInt(request.getParameter("RecordID")); List<Prescription> prescriptionList = PrescriptionService.findByRecordID(recordID); ...
1
b036be73b4d5df0fbf2d3f85591422f5
b2b1cfb62703ab2281aadc7362be86d7
Create asset part. (That is link part to asset)
namespace PrefabWorldEditor public class VREditor : MonoSingleton<VREditor> public void createAsset(Part part) { _curEditPart = part; if (_goEditPart != null) { Destroy(_goEditPart); } _goEditPart = null; if (!AssetManager.Instance.parts.Con...
1
1c91f605aa914a92ddd218efb960ba4b
eba487226cf25ebe80dd0b4503b4c281
Description 实验室预约禁用时间段判冲
public void updateReservationResult(int deviceId) throws ParseException { LabRoomDevice device = labRoomDeviceDAO.findLabRoomDeviceByPrimaryKey(deviceId); if (device.getCDictionaryByAllowAppointment() != null && "1".equals(device.getCDictionaryByAllowAppointment().getCNumber()) && de...
0
4aa62033d2554513e1db97494f4f8b45
4a75d78ada36d299b7a51a31873daaed
获取佣金金额,(总金额-优惠金额-退款金额)*佣金比例
function getComm($level_id,$amount,$pay_way,$pay_status){ if($pay_status == 1){ $level = db('promote_level')->where("id",$level_id)->find(); if($pay_way == 1 || $pay_way == 2 || $pay_way == 3){ $commission = number_format($amount * $level['revenue'],2); }else if($pay_way == 4){ ...
0
9b70ec5e355d538a53ce479a2df7271b
7bf469d6b39d95216ca60ca3026facfc
插入订房信息
public void Insert(string ReserOrder,string ReserCustoName,string ReserCustoSex,int? ReserCustoAge,string ReserCustoPhone,DateTime? ReserDateTime,string CarType,string RecepEmployeeId) { CarReserInfo item = new CarReserInfo(); item.ReserOrder = ReserOrder; item.ReserCustoName = R...
1
7d9759c287ccfb29fac266f3d23012d9
8ee3c7a8d2d4247ef03c2decd7c64a50
Load the values used initially for the Budget and display them in the Pie chart
{ AccountsServiceClient accountsService = null; try { accountsService = new AccountsServiceClient(); Guid projectId = (Guid)Session[SessionName.ProjectId]; Guid logonId = ((LogonReturnValue)HttpContext.Current.Session[SessionNam...
0
0ca9ed70227c22f96b3cf057eb91352b
78e290c51c8c55465ae8b4e55158ca38
Adds a handler to all text changes events.
namespace ElderSoftware.Warlock.Forms public partial class DefaultDatabaseEditorTab : DatabaseEditorTab private void AddChangeHandlers() { foreach (var itemEditor in ItemEditors.Values) { if (itemEditor is TextBox) { var castedEdito...
1
66125b4c35f319286605ca9b51836338
b084badfe5878e768320a9530ac70dc8
Determine width of each column based upon number of choices
function returnColWidth($items){ global $cols_in_genre; $col_width = 100 / $cols_in_genre; if ($items < 1){ $items = 1; } if ($items < $cols_in_genre){ $col_width = 100 / $items; } return $col_width; }
1
88069e97b63779195a679eefcbc4404f
a80d0cba02c079c13cf89bbf617b50ff
Indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the <tt>hasChanged</tt> method will now return <tt>false</tt>. This method is called automatically by the <code>notifyObservers</code> methods.
@SuppressWarnings("serial") public abstract class AThumbnailList<E extends MediaElement> extends JList<E> implements IThumbnailList<E> @Override public void notifyObservers(final Object arg) { synchronized (this) { if (!this.changed) { return; } clearChang...
1
8a1eb1e55e4c805f2ef4255209ffd889
cf8fc9cca5c56bc4a583a9c12ce09ed1
Recommends a list of possible moves by eliminating illegal moves
{ int p1Column = Board.GetPlayerOnePos()[0]; int p1Row = Board.GetPlayerOnePos()[1]; int p2Column = Board.GetPlayerTwoPos()[0]; int p2Row = Board.GetPlayerOnePos()[1]; List<string> wallsOfInterest = new List<string>(); List<int> columns...
1
0d391ca0f2def9156eb6fbc661b37342
24ef5e500c35515aefbf80598b746a33
Dump the oscillation matrix
print('True Osc.Err Meas.Err Meas.SD Filter Err Covariance') print(' (s) (ms) (ms) (ms) (ms) (s^2)') for i in range(0, len(self.true_time)): print('{:5.0f} {:+7.2f} {:+9.2f} {:8.0f} {:+12.3f} {:10.3e}'.format( self.true_time[i], ...
0
13bf7223b7517c5c04c63ec0c48aea3f
b4b06ddb860e66bcc33758c1e58a4684
Reload list of monitors from API.
class UptimeRobot extends \BaseController public function index() { $monitors = $this->api->getMonitors(); switch($monitors['stat']) { case "ok": $status = 'success'; break; case "error": $status = 'error'; break; default: $status = $monitors['stat']; break; } $monitors = $this->api->parse($monitors...
1
1dff67e49e53c1bc6fbc96a0e68ee50d
9fc4286aa353cf874f761895f87b10a7
局部页面加载,加载录像播放器
public View initView() { LogUtil.e("本地视频页面被初始化"); View view = View.inflate(context, R.layout.video_pager, null); listView = (ListView) view.findViewById(R.id.listView); tv_nomedia = (TextView) view.findViewById(R.id.tv_nomedia); pb_loading = (ProgressBar) view.findViewById(R....
0
44b14658dc8be8eca405d467092f099a
1cdf76fb334642e4c1a4b90bbd2cf05d
최소 공배수를 구하는 함수 - 유클리드 호제법
public class Programmers_210609 public static int gcf(int n, int m) { while(Math.min(n, m)>0) { int temp = n; n = m; m = temp % m; } return n; }
0
527977172e875c54637051591cab4d52
fa6899494d7127979a73c14d45699901
设置选中情况下资源id
public class ItemAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> public void setSelectItemId(int id){ this.selectItemId = id; }
0
239bf5854e768d121760544c0c5c315f
3af19bfe16df882a562472fffab05dd7
enlève l'intersection de deux ensembles
newSet = Set("") lst = [] i = 0 for element in other.elements: if element not in lst: lst.append(element) i += 1 i = 0 for element in self.elements: if element not in lst: lst.append(element) ...
0
53adf8c9b6edb5ed7378c06fae07dfab
384a9729a06528ac832221ea241eea44
Get the device's duty cycle in percent, for a particular channel. Return Value (Ok Result): ```ignore 1%: "1" ```
unsigned long PWMDutyGet(unsigned long ulBase, unsigned long ulChannel) { unsigned long ulCMRData; unsigned long ulCNRData; xASSERT(PWMBaseValid(ulBase)); xASSERT((ulChannel >= 0) || (ulChannel <= 3)); ulCNRData = PWMARRGet(ulBase); ulCMRData = xHWREG(ulBase + TIMER_CCR1 + ulChannel * 4); ul...
1
75ad2f12bfe7ae9ceb8071e1f3268301
1f120902e38a9dd0ec77d9cc44ab5681
Removes the all the fields in the index range from the selection.
@SuppressWarnings("serial") public class PeriodView extends JComponent implements MoltonfView private class PeriodViewRangeSelector implements RangeSelector private void doClearSelection() { if (startChildIndex < 0 || endChildIndex < 0) { return; } int startIx = (...
1
e02b9e95d3e77258828cae826f297382
240d36cea7e84673f6c4a102547a1f54
找到链表的第一个入环节点,如果无环,则返回null 不使用额外的空间
if (head == null) { return null; } Node first = head; Node second = head; while (second != null) { first = first.getNext(); second = second.getNext().getNext(); if (first == second) { return first; } ...
0
2bee3b6dba2ccf34c722b79194fc2e52
9edb2fb93603412d6ce63da847021d72
Sets the market area persistence.
public abstract class CJProductServiceBaseImpl extends BaseServiceImpl implements CJProductService, IdentifiableOSGiService public void setLayoutPersistence(LayoutPersistence layoutPersistence) { this.layoutPersistence = layoutPersistence; }
0
3e09a1e7ce06a49c9134868d3e8e6c4f
73948e825eab794906237a50fa59abd6
Questo metodo permette di mostrare a video un messaggio.
void showMessage(String string);
1
df3b15bd32c29c93fb131f183c63ed9a
75a88c822d1023c1382caeb670f8c07d
Ugly workaround to separate objects from realm context
namespace ExamTotalTech.Helpers public static class Utils public static List<T> SeparateFromRealm<T>(this List<T> obj) where T : Realms.RealmObject { return JsonConvert.DeserializeObject<List<T>>(JsonConvert.SerializeObject(obj)); }
1
627bfbbac1474fe9fe305b016cbe7b83
b409cd44fe4e46e9deffe821b62300a8
短信发送优惠券
{ $phonenumber=$formPacket['showphone']; $sendcontent=$formPacket['showdescribe']; $coupon_id=$formPacket['showcoupon_id']; $coupon=Coupon::get_by_id($coupon_id); $coupon_key=$coupon->coupon_key; $end_time=UtilDateTime::timestampToDateTime($coupon->end_time); if(UtilString::contain($sendcontent,"[EXPIRET...
1
2c780fec0cb55a2e8a56053e47ad53ad
e33d66851181e5e4acb4bbd63a4b0a39
로그인 이후 유저테이블에 로그인한 유저의 정보를 생성해주는 함수
public class ConnectingUser public void insertLoginUser(String id, String pw) { conn = new Connect(); conn.connect(); try { String sql = "INSERT INTO users VALUES(?,?)"; pstmt = conn.con.prepareStatement(sql); pstmt.setString(1, id); pstmt.setString(2, pw); pstmt.executeUpdate(); System.out...
1
222055868d8ed97fa8444033036561a0
6f648ae0b404eee9f9783cac64fa600b
Check to see if NsName property is set
namespace Amazon.Tnb.Model public partial class CreateSolNetworkInstanceRequest : AmazonTnbRequest internal bool IsSetNsDescription() { return this._nsDescription != null; }
0
a9d71417088416ec9be6b88508b06f82
7aa9bdf6805e6fc05cab14e11ab56d7f
draws the tool bar
namespace BMap.NET.WindowsForm public partial class BMapControl2 : UserControl private void DrawToolsBar(Graphics g) { int offset = 384; using (SolidBrush sb = new SolidBrush(Color.FromArgb(120, Color.Black))) { g.DrawImage(Properties.BMap.ico_search_in_bo...
1
b302de966d83c02ea0b02c8ef53fa1c1
e74b60d2d7fcc8c61907cbddbf0b183c
Convert a number or array of integers to a string of padded hex octets.
class IntelHex: def tobinstr(self, start=None, end=None, pad=0xFF): return self.tobinarray(start, end, pad).tostring()
0
2cf277e9587724ab7d917bbfeb471aa2
7db5fd8735df98a94d0ecb501526fef2
查询系统文物区域统计 % 返回值 每个map为一种 区域的百分比统计 建‘key’ 区域名称 ,建‘value’ 该区域的 百分比值
Map<String, Object> getMeasureZoneResultPassPercentageByListIdsAndCategoryKeyAndAreaId(String[] listIds, String key, String areaId);
1
8910c70ce85a7ff7612169d53d625d84
fbc800fff1bf47ec74013b629ed8d288
Deletes all rows from the agent_sale_history table.
throws CommonException { ExchangeHistorySearchKey exchangeHis = new ExchangeHistorySearchKey(); dropRecords(exchangeHis); }
0
05bf884a21e16a34f11aa3b91dc32306
296a2c51b3e90931470fead077efb35e
从服务端接受到单词数据,加入本地列表并刷新页面
res = JSON.parse(res); if(res.length == 0) { document.getElementById("no-voca").style.display = "block"; return; } for(var i = 0; i < res.length; i ++) { word_list.push(new Word(res[i].id, res[i].word, res[i].trans, res[i].sent, res[i].prio, res[i]....
1
e58c1cf5749699afe8f783d599c2bfa8
22e74698520c5f77656828db8fc7fee5
This function takes in a filepath to a map xml file. This will allocate and return a TilePackage with all of the information contained in the map file. This TilePackage MUST be deleted (freed) by the caller of this function!
{ TiXmlDocument xml; xml.LoadFile(source); if (xml.Error()) { std::cerr << "Failed to load: " << source << std::endl; return false; } TiXmlElement* root = xml.RootElement(); int rowCount, colCount, tileSize = 0; root->Attribute("width", &colCount); root->Attribute("height", &rowCount); root->Attribute("ti...
0
7e78232d350ead9a000d11a70a07b602
0461bd5b4a0d3d893655693257296e05
Returns cartesian delta vector from positions a to b decomposed in N.
if not np.isscalar(a1) or not np.isscalar(a2): raise CAMBError('vector inputs not supported yet') return DeltaTime(byref(c_double(a1)), byref(c_double(a2)), None)
0
7393bdce81af535f2c553025a2b2add6
0595a2e3b26f4aeb22d45d2a5e49faa4
Testing the GET review-requests/<id>/file-attachments/<id>/ API with Not Modified response
x, y, w, h = (2, 2, 10, 10) rsp = self._postNewReviewRequest() review_request = ReviewRequest.objects.get( pk=rsp['review_request']['id']) rsp = self._postNewScreenshot(review_request) Screenshot.objects.get(pk=rsp['screenshot']['id']) review_request.publish(s...
0
914f00101b83b8b4f7d20ad8ee651929
71c25b5e9fb7c1b73437e4d71c3a464f
文字交谈下,界面部分按钮提示 "动作不允许"
function ChatController:closeChatUseAction() if self.chat_ui and self.chat_ui:isOpen() then self.chat_ui:playMoveAct() end end
0
3c6b83f02820d634d7b8d82f6b9554dd
a5c1326dd3ca68c6d49046ac1386f98d
Get subscription codes mapped by email
class SubscriptionExport implements FromCollection public function collection() { return Subscription::select(['email'])->get(); }
0
485dc73e6ad476951f0b238afd21ed7f
64fcba8b14335fc4d923762bf2c2b092
Gets the nearby instruments.
async getInstruments(limit = 50, offset = 0, search = '', columns = []) { return await this.repository.getAll(limit, offset, search, columns); }
0
b0b4131c8a308b8ef9cd380bcc03b3b9
1ba5ab4161b5a29da825553a4bd20892
解锁/锁定组件
export class TreaInlayStone extends CComponent public setLockedState(locked: boolean) { if (this.m_bIsLocked == locked) return; this.m_bIsLocked = locked; if (locked) { this.currentState = "lock"; this.m_imgBg.source = "Qualitykuang2_png"; ...
1
5ec9ff2d5d07bac3a5720569aba42c83
ef3ca336d207218db1f04b5cb09e5b1c
método para chamar o texto do menu
public class a020_Menu_item public String getmText() { return mText; }
1
5faf4b193a04430916706291e48a28a7
26229030f579564cf9f0ff38a401de05
根据国家编码读取 产品数据 ---DS2012
public string GetProductMenu(string countryCode) { ProductTree myTree = new ProductTree(); string va = myTree.GetCountryProduct(countryCode); return va; }
1
5f1f0c11390ff3f66c69086602015cc9
8fd970dcf75ca6b03959c1c70ec88335
カリー化 : 関数の引数をひとつだけに固定
var cachArg, cachRet; return function(arg){ if(cachArg == arg){ console.log("cach arg..."); return cachRet; }else{ cachRet = fn(arg); cachArg = arg; return cachRet; } } }
0
61aae784ae4f1d1ce7aa77302584b8f5
ab07b7bca2c5d9f4a98752d69e859eb8
Check if map wraps vertically.
if len(self.__list_empty_location) > 0: return False for row in range(len(self.__map)): for col in range(len(self.__map[row])-1): if self.__map[row][col] == self.__map[row][col + 1] or self.__map[col][row] == self.__map[col+1][row]: return Fals...
0
f01960977190c9cf525b9c421447ddbb
2a3d8e7e2328aca3d5e785fb0ed7dd00
Set a set of org search terms.
namespace Illumina.BaseSpace.SDK.ServiceModels public class SearchRequest : AbstractResourceListRequest<SearchResponse, SearchResultSortByParameters> public void SetScope(string[] scopes) { if (scopes == null || scopes.Length == 0) { Scope = null; retu...
0
a96bbf89ac37c5f40920e666c8f6f5e3
1215985ee77cd94f5a3f5d3928182dd4
Rysuje menu ukończenia gry.
arcade.start_render() arcade.draw_text("Najlepsze wyniki", SCREEN_WIDTH / 2, SCREEN_HEIGHT / 1.15, arcade.color.YELLOW_ORANGE, font_size=40, anchor_x="center") arcade.draw_text("Aby wrócić do Menu wciśnij spację.", SCREEN_WIDTH / 2, 10, arcade.co...
1
e904f6243a8c77d8f70d84672da8d292
078611fa8b11d9a5c551689bca8e91ba
更新临时条码对象
{ string filter = "sam_barcode=@sam_barcode"; Dictionary<string, object> updateData = new Dictionary<string, object>(); updateData["sam_flag"] = samFlag; updateData["DataProcessTime"] = dataProcessTime; return Update(updateData, filter, DBHelper.Create...
1
aa2655acfa2a249b37dbbc7ce93a913e
d80a983a84b328980ff47e00ac2db83f
为符合条件的标签添加链接
if tag == 'a': for attr in attrs: if attr[0] == 'href': absolute = urljoin(self.url, attr[1]) if absolute[:4] == 'http': self.links.append(absolute)
1
7c912158400dcc651b3c167162df0f21
184302540292d0317ae07ba3ebe8b4af
The method to get the currency_symbol Returns: string: A string representing the currency_symbol
class Misc(): def ticker_symbol(self): return self.__ticker_symbol
0
cd9d31edaa59ab0d496bfae813684497
33cc167628f9e787e2931b2984628b1e
Функция вычисляет определённый интеграл методом средних прямоугольников с заданным количеством разбиений.
{ double dx, integ, start, end; _rpn.Parse(xs); start = _rpn.Evaluate(); _rpn.Parse(xe); end = _rpn.Evaluate(); dx = (end - start) / (double)steps; integ = 0; _rpn.Parse(func); for (int i = 1; i <= steps;...
1
a3031a1f8745d63e1e07f1856508f4d6
26d3f95c8892c3b4b895651bc4a4cb77
设置ImageView的内容
if (info != null) { this.content = info; if (loadTv != null) { loadTv.setText(content); } } }
0
4785ace500f480c00f483db9eb272cbe
68d24d5cbd57886d7c0ad2667733ea14
Send player/client the current game state (was their move valid etc. and the board state)
protected void sendUpdatedStateTo(GamePlayer p) { PigGameState currentState = new PigGameState(gameState); p.sendInfo(currentState); }
1
d8e2b47e629ea38e9a82a745aa8b39cd
d4f33f29777087c9ce040e5502764fd1
Check if String is not null
fun String?.isNotNullOrEmpty():Boolean = !(this == null || this.trim().isBlank())
1
e9d512362b361cca25cb06c0ff4ea2d6
fb1929d43415c6faa369003bb07f6947
新类型的元组,对于传入的迭代对象,只保留int类型且值大于0的元素
def filter_list(): l = [2, 3, -5, 10, -5] res = filter(lambda x: x >= 0, l) for i in res: print(i) l = [i for i in l if i > 0] print(l)
0
1099988b73837f23ca8625d647a9aca2
e7091d24b146ec3e5351621591339278
Get Payment information to send to Google
JSONObject transactionInfo = new JSONObject(); transactionInfo.put("totalPrice", price); transactionInfo.put("totalPriceStatus", "FINAL"); transactionInfo.put("currencyCode", GooglePayConstants.CURRENCY_CODE); return transactionInfo; }
1
5eb11e619a1a74bde9ea8a506090ce2b
3fffd00135525d83c7037f262982ad66
当前已运行的服务,键为服务path,值为Service对象
Map<String, Service> getServices();
1
c815bec38267cba39b87ceb31964e4ea
e40fa7bd09716932d2c389d74c412ca2
Chuyen mang 2 chieu thanh 1 chieu dung 1 vong lap
namespace Sales public class clsPhieuXuatBanLeDAO : clsPhieuXuatDAO private clsPhieuXuatBanLeDTO ChuyenDoiTheoPhieuNhap(DataTable table) { clsPhieuXuatBanLeDTO PhieuXuat = new clsPhieuXuatBanLeDTO(); if (table.Rows.Count == 1) { DataRow Dong = table.Rows[0...
0
40252b79a131394666a12ebe6a61e807
8db598fdfc4e9fbca0e8b588a0141666
Возвращает название расчетного модуля (типа оплаты)
class Instalment implements BusinessPayInterface{ public function getPayName(): string { return $this->pay_name; }
1
bf8e575a4ba3fb51b45da908237ec6c4
e2077b5fc042cd40900b86e30579e014
获得0-9的随机数字符串
namespace Common public class RandomCodeUnit public static string GetNumberRandomCode(int CodeCount) { string allChar = "0,1,2,3,4,5,6,7,8,9"; string[] allCharArray = allChar.Split(','); string RandomCode = ""; int temp = -1; Random rand = new Rando...
1
c0f62ef388a255e3e4c05c97099b18e3
71b93d78c25a69e4275517cfd9866a8a
Mark the field's changed status according to the parameter.
public class CacheTableField implements ICacheTableField public void setIsChange(boolean isChange) { lock.writeLock().lock(); try { if (this.isChange == isChange) return; this.isChange = isChange; } catch (Exception e) { Logger.getLogger(CacheTableField.class.getName()).log(Level.SEVERE, null,...
1
471214eef08c733d5c78cba32fea56c7
7fef8bdb74ed0725b4b4469884e44765
输时显示遗憾页面
class BillingController extends Controller public function actionFailure() { $this->render('/player/Myship'); }
0
4c54b614086157f77cfaca08b9867725
21649228a86cc4e7913ae579757d5538
Execute a WPSOLR query.
Object executeQuery(WSDLQuery aQuery) throws WSDLException, IOException;
0
e8959c901156741b86d158916bc5473e
d98ce15d18a33507ad1675fc65cb9a4f
Enter a parse tree produced by {@see sdpParser::zone_adjustments()}.
class sdpBaseListener implements sdpListener public function enterZone_adjustments(Context\Zone_adjustmentsContext $context) : void {}
1
b30340c2cc3fcfa0f844c46023ed4ca1
a3e1f759baeca572d4e0af32175657e2
Get the control dependency map, used to manage extensions from control dependencies.
@JsType(isNative = true) public abstract class PluggableMap extends Object public native Collection<Control> getControls();
0
dd5da81bc5b8154eff4e73a15587bdbf
b14665dec5c9448c70fbbba622426bca
获取rt的字段转换为ignite中表字段后的字段信息
def get_batch_rt_fields_storages(rt_ids): rt_info_dict = dict() if rt_ids: res = MetaApi.result_tables.list({"result_table_ids": rt_ids, "related": ["fields", "storages"]}) if res.is_success(): rt_infos = res.data if rt_infos: for cur_rt_info in rt_infos: ...
0
2e7f5ae64c20735ffe6b6954a68b3995
0acdf7a02a14a524fd3515cba44d6ae6
获得电量
val filter = IntentFilter(Intent.ACTION_BATTERY_CHANGED) val intent: Intent? = context.registerReceiver(null, filter) return if (intent != null) { val level = intent.getIntExtra("level", -1) val scale = intent.getIntExtra("scale", -1) if (scale == -1) { ...
1
1dc197bfd9fdd56829c6a53a1b898a3d
39852230edb4d543ee0cc518622109a4
Flag indicating if the Y gyro was valid.
public class Mpu6050_2 boolean getYGyroFIFOEnabled() { return I2CdevReadBit(Integer.decode(deviceAddress), RA_FIFO_EN, YG_FIFO_EN_BIT); }
0
2955860507b2c36c1a38382d093be804
84b26e778d1097fa8343f7714a298423
Creates a new <see cref="HttpClient"/> instance that uses a custom message handler.
namespace Wyam.Common.Execution HttpClient CreateHttpClient(HttpMessageHandler handler);
1
6a0457d226dd217ea4fab201a302104a
b9abad0537c4ebc047cacde7042de83a
将对象转换为BigDecimal,当对象为空或转换失败时返回指定不为空的默认值
public class ObjectUtil public static BigDecimal getBigDecimal(Object obj, BigDecimal defaultValue) { BigDecimal bigDecimal = getBigDecimal(obj); if (bigDecimal != null) { return bigDecimal; } return defaultValue; }
1
abbe8e746a2d45419ac99888b7103668
da104fcf3e2d881b9f6976973c8d6cd5
Method to add to the total gross pay accumulator
class Employee(object): def calc_gross_pay(self): self.__gross_pay = self.__pay_rate * self.__total_hours
0
01a3448f3b1284e7bd0becaf53bf31f5
5cc1d31184a475e48427cea0c2b45246
Method for checking which columns contain boolean data
class NaturalLanguageQuery extends \yii\base\BaseObject protected function getBooleans(){ return array_keys( array_filter( $this->getOperatorData(), function($item){ return $item['type'] === self::TYPE_BOOLEAN; })); }
1