query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
4f9e65abbaf58808245396555f5f67e3 | 0717563e3c1dde607ac61e1d4ba3e160 | Takes in an item and inserts that item into the 0th index of the list
that is representing the Queue.
The runtime is O(n), or linear time, because inserting into the 0th
index of a list forces all the other items in the list to move one index
to the right. | class FirstQueue:
def enqueue(self,item):
self.items.insert(0,item) | 1 |
7a92194a8717316a7e8b0505803678b6 | f7cc0db4f4c0f106ac7d20165a5e32bc | Tests the minimum stepsize of GLIMDA. | f = sas_gen.OMFData()
f.ystepsize = 3
omf2sld = sas_gen.OMF2SLD()
omf2sld.set_data(f)
sld = omf2sld.output
sld.set_sldn(0.1, False)
model = sas_gen.GenSAS()
model.set_sld_data(sld)
output = model.run([[0.01, 0.03], []])
analytical = np.arr... | 0 |
b759ee4003430a262b657231111d595b | c3d9e8abbe59c9a273ba704dde31f01a | 应用模型,得到预测结果,并将结果按指定格式保存到文件。 | public class App
public static void main1(String[] args) throws Exception {
SimpleNet net = SimpleNet.load("./model.json") ;
File file = new File("./code_data/") ;
File[] files = file.listFiles() ;
Array x ;
Array t ;
for(File f : files) {
Array[] arrays = readImgFile2Array(f) ;
x = arra... | 0 |
2959e8433e500fd12994cb440d8cdc9d | 4127b6a43e1ab277c66d9f2cc3f8572b | Make an RPC request to geth. | $method,
$params = [],
callable $onFullfiled = null,
callable $onRejected = null)
{
$json = [
'method' => strtolower($method),
'params' => (array) $params,
'id' => $this->rpcId++,
];
$promise = $this->client
... | 0 |
2581b9a064335fc4d76f96366007f5b1 | bd4fd44cdc1364d36fd80d32262c7406 | Criar a URL encurtada atraves da API da Google - SOMENTE PARA URL
PUBLICAS | class TwitterBot(object):
def shorten_url(self, long_url):
return (apis.create_short_url(self.google_config, long_url))['id'] | 1 |
29ad6af0fc6b41abcdacb862abde6313 | 1e746cf687f0f35aee5ed995dc328186 | retorna valor unitario do item | class Pedido_Item
public function getPreco()
{
return (float)$this->_preco;
} | 1 |
944963f6673e1361404b54c77efddb46 | 11fc394fadc9e9e8e7775f12c00f0287 | Show the form for creating a new LokasiKejahatan. | class LokasiKejahatanController extends AppBaseController
public function create()
{
return view('lokasi_kejahatans.create');
} | 1 |
8d297abc3b6b3f7e986ec25b1ec29411 | 13ccfd95acdea431329b9c67efb56a81 | CREATE aggiunge un nuovo elemento alla lista | char carattere)
{
elem_lista_t *nuovo_p;
nuovo_p = (elem_lista_t *)malloc(sizeof(elem_lista_t));
nuovo_p->carattere = carattere;
nuovo_p->succ_p = *cima_p;
*cima_p = nuovo_p;
} | 1 |
f10ea7a638c9a699f3bd2420426ce077 | c0b75293269cad74e7b72f3a687da0ac | 测试sha256加密 | unsigned char *pucSrcData = (unsigned char *)malloc(24 * sizeof(unsigned char));
unsigned char *pucDestData = (unsigned char *)malloc(32 * sizeof(unsigned char));
unsigned char arrRightAnswer[32] = {0xbf, 0xa1, 0xd0, 0xdf, 0xce, 0xda, 0xe3, 0x14, \
0xea, 0x4f, 0x7b, 0... | 1 |
dfdead86301a67be3a1cb875d81d078a | 05e8877a53028cd4fbc5e31d218bee4e | 通过在 componentDidMount() 和 componentDidUpdate() 调用此方法,
创建 或者 更新 遮罩层 DOM | const layerElement = this.renderLayer();
if (layerElement === null) {
ReactDOM.render(<noscript />, this._layer);
} else {
ReactDOM.render(layerElement, this._layer);
}
if (this.layerDidMount) {
this.layerDidMount(this._layer);
}
} | 1 |
8848bc816e49e28b34954629bb415156 | 376ada894f32a28c9aa9048705a9121c | # Wrangle CASAL lengths into long format | lenAge <- dat %>%
filter(GearCode == 29) %>%
select(Year, Age, Length, SampWt) %>%
na.omit() %>%
group_by(Year, Age) %>%
summarise(MeanLength = WtMeanNA(x = Length, w = SampWt)) %>%
ungroup() %>%
complete(Year = yearRange, Age = ageRange) %>%
arrange(Year, Age)
lenAgeW <- lenAge %>%
... | 1 |
a529e1371e81ea2fed2c7f03effa5861 | 11c58c38111208940adf020244ba3707 | Function that handles the /area_format command, just gives information to the user about how get the area of a polygon | {
char *header_string1 = "\n\r Author | Area"
" | "
"Recommended | Enforced\n\r";
char *header_string2 = "-------------+-----------------"
"---------------------+---... | 0 |
a4202608d74fbe648f481d4d2e631ec5 | 2b5197b73af1d506da89d102a64b44b8 | 实现蛇形遍历 | fun spiralOrder(src: Array<Array<Int>>): MutableList<Int>? {
if (src.isEmpty()) return null
val airy = mutableListOf<Int>()
var up = 0
var left = 0
var right = src[0].size - 1
var down = src.size - 1
var x = 0
var y: Int
while ((up <= down) && (left <= right)) {
y = le... | 1 |
6d7dbdf82cfa4c71f234e8cbce5d6c40 | d452f9208d7a50ce6d869a7b6215ce86 | To convert Hexadecimal to Binary | string Converter::hexToBinary(string input)
{
string binaryString;
for(int i = 0; i < input.length(); i++)
{
string tmp = "";
tmp += input[i];
binaryString += myHexMap.at(tmp);
}
return binaryString;
} | 1 |
380a3cc7c448e2feb365dfd26bb4b942 | c67af6ee08a777b1073aa2179e5280cf | 将GameplayTagNode的children node对应的tag添加到TagContainer中去
RecurseAll表示在树状节点中, 就添加一层child还是循环一直往下找 | t.tag = TAG;
foreach (Transform child in t) {
SetChildrenTag(child, TAG);
}
} | 0 |
a4fa1cdadb76064bb6cd3d3c69e1f742 | 2a0475eadf19af7e252d0c5e705f1258 | Tests if get_queryset() returns only owner records not foreign one | class OwnerMixin(object):
def get_queryset(self):
qs = super().get_queryset()
return qs.filter(owner=self.request.user) | 1 |
6709b41a3f989f3c59a89f2a99c2b407 | 0e866becdd361acaaeb5bb7dde3b1bb1 | Gets the info list asynchronously. | namespace StartupCreativeAgency.Domain.Logic.Services
public class ServiceInfoService : ServiceBase<ServiceInfo, int>, IServiceInfoService
public async Task<IList<ServiceInfo>> GetServiceInfosAsync() => await base.ListAsync(); | 1 |
fd5fd376b4bb40e44ee81b4fc8abb680 | e160d220a6a0cb4e074903552041164e | Set the current player holding this power up | public abstract class PowerUp implements Collidable
public void onActivate(Level level, Player player) {
this.player = player;
} | 1 |
2f9022f4869fb7fa34e30be7c46fde26 | b49661a543f21f6c18c14142726c91ca | Writes this dictionary to an archive. | {
if (mode == ArchiveMode.Deserialize)
{
var count = stream.ReadInt32();
for (var i = 0; i < count; ++i)
{
var key = default(TKey);
var value = default(TValue);
keySerializer.Seria... | 1 |
bfef20ea57e60feaa9812f0906c51868 | e1615e9a35c1a6269d4f3fea53e2c7a4 | https://docs.apify.com/api/v2#/reference/actor-tasks/run-collection | const { docs } = await this.search({
query: {
bool: {
must: [
{
bool: {
should: [
{
bool: {
must: [
{ term: { 'task.status': 'idle' } },
{ ran... | 0 |
2ba4096200f209c30d0b33615e3ab6ec | fe1647c4f86eddafc8f07b50fe44a24b | 定义一个发布/订阅模式的交换机 | @Configuration
public class MessageConfig
@Bean
public TopicExchange topicExchange() {
return new TopicExchange("topicExchange");
} | 1 |
df11a1f960b9283874af4e1d0565a3dd | 5c05af2b4cccc32372af4e0c82de237a | Creates associated folder and retries until no duplicate found - adding a suffix (in the form ' {number}') | function appController(dt, $location, $scope, $timeout, $state)
function _getFolderName() {
var name = "New Folder";
var index = 0;
var check = name;
var search = true;
while (search) {
var found = false;
for (var i = 0; i < vm.folder.children.length; i++) {
if (v... | 1 |
fbf08b45da15ab8b7dfd2509d44bc311 | 772b00e46cf3cb4a218aadfc09000438 | Flow balance constraint | class GenericCHPBlock(ScalarBlock):
def _create(self, group=None):
def _Q_flow_rule(block, n, p, t):
expr = 0
expr += self.Q[n, t]
expr += -m.flow[n, list(n.heat_output.keys())[0], p, t]
return expr == 0 | 1 |
3609e96f7889fe7f7dcc371766f3e307 | c0762f5b9b994303c102545038fab966 | Http是否走代理 | namespace YSL.Framework.AddressLocator
public class IPAddressLocator
public static bool HasUseProxy(System.Web.HttpRequest request) {
return !string.IsNullOrWhiteSpace(request.ServerVariables["HTTP_VIA"]);
} | 1 |
e581888649a5435f00abc72d2e167206 | 3647abde6e8aae2d110fbc595e56260a | 解析16进制颜色RGBA值 | {
szValue.Remove('&');
szValue.Remove('H');
std::string hex = CW2A(szValue.GetString());
int* rgb = new int[3];
std::stringstream ss;
std::string str;
int size = hex.size();
for (int i = 0; i < 3; i++) {
if (size == 3) { str = std::string(2, hex[i]); }
else if (size == 6) { str = hex.substr(i * 2, 2); }
e... | 0 |
af364d40ae38a16f9b1c57a4f4503134 | 09ce8840034942f1b8921359fbc5644e | 获取前一个所依赖的表新增的url | String getDependsOnTable(); | 0 |
1d0206e9902ff64e1b8a5663650d06aa | f45ce7b326a06045abd7b7032e114f03 | Determine if an item has custom details associated with it.
Such items can not normally be stacked together safely. | public class CustomItemManager extends NovaModule implements Listener
public boolean hasCustomItem(String className) {
return customItems.get(className) != null;
} | 1 |
008fa0046b449afcd02506e61b04e97d | d21965c47dc35df34e7cbe1a24a81aa4 | Uploads a machine learning model to the model repository | blob = bucket.blob('networks/{}.json'.format(next_model))
blob.metadata = {
'args': json.dumps(args, sort_keys=True),
'rev': getenv('GIT_REV')
}
blob.upload_from_string(data, 'application/json') | 1 |
6bd6512101fb1246a644a1e6af41c8a9 | ecf08b32dd2410b652aeda2fd7bb7c0e | Returns list of rants matching the search term. | {
$output = array();
if($this->getSearchTerm() === null) { return $posts; }
$query = Query::search($this->getSearchTerm(), 0, -1);
$posts = $query->posts;
if(!empty($posts) && $posts != null) {
foreach ($posts as $post) {
$element = new Post();
... | 1 |
96e50458a07010e210107ec9fb3cf99a | e2e3ac523adba8e1019a6f1cb112cdba | Compute the second derivative at the end point of segment | abstract class ParametricCurve
fun endThirdDeriv() = thirdDeriv(length(), 1.0) | 0 |
fee3c09dc6d1d64a01e0bb9c04350ec9 | 34057edccd77b486541e7fb18ca805e2 | 更新图片标题 | function updateTitle(data){
return request({
url: '/admin/xy/upload/updateTitle',
method: 'post',
data
})
} | 1 |
47afd23be03d61991ae9b0af60c9c3dd | b1f5e710e63acdd333756acee7b2e2db | Funktion fuer Schluesseltests | {
if ((funktiontest(B1) * funktiontest(B2)) >= 0)
{
System.Windows.Forms.MessageBox.Show("Achtung: Kein Vorzeichenwechsel erkannt! a0 und b0 müssen verschiedenen Vorzeichen haben!");
}
if ((funktiontest(B2) < 0) & (funktiontest(B1)) > 0)
... | 0 |
db5466dc1c4f5b433f115cf161c9ec29 | 93ee527a4376952935671c1d89cfd32a | Exception testing for conversion. | fromUnit = 'ml'
toUnit = 'C'
value = 500
with self.assertRaises(conversion_refactored.ConversionNotPossible):
conversion_refactored.convert(fromUnit, toUnit, value)
fromUnit = 'F'
toUnit = 'yr'
value = 500
with self.assertRaises(conversion_refa... | 1 |
2615fc511a27e747b84b0e5312a0ebdc | 97aa7da05468c01a83ea07320d1da252 | Gets the sequence of ResourceExtensions. | {
foreach (var singleAsmFileResource in ResumeResourceNames)
yield return Path.GetExtension(singleAsmFileResource);
} | 1 |
20f5242ad8daa6807e14e4fd2633ed65 | 7b52fcf223065121f987bb7a36158ccd | Getting data from Database and populating to ListView | public class Student extends AppCompatActivity
private void setListView() {
ArrayList students = new <String>ArrayList();
SQLiteDatabase database = new DatabaseSQLiteHelper(this).getReadableDatabase();
Cursor cursor = database.rawQuery("SELECT * FROM " + Database.Student.TABLE_NAME,null);
... | 1 |
64c667b5c6e8b992a711b26ee83c6972 | 06419837bde08e6d63caa426ae8f643a | Write and transfer log extracts to pilot init dir for Nordugrid | import os
import glob
import re
if os.path.exists(benchmarkDir):
dataDirs = os.listdir(benchmarkDir)
for mydir in dataDirs:
benchmarkName = re.findall('\w\w\w\w\.\w.\d\d\d\d\d\.\w_\d\d\d\d_\d\d_\d\dT\d\d_\d\d_\d\d\.\d\d\d',mydir)[0]
for stage in stages:
... | 0 |
2979200baec26ea53d32f67e8c04aa17 | 160252e76968ccffd58de995582336fd | Método para imprimir a árvore em pós ordem dos elementos. | {
if (recorrido != null)
{
ImprimirPost(recorrido.izq);
ImprimirPost(recorrido.der);
Console.Write(recorrido.info + " ");
}
} | 1 |
ead4d31900d96713784cfd9ba6582184 | 8bbe28c139ce4d4ce20b8a04a629cf2b | Get BOM Component.
Bill of Material Component (Product) | class Product extends \Admin\Entity\Product implements \Doctrine\ORM\Proxy\Proxy
public function getCbm()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getCbm', array());
return parent::getCbm();
} | 0 |
a7e31d2e60f03c54cb92bfcd5cf3de91 | 22b4237e4e1cc27125d022eaaa6673ec | Returns all languages supported by the current device. | namespace VerticesEngine
public class vxGame : Game
public virtual vxLanguage[] GetSupportedLanguages()
{
return new vxLanguage[] { GetDefaultLanguage() };
} | 0 |
b2a77febac5ecc2261d9c63d8129cdeb | 8f2b84bd89afa2dea5de3e4c304ace56 | Решает судоку. | class Board:
def solve(self):
if self.__find_empty() is not None:
x, y = self.__find_empty()
else:
return True
for guess in range(1, 10):
if self.__check(x, y, guess):
self.board[x][y] = guess
if self.solve():
... | 1 |
06315b07de11f02b5466fa1416cd95da | 84145d445ebf5c4e9612e8069773ee81 | 从××.××°转成××°××′××″ | namespace Mineral.Helper
class AngleHelper
public static string ConvertAngleToString(string angle)
{
string result=String.Empty;
int counts = 0;
if (angle.Contains("″"))
counts++;
if (angle.Contains("′"))
counts++;
i... | 0 |
eb6edb27dea75e59fe3663ed60687cd8 | df33915ab1d09796fed0134e89027d2b | 返回下注是否中奖 | var winInfoList []WinInfo
numList := []int{}
drawNumberIntList, _ := S2IList(drawNumber)
for _, v := range me.GetOpt().Bit {
numList = append(numList, drawNumberIntList[v])
}
num := SumInt(numList) % 10
betNum, err := strconv.Atoi(o.BetContent)
if err == nil {
if betNum == num {
winInfoList = append(winI... | 1 |
0b33f129c4467c65f7f18d1c606b2eee | 024054dbfc31d4fbf69c3e4a37d4e756 | Returns the value of the '<em><b>Warning</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Warning</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc -->
extendedMetaData="kind='element' name='warning' namespace='##targetNamespace'" | public WarningState getWarningState(); | 0 |
a7d53268e4e22127177acfadd43e2419 | 58922b4a6a08f8ae59c914129ec8b34e | Get user saved folder displays. | with user_database.get_session(self, acquire=True) as session:
results = Utils.convert_result(session.execute(
select([user_database.Folders]).order_by(user_database.Folders.order)))
self.app_window.receiveFolders.emit(results) | 1 |
22e04d3514ceaac3864fa19c01854186 | 21b2b26fd1eb4c58d650ef073624616a | 用户充值余额商家提醒 | $templateId = "pJRBi34AqCz3jBncNwM0U_bzFOBSQh9rHOERS8_dlKI";
$wx = new WeChatModel();
try{
$data = array(
"first"=>array("value"=>'您好,您已成功进行会员卡充值。',"color"=>"#173177"),
"accountType"=>array("value"=>'卡种类型',"color"=>"#173177"),
"account"... | 1 |
f820f9a254c45bc8ff52a7d517b71014 | cdc8ccaf3c9def4c5a3392c7a714e697 | 释放奖励Texture | {
foreach (Transform child in _rewardPanel)
{
Destroy(child.gameObject);
}
} | 0 |
f48bd4463bcfb5a55e26b556474b9f64 | bb6e9add021afda68a26cba7de09f1ba | Get relation between this model and any read notifications that it owns. | class NotificationsRouter(object):
def db_for_read(self, model, **hints):
if model._meta.app_label == "notifications":
return NOTIFICATIONS
return None | 0 |
12c8f723730945cb5cb3ce0cf08c4260 | ad43c877b7e59eedd4c8c18c8205e31c | returns the timedelta difference between the start and end. | class DatetimePeriod:
def timedelta(self):
return self.end - self.start | 1 |
f09f24341e33bd4945c544da07c18f77 | 6d2d0b09b18f92600c915b7984c6742c | 種族名からレコードを取得し,Viewを作成する | {
var hGPedigreeMeta = _hGPedigreeMetaService.GetHGPedigreeMetaById(id);
var model = hGPedigreeMeta.ToModel();
ViewBag.Title = "修改您的族譜";
return PartialView("CreateOrUpdate", model);
} | 0 |
b0df5cb5f0ba6f5fec33ecd7e3e89b14 | c4b7237fe6768ecfb99067ba31ade0d5 | パース本処理後にロギングを行い、呼び出しスタックを更新します。 | {
NakoParserFrame f = frameStack.Pop();
lastNode = f.lastNode;
parentNode = f.parentNode;
localVar = f.localVar;
} | 0 |
fcf00b232da5b124d4264dfd83969e35 | eeaa679b62aa72ad3fd116e383d8f6b7 | GetCustomerByID ... Get the customer by id | params := mux.Vars(r)
i, err := strconv.Atoi(params["id"])
if err != nil {
log.Fatal("Invalid param id")
http.Error(w, err.Error(), http.StatusBadRequest)
}
for _, item := range customers {
if item.ID == i {
json.NewEncoder(w).Encode(item)
}
}
} | 1 |
e7a82d3714ccf96dada1509d90941f99 | aed9b17897579350ff3f1e7d0b7ca420 | 格式化私匙 | class RsaHelper{
public static function getPrivateKey($privateKey)
{
$formPrivateKey = "-----BEGIN PRIVATE KEY-----\r\n";
foreach (str_split($privateKey,64) as $str){
$formPrivateKey .= $str . "\r\n";
}
$formPrivateKey .="-----END PRIVATE KEY-----";
return $formPr... | 1 |
4eeda763931c77595d0348c5d0daa8d6 | 7d40f89b3261a56dd81817d08396a050 | Get creditCardExpirationDate. | public class CreditCard implements Serializable, Matchable<String>
public String getCreditCardExp() {
return creditCardExp;
} | 1 |
45dc6a8724c8f4295a9ee665c4856759 | ab16cd3f1a0c9edf3a948091d165c687 | Internal helper to get a ConfigItem object from the DB. | public Item getItem(String itemName) {
TinkerforgeBindingConfig config = (TinkerforgeBindingConfig) bindingConfigs.get(itemName);
return config != null ? config.getItem() : null;
} | 0 |
6b6acb8995e4e009be2c27d66972b30f | a68d22d8dce91db8bb4da898ce185450 | Metodo que se usa para poder actualizar los registros de forma que
quede activada la oferta de nueva cuenta y asi el usuario pueda visualizar
las promociones una vez que quieran aprovechar las ofertas que esta ofreciendo el
negocio y los usuarios puedan aprovecharlas | _prospectos = Prospecto.find_by(id: params["id"])
if _prospectos.estado_id == 9
_prospectos.estado_id = 7
if Contenido.exists?(prospecto_id: params["id"])
_contenido = Contenido.where(prospecto_id: params["id"]).order(version: :asc).last
if _contenido.estado_id == 9
_contenido.estado_id = 7
... | 1 |
0272a3f556060afcfe8dfc79106f18d0 | 5d80c3662bd09d88d2f81d11ef04baaf | 快照对象列表总数 | public int getSnapshotCount(); | 1 |
ec26f64f738f9bd5fc7be3d3957387be | 0d0d936267a50751c66fa126b7f8b1bf | The pattern used to identify resources that need to be copied, this pattern will be applied to non template paths. | public class TemplateConfigBundleConfiguration
public Optional<String> resourceIncludePath() {
return Optional.fromNullable(resourceIncludePath);
} | 0 |
69b329258fd6dad2554cd82a7c3ca9ee | cf0a4cd20d7b50c548eec6e02958d70f | Send email to user on role change | def user_post_save(sender, instance, signal, *args, **kwargs):
if not instance.is_staff:
send_email.delay(instance.pk) | 0 |
a64a8f8af0c2190a2dde56cdd683dcf2 | 7ba1fc2107d4ae614329b5698a007bd5 | Returns the meta object for class '{@link iso.std.iso.ts._29002._10.ed._1.tech.xml.schema.catalogue.PropertyValueType <em>Property Value Type</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getPropertyValue_Type(); | 0 |
5cb8975c2d6ed27983f99927be7de33d | 0ba7bfc90c5253b8f68eb3815dc30067 | Sets the CPU mode. | public final class Cpu extends Component
public void setCpuStepping(String _cpuStepping) {
this.cpuStepping = _cpuStepping;
} | 0 |
ab08e78ab9e8ffabf3d03a075fef11c3 | e2d17877be482341ddca8507770e30ee | Simple kernel that tests paging | {
unsigned long ptr;
for (pdt = NULL; pdt == NULL; )
pdt = vmalloc(PAGE_SIZE);
for (pt = NULL; pt == NULL; )
pt = vmalloc((RANG_KERNEL_SIZE / PAGE_SIZE) * sizeof(pt));
for (ptr = 0; ptr < (RANG_KERNEL_SIZE / 4194304); ptr ++)
{
pdt[ptr] = (ptr * PAGE_SIZE) + (int)pt + 0x7;
}
for (ptr = 0; ptr < RANG_KERNEL... | 1 |
2b40e57c865217c709765344818a325e | 485de8201fd5fbfdc9542aa990428b02 | Add a sphere and a label to each stimulation site. | self.color = color
self.center = center
self.side_length = side_length
colors = {'+x': self.color, '-x': self.color,
'+y': self.color, '-y': self.color,
'+z': self.color, '-z': self.color}
self.stim_object = GlCube(colors, center=self.center, s... | 0 |
9adb129bdaf0ee17cdd1ea63a1fa91ee | 0595443f79abf3822724e1832ea4d3be | 测试网络超时 | public void testJdbcTimeout(){
DataSource ds = new DataSource();
PoolProperties p = new PoolProperties();
p.setDriverClassName("com.mysql.jdbc.Driver");
p.setUrl("jdbc:mysql://127.0.0.1:3306/param?useUnicode=true&characterEncoding=UTF8&useSSL=false");
p.setUsername("param");
p.setPassw... | 1 |
ddaf67abaac80fd80151cc113ea8447e | bc8f88818b6a2cc6e51fc3999da71c6e | Read a plant configuration specification by unique identifier. | @Data
@FieldDefaults(makeFinal = false, level = AccessLevel.PRIVATE)
@Slf4j
public final class Configuration implements WithId
@NonNull
public static Optional<Configuration> getById(@NonNull String id) {
return Optional.ofNullable(ID_TO_CONFIGURATIONS.get(id));
} | 1 |
c71f19bd8a641668e3dac83fc08b1bac | 71e8f7f3011c5b1691f2957c74159d71 | Применение свёртки к изображению | function ApplyKernel(img, kern) {
let height = img.height;
let width = img.width
let new_image = new Uint8ClampedArray(4 * height * width);
new_image.fill(255);
for(var channel = 0; channel < 3; channel++) {
for (var X = 0; X < width; X++) {
for(var Y = 0; Y < height; Y++) {
... | 1 |
465408c8bc782b52b83b9aae445ffe77 | 5b327bd60fa1e8dee3de16c3461735d2 | 根据角色 id 和 权限 id 删除关联信息 | public void deleteByRoleAndPrivilege(Integer pid,Integer rid); | 1 |
e6367007e772ab635f986fd3b9c7ce29 | 89e2be7bcfa8fa15c517a381f653a0df | 判断两个DateTime是否属于同一年。 | namespace ModelBase.Base.Utils
public static class DateTimeExtend
public static bool InSameYear(this DateTime date, DateTime targetDay)
{
return date.Year == targetDay.Year;
} | 1 |
c270ed18589af1a93d185e07f9a197e7 | 6d5eba32dbe41941f1c74a59cf059694 | No title in printer version | int CBCGKeyMapDlg::OnPrintHeader (CDC& dc, int nPage, int cx) const
{
TEXTMETRIC tm;
dc.GetTextMetrics (&tm);
int yMargin = tm.tmHeight * 2;
CString strAppName = (AfxGetApp ()->m_pszAppName == NULL) ? _T("") :
AfxGetApp ()->m_pszAppName;
CString strTitle;
GetWindowText (strTitle);
CString strCaption;
strC... | 0 |
6cc3bd68a43a917d14f3ebca004181c0 | d62154f7d2859dd3fd2b5abac96515a3 | Sets the maximum number of milliseconds that the pool will wait for a connection to be
validated as alive. | public class DataSourceImpl implements DataSource, LifecycleComponent
public void setMaxWait(final long m) {
maxWait = m;
} | 1 |
80c32d227c1965d99b4c6d266da4ae9c | 7c225f1010b9d197bd1019a10875ec40 | \brief From NCSE to NCEM (both in position/momenta form) | {
double gamma = qbp->cs_em.gamma;
double c1 = qbp->cs_em.c1;
yEM[0] = -gamma*(yNC[0] - c1);
yEM[1] = -gamma*yNC[1];
yEM[2] = +gamma*yNC[2];
yEM[3] = -gamma*yNC[3];
yEM[4] = -gamma*yNC[4];
yEM[5] = +gamma*yNC[5];
} | 1 |
b12bbb0a482252c6b74b3af352f68146 | b6c4e5168fa0883a03cf565dd8129608 | Worker method to handle ProcessCallBack request for a contact action. | {
CallbackResult<Contact> callback = new CallbackResult<Contact> { IsError = false };
if (e.Error == null)
{
callback.Object = e.Result;
}
else
{
callback.IsError = true;
callback.ErrorMessage... | 1 |
a72f3ad623e3b9689f0c69e3884a5dad | d6958fa316781a81a18fdab70dfd1bf4 | 获取箭头风格宽度
一般指三角形底边长度 | float penWidth;
float maxWidth0 = 2;
float minWidth0 = 1;
float penWidth0 = minWidth0 + (maxWidth0 - minWidth0) * press / 255.0f;
penWidth = penWidth0 > minWidth0 ? penWidth0 : minWidth0;
return penWidth + 1 + strokeWidth;
} | 0 |
6db419f50716e435c665e68fb1ba0f6a | 3837a6877d4f1ec4f76b5844765e8955 | CstrDayStd列表 | _cn_year_list = [
0x53, 0x48, 0x3d, 0x50, 0x44, 0x39, 0x4d, 0x42, 0x36, 0x4a,
0x3e, 0x52, 0x46, 0x3a, 0x4e, 0x43, 0x37, 0x4b, 0x41, 0x54,
0x48, 0x3c, 0x50, 0x45, 0x38, 0x4d, 0x42, 0x37, 0x4a, 0x3e,
0x51, 0x46, 0x3a, 0x4e, 0x44, 0x38, 0x4b, 0x3f, 0x53, 0x48, ... | 0 |
e7f0b3ad76cfae76314307eaf8d85023 | fdb3e3b7766ae47c716484e3e59ae7a3 | Create a default constructor. | class Node
Node() = default; | 1 |
edb4a99872a5a4b4b47105bb7893078d | a80e261fb763e24b79505d70f3c406d5 | Load user details from the shared preferences file into memory | public class MainActivity extends AppCompatActivity
private void loadLoginInfo() {
SharedPreferences sharedPreferences = getSharedPreferences("ZoomLogInInfo", Context.MODE_PRIVATE);
email = sharedPreferences.getString("userName", "babysfirstphone550@gmail.com");
password = sharedPreferences.getS... | 1 |
4f7e9240cc9743f80b252a4cfeea1e30 | bf84f8c8fb005444ec012e1859f552e8 | Sets the maximum number of children in a node. | public final class JsonRecordSerializer implements Callable<Void> public static final class Builder
public Builder maxChildren(final long maxChildren) {
this.maxChildNodes = maxChildren;
return this;
} | 1 |
be89d62f0effaf406708a212761cd93c | 8ac777c3a16045b44f99e705f7f834fb | Get size of graph out of graph6 or sparse6 string. | int size = 0;
try {
BufferedReader br = new BufferedReader(new FileReader(new File(graph_path)));
String first_line = br.readLine();
String[] first_split_line = first_line.split(" ");
size = Integer.parseInt(first_split_line[2]);
br.close();
} catch (Exception e) {
e.printStackTrace();
}
ret... | 0 |
4df98c68724a6d451451ba5318f0fc71 | 746557a376c86280010c67a17fec098c | Remove any references to us from all outstanding chunk requests | void
chunk_delete(chunk_reference_t reference)
{
chunker->chunk_delete(reference);
} | 0 |
df869da7e41c5d04746a0f842ed07125 | e97038fa9c3654aa647407aae5cb2c72 | Googleの認証ページヘユーザーをリダイレクト | class MembersController extends AppController
public function googlelogin() {
if ($this->Auth->loggedIn()) {
$this->redirect(array('controller' => 'pages', 'action' => 'home'));
}
$this->autoRender = false;
$client = new Google_Client();
$client->setClientId(GOOGLE_OA... | 1 |
79eed8ad5e5d3574a64da12d04d00f90 | fe2bdea02af465dc4bf0f568bec20cd8 | Attaches to the document using the specified properties, which are also cached. | public attachToDom(document: Document, rows: HTMLElement[]) {
this._document = document;
this._rows = rows;
} | 1 |
8a28050a6885c31ce94782cac7a97f6a | ad3da856dea6a39af8884c5336769115 | Is called when PDepend has finished the file parsing process. | {
if (null != ParsingFinished)
{
ProgressText = "";
ParsingFinished(this, args);
}
} | 1 |
58d73777e3f41d0f6004cf25a3387532 | 5cce1586c57067a8afcf6b5c8edb0265 | Gets the bytes for the PKCS7SignedData object.
@return the bytes for the PKCS7SignedData object | public final class UrlParametersToSign
public byte[] getData() {
return this.data;
} | 0 |
2cc7f6df7709fe8f553d565fad5433de | b8d98941060ea12bc88659a24a8a5416 | 如果这个IPV6的地址是IPV4映射过来的,将其还原为IPV4的地址 | if system.is_ipv4(ip) then
return ip
end
return find(ip, '::ffff') and match(ip, "::[fF]+:([%d%.]+)") or ip
end | 1 |
8e045155f04c2326490e41e2bfd7a471 | 600078bfdd757987a0b547917ac6a0cc | Override this to change the testing DSN | abstract class phpDataMapper_Database_Adapter_Abstract implements phpDataMapper_Database_Adapter_Interface
public function getDsn()
{
throw new BadMethodCallException("Error: Method " . __FUNCTION__ . " must be defined in the adapter");
} | 1 |
b622d180451a96434237189dea17b455 | 1ca0da36d48580373709534d3046ac78 | Test ovsvapp_mitigated_cluster list. | populate(mz, 4)
for compute_id in list(range(0, 2)) + list(range(3, CLUSTER_SIZE)):
kill_clusterd(mz, compute_id)
validate(mz, 4) | 0 |
91d6aedf0df7238e00553ec143d7a9d3 | 5006a65773d8d608ad3b58284b7e1a12 | Get the delai le. | class Clients
public function getPaiementLe() {
return $this->paiementLe;
} | 0 |
35e66c21829dc1705910ffe98ac53a8f | 6f0aa809c420c187ef6eb32980fbe187 | Retorna a referencia da propria classe. | public class FolhaCalculo implements Serializable
public FolhaCalculo getFolha(){
return this;
} | 1 |
a477f1e5cc7c8ddbd3fb97c5c75a2f4d | 6d11d4cfa23ed54375c85315cfa41ba4 | Generates a crossover between pop_member1 and pop_member2. | void GeneticAlgorithm::Crossover(const vector<double> &mum,
const vector<double> &dad,
vector<double> &baby1,
vector<double> &baby2)
{
if ((GetRand(RandSeed) > mCrossoverRate) || (mum == dad))
{
baby1 = mum;
baby2 = dad;
return;
}
std::uniform_int_distribution<int> genInt(0, mChromoLength - 1);... | 1 |
d6b6bbda8cdb29ffc8fca7b572ce4874 | 35e921e24b44ccd8b1a983c7d957d3d6 | Returns the min supported SDK version | class WebDriverBrowser
_getMinSupportedVersion() {
return false;
} | 0 |
4816ddf2c8eb2746f72631374058d154 | ad2db97830dd21dedbf9002f17fcac9b | 每当重新布局结束时,会调用该方法。 | namespace Walterlv.Demo.Windows
internal class WindowWrapper : FrameworkElement
private void OnLayoutUpdated(object sender, EventArgs e)
{
} | 1 |
2d98158a68a6bcb76c5084fb121f6dd4 | 04145b5dad19cf306e45236fdd2790e9 | ------------------------------------------------------------------------
レーザーを前進させる.
------------------------------------------------------------------------ | {
RaycastHit hitInfo;
bool hit = mFixRay.ForwardBoxCast(out hitInfo);
if (!hit) { return; }
if (accel < 0.2f) { return; }
mTransform.Rotate(0.0f, 0.9f * steer, 0.0f);
} | 0 |
9d5fa18f993017952ac0301574ef41d2 | 3188bd3189de460499dd579138d68227 | Will call sign in and sign out depending on current status | function updateSigninStatus(isSignedIn) {
if (isSignedIn) {
submit1.click(ev => {
ev.preventDefault();
generateForm(name.val());
});
submit2.click(ev => {
ev.preventDefault();
sendData();
});
getData();
}
} | 0 |
44b652bba3754e0dd22547b7ab736595 | ea0f86a3eac8881f76ce50968b32b83b | Returns statement to execute if condition is false | namespace Appccelerate.StateMachine.Syntax
IOtherwiseSyntax<TState, TEvent> Otherwise(); | 1 |
969fd94106a1519265303e0e1f0e5aab | 6c64c85a20f818861e40becb94cd62d4 | Fermer la socket d'écoute. | #ifdef _WIN32
int statusComm = closesocket(mSocketCommunication);
int statusListen = closesocket(mSocket);
#endif
#ifdef __unix__
int statusComm = close(mSocketCommunication);
int statusListen = close(mSocket);
#endif
if (statusComm == SOCKET_ERROR || statusListen == SOCKET_ERROR) {
fprintf(stderr, "%s\n", Gesti... | 1 |
1a8f8dfedf6561fd8a5ba9269062c838 | 8c7b68163f4e34c87ce380ec157d527a | remove polygons based on attribute values. | def polygontest(src,cnt,mask = None):
if mask:
for i,j in zip(*np.where(mask==1)):
src.itemset((i,j),cv2.pointPolygonTest(cnt,(j,i),True))
return src
else:
return _polygontest(src,cnt) | 0 |
e09350631bdb0bffa737b2d0b0a6cdfd | 47c503cad8cc31112b8c025f7a79f753 | Reset all modifications made to attribute substitution helper,
e.g. if add_svg_attributes() has been invoked. | void resetAllAttributes(); | 1 |
883353187a2e8d316567894cae577d54 | 1533f51d45bc025dfa8d362d06afce7d | Cipher Suite Tables. | {
static const uint32_t C_array[] = {
0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee,
0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501,
0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be,
0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821,
0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa,
0xd62f105d, 0x02441453, 0xd8a... | 0 |
fd04b10a48ca325cfebcc004ae66384c | 337c48f9347374ba889ddd6a7a6887cc | !
\brief Wysyła żądanie dodania użytkownika do grupy. | class AddUserToGroupRequest(BaseRequest):
def __init__(self,
ts_connection,
user_id):
super().__init__(ts_connection)
self._user_id = user_id
self.base_add_user_request() | 1 |
f3d96599ef697015bf26853f90c94ae9 | 65d4389bc22e830b06bf91cbcfd5d26c | The duration in seconds that a user's account is considered locked out. Once the
{@link #getAttemptsBeforeAccountLockedOut()} has been reached, the user must wait the
duration specified by this value before attempting to authenticate again. | if (accountLockoutDurationInMinutes != null) {
this.accountLockoutDurationInMinutes = accountLockoutDurationInMinutes;
}
} | 0 |
aaecd457b969ba8843e168d0fe0e651a | 507dce638565ffbb8a4118f685fcb1b6 | 计算曲线段首尾切线 | cc = CurveCutter(self)
start = 0
tv = t * cc.calcCurveLength()
p, tangent = cc.subsegmentPoint(start=0, end=tv)
return p, tangent | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.