query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
bcb98966b4f28556edafdb3bbcd6ba8e | afea4661a066d60187284ce8d885d346 | 判断H是否已满 | bool IsStudentFull(StudentClass H) {
return (H->StudentNum == H->Capacity);
} | 1 |
8dcb256c9e86bd8bb048ecd5a7d832ce | a4e10fb5e5124e087ed8c8c02d7b9e0f | 3 channel 8-bit unsigned packed Lab to 3 channel 8-bit unsigned packed BGR color conversion. | {
float lms[3];
apply_matrix(rgb2lms, rgb, lms);
lms[0] = lms[0] > 0.f ? logf(lms[0]) : -1024.f;
lms[1] = lms[1] > 0.f ? logf(lms[1]) : -1024.f;
lms[2] = lms[2] > 0.f ? logf(lms[2]) : -1024.f;
apply_matrix(lms2lab, lms, lab);
} | 0 |
da0953c8c45bcea8dadad9eda95d7f69 | 413a9612ae6be1b5ca567d73f38e04d2 | Gets parameters from properties objects and builds parameters part of url. | public class Downloader public static class ComponentModel
private void generateUriParamsModel() {
uriParams.clear();
ObjectMapper mapper = new ObjectMapper();
Iterator<String> it = properties.keySet().iterator();
while (it.hasNext()) {
String paramName = it.next();
UriParam p = mapper.convertVa... | 1 |
2ccfb5420d5a980ac37fa2bbd95b3170 | 236856ec8dfa3308d393f02863f93b59 | Decode latent states. | def lfads_decode(params, lfads_hps, key, ib_mean, ib_logvar, ic_mean, ic_logvar,
xenc_t, keep_rate):
keys = random.split(key, 3)
ii0 = params['ii0']
ii0 = np.where(lfads_hps['do_tanh_latents'], np.tanh(ii0), ii0)
c0 = params['con']['h0']
ib = dists.diag_gaussian_sample(keys[0], ib_mean, ib_lo... | 1 |
3482570fc53355f5be8259f1969db5f7 | 653610e9630e1329b21827e0113940df | Get the MST graph created by runPrims(). | public class LazyPrimMST<Weight extends Number & Comparable>
public Vector<Edge<Weight>> getMst() {
return mst;
} | 1 |
89fdcead60642ad8aff16407fe17a721 | 4a9094abf642586188185dd917649c32 | Test token creation with token from undefined issuer. | {
$token = $this->validToken;
$user = $this->dataAPIInvalidCreds->getUser(
't.test',
$token
);
$this->assertEquals(
$user,
null,
'Token returned should match expected value'
);
} | 0 |
97e853a404f93d2b0b421df2366ff1d1 | cd1608a2cda0e6b08b68109d0267b089 | 获取月分红奖励 | $todayTime = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
$beginThismonth = mktime(0, 0, 0, date('m'), 1, date('Y'));
$week = mktime(0, 0, 0, date('m'), date('d') - date('w'), date('Y'));
$data = getbonusparam();
$member_table = M('member');
$bonus_table = M('bon... | 1 |
5dc757ef716b7a506a5638be89658fea | 2c10ecb30defd2f2c6e945c62a3ccd98 | on a non IEEE-754 platform, we make no assumptions about the representation or existence
of special floating-point numbers. | #if YYJSON_HAS_IEEE_754
return F64_RAW_NAN | ((u64)sign << 63);
#elif defined(NAN)
return f64_to_raw(sign ? (f64)-NAN : (f64)NAN);
#else
return f64_to_raw((sign ? -0.0 : 0.0) / 0.0);
#endif
} | 1 |
3407a621dc6966c9fb1620ef5ce04eb6 | a48c4e73b0b3784b7613c7df5ccad0b1 | initializes User with a username and password | class UserPasswordAuth
def initialize(username, password)
@username = username
@password = password
freeze
end | 1 |
608425069cde6cf615315823bc338869 | a2fd6cd3991a06e9c3abcd7a28dbedbc | Sets the initial properties for a new site when it is created. | {
$this->site = ( isset( $this->site ) ? clone $this->site : null );
} | 0 |
0c1f7cc1663dcfd7990512b6c824aa7a | a59f16f5eca66176626e32188657d254 | このbotの導入方法を表示します | function pushHowToUse(userId) {
return __awaiter(this, void 0, void 0, function* () {
const text = `Information
----------------
メニューから操作もできるようになりました。
期限切れステータスの取引詳細を照会することができるようになりました。`;
yield LINE.pushMessage(userId, text);
yield request.post({
simple: false,
url: '... | 0 |
6939cbe123151a7483a6ec9ccf2f1bdc | 4b8c49ce42d9cd54491e0ff886dc834f | Create an instance of {@link ActualizarEstudiantePorCodigo } | public class UsuariosDAOImpl extends GenericDAO<J34SiscomexUsuarios> implements UsuariosDAO
private J34SiscomexUsuarios newInstanceWithPrimaryKey(Integer usu_codigo)
{
J34SiscomexUsuarios j34SiscomexUsuarios = new J34SiscomexUsuarios();
j34SiscomexUsuarios.setUsu_codigo(usu_codigo);
return j... | 0 |
3c51b1b2c832adf1c56600bf49ea3c27 | c1895c360b05c0bc54038e556e0a5a56 | Sets the whole table specification. | class SlideGraphicsDetails(object):
def table(self, table):
self._table = table | 1 |
725726b31ab02198e243fa477e1d53e2 | 35bb049ca3e6ba2bc2400487a38d3ade | 取得当前的tid和page值 | tid_typ gettid(void)
{
return thrcurrent;
} | 0 |
2f1dc8cfb0aac58db33001ad5774513d | fe716b0fd69e53fe436cf13ffceea7b5 | Transform from position in surface coordinates to texture coordinates | {
Vector3f vec = Vector3f::Normalize(MultiplyPoint(worldToTexture, p) - Vector3f::zero);
Float theta = SphericalTheta(vec);
Float phi = SphericalPhi(vec);
return Point2f(theta * InvPi, phi * Inv2Pi);
} | 1 |
9f2e245d625c101a6ea43ec2cde45f58 | 1e5f487eb05a51c8dcbc226bda1b9d17 | Set the number of times the announce PDU should be re-transmitted | void RFSwitch::setRepeatTransmit(int nRepeatTransmit) {
this->nRepeatTransmit = nRepeatTransmit;
} | 1 |
d1639332032be579eadea4efc41ff8d3 | d5b1a5c8dc689deb1750f29a0b54d0ca | Consulta Registros inconsistencia en la Ufeg x IDCtrlFactUFEG | , int codigoEmpresaOrigen, int codigoLocalOrigen, int codigoTipoDocumentoOrigen, int codigoDocumentoOrigen
, String tipoOperacion){
boolean blnRes=true;
try{
if(con!=null){
System.out.println("tipoOperaci... | 0 |
455822c693743c2ed83d1fcb34ca14ac | 7bbee412ce03e2ec685f96b56af686a4 | 次の日の18時にスケジュール
18時はカレンダー表示されないので、☓がないことを確認 | date_element = habit_element.all('.date-row th')
achieved_status_element = habit_element.all('.achieved-status-row th')
display_days_m1 = 6
(display_days_m1..0).each do |i|
expect(date_element).to have_content(Date.today - i)
if (@habit.achieved_or_not_binary >> i) & 1 == 1
expect... | 0 |
be247a4f63997807b00a90a0a3d77ae9 | c89730de738bceeafd057957a32a35d6 | Given a key (var_key) to the derived_vars_dict dict, compute and return
whatever is described in derived_vars_dict[var_key] for the nc_file | fh = Dataset(fname, mode='r')
var_netcdf = fh.variables[varname][:]
fh.close()
return var_netcdf | 0 |
a764b407b1dc2804fb8f0c50d39ac6ed | 51523dc4e1fdeaa381d4c44012cbd60c | The map that records all the Switch ops for the while loop. | class EntCoreStateMach:
def GetOpMap(self):
return { 'init': self.Init,
'start': self.Start,
'stop': self.Stop,
'kill': self.Kill,
'clear': self.Clear,
'clear_dns': self.Clea... | 1 |
825b8df3e1a8f9fee13de3ffe8c01acb | 906118fe7d5622f0932c1072b3900802 | 拆开会议 | public class MainActivity extends BaseActivity implements View.OnClickListener
private void jump2Meet() {
unregisterEventBus();
if (board != null) board = null;
unreceiverUpdate();
Intent intent = new Intent(MainActivity.this, MeetingActivity.class);
startActivity(intent);
... | 0 |
3e7cbfbe52b1e52c9aab6169f0f4d29e | 834e1645d670b738228f7cb1cfeffc91 | [ajax] 메인 상단 최신글 불러오기 | class News extends CI_Controller{
public function news_latest(){
$result = $this->Wrk_news->query_news_latest();
return $result;
} | 1 |
5e50de288c7701558cddf44e11326b62 | 4f1280187cd1c4136dd39ac28487c438 | Метод получения списка учебных корпусов | namespace Cabinet.APIIntegration
public class APIFunctionList
private void SchoolsInit()
{
schoolsInitialized = true;
try
{
HttpWebRequest req;
string list = null;
schools.Clear();
req = CreateWebRequest(Open... | 1 |
97f9f50e0fe0106b7f167b1228bfb33b | 5cf230dbecab76e12aefe8621935d2df | shortcode two_third | function three_first( $atts, $content = null ) { return '<div class="row"><div class="col-lg-4 col-md-4 col-sm-4"><p>'. do_shortcode( $content ) . '</p></div>'; } | 0 |
4828265b6bbeaeb1db8360ecc786cbd0 | 2eb0df35af7a711bd9f8a09c7b5935fa | Retrieve Website ID scope | class Innoexts_ShippingTablerate_Adminhtml_TablerateController extends Mage_Adminhtml_Controller_Action
protected function _getWebsiteId()
{
return $this->__getHelper()->getWebsiteId();
} | 1 |
c00ab28df0140a622c7e0e5f38552a12 | 60fe0ce01072c8bb3e123fe2eb8ae92a | 监控用户列表 | $thead=['用户id','用户名','渠道','ip','设备号','注册时间','手机','权限','账号状态'];
$this->getView()->assign('thead', $thead);
$param['uid'] = isset($this->_getData['uid']) ? $this->_getData['uid']:'';
$param['uname'] = isset($this->_getData['uname']) ? $this->_getData['uname']:'';
$param['cellphone'... | 1 |
a13cdb0c85017618778782e743dd21f5 | 9d82c0453134a8369ebe3bf62aca4b90 | Compute the fastest path between 'source' and 'destination' | class ShortestPathRouteBuilder(RouteBuilder):
def build(self, source, target):
return self.shortestPath(self.graph, source, target) | 1 |
8d345e5222ef55a091e7cdd6a9c4f60a | 08943cb643e8fe35464508917b2fd59f | Convierte una temperatura en grados Fahrenheit a Celsius | public class Temperatura
public static double aCelsius(double fahrenheit) {
return (fahrenheit-32)/1.8;
} | 1 |
56adde4cd8d4ed44a5268cc1eb0afab0 | a5ffb90fc4c0b11ddcc0517cf2ed63c7 | Create cells in this cell structure and map points into the correct cell | class Actor(vtk.vtkActor, Prop):
def mapPointsToCells(self):
p2c = vtk.vtkPointDataToCellData()
p2c.SetInputData(self.polydata(False))
p2c.Update()
self.mapper.SetScalarModeToUseCellData()
return self.updateMesh(p2c.GetOutput()) | 1 |
0f5fc71f52717f0cd96b7b39af58d248 | 1042aefe1e6bb7f8d7afca71dbcb800e | hide cue and show sketchpad canvas | clearTimeout(touchTimeout);
touchTimeout = null;
drawingCanvas[0].sponge.style.visibility = 'hidden';
drawingCanvas[1].sponge.style.visibility = 'hidden';
drawingCanvas[1].container.style.opacity = 1;
drawingCanvas[1].container.style.visibility = 'visible';
mode = 1;
} | 1 |
540084b6f7f02d1af939ee92af45c24b | 11ad8d95ec1d7eb39e1f58641affc531 | GET /messages/get_sent | class StudentViewController extends Controller
public function getSentMessages(Request $request)
{
$sentMessages = $request->user->sentMessages()->with('teacherReceiver')->latest()->paginate(5);
return json_encode(Message::getCompleteMessages($sentMessages));
} | 1 |
764d6bb832392e1cf2d1f8c91796cb0a | ec48eca0ad07a4502a4fe64ee73205e6 | Prints an error message to the console, in red text to make it stand out. | {
Console.BackgroundColor = ConsoleColor.Red;
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine(message);
Console.ResetColor();
} | 1 |
827b628bd25244c9e09e58c926322db9 | 17de93dae9e93d4ca98c6b2abb19296a | ***********************************************************************
Меню отключить выделение линий
*********************************************************************** | class gidro_graf:
#инициализация компонентов и локали
def def_disselected_vseh_uzlov(self):
self.forma_list_selected.table_selected_uzlov.clear()
self.point_layer.removeSelection()
self.forma_list_selected.btn_disselected_uzla.setEnabled(False)
self.forma_list_... | 0 |
5e4bc41c773c08b932f92fadd38a4e43 | 19fe833a560d252252812ae791a61d4e | Returns true if SiteResponse instances are equal | class Site
def eql? other
return false unless other.is_a? Silkweave::Site
@root == other.root and
@template_dir == other.template_dir and
@pagetype_dir == other.pagetype_dir and
@type_map_file == other.type_map_file
end | 0 |
5baede902f54cad6c80ad977b0c1f427 | 00ae91b54c4c246ecf71f93e874b1c79 | Automatically hide the setting for the submission plugin. | class assign_submission_comments extends assign_submission_plugin
public function is_configurable() {
return false;
} | 1 |
52357bec78a33d0283908898df0fe9e8 | 26cee2cc0b321ec3b037f1fb585f9d98 | Tests that The IV Size is 16 | {
std::stringstream *stream =
new std::stringstream(std::string(reinterpret_cast<char*>(plaintext), sizeof(plaintext)));
uint8_t buff[sizeof(iv) + sizeof(ciphertext)];
CryptoFile cfile(stream, key);
cfile.setIv(iv);
cfile.read(buff, sizeof(buff));
for(uint i = 0; i < sizeof(iv); i++)... | 0 |
71e70a045a9410583e2b234d0ada3385 | e37d84a3e6cd8368aae3e7ef9d58bb1a | Getter method for neId, mapped from YANG variable /perfdata/neId (string)
YANG Description: the Network Element ID | public class PlatformRef extends MsgRef{
public String getNELabel() {
return neLabel;
} | 0 |
052af787bb4fd525713f46c4ab0768ae | c04c131d1719bdfc9c2916c4be18cb15 | Deletes all tracked visits of a specific object type. | class MutableSubscriptionSet
removeByObjectType(objectType) {} | 1 |
8b3d0bd5df0a9a14b22d65b2668dd17b | 316e59fe1160e5b335913e53e8f78b41 | 根据regionName去community查询sectId | public String getSectIdByRegionName(String regionName); | 1 |
7b78acdfac6bd84d3cf4682b0b0943f1 | c97b641d1a5ae5b9462e7f71d9a3e0d1 | NewPostgresDB - creates new PostgresDB instance | const format = "user=%s password=%s dbname=%s host=%s port=%s sslmode=disable options='-c search_path=public'"
db, err := sql.Open("postgres", fmt.Sprintf(format, user, password, database, host, port))
if err != nil {
return nil, err
}
return &DB{db}, nil
} | 1 |
038971635ebdf1a0f68cc04e77297d43 | f14259ac1387ffb16b1e1911d6f069e4 | Saves the current location to the response cookies | def store_location
session[:return_to] = if request.get?
request.url
else
request.referer
end
end | 0 |
e8fd3f876892f7f244c785e662415031 | 4a626eeb6045f8b1d9464e78a40992b7 | set the current field number | $this->current_field = -1;
if ( $this->field_count > 0 ) {
$this->field = $this->group->fields[0];
}
} | 1 |
0ef9e812e8e0a3412f62cf3a74532fa9 | 33878ce43d6982511d3247567bf84298 | Normalize non-wildcard IPv6 addresses | public class Inet
public static Text ipv6_norm(Text t) {
Inet6Address ip6 = null;
try {
ip6 = (Inet6Address)Inet6Address.getByName(t.toString());
} catch (UnknownHostException e) {
e.printStackTrace();
}
return new Text(ip6.getAddress());
} | 1 |
a07c5e3ce0333bf6c8fab70a06277aef | 73aafb17f2136e9101d63c40e7afc01f | *PhyloP* score with default parameters. | Scorer.__init__(self, argument_string)
if not 'n' in list(self._arguments.keys()):
self._arguments['n'] = 6
if not 'beta' in list(self._arguments.keys()):
self._arguments['beta'] = 1 | 1 |
4dc60e75f5ff99f5a54afb0b6fd14684 | 539a7a97b8f1358468d041db9be99df1 | Returns True if we should register the client socket who just connected
to this path.
Returns False if not (for e.g. PING, ECHO). | class Proxy(Entity):
def clientEnabled(self):
pass | 0 |
8997e5abf5ffa2a3fb94751db77ab13f | 8b87e18fbc4eb022340667abc6cae7bf | Use already opened hardware? | int uvc_already_open(uvc_context_t *ctx, struct libusb_device *usb_dev) {
uvc_device_handle_t *devh;
DL_FOREACH(ctx->open_devices, devh) {
if (usb_dev == devh->dev->usb_dev)
return 1;
}
return 0;
} | 1 |
f93917ef67c05fd127ef41172563e568 | fd7d115650ecd88ece75f2f45855806f | An additive hash. | this._h1 = in_seed;
this._h2 = in_seed;
this._h3 = in_seed;
this._h4 = in_seed;
this.length = 0;
this.finalized = false;
this.hashBuffer = new HashBuffer();
} | 0 |
eada358f2b9f0d6371e7b46de1c168c4 | 7f61448ad6da3ef0f9cb03f40c5be655 | Check what's inside | cases like (1) | 0 |
4022429f75686b49f22581baf6f9cd3a | fb0e8c60d46c49703311581619e8fab7 | Metoda sloužící jako setter volného místa ve vozíku. | public class Car
public void setPosition(String position) {
this.position = position;
} | 0 |
c07528a1241e375cfb90ffeabc409708 | 81542c68f091f9795ef98dfb9aa63946 | double类型格式化,四舍五入,取两位小数 | public class Util
public static double formatDouble(double value) {
BigDecimal bigDecimal=new BigDecimal(value);
return bigDecimal.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
} | 1 |
1ae6fbc35b5475e663f6c6d32fbe2353 | 5b4f9f1c6f5b91c4f34eee7aeb857fad | This function enables the insertion of ST352 in C stream of the SDI TX Ss core. | {
u32 Data;
InstancePtr->IsStreamUp = FALSE;
Data = XV_SdiTx_ReadReg(InstancePtr->Config.BaseAddress,
(XV_SDITX_RST_CTRL_OFFSET));
Data &= ~XV_SDITX_RST_CTRL_SDITX_SS_EN_MASK;
XV_SdiTx_WriteReg((InstancePtr)->Config.BaseAddress,
(XV_SDITX_RST_CTRL_OFFSET),
(Data));
return XST_SUCCESS;
} | 0 |
4fe1c99f4c10731f4a64641a96c03b72 | e320a2391e2fff65145e189d20dd4b18 | 批量保存屏蔽词 | if($_POST['id']){
$data['word'] = str_replace(' ','',$_POST['word']);
D('SensitiveWords')->update_multi_items('id='.$_GET['id'],$data);
}
echo 1;
} | 0 |
e1eeb47e7612e540e2777c4e12e256c2 | ee5f4cb72348c73ff19e56443b31a2d4 | Begins execution of the coroutine | {
m_Coroutine = Play_Coroutine<System.Object>( tStartLine, tEndLine, tCodeTime, tIsAbsoluteTime, null, null, null ) ;
StartCoroutine( m_Coroutine ) ;
} | 1 |
9a5c88a2e77a843267594189d511384f | 36eb68dde8e2ccd12aeb9d3a947b4db0 | Формирует фильтр для режима acc_balance | class Utils
public static function getPaymentHistoryFilter(): array {
if (strlen($_REQUEST['CANCEL']) > 0) {
\LocalRedirect($GLOBALS['APPLICATION']->GetCurPageParam("", array(
'UF_DATE_CREATE',
'UF_ORDER_ID',
'UF_CREATER',
... | 0 |
f646435fb8f50a47bf479de290fbe0d9 | dd6effd2f89892a08c3c587e48e5330c | 设置ok按钮回调 | public class Mdialog extends Dialog
public void setOKOnClickListener(View.OnClickListener listener){
okBtn.setOnClickListener(listener);
} | 1 |
47f6435cec5c3c1e9b7b2fbe10284176 | 24909f057e1f81fd1d019934a0a12fcd | don't need resampe operation on the ModelNet40 dataset | class QSARDataset(DGLDataset):
def download(self):
print("Downloading: No need to download - local files only")
pass | 0 |
d94104147969400e0461fa156ee9fea2 | deea9b3934177a4853f17951bf4bfbf1 | # find all the movies already watched and rated by the selected user | user <- ifelse(is.character(user), user, as.character(user))
user_read <- row.names(item_similarities)[ratings_wide_read[user,] == TRUE]
user_scores <- tibble(title = row.names(item_similarities),
score = apply(item_similarities[,user_read], 1, sum),
read = ratings_... | 0 |
094530adac19527a0df2060d59d92921 | 8b038aefd8237afe920171b9160b6f80 | 打开选择会议提前提醒视图 | export default class InviteInfoItem extends Core.ComponentLogic
public remindUpBtnCallback() {
Core.viewManager.openView(R.ShareView, ShareType.REMIND);
} | 1 |
06eb04c2a5de7953bc4720006961af3a | 86273e00192adf12773ef58dd71bcfee | GENERAR CÓDIGO DE BARRA | int codigoControl = calculadorCodigoControl(num);
String codigoBarras = num + codigoControl;
return codigoBarras;
} | 1 |
e18c8e9b845f0e0cd70cd0a2df4bebd8 | e2a5b1804a2682219321ee06b6d5f470 | Click on Cars | public class PageFactoryCars
public void clickCarsTab() {
carsTab.click();
} | 1 |
f5a5bdda24736c7282b1992b5e777cc8 | 307a3ea18a72703ad0f4a1ba6d2119f1 | マルチスレッド下で動作することを確認する。 | {
Task.Run((() =>
{
Console.WriteLine($"{Thread.CurrentThread.ManagedThreadId} task run");
for (int i = 0; i < 100; i++)
{
Task.Run((() =>
{
Thread.Sleep(100);
Console.WriteLine($"{Thread.CurrentThread.ManagedThreadId} sub task run");
... | 1 |
714819bf740b254e7f50ea2da55af1d1 | 22f5e0ecaf283a355904448ee786474f | Make an ajax call to the server in order to disable the setting
from the database. | class PlgSystemStats extends JPlugin
public function onAjaxSendNever()
{
if (!$this->isAllowedUser() || !$this->isAjaxRequest())
{
throw new Exception(JText::_('JGLOBAL_AUTH_ACCESS_DENIED'), 403);
}
$this->params->set('mode', static::MODE_ALLOW_NEVER);
if (!$this->saveParams())
{
throw new RuntimeExc... | 1 |
bb759e66dd01e3f4255453893abf0d05 | 684517e9f9ac0aba962bb06509748e0f | The following will get a list of all kanban boards with the same name. The idea is that each kanban board should
have a unique name. | abstract class Kanban
abstract public function getBoards(); | 0 |
90ced832bbf79e870a43d6a6827caa37 | 27382a392a686571329fe5090f03e6ac | Return all the fields that should be dealt with as a time field | class GroupingCounter
public function isTimeField($field)
{
return in_array($field, array(
TicketSearch::TERM_USER_WAITING,
TicketSearch::TERM_TOTAL_USER_WAITING,
TicketSearch::TERM_DATE_CREATED,
));
} | 1 |
97bb3b7d8978c2efdee382a162553266 | dae40341eccd32ebc6440583b2802d40 | Copies the password value in the client's 'clipboard' | public class AjouterPasswordController implements Initializable
public void copyToclipBoard()
{
final Clipboard clipboard = Clipboard.getSystemClipboard();
final ClipboardContent content = new ClipboardContent();
content.putString(passwordFieldClear.getText());
clipboard.setContent(content)... | 1 |
47d5ca91860e107727ebdcfc0ae6eeba | 21a4462ec63f56eedb972c91bde5a218 | 将营业执照内容放入数据库 | System.out.println("mapCreditAdministrativeLicensing:---------------------");
System.out.println(mapCreditAdministrativeLicensing);
System.out.println("mapCreditAdministrativeLicensing:---------------------");
cALic.setFkLicenseUid(fkLicenseUid);
cALic.setDocNo(mapCreditAdminist... | 1 |
425d7859e616ed4ab5d2146a8c66b08e | c4d9d1dd740979a1bc365712ff97683f | Sets an explicit exchange handler to be used for all future connections.
Useful for testing scenarios where non-standard or specific server
behavior is required, either direct control over the frames sent, "bad"
behavior, or something else. | default ThriftEndpointBuilder exchangeProtocol(String exchangeProtocol) {
doSetProperty("exchangeProtocol", exchangeProtocol);
return this;
} | 0 |
bd24a4972c56562c3d0730ba606466b2 | 3300793c130406df100a7b3035c4aab4 | Get the creation date of the elastic pool (ISO8601 format). | @JsonFlatten
public class BigDataPoolResourceInfoInner extends Resource
public BigDataPoolResourceInfoInner withCreationDate(DateTime creationDate) {
this.creationDate = creationDate;
return this;
} | 0 |
6150d0acdddfc6c0de3d6ccd541ff0c9 | 14ba22f8197d8a1f71d67e9e10ae1cdf | 得到前一年某月的第一天 | Calendar cal = Calendar.getInstance();
cal.add(Calendar.YEAR, -1);
cal.set(Calendar.MONTH, month - 1);
cal.set(Calendar.DAY_OF_MONTH, cal.getMinimum(Calendar.DATE));
SimpleDateFormat sdf = new SimpleDateFormat(DATE_SHORT);
String firstDayOfMonth = sdf.format(cal.getTime()... | 1 |
9874174ac08b118d3084bec95f04f6f3 | 8e58de820d86a25be0223286d07e81bd | Delete our test artifact(s) | void
testutil_clean_test_artifacts(const char *dir)
{
int status;
char buf[512];
testutil_check(__wt_snprintf(buf, sizeof(buf),
"rm -rf ../%s.SAVE; "
"rm -rf ../%s.CHECK; "
"rm -rf ../%s.DEBUG; "
"rm -rf ../%s.BACKUP; ",
dir, dir, dir, dir));
if ((status = system(buf)) < 0)... | 1 |
74da9f729313e62612cbf55ad4b37e7d | ffc55d2a34db104578659c07c3c88998 | 关闭好友红包提示 | closeRedPackwin() {
let that = this;
this.setData({
redPackShow: false,
inviteTip: true
}, function () {
setTimeout(() => {
that.setData({
inviteTip: false
})
}, 1000);
})
} | 1 |
1377e6909ff64a90fd5ed7be5b76417d | ade40d5ae77b89e55a70aa4d51f23e04 | Получение списка сущностей запроса для указанного составного поля. | class NamiQuerySet
protected function getFieldQueryEntities($complex_field) {
$core = NamiCore::getInstance();
$entities = array();
$seen_models = array(
array(
'model' => $this->model,
'alias' => $core->mapper->getModelAlias($this->model),
... | 1 |
31fd8c14728bc7d688faa65ee35b6e94 | 2b442e4c64d6813bf81e4414aa2c93c3 | shifts the clock and city description back and forth | class App extends React.Component
spinClockwise() {
let currentImgIndex = this.state.imgIndex;
if (currentImgIndex === 0) {
this.setState({
globeMsg: this.state.metadata.length !== 0 ? <span>{globeMsgBeforeLocationInfo}.</span> : <span></span>,
imgIndex: this.... | 1 |
867f2f68f305dc7ac0ecdbc34725e18a | 1d7669450972270ea5b697899578028e | ! Test precession/nutation calculations from Sofa, using Sofa Earth orientation cookbook results. | double omega = Constants.omega_e;
Matrix C = trueOfDate(t.mjd_tt());
Matrix Rg = GHAMatrix(t.mjd_ut1(), t.mjd_tt());
Matrix B;
if(debug_geons)
computePole(t);
if(debug_polar){
B = new Matrix(3);
}else{
B = PoleMatrix();
}
Matri... | 1 |
fa869beee2ad145d0ccbaa8fb98bd7e1 | 5835f791d41d7e04d0e96d62bbcee3b1 | Tests the thumbnails processor run when nothing has to be downloaded. | files = self.processor.download()
title, name, imgtime = self.processor.parse_name(files[0])
tif_file = self.processor.convert(files[0], imgtime, name)
self.assertTrue(os.path.exists(os.path.join(
self.processor.tmp_dir, tif_file))) | 0 |
e1a4e7be255e7329f75c301c4526badb | f880c55dc65fe332b232b7502130284e | Test case for getXapiCredential
Retrieves the xAPI credential specified by id `xapiCredentialId`. | class XapiApi(object):
def delete_xapi_credential_with_http_info(self, xapi_credential_id, **kwargs):
all_params = ['xapi_credential_id']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_reque... | 0 |
87a4219372eb39e15caf90e045650535 | 3c41c66b8ed4984c536488e41035b3bd | Correct the end of month.
If change is from a day that don't exist in target month (29 - 31)
the target day will be the last in the target month | while month > 12:
year += 1
month -= 12
while month < 1:
year -= 1
month += 12
try:
date = datetime.date(year=year, month=month, day=day)
except ValueError as e:
if e.message != 'day is out of range for month':
raise e
month += 1
... | 1 |
03fe8616ac486e5535fc33f0396f79a7 | 0154277b55c9fad6da21f2688de56249 | https://stackoverflow.com/a/365068 | def zip(*iterables):
sentinel = object()
iterators = [iter(it) for it in iterables]
while iterators:
result = []
for it in iterators:
elem = next(it, sentinel)
if elem is sentinel:
return
result.append(elem)
yield tuple(result) | 1 |
e4f11abc8b077f4c3191897b1ef61831 | 4eb213db583696e29f711765d72c0a3f | 州リストイベントハンドラ登録 ---------------------------------------------- | function set_dstEvntHcls(){
var xhr = new XMLHttpRequest();
xhr.open("POST", "/syCommonsel/lstEvntHcls", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send();
xhr.onload = function () {
if (xhr.status === 200) {
var resText = xhr.responseText;
dstEvntHcls = JSON.parse... | 0 |
b41c1c5a1f905624bfcaf6d15ae737f9 | 39260a99dfb031d9b602efd93b9976a4 | Returns the parameter indices for the provided term index. | public class HashingTF implements scala.Serializable
public int indexOf (Object term) { throw new RuntimeException(); } | 0 |
20849f91d2c816fbdcf62bb6fcc8c6bb | 48b56486dac81321f044c923221f2ba9 | Update all records in dataset. | {
foreach ($this->reader as $item) {
if (!isset($item[$this->primaryName])) {
throw new RuntimeException(
"Can't find primary key {$this->primaryName} in dataset: "
. json_encode($item, JSON_UNESCAPED_UNICODE)
);
... | 1 |
49aeb4e3618b79e3c273a8f34c862275 | ea1363984b3b656b2b0e61a0e3c4de9e | 当选择的工程师有号码,显示可以发短信 | export default class LoginAlert extends Component
getSms(i) {
if (!this.getSmsCode(i)) {
return;
}
} | 0 |
675ce6f6cd2c67e9f3820ebce086ee2c | 26485df0b1374c821a57250843ea891b | Returns the meta object for class '{@link ecarules.ParamValue <em>Param Value</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getAnnotationParamValueExpression(); | 0 |
dc3ab776598f6f5bcfc4c7d92321fd6b | 34e85d3b74fcbe98b2460de05264cd44 | Return sources needing an update, based on the update_freq/last_update attributes.
updateable can be True/False/None to return Updateable/Not-updateable/Both. | class MasterSource
def update(show_output)
if requires_update?
super
else
[]
end
end | 0 |
02fbbd6dcd70519008b0f179a244522f | f1183ef2c7cdf4479fdb00300e92f551 | Load configuration from Database | void loadFromDB(Context context); | 1 |
c0e7f0595ba3425b568c577f5b21b735 | a4d2cdfb1d9ec0ac9e64c02f9d28da70 | Decreases the break time by 1 minute and returns new time | class TimersController
def extend_break
start_break
render :text => get_current_time.to_json
end | 0 |
73cc45db09acf5e06f2c1969c275be0e | 119e0e8d57370eda9529cb9e4195160a | 取Q龄,成功返回Q龄,失败返回-1 | namespace MyPCQQPlugin
public static partial class MyPCQQApi
private static class NativeMethods
[DllImport("message.dll", EntryPoint = "Api_GetLdw", CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.LPStr)]
public static extern string GetLdw([MarshalAs(... | 0 |
1d8594ac407a2b641802546fee4dee3e | 2aed7c2cc21223830c3b431293a429e5 | Save the new settings to the options table and then update the db to add
new tables and rebuild the triggers | if (isset($_POST["cms_tpv_action"]) && $_POST["cms_tpv_action"] == "save_settings" && check_admin_referer('update-options')) {
$options = array();
$options["dashboard"] = isset( $_POST["post-type-dashboard"] ) ? (array) $_POST["post-type-dashboard"] : array();
$options["menu"] = isset( $_POST["post-type-menu"] )... | 0 |
78165bd3ca8bccde93fdba110ca441e8 | c2dfd647f25ce5981d488c97ecf1137e | Tests if the line is one edit away. | {
bool isValid = true;
if (inputLine[1] == inputLine[2])
{
return false;
}
int count1 = 0;
do
{
count1 = count1 + 1;
if (inputLine[count1] == null)
{
... | 0 |
7ff64fdf81002412114656cd6d61adea | 497be103bee198f924a329c30cd3962e | To be written in Q2(e) | public class ControlFlowChallengePS
static void Q4(int n) {
} | 0 |
e102a5671a74a9502263cbd39f3aa398 | eb46a5544e3aca766d8f43860c693a57 | Function to generate the packet in hex dump | {
int c;
uint32_t d;
time_t pkttime;
struct tm *pkttm;
char tmbuf[64], pcktimestr[512];
pkttime = tv_sec;
pkttm = localtime(&pkttime);
strftime(tmbuf, sizeof tmbuf, "%d.%m.%Y\ntime.......: %H:%M:%S", pkttm);
snprintf(pcktimestr, sizeof(pcktimestr), "%s.%06lu", tmbuf, (long int)ts_usec);
fprintf(fhhexmode, "packet.....:... | 1 |
04942a06cb8b6639282065bdd424830c | 0eb85276738eed0a7fe9b6c15e538524 | Abort to home. | pkt = _packets.ThorLabsPacket(
message_id=_cmds.ThorLabsCommands.MOT_MOVE_HOME,
param1=self._idx_chan,
param2=0x00,
dest=self._apt.destination,
source=0x01,
data=None
)
_ = self._apt.query... | 0 |
f2ae9cb6df7af4f9c53b80dde6610e62 | e5fb98320514dc8d15636ff29fc287dd | 初始化促销类型分页栏 | function InitPageDate(data){
$("#qhspPager").myPagination({
currPage:Number(data.page),
pageCount:Number(data.records),
pageNumber:7,
cssStyle:'scott',
ajax:{
onClick:function(page){
InitData(page);
}
}
});
} | 1 |
11f9d8597baa82a7b11e8217d0900d80 | 4863493bb114ed017379e6010f8aebc8 | A SetField can be saved and restored. | m1 = TestSetModel.create(int_set={1, 2, 3, 4})
m1.int_set.add(5)
m1.int_set.remove(1)
assert m1.int_set == {2, 3, 4, 5}
m1.save()
m2 = TestSetModel.get(partition=m1.partition)
assert m2.int_set == {2, 3, 4, 5} | 1 |
5838885c59eaeaf025d4262b8b7517b5 | f086c422ae831ae3ab2b9dc20de587ba | Unsets the encryption seed upon form reset. | this.formData.recipientPubKey = '';
this.showAlias = false;
this.formData.recipient = '';
this.formData.encryptMessage = false;
} | 0 |
9e84fd75a9b554f0bb71a8d88601edc0 | 4a4a68c6c38727792e71b7d94c49f466 | Specifies whether Pepperoni is desired | public class UserInfoBean implements Serializable
public boolean isPizzaSelected() {
return isFoodTypeSelected("z");
} | 0 |
788ef1e745efa7b04c1e6b658cda641f | 390058823658fc22d844645b1826a2c2 | 遍历树节点,使用回调函数cb进行处理.counts限定节点计数. | class TreeClass extends XlClassBase{
public function each(&$treenode,callable $callback=null){
if($treenode['data']){
if($callback){
$rt=$callback($treenode['data']);
if($rt==="__break"){
return $rt;
}
}
}
... | 0 |
5185eb19b92f8283bbe532459e748bbc | 8e639211fffd3f22273d1c105940b460 | 获得指定类的单例对象<br>
对象存在于池中返回,否则创建,每次调用此方法获得的对象为同一个对象<br> | public class SingleFactory
public final <T> T getOrNew(Class<T> clz){
return getOrNew(clz, (Object[]) null);
} | 1 |
761be69aa8dd469d5d5871ac575c84d3 | 10e4116d28356458d989f5c403987326 | Returns {@link ProtocolVersion protocol version} to be used per default. | public short defaultVersion() {
return defaultVersion;
} | 1 |
52d28d5c2bca39bc7bffbc87389f3fa1 | 8f4f16f65ee08eb11a74b6ac7977de2c | Tests that the module list is retained after enabling/installing/disabling. | runner = CliRunner()
context = Context(base_path=SIMPLE)
with mod_file(context.config_path):
config = context.config
runner.invoke(disable, ["tool", "eslint"], obj=context)
assert config["tools"]["eslint"]["run"] is False
runner.invoke(enable, ["tool", "eslint"], obj=context)... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.