query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
46fa3cd3eaa870a592052d3da8849648 | 117ab6814bab7d7870d5ffb50868a182 | 添加到我的词库 | LabelController labelController=new LabelController();
LabelModel labelModel=new LabelModel();
labelModel.setName(mSearchSly.getSearchText().replace(" ",""));
labelModel.setCreateTime(String.valueOf(Calendar.getInstance().getTimeInMillis()));
labelModel.setUpdateTime(String.value... | 1 |
d5c130796882f4fe7d991e0e1bf98039 | 6efb74c29bd75759262ecf86d372b03e | Реляция. Возвращает свойства, связанные со сборкой темы. | class CatalogItem extends CActiveRecord
public function relations()
{
return array(
'brand' => array(
self::BELONGS_TO,
'itnew\models\CatalogBrand',
'brand_id'
),
'catalogMenu' => array(
self::BELONGS_TO,
'itnew\models\CatalogMenu',
'catalog_menu_id'
),
'cov... | 0 |
71b086846c293866f41296ab4a417b4f | eb299f5a3fffdeddd1be3c5db4a59cc1 | <pre>
Deletes a variant set including all variants, call sets, and calls within.
This is not reversible.
For the definitions of variant sets and other genomics resources, see
[Fundamentals of Google
Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
</pre> | @javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.0.3)",
comments = "Source: google/genomics/v1/variants.proto")
public class VariantServiceV1Grpc public static final class VariantServiceV1FutureStub extends io.grpc.stub.AbstractStub<VariantServiceV1FutureStub>
public com.google.common.u... | 0 |
ea401c9e59a7cdacf6240629d27359d7 | 5d9b28873106688d8fdec220257d59de | Set if we are detecting bots. | class CreateCallOptions extends Options
public function setMachineDetection($machineDetection) {
$this->options['machineDetection'] = $machineDetection;
return $this;
} | 0 |
5f8fcd682134a11b0981e552e0506781 | 9e52b393ef8d5b530212a9ee0b97f439 | Validate LBR PDU for discarding/processing | {
MEP_t mep;
if(mpFlag==MIP)return 0 ;
mep=(MEP_t)mp;
if(memcmp(pkt_data,mep->MEPStatus.MACAddress,6)!=0)return 0 ;
return lbpm_pdu_validate(pkt_data+ETHERNETHEAD_LEN+flags*VLAN_TAG_LEN,pkt_len-ETHERNETHEAD_LEN-flags*VLAN_TAG_LEN);
} | 1 |
bd5e9dfb3b36123fa6b1f5689e3ee65e | 0971d6c0af8f9696b6c25c579aa65caf | Toggles the state of autoset keyframes. | def set_key(attr):
cmds.setKeyframe(attr) | 0 |
53ce6ebfbe738e9b31581d9a9992eeb1 | a7d12ba39c352332aecbc05f58e85076 | Create all needed inputs for each resource based on hierarchy | {
EntityName = assetId;
foreach (var item in GetAssetUsages(entities, assetId))
{
var scenario = Children.Where(e => e.EntityId.Equals(item.ScenarioId)).FirstOrDefault();
if (scenario == null)
{
... | 1 |
31dc28e7439d06eea4a585aefb81b709 | 94af7e30e651261750724443c3ce50db | ensure all keys are present, if not present set to an empty string | final TreeMap<String, String> map = new TreeMap<>(params);
List<String> emptyKeys = new ArrayList<>();
for (Map.Entry<String, String> en : map.entrySet()) {
if (en.getValue().isEmpty()) {
emptyKeys.add(en.getKey());
}
}
emptyKeys.forEach(x... | 0 |
02b1055fb2598f2974e1ce6e0d331e70 | 46006f203229fc91a0e8ae07e08645fa | Get the amount of brick in the resource collection. | public class ResourceBag
public int GetAmountOf(ResourceType resourceType)
{
return this.ResourceCounts[(int)resourceType];
} | 1 |
57d866c084e758966555724db295a201 | 3806ec0d7efe32eba2f4a5391834d032 | returns state of boolean 'selected' | export class ItemRenderer extends Component implements IItemRenderer
public get selected(): boolean {
return this._selected;
} | 1 |
27b3469a4b10319611c41022230afab7 | 2c90033ff444da50e82a3a64d9cef504 | Enter a parse tree produced by {@link TSqlParser#procedure_param}.
@param ctx the parse tree | public class SQLStatementParserBaseListener implements SQLStatementParserListener
@Override public void enterProcedureSqlStatement(SQLStatementParser.ProcedureSqlStatementContext ctx) { } | 0 |
80cdb4ff078afcf39092bd66e7d2f095 | 09de56af18bea589766169424721675e | 5. Import scoreboard of a course(midterm, final, lab, bonus) from a csv file. | class ControlsGrader():
def __init__(self, csv_path):
self.csv_path = csv_path | 0 |
107230eee9fb6f0cdf2abf65d8fd9c3e | c376a7dc8ccf4a9f3ad6edf85ed70dc2 | Adds the basic crystal information to a pyUSID style hdf5 file. | for id_, x in zip(crystal_series.index, crystal_series):
setattr(x, "dataset_id", id_.encode())
yield x | 0 |
63c958a95540d5df92850d518a7b5a41 | 3a89d50db6c1773c85cdb736f2a631e2 | Returns the meta object for the '{@link easyflow.graph.jgraphx.TraversalEventGraph#applyTraversalEvent(com.mxgraph.model.mxICell, easyflow.traversal.TraversalEvent, java.lang.String, org.eclipse.emf.common.util.EList) <em>Apply Traversal Event</em>}' operation.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EOperation getGraph__ResolveTraversalEvents__mxICell(); | 0 |
db0dfa5f289303e98c978e630854779d | 40433e3a46116bbad5bcb202b7b41012 | ! IOの初期設定を行いYM2151/YM3012をハードリセットする、必ず呼ぶ必要あり | {
YM_Reset();
SN76489_Reset();
fm_last[0] = fm_last[1] = 0;
fm_ptr = fm_buffer;
fm_cycles_start = fm_cycles_count = 0;
} | 1 |
2e3e015b0fdf57b8437cf15decf13100 | 386c23aaf968fd6c18abfe31c040b6ed | 会根据最新的价格来计算中间价,并更新我的出价为中间价,前提是市场买一跟卖一价格不是我的出价 | $basePrice = $this->basePrice($bidId);
$maxPrice = $this->maxPrice($bidId);
$myPrice = $this->myPrice($bidId, $agentId);
if ($myPrice == 0 && $maxPrice == 0) {
Db::table('ato_bid_record')->insert(['bid_id' => $bidId, 'agent_id' => $agentId, 'deal_price' => $basePrice + 100]);... | 0 |
9f62f86dff7bc85af685b684da7850fc | 7cc04bc814ca2fa46badad517d2bbc80 | Applies an asset query to this repository. | class RepositoryQuery(abc_repository_queries.RepositoryQuery,
osid_queries.OsidCatalogQuery):
def supports_asset_query(self):
pass | 0 |
cc2e27fb203f71194d4a457557e56f4f | 11edf36e340447cdfd0f260f51b409ba | 返回成功添加的个数 | class TestDepart(mytest.MyTest):
def test_depart_add(self):
self.login_with_cookie()
depart_page=departmentPage.DepartPage(self.dr)
l=depart_page.add_depart()
self.assertEqual(l[0]+1,l[1]) | 0 |
cd2a1afc5b4f203f340208ea7b68e654 | a68806ddf79b33dd40d9399d8b3037cb | This routine checks a string to see if it is a valid field name.
It returns 0 if it is not, or a 1 if it is. A check is made to see if
it contains an unprintable character or any character from a list of
excluded characters. All names starting with "cmsg", independent of case,
are reserved for use by the cMsg system it... | char *name;
{
int length;
length = 1;
if (MB_CUR_MAX > 1)
{
while (*name != NULL)
{
length = mblen(name,MB_CUR_MAX);
if (length > 1)
return(1);
name++;
}
}
return(0);
} | 0 |
42659f2f1ce927dc9028c22f0516f1f4 | 9e939efe29f05754d8cdd4aa187a83d1 | 查询缓存带宽利用率(周) | productId = (String) getSession().getAttribute("sproductId");
if (versionName == null || versionName.length() < 1) {
versionName = "-1";
}
if (channelId == null || channelId.length() < 1) {
channelId = "-1";
}
if (startDate == null || startDate.length() == 0 || endDate == null
|| endDate.length() ... | 0 |
0aae9e6862cb1b49c446bcbf21a75ab9 | 656a89ee568a7e394c2407199b878d42 | Injects a frontend user repository.
A frontend user repository. | class Tx_Contentstage_Controller_BaseController extends Tx_CabagExtbase_Controller_BaseController
public function injectBackendUserGroupRepository(Tx_Contentstage_Domain_Repository_BackendUserGroupRepository $backendUserGroupRepository) {
$this->backendUserGroupRepository = $backendUserGroupRepository;
$querySettin... | 0 |
eeb0a81a4bbcf290c8fc8e0678d78d81 | 3177f1e76b4d14a149cce15cc39ee970 | Create the Demo Table | var myDocument = app.documents.add();
var myPage = app.activeWindow.activePage;
myAddColor(myDocument, "DGC1_446a", ColorModel.process, [0, 100, 0, 50]);
myAddColor(myDocument, "DGC1_446b", ColorModel.process, [100, 0, 50, 0]);
var myTextFrame = myPage.textFrames.add();
myTextFrame.geometricBounds = myGetBound... | 1 |
cfd6c1a62e276698d54d93d9bd9adf23 | 4965bd91acd4b4c35967c8a7c5f283e1 | Show save dialog to define filename for save or duplicate
Returns:
str: The filename to create. | def get_save_path():
return filedialog.asksaveasfilename() | 1 |
56133aa7487731615272e752241cb12d | 1282f5fcda0df88e58d3aa88cc95421d | Fonction qui gére l'évolution de la population
Ne retourne rien. | tot = sum(self.Fit)
alea = np.random.multinomial(self.Size, list(np.array(self.Fit)/tot), size=1)
New_Pop = []
for ind,val in enumerate(alea[0]):
if val != 0:
for i in xrange(val):
G = self.pop[ind].graphe
New_Pop.append(Graph(0,0,G,2))
self.pop = []
self.pop = New_Pop
return 0 | 1 |
081fcbac945d4c365890e2599572906d | 2b29337dd6db26b3548708f629610982 | Compute the number of bytes that would be needed to encode a
MessageSet extension to the stream. For historical reasons,
the wire format differs from normal fields. | return VERSION_LENGTH
+ MessageHeaderEncoder.ENCODED_LENGTH * 2
+ DescriptorMetadataEncoder.BLOCK_LENGTH
+ SegmentDescriptorEncoder.BLOCK_LENGTH;
} | 1 |
31feab4b8d8d32a1c2d489d293df8cf1 | 2d6113962fcf9a1904833e3af8d68a66 | Tests netutils.netstat | class MyTests(unittest.TestCase):
def test_netstat_rnee_ubuntu_18_4(self):
self.assertEqual(jc.parsers.netstat.parse(self.ubuntu_18_4_netstat_rnee, quiet=True), self.ubuntu_18_4_netstat_rnee_json) | 1 |
84fee8c12e187d0f4d2dbf6aba72e50f | e94c07b40de8483715df996278ccad1a | A coroutine that immediately raises the given exception
If exc is not actually an exception, excclass is instantiated using it
as the only parameter and raised. If excclass is not an exception class
(and not a callable that returns a valid exception object), Python raises
a TypeError exception. | def fail_unless_raises(exc_class, callable_obj, *args, **kwargs):
try:
callable_obj(*args, **kwargs)
except exc_class:
return
else:
if hasattr(exc_class, '__name__'):
exc_name = exc_class.__name__
else:
exc_name = str(exc_class)
_report_failure... | 0 |
e5d77f6ad816b4250b9d6f381e804f55 | 65eafffbc9b315b4ef43911e53c387cf | A wrapper over rightViewUtil() | fun rightSideView(root: TreeNode?, depth: Int = 0, ans: ArrayList<Int> = ArrayList()): List<Int> {
if (root == null) {
return ans
}
if (ans.size <= depth) {
ans.add(root.`val`)
}
rightSideView(root.right, depth + 1, ans)
rightSideView(root.left, depth + 1, ans)
return ans
} | 0 |
6493d5b82247cd3dc36965091e3cf605 | c0db6dd4c913590030f5fe051de8c92d | Returns the factor of increased damage dealt due to monster vulnerable. | float getDamageMultiplier(); | 1 |
6a225bd4792b8366bbedb605ca4a18a7 | 5f675437d4e0483dc646541303b00d41 | Converts the matrix A in dense format into a matrix in CSR format. All the parameters are pre-allocated by the user, and the arrays are filled in based on nnzPerRow. | nnz = data.shape[0]
elems_per_row = numpy.zeros(nrows, dtype=numpy.int64)
csr_data = numpy.empty(nnz, dtype=data.dtype)
indices = numpy.empty(nnz, dtype=numpy.int64)
indptr = numpy.empty(1 + nrows, dtype=numpy.int64)
for index in range(nnz):
elems_per_row[row_indices[index]] += 1
cou... | 1 |
2c8f1d49fb5c7bfadffcb9124015b16f | 5811b42120c4c55bcdc8cb4a28e766b7 | Moves the object this script is attached to right in order to create our looping backedge effect. | this.transform.rotation = Quaternion.Euler(prevObjRotation.x + Mathf.Sin( ( Time.time + startRotate ) * speed ) * offset,
prevObjRotation.y,
prevObjRotation.z);
} | 0 |
10728ae4261d5fb46849ad62383696cb | c788cc4774ce80f69d469feb85d3ae3d | Returns doc terms keys for the set of terms that have been indexed. | class IIndexEnumeration(Interface):
def docids(): | 0 |
a40435ed5c84b9fdb337bbb7cafe03ed | e930fa9ad73d6dd58c2374cf3a543d07 | Returns travel date attribute. | class GetHotelAvailInput extends \G4\AREBundle\Entity\com\allegiant\are\dto\common\RequestInput
public function getTravelStartDate()
{
return $this->travelStartDate;
} | 1 |
99307776b4b3cd7850a984419e716b2d | edbc1d54359885e29602532b65bfa352 | This slot opens a manage user directories dialog to allowing the default
output directory to be changed | cwd = self.shell.get_cwd()
self.emit(SIGNAL('redirect_stdio(bool)'), False)
directory = getexistingdirectory(self, _("Select directory"), cwd)
if directory:
self.shell.set_cwd(directory)
self.emit(SIGNAL('redirect_stdio(bool)'), True) | 1 |
ea342efbba7a534665e704567d502aec | 044c11cf84b818b6d3060c51d71fc3af | Finishes the asynchronous execution of the DisassociateResolverRule operation. | namespace Amazon.BillingConductor
public partial class AmazonBillingConductorClient : AmazonServiceClient, IAmazonBillingConductor
public virtual AssociatePricingRulesResponse EndAssociatePricingRules(IAsyncResult asyncResult)
{
return EndInvoke<AssociatePricingRulesResponse>(asyncResult);
... | 0 |
7a46275120c6dce07706da5e21678dc6 | 4a9a10d4ce6dc41568014a2ab56c4bae | Do some math to scale the canvas to the right size, while preserving aspect ratio.
As ugly as this is, it's preferable to me than the pure-CSS padding + pseudo-element hack. | let scale = 1;
if (naturalW > screenW && naturalH < screenH) {
scale = screenW / naturalW;
} else if (naturalH > screenH && naturalW < screenW) {
scale = screenH / naturalH;
} else {
scale = Math.min(screenW / naturalW, screenH / naturalH);
}
let renderW = naturalW * scale;
let renderH = natur... | 1 |
3d98e93f947ce1864f97e8c2e398e020 | 1603cc3c97d17af5b15d0529306dde68 | Clicks the button to open the IB Console | class OnlineBankingPage extends Page
clickAccountActivityButton () {
this.accountActivityButton.click();
} | 0 |
fdfec4f069d57dfb1fa658743c0b6258 | 599e809746bc7fc24f338c0cc1ca253a | Returns array of weekend dates between two dates (inclusive). | function weekendAreas(axes) {
var markings = [];
var d = new Date(axes.xaxis.min);
d.setUTCDate(d.getUTCDate() - ((d.getUTCDay() + 1) % 7))
d.setUTCSeconds(0);
d.setUTCMinutes(0);
d.setUTCHours(0);
var i = d.getTime();
do {
markings.push({ xaxis: { from: i, to: i + 2 * 24 * 60 * 60
... | 0 |
bea75b4f39d4d28d2a0d3adf9ab269c4 | 5c51dd7de5053c34fbb4da04a9fbcf1a | @brief Sends a data half-byte to an LCD.
has to be split into two half-bytes and send in that manner. | lcd_writehalf(LCD_Handler_t *hlcd, uint32_t *buf, int cnt)
{
SPI_Handle_t *hspi = hlcd->hspi;
ER ercd = E_OK;
set_dcx_data(hlcd);
hspi->Init.DataSize = 16;
hspi->Init.InstLength = 16;
hspi->Init.AddrLength = 0;
ercd = spi_core_transmit(hspi, hlcd->cs_sel, (uint8_t *)buf, cnt);
#if SPI_WAIT_TIME == 0
if(ercd ... | 0 |
25bea78a2db02139c0462a6a38791386 | d35067c8a9a3f0c470968b5164ac7680 | Creates a new unique closure type name. | export class DefaultNamingStrategy implements NamingStrategyInterface
closureJunctionTableName(originalClosureTableName: string): string {
return originalClosureTableName + "_closure"
} | 1 |
e3154dd5527f8d7ff8bf2dd1a9e312a1 | acbf2b887c92e3999228daa64cdfc524 | Test that each metric identifies the number of reads mapped to an exon (XF=='CODING') | df = singlecellmultiomics.bamProcessing.bamToCountTable.create_count_table(
SimpleNamespace(
alignmentfiles=['./data/mini_nla_test.bam'],
o=None,
head=None,
bin=30,
sliding=None,
binTag='DS',
... | 0 |
d8d09f665ea44826641198cd64e10528 | a8812ff30960cbd5d1fc74359a71ee9f | 开始定位一次 | public class GpsManager implements AMapLocationListener
public void activate(long interval) {
LogAndToastUtil.errorLog("GpsManager","一次定位");
if (mLocationClient == null) {
mLocationClient = new AMapLocationClient(context);
} else {
mLocationClient.stopLocation();
... | 1 |
d7ef9f118890d2fb16b838812814f9a5 | 7951dde03b627774b76dbe9f73a584da | league admin can view all players | if current_user.admin? then
@players = Player.all
else
@players = Player.all(:conditions=> ['LOWER(owner) = ?', current_user.login])
end
respond_to do |format|
format.html
format.xml { render :xml => @players }
end
end | 1 |
f87b44757beb7720350aef60d201e8fc | e9631ee22ab7b1d246edc06fd1b325b9 | Fill the internal list of iterations items | {
int numberOfIterations = Visualizer.GetIterationsCount();
IterationsUIText.text = string.Format("Iteration: {0} / {1}", 0, numberOfIterations - 1);
IterationsSlider.maxValue = numberOfIterations - 1;
IterationsSlider.onValueChanged.AddListener((float value) =>
{
IterationsUIText.text = string.Format("It... | 0 |
5b7c064ab8fa0d27c13a284ba1f2fb66 | f4e8a6e128ebe2581255c111cc6eb389 | 将本地文件上传到s3后生成文件下载路径 | def upload(local_file, bucket_name, ak, sk, bucket_host=None, prefix=None, key=None):
auth = Auth(ak, sk)
if bucket_host is None:
bucket_host = get_bucket_host(bucket_name, auth)
if key is None:
key = os.path.split(local_file)[-1]
if prefix is not None:
key = os.path.join(prefix,... | 1 |
f7ba74464b7cfaf791b3abe0401fab18 | 95b6b91fdf735f2277594ec79b1e95ed | 修改接口文档 | def api_workflow_docs_update(request):
resp = auth_check(request, "POST")
if resp != {}:
return HttpResponse(json.dumps(resp, ensure_ascii=False), content_type="application/json")
if not permission_check(request, 'code_set_workflow'):
resp = code.get_msg(code.PERMISSION_DENIED)
retur... | 1 |
775bd9ad1d1be201fdaa8567a163505f | 2b5ff014806d7d2de4b33120ab7e0cf5 | Gets an entity from the Database with the given primary id.
If there is no such entity present in the database returns null. | namespace EDC.ReadiNow.Model
IEntity Get( TRef id ); | 1 |
9d03dc3551d20f2bafd19e9a1ae02cda | 710ea806233394692dca8f6df72c4040 | - - - - - - - - - - - - - - - -
- - CALCULATE MODEL GOALPOS - -
- - - - - - - - - - - - - - - - | {
int iGoal = GetGoalPosition_FP();
float fltPos = ConvertPosFPToFloat(iGoal);
return fltPos;
} | 1 |
9bcba68513886ddcfe5c0d77cea191e8 | c95de263aa97d1b73d69ce0cd9087548 | Get a list of all the registered dimensions. | f = os.path.join(DATA_DIR, _DIR, 'domain_dims.pkl')
with open(f, 'rb') as fh:
dd = pickle.load(fh)
return list(dd.values()) | 1 |
581b699433c77ebe7455a9191e3945ca | 0472a44a67773e283d9534992d36339d | グラフGの強連結成分分解を行う関数 | const reversed = reverse(graph);
const visited: (0 | 1 | 2)[] = new Array(graph.length).fill(0);
const component: number[] = new Array(graph.length);
let componentCount = 0;
for (var i = 0; i < graph.length; i++) {
if (visited[i] !== 0) continue;
const ord... | 1 |
8440d8e2ea89ed0f6c72ae8985a8e044 | de9d4aeb6fec8ea8c302e7f32ccda084 | Set initial focus on the modal Title h1 | export class LuxDialogStructureComponent implements OnInit, AfterViewInit
ngAfterViewInit() {
(<HTMLHeadingElement>this.dialogBase.nativeElement).focus();
} | 1 |
ddb224fe265e2fa2ec67d93c45ec075d | 37257830269f304d0d0346b027aa6f42 | Have icon follow the soldier. | if a_Corps == d_Corps then
return LoadSprite("ui_battle_icon_5")
else
if a_Corps == 0 then
if d_Corps == 1 then
return LoadSprite("ui_battle_icon_4")
elseif d_Corps == 2 then
return LoadSprite("ui_battle_icon_3")
end
elseif a_Corps == 1 then
if d_Corps == 0 then
return LoadSprite("ui... | 0 |
e94809bd1a669f987434d3c5f72dcb32 | 037dd772a7adad859e5c696cd9232e9c | Look at a collection of intervals, return the interval on which they
all overlap.
The input is a list of tuples [(begin, end), (begin, end) ...] | if not lists:
return None
return self.merge_range_lists(lists, 0, len(lists) - 1) | 0 |
f33be2cba710d70b6aea06b5806b00bd | 782bb2ccadb783529b33613df50b59ec | Функция добавления нового бензина | form = GasAdditionForm()
if form.validate_on_submit():
bill = Gas(year=form.date.data.year,
month=form.date.data.month,
quantity=form.quantity.data,
price=form.price.data,
building=form.building.data)
db.session.add(bill... | 0 |
2e076e6f7b06a094b769fa0391c733f3 | 8ba81a03e69a3545ad93f31376654206 | Returns a list of news types depending on condition | class AnwContentClassPageDefault_newscategory extends AnwContentClassPage implements AnwDependancyManageable
protected static function getNewsList($oPage)
{
$asPatterns = array();
$oContentClass = AnwContentClasses::getContentClass(self::NEWS_CLASS);
$asLangs = array($oPage->getLang());
$nLimit = 0;
$sSortUs... | 1 |
2512bedad3da60f8f07ba76522da8522 | e7b1e3f4c504d4ff90d5bc798621c3f2 | Registers and initializes all block and item recipes. | public class BlockRecipes
public static void registerBlockRecipes()
{
registerShapedRecipes();
registerShapelessRecipes();
} | 1 |
d72327ab46b73572bb44b817b3cb527b | 91e4e506b27878a00cdd29540be2d93d | To String: | String toString() | 1 |
d75df826bf5763fb57b0588d4bb4525b | 3ec26a326c14661ce53b038a043313b6 | Returns agent group.
- If self.use_diskcache is True: returns the cached `_agent_group` if available, otherwise load the
agent group and cache it.
- If self.use_diskcache is False: returns `_agent_group` in memory if the instance has attribute
`_agent_group`, otherwise load the agent group and save it in memory.
NOTE: ... | if self.task_group_dict is not None:
return self.task_group_dict
else:
return None | 0 |
406d32075c088333cbd5c1e496ac293b | 77a1e754ac7836e6db88db7d4f8558f0 | Generic property setter. Used to notify subscribers about changed properties. | abstract class AbstractEventSubscriber implements EventSubscriber
protected function setFieldValue(ObjectManager $om, ClassMetadata $metadata, $object, $fieldName, $newValue)
{
if ($object instanceof NotifyPropertyChanged) {
$oldValue = $metadata->getFieldValue($object, $fieldName);
... | 1 |
adaaf0578f355f80b74d7c798265858d | 8d45f71900fc65f5ba90e75080d5672d | 将数据库中查出的列表以指定的 id 作为数组的键名 数组指定列为元素 的一个数组 | function select_format($data = array(), $key1 = 'id', $key2 = '')
{
$result = array();
foreach($data as $value) {
$result[$value[$key1]] = $value[$key2];
}
return $result;
} | 1 |
2dd2e2f5062bf8dd33c5b9b07cff2ebe | e157c4d740eece2d98b0b9c526d9d52f | Force the immediate removal of this tower from the playing field. | export class Unit extends BaseObject implements ISceneObject
public removeSelfFromMap(): void {
this.waitToRemove = true;
} | 0 |
9b9714795522bbebfd4ec25cba558bff | 73731f1f331d7f75b1199e15ad8c280b | Free a previously allocated map.
This frees a givem map @p m and all memory associated with it. You must NOT
free a map returned by evas_object_map_get() as this is internal. | map_free (map_t *m)
{
if (m) {
if (m -> cont.u) {
int n;
for (n = 0; n < m -> hsize; ++n)
switch (m -> mode) {
case MAP_Generic:
if (m -> cont.g[n])
gnode_free_all (m -> cont.g[n]);
break;
case MAP_CaseSensitive:
case MAP_CaseIgnore:
if (m -> cont.n[n])
node_free_all... | 1 |
fc3bde7db99392baeb1f3cc27ecba680 | a9b01a66ad316b460b9b78d227f1b855 | ColorMask specifies whether color components in the framebuffer | public abstract class FrameBuffer extends Creatable implements GLVersioned
public boolean isColor() {
return isColor;
} | 0 |
34ac314adfa51fb15958a9fcf4859ca5 | 1de6e4648a528d1a79d5fd37ba1d4f62 | open the image in the users default photo viewer | {
try
{
Process.Start(CurrentImage);
}
catch (Exception ex)
{
HandleError(ex);
}
} | 1 |
a9ff7caff6c9352398da999dd75954ee | cd8e3da2a79ea193f39f40dfef30aaba | Sets the provincia local service. | public abstract class ValorCuotaLocalServiceBaseImpl
extends BaseLocalServiceImpl implements ValorCuotaLocalService,
IdentifiableBean
public void setCategoriaSubcategoriaLocalService(
CategoriaSubcategoriaLocalService categoriaSubcategoriaLocalService) {
this.categoriaSubcategoriaLocalService = categoriaSubcateg... | 0 |
8803cb121c5131acb1b4d1dc13c01368 | 06c8f1bdadde28c7db22f3249ee5fea9 | Check whether the objects need to be reordered. | boolean result;
result = !(objects.get(a).getStatus() != NONE || objects.get(b).getStatus() != NONE)
&& objects.get(a).getType() != objects.get(b).getType();
if (objects.get(a).getType() == objects.get(b).getType() && !result &&
objects.get(a).getStatus() == NONE ... | 1 |
0d98f056599cea2aafd1bd30d11dd44b | 6e467fd7512556ebfe2646179acc03cc | Parse battle duration from existing replay pickles | global starting_tick, ending_tick
for i, row in combat_logs.iterrows():
rowd = dict(row)
logs.append((rowd['tick'], 'combat', rowd))
if (rowd['event'] == 'game_state') and (rowd['value'] == '4'):
starting_tick = rowd['tick']
if (rowd['event'] == 'game_state') and (row... | 1 |
0224368547064abc36ab7fc2d49880f1 | 6aa8e1c5e9543d57fe7eca175e872a2e | Compute fl(a+b) and err(a+b). | class AnnaResult():
def ErrorAB(a, aerr, b, berr):
e = 0.0
if math.fabs(a) > 1E-12:
e += aerr * aerr / (a * a)
if math.fabs(a) > 1E-12:
e += (berr * berr) / (b * b)
return math.sqrt(e) | 0 |
9094c46c9e471429cd2f0af7c7fdd230 | 912bc3eda4d3dd3a1045bcfacf1dca49 | soke 解除质押 | @FormUrlEncoded
@POST("index.php/Api/shopCenterApi/thawBond")
Observable<String> thawBond(@FieldMap Map<String, Object> map); | 1 |
da739d461af8bd51d21bf7be90440fea | 154d535a416e0d47ba0010f2d75ddcb8 | Return true if the current read or write offset is aligned to the given
quantity. | public void testIsAligned() {
Assert.assertTrue(mem.isAccessAligned(0, 8));
Assert.assertTrue(mem.isAccessAligned(4, 2));
Assert.assertTrue(mem.isAccessAligned(1046, 2));
} | 1 |
ab8f8bc1c518a9350e5404e244daf0fc | 3b35248b77c8d40ba16b816b6eb7d562 | Returns the assigned instructor for the current instance | class CourseInstance extends Event
public function getInstructor() {
return $this->instructor;
} | 1 |
b4183743e9b7fa0d1ae47bf90ee09b62 | 6e51483b3429423f4f19d18f27eda62d | looks for users with valid shells/passwords, checks for SSH login ability,
and populates the database info for the users. | func populateUsers(server *Server, db *sql.DB) (err error) {
stmt, err := db.Prepare("SELECT user_id, name, pw, lastchannel, texture, strftime('%s', last_active) FROM users WHERE server_id=?")
if err != nil {
return
}
rows, err := stmt.Query(server.Id)
if err != nil {
return
}
for rows.Next() {
var (
Us... | 0 |
dadc361edfe71e39f7e97784a3616d37 | 78559189958471811461e5078ccba001 | リストボックスのHTMLを作成し、文字列として返す | class Item_manager
public function set_listbox_string($listbox_name = NULL,$data_array = NULL,$selected = NULL)
{
if(is_null($listbox_name))
{
throw new Exception("Error Processing Request", SYSTEM_ERROR);
}
$CI =& get_instance();
$conf_list = $CI->config->item($listbox_name);
$conf_list['data'] = $data... | 1 |
3de9b4c70e064add79ffe951880b1030 | 752f96c84be9d9db00f57f0a5f57aa89 | Duyet cay theo thu tu giua LNR | void duyetNLR(Node *p)
{
if(p != NULL)
{
cout << p->info << " ";
duyetNLR(p->left);
duyetNLR(p->right);
}
} | 0 |
edeffc7d7e80ab190195335f2fc7b968 | 31b1a9e0cb69026ed6f115b73b42c620 | бонус не может быть больше, чем сила противоположной армии | {
int result = 0;
if (isAttack)
{
if (land.ArmyType == ArmyType.TankWithUnit)
{
result += 1;
}
else if (land.ArmyType == ArmyType.AirPlaneWithUnit)
{
result += 2;
}
}
else
... | 0 |
a79b37a808513b4688b2bf5e5c830417 | 00eb39919db6bf589731342443f4a95a | カウント数をそれぞれの確率欄に反映 | {
CheckCheetCount();
btnPeopleHelp.Enabled = false;
List<int> activAnswers = new List<int>();
foreach (var btn in answerBtns)
if (btn.Enabled) activAnswers.Add(int.Parse(btn.Tag.ToString()));
int[] voteResult = GetProbability(activAnswe... | 1 |
d7a6e807af7d4656f9d801e53e6f2c93 | f727907cb5a76fa10d35cbb2b3d1d444 | Cast Icarus Dive. | {
var player = PlayerPed;
if (!player.IsInVehicle()) return;
var playerVec = player.CurrentVehicle;
if (!playerVec.IsSafeExist()) return;
Game.Player.CanControlRagdoll = true;
player.CanRagdoll = true;
player.ClearTasksImmediate... | 1 |
e246c566e27642009b3410fb71923146 | e207eae1fffc071051722c780c527b4f | Update status of the given volume to the new status. This internally updates statuses of all bricks of the volume
as well. | class LunrVolume(LunrAPI):
def update_status(self, volume_id, status):
return self.http_post('/volumes/%s' % volume_id,
params={'status': status}) | 1 |
106e2fb4147c1db60263e3c806b56b54 | e650d0ed0364326668257ca5b9dc53ff | Enables the pass button | public final class LandSelectionController implements ILandSelection
@FXML
void onPassButton(ActionEvent event) {
listener.passButton();
} | 0 |
3d952d83f8e852abc8ac7c70f16c1a22 | a7a64abe1128ec293b2747dfd16dcc4a | void setMaxLineWidth(float maxLineWidth) | public void setLineWidth(float lineWidth); | 0 |
804ba9a9880ce14895d116cca0c4f4b1 | 091bf04b7082568a499e740afd03db8d | 根据jobname 获得job详细信息 | HashMap<String, Object> map = new HashMap<String, Object>();
map.put("jobId", jobId);
map.put("nodeId", nodeId);
return super.get(map);
} | 0 |
25e8f99832b4be7e7ef8a805592a680f | 535cecc90d6cbf66f7b8c4b1e817c4db | Метод возвращает сумму всех элементов массива больше заданного | namespace Massiv
class Methods
public static double SumPosElem(double[] a)
{
double sum = 0;
for (int i = 0; i < a.Length; i++)
{
if (a[i] > 0)
{
sum += a[i];
}
}
return sum;
... | 0 |
1d4c5f970725a5af793954129e38de33 | 5a8126b2e86e4daa308c337f33eea4ac | Returns an array of required fields. | class Requirement
public function getRequirements()
{
return $this->requiredFields;
} | 1 |
7109c40cd7c2ff2f035842b1129b484c | 05911e853d683343e3c8df4f6dbd5cb4 | Возвращает число различающихся символов. Не проверяет размерность. Не генерирует исключений. | namespace Utility.Images
public class SimilarImage
public static int CalcSimilarDegree(string a, string b)
{
if (a.Length != b.Length)
throw new ArgumentException();
var count = 0;
for (var i = 0; i < a.Length; i++)
{
if (a[i] !... | 0 |
746ed29f70293a0e689be695a524041b | 28e785e49f97586d9941dafdbf499cf8 | 一维数组转换为二位数组 | foreach($arr as $k=>$val){
foreach($val as $k => $v){
$arr_tow[] = $v;
}
}
return $arr_tow;
} | 0 |
4555e39fec31b68cc03c0e4704e07011 | aa20ccd07c849ee8671a12df4207fca2 | 获得一个redis对象.单例模式. | class Redis
public static function get()
{
if (isset(self::$_instance)) {
return self::$_instance;
}
return self::$_instance = new \Predis\Client(array(
"host" => $_GET["redisHost"] ?: "127.0.0.1",
"port" => 6379,
"database" => null
... | 1 |
84f0045ba1fdf105dad8b35c10527010 | dbc436945c3de472c6c0ee414346d58f | Create a new `AWS::Route53RecoveryReadiness::ReadinessCheck`. | namespace Amazon.Route53RecoveryReadiness
GetReadinessCheckStatusResponse GetReadinessCheckStatus(GetReadinessCheckStatusRequest request); | 0 |
e77941e719cdcaa513132d57b38d4582 | f5fa26e3b3950770efbded4a22d3c950 | Configures the task to be repeated in the specified recurring period. | void schedule(Date startTime, Date endTime, int repeatCount, long repeatInterval, String group); | 1 |
511a2884b7bb48e92cea5e8444821b57 | 50e5fe84cb496307f0e4e397a9dc28b6 | Cancel staking request | return new Promise((resolve, reject) => {
this.exoToken.updateStakeBalance(this.web3Service.checkTransactionStatus(
resolve, reject, 'UpdateStakeBalanceFailed'
));
});
} | 0 |
c4a84310eb0d80ce7628c353c658946b | 41a8c87aa9d3ed9caf2f9fc93b028dd0 | 能否飞碰 | if (game.getCurrentOutMajiang() == null) {
return false;
}
int currentOutMjCode = game.getCurrentOutMajiang().getCode();
List<Integer> mjBottomCodeArray = user.getUserMajiangList().stream().filter(majiang -> !majiang.isJin() && !majiang.isAnGang() && !majiang.isShow()).map(Ma... | 1 |
f713fc9aaed82df8c199a6d815c67598 | f4569eab54ba7316fae7ac49172801a9 | 获取(某天的)所有活动场地 | limit:number):ng.IHttpPromise<IEntityActivityLocationOrganization> {
let url = this._getOrganizationActivityUrl('locations');
return this.$http.get(url, {
params: {
time_range: daysRange,
limit: limit
}
... | 1 |
167525acc990d0ec7b4601d51c5dd3ab | 9773c3a00d638ee18d8d588fd8115b0f | 获取预留手机号 | function get_phone(){
var url="http://qiba.codesfrom.com:18000/yhapi.ashx?Action=getPhone&token="+token+"&i_id=1013"
var resposed = http.get(url)
var re = resposed.body.string()
toastLog(re)
if(resposed.statusCode ==200){
var arr=re.split("|");
if(arr[0]=="OK"){
return {n... | 1 |
e231b4d077bade862509e5b3376af00b | 31c8f77f3bb822dae44e7049182c42c0 | 주어진 boardSeq에 해당하는 게시글 정보를 조회하는 메서드 | public ResponseEntity<?> getBoard(@PathVariable("seqNo") int seqNo) {
BoardPost findSeqNo = boardPostService.findOne(seqNo);
if(findSeqNo == null) {
return new ResponseEntity("no seqNo found", HttpStatus.NOT_FOUND);
}
return new ResponseEntity<BoardPost>(findSeqNo, HttpSt... | 1 |
0fa3adb3603f48727c00057dae08fa99 | 81eae990a0e9bf64f84271f40c7adf55 | #LIBERAR LUGAR EN LA TABLA COCHERA ---------------------------------------------------------------------------------------------------------- | $pisos = Piso::BuscarPiso();
foreach($pisos as $piso)
{
$lugaresOcupados = $piso->LugaresReservadosOcupados();
if($piso->cantidadReservados == 0)
return false;
while($piso->cantidadReservados > count($lugaresOcupados... | 0 |
8856922bc64212e614e234cc16407e42 | aa881d547afde2c44e40df6f9db6fe7f | 把一个批次的标签编号都变成字符串 | output = []
for x in batch:
output.append(list(map(lambda v: vocab.index2word(int(v)), x)))
return output | 1 |
b3f06829bbe792381fc27460446e90e8 | b61eba5ab067c289dcad6d6237e0172b | Sets the module to the given API Mode | public function setModule($moduleName); | 0 |
91345170820430630be970477c75065f | ec24b721b0ca6b39de55e16f5f4e6060 | Get all currently occupied slots. | vector<vector<string>> Board::getSlots() const {
return slots;
} | 0 |
eb757aa398764157c2368244e3c811a1 | 10424443966b845b3a01867cdd7f5d1e | Redux action creator to clear the authentication token | if (action.type === "redux-token-auth/SIGNOUT_REQUEST_SENT")
return initialState;
return appReducer(state, action);
} | 0 |
a3972b69cb50bf37ee3a4fb777284341 | 18710d6957cd9e509aefb0c18d58ee00 | method that is used to determine if atleast 1 of 2 strings is empty | public class AlbumViewController extends Controller
private boolean oneEmpty(String s1, String s2) {
return s1.equals("") || s2.equals("");
} | 1 |
4e59cef56d3a847d1fca7c80e9878adf | a751f6f2a41c1e0a41baf3481a72fd68 | Lấy danh sách phim sắp chiếu | namespace MovieAPI.Controllers
[Filters.AuthorizeFilter]
public class MovieController : ApiController
[Route("api/Movie/New")]
[AllowAnonymous]
public IHttpActionResult GetNewMovie()
{
IEnumerable<Movie> list = dc.Movie.OrderByDescending(c => c.ReleaseTime);
retur... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.