query_id
string
corpus_id
string
query
string
code
string
label
int64
9c92d97de1463695c134ebe3f5e88f21
2adc8c107f485906995792d400f8ccd4
Инициализирующий метод:
class Category_Controller extends _Core_Controller_UserCommon protected function __init() { $this->tpl->assign('name_page', 'category/category'); $this->model = new Category_Model(); }
1
c3110877658cce4865baa3d6eb2ca55b
47a5c83b76a2817ee1888733f1b78bdb
Test method for {@link travibot.utility.ValueExtractor#getNumericValueOnly(java.lang.String)}.
public class FormulaMinusTest @Test public void testGetNumericValueIntNum() throws GLanguageException { AbstractFormula operand1 = mock(AbstractFormula.class); when(operand1.getReturnType(null)).thenReturn(FormulaReturnType.INTEGER); when(operand1.getNumericValue(null)).thenReturn(1.0); AbstractFormula operand...
0
b19f44f83e2f58f33a97c0152edfccde
e316f5df5fe5a59d926cfe5bb5d622b7
If isMaxHeap == true, initialize as a MaxHeap. Else, initialize as a MinHeap.
class Heap Heap(int *b, bool (*c)(int, int)) : A(b), comp(c) { heapSize = -1; }
0
173e0c724ce86b938bcabdf1d1bf2e9c
6186206a4ce5f4e0cf5704d7e42f2507
This function returns the type of credit card; uses string of cc num
public class CreditCard public String getIssuer() { if(cc_num.size() == 15) if(cc_num.elementAt(0) == 3 && cc_num.elementAt(1) == 4 || cc_num.elementAt(0) == 3 && cc_num.elementAt(1) == 7) return "American Express"; else return "Unkown"; else if(cc_num.size() == 13) return "VISA"; else if(cc_num....
1
38438aa96b5dacccb9566d2bdd2a2c4f
d94ab4741797471aa8568fcefe414acb
Método que identifica si los calendario de vigencia se muestran o se ocultan dependiendo del tipo de usuario que escoja el usuario
{ if(Auth::user()->cambio) { return redirect('usuarios/'.Auth::user()->id); } $usuarios = User::where('estado',true)->orderBy('apellido')->get(); $hora_i = Carbon::createFromTime(null, 0, 0); $hora_f = Carbon::createFromTime(null, 30, 0); return vi...
0
118fd4f841c78b74a71fdaceac4388dd
f1988754730ceebb43fc7bb5502728bd
Spawn particles indicating a target line hit
void URunebergVR_Teleporter0::SpawnTargetMarker(FVector MarkerLocation, FRotator MarkerRotation) { if (TeleportTargetParticle) { TargetParticleSystemComponent = UGameplayStatics::SpawnEmitterAtLocation(this, TeleportTargetParticle, MarkerLocation, MarkerRotation); TargetParticleSystemComponent->SetWorldScale3D(Tel...
1
8a39d72f707379692da066e29bcba8d4
7a5e51cee1371dc1145bb1b19761232e
FormatVersion returns the formatted version string.
func FormatVersion(pkg types.Package) string { return formatVersion(pkg.Epoch, pkg.Version, pkg.Release) }
1
6c1fcd8d52cb601e361db8aa97f578e3
643cc7a30e071ecab97f9229467620f9
初始化画板起始大小
{ this.cellSize = cellSize; this.mapSize = mapSize; PanelCanvas.Size = new Size(cellSize * mapSize + 1, cellSize * mapSize + 1); bmp = new Bitmap(PanelCanvas.Width, PanelCanvas.Height); canvas = PanelCanvas.CreateGraphics(); bmpG = Graphics...
1
d0a909f78e4b428640ff708dfc735c32
61331e7ca8b207cbba86fb1fc73fd1ec
Checks if a vertical block's below is filled
{ if (isValid() && !isValid(-1, blockY - 1)) return true; return false; }
0
b355aa850f34ef576b6fb9ee851e0eaa
2dabbf8dba5069f3027fcea5e45f051c
run the game with user inputs
def main(): play_game(calc)
0
ed23eb5c16aa32b00a87843f079fd867
448777b9ffbd5591db87a4b7d6776105
Get channel statistics by ID
{ $response = $this->sendRequest( HttpMethods::GET, "/channels/{$channelId}/rtp_statistics" ); $rtpStat = new RTPstat(); $this->responseToAriModelInstance($response, $rtpStat); return $rtpStat; }
1
b7f258671ec855759b203925d7b7def2
e5c05e4e9871c7b84d552e66b9cabfee
HierarchyCode constructor.
class Code implements CodeInterface public function __construct() { $this->groups = new ArrayCollection(); }
0
36204159250e7b84ff95ee0cc4e8307c
f99894ebbe66ba59738b7a6586f1d394
Get quote by product and stock identifier
$result = array('success' => false); $quoteNo = $this->Request->hasProperty('quoteNo') ? $this->Request->quoteNo : ''; $quoteDetails = $this->controller->DatUnitOfWork->QUHSTHRepository->GetByQuoteNo($quoteNo); if ($quoteDetails) { $result['quoteDetails'] = $this->prepareResu...
0
185ec4b3bfef65417179a28cb644619e
c2571de164a4dd09287b4450dc865990
红冲其他收入单/费用单接口
function CheckRedFlush(keyvalue): Promise<any> { return request.get(process.env.basePath + `/Receivable/CheckRedFlush?keyvalue=${keyvalue}`).then(getResult as any); }
1
ab21c2aeccae743fd062e0d8cc539d25
f60469f10c7700ccbcb943a54ab0af66
Sends events to server.
class Events_system(Endpoint_system): def send(self, data): self.create_data(data) r = requests.post(url = self.endpoint(), data = self.json_data) response = r.text print("The response URL is:{0}".format(response))
1
eae56b149c6d97a828f376a48ba1d33f
879716ffa940c289068e51b37a014893
扑克牌点击事件的设置
{ PcvrComInputEvent.GetInstance().ClickPcvrBtEvent07 += ClickSetEnterBt; PcvrComInputEvent.GetInstance().ClickPcvrBtEvent08 += ClickSetMoveBt; PcvrComInputEvent.GetInstance().ClickPcvrBtEvent01 += ClickFangXiangLBtP1; PcvrComInputEvent.GetInstance().ClickPcvrBtEvent14 += ClickFangXia...
0
ae9f9e3cd8d7956311f5638068d2285f
81760236417b294e29eef8ff701eaaf7
校验用户攻击状态
class TempController extends RestBaseController public function checkUserState() { $id = $this->request->param( "id" , 0 , 'intval' ); $where = [ 'user_type' => 2, 'is_virtual' => 0, 'is_zombie' => 0, 'id' => ['>',$id]...
0
68a5ba048e8c5b13383be25427ab51c0
b93588fe324d270431bb6941917e19d1
Verify assigned a user into a group on jomsocial backend working perfectly
return countElementsInTable( 'glpi_groups_users', [ 'users_id' => $users_id, 'groups_id' => $groups_id ] ) > 0; }
0
fdc5bc6e06683b5962b66f98b7b5eec6
e8d41ed023c3ae2f32837e4a79ddfc56
Changes the current register bank being used
void updateRegisters(byte registers) { shiftData = registers; }
0
c33f05393f0b3133b6200995b1f389c7
5ee70d25eb9d3dad73fe773ecb4e92a3
计算需要渲染的元素的开始下标、结束下标和用于定位的元素下标
if(!this.target||this.target.numElements==0){ this.startIndex = this.endIndex = -1; return false; } if(isNaN(this.target.width)||this.target.width==0||isNaN(this.target.height)||this.target.height==0){ this.startIndex = this.endIndex = ...
1
dadae0c78780d027d67826cb3b544cc1
b7173c50cb6046f798209e25a62634a3
For now, check for ntuser API support on the host. In the future, a host may support win32k in containers even if the host does not support ntuser APIs.
{ ULONG v = HcGlobal.WindowsVersion; if (v == WINDOWS_NOT_DEFINED || v == WINDOWS_NOT_SUPPORTED) { return STATUS_FATAL_APP_EXIT; } #ifdef _WIN64 sciAcceptConnectPort = sciTable_86_64_NtAcceptConnectPort[v]; sciAccessCheck = sciTable_86_64_NtAccessCheck[v]; sciAccessCheckAndAuditAlarm = sciTable_86_64_NtAccessC...
0
7b34a832266721ac864623409903afc9
c68860eacad7f29b865e871fbc02da5a
是不是cond表达式中的else子表达式
class V: def isR_Else(self): return self.vtype == const.ELSE
1
82b6f1f645f9df018edb5cf820cc2f72
0de49dd7a798e7144c6435d9c6b75c3c
auth user follow/unfollow a profile by given profile id
async function toggleFollow( isFollowingProfile, activeUserDocId, profileDocId, profileUserId, followingUserId ) { await updateLoggedInUserFollowing(activeUserDocId, profileUserId, isFollowingProfile); await updateFollowedUserFollowers(profileDocId, followingUserId, isFollowingProfile); }
1
f736931d115d75280cc7e36d4d549a59
efddb430942667801eedace49370b770
A decorator that ensures that no *newly* opened file handles are left after decorated function is finished.
def relguard(decoratee): return RelGuard(decoratee)
0
9ebe82d21ede8da5bf5d6525afe78242
a62d64bb3bd87249081996db5b236b22
Getter for <code>test.cm_hx_equ_info.equ_id</code>.
public class YJWYEqSysModel extends DomainModel public String getEq_sys_id() { return getAttribute(EQ_SYS_ID); }
0
e84f07e94b797ad48985066f17a9fcdd
3ba40d0b0bcff792b2f2f542fac06bde
掛け算テスト
public class CalculatorTest @Test public void multiple() { Assert.assertEquals(Calculator.multiple(1.0, 3.0), 3.0, 0.01); Assert.assertEquals(Calculator.multiple(4.5, 3.0), 13.5, 0.01); }
1
9024e25d4fb9e77c617a6fe08ae7625d
ad176b2faa2273f70ac51f841300a6dc
Panic in debug, otherwise ignore.
fn panic(_info: &PanicInfo) -> ! { loop {} }
0
310892b02d8b33ecdb9df73238e2704f
84ba94a65b2d12b9209a30a536b65c28
找到某个数最低二进制位所对应的值
public class Q56_01_NumbersAppearOnce static int findFirstBitIs1(int num){ int indexBit = 0; while((num&1)==0&&indexBit<8*Integer.SIZE){ num = num>>1; indexBit++; } return indexBit; }
0
0b1bc1f4e9088d5abbf15ddf9df4140a
4137328da49d09214a0ab0b92aec784f
The button has been pressed - put a time-stamp into the FIFO
usecs += 531; msecs += 529 + usecs / 1000; usecs %= 1000; msecs %= MILLISECONDS_PER_DAY; if (msecs > lastTimeWrite + TIME_WRITE_PERIOD_MS || msecs < lastTimeWrite) { lastTimeWrite = msecs; writeTimeToEEPROM(); } updateButtonState(); ++buttonPressTime; if (~stateFlags & BUTTON_STATE) buttonPressTime = ...
0
da904e92b01dce7357596f212edb30f6
5e99adc91f5b4a78e1907318fb1e2179
Retrieves the remarks, if any, recorded against the specified column. <p>
public class ColumnSchema public String getRemarks() { return remarks; }
1
223494da6545ce428b6c95ae28759408
35802eb495ee4176eaa3610debd979eb
Through recursion, calculates the target cells available based off of the number of steps and the location of board.
if (target == 2) return 1; else if(target == 3) return 2; return back_track(target); }
0
e5a9701f59aa402ffe5c667cb5c9a8e3
216744f685baecd55b87a2ad63410b5b
Finalize an interned string.
void mango_rcstring_dealloc(MangoRCString *mstr) { mango_rcstring_table_decref(mstr->mstable, mstr->internId); }
1
bcf04077a06bf48fb7971bd48583adb4
a6370535a30a8f4ab11aac2601b90aa2
分页显示已读通知内容
String dbType=DbPoolConnection.getInstance().getDbType(); String queryStr=""; if(dbType.equals("mysql")) { queryStr="SELECT DISTINCT *FROM ( SELECT NOTICE_ID, NOTICE_TITLE,T3.CODE_NAME AS NOTICE_TYPE,CREATE_TIME,ONCLICK_COUNT,CREATE_USER,T2.USER_NAME AS CREATE_NAME FROM NOTICE T1 LEFT JOIN USER_INFO T2 ON T1...
1
f49f4941a0bbc9c8c2a600877ffadc0f
3cf9d99c09b0fdccef8bf80fe7c4bf88
Checks if the position at row and col contains a piece.
class Board: ############################################################################### # Initialization and getter/setter methods ############################################################################### def is_position_taken(self, row, column): return self.get_piece(row, column) != None
1
0c4290090d07257e1fac85713053b5b3
394077e6c903378bd8a04ad9c454d7de
发送PASV
static void do_pasv(session_t *sess) { char ip[16] = {0}; sysutil::getlocalip(ip); sess->pasv_listen_fd = sysutil::tcp_server(ip,0); FTPD_LOG(DEBUG,"pasv_listen_fd:%d",sess->pasv_listen_fd); struct sockaddr_in addr; socklen_t addrlen = sizeof(addr); if ((getsockname(sess->pasv_listen_fd,(struct sockaddr*)&addr,&...
1
7056a05f7371204a5a9250139694c588
217967128fcb5d3a2691560eb1b2ee92
删除展览信息
namespace Mars.Server.BLL.Exhibition public class BCtrl_Exhibition public bool DeleteExhibition(int exhibitionID) { return dao.DeleteExhibition(exhibitionID); }
1
6712feab251b411757dd948648cfee3f
e62913eab62d94efe3d5a3a5bed8897d
发送邮件,用户在网页的输入框中输入邮箱后,会调用此函数,单独发送邮件
class MailController extends Controller public function index() { $name="1460378298@qq.com"; $this->send($name,''); }
0
4a162023b3331e5cd2b32abfc75bd890
fa276ba69d19e5c7ede486cd0640523d
isSelectedメソッドのテスト
public class CheckBoxTest extends DocumentFoundationTest @Test public void isChecked() { try { String tag = "<input type=\"checkbox\" name=\"test\" value=\"checkboxvalue\" checked/>"; CheckBox checkBox = new CheckBox(new jp.co.dk.document.html.HtmlElement(tag, new HtmlElementFactory())); assertThat(checkBox...
0
d961db381efa3afad80511d3ea101c63
54c0c7a6da12fb25f9e406a1296117d3
Forces tracking online.
namespace CreateAR.EnkluPlayer.AR public class PassthroughArService : IArService public void ForceOnline() { if (null != OnTrackingOnline) { OnTrackingOnline(); } }
1
07dab922621543c9cc2aedf9c7cc77bb
e07e4c0c3bc19b746d62917f8d64a8f9
验证角色是否被用户引用,被引用返回true,否则返回false 角色ID
boolean checkRoleUsed(String roleId);
1
b80105e3515571566a1874d839875ae6
a5d7f9a650647238c29763681e43456d
# Calculate the average absolute difference between two numeric vectors
AAV<-function(x,mat,ind){ ni<-length(ind) mean(abs((mat[x,ind[2:ni]]-mat[x,ind[1:(ni-1)]])/mat[x,ind[1:(ni-1)]])) }
0
9842caf31bae979e8401b6c4ba472078
6b2918544f72b2d2f70d0f1c8fbda2bd
记录ETL执行日志
{ if (!string.IsNullOrWhiteSpace(userIdentity) && !string.IsNullOrWhiteSpace(connectionString) && targetVersion != null) { Guid key = Guid.NewGuid(); string sql = string.Format("insert into dbo.[SQLDeployToolLog] ([Key],[ExecutedBy],[BaseVersion],[TargetVe...
1
35912ce8c3ef027daa0aaafe7e71bde2
4553b923d57a3792053932830c9b60e5
获得跟date比偏移了day的24点时间
Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.set(Calendar.HOUR_OF_DAY, calendar.get(Calendar.HOUR_OF_DAY) - 2); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); r...
0
c56d9fd6167a13ec47d415f13a051246
a2795f31d28206a6baf17c9043fa7f7e
Khởi động cho các máy trước khi làm việc
{ AssignJobToMachineById(0, 1); AssignJobToMachineById(1, 1); AssignJobToMachineById(2, 1); AssignJobToMachineById(6, 1); AssignJobToMachineById(8, 1); AssignJobToMachineById(3, 2); AssignJobToMachineById(4, 2); Ass...
0
86b3d9465d3a7a70be94dc24a1e446a1
2c9fe437903ca0ef336a726379d0a88f
Generate an email when a request to join a site is approved
{ if ($this->leave_approval->leave_request->leave_id==0) { $leave_name="Annual_leave"; }else{ $leave_name=$this->leave_approval->leave_request->leave->name; } return (new MailMessage) ->subject('Leave request Passed an Approval Stage') ->line(...
0
dc10989c7ab191bad450e0285661519c
10514e86c6d321088e2fa10e7d56ef25
Returns the string suffix used by partitions
public class RacfConfiguration extends AbstractConfiguration @ConfigurationProperty(order=3, displayMessageKey="Suffix", helpMessageKey="SuffixHelp") public String getSuffix() { return _suffix; }
1
3bcd15a931fe79cf6586af035a69f141
71053d5990fc17c2eb2a959ef9d98638
verify the proof at the end of an IRMA session and send the resulting proof JWT
bool AuthSocket::_HandleReconnectProof() { sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleReconnectProof"); sAuthReconnectProof_C lp; if (!socket().recv((char *)&lp, sizeof(sAuthReconnectProof_C))) return false; if (_login.empty() || !_reconnectProof.GetNumBytes() || !K.GetNumBytes()) ...
0
82c45aec9bdd8a8395ce6b72537d4d71
2b9b21c856f2af12784aab646489e3b2
Recursive function to find the convex hull of a section of the points
min_point = listPts[0] for p in range(len(listPts)): if listPts[p][1] < min_point[1]: min_point = listPts[p] elif listPts[p][1] == min_point[1]: if listPts[p][0] > min_point[0]: min_point = listPts[p] newList = [] newList.append(min_point) for ...
0
3d7c77fbd6d14808e1cb04b57ae2f714
88c5631baea629a567f0c3d1b0fc5905
下载html 文件,并且进行css和js文件的替换
{ string htmlContent = this.html; Dictionary<string, string> dic = new Dictionary<string, string>(200); if (!dirConfig.CheckLegal()) { throw new SpiderException("路径配置不在统一磁盘下"); } dirConfig.CreateDir(); if (string...
1
c81f88e271e98305e80364551e6a24e4
7cbccbc152f4bd79f7e1e6c35d08a743
Gets filepath to the skins file of NoteFly.
return this.ctx.getFilesDir().getAbsoluteFile() + "/" + SKIN_DIR + "/" + assetSkinFile; }
1
65b7692711c2dca32362ad9498b28a19
fee4f2dbca513093aceaa64cfd2f7423
Interpolate between two NLDAS hourly rasters to a new time
if dz is None or newaltmethod is None: return md, raw malt = newaltmethod.lower() if malt == "tanh": z_new = setupz(md.shape[0], md.index[0], dz[0], dz[1]) elif malt == "linear": print(f"interpolating to grid space {dz:.2f} km.") z_new = np.arange(md.index[0], md.index[-1...
0
ece5a85bbbae8bad4e1f4a7ef0c5569d
98c514a81c0d48b6cd0ffcba9716accc
Configura a localização da tela centralizando-a em seu painel base.
public class LoadingWindow extends Shell public void centralize() { Monitor monitor = display.getPrimaryMonitor(); Rectangle bounds = monitor.getBounds(); Rectangle rect = getBounds(); int x = bounds.x + (bounds.width - rect.width) / 2; int y = bounds.y + (bounds.height - rect.height) / 2; setLocation(x, y)...
1
dff4b09bc1e03d6fe06fa3a00746aed0
6e0c368b1d334793c9e5edbb4ba114b6
Whether or not the key supports decryption, based on key type.
namespace RockLib.Encryption.Async public sealed class SynchronousAsyncCrypto : IAsyncCrypto public bool CanDecrypt(object keyIdentifier) { return Crypto.CanDecrypt(keyIdentifier); }
1
227f7bd1d5f7462c0aa076c8b9b727c1
55d010330b014a86b1fc83da41b183cb
Returns the ADXL343 Acceleration
class BMX055: def accelerometer(self): if not self.bus: return None b = self.bus.read_i2c_block_data(self.ACCELEROMETER, 2, 7) return struct.unpack('hhhb', array.array('B', b))
0
1eca153fd701e2a146c706f2d1479c02
4773298bd00bf8f9b08bb2f584380d69
Обновляет общее количество товара, на основе количества комплектаций
namespace MTF_Services.Model.Views public class SANPartsInfo public void UpdateTotalPrice() { TotalPrice = InitialPrice + StorageSumPrice; }
0
e0fb3bd0f0abfc25b81aaf1375658eb8
effbb3ee117e2012c1a0a15b9f221895
Calcule l'interval de ligne à rechercher en BDD en fonction de la page demandée
{ int addCol = 0; if (param.leftPartLine2!=null) { addCol++; } return (param.nbCol+1+addCol)*(param.largeurCol+param.espaceInterCol)+"px"; }
0
1af103167fec70fc312a46141faa1b24
1ce0a091d56cacf0e8c3b8427724df9a
Writes an array of values to the .moe file as a line Replaces occurrences of " with "" Wraps values in " if a , appears in the value Ends with line with CRLF (\r\n);
{ using (var sr = new StreamWriter(filename)) { for (var row = 0; row < values.Length; row++) { if (row > 0) sr.Write("\n"); for (var col = 0; col < values[row].Length; col++) { ...
0
b344d763e6ad678f54166aa8b0ec22d6
a46f16b07f5b2b36e75c20363dfd88f7
GetHookNamespace returns the namespace the webhooks are running in
func OperatorNamespace() string { operatorNamespace := os.Getenv("WATCH_NAMESPACE") if len(operatorNamespace) > 0 { return operatorNamespace } return operatorNamespaceDefault }
0
720af8ed1b2270c31137ee8fdd5664ae
db84827c8fc7b9f5636c77c20ec6863e
Process given words to adjust knowledge probabilities.
kb_avg = self.preprocessor.transform_kb(kb_words) kb_avg = self.kb_miner.predict(kb_avg) kb_avg = kb_avg.reshape((-1,)) data = self.preprocessor.transform(sents, kb_avg) sequence_lengths = data[-1] sequence_lengths = np.reshape(sequence_lengths, (-1,)) y_pred = se...
1
b53ffa87d10f34631f2d3100ae76cf44
2005d30782ab4f171596464bc8dcf66b
Hàm gọi store procedure để xóa lớp học
class LopHocController extends Controller public function destroy($id) { $this->authorize('xoa_lophoc'); LopHoc::where('id', '=', $id)->delete(); return redirect(route('allclass.index')); }
0
0c5ae9a5c7be9275276886ce774fd526
4584b3159cae0e85f2cdaeb778a5dd6e
Split the provided message to separate SMS parts. When possible, word wrap will be used to avoid splitting words and URLs.
def split_sms(text) return [text] unless text.sms_length > 160 result = [] while text.sms_length > 0 part, text = text.split_at( split_point(text) ) result << part end result end
0
91ad235c6587cce13eb018e0b0b91151
d53d9b43e175df4aa7b379e9f1daa232
设置html页面title内容
setTitle (title) { document.title = title || 'Web日志分析系统' }
1
62b4f5a51128986553563092e249c833
94939745861f741d1b494032e6346ac9
软键盘是否打开
public class PopEditText extends EditText implements OnGlobalLayoutListener, OnFocusChangeListener, OnClickListener private boolean isKeyboardShow() { return isKeyboardShow; }
1
5e872c4e1931a4008cf90f40d6632ce3
b141b410c06a7bb0bd7133b194f87bf1
初始化GWBS树规则
foreach ($allRules as $v) { $nodeIds = K_Tree::getParents($v['tree_rule_resource_id']); $nodeIdsArr = $nodeIds; $nodeIdsArr[] = $v['tree_rule_resource_id']; $fullNodeResourse = implode('/', $nodeIdsArr); if (! self::$aclTree->has($fullNodeResourse)) ...
1
48a6c98a0cd780ea85a288d3c8623bf5
72f7f181774ae13bc4232971b90c7d00
从datereader(也可以使用datatable) 读取数据添加到excel工作簿,然后转换到内存流
{ using (MemoryStream ms = RenderToExcel(reader)) { RenderToBrowser(ms, context, fileName); } }
1
8bbbbf65c85362390dbce3fed598274d
53eede820dd582498b846f3e8bf20703
Hides renderer window
CRTRenderer::~CRTRenderer() { m_window_ref.setActive(true); }
0
0259727e77780da831c2bab531e09fd9
061072011c3ad7d9059059319299ace3
expected to return a new state that represents a newly initialized game
public abstract class AbstractControllerState public abstract void newGame(int playerCount);
0
be5e18e52563973ca4a218164a9559ca
dba1cfb0b780742fc5c1fce05f3e2049
Sets whether or not to flip the up/down rotation.
void BodyPart::shouldFlip(bool flip){ this->shouldFlipY = flip; }
1
cfeae2bbe06e27eeb5877982a1447c01
8dd6b64370b5d32c3eb7a74b7058e25e
Mètode per actualitzar el ComboBox de la llista d'àlbums
public class AplicacioUB4 extends javax.swing.JFrame public void actualitzarLlistaAlbumsComboBox(){ comboBoxLlistatAlbums.setModel(this.controlador.controladorActualitzarLlistaAlbumsComboBox()); comboBoxLlistatAlbums.setVisible(true); }
1
6a98ebfe2f257916c099d354e35ce3cb
9028a8fca9d8ab6311fb90f2481de6ca
已审批申请
class MonthstockAction extends ACommonAction{ public function waitexamine() { import("ORG.Util.Page"); $map['type_id'] = 2; $map['status'] = 1; $count = M("shares_apply")->where($map)->count(); $p = new Page($count, C('ADMIN_PAGE_SIZE')); $page = $p->show(); $Lsql = "{$p->firstRow},{$p->listRows}"; $lis...
0
cbcbb940e5afc2db8636c2c5c541834d
8144227abdadd0edc9043448546196fb
Get the radius in pixels between clusters.
class GoogleMapsClusterer extends AbstractClusterer public function setClusterRadius($clusterRadius) { $this->clusterRadius = $clusterRadius; return $this; }
0
4b7ab334362c064ea8329881f32c8e6b
213375bde72ebbc137b1062057e260e7
通过身份证号码获取员工档案信息
{ $zyrjm = $request->input('zyrjm'); $user = $this->userLoginStatusRepository->userByZYRJM($zyrjm); $userIdCard = $this->userInformationRepository->obtainIdCard($user->id); echo json_encode(array('status'=>1, 'info'=>'获取信息成功', 'userIdCard'=>$userIdCard)); }
0
d5386fac6f7db7ed3e226edec3ce341e
643494758ce65beb583e236121099978
Retorna uma informação do dicionário do jogo entidade
class PlayerEntity(BaseEntity, _PlayerWeapons): def info(self): return self._info
1
dab9a583634d7531ca5eeb0f8f7f2575
4ad1252a072e8f6a04a0f50cdf49391c
Sets the data entry ID of this meta data.
public class Upload public void setDataId(String dataId) { this.dataId = dataId; }
1
159398d41ef984fb8cab10acad69ce8a
dc75694e581feca30369eb8bd8c1f9de
Returns the meta object for the container reference '{@link org.eclipse.nebula.widgets.timeline.ILane#getTrack <em>Track</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_ELinkContainer_links_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_ELinkContainer_links_feature", "_U...
0
bbbbe46a28e8bd2c636765a24024f506
aefb307ef78554803adabbb86c4e2064
Load an image from fid and an image style.
class NeuralStyleTransfer: def load_content_image(self, fpath: str, content_size: int = 512, interpolation: str = 'bilinear'): self.img_content = Image.from_fp(fpath, label='content') n_h, n_w, n_c = self.img_content.data.shape n_h_scaled = content_size n_w_sca...
0
63077d1fe9e8d042f2299f05d96337ae
3321b148f42aeaf3394c5d6d4100fe4b
Determine whether arguments can be multipled without overflow
static bool add_would_overflow(long x, long y) { return ((y > 0 && x > LONG_MAX - y) || (y < 0 && x < LONG_MIN - y)); }
0
aaff717016b35220c873f0f146567a43
bcff03cf18c9438fcc755382ac90a7e1
アクションリストを逆適用する。
{ foreach (IListAction<T> action in this._actions) { action.Apply(this._list); } this._actions.Clear(); }
0
68b1a7dcd013264d84f1b05b907e5aef
e8087cb2de440dd4210dc05964fd06e9
Flush TX FIFO
if (!(call HPLChipcon.cmd(CC2420_SFLUSHTX))) { sendFailed(); return; } if (!(call HPLChipconFIFO.writeTXFIFO(txlength+1,(uint8_t*)txbufptr))) { sendFailed(); return; } }
1
d76e0b61b4d270cc6625353ff2317352
c9920df02e9ddba66fa72b7bdffd238d
Проверяет, имеет ли право указанный пользователь откликнуться на задачу
class AnswerPolicy public function isForQuestion(User $user, Answer $answer) { $question = $answer->to; return $user->isUser && $user->status && $question->user_id === $user->id && in_array($question->status, [Question::STATUS_IN_WORK, Question::STATUS_LAWYER_SELECTED]) && !$answer->is |...
1
06f241cbff00a452fac38dd0a84f6144
d14c3978ab4080153ebff1db34e65684
Returns the color of the floor-tile at the specified observation-spot or -1 in case there is no floor-tile at the specified spot.
public abstract class MarioAiAgent implements Agent{ public final TileType getTile(int x, int y) { return tiles.getTile(x, y); }
0
786295e74509c9b628a4cc87f7f82f7c
1ed68ad98a60069f6c87f90d926bad81
设置表头,注意表列的操作用列代码(Tag中),不要用HeaderText
export class SpreadUtilityService setColTag(sheet: GC.Spread.Sheets.Worksheet, colDefData: any) { colDefData.forEach(item => { sheet.setTag(-1, item.COLINDEX, { fmtCol: { code: item.COLCODE, type: item.COLTYPE } }); }); }
1
e32279b552510ad610fd54f686d94188
93dfa26273d916f9891b90790f9d8350
检查是否属性的Setter
abstract class Model private function checkForSetter($name, $val) { $method = 'set' . ucfirst($name); if (! method_exists($this, $method)) { return array( 'methodExists' => false, 'val' => null ); } return array( 'me...
1
07e34c301e83fc57536b7a91f30b005f
f225ae57c329a2d9e6635b97bf62d92a
获取净资产
@Table(name = "fn_fund_holdings") public class FundHoldings public BigDecimal getStockWorth() { return stockWorth; }
0
6c24bde9cb5cb64f28d10ab7d0beb940
311d4a722d6316f15300b32d643761e6
获取bilibili全站榜
namespace bilibili.Http class ContentServ public static async Task<List<Rank>> GetOriRankItemsAsync() { string url = string.Empty; if (!WebStatusHelper.IsOnline()) { report("没有网络连接"); return null; } List<Rank> list =...
1
fcd56f1ed5faba24ed41a7026d7307ff
675020edf8b49ddad13c486cd38105e3
Administrator only. Explicitly updates the state of a share instance.
class API(base.Base): def update_share_access_metadata(self, context, access_id, metadata): try: api_common.check_metadata_properties(metadata) except exception.InvalidMetadata: raise exception.InvalidMetadata() except exception.InvalidMetadataSize: raise exce...
0
92fc0e9fb0709c0b018b02673a66d375
53156e3bdfa0eac30767b95e825058fd
Returns the value of the '<em><b>Alt Text</b></em>' containment reference. <!-- begin-user-doc --> <p> If the meaning of the '<em>Alt Text</em>' containment reference isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
if (this.alt != null) { return this.alt; } ValueBinding _vb = getValueBinding("alt"); if (_vb != null) { return (String) _vb.getValue(getFacesContext()); } return null; }
1
9aca958d6f48c2b7bb9223b2bbcd2b6c
964f6b7a0e54ac18e7a23dcc7804e712
Create a message for a specific userprofile and updates the currently displayed messages.
public final class UserProfilesRequests public static String profileMessage(@Nullable @Optional String userId) throws NetworkException, OauthSigner.XingOauthException { return XingController.getInstance().execute(buildProfileMessageRequest(userId)); }
0
31791414c4d145aacf037df0c6594a84
cc81a3e4cd30d1b02bfe0fd648e6c6d6
Functie care executa optiunea 2 din meniu
def run2(): run_tests() transactions_list = [] functionalities_map = {"adaugare": addAndModifyTrans, "cautare": searchTrans, "afisare" : printTransactions} print(welcome_message) print(Menu_text_2) while True: command = input("Introduceti comanda dorita") if command == "exit": ...
1
bd1307cc339dce874e709cfc1177fce3
8a95874081a3160ecc75b9aa8917322b
将世界坐标数组转换为经纬度高度坐标数组
const result = this._getLonLat(x, y, z); return { lon: this.degree(result.lon), lat: this.degree(result.lat), alt: result.alt * Wgs84.a }; }
1
56c2b50b5ec38af2d07231a76aa322f5
e23952e80313cd9af40f837a52d962d3
Creates and returns an empty counter list
func NewCounters() Counters { counters := make(Counters) return counters }
1
4b56932a6f2b17f4e009fdff77b9e079
78abbb8b0ae8db7813b30020748158fe
Used to handles the <see cref="GridMappingService.CurrentMaterialChanged"/> event.
{ MatchChange matchChange = state as MatchChange; try { DataModelClient dataModelClient = new DataModelClient(Guardian.Properties.Settings.Default.DataModelEndpoint); matchChange.Handler(dataModelClient, matchChange.MatchRow, matchChange.Value); dataModelClient.Close(); } catch (FaultExcept...
0
e05f298883db6225a37897213594eb56
fe5647c25ec08d7abe13f4a306dee271
マスク画像をもとに画像分割を行う
def divide_region(mask_data): pixel_step = 20.0 skel = skeletonize(mask_data.copy()) skel[skel != 0] = 255 skel_points = np.argwhere(skel != 0) keep = np.ones(len(skel_points[:,0]), 'bool') diff = np.diff(skel_points[:,0]) keep[1:] = (diff != 0) skel_points = skel_points[keep,:] s = ...
1
3f2cda673d2c8ba9e849fb102ab9f2e3
3145e31589d90c21f0adddbeefe85ac6
清进位标志C
namespace EMU6502 class CPU private void CLD() { if (DEBUG) { Console.WriteLine("CLD"); } SetBCDFlag(false); cycleDelayCounter = 2; PC += 1; }
0
c9ca139cd7794be1203dbefacef624fb
13092fc6c509b90289b8439f7d33eb3d
Entity fields are attached to an entity and should be able to be edited even when within locked sections.
$page = $this->getSession()->getPage(); $assert_session = $this->assertSession(); $this->drupalLogin($this->admin); $edit = [ 'entity_test_mul_changed[bundles][*]' => 1, 'entity_test_mul_changed[settings][js_lock]' => 1, ]; $this->drupalPostForm('admin/config/content/content_lock', $...
1
10efc1b189bcc257d8c9df57608fd7ff
1ae54b043d4958a20aa65d5c21884947
проверяет к какой стране принадлежит фирма и отдает название этой страны
class CompanyProfile extends \Magento\Framework\View\Element\Template public function getCompanyCountryLabel(\Magento\Company\Api\Data\CompanyInterface $company) { return $this->countryInformationProvider->getCountryNameByCode($company->getCountryId()); }
1
5e69695facaad510069b2d10f8465cf3
b53ef966416ad1ddd672ffa89f62f9d7
Die Dateiübersichtstabelle wird erstellt.
namespace Compori.Alphaplan.Plugin.Support.Factories.Version2100287 public class WawiFactory public IDatei CreateDatei() { return this.Plugin.ManagedObject(Names.Datei) as IDatei; }
0
e10c2fc007249e43d1fd9cd6e0d37608
75add7109bfc6f1962f88ec1df61cb18
Creates 16 bit variable with 2 8bit variables
class I2C: def pack16(high, low): return (high & 0xFF) << 8 | (low & 0xFF)
1
fcc2ed4f49bf22ee621dd717d8ad62f4
994b5c53c2be5a9f120e75f245896e2a
reloads page when new data arrives
namespace Happie [XamlCompilation(XamlCompilationOptions.Compile)] public partial class Home : ContentPage private async void OnRefresh(object sender, EventArgs e) { await LoadData(); }
1
95cd5ffaff072ed1fc9846149862e1eb
708d3fa133601f08156f17fef913453f
Rotate around global x axis.
impl<T> Is3DObject for T where T: HasRefSys3D fn rotate_x(&mut self, x: f64) { self.ref_sys_mut().rotate_x(x); }
1