query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
94fb646772aeb1544a12a14fefa0a727 | 0ee7a26a600c56fec78e8f3fcca91fdf | 마감이 된 재분석이력이라면 전체 ReadOnly | {
if (grdReanalysisHistory.View.GetCheckedRows().Rows.Count == 0)
{
this.ShowMessage("GridNoChecked");
}
else if (grdGenerationHistory.View.GetFocusedRowCellValue("ISCLOSE").Equals("Y"))
{
e.Cancel = true;
... | 0 |
bb438b768ce29f7a6de2de0bcd287062 | 87d0b9d974d4793ebbd9626b8e79c34e | Check if site is multiDomain | if (! empty ( $this->items ) && is_array ( $this->items )) {
foreach ( $this->items as $item ) {
if ($item->getDomain ()) {
return true;
}
}
}
return false;
} | 1 |
39f22848416f85b207c22352b080489c | 9a5805d4ada20fe1212b82f70e93a122 | Gets the event_time of this AnalyticsMediaEndpointStat.
Specifies when an event occurred. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z | public class ResourceResponse public class Detail
public String getEventTime() {
return eventTime;
} | 0 |
59b56c35390b4e82cf5c6a3e48b724d5 | 2649707536ef15aac60735f7690b9f2a | 通过WId获取对应的课程 | namespace SXC.WebApi.Controllers
public class SxcWxController : ApiControllerBase
[Route("api/Courses/{id}")]
[HttpGet]
public IHttpActionResult GetCourses(int id)
{
var res = new ResponseBase();
try
{
var service = new WxService();
... | 0 |
e06fe9e0c2ed17ef132504a67eb12e7a | 429fd6aea5ff510d9f0b9a0325e94180 | -Gets the probe that is plugged into a given channel | const char* probeDescription = "Unknown";
switch (probeType ) {
case SIPPICAN_T4_OLD:
probeDescription = _SIPPICAN_T4_OLD_DESCRIPTION;
break;
case SIPPICAN_T4:
break;
case SIPPICAN_T5:
probeDescription = _SIPPIC... | 0 |
ada2268334b6ae3a99d81a08d223c0be | 464b80574e4c11dc372ca2cd96bfc2ab | 从session中获取UserOnline对象 | public class UserUtil
public static User getUserFromSession(HttpSession session) {
Object attribute = session.getAttribute(USER);
return attribute == null ? null : (User) attribute;
} | 0 |
2daf607ff70219aeaed9d3e4343cb879 | bf07b54fe089896e169f6bb1388d10b0 | Função Sem Retorno | function ola(){
echo "Olá mundo echo!! <br>";
} | 1 |
7c370ea696718efd4f28f240a23c3d94 | 44e3f510207004b03d11cf986fa17365 | Return all possible combinations of higher level and lower level modules, in pairs.
Each pair of modules consists of immediate children of two different layers. The first
module is in a layer higher than the layer of the second module. This means the first
module is allowed to import the second, but not the other way a... | public Set<ABoxModule> ABoxModularize(); | 0 |
84e8a84ce801d42efb31cdd0d4e110e6 | d636f0e3aa428a24df435c855bcf02e8 | 내 자식에 있는 오브젝트를 전부 가져와서 shotPositions에 넣는다. | {
for (int i = 0; i < _shotposition.Count; i++)
Instantiate(_bullet, _shotposition[i].position, _shotposition[i].rotation);
} | 0 |
07f16d9a3761661aa07dfcc1f06708ab | 25fa4c562f26e6354f7eb6d8ca9fcab3 | Computes log of the CDF of the discrete Laplace distribution. | if (lambda <= 0) throw new Error("lambda > 0");
return (1 / lambda) * (-1 * Math.log(uniform)) ** (1 / beta);
} | 0 |
71d37a05aa45d386b114d2e3ec997277 | 2ac1187494884cf4a6c2b3272ef0641d | 请求上传自定义迷宫 | setData(mazeData,-1,-1);
RandomQueue<Position> queue = new RandomQueue<>();
Position first = new Position(mazeData.getEntranceX(), mazeData.getEntranceY() + 1);
queue.add(first);
mazeData.visited[first.getX()][first.getY()] = true;
mazeData.openMist(first.getX(),first.get... | 0 |
53a905b080d55e081d8ef9b7741a7532 | 3c4cd314f9f0ef3fde24e484befb1191 | 获得已发牌的人数 | function OtherPlayer:getCardCount( ... )
return self.cardCount
end | 0 |
291ca544675e6965797af9b2f584354a | fcc9c4e2b19b7f44c5abf6eda09c8aad | Allocate `size` bytes with minimum `alignment` at `offset` bytes into the allocation. | class CStructParent():
def alloc_offset(self, size: int) -> int:
return self.parent.alloc_offset(size) | 0 |
7c203c10cfc48c2351cd375b610dfcc4 | 88999a03d7847c3a571f59e33d8a5b07 | inArraysにDeathがあるかどうか | function dieIndex() {
let arr=dieArray();
let dieNum = [];
for (let i = 0; i < dieArray().length; i++) {
let a = arr.lastIndexOf("死亡");
if (a === -1){
break;
}else{
dieNum.push(a);
arr.splice(a,1);
}
}
return dieNum;
} | 0 |
27459f715ba2a7159aa31b152913f283 | cf87773181225ea75a80fceca36b4abc | Method that merges the master entity with the appropriate localizable property set (based on the passed in cultureCode). | {
if (!culture.Equals(CultureInfo.InvariantCulture))
{
LoadResources(rm, culture.Parent, resources);
}
ResourceSet resourceSet = rm.GetResourceSet(culture, true, true);
if (resourceSet != null)
{
foreach (Dic... | 1 |
0a0bdc1ccf126e9ea502e053588d03fe | 6e7c025987afb62b2d894dd3af772e63 | Gets the HTML in a stored range. | namespace Au.Controls
public unsafe class SciImages
byte* _GetTextRange(int from, int to)
{
Debug.Assert(to >= from);
int len = to - from;
fixed (byte* s = AMemoryArray.Get(len, ref t_data.BufferForText)) {
if(len > 0) {
var tr = new Sci_TextRange() { cpMin = from, cpMax = to, lpstrText = s };
... | 0 |
f57a59cb45fa1541f3419ba4d4e09305 | 039a73de594223011c498314567462b8 | 给当前 Toast 设置新的布局 | public class ToastUtil
public ToastUtil setView(@Nullable int viewId) {
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context
.LAYOUT_INFLATER_SERVICE);
view = inflater.inflate(viewId, null);
isCustom = true;
return this;
} | 1 |
32ea52aa1bf1bea9995d65547d52cb05 | 1ee230f44cf027af0ad21356c602fbff | Add a new Camera with the CameraDetailModel
Or if ID is present, will update | class CameraSequencer(object):
def createCameraFromDB(self, show, scene, shot):
self._createCamera(show, scene, shot)
self.populateCameras() | 0 |
b7557992205768f5516ecda1c4748c94 | d235c6008f0546e1c282bbdcfd9dbc07 | POST: api/FaCourses | namespace API.Controllers [RoutePrefix("api/courses")]
public class CourseController : ApiController
[HttpPost]
[Route("")]
public IHttpActionResult CreateCourse(CreateCourseViewModel model) {
if (!ModelState.IsValid) return StatusCode(HttpStatusCode.PreconditionFailed);
... | 0 |
cc1746993cadd8ca4905ea7e582c3572 | b2db35b573bb86549548a42060d5f682 | Optimpizing paramaters per person | time_to_control_veto = 3
params = {}
params['max_player_accel'] = 7.
params['max_player_speed'] = 5.
params[
'reaction_time'] = 0.7
params[
'tti_sigma'] = 0.45
params[
'kappa_def'] = 1.
params['lambda_att'] =... | 0 |
8c82787d12aa03ed96b022bb06ef115e | 8020c5965960af4806b909f94513d98e | Generate a class correspondance from a lov result | {
$sAlias = $this->getTableQueryAlias();
$oClass = new \stdClass();
$oClass->id = $this->getField($data,'id',$sAlias);
$oClass->field = $this->getField($data,'field',$sAlias);
return $oClass;
} | 1 |
1b6c69c88fbb19c8a78e803ced1a2806 | 9e57bd335cfefc3b010c589c9f8b618e | TIM1 init function. PWM, channel 1, pin PA8 | static void setup_TIM1(){
RCC -> AHBENR |= RCC_AHBENR_GPIOAEN;
GPIOA -> MODER &= ~GPIO_MODER_MODER8;
GPIOA -> MODER |= GPIO_MODER_MODER8_1;
GPIOA -> AFR[1] &= ~GPIO_AFRH_AFR8;
GPIOA -> AFR[1] |= GPIO_AF_2;
RCC -> APB2ENR |= RCC_APB2ENR_TIM1EN;
TIM1 -> BDTR |= TIM_BDTR_MOE;
TIM1 -> PSC = ... | 1 |
9e5da9917790c39586225f26af1aa004 | 9ac451449c58de553a2824f6dddc6b4e | 设置立方体纹理名称 | namespace EarthView
namespace World
namespace Spatial3D
namespace Atlas
public class Scene : EarthView.World.Spatial.Atlas.Iscene
public new void SetName_NoVirtual(string name)
{
EarthView_World_Spatial3D_Atlas_CScene_setName_void_EVString_NoVirtual(this.NativeObject, name);
} | 0 |
d6691a280e4e5fb4e6a016d99d7dbd06 | eb4ab7a09d480c74d00632bb9d070168 | GetDocByName is only called from the Search Form and is not used
during indexing. When a retrieved item is selected in the search
results list, SearchForm calls GetDocByName to have the data source
retrieve the item. | public class Repo
public Document getDocument(String searchName) {
if (searchName == null) {
throw new IllegalArgumentException();
}
for (Document d : this.docs) {
if (d.getName().equals(searchName)) {
return d;
}
}
return null;
} | 1 |
96fb71c96514f4b0425ceca239d0b10a | b300a16a77974ddcaeba92a6e0b1c61d | Prepare a bgzipped file from a fastq input, potentially gzipped (or bgzipped already). | in_file = data["in_file"]
config = data["config"]
grabix = config_utils.get_program("grabix", config)
needs_convert = config["algorithm"].get("quality_format", "").lower() == "illumina"
if in_file.endswith(".gz"):
needs_bgzip, needs_gunzip = _check_gzipped_input(in_file, grabix, needs_conver... | 1 |
44cce9aa1e43dafa8edcf9094a79f87c | fbfec9b759b3c2adb8923591f9370daa | Returns True is city name is valid and found in either
name, asciiname or altnames | global dbnames
dbyml = os.environ.get('WIKIA_DB_YML', '/usr/wikia/conf/current/DB.yml')
lb = LoadBalancer(dbyml)
citiesDb = lb.get_db_by_name('wikicities')
cursor = citiesDb.cursor()
shoulddub = 'www.' if not self.sub.count('.') else ''
ownUrl = "http://%s%s.%s/" ... | 0 |
0c1f28a4baa14a87cc3da1bf3ab2f4fb | fcfb32dc0c25b9bccd19f20631f51e66 | In case it gets stuck before saving output (it has finished but has not saved),
mark save output as failed | void failedSave(IOException e); | 1 |
35b71d28fb1b9600d3955cb104cdb273 | 4f5a8510df3743ccd9a3e9b8207ae8ce | Register an inventory provider with Better Crafting. Inventory
providers are used for interfacing with chests and other objects
in the world that contain items. | public class InventoryListener implements Listener
public static void init(Plugin plugin) {
Bukkit.getPluginManager().registerEvents(new InventoryListener(), plugin);
} | 0 |
492c8650d195cb1bf8c1635b5448d25a | a7ac30a5723e9712b19649a9365c0767 | Returns this member type. | final class CompilationUnitCompletion extends CompletionRequestor public final class Variable
public String getMemberTypeSignature() {
return getMemberTypeSignatures()[0];
} | 1 |
ea011cd578e59c09728fc0ad6707a7bf | 2707bae0586c44d634ed8fc6c3004005 | Set the value of Pack Imp Id Study | public class Preprocess extends Task
public void setImplpack(String sub) {
options.implPack = sub;
} | 0 |
5e111998721ccff595029976f2259f77 | 1b36bdc833e96c40986218a1db8c0bea | Executes an ExecuteMultipleRequest for every set of 1000 requests in the collection, returning responses and continuing on error. | {
using( NoSynchronizationContext )
{
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.... | 0 |
b1bc90ac23daaecb2571ef2ec7910024 | 9b48cab16a683a980d7960b85698f7e9 | Updates the snakes positions on the screen every specified time interval. | self.t = threading.Timer(update_time, self.update)
self.t.start()
if len(self.positions) < self.length:
self.positions.append([])
i = len(self.positions)-1
while i >= 1:
self.positions[i] = list(self.positions[i-1])
i -= 1
if self.direc... | 1 |
cf60ab91359a2e6dc7bdfa7cc3a1cddd | 48191769ebcda7a5fa70b2b1d9c7ff7c | Intercept the provider action when a all changes have been applied on a datasource table | namespace Dotmim.Sync
public static class InterceptorsExtensions
public static void OnTableChangesSelected(this CoreProvider coreProvider, Action<TableChangesSelectedArgs> func)
=> coreProvider.On(func); | 1 |
1d9d6512a0ebc2ae8ea7f7b776abcf63 | ffe73caee264e63def48266c7e6c318a | Returns a new instance of default serializer configured for the given type of schema. | namespace More.Domain.Messaging
ISqlMessageSerializer<TMessage> NewSerializer<TMessage>() where TMessage : class; | 1 |
30acf0e5a621c075bd24f67631ef6ca7 | 269668df896668d572d3f8edcbf89ef1 | Gets a list of all the primary skill requirements for an item based on name or ID | public function getTaskRequirements($taskName); | 0 |
61a5558fe8141eca37fb7c44e6107f66 | b4cdcd8a84b27f6fcb911de733eebb79 | Fields specific to YoLo Loss | class YOLOv3Loss(object):
def __init__(self, head_grid_sizes, class_num, anchor_boxes, iou_thresh, loss_weights,
rectified_coord_num=0, rectified_loss_weight=None,
is_focal_loss=False, focal_alpha=0.25, focal_gamma=2.0, is_tiou_recall=False):
self.predict_decoder = YOLOv3Decode... | 1 |
bd2c22a33c6e6fbc68a84d66cb909711 | c9dc873d1b3f87db53bb582d62246430 | Create an async iterator to enumerate all extent records referred or being used. | {
Logger.LogInfo($"Getting extent values for entity type: {entityType}.");
try
{
List<long> globalIds = new List<long>();
Dictionary<DMSType, List<ModelCode>> class2PropertyIDs = new Dictionary<DMSType, List<ModelCode>>();
DMSTy... | 0 |
34b0eaec68ab29369c5bab1d8c46c43f | ce48e1b88f74d1d152fdb8a6fbdc07fe | 获取ImageLoader图片加载的配置文件 | public class ImageUtil
public static ImageLoaderConfiguration initConfig(Context context) {
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
context).threadPriority(Thread.NORM_PRIORITY - 2)
.denyCacheImageMultipleSizesInMemory()
.diskCacheFileNameGenerator(new Md5FileNameGenerator(... | 1 |
23e032027cb1bc46a4fa036426939f5b | 995c47d59f39f7a4923865930fac9b7e | ===========================================================================
DESCRIPTION
Pre-processor for FPC_SUNCHAN_GAIN transaction.
DEPENDENCIES
None.
RETURN VALUE
None.
SIDE EFFECTS
None.
=========================================================================== | {
switch(transNum)
{
case 0:
{
# line 71 "../sncSRSRGA.stt"
(pVar->CA) = 1;
seq_pvPut(ssId, 19 , 0);
printf("CALIB. ACTUATED !!\n");
}
return;
}
} | 0 |
8782cf68394831502f936a3809ad2a22 | 6d3ba893d84c25199d32d740dbb25e12 | Get the string we're using to replace bullets. | namespace AshesScenario
public class SpawnBuilding : Action
public override string getStringB()
{
return template;
} | 0 |
8996ff81c7454085a56ee97d1229822a | 700b670dfd75e45786d571f0bbbe32c3 | Retourne la liste des articles en vedette | {
$query = $this->manager->createQuery('SELECT a FROM App\Entity\Article a ORDER BY a.createdAt DESC');
return $query->getResult();
} | 0 |
be184fa70bee728ae319aa43917e0b7e | a132e1442d3b9e2b18c79c5b098a587e | Test case for team_members_id_design_shares_get
Queries designShares of TeamMember. | class TestTeamMemberApi(unittest.TestCase):
def test_team_members_id_design_shares_get(self):
pass | 1 |
213488f51942c1f0d6ac891533cb89de | 6e82c72ce30fd390a4627cb2f740b7ab | 执行TTA预测 | is_merge_bn = 1
out_dir = params.out_dir + params.save_path
model_file = out_dir + '/snap/' + params.model_snap
os.makedirs(out_dir+'/TTA/results', exist_ok=True)
os.makedirs(out_dir+'/TTA/test_mask', exist_ok=True)
backup_project_as_zip( os.path.dirname(os.path.realpath(__file__)), out_dir +'... | 1 |
46b1cf70b0c2ba47fdc92132d1b6dd47 | 830af6c6525d5cd42302bffe31fec0bc | Sends either a reply or an error reply by checking the first char.
If the first char is '-' the reply is considered an error.
In any case the given reply is sent, if the reply is also recognize
as an error we also perform some post reply operations such as
logging and stats update. | {
int rc;
DEBUG("Sending message: len=%d, data=%s", rhnd->buf.len, rhnd->buf.data);
rc = cr_senddata(rhnd->fd, rhnd->timeout, rhnd->buf.data, rhnd->buf.len);
if (rc != rhnd->buf.len) {
if (rc < 0)
return CREDIS_ERR_SEND;
return CREDIS_ERR_TIMEOUT;
}
return cr_receivereply(rhnd, recvtype);
} | 0 |
db31236e3e2457af3cf3726d61ae94c4 | a11833c383cf19310e82fe07696f74e8 | Добавление типа документа в базу | {
if (documentType == null) { return null; }
if (!string.IsNullOrEmpty(documentType.Name))
documentType.Name = documentType.Name.Trim();
if (!string.IsNullOrEmpty(documentType.DisplayName))
documentType.DisplayName = documentType.DisplayName.Tr... | 1 |
b02b987a14552d400d7c18f1a4296086 | b59b23fe14e6d2075f150f1755883bfe | ! Metoda realizuj¹ca obliczenia na potrzeby kolejnych klatek, generuje animacjê | {
timeElapsed += gameTime.ElapsedGameTime.TotalSeconds;
currentAnimation = (int)(timeElapsed * animationFPS);
switch (currentAnimation)
{
case 0:
currentAnimationIndexX = 0;
currentAnimationIndexY = 0;
... | 1 |
a51bbc96d41a006691881969194f39d8 | df7bbc4cebfd0c01b9a8c4d7c5810c1d | Perform an exhaustive round-trip test on the Russian spellout rules | namespace TestLanguageTools.DataBase
[TestClass]
public class DataBaseTest
private void TestLanguagePair(string LangId1, string LangId2)
{
repository.SetSourceLanguage(LangId1);
repository.SetDstLanguage(LangId2);
transliterator = new Oggy.Transliterator.Transliterator(repository, LangId1, Lang... | 0 |
b17fa5fa6d8d6d9a2be25eaf765ad734 | 5c96a0a4d6e009ed0983c939d6782f92 | 导出学生学籍信息表 | FileExportDto export(QueryStudentRollDto queryStudentRollDto)throws FileNotFoundException, IOException, IllegalArgumentException, IllegalAccessException; | 1 |
876abf9d5c3c8d287b056b2551684fc1 | 2e67674aa34b6ddf8c09e0aabf0f9369 | Returns a new object of class '<em>Plugin Repositories Type1</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | PLUGINDEPENDENCYType createPLUGINDEPENDENCYType(); | 0 |
9d528b9e87c5e93c1dccf3be500c6717 | 48072e138fa9c2de2d9cd7577ed8b9df | This adds a property descriptor for the Location X feature.
<!-- begin-user-doc -->
<!-- end-user-doc --> | itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EveComponent_locLongitude_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EveComponent_locLongitude_feature", "_UI_... | 0 |
dcd63e62ab6a26bb0466e3add4c39b15 | 84efe9b95f4b239d58ac72e146122599 | If the game is ready, handle the interaction. else, ignore it. | public class OthelloGameManager extends GameManager
private void handleGamePlaying() {
} | 0 |
0015ba530cfcf378684054b01df82db1 | 492f956c705420ffe2899548eb121507 | Initialize the indexes ``_lemma_to_class``,
``_wordnet_to_class``, and ``_class_to_fileid`` by scanning
through the corpus fileids. This is fast if ElementTree
uses the C implementation (<0.1 secs), but quite slow (>10 secs)
if only the python implementation is available. | class FramenetCorpusReader(XMLCorpusReader):
def buildindexes(self):
self._buildframeindex()
self._buildluindex()
self._buildcorpusindex()
self._buildrelationindex() | 0 |
254921daf13f851d1477a13f1cff884b | 13d77c67a69345ce5f0d01e4668be0da | Recursive function to fill Move Jump Table | node * getMoves(char funcBoard[BOARDROWS][BOARDCOLS], char cColour, char pColour){
node * head = NULL;
node * temp = NULL;
int distance, jumps;
for(int i = 0; i < BOARDROWS; i++){
for(int j = 0; j < BOARDCOLS; j++){
if(funcBoard[i][j] == cColour){
distance = 1;
jumps = 0;
if( (j-distanc... | 0 |
f74ee9dc0ab31a11f8efef53a78cc36a | 1acdd198d1a5e64870b8b26f36eb0926 | Check that the Velocity template used for this view exists and is valid.
<p>Can be overridden to customize the behavior, for example in case of
multiple templates to be rendered into a single view. | public class JetspeedVelocityViewServlet extends BridgesVelocityViewServlet
private VelocityEngine getVelocityEngine(Context ctx)
{
RequestContext requestContext = (RequestContext) ctx.get("JS2RequestContext");
JetspeedDesktopContext desktopContext = (JetspeedDesktopContext)requestContext.ge... | 0 |
9aa4c0fe688f0a05646fe38d367dc61e | 06ea921a1d3bebc2eb9b19f7d052c332 | Make sure expressions can produce lambda list keywords | public void ShouldDifferentiateLambdas()
{
var exp1 = ExpressionHelper.New<Foo, int>(a => a.Value);
var exp2 = ExpressionHelper.New<Foo2, int>(a => a.Value);
AssertNotEqual(exp1, exp2, CreateComparer());
} | 0 |
d11f640d7679ec89f83d5f34efdd8314 | bc9acb01c08b65ac5e6e956e8c210357 | 随机进入房间 | global $room_id;
$result = mysql_query ( "SELECT * FROM room WHERE `room_isFull` = '0' AND `room_status` =10020 ORDER BY `game_checked_num` DESC" );
$room = mysql_fetch_array ( $result );
if ($room) {
$room_id = $room [room_id];
$this->enterRoom ();
} else {
$this->createRoom ();
}
} | 0 |
e48d599f835612654a2fb0d7971c981a | 60a785b185f77df053a445ed2a0a1ad7 | 文字列形式で番号を発行する。<br />
発行する番号の数を指定する。返却値は番号の配列であり、要素数は、引数に指定した数と同じである。 | {
if (maxNum < 2) return new string[] { GenerateOrderId() };
string[] tmpOrderIds = new string[maxNum];
for (int i = 0; i < tmpOrderIds.Length; )
{
tmpOrderIds[i] = GenerateOrderId() + "-" + ++i;
}
return tmpOrderIds;
... | 1 |
d5aea9e222dae76c1f55c0c0957b0fde | 7a1808bb6a353aca12d09f57687acb8e | @brief Send to CLI an async message | int send_async(struct clock_connection *clk, char cmd) {
return send_char_async(clk->fd, clk->endpoint_out, cmd, NULL);
} | 1 |
420cbc40d1a1b704ba6e941180a38122 | 254d5fa1f0657f7e333e371af84dfb4b | 检查用户用过的设备,如果不存在或存在且不一样就更新设备,供writeFrame发通知时使用 | $userDeviceCheck = AppUserDevice::where('app_user_id',$models['app_user_id']);
if($userDeviceCheck->count() > 0) {
$userDeviceCheck = $userDeviceCheck->first();
$userDeviceCheck->device_type = $models['device_type'];
$userDeviceCheck->device_token ... | 1 |
680004db546b83637cba13af31f329b8 | c9920b36d5d945d2e247d1e49672e07a | Checks the data for missing dates and fills gaps with zeros | def fill_missing_hours(df, all_hours, oldest_date, newest_date):
df = df.reindex(all_hours)
df.loc[oldest_date:newest_date] = df.loc[oldest_date:newest_date].fillna(method = 'ffill')
return df | 0 |
1a70f1d72821406c402beed2ceec957d | 99ec9a9a4deb9ca50e3abe2f85982cc6 | sets key field5 in the data table. There is a VARCHAR key5 and a INT key5, you can choose to set a specific one or both | public Row5<Long, String, Integer, Integer, Timestamp> fieldsRow() {
return (Row5) super.fieldsRow();
} | 0 |
51bc76b62d19dce41c24a5b4cfbe9f94 | 9f9068b572d501840d84c51a5b4bc23d | Find all Ad Campaign Creatives by filters. | {
$searchModel = new ThAdCreativesSearch();
$queryParams = Yii::$app->request->queryParams;
$audit_status = !empty($queryParams['audit_status']) ? $queryParams['audit_status'] : ThAdCreativesSearch::CREATIVES_STATUS_WAIT;
if($audit_status == ThAdCreativesSearch::CREATIVES_STATUS_WAIT ||
$audit_status ==... | 1 |
195f21a087b407156e54cb6b8f9c6570 | fa2a8620b2e47445281557c9bf57a859 | 如果频道设置了【固定标题】,要用固定标题替换掉第一个图文的标题 | class ArticlesPostRssFeed(Feed):
# 通过聚合阅读器跳转到网站的地址
def item_title(self, item):
if item.column:
return '[%s] %s' % (item.column, item.title)
else:
return '%s' % (item.title) | 0 |
bc28758ded2a29eee2237bf7623c8231 | 3487d6d457116d26fdb7ca2d331a801d | Set the TextViews and Buttons to a custom font. | public class BattleMenuActivity extends Activity{
void setFont() {
Typeface tp = Typeface.createFromAsset(this.getAssets(),
"SFSlapstickComicShaded.ttf");
campaignBtn.setTypeface(tp);
campaignBtn.setTextSize(26);
marathonBtn.setTypeface(tp);
marathonBtn.setTextSiz... | 1 |
bfa247fdcbe50e6a8b80f1ebbc99ccb8 | 146e9bed86af6fa9c042ec7745ce4032 | Move bundle files from their temporary directory to the final directory on the SFTP archive.
This will also rename the files to their checksum (for legacy purposes). | {
$targetArg = rtrim($input->getArgument('target'), '/');
$this->filesystem = $this->getContainer()->get('filesystem');
$client = $this->getContainer()->get('bongo.s3client');
$bundlesDir = $targetArg.'/bundles/';
$io = new SymfonyStyle($input, $output);
$io->newLine(... | 0 |
bd25c1adb8da93954ccd9d5008d6c230 | 0fd31488fdb18b122f7412713e887da3 | Run the reboot tasks
true means success. Continue with the request
false means failure. Either the db is not running yet or another process is running the reboot tasks. | self.msg_handler.sendMsg(msg_pb2.MSG_CMD_REBOOT_SYSTEM)
msg_ret = self.msg_handler.recvMsg(1);
if msg_ret is None:
return True
cmd = struct.unpack('H', msg_ret['payload'][:2])[0]
if cmd != MSG_GET_CMD_RESPONS(msg_pb2.MSG_CMD_REBOOT_SYSTEM):
print("ERROR:... | 1 |
0a6138ed2ff8c6dc158d04f90600a1ac | da458723d32d32f9120ee64d8a8ea281 | Draws the vertical lines before the datasets are drawn | class Plugin
implements PluginServiceGlobalRegistration, PluginServiceRegistrationOptions
beforeDatasetsDraw(chart: Chart, easing: Easing, options?: any): void {
forEach(chart, (ds, meta) => meta.drawRightBorders());
} | 1 |
f9cab75c17dd2db53d321911163791a8 | df70164b9cee00c6c641c2ff45011aa2 | Get OS service manager. | abstract class AbstractTestCase extends \PHPUnit_Framework_TestCase
protected function getServiceManager()
{
return \TestBootstrap::getApplication()->getServiceManager();
} | 0 |
0c413c9313f6d7f28bfc3535f714343e | 09a2a4360db1b7bed50458e7a9306b5a | This winsorizes vote shares to a given percentile. | q = pv.copy()
if pv.sum() > 1:
diff = pv.sum()-1
q[q.argmax()] -= diff
elif pv.sum() < 1:
diff = 1-pv.sum()
q[q.argmin()] += diff
return q | 0 |
af5ef670991885ae8162d461a70ded07 | dd3bb965b4b649e754c1bfe5af71a2ef | 商品情報取得.(dtb_productsの情報のみ) | $objQuery =& SC_Query_Ex::getSingletonInstance();
$col = 'T1.product_code, T1.price01, T1.price02, T2.stock, T1.stock_unlimited, T1.sale_limit, T1.deliv_fee, T1.point_rate';
$where = 'T1.product_id = ? AND T1.classcategory_id1 = 0 AND T1.classcategory_id2 = 0 AND T1.product_class_id = T2.product... | 0 |
503cbf9fbd041b722a6ffbec9d61e78e | 6357500af70387a18b9d103308789df9 | 查找多个部门员工 | @Query("from Staff sl where sl.department=:dname and sl.companyId=:cpid")
List<Staff> find(@Param("dname") String dname,@Param("cpid") BigInteger cpid); | 0 |
ef1599c113a8bfe4b8b93a4b969fa43a | 745d8f42502f3a6b25a16638c7b9e540 | Setzt die Sichtbarkeit für den Save- und den Löschen-Button bzw. den/die
dazugehörigen Menüeinträge. | public class ButtonForm extends GridLayout implements ClickListener
public void enableDisableSaveAndCancelButtons(final boolean enabled) {
setEnableSaveButton(enabled);
setEnableCancelButton(enabled);
} | 0 |
47d7a17db9a315b4aa0ee1eb98a227b4 | 94f7bb3a5299bfb25964a9243dd26123 | Check if 'cluster' has a value | class GetNodePoolRequest extends \DrSlump\Protobuf\Message
public function hasClusterId(){
return $this->_has(3);
} | 1 |
651bf3b6ab2d0929660e76d5e7b660ef | 643823b912e4b6a0ecde496e218cd4e2 | аналог метода items | class ValueBag(dict):
def _items(self):
return super().items() | 1 |
cdb68d55b0e4fc9e471f4f1e6c1efabf | 82a8c23a7b6ecf07937a197072784b39 | 将Url地址的图片转换成base64 | if (!judgeUrl(url)) {
callFn(url||"")
throw new Error('图片URL有误')
}
window.URL = window.URL || window.webkitURL;
var xhr = new XMLHttpRequest();
xhr.open("get", url, true);
xhr.responseType = "blob";
xhr.onload = function() {
if (this.status == 200) {
if (typeof FileReader === 'function')... | 1 |
b2b029814cf47cb5ce3649a65e82c6f5 | 002e4ef90a7bb036464eac6d4eb6c822 | Creates a pointer to renderer associated with this window object | Renderer* MandelbrotViewer::getRenderer()
{
return &m_renderer;
} | 1 |
0e1a9475d86818f607b0af1468b099e5 | 66d207310f6db71e6e2aa9007c82c97c | Called when recevied error message from server.
Create error_dlg from GUI.errordlg with error message. | protected void done() {
if (err != null) {
ErrorGUI egui = new ErrorGUI(err);
egui.createGUI();
} else {
clientGUI.postLoginGUI(clientGUI.getContentPane(), rollNo, name, host, port);
}
} | 1 |
af34f29ff33dad18c5a7d3e560782def | 53014ea745678416aa46edc7bd0b8191 | Notification a form is about to be filled in with data. | public class MvacController implements TransportLayerListener,ActionListener,StorageListener{
public boolean beforeFormDisplay(FormData frmData) {
String formName = frmData.getDef().getVariableName();
Vector prefilledQns = this.wir.getPrefilledQns();
for (int i = 0; i < prefilledQns.size(); ... | 1 |
e3cdd5130336dabf13a5c50fcad3d922 | 6ce8ebef203d4f53c8da639ffcf46d3b | Display the tv series that are airing today | show_on_today = db.execute("SELECT show, time FROM tvshows WHERE day=?", [day])
i = 0
while i < show_on_today.length
puts "#{show_on_today[i][0]} is on at #{show_on_today[i][1]} on #{day}."
i +=1
end
end | 1 |
fc60afbf0ecdefa19114161c6c78d897 | 6be0a01506e707ce912a245a4980659b | Test if users has 10 elements. | class IndexUserControllerTest extends TestCase
public function testExample()
{
$this->generateUser(10);
$data = (new UserController())->index();
$this->assertTrue(count($data) == 10);
} | 1 |
7d55c30342c0b78b8484bdfc72013fbc | e7c04f7deaf8e615a4b9c26f40357328 | returns the query that produced the table model | class PQSQueryUI():
def table_model(self):
return self._table_model | 0 |
5d6030e1d99a5feed8615bf7702b90f8 | 62052ff43bdc71a9007475d562b89d15 | Process a <person2> AIML element.
<person2> elements process their contents recursively, and then
convert all pronouns in the results from 1st person to 3rd
person, and vice versa. This subsitution is handled by the
aiml.WordSub module.
If the <person2> tag is used atomically (e.g. <person2/>), it is
a shortcut for <p... | class Kernel:
# module constants
def _processPerson(self, elem, sessionID):
response = ""
for e in elem[2:]:
response += self._processElement(e, sessionID)
if len(elem[2:]) == 0:
response = self._processElement(['star', {}], sessionID)
return self._subb... | 1 |
dcb1a5d16917930df791936ddcff85f6 | 1c579034b6ff6844f0ab11e57b72196a | Fonction qui permettra de changer la photo de l'auteur des citations aléatoires | namespace EducationAll
public partial class BoxUserInfo : UserControl
private void ChangeImage()
{
int img = new Random().Next(1,7);
ImageSource imageSource = new BitmapImage(new Uri(@"pack://application:,,,/EducationAll;component/Images/ImageProfil/" + img + ".png"));
th... | 1 |
1abd62dfd8cefbba314329246d77012c | 7bb532d40ed956ea22d1a78e80f6f2a9 | Verifica se há arestas paralelas no grafo | int e;
for(e = 0; e < pGrafo->nArestas; e++){
if((pGrafo->Adj[u][e].IncideAresta > 0) && (pGrafo->Adj[v][e].IncideAresta < 0)){
return 1;
}
}
return 0;
} | 0 |
37a646fc0a1471943eab0f7082d7f936 | 66e5e2981911bbb5bb0daf66a9398d7d | Cadastrar Client Token | namespace Equipe2_PneuStore.Controllers
[Produces(MediaTypeNames.Application.Json)]
[Consumes(MediaTypeNames.Application.Json)]
[ApiController]
[Route("[controller]")]
public class ClientController : ApiBaseController
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(Stat... | 0 |
8ceaba04e4f3c04a4424c336e595736e | 8aad2c2dc47367eec07b751573cf61dc | Get the editbox, using the search criteria. | class PublishWindow(base_frame_view.BaseFrameView):
def edit_box(self):
return text_field.UIATextField(self.parent, type='UIATextView') | 1 |
a5f1394d0dcf8824d352c20920f85e1f | 9a9ebc91a96b41ed26bdb6be25728058 | Modify validation rules for update mode. | {
return [
[['name', 'price'], 'required'],
[['name'], 'string', 'max' => 255],
[['product_id'], 'required', 'on' => 'variantAddedFromUpdate'],
['product_id' , 'number', 'on' => 'variantAddedFromUpdate']
];
} | 1 |
159fffe2bfa4e7730e5c57b330fd74b1 | b209e8e19c9075659d3c79285316c0b2 | <p>Sets the details for first place winner for contest.</p>
contest. | public class ContestReceiptDTO implements Serializable
public void setFifthPlacePrize(double fifthPlacePrize) {
this.fifthPlacePrize = fifthPlacePrize;
} | 0 |
75e6197a0221fc327d6115235a5112e7 | c43c3d3b953ebc0118eba37480175806 | ``True`` if the left shoulder button is pressed. Available only on game controllers with the ``standard`` or
``extended`` profiles. | class XBox360Controller:
def left_stick_button(self):
return self.joystick.get_button(self.LEFT_STICK_BTN) | 0 |
91b89ea0e33fba0e2d17d3c8d8e59fd7 | 90f0ca20ab615dd01e9d248e9f14d5fc | Add entity collection to DbSet. | {
if (entityList == null || entityList.Count == 0) return false;
entityList.ToList().ForEach(item =>
{
_Context.Set<T>().Add(item);
});
if (IsCommit)
return await _Context.SaveChangesAsync() > 0;
else
return false;
} | 1 |
24e18cd3f420abcd1850885f6b6b7b7e | 818d4db57aeedd07edd1cd75b53697dc | 将对象转换为IJson类型 | namespace ClownFish.Log.Serializer
public class JsonWriter : FileWriter
protected override string ObjectToText(object obj)
{
return ClownFish.Base.JsonExtensions.ToJson(obj);
} | 0 |
882c1870727fe938023da533cd8e8889 | 916393c2874fe47bd29ff2b8c50183c4 | Format the dollars with 2 decimal places, commas to group digits and parenthesis for negative amounts. | def format_dollar_string(value):
if value >= 0:
return_str = "${0:,.2f}".format(value)
else:
return_str = "-${0:,.2f}".format(-value)
return return_str | 0 |
de73168bb89cfe45b8ff423f92f9e72d | 045f2e9dea2a13bf9891d01758149f35 | Web Action Method to fill the text box field and log the result | public class MyThread implements Runnable{
@Override
public void run() {
infoString = WebServiceGet.executeHttpGet(username.getText().toString(),password.getText().toString(),"ServLogin");
showResponse(infoString);
} | 0 |
d6c49c6c9ec7e9d1bc32c5b57687087d | d15b53ee7a4d081f8ee58366bb49d655 | Track state (record, mute, solo) notifier (proto-slot). | {
qtractorTrack *pTrack = NULL;
if (m_pTracks)
pTrack = m_pTracks->currentTrack();
if (pTrack == NULL)
return;
#ifdef CONFIG_DEBUG
qDebug("qtractorMainForm::trackStateMonitor(%d)", int(bOn));
#endif
m_pSession->execute(
new qtractorTrackMonitorCommand(pTrack, bOn));
} | 1 |
6de508ae01d60586c87a752d4ce3ca95 | 6391d6fad69fcc9e410e029036318315 | Makes last known position invalid to force execution of tile loading logic. | namespace Dragon.Loaders
void Invalidate(); | 1 |
df98fdee8bbd642084b410ae8fe0f7b9 | 48362e50986692ef8e2ecaeaf66fd351 | Simple check to see whether a slot in the array is occupied or not. | public class PlayerInv : MonoBehaviour
public bool CheckSlot(int tocheck)
{
bool toreturn = false;
if(ArmorSlots[tocheck]!=null)
{
toreturn = true;
}
return toreturn;
} | 1 |
69c7f249ec349caa2c07389de249c89e | dcb96fbe3dbc9e8cb890cf952d7ab201 | METHOD Compile.getMakefileCleanRule
Get Makefile rule to clean
Input: None
Output: Makefile clean rule | {
string temp;
int pos;
ret.clear();
temp = "cl -c";
for ( int i = 0; i < includedirs.size(); i++){
temp += " -I" + includedirs[ i];
}
for ( int i = 0; i < csources.size(); i++){
temp += " " + sdir + "\\";
if ( top == false)
temp += mydir + "\\";
temp += csources[ i];
temp += ".c";
}
ret.push_back... | 0 |
6af35bef0ccc35c40977e8ff3238fa27 | d9b1c28bdfe2432f5cf3130728d6acbe | Returns the meta object for the attribute '{@link org.abchip.mimo.biz.model.product.store.ProductStoreShipmentMeth#getMinimumPrice <em>Minimum Price</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SingleShotValueType_minimum_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SingleShotValueType_minimum_feature", "... | 0 |
464b32616af87464487b16644e1bb48a | 42404dcbbb2f4fc81193561e20afd5ea | Prints out a numpy vector interpreted as data from the IMU, in the
order X-gyro, Y-gyro, Z-gyro, X-accel, Y-accel, Z-accel. | def handle_quat(data):
epoch = data[0]
xyzaccu = data[1]
print("QUAT [{0}] W {1}, X {2}, Y {3}, Z {4}".format(epoch, *xyzaccu)) | 0 |
aa3f2d8dd85a84185d8bd43a28bb493b | 7bb79adbed4a3daa428664777380dfc5 | 获取最新的指定主机id的CPU数据并send | def send_host_usage():
hm = HostMgr()
hm.send_data_usage() | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.