query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
089701f8df1ba4ab46f4caaf8610b756 | a9018a35433db8e8e68366e43a9c94b5 | Set HierarchyRootNodes value | class EwsEffectiveRightsType extends AbstractStructBase
public function setCreateHierarchy($createHierarchy = null)
{
if (!is_null($createHierarchy) && !is_bool($createHierarchy)) {
throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($createHie... | 0 |
6238f24958c8db64ef7e3753e6a2fe98 | ae90b90a0a62d036e1d72b6bcb9bb804 | This function creates the required hidden fields
which are used to synchronize the selected items
after a server round trip. | {
$user = UNL_UCBCN::getUser($_SESSION['_authsession']['username']);
$calendar = UNL_UCBCN::factory('calendar');
$calendar->id = $_SESSION['calendar_id'];
if ($calendar->find())
$calendar->fetch();
if(!UNL_UCBCN::userHasPermission($user, 'Location Add', $calendar)... | 1 |
bc2595c6b68d66342fdf2824ea72f4b1 | caffc3b5afa40311c6a770fc27d462c2 | Return the library that contains this element. This will be the element itself if it is a
library element. This will be {@code null} if this element is an HTML file because HTML files
are not contained in libraries. | public String getLibrary(); | 1 |
464e9d7f65aa65604e02698325b677e8 | e6ec7ab302784ab58499ccf21475449b | Renvoie le nombre de places de la salle de theatre. | const int saaq::VehiculePromenade::reqNbPlaces() const
{
return m_nbPlaces;
} | 0 |
3795ebc5e88cda35afa25d875c58e51c | e21636436554b40dae6056764b2a191f | カメラ方向の取得 | Math::Vec3& Camera::GetOrientation()
{
return this->orientation;
} | 1 |
c848111d299e3b6507712b9315fd84a6 | f5458fe760b9de6514a48eaea0d168a7 | Busca os dados da validação | class nt_dicas extends NT_Model
public function getRules(){
return $this->validation;
} | 1 |
d7634cc73c51099aabbab0cf9e235b95 | cc40cba2d43f1babc2506159826009cf | Assigns the cell to be the number i. Updates all cells in the group
such that they can't be i, and assigns them if they can only be one value.
Returns false if it leads to an inconsistency,
i.e., Something is wrong on the board, so setting this cell to i leads to
a cell not being able to be anything | int preVal = board->cells[rowInd][colInd].value;
board->cells[rowInd][colInd].value = val;
if (preVal != 0) {
board->nonEmptyAmount--;
unmarkValidNeighbors(board, rowInd, colInd, preVal);
}
if (val != 0) {
board->nonEmptyAmount++;
markErroneousNeighbors(board, rowInd, colInd);
}
return preVal;
} | 0 |
16c8bbc934f2c5c859fa0fd89d0967b5 | 573d0f71871903c857d2ff6f2d272650 | make the game board with correct dimensions | gameBoard = new Cell*[height+1];
for(int i=0; i<height; i++){
gameBoard[i] = new Cell[width+1];
}
} | 1 |
74fbde7430ce41c07d10466c4e19ffe3 | e245a6516d7ab21f48680e6b58076609 | 根据登录用户用户的权限,获取用户能管理的分校 ID、名称 列表 | namespace DotNet.Business
[OperationContract]
string[] GetUserScopeModuleIds(BaseUserInfo userInfo, string userId, string permissionItemCode); | 0 |
d6e873dc98e300459813e42b566d25f0 | 7cc33acd611a1d3afa1eb00fa152acdc | Gets the readable time since publication. | {
var time = (DateTimeOffset)value;
if (time == DateTimeOffset.MinValue)
return string.Empty;
if(time.Date == DateTimeOffset.UtcNow.Date)
return $"Read {time.ToLocalTime().ToString("HH:mm")}";
return $"Read {time.ToLocalTime().ToStr... | 0 |
05cfeca6d32c1007eb23ba7109f4f2b3 | 4f3e9a3be61a81005a3a5d730c5842c1 | curlから呼び出されるストリーミング受信関数 | https_curl_result_callback(void *contents, size_t size, size_t nmemb, void *userp)
{
size_t realsize = size * nmemb;
char *newreply = NULL;
wrkrInstanceData_t *mem = (wrkrInstanceData_t *)userp;
newreply = realloc(mem->reply, mem->replyLen + realsize + 1);
if (newreply == NULL) {
dbgprintf("... | 1 |
40540bbe2f40d5a4191013b464d2c68d | f943184043fb29e2673be3728155ad23 | @brief Draw a line of text to a cairo context. | drawtext(XftDraw *draw, XftColor *color, int x, int y, unsigned h, const char *text)
{
int textwidth = 0;
while (*text) {
XftFont *currfont;
XGlyphInfo ext;
FcChar32 ucode;
const char *next;
size_t len;
ucode = getnextutf8char(text, &next);
currfont = getfontucode(ucode);
len = next - text;
XftTextE... | 0 |
9b0c74f2a4bd1e261e1671db866aaab5 | a148fc4336f60c793b8b4aff99ef9a82 | 用户表格快速更新电话 | DUserEntity dUserEntity = DUserEntity.DSL();
dslFactory.createUpdateable()
.update(dUserEntity)
.set(SetFilter.set(dUserEntity.uiPhone, phone))
.where(dUserEntity.uiId.eq(userId))
.execute();
} | 1 |
092cd08bfe2299a6481e5a9b8c28918b | 8f62b2112de1f8081e7d20bceb646601 | 用户信息发送语音验证码接口(Get方式) | public IHttpActionResult GetSms([FromBody]GetSmsReturn ret)
{
if (!string.IsNullOrEmpty(ret.getSmsTel))
{
GetSmsReturn retu = new GetSmsReturn();
Random rad = new Random();
int ranValue = rad.Next(100000, 999999);
st... | 0 |
67f3d961f64b91cf2c89bbf8ba252ec8 | 3bde136cf4995565fb69a2f7e08c0644 | Correct from mouse to OpenGL co-ordinates. | namespace CodeFull.Extensions
public class Helpers
public static Point GetGLMouseCoordinates(Point mousePosition)
{
return new Point(mousePosition.X, GetViewportArray()[3] - mousePosition.Y);
} | 1 |
796f7cd61ad324b18adc2b537af7869c | a6879e701217c81a2462f9457a617be9 | 滑动到第一条预约消息 | void scrollToTodayFirst(); | 0 |
fb02d7038ed397659de016ec12d3e69c | c8f50da3971d27b0f8a8b747224951c5 | Adds a shout to the database. | class ShoutsController
def index
@shout = Shout.order('RANDOM()').first
@shout = "No shouts! :(" if @shout.blank?
end | 0 |
1b6381621a63094eb94b8a55d2ffdfdc | 57b46c4fb0b0311dbc5b4da588d885c4 | Se trata de identificadores del estilo siguiente:
1 = casa( casa.jpg, casa.mod ) | {
var s = ScanWhile(Identifier);
if (CheckChar('.'))
{
SkipChar();
s += "." + ScanWhile(Identifier);
return s;
}
return s;
} | 0 |
1fbd4306fdef0514bca1978d36bceb9d | f64bfa05b56b499a39b88dd1ac63bab9 | Evaluate spline interpolator
Not implemented | func CubicSplineCurve() (float64, error) {
return 0, nil
} | 1 |
f19f820d081ac6f1a3499056cd9b3c7b | 6fda56fc11d596815347dc45fcb6f607 | Provides information about a "classic" Elastic Load Balancer (ELB).
See [LB Data Source](https://www.terraform.io/docs/providers/aws/d/lb.html) if you are looking for "v2"
Application Load Balancer (ALB) or Network Load Balancer (NLB).
This data source can prove useful when a module accepts an LB as an input
variable ... | class _HaproxyLayerState:
def elastic_load_balancer(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "elastic_load_balancer") | 0 |
98653cd1dbdf0e2690c437becdd5fa68 | 8d5330f4f8bf24a9d80eb832d8d51d08 | Coordinate transformation from local reference frame of sensor with a given sensorID
to the global coordinate system | sensor_world_matrix = get_matrix(camera_transform)
world_sensor_matrix = np.linalg.inv(sensor_world_matrix)
sensor_cords = np.dot(world_sensor_matrix, cords)
return sensor_cords | 0 |
d7f4eb84beabfeac0942bed3e1e0d98b | 9f9f9cbac2f080fb8176fba7cf20fe34 | Put an end to tuning.
Use the specified trial or best trial to init and compile the base model. | class HungaBungaBase(BaseModel):
def tune(self):
return self.train() | 0 |
05b93bf301bd5010764eadf80a1028fb | b820aadbe740b43ff3e6fba9a766c389 | 根据类型创建NLogLogger | namespace FMM.Common.Log
public class Logger
public static Logger CreateLogger(Type type)
{
return new Logger(type);
} | 0 |
b9a8113371872e7b09c75de94503c581 | a2f392579d404a810cd282ce94b0f690 | This function ensures the QSPI communication between Master and Slave and checks whether
the data transfer was correct or not | self.Open()
self.Stop()
self.SetSCL(0)
vData = 0
self.SetSDA(vData)
if self.GetSDA() != vData:
self.Stop()
self.Close()
return False
vData = 1
self.SetSDA(vData)
if self.GetSDA() != vData:
self.Stop()... | 0 |
2e42d93b48effbfbc9b473638457a94e | 471eef494dbcd1851533346ff2c45a73 | 引数urlのzoomミーティングに参加する | id = id.replace(' ', '')
password = password.replace(' ', '')
url = 'zoommtg:"//zoom.us/join?confno=' + id + '&pwd=' + password + '"'
cmd = "open %s" %url
subprocess.check_output(cmd, shell=True) | 1 |
48c42d5df16cb9375fc25a007dee1b8e | 5d42fb6241373138294a98c89e0bfba9 | CustomerInputMenu============================================================= | {
cout << endl;
cout << "Please select from the following options\n";
cout << "----------------------------------------\n";
cout << "1. New Customer Arrival\n";
cout << "2. Serve Customer\n";
cout << "3. Remove Customer From Waiting List\n";
cout << "4. List All Current Customers\n";
cout << "5. Quit Program\n"... | 1 |
b5b3a1af4d4f2eae6b5e707266b23938 | 4a90388381d6248194c202a457c534b4 | While Queen Antonia is not dazed or dead, she will chase the player around the level | {
if (isChase)
{
transform.position = Vector3.MoveTowards(transform.position, player.transform.position, 1f);
transform.LookAt(player.transform.forward);
}
} | 1 |
3f0302490c7c43f89ad38db27acf8a45 | cdb3f5150cc47fa78dbae46d4a28c0a3 | Gets the mapping name extractor. | public class DatasourceExtractor
public List<ReaderMapping> getMapping() {
return mapping;
} | 0 |
85a9df974b2e82ee7b16ad9022a723be | 0817086d8ddd102415b4a68b743ce1d6 | Returns the number of laps in this race | int i;
double sum = 0;
for (i = 0; i < racecar->n_laps; i++) {
sum += racecar->laps[i];
}
return sum;
} | 0 |
50602fae01c4d354a8c927954df31850 | e1107b7d4a3101280fb4a58d163b92e7 | Detect link replace text | class Cgn_Content
function setLinkText($lt = '') {
if ($lt == '') {
$lt = $this->dataItem->link_text;
}
if ($lt == '') {
$lt = $this->dataItem->title;
}
$lt = str_replace('&', ' and ', $lt);
$lt = str_replace(' ', '_', $lt);
$pattern = '/[\x{21}-\x{2C}]|[\x{2F}]|[\x{5B}-\x{5E}]|[\x{7E}]/';
$preglt... | 1 |
bb74dae87025c8285caef43e9fe64585 | 4484b8217503dd56299da56294a210aa | Método para clique do botão criar matriz 1 | public class MatrixFrame extends javax.swing.JFrame implements CalculateMatrixObserver
private void jmiCreateNewMatrixActionPerformed(java.awt.event.ActionEvent evt) {
CreateMatrixDialog cmd = new CreateMatrixDialog(this, true);
cmd.setLocationRelativeTo(this);
cmd.setVisible(true);
} | 1 |
a18f405dde6bc8ca76490bf3f7e58300 | 59eb61c2704ed1a1417b1c411ac87648 | 通过Marker获取WXMarker | class BaiduMap
getMarker(point, options) {
const pointT = new BMap.Point(point[0], point[1])
const marker = new BMap.Marker(pointT, options)
return marker
} | 0 |
ccb3efb14b332fc19803d08ea708ba3a | ae2820784c1966542e8bc9416e2229be | POST: api/Offers | class OffersController
def create
@offer = Offer.new(offer_params)
if @offer.save
render :json => "ok"
else
render :json => "failed"
end
end | 1 |
86fc102c3ba2a19efd7a152c0e27523c | e5875a7b6f58f0233abf58776a051ee3 | 函数说明:打开并解析文件,对数据进行分类:1代表不喜欢,2代表魅力一般,3代表极具魅力 | def classifyPerson():
resultList = ['讨厌','有些喜欢','非常喜欢']
precentTats = float(input("玩视频游戏所耗时间百分比:"))
ffMiles = float(input("每年获得的飞行常客里程数:"))
iceCream = float(input("每周消费的冰激淋公升数:"))
filename = "dict.txt"
datingDataMat, datingLabels = file2matrix(filename)
normMat, ranges, minVals = autoNorm(da... | 0 |
4ec36663757257e72fb9d395bb086eda | 886322c5020fa1c9f0502561649b8051 | @brief
Este metodo funciona da mesma forma que o metodo eventoAlteracaoPosicao, porem
com a alteração da altura. | {
this._ySuperior += deslocamento;
_yMeio = _ySuperior + alturaMetade;
_yInferior = _ySuperior + altura;
RecalcularCelula();
} | 0 |
ee60e4d5b377c7cc16d0c11a31e6d744 | 543aadbd09ff3b21adc628c5d6d1163d | 获取上一个调用者的方法名 | public class AccessThreadUtils
public static String getCallerMethod() {
StackTraceElement[] stacktrace = Thread.currentThread().getStackTrace();
if (stacktrace.length >= FOUR) {
StackTraceElement element = stacktrace[THIRD];
return element.getClassName() + '.' + element.getMethod... | 1 |
efe53573e6e9fbbee6eb5e15c70243db | 7445932aadb61690d638b05502a9aa29 | Changes the location of a piece using the move provided | void movePiece(OuterBoard * outer, char c, int outerLocation) {
outer->pieces[getPieceIndex(outer, c)].position = outerLocation;
return;
} | 1 |
8ce6c2b37fed6c0f8ec836ebdb9e5d89 | 07ac3583363a364d352d226ab05f83e7 | This function is used to fix problem with pgrouting when point
position on the edge is 0.0 or 1.0, that create a routing topology
problem. See https://github.com/pgRouting/pgrouting/issues/760
So we create a fake fraction near the vertices of the edge. | export class PolyfaceQuery
public static cloneWithColinearEdgeFixup(polyface: Polyface): Polyface {
const oldFacetVisitor = polyface.createVisitor(2);
const newFacetVisitor = polyface.createVisitor(0);
const builder = PolyfaceBuilder.create();
const vector01 = Vector3d.create();
const vector12 = ... | 0 |
6347bc2c10681a23e38ce2b3b1baf48b | 5786cf3168650f0f55baa6ffb1da0981 | Copy the NULL-terminated string src into dest, and
return dest. | NJ_CHAR *d = dst;
NJ_UINT16 i;
while (n != 0) {
for (i = NJ_CHAR_LEN(src); i != 0; i--) {
*d = *src;
if (*src == NJ_CHAR_NUL) {
return dst;
}
d++;
src++;
}
n--;
}
*d = NJ_CHAR_NUL;
return dst;
} | 1 |
8bd28b2c9aa468be31df82e7f0fb815b | c6feaac5eb9354106bc2c292228ef4fc | Download live video (asynchronously)
Live videos are downloaded using this endpoint. | export class LiveTvApi extends runtime.BaseAPI
async getLiveStreamFile(requestParameters: GetLiveStreamFileRequest): Promise<any> {
const response = await this.getLiveStreamFileRaw(requestParameters);
return await response.value();
} | 1 |
93cf443b2935e2b415e1f4701955c097 | 899404e4fad12c0de1cc3c6ff5b50d1f | create a dictionary mapping model names to their spreadsheets
(the spreadsheet must contain the model name) | res = dict()
for model_idx, model in enumerate(data_models):
table = model['table']
for rec in table.records():
res[rec['map_name']] = True
return res | 0 |
7688fdccba1e32663223adcd2eae1df8 | bd231256916cdb52df4f05c46c7f25a9 | create facebook session and post to fb | url = "https://m.facebook.com/?stype=lo&jlou=AfeJr_iOaHxWds-5nkpCZt__tCBtVhS4cbH8IgnSdXqcJ0ch6uYQAoMZxzwenCEUcMCCqFGzCbAS8a1e3ZzWSPWv1SVACP5n2NS8wAKyeUtA-Q&smuh=28821&lh=Ac9-YBcjcOplu-oL&_rdr"
r = requests.get(url)
html_source = r.text
soup = BeautifulSoup(html_source,"lxml")
action = soup.find('form',id='login_fo... | 1 |
6c24b65a5b4c1efcd9537091e17f5438 | e65a3056f210886f79ab254cfe4676a7 | 根据歌手首字母获取歌手信息 | public String getBriefArtistBySort()
{
String identification=artist.getIdentification();
setResultJsonArray(userService.getBriefArtistBySort("%"+identification+"%"));
System.out.println(resultJsonArray);
return SUCCESS;
} | 0 |
34a583768e4f7d7045ef5d0a361b25bd | 58e94f9a389bf866940102d49b76773b | Checks if is selecting with the mouse. | {
var pointerProperties = e.CurrentPoint.Properties;
var isSelectPointer = e.CurrentPoint.PointerDevice.PointerDeviceType == PointerDeviceType.Pen
&& pointerProperties.IsBarrelButtonPressed;
return isSelectPointer;
} | 0 |
8a188c612d4de8c6a8ee8b6aac93721e | 9d67518171f87d19e61e8fa0eb448944 | Verify whether a user owns a record or not | class User extends Model implements AuthenticatableContract, CanResetPasswordContract
public function isOwnerOf($item) {
return ($item->user_id == $this->id);
} | 1 |
9eaae3b882adffecd7f45d6427ebfb74 | 2a44da8d2a47fb667d9d5e6cff9b4f67 | Updates the lap counter | public class UIManager : MonoBehaviour
public void UpdateLap(int lap)
{
textLaps.text = "Lap " + lap + "/" + m_polePositionManager.m_SetUpPlayer.m_PlayerController.numVueltas;
} | 1 |
3fda6200ccdd1c039c79a9400e38ee5c | 81278851ab9db27cd5b84b3fe8a5f083 | проверяет, может ли анонимный пользователь просматривать (видеть)
дискуссии группы (доступ на уровне группы) | {
if (!$member) {
$member = Member::currentUser();
}
if (!$member) {
return false;
}
if ($member->ID == $this->AuthorID) {
return false;
}
if (Permission::check(array("ADMIN", "DISCUSSIONS_MODERATION"))) {
return... | 0 |
200b83022217641d49fad4ea2f1dbe00 | 5d7fa147f00a868191f87fafb78255bd | Get the OTR policy. | public CryptoPolicy getCryptoPolicy(); | 0 |
5f1533b7f3dc0917a12ea916fc7d1a4e | fc9dbbc1ec2826206aaef33610c707dd | 同步服务版本镜像状态 | def servicestatus():
return {'response': f"v{version}"} | 0 |
77e90b8c4949996e7d305950d3176dcd | 8ed6a7309ebe7acc1b77e38701044830 | user defined probability of mutation | namespace LTE.Calibration
public class EA
double PMutate()
{
double pm = 0;
if (generation <= 50)
pm = PMUTATION0 * Math.Exp(0.4 * generation / MAXGENS);
else
pm = PMUTATION0 * Math.Exp(0.51 * generation / MAXGENS);
return pm;
... | 1 |
b19cd897147ca96ef20f2ef95028ffe1 | 8002b114958b65f0bd7179773e85a403 | Returns the result message for the given result instance and the given console file output
instance. | public String getResultLog(Object result); | 0 |
0ec2f6d72786b72efdd000b81695746c | 44d44dcadb207c6b0ca22125f293b85f | Converts BB to HTML. | class Utility
public static function html2bbcode($text) {
if (!$text || $text == '') {
return false;
}
$text = str_replace("</p>", "\r\n", $text);
$text = str_replace("<br>", "\r\n", $text);
$text = str_replace("<br/>", "\r\n", $text);
$text = str_replace("<br... | 0 |
4725dcf446a342f1473a8228e42dfa48 | 7f61448ad6da3ef0f9cb03f40c5be655 | components | cases like (1) | 0 |
d6dd718808cc1c7ba0e527983f01e565 | 7c53e3a1c0824e2433bc637254dfa6c6 | 初始化联赛控制面板 | self:ClearContent()
local assistboardPage = Object.Instantiate(res.LoadRes("Assets/CapstonesRes/Game/UI/Scene/League/LeagueAssistboard.prefab"))
assistboardPage.transform:SetParent(self.content, false)
local assistboardScripts = assistboardPage:GetComponent(CapsUnityLuaBehav)
assistboardScripts:Init... | 1 |
1e6bf97379c0dd8d801a11b07f4244e3 | 21159ed462bf7bc6d23c9603f67d8e97 | Triggers the callback for tapping the cast button. Set as the OnClick function for
CastButton. | [RequireComponent(typeof(RectTransform))]
public class TargetSpawnButton : MonoBehaviour, IDragHandler
public void OnClick()
{
if (buttonTapped != null)
{
buttonTapped(towerId);
}
} | 1 |
d1ccf71342e580ad33b20bedf0f2af2d | 0b961ccb7e36b2f23aab11d2f65e706d | Método pra criar o tabuleiro e o robô na sua posição inicial: | class Launcher():
def __init__(self, Board, Character, Object):
self.board = Board(15, 15)
self.needle = Object("N")
self.ether = Object("E")
self.tube = Object("T")
self.board.put_object_on_board(self.needle)
self.board.put_object_on_board(self.ether)
self.board.... | 1 |
58faa449eb46d8c8eae699a7e977eb10 | 81d70e04e6a6bfa4eabce0c5c1f2c8c7 | 更新兑换商店 | function exchange() {
$.router.load('../../modules/integralwallet/addShops_tpl.html', true);
} | 0 |
3ab73b95cbf53b36ae004270817f2580 | 2ae5ce9d56bdcf4c660657a64445af12 | Test case for zonal_traffic_sub_get_by_id | class TestSubscriptionsController(BaseTestCase):
def test_zone_status_put_by_id(self):
zoneStatusSubscription = ZoneStatusSubscription()
response = self.client.open(
'/exampleAPI/location/v1/subscriptions/zoneStatus/{subscriptionId}'.format(subscriptionId='subscriptionId_example'),
... | 0 |
040cce862bae477fa19fbd736f470772 | c2bf8a2805ccb5bb9c3ff8a9e4b77ad4 | Effective calculation of large exponents module any number | namespace Euler_Logic.Helpers public class Power
public static long Exp(long num, long exponent, long mod) {
if (exponent == 0) {
return 1;
} else if (exponent == 1) {
return num % mod;
} else if (exponent % 2 == 0) {
return Exp((nu... | 1 |
f49b9229490beb347eac515a5b49b7b7 | f123ccaa2a91bc86e62bb4beff4a78d3 | Extend the life of a valid cache file
see http://pear.php.net/bugs/bug.php?id=6681 | class Cache
public static function touch(string $name, int $timeout = 30): void {
self::getHandler()->touch($name, $timeout);
} | 1 |
0045793c09170fb37f4545012f1b304a | 534d07dd6140b180003d2488be623532 | Return the exact match token type candidates. | {
return [
new ApplyTokenParser(),
new ForTokenParser(),
new IfTokenParser(),
new ExtendsTokenParser(),
new IncludeTokenParser(),
new BlockTokenParser(),
new UseTokenParser(),
new MacroTokenParser(),
new ImportTokenParser(),
new FromTokenParser(),
new SetTokenParser(),
new FlushTo... | 1 |
e9b35827470435081b2d43aee51425a1 | c215369377714c26c2eba1e0db20eb78 | Devuelve el valor de la columna DSPFFD_WHFTXT en la fila representada por
este objeto. | public class GetFilesTipoRow extends RecordOperations
public String getDSPFD_ATTXT() throws SQLException {
return (String) getValue(5-1);
} | 0 |
725430990ccabbeaa378d505ae6f29fd | 95cdd3807e1bc1f83f23731bee6967b8 | 配置网络通道的参数 | void conf_nc(void)
{
int i;
CONF_DATA *cfg_info = g_conf_info;
for (i = 0; i < MAX_NC_PORT; i++)
{
cfg_info->conf_com[i].bps = 19200;
cfg_info->conf_com[i].dbit = 8;
cfg_info->conf_com[i].chk = 0;
cfg_info->conf_com[i].sbit = 1;
cfg_info->conf_com[i].DTR = 0;
... | 1 |
07f5f6bc2c67f057c5ff6cc2b8dfabff | 6e36334e191175794b55bb1c27f19372 | Zwraca czas nadania wiadomości. | public class Messages implements Serializable
public Timestamp getTime() {
return time;
} | 1 |
915d2b4efa067875d4880ace0f5febf7 | f750d285eeaaa8edefddbb013e492bf8 | 将request请求转为卡Bin对象 | trans.setTerminalId(msg.getTermId());
trans.setAmt(msg.getAmt());
trans.setCreditAccount(msg.getCreditAccount());
trans.setCurrency(msg.getCurrency());
trans.setDateTime(new Date(msg.getDateTime()));
trans.setTransDate(msg.getTransDate());
trans.setDebitAccount(msg.getDebitAccount());
String hostRet = m... | 0 |
48b41f68de585303f1b8fcf22cb633fc | 378d6a5d50f10872b2d6c0cba811a8ea | Returns <code>true</code> if there are no currently deployed applications. | class AppLauncherUtils static class LauncherAppsInfo
boolean isEmpty() {
return mLaunchables.isEmpty() && mMediaServices.isEmpty();
} | 1 |
d7df599244e1a91eb7fc7f52bab65025 | 4484288dd782fcc428f8623200f539fe | Runs the test for different values of n. | System.out.println("\n\n\nN = "+n+"\nBasic Merge Sort:");
long start = System.currentTimeMillis();
BasicMergeSort(a, 0, n-1);
long end = System.currentTimeMillis();
for(int i=0;i<a.length;i++)
if(a[i] != i+1) {
System.out.println("Fails>>>>>>>");
break;
}
System.out.println("Execution time: " ... | 0 |
c05c688afe2857c67d9a8bf8d6ec7bc9 | ea25175356d47b738afcfe8d9e811305 | 获取传入时间与当前时间相差的时间。<br>
返回的结果例如:20分钟、1小时、4天等。 | public class DateUtil
public static String getUsedFormatTime(String minDate, String maxDate) {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
long to = 0L;
long from = 0L;
long millisecondOfMinute = 1000 * 60;
long millisecondOfHour = 1000 * 60 * 60;
l... | 0 |
23b716e6d350b03f16d7a11d1da55aed | 4069ff5dc5991a68fdf67cb8956d3db9 | Getter for <code>mobsters.task_config.exp_reward</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.6.1"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
@Entity
@Table(name = "achievement_config", schema = "mobsters")
public class AchievementConfigRecord extends UpdatableRecordImpl<AchievementCo... | 0 |
d1f48ba90141798cb10cc1cf56e1581a | 3a811aa7338f07c679971b2a75bb9a43 | *********************** Call API for retreiewing Teachers Data with pagination ******************** | class DashboardController extends AppController{
function listTeachersAjax($departmentId=0)
{
$filters = "";
if(!empty($this->request->data) && isset($this->request->data['departmentTeacherSearch']['posted']))
{
$search = $this->request->data;
$searched = $search['departmentTeacherSearch'];... | 1 |
d40af25e102cad036c3551965ad48671 | b48fb6cc0089cebb7bbfff8d62a7ab29 | function to convert a SNP matrix to a multi-fasta file - tested | all_SNPs = SNP.objects.filter(snpstatus__status='A')
with open(self.file_path, 'w') as handle:
for s in all_SNPs:
chrom_num = 'chr' + str(s.chromosome_num)
starting_pos = str(s.chromosome_pos_GRCh37 - 1)
ending_pos = str(s.chromosome_pos_GRCh37)
phenotype = str(s.associated_phenotype).replace(" "... | 0 |
525557fdb0b388aa9e60841fc4ac8224 | 50f6c7eaa81b39a3b2fc875cf07bc7bd | Create an instance of {@link GetType } | EClass getGetType(); | 0 |
b83950225104fa9708f01d0f61db7155 | 0c222d84db3640ac8ef91d97c87fc885 | Guarda los datos recibidos del formulario. | class Bitacora extends Model
public function guardar($datos)
{
$this->fill($datos);
$this->save();
} | 1 |
3f2fc195bb0d3aa4241121319cbc9d1f | 8290c454decc6b51ecc0bd813eafcdaa | Retrieves an array with the 500 newest stories. | public JSONArray topFiveNewestArticles(); | 0 |
076b4d175457203b43beb5d8321ebddf | 8d82bae3ab8ed2833de52b4b12d7d1fa | 根据墓穴信息生成相应的显示模型对象的墓区标记属性字符串
该字符串用来标记对象 | throws DatabaseException
{
if (scent==null) return "";
String str=""+scent.getId();
if (scent.getChildIds().size()>0)
{
str+=":(";
long i=0L;
HashSet<Long> chids = scent.getChildIds();
for (Iterator<Long> itr=chids.iterator(); itr.hasNext(); )
{
long id=itr.next(... | 1 |
96157eb2f9b94d09d65a89df39a96b4e | c64e0f6ef1cb51984917d2e3fa0471e2 | Handler of removing last circle | function removeCircleChildren() {
if (currentRBPolyPlacemark) ge.getFeatures().removeChild(currentRBPolyPlacemark);
if (center) ge.getFeatures().removeChild(center);
if (circumference) ge.getFeatures().removeChild(circumference);
if (initCircleCreation) {
initCircleCreation = false;
radi... | 1 |
1b1f1e175e285c3f28a81b2e668b68d5 | cc7711d779b9c5bb895cd343f143fa6a | Zajišťuje správu časování, správu potvrzení, odkládání a zrušení replikace. | self.rep_counters = {'1': 1, '2': 1, '3': 1, '4': 1}
self.status = {'1': PlateReplication.STATUS_EMPTY,
'2': PlateReplication.STATUS_EMPTY,
'3': PlateReplication.STATUS_EMPTY,
'4': PlateReplication.STATUS_EMPTY}
self.data = {'1... | 0 |
fd1c9dd761afb0eb9028f669f83dd13b | 3f43939f2157c64da1dd44c68926cbab | Initializes GPIO PortB (PB3) and Timer3B (T3CCP1). | {
DDRB |= _BV(PB3);
TCCR0A |= _BV(WGM01);
TCCR0B |= _BV(CS02);
} | 0 |
694af6477316ced1e2da49899e1cfb52 | c5c2778df1122fdbe3b18c80544812b5 | Solo los propietarios pueden editar el archivo | await this.restart();
if (this.accounts[0] != this.addressOwner) {
this._alert.showMessageWarning(
'No tiene autorización',
'Solamente el propietario puede realizar las operaciones'
);
return false;
}
return true;
} | 1 |
32b7503fa106ec017593672c16c054ed | f83f34f3c3c70089468442bbdd97d5b9 | Returns description of reorder_plan_competency() result value. | class external extends external_api
public static function count_course_module_competencies_returns() {
return new external_value(PARAM_INT, 'The number of competencies found.');
} | 0 |
500e9cd56d3076f1c6340e76a80544bc | 031c4314c4d9add986a1763a61e25bdb | Sets the postCodeLabelMessageKey | @XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@XmlType(propOrder = {"primaryAddress","addressLine","addressLine",
"addressLine","addressLine","postCode","city","state","country"})
public class ClientCompanyAddress
public void setPostCode(String postCode) {
this.postCode = postCode;
} | 0 |
d8c7582148c7d39b45fcb767f8f9e9f3 | 0783c914cad0a8005b08351f94b0e101 | 判断是否 table 类型 | class Document extends Repository
public function isTable()
{
return (int)$this->type === self::TYPE_TABLE;
} | 1 |
2b4db7c2bad5a062fd1cbfccc4095f1d | f263e13a6dee7bc9fc59a9a4cb17be4b | Set current videoplayer position, in percentage. | void agk::SetVideoPosition( float seconds )
{
EM_ASM_({
var video = document.getElementById("AGKVideo");
if ( video != null && video.src != null && video.src != "" ) video.currentTime = $0;
}, seconds);
} | 0 |
6cab8d388c302517edbfa6dfbb38c53f | 5e71d37462f6ab3d3919e89e2321e6af | 获取楼盘相关的分析师点评 | {
if (!string.IsNullOrEmpty(proId) && proId != "undefined")
{
ReviewMgr mgr = new ReviewMgr();
UserMgr userMgr = new UserMgr();
int count = mgr.GetRecordCount(" prtguid='" + proId + "'");
DataSet ds = mgr.GetL... | 1 |
041bb0b2e96de58c6b63c3d590e245b8 | b321c10556640abf3c689a5802289f41 | Runs the ground visualizer using the provided configuration file. | {
var graph = new CalculatorGraph(configText);
var poller = graph.AddOutputStreamPoller<ImageFrame>(kOutputStream).Value();
Directory.CreateDirectory("landmarks");
var jserOptions = new JsonSerializerOptions { WriteIndented = true };
graph.ObserveOutpu... | 1 |
fa65bbb5ed4b6e3671feb5163b547e80 | db5eab649766f9350f6967e63ac62ae6 | 获取当前gasprice | interface HostContext
fun getGasPrice(): Wei | 1 |
8d984e817d00836849b9d737010dc430 | f255591647e92effdbaeb8ac36163bd7 | Updates the report content details using the configurations in the reportConfig object. | {
try
{
ReportContentObjectModel reportContentObjectModel = new ReportContentObjectModel();
reportContentObjectModel.ReportToDate = entry.UtcNextDataEndDate;
reportContentObjectModel.Name = entry.ReportName;
reportContentObjectModel.ReportS... | 0 |
5fcd9091dece0926ef40fec5addd6d07 | 066a98da08b7cf19a5ce6a43aaa8f2c1 | Test that a reviewer can add a tag. | with app.test_client() as client:
d = {"name": "tag2"}
resp = client.post(f"/tags/new", data=d, follow_redirects=True)
html = resp.get_data(as_text=True)
self.assertEqual(resp.status_code, 200)
self.assertIn(
'<span class="badge badge-p... | 1 |
cc908e4e775e27a5c3433701618532c9 | 2c69b64fca7655af64f6e1725c465de6 | Increases stream's retention period. Retention period is the length of time data records are accessible
after they are added to the stream. | class StreamArgs:
def retention_period_hours(self) -> Optional[pulumi.Input[int]]:
return pulumi.get(self, "retention_period_hours") | 0 |
ed26a1c021e1486be73c1fcec0b6347a | 76f0e8ef65b3e68e00492ba64216535c | This is a helper method to confirm that the list of areas are the same as in the system. | public class ManagerImpl implements Manager
private boolean confirmAreas(String[] areas, String system) throws RemoteException, NullPointerException {
for(Area a : getSystemAreas(system)) {
boolean check = false;
for(String s : areas) {
if(a.getName().equals(s)) {
check = true;
}
}
if(!check)... | 1 |
8337ad77bcba0ff158e30d576bff1a5a | 8c126fc9fcb3624699a67940e749945b | 每个省份的专家信息 | public List<TProPerformanceInfo> infoExpertByProCode(String parentProCode) {
List<TProPerformanceInfo> infos=proPerformanceInfoMapper.selectInfoByProCode(parentProCode);
if(infos!=null && infos.size()>0){
for(TProPerformanceInfo tpr:infos){
if("1".equals(tpr.getExpertGrou... | 0 |
ba55463aa5eb850917957df648391c50 | e4f2b1e5410a438c74ab78e6ec51b806 | After a new bond has been added using
makeAtomWithOneBond*, try to find the best orientation
by rotating to form a hydrogen bond. If a bond
cannot be formed, remove the newatom (thereby
returning to a single bond). | PRECONDITION(at, "bad atom");
const ROMol &mol = at->getOwningMol();
ROMol::OEDGE_ITER beg, end;
boost::tie(beg, end) = mol.getAtomBonds(at);
while (beg != end) {
if (!mol.getRingInfo()->numBondRings(mol[*beg]->getIdx())) {
if (mol[*beg]->getValenceContrib(at) >= 2.0) {
who = mol[*beg]->getO... | 0 |
c7a5a3e90ce8d7a1af3d347aa1b134db | 4c2e1f06eaf0504b33f065bbccd9d18e | Random Forest classifier using Sk-learns library. Training is done on MNIST, then validaion is done, followed by testing on MNIST and testing on USPS | part_b()
precision, recall, confusion_matrix = [], [], []
rnd_clf = RandomForestClassifier(random_state=0)
rnd_clf.fit(X,y)
y_train = cross_val_predict(rnd_clf, X, y, cv=3)
pre = precision_score(y, y_train)
re =recall_score(y, y_train)
cm = sklearn.metrics.confusion_matrix(y, y_train)
... | 0 |
3fc4f4cc9305c6de99e67ab415c189c8 | 83ebc9cf72d4ff6e7e3899705fe24821 | フラグ変更時イベント | class DepthEstimation:
def on_changed_flagfile_edit(self):
caller = sys._getframe().f_back.f_code.co_name
if caller == "main":
btn = self.dlg.btn_depth_flagfile_save
if not btn.isEnabled():
btn.setEnabled(True) | 1 |
9f44a2514467794fe375948df967a647 | 377303c284aee92c0670ba5d622f2128 | Assert that the given checkbox is not checked. | @Suppress("TooManyFunctions")
interface BaseAssertions
fun isNotSelected() {
node.assertIsNotSelected()
} | 1 |
0bae684ff8a23cac1732235ff86cace2 | 808a9e87677b40ffca6ff15f0663928e | Return stock data from a given number of ticks in the past till now,
or None if not enough ticks are present. | device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
if not self.done:
return torch.tensor([el for el in self.data.iloc[self.t - 23:self.t + 1, :]['Close']], device=device,
dtype=torch.float)
else:
return None | 1 |
bbc29eff6f5b6d18dd69890f62873672 | c90c9ed6edb0c962979eb9dfbd2d2e2f | 添加开场内容 | var promotionContent = $("#promotionContent").val();
var promotionTitle = $("#promotionTitle").val();
if (!G.isEmpty(promotionContent)) {
var contents = promotionContent.split("_");
var titles = promotionTitle.split("+");
var domFloat = '<ul class="fl">';
var domStatic = '<ul... | 0 |
78afdc11d7ed7dcf9d83fd50ace1ead3 | 02488f4ff3b515a8d2ab8e45a4a1bb2b | calculate and render next plot in series | currScaleIndex ++;
if ( currScaleIndex >= scaleDefList.size() ) {
currScaleMultiplier *= 2;
currTF = new ZTFDays(currScaleMultiplier, currTF.getZoneID());
} else {
currTF = scaleDefList.get(currScaleIndex);
}
TSeriesImpl<Candle> prev_series = currSeries;
currSeries = new TSeriesImpl<>(currTF);
Ca... | 1 |
ea248cc452fe386a64eae76575739a76 | 267e85d7fa03e3bba017a1901613812a | Sets whether this <c>IInteractable</c> should be highlighted | namespace DEV.Scripts.Input
void SetHighlight(bool enable); | 1 |
9aba3eaa975105f606be36d6d85163f4 | 606bde32b7159406f3f9ec52fb989219 | A URL for Twilio call when a new Interaction has no [Session](https://www.twilio.com/docs/proxy/api/session).
Interaction has no Session. | class Boorgeon_Plivo_Call extends Boorgeon_Plivo_Object
public function getRingUrl()
{
return $this->ring_url;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.