query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
f0a445e303001ecc66554fc5f0be70fa | 602a47674119c1d2b455c79669310cbf | compute a kernelized correlation so that we can get a real distance | feat = torch.flatten(f, start_dim=1)
feat = np.array(feat.cpu())
targ = np.array(t.cpu())
dc = dcor.u_distance_correlation_sqr(feat,targ)
return dc | 0 |
553b38defbf3a5c94fa5cfb24c2f36a9 | 5105cd326e8604db65554109670f5954 | 随机生成指定长度且无重复的数组 | var arr = [];
for(var i = 0; i < COUNT; i++) {
var num = Math.floor(Math.random() * length);
if(i === 0){
arr[i] = num;
}else{
for(var j = 0; j < i; j++){
if(arr[j] === num){
i--;
break;
}else... | 1 |
7ebb76472271c56a54938dad54b32046 | d083aa5ab65a86860de5685d92d57b05 | 提供创建交易的方法,挖矿交易 | block := &Hw_Block{
time.Now().Unix(),
transactions,
prevBlockHash,
[]byte{},
0,
height,
}
pow := Hw_NewProofOfWork(block)
nonce,hash :=pow.Hw_Run()
block.Hw_Nonce = nonce
block.Hw_Hash = hash[:]
return block
} | 0 |
6c556bfe0581310314e877bc905b8749 | f595edb73d6215356dc6536af9a29bd4 | 替换白天和页面模式中的图片 | class UrlFilter extends Filter{
public function filter(Page &$page){
$source_dir = substr($page->getPcUrl(), 0, strrpos($page->getPcUrl(), '/'));
$search = array(
'/<img[^>]*src="W/i',
'/<img[^>]*src="\./i',
'/<\/IMG>/i',
'/oldsrc=[^ \s>]*/i',
... | 1 |
6e4b31bb3614fe5302ab3e73d8cc1b51 | a549b07c65c128d3161dba39c32d0142 | Runs inference using a TensorRT engine. | class Tf2OnnxBackendTestBase(unittest.TestCase):
def run_onnxruntime(self, model_path, inputs, output_names):
import onnxruntime as rt
opt = rt.SessionOptions()
m = rt.InferenceSession(model_path, opt)
results = m.run(output_names, inputs)
return results | 0 |
77c5a1b95ba126e53e61fbb39408d59e | b287cc84e831d7c3c5affc27048513bd | Creates a source of randomness. | namespace UnityExtensions
public static Random Create(uint seed)
{
return new Random { seed = seed };
} | 1 |
eacb0a8060e629eb22dc3d25c176b856 | 19466ff18576bf1e956f3c6ca45d1b9b | Creates SectorTransactionInfo from JSON | return Sector(cursor.getInt(0),
cursor.getString(1),
cursor.getString(2),
cursor.getBlob(3),
cursor.getInt(4),
cursor.getString(5),
cursor.getString(6),
cursor.getString(7),
cursor.getString(8),
cursor.getStr... | 0 |
d8809680335c3b257312fad80705e128 | aa564826e78ea5ee4e252115baa6af12 | 运行时文件扫描超时设置查询 | public class BatchDeleteExecutor
public void queryTimeout(int queryTimeout) {
query.setQueryTimeout(queryTimeout);
} | 0 |
6752831105843c68fecb48082ae796bf | 6232289e8a3d52d009c66bc480e7ba50 | Проверка наличия вариаций в рамках модели.
Если модель - коллекция, проверяется наличие хотя бы одного класса элементов,
поддерживающего вариации изображений.
Если модель - обыкновенная, проверяется наличие поля ImageField (или аналогичного),
которое ссылается на ресурс, поддерживающий вариативность изображений. | class ArticleModel extends ActiveRecord
public function getVariantCollection()
{
} | 0 |
15ca8a2bac83cadb86fd71248602e468 | 6e71b5c36bdde423edb2ca318b9da4bf | 查询表中某一个行数据列表+除重 | public class NetUtils
public static List<Map<String, Object>> singleTableUpdataList(List<Map<String,Object>> list,String code) {
List<Map<String, Object>> tmpList = new ArrayList<Map<String, Object>>();
Set<String> keysSet = new HashSet<String>();
for (Map<String, Object> map : list) {
... | 1 |
d32b27eb1202a54766e8f40fb57f3b29 | 9c50943d15bf97765c8036ad13ac64fe | 根据GdspId删除商品与特价关系表 | int deleteCoolProductGg(@Param("id") Integer id); | 0 |
7b4af883f773021580721cd8606c8403 | 5e5d79ef28b034295974a1ce15a146e6 | Get 私有网络ID,格式如:vpc-92jblxto | public class DeleteVpcRequest extends AbstractModel{
public String getVpcId() {
return this.VpcId;
} | 1 |
3c083605df3d11b6f5af6e50920cfd5b | 0aafde1ea0660cb995b7e9fab6aca4e4 | 祭天次数增加 | local SVar = getVarData(actor)
if SVar then
SVar.login_day = SVar.login_day + 1
end
end | 0 |
f4a2220a0b3423fa5bb78ae4c714dd52 | 5667ae11681c12783f49015b098c0e47 | Replace the jth column with the given Vector
<p/>Runs in O(cols). | {
var colLength = matrix.GetLength(0);
for (var i = 0; i < colLength; i++)
matrix[i, col] = colVector[i];
} | 1 |
cfb86bcc3fa6816fe597aef3d3d1b29b | 6baf08fd52b5b239a731f0f98c97d43a | private functions which iterates through all folders and files
and create an according file structure in a temporary directory. This function works recursive. | File[] directoryListing;
directoryListing = new File(Ordner.get()).listFiles();
if (directoryListing != null) {
for (File child : directoryListing) {
String filename = datum(child);
File diry = new File(new File(Ordner.get()).getAbsolutePath(), filenam... | 0 |
0df3eab6eb002162914d91b6190130d6 | faeb192c0b31e828486a4d12c3b96ae8 | Retrieves the target framework alias (i.e. net5.0) from the project's subscription service. | {
var request = (HttpWebRequest)WebRequest.Create(url + "?WSDL");
SetWebRequest(request);
var response = request.GetResponse();
using (var sr = new StreamReader(response.GetResponseStream(), Encoding.UTF8))
{
var doc = new XmlDocument()... | 0 |
c39e6e8b510f3590e37f4ef3cd5ecde6 | 7b8b8d8803830d5c06da7e6a8058cb90 | Sets the curcCode. | class MoneyModel
extends Model
public function setCurCode(
$CurCode
)
{
$this->CurCode = $CurCode;
return $this;
} | 1 |
8b2bab642263f732d489c6eabe5195f9 | f90a4a7db50c13afd5b670563dd77a6b | Starts dragging the selected element | public class ScheduleSelectController extends Controller
public void startSelect(MouseEvent e) {
Node source = (Node) e.getSource();
source.startFullDrag();
} | 1 |
f8c361498ab7237e33ed0ecf3c25d2c5 | 79c4a9197d94aa4c1cbd5edf8e81a6a1 | set number of media item within media object | public function setItemCount($itemCount); | 1 |
7c857a2def3453d0ec09bab8bea55353 | fb6f26de9bc214d070a3d7151a299fad | Sets up namespacing for the utility's data store mechanism. | function DataStore() {
} | 0 |
af9effb95500d6b1b73e927692d2ac60 | e54658a38967c23fbec93759b126aab5 | 修改太极图填充的颜色 | public class GraffitiActivity extends BaseActivity implements View.OnClickListener
public void changeSVGColor(ImageView imageView, int iconResId, int color){
VectorDrawableCompat vectorDrawableCompat = VectorDrawableCompat.create(getResources(),iconResId,getTheme());
vectorDrawableCompat.setTint(color);... | 1 |
80bbeaf2d4a0c82e6db6a6e1881bc2df | e325abddcaa66ae7b648a795bc584401 | No deleting! | final class BasicSpreadsheetEngineInsertColumnOrRow extends BasicSpreadsheetEngineDeleteOrInsertColumnOrRow
@Override
boolean isDeletedReference(final SpreadsheetRowReferenceParserToken row) {
return false;
} | 1 |
73d287f3d45907d440413163d4c21106 | 5ff0429f36c1abf5b4ef6a0a77f70763 | Determines whether a REIL node has an outgoing edge to a given REIL instruction. | public boolean containsTarget(InstructionHandle ih); | 0 |
0cb719fef5d7611c76c1d253d4d5a2e7 | 9935784ffb9e8a4c3fe6b125e9f3dcd9 | 根据订单id获取订单数据 | class ShopOrdersOut extends Model
public function getByOrderId($id)
{
return $this->where(['order_id' => $id])->first();
} | 1 |
726f257fb7a925ad1e1b62ff515dd84a | 082526b182d13d82b2363e3df6fa6961 | Assure a country instance with the specified country ISO3166_1 codes. | {
parent::__construct($options);
if (true === array_key_exists('country', $options)) {
$this->country = $options['country'];
}
if ($this->country !== self::ALL && !in_array($this->country, IsoCodes\ZipCode::getAvailableCountries(), true)) {
throw new Constrain... | 1 |
add6e1eb5ca1a6acb80fe1ab7df98ee4 | a10351671ab2e61abc12e75be3564191 | @brief Hardware specific implementation of Can_EnableControllerInterrupts
Does not perform any other logic like changing the disable interrupt count. | CANIntEnable(unsigned long ulBase, unsigned long ulIntFlags)
{
ASSERT(CANBaseValid(ulBase));
ASSERT((ulIntFlags & ~(CAN_CTL_EIE | CAN_CTL_SIE | CAN_CTL_IE)) == 0);
CANRegWrite(ulBase + CAN_O_CTL,
CANRegRead(ulBase + CAN_O_CTL) | ulIntFlags);
} | 1 |
170d978df4f73315a7932d50e14b228c | 908ae1964744a0e464d9082f80b6e59a | The input type of sign_op must be Variable or numpy.ndarray. | class TFeXtensionGraphUtilsTest(PythonUnitTestCase):
def test_invalid_op_name_inputs_with_wrong_types(self, data, description):
with self.assertRaises(TypeError, msg=description):
tfx.op_name(data) | 0 |
d58c791cfdb0e8b2c90657dad4723558 | 324fc5a6edf08e788bb47df0edfa4a73 | Clears the global force generators list | [RequireComponent(typeof(Rigidbody)), RequireComponent(typeof(Player))]
public class ThrustersModule : MonoBehaviour
private void ClearForce()
{
_nextForce.x = 0;
_nextForce.y = 0;
_nextForce.z = 0;
} | 0 |
9548559789204a5ec7cea24d77fd530e | 2b5b541c53e24d077a7289567d6b3099 | Get fate. | $fate_tid = $node->get(IFBATypes::FIELD_FATE)->target_id;
if(is_null($fate_tid)){
$this->fate = 'NULL';
}else {
$term = Term::load($fate_tid);
if (is_null($term)) {
$this->fate = 'NULL';
}
else {
$fate = $term->getName();
$this->fate = $fate;
}
... | 1 |
1d0ae21cbf2e976f0d2cc3f37cfe2fee | c841457acd26ce585463c7aafe9ac154 | Function to add request to cache | if (Google_CacheParser::isResponseCacheable($request)) {
Google_Client::$cache->set($request->getCacheKey(), $request);
return true;
}
return false;
} | 1 |
5df44b265e82a083a81e7d025718ef1a | 4a6b3410f03e0f873730253ba358eda3 | 获取html标签里的纯文本 | def get_text(tag):
return tag.text.strip().replace('\t', '') | 1 |
1bc64ee457903d095ba6fc6a63bd747c | e0d954b10a53b3703b3f17886c311e29 | Returns the <a href="http://en.wikipedia.org/wiki/Rhumb_line">rhumb line</a>
distance in meters to the GeoLocation passed in. | if (from == null || to == null) {
return -1;
}
return RADIUS_OF_EARTH_IN_METERS * Math.toRadians(getArcInRadians(from, to));
} | 0 |
f987523e4146cdda975d721715dfa332 | 3e4678712ff51fe9c192aca37e2ceecd | 通过微信号获取用户 | UserEntity getByWechatId(String wechatId); | 1 |
38ffe2584058d14616b26e8e26e66ba6 | d83822dbfe3b2439cf32c1f1a3149dcf | Set the invalid token event (overrides options set in configuration) | class FcmMessageBuilder
function setInvalidTokenEvent($eventName){
$this->invalidTokenEvent = $eventName;
return $this;
} | 1 |
80b428dcf5e2e1fb0dce726a829779ed | b3941ca532115e48106526f777849ac8 | Option to toggle between blocking and unblocking the scheduled payments | public class AddCreditCardActivity extends BadBudgetChildActivity implements BBOperationTaskCaller
public void paymentCheckboxClicked(View view)
{
boolean addEditPayment = setupPaymentCheckbox.isChecked();
if (addEditPayment)
{
submitNextButton.setText(R.string.add_cc_next);
... | 0 |
0c4ca24a51523eb70d1f73e36d4e497b | 03d8d43742b41035545933947d6ff3da | Search course and print the information according to OPTIONS. | int PrintCourses(Catalog& catalog, std::vector<std::string> args) {
catalog.printCourses(std::cout);
return 0;
} | 0 |
6e65d8a754c981578ef225d342414ff9 | 0066f7cd57e2ad7c8cd479691254fa19 | 统计全部类型的数量 | public ResponseEntity<String> typeCount(); | 1 |
e2eec9ede98c426b016a5835760b9f94 | df23ce37f93bad5b309c3dc65c77ca40 | Returns the status of the legend checkbox | export class ProportionalWidgetComponent implements AfterViewInit, OnChanges, IHasChangeDetector, OnDestroy
public hasLegend(): boolean {
return this.configuration.chartOptions.legendPlacement !== LegendPlacement.None;
} | 0 |
58fcb0a417dba544c6fe1feb6dc2c850 | 545edc917615ac76cb7adae472e5a001 | Set whether css has to be set inline | class FormStyle implements StyleInterface
public function inline($bool)
{
$this->rule['inline'] = !!$bool;
return $this;
} | 1 |
a8c5a918b8937596f1938ca6edafc4ec | a3842121d7166b41dd8ccbe7afdda73c | Função utilizada para ler as cidades, imprime também a quantidade de destinos diretos que ela tem. | int numerocidades;
TListaCidades cidade;
TListaCaminho caminho;
TListaCaminhao caminhao;
printf("Digite o numero de cidades: ");
scanf("%d", &numerocidades);
InicializarCid(&cidade);
InicializarCaminhos(&caminho);
InicializarCaminhao(&caminhao);
IDCidades(&cidade, numerocidades)... | 0 |
dc5555e39a9060194bdc7df7f9d5b96e | a8d2e758a6771c4c93325b50ecfae920 | Take a Collection/Item and a message.
Tries to save the object.
Returns the value of that save() call, and also sets
the appropriate flash message. | class ItemModel
async saveItem(itemToSaveInput) {
let itemToSave = JSON.parse(JSON.stringify(itemToSaveInput));
this._logger.debug('Item before passing to massage: ' + JSON.stringify(itemToSave));
this._itemHelper.massageItemForBackend(itemToSave);
this._logger.debug('Item after passing ... | 0 |
488303363eaaed716867cb91fba6f8b1 | 77cc271f791cb0598d4c26357d619823 | Affichage d'un chapitre et de ses commentaires | class plxShow
public function artContent($chapo=true) {
if($chapo === true)
echo $this->plxMotor->plxRecord_arts->f('chapo')."\n";
echo $this->plxMotor->plxRecord_arts->f('content')."\n";
} | 0 |
44c82e75aea92c572a86d68f1ac2e1f6 | 2711d111699d7a44d112c4188a08cc0a | Tests taking the square root of units | new_quantity = self.q1**2
assert_array_almost_equal(new_quantity.value, 130.4164, decimal=5)
assert new_quantity.unit == u.Unit("m^2")
new_quantity = self.q1**3
assert_array_almost_equal(new_quantity.value, 1489.355288, decimal=7)
assert new_quantity.unit == u.Unit("m^3") | 0 |
7ef2e29a9de2b1719b425e1b31a2b199 | 8e3777ccb1b27aecb236054e2add1d2c | Reads a 4-byte floating point number from the stream. | namespace SteamSuite
public class DataStream : Stream
public Single ReadFloat()
{
return ReadSingle();
} | 1 |
42550aa2cc57ba5ebf27131fa0a72a24 | f084c7fbc6e9adacc71ef5cb6557e910 | 文件行数(不包括列名行) | if (file.exists()) {
try {
FileReader fileReader = new FileReader(file);
LineNumberReader lineNumberReader = new LineNumberReader(fileReader);
lineNumberReader.skip(Long.MAX_VALUE);
long lines = lineNumberReader.getLineNumber() + 1;
fileReader.close();
lineNumberReader.close();
return l... | 0 |
5eb9bffb14eb7b559bcc34296bddd0b5 | cabefad830f40f88b98447f0e46d64c6 | Limpia componetes, posterior al guardado | this.reset();
this.removeAttribute("data-state");
var form = this.querySelector('.form.validated');
if (form) form.classList.remove('validated');
fnCleanText(this.querySelectorAll('span[data-bind]'));
fnCleanText(this.querySelectorAll('output[data-bind]'));
var di... | 1 |
c06ef84240a727b460ff408ac7694151 | 026c6eeba055174031ea85d76345b6dc | 设置一个数据的缓存时间 默认5分钟 | namespace UtilityHelper
public class CacheHelper
public static void SetCache(string cacheKey, object cacheValue)
{
SetCache(cacheKey, cacheValue, DateTime.Now.AddMinutes(15));
} | 0 |
f0c14a976f7efdaf9ccd602ef75a59f4 | d81fdc9fab8f3d661fc7785ee7df9ad5 | To verify on Import Product for Suppliers in Table view | public void TC07_verifyEnteredProductsInQuickOrderTableSaveFunctionality() {
driver.get(getPropertyValue("RetailerURL"));
driver.manage().deleteAllCookies();
driver.get(getPropertyValue("RetailerURL"));
retailersLogin = new RetailersLoginPage(driver);
retailersLogin.retailers... | 0 |
bf2aa0d1865a2933717707d99f556151 | 3ff42de6ec889b0ca167c6a59f50b2fa | Get share info for a single share | namespace Apteco.ApiDataExplorer.ApiClient.Api
public partial class SharesApi : ISharesApi
public async System.Threading.Tasks.Task<ShareDetail> SharesGetShareAsync (string dataViewName, int? shareId)
{
ApiResponse<ShareDetail> localVarResponse = await SharesGetShareAsyncWithHttpInfo(dataViewNa... | 1 |
af03e5d3ec8954577efa0c7607a8baff | 692cbf0e78090de592e02e65908a1c8c | 删除原来的所有连接 | public class IpEntityDao
public boolean truncateConn() throws Exception {
Connection conn = DBUtil.getConnection();
if (conn == null) {
return false;
}
String sql = "UPDATE connection SET connipaddress=?";
PreparedStatement ptmt = conn.prepareStatement(sql);
ptmt.setString(1, "");
return !ptmt.execute(... | 0 |
cbfbc0e474ed99e20bfa6a17169ac09a | d8cf0f5a739bbf372fcf9c320dc7a10c | Calculate Average Correlation Coefficient | def calcCC(adjMtrx):
n=len(adjMtrx)
r=range(n)
return sum([helper(adjMtrx,i,r) for i in r])/n | 0 |
38b73d2402fd15b671024fcc63b90aaf | 7191522374f1149ebbf39989499750eb | 计算出文件名的输出宽度 | func genOutTemplate(list []climodel.ContainerExtend) string {
var nameLen, tagLen, nodeLen, stateLen, imageLen, updateTimeLen int
for _, v := range list {
imageName, imageTag := SplitFullImageName(v.Image)
if len(v.Names[0][1:]) > nameLen {
nameLen = len(v.Names[0][1:])
}
if len(imageName) > imageLen {
... | 0 |
cf7cccd1028c1d0e18939593bd9bfd79 | 15f23addb3d0acc310cb475e358fd6f4 | 目录提取测试用例 | files = os.listdir(dir)
for filename in files:
if filename.endswith('.json') and filename.startswith('test'):
with open(os.path.join(dir, filename), 'rb') as f:
case_data = json.load(f)
cls_name = filename.replace('.json', '').replace('test', '').split('_')
... | 1 |
5dc7b38941899d483ef0e28a520a247d | feecf15eced2369b298edfbe762fa91d | function to fetch all request info on init | async function getAllRequests() {
var list = [];
var userId = await getCurrentUserId();
var coll = await db.collection("users").doc(userId).collection("getInvolvedRequests").get()
coll.docs.forEach((request)=>{
var data = request.data();
var newRequest = new GetInvolved(data["fromUser"], data["toTopic"... | 1 |
5fd61ee6b058f6978bf9b9669d30b2cf | 6364692c994524449092822d2bf744ce | https://github.com/sjl/friendly-find/blob/master/ffind#L167-216 | let mut results = vec![];
for name in paths {
match fs::metadata(name) {
Err(e) => eprintln!("{}: {}", name, e),
Ok(meta) => {
if meta.is_dir() {
for entry in fs::read_dir(name)? {
let entry = entry?;
... | 1 |
ef7e6fa75885c43bfcd376f66d06ee28 | ad2cb75b9661ffb22c423bb1fb6c4602 | 生成.htaccess文件 | function updateHtaccess(){
global $dsql;
global $cfg_basehost;
global $cfg_userSubDomain;
global $cfg_busiSubDomain;
global $handler;
$handler = true;
$htaccess = '';
$defaultRules = HUONIAODATA."/admin/defaultRules.txt";
if(filesize($defaultRules)>0){
$fp = fopen($defaultRules,'r');
$str = fread($... | 1 |
21490518e120fb0e979f055b34e973b3 | 688157e25738843d76350f8a466592ca | this function should work by basically going through all the nodes and finding the one which is farthest along segment wise that also has not lost all its uses | public class BotLotPF
public static LotNode getClosestIncompleteNode(LotGraph graphIn, LotNode curNode, Collection<LotEdge> edgesToAvoid){
ArrayList<LotNode> notCompleteNodes = graphIn.getIncompleteNodes();
if(notCompleteNodes.size() == 0){
return null;
}
return getPathToClosestNode(graphIn, curNode, notComp... | 0 |
5c3b0c2396563a00e4837a5ee4e57c0a | b9ae030c5ed8f8c55a7d778ace833b47 | UPDATES
****************************************************************************************************** | class Upload
function doUpdate(){
try {
$this->db->beginTransaction();
$roles = Auth::getRoleID($this->db,$this->token);
if ($roles == '1'){
$sql = "UPDATE user_upload
SET Title=:title,Alternate=:alternate,External_link=:external,StatusID=:status,Updated_by=:username
WHERE ItemID=:itemi... | 1 |
609ff15dcd96d98d0a988f16fb64698d | 34d9ab783a717c06ef5e173a7910a6be | Recupere toutes les lignes de commande. | public class CommandeDAO
public List<Commande> ListAll() {
ArrayList<Commande> listeCommande = new ArrayList<>();
try {
Statement stm = papyrusDB.getCon().createStatement();
ResultSet res = stm.executeQuery("SELECT * FROM entcom");
while (res.next()) {
... | 1 |
0f2d5a9e24fdda132e264a122d1543d1 | 60ca71836b7896505f949e073866480d | This method sets the dealer for the very first round | for (int i = 0; i < MAXPLAYER; i++) {
playerCard = new ArrayList<Card>();
dealerCard = new ArrayList<Card>();
playerCard.add(allcard.getOneCard(true));
playerCard.add(allcard.getOneCard(true));
allplayer[i].setOneRoundCard(playerCard);
}
dealerCard.add(allcard.getOneCard(true));
dealerCard.add(al... | 1 |
5541fb8828c996aead7a1f0b21e8cc4b | 608afc17eb468d751dfd8247e02fbaa8 | move selection box with mouse | class DrawingBox:
def on_move_press(self, event):
self.curX, self.curY = (event.x, event.y)
self.canvas.coords(self.selection, self.start_x, self.start_y, self.curX, self.curY) | 1 |
9de7eed0f9c10810dcfcb6767f548422 | 03a64d030bfcc765b835b2b97d848b46 | Este metodo inicia desde la simulacion el thread que corresponde a la temporizacion de la red
de semaforos. | class Parking2
public void crearSemaforo() {
this.sem = new Semaphore(this.getNumPlazas());
} | 0 |
914c685d7b7bd2fae7e6a9fd8d7faaa2 | 51e6c766e7ddcbc0df1336eb0793ed71 | Check whether Twitter page exist or not | const loggedInIdentifier = await page.waitFor(() => {
return (
document.querySelector("#signin-link") ||
document.querySelector("#user-dropdown-toggle")
);
}, {});
const loginHandle = await loggedInIdentifier.getProperty("href");
const currentHref = await loginHandle.jsonValue();
return cu... | 0 |
981938cededa14af86476cb94d7bc5fb | 4a75a9ca4f20404833312bcbc4591451 | Set OpenSSO Administrator User. | namespace Microsoft.Azure.Management.Compute.Fluent.VirtualMachineScaleSet.Definition
Microsoft.Azure.Management.Compute.Fluent.VirtualMachineScaleSet.Definition.IWithWindowsAdminPasswordUnmanaged WithAdminUsername(string adminUserName); | 0 |
958293217717f01825764e180ecf18f9 | b409f1370cc7088a0bf5aa42521d81f3 | Converts images to PDF. | input_pdf_path = os.path.abspath(input_pdf_path)
output_image_folder = os.path.abspath(output_image_folder)
render_pdf(pdf_path=input_pdf_path,
pdf_name=input_pdf_path.split('/')[-1],
output_image_folder=output_image_folder,
output_image_format='png',
dpi=100) | 0 |
6c6ab400a85a8c8308b7afb71ac06842 | e19d59722586f226b051eb9f6da8c75d | Test if file path is a text file | func IsValidFile(filePath string) bool {
ext := path.Ext(filePath)
return strings.ToLower(ext) == ".txt"
} | 1 |
94c26d5a5af7c98de5509aff3f3cbea7 | d22933c324303d5ec745b7de58e1f113 | 鉴权中间件,只有登录成功之后才能通过 | function Auth(req, res, next){
req.isAuth = isLogin;
next();
} | 1 |
65b2bc6e0d07b45b33a7061863cbd200 | 5b87befca947497930ef5514420ba149 | Test case for are_abap_projects_updating
Checks if any relevant ABAP project is updating # noqa: E501 | class TestBcfApi(unittest.TestCase):
def test_bcf2_1_projects_topics_viewpoints_bitmap_update(self):
pass | 0 |
f04485c0a2137a806136a9a906ae2508 | 32b881e9b86ae3ab64d308a2074ee10b | Toggle the sprite display state | namespace TDCG
public class Viewer : IDisposable
[Obsolete("use SpriteShown", true)]
public void SwitchSpriteShown()
{
SpriteShown = ! SpriteShown;
} | 1 |
e844622459546fe2a710973639310dcd | a65a3e7e7567d27466f02fa58629f16d | Closes the file and returns the full path to the file. | abstract class FileReader implements FileReaderInterface
abstract protected function closeFile(); | 0 |
3b7695d09dfb6204e22c19228a3949b3 | e44e7520ed12c2cb0abd284c365a36f4 | 计算本地文件的MD5,标记哪些文件需要下载 | {
if (!m_isDownLoadOpen)
{
return;
}
foreach (KeyValuePair<string, DownLoadAssetInfo> kv in m_dicDownLoadInfo)
{
if (kv.Value == null)
{
Debug.LogError("WWWDownLoaderConfig CheckResVersion, kv.Value can not be null. Key : "... | 1 |
d2a91e62d804015ac9d760ae1a60c628 | b618137f47d5684a2aec0f75be0dd7d6 | 拖动更新选中的卡牌模型的位置 | local function UpdateCardPos(self)
if self.checkDrag == true then
self.curPos = Vector2.New((Input.mousePosition.x / Screen.width - 0.5) * self.canvasScreen.x,
(Input.mousePosition.y / Screen.height - 0.5) * self.canvasScreen.y);
if self.curPos.x > -800 and self.curPos.x < 800 then
... | 1 |
b301e17e4e90b15caafa121084cd0e11 | dcff3ff86a6c1e1a7ebcb921e5532043 | This method returns the current datetime | class BotDate:
def currentTime(self):
return datetime.datetime.today() | 1 |
99b2f4444c3f194f71bf52092dc56d53 | b2fa1ed92de2c536bf9cef732727fc1f | 카메라로 찍은 사진 ImageView에 적용시키기 | with(binding){
btnCaptureImage.setOnClickListener {
imageCapture?.let { imageCapture ->
val photoFile = createImageFile(outputDirectory)
val metadata = ImageCapture.Metadata().apply {
isReversedHorizontal = lensFacing ==... | 1 |
40d5e1c89c2797346ee083fa3a3cbf5f | b6aeb44256de15662a16d3101ebab651 | Returns a new object of class '<em>Real Type Definition</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | RedefinitionPrimitiveType createRedefinitionPrimitiveType(); | 0 |
ee134ef091169439421c4fb272f92694 | 710c4f9c63c7494f8f7deea0eef183b0 | Get the {@link Method} with the given signature (name and parameter types) belonging to
the provided Java {@link Object} or {@code null} if no {@link Method} was found. | public final class IntrospectionUtil
public static Method findMethod(Class<?> clazz, String methodName, Object... args) {
return findMethod(clazz, methodName, objectsToClasses(args));
} | 1 |
e21ed633d362bc76de97127593d060c1 | ca29246367b43498439ed47cd3e8c739 | 重新连接机械臂 | namespace AGVCommunication
public class ChargeSession : AGVSessionBase
public void ReConnect()
{
try
{
if (Init())
{
if (ReStart())
{
LastConnectTime = DateTime.Now;
}
... | 0 |
5b9b62172d380e5e7d6f587bc81ec038 | 9c1cdab48406085e17059bec44003d63 | Test create user group | class sfGuardUserGroupTest extends sfPHPUnitBaseTestCase
public function testCreate()
{
$t = new sfGuardUserGroup();
$this->assertTrue($t instanceof sfGuardUserGroup);
} | 1 |
8ff19cbf2152134a509c423a777a869c | de4769a32be4fb4955b93ccf533978cf | Sets the value of the allCount property. | class OnlineLogCmd extends \DrSlump\Protobuf\Message
public function hasCountAll(){
return $this->_has(6);
} | 0 |
bf5b7116160025bdf2000c5715d29630 | 8aedb9571d6c0a15fbf023c454d26588 | 自动机解决数字判断 | {
if (!Solution()) return false;
if (!autoDecision.GoBack()) return true;
while (true)
{
SolutionNumber decision;
if (autoDecision.popNumber != null && autoDecision.popNumber.IfNotDecide())
{
deci... | 1 |
832b520633a4377bbf9cbc7bdedaffbe | 66a9e920e5785822ffa24b8d4544d86b | Shows the print controls. | {
m_ctrl = print;
width = Width;
height = Height;
printedheight = 0;
} | 0 |
7e599624b3ffec7501cde74ab6b2f1c9 | d08b9f2649d8d1d4ad92ce3231463ae4 | 选择、更换GST文件 | string chooseFileGC() {
} | 0 |
4b2c2145ab3b1e473f2f8137952fc491 | 83076f1d94b1672fa2289e7eb6068007 | 比较日期的年月日是否相等 | public class DateUtils
public static boolean isEqualsDateByYearMonthDay(Date sDate, Date eDate) {
Calendar sCalendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+8"));
sCalendar.setTime(sDate);
Calendar eCalendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+8"));
eCalendar.setTim... | 1 |
3425855a74e67051e2a28ee7415c613a | 7c580e279be424df309e031ea94da873 | Проверка загрузки существующего эпизода. | class TrackerDBLoadTestCase(unittest.TestCase):
def test_load_database_good_next_episode(self):
trackerdb = tracker.load_database(os.path.join(self.testdir, '.tracker.json'))
self.assertEqual(
trackerdb._shows['game_of_thrones']._next.episode,
10
) | 1 |
979fb6217caa3355776c02a090a33ba5 | 453ba7dcdfbb3475448a30450330142c | 移动源目录到目的目录 | {
if (source.IsNullOrEmpty()) return;
var _source = GetBasePath(source);
if (!Directory.Exists(_source)) return;
if (dest.IsNullOrEmpty()) return;
var _dest = GetBasePath(dest);
if (!Directory.Exists(_dest)) Directory.CreateDirectory(Path.G... | 1 |
42037faf53239d1d8489e267944dc0c4 | e50c19c2c90ca7f83a1f42eca628811b | Дан массив названий переменных в camelCase. Преобразовать названия в snake_case. | function array_key_snake(array $array, bool $isRecursive = true): array
{
$results = [];
foreach ($array as $key => $value) {
if (is_array($value) && $isRecursive) {
$results[Str::snake($key)] = array_key_snake($value);
} else {
$results[Str::s... | 1 |
074928d44e2ee04ab4ff68e65b607dc3 | 04b94512d85fe5c2ff8447455335705a | checks if the object tree returned by the TypoScript parser reflects source code fixture 14 | $conditionForTtContent = self::finalizeCondition(self::$fullConditionForTable);
$conditionForPages = self::finalizeCondition('###BASE_CONDITION### AND ###WORKSPACE_CONDITION###', 'pages');
$additionalSelectFieldsForTtContent = $this->prepareAdditionalFields('tt_content');
$additionalSelectFieldsForPages = $this... | 0 |
02f0a7c76760205ef55bdac29f2b14b2 | e6ae6162819fe89b32ab065cebd3ee58 | 计算该用户直推有效用户下的usdt收益 | $res = $this->getAncestors($id,4);
$res = array_reverse($res);
$root = head($res);
$percent_row = \ProfitPercent::first();
$profit_split = income_mul($profit, percent_div($percent_row->base));
if($root['type'] > 0 && $root['type'] != 4) {
foreach ($res as $v) ... | 1 |
a137a290776944f4e0e329e1e0a59ce4 | df3c44f01b28de34c2f28a41ec5f13ff | HACK to force Xamarin.Forms layout engine to update control size | namespace EVEMon.Controls
public partial class Overview : UserControl
protected override void OnSizeChanged(EventArgs e)
{
PerformCustomLayout();
base.OnSizeChanged(e);
} | 0 |
d01388125b0be76f6c2782d61ecb048d | 6098c3f049643b53d6f4911a1940909e | +-----------------------------------------------------------
删除商品咨询(支持批量删除)
+----------------------------------------------------------- | global $db,$tpl,$cms_cfg,$TPLMSG;
if($_REQUEST["i_id"]){
$cu_id=array(0=>$_REQUEST["i_id"]);
}else{
$cu_id=$_REQUEST["id"];
}
if(!empty($cu_id)){
$cu_id_str = implode(",",$cu_id);
$sql="update ".$db->prefix("inquiry")." set del='1' ... | 1 |
5ff7eca3b1846c92c0cf6c95d3cc1efa | 09ed9aa6e6be72c22551628e38429446 | Check if ingredient exists in DB. If so, returns instantiated Ingredient
object. Returns none if ingredient not found. | query = """
SELECT id AS id
FROM ingredient_type
WHERE name = %s
"""
res = db.select(query, name)
if res is None:
raise rses_errors.DoesNotExist(IngredientType, name)
return cls(ingredient_type_id=res.id) | 0 |
c8e73bebf782541d77316e1af29d6ee1 | a1e1789dd1ad8137595a7376559c55d4 | 进入公交车详情页 | @Controller
@RequestMapping(value = "/web")
public class WebController
@RequestMapping(value = "/bigbus", method = { RequestMethod.GET })
public ModelAndView bigbusPage(HttpServletRequest request,
HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
String username = SecurityCon... | 1 |
83bc56347970c7ba588a3e75f9860bbe | 7ac9b015bd87a367cd35485adf9b1a1c | ! \brief This API will write the previous block header.
\context Internal Function.
\note TI FEE Internal API. | {
#if (FEE_BLOCK_ALWAYS_AVAILABLE == STD_ON)
VAR( Fls_AddressType, AUTOMATIC ) uDataAddr = (Fls_AddressType)0;
VAR( Fls_AddressType, AUTOMATIC ) uHdrAddr = (Fls_AddressType)0;
VAR( uint8, AUTOMATIC ) uClrGrpIndex = (uint8)0;
uClrGrpIndex = Fee_BlockConfig[Fee_uJobBlockIndex].clrGrp;
uDataAddr = Fee_... | 0 |
6ab3fe50fb5d4f0e32ccaeb60d254183 | b814cd6ec247a0fcef26644b1a821582 | This function installs SMBIOS Table Type 19 (Physical Memory Array). | {
CHAR8 *OptionalStrStart;
UINTN StringNumber;
UINTN StringLength;
EFI_STATUS Status;
EFI_SMBIOS_HANDLE SmbiosHandle;
SMBIOS_TABLE_TYPE13 *SmbiosRecord;
SMBIOS_TABLE_TYPE13_STRINGS SmbiosTableType13... | 0 |
91685535165303b6d4b8d16de3b07af1 | 5ea4ef75d6b0f58b6648a224684a49a5 | Tell all cores to stop looping | for i in xrange(self.numpools):
numworkers = self.numworkerslist[i]
for j in xrange(numworkers):
self.queues[i].put('__STOP__') | 1 |
30da6de3b57fbc8f2f959fd749571077 | ca63ebca75b21112958e9a72fca58e8b | ISR(TIMER1_OVF_vect) - Timer 1 overflow ISR.
This ISR will be called when every time timer 1 overflow
event is triggered.
Requires about 3.375 ~ 3.5 us. | ISR(TIMER1_OVF_vect) {
shutdownCounter = shutdownCounter + 1;
TCNT1 = 49910;
} | 1 |
f98bce8ed35ebb5973ebc732ed2379c8 | d90f7a437efc89ccd36e348255d6dd64 | アニメーションを列挙する。 | namespace Protogame
public class AnimationCollection : IAnimationCollection
public IEnumerator<IAnimation> GetEnumerator()
{
return this.m_Dictionary.Values.GetEnumerator();
} | 1 |
ca244bcb30b5416637cdc300f89bddc2 | 9849bfe648f913306aa85bf9373f9502 | sets the certifcate to the pointer provided | void CSettings::setCertP12File(QString filePath)
{
m_p12CertP12File = filePath;
} | 0 |
e95a28c56c15e56d3a0e3d34a2cf1cc2 | aec3571b0d30faef604724b8f7c1a909 | 年毎のGDPを返します。 | Map<String, double[]> getPowerGdpArray(); | 0 |
39f5cce854f9f9e205585a449d54a3fd | 4f29da40d711759cd9e268c1e197b9aa | Função que vai multiplicar duas matrizes e vai armazenar o resultado na matriz resultante, claro que tal operação será
realizada conforme as regras estabelicidas pelo calculo de multiplicação de matrizes. | void multiplica_matriz(double multiplicando[LARGURA][ALTURA], double multiplicador[LARGURA][ALTURA], double produto[LARGURA][ALTURA]){
int i, j, k;
for(i = 0; i < LARGURA; i++){
for(j = 0; j < ALTURA; j++){
for(k = 0; k < LARGURA; k++){
produto[i][j] = produto[i][j] + (multiplicando[i][k] * multiplicador[k][... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.