query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
94d39ca76b0f2134f7b638423fd1cbc8 | af309009a080af1e5b49b0cd081e76fc | Reads the differential between two channels. | class OscilloscopeChannel(object):
def _get_is_differential(self):
value = api.ScpChIsDifferential(self._handle, self._ch)
library.check_last_status_raise_on_error()
return value != BOOL8_FALSE | 0 |
b121f5aadc506d00f2a0069cde01781f | 4d0b7927e191da7c8b7bc7ba56861f5f | Callback for getdirent | {
UNUSED_ARG1(hdl);
int err = ESUCC;
dir->dirent.dev = 0;
dir->dirent.size = 0;
switch (dir->d_seek++) {
case 0:
dir->dirent.d_name = "bin";
dir->dirent.mode = S_IRUSR | S_IRGRP | S_IROTH | S_IFDIR;
break;
case 1:... | 1 |
1018b4ae3a1252af5eb21e8605cedcf4 | 50fb9d518e73ef80afd7892ce9700a90 | Add a point to a filled shape. | self, vertices: SetOfPointsOrFunctions, color: str = "red", opacity: float = 1.0
):
self.elements.append(Fill(tuple(self.parse_point(p) for p in vertices), color, opacity)) | 0 |
5b4b51194b5ae34dd29c9b8a6cc67c3d | 4fe61185aa0266424958cd229bd0c856 | 删除数据库中已被删除的原微博 | public class WeiboAction
public void delWeibo(HttpServletRequest request, HttpServletResponse response) {
int c_id = Integer.valueOf(request.getParameter("cid"));
WbArticle wbArticle = new WbArticle();
wbArticle.setC_id(c_id);
try {
wbObserable.notifyUpdate(wbArticle, Modifyenum.delete);
} catch (Exception... | 0 |
9ea01afac437419b0b3f7c28faa9d39f | 47bd29632544e60fcdf760bb3256caaf | Get the enumerator of the offsprings by the depth-first pre-order search. | class BinaryDecisionDiagram(boolfunc.Function):
def dfs_preorder(self):
yield from _dfs_preorder(self.node, set()) | 1 |
e05e112f061ade9fd3e642d950da5078 | 01ebcf143e78776c896c4f22edb444c0 | Set the transforms of the containers and this portalObject's portalMeshes. | {
BW_GUARD;
this->BaseChunkTree::setTransform(transform);
if (this->tree_.get() != NULL)
{
Matrix world = pChunk_ ? pChunk_->transform() : Matrix::identity;
world.preMultiply( this->transform() );
this->tree_->resetTransform( world );
}
} | 1 |
761e97ff09378246a067a825872621c7 | 3ed4659ebff77f025ff7a1896ec7e0e4 | Compare a string of bytes - not a character string, since a NULL can
appear anywhere. | register const unsigned char *s1 = (const unsigned char *) p1;
register const unsigned char *s2 = (const unsigned char *) p2;
unsigned char c1, c2;
do
{
c1 = (unsigned char) *s1++;
c2 = (unsigned char) *s2++;
if (c1 == '\0')
return c1 - c2;
}
while (c1 == c2);
return c1 - c... | 1 |
73452c7bb92c3d8ecd2c7c8ccc0478a1 | de8da3ddb65a8c876e4a10c18f527bf9 | Sets the local bind address to which the multicast socket is bound for discovery. | public class DsBindingInfo implements Cloneable, Serializable
public final void setLocalAddress(InetAddress addr) {
m_LocalAddress = addr;
} | 1 |
3747de9abac2c6a9748d1d292c3ca5b3 | d5c48a5f176990b078f8a17d736e4190 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This function will form the Link State database by using link state updates
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | void decode_linkStatePacket(char *buffer, int in_fd) {
struct peerList *new_peer = (struct peerList *)malloc(sizeof(struct peerList));
char *next_field, ip[100], *ethMAC = malloc(MAXBUFFSIZE);
int neighbors, numrecords, i;
if (debug)printf("Received: %s\n", buffer);
next_field = strtok(buffer, " \n"... | 1 |
d8121a165c91b9814b7bbb4591dc0fb4 | 9499e7036bb692ef130e0fb38543fdfe | this function takes two images as input along with their homography matrix and returns the stitched image | stitcher = cv2.Stitcher_create()
status, stitched = stitcher.stitch([image1, image2])
return stitched | 0 |
f9324deddd042cda4bfc79cb54359a44 | 62c3911efe6347adf671929c0724cb96 | set currently captured photo in image view | if(continousImgObject){
hideImageCaptureView();
$.mobile.loading( "show");
continousImgObject.base64Image(function(result){
imageObject = continousImgObject;
$("#captureNextButton").show();
document.getElementById('captureViewContent').innerHTML ="<center><img i... | 1 |
425477d7ffa620b34ec107c075e24467 | 5fc0ed0075408c8ec208a2b183d29a1e | Fonction pour initialiser le json à envoyer à InfluxDB | def prep_for_influx(article: dict):
return {
"measurement": "articles",
"tags": {
"title": article['title'],
"media": article['media'],
"description": article['desc'],
"link": article['link'],
"img": article['img'],
"symbol": ar... | 1 |
7189b5c1e2ec81b00a90b0b4092ffcbe | e4841564bd79b1b99a49f8d82a1e7799 | Убрать лишние пробелы перед запятой | {
string R = "";
int i = 0;
while (S[i] == ',') i++;
int k = S.Length - 1;
while (S[k] == ',') k--;
for (int j = i; j <= k; j++)
if (S[j] != ',') R += S[j];
else if (S[j - 1] != ',') R += S[j] + " ";
... | 0 |
c80acd4c5b6de86c2b7856a533203d57 | 63d84790d5ea8dddb449a38cbddf2f77 | Sets the restart strategy configuration. The configuration specifies which restart strategy
will be used for the execution graph in case of a restart. | class ExecutionConfig(object):
def set_restart_strategy(
self,
restart_strategy_configuration: RestartStrategyConfiguration) -> 'ExecutionConfig':
self._j_execution_config.setRestartStrategy(
restart_strategy_configuration._j_restart_strategy_configuration)
return sel... | 1 |
036062455e39505200814804ff456bdf | 33f8bf800739e26085c4daba776832be | Method called at the start of the dialog.
Caches current values and displays them in the GDS tab. | class MenuForm : Activity()
public override fun onPrepareDialog(id: Int, dialog: Dialog) {
when (id) {
DIALOG_COEFS_ID -> {
val fldK1 = dialog.findViewById<View>(R.id.editMenuDlgK1) as FloatEditText
fldK1.value = user!!.factors.getK1(Factors.DIRECT)
va... | 0 |
5deb804e048ec407b6e93f06a5f6fe39 | 5b12aae0e9a1e3f145a2c3e97e75f768 | @brief Function to send an interrupt to the registered
driver | void* buf)
{
MESSAGE driver_msg;
driver_msg.type = io_type;
driver_msg.DEVICE = MINOR(dev);
driver_msg.POSITION = pos;
driver_msg.BUF = buf;
driver_msg.CNT = bytes;
driver_msg.PROC_NR = proc_nr;
assert(dd_map[MAJOR(dev)].driver_nr != INVALID_DRIVER);
send_recv(BOTH, dd_map[M... | 1 |
780955d4cc38bae0158b19067b68e703 | 8e263de40c34762ff9a94172fdcb93a8 | 安装某个依赖, 可参考 https://yarn.bootcss.com/docs/cli/add | install() {
this.installDependencies({
npm: true,
bower: false,
yarn: false
});
} | 0 |
05e45d2cf3b213fff3796f2fa8091bf1 | 1161ebf7ab1a7775728f06d0eb4ec029 | Sin implementar, la función siempre regresa error. | public final class ClaseReflejadaFlojaK implements ClaseReflejada
@Override
public boolean isClaseError()
{
return false;
} | 0 |
a70bcc73514fe953db1323d8039ade24 | 4b07b2afe3292a0e048eda228cd01b52 | Try to get the Destructible script on the object. If found, attach the OnDestroyed event listener to the DestroyedEvent. | public class DestroyButton : MonoBehaviour
public void AddDestroyEventListener(UnityAction listener)
{
destroyEvent.AddListener(listener);
} | 0 |
9e98b9a575d7fb183a1ed27dea862873 | 0f70a1b455c7ffb9ea0315bf023b5438 | Plot the Picard GC Bias plot | def make_bias2p_plot():
hmesh = BigFileMesh(dpath+'ZA/opt_s999_h1massA_fourier/datap', 'mapp').paint()
grid = pm.mesh_coordinates()*bs/nc
noises = np.loadtxt('/global/u1/c/chmodi/Programs/21cm/21cm_cleaning/data/summaryHI.txt').T
for i in range(noises[0].size):
if noises[0][i] == np.round(1/aa-1... | 0 |
20c752ee82bb11cbb8c68b5307c3d08e | 5d6d64f913979a034ad0d7e912942380 | This method asynchronously downloads betfair startprice files and writes them to a csv file based on the input parameters given.
File types are determined by location, bet type, date, and type of race (greyhound/horses). | s3_client = boto3.client('s3')
s3_response_object = s3_client.get_object(Bucket=bucket_name, Key="bainbridge_live_interpolated_data.json")
object_content = s3_response_object['Body'].read().decode('utf-8')
departure_times = json.loads(object_content)
seconds_late_list = departure_times["seconds_late... | 0 |
1182fc918b72866ef4832aa9d8b3e6ed | e86067ef4c65f935b0cb7f676394dd94 | Metoda zwracająca zamówienie na podstawie nazwy użytkownika | namespace WebAPITest.Controllers
public class OrderController : ApiController
[Authorize]
public Order Get(string name)
{
return Order.CreateOrders().Find(o=>o.CustomerName==name);
} | 1 |
3f52e97da24df371d18cfe2fbf300bf2 | 669e4365bf8ffa90e2cd2d9fa999761c | Temperature along an isentrope (Anderson and Ahrens; Equation B5) | def T_ISA_3(h):
h = np.atleast_1d(h)
T0 = 288.16
ll = -6.5e-3
T = np.zeros_like(h, dtype=float)
T[(0 <= h) & (h <= 110... | 0 |
1dd3a652ddfe5668e57229a5348661ba | 19a847ebbce4eb21691939c148d67c2a | 元素到浏览器边的距离 | var actualLeft = element.offsetLeft;
var current = element.offsetParent;
while (current !== null) {
actualLeft += current.offsetLeft;
current = current.offsetParent;
}
if (document.compatMode == "BackCompat") {
var elementScrollLeft = document.body.scrollLeft;
... | 1 |
b4f9bf04ad319aaba35bf7623848adce | 096c474a671ee25bf774d41f58a6d752 | Method 1: Brute Force - TLE | int trap_brute(vector<int>& height) {
int ans=0;
for(int i=0;i<height.size();i++){
int max_height_l = 0;
int max_height_r = 0;
for(int j=i;j>=0;j--){
max_height_l= max(max_height_l,height[j]);
}
for(int j=i;j<height.size();j++)... | 1 |
7d22904840da168967c4789a1059b247 | fa93a2b127ac9325df3abe040eb10db3 | Babylonian method to approximate the square root | double x;
double squareRoot = num1 / 2;
do {
x = squareRoot;
squareRoot = (x + (num1 / x)) / 2;
} while ((x - squareRoot) != 0);
return squareRoot;
} | 1 |
2b16545c342aab03b5d140f3dd637c4b | 90120696b4bd017670b895e8f449fdf3 | กำหนด สี | {
if (dataGridView1.Rows[e.RowIndex].Cells["ProductionImpStatusName"].Value.ToString() == "ยกเลิก")
{
dataGridView1.Rows[e.RowIndex].DefaultCellStyle.ForeColor = Color.Red;
}
else
{
String s = dataGridView1.Rows[e.RowInd... | 1 |
241a66fad38417b56496cb0c046e4c45 | c048487a626ad6e903a5a839ab48dc43 | 将定义的内容转成php-swagger的定义 | $r=[];
if(count($path)){
foreach($path[0] as $idx=>$name){
$r[$name]=[
'name'=>$name,
'in'=>'path',
'description'=>'',
'required'=>true,
'type'=>'string',
];
if(isset($path[1]) && isset($path[1][$idx])){
$r[$name]['pattern'] =$path[1][$idx];
if(isset($r[$name]['patt... | 1 |
26d3b94952c6faeafee7cf9435f02bfe | 7e3993073afa9b3bba17dcbbd85e0286 | Because we display input as "percentage" to user but store it as
decimal, we need a way to convert our weights from decimal to % | class GradingRule
def validate_weights(raw_score)
if raw_score.end_with?("%")
raw_score = raw_score.split('%')[0]
end
validate_points(raw_score)
end | 0 |
e780a3ffc3622e17d2f9da1dc104d819 | e00eea57a453b8bea69eb8cc0f8bb42c | Most likely result first | def most_probable(model_result):
return np.argmax(model_result) | 1 |
322b0c0ea4e868402c849d5f62033534 | b788f5e65db9364c38f030717248c42f | Returns the foreign key | abstract class RelationAbstract
public function foreignKey()
{
return $this->foreignKey;
} | 1 |
5f5b888b10d67029a5707391d656fbdd | 619f99d8d196ad9c17324c4c859a4599 | 用当前日期、时间和1000以内的随机数组合成的文件名称 | public class Common
public static String getFileName(){
Calendar c = Calendar.getInstance();
String str = getStr(c.get(Calendar.YEAR),4);
str = str + getStr(c.get(Calendar.MONTH)+1,2);
str = str + getStr(c.get(Calendar.DATE),2);
str = str + getStr(c.get(Calendar.HOUR_OF_DAY),2);
str = str + getStr(c.get(Cal... | 1 |
02af06caa07ec1de166d1665fe025f74 | 64c18d1555c15f3d208d000d4911e4da | This method handles approving and disapproving reviews. | super.before(error => {
if (error) { return callback(error); }
this.path = `/reviews/approve/${ObjectId()}`;
callback();
});
} | 0 |
8f0500b2f0f642977649292accd53839 | f3d0391ef42ead399c58889827eff92e | Tests parsing of a valid job response. | prod = cliparser(get_test_file("CLI/CLIJNU.txt"))
assert prod.data[0]["cli_valid"] == datetime.datetime(2013, 6, 30)
assert prod.valid == utc(2013, 7, 1, 0, 36)
assert prod.data[0]["data"]["temperature_maximum"] == 75
assert prod.data[0]["data"]["temperature_maximum_time"] == "259 PM"
assert pro... | 1 |
3cf7c1126762a22e76723e6526dd7cee | 180175909fd42a82ca865f7c3077e7e0 | 创建setTimeout, destroy时自动清除 | this.timer = null
this.buffer = new Set()
this.run = function(fn, value) {
if (value) {
this.buffer.add(value)
}
if (this.timer !== null) {
clearTimeout(this.timer)
}
let args = Array.from(this.buffer)
this.timer = setTimeout(() => {
fn.call(this, args)
this.clear(... | 1 |
2778fd42674e7646c501e095664a6934 | 93236bc2523969f0637c7580f844b8bc | save all countries from request to db | class CountriesViewModel(application: Application): AndroidViewModel(application)
private fun saveAll(countries: List<Country>) {
countriesRepo?.saveAll(countries)
} | 1 |
b93d975f09781d673435a6a60042fdbf | 5fd2e44e148479138668bcd8349a3b94 | 左右を入れ替えた骨格要素を返します | {
try
{
return Bone[Connector.Form.SelectedBoneIndex];
}
catch
{
return null;
}
} | 0 |
04dd94b9a175bdcea40af5f5e58e7290 | f221a64726940cbcc2e3b423d06d1104 | Only select visitor activities who are associated with the specified custom url ids. | public class VisitorActivityQueryRequest extends BaseQueryRequest<VisitorActivityQueryRequest>
public VisitorActivityQueryRequest withProspectId(final Long prospectId) {
return withCollectionParam("prospect_id", prospectId);
} | 0 |
d8a8067589a6e8747065f4e2886caa73 | 223626b00a7a3bab597f7765461275fa | Sets card styles for upgrades type | binding.cardViewPaymentMethod.textViewPaypalMethod.background = getDrawable(R.drawable.custom_border_with_color_accent_dark)
binding.cardViewPaymentMethod.textViewPaypalMethod.setTextColor(getColor(R.color.black))
binding.cardViewPaymentMethod.textViewCardMethod.background = getDrawable(R.drawab... | 0 |
06dff01d92b1dc587db03744fb127a3e | da3832ec1f4b5d3279e0530bb3430100 | Devuelve una cadena aleatoria de 3 letras | $caracteres = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
$numerodeletras=10;
$cadena = "";
for($i=0;$i<$numerodeletras;$i++)
{
$cadena .= substr($caracteres,rand(0,strlen($caracteres)),1);
}
return $cadena;
} | 0 |
fccd6a4f2cb0334abf66965c6f7e4cbf | 155550a7a2ff9967541b25691ae5925f | 装备评分对比 | $appid = I('get.appid');
$userid = $_SESSION['userid'];
$Appinfo = M('Appinfo');
$sql = " call versioncom({$userid},{$appid})";
$compare = $Appinfo->query($sql);
$len = count($compare);
if ($len == 1) {
echo 'false';
exit;
} elseif ... | 1 |
55398c796c43a0a910df7f96ba6cfe31 | 54d066aba040fcb7fba67f289e288344 | Get the listener socket. | SOCKET MyServer::getSocket() {
return listenSocket;
} | 1 |
6536d019fcdff2bca1aacc5ec41efb69 | de0090a599784a49079b76ea220329e9 | Returns all available subscription types | class Apptha_Airhotels_Model_Subscriptiontype extends Mage_Core_Model_Abstract
public function getAvailableTypes() {
return Mage::getModel ( 'airhotels/subscriptiontype' )->getCollection ()->addFieldToFilter ( 'status', '1' );
} | 1 |
253ac0027d0e7ed63bed00e03d7ebba1 | a519134ee93e14d4b1cd489592a5b225 | Make sure aggregation dict has legal keys | unknownKeys = set(d) - validKeySpecKeys
if unknownKeys:
raise ValueError("Unknown keySpec keys: %s" % (sorted(unknownKeys),))
if 'item_prevalidatedglyphset' in d:
if not d.get('item_renumberdirect', False):
raise ValueError(
"Prevalidated glyph set provided for valu... | 1 |
7e45b82998c5d30653f5e4d66b5f7b01 | 29e79ca25d551026c326d43228cafd65 | Testing undeleting a deleted role | class DbRoleStorageTest extends PHPUnit_Framework_TestCase
public function testDeleteRoles() {
$this->instance->addRole('fritzchen', 'editor');
$this->instance->addRole('fritzchen', 'admin');
$this->instance->addRole('fritzchen', 'reader');
$this->instance->deleteRoles('fritzchen');
$this->assertEmpty($this->... | 0 |
3449de7936f1234fd6e69dbd8d091350 | 7d31a10dbb6aa93c0c3bca546b9ec509 | Gets a value indicating whether a converted number's Exponent property
will not be higher than EMax + 1 - Precision. If a number's
exponent is higher than that value, but not high enough to cause
overflow, the exponent is clamped to that value and enough zeros are
added to the number's mantissa to accoun... | public final class EContext
public final boolean getHasExponentRange() {
return this.hasExponentRange;
} | 1 |
7a94cc93b1d8bef7f73125b5e2527320 | 7546b661a2d0ac5d67db4618e037711a | Maps each phoneme to its corresponding blendshapes based on
either the XML or the inspector configuration | namespace VRCAvatarEditor
public class SkinnedMesh : IFaceEmotionSkinnedMesh, IProbeAnchorSkinnedMesh
private List<BlendShape> GetBlendShapes() =>
Enumerable.Range(0, Mesh.blendShapeCount)
.Select(i => new BlendShape(i, Mesh.GetBlendShapeName(i), true))
.ToList(); | 0 |
72dfbaed2c5dc080d6b06c19417c72b9 | 2c9a82f8a89cd006439f175221137d26 | 教师端刷新获取学生的问题并显示 | cache.myajax('infoAction/getInformation', {
data: {
user_type: "003015",
start_key: oPdata.end_id,
direction: 1,
student_id: cache.getChild().student_id,
limit: oPdata.page_size
},
success: function(data) {
var aRe = data.result.data;
if(!cache.isArray(aRe) || aRe.length <= 0) {
mui('#pu... | 1 |
c7654a22c62c629d82682301fcbace96 | 786dced106f498521d7ddfb21e86d217 | 当前月天 | let year = this.getFullYear()
let month = this.getMonth()
return Miment(year, month, 1)
} | 0 |
22333c45e7f1c268f3ee483acd45361f | 57c9ffce29843fc3d06f5a4063b1d34c | test Strict Avalanche Criterion by returning number of bits changed in output | block_128 diff_bits;
int dist = 0;
for (diff_bits.b0 = BlC.b0 ^ BlAC.b0; diff_bits.b0 > 0; diff_bits.b0 >>= 1)
if (diff_bits.b0 & 1) dist++;
for (diff_bits.b1 = BlC.b1 ^ BlAC.b1; diff_bits.b1 > 0; diff_bits.b1 >>= 1)
if (diff_bits.b1 & 1) dist++;
for (diff_bits.b2 = BlC.b2 ^ BlAC.b2; diff_bits.b2 > 0; diff_bit... | 1 |
a76ee67c63f41b9299e58369a0ddc960 | 61125cfc20ecf2785e5894a9f35ee021 | Deselects the polyline. | self._page_lines.remove(self._selected_polygon)
self._selected_polygon = None
self._highlighted_polygon = None
self.sortLines()
self._image_object.update()
self._image_object._ui.updateTextBox() | 1 |
b58d95c83d5d7f5ddbb2b2a0ac23a7ab | f270cf4274cac0ae891dda1855252c60 | Create new random inbox
Returns an Inbox with an `id` and an `emailAddress` | GeneralProperties newInbox(RequestWrapperInbox body) throws ApiException; | 0 |
b43f9ee40d5b8905cfdf14790eedef6b | b95d7c1b9c5f4507117ddd3e58e3e018 | defining a function that takes a string and a dictionary and returns an encrypted version of the string | input_str = [ord(c)+1 for c in input]
encoded_pass = [ord(c)-1 for c in password]
encoded_pass = [chr(p) for p in encoded_pass]
encoded_pass="".join(encoded_pass)
encoded_str = [chr(c) for c in input_str]
encoded_str ="".join(encoded_str)
encoded_string = encoded_pass+'^'+encoded_str
ret... | 0 |
4a8574d508a2230eb4d7a10ceb8ecbe5 | 73271389f7089577ac37d85b173815a7 | 图片URL转base64,返回base64字符串 | BufferedImage image = null;
ByteArrayOutputStream os = new ByteArrayOutputStream();
String base64 = "";
try {
URL url = new URL(imageUrl);
image = ImageIO.read(url);
if(null != image){
ImageIO.write(image, "jpg", os);
by... | 1 |
ab6fb2d286eb5ccda3db6b3d3392d595 | c3a08781a6b187a1980365f54056702c | Uses the API request routing. | class Director extends BaseDirector
implements ArrayAccess, IDirected
protected function routeApiRequest( $aUrlPath )
{
if ( empty($aUrlPath) ) {
throw (new FourOhFourExit($this->getSiteUrl($aUrlPath)))
->setContextMsg('actor not found');
}
$thePathSegments = explode('/', $aUrlPath);
$theActorName = arr... | 1 |
9ec29a53496c7141cf11230855138ef2 | 6e61e1d5b4147c271939f0d280cfcbd9 | 查询店铺下所有的打印机(未删除) | class ShopController extends BaseController
public function get_printer_list() {
$shop_id = I('get.shop_id/d');
$shop = M('shop s');
$result = $shop
->join('__SHOP_PRINTER__ sp ON sp.shop_id = s.id')
->join('__PRINTER__ p ON sp.printer_id = p.id')
->field('p.*')
-... | 1 |
b384e602072ef80e21fce3df9c74a754 | 1590b4d786bd3e70428936dc4a109528 | Method that adds 1 file to the total number of files. | public class SuperModel
public void addCopiedFile() {
this.copiedFiles++;
updateInfoLabel();
} | 1 |
e5121e046f94fa99625581f6d599cefa | c61fb70af38d2d9e7aafd263bf350b73 | 注册选择图片和拍照的监听 | @UseRxBus
public class ChatActivity extends RootActivity<ChatPresenter>
implements ChatContract.View
, View.OnClickListener
, BaseQuickAdapter.OnItemClickListener
, BaseQuickAdapter.OnItemLongClickListener
, BaseQuickAdapter.OnItemChildClickListener
, BaseQuickAdapter.UpF... | 1 |
6db50c5585fed175d19bf418c4f032f0 | 4bf048e56b54229641640e19c7263870 | Yılanın başının ekrana çizilmesi | {
cls(hConsole);
setposition(snake[0].x, snake[0].y);
SetConsoleTextAttribute(hConsole, (WORD)((Black) | Yellow));
cout << "O";
for (int i = 1; i < tail; i++)
{
setposition(snake[i].x, snake[i].y);
SetConsoleTextAttribute(hConsole, (WORD)((Black) | Green));
cout << "o";
}
} | 1 |
8661afa9fdd6245419c2a709d4230fc2 | e80265756d50075eb8494315cea8e0c5 | 注入数据库拦截器 | @Configuration
@EnableTransactionManagement(order = 2)
@MapperScan("com.jingyou.main.**.repository")
public class MybatisPlusConfig
@Bean
public MybatisInterceptor mybatisInterceptor(){ return new MybatisInterceptor(); } | 1 |
a827a7be0c0cc9b4216efce8af9a4de7 | 603c07d450b7e32b4f9355b0f39d177d | If we cannot test in Chrome/Chromium directly, we can try to compare output to `example-extension.crx` which was tested. | async function main(): Promise<void> {
try {
await runTests({
extensionDevelopmentPath: path.resolve(__dirname, '../'),
extensionTestsPath: path.resolve(__dirname, './index'),
launchArgs: ['--disable-extensions']
});
} catch (err) {
console.error('Fail... | 0 |
11600408693d5f31c6208038235ff567 | 3b24688a12f98722ec68359ea97ee655 | Set the offset in the backlash correction to a small random integer. | namespace galil
void Axis::backlash (const double& _val) throw (Tango::DevFailed)
{
YAT_TRACE("galil::Axis::backlash");
std::string why_not;
if (! this->m_state_man.command_allowed(galil::BACKLASH_WRITE, &why_not))
{
THROW_DEVFAILED(_CPTC("BAD_STATE"),
_CPTC(why_not.c_str()),
... | 0 |
ad71999948b57c1e047aab08ec8f4b87 | 8f83af73d6fe64b4d4e6d0ec30b85b59 | Является ли юзер овнером, чтобы создавать организации | class Company extends AutoCompany implements Prototyped, DAOConnected
public function isOwner(User $user = null)
{
return $user instanceof User && $this->getOwner()->getId() === $user->getId();
} | 1 |
836888ccea7b3500665eb5f11d6e940f | f444006a78dd5b0cfc9bd4bae096c632 | Gets the kyc flag. | interface WalletService
fun getKYCVerifyStatus():Observable<KYCVerifyStatusResp> | 1 |
ca5a05c5b6cfee69a9c5dc1754e123a8 | f10716eabfccf4e28bc6a460757d7e98 | Specify Context Constructor argument type(s) | {
if (staticCall) yield return Types.DTypeDesc[0];
if (!classContextIsKnown) yield return Types.DTypeDesc[0];
if (!methodNameIsKnown) yield return Types.Object[0];
} | 0 |
68e9fbacb2c90b189626885f97887485 | a6456069cedff57757c86a736978991a | HDLPlayURL 生成 HDL 播放地址 | {
$time = time() + $time;
$vhost = $vhost ? $vhost : $this->playLike;
$appName = $this->appName;
$privateKey = $this->payKey;
$url = '';
switch ($type) {
case 'rtmp':
$host = 'rtmp://' . $vhost;
$url = "/{$appName}/{$streamN... | 1 |
ed12d44069510972b72ce5ed0bd03727 | 058e1460de83a22c1d82be6f0193d748 | Test if the sudoku solver gives the same solution
Input and output files are from online (Sample problem 9, easy)
http://www.nikoli.com/en/puzzles/sudoku/ | KnapSackSolver* solver = new SolverImpl(KNAPSACK_INPUT_FILE, TEST_OUTPUT_FILE);
solver->start();
delete solver;
return TestUtils::checkOutput(ASSUMED_CONTENT_SOLVER, ASSUMED_CONTENT_LINES_SOLVER, TEST_OUTPUT_FILE);
} | 0 |
c735a12d419e669b8bb4656e12cce3b2 | 50f74c8000cc89c001c422ae0a91b07d | funcao para limpar o vector | void limpa_vector(int n){
for (int i=0;i<n;i++){
v[i].clear();
}
} | 1 |
259a3647b5162c3f21d1fba50a8c55a4 | e287a38e0f46d1d99e837bb70e7390be | Implements controller autoloader. | function controller_autoload($clasename){
include 'controllers/'.$clasename . '.php';
} | 1 |
8cff23293ada9e0af1aadbedf902daaf | e4a7b74f0026a479316b30b56e167471 | 执行单返回值SQL语句 | class mysql_handle():
#初始化
def exc_sql(self,sql):
try:
return_result = {}
return_result['row_num'] = self.cur.execute(sql)
self.conn.commit()
return_result['data'] = self.cur.fetchall()
logging.info('SQL执行成功:' + self.special_handling_spaces(sql))
... | 0 |
85875fa870b9d5ac9e5941d1371a4cbe | 73b87042c7c2ea59b22b4205205def2d | 创建文章的文件夹保存图片 | $image = '';
$savePath = $this->imagesPath.$articleId.'/';
$returnPage = 'images/'.$articleId.'/';
if(php_uname('s')=='Windows NT'){
$savePath = dirname($_SERVER["DOCUMENT_ROOT"]).'/images/'.$articleId.'/';
}
if(!file_exists($savePath)){
mkdir($savePath, 0777, true);
}
if ($this->request-... | 1 |
f8765ad56cd12065ce88b0a7ea9543f6 | c94f88e120908491337326ae029578f9 | Method to purchase items in Cart | public ResponsePurchaseDTO makePurchase(CartDTO cart) throws NotEnoughQuantityException, NameNotFoundException, IOException, ProductIdNotValidException, BrandNotFoundException {
StatusCodeDTO status = productRepository.checkAviability(cart);
ResponsePurchaseDTO response = new ResponsePurchaseDTO();
... | 1 |
a3764d55a784650dd1a0eb535e17bc71 | d1c22062b6bb9fcaa60458fb5015e6af | Affiche la liste des lycéens | $lyceens = $this->getDoctrine()->getRepository('CECTutoratBundle:Lyceen')->findAll();
usort($lyceens, function ($a, $b) {
return strcmp($a->getNom(), $b->getNom());
});
return $this->render('CECTutoratBundle:Lyceens:tous.html.twig', array('lyceens' => $lyceens));
} | 1 |
5bf76a024ab3b1b147e3423abe51d267 | 5c698349946c50d57c7fb4a4a8d12015 | Function Name : Set_System
Description : Set System clock.
Input : None.
Return : None. | {
#ifdef SYSCLK_FREQ_SYS
SetSysClockToSYS();
#elif defined SYSCLK_FREQ_SYSPLL_48MHz
SetSysClockTo48();
#elif defined SYSCLK_FREQ_SYSPLL_60MHz
SetSysClockTo60();
#elif defined SYSCLK_FREQ_SYSPLL_72MHz
SetSysClockTo72();
#endif
} | 1 |
fc0210bf09cd3ff4dbb14999961288a2 | d32ead55af04b8a78f6df121408c8de9 | Align palette to scrolled window position. | void CBCGPRibbonPanelMenuBar::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
ASSERT_VALID (this);
if (m_pPanel == NULL ||
pScrollBar->GetSafeHwnd () != m_wndScrollBarVert.GetSafeHwnd () ||
(m_pPanel->m_pPaletteButton == NULL && !IsBackStageView()))
{
CBCGPPopupMenuBar::OnVScroll(nSBCode, nPos, p... | 1 |
e3a6957976d15d8501def8cf3474eb1c | b9163a534c74647185e7e14905d9bed0 | 标注系统首页数据获取与传递 | @Controller
@RequestMapping("/index")
public class IndexController
@RequestMapping("main")
public String main(HttpServletRequest request, Model model,Student student,Staff staff,Book book) {
long stuNo = stuService.getCount(student);
long grd16 = (Long)stuService.getCountByGrade().get(0).get("num");
long grd17... | 1 |
055d9b0fc6cdb1884acd1ed99875c61d | d46fb997bd665602d73d304ca349252e | Check the status of this tween of chain of tweens. | namespace DG.Tweening
public class DOTween
public static int Validate()
{
return TweenManager.Validate();
} | 0 |
1240a18b017ffa00eb5b29990ac47a3b | 49b92fe4311bb4748149e731277bfe42 | метод для создания нужной разметки формы в зависимости от кнопки, на которую нажал пользователь | namespace TickerAnalysis
class Manager
private void ButCreateResearchTemplateClick(object sender, EventArgs e)
{
string research = researchWork.GetSelectedLbElement(TabConResearchElements.LbResearch);
switch(research)
{
case "GroupR1":
... | 1 |
100456f1b9134203f0c9420e9a454ac9 | d05b6e3e78545c27159a261b48b5eda9 | Transform a `matplotlib.contour.QuadContourSet` to a GeoDataFrame | crs = {"init": "epsg:{}".format(epsg)}
to_point = lambda x: Point((x[loncol], x[latcol]))
data_frame["geometry"] = data_frame.apply(to_point, axis=1)
gdf = gpd.GeoDataFrame(data_frame, geometry="geometry", crs=crs)
return gdf | 0 |
79b63b4219cd552ec22bd9fabf704c9d | 5e6183f0e147a938136cb7669fd206ff | retourne vrai si tout les parametres d'ajout/modification d'absence sont bien remplis | $params = array_filter($params);
$needed_infos = array_filter( array_merge( $this->params_mandatoriness, array('controller'=>1,'action'=>1) ));
$needed_infos_ok = !count( array_diff_key( $needed_infos, $params, $this->defaults ) );
$represent_all_params = !count( array_diff_assoc( array_diff_key( $params, $this... | 1 |
4509ee3cffec75791fd412eda21d8238 | 13532c8d650caade9bd5f67e69350da3 | 单个修改互联网边界防火墙开关 | const options = ParamCreater().showFirewall(showFirewallRequest);
options['responseHeaders'] = [''];
return this.hcClient.sendRequest(options);
} | 1 |
13e43b7a9b82586ba1ff2c7592eaada6 | b7c28f1cd7667599db4490dfec38d4f7 | escribe los resumenes numericos en el log de una columna continua | for k in continuousColumn.classesItems.keys():
logValue("Media de "+k+": ", continuousColumn.classesMeans[k])
logValue("Varianza de "+k+": ", continuousColumn.classesVariances[k])
log.write("************************************************ \n") | 1 |
1244552cdbb4037de8ca5822c828287c | 2edf7d32441db34e2e7666bafc9a5b95 | 函数功能:进群 | class Rongyun extends Controller
public function joins($userId,$groupId,$groupName){
$info = $this->RongCloud->group()->join($userId,$groupId,$groupName);
return $info;
} | 1 |
36a6a4745c137dd24a01b88b152af6d9 | c31fa50b86a835c3160399ffdab45e40 | Initializes a Async Modbus Serial Client | self.identifier = identifier
self.address = address
self.modbus_client = modbus_client
assert isinstance(identifier, str) and isinstance(address, int) and isinstance(modbus_client, ModbusSerialClient) | 0 |
9649c00cc26632a95414950658d064ee | 9500a66bdd556c7bbd937c6606f254a9 | Highlight the current row in the graph and table | function renderCurrentRow(table, index){
let $root = $(table.rootElement);
$root.find(".ht_clone_left tbody>tr").removeClass(CURRENT_ROW_CLASS)
.eq(index).addClass(CURRENT_ROW_CLASS);
$root.find(".ht_master tbody>tr").removeClass(CURRENT_ROW_CLASS)
.eq(index).addClass(CURRENT_ROW_CLASS);
} | 1 |
181f9e011523225f44db0d71f8fd8c27 | 5d8bb59f85007de7e3e28016359f3a7e | Set value to Message Optional Drop Down List field. | public class FeasibilityCheckPage
public FeasibilityCheckPage setMessageOptional2DropDownListField() {
return setMessageOptional2DropDownListField(data.get("MESSAGE_OPTIONAL_2"));
} | 1 |
5486358e04bc95a9ff3439a9b48c202d | 3e75942b1e9c857ea570727e6404fe35 | Set utiCNomCompletCourt | class BonTravPrev
public function setAdFNomSuite3(?string $adFNomSuite3): BonTravPrev {
$this->adFNomSuite3 = $adFNomSuite3;
return $this;
} | 0 |
713757071e7309bb79c798466958fc4a | 1e2d9c315f1dc6a703dabe18b086ccc0 | 根据用户通行证识别身份,如果合法返回用户身份信息,否则抛出UserIdentificationExcepiton异常 | namespace Nanomite.Core.Authentication
public class CommonJwtTokenAuthenticationHandler
private async Task<ClaimsIdentity> GetUserIdentity(string userForeignId, string password)
{
string userId = await this.userAccessFunction.Invoke(userForeignId, password);
if (string.IsNullOrEmpty(... | 0 |
642ea3c247f40976fe1bbdcc40e1954d | 95a13609169a9cc309258bdf81a2987c | 获取cm阈值历史告警条数 | {
string mySql = string.Empty;
try
{
mySql = @"SELECT Count(*) FROM t_tgs_flow_alert t1 JOIN t_tgs_flowalarm_setting t2 ON t1.gzbh = t2.BH JOIN t_sys_code t3 ON t1.cljg = t3.`CODE` WHERE t3.CODETYPE = '430800' and " + where + " ORDER BY bjsj DESC ";
... | 1 |
8106c029c77f9828cda629b4dde6354e | 8a88b73b26c4e22390153a5965f26392 | 获取指定玩家的控制器编号。 | public class OmniInput : MonoBehaviour
private string ControllerHelpFunction(int playerId)
{
switch (playerId)
{
case(1):
{
return ApplicationSettings.p1_controller;
}
case(2):
{
return ApplicationSettings.p2... | 1 |
ee3ffafc79b6100b2700ffdfcd91267d | f45629adcb6606ecd8587e04ef227f56 | Each time a new day of work is added to the project,
it calls checkBillingCycle on its Billing System.
This allows it to check if a payment is due and react appropriately | @ViewScoped
@ManagedBean(name = "billingBean")
public class BillingBean extends BaseOperatorBean implements Serializable
public String startBillingRun() throws OrganizationAuthoritiesException {
boolean result = getOperatorService().startBillingRun();
return getOutcome(result);
} | 0 |
1699319eea586210c5f863f791e5912b | 1d0050b8048bd734a7f01ddccb340850 | Gets the label of this property's value for the given item or, when the property is absent, the default value.
The returned string will include the unit. | public class ListItemProperty extends JETAProperty
public String getLabel() {
return m_label;
} | 0 |
3d47129522d53945789ff7008492d679 | 69f1d4a6048111403e2fb79e5c0c78f5 | Export to file and clear the stream | void CHTTPOutputDataFile::Clear()
{
delete mStream;
mStream = new cdofstream(mFname.c_str());
} | 1 |
3abab0b9c37fb1c501dfc414db623909 | bd48e5b2308858451dde3650e53f72da | Allows a binary tree to be printed out. | public class BinarySearchTree<T extends Comparable<? super T>> implements Iterable<T>
void printTree(Entry<T> node) {
if(node != null) {
printTree(node.left);
System.out.print(" " + node.element);
printTree(node.right);
}
} | 1 |
31a87fd537ceef0941585d90ade65e17 | 42852f6c0ca8acc90025acc4c5500fe3 | Tìm mã hãng xe theo tên hãng xe nhập vào | {
cmd.CommandText = string.Format("SELECT TENXE FROM tblTTXe WHERE (MATTXE = '{0}')", ma);
cmd.CommandType = CommandType.Text;
cmd.Connection = con.Connection;
try
{
con.openCon();
var value = cmd.ExecuteScalar();
... | 0 |
094343aef67b073ad3917e7823a892cd | 6c742a33358a203f0660eabc49d51988 | 半透明背景隐藏 | public class PlayerKinematics : NetworkBehaviour
private void Transparent()
{
_tranlastTimer = 8;
_activeTransparent = true;
_material0.shader = Shader.Find("FenXiang/liangbian");
_shdow.SetActive(false);
_material0.SetC... | 1 |
3a87395e9ccc83f0e29e586e476cf7f9 | a77eb31108b8234d2a35d4ae68959fbf | Recovers root region location from ZK. Should only be called on master startup. | public class StorageImpl extends Storage
@Override
public Set getRecoveryRoots(Transaction xact) throws StorageException {
if (isClosed) {
throw new StorageException("Attempt to invoke inactive storage");
}
if (xact == null) {
throw new StorageException("Attempt to in... | 0 |
640d2d6e4c1c22d5ae1c6b7519b81ea5 | 895021b108158f48f05d6dcc5f35a99b | Helper to create operation context url. | class ResourceOperation(object):
def _url(self):
return '%s/%s/%s/%s.json' % (self.service_url,self.app,self.version,self.resource_slug) | 1 |
f2d18508361325fecccd8be3c8e6b1dc | 74044d761e57859694bb1daf51fc1558 | イベント終了期限内のデータを返答
<p>
イベント終了日時と現在日時を比較して有効なデータを返答する。 | public List<Map<String, Object>> searchCancelableData(Date earlier); | 0 |
d3f995112523a5cb136f44d55581b309 | 832b9be6fd65a0fbe6d9c2335e2fd32e | 获取当年的第一天 | function getYearStartDate() {
return new Date(nowYear, 0, 1)
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.