query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
816eaee7d50602af2d5181bfb58bef81 | e2d9d69ecd999e0f79157c9b3c3891bf | Multiplies {@code A} by the multiplication of {@code B} by {@code c} element-by-element from
the specified offsets between the specified indices.
<p>
<p> | function mulOffset(out: NumberArray, a: NumberArray, b: NumberArray, oOut: number, oA: number, oB: number) {
const a00 = a[0 + oA], a01 = a[1 + oA], a02 = a[2 + oA], a03 = a[3 + oA],
a10 = a[4 + oA], a11 = a[5 + oA], a12 = a[6 + oA], a13 = a[7 + oA],
a20 = a[8 + oA], a21 = a[9 + oA], a22... | 0 |
873c28327db38c11333c3247a4367e49 | d3e102cafa1ca6c28dc19166ae80a0f6 | 站点统计页面 | {
$request = Request::instance();
$pageParam = $request->param('');
if (empty($pageParam)) {
$pageParam = array('status' => 'site_all',
'index' => '',
'search' => '');
} else {
$pageParam['search'] = empty($pageParam['search']) ... | 1 |
c56798415cc31e19c6b6bb904f1ec8f0 | eccc206cd657d5b2ac224f82b499a94a | Measures the length (in microseconds) of a pulse on the pin; state is HIGH
or LOW, the type of pulse to measure. Works on pulses from 2-3 microseconds
to 3 minutes in length, but must be called at least a few dozen microseconds
before the start of the pulse.
This function performs better with short pulses in noInterru... | int HC_SR04_pulseIn(int pin, int level, int timeout)
{
struct timeval tn, t0, t1;
long micros;
gettimeofday(&t0, NULL);
micros = 0;
while (digitalRead(pin) != level){
gettimeofday(&tn, NULL);
if (tn.tv_sec > t0.tv_sec){
micros = 1000000L;
}
else{
micros = 0;
}
micros += (tn.tv_usec - t0.tv_usec);... | 1 |
01d6ad8b8c5cf054834f227ce2c460fd | 83d32777ccb72df2bd8720bcf0e24857 | Returns the mediation adapter class name. | class ResourceAdapter extends AbstractAdapter
public function getClass()
{
return $this->domain->getClass();
} | 0 |
09886345a6a06d1810ddbc4569b6534c | dc83d1014170aae04718bb468063d78f | Find Target Instruction to be implanted | class Segment
def find_var var
instructions.detect {|ins| ins.target == var}
end | 1 |
b7814a827b6e751e51c2a283c38ae171 | 95c3b461ac83dabe99661890c7a20560 | Processes list of tuples into a csv format string | def printcsv(res):
s = ''
for tup in res:
s += '{0:10f}, {1:20f}\n'.format(tup[0], tup[1])
return s | 1 |
61ad26b8c8ace059fe54023e647f6048 | 3df2d2c6e1c4ffe33d52b02f9e5fd3f9 | Parse a number (INTEGER in the grammar). No sign allowed. | pg_parse_number()
{
char ch, *cp;
long long int value;
int radix;
CCardinalEnum cd;
char *orgToken;
cp = pg_tok_buf;
radix = 10;
cd = CD_DEC;
ch = *pg_cp++;
if( ch == '0' ) {
ch = *pg_cp++;
if(ch == 'x' || ch == 'X') {
... | 1 |
fd3211a151a0dc941deda034bab44df7 | 3943b8b048ca991a9fe1ef4edab117b8 | 判断邮件地址是否存在接口测试 | public void test_Check_Email() {
String email = "admin@admin.com";
assertEquals(true, lac.checkEmailExsists(email));
String email2 = "test@test.com";
assertEquals(false, lac.checkEmailExsists(email2));
} | 1 |
87ff1d918a49f20b50ee4a585480a299 | 57b1d2429b47c127a8e92df71ee355bb | Allow a maxium of 30 Characters. | if (this.name != undefined) {
if (this.name.length > 30) return true;
}
return false;
} | 1 |
1b035603adc7c20779b6fef7f087b109 | 989a4274599a6232c77939eccc3688db | 获得用户今日留言总数 | public int getTodaoMessageAmount(@Param("userId")String userId); | 1 |
d52044e76bda50df2ea985f1c1c3bc1c | 0762a4bd6ac5ce82e2bee5c8ed7d2525 | Fetch all buoys | {
if ( ! User::isAdmin()) {
return Redirect::to('dashboard');
}
$buoys = Buoy::all();
return view('buoys.index', compact('buoys'));
} | 1 |
b5a5ac9e051aa3f5c448c1ccf327c84d | 45b50b77e198b8d11e335edde5beb4d7 | Wraps a value to give it a low priority (-10). | let encoded = raw.wrapping_neg() as u16;
assert!(encoded >= 0xf001);
unsafe { Self(encoded) }
} | 0 |
e39cfeedb1026495c54d12b1b3196a72 | 8970b6005f39bda1892c48767fae09dc | 读取INDIVIDUAL_BIDER_EX_INFO列表 | namespace GGZY.FuWu.Controllers
public partial class JdBiderExInfoController:BaseController
public ActionResult ReadBiderExInfo(decimal M_ID)
{
var result = Fw.BiderExInfoService.ViewByPk(M_ID);
return JResult(result);
} | 0 |
2dd1f2b23c170b951987249f982cebdc | f16c769bc74ec4847995ce089dcfe59e | Method used for purpose of selecting question number that the user should answer
The database will return +1 value which is the current number of question
The survey questions are 1 indexed
the values in database are stored 0 indexed | {
try
{
QuestionOrder nextQuestionOrder = new QuestionOrder();
SqlCommand command = new SqlCommand(AppDAOConstants.getNextQuestionOrder, databaseConnector.connection);
command.Parameters.AddWithValue(AppDAOConstants.questionOrderSequence, c... | 1 |
f7e498e689465691281586aebb6f891b | 74d1fe25157b73a47e0cfdfceacda912 | right, bottom 좌표 객체를 반환한다. | public class Camera extends BBox
@Override
public basicObjects.Point getBottomRight()
{
return new basicObjects.Point(this.getRightX(), this.getBottomY());
} | 1 |
b4f18ae2e4280c71022a4ec23c6600b2 | 5509f51f50513a26045399c3e1c4eba0 | Needs hardware support, not currently supported | class SystemBiosHardwareManager(hardware.HardwareManager):
def evaluate_hardware_support(self):
return hardware.HardwareSupport.SERVICE_PROVIDER | 0 |
91c67e187a66b4cbdaa16ed22865f00a | dbae464e4d285fd379506057fbe0fb36 | Writes an HTML summary report. | StringWriter sw = new StringWriter();
PrintWriter out = new PrintWriter(sw);
print(summary, out);
out.flush();
out.close();
String string = new String(sw.getBuffer());
return string;
} | 0 |
9e529cc63fd9c780391932d432ca9876 | 2b6e5b7f92042311f59abe8765b67c1c | 定义函数,该函数接受一个FileTime类型的参数,返回一个DateTime类型的返回值。实现Filetime类型到DateTime类型的转换,便于输出 | namespace IACFSDK
public class Utility
public static DateTime DateTimeFromTime_t(uint time_t)
{
return DateTime.FromFileTimeUtc(10000000 * (long)time_t + 94354848000000000);
} | 0 |
4ca3795701eb55726225e50f5495d97a | 6311745986b655f547d4cfef370c7361 | 查询市商可发布多少买单 | chainurl := beego.AppConfig.String("chainurl") + "/udo_queryPublishCCRequireNum"
common.UDOHttpGet(chainurl, lang, func(result interface{}, err error) {
if err == nil && result != nil {
if data, ok := result.([]byte); ok {
var jsonResult model.JsonResult
err := json.Unmarshal(data, &jsonResult)
if er... | 1 |
3be6294f594683e9a51b14c125f64f84 | c1890cbb1f5b16ac087c65581d2987b9 | 查找维修时间段分析信息 | @ParentPackage(value="basePackage")
@Action("maintenanceTrafficAnalysisAction")
public class MaintenanceTrafficAnalysisAction extends BaseAction implements
ModelDriven<MaintenanceTrafficAnalysisVo>
public void findServiceTimeAnalyzeCakeMap() throws Exception{
try {
mtaVo.setEnterpriseId(getNowEnterpriseId());... | 1 |
30845e01e0321d4414809a1d1255365d | 0a86fa7c2cbd4279d348ed3fa415874c | Send notification with unique link | class LinkConfirmation extends LinkNotification implements ShouldQueue
public function toMail($notifiable)
{
$this->notifiable = $notifiable;
$requested_type = $this->requested->getMorphClass();
$url_text = trans('emails.goto.'.$requested_type,
[$requested_type => $th... | 1 |
ef8eb76c1c40a892a8a521c6d8e6896e | d8fde9f20f156782f409ae60935bc5eb | Get Carrier_Name. | public function getCarrierName(); | 1 |
dddb09e64f57a59e40504d8c5a404b4c | e2168223c5d7b2dcf8e10e2fad724da5 | 通过指定id获取ActivityFormListDto信息 | namespace HC.WeChat.Activities
Task<ActivityListDto> GetActivityByIdAsync(EntityDto<Guid> input); | 0 |
1a88f7d48dbfed74b782dec190bb5294 | ab835d7fa2ac99d82f5f0991fa5ebca3 | Called by <see cref="InitializeProducer"/> before calling <see cref="StartProducerLoop"/>. | namespace Contour.Transport.RabbitMQ.Internal
internal class RabbitSender : AbstractSender
public override void Start()
{
if (this.IsStarted)
{
return;
}
this.logger.Trace(m => m("Starting sender of [{0}]", this.Configuration.Label));
... | 0 |
343fa0023c7ac90837347ac4c980a463 | c966f874c63489bf73f5b12e686474e5 | Open lenfile to determine length of each contig in ref.fa.
Positional arguments:
lenfile = path to a file created from the ref.fa that has lengths of each contig/chromosome | def getLens(filename):
lens = []
fa_instance = screed.open(filename)
for record in fa_instance:
lens.append(len(record['sequence']))
return sorted(lens) | 0 |
fd44b662d9a72a1725f0d09ce0bdf2ac | e70845f082afe0e24452e844a499bad7 | Advances own state
Return value:
None | self.rot_state()
if self.count // self.transitions_per_rotation != 0:
if self.dir == CLOCKWISE:
self.on_clockwise_rotate()
elif self.dir == COUNTERCLOCKWISE:
self.on_counterclockwise_rotate()
self.count = 0 | 1 |
2a281953effb1d19adb538ba9b6f6b73 | f9c7532dd60e6aba88267ab6c6569d01 | Split post data to (fields, m2mfields) data | {
$data[$this->_stable]['content'] = $data['content'];
foreach ($data as $field_name => $post) {
if ($field = $this->_get_field_info($field_name)) {
$_v = $this->_get_field_value($field, $post);
$data[$this->_stable][$field_name] = $_v;
uns... | 0 |
cd42446b2332cdcb9f03ba4ff6517c01 | 790b79d4c9969b43e58c2db08329b3ca | Return the wordclass/part-of-speech for this class (or None
if it's above wordclass-level).
Note that by default this returns the native wordclass value
- e.g. 'adjective' rather than 'JJ'. But you can get the Penn
equivalent by including the keyword argument penn=True: | class Node(object):
def class_(self):
pass | 0 |
4d4ef3e460589772eda9d7d116302b0f | 62b31527e17ddb0cca80d53ba56ac3b8 | Constructor for extended changelog editor | class ChangelogEditorDialog(LogMixin, EventMixin):
def __init__(self, parent, base, ui):
self._parent = parent
self._parentUi = parent._parent.ui
base.__init__(self, self._parentUi, QtCore.Qt.CustomizeWindowHint | QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowMinMaxButtonsHint)
self.setupU... | 1 |
1409d6a1cadff96071a18311d9b90e9f | 618d8af5eeedd5e6a71e0489ba8fc9a7 | This function validates the input for the Convert To Energy process, highlighting invalid items. | namespace PCOE class CommonPrognoser : public Thread
void TestPrognoser::checkInputValidity() {
log.WriteLine(LOG_INFO, MODULE_NAME, "Checking Input Validity");
} | 0 |
d1319007de28216b56e7bd5a5d71f3c9 | 0b65580ad2c1fe4b1f171ddd67f996d7 | @brief MELCOキーボードの番号を設定 | static BOOL setKey(BYTE yKeyNr, BYTE* aKey){
if(yKeyNr<1 || yKeyNr>79)return FALSE;
CHAR cErr;
WORD wAddr = (WORD)yKeyNr * 8;
cErr=E2PROM_1_bE2Write(wAddr, aKey, 8, 25);
if(cErr==E2PROM_1_NOERROR){
return TRUE;
}else{
return FALSE;
}
} | 1 |
dfce1bb984dbfb0f410c54e917c8bfc6 | 42c8683e8f10e9a247cc15c1668932c2 | Sets the reason of this V1BuildStatus.
Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI. | if (value == null) {
throw new NullPointerException();
}
stateReason_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
} | 1 |
6e044c3509c863d6e5670a65881fddb1 | 481c28a0292e103097efe3b584a49d07 | Determina daca un numar este patrat perfect | {
unsigned long long int n=sqrt(N);
if(!(N-n*n))
return(1);
return(0);
} | 1 |
65f5ae121643a5e41dec52dde4e2a149 | c09b668ca8b404bb6751789ccd5224a4 | 是否分摊利息 | @Table(name="LACT_PAYMENT_SCHEDULE")
public class PaymentScheduleEntity implements Serializable,Cloneable{
public String getIsProfit(){
return this.isProfit;
} | 0 |
2103b387df127ebf1978ffb65d1b8ae5 | bd3274581f88b0f6510126bf88452b1f | Get global prefix we use with redis | class clsRedisAdapter extends clsAbstractAdapter
public function getPrefix() {
return $this->_prefix;
} | 1 |
0a18a13881cf07babf00cd53fae0e26e | 9869bc4e326b31b7ba32c87e4ab4d598 | Tests Controller::forward() | {
$this->controller = $key;
$this->prepare_request_test('HTTP', '80');
$this->prepare_request_data_with_slashes(TRUE, TRUE);
$request = $this->class->parse_request();
$this->assertIsArray($request);
$this->assertArrayHasKey('controller', $request);
$this->asse... | 0 |
196a3b03438f08068799aa36b1ad9dd6 | d86f6d997563e839457fcfb640458753 | 检测IE中的插件 | {
var P = {name:"VLC", status:-1, version:null, minVersion:"1,0,0,0"};
var Det=PluginDetect;
if (Det.getVersion)
{
P.version = Det.getVersion(P.name);
};
if (Det.isIE)
{
if(Det.ActiveXEnabled){
if (Det.isMinVersion)
{
P.status = Det.isMinVersion(P.name, P.minVersion);
if(P.stat... | 1 |
15121e0777b4490eecbf0edef0a9b189 | cc89578db83308a39daa7cef479e0ac2 | 商户资料补全 | import("Mct1.Util.Merchant");
$Merchant=new \Merchant(109);
$map=$Merchant->get_fields();
$lang=include('./Openapp/Org1/Lang/'.LANG_SET.'.php');
foreach($lang as $key=>$value){
L($key,$value);
}
$where['shop_mct_no']=$Merchant->mct_no;
$where['shop_status']=array('in','0,2');
$where['mct_tag']='RE... | 1 |
e6af2da795114fc50c894e030f19ec03 | 4538a3209c0301741f861d3a01f06099 | Create a new picture | class JsonFactory extends AbstractFactory
public function createPicture($path,$name='')
{
return new Json\Picture($path,$name);
} | 1 |
0ff5a341aa836578fe33c4f908044ca5 | 14e6d76d63aad51edae556412ad6b8f2 | 使用高德地图搜索附近 | NearbyQuery query = new NearbyQuery();
query.setCenterPoint(AMapUtil.convertToLatLonPoint(location));
query.setCoordType(NearbySearch.AMAP);
query.setRadius(5000);
query.setTimeRange(30 * 1000);
query.setType(NearbySearchFunctionType.DRIVING_DISTANCE_SEARCH);
Near... | 1 |
5f16a512ba58556df227762e1bcf31e6 | fb316df630ca145821d2dd78f8d70c95 | function to stop the activity with the back button | public class GPSActivity extends AppCompatActivity implements LocationListener
@Override
public void onBackPressed() {
super.onBackPressed();
this.finish();
} | 1 |
2ef6f5192a1535818778439cca66ec09 | 2108d5244fbb941c53e3f0b14126e090 | returns the Typeface used for the labels, returns null if none is set | public final class ComplicationDrawable extends Drawable
@Nullable public Typeface getTextTypefaceActive() {
return this.getComplicationStyleBuilder(false).build().getTextTypeface();
} | 1 |
dfb150aa8b280ed146d1a0a34a96bd7f | f8f1e1354e2961b070f2a513ea1df2c9 | Relays all state changes to the presenter window via postMessage | function showMessage(m) { backgrnd.postMessage({type: 'message', message: m}); } | 1 |
9d09d4cfe7dc23262ad18b4b8d8e5160 | 4f945cec848499f3d5e47f9a57250c71 | Get an array representation of the alert. | class ChatAlert implements JsonSerializable
public function jsonSerialize()
{
return [
'firstName' => $this->getFirstName(),
'lastName' => $this->getLastName(),
'messageDate' => $this->getMessageDate(),
];
} | 1 |
5b7ea24ebcdb733d86e72602f64c827f | 27bad30c183d5ba310e882f067c2daf3 | Reset VBO binding. | class OpenGLLoader:
def __unbind_VBO(self):
gl.glBindBuffer(gl.GL_ARRAY_BUFFER, 0) | 1 |
d188a3c603e4b281cea9038b2ee627fd | 192a41a041c7f47810951b6ac3eb8f0d | # returned IN RADIANS | d2r <- function(deg) pi/180 * deg | 1 |
cda9c0c67464f69cb534ae81f3014665 | 27d0dcd7b80fdce734f09e6cc8fec4a9 | plays a given audio file an infinitly often using the JavaMusicPlayer | public void playMusic() {
clip.loop(Clip.LOOP_CONTINUOUSLY);
} | 1 |
d63c33cb44c82d0b41cf8ed89ef0d3d1 | b4ad04dc7c36a7f78ffcdaec51b265a7 | POST: Pizza/Create | public ActionResult Index(int id)
{
var query = new GetPizzaByIdQuery { Id = id };
var pizza = queryProcessor.Execute(query);
var model = new PizzaOrder
{
Pizza = new Models.Pizza
{
id = pizza.id,
... | 0 |
a9c845efff2ff0c68c1e53b0d20f2167 | 07d26b7390176233db213558ffd208bf | <pre>
Gets a list of call sets matching the criteria.
For the definitions of call sets and other genomics resources, see
[Fundamentals of Google
Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
Implements
[GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/mai... | namespace Google.Genomics.V1 public static class VariantServiceV1
public class VariantServiceV1Client : ClientBase<VariantServiceV1Client>
public virtual global::Google.Genomics.V1.CallSet CreateCallSet(global::Google.Genomics.V1.CreateCallSetRequest request, Metadata headers = null, DateTime? deadline = null, Ca... | 0 |
1da984dedde17ead1eba93f299e5025a | 5765eefeabfdc17843755b5f72e4f449 | 从/dev/dna获取设备DNA码 | int kmy_get_sn(KMY_HANDLE kmy,HKMY env,HKMY obj,char *sn,int timeout)
{
char buf[512];
int len = 0;
if(!kmy)return FALSE;
memset(buf,0,sizeof(buf));
if(kmy_send_cmd(kmy->fd,"\x01\x38",2)>0){
if((len=kmy_recv_by_len(kmy->fd,buf,sizeof(buf),timeout))>5)
{
int snlen = kmy_readlen(buf);
int l = (snlen & 0xFF... | 0 |
04c88c5d87f7c2327c33c6e1f99706f3 | 730cc096da54eceb9dfd48ca00536a66 | Compute edit distance between tree t1 and tree t2
Unit costs are used if no explicit costs are provided. | def mineditdist(target, source):
n = len(target)
m = len(source)
distance = [[0 for x in range(m+1)] for y in range(n+1)]
for i in range(1,n+1):
distance[i][0] = distance[i-1][0] + 1
for j in range(1,m+1):
distance[0][j] = distance[0][j-1] + 1
for i in range(1,n+1):
for j... | 0 |
dc6bef796cd4bec97d88832117ba8dc2 | 2dc07afa6d50eb06a2a5604ee5691756 | Temporarily supporting only read-only memory. | MemorySegment asReadOnly(); | 1 |
d4e5851d81ea9d5430d5bbc4b93c623c | fe57f498699da943c96659c5e070314d | _getRobotSetting_ajax 获取机器人设置信息 | class TestController extends BaseController
public function actionRobotset()
{
return $this->render('RobotSet.html');
} | 0 |
a3569a640f176a89f6daf5d9c02f94c6 | b5beabba1b1321b3c820e0c64b715d0b | Get tile average color ( hex ) | function average_color( $file ) {
$img_resource = imagecreatefromjpeg( $file );
list($width, $height) = getimagesize( $file );
$average_image_resource = imagecreatetruecolor( 1, 1 );
imagecopyresampled( $average_image_resource, $img_resource, 0, 0, 0, 0, 1, 1, $width, $height );
$average_color = ima... | 1 |
9fc480950d378d70440334407b14dc92 | 0f1e25acf2007f634bec459e1f339e9e | Anytime the mouse moves over the area with Jack's caricature in,
this works out where the mouse is and makes Jack's eyes move accordingly | function avatarMouseMove( ev, x, y){
var xWithinAvatarFrame = x - avatar.getBBox().x;
console.log(avatar.getBBox().x);
console.log(xWithinAvatarFrame);
console.log(x);
var pnt = avatar.paper.node.createSVGPoint();
pnt.x = x;
pnt.y = y;
var localPnt = pnt.matrixTransform( avatar.paper.nod... | 1 |
4679954b01f68d886a9d750b68a10e78 | 59c48fcf79f07281dbbe8a8f7af0407c | 瓶子旋转方法 | function rotate(){
var deg=0;
flag=1;
timer=setInterval(function(){
image.style.transform="rotate("+deg+"deg)";
deg+=5;
if(deg>360){
deg=0;
}
},30);
} | 1 |
b2326b9977400a0a24d625c77f450409 | 6cfe1014d4f2f64f7d5e84b0356c7469 | Query execution plan printout if was requested by
{@link NoSQLClient#prepare} (see <em>opt.getQueryPlan</em>), otherwise
undefined. | namespace MongoDB.Driver
public abstract class MongoCursor : IEnumerable
public virtual BsonDocument Explain(bool verbose)
{
var verbosity = verbose ? ExplainVerbosity.AllPlansExecution : ExplainVerbosity.QueryPlanner;
var explainOperation = CreateExplainOperation(verbosity);
... | 1 |
340794774c40fa78174168048c7d8f43 | b015237037c51463500e21237d0dc28f | it's wrong if:
or, pulseMetaId is None and fields exists
or, pulseMetaId is not None and fields does not exists | for name in self._fields:
if not name is 'base' and name in meta:
setattr(self, name, meta[name])
for name in self.base._fields:
if name in meta:
setattr(self.base, name, meta[name]) | 0 |
522160fe3525190a9730eb7167049c28 | 119a9f9050e08600bd1aa0c85faf0b5d | Parse the provided NCX XML string, and return a new TableOfContents
for this data. | result = nil
Renderer.toc do |renderer|
result = render(renderer)
end
return result
end | 0 |
0cf83cac651cc9d0cc29a2a151db4002 | 321f58862c041050c793700944c1cf36 | AS5055(右)チップセレクト関数 | void Hal_VE_CCIR_PAD_Sel(void)
{
MDrv_WriteByte(L_BK_CHIP(0x02), 0x00);
MDrv_WriteByte(L_BK_CHIP(0x09), 0x00);
MDrv_WriteByte(H_BK_CHIP(0x50), 0x00);
MDrv_WriteByte(L_BK_CHIP(0x08), 0x10);
MDrv_WriteByte(L_BK_CHIP(0x1f), 0x03);
} | 0 |
6986b116cb959d0ae6de42c535a111d1 | 71f373b1f531a48bbb11762f1aae7187 | Returns one or more existing DMS Serverless replication configurations as a list of
structures. | class SdrsAsyncClient(Client):
def list_replications_async(self, request):
return self._list_replications_with_http_info(request) | 1 |
f19033536a1f681f6834c1b6ca08b7f0 | ecf22f2c38a00d639308db112e4b1730 | Logs the list broadcast addresses. | class zlog_sql(znc.Module):
def OnBroadcast(self, message):
self.debug_hook()
self.put_log('Broadcast: ' + str(message))
return znc.CONTINUE | 0 |
9979a8a5c873018333ce1a2c38bb7bd3 | f20fec0662b22ac9a2cbd48901e613d3 | **************** Setup the Current sensor ********************* | if( currentTime - timeTasks[TASK_CURRENT1] > TASKPERIOD_CURRENT1 ){
sensorValues[SENSARRAY_CURRENT1] = ina219.getCurrent_mA(5);
timeTasks[TASK_CURRENT1] = currentTime;
}
} | 0 |
e993311cf91e3e44c713beb51ee77133 | 8da03e2ec0cdd358f016a7d4a8c850fa | Default does nothing extra | public class ClientHandler : HttpMessageHandler
private static void NoExtraConfiguration(HttpContext context)
{
} | 1 |
900d4b5617438df7d37395b13995fd57 | 558b503ae71ce84c802c401483ee10e6 | convert a job into one that can be (has been) retried | class LAVA_RPC_connector(xmlrpc.client.ServerProxy, object):
def resubmit_job(self, job_id):
job_id = self.scheduler.resubmit_job(job_id)
job_url = self.server_job_prefix % job_id
return(job_id, job_url) | 1 |
c10656867a7673df1bb7de9c6285c7ee | db8bda67feb8ef60a830bc5263e1c301 | Handles the TextChanged event of the AssociatedObject control. | {
var textBinding = new Binding();
textBinding.Path = new PropertyPath("Number");
textBinding.RelativeSource = new RelativeSource(RelativeSourceMode.Self);
textBinding.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
textBinding.StringFormat ... | 0 |
4e252d5e8d386e520b4638c7f9d13ab1 | 0503ad7cd7c263314a3deb40c332ae83 | 动态字段,根据主键来更新符合条件的数据库记录,smps_info | @UpdateProvider(type = MyProvider.class, method = "dynamicSQL")
int updtByPk(Map<String, Object> params); | 1 |
44e2a13bdc417458eee1b272c96183d7 | 73cd5bf4866ac7cda2efdd63b6bb015c | Converts units (km, nm, miles, etc) to decimal degrees for a spherical
planet. This does not check for arc distances > 1/2 planet
circumference, which are better represented as (2pi - calculated arc). | def dd2meters(val):
global ellpsGRS80
return val * (ellpsGRS80.perimeter / 360) | 0 |
3c5ccf01cf84ac31861a376c11c631b0 | 0c3ee5121592040691af853c13c54dd5 | Return the original VariableResolver that this resolver delegates to. | public class BootstrapAnnotationWrapper implements ConfigurationWrapper
@Override
public ResolverWrapper resolver() {
return new BootstrapResolverAnnotationWrapper(this.delegate.resolver());
} | 0 |
32669929458e7ef9908649ba53f2dd8f | af935a1165ba7609b66c22133217979d | 解题思路:
移除有序链表中的重复项需要定义个指针指向该链表的第一个元素,
然后第一个元素和第二个元素比较,如果重复了,
则删掉第二个元素,如果不重复,指针指向第二个元素。
这样遍历完整个链表,则剩下的元素没有重复项。 | if (head == nullptr) {
return head;
}
ListNode* cur = head;
ListNode* pre = nullptr;
ListNode* next = nullptr;
while (cur) {
if (cur->next == nullptr || cur->val != cur->next->val) {
if (pre == nullptr) {
pre = cur;
head = pre;
... | 0 |
2c6f3578c8c32a627eee97011118786d | f767c7a47786890ef417983d92123c8b | !
Returns the histogram accumulated values as a set of bars for representing on a
chart. | public HistogramDataGroup getHistogramData(); | 1 |
b1ac7b2b0aacf5dcbee6872567ff2b0f | 769460bfcdb5c985c04aa69549ec5706 | Set a network interface as the default network interface
(used to output all packets for which no specific route is found) | output = subprocess.check_output('ip route | grep default', shell=True)
default_routes = [r for r in output.split('\n') if r]
is_default_interface_settled = False
for route in default_routes:
if default_interface in route:
is_default_interface_settled = True
else:
... | 0 |
769ca613edf5b2c83db18157525d1b7a | 775c8ba4ccfbfcb78f60125612e65488 | :obj:`str`: A textual description of the method that generated the result. | class Result(object):
def name(self):
return self._name | 0 |
09af26029f5bebd273be5dd26d18341a | 45f84abae3c9dddc5d1d863c2de66532 | Turn on shuffle (randomise) playback. | player = self.bot.lavalink.players.get(ctx.guild.id)
if not await self.check_karaoke(ctx, player):
return await ctx.send(f'{ctx.tick(False)} Sorry, but this player is currently on karaoke mode.\n'\
f'Karaoke mode means that only people with `DJ` or `Music Ma... | 1 |
467c3e4c3da2cc277b92dd20f4f7df49 | d085862712f64fd62c9764bdcb2dbd69 | @brief Generate ifj20 builtIn function ord. | void define_buildInFunc()
{
define_function_inputs();
define_function_inputi();
define_function_inputf();
define_function_length();
define_function_substr();
define_function_ord();
define_function_chr();
} | 1 |
b5acf9c7b76f6937e872a4e12d07a01a | d7c2b294e11a2ca3f3c588b1232247d2 | Create a count builder to prepare a query on elastic search. | class Item extends Model
protected static function buildCountQuery(array $arrOptions)
{
return QueryBuilder::count($arrOptions);
} | 0 |
f6379c3d65863b7e4dc5842860e3b4e2 | 7e0d3aa5c1eb71758336e686e4904170 | Execute command within container of <paramref name="service"/>. | def execute(ctx, service):
from subprocess import call
from ..utils.docker import get_default_service
from ..utils.cwd import CwdHelper
if not service:
service = get_default_service(CwdHelper().get_compose_path())
cmd = 'docker exec -it {0} /bin/bash'.format(service)
call(cmd, shell=True... | 1 |
4ea255ffbbdad3d3e851abb619db753c | eac2f5ab49a1bbcec64f8813a70ab8fb | Ensures that the distribution's storage can accomodate the specified bucket. | int index = Arrays.binarySearch(bucketOffsets, n);
if (index < 0) {
index = -index - 1;
} else {
index += 1;
}
buckets.incrementAndGet(index);
} | 0 |
bf8e855ee790cc782dc88bd7fe87362e | ca0bb670486091dd84c163b15029939e | 新增country信息页 | public ModelAndView addView(){
ModelAndView view = new ModelAndView("countries/countryAdd");
return view;
} | 1 |
2fa4f7a7cda61ebb7da34272fc9309b3 | 95dbb13b898c61572aefa9b480246127 | A local helper routine,used to wait on all non-signaled objects in the specified object array. | [PInvokeData("WinBase.h", MSDNShortId = "ms687025")]
public static extern uint WaitForMultipleObjects(uint nCount, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.SysInt, SizeParamIndex = 0)] IntPtr[] lpHandles,
[MarshalAs(UnmanagedType.Bool)] bool bWaitAll, uint dwMilliseconds); | 0 |
96ea03f5fedaeee5a17a2bf8cafd90d4 | 245c2ed0c179e55ba29816e48f7be3ba | Find the distance between 2 specific waypoints | class WaypointUpdater(object):
def distance_2wpts(self, wpt1, wpt2):
dist = math.sqrt((wpt2.pose.pose.position.x-wpt1.pose.pose.position.x)**2 + (wpt2.pose.pose.position.y-wpt1.pose.pose.position.y)**2 + (wpt2.pose.pose.position.z-wpt1.pose.pose.position.z)**2)
return dist | 1 |
75ae762240e5a0d26e2a2429ff07a8cf | 83191f311aa2db1d57e1386222e86418 | Transforms solution given as edge list to a solution in permutation
form. | new_order = np.zeros((2, graph_size), dtype=int)
for i in range(graph_size):
new_order[0][i] = new_order[1][i] = i
for l in links:
nodes = l[4]
if nodes:
if nodes[0] > l[2]:
for i in range(len(nodes)):
... | 1 |
9e6b82757d169ae9a30fd2936ea677f5 | a2842160922a517ff27390c7afe0d4ca | Set storage PID. | if ($this->conf['storagePID'] == -1) return 0;
if (!$this->conf['storagePID']) return 0;
return intval($this->conf['storagePID']);
} | 0 |
8b5679e929f8450ce8a3a05bb1364903 | 977d4263050e47d1689feeb5a6a31f44 | 폼에 화면을 그려주는 부분 | namespace 수직선그리기
public partial class Form1 : Form
private void Form1_Load(object sender, EventArgs e)
{
_도화지 = new Bitmap(this.Width, this.Height);
} | 0 |
3de175f09ce17d36b77c5107bb08c9f3 | 8518f24839d3d20184384a0b8e3ea77b | Первый этап оформления заказа. Список товаров прикрепленных к заказу. | {
mysqli_autocommit(App::$db, false);
mysqli_begin_transaction(App::$db);
$sql = "select @orders_id:=`id` from orders where `buyers_id` = '{$this->userId}' and `status`='".self::ORDER_PREPARE."';";
mysqli_query(App::$db, $sql);
$sql = "select `id`, `goods_id`, `name`, `qu... | 1 |
39b5051d16f9561a60c1097c0bb21972 | 3ce4684ba7e6de6484b972b3511c368c | 获取所有的装备(背包和已穿戴) | public class IncreaseManagerment
public void getAllEquips ()
{
ArrayList list = StorageManagerment.Instance.getAllEquip ();
if (list == null)
return;
if (allCanEquip == null)
allCanEquip = new List<Equip> ();
else
allCanEquip.Clear ();
Equip eq;
for (int i = 0; i < list.Count; i++) {
eq = (Equ... | 0 |
4c0f1a3525a7ae98c451c1c103d115c5 | 74b39fed02479cc23e12c39b71a0df8f | determines which trips are unusual. Trips that happened only once are
considered unusual. | def get_unusual_trip_count_ids(data):
count = 0
ids = []
if data is not None and len(data) > 0:
for key, value in data.items():
if len(value) == 1:
count += 1
ids.append(value.pop())
else:
print("INVALID INPUT(S)")
return count, ids | 1 |
8e59868e449ee040a01f4d546417c1d3 | 61446dd9643a6429b4b1d2cab87b81fc | Save the accept or decline of a @User by a @Project manager | return self.request("updateProjectInvitation", {
'projectid' : projectId,
'accept' : accept,
'account' : account,
'token' : token,
}) | 1 |
49c53dfedcbd33a655b99e42644f8152 | 452e10c6ca5dac7a3c2dade8b105b7d7 | helper method to collapse the notification window | namespace VKSaver.Controls
public class AppNotificationControl : Control
public async void Hide()
{
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
if (timer == null) return;
try
{
parent.SizeChanged... | 1 |
20cd783033492b116736998d6b015d9c | 66964b35c2d4744c3a5cf77e1655a0e8 | Uso simples dos varargs | public class MethodArgs
public void show(String... strings) {
System.out.println("use the variational");
} | 1 |
0368950683db59052dda3fda51ed0988 | 7f82f31420b61d9f92aa813df184c487 | The full password hash, as used by {@link PasswordAlgorithm} to decode it. | public function getPasswordHash(); | 1 |
e38d24cac6d7167ce2103977c46e79af | c418a574114ebadda3c376c609bb216e | @brief 按之字形层序遍历二叉树 | int LayerOrder(BiTree bt)
{
LinkQueue Q;
BiTree p;
InitQueue(&Q);
if (bt == NULL)
return 0;
EnterQueue(&Q, bt);
while (!IsEmpty(&Q)) {
if (DeleteQueue(&Q, &p))
;
printf("%c ", p->data);
if (p->LChild)
EnterQueue(&Q, p->LChild);
if ... | 0 |
0c8fe8ca87a553c22584923e9868ba9f | 9fafc8e4d6c55839f7ce9bdd68aa0873 | Récupérer les commentaires à valider | {
$querybuilder = $this->createQueryBuilder('c')
->where('c.status=0');
$comments = $querybuilder->getQuery()
->getResult();
return $comments;
} | 1 |
0350ac561fa4c5a0191107fc9199bbf8 | 7d1424146963fa612b38dd50af7a7efc | Removes an appliance from the list | class ApplianceHttpApiController extends Controller
public function destroy(ApplianceHttpApi $applianceHttpApi)
{
return ['success' => $applianceHttpApi->delete()];
} | 1 |
b0289a7596356358cd529606ee03d348 | f07aba837c8665cd172bf017b8abba6c | Update the page with the settings already stored. | function initializePageAction() {
const gettingStoredSettings = browser.storage.local.get();
gettingStoredSettings.then((result) => {
settings = result;
toggleCSS();
}, onError);
} | 1 |
92ee3d1e2fbef2c13ad454754be42f05 | 060ff77757a1d410ca4b36eac3e273e6 | ログから検索文字列のある最後の結果を返す。 | public class RegexUtils
public static String findLast(String source, String pattern) {
return ListUtils.getLast(find(source, pattern));
} | 1 |
4d36cd5cd57818e754a7ae678e6b7f06 | fb55a56d2933de011c9a95278dd7ac04 | 客房管理批量锁房 | public class SelectActivity extends Activity
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private void lockRoom(final GuestRoom.Bean bean){
OkGo.<LockRoom>post(HttpUrl.LOCKROOM)
.tag(this)
.params("mchid", mchid)
.params("bstype","2")
.params("co... | 0 |
683c31c74a3efc398f6d159cec77b3a5 | d794565401b6885b787af6c7e90a8ee9 | Notifying all the subsribers about new addition of an article | namespace RedNoble.Starmao.DesginPattern
public class SinaNews : IObservable<Article>
public void AddArticle(Article article)
{
_articles.Add(article);
Notify(article);
} | 1 |
a8d10abcac2849d2e079216957e66b88 | be409c6c2c4e5fa42d8c851503f2a44f | 设置授权页字段信息接口. | class Handle
public function setAuthorizerOption($option_name, $option_value)
{
if (!$option_name) {
\Wechat\Init::$errorMsg = '选项填写不正确';
return FALSE;
}
return $this->parent->http->post (
[
'component_appid' => $this->appid,
'authorizer_appid' => $this->authorizer_appid,
'option_... | 1 |
a2fcd744194ba485652c012c00744402 | 9ebbce2c25a5901140979797bca146b1 | Executes the given JavaScript within the webview and gets the result. | bool wxWebViewMiniBlink::RunScriptInternal(const wxString& javascript, wxString* output)
{
jsExecState es = wkeGlobalExec(m_webview);
jsValue value = wkeRunJSW(m_webview, javascript, false);
jsExceptionInfo* exp = jsGetLastErrorIfException(es);
if (exp)
{
if (output)
*output = exp->message;
return false;
}... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.