query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
0d3887cb67c46d5abdb9f093e5f6d780 | fe136af908d6b60768da99d424a00ca2 | Returns a string that represents the current object. Includes a TrackingId for end to end correlation. | {
StringBuilder retVal = new StringBuilder();
retVal.Append(m_CallID);
retVal.Append(ParametersToString());
return retVal.ToString();
} | 1 |
abe9c3a547d3746de0695fef73947fce | 1b09541fec0ce37a2d61c57b0c6f6809 | iterator over edges of graph | class Graph(object):
def __iter__(self):
return iter(self._adj) | 0 |
987be944c838660089de22a388c2b5dc | fbb59898198db0a8fa4593d9db2bfe78 | Zustand für Zeilenkommentar | {
if(!iCurrentScriptLine.Length())
return ETrue;
TLex lex(iCurrentScriptLine);
TPtrC token(lex.NextToken());
if (!token.Length())
return ETrue;
TInt firstChar = iCurrentScriptLine[0];
if(firstChar == '/')
{
TInt findRunTestStep;
TInt findRunPanicStep;
TInt findRunScript;
TInt findRunProgram;
TInt... | 1 |
cfc87b2377fd0dcdb5c862686d36b42b | 6b99d471c293e1147e3b3a9540327c1f | In auto mode (no config) flattens partitions, produces 1 output table. | protected DataTableSpec[] configure(final DataTableSpec[] inSpecs) throws InvalidSettingsException {
return new DataTableSpec[] { inSpecs[0] };
} | 1 |
689b35bcdbc831128805c3e0e5f20dec | 7cea09aad31b50b5bfd0650be5dda9b9 | Main function that sends workload requests and processes responses. | def main(endpoint, parallel_processes, total_requests):
payload = load_json_file(os.path.join('data', 'sample_payloads', 'sample_payload1.json'))
_get_response_time = partial(get_response_time, endpoint=endpoint, payload=payload)
with mp.Pool(processes=parallel_processes) as pool:
result = pool.map(... | 1 |
58c093e9506f5861d1f90fe6422efa72 | db8e01a7d9450417d3cee3b2b3e2dcc8 | 137. 只出现一次的数字 II
每个数字都出现了 3 次,只有一个数字出现了 1 次,
找出这个数字。同样要求时间复杂度为 O(n),空间复杂度为 O(1)
面试题 | if (numbers == null || numbers.length == 0) {
return -1;
}
int res = numbers[0];
for (int i = 1; i < numbers.length; i++) {
res ^= i;
res ^= numbers[i];
}
return res;
} | 0 |
51e3a9cc1aa3e359c8465853ebe2b475 | 1548c2d87f2e538c7a446488616753d5 | Check that we can put profiling calls around a region containing
a CodeBlock. | unsigned int i;
unsigned long timestamp;
uint32_t timestamp_lo;
uint32_t timestamp_hi;
uint32_t started;
uint32_t stopped;
uint32_t discard_d;
for ( i = 0 ; i < PROFILE_COUNT ; i++ ) {
profile_start ( &p2r_profiler );
__asm__ __volatile__ ( REAL_CODE ( "rdtsc\n\t" )
: "=a" ( timestamp_lo ),
... | 1 |
1a319a9fec43613e64591811fbc177d7 | e591810cd5fbc7d34c71346145e91f33 | Validates the Min constraint of '<em>Hw Irq Id T</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | public class XmcValidator extends EObjectValidator
public boolean validateHwIrqIdT_Min(BigInteger hwIrqIdT, DiagnosticChain diagnostics, Map<Object, Object> context) {
boolean result = hwIrqIdT.compareTo(HW_IRQ_ID_T__MIN__VALUE) >= 0;
if (!result && diagnostics != null)
reportMinViolation(XmcPackage.Literals.HW_... | 1 |
e5ec9ef54ec590579388e0493776a553 | 89b348f0884a7c921614b1b015e1862c | Accessor to the polynomial chaos result.
Returns | class Chebtech(Smoothfun):
def coeffs(self):
return self._coeffs | 1 |
74ca87846a543d3df745aaff6a17ae33 | 93073070946f473b7c9d814cfefcfb82 | Draw a graph where we can see species evolution | folder = [i.strip() for i in FOLDER.strip().split('\n')]
fig = plt.figure()
gs = gridspec.GridSpec(4,5)
gs.update(wspace=0.50, hspace=0.50)
for i in folder[2:3]:
os.chdir(i)
for j in range(20):
ax = fig.add_subplot(gs[j])
os.chdir("r%02d"%j)
data =... | 0 |
e748d4d776324f0f85c67a74631ef948 | 49250db8533aed286c7e4f84b42b54fa | Gets the IDs of the entities that are dependent on the given entity. | {
return (from type in entityType.Assembly.DefinedTypes.Select(x => x.AsType())
from p in type.GetProperties()
let att = p.GetCustomAttribute<CacheDependentAttribute>()
where att != null && att.DependentType.IsAssignableFrom(entityType)
... | 0 |
620eab34fe7258b3711103cf721da4be | d797da212e93bc1d224ae464f9b25182 | Returns the hash code value for this <code>PageFlowDefinition</code>. | namespace MOBOT.BHL.DataObjects
[Serializable]
public abstract class __Page : CustomObjectBase, ICloneable, IComparable, IDisposable, ISetValues
public override int GetHashCode()
{
return base.GetHashCode();
} | 0 |
87e2678c961a4ca296853c5b0de8361b | 23a03af2ebbc78df51a992a45ebd3ae2 | リストビューのアイテムクリック時の動作。 | namespace 同人誌管理 public partial class top : Form
private void listView_DoubleClick(object sender, EventArgs e) {
var update = new update();
update.currentIndex = listView.SelectedItems[0].Index;
Array.Resize(ref update.resultArray, listView.Items.Count);
for (int cnt =... | 0 |
4b3be1f29d23874261cb271e87da1d81 | ebf3a6a663c218b1bed52e8a18ab4bba | # Visual Correlation (the fuller the circle, the stronger the relationship) | corr=cor(df[,num_cols])
corrgram(df[,num_cols],order = F,upper.panel = panel.pie,text.panel = panel.txt,main='Correlation Plot')
} | 1 |
61609125f45e3a8812846b19a539f560 | 534846a960e393c4cfc829170ee770ab | 根据订单商品获取退款金额
<p>计算公式:(父订单运费 - 父订单优惠运费)* 该商品运费在父订单运费中占的比例,减去平均优惠金额</p> | @Repository
public class OrderRefundDao
public double getCanRefundProductAmount(int order_id, int[] return_status) {
Map map = new HashMap();
map.put("order_id", order_id);
map.put("return_status", return_status);
return CommonUtil.safeToDouble(sqlMapClient.queryForObject(NAMESPACE + "getCanRefundProductAmount"... | 0 |
c9eeeaa5c86a995905fa17f438ccec02 | b1b7b445292a3c32b27343b1986b75b6 | Test the status start date without history. | class AgentDetailTest(unittest.TestCase):
def test_AgentDetail_baseApi_status_25(self):
agentId = self.GetAgentId()
data = {'id': agentId,
'take': 100,
'skip': 0,
'query': {}
}
response_data = self.agentDetail.loadHistory(data)
... | 0 |
d1a85a792e775bfd003bf75dfafd0040 | 15fd0c542882069405baab66d692a3d7 | 根据角色的权限来设置目录显示 | var authoritylist = ReadCookie("authoritylist");
if (authoritylist == "all") {
return;
}
var funrights = authoritylist.split(",");
var flag;
var j1 = ["数据概览"];
if (funrights.indexOf(j1[0]) < 0) {
document.getElementById('datastatistics').style.display = 'none';
}
var j2 = ["会员列表"];
if (funrights.indexOf(j... | 1 |
3f37730bdf37178c5eefed0a18bd2d7b | c489ec84e0692929fd8ab14d568e79cf | 获取标签下的品牌应用 | function get_linked_tags($tag_data) {
$app_list = uc_call("uc_app_ls");
if ($app_list == '') {
return '';
}
foreach ($app_list as $app_key => $app_data) {
if ($app_data['appid'] == UC_APPID) {
unset($app_list[$app_key]);
continue;
}
$get_tag_array[... | 1 |
2d1ed057b7744c145a52d5d7b03fb51c | 663e297eff1299658cf9f0da236288b5 | Checks if the node represents a empty statement block. | switch (blockStatementNode.getType()) {
case NodeTypes.REPEAT:
case NodeTypes.FOR:
case NodeTypes.Program_root:
return true;
}
if (symbol.getScope().getRootBlock() == this)
return true;
return false;
} | 0 |
aa555e3ad3475874993c8646b156724d | 106d2aa97ff5db4b587e21d23c551b13 | GetPlayerStorageValue gets a player storage value by the given key | player := getPlayerObject(L)
key := L.Get(2)
if key.Type() != lua.LTNumber {
L.ArgError(1, "Invalid key type. Expected number")
return 0
}
storage, err := player.GetStorageValue(L.ToInt(2))
if err != nil {
L.RaiseError("Unable to get player storage value (%s) %v", key, err)
return 0
}
L.Push(StructToTab... | 1 |
3035b46842ddfb976686451620c07312 | b641216de344f325d301e81960207d62 | 格式化无小数的number | function formatNumberNormal2(num) {
return formatNumberNormal(num, 2);
} | 0 |
f4460c50e5f1d01b6ebe9a5bc53e4ca6 | 06dde694719f4917acc56ee50f021d3f | Returns a collection of wrappers that have an Entity with the specified GroupId. | public function findAllByGroup($gid); | 1 |
5af1970b4711c60bf179659087d1b760 | 0ddf878588145f96a659be2b61b2718e | Liefert die IDs aller Portale in der DB, die mit einer analysierbaren Portalsoftware betrieben werden. | @NotNull
PortalType getAllowedPortals(); | 0 |
3eb397408b2736f97b0877c639b7a9d5 | 01c8e596663ca81a42936c5590a2ab7b | Convert a metadata dict (key/value) to the flat interleaved list format required
by our ANVL formatter. | li = self.nestlists(li)
li = self.zipformat(li, header_list=self.vcf_meta.header)
li = self.split_ref_alt(li)
li = self.generate_vaf(li)
return li | 0 |
d79fd904faff7193ea56594693a1348c | 50e67e0c4a5c7e3489ac1ca84875874f | Method to initialize Sensor Sound | SoundSensor::SoundSensor() {} | 0 |
f450ebb18173e31dcad7b5af74301cf2 | 2720f25cac1da51f1240a570006444d1 | 返回相册数 | function album_get_count($condition){
return M('album')->where($condition)->count();
} | 1 |
160c74dcb998866800f6adf0844002c3 | bb67d7e416c3fff5d17e11e7dadfcf0d | lista apenas as consultas de um determinado usuário | class PesquisarCliente(ListView):
def get_queryset(self):
self.object_list = Clientes.objects.filter(user = self.request.user)
return self.object_list | 1 |
ec7f1ee79ec4ec6cc5e3fe9e4f590e71 | 9d12599520d5945586aa2d82eeb9d754 | Decode a certificate in PEM format to X509 data structure | def load_der_x509_certificate(data):
return _x509.load_der_x509_certificate(data) | 0 |
05fbc65ac612dbb86ad645a694d04c5e | 47eee9586a5411837d11a403e06c7087 | Find a transition from a choice pseudo state | {
ht_link_t *item;
trans_key_t key = {
.input = input,
.old_state = state
};
item = hash_table_find(&p->trans, &key);
if (item == NULL) return NULL;
return hash_table_get_inst(item, gsp_trans_t, link);
} | 1 |
c82111687eb21b4c643cd6e3218cda78 | 1b81688fa281b1ab240d2aaadf139d98 | Setup 'shout' configuration by setting attributes on the object.
'shout' is a pylibshout.Shout object. | self.config = {
'influxdb': {
'host': 'foo',
'port': 1234,
'dbname': 'foobar',
'user': 'bar',
'password': 'barfoo'
}
} | 0 |
94e5c61c0abb449eef611fda9155afe4 | a9dabed00f3e453da3f1da0d84ef7dd6 | Test endpoint returns all required fields | class EndPointsTestCase(unittest.TestCase):
def test_alloders_endpoint(self):
req = self.app.get('/api/v1/orders', headers={'x-access-token':self.token})
self.assertEqual(req.status_code, 200) | 0 |
cfe638c974c6c6737b6116bff0b2ad54 | 74ce035a3a8d2e308a6555b8519301c9 | Returns the modified user of this dm test n01 request. | class NinjaRequestDriver
public function getUser() {
return $this->User;
} | 0 |
2dbacbb7e8eab4981abaaa0ed6d7c8a5 | 9f51a72325f6206dd828b4e5c5678362 | Returns only collections owned by the current user. | {
$permissionChecker = new PermissionChecker();
$additional_expr = Array('eq', 'i.owner', ':owner');
$additional_param = Array(
'owner'=>$owner->getId()
);
return $permissionChecker->queryItems($this, $user, 'collection', $additional_expr, $additional_param);
... | 1 |
b1d8237f452a9ede7863dce6cacfe335 | 8504e696bd08ae9c3066ae9691d6346d | Returns true if this webdav resource represents an existing repository item. | public boolean isDropboxResource(String resourceId); | 0 |
57e5871eb3c601acf07c0a8a8f223f56 | 29bdd8be6d8d9bb3f1732fd2b5379d20 | for autocomplete | class PagesController
def autocomplete_sn
render :partial => 'autocomplete', :object => Scientificname.find(:all, :conditions => ['name ILIKE ?', params[:sn] + '%' ])
end | 1 |
fb9512daa9f0c6b9173120b1283a4ed9 | dc4fe5c2ac1e294718dc2f1808c0ec07 | Function for making file inside the folder and filling content of it with code | class Processing(Meta.meta,FileSystem.filesystem):
def File_Create(self, filename, text=""):
with io.open(os.path.join(self.path, self.BUILDFOLDER)+filename, 'w', encoding="utf-8") as f:
f.write(text) | 1 |
ce631816f828f201ce6fa11f98317f2e | 1ede807ed62e91799ccbd55faa1fe524 | print comma delimited list of exon intervals | {
fprintf(f, "%u", el->bin);
fputc(sep,f);
if (sep == ',') fputc('"',f);
fprintf(f, "%s", el->chrom);
if (sep == ',') fputc('"',f);
fputc(sep,f);
fprintf(f, "%u", el->chromStart);
fputc(sep,f);
fprintf(f, "%u", el->chromEnd);
fputc(sep,f);
if (sep == ',') fputc('"',f);
fprintf(f, "%s", el->name);
if (sep == ',') fputc(... | 1 |
764c82fd1c633265ec7d37554ebf0fc4 | 1b1bb177c6cbc758b3ae674c86883058 | Metodo que gera a segunda parte do formulário (segundo menu) | class medical_registryModelRegistry_Management extends JModelItem{
public function getDataControlPanelSecondLevel($data, $key, $admin = false){
$prefix = str_replace(' ', '_', $key);
$ModelItemSchedule = &$this->getInstance('medical_registryModelSchedule'); ... | 1 |
7ddb60c7083ff1a8c75d1734ebe30a88 | 6e5cb992112908fdff93e821f5eef3e6 | time since start of file, time as unix time | namespace MarkovTools
double TimeTools::timeSinceStart() {
return (TimeTools::getEpochTime() - startTime);
} | 1 |
fc3f4454713fba919b0d2b6ed2e6c9cd | eb7aae8ef0996df2894227fb794c1204 | 重写实例对象的构造(初始化)方法,并调用父类构造方法,实现对实例属性的赋值 | class ElectricCar(Car): # 在ElectricCar类中,我们添加了一个名为self.battery的属性,让Python创建一个新的Battery实例(由于没有指定尺寸,因此默认值是70),
def __init__(self, make, model, year):
super().__init__(make, model, year)
self.battery = Battery() | 1 |
52941560eb508c7f7e9db76d50b3f622 | 3217e622c6da6a4541f55c947bf5a3fc | 根据openId查询所有提现记录 | @RestController
@RequestMapping("/api/orders/")
public class WXOrdersController
@GetMapping("findByOpenId")
public Map<String, Object> findByOpenId(String sessionKey) {
return ordersService.findByOpenId(sessionKey);
} | 0 |
6d47a96fad1f5f789204c19381a0ab48 | 7f7a060ff5f43a8085b1ce0f754e86cd | check if input is between 1 and 9, inclusive | {
return int.TryParse(integerInput, out int integerOutput) && ((integerOutput >= 1) && (integerOutput <= 100));
} | 0 |
301bcd82bc813dace192b53b2da0f15e | faa4ae9293a30ea08f712247fa4cd677 | Borra un ejercicio existente.
Si el borrado se ha realizado con exito, el navegador redireccionará a la
página índice de los ejercicios del usuario. | {
$exercise->delete();
return redirect('/exercises')->with('success','El ejercicio ha sido eliminado correctamente');
} | 1 |
f204487fc5e5653f1749b1bc8b72b734 | b85d033445287bfaa2f51c5db6fc18b7 | Handle button click event to enable/disable nbextension | chrome.extension.onRequest.addListener(
(request, sender, sendResponse)=> {
var enable = this.urlMap[request.url];
sendResponse({enable:enable})
});
} | 0 |
4cbe0f00fe0c43e28d59d1b20c8678d5 | 3b893a62e700ba495dd9221d742b67ed | Essentially a no-op. Takes a sequence of Level objects and returns it unchanged. | void restore_level() {
} | 0 |
2f0a58419c8337265943d5d5151de8ee | 60c3f768eff7c9122da86abc87138e6c | 上传工牌公共方法 | class Management extends Controller
public function uploadBillboard(Request $request)
{
if ($request->isPost()) {
$img = $request->file('img');
return uploadImg($img, 'market', 'billboard');
}
return config('PARAMS_ERROR');
} | 0 |
e92820518370df484314bbf655ff34f8 | d95bdfeadb48c5a3c8197affa0b95150 | This method iterates through the app UUIDs of a physical backup to
identify which one contains Notes. It does it this way to ensure that all
files were correctly pulled. It returns the String representing the UUID or
nil if not appropriate. | class AppIdentifierGuesser
def ios_app_identifier(args)
return FastlaneCore::IOSAppIdentifierGuesser.guess_app_identifier(args)
rescue
nil
end | 0 |
01ca80b164709b4fd0b9e428cdbb2de4 | 07d167f864b8ce7dc96ba3fcf2437d1e | 根据采购申请单号获取采购清单列表 | List<BizImportApply> getListingApplyList(int listingInfoId); | 0 |
f7fc7a5127f9ae8491adb5736bb12491 | 34de3f3a1076f1de5aa09a66446251c8 | compare([{bitset} or {positions}],[{bitset} or {positions}] [,"stddev"])
compare({bitset},{bitset}[,"SMARTS"|"SMILES"],smilesString [,"stddev"])
returns matrix4f for rotation/translation or stddev
compare({bitset},{bitset},"ISOMER") 12.1.5
compare({bitset},{bitset},smartsString, "BONDS") 13.1.17
compare({bitset},{bits... | class BisWebMatrix extends BisWebDataObject{
compareWithOther(other,method="maxabs",threshold=0.01) {
let out = {
testresult : false,
value : null,
metric : "maxabs"
};
if (other.constructor.name !== this.constructor.name) {
console.log('different... | 0 |
c65ee8a7a08c1a839113cf368e7126c8 | f0a8a4ab377b36a4afbd3bd86aec8aeb | Map the words from one dictionary to another. | def remap_dict(d, map):
out = {}
for new_key, key in six.iteritems(map):
out[new_key] = d[key]
return out | 1 |
5d503800f15e343e84ff2762e72e09a9 | 7c941a2fb7877e627c72a02e232a603c | Get the most popular artists on Last.fm. | class LastFM(DataProvider):
def _query(self, params):
params.update({'format': 'json',
'api_key': LASTFM_API_KEY})
result = self._request_json('http://ws.audioscrobbler.com/2.0/',
params)
if 'error' in result:
self.log.debug(... | 0 |
2405382ef6db53cef50196bc59c70409 | 511ed4c0a05a49a6b4cbce8bd91041ea | Returns the number of rows in database that match the given crawling url. | return jdbcManager.getCountBySql(
"SELECT * FROM webuser.feed_m WHERE url = ?", url);
} | 1 |
b5e55180385c8957bf1901ff12e6b54a | 8c1182493ad6b1a439818b3d8fd39511 | Calculates win probability. This function is used internally in the CR calculation. | class EloCalculator
public caluclateWinProbability(playerElo: number, opponentElo: number): Promise<Probabilities> {
const determineDiff = (): number => opponentElo - playerElo
const determineProbability = (elo: number): number => 1 / (1 + elo)
return Promise.resolve()
.then(determineDiff)
.then... | 1 |
9473d80cd5005b78e18e84ad0ae3b17d | 91e54450b432eac2a51da085247e9f5f | Caches the user account in the entity cache if it is enabled. | namespace MvcFront.Interfaces
bool Save(UserAccount entity); | 0 |
b963bb8b1a3e26470e941c2278b9a5f8 | 053b34baf50ba85c17c1868ff013eb26 | Blur Background | var container = $('#container');
var width = container.width();
var height = container.height();
var ctx = canvas.getContext('2d');
var imageData = ctx.getImageData(0, 0, width, height);
var img = StackBlur.imageDataRGBA(imageData, 0, 0, width, height, 16);
var data = img.data;
var value = 0.7;
for (v... | 1 |
e8e3fe9f4d75ce87f0a37d30eee13350 | 2080130bebda1a03ed69a6bde2bde158 | Check puppet_object method called with no session param | class TestLearningProxyManager(object):
def test_get_objective_bank_admin_session(self):
if self.svc_mgr.supports_objective_bank_admin():
self.svc_mgr.get_objective_bank_admin_session(PROXY)
with pytest.raises(errors.NullArgument):
self.svc_mgr.get_objective_bank_admin_session() | 0 |
5bb91bcaaa81c64d3af43073f93a6e30 | f951beeb4d9137ff0b9646c8054bf3b0 | Este método recibe un archivo y lo envía al servicio web de CrearAnexo asociado al número de radicado que se recibe. | @Stateless(name = "ClcManuales")
@Local( { ClcManualesService.class })
@TransactionManagement(TransactionManagementType.CONTAINER)
@TransactionAttribute(value = TransactionAttributeType.SUPPORTS)
public class ClcManualesBean extends AbstractBean implements ClcManualesService
public void createClcManualesArchivo(ClcManu... | 0 |
d311a5af24ac986d71b1f81e61409375 | 597c6ea16b19852e82b5d4bb16f01a72 | Loads all TrustPayments payment methods. | namespace BusinessLogic
public class PaymentMethodHandler : BaseCategoryHandler
public override List<BaseCategory> LoadAll()
{
return (new PaymentMethodAccess()).LoadAll();
} | 0 |
894750e1d370ea60fc45c2dae699cbc8 | a195464af8c330fc771c0a97acd39447 | Funcion que recibe un numero de serie y verifica que no exista ningun CPU con ese numero de serie (retorna true si no hay ninguno y false si si existe) | {
bool retorno = false;
try
{
command = new SqlCommand();
connection = new SqlConnection(connectionString);
command.Connection = connection;
command.CommandType = CommandType.Text;
command.Command... | 0 |
38bd9f0f5d69b4f4a5c2b6abb5068c2d | d81c7a3f06f4816f1ecbf6111b1cddd3 | Unsets the "addressOnFile" element | public function unsetFile ($name = ""); | 0 |
d26de2480766b73a1d8c556416aca007 | cb74afc9bcfd9e4f4d837e26d3df16a3 | Requests a live photo representation of the asset. With PHImageRequestOptionsDeliveryModeOpportunistic (or if no
options are specified), the resultHandler block may be called more than once (the first call may occur before the
method returns). The PHImageResultIsDegradedKey key in the result handler's info parameter in... | namespace SharpKit.PhoneGap
public class Capture
public void captureImage(CaptureCB captureSuccess, CaptureErrorCB captureError) { } | 0 |
b02f340ec3513fbc62edf6e5758b6c79 | 7f904a01038576283833c6d997a6fe8e | Botón que abre la pestaña para agregar nuevo cliente | this.dialog.open(EditorComponent, {
data: {
item: null,
new: true,
type: 'clients',
}
});
} | 1 |
60a82a4d49e665e3108f75ec9ffcd4ea | e7819f72e9f43595a43a86d0e72ddc58 | Get Number Of Coupons To Be Redeemed | class Coupon extends CoreLocalizableEntity
public function getCountRedeemed() {
return $this->count_redeemed;
} | 0 |
ed01a2a4937cc6cb6a1c50ee42b1b709 | 523070c840b769b7bac64a85b627dd06 | Create a DID Document out of an ed25519 keypair. | async def create_public_did(
aries_controller: AriesAgentControllerBase = Depends(yoma_agent),
):
return await create_pub_did(aries_controller) | 0 |
3d9d44f67213ff8197f3471ccfb41629 | 3b8df8f69e2502d0e79028c9e5404299 | 1 -> 오 | int prec(char op) {
switch (op) {
case '(': case ')':
return 0;
case '+': case '-':
return 1;
case '*': case '/':
return 2;
}
printf("오류\n");
return -1;
} | 0 |
1ab951ed08b0b1c99a0836ba0ac4c801 | 973ec6d3ee509772ad7a32c30b89fdd9 | 获取最小购买数量 | @Table("st_stock")
public class Stock extends IdEntity{
public float getNumberMin() {
return numberMin;
} | 1 |
f3a58551ae307e2ac06aff46b789fc24 | ca9779f4d8fa9d90cd5f09d82262c304 | Executes the given transition on the current object and stores the given
comment as an explanation of the transaction.
valid for the current state of this object. | function apply(Transition $transition, Number $issue); | 0 |
51ef67d9e5d3e0659db3bf79bdfed8a8 | 1b4569f9cab8afe2bf59120a045b4e6a | Returns the number of teams in the division | public class BowlingLeague implements Serializable{
public int getNumTeams() {
return numTeams;
} | 1 |
84a152d01b592d517d483c0937fa385b | 1e7d2056229b76e2bfe4192d927fd74e | writes the html doc header, takes the title for the page as a parameter | $this->page.= <<<EOD
<html>
<head>
</head>
<title>
$this->title
</title>
<body>
<h1 align="center">
$this->title
</h1>
EOD;
} | 1 |
3fb796f64383f02862faf26ae3ad1fdd | ff0752cd9f479e41d40eb8efaf400b5a | 获取所有group下所有consumer的消息消费信息 | @Service
public class ConsumerService
public Map<String, ConsumerRunningInfo> getConsumerRunningInfo(Cluster cluster, String consumerGroup) {
return mqAdminTemplate.execute(new MQAdminCallback<Map<String, ConsumerRunningInfo>>() {
public Map<String, ConsumerRunningInfo> callback(MQAdminExt mqAdmin) ... | 1 |
8f79422e5f95c32e3dfea036e4446661 | e231471e877101958f707e246a234c53 | 이전 게시글 번호를 조회한다. | @Service
public class BoardDAO
public int selectBoardNext(int no) {
return sqlSession.selectOne("Board.selectBoardNext", no);
} | 0 |
82709bf517cbb7bdd6e9f8cecd89a174 | 50ed0f25fa752735f8ca3b6661db36de | Set the difficulty of the world to Insane and start the game | class MainMenuGUI
private void setDifficultyToHard () {
gameLogic.resetGame(Difficulty.HARD);
startGame();
} | 0 |
04f25d17b15f4d01ff39c0da3801184c | a5d44f547e2a6598300b7669705cba44 | \brief Set callback to be called when the transmitted address was NACK'ed. | {
I2C_HandleTypeDef* hi2c = ( I2C_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent;
hi2c->Instance->CR2 |= I2C_CR2_NACK;
hi2c->XferCount = 0;
hi2c->State = HAL_I2C_STATE_READY;
hi2c->ErrorCode |= HAL_I2C_ERROR_DMA;
HAL_I2C_ErrorCallback(hi2c);
} | 0 |
2580b0a8907f662e56a83e13b48bb2fc | 254038254adc904b2ea406fd02d6ce64 | Get the length of the transfer (over all ranges). | class USBTransfer(object):
def getActualLength(self):
return self._USBTransfer__transfer.contents.actual_length | 1 |
6d753e9e662641842389e5a369b5eb8e | ab5686797886e002b1119e8fd4cb70ed | 審査を行います。失敗した時は即時に例外を発生させます。 | namespace Testing.Specificity2.Objects
public abstract class ContractVerifier
public void Verify()
{
var exceptions = this.Tests
.Select(RunTest)
.Where(test => test != null)
.ToArray();
if (exceptions.Length > 0)
{
... | 0 |
ec9704298eb2b88ecd76381a0ee4fd74 | b28d94f1b244dbe44e9a78d740f4557c | @brief The function is a callback about HID Data events | {
uint8 locReqHandle = 0u;
uint8 locServIndex;
CYBLE_HIDS_CHAR_INDEX_T locCharIndex;
if((NULL != CyBle_HidsApplCallback) && (CYBLE_GATT_INVALID_ATTR_HANDLE_VALUE != cyBle_hidscReqHandle))
{
for(locServIndex = 0u; (locServIndex < CYBLE_HIDSC_SERVICE_COUNT) && (locReqHandle == 0u); locServInde... | 1 |
7a99d831e5bbfb8a1859997cc7643b3f | 38d3ffc877bccff2620d8fd635a1348d | Gets the last line of the address.
Most likely this is the city, region, and postal code. | class T_Geo_Address extends T_Geo_Point
function getLineTwo($filter=null)
{
return _transform($this->line_two,$filter);
} | 0 |
7b8a9f1c5e8e71fee5a55c55690674a2 | 15ea93bc4ee019cd2629fa6c1f9fd061 | RPS game outcome evaluation | def rps(p1, p2)
outcome = {
'rock' => 'scissors',
'paper' => 'rock',
'scissors' => 'paper'
}
return 'Draw!' if p1 == p2
if outcome[p1] == p2
return 'Player 1 Win!'
else
return 'Player 2 Win!'
end
end | 1 |
7ecc62ff9610980e5cda8c30de3ecffc | 6451b17479ce718ebf1e26c0e2e9fbb0 | Метод, возвращающий список уникальных имен личностей | public class MapExamples
public static Set<String> mapPersonNamesFromPeopleList(List<Person> people) {
Set<String> personNames = people.stream()
.map(Person::getName)
.collect(Collectors.toSet());
return personNames;
} | 1 |
62f1f7079ec459f5e09266aced8e77b5 | 30c75bfd12f560cdcf8d0cecefb6540e | 获取kafka管理客户端 | AdminClient adminClient(){
Properties properties = new Properties();
properties.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG,"192.168.1.221:9092,192.168.1.222:9092,192.168.1.223:9092");
return AdminClient.create(properties);
} | 1 |
469184ebdf689e62a3a46a3b06be5030 | 8a6df885400a537c3f02f68d5ba0da29 | 清除当前webview访问的历史记录 | public class WebViewActivity extends BaseCommonActivity implements UserXieYiContract, ContentContract.View, ProductDetailContract.View, CarconfigureContract.View
@Override
protected void onDestroy() {
if (web_view != null) {
web_view.loadDataWithBaseURL(null, "", "text/html", "utf-8", null);
... | 1 |
f3f0cdd59ac5eae1e567fc9ba262b7da | 88d758f1e5513fe20aed9f7d07356feb | This writes a string to the console | void writeConsole(char* msg) {
int i;
for (i = 0; consoleText[i] != '\0'; ++i);
strcpy(consoleText+i,msg);
} | 0 |
2d055eae2619c9d5ae6a14275bef134a | de93e5683b494dafdf8aead87b3a7738 | Set Whether to promote the read-only instance to the master instance forcibly. Valid values: | public class OpenGaussInstanceRequest
public Boolean getEnableForceSwitch() {
return enableForceSwitch;
} | 0 |
36cb492dc5f6cca34f602b6f211da97a | 19f8225744b5608a90204e0c569fdc59 | Method used to terminate the disk health monitoring service. | public void shutdownMonitor() throws RemoteException; | 1 |
b2705b51fc0423d3c6bc24b0971c9ac3 | 129b8af479233db42761a238d2348719 | 申請日設定時の確認処理を行う。<br> | ContractReVO cntVO = saveVO.getContractReVO();
Date contDt = cntVO.getContractDt();
SimpleDateFormat simpleformat = new SimpleDateFormat("yyyy-MM-dd");
Date toDay = simpleformat.parse(DateUtil.getDate("yyyy-MM-dd"));
if( StringUtils.isEmpty(cntVO.getDlrCd()) ){
throw ... | 1 |
8f1384aea92d86718bd963b417280e28 | e86138c9ac993e860dccb58ce6e6332a | 设计并生成标准插件结构 | public Map generate( PluginModel pm, String generationSchemeName )
{
HashMap map = new HashMap( );
String strPluginName = pm.getPluginNameAsPackage( );
Collection<Application> listApplication = pm.getApplications( );
for ( Application application : listApplication )
{
... | 1 |
2585eb8e3ec7d270527ce1da2deea2ce | 12823b9b91d15d052b2dbbbce4c72e44 | Testing wrong type for size: list | parameterList1 = [1, 2, 3]
parameterList2 = [1, 2]
self.assertRaises(bxdexceptions.IncorrectSizeException, Interpolation.linearInterpolation, \
parameterList1, parameterList2, 2) | 0 |
eca0ba92395ea31940bf4b29d3abb10e | 8834ca5c9cfd99f969336a7a63f5e4bc | 배달원이 대기 중이면 주어진 주소로 배달을 보내고 아니면 설명 메시지를 출력함. | if(day == "월요일" || day == "수요일" || day == "금요일" ) {
System.out.printf("오늘 %s(은)는 분리수거하는날입니다! %n", day);
System.out.printf("'일반쓰레기', '음식물쓰레기'는 '14'시 이후, '재활용쓰레기'는 '18'시 이후에 수거합니다.%n");
System.out.println("감사합니다");
System.out.println("========");
boolean result = true;
return result;
} else {
Sys... | 0 |
7899f5b5fa8a9fe3d20d44d44a18acc0 | 1abf848e393187db59d9b60ee4465ad5 | {ISE_EXCEPTION_MANAGER}.is_code_ignored | EIF_TYPED_VALUE F1056_9137 (EIF_REFERENCE Current)
{
GTCX
char *l_feature_name = "ev_ignore";
RTEX;
EIF_REFERENCE Result = ((EIF_REFERENCE) 0);
RTSN;
RTDA;
RTLD;
RTLI(2);
RTLR(0,Result);
RTLR(1,Current);
RTLIU(2);
RTLU (SK_REF, &Result);
RTLU (SK_REF, &Current);
RTEAA(l_feature_name, 1055, Current, 0, 0, ... | 0 |
75e16e1075ea45c7bd3505ca9fc88b0d | eb5ef42bc87709c179b05ca681bdad6a | INT 3 | static inline void rst_30() { PUSH_REG16(R_PC); R_PC = 0x30; } | 0 |
16618cab4dc3b3fe49d1b0e84fdeed9a | c688780256c1b7f93dd70ad19e2510d5 | ajax 图表数据处理 | if request.is_ajax():
ret = {"status": False, "html": ""}
search = request.POST.get('search')
action_time = request.POST.get('action_time')
end_time = request.POST.get('end_time')
count = 0
q = Q()
q.connector = "or"
if search:
q.children.a... | 0 |
fa6b37ef389d158f561650f7700416a3 | d836ca2c9d8d141613af47e77c73374b | Checks that the total weight of the baggages does not exceed the maximum (max 100 here). | class UnitTest
@Test
void cargoCanNotExceedMaxWeightLimit () {
Unit unit = new Unit(new Coordinates(0,0), 10, 10);
Cargo beerCrate = new Cargo("Beer crate", 12);
assertThrows(IllegalStateException.class, () -> unit.loadCargo(beerCrate));
} | 0 |
502b34883ac180d900c2d519a6d9c26a | 6edc18cf8f33363a5137e815a5022ad1 | 设置股票账户成交信息 | class TdApi:
def onRspSettlementInfoConfirm(self, data, error, n, last):
downLogProgram('账号:{}, 日期:{}, 时间:{}'.format(data.getInvestorID(), data.getConfirmDate(), data.getConfirmTime())) | 0 |
38ddd7ba7fa8b2587c5e7860fed081b9 | ba0d3b152e3119bd43aece948cd127b2 | TestSuccess方法用於記錄測試成功結果 | public class CustomLogging implements ITestListener
@Override
public void onTestSuccess(ITestResult result) {
ReportData data = new ReportData();
ITestContext tc = result.getTestContext();
data.setSuit(tc.getSuite().getName());
data.setUrl(prop.getProperty("url"));
data.setBrowser(prop.getProperty("browser")... | 1 |
2a4a135c88fcb73734dccbf610ecd39c | bfbb0fc0c4b11f9f39e25ff82adba2a3 | 处理请求
这里我们使用模板方法以确认每个子类都不会忘记调用successor
此外,返回的布尔值表明请求是否被处理 | if request > 10 and request <= 20:
print '(request:%s) %s handled' % (request, self.__class__.__name__)
else:
self.successor.handle(request) | 0 |
0b0478152e8fd0fcb8ea2e7f61e60822 | a1c3971691084e079534f048c5a87be9 | get a new mission from the mission queue | {
bool find = false;
foreach (var mission in missions)
{
if (!mission.isComplete && !mission.isActive && !skipedMissions.Contains(mission))
{
find = true;
mission.isActive = true;
currM.NextMission = mission;
... | 1 |
c7125ab3d9c4386ba843127f1bd801ea | 98d4d541d3fb8b524b510a1e2081c365 | Calculates step length satisfying Armijo conditions
rejecting directions that are not feasible | alpha = alpha_0
x_new = x + alpha*p_k
compare_domain = b - A.dot(x_new)
while np.any(compare_domain <= 0):
alpha = p * alpha
x_new = x + alpha*p_k
compare_domain = b - A.dot(x_new)
compare_armijo = obj_fn(A,b,c,x) + c_1 * alpha * np.dot(grad_fn(A,b,c,x).transpose(),p_k)
... | 1 |
1b127eead5bc8bb752c9ac1f2f0bbecf | 9f8a59874a8b2b35159e032deaf7b324 | Move the current step down one. | function PlannerCtrl($rootScope, $timeout, PlannerService)
function nextStep() {
$.fn.pagepiling.moveSectionDown();
ctrl.stepPos++;
} | 1 |
4dc78355572ee654779be8022741ecbf | e2f2b5bd04be72782f9d35d304116c21 | Train environemnt model which includes:
1. observation transition model.
2. reward model
(These two share all weights except output layer.) | class customActorCritic(nn.Module):
def __init__(self, obs_env, act_env, resize_dim=(64, 64, 1)
, hidden_sizes=[8,8,8] , hidden_kernel=[3,3,3]
, hidden_stride=[1,1,1], hidden_padding=[0,0,0]):
super().__init__()
obs_dim, act_dim = get_IO_dim((obs_env, act_env))
... | 0 |
45646cb2f80b78bd096bb466a4645ec9 | 567921623d901ef31d71cdb2ba6324ac | 获取当日支付详情 | @Service("payv2PayOrderService")
public class Payv2PayOrderServiceImpl extends BaseServiceImpl<Payv2PayOrder, Payv2PayOrderMapper> implements Payv2PayOrderService
public List<Payv2PayOrder> getDayOrderInfoByPayId(Map<String, Object> map) {
return payv2PayOrderMapper.getDayOrderInfoByPayId(map);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.