query_id
string
corpus_id
string
query
string
code
string
label
int64
ea6cdedadbc6287c07fc18bb15c97740
f11d533e873cb981f40daf0a4d6e21ad
答复参与者是否具有答复权限
answer = zhkernel.get_answer(url_token=answer_url_token) can_comment = bool(controllers.answer.member_can_comment_answer( self.login_id, answer.id)) return {'can_comment': can_comment}
0
3de89134406a713399d8881003979916
63ae55e0f8d07c304995e44eb0294ddd
Настройка управления ЦАП
{ PCA0CPM0 = 0xC2; PCA0CN = 0x40; PCA0MD = 0x81; EA = 1; EIE1 |= 0x08; }
0
72d45624c0f3744e9d6197e0538aba37
4771503144a58d6dd57b43a803055dac
When show all tips button is clicked, show default - tips of all friends
showTipFriend() { this.showTipBox(this.spTipFriend); }
0
2880270902592ceb03045b64ddd00618
da289419fd6efc36fa5d8415f2e9c0ba
Remove alien protocol noise Our data logging software isn't the only software using the serial interface on the vibrabot so we have to discard other messages until the start sequence occurs.
n = self.serI.read(1) if n != '\x00': self.state = self.WaitForHeader return 0 self.state = self.WaitForData return 0
1
46dda0ba45d2e9d95b1bdd73a5c1a2f5
3303bde4677fd496da6591fdad38fa8c
Gets dnssec
namespace dnsimple.Services public partial class DomainsService public SimpleDnsimpleResponse<DnssecStatus> GetDnssec(long accountId, string domainIdentifier) { return new SimpleDnsimpleResponse<DnssecStatus>(Client.Http.Execute(Client.Http .RequestBuilder(DnssecPath(...
1
cf3b92af94225d84a7501ebe8edf9f98
b6e77354ff3cf6efb6c6d29c68d7046e
Gets the display name of the command.
namespace CommandTemplate.Framework.Commands public class HelpCommand : ICommand public string GetName() { return "Help"; }
1
06c526c606c082167bf7f9780afd9e9a
2bb7cf9c468fe9f0e6afc7f80915dfa8
Perform action upon **update** event message received from server
class AbstractEventsWebSocketHandler(AbstractAuthenticatedWebSocketHandler): def on_update(self, message: EventMessage) -> None: pass
1
756994234678543783f83d94c7a1fd63
74435124f366148c9242b8b2858fb519
获取视讯游戏设置
local name = BaseUtils.GetGameName() local verifySetting = BaseUtils.VerifySetting[name] if verifySetting == nil then local list = StringHelper.Split(name, "_") verifySetting = BaseUtils.VerifySetting[list[#list]] if verifySetting == nil then verifySetting = BaseUtils.Ve...
1
8b493a4e84067fc00306bf4171e3396e
ae75d0f6787e2067c75de2be003a4c40
根据学号密码登录并抓取本学期成绩页面
public class Learn_letter public static void login() throws IOException { HttpGet httpGet = new HttpGet(loginUrl); headerWrapper(httpGet); HttpResponse httpResponse = httpClient.execute(httpGet); StatusLine statusLine = httpResponse.getStatusLine(); int statusCode = statusLine.ge...
0
e629af86292eeed5adf2ea34cab35b4f
5cf3186865076a76a43b1ea5800811bc
Returns an iterator over the four corners of this leaf.
{ yield return this.LowerLeft; yield return this.LowerRight; yield return this.UpperLeft; yield return this.UpperRight; }
1
7287cc843206bf14a8d45641f7d8655d
c7c89818d341bc481b8412cf7e7f41dd
查找用户名是否存在,存在返回该用户名的下标,不存在则返回-1,出错返回-2
int i=0; while(users[i][0]!='\0'){ if(strcmp(u,users[i])==0){ return i; } i++; } return -1; }
0
fed94077d5abdc4c12d95345afaf99bc
be6108a18dba8e9673e708a026029888
Clear all one-shots for a socket
void sckt_reset(uint8_t socketId) { if (g_ltem1->sockets->socketCtrls[socketId].protocol == protocol_void) return; requestIrdData(socketId, true); }
0
59c1b56022b9e76cfa700b0e82904bdb
142bca287ab1f0bd6eb7543b339ecc8e
tidal friction time - for tidal dissipation - Eq. A9 of Fabrycky and Tremaine 2007
def tff_spherical_F( number_density, mu ): mass_density = mu * mh * number_density * percm2perm tff = np.sqrt( (3. * np.pi) / (32. * G * mass_density) ) tff = tff / sin1yr return tff
1
6f6df3b828b6dd429a92348aceb53220
7180d86cb7c864c2e0a63f061acfcf47
compara si el ancho del objeto es igual a la ingresada por parametro
public class NivelPantalla extends AppCompatImageView protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec){ super.onMeasure(widthMeasureSpec, heightMeasureSpec); setMeasuredDimension(lado, lado); }
0
5205b48b0da5da68b9ea877f8b1a566d
0d97bbd3b05a5753d57a044d352146a7
Fade in screen.
void fade_in() { __fxcnt = FX_T1_ALL | FX_MODE_DARK; while (__fade_lvl > 0) { swi_vblank(); __fxval_int = --__fade_lvl; } }
1
853ab46eb5334abd1b795fcc7836c5e1
4497e56f8e58759cf544409a8395b130
Datetime scalar -> use its metadata
class ExtractMetadata(): def __update_numeric_metadata(self, col): extract_metadata_helper.update_numeric( self.data_cur, self.metabase_cur, col, self.data_table_id, )
0
55819eb34d85ac1bb4d41b9d609150dd
f9800066ca43dc81fe7a187507df5230
@brief IO信号是否全部关闭检测
bool DemodCtrl_GetSignalStatus( DEMOD_CTRL_HANDLE *pHDemodCtrl, DEMOD_SIGNAL_STATISTIC *ptDemodStatistic) { bool rst[DEMODCTRL_MAX_SUPPORT_CNT] = {0}; DEMOD_CTRL_MGR *pDemCtl = DOWN_CAST(DEMOD_CTRL_MGR, pHDemodCtrl, hDemodCtrl); DEMOD_CTRL_MGR *pCurDemCtl = 0; int ...
0
856f9b38f3540d1a29d96ce2281eca0a
6e1456a75bc3fb0c155b7cbda8f836bd
购买成功时,对应商品标记为已解锁
namespace WordJourney [System.Serializable] public class BuyRecord{ public void PurchaseSuccess(string productId){ if (productId == PurchaseManager.extra_equipmentSlot_id) { BuyRecord.Instance.extraEquipmentSlotUnlocked = true; }else if (productId == PurchaseManager.extra_bag_2_id){ BuyRecor...
1
a8034365f29af9167846b9407cd737e0
4689610ad546fdd24ff8234b562ceed3
Deletes a specified appointment. Deletes an appointment by id and returns an success message.
class AppointmentController extends Controller public function destroy($appointment_id) { $appointment = Appointment::find($appointment_id); if($appointment != null){ $appointment->delete(); return \Response::json(array( 'id' => $appointment_id ));...
1
0e83b27c22cda41a41e8500e3ca53b13
aa1b1be7478ecce220a4a3e0846c0515
If certain points are achieved at a level, increase level
public class GameManager : MonoBehaviour public void AddPointReached() { LevelPointsReached++; }
0
df6e0adccc879a4ff778edbc2fb47796
efa24213233e768055b8c69dcecffd93
Render enclosing tag for TableColumn components.
class Column extends Grid public function renderSelf($layout = null, $title = null) { return $this->renderTag($this->renderChildren($layout, $title)); }
1
55f59810c3008f1ba53a7ab9c05239c7
540710f2e5ade3971fd2ea665840b679
Raffraichit le tableau des financements.
public class RemiseProducteurListPart extends VerticalLayout implements ComponentContainer , View , PopupSuppressionListener , IContratSelectorPart public void refreshTable() { Long idModeleContrat = contratSelectorPart.getModeleContratId(); List<RemiseDTO> res = new ArrayList<>(); if (idModeleContrat!=null) ...
1
8492d5ff5ff0ffb3528a0d242a38a5ef
d6d6679af91fafba25f976f778b6e693
Returns the meta object for the containment reference list '{@link client_serveur.Interface_DataBase#getPort_fourni_db_beta <em>Port fourni db beta</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getInterface_Serveur_Comp_Port_serveur_comp_serveur_comf();
0
a20364880a418d5197091819ca2a6135
6c4b8638a4640ffd37c7c43b9ea25564
The CheckCollideGhosts method will check if any ghost in the list collided with Pacman(target). An exception will be thrown if the target's x or y values are negative
{ for (int x = (gs.Pacman.Node.X - 1); x < gs.Pacman.Node.X + 2; x++) { for (int y = (gs.Pacman.Node.Y - 1); y < (gs.Pacman.Node.Y + 2); y++) { if (x < Map.Width && x >= 0 && y < Map.Height && y >= 0) ...
0
451fdfa52e3994341e71fe5eb1eb22b5
8c51aa2def8ba0ebd2952cbbdb7b8df1
Breaks for a number of seconds. Returns an awaitable. @LittleToonCat
class Debugging(AbstractCog): async def test_long_command(self, ctx, delay: float = 4.0): await asyncio.sleep(abs(delay))
1
6cb04207bbde6ed2626e2a3b5e0c8f93
44e3da8c66bdbf4573585fe5d6b43c49
\brief Artificially increase the number of sources to increase the incidence of strong lenses. Sources above the limiting redshift and below the limiting magnitude are copied and given random position angles, inclinations and positions within the field of view. The field of view is determined directly from the range o...
spectraSourcesLmbda=None,spectraSourcesWidth=5,listCenter=None, \ listRadius=None,link=None,intens=0.2,rho=0,variation=0,noiseType='student',\ decrease='True',noiseCube=None,df_stu=5,randomShape=False,seed=None,steps=50,dilate_factor=5): self.shape = shape self.lmbda = lmbda ...
0
5d7159b4721f813389e053ec45c29a8c
19b677e8e4c66b9ea72dcc39327ed528
Disables caching for current profile.
namespace SharpRepository.Repository IDisabledCache DisableCaching();
1
3bba0ca4b9f47293bb4817c47d3841ad
8a6212bc85c1e1c2d4f14b372fd76677
字符串是否包含关键词其中之一
namespace Common public static class StringHelper public static bool Contains(this string s, IEnumerable<string> keys) => Regex.IsMatch(s.ToLower(), String.Join("|", keys).ToLower());
1
59372a9d71488d5d059bd7a796940e28
202e7ce43d300dcb3ab3cd1f13d07e2c
Decompress a compressed pickle.
def depickle(body): return cPickle.loads(body)
0
d5d74be7c95f719b50c692ab897a1949
4f93b7fd2567fc623e85cf331088a344
Grab the relevant things from the firefox JSON
with open(filePath) as fp: jsonObj = json.load(fp) try: jsonObj["requestURL"] jsonObj["version"] jsonObj["build"] jsonObj["displayName"] except KeyError as undefinedKey: print(str(undefinedKey) + ' missed') exit(0) return jsonObj
1
6ecc4fc3abe7a7b5c3e3cf438499cfdc
c686906f79e73b2334e072c9b33017cd
读入已有的数据库,做增量索引
short type = rs.getShort("TYPE"); if (type == DatabaseMetaData.tableIndexStatistic){ return false; } String ixName = rs.getString(INDEX_NAME); DbIndexBuilder ix = t.findIndex(ixName); if(null == ix){ ix = new DbIndexBuilder().setName(ixName); if(!readIndexInfo(t,ix,rs)){ ...
1
6a34cba1dafa5d1683545182fc9bfcbd
ff7208d693482e699c37238299e6a506
Find the highest power of a variable.
int tempPower = 0; for(int x = 0; x<=maxDegree; x++) { if(x==power) { tempPower = coeff[x]; break; } } return tempPower; }
0
bb24f9c911a6c37481f4cc9eef297dcb
6f66dea0b954a80ce8b36fb2dd992fcc
Generate a simple identifier for the item that is unique with its configuration.
String identifier = null; switch (correlationItem) { case Node: identifier = "node:" + getNextNodeId(); break; case Link: identifier = "link:" + getNextLinkId(); break; case TerminationPoint: ...
1
cab740b5d5a535aa6ec8dea76e549a21
823a4d99ce26039b15da8caf9fa41dd7
https://codeforces.com/contest/129/problem/A
int main(int argc, const char * argv[]) { int t; scanf("%d",&t); for(int k=0; k<t; k++){ char str[100]; scanf("%s",str); int n = strlen(str); int cnt = 0; int negative =0; for (int i=0; i<n; i++){ char c = str[i]; if(c=='('){ ...
1
7991ea575fe433f6473feccb2cddc517
9dbbac4a629fda3b083ea192005296f4
スクロールバーがクリックされた時に呼ばれる。
{ if (e.Button == MouseButton.Left) { if (sender == btnMinus) { ScrollUp(); } else if (sender == btnPlus) { ScrollDown(); } } }
0
0193fe2ddd636d12ab35a0a0db3a4519
0e0e12d5c5613556ae727d724fc1579c
Outputs the results to the TraceManager
namespace Microsoft.Test.Taupo.Utilities public sealed class NullWrapperScope : IWrapperScope public void TraceResult(int callId, MethodBase methodInfo, object instance, object[] parameterValues, ref object returnValue) { }
0
baab8f76215a60ff44f0e43090382984
8c24ee6d038a87682b6e06bc83197848
Get a string representation of the network (ipv4/ipv6) source address
if (server.ai_family == IP4) { return ExtractIPv4 (reinterpret_cast <sockaddr_in *> (server.ai_addr)); } else if (server.ai_family == IP6) { return ExtractIPv6 (reinterpret_cast <sockaddr_in6 *> (server.ai_addr)); } else { return string ("Unknown address family"); } }
1
e1c68de88bac6cfca4fb31684a429c23
61826c5be6416fa4fd41f00fd4d08785
! Satisfy, or record as un-matched, all outgoing references
namespace SIL.FieldWorks.FDO void RestoreIncomingRefsOnOutgoingRefs();
0
e653bb37fae4931da9534e167b21a8e2
afbcd02abdd36f5da0f2157b7d5ee4af
构造函数,设置文件位置和过滤级别.
{ if('' !== $file){ $this->setFile($file); } $this->openDelimiter = $openDelimiter; $this->closeDelimiter = $closeDelimiter; }
0
65a5329f89a36b9a057fbd3bf55324f6
950b3ed5c27893ef9bab09febbc7358a
Готовит строку для поиска через Yandex
{ if (cmbSearchFilter.SelectedIndex == 0) { var name = tbSearch.Text.Trim().Split(' '); if (name.Count() == 0) return ""; if (name.Count() == 1) return $"([Фамилия] LIKE '%{name[0]}%') OR ([Имя] LIKE ...
0
c80bcd4055df62bb6d39dafbcb68a883
9ae0e30d2d8ec19e30832fe4360ed21e
Retreive motor stepping rate from the device and store to internal cache var.
{ if (lsm == NULL) return -EINVAL; if (lsm->m_scl < 0) return -EINVAL; lsm->m_res = (lsm->m_scl == M_SCALE_2GS) ? 2.0f / 32768.0f : (float) (lsm->m_scl << 2) / 32768.0f; return 0; }
0
f89caa262aa586b5c5f358d1d7a1f51c
81062dd3e7b0aeff6db119f9e5e9bb60
通过userId查找所有的店铺
Site findShopByUserId(Long userId);
0
59a48d12dd27dd506e4816c8bb4d7202
55c55a50d915f6a44c20e2392dd7c854
Storage Table へのクエリで接続エラー等の回復可能エラーが発生した際のリトライ処理を行う
{ switch(ErrorNumber) { case 2006: case 2008: case 2013: case 2055: { return _Reconnect( con ); }break; } return false; }
1
3cfd09e511dcb4b58bb2605ff9ff28d3
b94e8f9b37edb71ac51f19b302a7a5f9
Computes the latent variables from the luminance images via the entropy autoencoder, one mini-batch at a time.
sum_ladj = 0 for i, flow in enumerate(self.flows): z_k, ladj_k = flow(z_k, w[:, i * latent_dim : (i + 1) * latent_dim], u[:, i * latent_dim : (i + 1) * latent_dim], b[:, i: i+1]) sum_ladj += ladj_k return z_k, sum_ladj
0
0108c48c1756881452892cc476d97365
2a6b9b057e8afbb83d6300887b8f539e
https://stackoverflow.com/a/7419630/959687
string randomString(size_t length) { static auto& chrs = "0123456789" "abcdefghijklmnopqrstuvwxyz"; thread_local static std::mt19937 rg{ std::random_device{}() }; thread_local static std::uniform_int_distribution<std::string::size_type> pick(0, sizeof(chrs) - 2); std::string s; s.reserve(length); while (length...
1
4c5575414f8f1c933014fd7363deef0b
3c572105fe977d04102faff51f0d414b
This is the friendship function, implementation of Havel--Hakimi algorithm
{ int savings; std::priority_queue <struct cwedge> savingsList; struct cwedge temp; int numberSet = 0; int start, prev, next, u, v, total; bool loop; std::vector <int> newResult; for (int i = 0; i < cityCount; i++) { for (int j = i + 1; j < cityCount; j++) { savings = matrix[hub][i] + matrix[hub][j] - m...
0
605cf13d47b60e85194aaa667750077c
951f40d0a9bb6029e112511fbe5cb766
프로토콜 유무에 따라 알맞는 주소로 보내주는 역활을 한다
abstract class Form protected function protocol($protocol) { global $HTTP_ROOT_URL; global $HTTPS_ROOT_URL; $http_url = "http://" . $_SERVER['HTTP_HOST']; $https_url = "https://" . $_SERVER['HTTP_HOST']; if (isset($HTTP_ROOT_URL)) { $http_url = $HTTP_ROOT_URL; ...
1
a74fb2ff7fb5eb4dbbc37590c2d1078d
149d83b88744b5e37ccc27cd1f961c6e
get the values entered from user and send them to parse server login
class LoginActivity : AppCompatActivity(), Response.Listener<JSONObject>, Response.ErrorListener private fun toLogin(name: String, pass: String) { progressDialog.show() val jsonObj = JSONObject() jsonObj.put("username", name) jsonObj.put("password", pass) val request = JsonObject...
1
1b12c31aee52b6b7bf2d7069752b98b6
8c3558d5c3d62190dcbf1629053afd4e
行と列から枡を取得
class Cell static getBlockLine(cell) { let block = {}; block.row = Math.floor( cell.row / 3 ); block.col = Math.floor( cell.col / 3 ); return block; }
1
75cdd71058f2ca5097b40ea7c9c7a8db
d7d27bfd618f590bd48344dfc0b45ed2
Проверяет на то что прошла неделя с последних изменений в файле
{ $dtNow = new DateTime(); $dtFileLastModified = new DateTime(); $fileLastModifiedTimeStamp = filemtime($this->downloadedFileLocation); $dtFileLastModified->setTimestamp($fileLastModifiedTimeStamp); $dateDifference = date_diff($dtFileLastModified, $dtNow); return intv...
1
0cac1e59a60d1810f51a87553c06a4a9
e45714f1ed5e7d1933535b6e6df12f88
Adds Video row to DB or updates existing one.
namespace Jaxx.VideoDbNetStandard int InsertOrUpdateVideo(videodb_videodata Video);
1
cd40ad7939f3ca7a5607a9e1671969d6
122163b7e2735fe67061f31f82cfad8c
Renders the editable text box on the screen and sets up listeners
void textBox();
0
27e69f89083704066f7a70231b893cfc
8965c74635948cfce6df5fa79a198b0b
将待测试的图像数据合并,后续通过labelimg工具进行查看
def merge4array(matrix1, matrix2, matrix3, matrix4, label): merge_4 = matrix1 + matrix2 + matrix3 + matrix4 merge_array = np.row_stack(merge_4) for i in range(len(merge_array)): merge_array[i, 0] = label return merge_array
1
226c67e9499071bb325ecbf2f465d17e
72d36bbefd4a3f9f8797a65dda6d3ccf
获取是否需要认证 <p> 服务端是否需要认证。客户端应该是比较明确的知道自己该连哪个服务端的地址,而服务端对于客户端的连接身份是需要验证得知的, 通常服务端的做法是会以验证客户端的IP为主来确认客户端的身份 ,然而当客户端无独立固定IP的情况下,也就是不能通过可靠IP来验证身份,可能服务端对客户端的身份不容易做判断,所以出现了认证的概念。 因使用的复杂性及加密的性能考虑 framework-nio未使用JDK自带的{@link SSLEngine} 相关的基于双向认证的API。而是采用了灵活的服务端单向认证客户端的方法, 也就是客户端再{@link HandleListener} <code>connect</code>方法连接上服...
public class DefaultSslContextFactory extends SslContextFactory public boolean isWantClientAuthentication() { return wantClientAuthentication; }
1
efde1637d77fcf4abf33225f77f0f904
85abd8c16154b47e45bc46c4c05327d8
Create a new queue of commands.
omx_vdpp::omx_cmd_queue::omx_cmd_queue(): m_read(0),m_write(0),m_size(0) { memset(m_q,0,sizeof(omx_event)*OMX_CORE_CONTROL_CMDQ_SIZE); }
1
0d84646e98920e9f4552a4aa48248dcb
e2096badbe9ad33a8eaf901d7b5dafd3
关闭登录提示
function closeLoginCk() { $("#IsLoginCheck").hide(); $("#bg").hide(); }
1
606d708681813608909e52858f8460eb
80a082c5e16542ebb29fd4774c3582bb
Sets the name of the positional file.
public final class FileAppender extends AppenderBase<ILoggingEvent> implements IErrorLogger public void setFileName(final String fileName) { this.parameters.setFileName(fileName); }
1
8f752f3ef1815ae2aa8338c98723ea6c
a99e5fe8464e27dd1145d08ecb2ba9b4
批量添加消息到可靠队列
namespace LightMessager public sealed partial class RabbitMqHub public bool Send<TBody>(IEnumerable<TBody> messageBodys, string routeKey = "", int delaySend = 0) { if (!messageBodys.Any()) return false; using (var pooled = GetConfirmedChannel() as PooledConfirmedChann...
1
258fd6c7aae13000dfb13ce58edbfeea
48de88d89e8f4e1a2c35999402068516
Get values of a set by the set id
query = """SELECT OBX_ID, OBR_Set_ID, Pat_ID1, OBD_ID, Obs_Float, Obs_String FROM Observe WHERE OBR_SET_ID LIKE %s;""" self.cursor.execute(query, setid) return self.cursor.fetchall()
1
707f31f0eb294f8a0a708d4f9c5032ee
2c0e9093b30b208df80f5ee0cc2fec02
Draw a hollow rectangle.
void draw_hollow_rect(int r, int c, int width, int height, u16 color) { int cW = c + width; int rH = r + height; for (int k = r; k <= height + r; k++) { *(VIDBUFFER + OFFSET(k, c)) = color; *(VIDBUFFER + OFFSET(k, cW)) = color; } for (int l = c; l <= width + c; l++) { *(VIDBU...
1
5acb26c460fd8be012f0b1985e4bdd3d
8c4585d8e9179c2d7c68c2797da53d8a
Returns the number of milliseconds elapsed since the startTimer() method was called.
public class Timer public long millis() { long elapsed = elapsedTime; if (baseTime!=0) { elapsed += System.currentTimeMillis() - baseTime; } return elapsed; }
1
2edda3eb0b1cbc3d15c07fdcd016df83
8b76ae5c5848b7887b85410be35f4828
验证问卷
function checkForm(){ var box = $('.questionBox') var len = box.length var sAnswer = [] box.each(function(i, ele) { if($(ele).attr('questiontype') === 'sAnswer'){ sAnswer.push(i+1) } }) getData(function(data,judgeS){ box.removeClass("warn") var isComplete = true var goto = [] f...
1
a1e388fd790a4d7ebd9d7c53112ff839
5ae4185a7a8bc0856c58c23c58dd6981
PCDファイルの読み込み
loadInputCloud (const std::string &pcd_file) { xyz_ = PointCloud::Ptr (new PointCloud); pcl::io::loadPCDFile (pcd_file, *xyz_); processInput (); }
1
adc360f1a184bea381d2cb207849c1b6
bad23d961f2ddfb33cbb7ce3ff03eb64
Set whether the coherence is displayed.
public class COAContent3D extends JPanel public void setShowText(boolean value) { showText = value; }
0
3604398088c543745182e7bb56ccbd95
28b56d682fa08d2183fd37da151f7a69
Function for adding ignite handlers to evaluation engine.
self, engine: 'ignite.engine.Engine', models: Union[torch.nn.Module, Dict[str, torch.nn.Module]], optimizers: Union[torch.optim.Optimizer, Dict[str, torch.optim.Optimizer]], max_epochs: int, *, extensions: Optional[List['extension_modul...
1
964a3d9e204fee7e52cd619fa74c4c3d
45b5e38603683df26551731a5f0f48e0
Saves list of initial timers.
{ for (int k = valArray[0]; k < valArray[1]; k++) { for (uint8_t l = 0; l < 7; l++) { SaveTimer(k, l, ReadTimer(k + 1, l)); } } SaveTimer(valArray[1]); }
1
028c4c9ce8509758d34fe4b58c295df0
0f2caf4b78a70adddd1ce25a1af39388
迭代次数比最大迭代次数大,则停止迭代
{ int l, j; double f, d, s; double[] y = new double[n]; string num = nMaxIt.ToString(); l = nMaxIt; f = Func(x, y); System.Data.DataTable dt = new System.Data.DataTable(); dt.Columns.Add("ID", typeof(string)); ...
0
9dcc186bbeed1d36131f927c1253d0b1
ec547d69228b632c6167950bc3d3e6e7
一意キーを作成するDDLを格納するディレクトリ名を設定します。 一意キーを作成するDDLを格納するディレクトリ名
public class GenerateDdlCommand extends AbstractCommand public void setTemplateFilePrimaryDir(File templateFilePrimaryDir) { this.templateFilePrimaryDir = templateFilePrimaryDir; }
1
07fe5bdd1e375cc07ee63a6559c1e8aa
413d0b78d6c7d84771cd4873116985e6
@brief This function checks for Reset Done bits to be cleared after a reset assert.
SetDbBrstN ( IN UINT8 Socket, IN UINT32 ChannelBitMask, IN BOOLEAN IsAssert ) { PSYSHOST Host; UINT8 Channel; UINT8 Dimm; UINT8 Rank; UINT8 MaxChDdr; DDR5_RCD_COMMAND_SPACE_S...
0
fe160dd5251187bc29ef0fd8a83469bd
af51788d31836a90c1c427e2bb990d70
Returns the rank for the given taxonomy ID.
class TaxonomyService(ABC): def add_rank(self, table: DataFrame[ResultTable]) -> DataFrame[ResultTable]:
0
f4b3b01f119edeaca000a8f75c0d2f63
bc2bb34ce1fb92a22733f8e1360adb5b
Get the binary content of this chunk
public function getBinaryData();
1
f82813d5b4e7cabe84954fd7528bf88d
af02556863b8c71363416b296a797d1e
从工作线程调用主线程,设置状态栏提示文本
{ if (!Dispatcher.CheckAccess()) { Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Send, new ShowDefaultDelegate(SetDefaultDescription),value); return; } SetProgressText(value) ; }
1
916b1d6efd46707095b61dd7c5890633
fd0e31dab01cc6114a025825a1a87a6a
Builds the game from the Acts, Characters, and LearningObjectives
public class Structure public Game createGame() { acts = new ArrayList<Act>(); acts.add(createActFromScreens(theme.getIntro())); for(int i = 0; i < locale.getLearningActs().size(); i++) { acts.add(locale.getAct(i)); } acts.add(createActFromScreens(theme.getOutro())); ...
1
50cbdec2903d327be48fab31cc8e19db
5cd75b095085e91f98b9444a15c459ec
Set the classification of a specific ant-pol tuple.
void updateAnt(int k, int l) { ants[k].loc = l; for (int i = 0; i < nodeNum; i++) if (ants[k].tabu[i] == -1) { ants[k].tabu[i] = l; break; } for (int i = 0; i < pathNum; i++) if (ants[k].antPath[i] == -1) { ants[k].antPath[i] = l; break; } }
0
8ec7b57d1e8319832d8a885eb50e7792
d1d7233cfd79b4e3095914c38b778b4c
Sets listeners and colors for views in the restore/delete CardView.
swipeCardButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { cardSwipe = true; ExecuteSwipeTask swipeTask = new ExecuteSwipeTask(); swipeTask.execute(); startTransaction(); ...
0
dd085fbca2aa7e79f6c5798c8ad54855
3a43dd3d8615733537be4410bf7e2195
Update the content of a dynamic texture
{ D_D3D11_BOX DestBox ; DestBox.left = ( UINT )Rect->left ; DestBox.top = ( UINT )Rect->top ; DestBox.front = 0 ; DestBox.right = ( UINT )Rect->right ; DestBox.bottom = ( UINT )Rect->bottom ; DestBox.back = 1 ; D3D11DeviceContext_UpdateSubresource_ASync( MASKD3D11.MaskImageTexture, D_D3D11CalcSubr...
1
0b6b94e981373f6a86ad1488c136af4f
14059f37fcfcdbdcd085ef1ba0b0372e
设置字段is_use 是否有效(0.有效1.无效)
int setUseUser(@Param("id")Integer id,@Param("isUse")Integer isUse);
1
a918ac9615842de835ed72bffb7864c6
89fb8a69c013145b2573657a954b61c5
Sets the geozone ID of this device.
@Fluent public final class MapsGeofenceGeometry public MapsGeofenceGeometry setDeviceId(String deviceId) { this.deviceId = deviceId; return this; }
0
7bd11e7b85e8bd9fbb78ef35a96e0c0a
92583abc3729d7af4f4bd261ddb63e25
Initialize refresh-rated based software optimization.
class Installers_Refresh(Link): def __init__(self,fullRefresh=False): Link.__init__(self) self.fullRefresh = fullRefresh
0
900814e86daee9b6ec631d5abdf5c64b
f5b685dbf692fce1d71c38f8abcdb68a
This method pauses the bot for a randomly generated amount of time (seconds and tenths of seconds)
namespace PartyDudePro public class PartyDudeComms private void pauseForABit(int minValue, int maxValue) { randomSeconds = (randomNumber.Next(minValue, maxValue) * 1000); randomTenthsOfSeconds = (randomNumber.Next(1, 59) * 10); randomTime = randomSeconds + randomTenthsOfSeconds; Thread.Sleep(randomTim...
1
47577dda5a57d258f7118ed81e04a129
1528bc0a70e754049f298f58506aaaa0
打印一个double型值并换行
namespace HC.Core.Helpers public class PrintToScreen public static void println(double[] aa) { for (var i = 0; i < aa.GetLength(0); i++) { WriteLine(aa[i] + " "); } }
0
9daca0985e226a4e9d643f217215e1d4
82326b3e49d6b53843d9602751828349
Perturbs shape of a given node.
class RibbonSystem(BaseSystem): def nudgeFollicle(follicleList=None, nudgeU=0.01, nudgeV=0.01): if follicleList is None: follicleList = pm.ls(sl=True) if not follicleList: raise ValueError('') skipped = 0 for fol in follicleList: if isinstance(fol.getS...
1
0a1d319668ad72e7f89b6a7b045b82df
c37cdcaed76766a339c2e898e921d5f3
Low level IR to do sort by key on the GPU.
def sort_by_key_ir( keys_in, values_in, keys_out, values_out, keys_out_swap, values_out_swap, axis, is_ascend ): ib = tvm.tir.ir_builder.create() shape = keys_in.shape keys_in = ib.buffer_ptr(keys_in) values_in = ib.buffer_ptr(values_in) keys_out = ib.buffer_ptr(keys_out) keys_out_swap = ib....
1
736e3630578f4459710326e53db3ca25
84c3d2accaee1fe4daa9101b14e20aa3
Controller to be used via AJAX, that returns all visa types by destination country
destinations_by_visa = {} for req in requirements_for_country: visa_name = req.visa_type.description interest_code = self._interest_code(req) if visa_name not in destinations_by_visa: destinations_by_visa[visa_name] = [] destinations_by_vis...
0
79e8209e38b2a3845b690d49a86931c2
3cb24e9aa73280096f07c5d13f9e191f
Get the UIDs of the Partner(s) that are attached to a BusinessEntity.
public int getC_BPartner_ID_P();
0
e135887d8288dbd51c77570ae0aa2b34
12053ce31a6ef0931c5fcd5ef28a609d
MÉTODO GET ANALISE EXECUTA OS MÉTODOS DE ANÁLISES ESTRUTURAIS DE TABELAS E COLUNAS E OBTEM O RETORNO DA ANALISE
namespace Laura.Compute [Serializable] public class ComputeExecuter : IDisposable private string AnalyseSchema() { if (!WithObjParam) { string expresParamTemp = AnalyseParameter(Expres); string expresArgTemp = AnalyseArgs(expresParamTemp); ...
1
cce73ccd81e13bdd399ac3fd7605f433
dab52a672b69acd49574cbcb7b4ecc07
Initialises a sci-kit learn neural net based on the results of the hyper-parameter search.
net = Sequential() for i in range(architecture['n_hidden_layers']): d = architecture[i]['dim'] act_fn = architecture[i]['act_fn'] if i == 0: net.add(Dense(d, input_dim=architecture['input_dim'], activation=act_fn)) else: net.add(Dense(d, activation=act_fn)...
0
43e948720d0aa04632960997b2dacd1d
aacfa89929fd57dfd8f5e43ed00ac738
Metodo para listar animales no adoptados
val realm = Realm.getInstance(config) val petsToAdopt = mutableListOf<Pet>() realm.executeTransactionAwait(Dispatchers.IO) { realmTransaction -> petsToAdopt.addAll(realmTransaction .where(PetRealm::class.java) .equalTo("isAdopted", false) .findAll() .map {...
1
db1db6ebb771a23843bb25a69a2df71c
d65a0e11e8950378ec0f3668f06ddcb7
Fetch all of the seed/plant combinations given the harvest season id
let allCrops = await getAllDocuments(session, Crop); await assignRelationships(session, allCrops); assignIsCompatible(allCrops, isCompanion); const combinations = new Combinations(allCrops); const initialCrops = cropIds.map(id => allCrops.find(crop => crop._id == id) ); const compatibleCrops = combinations ....
0
9e3ef060e88bcf025ac8f42326ee0a0c
806baabcdc55048d3a211115fe769814
构建查询终端侧media信息的dsl语句
@Service public class SearchService private SearchSourceBuilder buildDsl(SearchParamVo paramVo) { SearchSourceBuilder sourceBuilder = new SearchSourceBuilder(); String keyword = paramVo.getKeyword(); if (StringUtils.isBlank(keyword)) { return null; } BoolQueryBuilder ...
0
12d0d094493c54621a62c36913cf1432
220e306bd338e6a15e8073c1af6b966d
uidからtodoを取得する
@Dao interface TodoDao @Query("SELECT * FROM todo WHERE uid = :uid") fun getItemById(uid: Int): List<Todo>
1
e990aa0694cbe5900d3ee87fd1e78898
95736e702b98586e9a6405a876316337
gerar código de nota fiscal
$sql = "SELECT NFI.COD_PRODUTO AS codigo, NFI.DSC_GRADE AS grade, SUM(NFI.QTD_ITEM) AS quantidade, P.DSC_PRODUTO AS descricao, U.DSC_UNITIZADOR, NP.NUM_LASTRO, NP.NUM_CAMADAS, NP.NUM_NORMA, NVL(PV.COD_SEQUENCIAL_VOLUME,...
0
701140982f112363c64f66357fe81ad4
2ea1cdfb1ac56c73572c3ee4bef95802
生成上传 key(基于文件哈希)
{ $uploadToken = md5($this->uploadToken.$_SERVER['HTTP_USER_AGENT']); $authkey = md5(serialize($this->params).$uploadToken); return $authkey; }
0
3dd3938edd835c9636547ecd430d8e0d
96fafa45ba34a5dc0160749c981fcfdf
simply remove all pin constraints (see http://obi.virtualmethodstudio.com/tutorials/scriptingconstraints.html)
GetComponent<CircleCollider2D>().enabled = false; rig.constraints = RigidbodyConstraints2D.FreezeAll; rig.velocity = Vector3.zero; rig.rotation = 0f; }
0
f96eff9809acdb01b9c73c3331795021
9723b38169a08a887bbbc5b492c80e40
Listener appelé au change de séléction d'un équipement.
export class EquipmentComponent implements OnInit, Operation updateEquipement(equipement:Equipements): void { this.selectedEquipment = null; this.service.updateEquipements(equipement).subscribe ( (data) => { this.equipements[equipement.id-1] = equipement; } ) }
0
13bdf138e4b57864c76b93353351a2c3
641ec6b8da707aebdf22d9dd483ec9f6
Сохраняет текущую сессию в соответствии с ее типом хранения
$data = ''; switch ($type) { case 'json': $data = json_encode($this->data); break; case 'serialize': $data = serialize($this->data); break; } file_put_contents($fileName, $data); }
1
0acf91e92420024495de12601ff8d14d
d3e159e59fd1a05eaa964bbd40c3dcb2
return webelement of Delete Line button for deleting the current item.
public class IPODControls public WebElement deleteLine(IOSDriver appiumDriver) { log.info("--- Deleting the item ---"); return appiumDriver.findElementByAccessibilityId("VoidLine"); }
1
5cf638efc26c66ee97eb400ad9792bbc
781aa0d23a7852f904bda444374998eb
Returns the meta object for the containment reference list '{@link pt.fct.unl.novalincs.useme.model.Utility.UtilitySpecification#getProcessModel <em>Process Model</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
public class MCRL2Package extends EPackageImpl public EReference getSpecification_Processes() { return (EReference)specificationEClass.getEStructuralFeatures().get(1); }
0
b25c59acd5e0a5be6ea2268dd1260d4b
0a0c40014582724c3b0a006f34316dbf
Provide testable data to the testGetGreaterThanVersion() method.
return array( array(1, 0, 0, 'pl', '1.0.0-pl'), array(1, 4, 2, 'rc2', '1.4.2-rc2'), array(3, 999, 2, 'dev3', '3.999.2-dev3'), ); }
1
361b2050fe15e8b3ec9975c662cdd0a3
a6c2e01fee0d28946b604bf6c8cf79bb
Get the {@code accepted} value.
class Event extends \OC\CalendrierBundle\Entity\Event implements \Doctrine\ORM\Proxy\Proxy public function getAccepted() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAccepted', array()); return parent::getAccepted(); }
1