query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
1f034488ec2b3b4796af07beb1d9d48e | 87d893fd510e9ed6c84fbecd23608612 | If there is a short help, then create the longer version from it. | class Str(CliType):
def get_help_str(self):
if self.help_str:
return super(Str, self).get_help_str()
else:
return 'Enter a string' | 0 |
7c3e704dbab474d35227e13d774dd4b3 | 34e8b86862b59b93c3f3bad6f2994a1d | Return the the type of the operator as a string | class Operator
public function getType()
{
return $this->type;
} | 1 |
21a2568b519e1995d06d3a62c11aa43e | b94eb584f1aec10eab8efa0e1ceb1600 | Convert subscripts to linear indices | class TensorDescriptor:
def get_multi_index_from_linear(self, linear_index):
sub_index_list = []
for stride, stride_p1 in zip(self.strides, self.strides[1:] + [None]):
if stride_p1 is None:
sub_index = linear_index // stride
else:
sub_index = (line... | 0 |
c44df0260c388bbd241b7eb725606ccb | a1625058e2959b1a5996efef09d664a7 | 주어진 인증 정보로 HTTP 요청 메시지를 작성하여 반환합니다. | byte[] buildHttpMessage(List<String> headers, byte[] body); | 0 |
5713c597253d31fb9fb47719c278dfd9 | 9a444c04d5270075d27e0cbea675c429 | 根据ID停用/启用终端 | @Transactional(rollbackFor = RuntimeException.class)
void freezeOrEnable(long id, boolean enable); | 1 |
03a709e07743697051a99d69710c3716 | 81f9ebba55d1ccecc62e12afb96fad97 | make sure we don't attempt to region compile a map with the camera outside the region | bool isCameraOutside()
{
BW_GUARD;
Chunk * pCC = ChunkManager::instance().cameraChunk();
return pCC == NULL || pCC->isOutsideChunk();
} | 1 |
8ff495d2240d15250f0db4c2344466c2 | 23114f27ae8ef09d30a3a63b31438a29 | Problem 3 - Encodes a list using run-length encoding | def Run_Length_Coding(x):
result, final = [], ""
count = 1
for i in range(len(x)):
if i == len(x) - 1:
result.append(count)
result.append(x[i])
elif x[i] == x[i + 1]:
count += 1
else:
result.append(count)
result.append(x[i])... | 1 |
a00159e20e35abeb0cd98f6f558a8d71 | 6b504c2bc5cac1fc626ccf10b9a98f90 | Returns all the geozones where geozoneId = ?. | public List<GeoRegion> getGeoRegionsForOccurrenceRecord(Long occurrenceRecordId); | 0 |
bcdc649582436a5f17b2cad6ff53df00 | bd026d00983ef0704955e4a15e89c697 | Posts a patient view to the database | $stmt = $this->db->prepare("INSERT INTO patient (fname, lname, phone, filledOutBy,
doctorRequested, pain, nausea, depression, anxiety,
drowsiness, average, resolved)
values (:fn... | 1 |
2d96e366e40868ec8f818e2c7b6937b0 | 3307fad0df67ba89c45f953ec6930d26 | fonction qui permet au processus appelant de demander la création d'une page partagée au noyau | unsigned int size = 0;
if (read_nr(req_pipe, &size) < 0){
return ERR_VAL;
}
if (write_string(resp_pipe, CREATE_SHM) < 0){
return ERR_VAL;
}
int mem_id = shmget(KEY, size, IPC_CREAT | PERM);
if ( mem_id < 0){
return w... | 1 |
e72f780088897dec5fa8d6dac712a905 | e0a377b71400ff77c75ee29449093704 | A RuleRef is "optional" when it's not required to be included
to complete the alternative (i.e., because it is inside a "*" block
and therefore can occur 0 or multiple times, or inside a "?" block,
and therefore can occur 0 or 1 times). | export class SecurityRuleSelector
isDefaultRule(ruleFragment: string): boolean {
return ruleFragment == "/*" || ruleFragment == "*";
} | 0 |
195cf0ded544cf2e3afdb6f71165ebe1 | 5337c01fbabcc058b44cf8b4b31e5770 | Mezcla de forma aleatoria las filas de una matriz. | public class Deck : MonoBehaviour
static void RandomizeArray(int[][] array) {
System.Random random = new System.Random ();
for (int i = array.Length - 1; i > 0; --i) {
int r = random.Next(0,i);
int[] tmp = array[i];
array[i] = array[r];
array[r] = tmp;
}
} | 1 |
850af340e7ed011834d0588c21342003 | 126eaafcb0b7b43859129c4a120ac43d | 创建线程后台进行录音操作 | {
try {
af = getAudioFormat();
DataLine.Info info = new DataLine.Info(TargetDataLine.class,af);
td = (TargetDataLine)(AudioSystem.getLine(info));
td.open(af);
td.start();
Record record = new Record();
Threa... | 1 |
d6f476001ea6fd9bda992373910e35ca | caa29ecf37899a293fc649901a50ed69 | Apply pixelate filter to regions of interest. | super().__init__(order=order)
self.height = height
self.width = width
self.p = p
self.erosion_rate = erosion_rate
self.interpolation = interpolation
self.always_apply = always_apply | 0 |
932e418c68f701809ff1b29fab6b994e | 960b96f93c616a0eaddf24190dda29ce | 实例化BeanDefinitons列表中的定义的bean | public Object instantiate(BeanDefinition beanDefinition) throws BeansException {
Class beanClass = beanDefinition.getBeanClass();
try {
Constructor declaredConstructor = beanClass.getDeclaredConstructor();
return declaredConstructor.newInstance();
} catch (Exception e... | 1 |
be7ff5267981f5612ddc0218dbf3af3b | 17a26e3f59502a0ec4b3f44e9d238cfa | 将source转为byte,若source为null或转换失败,则返回defaultValue | if (LKStringUtils.isNotBlank(cs)) {
try {
return Byte.parseByte(LKStringUtils.trimToEmpty(cs));
} catch (final Exception e) {
}
}
return defaultValue;
} | 1 |
a72b70ce8de9b462b03272e939cae878 | 7b1e7c126be7d017f4efb0c2f1e95232 | 登陆请求操作 | Login ({ commit }, data) {
var userId = data.userId
var password = data.password
if (userId === 'admin' && password === '123456') {
commit('SET_LOGIN', true)
commit('SET_NAME', userId)
}
} | 1 |
9a3f807081d8bba3bb65c4e9bc15914a | 6ba220a25d5cf15c0c09086a851bce76 | used for bishop's and Queen's movement | int file = (*this).coordinates[0];
int rank = (*this).coordinates[1];
bool answer = false;
vector<int> pair;
if (abs(file - fileTo) == abs(rank - rankTo)) {
if ( fileTo > file && rankTo > rank) {
pair = {1, 1};
int until = rankTo - rank;
if (!chessboard.checkBetween(file, rank, until, pa... | 1 |
79590e81b64cc70140ca3e4a4ca56cca | 1f504b671661cfea820ad0a460f1a873 | 공사_구간_이력(TH_CNTRWK_SCTN_HIST)을 삭제한다. | @Service("cntrwkSctnHistService")
public class CntrwkSctnHistServiceImpl extends AbstractServiceImpl implements CntrwkSctnHistService
public Integer insertCntrwkSctnHist(CntrwkSctnHistVO cntrwkSctnHistVO) throws Exception {
return cntrwkSctnHistDAO.insertCntrwkSctnHist( cntrwkSctnHistVO);
} | 0 |
1248769b8ac1d0c4bad24475d5458408 | a723933f9c8d6727cfccd10124da143a | Returns error-message based on valid-location check | var userMessage = document.querySelector('.location-status');
console.log("Error finding your location", err);
userMessage.classList.toggle('location-error');
userMessage.innerHTML = `Location could not be found.<br>Please <a href="/">reolad page</a> and try again.`;
} | 0 |
ccc1c893427e0a079e201bd4cb6e7793 | 19939fde360714150cc6f6e7173f50b7 | Requests a redraw of the entire keyboard. Calling {@link #invalidate} is not sufficient because
the keyboard renders the keys to an off-screen buffer and an invalidate() only draws the cached
buffer. | @Deprecated
public void forceRepaint(); | 1 |
9b10e544d0a34891c9e26867ee3db392 | 2bcb1ff968e088fa510103244ae01e84 | This method processes the search task type. | public abstract class SearchGUIProcessBuilder implements Runnable
public abstract String getType(); | 0 |
cb2af5c9dbd73f5706dd0299224943fa | 630202a620b90dd4e34420c62533bfa0 | <p>
Fills a Java object with the provided values. The key of the map
corresponds to the name of the property to set. The value of the map
corresponds to the value to set on the Java object.
</p>
<p>
The keys can contain '.' to set nested values.
</p>
Override parameter allows to indicate which source has higher priorit... | public class BeanConvert extends org.springframework.beans.BeanUtils
public static void populate(Object bean, Map<String, ?> properties)
throws IllegalAccessException,
InvocationTargetException {
org.apache.commons.beanutils.BeanUtils.populate(bean, properties);
} | 1 |
8aac238f2208ff5f8cc70dbcb1a73412 | 6a3095983648d5699307438d9a0c0037 | Sets avatar medium. | @Entity
public class Player
public String getAvatarMedium() {
return avatarMedium;
} | 0 |
be91d574b3b78c2adc41f69bd6382901 | 8b4859ea08b9feef438a1d5521593e37 | 从l到r的位置所有的数字变成v | {
if(segTree[i].l==l&&segTree[i].r==r)
{
segTree[i].lazy=1;
segTree[i].tag=v;
segTree[i].sum=(r-l+1)*v;
return;
}
int mid=(segTree[i].l+segTree[i].r)>>1;
if(segTree[i].lazy==1)
{
segTree[i].lazy=0;
update(i<<1,segTree[i].l,mid,segTree[i].tag);
... | 1 |
b61140041944e71c123a932ae3897609 | 8fe21ae09d37ab68e580f351880d9f68 | ゲームオーバの画面です。 | public class MoguraMain : MonoBehaviour
IEnumerator Game_Over(){
rockUI.SetActive(false);
GameOver.SetActive(true);
yield return new WaitForSeconds(2f);
SceneManager.LoadScene ("Mogura/main");
} | 1 |
133a6c85490df64492f06345097b05ca | baddcab7a536362f22c31ef477f69aaf | Calculates and displays the number of stars earned | public void calcNumStars() {
int setsComplete = 0;
setsComplete += getRedCovered()/MAX_NUM;
setsComplete += getGreenCovered()/MAX_NUM;
setsComplete += getYellowCovered()/MAX_NUM;
numStars = setsComplete;
} | 1 |
6c429e2108cfe08e3702f5257ce9c5c9 | d0d5ab380e9bfb097af829857b0b64c3 | Gadget connected to the paired Echo device. | self, hass, name, mac_address):
import pygatt
self._hass = hass
self._name = name
self._mac_address = mac_address
self._state = False | 0 |
ea4c55ea864cd9b69eff9809c7f15614 | 5b17aa96c05873f6d7a3dbc0c4e1967f | Hide navigation arrows from recently list | class RevSliderOutput extends RevSliderFunctions
public function remove_navigation(){
$this->slider->set_param(array('nav', 'arrows', 'set'), false);
$this->slider->set_param(array('nav', 'bullets', 'set'), false);
$this->slider->set_param(array('nav', 'tabs', 'set'), false);
$this->slider->set_param(array('nav... | 1 |
484ebc7dc56c1241d084655ca9c8fe12 | 4d0dbf915923f7df52e4f7294fadcccb | Retrieves pending friendship requests for the logged user. | public function friendRequestsPending() {
return $this->friendsOf()->whereAccepted(false)->get();
} | 1 |
32dc01811394165ee51aba8e03e0720e | aeb4418baf93f2d92e315828ac1be1e0 | Handle clicks on the genre dropdown list | {
if (ImportedTracksListbox.SelectedIndex == -1)
{
MessageBox.Show("Please select a track first");
}
else
{
GenreListbox.Items.Add(ImportedTracksListbox.SelectedItem);
}
} | 0 |
9635b5234af2c74c04947663889526dc | ed743e1825cf1606bab5fb3422340509 | Gets if stream is encoded in a supported video format. | namespace Cave.Media.Audio.MPG123
public sealed class M123
[SuppressUnmanagedCodeSecurity]
internal static class SafeNativeMethods
[DllImport(NATIVE_LIBRARY, CallingConvention = CallingConvention.Cdecl)]
public static extern CHANNELCOUNT mpg123_format_support(IntPtr handle, long sampleRa... | 0 |
cee7c2e2a37e2e5745e2a7145f1447e3 | cee01918ab803d2b671c988999046407 | Metodo Congruencial Lineal Combinado Generator. | vector<uint64_t>* C = new vector<uint64_t>;
uint64_t k,U;
do{
do{
std::srand(std::time(nullptr));
k = std::rand() % (p - 1);
} while (k == 1);
U = modulo(y,k,p);
} while (U == 1);
C->push_back(modulo(alpha,k,p));
C->push_back((U*M)%p);
return C... | 0 |
68e480fd5c20f357bfb13220723e981f | ff4eb9fa153f9d75cc49c258fba74dc1 | Compute 3D length of given geometry | class Vect(object):
def len3D(self) -> float:
return sqrt(self.x * self.x + self.y * self.y + self.z * self.z) | 1 |
0733cf7038c4cafd9f37ab62c3a71e6d | 0b32d668dfc27af15be8e4af46fd4178 | reroot | def reroot(t, r):
ps = []
ps.append([r, -1])
ret_t = copy.deepcopy(t)
while len(ps) != 0:
current, current_newp = ps[0]
family = [t[current].parent] + t[current].children
if -1 in family:
family.remove(-1)
if current_newp in family:
family.remove(c... | 1 |
2e063c2f02e4d3dc0bb7194a4937eda4 | da04401866bf58f91f718c564d38b58c | Optimise Ohneschach immobility tester slices | optimized_solution: Solution
optimized_solution = solution.duplicate()
for sl in optimized_solution.get_all_slices():
if optimized_solution.p.is_valid_slice(sl[0], sl[1], sl[2] + 1, sl[3]):
if optimized_solution.is_free_space(sl[0] + sl[2], sl[1], 1, sl[3]):
... | 1 |
86123e9f2ab680da9474c0e010666b92 | 10e2a89eb788c03df5dadc03544d10c9 | Function that generates the frequency range used to investigate the
impedance response of an electrical circuit Frequency Generator with
log-spaced frequencies | def frequency_spaceing(lower, upper, n):
frequency_array = np.linspace(lower, upper, n)
return frequency_array | 0 |
0b01052d1e6884a3da329f135ec070fb | 473720711fa4524cb86316d64b577810 | 지정한 파일에 문자열 컬렉션을 씁니다 | public abstract class IO extends Thread
public static void writeText(final List<String> aCollection, final File aFile)
{
StringUtility.writeText(aCollection, aFile);
return;
} | 1 |
3b718ec76195670ec732adf925f07de8 | 7f5e04ec44f6ddcf36a77ad212acc6bb | Este metodo retorna uma referencia da Tabela Cargos do Dialogo. | public class Utilitario extends Framework
public BuscarTabla getBuscaTabla() {
return (BuscarTabla) FacesContext.getCurrentInstance().getViewRoot().findComponent("formulario:bus_buscar");
} | 0 |
4f77a0ac5abc68934b3866e13fa52595 | d12f8f75dfa31f17573449f7aa8a78ae | 合并坐标和可消除的颜色 | function merge(direction) {
let span = wrap.querySelectorAll('span');
for (let i = 0; i < map.length; i++) {
if (direction == 'left') {
for (let j = 0; j < map[i].length - 1; j++) {
if (map[i][j] != 0 && map[i][j] == map[i][j + 1]) {
... | 0 |
6b46ec61307f8b0363b8bbc00a9aabc8 | c00e5c97c1337ebe17821ccae351de35 | Devuelve una tupla diciendo si es definible y un contrajemplo
para la definibilidad existencial positiva de supertype, en k con el subtype | class Model_Family(object):
def is_existential_positive_definable(self, subtype, supertype):
try:
for hom in k_homs(self.without_isos(subtype, supertype), subtype):
if not hom.preserves_type(supertype):
return (False, hom)
except Counterexample as ce:
... | 1 |
f5be1cfe109156345be10141152bb77a | f9e7b6f005bcb36e6a2310b060bb1923 | Export the settings as an importable model | class WirelessSettings(object):
def export(self):
export = {}
for attr in self.__class__.PROPERTIES:
export[attr] = getattr(self, attr, None)
return export | 1 |
62f5fed6999e3d80b7d428910ea7b07f | ec3a4852b93871f1f9907d3c3ea95626 | 防止线程池名称出现TBase类 | name = '.'.join(['DistJET.BaseThread',name])
print("[BaseThread]: create new thread : %s" % name)
super(BaseThread, self).__init__(name=name)
self.setDaemon(1)
self.lock = threading.RLock()
self.__should_stop = False
base_thread_log.debug('BaseThread object create... | 0 |
16f52de948fce81fe992504e1747cc7e | 3209c40399ef511c90296b4bce28cbf1 | 估算当前问题所能达到的最小代价 | double resolve(int curPosI, unsigned short points) {
if (points == 0) {
return 0;
}
if (saved_res[curPosI][points]) {
return saved_res[curPosI][points];
}
double ret = std::numeric_limits<double>::max();
for (int i = 1; i <= n; i++) {
if (test(points, i)) {
re... | 1 |
13f761a0dc1dba28f3a4ab7db3153ba0 | cafa53efe162d36372696342cbd67d44 | 获取最大排名奖励 | local myRank = tonumber(tbRankList.myRank)
local tReward = getAllRankRewards()
for _,reward in ipairs(tReward) do
local min = tonumber(reward.min)
local max = tonumber(reward.max)
if myRank >= min and myRank <= max then
local tab = string.split(reward.items, "|")
if(not table.isEmpty(tab)) then
retur... | 0 |
39f18af540eb5fc22882a0112802f42e | f5c4b56dd4bf3a971104436726e94de7 | Implementations should set the 'current' and 'next' frames of animation that will be interpolated. | {
if (hasStarted && frames.Count > 0 && totalDuration > 0 && !hasFinished)
{
time += delta;
interpolatedTime = Easings.Interpolate(time / totalDuration, EasingFunction) * totalDuration;
TransformFrame frame;
while (currentIn... | 1 |
947f20a2d4995dd60eb093f1a4618b04 | 31515355e6277cb4c5c63e09b45c5fe2 | Given a MouseEvent (or SyntheticMouseEvent) object,
determine the coordinates of the mouse pointer
with respect to the top-left corner of its target. | return {
x: event.clientX - event.target.getBoundingClientRect().left,
y: event.clientY - event.target.getBoundingClientRect().top
}
} | 1 |
b2dbff2823451cb84f323eb6df9533fa | f6ea210a40f14b77a1b6dc1e9c868e46 | NewExecModeCmdByCmd creates an exec mode command. | func NewExecer(database database, builder dat.Builder) *Execer {
return &Execer{
database: database,
builder: builder,
}
} | 0 |
aa3fa55b9cbf1848ca8e9a176f9afd39 | c7a3e98b499363cc73782c5ea40772bc | @brief Sends an amount of data in non blocking mode. | {
uint32_t bToSend, bSent, timeOut;
uint8_t *pChar = txbuf;
bToSend = buflen;
if (flag == BLOCKING) {
bSent = 0;
while (bToSend) {
timeOut = UART_BLOCKING_TIMEOUT;
while (!(IP_UART_SendByte(pUART, *pChar))) {
if (timeOut == 0) {
break;
}
timeOut--;
}
if (timeOut == 0) {
break;
... | 1 |
295a94000cca31694917ab1595b629e1 | c39af665812e68846c11a7528799a96f | [Service(Date = "2018-11-06", Director = "jfwang", Name = "获取所属职位下级")] | public class EmployeePositionServiceTest extends BaseContextTestCase
@Test
public void getChildrenFromParentId() {
String parentId = "00A0E06A-CAAF-11E7-AA54-0242C0A84202";
IEmployeePositionService proxy = ApiClient.createProxy(IEmployeePositionService.class);
List<Position> result = proxy.... | 1 |
7ab38f4c7e1bcd2c4738f76f140959da | 8a2b0c0f646a5246b21a0fcf7b647db4 | Insere um nó numa subárvore. | Abstrata* insertNode(Abstrata *A, Abstrata *nv) {
if(A == NULL)
return nv;
nv->nseg = A;
return nv;
} | 1 |
e04ddb517344b2dab5569b6532286e0b | effb89d3163a83cf54b616210216ef6f | Fill the crypt array with the ascii values for use by the encoding
process. | for (int letter = ALPHABET_START_DEC; letter <= ALPHABET_END_DEC; letter++) {
alphabet[letter-ALPHABET_START_DEC] = (char) letter;
}
} | 0 |
0ec9f055fa52d673fff0b3d89fd73256 | 884c91de7bb48b0d51fa84ab3e175bf9 | Returns the dummy log to use if none has been set | class Serverless extends ProviderContainer implements LoggerAwareInterface{
public function getLogger(){
if(is_null($this->logger)){
$this->logger = new EmptyLogger();
}
return $this->logger;
} | 1 |
7d071cad69d3cbb40a6abb95c90035e7 | 863e38643fc5982cc2a3308637a3a4f7 | Set the sort direction for field: InactiveDt (BILL_INSERT_GROUPS.inactive_dt) | public class PCDObjectFilter extends BaseFilter implements Serializable
public boolean getPackageInactiveDtSortDirection () {
return this.PackageInactiveDtSortAscending;
} | 0 |
2d1d3f4cc8c93a64c48e5da792a0fb61 | b44bdcd52c9ef168f6461af860aede8f | Gets the header of the response message. | @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ "id", "originalRequest", "responseTime", "timings", "_postman_previewlanguage", "header", "cookie", "body", "status",
"code" })
public class Response
@JsonProperty("header")
public List<Header> getHeader() {
return header;
} | 1 |
b4970c71b004bd2c5a3e6e2f8baa9389 | 2b561193d33ef8348753a394ab0ec112 | This function updates the addresses of data labels in the label tabel. | def update_label():
dat = w.Custom1.get()
lst = []
for x in dat:
if len(x) == 2:
t = x[0]
k = x[1]
lst.append(t)
else:
lst.append(x)
s = ", ".join(lst)
w.Message1.configure(text=s) | 0 |
a109e867eadc53be25b1f6c0a75bf693 | 08f300bd1020a801e8c8109a5c7601c5 | This function is responsible for check if Perfotron dashboard is already installed or not | $active = false;
if (get_field('module_installed', 'active', 'name', 'mahoodle')) {
$active = true;
}
return $active;
} | 0 |
84aa67f12191de60fcd2b5879088fc12 | ce2302a2142a74e6076023af9e693c8e | Returns \c true if the undo stack contains no commands. | class CommandFactory(object):
def is_undoable(self):
return bool(self.undostack) | 0 |
9ce491e6cf0a1129bf5579c64c3008f3 | 78154ff60c8ad553625a1d1ccf7ac097 | Implements ISet{int}.ExceptWith
<remarks>
<para>For this operation is irrelevant wheter IEnumerable{int} is a set (contains no duplicates) or not.</para>
<para>For this operation argument set IEnumerableOf{int} is not required to be within BitSetArray.domain.</para></remarks> | namespace Ngol.Collections.Generic
void SymmetricExceptWith(IIterable<T> other); | 0 |
11dfcd6823cd7130c4489ca774ddb665 | e44e3e2f6ff29326390bd530b7e0ea33 | 클릭시 풍선생성 | {
while (true)
{
RaycastHit hitinfo;
if (Physics.SphereCast(charactor.position - charactor.forward, 1f, charactor.forward, out hitinfo, 2f, laymask_tree))
{
press_tree_image.SetActive(true);
if (Input.GetButtonDown("Fire1"))
{
... | 0 |
20fe1202894dc37cc9b2e0e29f30d03f | fc3edcc54986fb81e38ce13aa08f908b | Validation method for <see cref="DeploymentsList" /> method. Call this like the actual call, but you will get validation
events back. | public class DeploymentsInner implements InnerSupportsGet<DeploymentExtendedInner>, InnerSupportsDelete<Void>, InnerSupportsListing<DeploymentExtendedInner>
public ServiceFuture<DeploymentValidateResultInner> validateAsync(String resourceGroupName, String deploymentName, DeploymentInner parameters, final ServiceCallbac... | 1 |
84a58bcbebb1ee62c663b5f2e4086c83 | b2145eaf47765299d4ac573e8bc7238d | Insere um novo item no fundo da Pilha. | void push(STACK *items,void *value) {
insertDAback(items->da, value);
} | 1 |
cae6b848fdc11011790293fd469aa3a0 | a250cf9f9907a9fb1d562d280aa6efdb | 处理多个图片链接,并用逗号连接成字符串 | image_links = ''
for image in images_urls:
image_link = image.split('jpg')
image_link2 = image_link[0] + 'jpg\n'
image_links += image_link2
return image_links | 0 |
ae2aa479e35090d4b7d05d1fc43bbe8d | 4ad4e465697d5d81456e65d1d90ab678 | 简单的判断是否包含码。
判断逻辑很简单,二值化以后,判断中心区域是否有“白点” | {
int iMin = 0, iMax = 0, jMin = 0, jMax = 0;
if (directionX == 0)
{
iMin = -2;
iMax = 2;
if (directionY == 1)
{
jMin = 1;
jMax = crossDetectLen;
}
... | 1 |
5c9e27d2d16c39e5877a42381eeebf47 | a0fff051beb477dd9be0ba442720c422 | calculate net force in Y exerted by all planets in given array | double NetforceY = 0;
for(Planet p : all){
if(!equals(p)){
NetforceY += calcForceExertedByY(p);
}
}
return NetforceY;
} | 1 |
ff6aa86b73ca7f9085a1cf93d9aa8360 | f47653c9d956423cc2bb2f7dbaef0838 | 一个化验报告单的抬头信息 | {
$content = str_replace('__UNITNAME__', $data['UNIT_NAME'] . '检查报告单', $content);
$content = str_replace('__NAME__', $data['NAME'], $content);
$content = str_replace('__SEX__', $data['SEX'], $content);
$content = str_replace('__AGE__', $data['AGE'], $content);
$content = str_... | 1 |
520d8040c373fb2362fd9e04092d84f6 | 21969b8d247feb08cf9a2b24e8876163 | Check to see if FontScript property is set | namespace Amazon.MediaConvert.Model
public partial class BurninDestinationSettings
internal bool IsSetFontColor()
{
return this._fontColor != null;
} | 0 |
d494cb37af746267f3ebf18a9e894756 | fe261469dbf2235a2b1093141f6cae23 | Находит максимальное количество автомобилей на парковке за определенный период | void findCountWithMaxStops(); | 0 |
03078f32b382337dec2634050e79b5a6 | e3fa6e6ece3d3cb39a93f978d14b803b | 数据解包,解包顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpLLToClaimDuty>历史记账凭证主表信息</A>表字段 | PreList p = new PreList();
byte[] temp = null;
System.arraycopy(buf, 0, temp, 0, 12);
p.patient = temp;
System.arraycopy(buf, 12, temp, 0, 5);
p.sex = temp;
System.arraycopy(buf, 17, temp, 0, 5);
p.age = temp;
System.arraycopy(buf, 22, temp, 0, 25);
p.ID = temp;
System.arraycopy(buf, 47, temp, 0, ... | 1 |
950b6583f13e5f7062af5a1b2ce02139 | e853553ef4d3fe38de2663876203aebe | This method is used to update multiple the ClientTypeModuleAccess details. | namespace EVA.EIMS.Security.API.Controllers
[ApiVersion("1.0")]
[Route("api/[controller]/[action]")]
public class ClientTypeModuleAccessController : Controller, IDisposable
[HttpGet]
[ActionName("GetClientTypeAccessException")]
public async Task<IActionResult> GetClientTypeAccessException()
... | 0 |
0e93e7c0ebb051c4427f3c06803079dd | 60448a7b10375344435ea955374e053a | Attempts to log in a receptionist. | public void login() throws SimulationException, OverloadException, DisabledException, EmptyException {
SelfCheckoutSoftware control = new SelfCheckoutSoftware(s);
control.registerAttendant("12345");
control.attendantLogin("12345");
assertTrue(control.getattendantLoggedIn());
AttendantDatabase.REGISTERED_ATTE... | 1 |
a1958335fe326bc995b7301cd4741856 | 989f5433e42b1aa16da9997015f92cad | Формира податочно множество со tf-idf тежини и класи, соодветно за класификација со дрва на одлука. | classes_counting = []
for pattern in self.training_data:
w = nltk.word_tokenize(pattern['sentence'])
w = self.filter_words(w)
self.words.extend(w)
self.documents.append((w, pattern['class']))
if pattern['class'] not in self.classes:
... | 0 |
e251056865f3deac614ba44505c03591 | 5922a0366d1583783f6c7311f956a716 | Returns the value of the '<em><b>Encrypted Admin Password</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Encrypted Admin Password</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc -->
annotation="http://openecomp.org type='configuration... | @Generated("org.jsonschema2pojo")
public class LoginVo
public String getPasswordEncrypted() {
return passwordEncrypted;
} | 1 |
eb487690db68868c649a66ed9be4a33c | 68c93d335c9a2f281b1f69d86e2a9542 | Set the compiled form of the formula. Note that this field is only valid
for account objects loaded from the database. | namespace mu
void ParserError::SetFormula(const string_type& a_strFormula)
{
m_strFormula = a_strFormula;
} | 0 |
95dd63978ea45cc88a8aac2118c4df64 | d572b089f23d3e7f699180a9e5e10756 | Called to indicate that the timer should start.
This is called right before {@link Command#initialize() initialize()} is, inside the
{@link Command#run() run()} method. | public class AutoDrive extends CommandBase
@Override
public void initialize() {
timer.start();
} | 0 |
fd55457b4b9320ae3fbaf988b1ae982a | 8812fe1dc4d9471058136972c1b28cb6 | Checks if the recipient exists in the collection. | const result = await EmailBlacklist.findOne({
where: {
recipient: recipientEmail,
},
})
return !!result
} | 1 |
dabb42cab8c4b3c0f580038300e0cfd1 | 1159e6b3a29025c1810f45aae0f8c407 | 用章申请-归还 | log = public.logger
body = public.req_body
form_var = body.get('form_var')
try:
id = form_var.get('id')
if not id:
public.respcode, public.respmsg = "335102", "用章申请数据不存在!"
public.respinfo = HttpResponse(public.setrespinfo())
return public.respinfo
... | 1 |
0d0bcccb2a5fd7c254a232fbfd08a219 | 1b7a58d4396f7880a521bc61c0b16a2f | Transforme à partir d'une "Tuile" un "Button" et l'ajoute à la liste de boutons | public class MineMainController
public ArrayList<Button> createTileButtons(final Context context, MineBoardManager boardManager, ArrayList<Button> tileButtons, final ImageButton face) {
MineBoard board = boardManager.getBoard();
tileButtons = new ArrayList<>();
for (int i = 0; i < boardManager.g... | 1 |
cae2a4b90df9a727ba1baddf24a05334 | f7373508c2e570046690bda794045a7a | Sets the specified index to the specified value; used for placing bricks within the map. | namespace IndieCapstone
public class PlayerAnimation
void SetIndex(int x, int y)
{
body.SetIndex(x, y);
clothes.SetIndex(x, y);
} | 0 |
312151c9264087b208ebb43db622fc01 | 168c030ededc71efc2bc17d861375d8c | Limits the mouse position to within the window. | {
m_mouseX += m_mouseState.lX;
m_mouseY += m_mouseState.lY;
if (m_mouseX < m_minimumX)
{
m_mouseX = m_minimumX;
}
if (m_mouseY < m_minimumY)
{
m_mouseY = m_minimumY;
}
if (m_mouseX > m_minimumX + m_screenWidth)
{
m_mouseX = m_minimumX + m_screenWidth;
}
if (m_mouseY > m_minimumY + m_screenHeigh... | 1 |
d91fbd34fbd0be905e714a73c62e5d6b | 0c731b5f48c32819ecdcd670066461e4 | 主にデバッグに使用する、ログをLogcatに出力する関数
tagを指定しなければmyTagになる | fun Any.logD(tag: String = TAG) = Log.d(tag, toString()) | 1 |
06c3ef66c08f20ca683a2031fe03344e | a6f85294f3e4fa686e098e6527a353ba | 以分页的形式查找所有的维修车辆明细表列表 | IPage<Repair> findListByPage(Integer page, Integer pageCount); | 1 |
eaad28cfae7df324602ff9f1348f8f7d | c8b3cd6b76b14e123d268e1f03402d40 | PKを指定して1件取得
ヒットしないときは例外 | if Key == "":
return DatByoureki()
Sql = "SELECT * FROM " + self.__class__.__name__
Sql += " Where __key__ = KEY('" + str(Key) + "')"
Snap = db.GqlQuery(Sql)
Rec = Snap.fetch(Snap.count())
return Rec[0] | 0 |
918b8a397e01a78815a5faf927c39470 | 6eeb562de7477e7a4222ac454dced837 | When a key is pressed in the email text field. | public class CreateAccount implements Initializable{
@FXML
public void processEmail(KeyEvent event){
System.out.println(emailTextField.getText());
} | 1 |
dbc4d6ad67b089b653b7fbb556392328 | 55032f557e98f0f9bf8197c4e108f32e | Clears all the framgment back stack, the right panel can show only the
current selected contents. | FragmentManager fragmentManager = getFragmentManager((Activity) UIActivity.getUIContext());
for(int i = 0; i < fragmentManager.getBackStackEntryCount(); ++i) {
fragmentManager.popBackStack();
}
} | 1 |
8f879b5beabdbbd10ae0ec0d3c648f8d | 0a4ab0f35260076af77f3e230f28c475 | Reset the Exposure array | public class Land
public synchronized void resetShade() {
shadeGrid = exposureGrid;
} | 0 |
8f43466cfd20ca71276ad489db4f2771 | a3f06966ccf25e57850f11b3379c049e | if the training set never encountered this transition, it is assumed that this transition cannot exist (returns 0) | if((startState == null) ||(!transitionTable.containsKey(startState)) || (destinationState == null) || (!transitionTable.containsKey(destinationState)))
return 0.0f;
if(!transitionTable.get(startState).containsKey(destinationState))
return 0.0f;
return transitionTable.get(startState).get(destinationState).fl... | 1 |
ed07e9b98bd2f292d2a462aa33f783f8 | 5b8448e897c7e4416633e21d7786c1e6 | Check parser extension for f/b distinction. | def f_end(version):
if version >= 7380:
return "f90"
else:
return "f" | 1 |
b814deb5439874608e5dff19050a3501 | bd3789a7a57d76cedab7cf8f3e4201f2 | destroys a scene light list via its name | {
auto lightIterator = mapNameToLightData.find(deadLightName);
if (lightIterator != mapNameToLightData.end())
{
mapNameToLightData.erase(lightIterator);
}
else
{
}
} | 1 |
8409f5b9ce27c4b1c20eb252d7084cac | 5db34dc175d2544ff0c5529666c50198 | disallow . or .. as srcbase or in srcdir | BAD_SOURCES = (
"./",
"..",
"../",
"foo/.",
"foo/./bar",
"foo/..",
"foo/../foo",
)
for src in BAD_SOURCES:
lf = self.LinkFile(src, "foo")
self.assertRaises(error.ManifestInvalidPathError, ... | 1 |
56c6aaafd9dcabf8d41064ddbcc0ad9a | e02f5a2e7ef76b79511487cce7199276 | Updates a AutomationExecutionLog Provides an action to update a AutomationExecutionLog, when AutomationExecutionLog id and the new details of AutomationExecutionLog are given | namespace OpenBots.Server.SDK.Api
ApiResponse<AutomationExecutionViewModelPaginatedList> ApiVapiVersionAutomationExecutionLogsViewGetWithHttpInfo (string apiVersion, string filter = null, string orderby = null, int? top = null, int? skip = null); | 0 |
26f88ef13f13eea15d81fd76ce69de6e | 9ed45226340d8e1d59801ae2c6a6c3e5 | Set the starting time of the job passed in parameter to the current time | public class SchedulerBuilder
public SchedulerBuilder setStartTime(Date startTime) {
scheduler.setStartTime(startTime);
return this;
} | 0 |
38a3beeb865ea50f1c2ca339973500a5 | 255842ac85222fc0365728f9d90c2c88 | ! Set or clear the \c CE pin.
\sa pin_CSN() | {
switch (W_RF)
{
case 0:
if (state)
nRF24L01_CE_1;
else
nRF24L01_CE_0;
break;
case 1:
if (state)
nRF24L01_CE1_1;
else
nRF24L01_CE1_0;
break;
case 2:
if (state)
nRF24L01_CE2_1;
else
nRF24L01_CE2_0;
break;
case 3:
if (state)
nR... | 1 |
8512c1803dd6f2deeb020d56add131a0 | 19331b1889d7b34c9dafa59a8cf61254 | 修改AdminLog | {
$info = self::initInfo($data);
$adminLog = new AdminLog();
$adminLog->save($info);
} | 0 |
5d4e9ac8f6acedf0879d9283287bb6b9 | fce2c59eb6529b8a121242047ef2e6e5 | Maps the grid to a $[0,2\pi]x[0,2\pi]$ domain and returns the mesh-grid. | class MockGridLikeIteratorObj:
def grid_to_grid_cartesian(self, grid, radius):
grid_thetas = np.arctan2(grid[:, 0], grid[:, 1])
cos_theta, sin_theta = self.grid_angle_to_profile(grid_thetas=grid_thetas)
return np.multiply(radius[:, None], np.vstack((sin_theta, cos_theta)).T) | 0 |
6180df27fde8db8b03418143f48b42ee | 0dac7b34d7284f179031c17460dba812 | compte le nombre de cases où il y a la place pour poser un scrabble | class Game
case_vide(){
let j = 0;
while(this.plateau[j].i !== 15){
j++;
}
return j;
} | 0 |
cd11345fd5383e22a0c6c506a4e5c33c | 413aec1acac464b6cc48618e81658423 | Set集合中的元素按照元素根据lambda拷贝后的值(拷贝后为Integer类型)进行分组后再拷贝 | List<Employee> list = initListData();
Map<Integer, List<Employee>> groupBy = list.stream().collect(Collectors.groupingBy(Employee::getId));
System.err.println("groupBy:" + groupBy);
} | 0 |
612155cd9d470fb0cc761c890d3cfe44 | 1367c90329526995d8f692e29a01d8cd | Calcule l'efficacite totale du systeme. | float n1, n2;
n1 = (player.equals(PLAYER1)) ? nbPlayer1: nbPlayer2;
n2 = (player.equals(PLAYER1)) ? nbPlayer2: nbPlayer1;
;
return n1 / (n1 + n2);
} | 0 |
f58444275c7c3a9efc071293355785ed | 921eb7d094a01ee82c044ae8a611ef2c | Create a <div> element for the message and append it at the end of the
<body> element. The style rule associated with it makes it the proper
size and puts it in the proper location, except that its horizontal
positioning must be calculated, since it depends on the width of the
browser window. | if (uidl.hasAttribute(Constants.CANVAS_HEIGHT) || uidl.hasAttribute(Constants.CANVAS_WIDTH)) {
this.canvasHeight = (int) uidl.getFloatAttribute(Constants.CANVAS_HEIGHT);
this.canvasWidth = (int) uidl.getFloatAttribute(Constants.CANVAS_WIDTH);
}
String oldStyle = msgElement.getAttribute("style");
int top =... | 0 |
0aefd2a2f4441bfd5370d1d7e3438751 | 54ea27a2de5cac78aedcccc43d8d2d42 | 分用户统计待加入beidou账面的缓存金额
返回值描述如下:
Map的Key为用户ID
Map的Value为对应用户的缓存余额 | public BigDecimal getUserSubAcctsSumBalAmt(String userId)
throws BizServiceException; | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.