query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
9c69237bfe9ed2713be9109a31d2a78a | 5c8018202000a539974021424615f555 | Quit버튼을 눌렀을 경우 넘어가는 함수 | public class ButtonFunction : MonoBehaviour
public void quitNo()
{
gameCanvas.SetActive(true);
quitCanvas.SetActive(false);
} | 0 |
39eb42e981fd7dc30ab4fe2d0858aed3 | 8693882695938fac0b690a654069a719 | When transforming the thread dump back to a string, only
add the stack traces marked as visible. | filtered = []
lines.each do |line|
unless line.match(self.backtrace_filter)
filtered.push(line)
end
end
filtered
end | 1 |
cc1b4ffa405e3653253fc8b118168bb6 | ce43e02678961d9e1bf7b63496e9afa4 | 将内存中数据表格添加到Microsoft.Office.Interop.Excel指定工作表的指定位置一 | namespace UtilityLibrary
public class ExcelEdit : IDisposable
public void AddTable(System.Data.DataTable dt, Microsoft.Office.Interop.Excel.Worksheet ws, int startX, int startY)
{
for (int i = 0; i <= dt.Rows.Count - 1; i++)
{
for (int j = 0; j <= dt.Columns.Count - 1... | 1 |
54dbb3a7fead73098a265f1fc4eb7f3c | 0b4df194589acc9c557db5dc0c8ef682 | 判断字符串是否无符号整数 | public class DigitalUtils
public static boolean isUnsignedInteger(String str) {
if(str == null){
return false;
}
Pattern pattern = Pattern.compile("^[\\d]+$");
return pattern.matcher(str).matches();
} | 1 |
33c0a31d18fe19d15ac97f439fb7e2fb | db19cb80d430baaa74b67f618ddf4aef | 实现父类中的抽象方法,重写复制文件的方法体
如果文件复制成功返回TRUE,失败则返回FALSE | bool ExportThread::copyFile( const QString &src, const QString &dst )
{
return QFile( src ).copy( dst );
} | 1 |
e385b538484bd4929f63b10520fcbb16 | 22d01164a61c8055a985b23de3fe737a | Return a context manager that returns enter_result from __enter__, but otherwise does nothing.
This can be replaced by ``contextlib.nullcontext`` if we want to support only py>=3.7. | class WORawResultBase(_RawResultBase.RawResultBase):
def __enter__(self):
return self | 0 |
74d49b711c9ed080423ec477f3d1d4cd | 948d333be7fb63bb95c97aae79976a74 | 比较两个文件,输出不一致的句子。 | if cmpFile(self.file1, self.file2).fileExists():
fp1 = open(self.file1)
fp2 = open(self.file2)
flist1 = [i for i in fp1]
flist2 = [x for x in fp2]
flines1 = len(flist1)
flines2 = len(flist2)
if flines1 < flines2:
flist1[flines1:... | 1 |
c2632ab060b79fc516d80fa5d9b7d48b | 80a8684008244bc4a140eb0e34f9a713 | make these tainted in case anybody reads them | void taint_file_read(char * file, char *** flist, int *fcount,char *** clist, int *ccount) {
FILE * fp = fopen(file, "r");
if (fp == NULL) die("Failed to read taints list\n");
int cf=0;
int cc=0;
int * cp=&cf;
while (!feof(fp)) {
char ch=fgetc(fp);
if (ch==EOF) break;
if ... | 0 |
044087aaa1dbe4ab236724b2d7edb0a2 | 6c92c1a3b78d25eed79acb9ecd228710 | Utiliza la base de datos para insertar un nuevo fichero al sistema
y devuelve el id del repositorio donde se sube | @Repository
public class FileDAO
protected int store(File file) throws DataAccessException {
jdbcTemplate.update(STORE_SQL, file.getName(), file.getLocation(), file.getSize(), file.getDate(), file.getCourseId(), file.getUserId());
return jdbcTemplate.query(GET_MAX_FILE_ID_SQL, new ResultSetExtractor<Int... | 1 |
3f0d7e9c069e037e0990a4432169a533 | 35403c1ece3f06a867bfc49a14e26970 | 根据 机器名或IP地址 判断证书是否在 相应的存储区的名称、位置中 已经存在 | @WebMethod(operationName = "TestOldShiGongCertSlbIsExists", action = "http://tempuri.org/TestOldShiGongCertSlbIsExists")
@ResponseWrapper(localName = "TestOldShiGongCertSlbIsExistsResponse", targetNamespace = "http://tempuri.org/", className = "com.webservice.client.TestOldShiGongCertSlbIsExistsResponse")
p... | 0 |
bd90466999ff721b02067219e2843c29 | b223ec66314c7a3c942f80fafd9dd341 | Queries whether color writing is enabled. | M3G_API M3Gbool m3gIsAlphaWriteEnabled(M3GCompositingMode handle)
{
CompositingMode *compositingMode = (CompositingMode*)handle;
M3G_VALIDATE_OBJECT(compositingMode);
return compositingMode->alphaWrite;
} | 0 |
68e5aa527c4f810e06b76a23ab6c470d | 377c8446a9192a6547e562f35d4376f4 | Подготовка формы и отправка диалога | class MessageController extends JAppController
public function actionDialog($id)
{
$offer = Offer::model()->find('(id_reciever = :id_reciever AND id_sender = :id_sender) OR (id_reciever = :id_sender AND id_sender = :id_reciever)', array(
':id_reciever' => Yii::app(... | 1 |
323114c55bbf5acb67bcc9750d21fefa | caafc890d828636a1d7f5cbf96fca653 | Generate a JSON data of cost forecast | data = get_forecast()
respond_to do |format|
format.html { render json: data }
if params[:callback]
format.js { render :json => data, :callback => params[:callback] }
else
format.json { render json: data}
end
end
... | 0 |
cf7f9632443ae4ab5c0fe57c423f5966 | ad76176531cbda2c1b47c0bf422dd3b0 | tests getter for number of toppings | maxToppings() {
let toppingValue = document.getElementById('id_topping').value;
switch (toppingValue) {
case 'CH':
return 0;
break;
case '1T':
return 1;
break;
case '2T':
return 2;
... | 1 |
5f811b977f4a672d09e38fffeddff7c2 | 15d17646370f3f2e20937455304d46eb | Calls the ActionHandler to do the work and changes our state accordingly | public class RemoteActionsHandler
public void doAction()
{
selectedAction.doAction();
} | 0 |
cd0e81302d0fd10f452dd70715d231ac | 8e7ccc70d50328ad22a12aaeb22c02b8 | 把尺寸描述结构转换为实际的游戏屏幕尺寸 | def create_actual_sizes(scr):
def conv(tup):
return (math.floor(tup[0] * scr.height_in_pixels),
math.floor(tup[1] * scr.width_in_pixels)) | 1 |
afc41557061cacfb96df1f9e1f0e6299 | 4958c1405fd9a70b0eff869662510183 | Test very basic single argument parsing | options = core.Options(
arguments.Argument('myarg'),
)
dummy_tokens = DummyTokens('myval')
kwargs, blocks = options.parse(dummy_parser, dummy_tokens)
self.assertEqual(blocks, {})
self.assertEqual(len(kwargs), 1)
dummy_context = {}
self.assertEq... | 1 |
5ea7434cc7c657f6fa31cca25b4e8409 | fdc842a2acab9838cf968aea24526b5e | equation index: 72
$DER.Gate_Angle = Gate_Rotation | class GDALParameters( object ):
def g_rotation_GT_4( self ):
return self._rotation_GT_4 | 0 |
4a82338fde65043291d3eccbd9000107 | bcb94be4c3aa8bb59d56769e037c9386 | metoda sorteaza filmele (care au fost deja sortate in functie de filtrele primite) dupa
durata acestora
filmele se compara prima data dupa durata, iar al doilea criteriu este titlul | for (int i = 0; i < movies.length-5; i++) {
for (int j = 1; j < movies.length - i-5; j++) {
if ((movies[j - 1].getRunTime() > movies[j].getRunTime())) {
Movie temp = movies[j - 1];
movies[j - 1] = movies[j];
movies[j] = temp;
}
}
}
} | 0 |
012664e20f06f47cd8d0ace9db014af3 | 18e3357a8b6abe81f5bcdcc4c20415b0 | sorts given array according to BubbleSort algorithm in ascending order. | {
int sorted{};
for (int counter = 0; counter < length; counter++)
{
for (int counterS = 0; counterS < length - 1; counterS++)
{
if (array[counterS] > array[counterS + 1])
std::swap(array[counterS], array[counterS + 1]);
}
sorted++;
}
} | 1 |
ffa42b24265ff1454a8d32b28418c532 | 2ffac5e32751f73f6bd372e469364d7e | Coordinates of the right handle (after the control point) | public abstract class QuadCurve2D implements Shape, Cloneable
public abstract double getCtrlX(); | 0 |
9e767745797d8b8472ce3d22a23eb626 | b9e2a2c45e6b910fd517d66e03599a49 | Exit a parse tree produced by {@link GrammarParser#rating}. | public class CRONBaseListener implements CRONListener
@Override public void exitRate(CRONParser.RateContext ctx) { } | 0 |
e465ce55ef759af3e84a4f29c89b1460 | 36db0d0f2225682fd8c3f2e9ad6ff99d | Defining "UserInput" function. Takes user's response and processes output based on it. | public class MainWindow extends AnchorPane
@FXML
private void handleUserInput() {
String input = userInput.getText();
Response response = duke.getResponse(input);
String responseMessage = response.getMessage();
dialogContainer.getChildren().addAll(
DialogBox.getUserDi... | 1 |
1921d1875828a1f21e69db0dbc559180 | 958676b880e8e48abec7a312b4611d30 | Serial Port Selected
Get the serial port stored in the preferences file
Returns:
str -- port id ex 'COM1 | try:
with open(self.last_save, 'r') as file:
lines = file.readlines()
lines = [line.strip() for line in lines]
for line in lines:
if 'DEFAULT_COM_PORT' in line:
saved_com_port = line.split('=')[1].strip()
... | 1 |
1541504227a52ad418e6138c53431ec3 | 8115b81bff243c9f615611ffaf899d40 | after this call OTTO is no longer in reset state | {
pSo2rHardware->setMockRxSelect(MANUAL_SELECT_AUTO);
pOtrsp->accessProtectedGetRxSwitch();
pSo2rHardware->setMockTxSelect(MANUAL_SELECT_AUTO);
pOtrsp->accessProtectedGetTxSwitch();
pSo2rHardware->setMockPttSwitch(PTT_OFF);
pOtrsp->accessProtectedGetPttSwitch();
... | 0 |
3d048687ee2ca661a0240c7acd8fe5b0 | 4fa2ebbd8dbdf690281c73a2696665a4 | Test unique where filter properly reports an error when conditions are met. | class UniqueValidatorTest extends WritersTypeTestCase
public function testErrorWhenUniqueWhereIsMatched()
{
$validator = new Validator($this->connection, 'writers', null, null, ['name' => 'Leo Tolstoy']);
$is_unique = $validator->uniqueWhere('name', ['birthday < ?', new DateValue('1900-01-01')]);
... | 1 |
064ca70e9cb28f8a06c9a24a8432300e | e3b25b4fbfe6a16d4cf5ab7d622bfa38 | 双击托盘图标 显示当前窗口 | namespace Shortuts
public partial class FrontWindow : Form
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
this.Show();
} | 1 |
fad24fb7d77c1717ffe63629ba0f8b27 | b8fceed1f63aabdaa5cb87fd94b2b365 | Filter the query on the messate column
Example usage:
<code>
$query->filterByMessate('fooValue'); // WHERE messate = 'fooValue'
$query->filterByMessate('%fooValue%'); // WHERE messate LIKE '%fooValue%'
</code>
Accepts wildcards (* and % trigger a LIKE) | abstract class BaseJobLogQuery extends ModelCriteria
public function filterByMessage($message = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($message)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $message)) {
... | 1 |
35fa7038137c7c38f33a7ac7a25cf679 | 1e30c79cdd0253b36636f5fa11db1471 | Gets a virtual network rule.
```
az mysql server vnet-rule show [--ids]
[--name]
[--query-examples]
[--resource-group]
[--server-name]
[--subscription]
``` | @ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<VirtualNetworkRuleInner> listByServer(String resourceGroupName, String serverName, Context context); | 0 |
cef7c95d52d4882a6d0f5e7e04f6020a | 9d7333decd8b07a7295f4317608e46e3 | 获取机器人通话时长,单位:秒 | @Slf4j
@Service
public class RobotHandler implements AdmissionHandler
public Integer robotOperatorTime(DecisionHandleRequest request) {
Integer count = 0;
List<JSONObject> operatorCallDetail = this.mongoHandler.getUserOperatorCallDetail(request);
if (null != operatorCallDetail && operatorCallDet... | 1 |
91f7540275d67897c95d1a8b1f541842 | ce68fc755b283b496601f66420cca8ec | Path du fichier contenant la table de correspondance entre les anciens
identifiant et les nouveaux | class Evenements
public function getFsComptaCollArch() {
return $this->fsComptaCollArch;
} | 0 |
8af1eb33c46045b483e1fa60c869fa34 | 596767307c851b137d8c1a656f0c80a6 | objectのリストをAction型のリストへと変換します | var act_list = [];
for (var i = 0; i < _actions.length; i++) {
var action = _actions[i];
var act_render = action._render;
if (act_render.type == OBJ_ANIM_TYPE_OBJECT)
act_list.push(action);
else if (action._render.type == OBJ_ANIM_TYPE_MATERIAL && (obj.type == "MESH" ... | 1 |
d6cc67381ab2231561c0333abd037725 | e4abfaf52e4d7950efa7b8076f88be91 | Executes an async action with repeats if the action throws an exception. The action is retried with a 1 second delay each time. | {
if (asyncFunc is null)
{
throw new ArgumentNullException(nameof(asyncFunc));
}
return RetryAsync(asyncFunc, CancellationToken.None, new Count(10), new AnyExceptionPolicy(), continueOnCapturedContext);
} | 0 |
544ee078b31234114b8503368d5c8081 | 35655f1201722c76eed48604c540096e | 获取距离最近的超人作为攻击目标 | if others == nil then return nil end
local target = nil
local dist = 10e20
for i, other in ipairs(others) do
if not other:isDead() then
if other:getPosition().x > BATTLE_AREA.left - 50 and other:getPosition().x < BATTLE_AREA.right + 50 then
local qualified = true
... | 1 |
205dee96d3851be3a068c0d5d95f5d4f | 84e64ebbe5089c894c87b498d5bbed52 | delays loading of youtube embedded videos | let vid = document.createElement('video')
vid.autoplay = "autoplay"
vid.loop = "loop"
vid.className = 'video-spot'
vid.preload = "auto"
$(el).append(vid)
let source1 = document.createElement('source')
source1.type = "video/mp4"
source1.src = "media/2MASS3-vid.mp4"
... | 0 |
3658528193dfcb04926698f0a5bf874b | 56f4ea6eac3067d15dfd6c1c928ecada | Provide the URL of a Consul server. | class ConsulSource(Source):
def __init__(self, root, namespace=None, http=requests):
self.root = root.rstrip("/")
self.namespace = namespace
self.http = http
self.reload() | 0 |
795893ca4e4c0e5882f05b20880469ff | e57740b5391dd5a3a9c5df44e394f12b | Given a resource id, determine the storage node on which is resides.
StorageNodeId, RepNodeId or AdminId
StorageNode cannot be determined or if the resource id is not an
id that equates to a StorageNode component, return null. | @InterfaceAudience.Private
public abstract class INode implements INodeAttributes, Diff.Element<byte[]>
public abstract byte getStoragePolicyID(); | 0 |
b6bcc77082fdcfb8fd94d9eb2fb82a12 | 5ea0f10fab461cb9514e66b08f8c1c66 | Gets the type of this meeting (meeting types are user-configurable) | class MeetingModel extends RoyalwissDModel{
public function getMeetingType($meeting_id){
$record = $this->where(['id' => $meeting_id])->find();
return $record['type'];
} | 1 |
c8876ad153ce9f4252dccb514b0209c5 | 08e3f8806d2d48ce170ca3c59c115d5b | Get the step name of the task node. | nodeArgs = get_immediateNodes(Step, 'NodeArgs')
if nodeArgs[0].hasAttribute('status'):
return nodeArgs[0].attributes["status"].value
else:
return None | 0 |
cd217023530faf00cae0f9b2afcde969 | 60a32506093cb828c5a3d6b2108569f3 | ExecMaterialRestrPos
Calls tuplestore to restore the last saved file position. | def restore(*args):
pass | 0 |
3535ff976b65481ba806e0c610a32e17 | 69a273f6ca15bd268ad3bc0b7bddb60c | @brief Controlla l'esistenza di un arco nel grafo | bool ArcGraph::hasArc(int from, int to) const
{
for (Arc *current = first; current; current = current->next)
{
if (current->begin == from && current->end == to)
{
return true;
}
}
return false;
} | 1 |
da5e01860f57c8e1562a2b6c7dca2360 | 01b8a4073a1f1ace156a4619217bc71f | Return boolean that determines if another object blocks the light source from current object | class AStar:
def check_for_light(self, i, j):
for c in self.blocked_by_light:
if c.i == i and c.j == j:
return True
return False | 1 |
a703240766ad7426211c60c4e1583a22 | 13a12e87c1d11899da4e4a6e8a8bbb3f | Get <see cref="SmtpSettings"/> profile with given name, or null if no profile found | ISettingsProvider? GetSettings(string? settingsName); | 1 |
7fed7d1099df1618af54dcee867f537c | 1413e9c30e2617fda0be9f20b02e454b | Creates force objects that can be referenced by the body object.
You can have multiple references to the same force object. | export class D3ViewComponent implements OnInit
initializeForces() {
this.simulation
.force("link", d3.forceLink())
.force("charge", d3.forceManyBody())
.force("collide", d3.forceCollide())
.force("center", d3.forceCenter())
.force("forceX", d3.forceX())
.force("forceY", d3.forceY... | 1 |
bb79275f9c4d361c58e9e426f0cf0238 | 5aa022ee6595bb96c11f3d9ca78d70bf | check whether two link list are identical or not | int CompareLists(Node *headA, Node* headB)
{
Node *t1 = headA;
Node *t2 = headB;
int val = 1;
while((t1 != NULL && t2 != NULL))
{
if(t1->data==t2->data)
{
t1 = t1->next;
t2 = t2->next;
}
else
{
val = 0;
break;
... | 1 |
52e7e2fcbfdcc8b5c7cb320f4d08b017 | 86a282d09c66c0ee53ed43903b4e172c | ? Subtract two unsigned 32 bit numbers | void IntAllegrex::SUBU() { if (!_Rd_) return; _rRd_ = u32(_rRs_) - u32(_rRt_); } | 1 |
a5279a9ea92d25a4f06b9ebcec0eca04 | 31b6949ae9c457e0caac765955ba2aed | funzione per controllare se il nome del campo è all'interno dell'array dei campi da disabilitare | let e = event.nativeEvent.target;
let prop = e.name;
this.isFieldValid(prop);
} | 0 |
0c2b6bcebacc64b931b35b71f614695a | 4c691130ca0799eb9055a04ccbce30a8 | Called from 'find_id_moniker'. We tried to lookup a moniker, found a hook, but found no stored moniker. So we'll try and autogenerate one. | {
int r_idx;
get_mon_num_prep(vault_aux_simple, NULL);
r_idx = get_mon_num(dun_level + 10);
get_mon_num_prep(NULL, NULL);
vault_aux_char = r_info[r_idx].d_char;
} | 0 |
ed0dee6551150e6a5dfc2078959dc325 | 68bf96360a3402f8774df97093bd8f92 | Updates the specified scan configuration.
`projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. | ListScanConfigs(new ListScanConfigsRequest
{
Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)),
PageToken = pageToken ?? "",
PageSize = pageSize ?? 0,
}, callSettings); | 0 |
8c1a93c525c42eb7b49bbdde165a37b7 | d2255365114581fbed8f2e6b0597c546 | Retrieves the currently set URI of OpenSearch Description Document. | public class NCLImport<I extends NCLImport, R extends NCLRegion> extends NCLElement implements Comparable<I>
public String getDocumentURI() {
return documentURI;
} | 0 |
6a590a1a1ffedcfe6424346cf69f9c1c | 5e1ddec227aa3af21a69740ea3c6ff00 | Function called when sliderbar is dragged (scrobble feature) | sender = self.sender()
if isinstance(sender, QSlider):
if self.user_session != -1 and self.player.isSeekable():
self.player.setPosition(self.duration.value() * 1000) | 1 |
041565eadf420d68d3a882cc56ee57fa | c72df9fd950e886c3e03aa0e34ff6984 | 檢核發票資訊 | namespace Model.InvoiceManagement
public static partial class CancelInvoiceRootValidator
public static Exception CheckMandatoryFields(this CancelInvoiceRootCancelInvoice invItem,GenericManager<EIVOEntityDataContext> mgr,OrganizationToken owner, out InvoiceItem invoice,out DateTime cancelDate)
{
... | 1 |
cafdd47affda4a87bacbdeb4a0390599 | 1a36d1824df55f482dc7f3e878a30f0a | @brief Callback for a radio button change | g_obj_st *g_obj;
radio_st *radio;
bool bRefresh = false;
if(_g_obj != NULL && _obj != NULL) {
radio = (radio_st*) _obj;
if(radio->state == 0 && radio->id == *(radio->pCurrentId)) {
radio->state = 1;
bRefresh = true;
}
else if(radio->state != 0 && radio->id != *(radio->pCurrentId)) {
... | 1 |
7ce8a39d2b19831f26fd600cdaf21789 | 0e2162c6fa04ba3e96c1d29b0838d810 | Has dependency on another dll, needs assembly resolution | public void ResolvingSimpleDependency()
{
var builder = new ContainerBuilder { ResolveImplicit = true };
builder.Register<ClassB>().As<InterfaceForClassB>();
builder.Register<ClassV>();
var factory = builder.Build();
var resolvedInstance = fact... | 0 |
bf1e881f95c32af9e4b52dd2348fb497 | 5d0251b2e3e30c8f7c53dff2dc512258 | Insere o rodapé na tabela de dados do relatório | class reportQuadrante extends mpdf
protected function getFooter() {
$retorno = "<table class=\"tbl_footer\" width=\"1000\">
<tr>
<td align=\"right\">Página: {PAGENO}</td>
</tr>
</table>";
return $retorno;
} | 1 |
bda1e6c5a032e640fc16862612b915b8 | 1105f4526d6970e30fd1e7f20c01e080 | GET: AspNetRoles/Create | namespace WebApp_.NetCore3._1_with_custom_identity.Controllers
public class RolesController : Controller
public ActionResult Create()
{
return View();
} | 1 |
dff90a200d073eb50dc3c31f31908078 | db5c07a7e1a0367b3c1d31a758fc40d0 | 将页面数据存储Cookie(班级、课本、单元、题目) | function loadCookie() {
if (Common.Cookie.getcookie("TaskSub") != Subject) {
clearCookie(1);
} else {
var tmpDeadline = Common.Cookie.getcookie("Deadline");
if (tmpDeadline) {
$("#deadline").val(tmpDeadline);
autoSetWeek();
}
classArray = Common.Co... | 0 |
d0e3da8bc5a3ec0834c462350097c587 | 3589ca3f3673b51698d62e195b6b665a | ==========================================================
<T>设置双精度浮点数。</T>
========================================================== | this._ensureWrite(this._pos_ + 4);
this._d_.setFloat32(this._pos_, value, this._xd_);
this._pos_ += 4;
} | 0 |
fb37f080a7e695f5aa632eef00d03f87 | e8745f8bddfb93944cc77d6b41cc5100 | Possible directions returned by update_direction | if (alive) {
return direction.getPossibleDirections();
} else {
return new Direction[0];
}
} | 1 |
45412b6f8bbd9e1346334f68994aaeca | 837d17da5a7d391c5b5171a08e2da615 | Delete an existing model deployment and relinquish all resources associated. | {
using (var _result = await operations.DeleteDeploymentWithHttpMessagesAsync(resourceGroupName, name, id, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
} | 1 |
b7379fa20eda9d0fede3176c595036ef | 9f856899a80d4f23b047793fe88d2b0b | -------------------------------------------------------------------------------
CanChangePasswordUser
can we change the provided users password?
------------------------------------------------------------------------------- | public boolean canChangePassword(Connection con, int userSid) throws SQLException; | 1 |
83e12546c35517d21c35ebbc62b5d687 | 5a2ec2bdb27c8e46fbe8988eeb85e750 | Gets the issue tracking ticket for this Dataset. | self.action = action
if issue_json is not None:
self.json = issue_json
self.json['datasets'] = dset_list
self.issue_path = issue_path
self.dataset_path = dataset_path | 0 |
f7decfb0ff5c38b040399eb1c563559c | 10a109bbebf3d8513c1ebd494458c098 | Set the name. Throws IllegalArgumentException if name is an empty string (length 0),
or if name is a null-reference. | {
_name = aName != null ? aName.intern() : null;
} | 0 |
2d139853777f9b96bbb1abdd97e71730 | 2bffca234abd72e93e4ba1b1780d1356 | 13 is PlayerProjectile layer | static void ActorProjectile (AActor *defaults, Baggage &bag)
{
defaults->flags|=MF_NOBLOCKMAP|MF_NOGRAVITY|MF_DROPOFF|MF_MISSILE;
defaults->flags2|=MF2_IMPACT|MF2_PCROSS|MF2_NOTELEPORT;
} | 0 |
c75b4b3ea04f651d44a781026ee587ed | fb2cb6f1405b4d5a8aed22186e13dc88 | Returns the relative "gray" level of an RGB value | return relativeLuminance2(
(rgb >> 16) & 0xFF,
(rgb >> 8 ) & 0xFF,
(rgb ) & 0xFF);
} | 1 |
42e149e39341bea48a7a43658324ef85 | 1ac252b29c8c57a7dafae6d2799ce36c | 将输入的数据集做验证,返回正确的样本数 | is_features_discrete):
num_sample = len(data_set_validate)
error_count = 0
for i in range(num_sample):
classify_result = classify_by_tree(input_tree, data_set_validate[i], features_list, features_dict,
is_features_disc... | 0 |
23292c242b6b0d36c1f5ddbe7a6120a3 | 9bc7cae419e3fa95128e1ba0ad7881ba | Преобразует массив PostgreSQL в массив php | class BaseMaker
// https://oracleplsql.ru/system-tables-sqlite.html
// http://labaka.ru/tools/obyortka-dlya-raboty-s-pdo
// http://codeharmony.ru/materials/137
public function quoteArray($arr)
{
$result = array();
foreach ($arr as $val)
{
$result[] = $this->db->quote($val);
}
... | 0 |
79bfa49608c3beb77a14b52514d86e67 | 2f384391cec93f46e9c0d0beb8d8fc3b | Returns a colour based on menu UI position. | offset = 255 - offset
if offset < 85:
return (255 - offset * 3, 0, offset * 3)
if offset < 170:
offset -= 85
return (0, offset * 3, 255 - offset * 3)
offset -= 170
return (offset * 3, 255 - offset * 3, 0) | 1 |
2475bc654185f743f1dbbd0fb5c24529 | 7b0ef4f8785e0fdfbf7bb65b75f1385b | 验证text的MD5加密串是否sign一致 | Arrays.sort(textArr);
final StringBuilder sb = new StringBuilder();
for (final String s : textArr) {
sb.append(s);
}
final String plainText = sb.toString();
return DigestUtils.sha1Hex(plainText).equals(signature);
} | 0 |
9b80561649804a4a8066b23df487119a | 90c8fd152167ada29fda5c676b3951e6 | Включает либо выключает кнопку удаления записей при изменении выделения внутри таблицы. | export class DataGridComponent implements AfterViewInit, OnDestroy
set selectable(value: boolean) {
this._selectable = ConvertBoolean(value);
} | 0 |
d171f89afd1daedc1d4b26fa08fb1470 | 690243358b8a3685f30d2490e9c74140 | 获取手动入库列表 | function getInList() {
var query = {},body = {};
query = {
id: $.getQueryString('id'),
pageNum: currPage,
pageSize: 10
}
$.getData({
url: 'depotInManage/depotDetilOperation',
query: query
}, function(... | 1 |
2e2bada8937f49644015a057ab0f246e | 489de25e9d02615e7d6aa61731d24482 | Return the state of a given vchan connection | vchan_check_args_t *args = (vchan_check_args_t *)data;
camkes_vchan_con_t *con = get_vchan_con(run_vmm, args->v.dest);
if(con == NULL) {
DVMVCHAN("Domain %d, has no vchan component instance\n", args->v.domain);
return -1;
}
args->state = con->status(args->v);
return 0;
} | 1 |
96f410fa2ea9a1a7b7a22c622ccbca8f | 9e72d49c3562ad45a1d069d34340411a | \brief AES interrupt handler
\note AES interrupt subroutine in Electronic Code Book (ECB) mode. | __weak void AESCCM_IRQHandler(void)
{
while (true) {
}
} | 0 |
844029dd7d4a6259d9a4c0173445013f | 8476d367c48c788cb9a2ad7adc74766a | This method is called each time a new value is selected from the
combobox. It selects the new camera selected by the user. | namespace BitsBolts
public partial class Form1 : Form
public void CameraUpdate(string cam)
{
image_path = cam;
int selectedCamera = 0;
this.Invoke(new MethodInvoker(delegate () { selectedCamera = cb_cameralist.SelectedIndex+1; }));
if (selectedCamera == 16)
... | 1 |
c3c43bc223bc041be889d6e6153b3d3e | a7b13bcd9b472f6dfdbcc37afcc29e41 | Return true no matter what: buy on the first day leave it at that. | vector<Trade> trades;
trades.push_back(Trade(Buy, 1.0, 0.0));
auto value = calculateStockPrice<float>()(trades);
BOOST_REQUIRE( value == 0.0f );
} | 0 |
8e7e383befbe7f043a2ca624876a7513 | 659bb487df829a40a7c84bdd65a603c3 | Convert edge types from the ABI types to ONNX strings | if onnx_attr.HasField('t'):
return numpy_helper.to_array(getattr(onnx_attr, 't'))
for attr_type in ['f', 'i', 's']:
if onnx_attr.HasField(attr_type):
return getattr(onnx_attr, attr_type)
for attr_type in ['floats', 'ints', 'strings']:
if getatt... | 0 |
91d47cbd79a7e6aefffa3f9fac27123d | 3c6312a5ae5e5df6cffd30158fe542c7 | 初始化DirectDraw[有关DirectDraw部分已经由SDK内部创建,用户不需要调用该接口函数] | HRESULT CD3DDisplay::InitD3D(HWND hWnd)
{
D3DPRESENT_PARAMETERS d3dpp;
if(hWnd == NULL)
return -1;
m_hWnd = hWnd;
m_Format = D3DFMT_A8R8G8B8;
if(NULL == (m_pD3D = Direct3DCreate9( D3D_SDK_VERSION )))
return -1;
ZeroMemory( &d3dpp, sizeof(d3dpp) );
d3dpp.Wi... | 0 |
29478a6d9dc4d19db8b0cab78c24379a | ff69899b892c43878ed352b707bc162a | Get the local address that the client initiated the request from. | class RequestHandler(BaseRequestHandler):
def local(self) -> Tuple[str, int]:
return self.server.server_address | 0 |
1c8bb5e2686faa6755f11ad444af23e4 | 59ad572e1c00d5e847b7ee6031e6211f | Método utilizado para saber si el colaborador se encuentra infectado. | class Control(object):
def isInfected(self, characterName):
return self.findCharObj(characterName).getInfectedStatus() | 1 |
174d869620414ce32fe448345a77b1c7 | 735809531d9e2bf56c058a4e9e52969e | 获取一个推荐的游戏服务器id,如果有登录过的服务器,优先选取上次登录的服务器,否则选择有账号的服务器,否则选择推荐服务器 | if self._server == nil then
self._server = self:getRecommendServer()
end
return self._server
end | 0 |
d76bd6d31ecf0a04505c20348085ba35 | d38b9a3c11cfa9e0947a8ab74277bc7d | Lookup the raw translation of a string (without any extra escaping or interpolation). | namespace UnityGameFramework.Runtime
[DisallowMultipleComponent]
[AddComponentMenu("Game Framework/Localization")]
public sealed class LocalizationComponent : GameFrameworkComponent
public string GetRawString(string key)
{
return m_LocalizationManager.GetRawString(key);
} | 1 |
f7339e796811421574728a83cb4d431b | f4e744d5569c8003e8e94b331ea50992 | Handle all unfound attributes by adding a deferred function call that
delegates to the underlying mock redis instance. | class ScroogedAttributes
def [](attr_name)
return nil unless has_key?(attr_name)
if !scrooge_columns.include?(attr_name)
augment_callsite!( attr_name )
fetch_remaining
add_to_scrooge_columns(attr_name)
end
super
end | 0 |
a508002f4669484be0438ee58017f02c | 025631ed343c512a9e5f806964e14b91 | Wether the our daemon is being killed, you might
want to include this in your loop | class DaemonHandler:
def is_active(self) -> Any:
return True | 0 |
fd511366fe7a8c09ca638a97d933b9da | 339e1368c260c683d636c4f175381803 | we only want to compute routes for edge links we know | class SugiyamaLayout(object):
def draw_edges(self):
for e in self.g.E():
if hasattr(e,'view'):
l=[]
r0,r1 = None,None
if e in self.ctrls:
D = self.ctrls[e]
r0,r1 = self.grx[e.v[0]].rank,self.grx[e.v[1]].rank
... | 1 |
19cd2c5bf757d6f7f838e262fd9751dc | e0ece9f07d3f38be41a4924f96dbc058 | Começa a ouvir para identificar o usuário | public class MonitorarAudio : MonoBehaviour
void Start () {
} | 0 |
0eb07aa66e78a5357d96cdf5a9f0b424 | 395a6d8c2b1d4c2b51eb002830bb2367 | Finding the time when the user begins playing | public class PlayerParameters
public int getStartTime() {
return startTime;
} | 1 |
d3eade0fce30539d071e28ff1e194acc | 3303b2a85f522a73edc372c43ef27d32 | 删除车牌设备 | function deleDeviceInstall(data) {
return request({
url: 'IGIP-BWZL-DMS/API-GATEWAY?moduleId=BWZL_DMS_310',
method: 'post',
params: data
})
} | 1 |
6730f6e8fe34a78bba87a82ec2a6f3ce | 429ef81ce1f6cda39d94e06ecf10dbf7 | show map information to the view including player, occupied countries, corresponding continents and soldiers | public class StartViewController
private void displayWorldMap(String path) throws IOException {
if (graphSingleton.isEmpty()) {
buildWorldMapGraph(path, graphSingleton);
}
hbx_infoDisplayHbox.getChildren().clear();
txf_mapPromptInfo.setText("World Map");
txf_mapPrompt... | 1 |
573d3f68e3d15a8b63053f848d70bd68 | 472469a2edecf5845c20b43aee3793e4 | Get all the unterabschnitts. | class Tipp extends \Haus23\Model\Tipprunde\Entity\Tipp implements \Doctrine\ORM\Proxy\Proxy
public function getSonder()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getSonder', array());
return parent::getSonder();
} | 0 |
f4e06692351da54c33331ceeba38a16c | 44469a559a92ec2643c2a5f910cb1d0e | Creates a tracer for an outgoing remote call. | namespace Dynatrace.OneAgent.Sdk.Sample
static class RemoteCallTracerSamples
public static void LinkedSyncRemoteCall()
{
IOutgoingRemoteCallTracer outgoingRemoteCallTracer = SampleApplication.OneAgentSdk
.TraceOutgoingRemoteCall("RemoteMethod", "RemoteServiceName", "mrcp://endpoi... | 1 |
acb96aeab6db4292f108215d3cd688cf | 379151f0110f18da904926cfaf07ddb9 | Méthode permettant d'identifier la taille de la boucle. | int taille = 0;
do {
System.out.println(string);
taille = sc.nextInt();
} while (!taille(taille, alpha.getLargeur()));
return taille;
} | 0 |
3c6b40aaf35b92724a4ba1d61966113e | dc616ceca217fa109ef06938a1392e1b | Returns the meta object for class '{@link com.github.kanafghan.welipse.webdsl.Reset <em>Reset</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EOperation getWorkflow__ResetWorkflowStep(); | 0 |
5c2b8961c2994cefa0993989a8bdb1c0 | e3f1e8f0a274fbfdf038fbe17a6c5fff | Returns the all registered theme definitions. | class ThemeManager
public function getThemes()
{
} | 1 |
da2102686368fbc158da4834f1c02265 | 6701b05c9ea1342c027dc2b085393fdb | Summary:
Initiates a read of up to a specified number of bytes to a device asynchronously
and invokes a callback method when complete.
Parameters:
count:
Number of bytes to read from the GPIB.
callback:
The System.AsyncCallback that is raised when the read completes.
state:
Object that contains additional user infor... | namespace SystemWrapper.IO
public class StreamWrap : IStream
public IAsyncResult BeginRead(byte[] buffer,
int offset,
int count,
AsyncCallback callback,
object sta... | 1 |
7977e0e8454a2169118f2fe51e8d3e1a | 9ca035078e9a5f48cab12d87726ff23f | url是否推到队列中 | class UrlQueue():
def push(self, item):
logging.debug('waiting')
self.sheet_lock.acquire()
if item.url not in self.sheet_url:
logging.info('pushed[%s] deep[%s]', item.url, item.deep)
self.queue.put(item)
self.sheet_url.add(item.url)
self.pushed += ... | 1 |
ad14ba1ed4fd642a6b7b815e277516cf | 2d912ff4b097d7f28d7764b6bb942437 | Returns `true` if the set is a superset of another,
i.e. `self` contains at least all the values in `other`.
# Examples
```
use nimiq_collections::LimitHashSet;
let sub: LimitHashSet<_> = [1, 2].iter().cloned().collect();
let mut set = LimitHashSet::new(10);
assert_eq!(set.is_superset(&sub), false);
set.insert(0);... | namespace KSoft.Collections
bool IsSupersetOf(IReadOnlyBitSet other); | 1 |
1ae34e1cf76b1deca61150213bb46764 | 5079a5ce3c52f14e893f2a09dade2b67 | 导出用户数据,通过头部信息做断言 | var expected = make(Users)
expected[1] = &User{Id: 1, Name: "张三", Email: "zhangsan@foxmail.com", Phone: "13792992888", Sex: "male", Age: 18, Address: "北京市东城区永外大街182号."}
expected[2] = &User{Id: 2, Name: "李四", Email: "lisi@foxmail.com", Phone: "13792998888", Sex: "male", Age: 25, Address: "北京市东城区永外大街32号."}
if len(exp... | 0 |
50deda0458a43dbd0410b2110559a4d4 | faf92563a20e5fb526436a910c2ab921 | Fills up tank to full capacity | public class Battery implements EnergySource
public void fillUp() {
currentAmount = MAX_AMOUNT;
} | 1 |
2b5e9118ab961f3cad20c588bafddd5e | f0ac5919ae5959306d7457bff5e4f5d7 | Importation des propriétés selon la donnée fournie | foreach ($datas as $key => $value) {
$method = 'set'.ucfirst($key);
if(method_exists($this, $method)){
$this->$method($value);
}else{
trigger_error("Hydrate : La méthode $method n'a pas été trouvée", E_USER_WARNING);
}
}
} | 1 |
8908119fd640644213abdc2afcde148e | 6d04781fdd48a6f2895398e71a75eaa0 | Checks minimum topology size for running a certain example. | def testTopo():
topo= CustomTopo()
net=Mininet(topo=topo,host=CPULimitedHost, link=TCLink)
net.start()
print "Dumping host connections"
dumpNodeConnections(net.hosts)
print "Testing connectivity"
for i in range(0,10):
net.pingAll()
print "test TCP bandwidth"
for i in range(0,8... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.