query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
bdad844ea78576a76ed35741e5370206 | a2db3813b86f84bd117d7a8fe5b1f943 | 计算学科的总分和平均分. | class Score extends Model
private function subjectAvg($examId, $subjectId, array $studentIds) {
$condition = [
'exam_id' => $examId,
'subject_id' => $subjectId,
'enabled' => 1,
];
$scores = Score::whereIn('student_id', $studentIds)->where($condition)->ge... | 0 |
a9d1b832251939f6ddc7a91346fdbc20 | e4a273d0c81b18c8b715c88769b08ea1 | =============================================================================
Plays the track, usually gets called when the user resumes the queue
========================================================================== | class IITFileOrCDTrack(DispatchBaseClass):
def Play(self):
return self._oleobj_.InvokeTypes(1610809345, LCID, 1, (24, 0), (),) | 1 |
efabc97eb80b2948a11aa490a410ddad | 3efab3f4c1f17174e07173e45182db5d | Deletes a fragment from a story. | class FragmentController extends Controller
public function destroy(Fragment $fragment)
{
return $fragment->delete();
} | 1 |
d72216ee5fd4ea241e447e0bcea539ac | 873224a3dc18c4cfdf61e0370d1ae42f | Output the shipping settings screen. | class SettingsController extends Controller
public function index()
{
return view('dashboard.settings.shippings.edit');
} | 1 |
c5a299988601f283f709b48231b079d8 | 2242aa4f6073b62381047356a2d819ae | Make clickable links from URLs in text. | function make_clickable($text) {
$regex = '#\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#';
return preg_replace_callback($regex, function ($matches) {
return "<a target=\"_blank\" href='{$matches[0]}\'>{$matches[0]}</a></br>";
}, $text);
} | 1 |
79c7ffd866aaa34d7cd8ffd56f4cc854 | 046a87ce5595ff471ab843095ad2ae6f | ## function to compute the likelihood of one data point | loglik=function(x,mean_mu,sigma=1,tau,log=T, switchllik='power'){
if (log==T)
{
if (switchllik=='power'){
out=tau*sum(dnorm(x,mean=abs(mean_mu),sd=sqrt(sigma),log=log))
}else{
out=sum(dnorm(x,mean=abs(mean_mu),sd=sqrt(sigma/tau),log=log))
}
}else{
if (switchllik=='power'){
out=(prod(dno... | 0 |
1b0573784df8435b7a761ca0735324b0 | a7e2323cbc17112ef287d5df808d35d9 | チェックポイントでのスコアを保存する | {
$scores = new AssessmentScoreEntity();
$scores->ass_id = Arr::get($Info,'ass_id');
$scores->skill_id = Arr::get($Info,'skill_id');
$scores->scores = Arr::get($Info,'scores');
$scores->created_at = now();
$scores->save();
} | 1 |
e6546bdb5ad51cac2921da7394a07934 | 0785ac914da51e310cd3ec0d175224bb | Se actualiza el detalle de la factura | {
try
{
new datos.vialsur.prefectura.cls_data_orde_detalle().Actualizar_orde_detalle(_orde_detalle);
}
catch (Exception ex)
{
throw new Exception("Error al actualizar los datos del detalle: " + ex.Message);
}... | 1 |
fc2b55b286472b114ce4238aeea5a4f5 | 5e4705faf0c38b2e38f2d371567f89cc | Send HTML emails.
Accepts only keyworded arguments. | def send_email(*args, **kwargs):
sendemail_attach(*args, **kwargs) | 0 |
a52f6c1a22327bca21e239f564f5cf4c | 3c195ec1732e80bb342012959e212e3c | Get product alternative types | {
$values = array();
$typeInstance = $product->getTypeInstance();
$links = $typeInstance->getLinks($product);
foreach ($links as $link) {
$values[] = (int) $link->getId();
break;
}
return $values;
} | 0 |
d98822285dea87f30b30d9bf34bb619b | fb6a9b51da9c9995f0dbf696112f6553 | 制造一个新的信用卡实例 | CreditCard createNewCard(CreditCard creditCard) throws DAOException; | 1 |
7b3117f4c340b178bb0acc85678eb3fc | a422d5394708812f718a6cb200fb34a7 | 生成抽奖随机数 | class LuckydrawController extends Controller
private function generateLuckydraw()
{
$r = rand(1, 1000);
switch ($r) {
case ($r <= 90):
return 0;
break;
case (90 < $r && $r <= 240):
return 1;
break;
ca... | 1 |
0ef9371593d8de8a3f48f435f35d1138 | 46482a667bd0e1bcc838d924a2c1b32e | Retrieves a set of all the collection roles in which the given entity
is a participant, as either an index or an element. | abstract class Rx_Model_Entity extends Rx_Model_Abstract implements Countable, Iterator
public function getCollection($partId = null)
{
$partId = $this->_normalizeEntityPartId($partId);
if (!array_key_exists($partId, $this->_collections)) {
$collection = $this->_getCollection($partId);
... | 0 |
44306db7df36543792d08368e7e72230 | 7dc8bed740bbc2c00f81a45d80bf895c | Close console if there's no debugging to be done | class Debugger
public static function console($msg)
{
if (self::isOnlineMode()) {
return;
}
$javascript = new JavaScript();
$javascript->appendLog($msg)->display();
} | 0 |
5386e3f7c3053742af19a6099d950ff6 | 71b7c96819aed5193bfd3139255614e7 | Gets the y-value function.
<p>
The function takes {@code parameters} and x-value, then returns y-value. | public abstract class LevenbergMarquardt
public abstract double[] getModel(double[] params); | 0 |
b173071cec74f1afdbd54312b7c8b79b | f4bdfd0f590669710cdab807e9b23d16 | Request a gpio line | {
stm32_gpio_t *port = GPIO_PORT(pinNumber);
int16_t pad = pinNumber % 16;
return PAL_LINE(port, pad);
} | 1 |
42a639a31073bc974045b63aa260b2a2 | 40d7b3e076d36872e4bca0208d47c991 | Update the required attribute. | class Generic implements \AttributeConfiguration\Api\Generic
public function required()
{
$this->attributeConfig->setData('required', true);
return $this;
} | 1 |
a2cc87f348831cffd92caf88295a1d55 | 4664b55a4a4496f5b6df1ea2937993df | 取消新闻置顶,根据新闻编号取消新闻置顶 | {
var conditionJson = Request.Form["data"];
var newId = JsonConvert.DeserializeObject<int[]>(conditionJson);
int userId = int.Parse(Session["userId"].ToString());
if (newId.Count() > 0)
{
NewsManagementBLL.SetUnTopNews(newId, userId);
... | 1 |
043cd79dfbd686db7cf66f314252e475 | 4c6d6e7874ae5bfe9055bf34247d52bb | Obtiene las cargas que han estado en un furgon. | class Repository
public CargoHold getCargoHold() {
return mainShip.getCargoHold(); } | 0 |
b71b29bf063581c4bb3cf40c4166c400 | 390ee8bcad931ce223b65b6a14e7bedb | 返回pm分页方法 | class PmController extends Controller
public function index()
{
$paimais = Pm::orderBy('id','desc')
->where('intro','like','%'.request()->keywords.'%')
->paginate(10);
return view('admin.paimai.index',compact('paimais'));
} | 1 |
594d5d02b46d485dba443a2fb65707dd | 78128de9a97cabe3abc6577afb9946d7 | 创建天窗 | var loader = new THREE.TextureLoader();
loader.load("ThreeJs/images/door_left.png" ,
function(texture) {
var doorgeometry = new THREE.BoxGeometry(width, height, depth);
doorgeometry.translate(50, 0, 0);
var doormaterial = new THREE.MeshBasicMaterial({
map: texture,
color: 0xffffff
});
doorma... | 0 |
3ee39b1c3522f2365287fb3b68abe8ef | ca7875098d028a8339ff4dc2feb9acbe | Loads data from variable handlers and
merge it with the current execution data. | class DoctrineExecution extends \ezcWorkflowExecution
protected function saveToVariableHandlers()
{
foreach ($this->workflow->getVariableHandlers() as $variableName => $className) {
if (isset($this->variables[$variableName])) {
$object = $this->options->getWorkflowFactory()->crea... | 0 |
958db1c36749ef16fd34e93a5981a7bc | 1e79634f1205108826bb2dab7f4bb6af | Verifica possibilidade de contratacao do candidato | function UserSection()
function Hireable ({ isHireable, name, userType }) {
if (userType.toLowerCase() === "user") {
if (isHireable) {
return (
<span className="hireable free">
{name} está disponível para contratação.
</span>
)
} else {
return (
... | 1 |
65b520fa3589d7eb6870eaf2769344b8 | ab86364c2fbb542ec35013d57c3b9205 | Returns the generated concrete integer values (if any) | abstract class Code
public function getValues() {
return $this->values;
} | 0 |
57cf87daafa25320e4916e0b325c7c56 | 7d04b4497f3d66cbb645f2f73777f05b | Gets all relations of the TurbineMatrixEntity as a list of IEntityRelation objects. | {
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.AuditInfoActionTypeRoEntityUsingAuditInfoActionTypeId);
toReturn.Add(this.EntityRoEntityUsingEntityId);
toReturn.Add(this.UserEntityUsingUserId);
return toReturn;
} | 1 |
0979be752d7d7e8a1f620536491e1795 | 74189db69f94f1bde24348d057e1a41a | Create a generative function.
We create a generative function, or stochastic program, by conditioning
the values of a model's random variables. A typical application is to
create a function that returns samples from the posterior predictive
distribution. | def gpy_f_factory(model):
def gpy_f(*parameters):
return -obc_model_posterior(*parameters, model=model)
return gpy_f | 0 |
646046be67a51aa2559acfcc5d2b2198 | b1e4b6cbafc2ed6cb060a18cb626f190 | assets_static_layui_lay_modules_colorpicker_js reads file data from disk. It returns an error on failure. | func assets_layui_lay_modules_laydate_js() ([]byte, error) {
return bindata_read(
"D:\\GoPath\\src\\letinvr.com\\echo-web\\assets\\layui\\lay\\modules\\laydate.js",
"assets/layui/lay/modules/laydate.js",
)
} | 0 |
fdf17c7ece311f6f72b55deb334d76eb | 7e0f559f892f52839cd9c8a8e5683854 | 点击开、关排序按钮 | function toggleSort(e) {
const sortBtn = document.querySelectorAll(`i[data-id="${e.target.dataset.id}"]`)[0];
if (sortBtn.style.display === 'none') {
sortBtn.style.display = 'block';
} else {
sortBtn.style.display = 'none';
}
} | 1 |
29ab998c31849f093ed37fef71c247d1 | 3076e24740aedf8b5b2d4b649e5b9b68 | Checks for the presence of httrack cache files to see if we can simply update an existing export | $unfinished_downloads = $this->wpdb->get_var(' SELECT COUNT(*) FROM `' . $this->wpdb->base_prefix . 'wptc_processed_restored_files` WHERE `offset` > 0 ');
if ($unfinished_downloads > 0) {
return true;
}
return false;
} | 0 |
d17053507ad0d0ea9900a3694080c62f | 9f1c9bd47b2339076ab20424288d67bb | main loop that deals with network requests | def http_loop():
global http_server_obj
while not SIGNAL_EXIT:
http_server_obj.handle_request() | 1 |
6d1bf8892b9f1352805b5350f2371c9b | 78bf277a2589afc5b6f35a559bcc8dc2 | changes player to next player if they have not all selected character | {
for (int i = 0; i < indexCharacters.Count; i++)
{
if (i == index) continue;
if (indexCharacters[i] == indexCharacters[index])
{
indexCharacters[i] += 1;
if (indexCharacters[i] == indexCharacters.Cou... | 0 |
cd5ad639599e1cae6d99ab04c2d5bf4c | 966910dae7b8e8c441f75f7cf56bdb83 | Convert the raw string audio stream to an array. | {
if (audioStream == null)
{
return;
}
byte[] buffer = new byte[sampleData.Length * 2];
audioStream.Read(buffer, 0, buffer.Length);
for (int i = 0; i < sampleData.Length; i++)
{
sampleData[i] = (BitConverter.ToInt16(buffer, i * 2) / 327... | 0 |
c3ef61262dc1967fe8fbfd53a3dd0c4c | 7d20986d553ffc5d60e778b5f9e80ad8 | Function
Synopsis [Find the least often occurring literal.]
Description [Find the least often occurring literal among those
that occur more than once.]
SideEffects []
SeeAlso [] | def lowestrepr(conf):
conf0=conf
conf1=conf
for i in range(L):
conf=translate(conf)
if conf1>conf: conf1=conf
elif conf0==conf: return conf1,i+1
return conf1,L | 0 |
311860c990464c8c6d07b3a395a5799d | 5017f3c722471f0314b6cf22e900af43 | 有重复号码返回false,否则返回true | public class IsValidSudoku
public boolean isDuplicates(int[] nums){
for(int i = 0; i < nums.length; i ++){
for(int j = i + 1 ; j < nums.length; j ++){
if(nums[i] == nums[j] && nums[i]!= 0){
return false;
}
}
}
return tru... | 1 |
22fce078e4b8039d42026081a3cfdfdc | ec089a103f84803b8f1d7cd0fb90ea45 | displays the aces for Federer | public class MainActivity extends AppCompatActivity
public void displayForFoulA(int foul) {
TextView foulView = (TextView) findViewById(R.id.team_a_foul);
foulView.setText(String.valueOf(foul));
} | 0 |
7dc3b35383c30508fb9f896fb1e5c54c | 0da36c7dbc26c1228cf86a05b95e935f | This function will be called when we open the procfs file | static int proc_seq_open(struct inode *inode, struct file *file)
{
return seq_open(file, &my_seq_fops);
} | 1 |
8d4dda0a8ba56cd2dfc8d0c54dd71cb2 | 0e7df2f7e19924c7ed29ba93fdf951d8 | Accessor to the title of the Y axe.
Returns | class BarChartOptions
public function getYAxisTitle()
{
return $this->_yAxisTitle;
} | 1 |
89064fe57a17d96f27c399541d3d0420 | c1787e58489169cbf759df0290acafa4 | Método encargado de almacenar un correo enviadod después de ser editado | class ModeloProveedores{
static public function mdlEditarCorreos($tabla,$datos){
$stmt = Conexion::conectar()->prepare("UPDATE $tabla SET email=:email WHERE id_email=:id_email");
$stmt -> bindParam(":id_email",$datos["id_email"],PDO::PARAM_INT);
$stmt -> bindParam(":email",$datos["email"],PDO::PARAM_STR);
if ($... | 1 |
d8d0065d99f6c8c7aac4e4830a21cf09 | 3abcad142916d45cb8f282a75fbec7d8 | Returns report entry for a given component. | if (!in_array($component, \core_component::get_component_names())) {
throw new \moodle_exception("Invalid component name '$component'");
}
return $this->repo->find_by(
[
'userid' => $this->userid,
'component' => $component,
... | 1 |
56ac0f4a5526d25a524f47b29e4baacb | b7b4cda23faeee0230ebfeff033cc365 | Get the mt tcp. | class RecapLignesMsa
public function getMtTcp(): ?int {
return $this->mtTcp;
} | 1 |
90aa9394081823f4e4cec902b3d3dd04 | 9f8ff72b4f53d2d4ab16f88b8825838b | Calculate the deprature from the center of the lane, based on the idea that
the camera sits on the middle of the windshield | class State:
def _get_off_center_dist(self, lines):
left_line = lines['left']
left_line_x = left_line.poly_params[0] * (self.IMG_HEIGHT - 1) ** 2 \
+ left_line.poly_params[1] * (self.IMG_HEIGHT - 1) \
+ left_line.poly_params[2]
lane_width_pixels = self... | 1 |
b06030f7e8e0ca34bbc9b70e7c63fd8b | 582f292ada87233ed537ea3c46ab15d3 | @brief Update bridge by ID
Update operation of resource: bridge | _In_ uint32_t attr_count,
_Inout_ sai_attribute_t *attr_list)
{
const sai_object_key_t key = { .key.object_id = bridge_id };
char key_str[MAX_KEY_STR_LEN];
SX_LOG_ENTER();
bridge_key_... | 0 |
e5ec00b217402998d86e95ac23eef6d9 | e771a7db64e6ceada43ba095053c6f19 | @brief Enable 802.15.4 Activity interrupt. | void HAL_PWREx_Disable802ActivityIT(void)
{
CLEAR_BIT(PWR->CR3, PWR_CR3_E802A);
} | 0 |
87ccc6d61729329d96959176152be15b | b926031ee7c1d30f698a23bb66014499 | Busca sequencial em um arquivo | void binarySearchByLoop(long firstIndex, long lastIndex, FILE* f, char**value) {
while (firstIndex <= lastIndex) {
long middle = (firstIndex + lastIndex) / 2;
fseek(f, middle * sizeof(Address), SEEK_SET);
fread(&address, sizeof(Address), 1, f);
int result = strncmp(value, address.cep... | 0 |
905d069c5ee92659b9dbfd5b036d7081 | e2db5046fd4f0f0306fa6df2e9ae0237 | コースを走行しているときの動作を定義 | {
if(onTrain == false){
onTrain = GameObject.Find("ColStick").GetComponent<PersonCollider>().onTrain;
}
if(onTrain == true){
gameObject.transform.position = new Vector3(gameObject.transform.position.x + speed, gameObject.transform.position.y, gameObject.transform.posi... | 1 |
16064750519ed02fdea05b484079869a | f215e07f5c5d6e664f6fad4f91f0965a | Processes the TestRail get_status response | class OutcomeResponse
def process_xml(xml)
doc = REXML::Document.new xml
@message_identifier = doc.text("//imsx_statusInfo/imsx_messageIdentifier").to_s
@code_major = doc.text("//imsx_statusInfo/imsx_codeMajor")
@code_major.downcase! if @code_major
@severity = doc.text("//imsx_statusInfo/i... | 0 |
b57eb54c104d9f6cf8b10d30989c1e17 | 13f22a165e76d5672f90daffc614f0c5 | Cleanup icc references | static void gen_iccci(DisasContext *ctx)
{
CHK_SV;
} | 0 |
1f180fa7932ed1522cb7e427a3e31d89 | 76a2f97fe335ea8fd8950ba710523f56 | Returns a list of Operations that consume this tensor. | class Graph(object):
def get_operations(self):
if self._finalized:
return list(self._nodes_by_id.values())
with self._lock:
return list(self._nodes_by_id.values()) | 0 |
44b7b1b991af7e69d558d74d28f75c3a | 56475f6318c9f7447c65b02fd2972d66 | Returns the index of the paragraph containing a given character index. | namespace ScriptCoreLib.ActionScript.flash.text
[Script(IsNative = true)]
public class TextField : InteractiveObject
public int getParagraphLength(int charIndex)
{
return default(int);
} | 0 |
4a8e40b9494d01689a29f6d6a0d1152e | 53f2a918fcabc688095ab53ed1f6e2aa | Parses occurence of TTML subtitle. | export class SubtitlesParserService
protected parseOccurence(
element: HTMLParagraphElement,
tickRate: number,
nextKey: string
): ISubtitleOccurence {
return {
start: Number(element.getAttribute('begin').replace('t', '')) / tickRate,
end: Number(element.getAttribute('end').replace('t', '')... | 1 |
205c357dcdcbd7c6e1666022e0ce6e8b | 0c236bf23b4b4f3de7a0dec2429c8b0d | Set focused resource ID for indicator. | IUltraIndicatorBuilder setFocusIcon(Bitmap bitmap); | 0 |
eb6fdccf84691d61265520ab1c46c22d | 4cc6e61f92072ab4f0aa9095a63812c2 | Funkcja określająca rok, w którym urodziła się osoba. | xpath = './/div[@class="journal-content-article"]/div/p/text()'
Biography = Parser_Module._parser(URL, xpath)
for i in Biography:
Flag = False
for j in i.replace(",", " ").split():
if j == "Родился":
Flag = True
if Flag:
try:
... | 1 |
f86327b5bf4750362359733c99a3c743 | 7a5882a6f9531e6aff691ad109ef3362 | produit de deux polynomes | plus_1 = self.__polynome
plus_2 = other
result = {}
if plus_1 == {0: 0}:
for plus_2_exp in plus_2:
result[plus_2_exp] = plus_2[plus_2_exp]
elif plus_2 == {0: 0}:
for plus_1_exp in plus_1:
result[plus_1_exp] = plus_1[plus_1_e... | 0 |
38b94d56d730304084ff86db3725f60a | 9564d24716b8dc6a0b9f7ee1327aed8e | Read an array of count ints | public class BinaryUtility
public static bool readInts(byte[] buffer, ref int index, int[] destBuffer, int readCount = -1)
{
int intCount = readCount < 0 ? destBuffer.Length : readCount;
if (intCount > destBuffer.Length)
{
return false;
}
for (int i = 0; i < intCount; ++i)
{
destBuffer[i] = readInt(b... | 1 |
b9eb12be0aa7656c32390c42b75444e6 | 166fac860415dbe96b64e1550795a0de | Renders the already collected payloads.
Returns | public class WrappedOutputStream extends FilterOutputStream
public String getCollectedPayload() {
return payloadCollector.toString();
} | 1 |
5ee0e410d440a84e4990ab2502d4167f | 7a143d84b8ffabea854f435b5c800e78 | 单条评论 | function Level1_comment(msg) {
str = '<li class="comments-item" data-id="' + msg.commentNo + '"data-name="' + msg.childusername + '">' +
'<div class="comments-item-bd">' +
'<div class="ui-avatar">';
if (msg.commentuser.imagepath == null) {
str += '<img src="/img/first.png" />';
} else {
str += '<img src="' +... | 1 |
1685806887851d793f15b19aa3f299a7 | c7dc26ee64aeded93d3db30eba50d4ea | This gets bound to a delegate in SpatialRPCService and is called for each RPC extracted when calling SpatialRPCService::ExtractRPCsForEntity. | int CPL_STDCALL GDALExtractRPCInfo( CSLConstList papszMD, GDALRPCInfo *psRPC )
{
if( CSLFetchNameValue( papszMD, RPC_LINE_NUM_COEFF ) == nullptr )
return FALSE;
if( CSLFetchNameValue( papszMD, RPC_LINE_NUM_COEFF ) == nullptr
|| CSLFetchNameValue( papszMD, RPC_LINE_DEN_COEFF ) == nullptr
... | 0 |
aff785799e3ab00789cbfa3574c0b9b8 | a8f9238231d0cf4a2de40144f68514aa | Emit a single particle at position with velocity, color and transform point parent (Source Mode SOURCE.Script required) | {
float *org;
float radius;
float color;
float count;
float effect;
org = G_VECTOR(OFS_PARM0);
radius = G_FLOAT(OFS_PARM1);
color = G_FLOAT(OFS_PARM2);
effect = G_FLOAT(OFS_PARM3);
count = G_FLOAT(OFS_PARM4);
SV_StartParticle4 (org, radius, color, effect, count);
} | 0 |
1d52ee6da9468958dfa9624ce904053e | 31e440f81072deba6077630860314494 | Returns true if the <b>tableColumnComment</b> property is set. | public boolean isSetTableColumnComment(); | 1 |
88c382023691736b7529cc5552f45f65 | 3abb229696ff6e3e87c6c229f34d94ae | 拷贝图片到粘贴板 | {
DataObject data = new();
data.SetData(typeof(BitmapSource), source);
PngBitmapEncoder pngEnc = new();
pngEnc.Frames.Add(BitmapFrame.Create(source));
using var ms = new System.IO.MemoryStream();
pngEnc.Save(ms);
data.SetData("P... | 1 |
e207bfbbdcafbfddf37c46385b7d7453 | 920d833d2fecc5a886477b14614f8bab | Добавление почтовых шаблонов. | class ProfileController extends AppController
public function actionAdd()
{
$formData = Yii::$app->request->post();
$model = new AddMailBox();
if (Yii::$app->request->isPost) {
$model->email = $formData['email'];
if ($model->validate() && $mode... | 0 |
84bd5a439b20b49701eedc6287237eaf | e3f01dd3b042fa80202d076345406075 | Vectorized version of isEqual | {
Vector2 a(1.123456f, 2.123456f);
Vector2 b(1.123456f, 2.123456f);
return isEqual(a, b);
} | 0 |
fb85d595a3b732887d43749d96b5ea6e | 8f038c1690469c8a414295bbf1addcb2 | Converts an object to its culture-sensitive string representation. | {
var c = obj as IConvertible;
if (c != null)
return c.ToString(CultureInfo.InvariantCulture);
var f = obj as IFormattable;
if (f != null)
return f.ToString(null, CultureInfo.InvariantCulture);
return obj.ToString();
... | 1 |
200547c973e41465bfaeed8a75511815 | 7024833b470761cdc5d4a5215cc1045e | Renvoie le repertoire dans lequel ecrire les infos de l'activité | if (repAudio == null) {
String sep = System.getProperty("file.separator");
String rep =config.getProperty(Config.PROMPT_REP_AUDIO_ACTF);
if (rep.contains("*") || rep.contains("+")) {
String[] tabRep = rep.split(sep);
repAudio = construireRepAudio ("", tabRep, 1);
}
else {
if (sep.equals(... | 1 |
251dc18a8835f54243f3baeca2d767cd | fc38f42d1b226d831792ea9e13c4c0a2 | An intrinsic to mark the end of a *try* block. | class _FunctionBuilderInterface(object):
def try_(self):
self._owner.start_try()
return self | 0 |
584923cdb6267d15237124308eab27bc | a4dc7aa1144b943a54beae54273a1ad2 | Count number of times the DiceSet is rolled before it obtains a
certain value passed as a parameter. | int rep = 0;
for (DieImageButton dib : dice) {
if (dib.getValue() == repetingNumber) {
rep++;
}
}
return rep;
} | 0 |
72b6b4474604d043fbd0e98780dc3cbd | d41e9d4ee65e056cfef39738a8bf751c | Prime the cache for the main front page and archive loops by default. | class PgCache_Plugin_Admin
public function prime_post( $post_id ) {
$post_urls = Util_PageUrls::get_post_urls( $post_id );
foreach ( $post_urls as $url ) {
$result = Util_Http::get( $url, array( 'user-agent' => 'WordPress' ) );
if ( is_wp_error( $result ) )
return false;
}
return true;
} | 0 |
84adbd4b26e4c236803eeb8b1cb0fbc6 | 86cfcf40f1115a5cfba0cc9e285131b3 | Unites your <see cref="IEnumerable"/> into one <see cref="Set"/>.
Applies the "or" operator on those nodes | namespace Drexel.Collections.Generic
new void UnionWith(IEnumerable<T> other); | 1 |
ceddbf5a6d5294b5e04e14e0a57664a8 | dcd3eed7ac2a0db8a108015e50f2fa59 | Find coffee pods based on all fields | export default class CoffeePodRepository
async findCoffeePodByAllFields(incomingProductType: any, incomingFlavor: any, incomingPackSize: any): Promise<any> {
GeneralUtils.printStarsLine();
GeneralUtils.printInitiateMessage(
'CoffeePodRepository.findCoffeePodByAllFields', 'End',
);
GeneralUtils.pri... | 1 |
206ce8dac7ea37e8c3ab6c8c034df163 | 4ae9972c6fa45b02a4abf6c887b12637 | function : method to compare the whitelist hashes
return value : 1 on success (hash is present)
0 on success (hash is not present)
parameters : path of the file whose hash is to be compared | {
char *string_hash = sha256(string);
int equals = 0;
if (strcmp(hash, string_hash) == 0)
{
equals = 1;
}
free(string_hash);
return equals;
} | 0 |
fcbd8d8bc1d6d6185c64470fb188685a | 080a23c246994f61db952f48b8105fd8 | 计算经纬度所属的1✖️1公里方格编号,佛山市所在区域分为104✖️N的多个方格 | let dist = +lon + 91
return Math.floor(dist * 10)
} | 0 |
5f0dbd62c4e7d9dbeed41e059ae6aedc | 77ef91ed70ae66ab4ebc4e075dea6ee4 | Consultar cronograma del proyecto | namespace Ecopetrol.SGMP.Integration.ProjectServer
PSProjectTO ConsultarCronograma(Guid uidProyecto, Guid? uidTareaGerenciaProyecto); | 1 |
4d668be0be02ee7f8943b11b52d3ea45 | 114614b6185a2b1678482f0846affac0 | Utility function to convert an alert type string into a value we can store in the database. | att_types = {
'scheduled': Types.Scheduled,
'predict': Types.Predict,
'prediction': Types.Prediction,
'slack': Types.Slack,
'userinput': Types.UserInput,
'scheduled_reminder': Types.Scheduled_Reminder,
'slack_reminder': Types.Slack_Reminder,
'consultan... | 1 |
5f628956558f4a9e8ed8afaa6e99bf05 | f4e2322e2b7825b08dcf3f6c7caa24f1 | Converts this object into an AWQL query. | String toQuery(); | 1 |
4bde23920baab418a6f521a77a827236 | 47d765db5469fe296fac8229f751dd5b | 保证首次进入ctrl加载作业列表 针对奥数来自于自主训练的作业 | $.ajax({
type : "post",
url : $('#kettleForm').attr('action') + "list",
data : {
runStatus : runStatus
},
async : false,
beforeSend : function() {
},
success : function(data) {
$('#index-main-content').html(data);
},
error : function(request) {
alert("kettle作业列表请求失败!");
}
});
} | 0 |
68233ed97d21658dd7a5d3e6c898db60 | 09c120fed1b8ea456e4ef315972a18ac | @brief Set horizontal front porch for input signal | {
uint32_t lcdc_backporchxy_reg = 0;
REG_SET_FIELD(LCDC, LCDC_BACKPORCHXY_REG, LCDC_BPORCH_X, lcdc_backporchxy_reg, x);
REG_SET_FIELD(LCDC, LCDC_BACKPORCHXY_REG, LCDC_BPORCH_Y, lcdc_backporchxy_reg, y);
LCDC->LCDC_BACKPORCHXY_REG = lcdc_backporchxy_reg;
} | 0 |
5ba13aa00bd3531bcbedcb1b8ac9964f | ad6937930db058c572849d63b011203d | Gets GEO information about the current latitude/longitude | $request_url_base = $this->getRequestUrlBase();
$url = Url::fromUri($request_url_base . '/reverse/', [
'query' => [
'lat' => $latitude,
'lon' => $longitude,
'email' => $this->getRequestEmail(),
'limit' => 1,
'format' => 'json',
'connect_timeout' => 5,
... | 1 |
f0de5af6828631e6f8c2f3e0bde9bbf8 | 1abefe870e3527dee8539257eedb0f96 | Quick sorts triangles based on average z depth | void
SoVertexArrayIndexer::sort_triangles(void)
{
if (this->indexarray.getLength()) {
qsort((void*) this->indexarray.getArrayPtr(),
this->indexarray.getLength() / 3,
sizeof(int32_t) * 3,
compare_triangle);
}
} | 0 |
0ed81b7ebc59b1a1d634ee2969eca260 | 19ecc0ed20fe24eb0542afde85d7a13a | 对比2个开关量的信息是否相同 是否需要重新下发初始化 | {
bool flag = true;
if (List1.Count == List2.Count)
{
foreach (IncrementalEBRDTState item in List1)
{
foreach (var item1 in List2)
{
if (item1.SRV_LOGICAL_CODE_GB == item.SRV_LOGIC... | 1 |
b08066378ec9e31edbc7bcc340245f5c | a71d085a583f9cfcadc528f18d109910 | POST /filing_categories
POST /filing_categories.xml | @flag_category = FlagCategory.new(flag_category_params)
if @flag_category.save
redirect_to admin_flag_categories_url, notice: 'Flag category was successfully created.'
else
render :new
end
end | 0 |
f4037fc29a3b2b9f97f5970528c68da4 | dc7cb164a259f462550d43172f3b2c03 | Replaces xText's internal xtextLink_::0::3::/15 Proxy URIs with name:/Something URI Proxies.
This is used before writing XML. | <T extends EObject> T cloneAndReplaceAllReferencesByNameURIProxies(T rootObject); | 1 |
68cb2d0947350ff58fd98bd0e9a47abe | 2ba73a276665db3afc37e0a1dac752f3 | Constructs a properly formatted beginstep message
Returns:
An object of type `Message` which includes the step number. | class JSONResult(TestResultBase):
def handle_step_begin(self, msg):
self._steps.append(
{
"name": msg,
"start_time": time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),
"logs": [],
}
) | 0 |
60791d41d31dea8efe6c3d2c7f264d49 | 165b68befb303c64615dd09f05488815 | when tile is clicked, the movable function makes sure it is a movable tile
then we swap the empty space with the clicked tile by moving the position of the clicked tile to the empty
spot and reassigning the empty spot variable | {
int tempRow;
int tempCol;
clickTilePos = pieceOne.transform.position;
selectedScript = pieceOne.GetComponent<SlideableTile>();
swipeScript = pieceTwo.GetComponent<SlideableTile>();
tempRow = selectedScript.row;
tempCol = selectedScript.collumn;
selec... | 0 |
89c8399d01556d6e9c059638fb95f37e | a4ba51eb5f0a39eb6f02e7b2c49a6fd5 | Child should start new process group. | if sys.platform == 'win32':
return create_windows_process_group()
else:
os.setpgrp()
return None | 1 |
f81e689661b120e3dffa358c2a5a5a55 | 2c731419a2b2ec3365578d46d1083b72 | Test to check update armies after attack defender lost. | public void testReinforcement() {
india.setNoOfArmies(18);
pakistan.setNoOfArmies(22);
A.test=1;
A.setTestCommand("reinforce india 3");
A.executeReinforcement(testMap, listOfPlayers);
assertEquals(21, india.getNoOfArmies());
assertEquals(22, pakistan.getNoOfArmies());
assertEquals(43, A.getNoOfArmies(... | 0 |
dcf4176898926a315e238aa22c0f1cfe | 5aa4c7c182d94468b99f18ebc8edbce7 | Получение Застройщика по Id. | {
KontrAgent res = null;
using (var l_dc = new RealizationDCDataContext())
{
try
{
res = l_dc.uf_GetWlsInfo(_idsf)
.Select(k => new KontrAgent()
{
... | 1 |
9237d786bb1b76484d70cec5b5c93f62 | a9a883ab69da792df8425fce6c4d6795 | Retrieves a linked hub from IoT Provisioning Service. | namespace Pulumi.GoogleNative.NetworkConnectivity.V1
public static class GetHub
public static Task<GetHubResult> InvokeAsync(GetHubArgs args, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.InvokeAsync<GetHubResult>("google-native:networkconnectivity/v1:getHub", args ?? new GetHubAr... | 0 |
7816bd8e962678bfedfff341fe4714ff | 5b702fc2cda4a5832b7e829a26338ed0 | Start a LifeLine service which will accept lifeline call from other processes. | Runnable lifeThread = () -> {
ServerSocket lifeSocket = null;
Socket client = null;
ServiceTask serviceTask = null;
try {
lifeSocket = new ServerSocket(port);
run.set(true);
while (run.get()) {
cl... | 1 |
2725697016def6c2ccb89a05cbdc639e | 5b91f82c1dd4c6795f604d8986b16a27 | 오늘의 년월(YY-MM)을 조회하는 메서드입니다. | public class DateUtil
public static String getCurrentYearMonth() {
return getCurrentDate(YEAR_MONTH_FORMATTER);
} | 1 |
02e0edde2cb38575982b40bbdba3c4a4 | 537200af2782e2edb26c83f02c19e6b5 | 节点入度、出度的检查 | std::vector<std::string>::iterator output_node_name;
std::vector<std::string>::iterator input_node_name;
for (output_node_name = nodes_names_.begin();
output_node_name != nodes_names_.end(); output_node_name++) {
std::vector<std::string>::iterator output_data;
for (output_data = nodes_outputs_[*out... | 0 |
0c8acb3f995de4f972ba893ebc126e15 | 37f1c9c51550b59bc1e2f9ca59560b0a | Calculate the epanechnikov function on all difference values | def kernel_epanechnikov(inst: np.ndarray) -> np.ndarray:
if inst.ndim != 1:
raise ValueError("'inst' vector must be one-dimensional!")
return 0.75 * (1.0 - np.square(inst)) * (np.abs(inst) < 1.0) | 1 |
75f1f082357ae11cf2cc40e21fe466c6 | 6a02c95fb932df8603ddc07f7a768648 | 重新加载所有LUA文件 | function GameManager:reloadLua()
for k,v in pairs(package.loaded) do
local path = string.gsub(k, "%.", "/")
local filePath = cc.FileUtils:getInstance():fullPathForFilename("luaassets/script/"..path..".luac")
if filePath == nil or filePath == "" then
filePath = cc.FileUtils:getInstance():fullPathForFilename("l... | 1 |
7f98f3f6f09e162295a38d5dd799249b | faecba1c2b947a8408749a3114de9132 | 得到两个帧对应的特征向量之间的距离 | class ImgCST(object):
# 颜色矩阵特征
# Compute low order moments(1,2,3)
def diastanceColorFeature(des1, des2):
des1 = np.array(des1)
des2 = np.array(des2)
dis = np.linalg.norm(des1 - des2)
return dis | 1 |
ee3da4d8bf923cd5ae4235ee36f4fc40 | 64cbd6df3f1ff8b6daf3ac140848625e | action showResources | class ResourceController extends Controller implements ResourceControllerInterface
public function showAction(Request $request)
{
$context = $this->loadContext($request);
$resourceName = $this->config->getResourceName();
$resource = $context->getResource($resourceName);
$this->isGran... | 0 |
e9214017070e7b2095d72b63a58e8742 | ab9415e3260f455bb6cd454f926d1658 | Helper method to check if two objects are facing each other like so: -> <- | function checkOppositeDirectionFromVectors(oldVector, newVector) {
return (oldVector.x === -1 && newVector.x === 1) || (oldVector.y === -1 && newVector.y === 1) || (oldVector.x === 1 && newVector.x === -1) || (oldVector.y === 1 && newVector.y === -1);
} | 1 |
41756cbf73130b92b692f11719958186 | aa176a5e13e8f27fa764f90342ec5d84 | Gets the use failures directory. | public class StorageUtil
static public File getUsesrDir(){
return Environment.getDataDirectory();
} | 0 |
7499e46f18de4629f43e497e5240c1bc | 7eca3af065bdf22fc931c99afadfe9de | Update a user and return the updated user object. | class UserApi
def update_user(opts = {})
data, _status_code, _headers = update_user_with_http_info(opts)
data
end | 1 |
a64a7d81f59ca7ff7b22a706e94d4e5c | 6bcfe9ba5a2c178d894aea3f77d2f6db | Se obtiene el color correspondiente a un TipoColor dado | int color = 0xFFEF5B48;
switch (type){
case 1:
color = 0xFF23BB42;
break;
case 2:
color = 0xFFEF5B48;
break;
case 5:
break;
}
return color;
} | 1 |
609d594baefda7c6f83377baab576c77 | 42b23e189ab7d6853153ac8ba067ff6c | Getter method for Direct Fixed Amount | class MwsFinancesServiceModelDirectPayment extends MwsFinancesServiceModel
public function getDirectPaymentAmount()
{
return $this->_fields['DirectPaymentAmount']['FieldValue'];
} | 1 |
3f36764c8b842e4346bb877971f5be46 | 59c93e964a27a54443819631aa80104f | Full Adder Implementation | func fullAdder(input1 bool, input2 bool, input3 bool) (bool, bool) {
sum1, carry1 := halfAdder(input1, input2)
sum2, carry2 := halfAdder(sum1, input3)
return sum2, or(carry1, carry2)
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.