query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
cc0d98289c31529c56fc0a03b6e84c6e | 475e23786951323682c4104a1636afac | 使用BufferedImage获取图片尺寸
源图片路径 | public class ImageUtils
public static int[] getImageSize(String filePath) {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeFile(filePath, options);
int height = options.outHeight;
int width = options.outWidth;
... | 0 |
4e1cff74ec1d3c69391d1307ca3727f1 | e38b7b9a4ef4b63ed229ee94eaf984d5 | 检测:平仓量<=持仓量 | class OKExBinanceTRXETHTrader(OKExBinanceTrader):
def depth_amount_check(self, amount):
if amount < self.trade_amount_threshold:
return False
if amount > 20000:
return False
return True | 0 |
360b88ee87e259b852e4fa9b28709ea0 | 10e2e676d814c12b1fce79c8858bc510 | removes last NChord in the voiceNumth voice | void Lesson::undoNchord(Part* aPart, int voiceNum){
int numNChords = aPart->getVoice(voiceNum)->getNumNChords();
if( (current_end_time - aPart->getVoice(voiceNum)->getNChordAt(numNChords-1)->getDuration()) <
(current_measure_end_time - measure_length) ){
current_measure_end_time-=measure_length;
}
current_en... | 1 |
276b0338d9d82692d87f1d642570e352 | 0cc039122910f8151c26fb734b876537 | The color for the border of active "primary" buttons | @ColorInt int activeFill(Context context); | 0 |
03ba5368aaf6afee7c1ba7fa1c71e6ae | d1f77a12e77f5f06cfb26722f7e1d470 | 计算涨停价格 | def calup(price):
up=(price*0.1)+price
return up | 1 |
729de7032f6239264859cb4259ebdcdd | f69f2c9c73dff3fea0218ad4c6751e35 | Get array of MX records for host. Sort by weight information. | mx_list = self.dns_analysis(domain)
mx_dic = {}
mx = []
if mx_list:
for item in mx_list:
loginfo(item)
mx_dic[item['data'][1]] = item['data'][0]
m = mx_dic.items()
m.sort(key = lambda x: x[1])
for item in m:
... | 1 |
47794247e9b2469bb10b2f3b9680eaf0 | 0b93cbd731d0eb706ca40f7934a1600d | 设置UI物体的锚点为自适应分辨率比例大小 | function ui:set_ui_anchor(x,y)
game_api.set_ui_comp_anchor(self.player.base(),self.base(),x,y)
end | 0 |
1d634fc2ddfc0240e1d4e741472325c7 | 2de7a28070ad60ad6abc1a208971d4d8 | ES - Edita el tamaño del pane1. | {
if (panel2.Width == 296)
{
button8.Visible = false;
panel2.Width = 57;
label4.Location = new Point(320, 1);
label1hora.Location = new Point(1100, 1);
label1.Visible = false;
mostrar_indice1.... | 0 |
8eb321a7345e451b3e88735eb7466ff3 | fe0b95686fbd5603d3ceb3ee7f8fc3a3 | @brief Initialize and blink the LEDs momentarily. To
be used at the start of the program. | {
IO_InitStructure ioLEDS;
ioLEDS.PORT = &PORTB;
ioLEDS.pin = IO_P2 | IO_P3 | IO_P4 | IO_P5;
ioLEDS.pinMode = IO_OUTPUT;
IO_config(&ioLEDS);
SPI_InitStructure spiLEDS;
spiLEDS.masterSlaveMode = SPI_MASTER;
spiLEDS.clockSelect = SPI_FOSC_DIV2_2;
spiLEDS.clockPolarity = SPI_RISING_EDGE... | 1 |
efd430ed63c4d0c2e89fd36419f69c33 | 3a9650fb1109380a2b4aaf257ce37370 | a bounding sphere centered at the origin. | BoundingSphereNode::BoundingSphereNode(void) {} | 0 |
ed51a99f8825ec325cf297b685df684a | 5b0ecaff318fd3f6752932d1bf51760f | Generate HeeksPython objects from dxf entities. | settings = QSettings()
oldProjValue = settings.value( "/Projections/defaultBehaviour", "prompt", type=str )
settings.setValue( "/Projections/defaultBehaviour", "useProject" )
self.dxflayer_points = QgsVectorLayer(u'{}|layername=entities|geometrytype=Point'.format(filename), 'Points', 'og... | 0 |
fc479f599902dbea2394504093130d2e | a0b0928123e91cf55e8f7fe0575f9f4f | Return number of elements in queue.
Return 0 if q is NULL or empty | {
if (NULL == q)
{
printf("The queue is NULl\n");
goto err0;
}
return q->count;
err0:
return -1;
} | 0 |
fefaf21883ae8e2e3e45c84c4921293d | 8d1af4252f617ed772fabbf4d31f2800 | 长文本的语音合成,包含简单分句模块。 | namespace Cloud.TTS.Api
public partial class SynthesizeApi : IV1Api
public async System.Threading.Tasks.Task<SynthesizeResponse> SynthesizeSessionlessAsync (SynthesizeSessionlessRequest body, string xRequestId = null)
{
ApiResponse<SynthesizeResponse> localVarResponse = await SynthesizeSessionl... | 0 |
4d5c74f58dbd76e61f85e3bd1bf19d0e | 723852232c8adefb378ac76efb1f0ec0 | The total interrupts include both this device's interrupts as well as
the VVU device related interrupt. | class NetPerfTuner:
def get_irqs(self):
return itertools.chain.from_iterable(self.__nic2irqs.values()) | 0 |
1764b1e6ceba89f7cf3d5dbc621fcb0b | 9daa9578216897d646f6662b2bd007cf | Registra a seleção feita na página no controle de sessão. | if (null == selectedPregunta) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "ERROR, no pudo ser eliminado el registro", ""));
} else {
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("selectedPregunta... | 1 |
487f9a5455acbf02ff394c8f92acf0b2 | d08ff040bc8c0a82accfac0c9e95728f | !
@brief
Gets the MIDI jack identifier.
None
Returns the identifier of the MIDI jack. | namespace drumstick
int
MidiPort::getPortId()
{
return m_Info.getPort();
} | 1 |
bbf55d6564c588d6ad8f53a6eb5eeca5 | cf626a4cc03c3719aac0c39a363a3dee | 一个恒为真的测试用例,用来测试 SpringBoot 能否正常启动. | @RunWith(SpringRunner.class)
@SpringBootTest
@TestPropertySource(
properties = {
"spring.datasource.driver-class-name=org.h2.Driver",
"spring.datasource.password=unset",
"spring.datasource.url=jdbc:h2:mem:bulk",
"spring.datasource.username=unset",
"spring.h2.console.enabled=true",
... | 1 |
c20f86445d0935975b4cdeb2fd7d2b05 | 2ebc85053e66dbd878bdb72ca1de160e | 用递归方法遍历文件夹 | class FindFile{
private function traversing($spath, $depth=1){
if($handle = opendir($spath)){
while(($file=readdir($handle))!==false){
if($file!='.' && $file!='..'){
$curfile = $spath.'/'.$file;
if(is_dir($curfile)){
if... | 1 |
8296eb8688a7d4db8343fa14186b5f9c | e31d7bb22b697091754acc0381e025db | Get the next credential from the cache file. | key = self.get_spool_cache_key(descriptor)
if key not in type(self).SERVICE_SPOOLS:
LOGGER.error(
'SpooledTempfileDriver failed to load_credentials: Spool "%s" does not exist?',
key
)
return None
spool = type(self).SERVICE_SPOOL... | 1 |
8e678ecd8e1e4505ac1ec072ae2b13de | 09504f391b855d7b32689dea7754aeab | turns a dotted field path into a valid field name | class Quotable
protected function dotFieldQuote(string $in): string
{
$out = $in;
$oq = $this->fieldOpenQuote;
$cq = $this->fieldCloseQuote;
$parts = explode('.', $in);
if ( isset($parts[0]) )
{
if ( $parts[0] !== strtolower($parts[0]) )
{
... | 1 |
9d3f824fe2989662e48e05a5f3e7487a | b7fee251ecd226c584d68bdd02fb04c4 | 匹配以指定名称开头的方法名, 配置了slaveMethodStartWith属性, 或使用默认 | @Component
@Slf4j
public class LogUtils
public static boolean verifyMethodName(String methodName) {
boolean methodNameFlag = false;
for (int i = 0; i < DEFAULT_RECORD_METHOD_START.length; i++) {
if (methodName.startsWith(DEFAULT_RECORD_METHOD_START[i])) {
methodNameFlag = tru... | 1 |
3bbcdbb91b29bfebf601e90f45de910d | 7f4c533ada57c102079035304bbdbfca | https://www.rfc-editor.org/rfc/rfc5104.html#section-4.2.2 | fn algo() -> impl Digest {
crypto::sha2::Sha512::new()
}
rfc6238_test(Duration::from_secs(59), algo(), "90693936")?;
rfc6238_test(Duration::from_secs(1_111_111_109), algo(), "25091201")?;
rfc6238_test(Duration::from_secs(1_111_111_111), algo(), "99943326")?;
r... | 0 |
4866181c2d6ca0be676131cb5bb422f2 | d9033003acbb32ef3ffea127033573cc | EUC-KRをISO-2022-KRに変換、もしくはその逆(ISO-2022-KRをEUC-KRに)を行う。 | class String
def kconv(out_code, in_code=Kconv::AUTO)
Kconv::kconv(self, out_code, in_code)
end | 1 |
853e6df88baf16e510cd102b02485d55 | e59719086fcc37171a967ea02f2018fa | Creates and returns a shader module. | {
PipelineCompiler* pCompiler = pDevice->GetCompiler(DefaultDeviceIndex);
return pCompiler->BuildShaderModule(pDevice,
flags,
m_codeSize,
m_pCode,
&m_ha... | 1 |
b057193964f59b974a6b0137a524e225 | 5606b1ed4b59d5554f066cb15f5c9346 | Extracts all pending data from the videoEncoder.
If endOfStream is not set, this returns when there is no more data to drain. If it
is set, we send EOS to the videoEncoder, and then iterate until we see EOS on the inputSurface.
Calling this with endOfStream set should be done once, right before stopping the muxer. | public class TextureMoiveEncoderAsync extends AbstractTextureMoiveEncoder implements Runnable
public void handleFrameAvailable(EncodeMediaSample sample) {
if (VERBOSE) {
}
mVideoEncoderImpl.drainEncoder(sample, false);
} | 0 |
6ee02fd384a0fa9e87026ed0afed13f9 | b77f5d4ba82eb89cb51b30c8c9bf5e4c | Increment positions of all others sortables. | private function incrementPositionsOnAllItems()
{
$this->listifyList()
->increment($this->positionColumn());
} | 1 |
f1649cf475480231c6a589eed5742377 | 5d7ac4c54d8d5547265b4ad9f2e34900 | The simplest possible Shape – one triangle. It has 3 vertices, each
containing two values: a 3D position and a color. | OGLDrawable.__init__( self , pnt )
self.vertices = tuple( pnt )
self.vertX = list( self.vertices )
self.indices = tuple( [ 0 ] )
self.size = size
self.colors = ( [ tuple( color ) ] ) | 0 |
ce901836fc828a91ff033f3e26599b3e | 0797f9d3798c732504d2f77c305d673e | 下面程序创建了4个线程安全的集合对象 | public class SingletonTest
private static void singletonLazyUnsafeInMultithread() {
Set<Singleton3> set = new HashSet<>();
int threadNum = 50;
for (int i = 0; i < threadNum; i++) {
new Thread() {
@Override
public void run() {
set.ad... | 0 |
2887496b145172a1fbc19ffa9a5f9978 | ac84bc79e943bb3a2a0c0a38030b8501 | 找出指定路徑底下所有的分享資料 | {
sharedata = new ShareData();
List<tb_share> shareList = sharedata.GetshareAll();
if (shareList != null)
return shareList;
else
return null;
} | 0 |
bcb98966b4f28556edafdb3bbcd6ba8e | 8d4841a858d0787d98f622e5dad833e7 | 判断H是否已满 | bool IsFull(MinHeap H)
{
if(H->Size==H->Capacity)
return true;
else
return false;
} | 1 |
8dcb256c9e86bd8bb048ecd5a7d832ce | c7ff64b22a35190faec9d01184f6f335 | 3 channel 8-bit unsigned packed Lab to 3 channel 8-bit unsigned packed BGR color conversion. | const std::vector<cv::Mat> src,
double**& lvec,
double**& avec,
double**& bvec)
{
for(int d = 0; d < m_depth; d++)
{
for(int j = 0; j < m_height; j++)
{
for(int i = 0; i < m_width; i++) {
int ind = j * m_width + i;
int r = src[d].at<cv::Vec3b>(j, i)[0];
int g = src[d].at<cv::Vec3b>(... | 0 |
da0953c8c45bcea8dadad9eda95d7f69 | 35cb9c5c691e97305cd574a55b601026 | Gets parameters from properties objects and builds parameters part of url. | namespace Kesco.Lib.Web.DBSelect.V4
public abstract class DBSelect : Select
private string GetURLParams(bool isKescoRun)
{
var sb = new StringBuilder();
var urlParams = new Dictionary<string, string>();
var type = Filter.GetType();
GetURLParamsFromProperties(u... | 1 |
2ccfb5420d5a980ac37fa2bbd95b3170 | 264b230cd623db00a46214db0cae962d | Decode latent states. | class DenseLatentLevel(object):
def decode(self, input, n_samples, generate=False):
batch_size = input.size()[0]
input = input.view(-1, input.size()[2])
decoded = self.decoder(input)
decoded = decoded.view(batch_size, n_samples, -1)
sample = self.latent.decode(decoded, n_samples,... | 1 |
3482570fc53355f5be8259f1969db5f7 | 74adfe6a6e83c4a40a16dc6ad4916f2f | Get the MST graph created by runPrims(). | public class PrimMST<Weight extends Number & Comparable>
Vector<Edge<Weight>> mstEdges(){
return mst;
} | 1 |
89fdcead60642ad8aff16407fe17a721 | 0d6f2524aa9a7f20df4479b9ba44c2f0 | Test token creation with token from undefined issuer. | {
$this->publisher->createPublicationToken('user12345', '1');
$expected = [
'method' => 'POST',
'uri' => 'publications/1/token',
'signature' => 'egBFkCmj4hVBfkKg3Zdhbsv2TktjEHH7M15nD+9jXC4=',
'body' => $this->loadXML('createToken'),
... | 0 |
97e853a404f93d2b0b421df2366ff1d1 | 0fce6b0f324028cb80146323d023d5e8 | 获取月分红奖励 | class tb_month_group_share_list extends CI_Model
public function get_user_month_bonus_info($uid)
{
$sql = "select * from month_group_share_list where uid = ".$uid;
$query = $this->db->query($sql);
return $query->row_array();
} | 1 |
551c7e245592f09296ccd31f452c6402 | 1671c851979f860e1925b001a9273302 | Returns the viewer comparator. | public String getViewer(); | 0 |
3407a621dc6966c9fb1620ef5ce04eb6 | 8d9f537621932c21c9086af9cbf52733 | initializes User with a username and password | class Users:
def __init__(self, username, password):
self.username = username
self.password = password | 1 |
608425069cde6cf615315823bc338869 | a8aa045e520173e5b3138c62ab6448c0 | Sets the initial properties for a new site when it is created. | {
stepInfo.Name = CKSProperties.RecreateSiteStep_Name;
stepInfo.StatusBarMessage = CKSProperties.RecreateSiteStep_StatusBarMessage;
stepInfo.Description = CKSProperties.RecreateSiteStep_Description;
} | 0 |
0c1f7cc1663dcfd7990512b6c824aa7a | ae639e9195678b6d1a3ffbc0800b3430 | このbotの導入方法を表示します | var commands = [
trigger + ' add duty 担当者A',
trigger + ' delete duty 担当者A',
trigger + ' list duty',
trigger + ' reset duty',
trigger + ' set duty 担当者A 2000/01/01',
trigger + ' rotate duty 担当者A 2000/01/01',
trigger + ' check duty 2000/01/01',
trigger + ' set shift daily',
trigger + ... | 0 |
6939cbe123151a7483a6ec9ccf2f1bdc | c89915f56a5fac4d962a41b1104fbc3b | Create an instance of {@link ActualizarEstudiantePorCodigo } | @XmlRegistry
public class ObjectFactory
public ActualizarEstudiantePorCodigo createActualizarEstudiantePorCodigo() {
return new ActualizarEstudiantePorCodigo();
} | 1 |
260d72380c1fa8a72c8d1429a78ff6af | 89f176cfbb9e8065e0cc63bef85f55f8 | Checks if tab completion should be enabled for the command. | class _EasyDiffCompareBothTextCommand(sublime_plugin.TextCommand):
def check_enabled(self, group=-1, index=-1):
return True | 0 |
725726b31ab02198e243fa477e1d53e2 | 8237a64f6964e235720b5925b1cc3c42 | 取得当前的tid和page值 | class Page{
public function getLimit(){
$lim = ($this->current -1) * $this->pagesize;
return $lim.','.$this->pagesize;
} | 0 |
2f1dc8cfb0aac58db33001ad5774513d | 79ec25ed4fa340bfe0282fabd637b5d3 | Transform from position in surface coordinates to texture coordinates | vec2 TImplicitSurface::TexCoord(const vec3& p) const
{
return vec2(p.x, p.y);
} | 1 |
9f2e245d625c101a6ea43ec2cde45f58 | b38aac4e4c0d728b45e0d74488c5d566 | Set the number of times the announce PDU should be re-transmitted | void w5200_set_retries(uint8_t retry)
{
w5200_write(W5200_RCR, retry);
} | 1 |
d1639332032be579eadea4efc41ff8d3 | 82eb467babb9e64ff58f59640259119f | Consulta Registros inconsistencia en la Ufeg x IDCtrlFactUFEG | {
using (ServicioGeneral elServicioGeneral = new ServicioGeneral())
return elServicioGeneral.ConsultarControl( empresa_id);
} | 0 |
455822c693743c2ed83d1fcb34ca14ac | 7e5adb0d9b8cb3950da15f1441d3b917 | 次の日の18時にスケジュール
18時はカレンダー表示されないので、☓がないことを確認 | async function postReservedDraft() {
await execMove(page.click('.admin-menu-edit-btn'));
await page.click('[data-support-type="editor-option"]');
await page.type('.datetime-input-date', '2020-10-01');
await page.type('.datetime-input-time', '08:00');
await page.click('[name="is_scheduled_entry"][value="1"... | 0 |
be247a4f63997807b00a90a0a3d77ae9 | d55a5999506257a81c4dd57b6cf3f6ae | 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 | def remote_data_grab(var, var_type, level=None, time_scale=None, time=time_formatted):
var_name = {'temp': 'air',
'height': 'hgt',
'q': 'shum',
'u_wind': 'uwnd',
'v_wind': 'vwnd',
'skin_temp': 'skt.sfc.gauss',
'sfc_u_win... | 0 |
b87fb2246a9e28c255806d572bd7edbe | 187cf2bd5a9ee18a305c449f4df7608d | # Cambiar estado de empleado [Activo / Inactivo]. | try{
$empresa = Empresa::where('empresa_id','=',$id)->get();
if ($empresa[0]->empresa_estado_id == 1) {
Empresa::where('empresa_id','=',$id)->update(['empresa_estado_id'=>2]);
}else{
Empresa::where('empresa_id','=',$id)->update(['empresa_estado... | 0 |
825b8df3e1a8f9fee13de3ffe8c01acb | d31b8c392319749136fc4db8fc9b6e40 | 拆开会议 | try {
this.callHandler('joinMeeting', params, val => {
console.log(val)
})
} catch (err) {
console.log(err)
}
} | 0 |
3e7cbfbe52b1e52c9aab6169f0f4d29e | 9fc3025ac56a35b0d7007f7fa9b2df36 | [ajax] 메인 상단 최신글 불러오기 | $.ajax({
url: '/msg',
type: 'get',
headers: {
'Content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
},
dataType: 'json',
})
.done(function(Json) {
console.log('success');
if (Json.code != 0) {
alert(data.msg);
... | 1 |
5e50de288c7701558cddf44e11326b62 | a84906f99c37054d42e1b8686ff897d0 | Метод получения списка учебных корпусов | {
$em = $this->get('doctrine.orm.default_entity_manager');
$queryBuilder = $em
->getRepository('Admin:Campus')
->createQueryBuilder('q');
if ($request->query->has('sortOrder')) {
$queryBuilder->orderBy('q.id', self::transSortOrder($request->query->get('sortOrder')));
} else {
$queryBuilder->orderBy... | 1 |
97f9f50e0fe0106b7f167b1228bfb33b | 30c089cd21ca0137d9e461b92f59ecf0 | shortcode two_third | function func_One_half($atts, $content = null) {
return '<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">'.do_shortcode($content).'</div>';
} | 0 |
4828265b6bbeaeb1db8360ecc786cbd0 | be0c36e0f61677406f473b7cb402e694 | Retrieve Website ID scope | class ProxiBlue_GiftPromo_Model_Promo_Rule extends Mage_Rule_Model_Rule
public
function getWebsiteIds()
{
return $this->_getData('website_ids');
} | 1 |
e6369315aab5e7e083bd73709851c13d | af2e52c62728f4f749fa99d28b5330ac | test case: same as test_600_000, but with two parallel managed domains | self._doObjectTest("Very low-DoS-5.csv", "landscape1.xml", 10, [
"91.211.1.0/31:*",
"91.211.1.2/31:*",
"91.211.1.4/31:*",
"91.211.1.6/31:*",
"91.211.1.8/31:*",
"91.211.1.10/31:*"]) | 0 |
a13cdb0c85017618778782e743dd21f5 | 84490b2f8eaa095d48ecc547781e40fd | Compute the fastest path between 'source' and 'destination' | class PathFinder(object):
def computeShortestPath(self, source, target):
s = self.getNodeIndex(source)
t = self.getNodeIndex(target)
return nx.shortest_path(self.graph, s, t, weight="weight") | 1 |
8d345e5222ef55a091e7cdd6a9c4f60a | 74a50e0feea1b0ec5ddef8a681d9b31f | Convierte una temperatura en grados Fahrenheit a Celsius | gradosCen = ((gradosFar - 32) * 5) / 9;
return gradosCen;
} | 1 |
56adde4cd8d4ed44a5268cc1eb0afab0 | 160b3181ba5874fc335515e3ce166e3a | Create cells in this cell structure and map points into the correct cell | class rect_cuboid_cells():
def compute_cell_structure(self, x, y, z):
ix = np.floor(x/self.dL[0]).astype(int)
iy = np.floor(y/self.dL[1]).astype(int)
iz = np.floor(z/self.dL[2]).astype(int)
inds = np.where(ix>=self.num_divs[0])[0]
ix[inds]= self.num_divs[0]-1
inds = np.wh... | 1 |
2498f2997526effe77d2546b3cf78c9e | e0794b3a34c2d0b1c20a2e619090302a | Move mod with focus up | namespace WhiteBoard
public partial class MainWindow : Window
private void UpKeyPressed()
{
FlowDocument mcFlowDoc = new FlowDocument();
txtCommand.Document = mcFlowDoc;
txtCommand.AppendText(commandHistory.UpClick());
} | 0 |
540084b6f7f02d1af939ee92af45c24b | 82e9b4f44652d39916dc0530510e6474 | GET /messages/get_sent | {
$user = auth()->user();
if (!$user) {
return response()->json([
'success' => 'false',
'error' => 'UnAuthorized',
], 401);
}
$sentmessages = Message::sentMessages($user->username);
return response()->json([
... | 1 |
764d6bb832392e1cf2d1f8c91796cb0a | ed9d9e00564b80cc2736630c6e2ed534 | Prints an error message to the console, in red text to make it stand out. | def print_error(msg)
puts " #{color("!", 33)} #{color(msg, 31)}"
end | 1 |
827b628bd25244c9e09e58c926322db9 | 55d51abcde0a29eab7e546b8d1c644d0 | ***********************************************************************
Меню отключить выделение линий
*********************************************************************** | namespace DataProcessingSystem
public partial class Form_Main : Form
private void синийToolStripMenuItem_Line_Click(object sender, EventArgs e)
{
chart_MainChart.Series[0].Color = Color.Blue;
красныйToolStripMenuItem_line.Checked = false;
зеленыйToolStripMenuItem_line.Che... | 0 |
5e4bc41c773c08b932f92fadd38a4e43 | bc0f674e51f5dfc4365b8a7590925ab7 | Returns true if SiteResponse instances are equal | {
if (m_SiteID != b.m_SiteID) return false;
if (m_ApplicationID != b.m_ApplicationID) return false;
return true;
} | 1 |
5baede902f54cad6c80ad977b0c1f427 | 7ea9d66fd9cfb088afe03231941b607a | Automatically hide the setting for the submission plugin. | class assign_submission_moderatorchat extends assign_submission_plugin
public function upgrade_settings(context $oldcontext, stdClass $oldassignment, & $log) {
if ($oldassignment->assignmenttype == 'upload') {
if (!$oldassignment->var2) {
$this->disable();
}
}
... | 1 |
52357bec78a33d0283908898df0fe9e8 | c6eea40e8f939583abfe14e6c37557dc | Tests that The IV Size is 16 | const int blocksize = 16;
BlockCipherResult original = encryptionOracle17();
byte[] answer = new byte[original.Cipher.Length];
Console.Write("Cipher hex: ");
ConversionHelpers.PrintHexString(original.Cipher);
for (int index = answer.Length - 1; i... | 0 |
71e70a045a9410583e2b234d0ada3385 | fbc87965be7675cf07574d3e44c5611d | Getter method for neId, mapped from YANG variable /perfdata/neId (string)
YANG Description: the Network Element ID | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class UsersRecord extends UpdatableRecordImpl<UsersRecord> implements Record20<String, String, String, String, Stri... | 0 |
6e09f32e2fa447203c4939936f67fc31 | e990a6c334f42b7bf9a50a9c20bdab78 | 根据时间获取当日热门事件 | @Service
public class SpecialEventServiceImpl implements SpecialEventService
private List<DailyEvent> getEventByRegions(List<String> regions) {
List<DailyEvent> dailyEvents;
dailyEvents = dailyEventDao.selectByRegions(regions);
return dailyEvents.stream()
.sorted(comparing(DailyE... | 0 |
8b3d0bd5df0a9a14b22d65b2668dd17b | 3ebd71cb712a3d580ddc7313e58cce21 | 根据regionName去community查询sectId | if(regioname=="2"){
return "01";
}else if(regioname=="3"){
return "02";
}else if(regioname=="4"){
return "03";
}else if(regioname=="5"){
return "04";
}else if(regioname=="6"){
return "05";
}else if(regioname=="7"){
return "06";
}else if(regioname=="8"){
return "07";
}else if(regioname=="9"){
ret... | 1 |
7b78acdfac6bd84d3cf4682b0b0943f1 | d969888986fb21121b680a5934d12eb1 | NewPostgresDB - creates new PostgresDB instance | func NewDB(pg *conf.PostgresConfig) (*sql.DB, error) {
pgInfo := fmt.Sprintf(
"host=%s port=%d user=%s password=%s dbname=%s sslmode=disable",
pg.Host, pg.Port, pg.User, pg.Password, pg.Database)
db, err := sql.Open("postgres", pgInfo)
if err != nil {
return nil, err
}
if err := db.Ping(); err != nil {
ret... | 1 |
038971635ebdf1a0f68cc04e77297d43 | 912984fd71a55f2e1693dcd933c23f87 | Saves the current location to the response cookies | export default function LocationPickerStore({
envType = '',
geoService,
logger,
cookie,
lastLocationCookieName = 'n1_last_location',
})
saveLastLocation(context, { geoId, geoType }) {
cookie.setValue(
lastLocationCookieName,
{ id: geoId, type: ... | 1 |
9ae468febe28daa0f39436c7bbce0ea5 | 0b9c447647f329deaf6c4fb9de992d82 | Цикл ИИ | void FU(){
for (int i=0; i<n; i++) table[i][i]=0;
for (int k=0;k<n;k++)
for (int i=0;i<n;i++)
for (int j=0;j<n;j++)
if (table[i][k] && table[k][j] ){
if ((table[i][k]+table[k][j]<table[i][j])&&(table[i][k]+table[k][j]<50000) ){
table[i][j]=tab... | 0 |
0ef9e812e8e0a3412f62cf3a74532fa9 | 1c3ae3b45db29d52006fe36c08f0c98d | Normalize non-wildcard IPv6 addresses | self.assertEqual(
clean_ipv6_address('::ffff:0a0a:0a0a', unpack_ipv4=True),
u'10.10.10.10')
self.assertEqual(
clean_ipv6_address('::ffff:1234:1234', unpack_ipv4=True),
u'18.52.18.52')
self.assertEqual(
clean_ipv6_address('::ffff:18.52.1... | 1 |
a07c5e3ce0333bf6c8fab70a06277aef | 5711dd2970e6d422971fcf640a8bd3c0 | *PhyloP* score with default parameters. | def p_to_score(p, PDO=75.0, Base=660, Ratio=1.0/15.0):
B = 1.0*PDO/math.log(2)
A = Base+B*math.log(Ratio)
score=A-B*math.log(p/(1-p))
return round(score,0) | 1 |
4dc60e75f5ff99f5a54afb0b6fd14684 | 00f5fd0f64b0f0d37180c7562c92c0b1 | 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 ClientMessage:
def should_wait(self):
return False | 0 |
89fa2e8f4b374262639c52bd042f9985 | bf5a251e655f10423067a3decd46aa56 | 把字符串转化为JSON字符串 | namespace XYZZ.Tools
public static partial class Extands
public static JObject ToJson(this string data)
{
JObject jObject = new JObject();
jObject.Add(Wildcard, data);
return jObject;
} | 0 |
f93917ef67c05fd127ef41172563e568 | 5985f684079f59c23046ecba9215b0b0 | An additive hash. | public class AdditionFunction implements DeterministicFunction
public int hashcode() {
return 456;
} | 0 |
eada358f2b9f0d6371e7b46de1c168c4 | 641b501ae0749fa47f03aa2b19748ada | Check what's inside | print(f"self.env = {self.env}")
print(f"self.building = {self.building}")
print(f"self.building.elevators = ")
for elevator in self.building.elevators:
print(f"elevator = {elevator}, id = {elevator.id}") | 1 |
4022429f75686b49f22581baf6f9cd3a | ce61a6b368dd4e7e9b4a18e5872e879d | Metoda sloužící jako setter volného místa ve vozíku. | public class Parking
public void setEmptyPlaces(int emptyPlaces) {
this.emptyPlaces = emptyPlaces;
} | 1 |
c07528a1241e375cfb90ffeabc409708 | 5acdf4c8fe696c337f8ef08fbbda798f | double类型格式化,四舍五入,取两位小数 | public class Tools
public static double formatDouble2(double d) {
BigDecimal b = new BigDecimal(d);
return b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
} | 1 |
1ae6fbc35b5475e663f6c6d32fbe2353 | 1f126ad541996b0385c96a79c3ae566d | This function enables the insertion of ST352 in C stream of the SDI TX Ss core. | {
__IO uint32_t tmp = 0x00U;
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
#if defined (DATA_IN_ExtSDRAM)
register uint32_t tmpreg = 0U, timeout = 0xFFFFU;
register __IO uint32_t index;
#if... | 0 |
4fe1c99f4c10731f4a64641a96c03b72 | 03ca53556f2d95454f1b63e157f292f1 | 批量保存屏蔽词 | void insertBatch(List<AdBlacklist> adBlacklists); | 1 |
e1eeb47e7612e540e2777c4e12e256c2 | bd00b68497086da633a3b399693534d4 | Begins execution of the coroutine | namespace Pants.Coroutine
void Start(); | 1 |
9a5c88a2e77a843267594189d511384f | 140dab567cf429f332a214044a1787e2 | Формирует фильтр для режима acc_balance | class Balance
public function getFilter(): string
{
return $this->filter;
} | 0 |
f646435fb8f50a47bf479de290fbe0d9 | 9e91b2a32cd9303ebaf7a7fcdd62fce5 | 设置ok按钮回调 | class ExitDialog : BaseDialogFragment()
fun setOkCallBack(localCallback: LocalCallback<String>?) {
this.localCallback = localCallback
} | 1 |
47f6435cec5c3c1e9b7b2fbe10284176 | 19cc0a5dd6f19bc6346ce564cde735aa | don't need resampe operation on the ModelNet40 dataset | class RealTimeStereo(threading.Thread):
def _no_adaptation_ops(self):
self._train_ops.append(tf.no_op())
self._sampler = sampler_factory.get_sampler('FIXED',1,0) | 1 |
d94104147969400e0461fa156ee9fea2 | 1c2ce19741f3e7cbfc3cd47410c77e18 | # find all the movies already watched and rated by the selected user | $sql = "SELECT
m.id,
m.title,
m.release_date,
m.description,
m.image_path,
GROUP_CONCAT(DISTINCT g.genre) as genres,
GROUP_CONCAT(DISTINCT a.name) as cast,
... | 0 |
094530adac19527a0df2060d59d92921 | 9fccd5b6d64feab886cfb16e4e22bcc7 | 打开选择会议提前提醒视图 | ModelAndView mav = new ModelAndView(MeetingPathConstant.reminders_dialog);
boolean isCanSendSMS = false;
if (SystemEnvironment.hasPlugin("sms")) {
isCanSendSMS = mobileMessageManager.isCanUseSMS();
}
mav.addObject("canSendPhone", isCanSendSMS);
List<V3xOrgMember> userList = new ArrayList<V3xOrgMember>();... | 1 |
06eb04c2a5de7953bc4720006961af3a | 460e4dbf3f6c28be30653de602a73427 | GENERAR CÓDIGO DE BARRA | codigo = $("#codigo").val();
JsBarcode("#barcode", codigo, {
background: "#ccffff"
});
} | 1 |
f38a15de1c02c76433265c6ac0f572ce | 583d9a08f73f0ccc409dc44a41b207f1 | add a event listener to expect a certain mssage to receive a reply | struct _lmpEvents* lmpevents, enum _listofEvents *event,
enum _listofStates *state,int* buffer_len) {
buffer=receiveMessage(newSocket,buffer);
if(strcmp(buffer,"hello") == 0) {
*event=10;
eventModifier(lmpevents, event);
*state=4;
stateModifier(linkstatus, state);
}
else if(strcmp(buffer,"hello") == 0) ... | 0 |
f5a5bdda24736c7282b1992b5e777cc8 | 5e37639d5eb72d0d3f9a2f6baa4be132 | マルチスレッド下で動作することを確認する。 | class TestMulti():
def test_multi_thread(self):
thread_list = []
for i in range(10):
thread_list.append(threading.Thread(target=self.work, args=(i,)))
for thread in thread_list:
thread.start()
for thread in thread_list:
thread.join()
print('fin... | 1 |
714819bf740b254e7f50ea2da55af1d1 | 157103467d17d30ac108e5a29ee2d861 | Make an ajax call to the server in order to disable the setting
from the database. | $nonce = false;
if ( isset( $_REQUEST['nonce'] ) ) {
$nonce = sanitize_text_field( wp_unslash( $_REQUEST['nonce'] ) );
}
if ( ! $nonce || ! wp_verify_nonce( $nonce, 'avada-redux-ajax-notification-nonce' ) ) {
return;
}
if ( update_option( 'fusionredux_hide_ajax_notification', true ) ) {
die( '1' )... | 1 |
bb759e66dd01e3f4255453893abf0d05 | e2daf3318f64e5885179c2b44cf5e29c | 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. | namespace IntroSE.Kanban.Backend.ServiceLayer
public class Service
public Response<IList<String>> GetBoardNames(string userEmail)
{
throw new NotImplementedException();
} | 0 |
295fbefcaf7a90e0775677ce0e2a1071 | 3bcfbe75a0cbc5b8af17fca3ff0bf36c | Register the agent's location. | class BaseAgentProtocol(EncryptedProtocol):
def register(self):
logger.debug('Adding %X to handler map', self.other_id)
self.agent_mac = self.other_id
return self.factory.register(self) | 0 |
97bb3b7d8978c2efdee382a162553266 | c8048a344e4d5059b95e1f7d5248a50a | Copies the password value in the client's 'clipboard' | class Application(Frame):
def clipper_pass(self):
root.clipboard_clear()
root.clipboard_append(self.pw_entry.get()) | 1 |
47d5ca91860e107727ebdcfc0ae6eeba | bfcd3f1efde9de5d43bb780a2a08c1b8 | 将营业执照内容放入数据库 | System.out.println("mapCreditEmbranchment:---------------------");
System.out.println(mapCreditEmbranchment);
System.out.println("mapCreditEmbranchment:---------------------");
cE.setFkLicenseUid(fkLicenseUid);
cE.setOrgName(mapCreditEmbranchment.get("org_name"));
cE.se... | 1 |
425d7859e616ed4ab5d2146a8c66b08e | 3f5b4029385dc06bba1edc336188b944 | 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 ThriftEndpointConsumerBuilder exchangeProtocol(
String exchangeProtocol) {
doSetProperty("exchangeProtocol", exchangeProtocol);
return this;
} | 0 |
bd24a4972c56562c3d0730ba606466b2 | b37afd6c45e573d42a08000316ea2120 | Get the creation date of the elastic pool (ISO8601 format). | class GetAddressPoolsPoolResult(dict):
def create_time(self) -> str:
return pulumi.get(self, "create_time") | 1 |
60e8044b98bdf4d2722e1a154fe18a4a | 1198094a2945ae2c657d9709042f93b4 | Sends any expiration notifications required by this manager. | public class ExpirationNotifScheduler
private void expireSponsorships() {
perun.getMembersManagerBl().getSponsorshipsExpiringInRange(sess, LocalDate.MIN, getCurrentLocalDate())
.forEach(this::expireSponsorship);
} | 0 |
9874174ac08b118d3084bec95f04f6f3 | c39a402fe67083cff6d05ab2a0a3762c | Delete our test artifact(s) | class TestArtifactSerializer(TestCase):
def tearDownClass(cls):
super().tearDownClass()
shutil.rmtree(settings.MEDIA_ROOT) | 1 |
74da9f729313e62612cbf55ad4b37e7d | 8e290c7160307694631f8d3f156ba395 | 关闭好友红包提示 | function dhxy_pub.close_push_friend()
local pos = screen.findColor(Rect(965, 685, 232, 54), "0|0|0xffffff,33|10|0xeffbf7,57|-10|0xffffff,144|7|0xffffff,197|23|0xf7fbf7",95, screen.PRIORITY_DEFAULT)
if pos ~= Point.INVALID then
dhxy_common.click(math.random(1474,1474+48), math.random(286,286+44), math.random(40,100)... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.