query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
754a10dba36b3ae7e870b36fbf29fe2a | 0198f5453103046238f887cc69ae630f | @brief The callback function called when the element node with custom data is released. | {
ctx_ptr * ctx = (ctx_ptr *) Data_custom_val(v);
if (ctx->ctx != 0)
free( ctx->ctx );
} | 1 |
c2d7c9e333dbe467f01153540baf4584 | c1e464b0bd813529b87d6cce5729d5b2 | 赠送猪仔选择 | class DeliveryInfoController extends Controller
public function pregnantGoat()
{
return view("admin.deliveryInfo.pregnantGoat");
} | 0 |
6d0f4ea9fce285a37a0cfb87a18e39a6 | 0779a48adb7c7ffd3bc71c26597cc883 | 바이트 배열을 [OutputStream]으로 빌드합니다 | OutputStream buildOutputStream(Integer... params); | 0 |
b21f5ca5ac32a9d50d88d3ae76671ac1 | 81684fa895f0e7696163fa7756d0336e | ステージ情報を JSON ファイルから取得 | public class LoadData : MonoBehaviour
void Start()
{
var stageData = Resources.LoadAll<StageData>("StageData/").OrderBy(s =>s.stage);
foreach(var stage in stageData)
{
Debug.Log(stage.stage);
}
} | 0 |
d545c1821f8802c9e13dd0d85a655ad4 | 9c32d7731476d29e56b423cc3bbce29a | コントロールの文字入力方向が変更時、ラベル代替表示をしていたらラベルの文字入力方向も変更します。 | {
BaseLabel label = sender as BaseLabel;
if (label != null)
{
if (args.Property == DisplayValueProperty && !label.CanChangeDisplayValue)
{
label.CanChangeDisplayValue = true;
label.DisplayValue = args.Old... | 0 |
fe6ce5f02250ab9e364cb8d4512c4ffe | 70330f493e7e51187486571ad50ebc7d | Update routine to perform database cleanup and to ensure that newly
introduced settings and defaults are enforced. | Class Social_Pug
public function update_database() {
$dpsp_db_version = get_option( 'dpsp_version', '' );
if( $dpsp_db_version != DPSP_VERSION ) {
dpsp_default_settings();
update_option( 'dpsp_version', DPSP_VERSION );
if( get_option( 'dpsp_first_activation', '' ) == '' ) {
update_option( 'dpsp_first_a... | 1 |
4fc9922fc8c508c8de0103cf68713cbd | 0390670cac86a4f6bb753380f222d9e7 | Store Accumulator in memory | static void STA(){
writeMem(ope.address, reg.A);
} | 1 |
67e1db6d47deab9d04822ae688e1ae74 | fc1260603bca36ed8d53b8e5a98526b0 | like in an interface we dont have to implement this one
it's abstract, the sub classes of this class will have to implement it | {
BOOST_MESSAGE("It is not necessary to test this method since it is just a getter");
} | 0 |
f859156671a50176f0bfb1ab229eb5f4 | 713fa22f0d129bd4b83fb56534d2c3fa | 将url对应的数据转化为封装的NewsBean对象 | public class NewsDto
public List<News> getNews(String urlStr) throws CommonException
{
NewsDto newsDto = new NewsDto();
List<News> newses = new ArrayList<News>();
String htmlStr = DataUtil.doGet(urlStr);
Document doc = Jsoup.parse(htmlStr);
Element detailEle = doc.select(".le... | 1 |
6f68c7fd6cf1254b533dd5e45340982f | 6aa58d5f6fd691f595bd8fbe6bdac736 | Whether the command has been undone. | public class UnmarkCommand extends ModelRequiringCommand
@Override
public boolean canUndo() {
return true;
} | 0 |
ab3c84457c41263d20ce3346905122e7 | 41eb8e3d3cf073362d496cdf633ae00a | Returns the cap co quan quan ly persistence. | public abstract class MotCuaKetQuaDienBienServiceBaseImpl
extends BaseServiceImpl implements MotCuaKetQuaDienBienService,
IdentifiableBean
public MotCuaNhanTraHoSoPersistence getMotCuaNhanTraHoSoPersistence() {
return motCuaNhanTraHoSoPersistence;
} | 0 |
80d1577b0dd2c78d7ca9436a2310c4e2 | 3a475fcbad4674e59d006a0fa997dfb4 | Display a listing of the Sponsor. | class SponsorController extends \BaseController
public function index()
{
$sponsors = Sponsor::all();
return Response::json($sponsors);
} | 1 |
46db631995605384a0407120ea5a0de6 | 15e6020694fb30eb4966b3bb8997b5ee | Gets the item filter manager. | public function getItemManager(): ?ItemManager; | 0 |
595a2f2ab4aca8a29ae79d51c670abcc | 1ece5d9d7814d7bf6a9d30b79ba26b47 | Checks whether the type parameters of the given <code>Collection</code> match the declared
type parameters of this generic declaration object.
match the declared type parameters of this Map. | self: AvailObject,
aMapType: AvailObject): Boolean =
(aMapType[SIZE_RANGE].isSubtypeOf(
self[SIZE_RANGE])
&& aMapType[KEY_TYPE].isSubtypeOf(
self[KEY_TYPE])
&& aMapType[VALUE_TYPE].isSubtypeOf(
self[VALUE_TYPE])) | 1 |
7940069ba07b1cdd957fbb5382c89754 | c054383b94cc63069f893000f77885c2 | Exports the contents of this command to a simple structure of arrays and
serializable values from <code>java.lang</code>. | public class OasisCommand
public void writeExternal(OutputStream out) throws IOException {
out.write(getBytes());
} | 0 |
a5f847d31bfc6f83cae0cd3aa84a2d26 | 0ef0a2f67044bfe1b51cc016e12df3b3 | Move a mesh vertex to a point. | {
_groundMesh.smoothVertex[vertexIndex] = newPos;
_personnalMesh.vertices = _groundMesh.smoothVertex;
MeshCollider lSelfMeshCollider = (MeshCollider)_personnalCollider[0];
lSelfMeshCollider.sharedMesh = _personnalMesh;
} | 1 |
0c34386214639102f428e50c84a8f17a | 556555f09dfff8982e09dab5e10a2d80 | 获取虚拟按键高度(Nexus手机的底部虚拟按键的高度) | public class ScreenUtil
public static int getNoHasVirtualKey(Activity context) {
int height = context.getWindowManager().getDefaultDisplay().getHeight();
return height;
} | 0 |
208efe8850b38cd6b41bf5086526e21d | e58186f26b45f79cf2979f29405f4504 | vraca ID nadgledane firme
moglo bi da se poboljsa sa executeScalar | if (corporates == null) {
setCorporates(CorporatesXmlProcessor.getInstance().execute());
}
for (Corporate corporate : corporates) {
if (corporate.getId().equals(corporateId)) {
return corporate;
}
}
throw new ScopixException("Co... | 0 |
a31d2289569a03fe858b90d04f43fa20 | c812db37c24b997910642d6269876499 | test writing multiple dictionary chunks for a single segment | namespace EdiFabric.Sdk.Edifact.Write
class Examples
public static void WriteMultipleGroups()
{
Debug.WriteLine("******************************");
Debug.WriteLine(MethodBase.GetCurrentMethod().Name);
Debug.WriteLine("******************************");
using (va... | 0 |
b310f2f7ce7f85e218110642a1946954 | 6868110a385076d956a0f6a49c3bffb8 | Returns the promotion pick expiration date. | @Entity
@Table(name = "prod_mkt_clm")
//dB2Oracle changes vn00907 starts
@TypeDefs({
@TypeDef(name = "fixedLengthChar", typeClass = com.heb.pm.util.oracle.OracleFixedLengthCharType.class),
@TypeDef(name = "fixedLengthCharPK", typeClass = com.heb.pm.util.oracle.OracleFixedLengthCharTypePK.class)
})
//dB2Oracle changes v... | 0 |
678f3b55406d660825c0234ded663af1 | 658889f9b6e1bbbec84893ca6fc70cd6 | This method gets whether or not the login request should be sent with each request. If set to false it will only send it
when the server requests it.
server requests it. | public class TradeshiftAPI
public void setLogging(boolean logging) {
this.logging = logging;
} | 0 |
c019c892e8eb6d00ffbc9a00ee9a4a01 | 8169a6c9636dfbc09406f280b324488e | 对象键名转换:驼峰命名=》下划线命名 | {
$underLineArr = [];
foreach ($hump as $key => $value) {
$underLineArr[strtolower(preg_replace('/((?<=[a-z])(?=[A-Z]))/', '_', $key)) ] = $value;
}
return $underLineArr;
} | 1 |
ccaf0d015a3da5796511f77e28a5ff19 | 64852027c0bfa771151d9b3eb2475fad | 用户收到房间关闭通知 | void onRoomClosed(String roomID); | 1 |
119696793521533bc9c667c51b43297b | f83b98e204ba459a8e696135afb8f797 | Associate a actor to a task | class Player:
def assign_task(self, task_id: int, assigner_id: int):
self.__assignments[task_id] = Assignment(task_id, assigner_id) | 1 |
47801f0b848f74de6fa64f88004ccb16 | 31f33a2d2d9a283c7056d2cfe38ca76b | 依照類型與日期區間取得排行榜資料 | {
$ypRankList = $jcRankList = array();
if ($playType === 0 || $playType === 1)
{
$ypRankDate = getRankDate($ypDateType);
$ypRankCount = M('RankingList')
->where(['dateType' => $ypDateType, 'gameType' => $gameType, 'begin_date' => ['between', [$ypRankDate[0], $ypRankDate[1]]]])
->count('id');
if ... | 1 |
f5aaf93ae6d76832c3aa82662116459b | 75d31ac6b907ce3332863dbc1ae500f0 | Hàm tạo ngẫu nhiên ngày sinh | {
Random ro = new Random();
int iResult;
int iUp = 999;
int iDown = 100;
iResult = ro.Next(iDown, iUp);
string Months = int.Parse(DateTime.Now.Month.ToString()) < 10 ? "0" + DateTime.Now.Month.ToString() : DateTime.Now.Month.ToString();
... | 0 |
647be5090bf83d763e8142289e95f9af | 94ecb3115618067b9d78e725235ef841 | Validates the ItemType constraint of '<em>Mirror Type Member4 Base</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | if (diagnostics != null) {
BasicDiagnostic tempDiagnostics = new BasicDiagnostic();
if (StylePackage.eINSTANCE.getLengthTypeMember1().isInstance(lengthType)) {
if (validateLengthTypeMember1((LengthTypeMember1)lengthType, tempDiagnostics, context)) return true;
}
for (Diagnostic diagnostic : tempDiagno... | 0 |
01261c6da1465457a907302c2d96037d | 9e7eb29cc644c9c71c1e2d67eb8ba3be | 添加分销退款 | public int addORefund(Integer seller_id, String seller_name, Integer buyer_id, String buyer_name, String refer_bill_code, String refund_to, BigDecimal refund_amount); | 1 |
a62aa2e5666356168febc242f3ef35e2 | 5c65a9f48758fd1a97dd8d85578dc636 | Metodo para obtener la direccion del cliente que se va a conectar con
el servidor. | public class Cliente implements Observer
public String getDireccion() {
return this.direccion;
} | 1 |
13d1e34722e7919f6b8f3f149719ddea | 7c464c034dc7643c5d5d268f7e172f1b | Disable service mode when finishing | public class HomeActivity extends AppCompatActivity implements SelectLanguageFragment.LanguageChangeListener, NoNetworkDialog.Retry, NoBluetoothDialog.BluetoothActionListener,
InstallStateUpdatedListener, SyncDataDialog.SyncDataModeListener, SyncDataConsentDialog.ConfirmationListener, SyncDataStateDialog.SyncLi... | 0 |
fa97b8179d9f4b5a64be2460e861157d | adfda4f1f0502b953b41401e52c2c62a | moves the enemy away from the player | class Enemy: #enemy object
def move(self,targ):
if self.scroll==True:
self.start=self.startX-targ.rect[0]
if targ.rect[0]<self.start-100 or targ.rect[0]>self.start+100:
if self.rect[0]<self.start-100:
self.speed*=-1
self.state[0]="RIGHT"
... | 1 |
01e8a9cd1f94df0a197ccd4563da6a5a | 6c1b4931e0aad7aaab9bedbbf40a2fe8 | Get all currently bound spells | namespace RolePlaying
class SpellbookScreen : ListScreen<Spell>
public override ReadOnlyCollection<Spell> GetDataList()
{
return fightingCharacter.Spells.AsReadOnly();
} | 1 |
85322df06bcd8c6c997c82a4236654a9 | 3d935bb074365fce701ce6fc9b09c8bf | 根据tradeNo保存或更新 | @Component
public class GgptTxnReqDao extends BaseIbatisDao<GgptTxnReq, java.math.BigDecimal>
public void saveOrUpdate(GgptTxnReq entity) {
if(entity.getTxnId() == null) {
save(entity);
} else {
update(entity);
}
} | 0 |
b4a740525f83eedc80beff17dd56c0fa | e5e3b58ed973086b9488791de5f24589 | Execute a Closure within with a given error bag set as the default bag. | public function catch(Closure $failure): ResultInterface; | 0 |
b742a7e5e46f1d47d9333c19d5bf2995 | b8dae37215c7601d521a4cc1731813ff | 如果一个在线的账号被一个客户端登陆并且onLogOnAttempt返回允许
那么会踢掉之前的客户端连接 | local kick_message = {c="sc_kick", reason="other login"}
send_message(kick_message)
skynet.call(Gate, "lua", "kick", ClientFD)
ClientFD = fd
ClientIP = addr
skynet.call(Gate, "lua", "forward", ClientFD)
login()
end | 1 |
1bc54d081474924e26566607814edb38 | e74b6b8524271adc89e70bca45d84e07 | Insert a specific song into a specific playlist.
Takes the two parameters and makes an INSERT query to the PlaylistSong
table in the database.
song.
playlist. | namespace Moodify.Singletons
public class UserPlaylistsSingleton
private void InsertSongsWithPlaylistID(List<int> songsID, int playlistID, DBHandler handler)
{
string songsTuples = string.Empty;
foreach (int songID in songsID)
{
songsTuples += "(" + playlistI... | 1 |
cdf53914b470686ef2ae3020996ecba9 | 2c671cb9434f97926a6a04c21b636b10 | Sets the value of the TraceabilityId field. | namespace RatTrap.Business
public class BaseTrapsRecord : PrimaryKeyRecord
public void SetTrapIdentifierIdFieldValue(long val)
{
ColumnValue cv = new ColumnValue(val);
this.SetValue(cv, TableUtils.TrapIdentifierIdColumn);
} | 0 |
3296653842d35dc035b8d796edb1e7e9 | aa7fc895fb0fe09b8458d05287270283 | Verifies that a certain cell in a table contains `expected`.
Row and Column number start from 1. This keyword passes if the
specified cell contains the given content. If you want to test
that the cell content matches exactly, or that it e.g. starts
with some text, use `Get Table Cell` keyword in combination
with built-... | {
return delegate (AssertContext<IEnumerable<IWebElement>> context)
{
context.Command += "OneEquals";
context.Parameters.Add(text);
if (!EnvManager.Auto) return true;
foreach (var element in context.Data)
{
... | 0 |
77684817439bd0d8d7de8db4be750af8 | 0e78abd3146c94c19b206a2c66341d15 | Get all virtual interface records. | def virtual_interface_get_all(context):
vif_refs = _virtual_interface_query(context).all()
return vif_refs | 1 |
4b0d66f078afb005296fa6fe76b0e66a | 698e2fe25a9947fe7630b70bc741a7e3 | r"""
Flag that controls the Gaussian pyramid of the testing image based on
the pyramid used during building.
If True, the feature space is computed once at the highest scale and
the Gaussian pyramid is applied on the feature images.
If False, the Gaussian pyramid is applied on the original images
(intensities) and then... | class ApplierControls(object):
def setOmitPyramids(self, omitPyramids, imagename=None):
self.setOptionForImagename('omitPyramids', imagename, omitPyramids) | 1 |
22c1d86692ad07f1199f0ac07e5b7b73 | 10b9767bf7514f1e976f09a96d5e22ae | Finds and displays a user payments in the Group entity. | {
$Payments = Auth::User()->getPayments()->sortable()->orderBy('id', 'Desc')->simplePaginate(15);
return view('user.user.payments', [
'Payments' => $Payments
]);
} | 0 |
b5e9d1ef702e6b42ed39607e8d508c32 | 146c6091875c8576d915712fed0bb744 | 添加到缓存(如果存在则放弃添加) | class RtCache
public static function add(string $key, $data) {
if (self::$empty) {
return true;
}
$key = md5(RtCache::$PREFIX . $key);
RtCache::$CACHE->add($key, $data);
return true;
} | 1 |
b3999e023bb1c106a76bea4c60d15c0a | 9c04992f81f1ae169cdd6401a334e77f | function to add this object to the stack, map, and subProgram list if parent is the top item on the stack | void comPlayer::addCom(comObj* aCom) {
hookup();
push((linkListObj*)aCom);
} | 0 |
f5f56f107376ddc2b02adb243cd97822 | 3a124f0f6e9a245763926e295e903b3f | Test that one coefficient is found if one is requested. | def test_SparsePoly_13():
poly = [[1, 1], [1, 1]]
f = SparsePoly(poly)
assert f.coeffpairs == [[1, 2]] | 0 |
1d0a2ced8e42b0ac85fc9fc38e3c726e | 4191a6ef5ba9b2919a012ec6bf00ddf1 | Vytvoří prostor se zadaným názvem a stručným popisem napojený
zpočátku na zadané sousedy a obsahující zadané h-objekty. | UUID createSpace(@NotEmpty String name, @NotNull UUID parent, Collection<Property> properties,
Map<String, String> attributes); | 0 |
f6c35789a504629b408e9864e724a11b | 11a04e9a08809d3a975f4a9c31761743 | Sets whether the color spectrum is scaled logarithmically.
<tt>true</tt> to scale the color spectrum logarithmically,
<tt>false</tt> otherwise. | public class FFTFrame extends DrawingFrame
public void setLogScale(boolean xlog, boolean ylog) {
if(drawingPanel instanceof PlottingPanel) {
((PlottingPanel) drawingPanel).setLogScale(xlog, ylog);
}
} | 0 |
25e4607735cc5a5ca9704fae297e5335 | 3ab9205399a5a24528202becb15394a1 | 根据工程ID获取设备列表 | CustomerDevice vo = new CustomerDevice();
vo.setDeviceId(deviceId);
vo.setCompanyId(UserUtils.getUser().getCompany().getId());
List<CustomerDevice> list = customerDeviceMapper.findPartsDeviceList(vo);
if (list == null) {
list = new ArrayList<CustomerDevice>();
... | 0 |
713b6c008062bf1d8f847be58c316862 | ce372659ca80f9d4f62d5c92ecee7990 | 获取该停车场所有岗亭 | List<TCarport> getAllCarport(); | 0 |
67da01ad22f2f3945bbf33792a2b48fe | 619b2c2794a036113c93ac19f9c9e6b8 | Takes a file name and removes the handle at the end.
When a period is found before the extension, the file name becomes a substring with all values before that period.
^ | public class AuxMethods
public static String removeExt(String name) {
int i = name.length()-1;
while (name.charAt(i)!='.') {
i--;
}
return name.substring(0, i);
} | 1 |
34ebe82c5ec31f449a292607b8a64532 | 8f6d218aa194f8500563cba75af93caa | Return a blobs content for a given SHA | class Blobs(Service, MimeTypeMixin):
def get(self, sha, user=None, repo=None):
request = self.make_request('git_data.blobs.get', sha=sha,
user=user, repo=repo)
return self._get(request, **self._get_mimetype_as_header()) | 1 |
adbfa792b094ac6b1bf075b5945a7d87 | 95e02b3ca71139c747ce47a8ac9870f8 | 由磁盘加载图片 | public class ImageLoader
public static void loadImage(ImageView imageView, String path) {
Glide.with(imageView.getContext())
.load(path)
.apply(RequestOptions.diskCacheStrategyOf(DiskCacheStrategy.ALL))
.into(imageView);
} | 1 |
f4d871f0e302cfb856d575c22d95ffd3 | 27b9ffa663fe6cfd3c14d9d2d4c744f6 | Uri格式:
1)跳转 caoliao://jump?type=xxx&content=xxx
2)事件 caoliao://action?type=action_name&content=xxx
根据Uri启动Activity或者发送EventBus事件 | public class MyUriUtils
public static void start(Context context, String uri) {
if (context == null || TextUtils.isEmpty(uri)) {
return;
}
if (uri.toLowerCase().startsWith("mls://")) {
Uri data = Uri.parse(uri);
AppLogUtils.v("tag_99", "host=" + data.getHost()... | 0 |
f18fde8996c9d48e7d0644051bc478ab | 6b326e7056e20b190059395cc8e671cc | 复核结论更新 | int updateCoTaskConclusionById(CoTaskConclusion enti); | 1 |
2eac37270701d2094ed753283c935811 | 4600decb0361898c51c1fb2247b74490 | If a client joins, grant them some basic rights | public void clientJoined(String name) {
Collection<String> newRights =
new LinkedList<String>();
newRights.add(ProxyRequest.TYPE);
newRights.add(RegisterNamelistUpdateListenerR... | 1 |
9fefbb84db75d99163b1cdd692d19070 | d9c630d4d6f2ebad057b0b5b8971902e | Получить группу полей по ее id | class contacts
public function getGroup($group_id)
{
global $DB;
$sql = 'SELECT * FROM contacts_groups WHERE id=?i';
return $DB->row($sql, $group_id);
} | 1 |
e5d8e00343b94ea9ad3043a2f01b24bc | 7edb92ada9ad18a872da20da9cb7790b | 振幅小于筛选 | std::vector<double> store;
for(int i=0;i<m_n;i++){
if(m_data[i]<avera-3*avestandevia*sqrt(m_n) || m_data[i]>avera+3*avestandevia*sqrt(m_n)) continue;
store.push_back(m_data[i]);
}
m_n = store.size();
m_data.clear();
m_data = store;
m_str=m_str+"_filter";
m_out.open(m_str+... | 0 |
1e1ea4b5627ca9f9a0b670bacca81f13 | 73482e80d790af536dae2bfaf9455142 | 根据HQL语句获取前N条实体对象列表 | Assert.hasText(hql);
int startIndex = start <= 0 ? 1 : start;
Query query = this.getSessionFactory().getCurrentSession().createQuery(hql);
return query.setFirstResult(startIndex - 1).setMaxResults(limit).list();
} | 1 |
267d678bf7e197a3b548afa16a2393b9 | f457ba6c8c436d67d23396becfcd63bd | Log a generic warning message asking for a sample. This function is intended to be used internally by FFmpeg (libavcodec, libavformat, etc.) only, and would normally not be used by applications. | if (pFormatCtx && mPath) {
av_dump_format(pFormatCtx, 0, mPath, 1);
}
} | 0 |
385bc5436c4bcee0ee25e519030ff03d | f1dcb699a2f13188495605b046196e6e | Getter for the airplane's flight of a given date. | class Tblfdverror extends \DBORM\OLDCSIBundle\Entity\Tblfdverror implements \Doctrine\ORM\Proxy\Proxy
public function getFlight()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getFlight', array());
return parent::getFlight();
} | 0 |
36d2e81a9b1565787f3e3e79be69b0eb | 16830755e180239860bd0517fcd5a0a2 | 指定したHTML文章にデバッグバーを埋め込む | source = textwrap.dedent( """
<head>
<meta http-equiv="content-type" charset="utf-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
<link rel="stylesheet" href="bbs.css" type="text/css">
</head>
... | 0 |
2e14b1127928c4c57a9f34a6c69bb119 | 2d033e0c8f2ab038b25eed29f7225e7b | 初始化UI位置与大小 | public abstract class BaseUI : MonoBehaviour
public void InitUIRect(Transform parent)
{
CacheTransform.SetParent(parent);
CacheRectTransform.anchoredPosition = Vector2.zero ;
CacheRectTransform.sizeDelta = Vector2.zero;
CacheRectTransform.localScale = Vector3.one;
} | 1 |
78bd0cd64e9980836e7057639eaaf333 | 8c28b12fe38f644cd007975ffb9f989e | 二值图反转 | img1 = np.copy(img)
w,h = len(img1),len(img1[0])
for x in range(w):
for y in range(h):
img1[x][y] = int(not(img[x][y]))
return img1 | 1 |
06f6e359febe2eafe0a2536cccf5d627 | f0e04f190980f9ae383cf0bccaf53411 | Return count of game round.
Returns:
num (int): count of game round | class GameSession:
def get_cur_round(self):
return self.cur_round | 1 |
6040cbcc84ca1ff6c004a05d0eb47bf3 | c9ecdf533fdb75c91db31b508e4a5a20 | Supprime le joueur du noeud | class TwoDTree(Tree):
def remove(self, name: str) -> None:
if self.__contains__(name):
self.remove_point(self._get_point_of_player(name)) | 1 |
c9a3623bcc08fa930ade22a0005ad008 | 6435d0368311bf08d085905eecde069d | 重载不等号运算符 | class Person
bool operator!=(Person &p)
{
if (m_Name != p.m_Name || m_Age != p.m_Age)
{
return true;
}
return false;
} | 1 |
ae473db18bff830cefe335fc921c7174 | 397d9340728a86389461386e139b76b7 | Returns the average interval between the stored values | public class MovingWindow
public float getAverage() {
return valueAverage;
} | 0 |
6e27d06748a4af9b5bbc60d7f1ce856f | 947df27bb642b3588fd0592451f1afc2 | 根据联系人号码从通讯录中获取联系人信息,包括名称和头像uri | boolean hasFlag = false;
Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNum));
String[] projection = {ContactsContract.PhoneLookup._ID,
ContactsContract.PhoneLookup.DISPLAY_NAME,
ContactsContract.PhoneLookup.PHOTO_I... | 1 |
c4b96d7b03bbb176af6a526d4d7ebfda | 4183db20af652e8c67d7574ee6270a7f | SetOutput sets the logrus logger output. | func SetOutput(out io.Writer) {
glog.SetOutput(out)
} | 0 |
8df79837efc9c8b471ff64899a1b4ae0 | b7e088b8db9c3287ed8685589208f363 | Gets all application type name resources created or in the process of being created in the Service
Fabric cluster resource. | public final class ApplicationTypesListSamples
public static void getAListOfApplicationTypeNameResources(
com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
manager.applicationTypes().listWithResponse("resRg", "myCluster", com.azure.core.util.Context.NONE);
} | 1 |
e1778cdedaf7f1351a5a093afb83b2ed | da5518358a814f0f414742900c083ba1 | we must use malloc because arduino doesn't support new[] | {
int i = 0;
char* charArray[TOTAL];
int count = 0;
while (i < TOTAL)
{
char* s;
s = (char*)calloc(2000, sizeof(char));
free(s);
charArray[i] = s;
i++;
}
count += TOTAL;
} | 0 |
36325cd4253c6bf85c99cd417f930603 | faca449f8668d9d147e5464333254165 | Removes the specified ingredient from this burger. | public class Pantry
public void removeIngredient(int i) {
ingredientList.remove(i);
} | 0 |
62fbf23690fe14dc9a1fa32bfd083e5d | 45ee7c0760f02e5c4f9cb3e3f78024d2 | ---------------------------------------------------------------------
updates the climate forecast record in the database
--------------------------------------------------------------------- | $id = $info[0];
$dat = $info[1];
$a = $info[2];
$b = $info[3];
$t = count($dat);
$link = DB::getDB();
for($i=0;$i<$t;$i++){
$sql = "UPDATE forecast SET startdata = :dat, team1 = :team1, team2 = :team2
WHERE id = :id and (team1 != :team1 or team2 != :team2 or startdata != :dat)";
$stmt = $link->p... | 1 |
7942e984829b44edcd7bf91a021ddd31 | d205cd961824c6c2bdd2691e3ec41927 | Sets the trade_state of this FixedPriceOrderTransaction.
The state that the trade resulting from the Fixed Price Order should be set to. # noqa: E501 | class FixedPriceOrder(object):
def trade_state(self, trade_state):
self._trade_state = trade_state | 1 |
b2f19c32cf15134fec7986ff7eecdf3a | 998b16dd0745d600d41ac09471cfa1f0 | Full-dimensional model for Rosenbrock (full Hessian) | self.min = np.array([1.0, 1.0])
self.value = 0.0
self.domain = np.array([[-np.inf, np.inf], [-np.inf, np.inf]])
self.n = 2
self.smooth = True
self.info = [True, True, True]
self.latex_name = "Rosenbrock Function"
self.latex_type = "Valley Shaped"
s... | 0 |
6251ef779cd9bc311bb20cb97eab0cb6 | 0a8cf3a23dbcc29ccdaa9c631ffc6f75 | 根据BBS发布时间获取BBSItem | {
string sql = @"select top 1 id,
headline,
contenttext,
userid,
CONVERT(varchar(100), creationtime, 20) as creationtime,
newstype,
del,
type,
newstkeywords,
newstdescription
fro... | 1 |
4149420ef8855068ffde124e8cc6fcac | 984d6adf720c08a2279b02e177c7a41f | 数値合計の単位elementを作成する | export default class Rolling
$CreateNumberElement(ElementLength) {
let component = null,
componentArr = [];
for (let i = 0; i < ElementLength; i++) {
component = document.createElement('span');
component.className = 'rolling-number';
componentArr.push(component);
}
return compone... | 0 |
fe02cab60c084904248c50dcd07e7d30 | 4498d6020ee533a2ad10462053515681 | Fait se deplacer un fourmie dans le graph | if (voirProie()) {
return;
}
Position caseSuivante = nextCase(getDeplacement().getVoisin());
getDeplacement().changerCase(caseSuivante);
getTerritoire().getCase(caseSuivante).addPheromone(getFourmi().getFourmiliere());
voirProie();
} | 1 |
cd30401ec050459c830282e18465897b | 3b6d1df6c393273dd537c478aef1d4fc | Get timestep for stability in atmospheric model | class TwoDConvection():
def _timestep(self):
p = 0.1
rho_dt = self.rho_dt
rhou_dt = self.rhou_dt
rhow_dt = self.rhow_dt
e_dt = self.e_dt
rho = self.rho
u = self.u + masked_where(self.u == 0, self.u).mask
w = self.w + masked_where(... | 1 |
31a416024df26ee1352944efd9abe7b0 | d4155d324f551122c407b6a590ebd35a | convert vector from NWU to ENU | position_enu = airsim.Vector3r(pos_ned.x_val,
- pos_ned.y_val,
- pos_ned.z_val)
orientation_enu = airsim.Quaternionr(orientation_ned.w_val,
- orientation_ned.z_val,
... | 1 |
7b91b65b137a79f4651eaedbd66698a7 | ea1d175795e4835738305d70772ab80b | Initialse the shared parameters, the inital state and
state update function. | self.Q = defaultdict(lambda: np.zeros(self.nA))
self._episodes = 1
if self.eps_func is None:
self.eps_func = self._default_eps_update
if self.actions is None:
self.actions = np.arange(self.nA) | 0 |
bb1377e4c5945a8df882f33234a688a7 | 7f61448ad6da3ef0f9cb03f40c5be655 | https://stepik.org/lesson/415334/step/12?discussion=3426724&thread=solutions&unit=404864 | cases like (1) | 0 |
8a2503e62fac309d3137a5bcde617bae | 43ac23d45e40503b0ea47591f3628ce3 | Butonların aktifliğini kontrol eden fonksiyonumuz. | namespace NDPprojeTasarim
public partial class Form1 : Form
public void butonlarEtkin()
{
organikAtikButton.Enabled = true;
kagitButton.Enabled = true;
camButton.Enabled = true;
metalButton.Enabled = true;
bosaltOrganikAtikButton.Enabled = ... | 1 |
4894d9e7b4f983ecb881f64e7671bae3 | 039ba437a045ac2c9a70c331928c5cf7 | Get the web platform debug URL from shared preferences or empty, if not available. | public final class C25789b
public static String m84759e() {
ComplianceSetting b = f68201c.mo66972b();
if (b != null) {
String vpaInfoBarUrl = b.getVpaInfoBarUrl();
if (vpaInfoBarUrl != null) {
return vpaInfoBarUrl;
}
}
return "";
} | 0 |
9ec1143b1f929d59430b6699dde68e27 | 8449b0de446b03ad67b7c89c44a95f61 | Crée un nouveau type de tuile. | TypeBatiment createTypeBatiment(); | 0 |
7d8892e4d17b4094de0e3359f60560fa | 8bbc15ca5130b600a2493c977c5bbdad | seidから選択肢にアクセスできるようにセットする | class Window_EagleChoiceList
def set_init_select
i = choice_params[:i]
return unselect if i < 0
select(i)
end | 0 |
bd5cd12fa1b3de48c8523715b6e2aa84 | 69ef9e452e3fdea4a0da8067693cfea6 | Enable the selected I2C PEC calculation | public void setPEC(boolean pec) throws IOException
{
check(I2CFunctionality.SMBusPEC);
setPEC(fd, pec);
} | 1 |
b19b7aea419e76df5c14e1499c21bc5f | 95cc5389ef93411227e896557724d800 | 店铺的精确查询方法 | const err = validationResult(req);
if (!err.isEmpty()) {
const [{ msg }] = err.errors;
next(boom.badRequest(msg));
} else {
let { name } = req.query;
name = name || '';
let query = `select d.id, d.shopname as name from SHOP d where d.shopname like "%${name}%"`;
querySql(query)
.then(d... | 0 |
65e94dc3c30fab4589697b1553f27e5d | eacb21a5f897fcef2ba7035f9f1734f5 | 点击“删除二维码”按钮 | $ids = $this->getIds('ids');
if (empty($ids)) {
if(!empty($_GET['id'])) {
$ids = $_GET['id'];
}
}
$info = '删除失败,请重试!';
$objQrcode = $this->objQrcodeList->where("id in ( $ids )")->getOne();
if(!empty($ids)){
$delA... | 1 |
c071a33b1e001c645840bcf292afd8aa | 44da56a99ed9e07229e3cc55b1ed5f6e | 成交接口 加载成交侧委托,需要恢复日内委托关系链
需要找到成交侧委托的父委托,父委托有可能是路由委托也有可能是直接帐户委托
这里需要判断然后从清算中心或路由中心获得对应的委托对象 | namespace TradingLib.Common
public class OrderSplitTracker
public void GotSonFill(Trade f)
{
Order fatherOrder = SonID2FatherOrder(f.id);
Trade fill = (Trade)(new OrderImpl(fatherOrder));
fill.xSize = f.UnsignedSize * (f.Side ? 1 : -1);
fill.xPrice = (decimal)... | 1 |
563140a889c9852f191308d8fb18d126 | c54c3b5be0b4bfaed1aaebd0a3ee9d93 | Set up comb filters with staggered delay times. | void init_complimentary_filter(){
float lp_num[] = {DT_INNER/TAU,0};
float lp_den[] = {1, DT_INNER/TAU-1};
lp_filter = create_filter(1,DT_INNER,lp_num,lp_den,1,0);
float hp_num[] = {1-DT_INNER/TAU,DT_INNER/TAU-1};
float hp_den[] = {1,DT_INNER/TAU-1};
hp_filter = create_filter(1,DT_INNER,hp_num,hp_den,1,0);
... | 0 |
91c96ef0fe48ed48a0b685071d8cc51f | 5c2f4a56380a43b37a943ec9e04b9cc3 | Creates OK Response of <see cref="IResponse"/> with a list of messages and with an OK status <see cref="ResponseStatus.Ok"/> | namespace Xinteractors
public class Response<TResponseValue> : IResponse<TResponseValue>
public static Response<TResponseValue> Success(TResponseValue responseValue, string message)
=> Success(responseValue, 0, message); | 0 |
64cfdd2394c3f7b717f8332be3fbfcb8 | 0787c5d7bcf722458c8b268596bc31ca | ADD## | bool CPU::ADD(unsigned int memAr[]) {
int p2ID;
int p1ID = checkReg(parseArr[1]);
if (p1ID != INVALID) {
if ((p2ID = checkAddr(parseArr[2])) != INVALID)
setReg(p1ID, getReg(p1ID) + memAr[p2ID]);
else {
cerr << "ADD -> second parameter(address) is invalid. ";
... | 1 |
fa8a888b903fd0e52613103ec84dda3c | 73a277e869958ec504045fff3983fd53 | Enregistre les donnes meta d'un tournoi | class tioParser
public function getTournamentMeta() {
return json_decode(file_get_contents($this->files[$this->getTournamentId(false)]['info']), true);
} | 0 |
38bf33fa69a5e7b2fe62cde7b6ab508d | e07e2b037ea8c6bd123969802b7ae198 | Helper class for drawing items on a canvas | this.canvas = canvasElement;
this.context = this.canvas.getContext ('2d');
this.context.lineCap = 'round';
this.penIsDown = false;
this.penColor = '#000000';
this.penThickness = 1;
this.penPos = {};
} | 1 |
c4974391cfd29eb59b8e9e7a7edb6a3c | ef183fbdda991b4ec83407a532cd5a0d | 初始化邻接链表表示的图,初始化后为没有边相连的孤立节点图 | void initGraph(){
for(int i=0; i<n; i++){
head[i].v = i;
head[i].next = NULL;
}
for(int i=0; i<n; i++){
countt[i].vertex = i;
countt[i].cnt = 0;
}
} | 1 |
f67606507c5671b4efe476f9042b1924 | 17fe72f3b3bcddaf9b0c10747f3a2066 | #複製檔案OR資料夾(包含底下資料)到指定路徑底下 | $local_abs_path = $this->rootDir . $local_path;
if(!file_exists($local_abs_path)){
return false;
}
$to_abs_path = $this->prefixDir . $to_path;
$to_abs_dir = dirname($to_abs_path);
if(!is_dir($to_abs_dir)){
mkdir($to_abs_dir, 0777, true);
... | 0 |
54a8edbb30e28af959e76df126f306f0 | 1b9e40a417dc0a39e9bfd6b5b98f28b0 | Checks if a bar exists on a given abscissa | ( const short i ,
const double x ) const
{
return
x < m_xmin || m_xmax > x ? 0.0 :
::ispline ( i , m_order , x , m_knots ) ;
} | 0 |
4a7a15eb2d47df28dfd09e21284dcff0 | a4db4f6d310f318a831e70f678684311 | The number of x samples. | class LabeledSet:
def size(self):
return self.x.size | 1 |
ce6e3963a19e2ccce582862539411ef5 | 2db95408d3c16ede3ada79acf01536ef | Prüft ob die erste und letzte Position des Buchstaben übereinstimmen. | def first_and_last(message):
if message == "":
return True
if message[0] == message[-1]:
return True
return False | 1 |
9e57ca99284b7a0f6fe60a65b5f3311a | 36d5057f39ef02d876c3885b3a8eb7df | Send a response to the host.
Appends a CR-LF pair to the end of the output string. | class Repl(BoostedInteractor):
def raw(self, byts):
self.send(byts + "\x0d") | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.