query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
cc5e1461e56ff5d316f6a8aa9870d8b7 | 2f6bd363534ea6d623e27c885cf73579 | Gets all post meta and flattens it out a bit | class EB_Blueprint
function get_all_postmeta( $post_id ) {
global $wpdb;
if( empty( $post_id ) OR !is_numeric( $post_id ) ) {
return false;
}
$postmeta = array();
$data = $wpdb->get_results( "SELECT * FROM $wpdb->postmeta WHERE post_id = $post_id " );
foreach( $data as $meta ) {
$postmeta[$meta->meta_... | 1 |
fa3e91233ff89481f240a31425c9dcb6 | bf7805abaeb3df8eb52c0fa743a5f80d | Returns a structure describing the manifest files contributing to the module's merged manifest. | interface AndroidModuleSystem: ClassFileFinder, SampleDataDirectoryProvider, ModuleHierarchyProvider
@JvmDefault
fun getMergedManifestContributors(): MergedManifestContributors = defaultGetMergedManifestContributors() | 1 |
e6fbcebfde6bf33bb3c4b77e7a343ca1 | 41cf276ca24b2c61f9be18a66504b704 | Return the path as a dot-separated string. | class Path extends AbstractSegment implements PathInterface
public function get()
{
$res = array();
foreach (array_values($this->data) as $value) {
$res[] = rawurlencode($value);
}
if (! $res) {
return null;
}
return implode($this->delimiter, $... | 0 |
de46a513b6c42aaa219ffae436bbd709 | d044dc04ea6a4362c1be7aecfb451142 | choices are every registered Model | class VerificationModel(KIMObject):
def subjects(self):
return (model for model in Model.all() ) | 1 |
7eee5150433312d59a778716a2bd9e34 | 43419589d767136103b9068131470b90 | Handles the OnBeforeAction event of the ObjectManager control. | {
if (!String.IsNullOrEmpty(_className) && ObjectId > 0)
{
BusinessObject bo = MetaObjectActivator.CreateInstance<BusinessObject>(MetaDataWrapper.ResolveMetaClassByNameOrCardName(_className), ObjectId);
txtName.InnerHtml = String.Format("<div style='padding:2px;'><span style='float:left;'>{0}</span><spa... | 0 |
08687cda451a63cf69b708540c5ef99f | c2f6a6b57d12d037d089325969c3ffa4 | (a, b) / (c, d) = ((a*c + b*d), (b*c - a*d))/(c*c + d*d) | public class Complex
public Complex divide(Complex c) {
return mult(c.conj()).divide(c.mag2);
} | 1 |
bf037a5546c244ed8e0ab9f81af9c06d | 3bd2b5ae77d71a3b03446da793979a20 | 获取正在下载的信息 | Set<DownInfo> downInfos = mProgressSubscriberHashMap.keySet();
Iterator<DownInfo> iterator = downInfos.iterator();
while (iterator.hasNext()) {
DownInfo next = iterator.next();
if (next.getUrl().equals(url)) {
return next;
}
}
r... | 1 |
33f5d3bbb8740f2cdbe7757fcd0bd86b | eb99f7e9f8f8fe2c04a6f53c1181053f | 获取用户日程,每次10条 | return Fetch('/core/v1/jour/page', {
pageNum: 1,
pageSize: 10,
type: '1',
userId: await getUserId(),
...params,
});
} | 1 |
5d6d0a899ea40befacdb720ca80f13d6 | a72ab8f047bc0d7cecae498fa63a6e0d | 设置学号与姓名 | function set_info() {
var name = $.cookie('name');
var className = $.cookie('className');
var studyid = $.cookie('studyid');
var idty = $.cookie('idty');
$('#stu_id').text(studyid);
$('#stu_name').text(name);
$('#stu_name2').text(name);
$('#stu_class').text(className);
$("#identity").text(idty);
} | 1 |
69e19dc9088b04a83e06f2b02436c54e | e723c2bac479e8c2fd90ad9c7223c433 | 根据名称在企查查里面搜索信息 | def searchName(name='长虹电器股份有限公司',headers=None):
now = int(time.time()*1000L)
url = """http://www.creditchina.gov.cn/credit_info_search?t=%d"""%now
data={
'keyword':'%s'%name,
'searchtype':'0',
'objectType':'2',
'areas':'',
'creditType':'',
'dataType':'1',
'areaCode':'',
'... | 0 |
fa125a6bab6129697aeadcc020ec87f7 | f8f77fb5656f326ad613e3800b821939 | Test saving the same credentials twice. | hass: HomeAssistant, legacy_data
) -> None:
manager = await auth_manager_from_config(hass, [{"type": "homeassistant"}], [])
provider = manager.auth_providers[0]
provider.data = legacy_data
credentials1 = await provider.async_get_or_create_credentials({"username": "hello"})
with patch.object(prov... | 1 |
49a1a9aa268a1d8d2720e095671e0e3c | 7f6e018b7cf56332b17429b6d778bc41 | 给定各资产比例,计算收益率均值 | def calc_portfolio_return(e, w):
er= e * w.T
return er[0,0] | 1 |
f98b697ca26fb581118db6db66d8f2ae | 249bf6e1270b7d330bde0feff8bdebe9 | 最近傍点を探索 | {
var srcNode = GetPoint(srcIndex);
if (srcNode == null)
{
return -1;
}
HashSet<int> nearIndices = new HashSet<int>();
Dictionary<int, bool> searchGrids = new Dictionary<int, bool>();
searchGrids[srcNode.GridIndex] = false;
int i = srcNode.... | 1 |
509e02b8c3a29d41fa4692ab7db9465d | 15fd9dd6336f01d4fb5bfaa04f4f1a71 | Generates a language tag from the specified subtags. | function generateLocale(parts, sep = '_') {
const {
language,
territory,
script,
variant,
} = parts;
if (typeof language !== 'string') {
throw new Error('"language" key must be provided');
}
return [ language, script, territory, variant ].filter((x) => (x)).join(sep);
} | 1 |
dbc967e75a048adc001a891b4efeed95 | cae1dc7448dcc82fee8f8914307e8cc7 | Retrieves node description from the passed node. | namespace HexMaps
class ConnectionNode
public string getDescription()
{
return this.description;
} | 1 |
2fd2a27cda4636b45b200f84aa643add | 82086ac17739c10de665c3b3a6c7bfdc | Test a tree given a list of Instance objects, and keep track of the
missclassification counts | @Override
protected double[] totalConfusionValues(Instances instances,
TreeIndividual individual) {
Node root = individual.getRootNode();
double[] fnArray = new double[instances.numClasses()];
Enumeration<Instance> eInstances = instances.enumerateInstances();
while (eInstances.hasMoreElements()) {
Insta... | 1 |
8d1c00cadf65c8e1f23385e4157c1d20 | 45f3353ea0b728c1d49c1ef275ac3184 | Initialize ops-arpmgrd cli node. | self.cache = AuthCache()
self.api_calls = {
'rpd.domain.tld': 'authenticate_device',
'domain.tld': 'authenticate_user'}
self.cmd = collections.OrderedDict()
self.cmd['OK'] = self._ok
self.cmd['USER-EXISTS'] = self._user_exists
self.cmd['CHECK-PASSW... | 0 |
5c25c7bbda34fa60b8c0040932ef8894 | 8957366531368cadc216e0fcc28d0d9e | Fetches the second-to-last state in the path | {
if (count($this->states) <= 1) {
throw new AncestorStateUnavailableException('Parent state unavailable');
}
return $this->states[count($this->states) - 2];
} | 1 |
3083b146812f711e3edf811b65a70e0a | 45d09c82722e682b5dc18b1e9a79e63c | 从Base64编码的证书文件中提取公钥 | try (FileInputStream inputStream = new FileInputStream(file)) {
return getPublicKeyFromCertificate(inputStream);
}
} | 0 |
674a3ad85cf433fb3651b0ac929ee7b0 | 635a5221145a4fecb7c562f142d6edc9 | Считает коэффициент сжатия. | double medium = 0;
for (Statistic s : statisticsCompressLZSS){
medium += s.getVel();
}
if(statisticsCompressLZSS.size() == 0) return 0;
else return medium/statisticsCompressLZSS.size();
} | 0 |
152a83e2d969becff991c50a7ac25dd2 | a4eb6a1a20b727a8df2f062a990aed00 | @brief Schedule the processes using Non-preemptive Highest Priority First | {
PROCESS* p;
int greatest_ticks=0;
while(!greatest_ticks)
{
for(p=proc_table;p<proc_table+NR_TASKS;p++)
{
if(p->ticks > greatest_ticks)
{
greatest_ticks = p->ticks;
p_proc_ready=p;
}
}
if(! greatest_tick... | 0 |
69954c95eb2060c4e3068cb052eae627 | 1f123471b1427a03a20b3787f481681d | Search Button Event Handler | public partial class OutlookAddIn_Search : System.Web.UI.Page
protected void btnSearch_Click(object sender, EventArgs e)
{
pnlSearch.Visible = false;
pnlSearchResult.Visible = true;
BindGrid(1, 10);
} | 1 |
fbdd2163440ca9116e9dd6c305a0383c | 792ff8b87cbeb5228a7e705b3c17e3fb | ******************ADXL345计算倾斜角度************ | {
AccelAngle[0] = (float) (atan2(accRaw[1],accRaw[2])+M_PI)*RAD_TO_DEG;
AccelAngle[1] = (float) (atan2(accRaw[2],accRaw[0])+M_PI)*RAD_TO_DEG;
AccelAngle[2] = (float) (atan2(accRaw[1],accRaw[0])+M_PI)*RAD_TO_DEG;
} | 1 |
0a3aa910967bf675dc8ae83d55ddae08 | 90dea03503798fed9f60808d7a6a0751 | Initialize connection to Shopify. | {
try
{
$credential = new Slince\Shopify\PrivateAppCredential(env('SHOPIFY_API_KEY'), env('SHOPIFY_PASSWORD'), env('SHOPIFY_SHARED_SECRET'));
$this->client = new Slince\Shopify\Client($credential, env('SHOPIFY_STORE_NAME'), ['metaCacheDir' => './tmp']);
} catch (\Exce... | 1 |
6a3b2eca87892d025b70e77aeb211acb | e7572ddfff3bbc57db8adc02c0a83222 | dissallow user to interact with the activity while attempting to connect the raspberry | public class ConnectionFragment extends Fragment
public void setConnectionProgressState() {
mInProgressFlag = true;
mHostCompleteText.setEnabled(false);
mPortCompleteText.setEnabled(false);
mFabConnect.setShowProgressBackground(true);
mFabConnect.setIndeterminate(true);
m... | 1 |
548ba75207fd1c906b3abae8b87ef31e | 0b26d411e85d8e125dff5bb1f4754c54 | Check if the player has a crossbow equipped. | function HasWandEquipped() end | 0 |
8b410d0b3525cf651409da8da1da2d43 | 30d272dc24bbd5b42397c28c2b0ed34c | 复制数据库到手机指定文件夹下 | File dbFile = context.getDatabasePath(MAIN_DB_NAME);
if (dbFile == null) {
Log.e(TAG, MAIN_DB_NAME + "is null !");
return;
}
File srcDir = dbFile.getParentFile();
if (!srcDir.exists()) {
ToastUtils.showShort("待拷贝文件夹不存在");
}
Stri... | 1 |
d42c9e21710e05c4eab7826ffe77e34d | 3f9ebf2c772469c1d959f7aac2d524d8 | @brief 获得装甲板中心点 | {
BBox box = Bound();
Vec3 center = (box.GetMin() + box.GetMax()).Scale(0.5);
return center;
} | 1 |
ec015885859c028a7e94a1a2e34eb7fc | 59a66b71bb6d28415bcce273db87d734 | 向上移动飞机 | class OurPlane(pygame.sprite.Sprite):
def move_up(self):
if self.rect.top > 0:
self.rect.top -= self.speed
else :
self.rect.top = 0 | 1 |
f3ef7477e277681eb1708efad12f6c52 | 5701c3ca459bd7bc8379c70c0d50b20a | Gets the default compressed file info. | return array(
'file_id' => 0,
'folder_id' => 0,
'file_date' => '0000-00-00 00:00:00',
'path' => '',
'hash' => '',
'mime_type' => '',
'modified' => 0,
'width' => 0,
'height' => 0,
'origina... | 0 |
9e7e9b29924d6bd0261fcdb050e0fa31 | 6ac296f80812e311f1a6596c76a37fb1 | REGISTRO DE LOS PAGOS DE LOS JARDINES | try{
$pdo = AccesoDB::getCon();
$sql_reg_mod = "INSERT INTO `mod_lab`
(
`cot_mod_lab`,
`ntrab_mod_lab`,
`cargas_mod_lab`,
... | 0 |
85e4aac0300e43749d972d3a8117cbf2 | e22e25336afca8b0694e769afc6a7c22 | Writes the array of <see cref="String"/> to the <see cref="Stream"/>
using specified <see cref="Encoding"/>. | namespace SlimPK2.IO.Stream
internal class StreamWorker : IDisposable
public void WriteUnicodeArray(object[] values, int index, int count)
{
lock (_lock)
{
for (var i = index; i < (index + count); i++)
WriteUnicode(values[i].ToString());
... | 0 |
968c133984f61e1e7488aec34d6588f3 | b9e576dd3df8325552b1fa10c8cc97fc | ============================== Functions =============================== | PYBIND11_MODULE(sun_utils_cpp, m) {
m.doc() = "Sun utilities";
m.def("sun_position", &sun_position, "A function which returns the sun position");
m.def("sat_sun_vect", &sat_sun_vect, "Returns the unit vector to the Sun from the satellite position in the inertial frame");
} | 1 |
00a645c741ddb1e000b23b3d0054a132 | c508cea5903b4b6dae1204de1235350a | 如果有必要,在创建holder时就去创建ItemView的点击事件 | public class TweetsAdapter extends RecyclerView.Adapter<TweetsAdapter.TweetViewHolder>
private void initItemHolderListener(final TweetViewHolder holder, final Tweet tweetInfo, int position) {
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(Vi... | 1 |
a542fb9385cc2d73f5ced22b383a108d | 50a48c243c552dfb0e40a4f083292d6d | Create a new PHPMailer instance | class PhpMail
public function __construct() {
} | 0 |
92d29ac6052e484d12a4bf9caeb3e1a4 | bcf3dcb7cc8a1f18a1ec2def6365ac59 | 请求查询玩家的道具数目 | function PkController:request_buyCount()
print("request_buyCount")
local msg = mc.packetData:createWritePacket(DefineProto.PROTO_WAR_BUY)
mc.NetMannager:getInstance():sendMsg(msg)
end | 0 |
52543bedab700ba6545b8e501370aae6 | e1777aba969f32ee26805c68dc706f22 | 获取重连间隔时长 | if (reconnectTimes > 10 && reconnectTimes <= 20) {
return 1L;
}
if (reconnectTimes > 5 && reconnectTimes <= 10) {
return 100L * 3L;
}
if (reconnectTimes > 0 && reconnectTimes <= 5) {
return 1000L * 1L;
}
return MAX_INTERVAL;
... | 1 |
0e5e68157738fde7d023b3fc76336de3 | f3ddfa528cc76ff6c3548b700c2d090c | @brief 線の種類込みで,プロットしたいベクターデータを加える
(例) with lp lt 7 lw 2
\note
リアルタイムプロットを行いたい場合はこの関数は使用できません. | void AddDataLine (const char* Format, ...)
{
va_list ap;
va_start (ap, Format);
CHECK (CS != 0);
DS_AddVLine (GetDataSeg(), Format, ap);
va_end (ap);
} | 0 |
e65f42f36d5fad471883b8f6d71a4198 | bef21895a076027151d2366c0260707e | Recebe uma string de data no formato yyyy-mm-dd e retorna no formato dd/mm/yyyy | var time = new Date(date);
var saida = time.getDate() +"/"+ time.getMonth() + "/" + time.getFullYear();
return saida;
} | 0 |
0f29a021376436436482951b5c2a8586 | cd14da5a4b4574db8ca3ddc1d78c1f29 | Writes the exception to the JDBC log stream. | public class GSLogger
public void writeException(Exception e) {
if (IdentiFrog.LOGGING){
try {
cal.getTime();
System.err.println(ExceptionUtils.getStackTrace(e));
fw.write(sdf.format(cal.getTime()));
fw.write(ExceptionUtils.getStackTrace(e));
fw.write(System.getProperty("line.separator"));
... | 0 |
1a29b23fb370dadb18d602bcf2b93d5c | 22c0b59d62fcf2ff08e239541ef80688 | Is called when the value "Show logo" changes | {
ToolStripMenuItem clickeditem = (ToolStripMenuItem)sender;
int logocolorcode = (int)clickeditem.Tag;
_ledManager.SetLogoWmi(logocolorcode);
_utility.SaveLastLogo(logocolorcode);
_utility.SaveLogoRGBonORoff(false);
} | 0 |
a1d4ee6b290cd68452f3659b62233ce2 | 0f5aa6bb44c2ba571e2d3284156fd8e2 | Adiciona zeros a frente de um numero para deixa-los com
exatamente 3 caracteres. Por exemplo, 1 vira 001, 10 vira 010 e
100 continua como 100. | contador += 1
valor_formatado = "0000"
case contador.to_s.length
when 1
valor_formatado = "0000" + contador.to_s
when 2
valor_formatado = "000" + contador.to_s
when 3
valor_formatado = "00" + contador.to_s
when 4
valor_formatado = "0" + contador.to_s
else
va... | 0 |
c3d79d0cbc98674565a41ffba90c0841 | 3a223c55c243ca6a280b671aa541fb24 | сохраняет настройки доступа вики-страницы. | public long SaveAccess(long pageId, long groupId, long? userId = null, AccessPages view = AccessPages.All, AccessPages edit = AccessPages.Leaders)
{
var parameters = new VkParameters
{
{ "page_id", pageId },
{ "group_id", groupId },
{ "user_id", userId },
{ "view", view },
{ "edit", edit }... | 1 |
df3197732ccac61cc7aa97b646509bac | 17451316b6f4ca02eb09a24a69ac992e | Ensure the summary page has the reasoning data it needs | data = get_data_from_response(api_client.get(get_hearing_detail_url(default_hearing.id)))
assert 'sections' in data
first_section = data['sections'][0]
check_entity_images(first_section) | 0 |
749944333131ecb4b2cabef9cb38c4e2 | a485beb67e6487b369199f527018787c | Sets the value of :py:attr:`maxBins`. | class BinnedCountLogHandler(SutekhCountLogHandler):
def set_tot_bins(self, iBins):
self.fTotBins = float(iBins) | 0 |
4c5aea3a99b0cedd443eebb3305493f7 | 8b22b0d3f395bf9b9fd6b54828bca8ed | 人员排序上移 | void moveup(int id, String name); | 1 |
d5b57f289b55a5ee1d1c73b8d10b7fcf | 7d5eb4e918792d39bacff18b1da0250d | Rárajzolja a képre a felhasználó fotóját. | if(this.layout1 != null){
User tempUser = new User();
String pathFromUser = tempUser.getPicturePath(uname);
File temp = new File(pathFromUser);
boolean exists = temp.exists();
if("".equals(pathFromUser) || !exists){
Image image1 = new I... | 1 |
99b09449ae624f98316fdb2c42807ae6 | 294bdbca5c623752cbd173fb043120a9 | Write out an FVCOM-formatted netCDF file based. | self.scripFileName = scripFileName
inFile = netCDF4.Dataset(self.fileName, 'r')
outFile = netCDF4.Dataset(scripFileName, 'w')
latCell = inFile.variables['latCell'][:]
lonCell = inFile.variables['lonCell'][:]
latVertex = inFile.variables['latVertex'][:]
lonVertex =... | 1 |
ee745593dc38e10ebe67704715c2662c | f6e51da3aea71d9ed656a15077a69a73 | --------------------------------------------------------------------------------------------- // Добавление режиссёра | export class FireDB
createDirector(name){
if(name == null || name === ''){return Promise.reject('invalid argument');}
return new Promise((resolve) => {
const directorKey = this.db.ref('director').push().key;
const payload = {};
payload[`director/${directorKey}`] = {na... | 1 |
d9d0ceab2d6e7ba2363a9de0c63fdc15 | dc0cef9bec70eb2db8f9b34e8a210072 | obraca i rysuje szachownice | function obroc_szachownice()
{
strona_rysowanie = 1 - strona_rysowanie;
narysuj();
} | 1 |
70d0470e102a8d2ccb01f505f4d88dbf | d103f690858d27a252b1db2d7d0f26e2 | registers a handler that processes the console input | func RegConsoleCmdHandler() {
utility.HandleFunc("setloglevel", mainlogic.HandCmd_SetLogLevel)
} | 1 |
b2e4b41ef5572f418276f850c595e01a | 1c56a5bc6f837d32bf897103c0ff2ecc | display custom fields content in topic | if( is_our_topic() == 'true' ){
$topic_id = bbp_get_topic_id();
$value1 = get_post_meta( $topic_id, 'bbp_extra_field1', true);
echo 'Field 1: ' . $value1 . '<br>';
$department = get_post_meta( $topic_id, 'department', true);
echo 'Department: ' . $department . '<br>';
}
} | 1 |
a273c4b2bf5d9c097e02ab753e7f6168 | 9d711b47305ae94059bf235f4387ec38 | Get the value of expertise. | public int numExpertises(); | 0 |
f341910e609aa159e741978f9ac6b007 | 57796f46ec157c56eae55cdada1b3c64 | Embrace a 'line' SVG element, creating solvables for its geometry, and taking care of updating the element if
the solvables change. | constructor(attributes: ISVGAttributes, ...addlArgs: any[]) {
super();
if (!attributes) { attributes = {}; }
this._style = new SVGStyle(attributes.svgStyle);
this._attributes = this._setAttributes(attributes, ...addlArgs);
this._createElements(this._attributes... | 0 |
b5f358f1f0a78334712f200ebcfe7052 | 3381693c42c2ade29a9956dfb695d3a5 | Lee una clave del registro y la devuelve | public class VentanaPrincipal extends JFrame
public String leer() {
String cad = "";
try {
cad = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return cad;
} | 0 |
1c02f168bba644b048a2828a11b89290 | 653d156dd46fc32f8f987635780a0deb | The client authentication information used in order to authenticate with the Apache Kafka cluster. | class _ClusterState:
def client_authentication(self) -> Optional[pulumi.Input['ClusterClientAuthenticationArgs']]:
return pulumi.get(self, "client_authentication") | 1 |
88e6a40ddab366cdf1e313ce667658e5 | 3a4a0ed77a9cb4565001652da902650f | Yet another command | Keyboard.set_modifier((uint8_t)MODIFIERKEY_ALT);
Keyboard.set_key1((uint8_t)KEY_F2);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
delay(1500);
SlowType(SomeCommand, 50);
Keyboard.set_key1((uint8_t)KEY_ENTER);
Keyboard.send_now();
Keyboard.set_key1... | 1 |
6a9986e63c1db4b58a8b0e4518f17c45 | aff9d8fba2987600f0a4b63993cf2d71 | フィールド [qName] の値を設定します。 | m_qname = qname;
m_label = (qname == null) ? null : qname.toString();
} | 1 |
12d9051a7fed7f6627efb756fbde758f | d392d5683f1504c0cfa41ff114fb6962 | Create loop index variables and build LoopNest objects for a parfor. | il = self.il
loop_label = il.CreateLabel2()
loop_end_label = il.CreateLabel2()
loop_else_label = il.CreateLabel2()
self.loop_labels.append( (loop_label, loop_end_label) )
return loop_label, loop_end_label, loop_else_label | 0 |
b9832d849a3450e0ad9e01db3514337f | 89d2dc3868a40976ac48c01baa23880a | determines whether all the down answers are compatible with all the across answers | if self.curr_dir == "across":
return all([bool(cell) for cell in self.curr_cell.across_cells])
else:
return all([bool(cell) for cell in self.curr_cell.down_cells]) | 0 |
882919f705a5a71dbd7f605604511fcb | 971b16ba1abae87ae5bb80e082bfb3cd | Get all beverage types | @CrossOrigin(origins = "*")
@Controller
@RestController
public class RESTController
@Async
@RequestMapping(value = "/beveragetypes", method = RequestMethod.GET)
public @ResponseBody String passTypes() {
String ret = dao.getBeverageTypes().toString();
return ret;
} | 1 |
d3a8bbb1d16403e3adb8f683d1957195 | 08861460671502a9a1c185235e2847d4 | It returns whether the price has increased or decreased. It uses market weighted price as a measure of price. | class MarketWatcher:
def __price_change_is_in_range(self):
return self.min_change < abs(self.percent_change) < self.max_change | 0 |
c2bb80bb85bcfd9985193c26255595dd | 65af3364153b85d5a4989321af6d72ce | 判断货币类型是否存在 | namespace Rac.VOne.Web.Api.Controllers
[TypeFilter(typeof(Filters.AuthorizationFilter))]
[Route("api/[controller]/[action]")]
[ApiController]
public class NettingController : ControllerBase
[HttpPost]
public async Task<ActionResult<bool>> ExistCurrency([FromBody] int currencyId, CancellationToke... | 1 |
6c78a0f35d348e73f998c51145f73fbf | 7ee36801ed4684114e34f9456274ac05 | The method to reset the time of the starting frame/tick | namespace DemeterEngine
public class ChronometricObject
public void ResetTime(int initialFrame, double initialTime)
{
LocalFrame = initialFrame;
LocalTime = initialTime;
} | 1 |
2e5069f637f3a9092b45cc91d0956393 | 59158603e67f001f116edef1615dc9ad | Function which gives the align number given a typeid as input | {
int rank = 0;
for(list<chromosome*>::iterator it = katype.begin(); it != katype.end(); it++)
{
if((*it)->getAlias().compare(sAlias) == 0)
{
return rank;
}
else
{
rank++;
}
}
return -1;
} | 0 |
b7ab2202e7ee8935cd01519e2ef70a2a | ebdf4389adae57769c67afb69f796386 | Sets consumeAmount | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"scenariosHeader",
"content"
})
@XmlRootElement(name = "imageScheme")
public class ImageScheme implements java.io.Serializable{ @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"requirementId",
... | 0 |
134172118e3927e64ad029a9a2c26f6c | 128ed5178796228c3297210cac3fcc61 | Pushes an event identifier to a list. | class Observable:
def _add_event_identifier(self, event_identifier):
self.supported_events.add(event_identifier) | 0 |
e871e2b81393306df0d704daee0814fa | fc0c141987fcb0abc561fcbf71443316 | 対象期間TOを設定します。 | public class CropProcurementTargetDto
public void setTargetTo(Date targetTo) {
this.targetTo = targetTo;
} | 1 |
f9468796edc91bc0bfad6ca7aaf29f6e | c7eacc0161d7bbbe9f453b3d17d5b1c7 | Get all of the keys that have associated binary data in the event's binaries map. | @NotNull
Buffer getBinaryReferences() throws IOException; | 0 |
2dbe60719017b792c6c55a5b33f05428 | 38a59403282422473ce2baf03d82c04e | CTC-58: Verify user is able to navigate back to dashboard during Check-in Process | public class AccessibiltyProvisionSteps extends NeoTR_Steps
@Step
public void verifyBackBtnForAccessibilityProvision() {
accessibilityProvisionPage.backBtnNaviVerification();
} | 0 |
80d06304f72314ff65fe41afb9c35bb9 | 262068280cdad8cdebfcf2a36aaf5bb8 | Gets the XML of the provided base id | class File extends Base
public function getBaseXML()
{
return $this->strBaseXml;
} | 0 |
8324d4246f8e732338e338dfb5c9330b | 2096092f6ea10f239eda0e5d4163c372 | POST: Gallery/Create | namespace Web.Areas.Management.Controllers
public class GalleriesController : Controller
public ActionResult Create()
{
return View();
} | 0 |
c16034d1c2bfea14801aa7ec203b64c7 | 21e594d2593df51eccce212abeeebbd7 | @brief 修改配置文件信息 | int n;
if(conf.port < 0 || conf.port >= ZONE_NUMBER){
puts("invalid port.");
return ;
}
for(n=0;n<seczone_settings_.seczone_confs.size();n++){
auto & _ = seczone_settings_.seczone_confs[n];
if(_.port == conf.port){
_.name = conf.name;
_.normalstate = conf.normalstate;
_.nursetime = conf.nursetime;
... | 1 |
ba134fa20f12ebb06345ffc739e9adf1 | 5b3f51d9e85029fe227dca36330d4b10 | Apply Embedding Dropout (dropping entire words) to the
Embedding Matrix and return a new tensor where the
new dropped embedding matrix is applied on the batch | if self.word_dropout > 0 and self.training:
mask = torch.full_like(words, fill_value=self.word_dropout, dtype=torch.float, device=words.device)
mask = torch.bernoulli(mask).eq(1)
pad_mask = words.ne(self._word_pad_index)
mask = mask.__and__(pad_mask)
... | 1 |
45e08e8158db72c2d80ff612af208b18 | 9c6c6f6aea378d7fd8cfde744c1d9118 | rowkey 를 주고 특정범위의 컬럼에 대한 값 찾기 | public List<String> getRow(Object obj, int rank) throws Exception; | 0 |
bbc5c9e1f355d1bb4c370dd7fe6da78b | 5644232e4dc3dc3df095b81069dd6bb7 | 请求回购道具 | this.fuhuo_view:SetActive(false);
local chip_in = {type="gswzsm",tag="rebuy",body=false};
local jsonStr = cjson.encode(chip_in);
this.mono:SendPackage(jsonStr);
end | 1 |
981c691bc1e7ed68851069855e631919 | a4d360840e1a022e4cb61a2aa442cb46 | 播放列表切换为收藏列表 | namespace AdvertManageClient.FunPage
public partial class UC_NewAdvertManage : UserControl
private void btn_PlaylistList_Click(object sender, RoutedEventArgs e)
{
SetUCCollapsed();
uc_Playlist.Visibility = System.Windows.Visibility.Visible;
uc_Playlist.GetData();
... | 0 |
33e9e3726dac446f653e0c2358117e90 | 3bcfc567f609d55416eadb7e08287cd0 | Return a member of the party that is still conscious | List<Individual> list1 = new ArrayList<Individual>();
Iterator<Individual> itr = members.iterator();
while (itr.hasNext()) {
Individual ind = itr.next();
Boolean a = false;
Boolean b = ind.isActive();
if (a == b) {
list1.add(ind);
... | 0 |
a880ffbb01c37afec96c55488e3f49d5 | b357e228d4503cd255abfa6022d757d0 | Get received power in db at this path coordinate | {
double d;
double Pt,Pr,Gt,Gr;
double L;
double lambda;
Pt = tx->nodePhy->nodeWCard->Pt;
Gt = tx->nodePhy->nodeAntenna->Gain_dBi;
Gr = rx->nodePhy->nodeAntenna->Gain_dBi;
L = rx->nodePhy->nodeAntenna->SysLoss;
lambda = WAVESPD/(tx->nodePhy->nodeWCard->freq*MIG);
d = DistComp(tx->nodePhy->n... | 1 |
c6d363ea2258e9e4af284d4db61d900d | 497c71934c575e1d67e8f1e5d908eee5 | D/A変換を出力するための関数 | ISR(ADC_vect) {
PORTD = ADCH;
} | 0 |
0605f18690b0adb9b068677249bd0347 | 4f431a74338d287941e9d625a2adcbb3 | Checks if MarketplaceId property is set. | namespace Amazon.SecurityHub.Model
public partial class Product
internal bool IsSetMarketplaceUrl()
{
return this._marketplaceUrl != null;
} | 0 |
5f13f5524b52ba6496f26aaf58bf2421 | ab5bc73f250ddc81778930e03493ddf7 | Broadcasts the specified packet. | namespace MapleServer2.Servers.Game
public class FieldManager
public void BroadcastPacket(Packet packet, GameSession sender = null)
{
Broadcast(session =>
{
if (session == sender)
{
return;
}
session.... | 1 |
65121d2a3b13f891724192e028358ca7 | 3b2bfc9cb7fad8ade92144b929ce9f2f | <p>
创建用于校验的"键值对"。
</p>
<p>
<strong>备注:每一次调用这个方法,都会重新创建一组"键值对"。</strong>
</p> | final int count = m_count;
ArrayMap clone = new ArrayMap(count);
for (int i = 0; i < count; ++i) {
Object key = m_keys[i];
Object keyClone;
if (key instanceof String) {
keyClone = key;
} else {
keyClone = deepCloneOb... | 1 |
fd7347ac87c1612b568d6e2f96706496 | 1d1f8c33bbdf5096c785578478f241b6 | 初始化DivSpecial | function init4yijian() {
var items = getElementsByAttribute("special", "yijian");
if (items) {
for (var i = 0; i < items.length; i++) {
initYJ(items[i].name, items[i].name + "area");
}
}
} | 0 |
37f20b6bc4277fed6fe21c64a1cf3bfe | d6b6fae503c16dbc0c17ace0a721d296 | Computes softmax loss given the current predictions and the
true labels. | weights = onehot_labels * class_weights
weights = tf.reduce_sum(weights, 3)
loss = tf.losses.softmax_cross_entropy(onehot_labels=onehot_labels, logits=logits, weights=weights)
return loss | 1 |
056233542005ae3616bd9caa3f8cb8a9 | 542a8ac86a8f76f72719a2c409f435ba | A complete list of usage that has occured through an account can be requested via the REST API.
This list includes every feature of TelAPI an account may use, from inbound/outbound call and SMS messages all the way to Carrier/CNAM lookups. | class TelephoneNumbersController
public function listAccountTelephoneNumbers (
$limit = NULL,
$page = NULL,
$pattern = NULL)
{
$queryBuilder = Configuration::$BASEURI;
$queryBuilder = $queryBuilder.'/tns/';
APIHelper::appendUrlWithQueryParamet... | 0 |
2e5c1861d673816822858108a7eb36ff | 03c5af327786179edb72d2f25ed1462b | Executes integer division of two numbers | namespace OOPLabUNIT
public class Lab1
public int DivideIntegers(int numerator, int denominator)
{
return numerator / denominator;
} | 1 |
80d99402e5b8308053bb48cb38a27e96 | 0566d438cd811e36e32979ea786f2517 | We find a random prime number required by the Universal Hashing method | while True:
n = random.randint(0, 1 << halfkeyLength)
if n % 2 != 0:
found = True
print("testing %d" % n)
for i in range(0, 10):
if not primeTest(n):
found = False
break
if found:
... | 1 |
c000d8a9082c661899d9a5d430e578ea | e3006b88ec82d7fe076303006d85fe1c | --- Day 18: Operation Order; Part A --- | [TestCase(3745, PuzzleInput)]
public void Part1(int expectedResult, string input)
{
var registry = new Dictionary<string, int>();
Func<string, int> get = key =>
{
var result = 0;
if (int.TryParse(key, out result))
... | 1 |
8311824ac305628ad19f8e693f2f3784 | f15429b1a93b6ef0a5b9964a81b25b42 | 根据用户的tel查询id,是模糊查询 | @Select("select id from jianli WHERE tel = #{value}")
Integer queryCellPhoneNumber(String tel); | 0 |
44d2e54db94d7552e5b9068274cd0ef9 | 737c9bc30f76c537d289cc0a3fe307a0 | reject an incoming challenge from the given user | namespace TrulySkilled.Web.Hubs
public class GameLobby : Chat
public void RejectChallenge(String username)
{
if (challenges.ContainsKey(username))
{
challenges.Remove(username);
if (usersOnline.ContainsKey(username))
{
... | 1 |
0c2f45e48fb6aeb245c4b2b554505368 | 6c50d3d36c7b8ea4f2ca40afda774f53 | 样例GET获取列表数据 | namespace netsv.Controllers
[Route("api/[controller]")]
public class Sample2Controller : Controller
[HttpGet]
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
} | 1 |
1f375eeb9a0cd01364026139990eafca | dd6db6d35dee32ab760d991bcc11b8d2 | It ouputs the coordinates of the particles at every frame into an .xyz file, so we
can visualize the system using software like VMD | void plotVTK(int iteration) {
outputWriter::VTKWriter writer;
ParticleIterator iterator;
iterator = container.begin();
writer.initializeOutput(container.particles.size());
while (iterator != container.end()) {
Particle& p = *iterator;
writer.plotParticle(p);
++iterator;
}
string out_name("MD1_vtk");
write... | 0 |
3c290f3c81942d462dbd129292552db6 | e3d82adc9f1fba5e62ea3a3c7fcdeb5a | Checks if route meets all constraints (ex. deadlines met, packged_with, max_packages).
Returns boolean of route validity. | class RouteValidator:
def is_valid_route(self, search_input, route):
if not self.__exist_expect_keys(route):
return False
if not self.__check_basic_consistency_of_route(route):
return False
if not self.__check_time_consistency_of_route(route):
return False
... | 1 |
f49881f430e6d56d06da350a861383c2 | d59bc918914f28c8f75bcad76f518a02 | Supply null-op for termcolor.colored | class Stain():
def _no_tty_constant(self, attr):
return "" | 0 |
0ab9d92cb00835ffb6bf753c799c7ed6 | c5daa80fc822702f59c09503490fca68 | 新增需要重新计算的节点 | function AddNode(tag,obj,nameStr){
if(tag==0 || tag==1){
var currentObj = obj.find('div.title');
requestUrl(getNodesInfoUrl,{'path': currentObj.attr('node-path')}, getNodesInfoSuccessCbAdd, reqFailCb, 'GET',
{'Obj': currentObj,'nameStr': nameStr});
}
} | 1 |
67278de7cbd2e4ae605c38efd912bf0a | 8ced6bd9d1835c2f009316a215fa11f4 | ヌル終端文字形式の文字列とみなしたときの長さを返す | namespace sdl namespace sdl { namespace db
size_t to_string::length_text(vector_mem_range_t const & data)
{
constexpr char space = ' ';
const size_t size = mem_size(data);
if (size) {
mem_range_t const * const begin = data.begin();
mem_range_t const * p = data.end();
SDL_ASSERT(begi... | 0 |
a56aca69b72199db4d9523bcaec87c5a | 5d3f260ba34dd8fc425a7cd2ca97778b | 検出されたすべての顔データをkintoneにPOSTする | public async Task<IActionResult> Post()
{
using (var reader = new StreamReader(Request.Body))
{
var body = reader.ReadToEnd();
var deserialized = JsonConvert.DeserializeObject<KakinModel>(body);
deserialized.CreatedAt = DateTime.Now... | 0 |
0b4a41ef62ca253f0228082fe84a05c6 | c647fc855dc1ff4743eb3bcf348f89ae | Función para evaluar la visibilidad de un campo específico. | $devolver=false;
if (isset($this->columns[$param])) {
if(($this->columns[$param]->param==$param) and ($this->columns[$param]->value==1)) { $devolver=true; }
}
return $devolver;
} | 1 |
046990bf145839b1d69049ccaef71a30 | 0a467d3cd9ea92ea8e0943972c084b93 | Called when a value from the stack is stored into a local variable. | val ref = frame.pop() as StackReference
frame.locals[2] = ref
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.