query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
eb6c8fb1676d9443b4013cae20762cbf | 3c3d969b125b705233f4ef0bdf9f9908 | Finds node with the lowest F cost in the passed array | class MapHandle:
def getLowestFCost(openNodes, map):
lowest = len(map)*2
id = 0
for node in openNodes:
f_cost = map[node].g_cost + map[node].h_cost
if f_cost < lowest:
lowest = f_cost
id = node
return id | 1 |
0c38713ffe84a8d6950b5d3a08de6b82 | 1b6a131694d0bc55d6db9243c10694bd | 获取指定菜单的层级数 | public function getDepthByMenuId($menuId): ?int; | 1 |
d8498c62d2d21ac09aab22285eabe047 | f9c39fe7e5e9c2b1546aec7b605d7cbd | restituisce la lita delle prenotazioni di un determinato utente | class FPrenotazione extends Fdb{
public function loadfromuser($key) {
$query='SELECT * ' .
'FROM `'.$this->_table.'` ' .
'WHERE utenteusername = \''.$key.'\'';
$this->query($query);
return $this->getObjectArray();
} | 1 |
48715361d9c14ef32a8fec8f9234be1e | 11730cb3bc69f2708206e9acc1d6500e | 将查询结果转换为BigInteger集合 | if (StringUtils.isEmpty(resultStr)) {
return new ArrayList<Long>();
}
return JSONUtils.parseArray(resultStr, Long.class);
} | 0 |
823e0518c469877a6a6d6f2184380502 | 6f6d641a4a2249d4ef5b78eb415f45a9 | Simplify the list of geometries passed in using the GeometryServer. Simplify permanently alters the input geometry so that it becomes topologically consistent. | PHP_FUNCTION(rdp_simplify)
{
zval *points_array;
double epsilon;
geo_array *points;
int i;
zval *pair;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zd", &points_array, &epsilon) == FAILURE) {
return;
}
if (!Z_TYPE_P(points_array) == IS_ARRAY) {
return;
}
array_init(return_val... | 0 |
14244b86b1b5454473ef218bb33f6ce9 | fbc1777282eaf87e3a6bdaf484073024 | 화면에 조회된 일반회원의 정보를 데이터베이스에서 삭제 | boolean deleteNomalMember(MemberVO vo); | 1 |
4e3c626e40b95f3858a6b64e4ebeb9c9 | 30d3814fe1cbf49e36584f2ec9a5d9d9 | Get the maximum amount of characters allowed by your system. | {
if (strcmp($this->maxNumOfChars, "") == 0)
{
return 0;
}
else
{
return $this->maxNumOfChars;
}
} | 1 |
2df24cc659ef3a0ec26fdfddda957cab | c85d7fc07ab59ee9839ab30d7eb69ca7 | Gets the total duration the app op was accessed (performed) in the foreground.
The duration is in wall time.
{@link #OP_FLAG_SELF}, {@link #OP_FLAG_TRUSTED_PROXY},
{@link #OP_FLAG_UNTRUSTED_PROXY}, {@link #OP_FLAG_TRUSTED_PROXIED},
{@link #OP_FLAG_UNTRUSTED_PROXIED}. You can use {@link #OP_FLAGS_ALL}
for any flag. | namespace Elastos namespace Droid namespace App namespace Usage
ECode CUsageStats::GetTotalTimeInForeground(
Int64* result)
{
VALIDATE_NOT_NULL(result)
*result = mTotalTimeInForeground;
return NOERROR;
} | 1 |
9a46045b857471ddc5bed8b1ff271047 | 17139d67c0acc9db67bab3135ec0b8b3 | Check if merging ethanol with a molecule yields the right number of atoms. | class TestFamily(unittest.TestCase):
def test_react_benzene_bond2(self):
family = self.database.families['R_Addition_MultipleBond']
reactants = [Molecule().from_adjacency_list("""
1 *1 C u0 p0 c0 {2,B} {3,B} {6,B}
2 *2 C u0 p0 c0 {1,B} {4,B} {9,B}
3 C u0 p0 c0 {1,B} {5,B} {7,B}
4 C u0 p0 c0 {2... | 0 |
693870e9372d5b87d0ae0ba5af13a7e3 | 35377db5e1e7bc63f08983f7102e4725 | dash-separated -> camelCaseAction name.
dash_separated -> camelCaseAction name. | function format_action($string)
{
$string = str_replace('-', ' ', $string);
$string = ucwords($string);
return $string;
} | 0 |
50c3a6e25df8ddb221ec48c62eaad1e2 | a76daa8082d1dbac83e8c2e298d1ab50 | 新增收藏用例 | @Log(title = "收藏", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(UCollection uCollection)
{
uCollection.setCreateUserId(ShiroUtils.getUserId());
return toAjax(uCollectionService.insertUCollection(uCollection));
} | 1 |
2653a3fcc87e1ce462d445703be577a9 | d7b333c49fad1bef7de9127d18dbfabd | 通过名字获得列,比如A,B,AC | IBAColumn getBAColumn(String strBAColumnName) throws Exception; | 1 |
42daf937fffacea8c368c849dee96db9 | 9099a6f71b72f83610efb9011a19af03 | New generates a random ID using crypto/rand. | func newID() string {
var data [8]byte
binary.LittleEndian.PutUint64(data[:], uint64(time.Now().UnixNano()))
return base32.HexEncoding.WithPadding(base32.NoPadding).EncodeToString(data[:])
} | 0 |
857c3c191dd2494d0a321b0d5339137b | 4a5c119a84e42d41adf7bf16aaf2e47c | Determines if an Entity has Components consistent with the Aspect's pattern. | public boolean hasAspects(); | 0 |
425ccbece086679dc3310a003523a297 | b63161f21da90bbdbdf47df50e2384fb | 在服务器保存图片文件 | namespace ZXingDemo.Controllers
public class ZxingController : Controller
public ActionResult SaveAs(HttpPostedFileBase MyFile)
{
var StrFileName = Path.GetFileName(MyFile.FileName);
var ServerFile = Server.MapPath("/ServerFile/");
MyFile.SaveAs(Path.Combine(ServerFile, S... | 1 |
27a13f1eebba0aae4041f6454902a2fb | bb52ff4577449baff76809d8a8ef2ca3 | Gets the sprite sheet index. | namespace RC.Common.Configuration
int GetSpriteIndex(string spriteName); | 1 |
d59f18b5a427658166891cd7ced41cd6 | 75773992752bbae150eb781805519f45 | 调用类中打开端口函数,使用协程打开指定端口 | def openPort(self, port_name="COM7"): | 0 |
33bf501aa8cb9336364d2c98ea7568ce | 53b3ea2632ac7b292b81865184a3dee0 | Convert device twin registration property to registration model | if (data) {
obj = obj || new RegistrationPublicKey();
if (data.hasOwnProperty('keyId')) {
obj['keyId'] = ApiClient.convertToType(data['keyId'], 'String');
}
if (data.hasOwnProperty('validUntil')) {
obj['validUntil'] = ApiClient.conv... | 1 |
7e62e9cee26d2e097ad2cb1285324353 | 3147c2a3c01ab81e417e83e5875c2025 | 有玩家胡牌 | protected synchronized void executeHuPokerOperate(Decision decision) {
try {
PokerPlayer player = getPlayerByUserid(decision.getUserid());
debug(String.format("玩家【%s】胡牌了", player.getUser().getNickName()));
int chookPai = 0;
if (cards.size() > 0) {
chookPai = cards.remove(0);
outputCrossChook(choo... | 1 |
7fdcc8b385090172c1b232f5d5d783af | 32893cf8e9bb47d346739d58047c0510 | @brief Display Decrypted Data | {
size_t buffer_size = buffer_[2] + 3;
ROS_INFO("DEC");
for (size_t i = 0; i < buffer_size; ++i)
{
ROS_INFO("%u ", buffer_[i]);
}
} | 1 |
ad129082f13590554675fcf2e0cb0d95 | 043a7f997750af72648561e8a3c981eb | Actualiza la información de la canción. | function actualizarInfoWeb() {
wTitle.textContent = song.name;
wArtist.textContent = song.authorName;
wArt.src = song.art;
} | 1 |
3033c3c6c4c9529733ab833fde3b9a62 | 684472380144064c8a147d69f7bde62d | Initialize the hash tables: mon_table, record_table, recov_q and
locks. | void
nfs_nhinit()
{
nfsnodehashtbl = hashinit(desiredvnodes, HASH_LIST, M_NFSNODE,
M_WAITOK, &nfsnodehash);
lockinit(&nfs_hashlock, PINOD, "nfs_hashlock", 0, 0);
} | 0 |
6f3b9947fb01c9792c688bde4c8e87e0 | fb2d4d636ece70f6948d083c920840d1 | update the current map to the next map | function Map:next()
self:clean()
self.currentLevel = self.currentLevel + 1
self:init()
Player:resetPosition()
end | 1 |
32f6c67fbc1f11781455cdbc3ec459a8 | 73f1e050c54168352ef75c5c0e9a1d3b | Returns the distorted waveforms. | class EstimatorSpecBuilder(object):
def _build_mwf_output_waveform(self) -> Dict:
import norbert
output_dict = self.model_outputs
x = self.stft_feature
v = tf.stack(
[
pad_and_reshape(
output_dict[f"{instrument}_spectrogram"],
... | 1 |
b2b31295de03b289f69f14de66423f38 | 68f4ba728de79e2edf7c299fc33f74db | In-Order Traversal Search | if(this.root==null){
throw new RuntimeException("This tree is empty!");
}
return this.root.inorderSearch(id);
} | 1 |
fcd51c21c95af5fd72fd0247b83053fc | b20957ef255e6c67c6faa775e0a48a92 | Gets the spaces that a user has the "member" role. | {
SpRoleAdmin sp = new SpRoleAdmin(String.Format("SELECT *, (SELECT COUNT(MemberID) FROM MemberRoles WHERE MemberRoles.RoleID = RoleID) MemberCount FROM {0} WHERE RoleID IN (SELECT RoleID FROM MemberRoles WHERE MemberID=@MemberID) ORDER BY Name",Table));
sp.AddParameter("MemberID", Membe... | 1 |
5b08f7fa71e8e89a1a8c57ac9a9ab4af | eb319c19deb68a70a5f08b5f1e53fd75 | Gibt an, ob es sich bei dem Namen um einen weiblichen (true) oder männlichen
Namen (false) handelt. | class NCLNameCaseCore extends NCL
protected function womanFatherName()
{
return false;
} | 0 |
818ca35907a8d22970b728a2c1f36d73 | 3525e3d3913f5b4c3fed3856dce61e92 | Returns a summary of insider transactions for the requested ticker. | export class RESTClient
async getSummary(exchangeSymbol: string, pairSymbol: string): Promise<Summary> {
return await this.getRestData(`/markets/${exchangeSymbol}/${pairSymbol}/summary`);
} | 0 |
0748c39ad2d1be73a4080e5387b632d2 | bf3aa3328295e061a77c2a79017367a2 | Given a 3x3 SO(3) matrix, compute its euler angles | void eulerd_from_mat3d(double angles[3], const double m[9], const char order[3])
{
int index[3] = { 0, 0, 0 };
for(int i=0; i<3; i++)
{
if(order[i] == 'X' || order[i] == '1')
index[i] = 0;
else if(order[i] == 'Y' || order[i] == '2')
index[i] = 1;
else if(order[i] == 'Z' || order[i] == '3')
index[i] = ... | 1 |
fc2e26285756f071ceee7a3393b5bd0d | 90a3b1174e8b24c816b2c27e80effeb3 | Registers a publisher address for a given endpoint type. | public class MessageDispatchConfig : IPluginConfig
public void AddPublisher<TPublisher>() where TPublisher: IMessagePublisher
{
Type publisherType = typeof(TPublisher);
if (_messagePublisherTypes.Contains(publisherType))
{
throw new BootstrapException(
$"The messa... | 0 |
8795d16abbcaa0669fc0b0f504e3df07 | 02838181d60dc833ae3571673d4bb804 | 五十音から直音(あ,ざ,ぱなど)を返す.
DSLで変更可能にするため,dupをしている. | return this.replaceMap({
'は': 'ぱ', 'ひ': 'ぴ', 'ふ': 'ぷ', 'へ': 'ぺ', 'ほ': 'ぽ',
'ハ': 'パ', 'ヒ': 'ピ', 'フ': 'プ', 'ヘ': 'ペ', 'ホ': 'ポ'
});
} | 1 |
8221318083c5db51cfedcf4ba3befbcb | f1d9f7af39804926c3f300de29d88239 | A Sender that will drop any data sent to it at once. | if not authenticator:
from abcnet.auth import NoMessageAuthenticator
authenticator = NoMessageAuthenticator()
self.authenticator = authenticator
if sender is None:
sender = DropMessageSender()
self.sender: MsgSender = sender | 1 |
864526f34433092b306c675b56338889 | a189252e65cac2f1431b1bf0606644ce | Extract attributes from opening blocks | AttrMap attributes;
while(1){
this->consume_whitespace();
if (this->next_char() == '>'){
break;
}
attributes.insert(this->parse_attr());
}
return attributes;
} | 1 |
1292fd7e31a2c40963de979756e614b9 | 8ca1da5b6b616ca49113c33e9b37f3ae | Responsible for the movement of the fourth car | int i;
oi_update(sensor);
oi_setWheels(-500, -500);
for( i = 0; i <4; i++){
oi_update(sensor);
}
oi_setWheels(0, 0);
turn_clockwise(sensor, 180);
oi_setWheels(500, 500);
for(i=0;i<4;i++){
oi_update(sensor);
... | 0 |
cc0a2648cb9f928206b12131bfc5b1c3 | 0037ccf1ac162f3d6c0984de615eaa48 | @brief Convert transaction to PSBT. | int WalletTxBuilder(
const std::string& senderAddress,
const std::string& receiverAddress,
const std::string& redemptionAddress,
int64_t referenceAmount,
const std::vector<unsigned char>& payload,
uint256& retTxid,
std::string& retRawTx,
bool commit)
{
#if... | 0 |
03c1dcc08e107005b7c939343d6a1836 | e20e49676352b167a12f2612ee172baf | 宽度优先遍历二叉树,从左到右打印,分层遍历 | public class BinarySortTree
public static void layerOrder(TreeNode node) {
Queue<TreeNode> q=new LinkedList<TreeNode>();
q.add(node);
while(!q.isEmpty()) {
TreeNode p=q.peek();
if(p.left!=null) {
q.add(p.left);
}
if(p.right!=null) {
q.add(p.right);
}
System.out.print(q.poll().data+" ");
... | 1 |
c20e6b0f9eb0e09c0a990616e0d63e74 | d9912b633fdcc14df1cc48fa8c8004ce | Retrieves the number of hosted zones that are associated with the current Amazon Web
Services account. | namespace Cake.AWS.Route53
Task<IList<HostedZone>> GetHostedZones(Route53Settings settings, CancellationToken cancellationToken = default(CancellationToken)); | 0 |
108b037df527b9ec0ec00751711f0406 | fdea7369f676e957944863172fb5b52d | Devuelve un artículo al azar. | {
$total = $this->getCount();
return $this
->createQueryBuilder('c')
->setFirstResult(rand(0, $total - 1))
->setMaxResults(1)
->getQuery()
->getSingleResult();
} | 1 |
aaab607dd16db466e96001be7bb27b95 | 7c445294f2c4220457899b5e378b32e6 | 判断是否是父级机构 | boolean isParent(int code); | 1 |
a2ce8d58649e41e996348ad53eecef51 | 49673ad42c2742388e6642b24819a782 | POST: Activate/Deactivate Term | {
if (!Auth()->user()->can('location.delete')) {
return abort(401);
}
if ($request->status=='publish') {
if ($request->ids) {
foreach ($request->ids as $id) {
$post=Terms::find($id);
$post->status=1;
... | 1 |
0e34bb5ef5175bd838832ca632705d8b | a98f81b388b7c2425288b109b12bc9b4 | Parse the given XML and use the document element to create a Python instance. | if self.additional_fields:
element = etree.fromstring(data)
return_type = self.return_type
return return_type(element[0])
else:
return load_xmlobject_from_string(data, self.return_type) | 1 |
ed87425e9709363aef75a726bacbb833 | 21dc79b2faccdabb2221dd4db64792c6 | devuelve un array con una cadena extra agregada al final | public class ManejoCadena
public static int[] añadirAlFinal (int v[], int v2[]){
int union[]= new int [v.length+v2.length];
int cont=0;
for (int i=0; i<v.length;i++){
union[cont++]= v[i];
}
for (int i=0; i<v2.length;i++){
union[cont++]=v2[i];
}
... | 0 |
7141b681ae0940593c284c98c966f660 | f0053edc36b9102a8e8c0a21f9fd9a72 | Rekursive Methode zum Zeichnen des Baumes | public class GraphenPlotterEinfach
public void plot(DelegateTree<Knoten, Kante> graph){
this.plot(graph, 1);
} | 0 |
2a775dc9b0a58086138f69f2a951e73a | 52df71433b96ba2098aee0e02b22b53e | 获取随机手机的ID | var devices = ['iPhone 6s Plus', 'iPhone 6s', 'iPhone 7', 'iPhone 7 Plus', 'iPhone 8 Plus', 'iPhone 8', 'iPhone se', 'iPhone x']
var randomIndex = parseInt(Math.random() * 10)
if(randomIndex > devices.length){
return devices[2]
}else{
return devices[randomIndex]
}
} | 0 |
b2510946da80dccdad71e12f63a4e4d0 | 63564bad44fb6805b09ff169c99ee854 | This method returns the speed of the cluster in bits per second
speed in bps | zs_get_speed(cs)
struct zs_chanstate *cs;
{
int tconst;
tconst = zs_read_reg(cs, 12);
tconst |= zs_read_reg(cs, 13) << 8;
return (TCONST_TO_BPS(cs->cs_brg_clk, tconst));
} | 1 |
8a5c107586d4d7af57548fcb773f6394 | 15fc2ae864e6f9439769f2db31ab2ec2 | Calculating the fitness value of each solution in the current population.
The fitness function calulates the sum of products between each input and its corresponding weight. | def calculate_population_fitness(equation_inputs, pop):
fitness = numpy.sum(pop * equation_inputs, axis=1)
return fitness | 1 |
3ed826d4587b1309e72e6a8b27a59409 | 5ccdd40ca68a4591535215ea48092e16 | method that returns the size of PartyList | namespace WpfApp100
public class typeSchedule
private int Count()
{
return PartyList.Count();
} | 1 |
86395d558a6b49cbd4411e69c718662a | b48c9a63ac510999ce781e975d78bd93 | Returns fourth vertex' coordinates. | {
Set<IPoint> vertices = this.getVertices();
Object[] verticesArray = vertices.toArray();
IPoint fourthPoint = (IPoint)verticesArray[3];
return fourthPoint;
} | 1 |
2f1bd5d469f878738354be477ed2a26d | fac22d48668adbdc842a3aca4acdf805 | Status icon callback handler - from ModernCalendar | void status_layer_update_callback(Layer *layer, GContext *ctx) {
graphics_context_set_compositing_mode(ctx, GCompOpAssign);
if (g_status_display == STATUS_REQUEST) {
graphics_draw_bitmap_in_rect(ctx, icon_status_1, GRect(0, 0, 15, 15));
} else if (g_status_display == STATUS_REPLY) {
graphics_draw_bitmap... | 1 |
692727437ec7ab6d2462cd7165881285 | 48ed486b907bda3bc54fe93cbf80370f | Specify the stack implementor to use | String stackType = type;
if(stackType.equals("A")) {
myStack = new AStack<String>();
}
else if(stackType.equals("L")) {
myStack = new LStack<String>();
}
else if(stackType.equals("J")) {
myStack = new StackAdapter<String>();
}
... | 1 |
4fe5b88f29718c51f62c3db427ee2afb | f81bf11229cc49eb89472e99d1e7d16a | Figure out the gateway URL from the user configuration | abstract class Ecg_AddressVerification_Model_Verifier extends Varien_Object
public function getGatewayUrl()
{
return $this->_useSecureUrl ? $this->getConfigData('secure_gateway_url') : $this->getConfigData('gateway_url');
} | 1 |
773e0b6284fa2e96fa2aed6acec4f682 | 581831f0739d3312347689071e724908 | Returning the parent index of a list of swc of many neurons. | segment_list_index = segment_collection.segment_label_to_list_index_dict[segment_label]
segment = segment_collection.list_of_segments[segment_list_index]
index = None
for i in xrange(len(segment.nucleus_list)):
nucleus_index_for_segment = segment.nucleus_list[0].index
nucleus_list_pos = nuclei_collection.nucl... | 1 |
e632262797fad09dcc43ee81525de52b | 772f22f8e6c90935c28910d43a340fa5 | Function Name: PIXY2UART_GetChar
Returns the last received byte of data. PIXY2UART_GetChar() is
designed for ASCII characters and returns a uint8 where 1 to 255 are values
for valid characters and 0 indicates an error occurred or no data is present.
None.
Character read from UART RX buffer. ASCII characters from 1 to 2... | uint8 GPS_GetChar(void)
{
uint8 rxData = 0u;
uint8 rxStatus;
#if (GPS_RX_INTERRUPT_ENABLED)
uint8 locRxBufferRead;
uint8 locRxBufferWrite;
GPS_DisableRxInt();
locRxBufferRead = GPS_rxBufferRead;
locRxBufferWrite = GPS_rxBufferWrite;
if( (GPS_rxBu... | 0 |
22714f8ae45aca5068ec195359c99060 | 1808dfd4aa87e4368a4d179d635cc0ad | Funkcja sprawdzająca istnienie użytkownika o podanym loginie i haśle. | class EjudgeUser:
def check_user_exist(login, password, email):
_login = str(login)
_password = str(password)
_password = EjudgeUser.get_SHA1_pass(_password)
_email = str(email)
error = ''
try:
ejudge_db = connections['ejudge'].cursor()
except Exceptio... | 1 |
6551468985bc6a37731ec80da583c11c | d2c178807b465d3069eb9c971b29a573 | Get the thundering duration. | namespace net.minecraft.src
public class WorldInfo
public virtual int GetThunderTime()
{
return ThunderTime;
} | 1 |
74357914c8e5057f4323da0ae890aed5 | d0cd9c1a47245aad89000bad75146f88 | Инициализирует спрайт с изображением бытовки. | class Roast(pg.sprite.DirtySprite):
def __init__(self, pos, *groups):
super(Roast, self).__init__(*groups)
self.image = prepare.GFX["roast"]
self.rect = self.image.get_rect(center=pos)
self.collider = self.rect.copy() | 1 |
37e3353885163885e15b3df2177ad7f1 | 46e7e9df0394dca762c312583da9e95f | Getter method for enabled, mapped from YANG variable /sampling/sflow/config/enabled (boolean)
YANG Description: Enables or disables sFlow sampling for the device. | class yc_state_openconfig_interface__interfaces_state(PybindBase):
def _set_enabled(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, regist... | 0 |
531f10ce1645180eb3bdf7672df6d181 | 1cbf9b9bd42b234d2f08003d328264f3 | Helper method used to populate a menu label in the most minimal manner
such that it is valid. | class ZoomSelect extends React.Component
createLabel(selectedValues) {
const trimmedValues = this.trimSelectedValues(selectedValues);
if (trimmedValues.length === 1) {
return trimmedValues[0];
}
if (trimmedValues.length === 2) {
return `${trimmedValues[0]}, ${trimmedValues[1]}`;
}
re... | 1 |
a14b917a39f07a718199feb2201a525a | dd6728e1917b1efddb92e048dcb97c57 | 上传视频,并返回视频的Media_id | $url=self::API_UPLOAD.$this->access_token.'&type=video';
$data=[
'media'=>new CURLFile(realpath($filename)),
'description'=>json_encode([
'title'=>$title,
"introduction"=>$introduction
],JSON_UNESCAPED_UNICODE)
];
$res=$this->http_request($url,$data);
if(!empty($res)){
return json_decode($... | 1 |
1ca6499069f94be2c3ee0cad6019568e | 4df08b447487757b7486697c111a9775 | 유튜브 플레이어 생성 | left_playlist = [];
right_playlist = [];
for (var i = 1; i < Object.keys(pairs).length; i++) {
left_playlist.push(pairs[i]['left']['video_id']);
right_playlist.push(pairs[i]['right']['video_id']);
}
left_player = new YT.Player('left_player', {
height: '315',
width: '560',
videoId: pairs[in... | 1 |
38ea0f67989499802daea468d4cee177 | d5bd87c10c850270ee15c8d2e8c7efd5 | set x.y screen coordinates for selected cell | void setCursor(int16_t x, int16_t y) {
screenData.i16_x = x;
screenData.i16_y = y;
} | 1 |
af108cbc1c41ecafb229b9a128f0979d | 1de4bd7ca12442f6e18cb17c3f647ea4 | 取消暂停指定容器 | boolean pause(final String id); | 0 |
48f0a63c00ef06160bb9c9908ea52e17 | 4ed084b320f66f2962844452ab364310 | Method to get the Table object for the content type from the table object. | public class View extends JFrame implements TableModelListener
public TableContent getTableContent() {
return tableContent;
} | 0 |
f6676f1cb42353dc39e56dc590ea2d80 | b397776fff819517c5b5fc60db3c5335 | 根据营销活动ID集合查询所有的商品信息(包括已删除)(店铺自己创建的商品没有推送操作,不查询店铺自创的商品) | List<PromotionActivityDTO> listPromotionActivitiesByGoodsId(long goodsId); | 0 |
bd36cfe4f2f2d5674ad930eb2250435d | c87e9129f5ab170ddf47b0123fdefe3b | 코드 객체의 복사 객체를 반환한다. this 객체가 가지고 있는 속성 중 자식 객체에 해당하는 속성은 복사 대상에서 제외한다. | MyPrototypeDeep ret = (MyPrototypeDeep) super.clone();
ret.prototype = this.prototype.clone();
return ret;
} | 0 |
4e102bc0305c60b8e0aa8bda38fd5ad3 | 4ab041892dc86a57e63e6c1bdbb0f3db | SGD方法梯度下降,更新权重𝜃 | public class LRM
static List<Double> GradientDescent(List<Double> theta, List<List<Double>> X, List<Double> y){
double sum1 = 0.0;
double alpha = 0.001;
for (int j = 0; j<theta.size(); j++){
for (int i = 0; i<m; i++){
sum1 = sum1 + (((Hypothesis(theta, X.get(i))) - y.... | 0 |
2158df806b9ba3343a5b534ed0044bfd | 598f5b4ea9ef16e4193a042fddd878e0 | 根据手机号生成第三方交易ID (32位)<br>
格式:TXphone_yyyymmddhh24miss_三位随机字符串(数字,大小写字母)<br>
举例:TX13444444444_201804021026_a8X | StringBuffer sb = new StringBuffer();
sb.append("10").append("200").append(UUIDGenerator.randomNum(30));
return sb.toString().substring(0, 32);
} | 0 |
581b68805e654948a912ada5b3e89927 | e989ca8aad403a90d742e1396baa731e | pure functional version of dict.update that returns a new instance | class ImmutableMap(collections.Mapping, collections.Hashable):
# pylint: disable=too-few-public-methods
def update(self, **kwargs):
items = dict(self)
items.update(kwargs)
return type(self)(**items) | 1 |
3e87f73065ee6152176a548daea6fc13 | b3ac24b7a376eae8ec3e426a21ecb276 | Rule that the task holding it cannot overlap with a defined set of intervals | public boolean test(Variable[] scope) {
JobVariable p1 = (JobVariable) scope[0];
JobVariable p2 = (JobVariable) scope[1];
if (p1.assignment() < 0 || p2.assignment() < 0) {
return true;
}
if (p1.assignment() + p1.duration() <= p2.assignment() || p2.assignment() + p2.duration() < p1.assignment()) {
retur... | 1 |
ab92e9fe8b86c17721690a1f6d7170a1 | d3ed996265a18c853b4c12606328be4b | 加入新任务,返回当前任务数 | public class StepSlot
int addTask(RingTask ringTask) {
ringTasks.add(ringTask);
return ringTask.getIndex();
} | 0 |
dc0779f97cbfd17750dee2d25db59df1 | d89cca223d858f7714e0157caa016aa5 | Create a DFS client instance from a given URL; initialize it from the configuration.
<p/>
This method uses {@link FileSystem#newInstance(URI, Configuration)} to create a new
instance, rather than return a cached one. This is to eliminate race conditions
across threads of the kind that surfaced in
<a href="http://jira.s... | public class DfsUtils
public static FileSystem createFileSystem(ManagedConfiguration conf)
throws SFHadoopException {
String filesystemURL = conf.get(HadoopConfiguration.FS_DEFAULT_NAME);
if (filesystemURL == null) {
SFHadoopException hadoopException = new SFHadoopException(
... | 1 |
0f1f2cf1f2d2798a0aa5f629dde4e4f9 | d1e528d21b7c887e1cdcf83cc8ada3ce | convertToFahrenheit should give known results | def test_suite():
test(c2f(0) == 32)
test(c2f(100) == 212)
test(c2f(-40) == -40)
test(c2f(12) == 54)
test(c2f(18) == 64)
test(c2f(-48) == -54) | 1 |
f597d901b77ce2dddee5a14cfbacf3c4 | d576782428537dbad4068c37b986b6ef | Starts the socket server, and start the timer for updating the GUI. | def start_socket(stop, host):
while not stop():
try:
beagle_server(host)
except socket.timeout:
pass | 0 |
9919ad8cc9e8f3c66304dda84aabb98e | c78b7bb9f430a23ee26f3b7c103c6b0f | % weight=19 help=game/is-touching-edge
% blockId=neoGame_sprite_touching_edge block="%sprite|touching edge?" blockGap=8 | class EnemyShip(MovingObject):
# Static method to store sprites
def touch_edge(self) -> bool:
return self.get_x() >= self.game_width - self.get_width() // 2 or self.get_x() < self.get_width() // 2 | 1 |
1fc3baad258c5acad7635c39b4ef234a | 170fd58b76d253664b588bc99f26c506 | 获得徽章的总数目 | @RequestMapping(value = "/mfOaBadge/getBadgeCountManage")
public int getBadgeCountManage() throws Exception; | 1 |
c2d288152b7de2ad949a9f99e912d766 | c2c275560f8a029fed0dad4e2adc3b24 | Converts an int to the least number of bytes as possible. | public class VariableByteEncoding
public static byte[] encodeNumber(int number) {
if (number == 0) {
byte[] encodedBytes = new byte[1];
encodedBytes[0] = (byte) 0;
encodedBytes[0] += 128;
return encodedBytes;
}
int sizeInBytes = (int) (Math.log(number) / Math.log(128)) + 1;
byte[] encodedBytes = new... | 1 |
af39c598ca4329636f57888f766e911a | 26c2849728e62d2bf1bafb4ad057e1b8 | 测试缓存单个Connection | class MemcachedConnectionTest extends TestCase
public function testCRUDConnection(){
$this->mc = new MemcachedConnection();
$servers = [
[
'host' => '192.168.99.100',
'port' => 11211,
'weight' => 1000
]
];
$memcache... | 1 |
7c57486b92f2fd1cfe7a679a6036944a | 11d00abc0e81c601c8d228c2d3765648 | Queries the PhotoDNA API for all the images in dirName (and its subdirectories).
Outputs a CSV file with the following fields:
path,image_type,response_code,trackingID,isMatch,matchString
here matchString will contain all the labels for matched images in form source(violation), separated by a /. E.g. IWF(B2)/NMEC(B1)
T... | def extract_descriptor_to_csv(img_path): | 0 |
16c81fc8c1c1bb313263895f0c5be343 | bca5e31be17324a750b807fec226008f | Indicates which operations can be performed by the Power BI
Resource Provider. | class GetDiskResult:
def supported_capabilities(self) -> Optional['outputs.SupportedCapabilitiesResponse']:
return pulumi.get(self, "supported_capabilities") | 0 |
774aa4fb928276f3d9a87fb419099fc3 | c7254063c2eacc4c75bdeb54894f20ec | Displays a song timer. | function showPlayingTime(){
var totaltime=currentTrack.duration;
timer=setInterval(function(){
document.getElementById("playedtime").innerHTML="-"+translateTime(Math.floor(totaltime-currentTrack.currentTime));
document.getElementById("playedbar").style.width=
Math.floor(300*(currentTrack.currentTime... | 1 |
e3671844954d230ff7fd0ed4df314a0d | baf5c76e91eef972d7662538777b8349 | Needs to be overridden in the subclass. | class RedisPubSubHandler(BasicHandler):
def get_response(self, request):
raise NotImplementedError | 1 |
b436040e2db811b609e2944854d1ad0d | 9cb0050ec5c0b9de71d984d85438c390 | 协议相关的工具类 | function tool() {
} | 0 |
fbc5c641c92c80098ec1a686e8cbdd3a | 3940377f3e92c81da5bbf88289381e13 | Clears all dependee references from the reference node and returns the number of references that were cleared | public class JReference
extends JStruct
private native void cleanupReferences(); | 0 |
3f3885ca93c47443d0874c82b185f636 | c462c5484233e375d3628dc8300bd325 | returns a count for the remaining cards in the draw pile | class policyDeck:
def drawpileSize(self):
return(len(self.policiesDrawpile)) | 1 |
6d89a922fd8b595ede19da93469a1b18 | 38560259cd420a999959e89051a2c405 | get the local ip address so that it does not have to be set manually | def get_local_address():
ip = '10.42.0.1'
return ip | 0 |
ac08788b589dfa0a25cae0cf11742cda | cab4511fd8b0a445b50442d25a435126 | Getter method for packet_count, mapped from YANG variable /openflow_state/group/group_info_list/packet_count (uint64)
YANG Description: Packet Count | try :
return self._snmpqosqos_packets_receivedrate
except Exception as e:
raise e | 0 |
aa5e2d3302aebe12c0a0944768745d02 | ed7b6cc0b58d74d0213cbe627e7b4c0d | #' @return A list with: `mf` a model frame stripped of the optmatch argument, `match` the matched factor, `oname` the name of the outcome variable, `fmla` an updated formula without the matching vector | mle_fit_exact_match = function(data, starting_vals, priors) {
nLL = function(cov_fitted, match_log_odds_fitted) {
-loglik_exact_match(data$Task_item, data$Response, cov_fitted, match_log_odds_fitted) +
priors[[1]](cov_fitted) +
priors[[2]](match_log_odds_fitted)
}
iter = 0
fits = NULL
fit = NU... | 0 |
326abbd61414d1fadedd08eff1cf63f7 | 349b84cc99c130a07e828eafc42097c5 | Record earliest date of first and second vaccinations.
In some cases, a patient will have only one covadm1/2_dat and covrx1/2_dat. | class ReferenceRawData(BaseRawData):
def getFirstAndLastDates(self):
datesTuple = (self._returnOldestDateAvailable(),
self._returnNewestDateAvailable())
return datesTuple | 0 |
3f81170d54146e3b162e17501c2b6688 | 735445b0969db1b27f93b9ffe367a2d1 | showing scene overhead (enabling secondary camera) | map_camera.enabled = true;
map_camera.GetComponent<AudioListener>().enabled = true;
ship_camera.enabled = false;
ship_camera.GetComponent<AudioListener>().enabled = false;
SceneGlobals.main_canvas.enabled = false;
SceneGlobals.map_canvas.enabled = true;
} | 1 |
5865af0a93f85bb2a3b1e9fc944ce36d | 02b565a8863b7063aa890e29af9fbf94 | Retrieving all the Routes(Edges) from the databse and initiliazing the Dijkstras graph | public class RouteDB implements RouteDBIF
@Override
public List<Edge> findAllEdges() throws SQLException {
ResultSet rs;
rs = findAllEdges.executeQuery();
List<Edge> allEdges = buildEdgeObjects(rs);
return allEdges;
} | 1 |
185159a334c0418e6efbb33ac12e9075 | 23c5c5e72742375a527fd005d9bf8ed5 | kasuj identyfikator sesji, wymuś logowanie | class LoginController extends Zend_Controller_Action
public function logoutAction(){
Zend_Auth::getInstance()->clearIdentity();
$this->_redirect('index');
} | 1 |
9755457c86388d4e81087005948c3773 | 05b8ea680289e6b4a26251590f7d3a83 | Return autotvm.measure_option result to be used for autotuning this model task. | log_func_entry();
toolkit_function_response_type ret_status;
std::shared_ptr<supervised_learning_model_base> model
= get_supervised_learning_model(invoke, "model");
for (const auto& opt : model->get_current_options()) {
ret_status.params[opt.first] = opt.second;
}
ret_status.su... | 0 |
d58e35f11767ea9dbd8c272935ff6b93 | 86e96b70ab9c2fdb2a00b23179393903 | 주문자가 마이페이지에서 특정 주문을 클릭하면 상세정보를 조회할 수 있다 | function orderDetailCtrl($scope, $http, $state, $filter, $location){
$scope.goBack = goBack;
$http.get('/ecommerce.oms.mgr.api/v1/o2oa/orders/' + $location.search().uuid).success(function (data){
$scope.order = data.result.firstData;
$scope.products=angular.fromJson($scope.order.... | 1 |
66cabf3e70153c652b110ba18d136deb | 302b9ea5881f479a77b2d653eabd6e2b | Gets rid of newlines and other junk characters and replaces them with spaces. | def clean(s):
return s.replace("-\n", "").replace("\n", " ") | 1 |
3d992a149828a4b5a3f67be318c0c1a2 | 4a5bbaf06f21907b6c40c76b1438d489 | This Function Uses the Microsoft.Practices.EnterpriseLibrary.Data to Update Dataset for table EmployeeDocumentType using Stored Procedure
and return number of rows effected of the EmployeeDocumentType | {
int rowsAffected = 0;
rowsAffected = Database.UpdateDataSet(dataset,"EmployeeVacationPermit",InsertNewEmployeeVacationPermitCommand(),UpdateEmployeeVacationPermitCommand(),DeleteEmployeeVacationPermitCommand(), Microsoft.Practices.EnterpriseLibrary.Data.UpdateBehavior.Standard);
return... | 0 |
76068ef87e9f5350a82d0d2bd98171c9 | a49f212e798a750c345e7b3a3aeef734 | Убедиться, что значение объекта не равно <c>null</c>.
Валидация осуществляется с помощью <see cref="RequiredValidator"/>. | namespace Myframework.Libraries.Common.Validators
public static partial class ValidatorExtensions
public static ValidatorStructResult<byte> NotNull(this ValidatorStructResult<byte> result, string errorMsg = null) => result.AddValidator(new NotNullValidator(result.OriginalValue, errorMsg)); | 0 |
42a775f01a61bac6c3ba8cf3399d24a5 | d3384f4172b8e3cbf7d592cb4fcd8bda | Returns a specification for building/editing a widget | if( aReadOnly ) {
return new ReadOnlyWidget( aParent, aOnlyMmSs );
}
return new EditWidget( aParent, aOnlyMmSs );
} | 1 |
581653c70c66dd2fde76d565e4e6eab5 | 77c4adc9d8715571b08a6d181c2fbdc0 | Initialize a defaults value from manifest data. | class Defaults:
def __init__(self, remote=None, revision=None):
if remote is not None:
_wrn_if_not_remote(remote)
if revision is None:
revision = 'master'
self.remote = remote
self.revision = revision | 0 |
93d6b61d694c417fd304aa926c4809de | 63539b7e3820290cad0b0261c487cced | Sample contacts created is the same for every call | data = {
'id_user': 1,
'id_user_cont': 2
}
resp = requests.post('http://127.0.0.1:5000/contacts', json=data)
self.assertEqual(resp.status_code, 200)
self.assertIsNotNone(resp.text) | 0 |
3ab2995d302f804234fbad1e31b1af73 | d7f527ec2de0f10b23c398a2a61c77ed | 選挙資格情報を設定します。 | public class ShinkiTorokushaMeiboKokuminParam
public void set選挙人資格情報Info(SenkyoninShikakuInfo 選挙人資格情報Info) {
this.選挙人資格情報Info = 選挙人資格情報Info;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.