query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
893bcbc0f958351ab4d2e73c2a3e87e3 | f570f1a284fb1baad735838aca98315c | Returns set data for testing in String format | abstract class PHPUnit_Extensions_Database_AbstractTester implements PHPUnit_Extensions_Database_ITester
public function getDataSet()
{
return $this->dataSet;
} | 0 |
afb37cccfb9db41b7cdf2a4ceaef2170 | a459d91442c849e34d3cf3dda3acf40d | 该方法检查服务端的证书,若不信任该证书则抛出异常 | public void checkServerTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
} | 1 |
e03ee3ac09b68e1d785260607b191fbf | cfbb24159112683740c70cb102dbbc8e | Extracts the names of colours and returns a comma separated string. | {
if (colours == null || !colours.Any())
{
return null;
}
var colourNames = colours
.OrderBy(c => c.Name)
.Select(colour => colour.Name).ToList();
return string.Join(", ", colourNames);
} | 1 |
3b691d7fc9c8928c9fb2f1a871deb350 | ace876110b6e8676e7b7abef35dfad4b | Given the return value from a view function this finalizes
the request by converting it into a response and invoking the
postprocessing functions. This is invoked for both normal
request dispatching as well as error handlers. | try:
self._process_request(req)
except Exception, e:
req.send_response(500)
req.send_header('Content-Type', 'text/plain')
req.end_headers()
req.write("Oops...\n");
import traceback;
req.write(traceback.format_exc()+"\n");
self.env.log.info(traceback.format_exc()) | 0 |
1fab9af0c719e627506382ef282269ed | 3574ec031ae327cfb1cfd9ddf9e3ea2d | The ARN of the signing profile.
:attribute: true | class GetLayerVersionResult:
def signing_profile_version_arn(self) -> str:
return pulumi.get(self, "signing_profile_version_arn") | 1 |
ebbc73f2a00825960e2bd91b8fd5454f | 404758eb7de1c1ad17349c4f460bfa35 | функция, которая, получая на вход токен, смотрит, какие у него есть синонимы, и выводит те посты, в которых эти синонимы есть | for word in words:
for result in model.most_similar(positive=word, topn=10):
print(result[0]) | 0 |
f7ae4ba5610b51636af937ffa0b03c0c | 42a6a82145153d52cda7e819eef8f5c5 | 验证返回信息(v3) | class AlipayNotify extends \Miaoxing\Plugin\BaseService
public function verifyReturn()
{
if (empty($_GET)) {
return false;
} else {
$isSign = $this->getSignVeryfy($_GET, $_GET['sign']);
$responseTxt = 'true';
if (!empty($_GET['notify_id'])) {
... | 1 |
fb4e3787663460ccc5c652cf88ebcc48 | dfc9aac1c2553de720f77a35826c24de | this one flattens an arbitraryly deep nested list | def outter_flatten(lst):
new_lst = []
for x in lst:
if isinstance(x, list):
for y in x: new_lst.append(y)
else:
new_lst.append(x)
return new_lst | 0 |
25874e9d700ac710cedb1ec0999d89e2 | c05f5aec29c7ae7e5b9d950e59eb7d6a | Get end city | class Option extends ProtobufMessage
public function getEndCityIterator() {
return new ArrayIterator($this->get(self::END_CITY));
} | 1 |
c0e69d8d0187fa012fdf00f7935dfdf1 | c468b1ace848d5058fcd8ec4a07f77b2 | Toggles whether controller input is registered by the game | {
if (isEnable)
{
inputActions.GamePlay.Move.performed += HandleMovePerformed;
IsUnderControll = true;
}
else
{
inputActions.GamePlay.Move.performed -= HandleMovePerformed;
IsUnderControll = false;
}
} | 1 |
0a99a8d750819ddd795c726dbda9928d | 45315bb2c6479f11ef3cebf192d9211c | 发送请求接收响应数据,直接返回响应数据,用于短连接 | public function send_recv($data)
{
$re = $this->send($data);
if (!$re) {
return $re;
}
return $this->recv();
} | 1 |
b422d8d9b73c09e14725664c315a673c | e20eb3ee0ebd9417818cf7f8ff489c79 | Returns the total number of times (across all reactions) that the user changed an existing
reaction's type. | public class SceneCoordinator implements SceneEditorDelegate, ToolbarReactionsDelegate
public int getNbTypeChange() {
return mNbTypeChange;
} | 1 |
fe611276d91b0d13552dde96eaa6a11a | 0ef4f5ee7ba66c660802495304b2d346 | Draws the lines of a rectangle using the color/style of the strokeStyle attribute | cxt.fillStyle = "#EED5B7";
cxt.strokeRect(startX, startY, endX - startX, endY - startY);
} | 0 |
d9edb085275f466ab7281df4f9ae95b1 | a96ccc5b6d1e68f16c8855130bdcc5d7 | 计算首期分期金额 | {
RemainingPeriod = IntParse(RemainingPeriod);
decimal PrepaymentAmount = 0;
if (RemainingPeriod == 0)
{
PrepaymentAmount = 0;
}
else
{
if (RemainingPeriod == 1 || RemainingPeriod == 0)
... | 0 |
9fe67295e27d5ae954902c01d44f83cd | 56254186f603f01caebae8f55a2041a4 | 从节点i开始向下调整使其符合堆的定义 | assert(i>=0 && i<heap_.size());
int j=(i-1)/2;
while (i>0){
if (heap_[j]<heap_[i]) break;
Swap_Nodes(i,j);
i=j;
j=(i-1)/2;
}
} | 0 |
696182a3c11ca0b9876f02bb19d3a89f | 182ff84fdf88afb48af0d3edfe83f1b4 | Update information about this team from Lastuser. | class TeamMixin(BaseMixin):
def update_from_lastuser(self):
pass | 1 |
2f35f70d0a8a9e1a60ecc26e462fd5ef | 3a954110d54fc2e86e2cbc95cf5406a4 | Updates the lines for the XYZ compass in the display | {
if (!as_ok)
{
clear_line(LINE2);
display_chars(LCD_SEG_L2_2_0, (u8*)"ERR", SEG_ON);
}
else
{
if(update == DISPLAY_LINE_UPDATE_FULL)
{
display_symbol(LCD_ICON_HEART, SEG_ON_BLINK_ON);
}
if((update == DISPLAY_LINE_UPDATE_FULL) || (update == DISPLAY_LINE_UPDATE_PAR... | 0 |
b542327a2ddbb1b394b679ea49a1232d | 52e5e219952f33a1a6548c7c62665101 | Cell height. See the height attribute definition in HTML 4.0. This
attribute is deprecated in HTML 4.0. | Integer getCELLHI(); | 0 |
9700c98148457e608814aa2243014b25 | fa54ae850798613a3614fbd569de98c5 | Displays all the current documents in the database | class DocumentsController extends Controller
public function index()
{
$documents = Document::all();
return view('app.documents.index', compact('documents'));
} | 1 |
cf5bb0720025a41faa9fea1f96acbea3 | 5a770cc8045d6575364b2ed21d6d825c | 获取用户已使用网盘大小 | @Service
public class FileService extends CommonService
public long getUserUsedFileSize(String operationUserKey) {
String fileSizeValue = getSqlValue("FileService.getUserUsedFileSize", "userKey", operationUserKey);
if (StringUtil.isNotNull(fileSizeValue)) {
try {
long fileSize = Long.parseLong(fileSizeValue)... | 1 |
793638932c5763d913a89e8cc0511c90 | f73678317f7e2dfa592b34e0a71bb5b1 | 結掉 Android IAP 訂單 | public class IAPManager : MonoBehaviour, IStoreListener
public void RemoveAds()
{
BuyProductID(product_RemoveAds);
} | 0 |
9659ee4ac6b5ab021cd1e19863c8b3ab | d3e0d209e51304b5e9f944878c3a8bcd | Обновить описание файла асинхронно | namespace NBCH_LIB.WCFProxy public class ServiceRegistrarProxy : ClientBase<IServiceRegistrarWCF>, IServiceRegistrarWCF
public async Task UpdateFileDescriptionAsync(FileDescription fileDescription) =>
await Channel.UpdateFileDescriptionAsync(fileDescription); | 1 |
4fb9606d9aa2422d641d7fdfcc83cca2 | de4431a0b935adc1b510e19b86382021 | sortedArrayUsingFunction:context:</br>
Original documentation: <a href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/index.html#//apple_ref/occ/instm/NSArray/sortedArrayUsingFunction:context:">iOS Dev Center</a> | g_byte_array_sort_with_data (GByteArray *array,
GCompareDataFunc compare_func,
gpointer user_data)
{
g_array_sort_with_data ((GArray *)array, compare_func, user_data);
} | 0 |
cbc9860741448993eaf586c1a02c895a | 8a4c6b2f63a9555132a4206600d29205 | !
@brief Get port factor requirements | {
char *value;
int size;
UPMI_GET_SIZE(&size);
if ((value = getenv("MV2_NUM_QP_PER_PORT")) != NULL) {
rdma_num_qp_per_port = atoi(value);
if(rdma_num_qp_per_port <= 2) {
stripe_factor = 1;
} else {
stripe_factor = (rdma_num_qp_per_port / 2);
}
... | 1 |
bf67c2a5306621efe94bcbdf7f891a9b | 577514190cd2582a0cf735309bd83ff9 | multiplies it by 0.025 to convert it to meters, and returns the result. | {
float output=0;
output = input * .25;
return output;
} | 0 |
05b3ad8da17d94f25aaaf1e18db46fa7 | d312cdf02d911ef11bbc6669d3f6bfa6 | Initialization code that affects Member controllers. I.E. redirect and die if not logged in | class Users_AuditController extends Pas_Controller_Action_Admin
public function init() {
$this->_helper->_acl->allow('member',null);
$this->_logins = new Logins();
} | 0 |
7de3ffe9f7c53a90ddcd87ce4fc5c87c | 15da70ff46ae34999bffed4b6328ebe0 | Returns a map of order status present in the
system. The key is the status id and the value of the
map is the name of the status. The name should be translated
to the current user language.
e.g. array(
'statusId1' => 'Status Name',
'statusId2' => 'Status Other Name',
); | abstract class __emarket_admin_mobile extends baseModuleAdmin
public function getOrderStatuses() {
$statusSelector = new selector('objects');
$statusSelector->types('object-type')->id('emarket-orderstatus');
$statusSelector->order('priority')->desc();
$result = $statusSelector->result();
$statuses = arra... | 0 |
5321bab2031c578a0a4923774470f50f | 2dfa07b476f492c9effc9e4cb3b7a176 | 如果使用者有輸入且取得焦點,則顯示;否則不顯示 | namespace TS_Win_WN.UserCon.Main_Emergency.CMD
public partial class uc_Main_Emergency_CMD_Point_Mana : Form
private void Str_point_Enter(object sender, EventArgs e)
{
if (textboxHasText == false)
Notice.Visible = true;
} | 0 |
884ca0658e5f67bcda395cae826a70d0 | 5afee4ddfe1ed961cc07ae1437589065 | Register sort alphabetically command | void Command_symbol()
{
char symbs[MAX_LENGTH][MAX_LENGTH],str_tmp[MAX_LENGTH];
int symb_loc[MAX_LENGTH];
int i,j,sym_cnt = 0,t;
for(i = 0 ; i < 20; i++)
{
_symbol* tmp = _sym[i];
while(tmp != NULL)
{
strcpy( symbs[sym_cnt] , tmp->symbol_name );
symb_loc[sym_cnt] = tmp->loc;
sym_cnt++;
if(tmp->ne... | 1 |
4ac40df4bf2f78c28c65879c8e351a6b | 23f02063b6ad86e569bf531868edb3e3 | show filename by col and row | {
int i = 0;
int j = 0;
char filename[255];
int len = 0;
struct stat buf;
if (lstat( name, &buf ) == -1)
my_err( "lstat", __LINE__ );
for (i = 0; i <strlen(name); i++) {
if (name[i] == '/') {
j = 0;
continue;
}
filename[j] = name[i];
j++;
}
filename[j] = '\0';
if (row_leave < file_maxlen) {
... | 1 |
2f920a922b285388468124919d15e9e2 | dff4aeb8e90cb023c0969dfe6bd754d2 | Return a purifier function based on the command-line arguments. | assert not (bool(args) and bool(kwargs))
if args:
return cls._run_args(args)
elif kwargs:
return cls._run_kwargs(kwargs)
else:
return cls._run_args(None) | 0 |
319168355b7ac7c13cdb2f342d3d1660 | c38d50018deb386170792d257435f856 | \brief Sets the corresponding Error flags for USB packet.
The function takes the error value and sets the error flags
for the corresponding error for the USB packet. | {
if ( (errType == USBH_ERROR_SPEED_UNKNOWN) ||
(errType == USBH_UNRECOVERED_ERROR) )
{
USBH_Machine.usr_cb->UnrecoveredError();
USBH_Machine.gState = HOST_ERROR_STATE;
}
else if(errType == USBH_APPLY_DEINIT)
{
USBH_Machine.gState = HOST_ERROR_STATE;
USBH_Machine.usr_cb->Init();... | 0 |
6384114f73f96682ce0eaa5b34282f83 | 423f70fdb810937db0e2edcb8de14263 | Set up Timer, target 1kHz interrupts | void setup_timer(void)
{
TCCR1B |= _BV(WGM12);
TIMSK1 |= _BV(OCIE1A);
OCR1A = 31250;
TCCR1B |= _BV(CS12);
} | 1 |
7316be665f5009b1ce4e07913637c612 | ddf6b746a85ce2505aa41a713e7cc510 | Loads model definitions from model description file and populates data from given checkpoint | class SECheckpoint(OneModelCheckpoint):
def load(cls, path, model):
logger = logging.getLogger(__name__)
resume_checkpoint = torch.load(
os.path.join(path, cls.TRAINER_STATE_NAME),
map_location=lambda storage, loc: storage)
model_state = torch.load(
os.path.jo... | 1 |
b3e95677b874941cbb191f2a3ec82ec8 | 8417256608843c4d443603a04867da96 | 实现二:递归,
可以复制函数属性,不能解决循环引用问题 | function deepColne2(obj) {
if(!(obj instanceof Object)) {
return obj
}
if(obj instanceof Date) {
return new Date(obj)
}
if(obj instanceof RegExp) {
return new RegExp(obj)
}
let newObj = obj instanceof Array ? [] : {}
let srcQue = [obj]
let srcVisitedQue = []
let copyQue = [newObj]
whil... | 0 |
47a0dcf83186151d600b942a9f206658 | 1a929694363865e60327d61128a55324 | 桁ごとにわけて階乗の和を算出 | var res = 1
repeat(readLine().toInt()) { res *= it + 1 }
print(res)
} | 0 |
894a9531cbdd45f0572c16b4e4b2c27a | 1ea0737c3307e324629dca6c50757fe3 | Write data to GPS device. Overflows are silently ignored. | namespace cnbiros namespace wheelchair
int Dxgpsb::writeToDeviceNOCHKSUM(int n_bytes, unsigned char* data) {
int retval = 0;
tcflush( this->fd, TCOFLUSH );
retval = write(this->fd, data, n_bytes);
tcflush( this->fd, TCOFLUSH );
for (int i = 0; i < n_bytes; i++){
}
return retval;
} | 1 |
5de748699c9c1a67224c24a70a0dd7ee | d96c67c141ce6dd694a09c8852eccfab | Emite los insumos al Padre | class InsumosController extends Controller
public function index(Request $request)
{
$request->user()->controlroles(['1','3','2']);
$user = auth()->user()->id;
$insumos = Insumo::where([
['user_id', '=', $user],
['estado_id', '=', 1],
])->get();
retur... | 0 |
2e25b1e1611d0cceb47b17dad2076cf6 | 8b2976ebdd46e6685ca1e2d3c53d820a | Gets all test issues under a test set. | Collection<Issue> getIssues(String projectId); | 0 |
1abb2f8b700ca527c6ba8e87faecc094 | 274fb530b8da79bff21dddec3f81d00b | Set style classes for QWidget w to list in classes | {
m_ClassNameToStyleMapper[CString( _T( "#32770" ))] = g_DlgStyleMapper;
m_ClassNameToStyleMapper[CString( WC_EDIT )] = g_EdtStyleMapper;
m_ClassNameToStyleMapper[CString( WC_LISTVIEW )] = g_ListCtrlStyleMapper;
m_ClassNameToStyleMapper[CString( WC_LISTBOX )] = g_ListBoxSt... | 0 |
a55eea85bf1301de72e382dc07418d95 | c2003f8cc1b4e263602320cfdbb0a67f | テストを実行します。
<p>
JTAが利用可能な場合、トランザクションの制御とテストデータの準備を行います。
</p>
メソッド呼び出し
何らかの例外またはエラーが発生した場合 | @ContextConfiguration(locations = {"classpath:com/consol/citrus/spring/root-application-ctx.xml",
"classpath:" + CitrusConstants.DEFAULT_APPLICATIONCONTEXT,
"classpath:com/consol/citrus/spring/reporter-fix-ctx.xml",
... | 0 |
c5276194e88dd07d4bee4da5c668128b | bc9e36e3742c937cda617066f9e4d6f7 | Simplesmente retorna o diretorio atual, adequando-o para o mesmo formato de print que o terminal do ubuntu faz. | {
char buffer[ TAM_DADOS + 2 ];
ostringstream saidaComando;
FILE *fp;
if ( ( fp = popen( "ls", "r" ) ) == NULL )
{
cerr << "Erro ao executar popen para fazer ls" << endl;
return false;
}
while ( fgets( buffer, TAM_DADOS, fp ) )
{
saidaComando << buffer;
}
pclose( fp );
return saidaComando.str();
} | 0 |
1956e0e3bce1e6e3a1d356ec89ea6c0b | 0ed8d0f41283d84060f8752e0c851546 | Whether Datadog collects cloud security posture management resources from your GCP project. | class _IntegrationState:
def cspm_resource_collection_enabled(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "cspm_resource_collection_enabled") | 1 |
eb7a5259930a0a8babf4c2a37f15fcb8 | 96877034b25aee52516e51a5a077ee7a | Skips custom execution listeners when creating/removing activity instances during modification | namespace org.camunda.bpm.engine.runtime
ModificationBuilder skipCustomListeners(); | 1 |
d94367bf633081fbc18b8f0bc56c47c9 | 45bd82901d4c3d3f190c1d070b50c4ee | Visit a parse tree produced by the {@code showColumn}
labeled alternative in {@link PostSQLParser#show_column}. | class fugue_sqlVisitor(ParseTreeVisitor):
# Visit a parse tree produced by fugue_sqlParser#fugueLanguage.
def visitShowTable(self, ctx:fugue_sqlParser.ShowTableContext):
return self.visitChildren(ctx) | 0 |
1f3e3df4dea9d93e4d5505b870179a4a | aed41988c65ef9f6e4bb6018bedf0963 | For activated elements in tablet in conversation mode, we show an activated color, since
the background is dark blue for activated versus gray for non-activated. | let lineWidth = 1
let multiplierX = [0.8, 0.4]
let multipliersY = [
[0.1, 0.3],
[0.9, -0.3],
]
for (let i = 0; i < 2; i++) {
let strokeStyle = i === active ? this.colourHandler.activated : "black"
let start = { x: padTL[i].x, y: padTL[i].y + multipliersY[i][0] * this.rowHeigh... | 1 |
5b09b14d0d03dc6c833b17a75f23a585 | 480a142b6c85f898128e1d4e1d9a3c59 | Set the KeyStore database URL string. This is used to obtain
an InputStream to initialize the KeyStore. | public class JDBCRealm extends BaseInterceptor
public void setConnectionURL( String connectionURL ) {
this.connectionURL = connectionURL;
} | 0 |
c4a2014c0cbc758ed7b68bed737e0cd7 | 630eb501a5c4420f8d2effbcaa7a0449 | When the .md file is modified, update the corresponging html. | fetch(window.location.pathname.replace(/\.html$/i, '.json'))
.then(res => res.json())
.then((md) => {
this.setState({
__html: md && md.__html ? md.__html : '',
});
});
this.markdownContainer.addEventListener('click', (e) => {
const isAnchor = e.target.nodeName.toLowerCase()... | 0 |
d4dc96c44eb58ea5c53e6d671aa47d91 | 4df35731e2256fafe3673f0813c6319b | Writes the XLS file to the given output stream. The output stream
will be closed after the writing. | public class ExcelService
public static void writeToStream(final HSSFWorkbook wb, final OutputStream out) throws IOException {
wb.write(out);
out.flush();
out.close();
} | 1 |
ee7b7633e5a4e40570d2472ba9315c46 | 04b48a5489c9e50904c37a7cfd326abb | <pre>
设置:质量标准与验收——附件(json形式)
表字段:t_fit_standard.quality_check_affix
</pre>
t_fit_standard.quality_check_affix:质量标准与验收——附件(json形式) | String fiberOpticNumber,
String fiberOpticDesignLength,
String fiberOpticSupplier,
String fiberOpticContacts,
String pigtailSkipFiberId,
String pigtailNumber,
String fiberCableType,
String fib... | 0 |
7575326f013f01fb58352dc629b695fe | 170effbb802f254a8ee1117a241f79fe | Whether to use the 11n rate scenario functions or not | public class BenchmarkConfig
public boolean sienaRequested()
{
return wantSIENA;
} | 0 |
4e5084259792c9f54ca76905bc2e8efe | 17a3c47a556c5c897eccde779633a99d | Handles the TextChanged event of the txtStaffId control. | namespace LeavingManagementSystem
public partial class StaffList : Form
private void btnEdit_Click(object sender, EventArgs e)
{
bool flag = true;
string staffId = string.Empty;
int i = 0;
try
{
while (flag)
{
... | 0 |
910caddd9df95935163ba3c0e1aa6f9c | bfb06e40e857ab8d90454516415bbc9e | Opens the form to manage Clinic entries in the DB | class ClinicController extends Controller
public function create()
{
return view('clinic.create');
} | 1 |
e4327141155e3b350443cc5f404da33e | 1c9f718b6986ad917818ead30de38ccb | Implementation of <see cref="System.Windows.Freezable.CloneCore(System.Windows.Freezable)">Freezable.CloneCore</see>. | namespace System.Windows.Media.Animation
public partial class SplineRotation3DKeyFrame : Rotation3DKeyFrame
protected override Freezable CreateInstanceCore()
{
return new SplineRotation3DKeyFrame();
} | 0 |
65573c982e727fb1cc7ea09b54b3730f | 647f8efc292f1e06d6efa34e26eeb111 | readToEOD reads data from a file until an EOD marker is found | fread_to_eol(FILE * fp)
{
char c;
do
{
c = getc(fp);
}
while (c != '\n' && c != '\r');
do
{
c = getc(fp);
}
while (c == '\n' || c == '\r');
ungetc(c, fp);
return;
} | 0 |
be7459efbe7eec78ce29e8aa203ddadb | 7cd8873ace82f1ec209f3089a26695a8 | Recursively build the undirected graph from the given binary tree. | if not node:
return None
root = node
nodes = self.get_nodes(node)
node_map = {}
for node in nodes:
node_map[node] = UndirectedGraphNode(node.label)
for node in nodes:
for neighbor in node.neighbors:
node_map[node].neighb... | 0 |
8d41bcff2a884d00436c5137c13d1483 | 3dfc02e5fcaebb08a1851574751cf96d | Matches if a timestamp field is before the given timestamp | public function lessThan(ChronosInterface $dt); | 1 |
7bf1f7b4f3a138f0923884f89822044e | 8d0115aa36de1168c8103774c716dc09 | Shortcut methods to get PolicyType instance that corresponds to a policy's
currently selected policy type description string... | public class ControllerSupport
public static String getPolicyType() {
return POLICY_TYPE_COMPLIANT_OP + ":" + POLICY_TYPE_VERSION;
} | 0 |
c34493823ae138fba40aac945264b791 | 09a919d8ed420dc354c82067dc10e866 | When a job is being scanned, no other jobs should be selected until current job is over. | class StageList(Resource):
def get(self, project_slug, job_slug):
def match(stage):
return not (
'slug' in request.values and
request.values['slug'] not in stage.slug
) | 0 |
1c65bcb98b05423b1cb026c2890b56cf | db1ba7cd0b53949396f29fce8615be8a | 这个函数可以获得第一个双引号中的内容而不包含该双引号 | first_dq = s.index('{')
post_fdq = s[first_dq+1:]
second_dq = post_fdq.index('}')
str_dq = post_fdq[:second_dq]
return str_dq | 0 |
537bba6dd68cebe1dc38e3744d905000 | 5fe0417d405db28c727cbdc11e0514c6 | RowColumnSearch --
Searches for the row or column designated by an x or y coordinate.
Returns a pointer to the row/column containing the given point. If no
row/column contains the coordinate, NULL is returned. | RowColumnSearch(PartitionInfo *piPtr, int x)
{
Blt_ChainLink link;
for (link = Blt_Chain_FirstLink(piPtr->chain); link != NULL;
link = Blt_Chain_NextLink(link)) {
RowColumn *rcPtr;
rcPtr = Blt_Chain_GetValue(link);
if (x < rcPtr->offset) {
return NULL;
}
if (x < (rcPtr->offset + rcPtr->size)) {
... | 1 |
ed9415677e66be679cd1f44a5ae00441 | 0398f99bc042545d51b5085d9d24efd3 | 从java传入两个int,C语言做加法运算后返回 | public class NativeMethodSum
public static native int sum(int a,int b); | 1 |
1363a6fa4b7689704ede9227bf732bc5 | ee1adbbe191592e5e5c6224655d678bf | Clean All processes from the pool | class Pool
public static function clear(): bool
{
return self::$handler->clear();
} | 1 |
bbc44ece0f0d904357e3ed1de16a1a54 | 7fa67063f52a9cb293eb6b3c268a791c | Returns value as fixed_t, handles CV_FLOAT correctly. | static long get_fixed_from_arg(fixed32_t* dest, unsigned long* arg)
{
float temp = *((float*)arg);
fixed32_t temp_fx;
FixedPointError err;
long ret = 0;
temp_fx = float_to_fixed(temp, &err);
if(err != NONE)
{
ret = -EINVAL;
}
*dest = temp_fx;
return ret;
} | 1 |
c6ca20034f7d9fe487cdb20a7332183d | b8e17daa3c17c9f03c92f6337e7221fe | 当前客户端被踢掉操作 | void onKick(String reason); | 1 |
86415953744056b866bf5e8dd614b161 | dd62b134d387d7959f723d44c436ebb5 | Removes the element with the key with the lowest rank for a subtree. | if (node == null) throw new IllegalArgumentException();
changeKey(node, root.key);
extractBest();
} | 0 |
a23331a36de5529fd828f54945817899 | ed74de4c3179b9e117f7515116455aea | ranks closer similarly looking characters | struct char_data **left;
struct char_data **right;
int leftlevel, rightlevel;
bool immsort = FALSE;
left = (struct char_data **)l;
right = (struct char_data **)r;
if (GET_LEVEL(*left) >= LVL_IMMORT && GET_LEVEL(*right) >= LVL_IMMORT)
{
l... | 0 |
d63194b3c99890818e27ed57d14904e1 | d357912edd374f6045259fc4f7578a40 | Parse listing of in-stock parts | local body, code, headers, status = https.request( url )
if code == 200 then
local parts = json.parse( body )
for i,p in ipairs( parts.results ) do
local msg = get_ldcad_part(p.part.part_num) .. ".dat"
local msg = msg .. ":[color=" .. tostring(p.color.id) .. "]"
local msg = ... | 1 |
7cb2f84f27ac14948c0e0e58a20292a9 | 9d0586a987dc122aa8545d8e6c2d3dea | metodos para elegir los vehiculos especificos en el escenario mediano | {
var criterio = _random.Next(0, 4);
double minimun = double.MaxValue;
int best_Vehicle = 0;
int c_Vehicle = 0;
Request request_Target = problem.Requests.Find(t => t.PairID.Equals(request_Source.PairID) && t.Origin != request_Source.Origin);
... | 1 |
ad2302c2742096af84007e9014fde9a0 | bee433f012ec962b6092279083d63ac9 | Возвращает все группы свойств объекта в массиве массивов идентификаторова полей | abstract class Field
public function get_propeties()
{
return $this->properties;
} | 0 |
1ee17d30e2041f38f1e055deb497356b | 5c6aaffe5855865af1629c8fcb55a7d7 | Returns the meta object for the attribute '{@link net.opengis.ows10.MetadataType#getAbout <em>About</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getAboutTemplate(); | 0 |
48e3c10109c324c61dc74d1da5240f6e | fd635a1aeacb6d708f1abaeb5eaee52f | Getter for <code>WETRN.V_OFFR_WITH_MS_GIFT.P_GENDR_ID</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.7.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class VOffrAllWithBestCostRecord extends TableRecordImpl<VOffrAllWithBestCostRecord>
public void setGGendrId(BigDecimal value) {
setVa... | 0 |
e736344ae687f6d63680d00e256c8cbe | c03b416ba61f57553511b72dac7bc203 | Возвращает нашу цену на портале с наценкой | class Exploitation{
public function getSellPrice(){
return $this->sellPrice;
} | 0 |
a797eb097704de4c4300ad0a1099f3df | 8043473a43422c5cefabe97cc0234139 | Returns the path to the "queries.sql" file. | public function getQueryPath(): string; | 0 |
d8d8210fb1851caf69dcba59bd87f96d | baba029d5e0888c16615e275cffecac0 | Leading exponent vector. | class HiddenMarkovModel(_Model):
def e(self) -> _tarray:
return _np.copy(self.__e) | 0 |
a8f3d1100c66539b188476523a38a411 | ee726ff63dacef07d19c7736e9b745b5 | 灌溉水质量增加与编辑 | $upload = new \Think\Upload();
$upload->maxSize = 3145728 ;
$upload->exts = array('xlsx','xls');
$upload->rootPath = './Uploads/';
$upload->savePath = '';
$info = $upload->upload();
if(!$info) {
$this->error($upload->getE... | 1 |
254aeacf3c2cde3bec36fa7d0afd701f | fcb16198514e842584c704f92acbefba | Dispatches a message originating from an admin to all handlers. | namespace mtgvrp.core.Discord
public class Commands
[DSharpPlus.CommandsNext.Attributes.Command("a")]
[Description("Sends a message in admin channel.")]
public async Task AdminChat(CommandContext ctx)
{
if (ctx.Channel.Name != DiscordManager.AdminChannel)
retur... | 1 |
db366029dd840b8bda328267fd0a7acd | bcb0cc6d08617bcd52592c33a2603cd0 | Write k-lines retrieved from Binance into a csv file | f, err := os.Create(file)
if err != nil {
return err
}
defer f.Close()
f.WriteString("\xEF\xBB\xBF")
wr := csv.NewWriter(f)
wr.Write([]string{"exchange", "symbol", "totalSum", "gridNum", "minPrice", "currentPrice", "maxPrice", "priceDifference", "averageIntervalPrice", "averageProfit", "averageProfitRate"})
... | 1 |
6fbc9e9cf4d1720968abd7bc487e3edd | da1745b5648e21c0ca69c4d086dc03c5 | 返回哈希表 key 中,所有的域和值 | public List<String> hvals(String key) ; | 0 |
6fde3ff9f41839b8704e6add3f6b55b5 | 60693c0f7562da477d498d1082db4f3b | Reset the alien shooting countdown. | public class AlienCountScript : MonoBehaviour
void Start () {
} | 0 |
64ca60128cc5473e8b811191108e3591 | 7e0770fca4dcbc329d9794eed56363a3 | Gets the error counter for corresponding channel. | @SuppressWarnings({"UnusedDeclaration", "UnusedAssignment"})
public class YSpiPort extends YFunction
public int getErrCount() throws YAPI_Exception
{
return get_errCount();
} | 1 |
db79e77e36ad48dc12952920ce82c0ae | 53e9fe56c3c67eb6762dcb323b4f136b | imprime lista enumerada de notas | i = 0
while( i < len(aLista)):
print(str(i + 1) + ". ")
print(aLista[i])
print("\n")
i +=1 | 1 |
8037123a173628e602eb8488618155c7 | 18ed9f4cb7a2def73a47660e36dadbd6 | GET /coin_attributes
GET /coin_attributes.json | class Admin::ClothingAttrsController
def index
@clothing_attrs = ClothingAttr.all
end | 0 |
563db7a025be646130647311e1fa2121 | f3e3dee4e7b8989e84be0bf24eed734b | Retourne la requête au format SQL | class Projet_Ldap extends Zend_Ldap
public function __toString() {
$sSelect = "(&";
$sSelect .= $this->sFrom;
$sSelect .= $this->sWhere;
$sSelect .= ")";
return $sSelect;
} | 0 |
b48c624bade318195931a592b7efc652 | 7e6442ba82213e2ce3fc9339a5b459e3 | 审核学分认定信息 | @ResponseBody
public String passCertificates(String certificates,
HttpServletRequest request) {
String loginName = request.getSession().getAttribute("loginName")
.toString();
Teacher verifyTeacher = teacherManager
.findTeacherByLoginName(loginName);
String[] strs = certificates.split(",");
List<Cer... | 1 |
e45e18e80f30fb252ebd5d32214c922d | 06f19b7cc0eaced858fc63ac45e44062 | Sorts the missions. | {
int index;
for (int i = 0; i < gameMissions.Count - 1; i++)
{
if (taskInfos[i].state == 1)
continue;
index = i;
for (int j = i + 1; j < gameMissions.Count; j++)
{
switch (taskInfos[j].state)
{
... | 1 |
0321cb3fcf55b79b8e383b0426659371 | 50c0e6dad35b8dc72f8a438734b5d66e | 测试MultiHeadedAttention的过程 | class MultiHeadAttentionTest(keras_parameterized.TestCase):
def test_attention_scores(self):
test_layer = multi_head_attention.MultiHeadAttention(
num_heads=12, key_dim=64)
query = keras.Input(shape=(40, 80))
output, coef = test_layer(query, query, return_attention_scores=True)
self.assertEqual(... | 1 |
745d39f0050d9262b089594e243bfc12 | 6fb50e538456ccd296cf9ffed6649530 | Stochastic gradient descent approximation to GLM
Approximates the solution to the CbRF method by stochastic gradient
descent. | alpha=0.05, grader=None, init_val=None,
groundtruth=None, record_all_loss=False):
self.n_iters_ = n_iters
self.eta_ = eta
self.sparsity_ = sparsity
assert alpha < 0.5
self.alpha_ = alpha
self.beta_ = init_val
self.grader_ = grader... | 0 |
619a7c1dacea9a5eb4fad620100ccae1 | 30c47ec33074aace7a8cf2fbf3ab1f05 | 批量更新操作,管理员无限制,商家只能处理自己的 | class StoreApp extends BackendApp
function batch_update_store_bm()
{
$fail_ids=array();
$ids = isset($_GET['id'])&&$_GET['id']?trim($_GET['id']):0;
if(!$ids)
{
$this->show_warning('store_not_exist');
return;
}
$ids = explode(',', $ids);
... | 0 |
ba0d92997f94c2b9f7e03fda6e53f096 | 79aff8aaaa1ac5bb647fab7492e622e3 | fast forward or rewind the video | class WebOsClient:
async def fast_forward(self):
return await self.request(ep.MEDIA_FAST_FORWARD) | 1 |
a357c3d4df6e56c4d7aa86d2ee046560 | 063e4a1d04ce991635563a95af615df0 | Mirror the CSS for right-to-left languages.
Takes and returns a list of source lines. | result = finder.mirror_sources(
os.path.join(settings.sample_path, 'components')
)
assert result == [
('twin_2.scss', 'twin_2.css'),
('twin_3.scss', 'twin_3.css'),
] | 0 |
88e9f88568ad553f111d1701f2e0987a | d26ee8fd7716a6d4faacbaf0f61632c2 | 根据时间戳,随机数,用户定义tokon生成加密签名signature 借用微信签名算法
加密签名通过SHA1算法加密 | class DingCallbackCrypto2:
def generateSignature(self, nonce, timestamp, token, msg_encrypt):
signList = ''.join(sorted([nonce, timestamp, token, msg_encrypt]))
return hashlib.sha1(signList).hexdigest() | 1 |
f779033117f81fc9fd0e4195839fb84b | 8a590df4aab1504a1aaef8e1324d1eb3 | draw from a uniform distribution over [0, upperBound) | int randLessThan(int upperBound)
{
return (rand() % upperBound) + 1;
} | 0 |
7d10f7b9b07b11f8e579241ca7d7d36b | 5df9e57771bf35e3a93aac1252b3f425 | Returns message id with < and > prepended and appended respectively
Required format for exchangelib filter. | class MailgunTrackingEvent extends Model
public function setMessageIdAttribute($value)
{
$this->attributes['message_id'] = preg_replace('/[<>]/', '', $value);
} | 0 |
c4f49c02c3cfa791cf3f080d13444347 | b40e1e83675540ca0a8a8be7e786bab2 | 在BaseFragment中加载RecyclerView对象 | public class BaseFragment extends Fragment
protected void loadingListView(RecyclerView recyclerView){
this.recyclerView = recyclerView;
} | 1 |
756123d3fce090fd3608f44cc546cd67 | af687f8d8c9ac8822e0bb2d8f803ab05 | 设置声音录制的最大时长 | @SuppressLint("NewApi")
class MovieRecorderView constructor(context: Context, attrs: AttributeSet?, defStyle: Int)
: LinearLayout(context, attrs, defStyle), OnErrorListener, Camera.AutoFocusCallback
fun setRecordMaxTime(recordMaxTime: Int) {
this.recordMaxTime = recordMaxTime
} | 0 |
ff07061928f2ed2bf8dccf3e02efe3ad | 08a5ac18dec95332cb25a9320dc2fff2 | compute the yaw between start point and global point | {
float x = EndX - StartX;
float y = EndY - StartY;
float hyp = sqrt(x*x + y*y);
return -90.0f + (57.2958f * acos(x / hyp));
} | 1 |
7042dcdc56bcfb816f4bc240a48534d9 | 9baadc8aaa10d28fca328043e215386d | 入力RowIndexをもとに、ペアとなる行を検索してペアRowIndexを返す | function getEleAffiliationRowIndex(curinput){
var row = getEleAffiliationRow(curinput);
return row.rowIndex;
} | 0 |
0897ea89a52c3ea43d4b8c009b06fc2f | efb69fc0af56c3b234639f364005fe44 | Analyzes post-level data to determine statistics about topic as a whole | self.default_reddit_submissions = self.reddit_op_handler.get_hot_submissions(fetch_limit=self.subm_fetch_limit)
self.avg_subm_title_size = self.calc_avg_subm_title_size(collection=self.default_reddit_submissions)
self.analyze_submissions()
if self.engage:
try:
... | 1 |
f855b50fc96210dafacc4c133c5b3558 | 4d1534efec4ecdc7e25d5cb0b7ea22a1 | #채용공고 게시판 등록 처리 | $data = array();
$boardParam = array();
$data = $this->input->post(NULL, TRUE);
$boardParam = array(
'categoryNo' => $data['categoryNo'],
'completeness' => $data['completeness'],
'title' => $data['title'],
'content' => $data['content'],
... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.