query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
740351d0c0f4ba15968f4b219c938955 | 535d559286acf1dbddbed3be910f2690 | Save xml metadata about the tiles. | z = zipstream.ZipFile(compression=zipstream.ZIP_DEFLATED)
for fname,(tree,body) in self.tmx_files.items():
z.writestr(fname, etree.tostring(tree.getroot(), encoding=self.ENCODING, pretty_print=True, xml_declaration=True))
with open(self.filename, 'wb') as f:
for data in z:
f.write(data) | 1 |
4bf84b8a5e706b0a9d43e48cd58842d8 | 0b12b58aed06e8d6d8254b5c0b76b1bc | box2Dの更新 | void ofApp::update(){
box2d.update();
} | 1 |
b162791b6c7c99427ac7512faae3b7c4 | fe6a7dfe1d226bacdced0febc268b469 | スクリーンマネージャからストップウォッチの画面上に処理対象となるカードを表示する | {
if (PlayerController.LocalPlayer == null)
{
return;
}
var playerId = PlayerController.LocalPlayer.PlayerId;
this.TargetPlayerState = this.IsOnBottom ? PlayerController.LocalPlayer.MyPlayerState : PlayerController.LocalPlayer.EnemyPlay... | 0 |
c3b4a0eb298e9dec00e8ef3abfedbdd5 | 084f62d843a82b5a2778d1364125556c | 对二值数组进行膨胀 | int width = bm.getWidth();
int height = bm.getHeight();
int source[][] = new int[height][width];
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
if (i > 0 && j > 0 && i < height - 1 && j < width - 1) {
int max = 0;
... | 0 |
9019f8d2a04880b74b6ba2b8795e2579 | dfff3b8c1f1315a07511bb1f84c9bad8 | Getter del JPanel que conte els camps per fer Sign-In. | public class ChatFrame extends JFrame
public SignInPanel getSignInPanel() {
return this.mySignInPanel;
} | 1 |
05a6abd798453f5c94bfc8f5115934e5 | 2938c346bb01e27109d9533eb4a463f4 | Adds a Show Time to a particular Screen (Cinema) provided no date and time clash with pre-existing Show Time | var ShowDay = Parse.Object.extend("ShowDays");
if (objId) {
var query = new Parse.Query(ShowDay);
query.get(objId, {
success: function (obj) {
obj.set("Ad", Ad);
obj.set("Starts", objStarts);
obj.set("Ends", objEnds);
ob... | 0 |
b4fec1c283d6eff6833dd1bb146cf2b2 | 353c4f93a9755437bc1f3ad709b975e4 | Updates the view with the most recent pictures | void ImageController::updateView()
{
this->updateView(ui.ImageListSortBox->currentText());
} | 0 |
ca1f66d07e087b4b73fd7058e29a4e8a | 4674721cce204d8c7703ba53407d0203 | Restore session data. | class SessionHandler implements SingletonInterface
public function restoreFromSession($key) {
$sessionData = $GLOBALS['TSFE']->fe_user->getKey('ses', $this->prefixKey . $key);
return unserialize($sessionData);
} | 1 |
3fb368996c78e445974272c9738a8df4 | f6dc828d5957a2d0c9fef972a03fd5a7 | 根据fenceId 查询详情 | FenceInfo findFenceInfoById(String id); | 1 |
cec61292e2e940cb5a3d674538ec5639 | 398c9584008d6785895bc315f1db0ab7 | 对相应order对应的伙伴位进行异或,index为伙伴快位索引 | local sum1,sum2=0,0
for col=1,order do
local product=1
for times=0,order-1 do
product=product*m[1+times][(col+times-1)%order+1]
end
sum1=sum1+product
end
for col=1,order do
local product=1
for times=0,order-1 do
product=product*m[or... | 0 |
2f283023bfa93f7348b1a0f5e6f159f6 | 17f3ab56856c361f5dd2987dfd67ed69 | 查询车辆月统计图数据 | class ReportServiceImpl implements ReportService{
public function searchSurveyMonthChart($obj){
if(!isset($obj->carId)){
$obj->carId = 0;
}
if(!isset($obj->queryMonth)){
$obj->queryMonth = date('Y-m');
}
$carId = $obj->carId;
$queryMonth = $obj->queryMonth;
$db = $this->db;
$firstDay = DateUtil::g... | 1 |
eed14f4ee54ed8002216c40bfde08a29 | 53cc5cbb58eb095cacc847302fbf143c | The User Profile endpoint returns information about the Uber user that has authorized with the application. | [HttpGet]
public ActionResult<UserProfile> Me()
{
var user = _userManager.Users.First(u => u.Id == User.FindFirstValue(ClaimTypes.NameIdentifier));
if (user == null)
return Unauthorized();
if (!user.IsEnabled)
return Forbid();
... | 1 |
56154e454eaa57aaf67954109c731c8e | 46811211483521009ba4c69271206f37 | two phase commit. During preparation all necessary resources should be
locked in order to be able to execute the commit without claiming
additional resources.
the {@code SubRequest} to process. | @SuppressWarnings("serial")
// using itself as lock for "regions"
public class TXStateProxy extends NonReentrantReadWriteLock implements
TXStateInterface, Synchronization
public void preCommit() {
} | 0 |
2c6ef7f51ebf71bb38a80a8b2fbcedec | 6669c1ca996694ecf15c049d253a131a | Parse an ISO 8601-formatted datetime into a Python datetime object.
Cf. http://stackoverflow.com/questions/531157/parsing-datetime-strings-with-microseconds
Previously called ISO8601Str2datetime. | def parse_isoformat(s):
return datetime(*map(int, re.split("[-:T]", s))) | 1 |
2c1c3263f8e5282442c141169fd2ac6e | 401527654b176a14e62c02e1166025b6 | Construct the display content for a gallery in the recyclebin | {
$galleries = implode('', array_map([$this, 'fillGallery'], $this->data));
$this->viewContent = <<<HTML
<div class="gallery-large">
<section class="gallery-header">
<h1 class="gallery-title">Jakked Hardcore Photo Galleries</h1>
<p>Click an image to go to a specific gallery.</p>
... | 0 |
3f3ebb5bd7aeeb7c4523f3192142f034 | 3266c36253d7ccc88939194e1441aa3a | 设置开始界面UI透明度渐变 | {
_renderer.material.shader = Shader.Find("Legacy Shaders/Transparent/Diffuse");
Color normal = Color.white;
Color transparent = Color.white;
transparent.a = 0.25f;
Sequence seq = DOTween.Sequence();
seq.onComplete += SetDefoultShader;
for (int i = 0; i < 3; i... | 1 |
3405929a3f8ec227170f7cc63b26ad26 | 122b412ed28abbff60331b9e91ca2ce9 | @brief threaded function to interpret commands from client | void * process_request(void *cli_id)
{
int tmp = *((int *) cli_id);
free(cli_id);
pthread_detach(pthread_self());
int clientsocket = tmp;
char buffer[MAXLINE];
std::string mssg;
while (!ABORT)
{
if (Helper::readline(clientsocket, buffer, MAXLINE - 1) <= 0)
{
break;
}
if (strncmp(bu... | 1 |
d4b977b2b958c6dccb19add6f4d6e312 | 72157025ac73b14254d12972fdfb20fc | opens CSV and preprocesses data | def open_csv(input):
data = pd.read_csv(input, encoding='latin-1', usecols = ['Area Abbreviation', 'Item', 'Element', 'Y1961', 'Y1962', 'Y1963', 'Y1964', 'Y1965', 'Y1966', 'Y1967', 'Y1968', 'Y1969', 'Y1970', 'Y1971', 'Y1972', 'Y1973', 'Y1974', 'Y1975', 'Y1976', 'Y1977', 'Y1978', 'Y1979', 'Y1980', 'Y1981', 'Y1982', ... | 1 |
bd3e1174c4643ae25ce5b400f879a714 | d19de65b36bc6f93ef7a0558a3d16eac | Test hashtag counts are created properly | class HashtagSearchTest(TestCase):
def test_hashtags_results_template(self):
factory = RequestFactory()
data = {
'query': 'hashtag1'
}
request = factory.get(self.url, data)
response = views.Index.as_view()(request)
page_content = response.render().content
... | 0 |
87324f09559489c41da103261899a512 | ccd97b384302f2fa7fd83912bbb4f4c0 | Handles setting up the outgoing record layout.
Called to report changes of the incoming connection's record metadata to the Alteryx engine. | with self.createRecord() as record:
for i in range(TITLE_RANGE):
param = f"TITLE{i}"
self._metadata[param] = record.rwString(self._metadata[param], 8)
self._metadata["MAXSIZ"] = record.rwInt(self._metadata["MAXSIZ"])
self._metadata["MAXBLK"] = ... | 1 |
db3b21cb6598b7d46b32cb7f17738c54 | 0ef530e8406fcf961778ce214f3b1482 | Обработка XML, возвращаемого Bspb после попытки платежа | class SBAPI
protected function set_response($response){
$response_xml = simplexml_load_string($response);
$error = $response_xml->{'header'}->error;
if( $error['id'] == '0' ){
$this->response = $response_xml;
return NULL;
}
die('Request to sbapi successful... | 1 |
3936b50c492296782e08a1e14e1b3278 | 37a984739ee80e7fd74b8b7c2586155d | The district with the given district_number or name | class Districts
def [](district_number_or_name)
@by_district_number[district_number_or_name] || @by_name[district_number_or_name]
end | 1 |
b3ca1a896438fa00d2de665b2e8c63d8 | 212b5f7d2949d0662a45cd8725f97c4d | The Kullback-Leibler divergence between two PWMs in bits. | if len(b1) != len(b2):
raise ValueError('List of bits differ in length')
diff = np.array(b1) - np.array(b2)
if diff.ndim == 1:
result = np.sum(np.absolute(diff))
return result / len(diff)
else:
result = np.sum(np.absolute(diff), axis=1)
return result / np.size(dif... | 0 |
cd53641e2e67b740c014d05675f37663 | 1b18e4e145e288751c43da1f67ac77c2 | Returns the name of the device where the dpdk interface is. | try:
sock = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
strInterfaceName = strInterfaceName[:15];
packedInterfaceName = struct.pack( '256s', strInterfaceName );
ret = fcntl.ioctl(
sock.fileno(),
0x8915,
packedInterfaceName
);
ret = ret[20:24... | 0 |
478e4604c5d495e1015c53ea1d06f7d2 | bfdf5b13f9173abd94e17f12aa1a5d38 | 确认移除照片 | confirm() {
if (this.data.currentId == 0) {
this.setData({
showMask: false,
img1:''
}, () => {
$.prompt('移除成功')
})
}else if(this.data.currentId == 1){
this.setData({
showMask: false,
img2:''
}, () => {
$.prompt('移除成功')
})
}e... | 1 |
d0504c7b5f5032dafaec4c6a9647c050 | 67fadfc6babde8eebeef5cf27b6994e6 | 为hash表设定一个字段的值,如果字段存在,返回false. | namespace CppRedisClient
size_t RedisClient::hset(const std::string& key, const std::string& field, const std::string& value)
{
if (!impl)
throw std::runtime_error("RedisClient::hset Error!");
return impl->hset(key, field, value);
} | 0 |
6d3abb08abe31c414751c64f3fb5c712 | fdae6c76f94bc2e0cf89cb9f8279024e | Получаем имя фалйа по выбору строки из таблицы. | answer = ''
link_to_csv = "model/crm/customers.csv"
table = data_manager.get_table_from_file(link_to_csv)
answer = get_name_by_id_from_table(table, id_)
return answer | 0 |
ab4eebdc1fa2a3a349e74e57a49fdee7 | 78113bc2372a7d70fcd9e8f78f050c80 | GET /datos
GET /datos.json | class ApiDatosPController extends Controller
public function index()
{
return DatosP::orderBy('id', 'desc')->get();
} | 1 |
28371e1d8fab3a8d8006317f3f13abd5 | af79ed30a190be8d5e4666e6739072b6 | Returns high cardinality key values. | KeyValues getLowCardinalityKeyValues(); | 0 |
f637be5587cdbe0379dcd317343724f8 | 0a69cb35ee647e5a6502368cf20a3e6d | 根据子元素的标识符,执行相应的挂载
如果是单个子元素,将vnode的el引用设置为子元素的el
如果是没有子元素,则创建文本节点,将vnode引用指向文本节点
多个子元素的情况下,vnode的引用指向子元素的第一个元素 | function mount(vnode, ctn, refNode) {
const { flags } = vnode
if (flags === VNodeType.HTML) {
mountElement(vnode, ctn, refNode)
} else if (flags === VNodeType.TEXT) {
mountText(vnode, ctn)
}
} | 0 |
4ac626b746aad71785d904d697ca9ead | 3c99149aec8238b8b1e0089a3347c1dc | @brief Measure distance before to an object using ultrasonic sensor | uint16_t DistanceMeasure_Task(void)
{
MOVE(-15);
uint16_t distance = Ultrasonic_GetAverage(20);
MOVE(15);
return distance;
} | 1 |
0c41995566a1cdaa67d5a072ab452a2a | c1e1b03de3341af2d3bcbf78cdf3c0ee | #Do reliability analyses | print("please carefully evaluate whether the result makes sense, and if not, please contact me")
if(load.lib){library(lme4, lib.loc=lib.loc)}
n.cores=n.cores[1]
model.eq=as.formula(as.character(model.res@call)[2])
if(class(model.res)[1]=="lmerMod"){
REML=model.res@resp$REML==1
xfam="gaussian"
}else{
x... | 0 |
3f13b7a923d3bb8c4991aed76964b8f0 | c6e65775a4de43a94676e8d53aa25b07 | Gets a string representation of the current date that has been entered, in the form "YYYY-MM-DD". | function func($http, $timeout, $rootScope, $log, $translate,
// Custom
seed,
// 3rd Party Modules
Flash
)
function getCurrentDateString() {
let year = getCurrentYear();
let month = getCurrentMonth();
let day = getCurrentDay();
let yearString = year + "";
let monthString = month < 10 ? "0" + mont... | 1 |
9083065ba82ebbb0d16f47be813774c0 | 79f293cf265c944b74559c872896737a | Gets outside air temperature | public final class Data extends Observable
public synchronized float getTempOutside() {
return tempOutside;
} | 1 |
be72b7070649917a8b563c438240b77b | 92e83d9c0fde92ce39d031d703ed41d2 | inserts a unity dimension at index (for tensor compatibility) | def add_unity_dim(x,idx):
return x.reshape(src.cat(x.shape[0:idx],1L,x.shape[idx:])) | 1 |
6f89db38d33fc2a688298d33658aa5a2 | cb24080ee72be617ee7887150a6d5c70 | Returns true if key is part of The Ignorables, a list of keys that the
typing area ignores. | def is_ignore(name):
for item in IGNOR_NAMES:
if name == item:
return True
return False | 1 |
681634e5918249cf11517cbb19c5e99c | 5a356a98a5b2911ef29f9ab373d1af02 | 灰度形态腐蚀 | namespace MiYALAB.CSharp.Image
public partial class ImageProcessor
public static byte[] Erode(byte[] rgbValues, int width, int height)
{
int x, y;
int retWork;
byte[] ret = new byte[rgbValues.Length];
Array.Copy(rgbValues, ret, rgbValues.Length);
f... | 0 |
3e8af14555f7a4625368ceb19e6b63e7 | 24cc0d33b099d2ddd83ea9518fbd3d60 | Метод для определения, является ли кость дублем | {
int a = 0;
int b = 0;
b += number % 10; number /= 10;
b += number % 10; number /= 10;
b += number % 10; number /= 10;
a += number % 10; number /= 10;
a += number % 10; number /= 10;
a += number % 10; number /= 10;
... | 0 |
bef38e3efc9f6bca5a75ea3bd4584038 | 6cdd03cb62a6657a24f37a39e814d1f4 | Perform a simultaneous fit to several data sets. | self._single_plane_func = self._fitter.fit(self._single_plane_np)
self._multi_plane_func = []
for point_data in self._multi_plane_np:
self._multi_plane_func.append(self._fitter.fit(point_data)) | 0 |
176ccbeb82ad75e87d9f563a325a63c6 | 5287e068e99ef0acc3fb252ec1369786 | Check if <Longitude> has a value | {
if (strValue == null)
return false;
strValue = strValue.Trim();
if (strValue.Length < 1)
return false;
try
{
return Location.IsValidLongitude(double.Parse(strValue));
}
catch
... | 1 |
283b3d0c39ab66b021f9f774461f7991 | 6f39cddd3de7f56c10007c03c2a44b31 | Creates the specified AppConsentRequestObject using POST. | {
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.POST;
return this.SendAsyncWithGraphResponse<AppConsentRequestObject>(appConsentRequestObjectToCreate, cancellationToken);
} | 1 |
07b0b4c9c4967fd9f9e2280c7fe93442 | 7b66da5c31306bea1530156060e4396b | If User apply multiple filters and click on Go button then entries should display as per all applied filters in table | {
var l = "//table[@id='list1']/tbody/tr[2]/td[8]/span[1]/a/span";
var cnt = XpathCount("//table[@id='list1']/tbody/tr");
Console.WriteLine("Xath Count is " + cnt);
for (int i = 12; i < cnt; i++)
{
var ll = "//table[@id='list1']/tbody/t... | 0 |
7c04bde699c59eb184449c73ac2ecc5f | 00b1474a36973a1058285eb175c67340 | Check if a user has active loan | global $db_handle;
$query = "SELECT status FROM user_bank WHERE is_active = 1 AND user_code = '$user_code' LIMIT 1";
$result = $db_handle->runQuery($query);
$fetched_data = $db_handle->fetchAssoc($result);
$bank_status = $fetched_data[0]['status'];
return $bank_status == ... | 0 |
288ed8762ba90a96ea596dd38d49f850 | d81c53ab30760ccb135a2d39ce553565 | Backing support for the interface. Since <see cref="DirectoryInfo"/>
cannot be part of a platform-independent interface, it is returned as
an object. | namespace Alphaleonis.Win32.Filesystem
[Serializable]
[SecurityCritical]
public sealed class DirectoryInfo : FileSystemInfo
public override string ToString()
{
return OriginalPath;
} | 0 |
1f2384635236ecbbb213df06c6bcf486 | 0341dc7e9b92eaa5bf118bdae25cdade | 添加Bean集合 | if (bean == null) {
bean = new ArrayList<Beans.Bean>();
}
return this.bean;
} | 0 |
a4ac1bc228bb28c3af32ccac1baa46b3 | 3e9eca33d6b4a1a0b91ec36c5a468166 | controllo che le misure non siano nulle o minori di zero | bool CPaintEstimator::ValidateMeasurements()
{
bool bOK = false;
if(mfWidth <=0 || mfLength <=0 || mfHeight <=0|| mfCoverage <=0)
{
cout << "ERROR: All values should be > 0" <<endl;
}
else if(mfWidth >= FLT_MAX || mfLength >= FLT_MAX || mfHeight >= FLT_MAX|| mfCoverage >= FLT_MAX)
{
... | 1 |
33dd506f0e44c20e4731cb48b8750556 | c445887dec1a8643613a1146714b066d | 获取时间段内某机构的统计样本总数 | public Integer getCountOfcountSamplesByHosIdAndItemId(Integer hosId, String assayId, String dateStart, String dateEnd, Long pageNO, Long pageSize,Integer type) {
dateStart+=" 00:00:00";
dateEnd+=" 23:59:59";
if(assayId!=null&&assayId.equals("0"))assayId=null;
Integer coount =itemsMapper.getCountOfcountSamplesB... | 1 |
65c7c6ae99a4ecca78936e51b4e83244 | b9e125cef9c20ac8d36ed388ad77214d | 设置红色指示物的数量 | mIndicatorList.clear()
mIndicatorCount = indicatorCount
if (indicatorCount <= 1) {
return
}
for (i in 1..indicatorCount) {
val indicatorIv = ImageView(context)
if (i == 1) {
val params = LayoutParams(DEFAULT_SELECTED_WIDTH, DEFA... | 1 |
cd04c51e1fdfd10942c5da3dd1056918 | 330425c89be5d718b0124c0365f61df4 | User generate verification code api | interface ApiService
@POST("/sms/verification-codes")
fun getCode(@Body map: RequestBody): Observable<Response<Void>> | 1 |
93547c0094a3b79b6cc4e44bbb4227ef | 628632f7937d5a65a3f2599745777d7a | Test of getHourlyWage method, of class HourlyEmployee. | public void testGetHourlyWage() {
System.out.println("getHourlyWage");
double expResult = 15.0;
HourlyEmployee instance = new HourlyEmployee("Joe C Doe", "123 45th Street", "Normal", "IL", "01/01/1969", "IT", "Peon", "Hi There", expResult, 10);
double result = instance.getHourlyWage();
assertEquals(expResult, ... | 1 |
161a1cc63058f3d090780d6795ee1f18 | c16d585941351b85a33f60b4abb4b33f | Returns execution event. | public function getExecution(): ?DelegateExecutionInterface; | 1 |
73650033d4bddff9085b61d32466c145 | 7e59408644ed3075153b10767f1e4ba6 | パノラマでキャプチャしてSkyBoxに割り当てる | {
m_specubemap = std::make_shared<KiriMaterialSpecCubeMap>(mCaptureProjection);
skyboxCube->SetMaterial(m_specubemap);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_CUBE_MAP, envCubeMap);
glBindFramebuffer(GL_FRAMEBUFFER, captureFBO);
UInt maxMipLevels = 5;
for (UInt mip = 0; mip < ... | 1 |
8f9fcb151228b162b55ee818a3e1e711 | adf0c2e97c4d5fc2da1ba4bef834812e | returns how much this row could shrink | public class Level
private int[] shrinkwrap()
{
int left=100;
int top=100;
int bottom=-1;
int right=-1;
for (int y=0; y<dataheight; y++)
{ for (int x=0; x<datawidth; x++)
{ if (mapdata[x+y*datawidth]!=Logic.AIR)
{ if (x<left) left=x;
if (x>right) right=x;
if (y<top) top=y;
if... | 0 |
5df6233c7bac373bce0a24bd85028623 | cab37e814200273bfcb4751f7c46285a | Method returns link to additional info about poll option | public class PollOptions
public String getOptionLink() {
return optionLink;
} | 1 |
da5abf9b7175067864fa1ba5103fba4c | 4bbb80834253cb35c4292dba51b5ed63 | Return the URL for the given static file | def get_static(name):
return os.path.join(CONTENT_PATH, name) | 0 |
49c32f1e611d81c36e3985254f1ec96a | 88ffca2e480bbba10f82efc8ab381788 | 隐藏若干不需要的组件 | function hide() {
$(_this).find('.j-btn-mch,.j-quan-review,.j-quan-good,.j-product,.j-brandNew,.j-need,.j-can,.j-tag,.j-edu,.j-quan-state-bar').hide();
} | 1 |
16a3f4e3d6b45418f7b27d26947c5f84 | b0957216618230e7e2f57a2f0758c9bc | Unity.Collections.NativeArray`1<T> Unity.Collections.LowLevel.Unsafe.NativeArrayUnsafeUtility::ConvertExistingDataToNativeArray<UnityEngine.XR.ARKit.ARKitFaceSubsystem/ARKitProvider/Triangle`1<System.Int32>>(System.Void*,System.Int32,Unity.Collections.Allocator) | inline NativeArray_1_tC6BADD95D4ED55F63077477B0C617579A5CDD6AD EntityQuery_ToComponentDataArray_TisWorldToLocal_tA6F5145726B3BC05E14B4B7B8C59E203DE564C49_mF20D4017324F57F27511FC5D1F9C4EF9A3C5D01B (EntityQuery_t76BED15925C813EF17FA4A29A4D9262AB62AD76A * __this, int32_t p0, const RuntimeMethod* method)
{
return (( Nat... | 0 |
0bcf891a377d0d4c1e6746191e7a33bd | df71528f7ae7aa0b2bcaacaf8094c9ee | Бан пользователя в группе | {
var parameters = new VkParameters
{
{ "user_ids", userIds }
, { "group_ids", groupIds }
};
return _vk.Call(methodName: "newsfeed.addBan", parameters: parameters);
} | 1 |
f83ba1ff1275b5d066124556d2708e01 | 441b91f5020532bbcba90afa087096e9 | Setta il valore di frame_scaling, di supporto all'esecuzione. | namespace Fee.Time
public class Time
public void SetNextFrameTimeScale(float a_timescale)
{
UnityEngine.Time.timeScale = a_timescale;
} | 1 |
9c182595a27728e1621f6db950718345 | 0aa921e2f326f7dd435b8cb9942fc65c | récupération du nombre de commandes passées par un client | try {
$query = "SELECT * FROM liste_id_commande(?)";
$resultset = $this->_db->prepare($query);
$resultset->bindValue(1, $idcli);
$resultset->execute();
return $resultset->fetchAll(PDO::FETCH_COLUMN, 0);
} catch (PDOException $e) {
p... | 0 |
465396a89d32f82752de9655080655ef | 2189248d50146f6da9f07f3d0486cc86 | Remove a single item (decrement the first stack found, removing if <= 0) | namespace ItemSystem
namespace Container
class Inventory
void deleteItem(const unsigned int& index) {
if (index >= storage.size()) return;
storage.at(index).decrementStackAmount();
if (storage.at(index).getStackAmount() == 0)
storage.erase(storage.begin() + index);
} | 1 |
177ab8672b9cb2b1282703e22741c707 | 3a298745352e1154469a2b932717a6df | Возвращает объект, в котором удален указанный атрибут текущего запроса. | abstract class AbstractRequest implements Jsonable
public function getAttributes()
{
return $this->attributes->copy();
} | 0 |
0dabeeab3d6bb7720144e439aa306e98 | 1e16159131a2b3ef57be22fcebc07e00 | Converts keyword into short link | public UrlDTO urlConvertToHash(@RequestBody UrlDTO request) {
return new UrlDTO(urlService.convertToShortLink(request), null);
} | 1 |
d6cae39bff45683848de5c656095d3e1 | 4da502975ee9bbb0f3977d5a9993c354 | Moves the camera along its up vector | void Camera3::MoveUp(const double dt)
{
Vector3 upupup(0, 1, 0);
position += upupup * CAMERA_SPEED * (float)dt;
target += upupup * CAMERA_SPEED * (float)dt;
} | 1 |
5fdb0783621e4e002699da0c54a36870 | dc40211f67460d136bee01d4dc3c0c1c | <p>スケジュール表示部セルのclass属性取得メソッド</p> | @UseLayout(LayoutType.FULL)
@DependMenu(MenuID.C_MST_MST0009S01)
public class Mst0009s02Page extends
Mst0009s02GridPage < Mst0009s02Dto, EmptyDto >
public String getTax4RowClass() {
return getRowClass(tax4Index);
} | 0 |
0fc063ec1eb33e52965cf62047a3d4a3 | 83e8eca06821448a9aa02536133e11c3 | You have a sequence of strings, and you’d like to determine the most frequently occurring string in the sequence.
Input: a list of strings.
Output: a string. | def most_frequent(list_strings):
return max(list_strings, key=lambda s: list_strings.count(s)) | 1 |
3e7a654afeaa654a1b4dc1d00af66add | b25ca43cb5576166e447976956e82c6b | Returns a user's owned entries for the profile edit screen. | function displayOwned($username){
global $conn;
$i = 0;
$sql = "SELECT OwnedTitle, OwnedAuthor, OwnedDesc FROM Owned WHERE Username = '$username'";
$result = mysqli_query($conn, $sql);
$data = array();
while($row = mysqli_fetch_assoc($result)){
$data[$i++] = $row;
}
return $data;
} | 1 |
2c2b8e7de46edb4959109c5bb8917069 | 0986d93e4404c124032538ca1268964c | Removes all [ChatRoomListener]s. | interface NEListenTogetherKit
fun removeRoomListener(listener: NEListenTogetherRoomListener) | 0 |
418d59edd203e8904841503192a09723 | 8b3d49be70d53ab5eaa1641af9d37dbf | Gets the currently valid polling time in milliseconds | public class BLENetworkDriverImpl implements BLENetwork, ManagedService
public int getActualPollingTimeMillis()
{
return actualPollingTimeMillis;
} | 1 |
284e5356cfe901991867b1c426d5878e | 047cb6ef226da261f72b9dff1e60c6b1 | link the mutex with the current task | void TWriteLongBinary::taskAttach()
{
TTaskInfo *pTask = TASK_GetCurrent(FALSE);
if(pTask)
pTask->m_pTaskState = this;
} | 0 |
3edea9be48b6b4b9812be5fc7b2e2f22 | f90b70f0d58b3e0fc245d11fd9f48336 | This method adds data to the list of RgltryRptg. | List<PageData> items = new ArrayList<PageData>();
PageData pds = new PageData();
pds.put("RPT_ID", pd.getString("RPT_ID"));
pds.put("RPT_NAME", pd.getString("RPT_NAME"));
pds.put("RPT_DESC", pd.getString("RPT_DESC"));
pds.put("UPLOAD_FLAG", pd.getString("UPLOAD_FLAG"));
... | 0 |
7f2c3f3a5f5b3cd1931698262a084ff3 | 13fa39b6ee0f2f1fee7f56975412ad21 | Imprime errores de validacion | function printErrValida($givErrValida_, $tituERR_, $ruleERR_, $exERR_){
$errValida[] = $givErrValida_;
$errValidaTmpl="<section class='box50 padd-verti-xs'>";
$errValidaTmpl .="<ul class='list-group text-left'>";
foreach($errValida as $keyRules => $valRules){
foreach($valRules as $key => $v){
... | 1 |
c1ffff5deb1e066e55735ab6b60090f7 | 056d4363669bc3378b1f77d26c4315f4 | 從專案取得媒體的Guid | public void GetMediaCabinetGuidTest()
{
string jsonString = @"{""MediaCabinet"":[{""path"":""C:\\Users\\LaAaa\\Videos\\guitar.mp4"",""Guid"":""c4d41b0b-4f29-47cc-b84d-09273e6268ad""}],""Script"":[{""Guid"":""22f9f73a-d951-422e-9f69-240635feea80""}]}";
Project sut = new Project(js... | 1 |
10a761c0b7d03bf70ba4cb39b2ae6ffd | ddc424f725d3f74646aa03a0b151fce8 | number of intervening entities between a mention and its gold closest antecedent | kind = get_kind(subject, predicate, obj)
if kind == 'spo':
return 1
elif kind == 's?o':
return 2
elif kind == '?po':
return 3
elif kind == 'sp?':
return 4
elif kind == '??o':
return 5
elif kind == 's??':
return 6
elif kind == '?p?':
... | 0 |
09090d3ac1442b2a5571492750a38fb8 | e60a042bb081629f72e10f197a724e9f | 将dst_起始的size个字节设为value | {
memcpy(dst + *pos, src, len);
*pos += len;
} | 0 |
772c449fb14a82c2b524b1fe7d2c69de | 038fb2c6597858377aceb64f296bfa8f | 将元素包裹进指定 HTML 结构内(待整理) | function wrapElement($el: HTMLElement, wrapper: HTMLElement): HTMLElement {
$el.parentNode.insertBefore(wrapper, $el);
wrapper.appendChild($el);
return wrapper;
} | 1 |
0ab8d086202623c413d9d63c0729996e | 6f9788b49b0b4df3ed869dbf438ebf19 | Calculates the number of rows needed based on terminal style, and updates
the gui parameters. | if (scrollMode==ScrollMode.VScroll) {
if (boundMode==BoundMode.Create) {
this.vScrollBarWidth = ScrollBars.getScrollBarSize();
}
rationalBoundsWidth = (int) (bounds.width - 2*gapX - vScrollBarWidth);
rationalBoundsHeight = bounds.height;
numOfLinesPerPage = (int)(bounds.height / lineHeight);
}
... | 1 |
da9764fc7e58f9621c754013688d01d1 | cd6273b1cdbd1b434b937cb3d2d864e6 | Split piece into underlying mutable components. | impl<T, N: Unsigned> MarkedNonNull<T, N>
pub unsafe fn decompose_mut(&mut self) -> (&mut T, usize) {
let (ptr, tag) = self.decompose();
(&mut *ptr.as_ptr(), tag)
} | 1 |
0fad794ec0d389741e5823727523c65d | 805f1db12ce7d7925a6d1dced10645d9 | 受信データを分析し、\n記号ごとにコマンドを分割します。 | public class TeleportalNet : MonoBehaviour
void Parse(string msg) {
msg = msg.Split('\n')[0];
List<string> args = new List<string>(msg.Split(' '));
string cmd = args[0];
string argsStr = "";
for (int i = 1; i < args.Count; i++) {
argsStr += args[i] + " ";
}
PrintByteArray(Encoding.ASCII.GetBytes(msg));... | 1 |
a56f15627e4fc0cb21ad452d62727d4b | d68819c3ec5673b3ac123246730a7730 | Initialize any registered message handlers upon construction. | constructor() {
this.eventLookup = {};
this.messageHandlers = [];
} | 0 |
2a9a18db1df423bac41b7df0e2ebce10 | 5a2bfefdac9a91b0c8b7d8f55f4a9810 | Get a list of poll results for a webinar that occured in the past. | {
$request = new Request\PollMessagesRequest($this->getCredential());
$response = $this->sendRequest($request);
return Request\PollMessagesRequest::parseResponse($response);
} | 0 |
92a191cc0e8b9bc729bf867757e71215 | f75c099b6e3671049596944bb491decb | Update the "seen"-flag of a given series | {
$query = 'UPDATE xrefuseralert
SET seen = 1
WHERE userID = '.(int)$userId;
$this->_db->setQuery($query);
return $this->_db->query();
} | 0 |
1f79b830749d1460c7292d182eccb6b1 | 372efce1657d645a26a53250b01e72d2 | Resets the quiz session one question back. | $remainingQuestion = session('remainingQuestion');
if($remainingQuestion <= 0)
abort(500);
session(['remainingQuestion' => --$remainingQuestion]);
} | 0 |
7507540e0fdc1afa5e179fd4ad33ab65 | 8fa1f73fcb4173554e860cabc95db545 | Sends a string over given port
(blocking function) | void sendString(char toSend[]) {
int i = 0;
while (toSend[i] != '\0') {
while ((UART1_S1 & UART_S1_TDRE_MASK) == 0) {
__NOP();
}
(void)UART1_S1;
UART1_D = toSend[i];
i++;
}
} | 1 |
7f3aec1252e8e17ec134399f53e938d3 | 30d2615af134ffa14d63306a80a256ad | 这个是静态的变量,相当于每一次调用这个函数,都会共用这个变量,都会在这个变量的基础上进行运算, | void t1(){
static int x = 1;
int y = 1;
x++;
y++;
printf("x is %d\n",x);
printf("y is %d\n",y);
} | 1 |
535a56dbb5a99863cf727b8654c48022 | b1ccf764aa574eb8ddbad7d39cc93ee0 | 加载指定路径下所有dll文件中的定时任务 | if os.path.exists(path) is False:
return
config = {}
with codecs.open(self.get_exe_path(path), 'r', 'utf-8') as file_handle:
config = json.load(file_handle)
for key in config['dependencies']:
self.work_one_dll(key) | 0 |
7ea50c742c82b2425526a4f907964247 | 453d0f4ef6e843a79cc940fd466177a6 | Return True iff an object is placed at given coordinates | def tile_exists(x, y):
return _world.get((x, y)) | 1 |
d36045dc6139c21b8ebd6d820a306ce7 | 4d4368bc54d34a30aed833fc788e0235 | Loads the background sprite into memory once, this index will be used every time the background is rendered | {
m_backgroundTexture.loadFromFile(filepath);
m_backgroundSprite.setTexture(m_backgroundTexture);
sf::Vector2u textureSize = m_backgroundTexture.getSize();
m_backgroundSprite.setTextureRect(sf::IntRect(0, 0, textureSize.x, textureSize.y));
m_backgroundSprite.setPosition(0, 0);
m_backgroundRect.left = 0;
m_backgr... | 1 |
428b0deec24c5986517e633efb0b7008 | 9ba32ece476895e79e3294cc3db6db42 | 为已经添加到OB中的Style增加新的样式
注意:这个key-value不会保存到属性CssStyle中 | namespace QZ.Foundation.Document
public class StyleParser
public void Insert(string key, string val)
{
if (_dic.ContainsKey(key))
_dic[key] = val;
else
_dic.Add(key, val);
} | 1 |
3c594b0e47c216b2a87dd7d15d3d01b5 | 57a17539900b83154ee0e1c0734aa28e | Changes the current gravitational state of the hero to the specified state and resets the y velocity
associated with the changed state. | public class Tank extends Vehicle
@Override
protected void setFSMState(int state) {
switch (state) {
default:
case GROUNDED:
y = parent.getTerrain().getFloorHeight(x);
currentAirJumps = airJumps;
yvel = 0;
yacc = 0;
useGravity = false;
useFriction = true;
useMaxSpeed = true;
groundState =... | 1 |
57ab52a162a3b12e0b5f4be941bd05e7 | 85272484639571a5bb11d9d1faea78e7 | Generates a full verse. Comes out as an array of arrays of strings. | let chorus = this.mainProgression.clone()
let verse = this.mainProgression.clone()
chorusGeneration(chorus, this.moodChip.clone())
verseGeneration(verse, this.moodChip.clone())
let bridge = verse.clone()
bridgeGeneration(bridge, this.moodChip.clone())
let preChoru... | 0 |
caba30e1df26cf1ea2c4f5b3ccdeb4a5 | 76fb969f5662b0acacf9e27b51c9b7b1 | Computes the LS-GAN loss as minimized by the generator.
Rather than compute the negative loglikelihood, a least-squares loss is
used to optimize the discriminators. | self.pre_train(discriminator)
gen = self.forward(batch_noise)
disc = discriminator(gen)
loss = F.softplus(-disc).mean()
loss.backward()
self.update_parameters()
loss = loss.item()
return loss | 1 |
b6990fbf5ed83720bde2a9e1b6f952a2 | 13573f7e51f2941f97ffbcdd20dfa1f4 | tests difference of two positive doubles | namespace tests
TEST_F(DoubleTest, LargeDiff)
{
EXPECT_FALSE(almost_equals(2.5, 3.0));
} | 1 |
0cba8f00b52d77fbe2658dcf54253f92 | e429df8d7cd351cd8187dcd6c266c156 | function: 利用集成学习生成的决策树数列对测试集进行预测,并采用投票法进行最终预测,计算测试集的预测准确率 | ensemble_predict = []
data_num = len(test_set)
tree_num = len(forest)
predict = [[] for i in range(tree_num)]
for i, tree in enumerate(forest):
for test_vec in test_set:
predict[i].append(TreeofForest.classify(tree, feature_name, test_vec))
predict =... | 1 |
69e84b04a4723789e3bf79f05a80e73f | 7af691186af2710bda360ba0d69b664f | Piece together individual files resulting from a WRF output concatenation procedure (due to different simulation lengths and random interruptions) into larger files. | CancelIntensityJumps=False,threshDiff=0.25):
xSig = XFold.OutDirSig
if isinstance(tifFileList,str):
if os.path.exists(tifFileList):
w = os.walk(tifFileList)
tifFileList = [os.path.join(p,t) for (p,d,ts) in w for t in ts]
else:
errMess = 'Y... | 1 |
50a0bae4fad77294eae10f0b7f646979 | f9f24cb5f459760acf4eb7015977b3cc | Returns active theme directory name | {
return system_getroot () . '/theme/' . theme_getname_f ();
} | 1 |
e0123726eda385c4c5b5674cdd3f43d8 | f082fef41a8b1fa818f153c45c1b94e7 | 利用正则表达式判断字符串是否符合IPv4格式 | def is_ipv4(data):
ipv4 = re.compile('^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$')
return ipv4.match(data) | 1 |
24263a816f272255a3da088237df3352 | 78e7bb558f05187e6ffdd6e16d2b33cb | 获取文档D标题 | class docCls extends fileCls{
public function title(){
$preg = "/\<h1\>(.*)\<\/h1\>/";
preg_match($preg, $this->content, $matches);
return $matches[1];
} | 1 |
7b72a88b1a9f850ec2fe0d151a3ec79b | 9de5b2464cd272bad9556551c38bdba3 | Get worst rating. | class Rating extends Intangible
public function getBestRating() {
return $this->bestRating;
} | 0 |
fe203be4df17f2561551d4e09243317d | 922f942b26d89be09f2fa6bc967dcac8 | 导入上日分润费率数据 | public class ImportDataToRedis
public void etlData(String appointDate, int extractDayNum) {
Jedis jedis = JedisPoolUtil.getJedis();
String currentDate = DateTime.getFormatDate(DateTime.getCurrYearLast());
Connection conn = null;
try {
if (appointDate != null) {
... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.