query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
51ee510e71a0817bb5fb5caf460432dd | ed47f15c0ae5b5035a7b030d158d4dd5 | 根据注册号查询工地详情 | return request({
url: '/zd-xt/enterprise/' + registerNo,
method: 'get'
})
} | 1 |
7a4ab9f3cb61cc16ebc869b54c4a84fc | 9a5f3b744648e6685209578f0d2cb1fb | The "project name" of the candidate.
This is different from ``name`` if this candidate contains extras,
in which case ``name`` would contain the ``[...]`` part, while this
refers to the name of the project. | class Project(object):
def name(self):
return self._name | 0 |
bf3c4fb9321e3030e34ed6d0fc4b5f8c | 9dc1d25b4246c36ea1fee60f9508f67a | помещает событие в круговой буфер
return 1 - успешно; 0 - нет места в буфере | {
if(RingBufferGetAvailableSpace(rb) > 0)
{
char *e = (char *) (rb->memory_buffer + (rb->in_idx * rb->data_size));
char *end = e + rb->data_size;
while(e < end)
*e++ = *((char *) data++);
*((unsigned int *) &rb->in_idx) = (rb->in_idx + 1) % rb->element_amount;
(*((unsigned int *) &rb->current_elements_am... | 0 |
998c7e635b64473fd369f5ae6105bf6b | 89f0b189330bc7acaf019e57ce6ec0be | iBands, Calculates the Bollinger Bands® indicator and returns its value. | fun bbands(
data: DoubleArray,
timePeriod: Int = 5,
deviationsup: Double = 2.000000e+0,
deviationsdown: Double = 2.000000e+0,
mAType: MAType = MAType.Ema,
): Triple<DoubleArray, DoubleArray, DoubleArray> {
val endIdx = data.size - 1
val outputSize = data.size
... | 1 |
dfb1a96f09b43902b8ccf0cae0d44a60 | d6f87ef1f42586347e74d6c764ab09e0 | 清理池中所有项,并且标示池已被释放,不能再使用 | namespace RRQMCore.Pool
void Clear(); | 1 |
40c19849b71300e36557db2f40f9ef3c | 3f4a6dd02ed53360970d58072114df0d | 获取所有大类及商品总数 | func getAllClassifyTwoWithPic(shopid, superid string, db *sql.DB) ([]AllClassTwo, error) {
var ACTS []AllClassTwo
selectSQL := `select z.id as menuid, z.menuname, z.superid, ifnull(y.num, 0) as num from (select id, menuname, superid from menu where superid = ? and shopid = ? and state = 1) z left join (select id, men... | 1 |
f121c3c449d5541ed6531b5e22aedfde | a8613bd4ca64bf83a3dd9b28ee1f43c4 | 将整数按十进制位分解,然后相加,并加上整数本身 | public class RectionDemo{
public static int sum(int n){
if(n<10){
return n;
}else{
int i=n/10;
int h=sum(i);
int o=n%10;
int s=o+h;
return s;
}
} | 0 |
a1401551a71170f556acef5071589db0 | 48893d8f2b322b687ced11a832e38616 | Organizes saving figures to temporary files and compiling
the figures into a movie | def do_movie(moviefile, quit_flags):
try:
os.remove(annname(moviefile, True))
os.remove(annname(moviefile, False))
except OSError:
pass
print '==minshape', params.minshape, 'meanshape', params.meanshape, 'maxshape', params.maxshape
print '==%s' % (... | 0 |
3bf8650a6f17128a738566ccc6aab587 | c842e96e41959f16e090b7f2627386f1 | Deletes a journal lock for a given inventory key. | @Test
public void testDeleteInventoryCommand() {
InventoryJournalLock lock = createJournalLock();
inventoryJournalLockDao.saveOrUpdate(lock);
InventoryDto dto = journalingInventoryStrategy.getInventory(inventoryKey1);
List<Long> uidsByKey = inventoryJournalDao.getUidsByKey(inventoryKey1);
lock = inventory... | 1 |
5597ba4a8f0107652d07caf1b4da5449 | f6f100d7b990900a249a6d8b1e3aa855 | Checks if project has a leader. | class SimpleTeamInfo extends \DrSlump\Protobuf\Message
public function hasLeader(){
return $this->_has(3);
} | 1 |
2e005addf150e6cab70607245b740687 | 89238641b8011e97cdc4c0dc30d67af7 | Add a boid at the position of the cursor. | class Boid(object):
def __init__(self,x, y):
self.position = Vector2(x,y,)
self.acceleration = Vector2(0,0)
self.velocity = Vector2(random.uniform(-self.max_speed, self.max_speed),
random.uniform(-self.max_speed, self.max_speed)) | 0 |
104325879fd465bcf607376e0d6692c5 | 3a579234fc4c747f24641e90dd265cfd | 获取关注者的函数 | class UserRelationController{
async getFollowers(userId){
const { count, userList } = await getUsersByFollower(userId)
return new SuccessModel({ count, followersList: userList })
} | 0 |
473f354c2a87fb6e5aacb31a1c5bdd85 | 1c5b285fde9b6dfc15ad5cdc61f8a872 | 获取所有表与单位映射资源
Author:qiong.wu
Date:2018年8月12日 | public class RelationalHelper
public static Map<String, RelationalDataUnit.Entry> getTablesMap(RelationalDataUnit relationalDataUnit) throws DataUnitException {
if (relationalDataUnit == null) {
return new LinkedHashMap<>();
}
RelationalDataUnit.Iteration iteration = relationalDataUn... | 1 |
69e4f4c0bee2ed7d8bf0d40518fcb49e | 2d98c89f2ce312274435e0387375fab7 | r"""Re-download detection models. | pose_model = self._pose_dect_init(device)
object_model, object_names, object_colors = self._object_dect_init(device)
return pose_model, object_model, object_names, object_colors | 0 |
3dfe270bcdabc091a4cbf66aee788107 | 018097f78bb3582b670425df028de664 | Get the enumerated color given its equivalent color string.
On error, -1 is returned.
On success, the enumerated color is returned. | {
static const struct {
const char *name;
EDisplayType code;
} table[] = {
{ "CHAR", vCHAR },
{ "HCHAR", vHCHAR },
{ "INT", vINT },
{ "HINT", vHINT },
{ "UCHAR", vUCHAR },
{ "LCHAR", vLCHAR },
{ "UHCHAR", vUHCHAR },
{ "LHCHAR", vLHCHAR },
{ "MIXED", vMIXED },
{ "HMIXED", vHMIXED },
{ "UMI... | 0 |
b8b0920a8624d4b9664fcc7ac14195cb | a4be18fe8d6fe87ee852107cecc9ccc8 | Encode message according to HL7 encoding rules with default separators. | class HL7Message(object):
def make_hl7_message(self, now):
msh_segment = make_msh_segment(
message_datetime=now,
message_control_id=unicode(self.msg_id)
)
pid_segment = self.task.get_patient_hl7_pid_segment(self.recipient_def)
other_segments = self.task.get_hl7_da... | 1 |
bf9c77c27e4602b1b7c89a110ef04590 | d03499d5f57a0237aea9ce437b7ff645 | Close the finish text object after a delay | pause = setTimeout(function hinterDisappear() {
hinterEl.textContent = "";
}, 1000);
} | 1 |
f04a508d07af85fbdd3c2e8f07b53d8b | 24b254c0bc29b67f29aedeaac359719d | Creates an array ("canvas") for storing a phase screen, with additional room in the y-direction
for adding a new phase screen with overlap. | const prevBoxWidth = cellDims.prev.width * boxDims.prev.count,
prevBoxHeight = cellDims.prev.height * boxDims.prev.count,
boxWidth = cellDims.width * boxDims.count,
boxHeight = cellDims.height * boxDims.count;
const gridLines = [];
for (let x = 0; x <= b... | 0 |
8c157360bbd2453b251be89e67230641 | cbeb7a6e7836d1917a220751f1d50fa4 | Setup to use this for MaNGA stare observations. | class SiderealRegridder(Regridder):
def setup(self, manager):
self.observer = io.get_telescope(manager) | 0 |
a90c51931a5fceddd5329d7c3480d44e | f20eeb0f42b8f90d28e61cb3dd7b2e86 | Get filesize via cURL | function wpfc_get_filesize( $url, $timeout = 10 ) {
$headers = wp_get_http_headers( $url);
$duration = isset( $headers['content-length'] ) ? (int) $headers['content-length'] : 0;
if( $duration ) {
sscanf( $duration , "%d:%d:%d" , $hours , $minutes , $seconds );
$length = isset( $seconds ) ? $hours * 3600 + ... | 0 |
8cdd0c3d9c9bc85831aaefa3e7a465a5 | a11982e21d4bf73b546663cb23638759 | Inserta media llave de clave primaria, se proporciona la direccion del índice
y la clave del registro. Queda pendiente la direccion del registro | namespace PruebaProyecto
public partial class Datos : Form
public int obtenPoscionAEscribirIDP(Object clvPrim)
{
r = 0;
entAct.archivoIndPri.Close();
entAct.archivoIndPri = File.Open(entAct.archivoIndPri.Name, FileMode.Open);
BinaryReader brBy = new BinaryRead... | 0 |
2210a4389d1ffd2b08955ad5a2642287 | 864c5336452414599eba00c47b7a3dec | Returns the meta object for the containment reference '{@link org.language.reqLanguage.TimingConstraint#getTime <em>Time</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getTimeColumn(); | 0 |
b5f34005abaf1281c76c3079fa6dbc14 | 981e6b6b2f473714df10d639f725f12e | Method for removing all Zombies in the Game. | namespace Template
class Zombie_manager
public static void Clear()
{
Zombies.Clear();
spawners.Clear();
} | 1 |
e7a871b9c86b32f8ba02c006dd15330a | 836bc7b9b5f913334511a8e6f15f9686 | Should not call on-out-of-order listener for packets that come before synchronization start. | func TestFromNotSyncedToSynced(t *testing.T) {
lg := logtest.New(t).WithName("syncer")
ticker := newMockLayerTicker()
mf := newMockFetcher()
mm := newMemMesh(t, lg)
syncer := newSyncerWithoutSyncTimer(context.TODO(), t, conf, ticker, mm, mf, lg)
assert.False(t, syncer.ListenToGossip())
assert.False(t, syncer.IsS... | 1 |
46ab590385c75aaa03c358241b6a37f1 | fcbad7f4157132055078661a5472e0ab | Obtem data / hora atual em formato de data HTML (RFC1123) | class Mailer_old
public function rfcDate()
{
date_default_timezone_set(@date_default_timezone_get());
return date('D, j M Y H:i:s O');
} | 1 |
a325de82b8a43e4046e0030fa0161b73 | 41352ea89cf09f4f40886626929c5364 | 根据汉词获取义原 | public class HanDict
public static String getPY(String str, boolean useHanFormat) {
if (str == null) {
return "";
}
boolean lastBlank = true;
StringBuffer sb = new StringBuffer();
for (char ch : str.toCharArray()) {
if (isHan(ch)) {
List<St... | 0 |
cdb98bbc4cee3b3b4e20bd56073118fa | 4e86484e4e023dbd6a6fc5aa8ef9369e | Returns an unmodifiable view of the specified map. | public class ObjectUtils
public static <K, V> Map<K, V> unmodifiableMap(Map<K, V> src) {
if (src == null) {
return null;
}
return Collections.unmodifiableMap(src);
} | 1 |
677aeaaeaa679c6747888034f8ee6b34 | 73e41a3da77f2b4162c792db7efb1fb9 | @brief Indicate SLEEP-ON-EXIT feature when returning from handler mode to
thread mode.
processor re-enters SLEEP mode when an interruption handling is over.
Setting this bit is useful when the processor is expected to run
only on interruptions handling. | {
was_pmapp_sleep_enter_called = TRUE;
pm_set_sleep_config(TRUE,&pm_mpp_lpm_table[0],&pm_gpio_lpm_table[0]);
pm_mbg_iref_enable(FALSE);
#if defined (FEATURE_USE_TCXO_BY586_FOR_SLEEP)
pm_xo_force_xo_core_enable(FALSE);
#endif
return PM_ERR_FLAG__SUCCESS;
} | 0 |
6a3f3d276931e13097d951947bd87c70 | 2940dd5e6c629b9dce8db827d46508ab | 返回按时间排序后的指定用户与商店的聊天信息 | {
StringBuilder strSql = new StringBuilder();
strSql.AppendFormat(@"with tt as
(select t.c_id, t.c_uid, a.c_name as userName, t.c_fid, t.c_content, t.d_dt
from TMC_CHAT t
i... | 1 |
fcae28864705e9728921854838d4e8d4 | 7d46bcfb9bfb9ad7a0db761a181911be | 碰撞检测,两点距离小于两个圆点半径之和表示碰撞 | Vector2 c1_p = new Vector2(c1.x, c1.y);
Vector2 c2_p = new Vector2(c2.x, c2.y);
Vector2 c1_c2_v = c2_p.sub(c1_p);
float distance = c1_c2_v.len2();
return distance < (c1.radius+c2.radius)*(c1.radius+c2.radius);
} | 1 |
740c245fecd50d49309327218e370b0a | cdf807d36e4e393131f23b8e8d4cee99 | Test that geting data thrice hits the data acess layer thrice if the cache has been disabled | @Rollback(true)
@Test
public void test_getClassificationNames_CachesData()
throws EntityRetrievalException, JsonProcessingException, EntityCreationException {
long startTime = System.currentTimeMillis();
Set<KeyValueModel> results = dimensionalDataManager.getClassificationNames()... | 0 |
ed527c49f6accd778829706beb4895bd | b9afa4a2f7fcbdf516d5c133375a7753 | # Select one imputed dataset for testing (Note function returns dataframe!) | rootdir <- "C:/Users/Craig/Desktop/Live projects/Pay-go solar/hh survey data/"
dir <- paste0(rootdir,dirname)
oldwd <- getwd()
setwd(dir)
fname <- list.files(pattern='.+\\.(DTA|dta)')
tmp_hh <- read_dta(fname)
if (is.null(cname)) {
cname <- dirname
}
tmp <- data.frame(mobile=tmp_hh$hv243a,
... | 0 |
123066c126a4d14d43b45b4376c642a3 | 2ab3ab1dbdebc890075be8fa561ad43a | Clears the specified coordinates of any objects
that may (in part or fully) reside there. | namespace vMenuServer
public class MainServer : BaseScript
private void ClearAreaNearPos(float x, float y, float z)
{
TriggerClientEvent("vMenu:ClearArea", x, y, z);
} | 1 |
51b48cba17baa741ce2fafcbf2f7e4cc | f1e7f31322c18d0f71822b65da797bef | Ověří, zda v DTO objektu uložený bezepčnostní řetězec (klíč) odpovídá klíči, který je uložen v nastavení serveru | namespace TRexServer.Security
public class SecurityHelper
public static bool CheckAccessKey(StatusDTO data)
{
if (string.IsNullOrWhiteSpace(Settings.Default.AccessKey)) return true;
if (string.IsNullOrWhiteSpace(data.k)) return false;
return data.k.Equals(GetMd5Hash(data.... | 1 |
9315caeb79e3c59ad41f5391f68adeff | d1b8b3081dee097f61f1e2f0e33ef6b2 | Cars constructor. | class Cars extends Command
public function __construct()
{
parent::__construct();
} | 1 |
69c67c06908def38f97e1ccbe9864dc7 | 938ad7a8047cffd93b192b62beb54302 | remove the . and .. items from the list. | class StaticController
def dir_children(dir_name)
Dir.entries(dir_name).delete_if { |name| ['.', '..'].include?(name) }
end | 1 |
b8ce4da1628757c08bc59783f4e0ffeb | 99f99082ad0d05d3421f079f8092c237 | they will be considered equal if they both perform the same function | class TestComparator : public FunctionComparator
bool testFunctionAccess(const Function *F1, const Function *F2) {
return F1 == FnL && F2 == FnR;
} | 0 |
4c0ac957b72bb5562319d586edfd11d9 | 31715ecd193267386a9000b27eb2f526 | accessor method to get currency market cap | class Stock::Cn
def market_capitalization
total_shares.to_i * realtime_price
end | 0 |
df9677b9f33f7990e175b57cb1ea982d | 6ab7df00f12ea8825747754b9ef9c6a5 | Decode frame RFC 6455 | function decodeDataFrame(e) {
var i = 0, j, s, frame = {
FIN: e[i] >> 7, Opcode: e[i++] & 15, Mask: e[i] >> 7,
PayloadLength: e[i++] & 0x7F
};
if (frame.PayloadLength == 126)
frame.length = (e[i++] << 8) + e[i++];
if (frame.PayloadLength == 127)
frame.length = (e[i++] << ... | 1 |
bfb233bfbf9e18c25e4efeb33c0263e9 | c3868bf433abff80965ec8ec656785b4 | Read a group of bits as a little-endian integer.
Note:
If there is a mapper present in the compiler, this function automatically converts from logical qubits to
mapped qubits for the qureg argument. | result = array.array('Q' if bitness == 64 else 'I')
result.fromfile(f, PAGE_SIZE // result.itemsize)
return result | 0 |
0c2f190f7baa05b69fbcb9cbd8559972 | 79856cd1be074f96b28d69045e5f74ce | 判断用户是否能添加子组织。 | {
var userManager = new PiUserManager(this.RDIFrameworkDbProvider, userInfo);
return userManager.IsInOrganize(this.UserInfo.Id, organizeName);
} | 0 |
3b3df070cf53f9c22127fa75266d1d8d | 92f91d92dc1b9b65b1f77a22e02a9119 | Die Methode ermittelt zu allen Werten des eingehenden Speicherobjektes den entsprechendden Datentyp. Sie soll
damit Entwicklern schnell Auskunft über die verwendeten Datentypen innerhalb eines Speicherobjektes geben. | {
System.out.println("Byte: " + varByte);
System.out.println("Short: " + varShort);
System.out.println("Long: " + varLong);
System.out.println("Char: " + varChar);
System.out.println("Int: " + varInt);
System.out.println("Float: " + varFloat);
System.out.print... | 0 |
5b3ea7ab06c103302063437809c6bc9f | d79fc5d7e22a649b676e35d5325e3b4b | Set 云服务器ID。
注意:此字段可能返回 null,表示取不到有效值。
注意:此字段可能返回 null,表示取不到有效值。 | public class Backend extends AbstractModel{
public void setInstanceId(String InstanceId) {
this.InstanceId = InstanceId;
} | 1 |
d24d90b1e8e0c492c15a23b3eb5104fa | 122e977990033e289b2c3d2307ba311c | Removes first element from an array | class Arr
removeFirst() {
this.remove(0);
} | 1 |
1404b8330cb554fac1f02642dc143011 | be5824a4f8b126b3479f292f56955c52 | Vypocita z penezenky kolik a jakych minci ma vratit kupujicimu | class Finance
private function zapoctiShop() {
$o = dbQuery('
SELECT p.id_predmetu, p.nazev, n.cena_nakupni, p.typ, p.ubytovani_den, p.model_rok
FROM shop_nakupy n
JOIN shop_predmety p USING(id_predmetu)
WHERE n.id_uzivatele = $0 AND n.rok = $1
ORDER BY n.cena_nakupni -- od nejlevnější... | 0 |
84365018fe357d1e775a64e5abb13b5c | 3c56536ed5ee70933ff907870d6f87a7 | Obtiene todos los themes activos. | class sfMultisiteThemeThemeInfoTable extends PluginsfMultisiteThemeThemeInfoTable
public function getActiveThemes()
{
$q = Doctrine_Query::create()
->from('sfMultisiteThemeThemeInfo smtti')
->where('smtti.theme_enabled = ?', 1);
return $q;
} | 1 |
57cc71f52fb6471fb0c00de762a3b85f | 2139508eec186fc8733b8db94448d52a | returns a list of children IDs of the given individual ID | vars = [ id ]
vars += self.get( id ).parents
vars += self.getChildren( id )
return vars | 0 |
e9ed5cb33745975cb83fffef5bd0f7c0 | 75e167b0be730130e32094f281a2e0c8 | Reads the contents of all files in an Azure directory into a Naiad stream. | const children = await this.childrenAll();
const contents =
await Promise.all(children.map(async (child) =>
(await child.isDirectory()) ? undefined : child.readFile(),
));
const stats = await Promise.all(children.map((child) => child.stat()));
return new NanikaContainerSyncDirectory(... | 0 |
2df93ac17a016aa26c4094c0be7603e4 | bfac47a90038fa5d1828f23b49e96967 | 双击后将标志位置1,在Form.cs程序中判断,为1则退出应用 | static void Main()
{
int processCount = 0;
Process[] process = Process.GetProcesses();
foreach (Process PTest in process)
{
if (PTest.ProcessName == Process.GetCurrentProcess().ProcessName)
{
processCount... | 0 |
a85f27a1da4c2ef7dbca5c629596e3f9 | 3e6c2df2ebe3445c58a90a3a92f18b17 | This function makes our body element temporaily unclikcable. | function makeNormal(elem) {
elem.draggable = false;
elem.setAttribute('draggable', 'false');
} | 0 |
549a5c23d97377c325bb89d847715c9e | 270b029abe4d3b736437909a29c42372 | Converts a stage coordinate (a coordinate within the camera) to
a local coordinate. | return {
x: pos.x * stageInfo.scale + stageInfo.x,
y: pos.y * stageInfo.scale + stageInfo.y
}
} | 0 |
9fec400d2611c88403c5866983c81afa | 708521f41f6c2c8f54774b43b5a710a2 | Test method for {@link cn.aofeng.util.EncryptCodeUtils#byte2HEX(byte)}. | expect fun Int.reverseBytes(): Int | 0 |
64cd3e46d1bdbea444ca8d5ec94e264a | 47904111368214e7633a6fff4a6d23b9 | Turns off all lights slowly, one at a time | for _ in range(4):
self.set_lights(red_light)
await asyncio.sleep(.2)
self.set_lights(off_light)
await asyncio.sleep(.2) | 0 |
bc990117062d95061d1755c3490eb5b5 | 3b554cd8658ae508fb165e775978a2c7 | extracting xml gregorian calendar from the dates on the bank statement | {
var dt_raw=$('body > main > sections > section:nth-child(2) > dayview > subheading > t').html();
var dt_arr = dt_raw.split(",",3);
var dt=dt_arr[1];
dt = dt.replace("rd", "");
dt = dt.replace("st", "");
dt = dt.replace("rd", "");
dt = dt.replace("th", "");
... | 0 |
a2ff763fd5f84c14ca675b5b84b324f8 | f01095a1ee91ff78b7b82f7d9acd01d9 | formats the String with the process id and returns the search query | {
int new_string_length = 0;
for (const char *c = qry; *c != '\0'; c++) {
if (*c == ' ') new_string_length += 2;
new_string_length++;
}
char *qstr = malloc((new_string_length + 1) * sizeof qstr[0]);
const char *c1 = qry;
char *c2;
for (c2 = qstr; *c1 != '\0'; c1++) {
... | 0 |
c4e54f1dd8cef6d596ca4819d243a4be | 4070d0a5e966a987c337fcafc677e53a | Выполняет запрос на чтение всех контактов с указанным днём рождения. | namespace FileCabinetApp
public ReadOnlyCollection<FileCabinetRecord> FindByDateOfBirth(string inputDateOfBirth); | 1 |
ada71a1187a6432516c8730574fa01c5 | c4d0e75e7f4fec664e75a134ccf24971 | Mesh not handled by us, so don't delete it. | namespace Chimera
Mesh::~Mesh()
{ } | 1 |
a89ba0f76f63428798a70445199a289c | a8e2058d0cdd33ab43147ac3f2ab8098 | Performs a guaranteed atomic max. | {
for (;;)
{
int current = Get();
int next = current + delta;
if (CompareAndSet(current, next))
{
return next;
}
}
} | 0 |
1a6db11a4932b0846e7778273f366f01 | 71e6e78d9c3e48dcf4425b6f4ef3e542 | Actions to perform on save of a ChildDocument | {
if ($this->isNew) {
$myScope = $this->getScope();
if ($myScope == 'default') {
$websites = $this->getFactory()->getModelCoreWebsite()->getCollection();
foreach ($websites as $website) {
$this->saveChildConfig($website->getId(), 'w... | 1 |
df2e8486cfd6bed4acd1304927b70564 | 8d1f1e1fa9e180a053274cae4e425b24 | Setter for HelperPath | {
$strPath = $this->_strBaseDir . $strPath;
if (! file_exists($strPath)) {
trigger_error('Bingo_View_Script::addHelperPath path invalid!' . $strPath, E_USER_WARNING);
return $this;
}
$this->_arrPaths[$strType][] = rtrim($strPath, DIRECTORY_SEPARATOR);
return $this;
} | 1 |
ca1430b9b82c6d4cf89ce4cb2613053b | d661de6c7f00c6b387ccc919f1b492f0 | Palauttaa sen lajiluokan nimen, joka vastaa parametrejä. Ellei mitään
löydy, palauttaa kysymysmerkkejä. | public String getName(Signature signature, Object... args) {
return signature.getDeclaringTypeName() + "." + signature.getName();
} | 0 |
245c7e77677ac0db2a820a8290b39c95 | 01a999d1107b1d6fe0c5eba5d3c81b5f | extracts IK problems from the plannerobjective | class PickingController:
def get_ik_solutions(self,goals,limbs,initialConfig=None,maxResults=10,maxIters=100,tol=1e-3,validity_checker=None):
if initialConfig == None:
initialConfig = self.controller.getCommandedConfig()
if validity_checker == None:
validity_checker = self.planne... | 0 |
a169177fe4f8b8f24e37adfa15cd068c | 7fd71a405b9429b655561b4921216d6f | 创建httpclient get 方法请求文件预览地址 | function getDocHtmlPreviewUrl() {
var key = 'test.pdf';
var host = config.Bucket + '.cos.' + config.Region + '.myqcloud.com/' + key;
var url = 'https://' + host;
cos.request(
{
Method: 'GET',
Key: key,
Url: url,
RawBody: true,
Query: {
'ci-process': 'doc-preview',
... | 1 |
1ad384110dffb05fc09acb4b8560a7eb | 63f2f3382fe1fda9ff915aa6de6f63fa | 将帧缓冲区的内容copy回本地(CPU上的内存) | void g_copy_to_buffer(Graphics* g) {
memcpy(g->pbuffer, g->pdata, g->csize.x*g->csize.y);
} | 1 |
0e31510a42e5c0ea69771661033d9877 | d93f1b7698b76ce52bcfe61eb72f4504 | Hide all buttons in the calendar | getObj_("calendardiv").style.visibility = "hidden";
for (var i = 0; i < goSelectTag.length; i++) {
goSelectTag[i].style.visibility = "visible";
}
goSelectTag.length = 0;
} | 0 |
d156aced3a7461dc4d1681bfc5a93ae5 | 1ba89982800dfb86f823aa185948302a | 根据一个实例,自动判断需要在数据库表中的插入还是更新一条记录。
说明:如果是插入数据,return的是insert_row返回的id(modified by wenke 2011.09.21) | items = ["update %s set "% (table_name)]
if data:
for key in data:
value = data.get(key)
if isinstance(value, (int,long,float)) or 'now()' == value:
items.append("%s=%s,"% (key, value))
else:
items.appen... | 0 |
73ee24dd064698d8402767309ec461fa | b921c99f1bedcded21d7864d03a66094 | Makes a request to upload a file to Skynet. | self.check_credentials
if not os.path.exists(filename):
raise DistlibException('not found: %s' % filename)
else:
metadata.validate
d = metadata.todict
sig_file = None
if signer:
if not self.gpg:
logge... | 1 |
b462a2bfd0e034054ac0678082d24904 | b550fee7486721268dbc947bec6f1b83 | 领取每日充值奖励 | $uid = $this->tokenToUid($token);
if($case==1){
if($this->dailyCheck($uid)){
knightlover::load_model('userFactory');
$s = userFactory::getInstance($uid);
$s->userInfo->increaseCash(1000);
$s->inject();
knightlover::cache()->set('daily_'.$uid,date('ymd'),60*60*24);
retu... | 1 |
e78749b9d7cdd34175ac3cff491d832f | e84f3f4dff463a25800ad48f887c06b8 | 弾丸リストを初期化して返す | public class GameMenuTrial extends Application
public ArrayList<Group> get_ball_list(){
return ball_list_2;
} | 0 |
f01b80e623272e12cd9cef882f13a52b | b1426dbb2ac4b26ea295d7295d2147dc | This method is called every time a server's description changed. | public void serverChanged(ServerChangeEvent dsce); | 1 |
8daa2fab9510e6b22848f0f6c85d816c | c97175f60d5113050fb2eb507da91af5 | Function for converting HSV color value to RGB hex string. | {
list($red, $green, $blue) = $this->fromHsvToRgb($hue, $saturation, $value);
return $this->fromRgbToHex($red, $green, $blue);
} | 1 |
603960ae9a353e1344528f93ba154a0d | b8213a9581a51c5a5dc9cf421efd216a | Met à jour les diplomes du joueur | {
return [
'diplomes' => $this->getDoctrine()->getManager()
->getRepository('TeamBundle:MembersDiplomes')
->findAll()
];
} | 0 |
a5ca8eee598073907563620d6f48f439 | c4fac75c288c78bb014a2d22675bab9e | 初始化邻接表的顶点表 | for (int i = 0; i < g.getVexnum(); i++) {
list.add(i);
g.getCurrDist()[i] = Integer.MAX_VALUE;
}
} | 0 |
31470f565722f2e14dcdaf04df855cb5 | 2f36613ab95ff9945a82bfc316abb0e8 | Get ladder for previous season. | request = "database/playoffs"
params = {"number": season - 1}
return self._get(request, payload=params) | 1 |
32a19b1691a4e3fb34cafb8bb7895586 | d2f32874c2c1c3125dbb1b4651d396f9 | 通知下载被取消 | {
LogTools.p(LOG_TAG, "[Metohd:downloadCanceled]" + "; taskid: " + TGDownloadTask.this.getTaskID());
sendTaskResult(downloader);
} | 1 |
cb9ebe95ddff961136a84d924f678925 | c1355cc77926005c5ac4cb2fdc05e570 | Help메시지가 표시되지 않도록 수정 | class FailMessage(BaseMessage):
def __init__(self):
super().__init__()
self.update_message("오류가 발생하였습니다.")
self.update_keyboard(Keyboard.home_buttons) | 0 |
2deb49186128b9afb3555910555515cd | 40bcb78279e0353bf382126ba8fb561f | This function is run on the IO tasks to find netCDF type
length. | int
nc4_get_typelen_mem(NC_HDF5_FILE_INFO_T *h5, nc_type xtype, int is_long,
size_t *len)
{
NC_TYPE_INFO_T *type;
int retval;
LOG((4, "nc4_get_typelen_mem xtype: %d", xtype));
assert(len);
switch (xtype)
{
case NC_BYTE:
case NC_CHAR:
case NC_UBYTE:
*len... | 1 |
aa476b577106d1244dfa5cbeacb86f06 | e56488029228c55101e723c6d6b42f72 | This functions builds the code package to put on aws lambda function.
Zip package prepared by this function is stored in /tmp/<project-name>.zip
location.
Returns | class ZappaCommand(BaseCommand):
# Management command
def create_package(self):
current_file = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
handler_file = os.sep.join(current_file.split(os.sep)[
0:-2]) + os.sep + 'handler.... | 1 |
5d43bc9656185d96935978dd0600ff7d | fb30fd9ab237c3be5ac929bfee61cf86 | Function implementing OAEP Padding Oracle | ptext = b''
keysize = len(key)
I2 = b''
C1prime = os.urandom(keysize)
prefix = C1prime
for i in range(1,keysize+1):
prefix = prefix[:-1]
suffix = chr(i).encode()*len(I2)
if len(I2) > 0:
suffix = xor_bytes(suffix, I2)
for j in range(256):
cb... | 0 |
0280b1bdeead7f086c13ee742cd908cd | 99cafb4b4523a57637f975e8289ea602 | TRANSLATE PLACE HOLDERS | {
$ss = $s;
$phs = $this->getPHs($ss, '[#', '#]');
foreach ($phs as $ph){
$placeholder = $this->em->createQueryBuilder('e')
->select('e')
->from('AppBundle:PlaceHolder', 'e')
->where('e.ph = :ph')
->setParameter ( 'ph', '[#'.$ph.'#]' )
->getQuery()->getOneOrNullResult()
;
if (!is_null($p... | 1 |
11f68d4b84574945e103cb0dd6659e30 | 9f4ef6d55d91489db85dd2e3d6970f54 | convert latitde to Y pixels | public class GeoCoordsUtils
private static int lonToY(double lon) {
return (int) ((lon - MIN_LON) / (MAX_LON - MIN_LON) * 100 * 1000);
} | 0 |
858b01455d9dbde89a065bcbaa9e9da5 | 217a1e212ce401f79a0ec71c6114473f | Test if basic text input will be parsed and wrapped by paragraphs. | {
$input = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr,';
$input .= ' diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam';
$testee = $this->returnRule();
static::assertSame($input, $testee->parse($input));
} | 0 |
257621e4b3457c674dd9f026cd1ee004 | 14ae175f21a016294f4f287fdf6210fd | Number of different values for which the evaluator was called for.
This is the true post-perfect-caching count of the number of calls
and therefore a good metric of the speed given evaluation is slow. | public int numDistinctValues(); | 1 |
ed1845df4dce3078f1fa44e8d81772d1 | 7983ab8a01a1d9eecb42a67ce6c0f794 | Add adjacent peer to current peer's list | for i in range(len(self.__list)):
if self.__list[i].peer == peerAddress:
self.__list[i].resetTimer()
return
peer = Peer(peerAddress, addr, self.socket)
self.mutex.acquire()
self.__list.append(peer)
self.mutex.release() | 1 |
53d18a6158ae9391fd64e7ee6953fd85 | 44f13aed76f6e5c5a5b1927c40c8d6f1 | Return the consensus view of the status of the router whose identity
digest is <b>digest</b>, or NULL if we don't know about any such router. | digest_opt(ARGS_DIGEST) {
REQUIRE(rdata->type == 41);
UNUSED(rdata);
UNUSED(digest);
UNUSED(arg);
return (ISC_R_NOTIMPLEMENTED);
} | 0 |
a4230450fbb0c2c201a38d5b1114d873 | f7d55238b4d3b09327eab6200f4e825a | Calculate the fourier transform using some approximation. | def fourier_transform(signal, period, tt):
f = lambda function: (signal * function(2*np.pi*tt / period)).sum()
return f(np.cos) + 1j * f(np.sin) | 1 |
7a71691951a1aa1e72f14d5a3dd2eeea | 368d460822c9c19a71cd7e08295e2ee0 | 计算全部定时任务内容代码开始启动 (启动一个线程来进行处理) | @ControllerBind(path="/portal/meiko/oa/id_deadline")
public class RealController extends BaseController{
public void startRun(){
newScheduledThreadPool.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
try {
if(service == null) {
service = new RealService... | 1 |
d4589b401ab4ec9286602bd5f9791ad0 | e9f41a602dfc47cc02a6cf240c2a325a | Opens the category window. | {
CategoryDialog *cd = new CategoryDialog;
cd->setAttribute(Qt::WA_DeleteOnClose);
Qt::WindowFlags flags;
flags = (Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
cd->setWindowFlags(flags);
cd->setModal(true);
cd->exec();
ui->comboBox->clear();
FileManager *settingsFile = new FileM... | 1 |
b29fc68667e2fde95c29ad36c430b59a | 18be407af40f85e9cac59e9bdc9b9308 | Возвращает список тестов текущего дня | class BL_Split
public static function getSplitTestsList(\DO_User $DO_User, LetterListsParams $params)
{
$params->setOwnerUserId($DO_User->getMasterId());
$result = \DAL_Split::getSplitTestsList($params);
foreach ($result as &$splitTest) {
if (!empty ($splitTest['time'])) {
$splitTest['time'] = $DO_User->s... | 0 |
5dfbd669091ab86d3c14147096e3cea1 | 4b298b92286722dd15ba9707384f09aa | Method for loading doughnut into view | public class MenuFragment extends Fragment
public void loadDishView(int type) {
dishListFragment.loadDishItem(type);
} | 0 |
b12d654bedfbb2434e1cf8bbe951ef04 | 90ff0539ec5ba93980b60c1272d8017a | Gets item codes from listings on TK Wine's auction site. | {
int errorcount = 0;
if (string.IsNullOrEmpty(searchterm))
{
Console.WriteLine("Enter search term");
searchterm = Console.ReadLine();
}
List<HtmlNode> ProductList = new List<HtmlNode>();
HtmlNode bidbuy;
... | 0 |
15e2bfca3e34a2ebbf7077cc9724f8c6 | cd2a0d602050f828dfdaea15ece98402 | 获取车辆实体 | @namespace("object/car")
public @caption("车辆") @table("cs_car") class CsCar implements java.io.Serializable
public static @api CsCar get(Long id){
return getCsCarById(id);
} | 1 |
22ce688e30fec92eeef3a17d2faf6cc6 | a72e8e76491cb6ee25644fad4d00b0dc | Creates a new action manager. | class ActionFactory extends GenericObject
constructor() {
super();
} | 0 |
4629f140a4561d1ff0e8beef1b62fb5d | 12948e24d786c4ae14ad2e26dccc3675 | Get stock resource | {
$sortBy = \Request::get('sortBy');
$rowsPerPage = \Request::get('rowsPerPage');
$search = \Request::get('search');
switch (\Request::get('descending'))
{
case 'null':
$sortType = null;
break;
case 'true':
... | 1 |
11cfe5a5836fd11bcc916e3eae395a4c | 2c342adbac971d1f5d59daffb311719a | Entire Firebug UI is running inside an iframe (firebugFrame.xul). This function
is executed by Firebug framework when the frame is loaded. This happens when
the user requires Firebug for the first time (doesn't have to happen during the
Firefox session at all) | var iframe = window.frames[0];
if (iframe.attachEvent){
iframe.attachEvent("onload", function(){
loaded = 1;
});
} else {
iframe.onload = function(){
loaded = 1;
};
}
} | 1 |
20936253f11600c568144720e3eda396 | 7c4023857ae4a1802c60e1ab3442b98d | Opens the Health and Wellness Page | class HealthyPage(Base):
def __init__(self):
super().__init__() | 0 |
c6edc0f5e87637db4805f29de6581dfe | a294091f5a072e324d546c8d22a0e9d4 | calcualte the average gradient for each shared variable across all towers on multi gpus | average_grads = []
for grad_and_vars in zip(*tower_grads):
grads = []
for g, _ in grad_and_vars:
expanded_g = tf.expand_dims(g, 0)
grads.append(expanded_g)
grad = tf.concat(axis=0, values=grads)
grad = tf.reduce_mean(grad, 0)
v = grad_and_vars[0][1... | 1 |
fd6c4c1b0876644b3467abc158b1b082 | 7f61448ad6da3ef0f9cb03f40c5be655 | Shouldn't need to do anything in this function I think. | cases like (1) | 0 |
e32fb56e6cc668222619bd056f9faa34 | 280160fc51f75ad049b9a6c79f6df015 | Lists all {@code d2rq:translation} entries. | class ContainerController extends ContentContainerController
public function actionEntries()
{
return $this->runEntries();
} | 0 |
28c7a591fe16f35f5e4dae149071e7ef | 79d69fa7a5aa8deaa28e701e191260c6 | 세로 검사 | BOOL verticalBlock(void) {
int cnt, i, j, k;
BYTE block;
BOOL flag = FALSE;
for(i = 0; i < BOARD_WIDTH; i++) {
cnt = 0;
block = 0xFF;
for(j = 0; j < BOARD_HEIGHT; j++) {
if((cnt == 0) && (g_hexaInfo.board[j][i] != EMPTY_BLOCK)) {
block = g_hexaInfo.board[j][i];
cnt++;
} else {
if(g_hexaInfo.... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.