query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
e496f784174500f189d348c8a904e40e | 828c9cc6139773c7196c6abd14c94dd7 | Return the homogeneous transforms of the various ar markers
in a dictionary of homogeneous transforms | curH = np.zeros((6,6), dtype=np.float32)
wHat = self.hatMap(xi[:3])
vHat = self.hatMap(xi[3:6])
curH[0:3, 0:3] = wHat
curH[3:6, 3:6] = wHat
curH[0:3, 3:6] = vHat
return curH | 0 |
0de42b141d82115396948d16a8880237 | 5c9990cb4b44ac67a590a17e2ce45d5b | Gets the channel instance of the specified type. | namespace Gimela.ServiceModel.ChannelManagement.AsynchronousConnections
public class AsynchronousConnectionWrapper<TContract> : IAsynchronousConnectionWrapper where TContract : class
public TInterface GetChannel<TInterface>() where TInterface : class
{
return _transporter.GetChannel<TInterface>();
} | 1 |
01f0f6fd83aab6e4f9b3460f27756558 | 3f951011209331183e5190e27b38c383 | 根据订单号修改入住时间 | @RestController
@RequestMapping("/ordersetting")
public class OrderSettingController
@PostMapping("/editNumberByDate")
public Result editNumberByDate(@RequestBody OrderSetting orderSetting){
orderSettingService.update(orderSetting);
return new Result(true,"修改成功");
} | 0 |
912bc3ceff191ee93759c6d1130d90d5 | 772f16d834c572e2f841b023d10486e4 | Expand tabs in string. | $str = preg_replace ("@[\r\n]+@", "\n".str_repeat("\t", $tabs)." * ", $str);
return $str;
} | 0 |
df5535cd40ed007cc582fa57ee68e773 | b3305b45007be697b0572ed042a2c507 | -----------------------------------------------------------------------------------------------
不带参数的get请求,同步 | public class OkhttpManager
private Response p_getSync(String url) throws IOException {
Request request = new Request.Builder().url(url).build();
Response response = mClient.newCall(request).execute();
return response;
} | 1 |
ce66f9f4165013fea21438383954d2a4 | 3168840d7dd64f3004ed2217556771c6 | Decreases Quality by one | public class QualitySettingsModifier : MonoBehaviour
public void DecreaseQuality()
{
DecreaseQuality(1);
} | 1 |
25cddb8818d5de9c4672e1b1a7e71f15 | 927dc2281d2f9176f5727f1a98a8b78c | 复制参数配置,包括参数分类分组 | {
config.WatchWord = WatchWord;
config.IsRemoveWatchWord = IsRemoveWatchWord;
config.SavePath = SavePath;
config.OutFilePrefix = OutFilePrefix;
config.OutFileSuffix = OutFileSuffix;
config.MergeFileName = MergeFileName;
config.N... | 1 |
d1f90bc65c0907c27bf6aa70db7681b2 | 3b768233df3a7e5f4183ca27928aef03 | Get the current animation state.
Returns:
animation state | class EntityAnimations:
def current_animation(self) -> str:
return self.__current_animation | 1 |
3e08685b3d7c0b718f40fe51f62b1e9d | 8437eadec31fd207ee28887955fc57ca | !
\brief Will copy a partition table entry from its disk format to a host format. | class GptParser:
def _change_partition(self, header, entry):
if entry['index'] >= header['entries_cnt']:
raise NameError("Partition table at LBA %d has only %d " \
"records cannot change record number %d" % \
(header['entries_cnt'], entry['... | 0 |
8a4aa20490e28ce1f553aa597b4eb18c | 85426d565b66b6238c77f7d1c5afc9a6 | Проверяет, есть ли возможность блокировать симпатии пользователю | if (!parent::isSuitableUser($User)) {
return false;
}
$novice = $this->getNovice();
if (!empty($novice)) {
$userNovice = $User->isNovice() ? 1 : 0;
if (!in_array($userNovice, $novice)) {
return false;
}
}
$pl... | 0 |
4e0eadbf729b7446e530bb05546efe2a | 5dd41d80d3ec791320ae6c7b2d0e429d | This method sets the aircraft's wing lights | class ACTailAircraft(ACAircraft):
def SetWing(self, Wing):
self.Wing = Wing
self.HTail.SetWing( Wing )
self.VTail.SetWing( Wing )
self.Wing.Parents.append( self )
if self.Fuselage is not None and self.Propulsion is not None:
self.Fuselage.XOffset = self.Propulsion.Len... | 0 |
b3451be2b4aa5a7a4ef11668f050d914 | 5ccebde94eb7554e884be5a0d68b64f6 | Test share food attributes | self.assertEqual([self.species2.food, self.dealer1.watering_hole], [2, 10])
self.dealer1.feed_species(self.species2, self.player1)
self.assertEqual([self.species2.food, self.dealer1.watering_hole], [3, 9])
self.assertEqual(self.species1.food, 0)
self.dealer1.feed_species(self.spe... | 1 |
9c688c173cb2bdc93dd85127d0893554 | b449a412b7ed882cdeab1f56443135aa | 时间戳转化为年 月 日 时 分 秒
format:返回格式,支持自定义,但参数必须与formateArr里保持一致 如:'Y-M-D h:m' | formatTime (time, yearKey = '.', monthKey = '.', dayKey = '',
hasHour, hasMinute) {
let date = new Date(time * 1000)
let y = 1900 + date.getYear()
let m = '0' + (date.getMonth() + 1)
let d = '0' + date.getDate()
let hour = '0' + date.getHours()
let minute = '0' + date.getMinute... | 0 |
634bf94e033136e7b65210d21e421379 | 3581f914f190a8693d01631f7e0fa1c8 | Sets access flags. | public class Classfile
public void setAccessFlag(int accessFlag) {
this.accessFlag = (short)accessFlag;
} | 1 |
c9710d2ce0dd98388c0e7dae4b7a95b1 | 2dfbdf04e294e83751f9cc7772c91987 | input:
join_df: dataframe containing all DC, MD, VA
df: a list of separate dataframes, DC, MD, VA
return:
a 2 by 2 histogram plot for comparision | def boxplot(df_BAS, df_REI, df_MAR, df_KHN, df_FAN, *args, **kwargs):
mtrx_BAS = 0*df_BAS.as_matrix(columns=['SSD', 'EMD', 'KLD', 'KST'])
mtrx_REI = df_REI.as_matrix(columns=['SSD', 'EMD', 'KLD', 'KST'])
mtrx_MAR = df_MAR.as_matrix(columns=['SSD', 'EMD', 'KLD', 'KST'])
mtrx_KHN = df_KHN.as_matrix(column... | 0 |
f1280d4ddbfa1a56eb5010717e91d62b | c766f2cb11efcdef42aaeb641bb2028f | Use this method to setup EF Database Context for PDSC Framework | namespace PDSCFramework
public class Startup
private void SetupFrameworkDbContext(IServiceCollection services)
{
services.AddDbContext<PDSCDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString(PDSCConstants.FRAMEWORK_CONNECTION_STRING_NAME)));
} | 1 |
396459a01a7aa7d20216e874d0b082a7 | 9cc5b35302273685ad53c958b0de069d | Check a UTM or UPS coordinate. | double longitude )
const throw()
{
try
{
if ( !Projection::checkCoordinateRange( latitude, longitude ) )
{
return false;
}
return ( latitude <= 89.0 && latitude >= -89.0 );
}
catch (...)
{
return false;
}
} | 0 |
3d8ed133865f403bd593d0e0c7d27b96 | 6fb9a9a5f800695d89fc607af4520f19 | disable
Mark the body as disabled. Disabled bodies are effectively ``turned off'' and
are not updated during a simulation step. However, if a disabled body is
connected to an island containing one or more enabled bodies then it will be
re-enabled at the next simulation step. | public class ode
[DllImport("ode")]
public static extern void dBodyDisable(dBodyID body); | 1 |
6060c49c320400dbdd1e2da1cc4dbc2e | 13cefbd75d0a10e1a7ebf8a29cfd456b | Método que obtiene una lista de proveedores según un tipo de servicio en particular | ProviderList getProviders(String providerType, boolean noSession); | 1 |
1c4910831dc7afee14640cbd8b869835 | 1450256e942960d6bbafae2c3223fc7a | Remove all SIDs from the list | const searchTermIds = this.getSearchTermIds();
searchTermIds.forEach(Id => {
this.removeSearchTerm(Id);
});
this.stids.length = 0;
} | 1 |
112d8fcde8b237317c594c343f0c1d4b | 8809c20af1ebe53491118f397949cdd3 | 직책코드로 직책SEQ 조회 | public String findPostDept(Connection dbConn, int seqId)throws Exception{
PreparedStatement ps = null;
ResultSet rs = null;
String deptIds = "";
String sql = "SELECT POST_DEPT from person where seq_id =" + seqId;
ps = dbConn.prepareStatement(sql);
rs = ps.executeQuery();
if(rs.next()){
... | 0 |
600bb26d0f82014f62e7ae1dfc1eb258 | 8f785f6e745306dc843b89ec16180177 | When enumerating logical structure, there are virtual folders for nested items.
The enumerator should ignore them. | namespace KubeClient.Models
public partial class StatusV1
public override IEnumerable<KubeResourceV1> EnumerateItems()
{
yield break;
} | 0 |
f3852eabaf01ab3795216f42c939e166 | d6c1ead8bad10ea1916f93420e777b2f | 返回键事件函数 | class Example(QWidget):
def keyPressEvent(self,event):
if event.key() ==Qt.Key_Escape:
self.close()
else:
pass
pass | 0 |
a0284453507578987c5256c210cc5ab5 | 28e8f1494c6a167f6847f138808d3722 | Determine if color printing is enabled or disabled. | def colorize?
Bones.config.colorize
end | 1 |
91532e1376f50ab5306603d09ed3a794 | fde74e028a838df24bb5a2a6ae6de531 | Midpoint between start and stop time | class Driver():
def center_ephemeris_time(self):
return (self.ephemeris_start_time + self.ephemeris_stop_time) / 2 | 1 |
82ebf09b77f0167a8fa38ce9bc214bcf | d1bfcdcf36bb1b0a951496ee48f372af | 选择完之后 清空可以选择的buff | function Player:clearBuff(_type)
local bIsClear=false
for var=#self.m_buffArr,1,-1 do
local _buff = self.m_buffArr[var]
if _type == _buff:getType() then
table.remove(self.m_buffArr,var)
bIsClear=true
break
end
end
if bIsClear==true then
... | 1 |
3a9f7be44600cbae64f345653e74187a | a8c7a20bc2118362c73b001a7b1982e9 | Registers the backdrop window class or dies | {
{
WNDCLASS windowDummyClass;
windowDummyClass.hInstance = ::GetModuleHandle(nullptr);
windowDummyClass.lpszClassName = TEXT("ApplicationImplWindows");
windowDummyClass.lpfnWndProc = wndProc;
windowDummyClass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
windowDummyClass.hIcon = nullptr;
windowDummy... | 1 |
675d556709ec97b4a20599c02127b85b | 7477a7fcc9581136c2a5e9efb878a374 | Sets successful_runs | set_log = base_root+"/"+project_id+"_log.html"
run_report = run_id+"/"+run_id+"_report.html"
set_log_htm = ["<li><b>", run_id, "</b>", " - completed ", timestamp,
" (<a href='", run_report, "'>report</a>)</li>"]
linkline = "".join(set_log_htm)
open(set_log, 'a').write(linklin... | 0 |
639383af75c912bba39a754177ccb1c3 | 5e0f805a9a125ff5b6e345131a08d4a0 | Used at end of game to stop lightbulbs from changing | public class BreakLights : MonoBehaviour
void Start () {
} | 0 |
a3434a9b2d104363304571251c48f79e | a0ef8215001bb22060bceb3241d9072e | Returns if the length of the packet is empty or not | impl<MPoolPriv: Zeroable> Packet<MPoolPriv>
pub fn is_empty(&self) -> bool {
self.len() == 0
} | 1 |
7277b67163832e1aba47f3a9f9d66852 | 568b7b2b080058474b9a87768c86a110 | Allow modifications being made to this instance. | public class FeaturesAllowed implements FeatureSetValidation, ModifyableFeatureSet
@Override
public FeaturesAllowed unmodifyable() {
this.features = Collections.unmodifiableSet(features);
return this;
} | 0 |
217cea58e6dc01067ffad3f61e78edb1 | 9e101b686d41acf87016b182428471ad | Сравнить два массива. True - если равны. | def equal_list(a, b):
size = len(a)
if len(b) != size:
return False
for i in range(size):
if a[i] != b[i]:
return False
return True | 1 |
dce8d643f20d2d24fe8fccf25917905b | f0da4def77606148feb19efef95c20db | 构建下发DTU配置信息的报文 | StringBuffer sb = new StringBuffer();
Assert.hasText(busiType, "busiType不能为空!");
sb.append(String.format("%-6s",busiType).substring(0,6) );
Assert.hasText(reqSysID, "reqSysID不能为空!");
sb.append(String.format("%-6s",reqSysID).substring(0, 6) );
Assert.hasText(reqSeq, "reqSeq不能为空!");
sb.append(String.format... | 1 |
a748d1cbbf05e6fd45e167e312eee94e | f5eeff8d6b8d02134f5d3a61cac609e6 | @brief Set the tags of a NVT. | {
nv->nseg = L;
L->nant = nv;
return (nv);
} | 0 |
dec0e896aad0d36e4e68f3bbc08cd4c0 | 9c7b7b3dade51febb47d24a7035b1114 | Checks that login page flashes 'incorrect password' error if password field left blank. | pass_input.send_keys(PASS + Keys.RETURN)
login_error_message = driver.find_element_by_class_name('alert.marb0').text
assert MESSAGE_NO_USER in login_error_message | 0 |
585ad5f92dacb4e00da83fbc7d66c4b4 | ec84abbf459a4732357723523e7c13de | Test if asset is shown correctly if it has loans associated | a1 = Account.objects.create()
a1.allow_users.add(self.user)
a2 = Account.objects.create()
a3 = Account.objects.create()
Transaction.objects.create(debit=a1, credit=a2, amount=1, description='Show')
Transaction.objects.create(debit=a2, credit=a3, amount=1, description='Hide')
response = self.client.get('/'... | 0 |
9a1f63cfc16d6d877c628f9e1649adb7 | 1c7e50065992a31348164ca0f7b6bbe4 | Update existing date picker with existing budget | jQuery.ajax({
url: CUSTOM_DASHBOARD_CONSTANTS.budgetAPIUrl + currentUser.financialPortfolioId + CUSTOM_DASHBOARD_CONSTANTS.dateMeantFor + chosenDate + CUSTOM_DASHBOARD_CONSTANTS.autoGeneratedBudgetParam,
type: 'DELETE',
dataType: "json",
async: true
});
} | 0 |
df1c89ba6b991e9160d24b09a7ab1027 | 7fde6a4fc7d34d8c58a238850c59d8f8 | Fetch request and extract interesting information into a dict. Return dict. | def get_query_details(link):
event = requests.get(link)
return event.json() | 1 |
7f5fe8666bf16a1cada7af7024cf546e | c430ce509509869e66ea9b5b156872a3 | Time zone manipulation: diff two dates | PyObject *precise_diff(PyObject *self, PyObject *args)
{
PyObject *dt1;
PyObject *dt2;
if (!PyArg_ParseTuple(args, "OO", &dt1, &dt2))
{
PyErr_SetString(
PyExc_ValueError, "Invalid parameters");
return NULL;
}
int year_diff = 0;
int month_diff = 0;
int day_diff... | 1 |
a83f6634174c5c0b4c66e991e8165ba1 | 24f2ea2a961cb24c8043908579426b12 | Store working directory either as single package or as representation packages | $working_dir = $this->_handler->unpack_package( $path, $delete_package );
$this->throw_if_is_wp_error( $working_dir, $working_dir, $path );
return $working_dir;
} | 0 |
cf92650347fa698b2b84cf6c9f990cbc | 385e809d4c47012360b605bceb79edcf | Get event members by criteria | {
return $this->queryPDO(
'SELECT * FROM `sked_event_members` WHERE `sked_event_id` = ?',
[$iEventId]
);
} | 1 |
ecfe5c54eb347b69cd93002d915df473 | 81494ef5a4a2072c0a32d26671a48665 | _rpc_thread线程的运行函数
用于处理矿池发回的数据 | static void *thread_routine(void *arg)
{
tpool_work_t *work;
while(1)
{
pthread_mutex_lock(&tpool->queue_lock);
while(!tpool->queue_head && !tpool->shudown)
{
pthread_cond_wait(&tpool->queue_ready,&tpool->queue_lock);
}
if(tpool->shudown)
{
... | 0 |
fcc3a203baf6e5cad695a030feda9296 | 0df390434e6072bb0b2b1ed256876fc9 | Convert the distance to miles | function getMiles(i) {
return i*0.000621371192;
} | 1 |
b7f8a0d33e51ee24f9162a3f20cdb7fd | 33a463a3f9ac8224410380f4739e0263 | Update the corner values of the strategic cell grid by determining
which grid cell the current strategic state belongs to. | class NestedGridNeighbor(Neighbor):
def mapGridCell(self): | 0 |
7db540582eadebb84b0b1d1fe84702ae | fa6f172fd2f30ce0d71b56287d1cc12a | BUSCA TODOS OS CHAMADOS ABERTOS NO BD. | namespace Projeto01_ApiChamados.Dados
public class ChamadosDao
public IEnumerable<Chamado> ListarChamados()
{
using (var ctx = new ChamadosEntities())
{
return ctx.TB_Chamados.ToList();
}
} | 0 |
5d8ef18b22e4a8897135f6a031cab2d9 | f1ae25a3909a0a8e3af361218eb730da | (小程序端接口) 获取我的活动信息(志愿者ID、所属社区ID、活动类型ID、状态 等) | namespace Dto.IService.IntellVolunteer
List<VolunteerActivitySearchMiddle> GetMyAllActivity(string VID); | 1 |
32382307450d67051e248dc89ae470a5 | 21d02cdfefaab8c96b0384b39e07391e | 后退动作,根据当前页面的不同变更视图 | public class ClasstableBaseActivity extends AppCompatActivity
public void back() {
if(dismissDialog())
return;
if (mStack.size() <= 1) {
ClasstableBaseHolder classtableBaseHolder = mStack.pop();
if (classtableBaseHolder != null)
classtableBaseHolder.un... | 1 |
155e46f5b2432fbfc5bb0c7c2fcd860e | 24e98cc91e5a2a4848a432acc602d8d0 | *******************************************
Displays an events chart dialog box.
******************************************* | View dialogView = getLayoutInflater().inflate(R.layout.day_event, null);
eventRecycler = (RecyclerView) dialogView.findViewById(R.id.dayEvent);
eventRecycler.setLayoutManager(new LinearLayoutManager(dialogView.getContext()));
CalendarEventAdapter adapter = new CalendarEventAdapter(dialog... | 1 |
12927eb498e08486eecc87d4ebdfe9c2 | 52fd4d3acb56faf22b1adc0027e3ed0d | 开发人员可以通过该方法,批量设置用户数据与DB数据或内存数据的映射关系
key:字段, value:子MAP(key:用户数据,value:表数据/内存数据) | <T extends Serializable> boolean setMap(String k, Map<String, T> obj, Class<T> clazz); | 1 |
9a8cc43b9c1f0ca175627a2cdaa8a6fb | 2962966a8f1c2cf28790121b355694e9 | 添加兼职列表 | {
if ($result && $this->request->isPost()) {
$this->success('兼职编辑成功!', 'javascript:history.back()');
}
} | 0 |
830f4d9368c1b68a89fa764139cb07ec | ad878858ab243ab19f9df32a27d5a631 | 通过物料code查找非贸易物料 | @Service
@Import({
ShellmerchantDataSourceConfig.class
})
public class ShellmerchantTestBase
public List<GasGoodsDO> findGasGoodsByGoodsCode(String goodsCode) {
GasGoodsDOExample exam = new GasGoodsDOExample();
exam.createCriteria().andGoodsCodeEqualTo(goodsCode);
return gasGoodsDAO.selectByExample(exam);... | 0 |
b1f24dc5b6a0e69c0eebbd3165a94c6f | 81507d792cce7b412f527250697632c1 | 切换节点Checked状态。选择/取消选择所有的后代节点 | node.setChecked(checked);
setChildChecked(node, checked);
if (node.getParent() != null)
setNodeParentChecked(node.getParent(), checked);
notifyDataSetChanged();
} | 1 |
84bf0ea8f0db3d600ca6cab05cace1d1 | 08e906a7f43d1b3cba35bc2d0c601af4 | Returns damages received from hurtful tiles in the specified direction. | void damaged(final int amount, final Object source); | 0 |
3229dcddef3be0f7379d6105c5f58525 | ff9c30202baffaf0dfc0390d4d3a41fb | Convert a grid index into a latitude and longitude. | class EditableTerrainTile(TerrainTile):
def _uvh_to_llh(self, index):
longitude = (lerp(self._west, self._east, old_div(float(self.u[index]), MAX)))
latitude = (lerp(self._south, self._north, old_div(float(self.v[index]), MAX)))
height = self._dequantize_height(self.h[index])
return long... | 1 |
ed785ad92fc5eea211d4159c78f1ea40 | 530c103a010bed6fa4a2032599700d3c | GET TOTAL NUMBER OF ACCOUNTS (FOR STATISTICS) | String countQuery = "SELECT * FROM " + TABLE_ACCOUNTS;
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.rawQuery(countQuery, null);
int count = cursor.getCount();
cursor.close();
db.close();
return count;
} | 1 |
589d6a951600dc0928a4866e8342eb1b | 69c39a10a60d13965e0c4807d0de74f3 | Retrieve environment information from each Awair device | result = elasticbeanstalk.retrieve_environment_info(env_name, info_type)
instance_id_list = dict()
for log in result['EnvironmentInfo']:
instance_id = log['Ec2InstanceId']
url = log['Message']
instance_id_list[instance_id] = url
return instance_id_list | 0 |
ea6ed42372526c3adfb48baac1f70f84 | ab308dc0305fda850cd5b49d0a694810 | 是否允许查询数据; | public abstract boolean canQuery(); | 1 |
f681a6a3cf1fc9d89562978469add261 | e40247e4cf25d4f051cde2e137e2bcb6 | Consulta los tipos de modalidades de torneo | {
$query = new static;
$query = DB::select('select id_tipo_modo_transporte,nombre from ldci.tb_tipo_modo_transporte where estado=1');
return $query;
} | 0 |
8a23d09905eddabc2a327b75016be1a0 | 68ce6fadf90f43d377f943ba4c692304 | Used to clear each of the per_thread_contexts inside the hash_map_per_thread_context | class ContextLog:
def clear():
if hasattr(LOCAL, 'context_map'):
delattr(LOCAL, 'context_map') | 0 |
2b3f1659df5d3879e5c22bda940a6ea0 | 03dd061b761e4d925892ef46c1e63fb2 | Construct a OAI-PMH payload for a record | def makeBaseRecord(res, keepTimestamp=False):
base.validateStructure(res)
builders.getVOResourceElement(res)
rec = {}
rec["ivoid"] = base.getMetaText(res, "identifier")
rec["shortName"] = base.getMetaText(res, "shortName")
rec["sourceRD"] = res.rd.sourceId
rec["resId"] = res.id
rec["title"] = base.getMetaText(r... | 0 |
9362b099e36cafbc9c01ce064d2f84af | ef9fa1e315f305947c891747be86a78b | Elimina un documento, identificado por su UUID, de los datos
del sistema.
String representando el identificador UUID del documento
a eliminar.
Si el identificador UUID recibido no se corresponde con
ningun documento existente.
Si se produce algun error durante el acceso a datos. | @RestController
@RequestMapping("/v1/documents")
public class DocumentController
@DeleteMapping(value = "/{id}")
public HttpStatus deleteDocument(@PathVariable("id") Integer documentId) throws IOException {
return (documentService.deleteDocument(documentId)) ? HttpStatus.ACCEPTED : HttpStatus.BAD_REQUEST;
} | 0 |
9e4d8bedba6254b1538958e32843fdf7 | 7b66da5c31306bea1530156060e4396b | Approval Routing - In Sequence dropdown - Select an Sequence No | {
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 |
b745764b99d9dbfb89e28ad2660382fa | 69e0f62ebba62b5e4b4e27362e644975 | Set the doctor prescription date. | public class DrugPrescription
public void setDatePrescribed(Timestamp datePrescribed) {
this.datePrescribed = datePrescribed;
} | 1 |
f19859bb79b0d23d899a0d8cc069a4a1 | ad83567573d90c9727332236e198c06e | 查询订单列表 增量 | {
$time = time();
$start_update_time = now()->subDays(30)->timestamp;
$page = data_get($array, 'page', 1);
$params = [
'client_id' => data_get(config('coupon'), 'pinduoduo.PDD_CLIENT_ID'),
'start_update_time' => $start_update_time,
'end_update_time... | 1 |
2858a14d561f65a447910782b33432b1 | e0a9176441b200d47d655ffd1febbb3c | Draw the heatmap on the provided Axes. | cmap = sns.diverging_palette(220, 20, sep=20, as_cmap=True)
if self.count == 0:
self.im = self.ax.imshow(
ssp_map.heatmap_scores,
interpolation="none",
extent=(0, ssp_map.x_len, 0, ssp_map.y_len),
cmap=cmap,
)
... | 1 |
84b0c883dd9c13ac17429eb5e627f745 | 79758e2afd670299300936a36d77032c | 最短距離を更新するダイクストラ | while (true) {
bool update = false;
for (int i = 0; i < es.size(); i++) {
edge e = es[i];
if (d[e.from] != INF && d[e.to] > d[e.from] + e.cost) {
d[e.to] = d[e.from] + e.cost;
update = true;
}
}
if (!update)
break;
}
es.clear();
} | 0 |
8423f1ec0420aca9d685958e982c0112 | 48f4a6fc6de4f513e940bd1ed57fe796 | 用于将mongo数据进行JSON序列化 | def bson_encode(obj):
return json.dumps(obj,cls=MongoEncoder) | 1 |
eb14d790f2295d7c19a9b6ebb93127cb | 0bc48f003bf118d4a123366562cba2de | Free a single dynamically allocated splignAlign such as created
with splignAlignLoad(). | {
if (p->parts) {
spx_free(p->parts);
}
if (p->nodes) {
spx_free(p->nodes);
}
if (p->affinity) {
spx_free(p->affinity);
}
if (p->row_start) {
spx_free(p->row_start);
}
if (p->row_end) {
spx_free(p->row_end);
}
spx_free(p);
} | 1 |
6755356c402293fbb49fee6778bca8a8 | e6bb42139e60fb2b10ae32db076e7225 | ================
idEntity::UpdateFromPhysics
================ | void SV_Physics_Rigid( CBaseEntity *pEntity )
{
if( !SV_RunThink( pEntity ))
return;
UTIL_WaterMove( pEntity );
SV_CheckWater( pEntity );
WorldPhysic->UpdateEntityPos( pEntity );
CBaseEntity *pGround = pEntity->GetGroundEntity();
if( pEntity->GetAbsVelocity().z > 0.0f || pGround == NULL || (pGround->pev->flags ... | 0 |
54b7f698d82870b3c9af391b146ef171 | 33a695d814733635e138edf3a0bfb3f4 | Performs a single read iteration. Returns the number of records read. | public abstract class AbstractDatastoreResultSet
protected abstract boolean readInternal() throws DatabaseException, InvalidProtocolBufferException; | 0 |
7ff2d6f5976acc529b5d42af017c3d3f | c184fb13b8949bb51219500f5d347c75 | 채용공고 올린 회사들 수 조회 (검색어 있을 때) | public int selectVacancyPopulateCompnyByMonthListCnt(CondVacancyBean param) throws Exception {
return vacancyDAO.selectVacancyPopulateCompnyByMonthListCnt(param);
} | 1 |
4e3262c8123fe4f60d0dfee172840088 | b31e96e33a1a6bf01e87ca6befbfa915 | Gets whether or not this minigame is instanced. Non-instanced minigames are
created instantly upon registering them, and players are instantly added to
them at any time. Instanced minigames are given a virtual lobby to join and
all players join it at the same time.
instance. | public class Instance
public boolean isPvP()
{
return _isPvP;
} | 0 |
bd1e3669809936236ac26db4ea76ffce | de156ce5e3a6f3b6b8ed6b4032d1c4d8 | 属性手续费金额的setter方法 | class ProperTransactionInfo
def fee_amount=(feeAmount)
@fee_amount = feeAmount
end | 1 |
b51e54c4a9d41744956c11e5ff4c411d | 7519621a288e366fcda33a37271eec9f | consultarLliures Mètode per a consultar les taules lliures cuant volem inserir una reserva un dia determinat | def selectTLIday():
oraConn()
sql = "SELECT * FROM TLIsedaemunday ORDER BY lidate "
cur.execute(sql)
res = cur.fetchall()
result = []
for row in res :
result.append(row)
dbOut()
return result | 0 |
5d1507fb5089ebdb52ef9aaf9ec78905 | 388fd88b1dca76f314226ab20752ded1 | Loads in two csv files into dataframes and merges them | def load_data(MESSAGE_DF_PATH, CAT_DF_PATH):
message_df = pd.read_csv(f'{MESSAGE_DF_PATH}')
categories_df = pd.read_csv(f'{CAT_DF_PATH}')
return message_df, categories_df | 0 |
ce311681ed0f7ecea8a2a2c22a8e6a49 | 52c11298cfcd96d5e8e3ecfe053a5f23 | 获取拒绝订单数 | @Table(name = "o_receive_detail")
public class ReceiveDetail
public Integer getRefuseNum() {
return refuseNum;
} | 1 |
4278fe81854ca15b7cd0fa0fd941040f | 3ff132f70a5b99b3aab30c50f52b07ff | \brief Remove frames
- Scenes covered by removing range were removed.
- Scenes after removing range were shifted left. | {
hideGeom(m_scene);
for ( mclong i = 0; i < m_frames.size(); ++i )
delete m_frames[i];
m_frames.resize( 0 );
} | 0 |
94522c410dd00ca3e780dd27c29d1a7d | fc76d9a5b6c3476d1bb7cd5f9c592d15 | Construct a {@code GamePlayer} based on the specified player name type. | IPlayer newPlayer(int type, Color color); | 0 |
f8f74a4a142a993036cf1c806e69b336 | 43e42388d8ee0275a0bc138e46860c46 | Initialize command-line arguments and generators for loading Graph Exchange XML Format. | parser = argparse.ArgumentParser(description="Run GEM method.")
parser.add_argument('--input', nargs='?', required=True,
help='Input graph path')
parser.add_argument('--output', nargs='?', default='emb.csv',
help='Embeddings path. Default is `emb.csv`')
pa... | 0 |
f37f3c1937c64e8cc226fa1d6b04043c | 476ec69e94cb1023bcd70981ddf53820 | 根据页面是否有滚动条,调整脚注是否固定于页面下方 | {
var ViewHeight = document.documentElement.clientHeight;
var HtmlHeight = document.documentElement.scrollHeight;
if($("#order #total").hasClass("fix"))
{
HtmlHeight = HtmlHeight + 90;
}
var MaxScrollTop = HtmlHeight - ViewHeight;
var ChangePoint = MaxScrollTop - 311;
var ScrollTop = $("html").scrollTop();
... | 1 |
d17ab59743956e11234f9d3d7de21864 | c68fe15709800feb7d0914cefe033f4e | Set backup Mode to specify whether to use existing backup or create new backup. Possible values include: 'CreateBackup', 'ExistingBackup'. | public class ValidateMigrationInputSqlServerSqlMITaskInput
public ValidateMigrationInputSqlServerSqlMITaskInput withBackupMode(BackupMode backupMode) {
this.backupMode = backupMode;
return this;
} | 1 |
c6f6d01fcb8b98f420d15919332b3464 | 62bf257dab62411ceeaf0ee3dbe92787 | 移除所有设置窗口 | {
foreach (Type t in mWindowDic.Keys.ToArray())
{
mWindowDic[t].Destroy();
}
mWindowDic.Clear();
} | 1 |
e1806d97acbb27d07ea7bb78a86a9c86 | 7fa771663d0dbc2fc3b60ad5659af2fc | Builds relationship meta for a JSON-API response | {
return [
'creator' => [
'links' => [
'self' => route('sessions.relationships.creator', ['sessions' => $this->id]),
'related' => route('sessions.creator', ['sessions' => $this->id]),
],
'data' => new UserRes... | 1 |
9a9214b789c764174a0c74e0a47a3835 | cb81af98b80d77053447523b40b8db63 | Returnerar hur många kunder man i förlorat "förut" (innan den senaste) | class Hypermarket(models.Model):
def staff_gone(self):
return self.turns.aggregate(sg=models.Sum('staff_going')).get('sg', 0) or 0 | 0 |
d29f24d0f10e05fa9edfd6a3e12ff0b2 | 3ebcc979fa846522a8b62685d8a568c4 | Print to remind that user specified a non-exist menu item | void unknown() {
cout << "Unknown selection, please try again." << endl;
} | 1 |
9b442092dced97ad16178a12d5389642 | 5f6bd0beb47ec9696e2511b5b91a4e7d | Check if zoom-in button should be enabled | public class BoundingBox implements Serializable, JosmXmlSerializable
public boolean canZoomIn() {
return (ZOOM_IN < zoomInLimit());
} | 1 |
49e5ab7c14c01a193e62a943b51c5dc8 | 75f5e2cd59fec01c9453c2f39f42e85b | 根据容器名和容器class 查询容器
容器类型有:
<br>ExchangeContainer
<br>OrgContainer
<br>PDMLinkProduct
<br>Project2
<br>WTLibrary | class TaskHelper(object):
def get_container_byname(cls, name):
task_container = None
task_container_qs = TaskContainer.search(name = name)
if task_container_qs.count() > 0:
task_container = task_container_qs[0]
return task_container | 0 |
d606adc6dcbf297a01d946cb1c11ef36 | cfd2429735077e27352dd3b1c2208e2a | Notify the user of all logged changes since their last update. | while not change_notifier.empty():
res = change_notifier.get()
logging.debug(f"got signal, content: {res}") | 0 |
880fabf5ecad9c1d308c350e39e93687 | e7c446844f2928486da713eab1d4a105 | Test that alanine smiles resolves the expected result. | from rdkit import Chem
smiles = 'CC(=O)OC1=CC=CC=C1C(=O)O'
self.mol = Chem.MolFromSmiles(smiles) | 0 |
040f4de8c4824ae5564f4dd085904d69 | 99e6d6ca8745e6a175028b8d93736eed | ==============
TDM_ShowTeamMenu
==============
Show/hide the join team menu | if (InCombatLockdown()) then
return;
end
local showmts, showmtplayers, showmtpets = CT_RA_MTPlayers_GetShowStatus();
local tempOptions = CT_RAMenu_Options["temp"];
local showMTT = (tempOptions["ShowMTTT"] or false);
local sortMTs = tempOptions["SortMTs"];
local numRaidMembers = CT_RA_NumRaidMembers;
local fra... | 0 |
c95af9e86f266b050984adde705cb493 | 8c1cddf02f2a01d6a4d321c467f396ab | 获取地图点击监听 | @BindLayout(R.layout.activity_map_location)
public class MapLocationActivity extends AppBaseActivity
private void initListener() {
mBaiduMap.setOnMapLoadedCallback(new BaiduMap.OnMapLoadedCallback() {
@Override
public void onMapLoaded() {
}
});
mBaiduMap.setOn... | 1 |
4c515d57e7cb6c8738beb7177c0e7407 | db04d88d0a73724a2b878720405ff8e3 | Report when tasks get scheduled. | void jobScheduled(Trigger trigger); | 1 |
9a638f4e513691f1170720f513a927e4 | e9d2edf2e5fad40596d1b9ab647dfb29 | Handles database errors on the removal of previous items. | {
Assert.ArgumentNotNull(sender, "sender");
Assert.ArgumentNotNull(e, "e");
var database = SitecoreEventArgs.GetObject(e, 0) as Database;
if ((database != null) && (database.Name == this.targetDatabase.Name))
{
ID iD = SitecoreEventArgs.GetID(e, 1);
Assert.IsNotNull(iD,... | 0 |
a000473dedc37eaf7873f1147063aafd | cf1105b5c991aafd382bb7dc6c86cda6 | Retrieve A/R Retry Statistics Retrieve A/R Retry Statistics. This is primarily an internal API call. It is doubtful you would ever need to use it. | Datum
pg_stat_get_prefetch_recovery(PG_FUNCTION_ARGS)
{
#define PG_STAT_GET_PREFETCH_RECOVERY_COLS 10
ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
TupleDesc tupdesc;
Tuplestorestate *tupstore;
MemoryContext per_query_ctx;
MemoryContext oldcontext;
Datum values[PG_STAT_GET_PREFETCH_RECOVERY_COLS]... | 0 |
4b018a223ed546023aab8cc4c15f1b22 | e5f8eb86a315ab461c5cedb84f82af50 | Filter update notifications and handle them. | list_item *filter = list_filters;
while (filter) {
if (! filter->notify(p, v, filter->data)) {
return;
}
filter = filter->next;
}
list_item *curr = list_instruments;
list_item *prev = NULL;
list_item *next = NULL;
bool keep = false;
while (curr) {
keep = curr->notify(p, v, curr->da... | 1 |
840ed8f7d42b1f8be965e9a4416ead4b | 247f52953202ebb513778e9cf824ea71 | Test the case where the ctx manager is __enter__ed twice.
The second __enter__ is supposed to resut in a NOOP. | from sqlalchemy_sqlschema.maintain_schema import SchemaContextManager
with mock.patch.object(
SchemaContextManager, "__enter__", mock.Mock(return_value='foo')), \
mock.patch.object(
SchemaContextManager, "__exit__", mock.Mock(return_value=False)):
m = maintain_schema("s... | 0 |
edee73d843e8db5f1f0f09e566eb9860 | 09eec9f578d9449c4062d6f65cabc768 | When we have deselected the Ultimate Joystick, stop updating | [ExecuteInEditMode]
public class UltimateJoystick : MonoBehaviour, IPointerDownHandler, IDragHandler, IPointerUpHandler , ISettingUI
public void UpdatePositioning()
{
if (Application.isPlaying)
ResetJoystick();
UpdateJoystickPositioning();
if (OnUpdatePositioning != null)
... | 0 |
e96ae45a0c82eb1b23fffc68c28956d0 | cdb829dec04eabd9277f8ae5837371bc | 对数组的值进行字符串的字典序排序,并生成sha1签名字符串 | class RealNameAuth
protected function _createSign($data)
{
$data = array_values($data);
asort($data);
$str = implode('', $data);
return strtoupper(sha1($str));
} | 1 |
5e4c5427df27c7a13a2ceefa8e283fcc | dd97c63201765d2a52abef59659eea0f | 商品活动关联表 | try{
$rel = goods_activity::objects()->filter("goods_id = $gid");
} catch (Exception $e) {
$rel = false;
}
return $rel;
} | 1 |
bf307c8115ed120b936d50eabe75789d | 9e628761a9dceed72a630a555cfa7361 | Print a list of categories that have no products out of stock | {
var outOfStock = DataLoader.LoadProducts().Where(prod => prod.UnitsInStock == 0);
PrintProductInformation(outOfStock);
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.