query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
c1002bff1a20cd9eb22175a29c5c2da7 | dc68c1273c5571aa3f8da6bd25e0f08e | 转换为long,空对象转换为0 | public class CastUtil
public static long castLong(Object obj){
return CastUtil.castLong(obj,0);
} | 1 |
d4c92b6ec1fa66e2cda2064f643e4669 | 80b39e44a6a9b2af4222f6860526236c | Set an array that will be sent to views | class Controller
public function setVars($params) {
$this->viewVars = $params;
} | 1 |
b0f3df8dbb06a62686cc656ed7712766 | 78cae2c85e89755256b07f7d869591a4 | Retrieve this file's last modification time. This name is provided for
compatibility, and returns the same value as getmtime. | class File extends \SplFileInfo
function getModifiedTime(): int {
return parent::getMTime ();
} | 1 |
1ebcf3533e205b118bfe580aff2eec07 | e408fb508ae836ec6c6916aae01dd10a | Compute [exp(x) / S for x in stuff] where S = sum(exp(x) for x in stuff) | def monte_carlo(experiment_stream):
return mul_streams(partial_sums(experiment_stream), stream_map(lambda x: 1 / x, integers)) | 0 |
ec0020f4281384a7db9235c7b20c7019 | 4951cc93a2e5e1652874b4726fb9a5a7 | Funcion que muestra la vista de "Relacion de cobranza" | {
$plans = Plan::all();
$subscriptions = Subscription::with(['plan', 'empresa'])->latest()->get();
return view('admin.manage.cobranza', compact('plans', 'subscriptions'));
} | 1 |
f99be82f174195e579d7cdc1fef2ff96 | 6671bc6801679395147ce3215b117c53 | NewDialer creates a Dialer to connect to a named pipe by `path`. | func Dir(path string) string | 0 |
2ffe35dede12932cb246b4c1fbadd5f4 | be3c7e12bf9c1a79862b29af642ef1b0 | r"""
Calculate the fraction of the sky dome visible from point x on the ground.
The view factor accounts for the obstruction of the sky by array rows that
are assumed to be infinitely long. View factors are thus calculated in
a 2D geometry. The ground is assumed to be flat and level. | img = self.map_ref.render(xs=xs, ys=ys, zs=zs, res=res)
(lat, lon), (x, y, z) = self.map_ref.ops.compute_ortho_grid(res)
idx = (x - xo) ** 2 + (y - yo) ** 2 > ro ** 2
return np.nansum(img.flat[idx]) * 4 / res ** 2, np.nan | 0 |
d8dc7d61be1a9ed067f96fd439a6c0f1 | c8cee866d0dc67f37d1e6128cd47c800 | inits the port for note control | u8 *portcurrentstep;
portcurrentstep = (u8 *) &node[nodeID].ports[MOD_SEQ_PORT_CURRENTSTEP];
u8 *portchan;
portchan = (u8 *) &node[nodeID].ports[MOD_SEQ_PORT_NOTE0_CHAN];
u8 *portnote;
portnote = (u8 *) &node[nodeID].ports[MOD_SEQ_PORT_NOTE0_NOTE];
u8 *portvel;
portvel = (u8 *) &node... | 1 |
c3ee33c460b9ed0064d9b5c49715cc08 | d14b349ff7e3eb8e6282d274b9a21059 | 往redis的隊列中添加庫存(用於測試的數據) | function addCoinListToReddis(body){
client.set('coinlist', body, redis.print);
} | 0 |
5059118c486bf27094b7aec9aab8cc8f | 50bb81e72803a668969da0f70bafcbe4 | 为圆形shape Btn添加按钮样式 | this.rectRoundRadius = FunctionUtil.dp2px(context, rectRoundRadius);
this.shapeMode = ShapeMode.RECT_ROUND;
return this;
} | 0 |
292dfdc2d837699470533dc2a19c00b2 | 0fec0811ba36de4458ca56484f68e708 | !
calcula el producto elemento a elemento entre dos vectores. | {
float op=0;
for(int c=0; c<3; c++)
{
op+=vector1[c]*vector2[c];
}
return op;
} | 0 |
c34c88ef72b35e2709682b7e8babd68f | 41552f7cd7f96d9ba0736d4feb11cc0e | 自身の投稿かどうかを判定 | class PostsController
def is_mine?(post)
post.user_id == current_social_account.user_id
end | 1 |
258c0eb24882a90c32a81d0b5232e1b4 | f2b437acdda73e66cec71c038f6922c2 | Adds a condition on a column and returns the first record matching the finder
Useful to retrieve objects by a column which is not the primary key | def findWhere filter
where(filter).first
end | 1 |
2ef99124d20b23c2867c6655bedff3f7 | fc67a4d38a5085e343219738eb53d655 | Get existing ticket tag association | {
if ($this->aTickets === null && (($this->ticket !== "" && $this->ticket !== null)) && $doQuery) {
$this->aTickets = TicketsQuery::create()->findPk($this->ticket, $con);
}
return $this->aTickets;
} | 0 |
1b71743774b6bed3eb10981e82b0a84b | 581fe0eb1a483a2b5a8196a5738783ce | 画所有横向表格,包括x轴 | for(let i = 1; i <= this.yCount; i ++) {
let index = i*(this.lY/this.yCount);
new DrawLine(this.g, this.oX - 5, this.oY - index).end(this.oX, this.oY - index);
this.coordinateSystemText(i*this.yInterval + this.yOrigin, this.oX - 15, this.oY - index);
}
return this;
} | 0 |
a2cca796fd7b5ce4d64d68bb11fa7a86 | 15e4096c7d0796780b10afd8637ceeb4 | 抽象方法,由子类实现,实现不同页面不同效果 | public abstract class MenuDetailBasePager
public abstract View initView(); | 1 |
293ec4cf902d3b7e9c01343f32904f45 | e89fa347fb0d00b581e0aa1f8e0af563 | SHA256 hash of user data is calculated and then used as payload in the UPP creation via Protocol.Sign() (NOT Crypto.Sign()) | var b bytes.Buffer
binary.Write(&b, binary.BigEndian, uint16(3))
b.Write([]byte{0x00, 0x00, 0x00})
b.Write([]byte{0x01})
b.Write(bytes.Repeat([]byte{0}, sha1.Size))
return b.Bytes()
} | 0 |
e79df744760da4f554641cdf82fb406e | 6f9e2e618344ab252b7a82d8c4e2cbae | Load list of delivery carriers from CSV file | self.carrier_file_path = carrier_file_path
self.carrier = self.carrier_file_path.split("\\")[(len(self.carrier_file_path.split("\\"))-1)]
self.column_name_dict = {
"cus_name" : ["Name", "Consignee Name","Consignee","Customer Name","Customer","CONSIGNEE NAME",
... | 0 |
bf2040eeec99bbda5dff3c2822801c4a | febe43af2700dbba02c7de8dddc61fbf | Utility function to combine dictionary values when values are lists.
Returns:
dict: Dictionaries combined into one. | def _combine(base: dict, update: dict) -> dict:
for key, value in update.items():
if isinstance(value, dict) and key in base and isinstance(base[key], dict):
base[key] = _combine(base[key], value)
else:
base[key] = value
return base | 0 |
ec3a91cd47b6c4a43f099c40e3f8a74d | 514b1d67f77a9e00e633eddd5080d2e8 | ============================================================
<T>设置行高的内容。</T>
============================================================ | public class ExlRow
public ExlRow height(int height) {
this.height = height;
return this;
} | 1 |
3074534be95a546f8c88fed046af3977 | 9b35a636141112b5e5baba9f08de5e77 | # function for mapping query sample onto reference in reduced dimension | beta=x.alpha/ref.alpha
lambda = (ref.offset/x.offset)^ (1/ref.alpha)
x = x ^ beta
x = x * lambda
return( x)
} | 1 |
10af1adb50db2e9d75e51411ad83a5d1 | 2d5552d3813e27e5512ad23ae67d74a2 | Writes the next damage number to file. | class PHPUnit2_Util_Log_TAP extends PHPUnit2_Util_Printer implements PHPUnit2_Framework_TestListener
public function __destruct() {
$this->write(
sprintf(
"1..%s\n",
$this->testNumber - 1
)
);
parent::__destruct();
} | 0 |
295d3e2dcbb4eb6b1f7af9f867999058 | 07fe5ba152c010e6532430be69020c1a | Handles the MouseClick event of the txtUsrNam control. | {
if (IsCorrect && User != null)
{
Logic.Update(
string.Format(
" UserName = '{0}', EMail = '{1}', Document = '{2}', Password = '{3}', FirstName = '{4}', LastName = '{5}', Address = '{6}', Phone = '{7}' ",
... | 0 |
70245aed6ad0604bf2e7f05c28bc1e11 | 2e84c49e7433b8727e9ef1ee411a0bef | 受信したiamパケットの解析とCSV化 | if type(packet) is str:
unpac = struct.unpack(str(len(packet)) + 'B', "".join(packet))
else:
unpac = packet
start_byte = unpac[0]
if start_byte == 0:
self.receiving_ASCII = False
self.parseRaw(start_byte, unpac[1:])
elif start_byte >= 1 and start_byte <= 100:
self.recei... | 0 |
7cec4699eed399228094383d16ac5601 | cc050e9e88e2414edd3a95b68eb43614 | Allows you to fetch transaction info using the customer id | $data = array(
'email' => $this->email,
'token' => $this->token
);
$data = http_build_query($data, '', '&');
$url = $this->transactionsUrl. $transactionId. '?'. $data;
$result = $this->makeHttpRequest( $url );
$result = simplexml_load_string( $result );
if( $result->code ){
return $result;
}
... | 0 |
91b97b6e7ddb84e7784a2b7b0ad453eb | 74a7d7fba238e8dc612ae0012bf301ee | Evaluates the probability distribution function at the locations x. | class ContinuousDistribution(Distribution):
def pdf(self, x): | 1 |
b4f06585cef81022a3ef60925387f4c3 | 18d585b044ecccdc116c51218ad7ec67 | Устанавливает флаг перезаписи файла | class FileUpload
function setOverwrite($overwrite) {
$this->overwrite = $overwrite;
} | 1 |
a2a68db0dbfc378b3ed068a28073aab0 | 37aeb53fef3625f59d60846a76232f12 | 显示最后一个阅读。 | export class Book
async lastRead(user: User) {
const url = 'https://japari.qingzhiwenku.com/v3/book/info';
const data = {
'bid': this.id,
'stat': 1
};
const resp = await linovelRequest(url, data, user);
return resp.data.data.statistics.lastRead as number;
} | 1 |
867e1257d1bf92aad066f149d5768b53 | 1960c511e3b9cd8eec4bb028db4d032d | Check if the rectangle contains a rectangle | class Rect():
def contains(self, other):
return (self.x1 <= other.x1 and
self.x2 >= other.x2 and
self.y1 <= other.y1 and
self.y2 >= other.y2) | 1 |
cd31c7f03d9638681b9e32fa94a64192 | 30db1ef29171434857762c2e437cfdba | 7.将图片写入测试报告 | def report_image(url):
pro_dir = os.path.split(os.path.realpath(__file__))[0]
father_path = os.path.abspath(os.path.dirname(pro_dir) + os.path.sep + ".")
report_path = os.path.join(father_path,"test_report")
chrome_options = Options()
chrome_options.add_argument('--headless')
driver = webd... | 1 |
9c5f2e7b4f4a279599dbf30939496d74 | 285200f06fc63e718c47865f4a087de5 | 转为int型 提供默认值 | if (this.isNullOrEmpty()) return defaultValue
return try {
this.toInt()
} catch (e: Exception) {
defaultValue
}
} | 1 |
00b4bdfa7771dd4b55fa00d3b3c61b7b | 642aa45a3b4195d278c3c03e8db49761 | API endpoint to display welcome block. | def welcome():
return (
f"<center>"
f"<b>Available Routes:</b><br/>"
f"/api/institutions<br/>"
f"</center>"
) | 1 |
a6a0b3109e9a43e08cc3742642380f53 | 4895d140c41e830b80cc7dcb2bcad447 | write sls files on target side with replaced values | content = open(source[0].path).read()
if len(source) > 1 and source[1]:
version = open(source[1].path).read().strip()
content = content.replace('__VERSION__', version)
if len(source) > 2 and source[2]:
revision = open(source[2].path).read().strip()
content = content... | 1 |
b1d211b8e48a900278af4c1d25a04d12 | 4e11a214b8ee585d11d71501f5690f35 | Enable usbhs host and ram clock | {
clock_root_config_t rootCfg = {0};
CLOCK_EnableOscRc400M();
rootCfg.mux = 2;
rootCfg.div = 0;
CLOCK_SetRootClock(kCLOCK_Root_Usdhc1, &rootCfg);
} | 0 |
69801945fe919e23568b0e9f2c8235c0 | 503df1d9f77d864202bf87d6c37359cd | used for making all keys the same size | def colSize(keys, Data):
cS = [max([len(Data[n][k]) for n in range(len(Data))]) for k in keys]
return cS | 0 |
74b31f8e05e1d58323aab1e03dd9c9ef | 9e1827c6386f38121002688f139b850e | - Converts PDF to a serie of images
- For each images check financial statement type and add to dictionary | pages = convert_from_path(PDF_file, 500)
image_counter = 1
for page in pages:
filename = "page_"+str(image_counter)+".jpg"
page.save(filename, 'JPEG')
image_counter = image_counter + 1
filelimit = image_counter-1
for i in range(1, filelimit + 1):
filename = "page_"+str(i)+".jpg"
text = str(((pytesser... | 1 |
def3ab559e7fbb98ae3ae3847e298144 | de18812809aad53da545ceb05ca9d138 | when the phone app sends the pebble app an appmessage, this function is called. | function parseAppSend(jsonData)
{
} | 1 |
935c66f8f5573bcc8ec73893075196b1 | f2fda8c6b290f6ef8fc80b8ed6797b38 | Coloca un borde griseaceo para el botón de minimizar a manera de remarcarlo. | namespace Filters.Variants
public partial class VariantsEditWindow : Form
private void btn_Minimize_MouseLeave(object sender, EventArgs e)
{
pnl_Minimize.BackgroundImage = KPA_KPI_Analyzer.Properties.Resources.Minimize;
} | 0 |
d2ab1956a62bf5aede72f5b3d2171a21 | 8adbd49ee8382de4ea9d0c84ad55c0f8 | Whether to set face strength, and which faces to set it on | class Image extends Api
public function setFaces($bool)
{
$this->fieldSettings['faces'] = (bool)$bool;
return $this;
} | 0 |
40ce168f42e3b2fee7c4b31993705121 | 491a390c38e3b14717f6e08136f96692 | limpiar controles del formulario | function limpiar(){
$('#txtextension1').removeAttr('disabled');
$('#txtextension1').focus();
$('#forms').hide();
$('#tipopuerto').val('-1');
$('#regletas').val('-1');
$('#padre').val('-1');
$('#txtpuerto').val('');
$('#txt... | 1 |
830c19314d759aabcc179f695703da99 | 403881cd51ca81725f7fe961314979b3 | Negative int values should raise exception | class TestOne(unittest.TestCase):
def testCaseSeven(self):
with self.assertRaises(Warning):
One(int(" -30")) | 0 |
504eaa8f84854fcffad96fb909798035 | 9fc169dd7939a37b91d785b8f87668cf | 采药 ,,又是背包问题,动态规划 | int[] weight = { 4,5,6,2,2 };
int[] value = { 6,7,5,3,6 };
int n = weight.length;
int capacity = 11;
int[][] dp = new int[n][capacity];
int[][] pos=new int[n][capacity];
for (int i = 0; i < capacity; i++) {
if (i>=weight[0]) {
dp[0][i]=value[0];
pos[0][i]=1;
}
}
for (int i = 1; i < n; i... | 1 |
90a814a5bbe5b8e97fedb09844240a4f | eba460379e001ebb478bd0a24d24c616 | Generate the MiniZinc code for this minus numeric expression | IntExp intExp = null;
try {
problem.minus(op1.getIntExp(problem), op2.getIntExp(problem));
} catch (UnsupportedOperationByChoco uobc) {
throw uobc;
}
return intExp;
} | 0 |
50dd7367caa9dd6876d4a7ea78c6409a | 7e51f87d1e5a9148091dbc5bb1c7852c | 날짜와 완료상태로 부터 Task를 가져오는 메소드 | val cursor = dbHelper.readableDatabase.query(
PK_TABLE_TASK_NAME, null,
"$PK_TABLE_TASK_COLUMN_TASK_STATUS = ?",
arrayOf("${PKTask.TASK_STATUS_COMPLETE}"),
null, null, "$PK_TABLE_TASK_COLUMN_ID DESC"
)
return getTaskListFromCursor(cursor)
} | 0 |
e7284a480d4e7da4e3e9cb482763dfc2 | 3192e5ecd88b9f25c3ddaa27ac2cb90d | 保存登陆或者退出时的url | namespace ydERPGJ.Controllers
public class AccountController : Controller
[HttpPost]
public JsonResult SaveLastMenuUrl(string menuUrl)
{
try
{
var userId = (Session["UserProcRoleInfo"] as v_user_proc_role).u_id;
var q =
from... | 1 |
7d27059d7e917c9ae575f5eab3bef033 | 7ea24044096bb9f9551250d8d2538774 | Whether this inferrer is provably equivalent to the other.
Two GraphInferrers are equivalent if they infer the same property
on the same graph in the same context. | class Inf(_Inf):
def __eq__(self, other):
return other is self | 0 |
a9fb4f56f3ee032c55f3fc92c50944ea | 9a5cc8b2463dd90cdc281577c25a7266 | Printing user input for password in asterisks | def print_password_asterisks(password):
print("*" * len(password)) | 1 |
1b75428e48b3153dd20b2250046f1e34 | f2b3b4b9a39286450d5864794a20d880 | Encoding for input files (default: utf-8). | def default_encoding(file=None):
file = file or get_default_encoding_file()
return getattr(file, 'encoding', None) or sys.getfilesystemencoding() | 1 |
584d9fa8d35c16a596c37fb1aa82d0eb | ba1a11e9bbbb6d138f882e57243df39a | This function returns the division of the two numbers passed by the user | def divide(firstnumber,secondnumber):
return firstnumber / secondnumber | 1 |
7ce6f42da9516dc028cec923573f2e11 | a6c336e768270b29d86111fbb68ba91d | Return the trustor user id associated with a trust. | class _TokenData(object):
def trustee_user_id(self):
return self._stored_auth_ref.trustee_user_id | 0 |
c6759c13e81abdc54c342f357c2e44a3 | d73c8571f10433651027001e8e8f7bcc | It can be configured. | class Wholesale implements
PricingRuleOfWidePrintedSheets,
PricingRuleWithInitializationOfAdditionalPrices
public function isConfigured(): bool
{
return true;
} | 1 |
a7a473178a74b0d30fb2dde4b86c3c9f | 34a254780cc08ba93c339bc72559846b | Adds a player as admin to the game server. | {
var player = GetByName(playerName);
if (player == null)
return;
if (!player.IsAdmin)
return;
player.IsAdmin = false;
Update(player);
} | 0 |
f25b535b8fac8cdc14cf231aed34d8de | cbd8eae917900192005e342566851c43 | Solve the quadratic necessary to get t values corresponding to X or Y | namespace Fovea.Renderer.VectorMath
public static class MathUtils
public static bool SolveQuadratic(double a, double b, double c, ref double t0, ref double t1)
{
var disc = b * b - 4 * a * c;
if (disc < 0)
return false;
var discRoot = Math.Sqrt(disc);
... | 1 |
bfbb28d39331df270a5dd2341e7aa9bd | 664bc2ff6f2af1f9d858f6a9a5b92f1d | 住民税計算 | function BCcalKouji(){
costKouji=Math.ceil(finalcostKouji/(1+ConsumptionTaxRate));
consumptionTax=finalcostKouji-costKouji;
} | 0 |
dd5b5c0f0a0b5282eaaab65b7fc49148 | ca7d9afef2c9da1f30405bb26592fc0d | Get if the play button is avaliable | public class Selection : MonoBehaviour
public bool PlayButtonClicked()
{
return _playButtonClicked;
} | 0 |
0bc2aa99eb03a63340975e77cc887047 | 0e5ef2250f52c17b1623c7854eb89622 | 删除和item具有相同键值的表项,成功删除时返回该表项否则没有表项被删除,返回NULL | void *table_remove(struct table_t *tb, const void *key)
{
int i;
struct binding **pp;
struct binding *p;
void *value;
assert(tb);
tb->snapshot ++;
i = (*tb->hash)(key) % tb->size;
for(pp = &tb->list[i]; *pp; pp = &(*pp)->link)
if ((*tb->cmp)(key, (*pp)->key) == 0) {
p = *pp;
value = p->value;
... | 1 |
939bf0bcc8f67f8c88166d221c002e03 | e8216bc212c23b95202aaa65df4ba271 | Create an instance of the dialog asking the user how many players they would like | {
NumberOfPlayersDialog createDialog = new NumberOfPlayersDialog();
createDialog.Show();
createDialog.Closed += (s, args) => DialogClosed();
} | 1 |
c368870529419bd7f0a50cea18683f0c | b96da5b763f504e31c81003cd4aa0e68 | 整个控制器需要ROOT权限,但是用户没有ROOT权限 | class RootController extends Controller
public function __construct()
{
$this->middleware('auth', ['except' => ['showFormResetPassword', 'resetPswd']]);
} | 0 |
323e02dfeb91d55fe1202f40b7346ddc | 89b1e933ac9ed5cc484e464938fbe9e9 | Perform actions defined by the arguments this object was created with. This may generate outputs where
the arguments have requested this action.
.. warning::
:meth:`setup` must be called before calling this method. | class TouchActions(object):
def perform(self):
for action in self._actions:
action() | 1 |
60fcece475f92a799a000400e42a1d23 | eeceea1496a9c2d3d5b6b60d59113b7a | Get the command started from the command line | class Core(object):
def GetCommand(self, argv):
return " ".join(argv).replace(argv[0], os.path.basename(argv[0])) | 1 |
42e3e6b9779d815506537323b99dd610 | 3d48baaf8317829043a2dc6dc0219a0c | Set directorderlineFk. | class Directorderlinedetails
public function setDirectorderlineFk(\PenD\Docker\Application\Model\Directorderlines $directorderlineFk = null)
{
$this->directorderlineFk = $directorderlineFk;
return $this;
} | 1 |
2da576982dd475a437d108cdcac67e61 | 9e35b0592411dd08e24910dd1f0d33fb | hash of answer options and counts of responses | var result = [0,0,0,0];
for(var i in result){
result[i] = {'choice_id': parseInt(i)+1 ,'total':0};
}
for(var i in data){
var cid = data[i].choice_id;
result[cid-1] = {'choice_id':cid,'total':data[i].answerers.length};
}
return result;
} | 1 |
ed19381010b67e3fe918b6f5952b7264 | 28d42bcf6ef93aa92085acaa580e6ca8 | Show humanised string of the publication date | if pubdate is not None:
t = datetime.strptime(pubdate, util.time_isofmt)
return t.strftime(util.time_hfmt)
return '[Unpublished]' | 1 |
da29ecfe54270a48a3242b519c72a591 | 757b9346dbc01d4145b17db9a2e5393e | Market implied volatilities. | reqId: number,
contract: Contract,
optionPrice: number,
underPrice: number
): IBApi {
this.controller.schedule(() =>
this.controller.encoder.calculateImpliedVolatility(
reqId,
contract,
optionPrice,
underPrice
)
);
return this;
} | 1 |
7b7ce244943af8af11bf50bbd90293c1 | b1c43e07392e66fff2cbfad22d5c4f07 | 接收连接请求。 注意: 只能在绑定地址端口号和监听后调用,返回 conn 和 address。
- conn:新的套接字对象,可以用来收发消息
- address:连接到服务器的客户端地址 | class Proxy(object):
def accept(self):
return self.__socket.accept() | 1 |
ea3818eecf0c564ab15496e4cb412a96 | 2fbc1fe34c08c51be962372fd0131338 | メンバーの検索(メール) | function searchMember(searchStr) {
$.ajax({
type: 'GET',
url: 'member/index',
data: { 'team_key': searchStr },
dataType: 'json'
})
.done(function (value) {
if (value.length === 0) {
$('.register-members').append(buildSearchMember('該当なし'));
return;
}
let registeredMembers = [];
let ... | 0 |
66b4db73759b6ffc5702aeb290cb0eed | 50180b9328884266adc21fad775e35bb | Compares 2 integer values and displays all result info <p> | public class Relop
public static void main(String arg[])
{
Integer intvalue1=200,intvalue2=300;
Integer result_x1=400,result_x2=100;
if(intvalue1<intvalue2)
System.out.println("intger values "+intvalue1+ "is less than the "+intvalue2);
if(intvalue2>intvalue1)
System.out.println("intger values "+intvalu... | 1 |
d59e77f56baedd3e80c4a63b383d53e0 | bcd69eb429a7b64772826f05c38ac135 | Sets the mapped output channel. | {
if( OutMux_lastChannel != OutMux_NULL_CHANNEL)
{
OutMux_Disconnect(OutMux_lastChannel);
}
#if (OutMux_MUXTYPE == OutMux_MUX_SINGLE)
OutMux_Set(channel);
#else
OutMux_CYAMUXSIDE_A_Set(channel);
OutMux_CYAMUXSIDE_B_Set(channel);
#endif
OutMux_lastChannel = channel;
} | 1 |
59e32c401db4b271e7ed12798b0a4edd | 92eee7e463be22800e5b9ef6b22b5f78 | Display combine process logs | try {
logs.forEach((item) => {
let log = typeof item === 'object' ? JSON.stringify(item, null, 4) : item;
log = ' - ' + log;
let now = moment().format("YYYY-MM-DD HH:MM:SS");
let _clc = clc.xterm(202);
console.log(' ' + _clc(now) + clc.white(log))... | 1 |
43f442f16f85db64ee32cb41c5365c31 | ffda58cbe1e46ce53a414e57ba76cf3e | Acquires a writer lock.
The lock is released when the returned locking object is disposed. | namespace Gorba.Center.BackgroundSystem.Core
public abstract class ConcurrentServiceBase
protected virtual Task<AsyncReaderWriterLock.Releaser> AcquireWriterLockAsync()
{
return this.locker.ReaderLockAsync();
} | 0 |
c30cc3526b0f643712ae5e84b845d78e | e270b8af7d718477a9b95f5a289ed3ad | 计算星将暴击 | {
if (_card .getSkills () != null) {
Skill mSkill = _card .getSkills () [0];
int skillLv = BeastEvolveManagerment.Instance.getSkillLv ();
ShenGePower tmpPower = ShenGeManager.Instance.CalculateShenGePower();
int value = 0;
if (tmpPower != null) {
for (int i =... | 0 |
9120e1d29b38b67a14589659ea0bb460 | 9a0321fde732e9a61161ccce3b4b0594 | menampilkan jadwal keberangkatan bus tujuan "Jakarta" | class JadwalController extends Controller
public function index()
{
$jadwal = DB::table('bookings')->join('detpakets', 'detpakets.id' , '=', 'bookings.id_detpaket' )
->join('pakets', 'pakets.id', '=', 'detpakets.id_paket')
->join('subpakets', 'subpakets.id', '=', 'detpakets.id_subpaket' )
... | 0 |
928d6a7ddaf5bc162518818832d1678b | ae8d9d544e33c2e18327f1ddedbe6ba5 | Returns the meta object for the attribute '{@link de.cau.cs.kieler.esterel.esterel.AbortCase#getOptEnd <em>Opt End</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getAbortCase_OptEnd(); | 1 |
18dbf2c34adf5883caf90fde9df37c4a | 4fd2bd1a61fd389d09714a0727a57272 | 每个页面不同背景图片 | public void onPageSelected(int index) {
index %= images.size();
int total = mBottomImages.length;
for (int j = 0; j < total; j++) {
if (j == index) {
mBottomImages[j].setBackgroundResource(R.color.colorAccent);
... | 0 |
79d9b882092dca3f2ac9020a5152ea46 | c210aa4e673a1cc4f9931bde22cf368d | get the unique coordinates for a given resource object. | sql = """SELECT DISTINCT
coordinates.x,
coordinates.y,
coordinates.start_y,
coordinates.direction
FROM coordinates
INNER JOIN objects ON coordinates.object_id = objects.id
WHERE objects.name = '""" + object_... | 1 |
b50c20dee484091915465aad68d12fcc | f296c4f3ffbffde5aea98f26ba30d8a7 | Conversions between SSB-frame and L-frame parameters (for initial position alpha=0) | v->EstIalpha = (v->Fsmopos*v->EstIalpha) + v->Gsmopos*(v->Valpha - v->Ealpha -v->Zalpha);
v->EstIbeta = (v->Fsmopos*v->EstIbeta) + v->Gsmopos*(v->Vbeta - v->Ebeta - v->Zbeta );
v->IalphaError = v->EstIalpha - v->Ialpha;
v->IbetaError = v->EstIbeta - v->Ibeta;
if (v->IalphaError >= v->E0){
... | 0 |
d47cd6f4fc1a7a6fbf186605d6e10e20 | d12244ff856d6b98b1b01b13a2846fc9 | 取得指定年月的第n周的结束日期,如2009年7月第2周,以星期六为一周的结束 | public class Demo2
public static String getEndDayOfWeekNo(int year,int weekNo){
Calendar cal = getCalendarFormYear(year);
cal.set(Calendar.WEEK_OF_YEAR, weekNo);
cal.add(Calendar.DAY_OF_WEEK, 6);
return cal.get(Calendar.YEAR) + "-" + (cal.get(Calendar.MONTH) + 1) + "-" +
... | 1 |
3dc2d8265be40b6ea6fbb3042bc20d30 | c512de8b50f6a1838c9322b8c75c06a8 | Sets the name copy field that we use as a means of detecting changes in
the group name. | public class SetChangedEvent extends EventObject
public void setSetName(String s) {
if (setName == null)
setName = s;
} | 1 |
b980e0d0803601545346a571b23b9234 | db054e66fdee3950230f5fd8b02aeace | Capture the motion of "Ctrl+wheel" to zoom. | class HtmlView(QWebEngineView):
def wheelEvent(self, event):
if event.modifiers() & Qt.ControlModifier:
self.zoom(event.angleDelta())
else:
QWebEngineView.wheelEvent(self, event) | 1 |
c7cece24e148944f1888ec5e46ee17d7 | 979b2c67a633f3f03025438f6737fb2d | switch the player to landscape mode | function switchLandscapeMode(){
finishPortraitMode();
displayFullScreenPhoto(0);
} | 1 |
5dbf4347de19964ecdb7f0d4be38241c | a39f5872e85881381330ce81e0a6fbf1 | Read and print a CVS file. | void readFile(char *file) {
inputFile = file != NULL ? fopen(file, "r") : stdin;
if (inputFile == NULL) {
fprintf(stderr, "Error opening file: %s\n", strerror(errno));
return;
}
bool beginning = nflag || bflag;
if (nflag && bflag) {
nflag = false;
} else if (tflag && vflag) {
vflag = false;
... | 0 |
b76dd713370066f3e99f89931e2c4478 | ea09abf27f1c8b1970976fbf8e6a7f37 | The date/time the message was read at | class UMessage:
def date(self, alternative_source=False, return_str=False):
value = self.get('date')
if value is None and alternative_source:
unix_from = self.message.get_unixfrom()
if unix_from is not None:
try:
value = unix_from.split(" ", 2)... | 0 |
200a630bdcd429205ccfbb37599c79ce | eb7acca2a78efcd5bd8f0b53d3bbf690 | always show index page after sign in | class ApplicationController
def after_sign_in_path_for(resource)
tool_index_path
end | 1 |
bda1d203d8286bde796ae660ad014a15 | 4fe19474497270ac0a7fa9613f195b5b | 依據傳入的表單id將表單中所有驗證錯誤欄位的錯誤訊息清除(表單輸入的值不會重設) | var form=document.getElementById(idForm);
console.log(form);
if(form!=null){
for(var i in form.elements){
if(form.elements[i].nodeName == "TEXTAREA"){
form.elements[i].value="";
}
switch(form.elements[i].type){
case "text":
... | 0 |
97102268fa53cc43026bf19beb78a6b8 | c540a0221ebdb55f220480dfc622a276 | GET: Account/Logout | {
if (Session["User"] != null)
{
Session["User"] = null;
return RedirectToAction(null, "Home");
}
else
return View();
} | 1 |
534f462a894601636baab2447ef74b0a | 678b931ab3af87f09b49487ffe7ba9ce | This method corresponds to the requirement set in section 1.4 of the requirements document,
this method returns the score of player B | public class ReversiModel extends Observable
public int getBScore() {
return bScore;
} | 1 |
3e28a6ec59ef02217f4ec558412b1a90 | 90a62607442f3e1cb6a395cd83a29aed | Format ISBN numbers for display. | if type(value) in (type(1), type(1.0)):
return "{:,}".format(value)
else:
return value | 0 |
2c87eebf68be70cfa0dded5ba157c66f | 49d490d412a8b4f25253c5ac45433c44 | Build conf info for admin external REST endpoint. | build_info = BuildInfo.from_config(graph.config)
@graph.app.get("/api/build_info")
def configure_build_info_endpoint() -> BuildInfoSchema:
return build_info.to_object()
return build_info | 1 |
dfda965c108fe41a9b117a2cf6e5a31a | 54760cac68d35cfd3092e5d2ceba166e | Retrieve purge strategy as an array | class ORMPurger extends Base implements PurgerInterface
public function getPurgeMode()
{
return $this->purgeMode;
} | 0 |
35f87ee20261af7f068eff53bc14199e | ec3a8ef7c889556b97ae90620114f7ee | Open a channel for the given file | RTVD rtv_open_file(const char * address, const char * strFileName, u64 filePos)
{
RTVD rtvd;
char szOffset[32];
rtvd = malloc(sizeof *rtvd);
rtvd->firstReadDone = 0;
#ifdef _LINUX
sprintf(szOffset,"%ll",filePos);
#else
_i64toa(filePos,szOffset,10);
#endif
rtvd->hc = hfs_do_chunked_open( address,
"readfil... | 1 |
460f8aa7f0e4d79b5e69619c54afa448 | edecc0a6dbb4cf912292815e7430fb25 | 关闭广播发送端 | public class QUploader<K,IK>{
protected void closeNetBroadcastListener(){
try {
if(observableDisposable != null){
observableDisposable.dispose();
observableDisposable = null;
}
netBroadcastObservable = null;
}catch (Exception e){
... | 1 |
f9bc8f29a1448114f2f2bfc685a993ee | de5424aaa939d8229808ce49f8a83ce6 | 获取相应字段的schemaField mapped value | {
if( strFieldName.equals("EdorNo") ) {
return Schema.TYPE_STRING;
}
if( strFieldName.equals("GrpContNo") ) {
return Schema.TYPE_STRING;
}
if( strFieldName.equals("ContNo") ) {
return Schema.TYPE_STRING;
}
if( strFieldName.equals("InsuredNo") ) {
return Schema.TYPE_STRING;
}
if( strFieldN... | 1 |
9ecf7ca90cb0b0178ad147efcf01be45 | d4609ce6c33ac4f9dd7e9b5c50eb1d8c | Metóda skontroluje či prijaté varianty sú validné pre tento produkt | private function isNewVariant($Data)
{
if (!isset($Data["attributes"]) || empty($Data["attributes"])) {
return false;
}
foreach ($Data["attributes"] as $AttributeArray) {
if (!$this->isValidAttributeDefinition($AttributeArray)) {
return false;
... | 1 |
53e8e66c4b59e853a965b8f2ec2c57bb | 743179c77bcb8775c9066c7ecba1c3c0 | Gets the grid builder that will be used to construct the definition
and the final row data. | final class EditGridBuilder
public function getGrid(): array
{
$this->checkMissingFields();
return $this->grid;
} | 0 |
8cd72c08a94f191c01c49a9faa57edab | ee9d721a3e1fdcd1a19ad58d95ca5e42 | Returns details of an Azure SQL Database Server Recommended Action. | @ServiceMethod(returns = ReturnType.SINGLE)
Response<RecommendedActionInner> updateWithResponse(
String resourceGroupName,
String serverName,
String databaseName,
String advisorName,
String recommendedActionName,
RecommendedActionInner parameters,
Context cont... | 0 |
9665c088882fd9ffd048096470f26224 | 99e2821b4de0e4993b942faa1d01502a | Gets the property descritpor in case this object descriptor specifies a complex type property. | namespace WSF.Shell.Interop.Interfaces.ShellItems
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetPropertyDescriptionList([In] ref PropertyKey keyType, [In] ref Guid riid, out IntPtr ppv); | 1 |
35a3e68c5af5a22dd2f3b95d1be0eaa7 | 642d2fb9a68420795364f5e8a1289f7e | Current mini-batch input. | start_idx = curr_step * self.DIST_BATCH_SIZE
end_idx = start_idx + self.DIST_BATCH_SIZE
return self.x[start_idx:end_idx] | 1 |
693b922b8d999be47940dc7792d027b5 | 2f046d8f3894a583e924c779109d9927 | maps pixel position to position within fractal coordinate system | UINT MFractal(double x0,double y0,double x1,double y1,int gx,int gy,int w,int h)
{
double dx = x0 + gx * (x1-x0) / (double)w * 4;
double dy = y0 + gy * (y1-y0) / (double)h * 4;
double x = 0;
double y = 0;
double xx = 0;
double yy = 0;
double xy = 0;
UINT i=0;
while((xx+yy)<4 && i<20000)... | 1 |
97050b9a50ecdafbf1e6b89bf8223b0a | b8006b9117ec4e1826136735d916fa44 | Constructor that makes empty uniwue_ptr | wiw:: wiw() : data(0), left(NULL), right(NULL){} | 0 |
2f3d12fa6cf0c0d9bbfa9fc4dadd97a3 | 1312ee07eb1dff5d35c27ddcb0426649 | genRandomSequence() uses cityAvailability to generate List of available indices and apply them onto List
curSequence. After each application, index is removed from availability, leading to no dupes and normalized size. | uint8_t tempSequence[SEQUENCE_MAX];
for(int i = 0; i < SEQUENCE_MAX; i++) {
tempSequence[i] = rand() % NUMBER_OF_REGIONS;
}
globals_setSequence(tempSequence, SEQUENCE_MAX);
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.