query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
97ae4ed9c014189c9580f6599b4d00f3 | 490d4d6d9b3618f5e541fec93356c582 | When Minecraft gains focus, reset all pressed keys to avoid the "stuck keys" bug. | @SideOnly(Side.CLIENT)
public class TestMenu extends GuiScreen implements GuiYesNoCallback
public void onGuiClosed()
{
Keyboard.enableRepeatEvents(false);
} | 0 |
9907783363666be8df96772b420c4817 | f4136b254385562569b2466b87d30cf5 | Test of getRegistrosCodigo method, of class CUsuario. | public class TestBitacoraDao extends TestCase
@Test
public void testRecuperaRegistros() throws Exception {
System.out.println("Entra en TestRecuperaRegistros...");
ParametrosListar argumentosListar = new ParametrosListar();
argumentosListar.setTxtFiltro("");
argumentosListar.setFiltroUsuario("todos");
argume... | 0 |
b2b6a5db8a33d229c5633da717d35442 | 7852a1287ffa876d3a0e3eda72b6ff36 | Returns comma delimited list of signed headers | namespace Amazon.SellingPartnerAPIAA
public class AWSSignerHelper
public virtual string ExtractSignedHeaders(IRestRequest request)
{
List<string> rawHeaders = request.Parameters.Where(parameter => ParameterType.HttpHeader.Equals(parameter.Type))
... | 1 |
7a625d4f0d9a9d902f52784d6920bf35 | 0dbc2294dc99d8be18b0aa31e3410dde | Gets query for [[BuyerRequests1]]. | namespace Infoplus.Api
ApiResponse<List<ItemBuyer>> GetItemBuyerByFilterWithHttpInfo (string filter = null, int? page = null, int? limit = null, string sort = null); | 0 |
ab2ccf082603e7fd45072874dd90b28d | d6b1afd26a7cadab33e4c34c5e1a79eb | Send 'Bank Select' MSB and/or LSB 'Control Change' messages. | void mdrv_mhl_CbusSendCommand(BYTE ucSelect)
{
switch(ucSelect)
{
case CBUS_HPD_SET_FLAG:
mdrv_mhl_CbusSetHPDState(TRUE);
break;
case CBUS_DCAP_RDY_FLAG:
_mdrv_mhl_Cbus_SetDCapRdy();
break;
case CBUS_PATH_EN_FLAG:
_mdrv_mhl_Cbus... | 0 |
c9e9a7fbd24d7df003ed0cae0caf7838 | 9d4fe53618ec6a0075d660105d528d5f | 闪购超市 商品侧边分类 | $store_id = I('store_id');
$res = M()->query("select count(*) as num,store_cat_id1 as id from ty_goods where store_id='$store_id' and is_on_sale=1 and is_delete=0 and store_cat_id1 in (select s.cat_id from ty_store_goods_class as s where s.store_id='$store_id' group by s.cat_id) group by store_cat_id... | 1 |
21a079757a765032591230e18110bbf1 | f3fb07b37701279fc1e35bf8c7b94953 | 根据target 来登录 | function M.log_in( type , data , callback )
if type == 1 then
elseif type == 2 then
end
return true , data
end | 0 |
4af91fee6b314b2cdfdeb6335f214688 | 33a240e0574c1170610bd3beae484908 | 根据名称获取地市编码 | namespace BPiaoBao.Common
public static class ExtHelper
public static string GetCityCodeByName(string name)
{
if (string.IsNullOrEmpty(name))
{
return "";
}
var list = pnrResource.CityDictionary.CityList;
var model = list.FirstOrDef... | 1 |
61254d65ac1ee687d0b5203db77c8c1e | 6e060e8ffa629f5a84a4bd20f7e34ece | 定时发送砍价进度 | timer_stop();
timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
send_block_info();
}
},10000);
} | 1 |
71a8a38aba87d1e0e62d15730174fff0 | d94b6af78874594b318c8c647d5ee702 | Linear combination of a list of points and values | def combine_points(points_list):
cls = type(points_list[0])
return cls.combine(points_list) | 0 |
979e57aea7d29a0e4631d790d727ff81 | 0ba34b0a3d8aa83b45676e983ed62cde | Generates the palette content for exporting to ASE palette file | {
int ret = 0;
int i;
if (numPalettes == 0)
{
return 0;
}
ret = output_find_palettes(output, palettes, numPalettes);
if (ret != 0)
{
return ret;
}
for (i = 0; i < output->numPalettes; ++i)
{
palette_t *palette = output->palettes[i];
palette->di... | 0 |
cd0fc3c9f2eba9b130aa7e6b7a122062 | 0368be7366c9613dd7d7bc8ce852ebaf | 获取对应学生的课程SC | db = pymysql.connect('localhost', 'root', 'huangxiao', 'student',charset='utf8')
cursor = db.cursor()
sql = "select * from C where CNO not in (select C.CNO from S,SC,C where S.SNO=SC.SNO and C.CNO=SC.CNO and S.SNO='%s')"%SNO
cursor.execute(sql)
col=[]
for i in list(np.array(cursor.description))... | 0 |
d0736a0ae1fc2d04b5e758b33cd4519b | 58173a188130d983b68fdaf8743e2e13 | 获取修改数量表单实例对象 | if (!self::$instance) {
self::$instance = new ModifyModel();
}
return self::$instance;
} | 1 |
c501e6d575e686ea8f0e728bebc23aed | a7a34f0a0548d018276ec68bf35c2410 | save robot frame velocity to measurement matrix | void CKFApp::SetMeasVG(void)
{
*(CVect3*)&Zk.dd[9] = sins.vn;
*(CVect3*)&rts.dd[9] = 0.01;
measVGValid = 1;
} | 1 |
95b8011f605e42c68709d6a003e06eac | b6aed0217d3ee1816d5ab72e7c6f5c06 | Sends this e-mail through a given smtp server (blocking). | throws MessagingException {
Transport transport = session.getTransport("smtp");
transport.connect(host, username, password);
Transport.send(msg);
transport.close();
} | 1 |
6a34e028261677498e5ba3b33d9ba590 | 85ee0402b2431d6af44b950a4ef004fc | 根据会员编号验证当前会员是否可见 | {
$info = D('Member')->getMemberFromCache($memberId);
if (empty($info)) {
$this->setValidateError("选择的会员已失效");
return false;
}
return true;
} | 1 |
5822b95b50f7401c51dcb02544569eae | 4b69846e31c664a9b92e7da8ccf4ff23 | 删除风险资料 | function deleteDangerList(data){
return doJSONPost('/riskfactory/deleteDangerList', data)
} | 1 |
01b8f8779e4c0a570adc752c0eeab992 | a1898cbb90f9c97c9d6e444ac0b175a9 | Updates timer stop condition for checkpoint flag. | __inline__ void CIRCLE_checkpoint(void)
{
_CIRCLE_checkpoint();
} | 0 |
d7d1b0b81307478fd16c44fcffacb060 | 64f3431b7521cefe721cc4f58a0ef128 | Creates a copy of [DateTime] and adds the specified number of months to the copy. Add negative values to
subtract months. The day of the month of the resulting [DateTime] is clamped to the number of days in the
updated calendar month. For example if adding 1 month to 31st January 2018, the result would be 28th February... | Calendar clone = this.cloneInternal();
clone.add(Calendar.MONTH, months);
return new DateTime(clone);
} | 1 |
6eca794e58b4bb43b30d38e980065486 | 452c76227036a87236fb5c0c3c449493 | generate caves using basic automata algorithm | public class CaveGenerator : MonoBehaviour
public void startGeneration (InitialPolyline iniPol) {
AbstractGenerator generator;
switch (method) {
case(generationMethod.Recursive): {
generator= gameObject.AddComponent<RecursiveGenerator> ();
break;
}
case(generationMethod.IterativeStack): {
genera... | 0 |
18d5708bb603afff13c89e0e2178f2fb | da9b275750b518695b995381e73af3bd | only draw the neighbors of the passed in cell | public class Simulator extends Canvas
private void drawNeighbors(int x, int y) {
for (int xIndex = x - 1; xIndex <= x + 1; xIndex++) {
for (int yIndex = y - 1; yIndex <= y + 1; yIndex++) {
try {
if (board[xIndex][yIndex])
gc.setFill(Color.WHITE);
else
gc.setFill(Color.SLATEGREY);
} ca... | 1 |
73e811aa0668ae91984bc28d777f6b50 | 2e4492cc96af8bfb96fd4d10cd36242f | Enable or disable the magnetic stepper motor coils. | namespace Box2DSharp.Dynamics.Joints
public class PrismaticJoint : Joint
public void EnableMotor(bool flag)
{
if (flag != _enableMotor)
{
BodyA.IsAwake = true;
BodyB.IsAwake = true;
_enableMotor = flag;
}
} | 0 |
5bb2a206bca802aefeb6acbaf6d3a0c9 | 87865e211c1547b840bb62beecbacdf6 | 根据原事件和变化构建新事件 | const OriginalCustomEvent = new OriginalEvent(EventType, { cancelable: true, bubbles: true });
if (config instanceof Object) {
Object.assign(OriginalCustomEvent, config);
}
return OriginalCustomEvent;
} | 1 |
e9704874ff19e82a22c1dc3d411ae84d | ebb20533f2db5f6a42b217f750446ba0 | This method converts a single array 0..255 range pixel matrix to a
java-compatible array of 32 bit integers. This method can take a long
time to complete so a reporting feature has been added. The arrays should
be the same dimensions as imageWidth and imageHeight. This array can then
be converted to an image with: <br>... | public class FastPixelByte extends FastPixelImpl
@Override
public int[][] getRGB() {
int[][] rgb = new int[width][height];
int x = 0;
int y = 0;
for (int i = 0; i < imageData.length; i = i + bytesPerColor) {
int argb = getRGB(i);
rgb[x][y] = argb;
x++;
if (x >= width) {
x = 0;
y++;
}
}... | 1 |
a1859b57ca8b085c630e0299c1e7f6c8 | 4d602b3658b0e5586f4d5dfc3f7c4b55 | Определяет существует ли группа полей с заданным числовым идентификатором | class BackendBannersModel
public static function existsGroup($id)
{
return (bool) BackendModel::getContainer()->get('database')->getVar(
'SELECT COUNT(id)
FROM banners_groups AS i
WHERE i.id = ?',
array((int) $id)
);
} | 1 |
c8b9be1b4f613b9e4f53cfc87354f256 | 21574c6d4289da05f386246bf2124d70 | When the Module is opened for the first time, a placeholder submission
is created in Canvas. Returns true if that hasn't happened.
See rise360_module_versions_controller#ensure_submission | class Config
def should_submit?
raise "#validate must be called first!" if @should_submit.nil?
@should_submit
end | 0 |
c51c1fc28d22d2fb8049b2786299e70d | 5e73163f1ff9e726fb95ee24691afbb0 | 创建一个代理对象,将被代理对象传入到代理对象中 | public class MyInvocationHandler implements InvocationHandler
public Object setAgent(Object obj) {
this.obj = obj;
return Proxy.newProxyInstance(obj.getClass().getClassLoader(),obj.getClass().getInterfaces(),this);
} | 1 |
28bf7365ccc5c0d9077720a254ca5dd7 | b1e44ae0b39fa001d8cb871641ff5577 | TarArchive constructor. | class MakeArchive extends Command
public function __construct()
{
parent::__construct();
} | 0 |
14de1b1fb3fcc3582af0ee172f42941e | 097b5529ea76c1d8f90ef9e8094c2560 | 从消息队列中接收用户数据,进行注册 | class UserData(Process):
#用户数据处理进程
def run(self):
for item in self._read_users_data():
self.userdata_queue.put(item) | 0 |
935679a1d86d44c866ecde1c19d0c37a | 6069bfd695a939311e0e8ba7f9e6b781 | 上传文件返回进度以及结果 | from requests_toolbelt import MultipartEncoder
idoo = self.mgtuid()
filename = os.path.basename(file_path)
content_type = mimetypes.guess_type(
filename)[0] or 'application/octet-stream'
m_data = MultipartEncoder(
fields={
"filename": "test... | 1 |
a6251668a7638c94d6a474b9ea81b5a1 | 62b2e8be14c9546dda0422d1c573b916 | Transforms canvas point to client coordinates | export default class TransformModel implements TransformInterface
HtmlPointToCanvasPoint([x, y]: PointTuple): PointTuple {
return [(x - this.TRANSLATE_X) / this.SCALE_X, (y - this.TRANSLATE_Y) / this.SCALE_Y];
} | 0 |
12c7f3da6f2618c199a26f294ba8120e | 60fa0a63b87f32c30ba6d8b58cfaf1e4 | Change priority (Up) | {
Thread current = thisthread.currentThread();
thisthread.setPriority(current.getPriority() - 1);
thisthread.start();
} | 0 |
7d67d4ba2a3191fdb6ddc387b7a8cf3b | 32246d076750a9c7abc4b2315771ea98 | run a program and wait for it to finish | int ProgramLaunch(char** args)
{
pid_t pid, wpid;
int status;
pid = fork();
if(pid == 0)
{
if(execvp(args[0], args) == -1)
perror(">> ");
exit(EXIT_FAILURE);
}
else if(pid < 0)
perror(">> ");
else
do
{
wpid = waitpid(pid, &status, WUNTRACED);
}while(!WIFEXITED(status) && !WIFSIGNALED(status))... | 1 |
c6f6035d44a722d2b69c47071ffd319c | d22d33a7473cb3868eaf1b701bdb5804 | 判断方法是否是编码或者安全函数 | class Gend_Func
private function isFunction($fn)
{
$classname = $fn;
$fn = strtolower($fn);
$fn = str_replace('Gend','',$fn);
if(!in_array($fn,$this->fitem)){
if(is_file($this->fdir.'Gend.'.$fn.'.php')){
require_once($this->fdir.'Gend.'.$fn.'.php');
... | 0 |
df3cf8e6adb6a1164ab79288647759d5 | 748c25391e5551a1cc31b9c13989de20 | This will open the url, that we entered in the editor, in the browser | public class MyWebView extends AppCompatActivity
private void openURL() {
webview.loadUrl("http://www.fuzzproductions.com");
webview.requestFocus();
} | 0 |
06a2179b1a5dbb5bb6c5514a8f5a2f73 | 9004a089cc61b31eb23b16e49ebe72f7 | Takes a collection of file paths, parsing the files found to exist and conform, returning a consolidated collection of string collections to process. | namespace i18n.Services.GetText.Entities.Contracts
IOrderedDictionary<string, string> Parse(string fullFilePath); | 0 |
8f981038a9a422ea4b8a6a82ee01cea4 | ca7ddc006d3809afc1fdcc6b1e91e7bc | 设置行列的控件,实时监听修改事件 | namespace MedicalSystem.Anes.Document.Documents
public class GridViewHandler:UIElementHandler<MedGridView>
public override void ControlSetting(MedGridView control)
{
control.CellClick += new DataGridViewCellEventHandler(gridView_CellClick);
control.CellValueChanged += new DataGridViewCel... | 1 |
45020fae7808982b8daca933667e2ca2 | c9143fa6addd0d066b6836a22f242f72 | Calculates the horizontal difference between two points. | function calcHSpacing(source: INode, target: INode) {
return target.points[0].x - source.points[1].x;
} | 1 |
e787bffe37b0c48709ec16682a182b6d | 7db7b16ba9248ec228c9dd9cc8c7f691 | Returns Collision Handler | CollisionHandler& GameManager::getCollisionHandler() {
return collisionHandler;
} | 1 |
03d0119ca90d3a43dc3ae9cb35cf559b | d7076b5e59e653ac6aa20740ea1b15ae | A list containing the wrapped sampler. | class DatasetFromSampler(Dataset):
def __getitem__(self, index: int):
if self.sampler_list is None:
self.sampler_list = list(self.sampler)
return self.sampler_list[index] | 1 |
7dc14ac00a71c836d8f7d81d75095f96 | e5e63f23dcac5f05adbe9790b9322753 | 最小li | function getMinLi() {
var oLi = document.getElementsByClassName('col');
var minIndex = 0;
var minHeight = oLi[minIndex].offsetHeight;
for (var i = 1; i < oLi.length; i++) {
if (oLi[i].offsetHeight < oLi[minIndex]) {
minHeight = oLi[i].offsetHeight;
minIndex = i;
}
}
retur... | 1 |
8d76bde3ba01f85ec27604cf7f9efcb2 | a2a097bb4cfb9a99d63e8955ed57f532 | 获取该武器槽对应的所有武器 | def getWeaponDict(userid):
if not spe.getPlayer(int(userid)):
return None
weapons = {}
for i in range(0, 48):
wPointer = spe.getWeaponFromSlot(userid, i)
if wPointer:
weapons[spe.getEntityClassName(wPointer)] = {
"instance": wPointer,
"slot... | 1 |
4e059ac5f93d43dd78db9614ec682219 | ae8c0cbb22304c86b6b1e531d7bc6364 | 주소를 통해 환자정보 가져오기 | System.out.println("Payent-Welcome");
String p_number = req.getParameter("p_number");
DoctorDao doctorDao = new DoctorDaoMySqlImpl();
Paciente p = new Paciente();
p = doctorDao.selectPacienteByid(p_number);
resp.getWriter().print(JSON.toJSON(p));
} | 0 |
fc9beb4f9a4864bc0257e36965227194 | 6181635de73d5c1aaff803b4eb6aaf87 | !
\brief Returns the current page number | int PageShow::getThisPage()
{
return m_i_currPage;
} | 1 |
0b91a74feb9c88f7190a6833766d4148 | 89428bbd20e29c65167daa3969ad486f | GET: DatVe | namespace BDS.Areas.User.Controllers
public class DatThueController : Controller
public ActionResult SLDaDat()
{
if (DemSL() == 0)
{
return PartialView();
}
ViewBag.SL =DemSL();
return PartialView();
} | 0 |
2f8e45da64bc4823d37aab66de66416b | 23f3970dad2c2febac3cda85061402c7 | Strip all debugging symbols from binaries. | class ArchiveStage(BoardSpecificBuilderStage):
def _PerformStage(self):
def UploadSymbols():
if not debug:
commands.UploadSymbols(buildroot, board, config['chromeos_official']) | 0 |
122fa38896f14842d6b458693d196e4f | 4ef410f1771b64c53ef5085f003793bf | Verify that an item's visibility view returns an html string
containing all the expected substrings. | class TestStockViews(TestCase):
def test_view_single_item_view(self):
response = self.client.get(self.single_item)
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "stock/item.html")
self.assertTemplateUsed(response, "base.html") | 0 |
9a1e860ebaa768842163a3f11d43d335 | 53134be9af3eaa984c1d286883a04a4d | Constructor that specifies the originator of the event, the
event handler that should be used to process this event, and
arbitrary data that can be used by the event handler when
processing. | function DataEvent(type, data) {
DataEvent.__super__.constructor.call(this, type, data);
} | 0 |
44830e6da996065662a628c55a779ed0 | 5f9def26d18544f651e9cc679b6401b5 | Testing constructor with arguments - invalid blood group | class BusinessObjectTest extends PHPUnit_Framework_TestCase
public function testInvalidMembersArgument() {
$a = new TestBO('String Should not be valid');
} | 0 |
771c560934d49b94c4aad6ec031e007e | 991197a087df34aed4e2bb9be64ff64b | Determine if the OK button should be enabled.
The OK button is enabled whenever at least one row is selected. | namespace OctofyExp
public partial class ColumnsSelecteForm : Form
private void ColumnsCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e)
{
okToolStripButton.Enabled = (columnsCheckedListBox.CheckedItems.Count > 0);
} | 1 |
6ec682ce5cbce7eb843688da97f271ed | ad9fa0dbbcb8ab6dbcce4c4df61aac8f | 合并近义词集合 | {
foreach (WordResult sourWord in WordList)
{
foreach (WordResult tarWord in WordList)
{
if (CheckSimilarity(sourWord, tarWord) == true)
{
tarWord.Merged(sourWord.Line, sourWord.Position);
... | 1 |
639f37bb997b6773123df8c934e02506 | 8d4ae09733c050e3c1d22a51c5c203b6 | funkcja wykonywana przed zamknieciem programu | namespace Projekt
public partial class Form1 : Form
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Application.Exit();
} | 1 |
71c744f09c052c6d2b04c29829e227fe | 129610558a84a385a85a08e270d3df4b | 所有用户列表(无分页) | @Controller
@RequestMapping(value = "${adminPath}/cususer/tCusUser")
public class TCusUserController extends BaseController
public List<User> AllUsers(){
List<User> userList=systemService.allUserList();
return userList;
} | 1 |
ce78bec5b13c118cf3cc1bf897583cbf | 16cfb6216f1b268b19f41908610ad644 | Getter for the letter spacing of text. | public class LevelWrapper extends Base
public void letterSpacing() {
APIlib.getInstance().addJSLine(jsBase + ".letterSpacing();");
} | 0 |
b46447e2673381ae9d2fadec13a0a072 | 61983fbf9353b5bdf2792d5a25f8a71d | very rudimentary testing here showing the relation between this hasher and sha256;
assuming sha256 is already well tested | input := []byte("abcdefg")
expected := [32]byte{0x7d, 0x1a, 0x54, 0x12, 0x7b, 0x22, 0x25, 0x02, 0xf5, 0xb7, 0x9b, 0x5f, 0xb0, 0x80, 0x30, 0x61, 0x15, 0x2a, 0x44, 0xf9, 0x2b, 0x37, 0xe2, 0x3c, 0x65, 0x27, 0xba, 0xf6, 0x65, 0xd4, 0xda, 0x9a}
result := SHA256(input)
if result != expected {
t.Errorf... | 1 |
3af7d3b594f1e0e08bece3f6c6ce2510 | 5c50749ab4b36dc8fd22c1b81902f63c | 从远程service中获得AIDL实例化对象 | if ((obj == null)) {
return null;
}
android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
if (((iin != null) && (iin instanceof AidlInterface))) {
return ((AidlInterface) iin);
}
return new AidlInterface.S... | 1 |
e3f085f983de9876bf8815454947036b | 0ac27354ade92ed5381dcb0bb82fcd4b | HOPFIELD NETWORK TEST | def test():
print "0 XOR 0 = 0?:", EvalNetwork(np.array([0,0]), Network)
print "0 XOR 1 = 1?:", EvalNetwork(np.array([0,1]), Network)
print "1 XOR 0 = 1?:", EvalNetwork(np.array([1,0]), Network)
print "1 XOR 1 = 0?:", EvalNetwork(np.array([1,1]), Network) | 0 |
7719470fc00c4a6b752d51a937eb28b4 | bc1c28287aae4cc4195ac2bfcc7d4b33 | меняем стили главной обертки | self.setStyleSheet('''
#main_widget{
border-radius:5px;
}
#play_btn,#pervious_btn,#next_btn{
border:none;
}
#play_btn:hover,#pervious_btn:hover,#next_btn:hover{
background:gray;
border-rad... | 1 |
1a56ad8c57039d53c35e8cdb2201d8b6 | 99dae0562848260cdb2983ad6a839c79 | 同一企业下同一类型模板不能重复 | global $_M;
if($data['type'] == 1){
$where = "type = 1 AND pos = {$data['pos']} AND name = '{$data['name']}'";
}else{
$where = "name = '{$data['name']}'";
}
$query = "SELECT id FROM {$_M['table']['templates']} WHERE {$where} AND no='{$data['no']}' AND lang='{$lang}'";
return DB::get_one($query);
} | 1 |
fc2ac4e1e99b75f7a3dd1a134b1f57df | ea88fbedf5ef71102b6ab9b5219aebca | 检验差分后的X1,X2是否是平稳的
返回 dX1,dX2 adf 检验的P值 | def is_more_stationary(ts1,ts2):
return adfuller(ts1)[0]<adfuller(ts2)[0] | 0 |
f3478b3ef7be972a2c378be7a1095e24 | 9da1012fae37310e051e2626d3bf6343 | Returns the next item of a simple mathematical series | a, b = 1, 1
if isinstance(item, int):
for n in range(item):
a, b = b, a + b
return a
if isinstance(item, slice):
start, stop = item.start, item.stop
if start is None:
start = 0
a, b = 1, 1
l =... | 1 |
5d76af219858c11afb767471a993b4f7 | 20a0ed1890900851ccc03b00461b6085 | Clicks on the menu item with the specified label. | class DashboardContext extends RawWordpressContext
public function iGoToMenuItem(string $item)
{
$adminMenu = $this->admin_page->getMenu();
$adminMenu->clickMenuItem($item);
} | 1 |
5d6e4c68523cd1761e90b2340e2dd42c | c9159e25de8703359a8f5d5134756423 | 假定Google坐标为pointA,百度坐标为pointB,根据pointB求pointA | public function mapabcToBaidu($x, $y); | 0 |
082acaf37a8ce77cd2d364e96e44acbc | 608473369e7ed2930102335899d6589a | \brief Test containment directly.
Verify PartA contains Entity1 and Entity2, and does not contain
Entity3, Entity4, or Entity5. | class ContainerTest extends PHPUnit_Framework_TestCase
public function testContains()
{
$entity = new \DB\Entity(['id' => 1]);
$this->container[] = $entity;
$this->assertTrue($this->container->contains($entity));
} | 0 |
471d8c947fa00761817ba731a323ddb1 | 4db5ec59ff798db930ac0a375917deca | リクエストしたユーザーへのメール送信 | {
if ($this->_data->{'mail_'.$type} != 1)
{
return;
}
$setting_setting = Logic\Common::get_setting('setting');
$mail_setting = $setting_setting['mail'];
$email = \Email::forge();
$email->from($mail_setting['from_address'], $mail_setting['from_name']);
$to_user = Logic\User::forge()->create($to_user_... | 1 |
d1eebf8a0dac04d27282dda950161b8a | 415a6ed9aa96692ab6fd9db3fb6a04de | Calculates volumetric weight. Volumetric weight is compared with the actual weight
Delivery charge is calculated based on the higher of the actual and volumetric weight | double total = 0;
if (isNumeric(cntrWeight)) {
total = Console.FS_NUMBER.add(total, Double.parseDouble(cntrWeight), 2);
}
if (isNumeric(cntrWeight2)) {
total = Console.FS_NUMBER.add(total, Double.parseDouble(cntrWeight2), 2);
}
if (isNumeric(trailerWeight)) {
total = Console.FS_NUMBER.add(total, Do... | 0 |
d823f2b0a635e032ac38476c28e1b229 | c46ae67171ccb6cb17bcb1013241f602 | Selects a integer randomly to switch random event cases | Class appCombatEvent
private static function getRandomEventType()
{
$rand = rand( 0, count( self::$events ) -1 );
return self::$events[$rand]['eventCode'];
} | 1 |
3d4b851278f8ef6c52997547fe949e90 | 5ca4ce9d59486c7d00defc8c9007c531 | Método utilizado para excluir uma instância de Estatistica_Plano no banco de dados. | class EstatutoController extends Controller
public function destroy($id)
{
} | 0 |
286c6d347f645620bdb374165828ac05 | fca5e399a83812c3e8d87ad075fe7237 | 单元格切分(水平) | {
CellSplitDlg dlg;
dlg.show();
int row = 1;
int column = 1;
QWidget *widget = TabWidgetCollection::getInstance()->getCurrentWidget();
if (widget == NULL)return;
MyAppEntrance *appEntrance = static_cast<MyAppEntrance*>(widget);
if (dlg.exec() == QDialog::Accepted)
{
row = dlg.row;
column = dlg.column;
ap... | 1 |
3d0177f4f11481ba841bfa7b4799f357 | 4943eb15b7cad23da55fd4762c0a3b56 | Provide time (minutes) until customer account is locked out | class Time2_Customersecurity_Helper_Config extends Mage_Core_Helper_Abstract
public function getLockoutPeriod() {
return (int) Mage::getStoreConfig('customersecurity/login/lockout_period');
} | 1 |
119c204a6fca741f0ef979b2f30c2ee3 | 1ca6d4a652ac0593707fb814376d11f5 | 删除ftp服务上指定url的文件 | {
try
{
if (serverUri.Scheme != Uri.UriSchemeFtp)
{
return false;
}
FtpWebRequest request = (FtpWebRequest)WebRequest.Create(serverUri);
request.Method = WebRequestMethods.Ftp.DeleteFile;
... | 1 |
ef63f5de47e275b5965c315a9e8e861e | 7ad638ab1a2004af870801d26643561f | Funcao para comparacao do resultado do captcha com as mascaras | {
for (var b = 0; b < buttons.length; b++)
{
var blendedData = blendContext.getImageData( buttons[b].x, buttons[b].y, buttons[b].w, buttons[b].h );
var i = 0;
var sum = 0;
var countPixels = blendedData.data.length * 0.25;
while (i < countPixels)
{
sum += (blendedData.data[i*4] + blendedData.data[i*4+1... | 0 |
1b8bf13ac2f1bd855a36c1df94a4a328 | 74cef044cffc355b5a04176c7bc6018a | Test if the ship is empty. | public class Ship
boolean isDestroyed() {
return cellsLeft == 0;
} | 1 |
a594b479d2a3f78f31daae045ae1a5f7 | 03e9d867404767ba97c0eac6a08407b9 | Remove a :class:`CredentialListMapping` from this domain. | {
Require.Argument("DomainSid", domainSid);
var request = new RestRequest(Method.POST);
request.Resource = "Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json";
request.AddUrlSegment("DomainSid", domainSid);
request.AddParameter(... | 0 |
d9133d2bf5e974ce55cd0a9f92dc710e | a69a8bc2442296b857c0c65496d090a6 | Method to get load detail records for a particular Customer. | namespace RSA.NFOS.WPF.ViewModel
public class CustomerDetailedHistoryViewModel : WorkspaceViewModel
private bool GetCustomerHistoryDetailedLog()
{
this.CustomerHistoryLogDetailedDataGridDataSorce = new ObservableCollection<CustomerLogDTO>();
string problemCode = string.Empty;
... | 1 |
b33c741e2364b534fdf64f149fcf08f9 | bb0455eca0a4958c0b170847f244ca06 | The method returns false if the token does not exists in the storage. | class JsonLoginStorageTest extends PHPUnit_Framework_TestCase
public function testTokenExistsError() {
$this->instance->addToken(12, 'hello');
file_put_contents($this->path, 'asdasfasdasd');
$this->assertFalse($this->instance->tokenExists(12, 'hello'));
} | 1 |
83303697304084a22c47893c50b3315f | 4aadfced7fd5afecba3de147c949dc92 | 设置视频通话分辨率 默认是(640, 480) | $size = array(
'width' => 640,
'height' => 480
);
return $size;
} | 1 |
a8fbc748b7ffd75957e91f3a1d0534aa | bb46ef84d67e560ee76c479138ff24b4 | Root directory for user-specific configuration | class DirectoryScheme:
def user_config(self) -> Path:
return self.dir_map['user_config'] | 1 |
5e54494e3290c6349467f182ce236d3b | 2117c3c956599fd14075cfd3b9e3e990 | https://edabit.com/challenge/sEn8HvF2pHiv4La2N | let change = 0;
for (let i = 0; i < x.length - 1; i++) {
if (x[i + 1] !== x[i]) {
change++;
}
}
return (change > x.length * 0.2) ? "Throw Up" : "No Problem";
} | 1 |
01741039b75a65158f5809e2a27d7503 | 2f643957c382078b857fdc8724ce5663 | Update the value of title label. | {
if (TitleLabelAdapter != null && !string.IsNullOrEmpty(title))
{
TitleLabelAdapter.Text(title);
}
} | 1 |
b36bc8b63265630e0a90f4fbc95898bb | 1f29422bb4e440e9e3d14b9796f686a5 | 找到矩阵中距离最远的两个向量的距离,用于初始化聚类中心 | var farthestDistance = 0;
array1.forEach(function (value1) {
array2.forEach(function (value2) {
var d = Math.sqrt(Math.pow(value1[0] - value2[0], 2)
+ Math.pow(value1[1] - value2[1], 2));
if (d > farthestDistance) {
farthest... | 1 |
14d4e96db2c8833cb812033568e259a6 | 68704d1668a389feb94dfad23c77882f | Second Largest Element | maximum = -1
second_maximum = -1
for i in range(0, sizeOfArray):
if arr[i] > maximum:
second_maximum = maximum
maximum = arr[i]
elif arr[i] > second_maximum and arr[i] != maximum:
second_maximum = arr[i]
ans = [maximum, second_maximum]
return ans | 1 |
5a18d0da77b73750be91abb3d9b72c38 | 854514fd8c167db34b8eddfe7a60c55e | 通过走货路径列表,返回最匹配该产品的走货路径 | const { available } = await this.available(goodsList)
if (available == null || available.length < 1) {
return null
}
const address = available.find(item => item.isDefault === 1)
if (address) {
return this._processAddress(address)
} else {
return this._processAddress(available[0... | 0 |
8012845422da121e2127b8385c5c1081 | e9494ac9356d3147a1b62b420fdf5d04 | 设置相机延时时间 | namespace Basic
public partial class Settings : Form
private void button_SetStrobeDelay_Click(object sender, EventArgs e)
{
int iDelay = System.Convert.ToInt32(textBox_StrobeDelayTime.Text);
MvApi.CameraSetStrobeDelayTime(m_hCamera, (uint)iDelay);
} | 1 |
d8188d32d5148a9ec4b34c87fcefa221 | 66433f803bd994fc67cebb5297a335db | Returns a factory for Average Pooling layers | super(averagepool, self).__init__()
self.type = 'averagepool'
self.kernel = kernel
self.stride = stride
self.padding = padding | 0 |
7c2c3b632835ee32f8c8996a73db0443 | 9c9649608616e3f66b5c323eaf5b4df3 | 경로를 통해서 실제 데이터의 접근을 해서 데이터를 돌려주는 함수 | global addr
addr = iptAddr.get()
res = rq.get(url, params={"address": addr})
print(res.status_code)
if res.status_code == 200:
print("[요청성공]")
else:
print("[알수 없는 에러:%s]\n " % res)
return -1
return json.loads(res.content) | 1 |
a7c48c8f0d18f21c65fe8d54d0ae498d | 58f60f55ca433322ca5a948be3310402 | Remove the selection box and save the most recent valid
selection on 0. | def remove_selection
buffer_current.remove_selection
update_status_line
end | 0 |
8c976bb2ec4245af581274199a2072ab | 2f8c7782ee40a8ee2a1617a5eb2f49c8 | Retrieve the Logged In User's current location from the Firebase DB | const locData = await LocationServices.getLocationData();
return locData[locData.length - 1];
} | 0 |
9acd3ce3e39f2cb5a843814edbca8f80 | d1194922f82cddc306d9496c2d76a0af | Obtain color uniform locations and set values. | {
glUniform3f(m_colLoc, m_colour.x, m_colour.y, m_colour.z);
glUniform1f(m_conLoc, m_constant);
glUniform1f(m_linLoc, m_linear);
glUniform1f(m_quadLoc, m_quadratic);
glUniform3f(m_posLoc, m_transform.lock()->GetWorldPosition().x, m_transform.lock()->GetWorldPosition().y, m_transform.lock()->GetWorldPosition().z);
... | 1 |
1e4c6ba58d5edbc6505dfb32151f0489 | bb006b5b098d60594147429a35c17da2 | 根据公司ID获取代理商的信息 | namespace EyouSoft.IDAL.TicketStructure
EyouSoft.Model.TicketStructure.TicketWholesalersInfo GetModel(string CompanyId); | 1 |
f30ea153c38e440c6f908dc079bf5435 | 1bd8a640a9041f8be4dd9b881915a7e9 | ! \brief initializes all of the strategies | typedef std::map<float,unsigned char>::iterator it_type;
int npol = 0;
for(it_type iterator = evaluationStrategyRegistry->getWeightMap()->begin(); iterator != evaluationStrategyRegistry->getWeightMap()->end(); iterator++) {
int key = iterator->second;
EvaluationStrategy* p = evaluationStrategyRegistry->getRegist... | 1 |
a0378cae817ea5fdb29455abcd77121e | 2e08d904286590d0db06ade9c54efab4 | 全角数字判断 | if uchar >= u'\u0030' and uchar<=u'\u0039':
return True
else:
return False | 0 |
accff45b350e50bdb6cdbd4319d5dd19 | 6acfbfca4764ce4d13ed1bda6f1735c9 | 通过公司Id查询下载量 | TbInsrncCpy findByCompanyId(Integer companyId); | 0 |
a71f891824696cb86432f890edb5d427 | f1afd0b3667f7a5f8db20b48e9990ef5 | Given JD.fff, returns sun ecliptic longitude degrees | func sunDeclination(jd float64) float64 {
return sunPosition(jd)[0]
} | 0 |
e5e9f8448976fc71edc07c7bdf11f20f | ac259706b502f3df1c8d9e71cda085bf | 删除空文件和空目录 | for root, dirs, files in os.walk(dirPath, topdown=False):
for file in files:
src_file = os.path.join(root, file)
if os.path.getsize(src_file) == 0:
os.remove(src_file)
for root, dirs, files in os.walk(dirPath, topdown=False):
if not os.listdir(root):
... | 1 |
ad367b1a197875776ee37cd778bb46de | e1ae09d54132b3c38876f59068f8395a | Realiza a requisição de uma instância de forma determínistica. | {
if (function_exists('app'))
{
$instance = app('Canducci\ZipCodePostmon\ZipCodeRequest');
}
else
{
$instance = (new Canducci\ZipCodePostmon\ZipCodeRequest(new Canducci\ZipCodePostmon\Client()));
}
if ($number)
{
re... | 1 |
0fa832de3d665fe00536ddf67ed1a4b7 | 1298f03a98d1d310c890bb8ece8f31de | Given a neo4j context to the neo4j database, and the cypher queries to transact,
attempt to commit the queries up to the specified maximum number of tries | namespace Neo4jClient
public partial class BoltGraphClient : IBoltGraphClient, IRawGraphClient, ITransactionalGraphClient
[Obsolete]
void IRawGraphClient.ExecuteMultipleCypherQueriesInTransaction(IEnumerable<CypherQuery> queries, NameValueCollection customHeaders = null)
{
using (var tx ... | 0 |
0af11dbd092ae1383e163baff7086b7e | 9aa5c859b32ddb886a6422a0e24f5c5c | keytab.close
Close the keytab object. Internally this frees up any associated
credential contents and the Kerberos context. Once a keytab object
is closed it cannot be reused. | krb5_ktfile_close(krb5_context context, krb5_keytab id)
{
free(KTFILENAME(id));
zap(KTFILEBUFP(id), BUFSIZ);
k5_mutex_destroy(&((krb5_ktfile_data *)id->data)->lock);
free(id->data);
id->ops = 0;
free(id);
return (0);
} | 1 |
5c31c9cd8ce87b1030e7c4d4872fbbca | 2fe7e53d1fe2199d7b8f6916f4dfab3e | Determine the best-fit ratio between two spectra. | one, two = 0, 0
match1, match2, unmatch1, unmatch2 = [], [], [], []
while one < len(testobj1.relative_Peak) and two < len(
testobj2.relative_Peak):
if between(testobj1.relative_Peak[one][0],
testobj2.relative_Peak[two][0]):
w1 = testobj1.relative_Peak[one][... | 1 |
a923ad0482ff84a212d190a1aa3115c6 | b7485075cd9dbfd7b372b67ae6d984d7 | Prints the test label. | public abstract class AbstractTestRDFS extends BaseTest
protected abstract String getTestLabel() ; | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.