query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
fe3e8e252e7819a215bb3d93690f8bd6 | 201ab0c1258f039cac1e0d0e593ffb08 | METADATA_MASK | class ShortenAudio(WaveContainer, AiffContainer):
def channel_mask(self):
if (not hasattr(self, "__channel_mask__")):
self.__populate_metadata__()
return self.__channel_mask__ | 0 |
b8ef5c8fc4dbaa440309726d637a3101 | 4fd11da04406e1cde52bf92c6f46936f | Wait for an element to appear identified by CSS. | def get_by_css_selector(driver, css_selector, wait_timeout=None):
if wait_timeout is None:
wait_timeout = WAIT_TIMEOUT
return WebDriverWait(driver, wait_timeout).until(
ec.presence_of_element_located(
(By.CSS_SELECTOR, css_selector)
)) | 1 |
d12d74062e7d417da6addb3febc18585 | e537ef6696d1de9a43f798c80da55ce1 | Returns the quantity owned of a specified asset.
:symbol: Symbol of asset | namespace QuantConnect.Securities
public static class SecurityProviderExtensions
public static decimal GetHoldingsQuantity(this ISecurityProvider provider, Symbol symbol)
{
var security = provider.GetSecurity(symbol);
return security == null ? 0 : security.Holdings.Quantity;
... | 1 |
c25073693f43f1370bb422ff1682ab24 | b6f2913882b0aaae2dec50b3cbcf9abb | ## Retrieves a file from synapse to local disk and returns its local path | basename = basename(uri)
if(substr(destination, nchar(destination), nchar(destination)+1) == "/") {
destination <- substr(destination, 1, nchar(destination)-1)
}
filepath = file.path(normalizePath(destination), basename)
res <- document_content(uri, binary=binary)
writeBin(res, filepath)
return(filepa... | 1 |
c068b548ec1affbcd9f0cfdb10e9fbb6 | 9e4f3e66e4973bbbf404e77c36ad6fb0 | r"""Apply the sigmoid function to input.
The **Sigmoid** function is defined as:
.. math:: \text{Sigmoid}(x) = \frac{1}{1 + \exp(-x)} | class h_sigmoid(nn.Module):
def __init__(self, inplace=True):
super(h_sigmoid, self).__init__()
self.relu = nn.ReLU6(inplace=inplace) | 0 |
c0bed77bcc1a3cf977c34bbabac4ca14 | 29864ecf8a9b139a7b7ef16587d8c306 | Returns a string html table with the students, categories and their notes. | class GradesTable:
def __str__(self):
return '\n'.join((str(self.columns),
str(self.students),
str(self.footers))) | 0 |
9be3ee11f2daa5e0d9502cbb5af777aa | 1e01c9a723f02e11a48cffd96908d6c3 | 11.Delete Pending Request(int requestId) | String urlString = Utilities.makeServerUrlString("requests/" + String.valueOf(requestId), m_token);
try {
HttpDelete httpRequest = new HttpDelete(urlString);
new ServerCall(httpRequest, listener, indicator).execute(urlString);
} catch (Exception e) {
Log.e(TAG, "deleteRequest()", e);
}
} | 1 |
772ac9a7a069135de911f8e68671f50c | e1e4e567bbb10a92e963000e6b9cd1cd | Sets the number of hash tables. | old_hash_table = self.hash_table[:]
self.len = newlen
self.hash_table = [set() for _ in range(self.len)]
for chain in old_hash_table:
for hash_number in chain:
self.hash_table[hash_number % self.len].add(hash_number)
print(self.hash_table) | 1 |
13d524f3085a6dbb6e045e2370d85c7f | 4ca2b245e80e81642650f1044ee7887e | Subroutine to compute moment tensor components | {
int index0;
int index1;
int index2;
int index3;
int index4;
int index5;
try
{
index0 = findIndex(Tx);
index1 = findIndex(Ty);
index2 = findIndex(Tz);
index3 = findIndex(Rx);
index4 = findIndex(Ry);
index5 = f... | 1 |
d948727cde72a221041c8cdfa4a871ac | 691d3cce8d8afff8c1f5b0527a2344a3 | Returns partial view script to use for rendering menu. | [OutputCache(Duration = 6)]
public ActionResult Menu()
{
return PartialView();
} | 1 |
58b7ca310e68d9dcbd58f62dd6bcfcc4 | 921594bf2f57151801565d80f9e6a53e | Returns the Locked User message for given username and password | PxException ex = new PxException(innerEx, AuthErrorCodes.UserHasBeenLocked, ErrorPriority.Low, new PxErrorMessageProvider("UserHasBeenLocked"));
return ex;
} | 0 |
e28275c6a7c46efca9b953e67b96d7b4 | b9ebff80259a319a745a31a2798affb7 | 传回容器中最后一个特效实例,不检查这个特效实例是否存在 | namespace EarthView
namespace World
namespace Spatial3D
namespace EffectManager
public class EffectObjectVector : EarthView.World.Core.BaseObject
public EarthView.World.Spatial3D.EffectManager.EffectObject Back()
{
IntPtr __ptr = EarthView_World_Spatial3D_EffectManager_CEffectObjectVector_back_CEff... | 1 |
45eaa55e495ff00cd61c85b0647fc233 | adc686568e3106e4ac887dea5b9134fc | Metodo para ilustrar resultados de calculate() en la UI | {
lblResultado.Text = Operar(txtNumero1.Text, txtNumero2.Text, cmbOperador.Text).ToString();
string[] operadores = { "+", "-", "*", "/" };
cmbOperador.Text = operadores.Contains(cmbOperador.Text) ? cmbOperador.Text : this.cmbOperador.Items[0].ToString();
if (!(txt... | 1 |
dc961548b95dc30a86b1faf63d85ebc3 | a3e5ef55044cec151d1bd0540ff7e317 | Small helper function to calculate cosine or modified cosine score for pair of spectra. | def dotProductSpectra(foundSpectra,b,mz1=-1,mz2=-1,polarity=-1):
if type(foundSpectra) == type(dict()):
mzs = set(foundSpectra.keys()).intersection(set(b.keys()))
num = np.sum([foundSpectra[x]*b[x] for x in mzs])
denom = np.sqrt(np.sum([x**2 for x in foundSpectra.values()])*sum([x**2 for x... | 1 |
c84732c1578bd9d13a79fa82fe686d51 | ea27cf93b30f61374fa709c354f54e3a | Devuelve todas las comidas | class ComidaController extends Controller
public function index()
{
return Comida::get();
} | 1 |
754f32b54d88e4817adeed287f991e23 | a9df45b120017fe2a92709117a3078b9 | 攻击力计算加成值,返回一个数组,这个数组应该是乘算 | class MylifeController extends IndexController
public function get_award($arr,$type){
switch ($type) {
case 1:
$a = 10;
$b = 15;
if (is_array($arr)) {
$arr['str'] = $arr['str']+rand($a,$b);
$arr['agi'] = $arr['ag... | 0 |
30deeb30d865160df8ea7bdae55f7de6 | 7b184be3f5efd7cbc53746a7e7cd7278 | Test optional type value and no value are passed correctly | {
$this->expectException(InvalidArgumentException::class);
new Option('foo', 'f', OptionTypes::OPTIONAL_VALUE | OptionTypes::NO_VALUE, 'Foo argument');
} | 1 |
9adc1cdf7c1a0dbc0bac739eae3db046 | bb0fc48f741d03ac11bf723d8cc8854b | Converts different boolean strings to an integer value | {
if (
(is_string($value) && ($value == '1' || $value == '0'))
||
(is_bool($value))
)
{
$value = (int) $value;
}
elseif (is_string($value) && $value == 'true')
{
$value = 1;
}
elseif (is_string($value) && $value == 'false')
{
$value = 0;
}
if (is_integer($value) && ($value == 1 ... | 1 |
9ee466e00a1e6b0ad4563ad9152d7989 | aacacb6adaa41066c5dbc85bcb2f914c | Renders smtp from field | ?>
<style>
.form-table th {display:none;}
.form-table td{padding:0 10px;}
.form-table input{float:right;margin-right:25px;}
.form-table .submit{text-align:center;}
.form-table .submit input{float:none;}
</style>
<div class="wrap">
<form action="options.php" method="post">
<?php $option_group = 'group_smtp'... | 0 |
ebca60f1a977e1827361672c16a42f0f | 78b616f2421d6f43d86a27d065d85eb6 | Sets the value of the '{@link iso.std.iso.is._13584._32.ed._1.tech.xml.schema.ontoml.APOSTERIORIVIEWOFType#getCorrespondingProperties <em>Corresponding Properties</em>}' containment reference.
<!-- begin-user-doc -->
<!-- end-user-doc --> | public class SyncAnnotationItemProvider
extends EAnnotationItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource,
IInplaceEditorSupport,
IValidator,
IOrderProvider,
IFlowerPropertiesDescri... | 0 |
923ad768382bf03ea4109c7136a1064d | 28173d6ee6315647d631a2366d196af6 | first element = size | class Table
function sizeRC(&$mat) {
return array(count($mat),count(current($mat)));
} | 1 |
64946d0ec46d3e5c3fcf369830a7f79f | 182c249b8b66042d78093219c8b0c42a | 用户输入标签的时候,自动下拉提示 | namespace ImageAddTags
public partial class UserTagParts : UserControl
private void labAddTag_MouseEnter(object sender, MouseEventArgs e)
{
menuPop1.IsOpen = true;
} | 0 |
8239d5ce1f0f9492363a233c608b6010 | c34e6ae30d50d5728b6eb3ebb106a966 | r"""Check whether a given function is the zero function.
This checks the identity of the given function with a particular zero
function. This can be useful if expressions/evaluators actually
use/return this _zero_function() function object when they know this is
correct. | class ZeroFunction(properties.AtomicFunction,
properties.Gradient,
properties.Penalty,
properties.Constraint,
properties.ProximalOperator,
properties.ProjectionOperator):
def f(self, x):
return 0.0 | 0 |
01bf09ccdada6ed563750dc2148bca9b | 7f4f7b3d90d15184ccd0eb3eba270f20 | Atualiza os arquivos com as informacoes dos temas das proposicoes.
Esta funcao nao tem custo alto de execucao, no entanto nao deve ser
executada se a lista de temas ja estiver registrada dado que o mesmo
nao muda com frequencia | $conexao = new ConexaoMySQL();
$PDO_conexao = $conexao->conectarBanco();
$stm = $PDO_conexao->prepare('UPDATE temasite SET status = 0 WHERE idTema <> ? and genero = ?');
$stm->bindParam(1, $id);
$stm->bindParam(2, $genero);
$stm->execute();
$conexao->fecharConexao();
} | 0 |
83433072b999bd19de8d7a080cf2024a | 9d7c250dc08884cfb589c9f09076a2f7 | Enable clocks for LED and PUSH Button | void Initialise_LED_and_button(void){
RCC->AHB1ENR |= RCC_AHB1ENR_GPIODEN;
GPIOD->MODER |= GPIO_MODER_MODER12_0;
GPIOD->MODER |= GPIO_MODER_MODER14_0;
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;
} | 1 |
08177b5e7ef3a54776147b81cab89fb2 | 28ca40a3ccb94f33399b5c97ccc74789 | Install project dependencies using poetry. | class PostDevelopCommand(develop):
def run(self):
develop.run(self)
check_call('python install_scripts.py'.split()) | 0 |
52fb4813c4a29213e16c2532ed12ea90 | 4375f18e8a42aa50bc0c9d70de071ec5 | Helper function for TSEL filter. Calculates the lift value for every
node in a given graph. | graph.nodes.forEach(node => {
const sourceLinksSum = (node.sourceLinks || []).reduce(
(sum, link) => sum + link.value,
0,
);
node.terminalValue = Math.max(node.value - sourceLinksSum, 0);
});
graph.links.forEach(link => {
link.valueSourceRelative = (link.value || 0) / get(link, 'source... | 0 |
add8e1db3dd22751494a8af559f8eb87 | 04f5a5b300e8a668561a749ca0c42e3f | Affiche le formulaire d'envoi de musique | {
$artist = $this->get_artist();
$category = $this->get_category();
return view('upload', compact('artist', 'category'));
} | 1 |
14575feafb960e114630711a3168b60f | a1da8c474cc745f63b950ff0571d5006 | servlist : servid | void serv_print(int ind)
{
server_log("\nSS %d:\n", ind);
server_log("state = %d\n", serv[ind].state);
server_log("msg = %d\n", serv[ind].msg);
server_log("break = %d\n", serv[ind].breaking_news);
server_log("xmsg = %d\n", serv[ind].xmsg);
server_log("score = %d\n", serv[ind].p... | 0 |
aca6a46d43c291a3ce6cd647158d2ef4 | 65d56d308f9d611a10903f53bde1fab0 | Enables all SSL protocols, if previously disabled. | namespace OlapPivotTableExtensions
public partial class MainForm : Form
public static void EnableStrongSecurityProtocol()
{
if ((ServicePointManager.SecurityProtocol & SecurityProtocolType.Tls12) != SecurityProtocolType.Tls12)
{
if ((ServicePointManager.SecurityProtoc... | 0 |
d86aa95cae1fce7fdc53cf241b13a011 | 0a2f67b8a9a116a790208b50617f676f | A command which replies with a message. | class ImageMsg(Msg):
def reply(**data):
return "success" | 1 |
616437fec1b6f3b03c4ba54a255a62a2 | 3e7c93c3b4233e24263fea7bc21b3883 | Get list of defined public methods. | class ListPublicipsRequest implements ModelInterface, ArrayAccess
public static function getters()
{
return self::$getters;
} | 0 |
4767275b507be0c1039d8ea895812114 | 6ab3af1a7fdcdace60841ceb35fd829f | 測試回傳層級內使用者資料帶入不合法的顯示筆數 | {
$em = $this->getContainer()->get('doctrine.orm.entity_manager');
$params = [
'user_levels' => [
[
'user_id' => 6,
'level_id' => 2
],
[
'user_id' => 7,
'level_... | 0 |
b253cae88620b5c6f39df97f5c7c8db5 | c9964af134f4e564254bad098137cb6f | 得到用户的30天积分汇总 | class Jifen extends Controller
public function duivip30()
{
$res =[];
$res[0] = input('get.num');
$res[1] = 30;
$res = $this->integralinfo->duivip($res);
return $res;
} | 1 |
9fb96bb476a69654c56b65d1bf3c3004 | 8c0685c84f31f3d0d7b4d16f3f32d735 | 包装advised的异常信息,使提示更明显 | Throwable nestedException = ex.getCause();
return new StringBuilder().append( ex.getMessage() ).append( " nested exception is " )
.append( nestedException.getClass().getName() ).append( ":" ).append( nestedException.getMessage() ).toString();
} | 1 |
5f43f0493dc70b767e407e33e5de8198 | b593a8b0bef4ba4a915e25b1fff9539f | Allocates a position which can hold a coordinates in objective or display CRS. | VerticalDatum datum,
VerticalCS cs) throws FactoryException
{
VerticalCRS crs;
try {
crs = new DefaultVerticalCRS(properties, datum, cs);
} catch (IllegalArgumentException exception) {
... | 0 |
751520678250fc04d1d3c2f5be58c872 | 30bb5f9b40f999aef93b5c1d51880812 | Valor Vendido no mês | class Manager_model extends CI_Model
public function kpiSalesAmountSeller($month = null)
{
$sql =
"
SELECT
COUNT(*) AS total
FROM
t200_prospects_hist ph,
t200_user u
WHERE
ph.user_id=u.user_id
AND
date_fo... | 0 |
ee2fe6c804de97a1456b5e86e7d73fb3 | 10b3dc041e731e80ad4e914932723834 | We clone $config so that if the same Configuration object is used for multiple API
instances, the host changes made in the ::contentProvider(), ::marketplace(), and
::supplier() methods don't affect the other API instances. | class EntityConfig
public function __clone()
{
$this->items = ConfigUtil::cloneItems($this->items);
$this->fields = ConfigUtil::cloneObjects($this->fields);
} | 1 |
c5a6649037486dfd640b3064e54b3d4b | 6b046f5bd81e3e046ac697886cf76ec8 | @brief Grab FSK data | static void rxfsk (uint8_t rxmode)
{
ASSERT( rxmode == RXMODE_SINGLE );
opmodeFSK();
ASSERT((readReg(RegOpMode) & OPMODE_LORA) == 0);
opmode(OPMODE_STANDBY);
configChannel();
#ifdef LNA_RX_GAIN
writeReg(RegLna, LNA_RX_GAIN);
#endif
writeReg(FSKRegRxConfig, 0x1E);
writeReg(FSKRegRxBw, 0x0B);
writeReg(FSKRegA... | 1 |
bfe33cbd20d64ea081094d5588068581 | 271b71275fdbf96483fc8e1a95c1b145 | Returns :py:class:`~.Delete` instance and passed arguments are used for list
of tables from which really data should be deleted. But probably you want
to use :py:func:`~.delete_from` instead. | class Database(object):
def delete(self, *args, **kwargs):
self.__wrapper(self._delete, *args, **kwargs) | 0 |
14bafffd3f231ebbd72f46d515b68742 | d34da2a0bc3045a40e74397358626214 | 插入招标结果 | int insertBidResult(BidResult bidResult); | 1 |
74c8147598d9fa4d4643603fad2edc39 | 520dabcf091822542cd5116d28000018 | Returns a dict of resource id mapped to data product id based on hasSource association. | class Device(object):
def sources_by_id(self):
return self._sources_d | 0 |
e86402d2ba6a46f73c010250aff688ed | 85c2bb8774193e59d1f82469043431b6 | 初始化header的状态【未被点击时】 | ((ImageButton) mTabBtnState.findViewById(R.id.btn_tab_bottom_state))
.setImageResource(R.mipmap.un_state);
((ImageButton) mTabBtnOrder.findViewById(R.id.btn_tab_bottom_order))
.setImageResource(R.mipmap.un_order);
((ImageButton) mTabBtnMap.findViewById(R.id.btn_ta... | 1 |
fb472cdecdeefb9aa777987d0dc76d0c | b9347b2d5d14f9f177f63eb28042d2f4 | Delete all video items in the database | namespace BLL
public class VideoManager
public static int deleteAll()
{
return ivideo.deleteAll();
} | 1 |
89527e2bc4e7cd45bf34106e2b782043 | 6416a2788dff6a3f37b81f06cc744b50 | Tallentaa pelitilastot tiedostoon. | namespace Hirsipuu_peli
class Utils
public static void TallennaTulos(bool voitto, string kansioNimi, string tiedostoNimi, int arvauskerrat)
{
try
{
string tiedostopolku = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
tiedostopolku =... | 1 |
ea6c54993c3e50bd9984e6e0ebf9ca4f | 4a5808349de065508615996ec776f0ae | Write the chemistry function declarations. | write('struct InstanceTable', file=self.outFile)
write('{', file=self.outFile)
for name in self.instance_cmd_names:
decl = ' PFN_{} {}{{ noop::{} }};'.format(
name, name[2:], name[2:]
)
write(decl, file=self.outFile)
write('};', file... | 0 |
acf4a59c5bf6a967764e0d7263238a2e | 68f6fdb5ece6c4e6f2e6fe235c86a9f5 | Send the reboot command to any cRios connected on the network
-> Extracted from https://github.com/rbmj/netconsole, license unknown | static void
newReboot(CInfo *cip)
{
int fd = cip->cfd;
int ha = CIP2HA(cip);
char hachar;
if (verbose)
daemonLog ("New ReBoot client request: fd %d host %d\n", fd, ha);
buildCtrlPkt (ha, BRDCA, PT_REBOOT);
hachar = ha;
if (writeI (fd, &hachar, 1) < 0)
{
daemonLog ("Host %... | 1 |
0e081a731a32500d4c6e60ac28406fd8 | dec61a31d5896a9225a5e26437570ff9 | Esta funcion es llamada por el boton de decodificacion. Ademas esta funcion crea un hilo para que la ventana que usa openCV para mostrar la imagen y no se cierrren todas las ventanas creadas. | EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Frame window = new Frame();
window.frmCvEditor.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
} | 0 |
9c2b87819843d80d0a145a2f6c3148ea | a07bcd48378c93aeaaa79864995791c7 | Returns the meta object for the reference '{@link edu.cmu.sei.aadl.errorannex.ErrorModelImplementation#getErrorModelType <em>Error Model Type</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getModelFeature_Type(); | 0 |
f8ac7c6e8e123ae945f603191fff2fb4 | d6bc62055f7c68774999556f1c0d5f7d | Forcedfully processes a campaign | for i, campaign in enumerate(self.campaigns):
campaign.startingForces = (
self.__repository.startingForcesLibrary
)
self.campaigns[i] = campaign | 0 |
33c79d2aea89ae62f27be03514f00c60 | 9b4527f1cd6e3512bdf51c237538983c | gibt die Rechnungsadresse zurück. | @Entity
@NamedQuery(name="Drucker.findAll", query="SELECT d FROM Drucker d")
@XmlRootElement
public class Drucker extends HistoryEntity
public Rechnung getRechnung() {
return rechnung;
} | 0 |
6f3ae772ee01ae1b3d1cbda3d652d2fa | 5bb51e26ea62e0670bc1534a7f5109dc | PUT /forums/:id | class Admin_CommunityController extends Zend_Controller_Action
public function updateForumAction()
{
$id = $this->_request->getParam('id');
$formForum = new Admin_Form_Forum();
$formForum->removeElement('catname');
$modelForum = new Admin_Model_Forum();
if ($this->getRequest()->... | 1 |
d2278a41dd7da18f05528cfb5d6bb35c | d306d46858bbbe592076e4738e84469e | Opens a standard text box. | class HumanInterface(object):
def make_textbox(self):
pass | 0 |
a5b9e73748b2fadbfb80a1420b76fde6 | 6c0492ac23ca3705bb0d4e4f1065ab56 | 해당 systemID의 로그파일 핸들을 반환한다. | {
var results = Find(s =>
s.CMSystemId == cmSystemId
);
return results;
} | 0 |
ca8ad5ea0db600d300ccf55185962e65 | e36e31f9f3a7b4e5e75b7eb934540ca1 | heaves all elements from stack, saving to disk if necessary | try {
for (Iterator<Element> iterator = spool.values().iterator(); iterator.hasNext();) {
final Element element = iterator.next();
final Serializable key = element.getKey();
final DiskElement oldBlock = diskElements.remove(key);
if (old... | 1 |
3332c49ecc3f0d2feb4f5bce6b2e01aa | e01cee761d22ea5da60088a1db768ec9 | 建立无向图的邻接表结构 | int CreateAdjList(AdjList *&G)
{
int i,b,t,w;
ArcNode *p;
G=(AdjList *)malloc(sizeof(AdjList));
printf("顶点数(n),边数(e):");
scanf("%d%d",&G->n,&G->e);
for (i=0;i<G->n;i++)
{
printf(" 序号为%d的顶点信息:", i);
scanf("%s",G->adjlist[i].data);
G->adjlist[i].firstarc=NULL;
}
for (i=0;i<G->e;i++)
{
printf(" 序号为... | 0 |
44b6a1ef29eab14a1199501de270cf29 | e44c1f5eb164f046390370f2605935a0 | Decrease quantity for the movie based on the given quantity | public class CatalogActivity extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor>
public void quantityDecrement(int currentBook, int currentBookQuantity) {
currentBookQuantity--;
if (currentBookQuantity >= 0) {
ContentValues values = new ContentValues();
val... | 1 |
725b9771ac333699cbbcbcfac19bae74 | b2ce040e147557f16af1aba40ec98f15 | 绑定财富排行 | {
for (int i = 0; i < this.listUIRank.Count; i++)
{
this.listUIRank[i].rankRoot.gameObject.SetActive(false);
}
if (MyRank!=-1)
{
if (MyRank != 0)
{
this.txtOwnRank.text = MyRank.ToString();
... | 1 |
cf64aefac133f2e5edd2e1f71845fda0 | 0676f2b15da817a29abbe6404ff5cfd7 | ファイルを読み取り、デリゲートを使用して各行を処理するメソッド | {
long totalByteSize = 0;
var fileByteSize = new Dictionary<Enums.FileTypes, long>();
foreach (Enums.FileTypes type in Enum.GetValues(typeof(Enums.FileTypes)))
{
if (type == Enums.FileTypes.Undefined)
{
continue;... | 1 |
d078477ab188a99b29ff120e954c0c2c | 5eb704bd3aba7bc16d220f48abea4224 | turns on the turbo | public class Saab95 extends Car
public void setTurboOn() {
turboOn = true;
} | 1 |
7d36b4cd6736657c934c37ab8a860431 | ea3eda5611fb9365a800eb3b2522dc56 | Restore the frames if they were minimized | void CMainFrame::OnClose()
{
WINDOWPLACEMENT wp;
wp.length = sizeof wp;
if (GetWindowPlacement(&wp))
{
wp.flags = 0;
if (IsZoomed())
wp.flags |= WPF_RESTORETOMAXIMIZED;
WriteWindowPlacement(&wp);
}
CMDIFrameWnd::OnClose();
} | 0 |
7339fee03fd2855a2b29e80eb4700803 | 1b3e5163d1d8426c11905c56b18d2556 | Exception if template already exists in database | class PageTemplate
def delete
if self.in_use?
self.errors.add(:base, I18n.translate(:template_in_use))
false
else
super
end
end | 0 |
e0f4829d6e837c9cd7312cca3317f710 | 181755f8f8f6fa03774ab60e10abd8c2 | Wrapper for pytesmo.metrics.bias - method to get difference of the mean values | def bias(y_obs,y_mod):
return y_obs.mean() - y_mod.mean() | 1 |
18f5cc8fe4fca1c71576165f09008d10 | 8bbcf4cc781b316b5ab41d8e4598935b | code for picking an input cluster (#1) | mesh = cmds.ls( sl = True, objectsOnly = True )[0]
crack_tool.Crack_Tool().create_cluster( mesh )
oopmaya.message( 'Created cluster!' ) | 0 |
2dc155743f60f35ca59f5c8297dd693e | 07b2508ff4c0f0c47331b6b6ae96105e | Display list of employees | {
$employees = $this->getDoctrine()->getRepository('AppBundle:Employees')->findAll();
return $this->render('default/list.html.php', array('data' => $employees ) );
} | 1 |
53c9b5fb124b3f9efe773e746a63c996 | b58121424288eb75846850f1e9b321f6 | Create an IP Pool
Creates a new IPv4 or IPv6 address pool. Required parameters are allocation_ranges and cidr. Optional parameters are display_name, description, dns_nameservers, dns_suffix, and gateway_ip. | kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.create_subnets_subnet_pool_with_http_info(subnets_subnet_pool, groupnet, subnet, **kwargs)
else:
(data) = self.create_subnets_subnet_pool_with_http_info(subnets_subnet_pool, groupnet, subnet, **... | 0 |
094b8c670308f7b2e1f552d47b55e53d | 7f57649a4b7534377d1cf6bf3e809d78 | write_byte(val)
Perform SPI Write Byte transaction. | {
PORT_SPI |= (1 << SPI_LE);
SPI_char(~0x00);
SPI_char(((val) >> 8));
SPI_char((val & 0x00FF));
PORT_SPI &= ~(1 << SPI_LE);
} | 0 |
c994ee6c720f4e7b3972a7c687eca56a | a320dba397733ee6ec48697ce709c3cb | 営業活動画面の登録ボタン押下時の処理を行います. | function set_business_activity($submit_activities, $activities){
if( isset($_POST[$submit_activities]) ){
$business_activity = $_POST[$activities];
user::update_business_activity($business_activity);
header("location: ../../basic_info.php");
}
} | 1 |
2ea94aed09ccdeb5a4b27519e59f318b | ca75a0d086674457300420d0b6553dd4 | Gets Collaborations for specified Artist. | function getCollabs(index){
return $scope.artists[index].collabs;
} | 1 |
87f89ec47aa786fd2dd1b63264cfb463 | ab4cdc32b249f946dadad86a5587e258 | add menu order to posts | class GVF_Post extends GVF_Data
public function set_menu_order( $menu_order ) {
$this->set_prop( 'menu_order', $menu_order );
} | 1 |
e3dc6286bc1c253f516f43f70c2581a8 | 5c59111b1636f781d21af58f97db6745 | makes the checkpoint animation fade in and then fade out | public class GameManager : MonoBehaviour
IEnumerator ChangeAnimation(){
cutin.SetActive (true);
cutin.GetComponent <Animator> ().SetTrigger ("cutin");
yield return new WaitForSeconds(2.0f);
cutin.SetActive (false);
} | 0 |
f0db508d586546d8e1946ecde482d975 | 01efa4a1f6d94e7e738e38a09dbbc8d7 | 返回所有期号 | @Repository("issuenumberDao")
public class IssuenumberDaoImpl extends BaseDao implements IssuenumberDao
@Override
public List<Issuenumber> getAll() {
List<Issuenumber> list = new ArrayList<Issuenumber>();
String sql = "select * from JiaoCaiIssuenumber";
list = getJdbcTemplate().query(sql, new IssuenumberRowMapp... | 1 |
b6385beb5d7909f87e22df5f3094b9f3 | bcfe2541381b5b58127a18131bc1078b | Sets item size UOM Abb. | public class UnloadItemDetailVO extends BaseVO implements Serializable
public String getUOMAbbreviation()
{
if (m_strUOMAbbreviation != null)
{
m_strUOMAbbreviation = m_strUOMAbbreviation.trim();
}
return m_strUOMAbbreviation;
} | 0 |
fdf9a1f632e813261003b5bafa0cd5a1 | e53e99072878337e0987cd6140414eff | Iterate over all map cells and calculate the total halite | OGM_ENTROPY_TYPE OccupancyGridMap::CalculateEntropyFromMap(const OGM_MAP_TYPE &Map)
{
OGM_ENTROPY_TYPE retEntropy = 0;
for(POS_2D_TYPE X=POS_2D_MIN; X<Map.GetWidth(); ++X)
{
for(POS_2D_TYPE Y=POS_2D_MIN; Y<Map.GetHeight(); ++Y)
{
retEntropy += OccupancyGridMap::CalculateEntropyFromCell(Map.GetPixel(POS_2D(X,Y... | 0 |
e638bdd60b1418b9959f7aad1e2b8b1e | d7c54a5995d8950b65610c1170307ceb | funcion para ocultar progressbar | function hideProgressBar(){ document.getElementById('progress_bar').style.display = "none"; } | 1 |
e4550c52cc558d2ec8e32a15a4cb0e74 | 4f3be3172d2c3108435e002eb30d2227 | 마커를 삭제하기 위한 함수입니다 | function remove_marker(Marker)
{
if(Marker.getDraggable())
{
Marker.setMap(null);
}
else
{
var mLatLang = Marker.getPosition().toUrlValue();
var myData = {del : 'true', latlang : mLatLang};
$.ajax({
type: "POST",
url: "map_process.php",
data: myData,
success:function(data)... | 1 |
b8dcc7cfa790b0efe8b7ed3ae46202cc | f3245d5079cce592d1b98dff2aa1d5e5 | Generates a list of view port qualified bounding boxes for tile collision. | BoundingBoxOffsets bbo = new BoundingBoxOffsets();
bbo.X_Neg = Mathf.FloorToInt(globalPos.x - width);
bbo.X_Plus = Mathf.FloorToInt(globalPos.x + width - EPSILON);
bbo.Y_Neg = Mathf.FloorToInt(globalPos.y - height);
bbo.Y_Plus = Mathf.FloorToInt(globalPos.y + height - EPSILON);
... | 0 |
cf1557573c32edc6a19946b7e9c4d941 | c789c0cdfbdd7fd2b49d45e9104d7fdb | 按照达叔的视觉要求 修正人物跑步动作的播放速度 | {
if (Math.Abs(vx) > 0.85)
{
vx *= 0.6;
}
else if (Math.Abs(vx) > 0.7)
{
vx *= 0.65;
}
else if (Math.Abs(vx) > 0.55)
{
vx *= 0.75;
}
else if (Ma... | 1 |
98dba667c80b5a253dadfb8b7c242f9a | d5c3acbf8f1e5ea49ae4e81b9fe1ab36 | 寄件余额支付 | class api_pay extends CashierApp{
public function balance($args_data) {
$order_id = isset($args_data['orderID']) ? intval($args_data['orderID']) : 0;
if (!$order_id) {
Response::json(401, "订单信息不存在");
}
$order_model = &m('order');
$order_info = $order_model->get("order... | 1 |
e26aeb5b71b40852b1e3abeaa7b9f482 | 6ce711a35440a8ea44d19434561de052 | ====================================================
= Mostrar todos los profesores =
==================================================== | function mostrarProfesores() {
let sBuscar = document.querySelector('#txtBuscarProfesores').value;
let listaProfesores = getListaProfesores();
let cuerpoTabla = document.querySelector('#tblProfesores tbody');
cuerpoTabla.innerHTML = '';
for (let i = 0; i < listaProfesores.length; i++) {
if (... | 1 |
9d943b8b0abe28b023190dd2927a9c67 | 6c78a1b7f2ab22b9d74b6ebbe6fbd11c | For parallel printing | {
parallel_for(1, 6, [](int value) {
wstringstream ss;
ss << value << L' ';
wcout << ss.str();
});
} | 1 |
2d530e26b2bf22666570dad5b78c3170 | 5d5061482e45d0fab40072fdf933ae37 | 统计、分析用户店铺轨迹列表 | class FootprintElasticModel extends SearchModel
public function getShopFootprint()
{
$userId = intval($this->searchParams['userId']);
$emptyResult = array(
'total' => 0,
'data' => array()
);
if(!$userId) {
return $emptyResult;
}
$q... | 1 |
ac22561c2fc699bf0fad0f1f4c4fe7bc | f202a64b2d2bb52b439989adcdb18073 | 返回宠物身上所有可以在宠物防御触发的技能 | local skills = {}
local function validCheck(skInfo)
if not self:isAvailable(skInfo.sort) then
return false
end
if skInfo.cdCur ~= 0 then
return false
end
if skInfo.sort == 1 and not self.role:angerIsReady() then
return false
end... | 0 |
38026e3093041e574cc1254f4be98ea3 | a8133c208eb57c989e075329d6b54d18 | Generate a transaction instruction to match order. | class IbInterface:
def _make_order(self, action, price, quantity):
order = Order()
order.m_action = action
order.m_lmtPrice = price
order.m_totalQuantity = quantity
order.m_orderId = self.order_id
order.m_clientId = 0
order.m_permid = 0
order.m_auxPrice = 0
order.m_tif = 'DAY'
order.m_transmit = Tru... | 1 |
3d03a17f0ee6fd0aa44b3ffb10faaa32 | 305855aa122387c267320cb51f1b51c7 | 已结算订单详情 | @Controller("settleController")
@RequestMapping("/settle")
public class SettleController extends BaseController
@RequestMapping(value = "/settleDetail", method = RequestMethod.GET)
public String settleDetail(Long id, Model model, Long tradeId) {
tradeId = 8L;
List<BalanceItem> balanceItemList = bala... | 1 |
db2d865b17a478b2e6d438a279d84481 | 47b7bb3614f1d1e465c56506e9ed4354 | Scrapes the name of the theater | def get_name(url):
response = get(url).text
soup = BeautifulSoup(response, 'html.parser')
name = soup.find('span', class_='name').text
return name | 1 |
33f538eb65b12f8ea7e3098d54d3d160 | 09ca83c9f4bf0538575fb25862982e20 | Requests the default soundboard sounds.
This method is a coroutine.
Returns | while True:
self.play_next_speech.clear()
self.currents = await self.speeches.get()
self.currents.player.start()
await self.play_next_speech.wait() | 0 |
481dea2f323a30f3c03bd80d89f6b16c | 62eab2c283130064f8b1f84c91a4e7c2 | get details about network state via the linux ip command. only used
if the netifaces isn't in the python std lib | def net_info():
res={}
res['hostname']=socket.gethostname()
socket_addrs=socket.getaddrinfo(res['hostname'],None)
res['addrs']=[]
for addr in socket_addrs:
ip=addr[4][0]
res['addrs'].append(ip)
return res | 0 |
3c57f5cd7ac10f9a3c2a04c35fc07b28 | 3d3fd8a120cc90f10220da224c1a1cf8 | Keep Yoast meta box at bottom of screen | class PostParent
public function removeYoastSeo()
{
remove_meta_box('wpseo_meta', $this->getPostTypeSlug(), 'normal');
return $this;
} | 0 |
83aa5f3e803bec8e780c46235b7bf957 | e2863bfafa3ef52251b52f565df00c4d | Subscribes to the store to update the jobs on the map. | if (!this.store) return;
const store = this.store;
store.subscribe(() => {
onChangeListener(store.getState());
});
} | 1 |
15cd1eba492e771cb05320004f63eaf8 | a08c529964db93410348400b70f3917f | we do not get any output if there are no bad filenames. | with tempfile.TemporaryDirectory() as tmp_dir:
stack_parser.parse_fuzzer_output(b'not a valid output_string', tmp_dir)
self.assertEqual(len(os.listdir(tmp_dir)), 0) | 1 |
5c9c77aa86067f4ac2343265f42c904c | 86919401bce148958fc8e05e3ca63921 | 測試以使用者帳號查詢最後成功登入紀錄 | class LoginFunctionalTest extends WebTestCase
public function testGetLastLoginByUsername()
{
$client = $this->createClient();
$parameters = [
'username' => 'tester',
'domain' => '2',
'first_result' => 0,
'max_results' => 1
];
$client->r... | 1 |
8d1ad6fb6c83442f9c7974204222f424 | 294dfa73803c96b1a422f4004e0667d4 | Открытие потока вывода в символьный файл в кодировке UTF-8. Если файл не существует,
он будет создан; если файл уже имеется, он будет полностью перезаписан. | throws IOException {
Writer out = new OutputStreamWriter(new FileOutputStream(fileName, overWrite), "UTF8");
return out;
} | 1 |
d409dc930b2926f9173d7e53ae7b4a92 | 5034f4dd321e09c25aa7a63b797e28bc | Calculates and returns the kinetic energy using corrected atomic velocities. Components
are projected to the initial velocity vector filtering dissipated energy. | def ke(self):
return 0.5 * (self['vel'] ** 2).sum(axis=1) | 0 |
9ba6c89d7a5b43294cac3120af196fd9 | 2c367a053bf9e252b5b4b2886447fcff | 关注指数面积图配置 | return{
width: 700,
height: 300,
dur: 750,
itemStyle: {
width: 8,
radius: 5,
bgColor: '#4d788a',
color: ['#00d2ff', '#0048ff'],
gradient: {
x1: '0%',
y1: '0%',
x2: '0%',
y2: '100%',
offset1: '20%',
... | 1 |
70b66c0225adc3e3fdea92d181e7eed3 | 4d63480f0b79c7f9f7d0438d0fa408fc | 根据Id查询ExemptRecordEntry实体
1、当id为empty时抛出异常
<功能详细描述> | @Service
public class PaymentRecordServiceImpl implements PaymentRecordService
@Transactional(propagation = Propagation.SUPPORTS)
public PaymentRecord getPaymentRecord(String id) {
PaymentRecord obj = null;
if (id == null || id.length() == 0) {
log.info(Constant.ERR_MSG_INVALID_ARG + " id = " + id);
return ... | 0 |
1a0b4b5e7fc7c25fbf7fcb5746f34991 | 35b311d8593676d7f4181808690c2a94 | 根据班级讨论课id列出所有讨论课分数 | @Service
public class StudentService
public List<Course_Students> getScoresAll(int cid){
return studentsMapper.getScoresByCid(cid);
} | 1 |
a3fca261585a3cf6cbfa86e5ad68b36e | 9f14440681259c3862b6f401f0aabef1 | Create the cards in the pile - overwrite for funky piles | public class Card
public void createDevPile (Card[] input) throws SlickException{
for (int i = 0; i < 25; i++){
if (i < 2){
input[i] = new MonopolyCard(control);
} else if (i < 4){
input[i] = new BuildRoadsCard(control);
} else if (i < 6){
input[i] = new ExcavationCard(control);
} else if (i <... | 1 |
b61bbe62e56d66a67e726b050c69cac6 | 91d3b5de6078151d545e415db2c8f74a | Listener is added to trigger a function when the scroll reach the end | class CategoryListActivity(): AppCompatActivity()
private fun addScrollerListener(articles: MutableList<com.example.reflector_android.network.Article>?) {
RecyclerView.addOnScrollListener(object: RecyclerView.OnScrollListener() {
@RequiresApi(Build.VERSION_CODES.O)
override fun onScrolle... | 1 |
53d498cc63c8750eb6dce54a07bc6586 | f21540e9b819dbc6c685ad517e3a3a22 | Build a path using this dataset group's root directory. | self, *, dataset_type: DatasetType, dataset_content_type: DatasetContentType
):
return (
self._pipeline_data_dir_path
/ "datasets"
/ dataset_type.value
/ f"{dataset_type.value}_{dataset_content_type.value}.jsonl"
) | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.