query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
ce3a6635234d728c0566ddec43f5bca5 | bdcf45fa73555e4db0773a12b459d7a4 | Get the CPU cost associated with this file once installed. | namespace DCM.Interfaces
Int64 GetCost(); | 0 |
8e0d783c21e6f6d3640196cabcc2fde0 | 8da894f970949ed80855208591e65452 | Handle tasks after the response has been sent to the browser. | class ResponseBlock(Block):
def doAfterResponse(self): | 1 |
6dd0ef4b85f1d70a4617609d4d3133da | ed0d3ca775af48e79302b0e399d0c659 | Adds an expense to the current list of expenses | namespace MyExpenses
partial class ExpenseListViewController : UITableViewController
void OnAddExpense(object sender, EventArgs e)
{
newExpense = new Expense();
PerformSegue("showDetail", this);
} | 0 |
d6d4b8455a59884a5818e01ed3484665 | 3a304d8c03f15b90090018e7733fa287 | Список товаров клиента по продукту | public abstract List<Product> findProductsByClientId(Client client); | 0 |
5c4cba0a2737d8b5fa2fae3fde27ba34 | 837c61038bbdee13321f7a8841f8bd60 | checks if number is a prime and a palidrome | def is_palindrome(num): | 0 |
cc4590471ca5af01d21b1275c529c628 | 4a6209e88f751bcbc76b8695b5af1037 | checkCurrent looks for event that is currently ongoing.
takes no inputs
nothing returned
A user is supposed to be shown which event is currently ongoing when opening the app.
This function iterates $scope.events array to check each event. | export class TabsPage implements OnInit, OnDestroy
ionViewWillEnter() {
this.activeEvents = this.eventService.get().filter( (e) => TabsPage.checkActive(e.datestamp)).length;
this.cd.detectChanges();
} | 0 |
80382a5144b25ea3623ed0b5da6ed747 | b7c82a603fe02186c304f05335bce675 | Tests that rogue method gives false | {
$testCaseMock = $this->getMockBuilder(TestCase::class)
->enableAutoReturnValueGeneration()
->getMock();
$result = $this->genericClass->callsOneMethod($testCaseMock);
$this->assertFalse($result, 'The default generated return value is false.');
} | 1 |
45b479ce52e98632f304bd08ad1af812 | 18b1c14d3b3cb7ca62bce627f9251ac8 | Implements the Ruby method "LichXML#undefine_callback" | VALUE
ruby_xml_sax_callbacks_on_end_element(int argc, VALUE *argv, VALUE self) {
return Qnil;
} | 0 |
16afd1c30918b23ec62c1e19df1a1298 | 1e503c9a83a9bb3c929eec00460b66cc | Gets the file info of the extension this path points to. | namespace OliveHelpsLDK.Filesystem
Task<FileInfo> FileInfo(); | 0 |
f612f71a3f8faa4ed4f78aa44f8e8df9 | 034673c5483b2ef0991f4e08fa277714 | Devuelve una instancia de SolicitudDao con una conexión que depende del gestor de base de datos | public function getPedido_provDao($dbName); | 0 |
2aac38749a784ff80870f2b3dda460f1 | 0ecbbdaf088626cc87ca7213be067a8a | 是否需要预授权 | {
$is = 0;
$re = self::getBusinessSwitch();
if (isset($re['require_approve_prepayment']) && $re['require_approve_prepayment']) {
$is = 1;
}
return $is;
} | 1 |
ee7fed55b4624d7e61b17874f625ea01 | eaeb0108a796d4f931e4aec8956be5ee | Método utilizado para establecer el id del tema | class Topics extends AbstractEntity
public function setId($id)
{
$this->id = $id;
return $this;
} | 1 |
fc5be43c781254108f4f4dc2f18dc4a1 | 183fa1d4348228248d9d8a5dfcd993bc | Retorna las opciones de Aereolineas (Suppliers o Carriers) disponibles para realizar un posterior filtrado por las mismas. | $filter = "";
if(isset($options['filter']))
if(trim($options['filter']) != "")
$filter = $options['filter'];
$addForce = "";
if(isset($options['addForce']))
if(trim($options['addForce']) != "")
$addForce = (($filter != '')?" OR ":'').$options['addForce'];
$models = $inModel::model()->findAll(arr... | 1 |
e03e250a045e4a2df66297bc10163e66 | 70d316f9d3f7ab27a691dc25e685271b | Test aborting enqueueing because some checks raised warnings. | p = DecFileParser(DIR / "../data/test_example_Dst.dec")
p.parse()
with pytest.warns(UserWarning) as record:
p.parse()
assert len(record) == 1 | 1 |
bc3deb4642d899a44327df7a0cbe4a25 | a0401f6d5076ee78c6828e443a7f3e8e | Call the message handlers later.
The default implementation just calls the handlers immediately, but this
method exists so that GUI toolkits can defer calling the handlers until
after the event loop has run, as expected by GUI frontends. | namespace Xwt
public class UILoop
public void DispatchPendingEvents ()
{
Toolkit.CurrentEngine.InvokePlatformCode (delegate {
toolkit.Backend.DispatchPendingEvents ();
});
} | 1 |
0683ce2cb98d4f8b3608e7062926a9e1 | af8fbbcd64ebcea30e563df6d0d8195f | Metoda czyszcząca erlementy w tablicy wątków klienckich. Wywyoływana gdy kończymy pracę z klientem o danym identyfikatorze
Identyfikator klienta, z którym kończy się wymiana danych | public class ClientTable
public synchronized static void removeClient(Integer clientId){
queues.remove(clientId);
freeID(clientId);
} | 1 |
98e0de2bc62f03a88d969ed634c004db | 3d014722ea1a4c88ff4e75a827a03b13 | Precondition: 0 <= i < len(self)
Returns the item at position i.
Raises: IndexError. | class LinkedList:
def getItem(self, i):
x = self.head
index = 0
while x != None and x.next != None and index != i:
x = x.next
index += 1
if index != i:
raise IndexError()
return x | 1 |
39a1a52875e05e2223a25ae0ad83b1e3 | c489b5c985abe3316d613600789bb37b | クエスト情報履歴を取得する検索条件を編集する | switch (condFld)
{
case "incidentTypeSyougai":
this.incidentTypeSyougai = true;
break;
case "incidentTypeJiko":
this.incidentTypeJiko = true;
break;
case "incidentTypeClaim":
this.incidentTypeClaim = true;
break;
case "incidentTypeToiawase":
... | 0 |
9a1bf912c1c6c8137912a475158a5a12 | e13cfb17d9bda5f52fcbaf4fdffd3290 | A boolean to know whether health checks have been enabled on one
or more redis connections or not. | class _BackendServiceState:
def health_checks(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "health_checks") | 0 |
2e23da0e4ce52806af3321a717d04a06 | e4c0d9b8da639a41a3fb89f4fcdd964b | Number of dimensions in this PES | int numDims(); | 1 |
c8c3a383ad5c8232a8ecbc6d905b4392 | 7c7e749eef4aa49d29faf4fc5d51b930 | This method was generated by MyBatis Generator. This method returns the value of the database column xpw_article.column_id | public class Criteria
public Long getColumnId() {
return columnId;
} | 1 |
a6e57fa34854c65aa371dfff6d3e908f | 47935f4c46de89a248e99aa93613e0b6 | Return contingency matrix between ``ref_labels`` and ``sys_labels``. | n_classes = len(classes)
class_dict = {klass: i for i, klass in enumerate(classes)}
cm = np.zeros((n_classes, n_classes), dtype=int)
pdf = df.crosstab(actual_col, pred_col).toPandas()
pdf = pdf.set_index('{}_{}'.format(actual_col, pred_col))
for k1 in pdf.index:
for k2 in pdf.columns:
... | 1 |
caa32c2014a4218d5608ee8ee0efa0ff | b8583e9e395d9dc76ae944a7bb6f2252 | Obtiene array list de VO de todos los tipos de rubro para la empresa | public List<Rubro> listaRubros() {
LOGGER.info("Inicia funcion listaRubros");
List<Rubro> response = new ArrayList<>();
try {
response = restClientService.listarRubros();
} catch (Exception ex) {
LOGGER.error("Error: " + ex.getMessage());
}
ret... | 1 |
b922ea9a81c79157a0302d3da6a24c5b | 46edcb0a8b950242d08a0c2777b3032c | 设置mangementNo的值 | @Table(name = "user_info")
public class UserInfo
public void setManageId(Integer manageId) {
this.manageId = manageId;
} | 0 |
0f7fb9cd933a126265551c279e753aff | d7e0fb05596834d2cac9ac127f391ce9 | 遍历结构体,按大端/小端构造网络字节序数组 | namespace WLIDAR.BackEnd.UI
public class CommonToolkit
public static void StructToBytes(object objStruct, ref byte[] by, ref int nOffset)
{
int nSize = Marshal.SizeOf(objStruct);
IntPtr p = Marshal.AllocHGlobal(nSize);
Marshal.StructureToPtr(objStruct, p, false);
... | 0 |
3e9fec8d564cc8ad8e406f9aed3d053e | 23260f8500a37bb35709d89f6afc2f81 | Convert all spaces to underscores. | class String(object):
def replace_spaces(self):
self.string = re.sub(r'\s', '_', self.string)
return self.string | 1 |
78067038c67f2ece24a0f25bbf257e00 | 0a3b54d6f8a32813c165db19f7ebc977 | determines whether adding the edge with the given parameters would mess up the DAG property | class DrivingShit{
static boolean check(int nodes){
return myBloodyMST.isEmpty() || myBloodyMST.size() != nodes-1;
} | 0 |
9c6fc6ea2aab061ef4c0d260b61357aa | 5d58e612822d408e25eacbb90b1017f7 | Provides a {@link Template} representation of a Freemarker template present at a specified location. | public static File getTemplateLocation(@NonNull File root, @NonNull String relativePath) {
File templateRoot = getTemplateRootFolder();
if (templateRoot != null) {
String rootPath = root.getPath();
File templateFile = new File(templateRoot,
rootPath.replac... | 0 |
49fedfa83927eb11b6681802e5817584 | 94b0a7b74bfd34f2495a47f4350f1afd | change the order oncalls | {
var newCallStatus = GetStatusCall(callEntity);
callEntity.Status = Int32.Parse(newCallStatus);
var oldCall = calls.First(s => s._id == callEntity._id);
if (oldCall.Status != callEntity.Status)
{
calls.Remove(oldCall);
... | 0 |
617c5e569ce0d4a7e395502fb4d674c1 | 28fad75df46d48feddf76a67fa6e3133 | 我的和我关注的人的文章列表 | class Article extends Base
public function relatedForMe(){
return json((new LogicArticle($this->request))->relatedForMe());
} | 1 |
bead057b5cd98ad58f7d1e8c677ffe6c | e8d891266dcccb3c61adc2db400219b0 | Cubes number and returns result | var cubeNum = num * num * num;
return cubeNum;
} | 1 |
ad759dfeb1604f9249ab1cff2826ea71 | 1260b8a88ef0367a81f8911ffeb76c42 | EncodeSigned8 takes an `int8` variable and encodes it into a byte array | fn test_encode_integer_i8() {
let mut data = vec![];
data.encode_integer_i8(-2);
assert_eq!(data, vec![254]);
} | 1 |
dc1af4361c59bd2acd120fab59f31656 | d769823af6b2d15bd10a08630d557d2c | Gets the rowKey of the current row's container. | public class EventLog
public String getRowKey() {
return rowKey;
} | 1 |
f8555d0bafb018ba793f38bc454973ed | 2f7e341c2b0e2023dee829ad2d3c2e10 | 给所有人发放优惠券 | @Service
@Transactional(rollbackFor = Exception.class)
public class MemberServiceC
public int allocationAllMemberCoupon(CouponBean couponBean) throws Exception {
CouponBean couponBean2=memberDao.getCouponDetail(couponBean);
if(TimeUtils.compareDate(couponBean2.getEnd_time(), TimeUtils.getCurrentTime(), "yyyy-MM-dd ... | 1 |
15ef528b8abec64f4e1519e5b5440ad4 | 0e4872f39d8c56beeb94307a45d4051e | Metodo a ejecutar cuando la vista se muestra
Carga la tabla, limpia el texto en buscar field y le da foco ademas de
limpiar lo seleccionado de la tabla | renglones = tabla.getItems();
modeloSeleccion = tabla.getSelectionModel();
modeloSeleccion.setSelectionMode(SelectionMode.MULTIPLE);
seleccion = modeloSeleccion.getSelectedCells();
ListChangeListener<TablePosition> lcl = c -> cambioEnSeleccion();
seleccion.addListener(lcl... | 0 |
fa4360b87d280a6ad1578b659f64c32d | df906bf4deab8324910731ba3b043eaa | GetUser restituisce l'utente corrispondente all'email, oppure errore | func GetUserByEmail(c appengine.Context, email string) (*datastore.Key, *User, error) {
if email == "" {
return nil, nil, InvalidEmailErr
}
query := datastore.NewQuery(UserKind).Filter("email =", string(email))
for t := query.Run(c); ; {
var user User
key, err := t.Next(&user)
if err == datastore.Done {
... | 1 |
9e13b1e784762f7785669c88145f763f | ae12a52a1e1985b27390fc9e35aa6c39 | Returns the siblings of a given node
@type node: menu item | queryset = self.filter_queryset(self.get_queryset())
pk = kwargs.get("pk", None)
node = get_object_or_404(queryset, pk=pk)
queryset = self.filter_queryset(self.get_queryset())
queryset = self.prefetch_queryset(
queryset
& node.get_siblings(include_self=Fal... | 1 |
059ce814a59b10de70ef629205b37ebd | db20a39db3ff99d0358603921ae30d3e | Add data to Tx Buffer (from USB) | {
USBMessageReadPointer++;
TXB2EIDH = *USBMessageReadPointer++;
TXB2EIDL = *USBMessageReadPointer++;
TXB2SIDH = *USBMessageReadPointer++;
TXB2SIDL = *USBMessageReadPointer++;
TXB2DLC = *USBMessageReadPointer++;
TXB2D0 = *USBMessageReadPointer++;
TXB2D1 = ... | 1 |
3f7a2c7986942bbc4cc8a164173b7371 | 75a4ea305ef68199c7a10d6534e4ec45 | Returns a new object of class '<em>Feature Nature Mismatch</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | INature getNature(); | 0 |
bcdc3059ab57bc3c1f26cf07da07e638 | 44ac971bfa513c248f13c001752633e6 | Change the project for a slack task. | args: WorkspaceChangeDefaultProjectArgs, session: LoggedInSession
) -> None:
await workspace_change_default_project_use_case.execute(session, args) | 0 |
28d58b95554ced1a878d1c62a7b20a1f | e068bd087a386f80406c808cb0b9897f | Gets the visible state of component (wtAutoCompleteBank_Description) | namespace ssCaseConferencing.Flows.FlowBackofficeFlow public class ScrnAutoCompleteBank_Edit: OSPageViewStateCompressed, IWebScreen, INegotiateTabIndexes, IBookmarkableURL
public bool selAutoCompleteBank_TypeId_isEnabled() {
return true;
} | 0 |
72e7bd697b5aaf8727ddaeff02037ab7 | 091302a2cd2eb48860dd3663979ce356 | removing a requirement from a project | class RequirementController extends Controller
public function destroy($id)
{
$criteria = Requirement::where('id',$id)->first();
$criteria->delete();
return redirect()->back();
} | 1 |
a6d5c1deb397b95574c26db32ac48b57 | df21da4fa275d03316ee9a04084f8fdb | 休息模考 | class ExamController extends CommonController{
public function start2(){
$get = I('get.');
if(isset($get['id'])){
$this->assign('id',$get['id']);
$this->assign('duration',$get['duration']);
if(isset($_SESSION['test']['type']) && $_SESSION['test']['type']==2){
... | 0 |
473861b12a989ea5b589d0f6b93dc2e2 | 15d278a72a9c1d50cef18e14d8567028 | Check pime number using Agrawal–Kayal–Saxena.
Variant of the classic O(sqrt(N)) algorithm. | int v = 1 + RAND.nextInt(0x10000);
int p = 30 * (v >>> 3) + ADD_CONST[v & 0x7];
for (int i = 1; i < 8; i++) {
if ((p % ADD_CONST[i]) == 0) {
return -1;
}
}
int m = (int) (Math.sqrt(p) / 30);
for (int j = 1; j < m; j++) {
for (int i = 0; i < 8; i++) {
int d = 30 ... | 0 |
3cea5a90bbe30b449296e9c8d5cab936 | 0403b61cdb2b4e38542c90968c65d3e3 | 查询商品名 | @Controller
@RequestMapping("/goods")
public class GoodsInfoListController extends CoreBaseController
@ResponseBody
@RequiresAuthentication
@RequestMapping("/queryGoodsName")
public Object queryGoodsName(@RequestParam HashMap<String, Object> paramsMap, HttpServletRequest request) {
List<Map<String, ... | 1 |
4360c1e056612a456b6e94425e676cd5 | 8e39d370b32df63dffc29d4adf1cba6f | 将容器内的内容全部高亮显示 | function hightlight($doms) {
$doms.each(function(i, block) {
hljs.highlightBlock(block);
});
} | 1 |
623199eea6f8e6623d3f300c7c4e0338 | 40efd404662c206b2fd15980b9f72475 | 获取url拼接参数中最后一个参数 | if (!paramName&&!url) return null;
var _url = url+"";
if (_url.indexOf("?")==-1) return null;
_url = "&"+_url.substring(_url.indexOf("?")+1);
var pos=_url.lastIndexOf("&"+paramName+"=");
if (pos==-1) return null;
_url=_url.substring(pos+paramName.length+2);
return _url.indexOf("&")==-1?_url:_url.substri... | 0 |
ecc500655c75def2629f5fa39cd2ff94 | d475095d60683b94cb4ce3e2f5a5359e | Sets the Check In Time Stamp. | public class OnPremiseEquipmentVO extends BaseVO
public void setCheckInTSP(Date dtCheckInTSP)
{
m_dtCheckInTSP = dtCheckInTSP;
} | 1 |
9c71b37d1e704af4f146795bf15ecb16 | 33bd19d5e133adced5c2837f0cfcdc1f | Le decimos al NavMesh que mueva al objeto que tenga este script a la posicion de destino | public class ControladorNavMesh : MonoBehaviour
public void ActualizarPosicionDelJugador ()
{
ActualizarPuntoDestino(PosicionDelProta.position);
} | 0 |
1efb682771445e4aa7de49a3297caff1 | adfefff22f8418363255c56efd482821 | 根据客户编号及银行代码获取银行卡信息 | public List<Map<String, Object>> getCustBankInfoList(Map<String, Object> param) throws TranException; | 1 |
910dbc74d29fbffb2f53d504392f9ffd | ec45bcc17152ea48ad3daee55658935f | Calculate coordinates occupied by a wire | class Wire(object):
def __init__(self, width, *points):
self.width = int(width)
self.points = list(points) | 0 |
e4cbb443a2fe0ec9b7a2fd79b5d98ed2 | 5d0efb4c0a99d0412b0995123b62a33a | Выборка всех серверов | {
$servers = Server::all();
$arr = array();
foreach ($servers as $server)
{
$a = $server->toArray();
$a['type'] = $server->type->title;
$a['history'] = json_decode($server->history);
$a['start_date'] = $a['start_date'] ? date('d.m.Y', s... | 1 |
10e7362924fbf328713d94312b790c75 | 4656b2fb92ed5bf4c6719f940114ab07 | 解析TencentMap返回的位置数据得到城市名称
JSON数据 | public class WeatherJsonUtils
public static String getCity(String json) {
JsonParser parser =new JsonParser();
JsonObject object =parser.parse(json).getAsJsonObject();
JsonElement status = object.get("status");
if (status != null && "OK".equals(status.getAsString())) {
JsonO... | 1 |
a8545cd01f57e7635390446c1d3cd2bf | 9791df318839cd7c61025b24f757003d | Returns the item ids for the items of the requested order.
This method queries the item ids for a placed order as stored locally by the
client. | class MWSConnection(AWSQueryConnection):
def list_order_items(self, path, response, **kw):
return self.post_request(path, kw, response) | 0 |
1af26791975742c00e38c2bcc63e1031 | 3e1437a605283caaa15e1c9d42dc85de | 竞彩篮球投注编码及显示码 | namespace Niunan.CaiPiao.Web.Controllers
public class PK10Controller : Controller
public ActionResult GetKjCode(string qihao)
{
string tmp = qhdal.GetOneFiled("kjcode", $"czid=23 and qihao='{qihao}'");
if (string.IsNullOrEmpty(tmp))
{
return Json(new { suc... | 0 |
0aad85c72d2fa834ff1b6017806662b5 | f8427bff7c7921ee6226d8f6752cf2a3 | Tune pendulum parameters over time to minimize integrated position error. | def intEC(theta0, dt, tmax, rhs):
t = 0.0
theta = theta0
omega = 0.0
tPoints = [t]
thetaPoints = [theta]
omegaPoints = [omega]
while (t < tmax):
thetadot, omegadot = rhs(theta, omega)
omeganew = omega + dt*omegadot
thetanew = theta + dt*omeganew
t += dt
... | 0 |
2170c609925ecdd77db0b9a4c9620722 | 61f06f44af2e47468ff853722b5b0a1e | Método que dado un entero con la duracion en días de las crisis de un paciente guarda la media en días de la duración en el editor.
En caso de que durase 365 días se guarda como media de la duración 14 días | if(!dairyText.getText().equals("")){
nj.getaPageOfActualJourney()[daysList.getSelectedIndex()] = dairyText.getText();
logger.info("Save is succes: " + (daysList.getSelectedIndex()+1));
}
} | 0 |
b73c5a5701144ea1de1c4ba2eada2673 | e57838f232e313b0fce3d0db87304193 | 获取图书相关知识点 | Map<String,Object> getKnowledge(Integer examid, Integer classid); | 0 |
2a200845c7be027e1cbf3960d557d7d7 | 1a39d1009444e94f8f22c3115d0e2bdf | btn4 | void MainWindow::on_pushButton_4_clicked()
{
myFunction.cancelBtn(ui->pushButton_4, ui->pushButton_2, ui->errGame2,"$39.99");
} | 1 |
d0a17ed8b88d347050c62ed5a3b91f2e | 3c06e9b93682bfdbdb00a1777637a132 | Metode yang digunakan untuk membuat koneksi dengan database postgre | public class Interface extends javax.swing.JFrame
private static Connection getConnection(String userName, String password)
throws SQLException, ClassNotFoundException
{
String driver = "org.postgresql.Driver";
Class.forName(driver);
System.out.println(DriverManager.getDrivers()... | 1 |
debb9ac1b980055bca755a2324c21c10 | 65818631928b34c16ff3aa2b235e9d83 | 产品可供销售的总库存量--可销售量不计算样品仓和损耗仓的库存 | $oProducts = app::get('ome')->model('products');
$goods_id = $oProducts -> getList('goods_id',array('product_id'=>$product_id));
$goods_id = $goods_id[0]['goods_id'];
$oSupplierGoods = app::get('purchase')->model('supplier_goods');
$supplier_id = $oSupplierGoods -> getList('suppl... | 0 |
bfc254840ebbb8382f289bffd23b763e | 5ace930d175abbd348e9e1c54e36737a | Zjisti kdo je v dane mistnosti online, vrati pole, pokud se jeste nenacetlo, tak natahne z DB
Vysledek je asociativni pole: | if (is_null($this -> onlineUsers)) {
$q = mysql_query("SELECT `users`.`ID`, `users`.`regent`, `users`.`provi`, `users`.`login`, `users`.`last_pwr`,`users`.`icq`, `chatt_spravce`.`idUsers` as `spravce`, `chatt_mistnost`.`idMistnost` as `vlastnik`, `prava`.`ID_pravo_text` as `super_user`, `chatt_last_visit`.`si... | 1 |
33bc390ee489e0260faad80fda18a319 | ef3f6bea6dd0410721e45ce6a5122a3f | Writes ssh config file | {
string filePath = Path.Combine(Environment.ExpandEnvironmentVariables("%HOMEDRIVE%%HOMEPATH%"), ".sshproxy");
string[] lines =
{
$"Host = {host}",
$"User = {username}",
$"Port = {port}",
$"LocalPort = {localpor... | 1 |
9b6fdaf021b43bc016fe15e96c067c8b | 60ce3a445adb9449da4611208a9c8fca | Filters review description. | LikeFilter filter = (LikeFilter) builder.hasDescriptionFilter("description.");
assertEquals("The filter should have the right name.", RejectReasonDAO.SEARCH_DESCRIPTION, filter.getName());
} | 1 |
3d89aba6d2d64797e5626b6b18a625f1 | 190246570c9e5c8c5986c64745e25f77 | 创建稀疏矩阵M | {
int i = 0;
int j = 0;
int k = 0;
int a = 1;
int st[size][size]={0};
M.num = 0;
printf("请输入稀疏矩阵元素:\n");
for(i=0; i<M.rows; i++)
{
for(j=0; j<M.clos; j++)
{
scanf("%d",&k);
st[i][j] = k;
if(k!=0)
{
M.data... | 1 |
43729f377de5a857d24a934b7c6f3fd7 | 986750e46854fbfeaee7e870aa878a08 | 判断是否加载教具列表 | {
bool result = true;
if (item != null)
{
PlayerData player = Singleton<RoomManager>.singleton.GetPlayerDataById(item.Id);
if (player != null)
{
if (player.IsLoadFinish)
{
}
else
... | 0 |
52634a1e08f134356234881e098b4869 | ce9dbb8580ee5bd9719918cc196881e5 | Writes codes to file called codes.txt. | f = open(filename, 'w')
for objectcode in self.codeList:
f.write(objectcode)
f.close() | 1 |
e0c874d6e19ed0e2137d24bfc80744ea | 49ea9630d741c49225c867bcf6c1b9a9 | Validate an entity on the basis of its value extracted. The method will check if the values extracted("values"
arg) lies within the finite list of supported values(arg "supported_values"). | Task ValidateAsync(string entityDefinitionCode, int entityId, IExecutionContext executionContext); | 0 |
7732c092ee9faf2cabbff9e3add2ffc2 | 277573dcb440fa466c80a3e1f2c1563e | If set to true (default), tabbing past the end of the row will wrap back
to the first item in the row. If false, tabbing forward when at the last
cell or back when at the first cell has no effect.
This only has an effect if allowTabRowChange is false. | public class G3View extends HtmlMacroComponent{
public void setAllowRowDeselection(boolean value) {
_allowRowDeselection = value;
} | 0 |
c8f6bf55d29fa6c33313d9a91bb39f44 | f3dc4780dee62bd79f2e6b558e182553 | Starts a new season | for (SoccerLeague league: soccerComp) {
try {
league.startNewSeason();
} catch (LeagueException e) {
System.out.println(e.getMessage());
e.printStackTrace();
}
}
} | 1 |
1b92ccea442390ed10311e02334a7069 | c9441a00c23c67e5ca40b77b22655d69 | Animate the golf ball sinking below where it landed in the water | {
float sinkDistance = 0f;
float sinkSpeed = UnityEngine.Random.Range(minSinkSpeed, maxSinkSpeed);
while (sinkDistance < maxSinkDistance)
{
sinkDistance += Time.deltaTime * sinkSpeed;
transform.Translate(Vector3.down * Time.deltaTim... | 1 |
f0c16055494a143b8360791dfa4f09bb | 125f6b1d81302f879b1d5e70cda038bf | 增加结对帮扶支部 | function upBfdw(){
var row = getSelectedRow();
$.ajax({
url: "/assa/upBfdw.do",
type: "POST",
async:false,
dataType:"json",
data:{
pkid:xiugaiID,
up_bfdw_mc:$("#up_bfdw_mc").val(),
up_qixian:$("#up_qixian").val(),
up_bfdw_ldxm:$("#up_bfdw_ldxm").val(),
up_bfdw_dz:$("#up_bfdw_dz").val(),
up... | 1 |
c10235a7edd302ecf0d6f4724c4127b6 | 0c6464bc0e164eeff360d099328ddb8d | בודק אם הנחש עולה על עצמו | {
if (snak->point[0]->x == fod->x && snak->point[0]->y == fod->y)
{
return true;
}
return false;
} | 0 |
7a3eb2b94373a75ce015d7605772d0df | e52b7694db99fd6372d59887c51ba122 | NewGpioWatcher creates a gpio-Watcher for checking gpio pins | embd.InitGPIO()
pin, err := embd.NewDigitalPin(4)
pin.SetDirection(embd.Out)
if err != nil {
fmt.Println(err)
}
sig := make(chan os.Signal, 1)
signal.Notify(sig, os.Interrupt)
go func() {
<-sig
pin.Close()
os.Exit(0)
}()
wg.Done()
for {
<-ledBlinkChan
if err := pin.Write(embd.High); err != nil {... | 0 |
ec1668d46e4bfa235c5bd3562262b1e1 | 0fda7dbc89546ef7cfd55b6393b30ffe | Find an ebuild for a given atom (accepting even masked ebuilds). | class PortageqClass
function match($atom)
{
return explode("\n", trim(`portageq match {$this->EROOT} $atom`));
} | 1 |
a5c4de06044f8d69bb8871fccd935d0d | f17c9473a91f6dca5cb7d3eff5c90fae | 房屋发布页面 | class PublishController extends CommonController
public function actionPublish()
{
$this->layout = 'layout1';
$id = empty(Yii::$app->request->get()['id']) ? 0 : Yii::$app->request->get()['id'];
$model = null;
$house_imgs = null;
if (!empty($id)) {
$model = Publish... | 1 |
299b2d1fde9fb99d744c8d6309747fef | 2d7c1be4dff66bcace835d594a67f01d | Verifies RSA PKCS #1 signature for give messageDigest (hash-value), using X509 PublicKey.
Returns true|false indicating if the signature is valid. | class DSA
def sysverify(digest, sig)
end | 0 |
26a4dd08e53291b696758d2fd6aaff0a | fbaad0ed30c42c8841f0c2ca3b5c38ac | 显示快进时信息 | int position = videoView.getCurrentPosition();
long duration = videoView.getDuration();
long deltaMax = Math.min(100 * 1000, duration - position);
long delta = (long) (deltaMax * percent);
newPosition = delta + position;
if (newPosition > duration) {
newPositi... | 1 |
ff8b6f7e47aa3de30de123f91243d190 | e7e27ac25c27e864236f1a96c3c506f9 | A automated API testing used to check whether the API route is working correctly or not | {
$client = new Client(['base_uri' => 'http://localhost:3030/']);
$response = $client->request('GET', 'testing');
$data = json_decode($response->getBody());
echo $data->status;
return view('home');
} | 1 |
17d2778c4b68093db52057013d4abb87 | bdc0cdcfdfb29816ee4f9800e4aa66ca | Method that handles the 'Click' on 'btnWaypointToevoegenBewerken'
Used for adding waypoints to the 'editing' part of the route' | Intent intent = new Intent(getActivity(), TrackwayDetailActivity.class);
intent.putExtra(KEY_TRACKWAY_ITEM, item);
intent.putExtra(KEY_POP_COMMENT, 1);
startActivityForResult(intent, RESULT_EDIT_TRACKWAY);
} | 0 |
61852bc01004e0b58341aa75d44caf28 | c9223855f03e10e1a34ccc6bfe76e20d | Returns the duration of a tracker row (in msec) given the setting
for speed and tempo. | class Track(wx.Panel):
def getPixels(self, duration):
return float(duration) * self.control.getPixelsPerSecond() | 0 |
609eaf10913107266f4769e2278483cc | 7403180a5d1274eb524606dcd9777c30 | Compute the unscaled form of the objective function. | obj = (.5 * np.sum(u ** 2)
- np.sum(u * eta_u)
- np.sum(v * eta_v))
return obj | 1 |
81d3aac8a72c289f6a469f2376718e35 | 560b52becf2096e8ad3d4426f38ee1dc | Fonction affichant des statistiques sur les tâches en cours
lorsque SIGUSR1 (et _seulement_ SIGUSR1) est reçu | class Daemon(object):
def sigusr_handler(self, signo, frame):
self.logger.info("Received SIGUSR signal: {}".format(signo))
status = self.status()
self.logger.info(status["message"])
print(status["message"]) | 0 |
d61b1c718351a0868c723f35032f8a71 | be722310d37ee65813bab03e01ae1766 | Retrieves an array of all child line items in a hierarchical
line item scenario | public function getChildItems(Item $item); | 1 |
38cb1486ce8f6b1f953a21356a891cdc | 7c8ac09f7fd6e7fc84f0f9cc0cc19651 | 根据树结构,获取点击的parttype全名称 | var str="";
if(my_id>0){
var str_temp=Nseer_tree.node_list[my_id].showStr.split(' ')[0];
str=Nseer_tree.node_list[my_id].showStr.substring(str_temp.length+1);
str=jionIn(Nseer_tree.node_list[my_id].pid)+"-"+str;
}
return str;
} | 0 |
4d3714962cd9a2ee2778ac6b7f61389f | d8d7db06563c1ff00479b09c7a5224b8 | Megnézi, hogy az adott quiz-ben benne van-e | int checkIfActiveQuiz(String quizId) throws RemoteException; | 0 |
9abe9f8ee12897f365ea6ffd14c7a788 | e68150515631c33abc97c48ef540e498 | Validated if the liability accounts exist. | namespace Fiserv.Mobiliti.Business.Presentation.Automation.Pages
void VerifyAccountsList(); | 0 |
d426f4f883af5f91b21c9fc5c67968cd | e5b6b4d50bc243ff2ae6db707fff76ee | 멘토가 생성한 스터디 목록 보기 | class StudyListsController
def index
@study_lists = StudyList.where(user: current_user).order("created_at desc")
end | 0 |
ab4b4aa5eace584cf3987dfad6a7a158 | 95b2cef7c4e5bae7aaac61ff48d1ecf6 | 获取对应名字的子节点上的对应类型组件 | namespace Gu4.Tools
public class FindUtil : Singleton<FindUtil>
public static T Get<T>(Component go, string subnode) where T : Component
{
return go.transform.Find(subnode).GetComponent<T>();
} | 1 |
80c762d35eb634ffc93042595a13db83 | 5d7540d3d67239643b19015ede64ff30 | 计算宽度比例 | public class CoreStickerView extends RelativeLayout
public float getWidthRate() {
return ((float) IndexBoxWidth) / screenWidth;
} | 1 |
efc6c7efe7bf80acf9f961ec5dd5ac15 | fcbb05bfdc7de096a317ccf6021c20dd | Returns the estimation of the outlet temperature of the external flow | class gn_component(object):
def maxOut(self,Tamb):
maxLoss = (self.waterCold_tempLimit - Tamb)*self.exchCoeffs[-1]
return maxLoss*45-1000 | 0 |
5ff9b3ca63f945af36ffe1622e896970 | 2fdd6c594f44c78e473347a3a39f4330 | 调用其他模块接口
Call other module interfaces | $arr = explode(':',$class);
$class = $arr[0];
if(!$class) $class = 'base';
if(!in_array($class,array('base'))){
throw new Exception('不允许调用此项目中的接口');
}
$method = $arr[1];
$obj = N($class);
try{
return call_user_func_array(array($obj,$method),$params);
} catch (Exceptio... | 1 |
bc94e5d34ef6a9809e261bf42dde9e09 | 5b641e5acb04ae2099ba19282e29bd24 | 添加一个缓存, 只有当 key 对应的 value 没有设置时才进行设置, 否则返回 false | class MongoCache extends CCache
protected function addValue($key, $value, $expire) {
if(!self::$_instance->isExsit('key', $key)) {
return $this->setValue($key, $value, $expire);
}
return false;
} | 1 |
1755957d92fc30f2a6a36121e07bff50 | 880dbe8b9ba4058becef0ff0a80f9e27 | Get range of the raw data item totals | class InStock extends AbstractRange
public function getViewData(DocumentIterator $result, ViewData $data)
{
$name = $data->getState()->getName();
$data->setMinBounds($result->getAggregation($name)['min']);
$data->setMaxBounds($result->getAggregation($name)['max']);
return $data;
... | 1 |
169a86791e7c2d99f9693b8f6085c99a | aae6b7d434b8767f2abd2327fb83e9e7 | Get the wet bulb temperature profile.
See `pressure_profile` for an example of using getters, keeping in mind the units type may
be different. | class MoistAir:
def wetbulb(self) -> float:
def root_function(wetbulb: np.ndarray) -> np.ndarray:
humidity_ratio_wb_sat = humidity_ratio_saturation(wetbulb, self.pressure)
return (
self.specific_enthalpy
+ (humidity_ratio_wb_sat - self.humidity_ratio)
... | 1 |
da163b312198491ce4dc26265516287f | 80deb84fd236dc9d4c3732a48926df2a | Realiza os calculos dos impostos para o simples nacional | namespace PatternStrategy_MuitosImpostos
public class ICMS : IImposto
public double Calcula(Orcamento orcamento)
{
return orcamento.Valor * 0.1;
} | 0 |
852f0cb2f11dca0a3b7d7ab95e7db8b3 | a07ccdbbcd1225609dca7992e33c9b65 | 根据业务ID获取选取的专家信息(确认并参加会议的专家) | List<ExpertDto> fingDrafExpert(String minBusinessId, String reviewId, ExpertSelConditionDto epSelCondition); | 1 |
cf2b555e924b6cd8b469269d8a7d2cb3 | eb022b2a0448282cad42e467d777a3da | 根据项目id成员完成工作情况 | var prjId = $("#projectId").val();
$.ajax({
type : "POST",
url : getContextPath()+"/project/projectEnter/completeList",
data : {prjId:prjId},
async : true,
error : function(request) {
},
success : function(data) {
var tpl = $('#completeListTpl').html();
var html = juicer(tpl,data);
$("#complete... | 1 |
9b5fef6e96a2871951334c95f440787c | 570ab26fd714d0de8d0fdc8e7918f7c7 | set the icon number for a particular item | {
MAX7221_cmd( MAX7221_DIGIT_4, (num / 1) % 10 );
MAX7221_cmd( MAX7221_DIGIT_3, (num / 10) % 10 );
MAX7221_cmd( MAX7221_DIGIT_2, (num / 100) % 10 );
MAX7221_cmd( MAX7221_DIGIT_1, (num / 1000) % 10 );
MAX7221_cmd( MAX7221_ICONS, icons );
} | 1 |
61a6c3a3de6d4207e640945b5fe72858 | a2f59bf3159630c80b4afb0cd776da9a | Gets the old_value of this DeviceInterfaceAlarmObject. # noqa: E501 | java.lang.String getOldvalue() throws java.rmi.RemoteException; | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.