query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
97573757eb6cb6caa60ae6da175ebb8c | 77e7bef69a0c86d62ab3add2f58b63c6 | Initializes the generator yuv controller. | void ScanYUVInit( PP_INSTANCE * ppi, SCAN_CONFIG_DATA * ScanConfigPtr){
int i;
ppi->ScanConfig.Yuv0ptr = ScanConfigPtr->Yuv0ptr;
ppi->ScanConfig.Yuv1ptr = ScanConfigPtr->Yuv1ptr;
ppi->ScanConfig.SrfWorkSpcPtr = ScanConfigPtr->SrfWorkSpcPtr;
ppi->ScanConfig.disp_fragments = ScanConfigPtr->disp_fragments;
pp... | 1 |
cc03f87e70ee9b3af7fbba9388b16c20 | ed4b3e12966e5dfb2d404af61ab64e77 | 清空缓存,立即清空 | class ClearExecutor : BaseExecutor()
fun clear() {
val worker = getWorker()
worker.clearAll().apply()
val expireWorker = getWorker(true)
expireWorker.clearAll().apply()
} | 1 |
df830beac15e871e5bd0790806db26a2 | 35f668b1401bb0168466d8150e45a500 | A quick iterator for status changes. Copied from the combat routine. | if not self.finished:
return
if char_id not in self.characters:
return
if self.characters[char_id]:
status = self.characters[char_id]["status"]
if status == CStatus.ESCAPED:
return defines.COMBAT_ESCAPED, None, None
elif... | 0 |
4e63523eb22ac432c3ffb97d67fabadf | 977c1e4993c897bc08b8fa92e385afff | 得到推荐产品列表 | public class MarketAPI
public static void getRecommendProducts(Context context,
ApiRequestListener handler, String type, int size, int startPosition) {
Session mSession = Session.get(context);
final HashMap<String, Object> params = new HashMap<String, Object>(6);
params.put("type", type);
params.put("size", ... | 1 |
9245160cddfff8146ab5dd7455a324c3 | f6fae449dcfa60b27844882430cdcb1b | Returns the parent evp service request ID of this evp service request. | public long getEvpGrantRequestId(); | 1 |
2182bf59e7f8daaff995f0db7f644228 | 58984e76ccbb6c07b776d927ee1bb874 | Case-insensitive matching via lower-casing
Yes, I know case-folding is a complicated problem in Unicode, but we only support
the ASCII strings defined in LogLevelNameMapping anyway, so it's fine -anurse. | func parseLogLevel(levelStr string) Level {
levelStr = strings.ToLower(levelStr)
switch levelStr {
case "debug":
return DebugLevel
case "info":
return InfoLevel
case "warn":
return WarnLevel
case "error":
return ErrorLevel
case "fatal":
return FatalLevel
default:
return DebugLevel
}
} | 1 |
c1ea525d5e72a510324245d92c62ab89 | 26f1a9a2487a2ae6ae8f87038a4184af | Retrieves the type of transfer being performed,
such as a file download | namespace Microsoft.ApplicationBlocks.ApplicationUpdater.Downloaders
void GetType(out BG_JOB_TYPE pVal); | 1 |
af77bc3011851668a069e83be00dd92d | a3527c72039763304617b60334a19a62 | 查询已借出图书列表 | public class BookDaoImpl implements BookDaoIfac
@Override
public List<Book> queryCanLendBooks(){
List<Book> list = new ArrayList<>();
Connection conn = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
conn = DBUtils.getConnection();
stmt = conn.prepareStatement(QUERY_CAN_LEND_BOOKS);
... | 0 |
13300d8a66ae0106a52624b7136a1777 | 57a34a5fbabb58fa7f0f3ecb82f61c8c | Should parse the file and return a synced shelve file object | class ParserMixin(object):
def parse_file(self, file_, **kargs):
return self.get_parse_file()(file_, **kargs) | 0 |
5cb5cceb3befaad8806e57ed18eb9dc6 | 734444d4e339208d41d2969a0193742f | Выполнение кода в отдельном потоке с задержкой. | {
var stopwatch = Stopwatch.StartNew();
await RunAndAwait(() => delay < stopwatch.Elapsed);
} | 0 |
5efa115fd899f3fde3ecfdb7c13da02c | 108215f461603707ea215d790b750f49 | 底部弹窗设置 | if (isAnimation) {
P.mAnimations = R.style.dialog_from_bottom_anim
}
P.mGravity = Gravity.BOTTOM
return this
} | 1 |
d43373b10dbc85905e1e9cfa517e9f07 | 253b0bc7c1d29de9d823594a07c54407 | [START initialize_sdk_with_service_account_id] | public void run(String... strings) throws IOException {
try {
FileInputStream serviceAccount = new FileInputStream("src/main/resources/serviceAccountKey.json");
FirebaseOptions options = new FirebaseOptions.Builder()
.setCredentials(GoogleCredentials.fromStream(se... | 1 |
9154ea13239e92bf5cc0395d21fabeb1 | fa131d799b9536f3c3defab15478c970 | 作用:交互界面中当用户要求添加新的票价信息时,进入该函数进行处理 | void MainWindow::on_pushButton_clicked()
{
cashDia = new priceDialog(this);
cashDia->exec();
} | 0 |
63a1314e02eb234e5b795b9108a0a506 | 2f50c45087b0d225ef2ae6b8716b34d8 | 根据命令行输入指令获取对应信息 | command = arg.split(' ')[0]
if command == '':
print('[Help] login nickname - 登录到聊天室,nickname是你选择的昵称')
print('[Help] send message - 发送消息,message是你输入的消息')
print('[Help] logout - 退出聊天室')
elif command == 'login':
print('[Help] login nickname - 登录到聊天室,n... | 1 |
74743687a8550779142c4c98447b4795 | c357c245574f65cafa091ccf6dabfb4f | 列出所有的招聘信息 | List<Recruit> selectAllList(); | 1 |
a9a34b99ee17fe455f5cf1ba7635b72f | b4ffed649422a446a3facaf0a3ab2c5a | 查看商家认证状态 | var tha = this
var dat = { userid: gerxinx.id, brandid: '2' }
var url = baseUrl + 'store/storestatus'
http.promisServer(url, dat).then(function (resc) {
if (resc.status == "000") {
console.log(resc, '商家状态')
var sjzt = resc.data
wx.setStorage({ key: "sjzt", data: sjzt })
... | 1 |
4b300fc5c92d986a2eba1f002f740dc1 | 16218b4de11c38609e1df7f6ebc69d59 | This method is queried for how many tick calls should occur until doAction is called | public class BuildJob extends NatureJob
public static int getTicks() {
return 1;
} | 1 |
bfe226079f25bbbd8d2c7f0320a510c5 | 51eab46cd4c490a59179b952766f4b0b | Set publishedOperations to nill (currently the same as reset) | axis2_status_t AXIS2_CALL
adb_ServiceMetaData_set_operations_nil(
adb_ServiceMetaData_t* _ServiceMetaData,
const axutil_env_t *env)
{
return adb_ServiceMetaData_reset_operations(_ServiceMetaData, env);
} | 1 |
fc87a8ccd1b257ff3e8d4c8695158d03 | d1c8fac299c5fe9e5db887447f447f55 | creates connections for datastore objects | try {
Class.forName("com.mysql.cj.jdbc.Driver");
Connection connection = DriverManager.getConnection
("jdbc:mysql://localhost/project", "root", "8135");
String addInventory = ("insert into Inventory " +
"values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
psAddInventory = connection.prepareStatement... | 1 |
9a97da457ef8871f4c1d508049993058 | 620e12b349537346298c48b85ecddbf0 | <p>모듈 편집기 창을 초기화합니다.</p> | JPanel jPanel = new JPanel();
JLabel jLabel1 = new javax.swing.JLabel();
JLabel jLabel2 = new javax.swing.JLabel();
JLabel jLabel3 = new javax.swing.JLabel();
JScrollPane jScrollPane = new javax.swing.JScrollPane();
jLabel1.setText("HLT:");
jLabel2.setText("Default:");
jLabel3.setText("File:");
jTextF... | 0 |
cfe86d2facae728610120d67d7f76c13 | decb88ece359d31b44d1c751dd6af031 | Very interesting feature.
You can create default method in interface and descendants does not have
to implement it.
It is useful when you need to add method into existing interface. You
does not have to add implementation into all existing descendants (which
is often not possible). It just not break binary compatibilit... | @Override
default String defaultMethod(String info) {
return "Override Multiple Default: " + NewInterface.super.defaultMethod("use super") + info;
} | 0 |
986f94f7b51d212ce7ff5acbb56df85d | a6d10ea76cc423833f77d427cce7753d | Creates the achievements dto. | namespace RATools.Parser
[DebuggerDisplay("{Title} ({Points}) Core:{_core.Count} Alts:{_alts.Count}")]
public class AchievementBuilder
public Achievement ToAchievement()
{
var core = _core.ToArray();
var achievement = new Achievement { Title = Title, Description = Description, Po... | 1 |
767084c256beb0b92757c1e220cd819f | 5b1624bfe1987a3f2d41ae04763cf4c8 | 회원탈퇴
탈퇴할 회원의 비밀번호가 일치하면 member table 에서 회원정보를 삭제한다.
탈퇴할 회원의 비밀번호가 일치하지않으면 0을 반환한다. | public int myInfoDelete(MemberVO mvo); | 1 |
8726b6e72ae8c0b17b7d9a1bd403141d | 35de493219175412231fa4a4b140f228 | Get the daily change in absolute dollars and %change. Returns the
following tuple:
(absChange, percentChange) | try:
price = f'{Ticker(symbol).price[symbol]["regularMarketPrice"]:.2f}'
change = f'{Ticker(symbol).price[symbol]["regularMarketChange"]:.2f}'
per_change = f'{Ticker(symbol).price[symbol]["regularMarketChangePercent"]*100:.2f}'
return (symbol, price, change, per_change)
except:
... | 0 |
7087e3cf91540f6ddc3cd4c34bd41b1c | 5882c618015d59b0e22e608ff35e664e | Initialize Logger object. | class Logger(object):
# =========================================================================
def __init__(self, __name__:str, level: int = None):
self.logger = logging.getLogger(__name__)
self.formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
if leve... | 1 |
5c5d71393eadb8ba1a77285749509d50 | 8796f54c1f72419a974d29c1c838f968 | lấy danh sách đơn giá | export class DetailComponent implements OnInit, AfterContentChecked
getdskhuyenmai() {
this.khuyenmaiService.getListKhuyenMai().subscribe((res: any) => {
this.dskhuyenmai = res.khuyenmais;
});
} | 0 |
b5190dee27cd18b0936478eef754c552 | 0c44ac00f1eb04bbc026892e05ee9e2e | Sets the flowType property value. The flowType property | public class FlowDef implements Serializable
public void setUserType(String userType) {
this.userType = userType;
} | 0 |
f5af2f9b9da288501de48acf03efef7e | 2a2e59350d290994e34338c2b82ff0ba | Callback associato al widjet btnCancel | public class DialedCallMiniPanel extends javax.swing.JPanel implements HistoryItem{
public JButton getjButtonCallBack()
{
return this.jButtonCallBack;
} | 0 |
86591230fc4177fdca73d51cc7024da2 | dc7e29a34cca838bb48c9adf4bd4ca0d | Sorts an array in place with bubble sort | class BasicSort
public static int[] bubble(int[] input) {
return new int[0];
} | 0 |
f9228cdb810e6981db06007f8560592e | 62744cd126b81f89dac2e4fcd42f02f0 | Has the input branch already been instrumend with a (half)duplex solver? | {
return (_hasSolReal && _solReal.hasPrimalRay()) || (_hasSolRational && _solRational.hasPrimalRay());
} | 0 |
1b9dcf5322ad8f08544331bd82943ab1 | c91f19e06b17f79da89a6f6c9524d654 | Gibt Jahre zum Filtern von Einträgen zurück. | @Slf4j
public class IndexServiceUtils
public static List<Integer> getZaehljahre(List<Zaehlung> zs) {
return zs.stream().map(z -> z.getJahr()).collect(Collectors.toList());
} | 1 |
4d21fb47a510012eb9379a7e5e0e4501 | aae372420f2f12817470950dd83b1d7d | Function which calculates the derivatives of the planet's position and velocity
at a given time t, using the gravitational forces from the objects provided.
Note that the 6 coordinates are defined with 3 position in self.r, 3 velocities in self.v.
Includes the centrifugal force from the rotating frame | try:
curr_date = self.in_date.shiftedBy(dt)
self.inertial2Sat = rotation
self.satPos_s = self.inertial2Sat.applyTo(self.satPos_i)
omega = Vector3D(float(omega[0]), float(omega[1]), float(omega[2]))
self._compute_gravity_torque(curr_date)
se... | 0 |
0019ceaeddfebf242eecf4fe62c309d4 | 5df2e2ef3c572547e197c712bcc288c3 | Test that no comments are returned for posts without comments. | class TestDefaultApi(unittest.TestCase):
def test_comment_0(self):
pass | 0 |
3930c8cc3b73f0ffcc7c99b6e2ff148a | bbba1aea659de2fd675a7fd533af3199 | Проверка статуса отправки sms | public function getStatusSms($messageId); | 1 |
0a886a74f331ba30362c71dd8aff84d7 | 896452a5200258aaa47dea42f50a390c | Iterate over trials in the development subset | trial_list = []
for pair in stimuli:
for target in [0, 1]:
for ori in ORIS:
trial_list += [{
'distractors': pair,
'target': pair[target],
'ori': ori}]
random.shuffle(trial_list)
return trial_list | 0 |
eea7be03095770919aed506183861762 | 8911ce86f46b18c4cfddc64251ab87b3 | Removes the show log hook. | unregister_hook('post_local_start', 'addon/nsabait/nsabait.php', 'nsabait_post_hook');
unregister_hook('feature_settings', 'addon/nsabait/nsabait.php', 'nsabait_settings');
unregister_hook('feature_settings_post', 'addon/nsabait/nsabait.php', 'nsabait_settings_post');
logger("removed nsabait");
} | 0 |
635c85a3c9cb0bc0b595f5af4e8c73cb | e4e1be2d182bff462c606311ba66f41f | strips trailing zeros | public class BigDecimal extends Number implements Comparable<BigDecimal>
public BigDecimal stripTrailingZeros() {
if (intCompact == 0 || (intVal != null && intVal.signum() == 0)) {
return BigDecimal.ZERO;
} else if (intCompact != INFLATED) {
return createAndStripZerosToMatchScale... | 1 |
7ec9edc5e90b12cf74c1b82345ece875 | 5c078596818918d7c9083e0cda5aa7c7 | Get the possible selection values from the server and set them | {
DataSet serverSites = SMTPServerSiteInfo.Provider.Get().WhereEquals("ServerID", smtpServer.ServerID).OrderBy("SiteID");
if (!DataHelper.DataSourceIsEmpty(serverSites))
{
currentValues = TextHelper.Join(";", DataHelper.GetStringValues(serverSites.Tables[0], "SiteID"));
}... | 1 |
18bbe765559087f746152d4eaea06dba | 6b0e39e16bc18d6f0b80cdad0a15dac6 | Resolve symlinks and append '/' if necessary. | {
QFileInfo fi(QDir::fromNativeSeparators(filePath));
if (fi.exists() && resolveMode == ResolveLinks) {
return QFileInfo(fi.canonicalFilePath()).absoluteFilePath();
}
return QDir::cleanPath(fi.absoluteFilePath());
} | 0 |
67a420dbbb3bbd7766bd963c77eaf717 | 18a0d79bcee6fbbb9d93c99a97fec909 | Open and rewind the protocols file. | {
bool result = false;
if (protocolPtr != NULL)
{
result = protocolPtr->Start();
}
return result;
} | 0 |
a93addaed83a69de7bd77840f0053cf6 | 5dd4501b2b2399dea50ba0f60aca17a6 | Gets speed of the general program speed slider | public class View extends Application
public int getAnimationSpeed () {
return (int) speedSlider.getValue ();
} | 1 |
f205e9c9113add09736d841e67d13ee4 | 3d3fd578fa5f4abff57d1f20f598661a | Zeichnet einen Teil der Spielfeldbegrenzung. | {
Vector2D topLeftCorner = (LevelArray[0, 0].Position + OFFSET) + Vector2D.Left + Vector2D.Up;
Vector2D topRightCorner = (LevelArray[LevelArray.GetLength(0) - 1, 0].Position + OFFSET) + Vector2D.Right + Vector2D.Up;
Vector2D bottomLeftCorner = (LevelArray[0, LevelArray.GetLen... | 1 |
b2773c14cc9206859cdf3558dee7c5f3 | 26f4c1ddd23638573a63a85c4bdc7710 | 被纵向挤压 | {
if(this.prePlayerType==window.Constant.PlayerType.SteelBall)
return;
this.squashAction = cc.scaleTo(0.2, 1, 0.6);
this.stretchAction = cc.scaleTo(0.2, 1, 1.2);
this.scaleBackAction = cc.scaleTo(0.1, 1, 1);
var seq = cc.sequence(this.squashAction, this.stretchAc... | 1 |
abf2ba45abc27507062deb9a6ba27992 | 14ba0ebde60155127697ba3e1d2e3998 | Save mesh in ASCII Wavefront .OBJ file | def write_obj(name,verts,faces,normals,values,affine=None,one=False):
if (one) : faces=faces+1
thefile = open(name,'w')
if affine is not None:
for item in verts:
transformed = f(item[0],item[1],item[2],affine)
thefile.write("v {0} {1} {2}\n".format(transformed[0],transformed[1],transformed[2]))
else :
for... | 1 |
d3290633d7f2d5974b57131528785eb1 | f3cd07f572b2c250db05fdf5b8ed955c | Initialize alsaif with real hardware data | static void init_raw_data(void)
{
hwparams = rhwparams;
} | 0 |
83319fe36989adddcb07c8c8153f5024 | 339da7472a0b02913d610d1c1f909da4 | Searches the vertexDict to see what groups is assigned to a given face.
We use a frequency system in order to sort out the name because a given vetex can
belong to two or more groups at the same time. To find the right name for the face
we list all the possible vertex group names with their frequency and then sort by
f... | inds.sort()
indmap = dict(zip(inds, np.arange(len(inds))))
V = V[inds, :]
gface = []
for face in F:
check = np.zeros(3)
for j in np.arange(3):
check[j] = (face[j] in inds)
if check.sum() == 3:
nface = [indmap[f] for f in face]
gface.append(... | 0 |
f452d8083170a1c322638b4ae13536f4 | a3c057ba55c996181f4d3b6382090d23 | 初始化5个Tab的点击事件 | public class MainActivity extends FragmentActivity implements View.OnClickListener
private void initEvents() {
mTabHome.setOnClickListener(this);
mTabCollect.setOnClickListener(this);
} | 0 |
4a88cb58faf0e0041734a239819bb4d4 | d87b5e53e1b5e251abe5a39d16c5a20f | Ustawia czy formularz jest podformularzem | if( ! is_null($form) ) $this->form = $form;
$this->is_actionnable = $val;
} | 0 |
98ed29f172d00509e2145d2b914e2702 | e66c6aaf69c6cf8b57df7df2315d8d83 | Method to get the optimal route for a given list of places. The method takes a List of LatLng's
of the places. The first & last place in the list are considered the start and destination places
respectively. All other points are considered waypoints. The method performs an Http Request to Google
maps' directions api an... | val path: MutableList<List<LatLng>> = ArrayList()
val instructions = arrayListOf<String>()
val intCoordinates = arrayListOf<LatLng>()
val routesArray = jsonResponse.getJSONArray("routes")
if (routesArray.length() > 0) {
val routes = routesArray.getJSONObject(0)
... | 0 |
70cdacb643dddbb58a33174fa73ef7dd | 929dae4b050f34ebff5e3f1569cfbb0a | マルチサンプルレンダリングのサンプル数とクオリティをチェック | void checkBuffersSample(){
GLint bufs,samples;
glGetIntegerv(GL_SAMPLE_BUFFERS,&bufs);
glGetIntegerv(GL_SAMPLES,&samples);
#ifdef DEBUG
printf("MSAA buffers = %d samples = %d\n",bufs,samples);
#endif
} | 1 |
5989c28204a66db61af2c409530188e3 | 6f801a8d6fb7c942713c2d2a22a41bc3 | 정수값에 알맞은 이모지 반환 | def numToEmoji(s):
for i in range(len(dice)):
s = s.replace(u"" + str(i), dice[i])
return s | 1 |
b30dc47a64332004fd9ae02b9e26e66e | 597e6b9f95fd3c2ea089bf9ff636a7c3 | Paint close button. | {
if (m_CloseBitmap != null)
{
Rectangle rectDest = new Rectangle(m_CloseBitmapLocation, m_CloseBitmapSize);
Rectangle rectSrc;
if (m_IsMouseOverClose)
{
if (m_IsMouseDown)
rectSr... | 1 |
4f2f9b45c0b075838507977de5f18869 | 503d4f53b2347c065448412a26787aef | Adds a test file to be executed. | class MINLPlibTester:
def add_file_to_testset(self, path):
self._testset.append(path) | 1 |
b35b44e590da9f37e3adbd4402c97673 | e39e81dbd62d50a9e52d65b175282d7d | Disable automatic first control focus when changing pages. | function nav_first_focus_lock( e ) {
if ( e.which === 9 && e.shiftKey ) {
$nav_last_input.focus();
return false;
}
} | 0 |
3736ee88f85d13fc37718f1d6da10d19 | e320dfe83970cc1ef0dc49108a41bc31 | saves loaded doc to JPG, saves in same directory and with the same name as the loaded doc | {
try
{
ViewerConfig config = Utilities.GetConfigurations();
ViewerImageHandler imageHandler = new ViewerImageHandler(config);
string guid = DocumentName;
PdfFileOptions options = new PdfFileOptions();
option... | 0 |
0d1f8cd7cd7232c3bbf24a8c0f09aa32 | b968386ce319512ad9070cb405f93396 | r"""Creates a YtObject and then adds that object to `dataObjects` | class ADMBuilder(object):
def create_object(self, parent=DEFAULT, **kwargs):
object = AudioObject(**kwargs)
self.adm.addAudioObject(object)
if parent is DEFAULT:
parent = self.last_content
if parent is not None:
parent.audioObjects.append(object)
self.item... | 0 |
ce32c4a0d54141dfc872b939da7a2b8d | 971c7fdb6b4729c3e246d724c4e9fc58 | Compute the covariance matrix of a Gaussian, given a typical size,
an axis ratio, and an angle | axis = np.asarray(axis)
theta = np.asarray(theta)
axis = axis/math.sqrt(np.dot(axis, axis))
a = math.cos(theta/2.0)
b, c, d = -axis*math.sin(theta/2.0)
aa, bb, cc, dd = a*a, b*b, c*c, d*d
bc, ad, ac, ab, bd, cd = b*c, a*d, a*c, a*b, b*d, c*d
return np.array([[aa+bb-cc-dd, 2*(bc+ad), 2*(b... | 0 |
48e38274fd2c58703705808072bf1400 | 57f706521e75bd29b7fc9b50b3678bb7 | returns the three offsets needed to implement a strided scanner - start
offset, past end offset, and stride - over a specified dimension. Must be
passed the dimension int and a vector with all the remaining offsets -
the one from dimension dim is ignored. | def _rec(idx, dim):
idxn = idxm = 0
if not dim:
return ()
if idx == 0:
return (0, )*dim
while terms(idxn, dim) <= idx:
idxn += 1
idx -= terms(idxn-1, dim)
if idx == 0:
return (idxn,) + (0,)*(dim-1)
while terms(id... | 0 |
75080173a29bc6923299218aff6f85d0 | d6d8c1622f97797940132ae53d2992d3 | Calculate the sample frequency of the light curve.
Returns | N = len(function)
F = np.fft.fft(function)
ff = (np.argmax(F[1:]) + 1) / N / FPS
return ff | 1 |
be58440a4d2e17556bb1b2d131fab180 | 3f9f392204f0bed3ec413764633deff1 | For skipping arguments when passed to set_args. | class IterativeDebugArgs(BaseArgs):
def skip_iteration(self, success=None):
success = util.default(success, False)
raise IterativeDebugArgs.SkipIteration(success) | 0 |
80d401e60a3620b972a68f9f3a6f94c2 | d9653391e9570e8b8d1281b664692b43 | 查看使用记录对话框 | void see_record()
{
sqlite3 *database;
int ret = sqlite3_open("person.db", &database);
if (ret != SQLITE_OK)
{
printf("打开数据库失败\n");
return;
}
char *errmsg = NULL;
char *sql = "create table if not exists person(time TEXT,fromname TEXT,toname TEXT,word TEXT)";
ret = sqlite3_exec(databa... | 1 |
efe25ede93418691d924a1d254721e28 | 09ec620f25ffe8ab8eac21ddafe808ec | Returns a user specific unit type. This is needed for entity types like distributions that may change the unit type
that is returned at runtime. | if(getConfigType() == null) {
return null;
}
return getConfigType().getUnit();
} | 1 |
05c276a14ea26f03fc1c8bba4c07a29b | 39d743ed219df68ac123e958b40c354a | Функция заполнения пропусков в жилой площади медианным значением | hasnancols = list(df.columns[df.isnull().any()])
for col in hasnancols:
df[col]=df[col].fillna((df[col].median()))
return df | 1 |
38f7a49229dc955abba83de39185b0f4 | a3c31925523a3bf2bbeb4805dc92882a | ===========================================================================
@brief Sends the permit join command to ZigBee module
0 = SUCCESS
This API is used to trigger permit join for the specific amount of time. | byte SecurityUse )
{
uint8 stat;
uint8 duration;
uint8 tcsig;
duration = msg[ZDP_MGMT_PERMIT_JOIN_REQ_DURATION];
tcsig = msg[ZDP_MGMT_PERMIT_JOIN_REQ_TC_SIG];
stat = (byte) NLME_PermitJoiningRequest( duration );
if ( tcsig == TRUE )
{
ZDSecMgrPermitJoining( dura... | 1 |
43e56d251cba42e09211d13d16a36614 | 584730098cd86d8ee4ba4e5e96eb69d2 | 设置列数为colNum | public class GridView extends AbsListView
public void setNumColumns(int numColumns) {
if (numColumns != mNumColumns) {
mNumColumns = numColumns;
invalidate();
}
} | 1 |
6b3713f9ea81bf4dcf424125413860c5 | eaee4266ae21949e42cc97c093903f06 | Exit a parse tree produced by {@link TSqlParser#dml_trigger_operation}.
@param ctx the parse tree | public class TSqlParserBaseListener implements TSqlParserListener
@Override public void exitDrop_ddl_trigger(TSqlParser.Drop_ddl_triggerContext ctx) { } | 0 |
df92efad7627c7a619655739cc697502 | 6c3785cc2cde400028f502975e21c1e0 | Creating the time decreasing mechanism | this.counter = { min: 5, sec: 0 };
let intervalId = setInterval(() => {
if (this.onTime == false) {
clearInterval(intervalId);
}
if (this.counter.sec - 1 == -1) {
this.counter.min -= 1;
this.counter.sec = 59;
} else this.counter.sec -= 1;
if (this.counter.mi... | 1 |
e138b8d84e553b8f3def66243b374cc3 | 818178818bd3d38c885fd8a65b65df3a | @brief Clears the button GPIO settings, disables the buttons. | void BSP_PB_DeInit (Button_TypeDef Button) {
GPIO_InitTypeDef gpio_init_structure;
gpio_init_structure.Pin = BUTTON_PIN[Button];
HAL_NVIC_DisableIRQ ((IRQn_Type)(BUTTON_IRQn[Button]));
HAL_GPIO_DeInit (BUTTON_PORT[Button], gpio_init_structure.Pin);
} | 1 |
8942ce721b54722b665b1d6e13b59550 | 4468d9a7d730025fb987dac3781361cc | !
This function can be reimplemented to return virtual keyboard rectangle in currently active
window coordinates. Default implementation returns invalid rectangle. | namespace mx
const LSW_RECT CPeWorksWindow::VirtualClientRect( const CWidget * pwChild ) const {
LSW_RECT rTemp = ClientRect( this );
const CRebar * plvRebar = static_cast<const CRebar *>(FindChild( CPeWorksLayout::MX_PEW_REBAR0 ));
if ( plvRebar ) {
LSW_RECT rRebar = plvRebar->ClientRect( this );
rTemp.top... | 0 |
9e35decbae644f8873c1ffb4bc55d5a2 | 7cf59bb0828f9188bd64461ceb18075f | Set accessor for persistent attribute: cameraDescription | class Tx_Yag_Domain_Model_ItemMeta extends Tx_Extbase_DomainObject_AbstractEntity
public function setCameraModel($cameraModel) {
$this->cameraModel = $cameraModel;
} | 0 |
b179c4ceeff0d46319ece33c89ca7aa6 | bc2e2d8451509068640de89a2d9a7259 | 列头自定义单元格样式 | cellStyle({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 != 0) {
return {
"background-color": "#2162A8",
"text-align": "center",
color: "#fff",
"font-weight": "normal",
padding: "5px 0",
height: "60px"
};
} else {
... | 0 |
8e3e78b9bb22c287a7bae2c9ef1547a9 | eed9d64673a2e06d64d36405d92a26ca | Función para la supresión de no máximos | function masomenos () {
num.value= -(num.value);
} | 0 |
d0d7dc8a60a08cbc05cfdd9c6fbd42ff | d6e962ae3bb0a2a7451c9e48fc1e161c | Get the owner avatar ID. | class ImmutableProfile
def avatar_id
@source.avatar_id
end | 1 |
48c99b8ab230b1ffa6d6d04b55891f13 | 092a95b00a01c16a53709fb79d7228bd | Writes a method parameter. | {
sw.Write("\tmethod " + this.Name + " (");
foreach (String s in this.Parameters)
sw.Write(" " + s);
sw.WriteLine(" ) // " + this.Description);
} | 1 |
15f428cb9dd9c5f89106f17ce1010904 | 38c2276460ef4f3950f9ed4b8e89c33a | Splits a long message into multiple lines as needed. Appends ">>" as needed. This will also pad messages if they are of incorrect length. | message_split = msg.split("\n")
broken = []
while message_split:
result = message_split.pop(0) + "\n"
if len(result) > max_chars_per_message:
broken += [result[i:i+max_chars_per_message] for i in range(0,len(result),max_chars_per_message)]
else:
while len(result) <= max_chars_per_message:
if not mess... | 0 |
5364935087ab64743da240050591c6fa | 917441aba5b49cbd4906b9f7ebeac98c | Indicator whether element is in `favorites`. | var wasFavoritesTaskDrag = false;
if ($(elem).attr('data-isFavorites') && wasElementDragged(elem)) {
wasFavoritesTaskDrag = true;
}
return wasFavoritesTaskDrag;
} | 0 |
03bbd26da4770d8bd4120062a38ab438 | a7240c1f8552eadaf7209960d387685a | LoadDB loops over the RDBs in a given directory and parses them | int rdbLoadRio(rio *rdb, rdbSaveInfo *rsi) {
uint64_t dbid;
int type, rdbver;
redisDb *db = server.db + 0;
char buf[1024];
long long expiretime, now = mstime();
rdb->update_cksum = rdbLoadProgressCallback;
rdb->max_processing_chunk = server.loading_process_events_interval_bytes;
if(rioRe... | 0 |
f2e0a499ef2caf5c5eeb5907ff8ab0ce | 1794ea7d4e9736cb6109e25292161015 | Afegeig un botó per redireccionar a l'assignació de rols | class rolController extends Controller
public function create()
{
return view ('rol.create');
} | 0 |
1856d6c051b0b2d41d21483d9c99ec94 | 4fa580517018af865cc6fb069f530f53 | Gets the corresponding ComparatorPlus of StringHolder | public class AngularCriteriaAttributeLogicImpl
extends AngularCriteriaAttributeLogic
protected String handleGetComparator()
{
return null;
} | 0 |
96d4f7d5b72ae36b9c8536870859534c | 6fee8497731c0263c91ddb930977f095 | Callback method for preg_replace_callback that is used to adjust attributes for specific scripts. | $old_attributes_str = $matches[2];
$old_attributes_kses_hair = wp_kses_hair( $old_attributes_str, wp_allowed_protocols() );
if ( empty( $old_attributes_kses_hair['src'] ) ) {
return $matches[0];
}
$old_attributes = $this->flatten_kses_hair_data( $old_attributes_kses_hair );
$new_attributes =... | 1 |
c6e3574cb3c4f5a127ba94ad0f549399 | 5ccdbcfc9909afe33aae14fa46219f7e | Spatial Graph Convolution using the Global Structure Learning architecture. | super(RelationalGraphConvolutionSparse, self).__init__(**kwargs)
self.weights_1 = nn.Parameter(weight_variable_glorot(input_dim, output_dim, name = "sparse_w1")).to('cuda:0')
self.weights_2= nn.Parameter(weight_variable_glorot(input_dim, output_dim, name = "sparse_w2")).to('cuda:0')
self... | 0 |
e239344a190cc74ff23106cd9b79fd67 | 2c0a10f2578f0b54bcd87306909e12b6 | Takes in the user's desired number of birds and saves it to an array that stores user's level adjustments | function establishNumObstacles(){
if (gameData.state === `chasingLevel`){
numberObstacles = numberObstaclesLevel1;
}
else if (gameData.state === `chasingLevel2`){
numberObstacles = numberObstaclesLevel2;
}
else if (gameData.state === `chasingLevel3`){
numberObstacles = numberObstaclesLevel3;
}
... | 0 |
ad1869ca8fb15dbc173d2178fb34c7df | 49031d2c96d72e357db3597a249cb12c | Returns the ctb product with the primary key or returns <code>null</code> if it could not be found. | public twmPanProd findOne(Long id) throws DataAccessException; | 0 |
7b7d98bfcd74c3955cdca1ff2a1b10f7 | 4538d8eafc6ab5b8dbfe1c7313a49904 | Private constructor for Singleton pattern | class Singleton
Singleton()
{
} | 0 |
5b6d0e2b396a45171d043cb928ed6c8c | 53bf798eaf069e5a2c7cdfaa9445caf9 | 显示下一个学生评语 | public class FrmStudent extends javax.swing.JFrame
private void btnNextActionPerformed(java.awt.event.ActionEvent evt) {
row++;
if(row>=data2.size()){
row=data2.size()-1;
JOptionPane.showMessageDialog(null,"已经是最后一条数据了","系统提示",JOptionPane.INFORMATION_MESSAGE);
}
s... | 1 |
d44bb407bf62fde4a49d8732cabfadf5 | 0fbe5fad9dddb985f40a727b63f14da1 | Evaluate the likelihood and prior
Returns the log posterior probability given parameters p. Evaluates
first the prior function and then the likelihood function. In the
event that the prior returns -inf, the function exits. | def generic_log_posterior(log_prior, log_likelihood, params, logpargs=(),
loglargs=()):
lp = log_prior(params, *logpargs)
if lp == -np.inf:
return -np.inf
return lp + log_likelihood(params, *loglargs) | 1 |
20a4bb9872edd54c3f107c48751d4585 | b2d9927c9de0e50259e9ae8e0910f3d7 | Est-ce que le nom du monstre est "" ?
Apparaît lorsqu'un URL d'un bestiaire ne mène pas vers un monstre, par exemple :
http://legacy.aonprd.com/bestiary/angel.html#angel | class MonstreFacile{
public function getNom(){
} | 0 |
2c4396c5a9fb2d37f46df102ff63785e | ffde8f3d2f7054499f83854566426611 | 添加标的状态记录 | int flag = 0;
BsUserStatusTrace newTrace = new BsUserStatusTrace();
newTrace.setCurrentStatus(info.getStatus());
newTrace.setOperateBy(info.getOperateBy());
newTrace.setAccountId(info.getId());
BsUserStatusTrace trace = statusTraceDaoService.findCurrentStatus(info.getId()... | 1 |
f02cfe7618d2b5575add6775dc9f1d50 | 4f307c493810c295633debd8d8fd7571 | 用户管理--修改实名认证状态 | try {
User u = userBiz.get(user.getId());
u.setRealnameAuthenticationStatus(authenticationFlag ? RealnameAuthenticationStatus.AUTHENTICATION_PASS
: RealnameAuthenticationStatus.AUTHENTICATION_FAILED);
SyncAccountReq syncAccountReq = new SyncAccountReq();
... | 1 |
b9a45893cb46d9b06768eccf3de0c42d | ed6107aa7239bf8c3acc4d7b5b043439 | 打中敌机检测 | function enemyTankGetShoted(){
for(var i = 0; i < tank.bullets.length; i++){
for(var j= 0; j < enemyTank.length;j++){
if(tank.bullets[i].checkShot(enemyTank[j].x,enemyTank[j].y,tank.tankWidth/2,p)){
score++;
enemyTank.splice(j,1);
}
}
}
} | 1 |
1e5a7442d37bf4939458a1d4f4b3fb8d | 22c166cad4b7db1081a6052f42796b58 | 判断输入是否为list,如果不是list则转换为list返回 | class SkySim(object):
def __changeToList(self, variable):
try:
len(variable)
except Exception as TypeError:
variable = [variable]
return variable | 1 |
0212a35b570c77d2d29775564b128e86 | 8b8998fc931bf5b6e8f4bdaaaf679a51 | test variational SVM classification workflow | {
std::cout << "classifying" << endl;
std::vector<sample_geometry> samples;
std::vector<string> labels;
generate_data(samples, labels);
typedef dlib::linear_kernel<sample_geometry> lin_kernel;
typedef dlib::svm_multiclass_linear_trainer <lin_kernel, string> svm_mc_trainer;
svm_mc_trainer trainer;
randomize_samp... | 1 |
e2a1036c46ca673ce9bc3fcd4f577edd | 05ef8034dbf640aa0ac24316c81c4e3b | プレイヤのコマを表示する. | namespace MyShogi.Model.Shogi.LocalServer
public partial class LocalGameServer
public string DisplayName(Color c)
{
return kifuManager.KifuHeader.GetPlayerName(c);
} | 0 |
35b18fa842571c8bb6c93946e8d3ec96 | 65ce0a8a9e0d5b7ff09933506e78182c | Convert each element in a row to an DbRef | foreach($matriz as $key => &$value){
if (is_array($value)){
if(\MongoDBRef::isRef($value)){
$objMongoId = new \MongoId($value['$id']['$id']);
$strCollections = json_decode($arguments['$ref']);
$value = \MongoDBRef::create($strCollections, $objMongoId);
... | 1 |
391a2d08b3737090a3e8ef563fb4fc5f | 71b2fcfd86ba01a900541ac8f92b6c1c | Sets the value of a single element. For example,
setSingleElementValue(rootElement, "postMergeEvent", postMergeEvent) | {
if (value == null) value = string.Empty;
if (root.FirstChild == null)
{
root.AppendChild((root as XmlDocument).CreateElement("root"));
}
for (XmlNode node = root.FirstChild.FirstChild; node != null; node = node.NextSibling)
... | 1 |
8d0f7970a6936651b0c14c4cc3d5b981 | 65478667cdadd41097afc718e89b0c93 | 组员拥有多个共享电话 | $ci = &get_instance();
$ci->load->model("userhasgroup_model","usergroup");
$array = array("numtel"=>$numtel,"idgroup"=>3);
$q = $ci->usergroup->getWhere($array);
return count($q);
} | 0 |
9dcbbee93b34a6be8af81d63ad97762d | 0b6f794e96df5373cb58cfb84e46b3d0 | Subclass will create specific store parsers for different type if receipt format. | class BaseRepositoryClient
initParsers() {
this.parserRegistry = new ParserRegistry();
} | 0 |
904f643ce9a19e55aa4366d0768dc362 | cabafa9db2f10743ddc03acb77a68961 | 获取单个试题的信息,包含选项 | {
$return_data = array();
$item_obj = QuestionsItem::select('questions_item.*','unit_list.module_type')
->leftJoin('exam_paper', 'exam_paper.id', '=', 'questions_item.exam_paper_id')
->leftJoin('unit_list', 'unit_list.id', '=', 'exam_paper.unit_list_id')
->where('... | 1 |
e67f1892ba1769d8d2e325f7620e5ae3 | 9ff0643672c568f0dfef2f602fa0a720 | 跳转到上一页或下一页 | class WebBasePage:
def forward_or_back(self, if_forward: bool):
if if_forward:
self._driver.forward()
self._log.info('前进至下一页')
else:
self._driver.back()
self._log.info('返回上一页') | 1 |
24e53b68dfb484b9f6a32c7e08eeac90 | f8cac67025abb64a24203c4b20425cd0 | Simple function to find the central (or most-central with left/down
offset) position in a grid | x = (a.shape[0] // 2 if a.shape[0] % 2 else a.shape[0] // 2 - 1,
a.shape[0] // 2 + 1)
y = (a.shape[1] // 2 if a.shape[1] % 2 else a.shape[1] // 2 - 1,
a.shape[1] // 2 + 1)
center = a[x[0]:x[1], y[0]:y[1]]
argmax = numpy.unravel_index(center.argmax(), center.shape)
return argmax[0] ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.