query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
8a55b41e882aa675585c55286476ef16 | b0d9d9a412d1c67b300d956b03be2b16 | 是否移除用户 | public class ApplyStatus extends NotesOperation
public ApplyStatus setRemoveUser(boolean removeUser){
this.removeUser=removeUser;
return this;
} | 1 |
32d00786b024ba107a85cb6d0cfc4e62 | a2afce32753cd86273e3813abc09cd84 | Returns a dictionary of arguments in the form required by
``pydy.codegen.ode_function_generators.generage_ode_function``. | kwargs = {
arg_name: argument_dict[self.input_mapping.get(arg_name, arg_name)]
for arg_name in inspect.signature(self.func).parameters
}
return kwargs | 1 |
2593a507cc3dd5a65f50ecc60a56cd8d | 8664163c4f2969e7afa8b49f92f8329f | Overload of the * operator for a Point and an integer
- input: (int) n
- output: (Point object) R | class Point:
def __ifloordiv__(self, n):
return self.move(self.x // n, self.y // n) | 0 |
369fe586879c119492b90604217c7ce0 | 587e88a0f0821bc85718383bb525b56c | Returns the value of the content-type header.
<br/>This method strips the parameters to return only the MIME type. | {
$contentType = static::getContentType();
if ($contentType) {
$contentTypeParts = preg_split('/\s*[;,]\s*/', $contentType);
return strtolower($contentTypeParts[0]);
}
return null;
} | 1 |
ee55697e76225956bd067535ed555e34 | 167d4302c4165cca65e1802b2c099b6b | returns true or false if an individual has been ranked by user (to be used by
Interactive Genetic Algorithm.) | bool returnVal;
if (neighbors_vars.neighbors[index].used==TRUE &&
neighbors_vars.neighbors[index].DAGrank < neighbors_getMyDAGrank()) {
returnVal = TRUE;
} else {
returnVal = FALSE;
}
return returnVal;
} | 0 |
31d54eba0a9f9351efbf27b2baef8954 | 8f80e0b0a54b045990674b87f067587a | Exit a parse tree produced by the {@code ipMasked}
labeled alternative in {@link IptablesParser#addressExpression}. | public class RouteCommandBaseListener implements RouteCommandListener
@Override public void exitIpAddress(RouteCommandParser.IpAddressContext ctx) { } | 0 |
b0345620e437fcd860b1c6d8b5538a77 | 1da62d84238d5f052bbc662a7744d55d | 验证产品序列号,并将错误信息设置到response对象 | public @ResponseBody boolean checkSn(String previousSn, String sn) {
if (StringUtils.isEmpty(sn)) {
return false;
}
if (productService.snUnique(previousSn, sn)) {
return true;
} else {
return false;
}
} | 0 |
57c85a0731db04020e0e445adb42ddad | 782fecebf8ecd33a6f1f8dfa424170f4 | Returns the month name for a given culture and month number | namespace NSoft.NFramework.Tools public static class CultureTool
public static string GetMonthName(this int month) {
return CurrentDateFormat.GetMonthName(month);
} | 1 |
d8b27ba1c565e6d6a8684ad532ae98e9 | 2fd494e6718ed928e79d889807e4a1c9 | Deze Methode haalt alle Oracle Virtueel Machines uit de databank. | public class VmwVirtualMachineClient extends VmwCoreClient{
public List<VirtualMachine> getAllVirtualMachines() throws Exception {
return getAllManagedEntitiesList(VirtualMachine.class, VsphereEntityEnum.VM.getVal());
} | 0 |
cef5f6f385cfcf3166f68766ec1d29cc | 7ce46e48ca4b12a9746942bc48f3eddb | $this->db->query("DROP TABLE IF EXISTS ".$this->table_name.""); | public function dropTable (); | 1 |
46e36f0d665bbc2eb382befec831b065 | 3c83513f21f59199192591f1d86b31f5 | 窗口加载时,加载年份下拉框数据 | $.ajax({
url:url+"/public/getYearList",
type:"post",
async:false,
success:function(data){
$("#yearID option").empty();
if(data.result){
for(var item of data.data){
var $opt=$("<option value="+item.FID+">"+item.YEARNAME+"</option>");
$("#yearID").append($opt);
}
layui.use("form",func... | 1 |
30ff35a690093e364ad70c9af63944cb | 8efd3d4c845a1eed1d3497c8820c3807 | # Select id of last posted answer | lastVal <- function(ID, LINES, sep=""){
VAL <- sapply(ID, function(X){
if(LINES[X]==""){
VAL = NA
} else {
VAL <- strsplit(LINES[X], sep)
VAL <- VAL[[1]][length(VAL[[1]])]
}
})
return(as.numeric(VAL))
} | 0 |
2b19af40554e1e3dd383bfce0dbe519e | e0859f5dd24a4fc108c517fa3feeeeb3 | Test block count function. | h = tr31.Header()
for i in range(0, 100):
h.blocks[str(i).zfill(2)] = "PPPP"
with pytest.raises(tr31.HeaderError) as e:
_ = h.dump(16)
assert e.value.args[0] == "Number of blocks (100) exceeds limit of 99." | 1 |
d9209bcbc291239524b9bbeb53e5a214 | 6f048e1394befa93d88e45553b0bf783 | When the simulation is over, this method can be used to visualize
the results of the simulation. | class AbstractSimulation(ABC):
def summarize(self):
pass | 0 |
bb10ae6da1be9bd0fbeb82c2ef418beb | 6332491aead283d08cbebb1c3e5c9575 | Browses forward in the table by using the data limit as the unit. | {
checkNotClosed();
try
{
if ( browser == null )
{
browser = table.getBTree().browse();
}
browser.afterLast();
clearValue();
}
catch ( IOException e )
{
throw new CursorException( ... | 0 |
ffa5ecf374f0f914e1d99b1ee381cdfc | 2bba17b8b53f1015121de29c5a382995 | returns trimmed string from the left | string LTrim( const string &s, char trim_ch )
{
string t = s;
t.erase( 0, t.find_first_not_of( trim_ch ));
return( t );
} | 1 |
5d50d732af0c4a967826095bd6f7e832 | b6263f7528f508c694d1fbc241aad5e7 | Enter a parse tree produced by the {@code atomExpr}
labeled alternative in {@link FilterParser#cond}. | public class brigBaseListener implements brigListener
@Override public void enterAtomExpr(@NotNull brigParser.AtomExprContext ctx) { } | 1 |
7b9f44371cdefb90c4a15a54d0919b60 | 6f49cb758ea2717565e4d389333f3850 | Set the minimum width of a grid column. The default value is 0. | public class Viewer3P
public void setWidthMinimum(int icol, int widthMinimum) {
_pp.getMosaic().setWidthMinimum(icol, widthMinimum);
} | 1 |
35acf46594874f3cbac427a23ca8dcb9 | 6719e07742b0350b0247787f8470710f | histogram dlugosci wyrazow | int main()
{
int c, i, j, nc, state;
int maxvalue;
int overflow;
int wl[MAXWORD];
state = OUT;
nc = 0;
overflow = 0;
for (i = 0; i < MAXWORD; ++i)
wl[i] = 0;
while ((c = getchar()) != EOF)
{
if (c == ' ' || c == '\n' || c == '\t')
{
... | 1 |
0af7ac86251fe35ef05e58622ed659e8 | 2e88e3cc60255421d9d21842bf791da5 | 没有反弹Buff 才释放这个技能 | if self.mRole == nil then
return
end
if self.mRole:isAlive() == false then
return
end
local base = SkillConfig.getSkillBaseInfo(self.mSkillId)
local config = SkillConfig.getSkillBuffInfo(base.caster_buff_id,base.quality,self.mLevel)
if config ~= nil then
local bActiveBuff = nil
if self.mTale... | 0 |
20e3730a5803e0942562cece029446d0 | fb44ed4e58c5fea91d3c56c747831295 | Long articles names should have slugs truncated | function vsm_truncated_names($name) {
$truncated_name = trim( wp_html_excerpt( $name, 30 ) );
if ( $truncated_name != $name ) $truncated_name .= '…';
return $truncated_name;
} | 1 |
f895c73f74238b3518e4f8f7d1b3a596 | 6952225241baf012905100992193792a | Преоброзование числа для записи в Базу данных
12030 => 12030, 1245,2333 => 1245.23 | if (stripos($num,'E')===false) return $num;
$num = trim(preg_replace('/[=\'"]/','',$num,1),'"');
$result = "";
while ($num > 0){
$v = $num - floor($num / 10)*10;
$num = floor($num / 10);
$result = $v . $result;
}
return $result;
... | 0 |
090f1a4427b44691a379e9c5128ba5f7 | ed4bb3d676d0638ff350f3b89e21bcf6 | Calls the drag method whenever the mouse is clicked. | public class DragLine
protected void mousePressed(MouseEvent event) {
if(!(isInDraggableZone(event))) {
return;
}
dragging = true;
y = event.getY();
x = event.getX();
} | 0 |
03bbf13fd231847a1577f191164625ab | 932c7d7be5d4adf6a8d6d436f2064549 | Fires when a connection request of a client has been denied. | namespace TankGameClient
public partial class GameClient
void ConnectionRefused()
{
if(OnConnectionRefused != null)
OnConnectionRefused();
} | 1 |
450c058cb3e435643b17ff7e6d0a8a3e | 38bb0eb2f353bc4f6d29c8a03aed9c02 | 根据亮度的变化修改当前的颜色 | Double valueBrightness = sliderBright.valueProperty().doubleValue();
ColorAdjust colorAdjust = new ColorAdjust();
colorAdjust.setBrightness(valueBrightness);
imageView1.setEffect(colorAdjust);
} | 1 |
7f3fd7154d4a5569bc384e8c7884294f | e7d48026da32dd4c7c32b01c4f766091 | GET TAX INFORMATIONS | global $db;
$return = array();
$sql = "SELECT taxKeyID, taxKeyValue, taxKeyName, standard FROM ff_taxkey WHERE (active = 1 and displayorder >= 100 and displayorder < 118) or taxKeyID = 126 order by displayOrder";
$result = $db->query($sql);
while($data = $db->get_array($result)){
$return[] = $data;
}
return $r... | 1 |
371adee6d917da55b32f9ff157af61e6 | ed040c39f7c38f8e9dec23dbb24998ae | The index page that will show the video | def index():
start = request.args.get('start')
if start == None:
start = 0
start = int(start)
video_urls = []
img_paginator = IMG_PAGINATOR
conn = db.create_connection(SQLITE_DB)
images_filenames = []
for i in range(len(videos)):
video_urls.append((videos[i][0], 'video_fe... | 1 |
49a81633f6fae5c303ec8a9b0211f14a | 3d1a11b53ca2c0a98e9a236fedb93108 | Remove the selected product from the shopping cart
and return the updated cart. | class ApiShoppingCartController extends Controller
public function destroy(Request $request, $id)
{
$request->session()->forget('selectedProduct');
return $request->session()->get('selectedProduct');
} | 0 |
8281888b06dd5c6a82440deb963917ca | 4632a7ee97e81c4d817ae080cfc76131 | set every entry to 0 | void zeroOut(int table[][20], int numRow,
int numCol)
{
for(int rIndex = 0; rIndex < numRow; rIndex++)
for(int cIndex = 0; cIndex < numCol; cIndex++)
table[rIndex][cIndex] = 0;
} | 1 |
8bac69b9b11dbaf14227638096ee5de8 | 1bb5605931f3f7ffdc950170a48e9bab | \brief Метод выполняет считывание значений напряжения питания. | {
uint16_t an_raw_val = 0;
float an_mag_val = 0.0;
float I = 0.0;
float M = 0.0;
float P = 0.0;
uint16_t D = 0;
uint8_t channel = 0;
float an_mag_val_real = 0.0;
float offset = 0.0;
channel = atoi(s_channel);
if ( channel >= NRO_ANINPUTS ) {
return(false);
}
signal_tkData_poll_off();
ainputs_prender_12V_sensors(... | 0 |
1cda1639afc01d72d56f0aad4ab5c39d | 3ac2b4c341020771dd3b07f0ea34eea0 | Clear the <see cref="ClusterId"/> property (cluster id is deprecated in AMQP 0-9-1). | namespace RabbitMQ.Client
void ClearMessageId(); | 0 |
3d6fef4c5847e055ee094d6df86d00d8 | 6dd516fc7262fc4c94d58ed56cb52882 | 查看lp索引为index的项 | class ListTest(unittest.TestCase):
def test_lindex(self):
return self.client.lindex(self.key, index=10) | 1 |
15e8709546ba548bd46ed3ded03174fb | 1ed12dd074289f6ee9bfc3c7cf22c179 | Copy a FITS header into a newly created array. Dynamically allocate
memory for the new header. | void delfitsheader(fitsheader *aheader)
{
fitscomment *thecomment, *copycomment;
if (aheader != NULL) {
thecomment = aheader->basecomment;
copycomment = thecomment;
while (thecomment != NULL) {
copycomment = copycomment->next;
free(thecomment);
thecomment = NULL;
thecomment = co... | 0 |
449f385e52b4c530a116a1b19314c18a | ab73c4d85aa224659740d7c61c333734 | 根据流程名删除所有流程部署 | @Service
public class ProcessDefinitionServiceImpl implements ProcessDefinitionService
@Override
public void cascadeDeleteProcessDefinitionByName(String processDefinitionName) {
processDefinitionManager.cascadeDeleteProcessDefinitionByName(processDefinitionName);
} | 1 |
4dd00450887b10d280a0a825140f4888 | 1e859816d27496f511cf7e7208ceb408 | Test that an exception will be raised if the data file cannot be found. | def test_load_schedule_data_error(tmpdir):
schedule_path = tmpdir.join(SCHEDULE_FILENAME)
config = MockConfig({"schedule_file": str(schedule_path)})
schedule_file_storage = ScheduleFileStorage(config)
assert not os.path.exists(schedule_path)
with pytest.raises(MissingSchedule):
schedule_file... | 1 |
296b4598e6d3701904dcd2475b6a3666 | dca99c51fa1aa8130f63448b2aa2c867 | Order by process instance id (needs to be followed by asc or desc). | namespace org.camunda.bpm.engine.runtime
ExecutionQuery orderByProcessInstanceId(); | 1 |
f079aa69151e90a12c4f9ed517dc1b9a | e632140980173b15045ecce95c6e67f5 | Fill the internal references cache | class Squinter(object):
def reload(self):
self.refs = dict(iter_refs(self._obj)) | 1 |
34b0c14484d450659dc4b09360a51a1d | b7a8ecdbb9f9a6c49b73b6d983fe4578 | A version of django.template.loader.get_template() that caches compiled
templates.
Returns a compiled Template object for the given template name,
handling template inheritance recursively. | class StatikTemplateEngine(object):
def load_template(self, name):
if name in self.cached_templates:
logger.debug("Using cached template: %s", name)
return self.cached_templates[name]
logger.debug("Attempting to find template by name: %s", name)
name_with_ext, provider_na... | 1 |
40f021edf743f41869c14ab903ab4953 | 35e74586c7f6ec9ed001b705dd96465d | Returns the minimum point for an unlimited number of point arguments | Point2D min=new Point2D(0,0);
Point2D miny = points[0];
double minx = Double.POSITIVE_INFINITY;
int i=0;
while(i<points.length){
Point2D tmp= points[i];
if(tmp.getY() <= miny.getY()){ miny=tmp; }
i++;
}
for(int j=0;j<points.length;j++){
if(points[j].getY() == miny.getY()){
if(points[j].get... | 0 |
09840b2d155089430655f1e428e3ea72 | 1c16be4d5f4e1b3faad9efaa76b51003 | 根据项目id查询子任务 | public Result findByProjectId(@PathVariable(value = "projectId") String projectId){
List<Subtask> subtaskList = subtaskService.findByProjectId(projectId);
return ResultUtils.success(subtaskList);
} | 1 |
d48827ceb57485569bfef72b23a9fba2 | ce8f5b8b38df74d8c5db8d762ed57004 | Get the first admin for a site | {
var adminUser = await Resolve<UserManager>().GetAll().IgnoreQueryFilters().Where(o => o.TenantId == tenant.Id &&!o.IsDeleted).OrderBy(o=>o.Id).FirstOrDefaultAsync();
return adminUser;
} | 1 |
d3b836ef226b36ead8c48fcebfe1e24d | cd0cff43d078c824dfa675ae6f0ae82d | Adds the armor recipes to the CraftingManager. | public class AltBalkonMod extends ShapedRecipes
private static void addRecipeBalkonWeapon()
{
ForgeRegistries.RECIPES.register(new AltBalkonMod());
} | 0 |
717f12f3b8fc0a8dca02d89963b0a418 | 6296f41bcfc1d3dca592bb96f3af2f71 | Test that a color does not exist and a 404 not found is returned. | {
$client = static::createClient();
$client->request('GET', '/doesntexists/');
$this->assertEquals(404, $client->getResponse()->getStatusCode());
$client->request('GET', '/category/r4nd0m1d');
$this->assertEquals(404, $client->getResponse()->getStatusCode());
$client-... | 0 |
65d610957e7abe5d966b1434abe563c1 | 26c69f711b409ca777c9f3b6394d1bb2 | Обработчик нажатия кнопки допуска +/-. | function clickPlusMinus(plusOrMinus, rowOrCell) {
if ( matrixSelector()!=0 ){
if ((document.getElementById(matrixSelector())) == undefined){addTable();}
var matrixId = 'matrix-' + matrixABChecker() + '-input';
if (rowOrCell == 'row') {
if (plusOrMinus=='plus'){
addRow(document.getElementById(matrixId).ge... | 1 |
10121eadeef83678a98ceb3e72baa7fa | f0176fe5e35f75c6c68ff1a21d57a989 | 解約条件_解約理由 を設定する
解約条件_解約理由 | public class Apl0004s03Entity extends PageBaseEntity
public void setNoPayReasonCode(String noPayReasonCode) {
this.noPayReasonCode = noPayReasonCode;
} | 1 |
27e55ca9d8effce367553a243e2a7329 | 2c16efed2b4da8c7d53e65dd5653c300 | False if work was already claimed by another worker | __attribute__((always_inline)) bool slow_cell_try_claim(queue_t *queue, int32_t version) {
queue_t old = (queue_t) { .version = version, .status = PENDING };
queue_t new = (queue_t) { .version = version, .status = CLAIMED };
return llvm_cas_ptr(&queue->value, old.value, new.value);
} | 1 |
d1be2d708e4c35997ccd90ac3b8a3643 | 20dc38583d820b9f69af6390fc255ead | Gets the permission resolver. | class CachedYamlFileLoader implements LoaderInterface, WarmableInterface
public function getResolver()
{
return $this->loader->getResolver();
} | 0 |
68928b90fec1121fc0f01fa33112a56f | df2d719291667ad1f2391dab2727ab4e | Given the outputs of `detect_single_image`, the np image itself,
the original filename, and a destination directory, selects the boxes and classes
that pass a certain criteria for our purposes and saves the image elements as
images in the given directory. | def draw_detections(df, img, filename):
font = cv2.FONT_HERSHEY_SIMPLEX
for index, row in df.iterrows():
x = int(row['left'])
y = int(row['top'])
w = int(row['width'])
h = int(row['height'])
text = row['text']
conf = row['conf']/100.0
cv2.rectangle(img, (x, y), (x+w, y+h), (255, 0, 255), 1)
cv2.putTex... | 0 |
03ebf6ac61520ba13f2368d4319e0ec6 | a5e5f1d4317f7661e0ac841a5e9fc59e | deze functie kijkt of er chips op het bord liggen, zo ja dan haalt die ze allmaal weg en geeft de punten terug | public class Yahtzee1 extends javax.swing.JFrame
private void berekenKnop22ActionPerformed(java.awt.event.ActionEvent evt) {
if (three2.isVisible() == false & carre2.isVisible() == false & full2.isVisible() == false & kleine2.isVisible() == false & grote2.isVisible() == false & topscore2.isVisible() == false & ... | 0 |
9bc88e8072529e5cbfac9b6bd096572a | 1a0d89b92ee28bd39151cb9e53d4bc54 | Generates an iterator that yields a 2 element array with the index and the element. | {
var i = 0;
foreach (var element in enumerable)
{
yield return new Tuple<int, T>(i, element);
i++;
}
} | 1 |
10078a9f94c952dd525fb1cd396e2473 | ec9f760ee3556a76058a2baf194b8421 | Gets (as xml) the "externalCustName" element | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Stcnsfib-Full-Type", propOrder = {
"custno",
"cname",
"chqDet"
})
public class StcnsfibFullType
public String getCNAME() {
return cname;
} | 0 |
80dbe71198ce5e8c4c7c1b60c5360c55 | d000c2db697789874c25c406e8feb5d1 | Test if there have not been a valid number of calls | class h323Only(PacketCollection):
def callExists(self, nbr=1):
idlist = self.getCallIds()
if len(idlist)<nbr :
return 0
else:
return 1 | 1 |
9625a8b620944bf8b59c0d5e62b743ac | cbdfae32cd1fa986939d6e1cb6862329 | generate an ACK packet,format:: opcode::blockID | class FileReader:
def send_ack(self):
fmt = '!HH'
data = struct.pack(fmt, OP_ACK, self.block_number)
self.send(data) | 1 |
e1125e5d1b8a21799b24f621c756860b | 5d7f1e63b75e194a636b8e38cafe57ef | Return the name of the template to use for 404 errors
Defaults to `404.html`, Django's default | class FluentContentsPage(Page):
def get_template_name(self):
return 'fluent_mezzanine/fluent_contents_page.html' | 0 |
7d3deaf27f568c9660ab0cc9630ba9ca | 45d4c3706d46072c4f635e7d8c09380a | Find exact term matches.
https://www.elastic.co/guide/en/elasticsearch/reference/6.2/query-dsl-term-query.html | namespace Nest.FactoryDsl
public static class QueryFactory
public static TermQueryBuilder TermQuery(string name, int value)
{
return new TermQueryBuilder(name, value);
} | 1 |
d4db1e6a1fc603be3866f8c4960e60fc | 9f5f0fa83dc3df3cb2a2fe923b4a5a24 | !
\brief Sets the number of outputs of self-organising map.
\note This function sets the outputs and automatically updates
\note the neighbourhood size and number of blocks. | void
DLP::set_Ne(int na){
Ne = na;
return;
} | 0 |
03be5661b2fd9d2e5bae160cee74fe37 | 800fa85bee6b4aaf93da29ecdced8bdc | 시계를 클릭하면 창을 최소화 시킨다. | void CDlgbarTop::ClickLblxTopbarClock()
{
::PostMessage( ((CFrameWnd *)AfxGetMainWnd())->m_hWnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
} | 1 |
3d0a74a36e8a37f7e994665193e8af43 | 1c5cb16559ce1be348d03ab6ef1ad48c | 获取指定能耗类型的名称 | for (ElectricTypeEnum typeEnum : ElectricTypeEnum.values()) {
if (typeEnum.getTypeName().equals(name)) {
return typeEnum.getType();
}
}
return "";
} | 0 |
109536f1d0c3ee45a4a75ddf590f8463 | 07bab72a1850c308c918c06120952aca | 确保模型的维度可以被头数整除 | class MultiHeadAttention(nn.Module):
def __init__(self, in_features, head_num, bias=True, activation=F.relu):
super(MultiHeadAttention, self).__init__()
if in_features % head_num != 0:
raise ValueError('`in_features`({}) should be divisible by `head_num`({})'.format(in_features, head_num))
... | 1 |
ba04092a3eff6f650159155dd0ab066e | de551a8e0eaa607fcef3eb471ca8c1b5 | Scrape data from a proposition detail page | async def scrape_detail(id):
url = DETAIL_URL.format(id=id)
data = await scrape_api(url)
if data:
await save_data(data) | 1 |
4f0eb2173354f4b84b86cb5b0652e0a1 | 5e505af499b6462dc21c269fa26dfb24 | Parse stations from the NWS all stations XML file. | def get_all_stations_xml():
r = requests.get(ALL_STATIONS_URL)
r.raise_for_status()
return r.content | 0 |
22d5bc38ece3c5163d77f7ab14007266 | 53c3da44b1c379ddc51f349513c00cb5 | computes the md5 hash of a string and returns as hex | namespace RedCorona.GameServer class Starter
public string MD5(string s){
MD5 md5 = new MD5CryptoServiceProvider();
return BitConverter.ToString(md5.ComputeHash(Encoding.UTF8.GetBytes(s)));
} | 1 |
868b8223be1e53a974d8a6136125f675 | 8abd451a900b764e6b8492bf27f9307a | Visit a parse tree produced by {@link sessionsParser#name}. | void visit(NameExpression nameExpr); | 1 |
0522fe16e99c3f23aa5971adeb3bf895 | 1620fa9cdaf3ffef24605d349856d04e | 绑定常用审核原因 | namespace FZYK .Core
public partial class ComboBoxBinder
public static void BindDealOpinion(FZYK .WinCtrl .YKComboBox cmb)
{
cmb .Items .Add("让步接收");
cmb .Items .Add("降级");
cmb .Items .Add("退货");
cmb .Items .Add("按废钢处理");
... | 1 |
b76317f1a35815475bf3856a2b936d2b | 40f984b6a9f209f0095c3bec0bb3983d | Проверка возможности доступа пользователя к глобальным путям на сервере | boolean hasGlobalAccessAllowed(); | 1 |
1dd5c0170fb65db8a96d0c4e8b8dd100 | 559d57cfb543f8d20b2a642f9f3b7272 | 取出mpApiArr中的所有item, 嵌套的对象数组 => API数组 | for(let i=0; i<Arr.length; i++) {
const obj = Arr[i]
if (obj.type === 'category') {
arr = pickupItem(obj.children, type, arr)
} else {
const descObj = obj.detail && obj.detail.description ? { description: obj.detail.description } : {}
const mpSupport = obj.detail && obj.detail.minVersion... | 1 |
950b6b9f0188f8be0af4c4b0c02dc58b | d02c4c1117fabf9becd2a94a0b6cd702 | Deletes users (as 'editors') aassociated with an article | {
$query = "DELETE FROM horacekv_articles
WHERE ID_AUTHOR='$userID'";
$result = $this->execute($query);
if ($result == null)
{
return false;
}
else
{
return true;
}
} | 0 |
29b0ee30c99e4bd818f94b7cd985b7fa | d874b2955f76bf1902dd254a534edbc7 | Returns a copy of our subresource. | class ResourceBuilder
def to_resource
__subresource__.dup
end | 1 |
604a8f3adaa32d9335585ed4456dac5a | e0ee82dada21139756fddbbc691bab1f | Reloads the used brushes. | {
this.RefreshHide();
this.UpdateBrushes();
if (this.Spell.IsStandardStyle)
{
this.UpdateStandardStyle();
}
else
{
this.UpdateCircleStyle();
}
} | 1 |
5c2cda784be42e63c017a54871763fd3 | c64cf49dae782b212fb20ee10d95d3cd | Updates subscription queries for process instances. | namespace org.camunda.bpm.engine.externaltask
UpdateExternalTaskRetriesBuilder processInstanceQuery(ProcessInstanceQuery processInstanceQuery); | 0 |
4c7ea87df73060be04d5d2f54a1c8164 | c822e2e63d4a7e4c3ca33cb09675ef23 | 故障模式处理,此处可以关机、关中断等,视具体情况而定 | void FaultHandler(void)
{
switch(BoardSt)
{
#if 0
case CURRENT_FAULT60:
if(warnlv < CURRENT60WARN || warnlv == CURRENT70WARN)
{
beepwarntime = 1;
ledwarntime = 1;
ledwarnmaxtime = RGB_SLOW_FLASH;
warnlv = CURRENT60WARN;
if(BigCurrenttime == 0)
{
BigCurrenttime = 1;
}
}
bre... | 0 |
a6336b0c86b30e435e4c0ea0af716b6c | f27b1770178d807827d6efe724011e3f | add servers to an existing model | def add_server():
data = json.loads(request.data)
ip_addr = IPModel.get_or_create(address=data["ip_addr"])[0]
ServerModel.create(ip=ip_addr, port=data["port"])
return 'OK' | 1 |
baab473ac06a8a59c414e58357c364e6 | 76163fcb619806816e4904180aed15b9 | Input : iJump absolute bit offset (0..(nr-bytes-treebody)*8)
Output : iByteNo the first byte containing the bits to extract
(0..(nr-bytes-treebody))
iBitNo the first bit to be extracted (0..7)
Returns : void
Notes : updates the iByteNo + iBitNo fields | unsigned int sj_num_bits;
unsigned int sj_last_joint;
unsigned int sj_i;
asm_mask &= SSM_JOINTS_MASK;
if (asm_mask == 0)
return (0);
for (sj_i = 0, sj_num_bits = 0, sj_last_joint = 0; asm_mask != 0; asm_mask >>= 1, sj_i++)
{
if (asm_mask & 1) {
sj_num_bits += 1;
sj_last_joint = sj... | 0 |
743ba8a58099d7fb2f0f5e764945fc9d | e85dcb35faea1dd8782424323f57cbea | Description : This function is RXIF2 interrupt service routine.
Arguments : None
Return Value : None | void r_scifa2_rxif2_interrupt(void)
{
uint16_t count = 0;
uint16_t dummy_fdr = SCIFA2.FDR.BIT.R;
while ((g_scifa2_rx_length > g_scifa2_rx_count) && (count < dummy_fdr))
{
*gp_scifa2_rx_address = SCIFA2.FRDR;
gp_scifa2_rx_address++;
g_scifa2_rx_count++;
count++;
}
... | 1 |
515899ef3271dfb0cea3293abe9467f7 | a44b87838a12f96f2191f7484f12787a | Return XPD pattern. In dB. | if ref is None:
ref = _defaults.SPL_REF
vals = _np.power(amps/ref, 2)
if total:
vals = vals.sum(axis=0, keepdims=True)
vals = _np.maximum(1.0, vals)
return 10.0*_np.log10(vals) | 1 |
94594aba099f542bad83623f106aa8af | 675cf7b0eafdfa2ba8320cb202bd1852 | Solve the board using a serial DFS search. This is a single-threaded implementation that
explores all possible solutions from a starting board configuration. | def depth_first_solve(puzzle: Puzzle) -> Optional[PuzzleNode]:
return helper(puzzle) | 1 |
42f2aa76177aa9dec37e782eba1ed01b | 8313ae46a06805ce9e91b5eb83774ddb | Updates queued Sales posts to be visible and alert users when
they should be posted. | class SocialFlow_Admin_Settings_Messages extends SocialFlow_Admin_Settings_Page
function update_queue() {
global $socialflow;
if ( isset( $_GET[ 'sf_action' ] ) AND ( 'update_queue' == $_GET[ 'sf_action' ] ) AND current_user_can( 'manage_options' ) ) {
$accounts = $socialflow->filter_accounts( array( array( 'key... | 0 |
cfa497c3625a5dc25feb8adc23d0896e | 58794ff277fb816c36063d686d2b1243 | Get the products in the cart as a Map | HashMap<Beer, Integer> getShoppingCartStorage(); | 1 |
db447d2d8b6fc03ac3ed621e8f91cda9 | 78e22489ee58243d31b7b7a04ad3f81c | 根据sUserId查找其权限菜单 | public List<Function> findMenuByUserId(String id) {
String hql = "SELECT f DISTINCT FROM Function f LEFT OUTER JOIN f.roles r LEFT OUTER JOIN r.users u WHERE f.generatemenu='1' AND u.id =? ORDER BY f.zindex DESC";
return this.getHibernateTemplate().find(hql,id);
} | 1 |
6d74e8dd5353fbae5c6fe7056159e342 | f782a7502557bbaba16b185ead88f49b | Removes the backslash from global PHP Classes (e.g. \Exception) | function escape_class($className)
{
return \str_replace('\\', '\\\\', $className);
} | 0 |
e7d9d310f54dbfa7336800a53631cb18 | 9f72474e1cefc16c0de283d9ab33e099 | Resets the console foreground color | void console_reset(void)
{
#ifdef _WIN32
console_set_color(7);
#else
printf("\033[0m");
#endif
} | 1 |
e5e1f940f09e7b1130b55968d32d8abf | c6562512822b1ad68af2024f3011da8b | 设置和得到该页显示的数据的开始元素的rownum | public class PersonNameSearch extends Pager
public void setRowStart(int rowStart) {
this.rowStart = rowStart;
} | 1 |
30846d0077b8793b4bdbe77434885f87 | 8937158afa762b94c45914cddb556546 | Add a required configuration item. Since no fallback is provided,
the configuration will fail to validate if no key is provided. | final class JWKSet extends AbstractJWKSetSource
public function addConfiguration(NodeDefinition $node)
{
parent::addConfiguration($node);
$node
->children()
->scalarNode('value')->isRequired()->end()
->end();
} | 1 |
9bde75012b049a66d95a1a59200eef40 | c69efe2fb0849696488a97dcf040f1fe | Scenario: A shearing transformation moves z in proportion to y
Given transform ← shearing(0, 0, 0, 0, 0, 1)
And p ← point(2, 3, 4)
Then transform * p = point(2, 3, 7) | public void AShearingTransformationMovesYInProportionToZ()
{
var transform = CrtFactory.TransformationFactory.ShearingMatrix(0, 0, 0, 1, 0, 0);
var p = CrtFactory.CoreFactory.Point(2, 3, 4);
Assert.IsTrue(transform * p == CrtFactory.CoreFactory.Point(2, 7, 4));
... | 0 |
ce49b2f87a34959ebbbe44eef9595e1a | 0aa7e28f909a5574d40c1f30bb1064c6 | Computes the precision, recall, f1-score and support for
each tag using sklearn. | def compute_f1_score(ytrue, ypred):
tag_level_metrics = dict()
for tag in Constants.header_classes:
ids = np.where(ytrue == Constants.header_classes.index(tag))[0]
if len(ids) == 0:
continue
yt = np.zeros(len(ytrue))
yp = np.zeros(len(ytrue))
yt[ids] = 1
... | 0 |
65edd1821629245cf8783caf4b51e50e | 31ea32a17b2980e20ae82049c38ca75c | Subtracts the one from priority. | int Element::PrioritateMinus() {
prio--;
return prio;
} | 1 |
f4c2e7d998e449e34bc91bd9264546cd | 538869040866dc51e6368261b328dd39 | Get browser name from Browsers.xml file | public class Utils
public static native String getBrowserName() ; | 0 |
b9341fab51e3d7a1dc6613254ecee4a3 | 7f61448ad6da3ef0f9cb03f40c5be655 | esto corre una vez, al principio | cases like (1) | 0 |
315cfa09e6b023e70dbe1e535b643285 | 8af0c7776be183d046bb0dbc9880264f | Fetch a list of external tools by course id. | class AnnouncementExternalFeedsAPI(BaseCanvasAPI):
def list_external_feeds_courses(self, course_id):
path = {}
data = {}
params = {}
path["course_id"] = course_id
self.logger.debug("GET /api/v1/courses/{course_id}/external_feeds with query params: {params} and form data: {data}".... | 1 |
e3ea17d621c285e5ed8c6566c9cb8871 | c7f930a68b5bd3f2a67f510ce448a70e | Register an instance of a StringConverter to be used for the specified type | where TConverter : CreeperConverter, new()
where TContext : class, ICreeperContext
{
_converters.Add(typeof(TContext).FullName, dbConverter ?? Activator.CreateInstance<TConverter>());
} | 0 |
e4313c3abfdc05c58737bceb755eea75 | 6f0c6bc157e09bcd31e72e9448903ad2 | 生成数据库连接加密字符串 | namespace baseclass
public class SqlHelper
public static string of_GetStrConn_Decry(string StrConn)
{
if (StrConn.IndexOf("##") < 0)
{
vf_GetDbtype(StrConn);
FactDbCONNStr = StrConn;
return StrConn;
}
string ls_s... | 0 |
61c0726a0fb63bb90a8e4097069b4fab | fc5923447fe81a42d0787ca3011a054d | Add appropriate form elements to the critieria form | {
$builder->add('value', TextType::class, array('label' => 'Valeur', 'required' => true))
->add('criteria', EntityType::class, array('label' => 'Sélectionnez le critère', 'multiple' => false , 'class' => 'AppBundle:Criteria', 'query_builder' => function(\Doctrine\ORM\EntityRepository $er) {
... | 1 |
98deaa11f9453d555f438d575060e468 | c5e671f26521776d6ef55932c7ce1ff1 | Try to register a new OAuth account. | namespace osu.Game.Online.API
RegistrationRequest.RegistrationRequestErrors? CreateAccount(string email, string username, string password); | 0 |
db000ccacdb0dd1d13b1418343e669b5 | 0035efbad4cded447c48b1ba7034640a | find new unclaimed cluster that can be added to the chain. | unsigned int find_free_cluster()
{
unsigned int i, j, cl;
for (i = 0; i < fat32_size; i++) {
read_sector(data_fat + i);
for (j = 0; j < 512; j += 4) {
cl = sector[j] + (sector[j+1] << 8) + (sector[j+2] << 16) + (sector[j+3] << 24);
if (cl == 0) {
return (... | 1 |
1aa09f1f79b4069741cc6ba06a614e3a | bd46b99f4d26910c752caea059e03ad0 | Gets a variable argument list from a buffer, not from stack. | unsigned int argCount,
...
)
{
VARIANTARG *pvargVariant;
va_list args;
va_start(args, argCount);
DEBUG_DECLARE_WIDE_BUFFER_IF_NEEDED();
while (argCount--)
{
pvargVariant = va_arg(args, VARIANTARG*);
DEBUG_WIDE(
"arg() %.8x, argsRemaining %.8x",
(unsigned int)pvargVariant,
argCount
);
__vbaFree... | 0 |
02f6da43f920c5549a23943344f0893c | 2d02b29d8d3521926a232421eed2d7a6 | Checks time to see if we need to keep moving. Rather than muck
about with clocks etc I have just used the number of calls divided
by 200 Hz as an estimator of the time this strategy has been in
place. | protected boolean shouldMove()
{
switch(r.nextInt(10))
{
case(0): return false;
default: return true;
}
} | 0 |
46199125c52c20d5c1c870b52940f4c3 | a447feebf922b7dfa84c91fec30d581f | Set sword show status in summoned character card | class DebugCard:
def setThundering(self, context:Context, value:bool):
pass | 0 |
ea85da8d3574526bb5cf45a36f7e572a | ff1033691a3a2d0deca38e831e527d72 | Funcion que retorna cantidad de marcas existentes | {
$sql = parent::$connection->prepare("SELECT COUNT(brand_id) FROM brand");
return parent::select($sql)[0]['COUNT(brand_id)'];
} | 1 |
9ef66efdb41b61b576d350b77926f47f | b7a52e431217d66c3c709a9523def363 | 结婚回复 | function My:RespMarryInfo(msg)
local treeEndTime = msg.tree_end_time
local treeIsAward = msg.tree_active_reward
local treeDailyTime = msg.tree_daily_time
local coupleTreeEndTime = msg.couple_tree_end_time
local knotid = msg.knot_id
local knotExp = msg.knot_exp
local coupleid = tonumber(msg.c... | 1 |
5d4d86f227b6154064e0971c59e550a0 | 9030ee4352c92d5dc63094fd8206f535 | Check if registration is permitted by the given {@link Site}. | {
$registrationEnable = Option::get(M::id(), 'registration_enable_'. SITE_ID, 'N');
if ($registrationEnable == 'N') return true;
return self::checkSpam();
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.