query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
e24fb8c73c73ef49da3a87b29aac2d50 | 00bf20e7852fe8fede8db3414598f64f | Returns the encoded data for the subtitle content.
Encoding format depends on the subtitle type, refer to
<a href="https://en.wikipedia.org/wiki/CEA-708">CEA 708</a>, and
<a href="https://en.wikipedia.org/wiki/EIA-608">CEA/EIA 608</a> defined by the MIME type
of the subtitle track. | public String getEncoded(); | 1 |
c2640a0ee92eb7d1ad102d5ec0e90c3b | db7e601744a0e393266333555ebfc3ff | 测试卖家待发货订单 | public class Test
public static void getWSendOrder() {
HttpPost httpPost = new HttpPost(posturl);
try {
DefaultHttpClient httpclient = new DefaultHttpClient();
String reqStr = "";
String postcontent = "";
HttpContent req = new HttpContent();
... | 1 |
9949b196cca1667b1b8920bcabceafe6 | 009bffb9186396ee80d66d3846c3dc65 | Returns the object at the beginning of the queue | Object front() throws DSException; | 1 |
349ca74e7a26eff97f724c1b476eabdb | ceb587ca3c5ac9bb41aeb548c7d9d933 | Attach a file to an orderSourceStockStatus | namespace Infoplus.Api
System.Threading.Tasks.Task<ApiResponse<Object>> GetOrderSourceStockStatusFilesAsyncWithHttpInfo (int? orderSourceStockStatusId); | 0 |
634d473d89db7d6ffe7f8d451e8004b3 | cd759842a98c0fa8bb8d189e3a84eb20 | Find restaurants by name. | const query = {
name: { '$regex': `^${name}`, '$options': 'i' }
}
return Restaurant.find(query).limit(100).exec();
} | 1 |
82ff041235f841b7205e8b665f3aeb07 | a93e64401dff3f9e8e1fb68222cf8df1 | Return a registered expression.
If it cannot find an expression, it will return `null` instead. | public function getExpression($name); | 1 |
13737c803caa0818e8c05c4154c3c110 | 83670d406fb9129aa8ba40921934e76a | Get the request service id. | class Request extends Facade
public static function getServiceId(): string
{
return RequestInterface::class;
} | 1 |
5d6788e822719e35368bf3957c3f9cd0 | ccdc9467c831c42d8be69d5910f5b943 | @brief 캠페인정보 arCamp를 업데이트 한다.
DB에 문제가 있거나 아직 생성되지 않은 캠페인이면 실패한다. | public function updateCampaign( $id , $inputs ); | 1 |
d7914c90949617f6ec598de6e213657f | 830917714daaa9e650ff06e10d0ead31 | Compute convolution of irf with a single exponential decay | if (a <0 or b < 0):
return 1e15
else:
return a + b * numpy.cos(x * 2 * numpy.pi * f) * numpy.exp(-x/decay) | 0 |
8057dca6d3bc0aeb37753c81985ccab6 | 70a65f9fb6f8ae76efa3289fdee613a3 | Deletes the note header. | namespace Rock.Web.UI.Controls
[DefaultProperty( "NoteViewLavaTemplate" )]
[ToolboxData( "<{0}:NoteContainer runat=server></{0}:NoteContainer>" )]
[ParseChildren( true, "NoteViewLavaTemplate" )]
public class NoteContainer : CompositeControl, INamingContainer
private void _lbDeleteNote_Click( object send... | 0 |
ff78df469c3b8ca992166eb1134a8053 | e26630196168cb513345954bb798527c | Calculate unit cell volume, which is determinant of unit cell, and
compute inverse unit cell matrix. | class Crystal(HasTraits):
def calculate_abc(self):
(a,b,c, V) = crystal_calc.make_lattice_vectors(self.lattice_lengths, self.lattice_angles)
self.a = np.dot(self.u_matrix, a).reshape(1,3)
self.b = np.dot(self.u_matrix, b).reshape(1,3)
self.c = np.dot(self.u_matrix, c).reshape(1,3) | 0 |
b1e0a9e02c5e5b65eba5002f2aeee10a | 5c031684128fc15ff7e75a7126e74f50 | Checks for equality between 2 Fastq Records | public class FastqRecord implements DNARecord
public boolean equals(FastqRecord ob) {
if (this.defline.equals(ob.getDefline()) && this.sequence.equals(ob.getSequence())
&& this.quality.equals(ob.getQuality())) {
return true;
} else {
return false;
}
} | 1 |
946fa7b56364290d19269380e0b9668d | 00ebb5886341188507a173652f3ed6f7 | 随机生成n个结点(尾插法) | LinkList *p;
l = (LinkList *)malloc(sizeof(struct Node));
l->next = NULL;
for(int i=0; i<n; i++){
p = (LinkList *)malloc(sizeof(struct Node));
p->data = rand()%100+1;
p->next = l->next;
l->next = p;
}
} | 0 |
6728f41e6cc98a7b18a0490142ddf358 | 65572892f9cb913911c53e17bd0c19a2 | Choose the last element as pivot | def last_pivot(x, left, right):
return right | 1 |
5ff2edb4a5b536eb632fb8ad6ca69b18 | 6bf4cd5e1e38971b42449229a60b22b6 | 重新发送未成功的快递订阅请求service | class Client:
def resend(self):
url = self._service_protocol + "://" + self._service_address + Client._resend_path
response = self._request_helper("POST", url)
if response.status >= 200 and response.status < 300:
return True
else:
return False | 1 |
a8eb3816a472b920053e6f17d4343c9b | f0e03849a27e585b5585d9df534087ef | Adds a message to the conversation. | {
Firebase msgRef = new Firebase("https://boardem.firebaseio.com/messages");
DataSnapshot snap = FirebaseHelper.readData(msgRef);
String id = RandomStringUtils.randomAlphanumeric(20);
if(snap.getValue() != null)
{
@SuppressWarnings({ "unchecked", "rawtypes" })
Map<String, Conversation> messages = (Ma... | 0 |
174a3c6506d32dd9377a12354142825d | 9199919c7b8473ad13de16326dc9008a | Tests login is required to access the endpoint. | class JSONExportTestCase(AbstractExportTestCase):
def test_login_required(self):
self.assertLoginRequired(self.view_string, **self.url_kwargs) | 1 |
5f24bc0b4e726e306d7b257e8a18f72b | 6dacd6554df5a14584c7016f46555f2a | Method creates a relay context from storage. | {
RelayContext dataContext = new RelayContext();
dataContext.ReadFromStorage();
return dataContext;
} | 1 |
61f1b90fa128063073721ba3859192e8 | 352d569607756b8565d422d1c78ce23a | copied from https://stackoverflow.com/a/5178132/1816580 | function naturalSort(a, b) { try {
for (x = 0; a[x] && b[x]; x++) {
if (a[x] !== b[x]) {
var c = Number(a[x]), d = Number(b[x]);
if (c == a[x] && d == b[x]) {
return c - d;
} else return (a[x] > b[x]) ? 1 : -1;
}
}
return a.length - b.length;
} catch (e) { console.log("naturalSort", e); } } | 1 |
fb69cbe695ab018375e38f2fdc4ad778 | d9ff76278b4bedf0514abc79b3e51a6a | 可预约时间区间初始化,根据开始整点小时数,结束整点小时数和每个飞行时间间隔,初始化可预约时间区间
时间格式 09:30,10:00 | if(CollectionUtils.isEmpty(timeRanges)){
return null;
}
List<TimeItem> timeItems = new ArrayList<>();
for(TimeRange timeRange : timeRanges){
TimeItem timeItem = new TimeItem();
timeItem.setStartTime(AppointDateUtils.minute2Hour(timeRange.getStart()));
... | 0 |
f0de4a97ef5c40a641085bb7aeb2fad8 | 65e5f5234cb60a9299c32ebd82223742 | Called after onStart() as Activity comes to foreground. | public class ControlActivity extends AppCompatActivity
@Override
protected void onStart() {
super.onStart();
Log.i(TAG, "onStart called.");
} | 0 |
56806b76f542a484f267025239342b29 | 4363b90703362ac4ed37da89cfb4d6d4 | Draw / Generate content for the multiline-diagram | $code = '';
if (is_array($contentElements[$this->id.'__'.$nkey])) {
$keys = array_keys($contentElements[$this->id.'__'.$nkey]);
$cnt = 0;
foreach ($contentElements[$this->id.'__'.$nkey] as $row) {
$row_code = '';
if ($cnt) {
if ($cnt>1) {
$this->pObj->tt_contentData['prev'][$row['uid']]... | 0 |
5bb162fd407230a3fe45919ab8893851 | 2338fd116725c0d3eeac0e41350fcf42 | 根据时间查询装车金额(C类库) | CarDispatchCapacitySet getCarDispatchCapacitySet(@Param("cityCode") String cityCode, @Param("timeType") int timeType); | 0 |
806fcac75969d49864918ffb68de65f6 | 692d6a6ff029fedeafd99212c69e6530 | Instructs the media to seek to live. | namespace FacialDetection.Core.Api
void JumpToLiveVideo(); | 1 |
64cfb0299f765a49cc42768fdeb3c827 | c2232d2327ee5e3f3b9f15564264c744 | Check if the object we collided with has a tag called "Obstacle". | public class PlayerScript : MonoBehaviour
void OnCollisionEnter2D(Collision2D col)
{
if (col.gameObject.tag == "Obstacle")
{
Debug.Log("Player has died");
isPlayerDead = true;
}
} | 1 |
42950ac603fc413674e3bde4ea0a930d | a652b036c603f46ae4bd7804e9b5858a | Parse a single build page. | if isinstance(page_info, parser.ClassPageInfo):
return _build_class_page(page_info)
if isinstance(page_info, parser.FunctionPageInfo):
return _build_function_page(page_info)
if isinstance(page_info, parser.ModulePageInfo):
return _build_module_page(page_info)
if isinstance(page_info, parser.TypeAlia... | 1 |
cd218c40dc00b6c1306be74f3c9cd37f | 4416eb2310a503269913af39930fa8c1 | Erase all characters before current position
\note This will also set the current position to the start of the buffer. | public class CharacterScannerCharSequence implements CharSequence
public void unread()
{
unread(buffer.length());
} | 0 |
df6136a8d357f04f66997e4d73b1cdef | 749fcf3243298dc546ee939f3fd934a6 | Checks if the current position is part of a comment (warning: only // coments are supported!) | namespace ScintillaNET
[Designer(typeof(ScintillaDesigner))]
[Docking(DockingBehavior.Ask)]
[DefaultBindingProperty("Text")]
[DefaultProperty("Text")]
[DefaultEvent("DocumentChanged")]
public partial class Scintilla : Control, INativeScintilla, ISupportInitialize
public bool PositionIsOnComment(... | 1 |
12bc673328474d8a8893f5de6ca41e49 | 6e3d47300e50da4ad0c25fcc0fccc954 | Walk NetSNMP MIB tree, building a Go tree from it. | void init_SNMPv2_MIB()
{
register_subtrees_of_SNMPv2_MIB();
} | 0 |
c192c0a7711c535361cc2ccef4e6de07 | 8ecc96b0881d05c26d978a08a616d20c | Gets whether the tab can be reordered via drag and drop or not. | @SuppressWarnings("serial")
public class JReorderableTabbedPane extends JTabbedPane
protected boolean isTabReorderable(int index) {
return true;
} | 1 |
7819b698b23a93a7b5b5c5179c11c98d | 09e4e251f907c588cf444718eaa43e6c | Очистка VG | void vga_clear() {
vga_row = 0;
vga_column = 0;
for ( size_t y = 0; y <= VGA_HEIGHT; y++ )
for ( size_t x = 0; x <= VGA_WIDTH; x++ )
vga_putentryat(' ',vga_color,x,y);
} | 1 |
6c575ad6c32d1f5ba0c1d3d14da3ac39 | d46a3dbe9219ac8c1b45b7b89c4e673b | Calculates the the angle between two vectors, where the sign of the angle indicates a clockwise (-) or
counter-clockwise (+) rotation. The angle is always between -pi and pi. | namespace Fusee.Math.Core
public static float CalculateAngle(float3 first, float3 second)
{
if ((first.Length > M.EpsilonFloat) && (second.Length > M.EpsilonFloat))
{
var dotP = Dot(first, second) / (first.Length * second.Length);
if (dotP < -1)
... | 0 |
34054a84dd7e0274b508876ef5dbcc18 | 3c715174f288a97532b262b6605630eb | Returns data specific to the error correction type. The structure for the
<i>Error Correction Data</i> field is determined by the value stored in
the <i>Error Correction Type</i> field. For example, an audio data stream
might need to know how codec chunks were redistributed, or it might need
a sample of encoded silence... | ErrorCorrectionLevel ecLevel, int maskPatternReference)
{
int indicator;
switch (ecLevel)
{
case ErrorCorrectionLevel.L:
indicator = 1;
break;
case ErrorCorrectionLevel.M:
... | 1 |
de5f41ce7eb86acf26bd8d2146301272 | f01c81bc1c49844e1d0d70eec01598a3 | Sets the board based on another board.
The board to copy.
Returns true if the board could be copied and false if it could not. | {
Board = new HexBoard(*other.Board);
Dimension = other.Dimension;
Turn = other.Turn;
PieRuleUsed = other.PieRuleUsed;
Robot = other.Robot;
} | 0 |
d38228ccfdd7351c41072ac43ae83656 | 2a23952e0416fe0c89c3c8a076e3fa25 | 将日期Date类型转换成Date类型当月第一天数字,例如2009-09-18,则返回2009-09-01。 | Calendar calendar = (Calendar) date.clone();
calendar.set(Calendar.DAY_OF_MONTH, 1);
clearTime(calendar);
return calendar;
} | 1 |
3b25525fc66bd9edc65d4b19b5fa19b4 | c8206e85412dbca14ccb597ae08f25be | 获取某区块内所有水晶 | public class UserTask extends HttpManagerApi
public void crystalGoods() {
setCache(false);
HttpService httpService = getRetrofit().create(HttpService.class);
Map<String, Object> map = getRequestMap();
doHttpDeal(httpService.crystalGoods(map));
} | 1 |
2e9a23521258a7f4e9f6831470ce3089 | 08c14e68ce719a5e25fd4ec26a6358fb | Adds an instance of a template block.
<p>Convenience method for: <code>addBlock (blockName, false)</code>
exists in the template. | public void setBlock(String valueId, String blockId) throws TemplateException; | 0 |
bb808dc65f17ba37c5a848222206f88a | 3085cf36bea912bc597013fd0d294f42 | Generate markdown h3 title. | class PandocMdGenerator(CommonMdGenerator):
def _h2(self, text):
return NEWLINE + '## {}'.format(text) | 0 |
6c7e58cbe43998131ff55b30e109d5ea | 248a76b09d2ac5b37f2b8878fcdd09a2 | Method to generate iterable of sql strings | interface DdlAware
fun createStatement(): List<String> | 1 |
612d311c731e161b2c0052e3277550a8 | 4effaa6e956190abe78ee82ace15a476 | 문자열 str이 null인지 또는 공백문자들로만 채워진 문자들인지 체크한다. | fun isNoBlankAndNoNull(strParm: String?): Boolean {
return !(strParm == null || strParm == "")
} | 1 |
28b3e0b047639c1f7b18c6134debaded | 583775e030408a160c7384f38ad47390 | Returns a new object of class '<em>Start Action</em>'. <!-- begin-user-doc --> <!--
end-user-doc --> | {
StartAction sa = new StartAction();
sa.ActionName = actionName;
return sa;
} | 1 |
301e411dd39d2fb9c4a5a742cab2f202 | 3791e2d8a97747dab81c08fd267d63b2 | Gets the story of tasks without a story | public List<String> getStories(); | 0 |
f733b2624820f0732589d5e6b0a7ac51 | 4b7c46cfa79abc94e91ed7096dbfebf9 | 根据refreshToken创建TokenResponse | public class TokenUtils
public static String createRefreshToken(RefreshTokenInfoModel refreshTokenInfoModel) throws WHLTokenException {
String jwt = null;
try {
jwt = Jwts.builder()
.claim(RefreshTokenInfoEnum.USER_ID.getKey(), refreshTokenInfoModel.getUserId().toString()... | 0 |
2d1f916d0ffbfba42ca5f4b032e82a4f | 17c8b5b5dbce11a032f40c7bc49b4809 | <p>
Retrieves the results of the lifecycle policy preview request for the specified repository.
</p>
API Documentation</a> | GetRepositoryResult getRepository(GetRepositoryRequest getRepositoryRequest); | 0 |
7ea94695e61756ba81d6d3d9868aa1e1 | 574ea2132e7fa09647a862204821999e | 根据作业号和学号找提交的作业内容 | {
DataTable dt = new DataTable();
SqlConnection conn = new SqlConnection();
conn.ConnectionString = ConfigurationManager.ConnectionStrings["kecheng2012ConnectionString"].ConnectionString;
SqlCommand comm = conn.CreateCommand();
comm.CommandText = "select zuoyebuzhiid,banjinam... | 0 |
05c3aba38a0d4f751d577125e1d8fea5 | e01bcf69c4494c3cb38b24932c014db7 | Decode 64-bit float data and place in supplied buffer as 64-bit
floats, aka doubles.
Return number of samples in output buffer on success, -1 on error. | void *buf,
size_t size,
int bits_per_sample,
int is_double
)
{
unsigned char * src = (unsigned char *) buf + ABS(bits_per_sample) * size / CHAR_BIT;
int tmp;
int sizeof_sample = ABS(bits_per_sample) / CHAR_BIT;
int shift = 32 - ABS(bits_per_s... | 0 |
8e5a4d82e60a8d35fd0e5fcac9c6b0c1 | 8ce97d08f0dc7533d3ea688a6e0375ed | POST /lawyers | class LawsController
def create
@law = Law.new(params[:law])
actual = Law.projednavane.count
@law.label = Law.create_label
@law.position = Law.create_position
@law.submitted = Time.now
@law.state = Law::STATE[0]
@law.submitter = current_user.id
if @law.save
flash[:notice] = "Zakon ... | 0 |
9e92549ad714daf8096e9df1a7da51f6 | ae6b5fc2f99aa6019be2706623a551c4 | 如果我们没有配置 c3p0-config.xml 的话,那么可以使用代码的方式来填写数据库的必要参数 | public class DemoConfig extends JFinalConfig
public void configPlugin(Plugins me) {
C3p0Plugin cp = new C3p0Plugin(PropKit.get("jdbcUrl"), PropKit
.get("username"), PropKit.get("password").trim());
me.add(cp);
ActiveRecordPlugin arp = new ActiveRecordPlugin(cp);
arp.setBaseSqlTemplatePath(Path... | 1 |
f73746f898b8425841896be38f295edd | d0dc26a4179d2a7f6cb72b7d2529531f | Initialize an array buffer with the given data. | this._arrayBuffer = new ArrayBuffer(byteLength);
this._dataView = new DataView(this._arrayBuffer);
this._byteOffset = 0;
} | 0 |
d11e6e4d96dbcb5fbbbeddcf166dea1e | 44bd03c45845a219141efe1a58bdb84f | Appends the child element using creator. | namespace Tncvd.IO.Xml.NetStd.Building.Components.ElementBuilders
public abstract class XmlElementBuilderBase : IXmlElementBuilder
protected void AppendChildElementUsingCreator<TXmlElementCreator>(TXmlElementCreator xmlElementCreator, string qualifiedName, string namespaceURI) where TXmlElementCreator : IXmlElemen... | 1 |
7447f219583702d24a04e747a6551155 | 99b3037c16671f9b00e954bfefc49109 | Returns the value of the '<em><b>Parameter Substitution</b></em>' reference.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Parameter Substitution</em>' reference isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | @objid ("c8b3f99c-7414-45cb-bf0d-8605de0ae5fd")
<T extends TemplateParameterSubstitution> List<T> getParameterSubstitution(java.lang.Class<T> filterClass); | 0 |
dfbbf9f968d3f210261201511fafef25 | 50aa42a31d5b779154a0479548623bbe | Initialization. | class Initials:
def __init__(self):
self._cnds = [] | 1 |
a947751738d4c385f4419c5b79913070 | 5d92a5aaf136e69ebd49ea315cb49b1f | Finds and displays a NomenclatureQuestionnaire entity. | class NomenclatureController extends OriginController
public function show($id)
{
$result = $this->nomenclatureRepository->find($id);
if(empty($result) || !$result){
return response(null, 404);
}
return $result->toJson();
} | 0 |
c306be584e4d4b643b3fdc9828d10321 | be9cdb7b342238973053fa29bc1e6fc6 | Fuction to map the Universal POS tags to numbers | if letter == 'a':
return 1
elif letter == 'b':
return 2
elif letter == 'c':
return 3
elif letter == 'd':
return 4
elif letter == 'e':
return 5
elif letter == 'f':
return 6
elif letter == 'g':
return 7
elif letter == 'h':
ret... | 0 |
a4a7030405438908f089e9754cc32f10 | 13e04dc6da3e8dbb117a49b9b80602d2 | Minimiza o PL inserido invertendo os sinais para transformar em um problema de maximização | var = []
num = -self.numero
for i in self.variaveis:
var.append(-i)
result = self.toString(var, num)
return Expressao(result) | 1 |
2925f44e0cf73588e4370a18852ebe95 | b2e36f539e55ca8e643070cb4de833de | Estimates the likelihood of being in a spindle state over time given the
spectral power of the local field potentials (LFPs). | model=GaussianMixture,
model_kwargs=dict(n_components=1)):
not_nan = np.all(~np.isnan(spindle_band_power), axis=1)
spindle_model = model(**model_kwargs).fit(
np.log(spindle_band_power[is_spindle & not_nan] + np.spacing(1)))
no_spindle_model = model(**mod... | 1 |
949107e8c4baaaec24099ecd24ae24cc | b1c556efae62ee77f65bda640ae75632 | fix IE drop down issue | namespace Saltarelle.UI public static partial class UIUtils
public static void FixStrangeIE7SelectIssue(Element parent) {
if (jQuery.Browser.MSIE && Utils.ParseInt(jQuery.Browser.Version) == 7) {
Window.SetTimeout(delegate {
jQuery.FromElement(parent).Find("select").Each((_, el) => {
string oldDispla... | 1 |
ff3801bfe1a457cb607573d7dd92627e | 26e30512f23429958fe1a0ab48cd4a86 | Your logic to check if your email service provider is working as expected. | abstract class ISC_EMAILINTEGRATION extends ISC_MODULE
abstract public function pingService($auth = null); | 1 |
57d5b4c35bd3c7715c8096926ffbaf02 | d114bfb3c1a26192538fa0b5b40d2fc2 | 可以在这里给被代理对象定制一些特性 | public class Test
public static void main(String[] args) throws Exception {
System.getProperties().put("sun.misc.ProxyGenerator.saveGeneratedFiles", "true");
Foo f = (Foo) Proxy.newProxyInstance(Foo.class.getClassLoader(), new Class<?>[]{Foo.class}, new MyInvocationHandler());
f.test();
... | 1 |
a038c23bb969b982ccf0818176d82b07 | 4a131770dc1c3f0a1e5349237b1f06b3 | 点击合同性质 | function changeType(obj) {
if ($.contract.param.con_type == '托管合同') {
var version = $(obj).val();
$("#jz-glf").hide();
$(".qs_version").hide().text("");
$("#conFreeDate").parent().siblings(".tisp").removeClass("error").empty();
$("#conIncreasing").parent().siblings(".tisp").r... | 1 |
5b65ff98fc2515be933737b27a4f6e8e | 49fc8ad78eacb4cabe716f56f2def3d4 | Construct a gradient boosting regressor and calculate the training score
using training data and parameter search with 5-fold cross validation | pipeline = Pipeline([
('vect', CountVectorizer(tokenizer = tokenize)),
('tfidf', TfidfTransformer()),
('clf', MultiOutputClassifier(GradientBoostingClassifier()))
])
params_gbc = {'clf__estimator__n_estimators': [50, 200],
'clf__estimator__learning_rate': [.05, .1]
... | 0 |
5951c294ac778a699828d4f3d508f1ed | 9dfa91fafcf91c66400929f5a8e2870f | Gets the value of the eligibilityChangeMeal property.
possible object is
{@link Boolean } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "UserData", propOrder = {
"id",
"created",
"createdBy",
"updated",
"updatedBy",
"conflictId",
"modId",
"accountId",
"alias",
"approvalCurrency",
"approvalExchangeDate",
"assignmentExcluded",
"auctionPrivilege",
... | 0 |
2405a878b6b7f35498717ba43939ee48 | db953c21055f3e652cd269ddb83ba0c5 | Get action from attributes on MessageInfo | class Actor extends EventEmitter2
_getActFromMailbox(mailbox) {
var parts = mailbox.split('/')
var actions = [':request', ':response', ':event']
for (let part of parts) {
if (actions.indexOf(part) != -1) {
return part
}
}
return null
} | 0 |
8a74e195818d37053c52bbad00961fbd | 17cf468f5ed6f7d475444ac0e31887c5 | Remove the specified purchaseorder from storage. | class PurchaseController extends Controller
public function destroy(Purchase $purchase)
{
Purchase::find($purchase->id)->delete();
return response()->json(['success'=>'deleted successfully']);
} | 1 |
24d592035c239578ad12ce978af1a83d | 1161fbe560015f38a87be0b1074803ca | The getter for SignatureProperties for value objects should include the properties
which make up the entirety of the object's properties; that's part of the definition
of a value object. | namespace MyLeagueTracker.Domain.Common
[Serializable]
public abstract class ValueObject : ObjectBase, IValueObject
protected override IEnumerable<PropertyInfo> GetTypeSpecificSignatureProperties()
{
IEnumerable<PropertyInfo> invalidlyDecoratedProperties = GetType().GetProperties()
.Where(p => Attribute.IsD... | 1 |
5eb978b311a930d422bec86d0877ce13 | fa3411f16903bea2ba69df90ceb821f8 | Function to read the CalTech 101 Silhouettes dataset. | def load_caltech101silhouettes(args, **kwargs):
args.input_size = [1, 28, 28]
args.input_type = 'binary'
args.dynamic_binarization = False
def reshape_data(data):
return data.reshape((-1, 28, 28)).reshape((-1, 28*28), order='F')
caltech_raw = loadmat(os.path.join('datasets', 'Caltech101Silho... | 1 |
99266647ab865aca48e502f90563c6f2 | a674c7ae33022813ccfc26455b5d9bad | Sets whether or not an Echo device can discover and pair to this Gadget | public class BluetoothManagerBuilder
public BluetoothManagerBuilder withDiscovering(boolean discovering) {
this.discovering = discovering;
return this;
} | 1 |
fed1ce465ddf6b9b9836222cf692094c | 0c00a62c8569f83b54b7c26306c07836 | Correct Standard Media author lists that crawl for lists with a empty strings. This causes author url errors on standard media pages | class RestItemMetadata
public function findUncorrectedAuthors($nFieldId)
{
$aDebug = array();
$sql = "select * from metadatavalue where metadata_field_id=" . $nFieldId . " and
text_value like '%|%' and resource_type_id=2";
try {
$result = pg_query($this->dbconn, ... | 0 |
de8426cc1d7f2752cb1c4c45f9e38dd5 | f23c5b785e2fece639fec044b5fab08c | Initialize our character data scriptable object | public class CharacterCreationScript : MonoBehaviour
void Start () {
character = ScriptableObject.CreateInstance<Character>();
HairStyles = FindObjectOfType<AssetList>().GetComponent<AssetList>().HairStyles;
ClothesStyles = FindObjectOfType<AssetList>().GetComponent<AssetList>().ClothesStyles;
... | 1 |
3c020fab529c0b03fd9ff0aecd7fc66c | ed3789f7026f5a91f37e1b96617c4bd3 | analyze the cumulative return and standard deviation of the varying impacts | def cumulative_log_returns():
E,W,C,SSE,varexpl = local_load('saves/8_factor_matrices.pkl.gz')
e = np.exp(E)
x = np.zeros([5001,8])
x[1:,:] = E
x[0,:] = [1.]*8
p = np.cumsum(x, axis=0)
indxs= (p /(250.0**.5))
order=[3, 1, 7, 0, 4, 2, 5, 6]
indxs=indxs[:, order]
cs = np.asarray(['... | 1 |
c58f5374c5f7b04baf2f7b70c71e3bad | 45ffb195b2fbef81445a4d03ce9a77f7 | (a -> b) -> Either c a -> Either c b | public abstract class Either<A, B>
public final <X, Y> Either<X, Y> bimap(final F<A, X> left, final F<B, Y> right) {
return either(compose(left_(), left), compose(right_(), right));
} | 0 |
73ca710fa87651a2e348a1fdabc5516a | cc608c7aadc17cb29ab9be1ffa0b5118 | Gets the daily_timer_condition of this RuleCondition. | public class DispatchCriteria implements Serializable
public PeriodOfTime getTimeCondition()
{
return m_timer;
} | 0 |
270caf47aa23a175c94c05c18e67431d | 883cfaf35bd0a393b46feace19a475af | Store a list of states in a file. | with open (filename,'w+') as Openfile:
Openfile.writelines('id,final_world_state\n')
for i,state in enumerate(states):
Openfile.writelines('%s,%s\n' % (id_name[i],state)) | 1 |
ff2dcf1bd397e5176ee4264bf63108e5 | 11b6250480f17d6dfb31bada3196cfb2 | returns the value of $analyteID | class smartyanytime_plugins_analytics extends smartyanytime_plugins
function _getAnalyticsDB() {
$sql = "SELECT * FROM ".DB_PREFIX."analytics WHERE id='1';";
$query = @mysql_query ( $sql );
if ( mysql_errno ( ) != 0 ) exit();
if ( mysql_num_rows ( $query ) == 0 ) exit();
$analytics = mysql_fetch_assoc ( $quer... | 0 |
f12b5687f5b071f60ea38baa4c354837 | 34bfb1b28cea248ed099591e0b3d2cc9 | 分页查看所有故事 | const offset = parseInt(req.params.offset || 0);
const total = await StoriesModel.countDocuments()
if (offset > total || offset < 0) {
throw new Error('OUT_OF_BOUNDS');
}
const records = await StoriesModel
.find({ publicStatus: true })
.select('-image')
.sort([
... | 1 |
13f45ef80fd6601b98bd9858edcf717a | 5dac3a989577827c3bc9ae0c02196293 | функция для начисления зарплаты | int GetPaymentSum(ref PChar)
{
int pSalary = makeint(500+100*sti(PChar.rank));
return pSalary;
} | 1 |
43ee368de50a4f72fb256e8b2a122a2d | 50ecec09d889883b67db15706c793b49 | 通过乐器类别获得乐器列表 | Flux<SongSheet> getSongSheetByType(int type); | 0 |
0c8e9317a80436e3572715495fb17c5b | f728be055c53ce1240a59cae48e3d740 | 设置运送条款 | @Table(name = "abt_refund_item")
public class AbtRefundItem implements Serializable
public void setLeg(String leg) {
this.leg = leg == null ? null : leg.trim();
} | 0 |
3788901bde42dd66447bd7ad8e24adc2 | ac3b5e69821ea60e86e3aa4df59c00ac | Obtiene la lista de jugadores titulares del equipo local | $partidos = $torneo->getPartidos();
$arrayJugadores = array();
foreach($partidos as $partido){
if($partido->getRonda() == 1){
$participantes = $partido->getParticipantes();
foreach($participantes as $p){
foreach($p->... | 0 |
721e7218e95ea6b2fa85445e97e6c6d4 | 440c2d44d5b91bbb6d94b953388e1b62 | 一般解 | int numDecodings2(string &s){
if(s == "" || s[0] == '0'){
return 0;
}
vector<int> dp(s.size(),0);
dp[0] = 1;
for(int i = 1;i < s.size();++i){
if(s[i] != '0'){
dp[i] += dp[i-1];
}
if(s[i-1] != '0' && stoi(s.substr(i-1,2) <= 26){
dp[i] += i == 1 ? 1 : dp[i-2];
}
if(!dp[i]){
return 0;
}
}
ret... | 1 |
51e5e33abb3df638e79d59f28085fe8d | 19f64c05985db65790ad3d286d6bc6af | Set whether the beacons should attempt to match the Mindstorms' behaviour | namespace OpenJigWare
partial class Ojw
public class COjwMotor
public void SetZigBee(bool bUse) { m_bZigBee = bUse; } | 0 |
2ade53d0e264f9a8d3f9d16a72b849c2 | f192911038be173c3fe9f6717e970fa5 | 题干已说明数组一定是山脉数组 | class Solution4:
def mountainSequence(self, nums):
start, end = 0, len(nums) - 1
while start + 1 < end:
mid = start + (end - start) // 2
if nums[mid] > nums[mid + 1]:
end = mid
else:
start = mid
return max(nums[start], nums[end]... | 1 |
def2316786700bf3d3db2573da1eaa5c | 5e72d002eea5e6276575c4c4a02caa37 | Add multi-tenancy to the service collection | where T : class, ITenantInfo, new()
{
return services.AddMultiTenant<T>(_ => { });
} | 1 |
24ac92d4e19a5d7de3607b5abc10f057 | d40ed04c84cf8524d3c5d55b7723afc5 | 找回密码-验证图片验证码,并发送短信 | @RequestMapping(value = "/rePasswordValidate", method = RequestMethod.POST)
@ResponseBody
public String rePasswordValidate(HttpServletRequest request, String valid, String phone){
if(phone == null){
return JsonView.JsonViewFactory.create().success(false).info(UserErrorCode.VALIDATE_CODE_ERROR.get... | 0 |
6a767ab505051a653aa6119b00770cd5 | 2f749f50b12bf7fdbda749bc5dc0e1b5 | Metodo de ordenamiento tipo Burbuja | {
bool varHuboIntercambios;
int varIdx, varElementoTemporal;
do
{
varHuboIntercambios = false;
{
for (varIdx = 0; varIdx < prmVector.Length - 1; varIdx++)
{
if (prmVect... | 1 |
fd8bb1925423030863794b61b27ebac5 | 7b9b6369264134a7d51c2218912221d6 | Returns the meta object for the reference '{@link org.caltoopia.ir.Actor#getSchedule <em>Schedule</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getAbstractContractualElement_ScheduleDate(); | 0 |
d90c206bee39756ab4ea3699f606d994 | 5891b87c1caea67b56ace8b4b4a31bb6 | Create a new middleware. | this.input = input;
this.middlewares = [];
options = options || {};
var middlewares = options.middlewares || [];
middlewares.forEach(this.addMiddleware, this);
} | 0 |
2f7aac243f12750fb79000f024f7b5ad | 17b70b4d80ca156578d85a3d682a1d12 | Set Cursor being sure the Node is Expanded | void DataViewCtrl::OnItemExpanded( wxDataViewEvent& event )
{
wxDataViewItem item = event.GetItem();
Cornucopia::Node* node = ( Cornucopia::Node* )item.GetID();
EditorMetaData* editorMetaData = ( EditorMetaData* )node->GetMetaData();
editorMetaData->SetExpanded( true );
} | 0 |
e5da357e1a9853a1886dcc8f62fd21b6 | ae41219a557b5badeb6ad2ef879bdd5b | Loads a specified collection from disk to memory. | namespace SDTD.Config
public class ItemCollection : ObservableBaseCollection<Item>, IElementCollection
public void Load(String filename)
{
this.Load(XDocument.Load(filename));
} | 1 |
384c82797f1a313cb4a77ad8c0ccc785 | 4b50599057b12993f05734b0a930ae9e | Adds a handler for the MouseEnter attached event | {
if (MouseEnter != null)
{
MouseEnter.Invoke(this, mouseEvent);
}
} | 0 |
2eef9e4bbd2e31872571cd3bc34f23f2 | f6f5e25317c4cbda5a11fec6fe96cd46 | エラー出力はするが、プログラムの終了はしない | void sio_error(char s[])
{
sio_puts(s);
_exit(1);
} | 0 |
20a14ddc317ad06ee3783e64567ff987 | e47357405e4e687518105efc99161dc5 | Test if $item passes the requirements in $condition | {
$f = $oc[0];
$o = $oc[1];
$v = $oc[2];
return $this->isConditionValid($f, $o, $v, $data_item);
} | 1 |
ab28e7b3f76cee23552ec1c9f1bcfe48 | 44027b92ea70d6bbf8b7612decb1ba01 | 左右切换当前选择英雄 | self.mCurSelectedHeroIndex = 1
local nearestIcon = self.mHeroIconList[self.mCurSelectedHeroIndex]
local tagWidget = self.mRootWidget:getChildByName("Panel_Hero_Middle")
for i = 1, #self.mHeroIdTbl do
local oldDis = math.abs(nearestIcon:getWorldPosition().y - tagWidget:getWorldPosition().y)
local newDis = math.a... | 0 |
4448d1091eb1d00b103734742060c528 | c3982ca13bb820b16f5f41d3b804dbec | Verifies the details of an ipsec policy | ipsecpolicy_id = _uuid()
return_value = [{'name': 'ipsecpolicy1',
'auth_algorithm': 'sha1',
'encryption_algorithm': 'aes-128',
'pfs': 'group5',
'id': ipsecpolicy_id}]
instance = self.plugin.return... | 1 |
dd10f3341c13d6ddf310a1bffaca1225 | 24a6c4dec1642926a9fce94c4a5d76fe | Gets the "TipoLCE" element | public abstract class Codigo_stBean implements javax.ejb.EntityBean
public abstract java.lang.Integer getTipo(); | 0 |
37e0993c6312a67f6f37e7d89ecb1128 | 328818695fb77e58d74480ba1a9bd7e3 | initialization function for the module: returns a wx.BitmapButton to be added to the main palette | a = self.__assets
rtn = nwidget.ImageButton()
rtn.from_row(a.resolve("arrows.png"), (0, 0, 1, 0.25))
rtn.register(self.__window)
return rtn | 0 |
bdec5602e93ecb89d66fc2ede235807d | 66f34bb485cf3129099eb4f2566c74a4 | Get contained omim ids | class eyeSpec_spec:
def oids (self):
all_oids = sorted(self._private_info.keys())
r_oids = []
for oid in all_oids:
if type(oid) == tuple: r_oids.append(oid)
return deepcopy(sorted(r_oids)) | 0 |
4172a14d27273929a0fe3e9d4c2e0005 | 01b0f2e0ca9a09f2db5c429efbf9b42c | POST /issues/:issue_id/comments | class CommentsController
def create
@comment = Comment.new(comment_params)
@comment.creator = @user
respond_to do |format|
if @comment.save
@comment.issue.reopen if @comment.issue.is_closed?
format.html { redirect_to @issue, notice: 'Comment was successfully created.' }
... | 1 |
bc2fa19d3c0b0a6124cd1776c3af0915 | adaa2123b2bce801b08ba33a1aee5871 | Settings specific to keys that can be used by iOS apps. | class GoogleCloudRecaptchaenterpriseV1IOSKeySettingsArgs:
def __init__(__self__, *,
allow_all_bundle_ids: Optional[pulumi.Input[bool]] = None,
allowed_bundle_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
if allow_all_bundle_ids is not None:
pulum... | 1 |
e85bde5d18154156407809c53103aa74 | 04ca7c9324ee7a9567a0e67fcaa530dd | Returns the color for drawing Head contours. | public class ChronicleViewer extends JPanel
public Paint getHeadColor() {
return headColor;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.