query_id
string
corpus_id
string
query
string
code
string
label
int64
1fa8b9a1ad5d9ae30d035be50e71c39d
6e622e272f22dc461b9532b2ee85fd97
Websocket loop start function. It is executed in new thread.
class WebSocketAdapter: def websocket_thread(self): self.worker_event_loop = asyncio.new_event_loop() self.worker_event_loop.run_until_complete(self.websocket_loop())
1
22ed0d77377a6bba2bbf5b8959958f0e
87129c5ac4280cebd45f79175f15d966
Write a {@link RealEstate} as XML into an {@link OutputStream}. <p> The provided object is wrapped into a {@link JAXBElement} before XML creation in order to match the requirements of the schema. <p> This method makes sure, that validation errors do not break XML creation. Invalid entries are not written into XML.
public void dumpXML(OutputStream out) throws PersistanceException;
1
44ab6ff92b59f158326b51d678a74388
ff83cf4c2ee1c3d88fe1677a7f6a2509
Retrieve number of successive errors after which script is forced as disabled.<br> Threshold is common to all scripts.
class Base def breakers_error_threshold 50 end
1
70d01e4b91ca88ab67af688e9d7ccdb2
304eeeb7dd6c76c8e54603becac2307b
岭回归-----------------------------------------------------------------------
bostonData = load_boston() x_train, x_test, y_train, y_test = train_test_split(bostonData.data, bostonData.target, random_state=22) transfer = StandardScaler() x_train = transfer.fit_transform(x_train) x_test = transfer.transform(x_test) liner = Ridge(alpha=0.5,max_iter=10000) liner.fit(x_tr...
1
b5668e4526115622d02912e6c4c07eb8
4a864daf0e90c08aa680b2328750fff0
Mengubah intensitas dengan metode pembagian
class gambar: def intensitaskali(self): new = Image.new("RGB",(self.width,self.height),color=255) pixels = new.load() for i in range(self.width): for j in range(self.height): pixel = self.array[i][j] pxl = list(pixel) pxl[0] *= 1.25 pxl[1] *= 1.25 pxl[2] *= 1.25 self.array[i][j] = ...
0
3f4977710edd41893a74a17494ed92a4
f370d3e622e93e1f2983a71b934b08ba
Checks if two genres are the same
def isGenre(s): return len(s.split('---')) == 1
0
512b429cfa6279b8a53f67b6a64edd13
168ff7535f8c4e051f21104be2f1360a
Get entries filtered by category.
namespace Weblog.Web.Services List<EntryModel> GetEntriesByCategory(int id);
1
ca4aa1e66731541807b449f58a02a452
1bb0cb32ab2c1f3925da35e89614538c
根据条件需要的参数个数来验证条件
class ListModel extends \Business\Stock\Deport\DeportModel protected function _checkParams(&$params) { $this->_checkPageAndCount($params); if (!isset($params["need_fields"])) { $params["need_fields"] = array(); } if ($params['need_fields']) { } else { $par...
0
c2f31e71a8c755555499f7746089bf6b
5a94ac9d448243c7dc08de2867da1940
Patch the specified resource in storage.
class SettingController extends AdminController public function patchSettings(Setting $setting, SettingRequest $request) { return $this->saveFlashRedirect($setting, $request, $this->imageColumn); }
1
49125aafb9f866daf69fdd660b380e36
15477ede0f251185f14324a26a034717
单个数据查询
T queryOne(Id id) throws Exception ;
1
2615a57f56c81debf67ea0412ad4cab5
06cabb1cb6d2a5add3fc5d492307d04a
Removes the test case list at the given index
class Test public function remove($index) { array_splice($this->list, $index, 1); }
1
f29322ee6a31f86cc8108331905f3fa6
f138ddd9be7f00d2093d7fac86876ef3
Purges invisible items from the cache.
for (BlockCacheItem blockCache : cacheMap.values()) { List<Long> itemsToRemove = new ArrayList<>(); for (FroodyEntryPlus entry : blockCache.entries.values()) { if (entry.getWasDeleted() || entry.canEntryBeRemovedFromCache()) { itemsToRemove.add(entry.g...
1
2b2c057ef35bbb1e0146b77272806e12
3e0c3bb31b9ce78cd232f9645f33ef4d
Converts an expression from infix notation to the appropriate postfix notation.
namespace GasyTek.Lakana.Mvvm.Validation.Fluent internal class Parser internal IEnumerable<ExpressionNode> TransformInfixToPostfix(IEnumerable<ExpressionNode> tokens) { if (tokens == null) throw new ArgumentException(); var inputTokens = tokens.ToList(); var outputTokens ...
1
af395e4c34f53c6b855ceb9f286102a5
1ad5c680f2a370f0d4d9cbe9bbe542e2
# Update the query cache
class System_crons extends CI_Controller function update_query_cache() { if(ENABLE_QUERY_CACHE) $this->_query_reader->load_queries_into_cache(); }
1
d7a3d18281b64f80d048eeff0270d906
37acd96ae6a80cc3e3e9a70a6bec9d53
获取类型别名对应的类型名
namespace CZGL.Reflect public class TypeDictionary public static string FindAlias(Type type) { string name; bool isExist = ValueTypeAlias.TryGetValue(type, out name); if (isExist) return name; return type.Name; }
0
75b2fdaa414bb8399148ed2644284b34
701bc0de736fe88047d83752dfa3f94f
Toggles the traverableness of tile. Input are screen-coordinates
Sprite* currentTile; int xSlide = x + 8; int ySlide = y + 8; currentTile = display->getSprite(xSlide >> 4, ySlide >> 4); if(currentTile->isSliding() && !isCollision(display)) { currentlySliding = true; if(direction == 0) { y-=2; } if(direction == 2) { y+=2; } if(direction == 3) { x-=2; } i...
0
79ee331aaf3ab23676f5a1ed8f5aa67d
7abb79d2801a51d90511d9140b288e68
Wrangle movies DataFrame.
def load_movies(): df = pd.read_csv(MOVIES_PATH, names=MOVIES_COLUMNS, delimiter='\t') return reindex(df)
1
42747082e91ce1d7ea9f712be3bb0b02
9990f9837730dd36e7aa65e059c1909e
Método que permite registrar una nueva solicitud de amistad recibida.
class InvitacionAmistadAction extends Action public function nueva() { $ret = 'success'; if (! $_GET['id_usuario']) { return $ret; } if (isset($_SESSION['usuario']->invitaciones_amistad_enviadas[$_GET['id_usuario']])) { return $ret; } if (isset...
0
c265c32cb106f2e86c06a3dfb1b3690d
cdeca9e76f1acff49c8a96f3265f10d3
Checks the status of the distributor pills motor
if (Math.abs(flywheelMotor.get()) > 0.05) { return true; } return false; }
0
550620980e831915e2e452653d65a8b0
d6c2bde7388ce895dfcd2144fd9aa56d
Build a candidate list by inserting candidates
candidate.then((data)=>{ $('#candidates').html(null); for(let i = 0 ; i<data.length; i++){ $('#candidates').append(generateDivElemForCandidate(data[i])); } enableVoting(isItVotingTime()); }) .catch((err)=>{ console.log(err); }); }
1
a6a76e850460069002fb6ddcf87fd13a
79f559810dee081fb7db6c90dcc7038e
将表lpc_zfsms_table中的数据插入到表DM_zfsms_table中
def ins_gl_lczx_ls( db,lczx_lst ): for dic in lczx_lst: ModSql.kf_ywgl_021.execute_sql( db,"insert_gl_lczx_ls",dic )
0
8a0bc942f054fa41b1e4effa905507bb
a9359c512c6ed1593b537bd57fe53898
Lee los valores asignados a un bloque continuo de direcciones de memoria.
selection.flash(board) data = [] data.append(0x03) address = "{:06x}".format(int(address)) add_2 = int(address[0:2],16) add_1 = int(address[2:4],16) add_0 = int(address[4:6],16) data.append(add_2) data.append(add_1) data.append(add_0) for aux in range(size): data.appe...
1
034f051e15759793c6ec9eccfaeee215
f68826f2696525f62f92a033f1f976b7
checks if the piece can move in the given direction, dir is an int indicating which
bool can_move(Pacman *pacman, Board *board, Direction dir) { if ((dir == Up || dir == Down ) && !on_vert(&pacman->body)) return false; if ((dir == Left || dir == Right) && !on_horo(&pacman->body)) return false; if ((dir == Left || dir == Right) && !on_vert(&pacman->body)) return true; if ((dir == Up || dir == D...
1
3f5389b1e71806c9d4fed80124904c8e
d3b505e8680b52c7671610ac1e2134db
Sample transitions from all finished episodes Must be called after `self.compute_returns` Yields: env_states: float tensor of shape [batch_size, *env_state_shape] actions: long tensor of shape [batch_size,] action_log_probs: float tensor of shape [batch_size,] returns: float tensor of shape [ba...
buffer = {} for key in self._buffer: buffer[key] = self._buffer[key][:self._current_size] transitions = self._sample_transitions(buffer, batch_size) for key in (['reward', 'next_observation', 'next_achieved_goal'] + list(self._buffer.keys())): ...
0
99849ba22605a563cb66e17c8f84801a
80a54a2e97671b395dd4ce65b0805084
Load haiku.
resp = requests.post( self.ENDPOINT_URL + "/haiku", json={ "username": "松尾芭蕉", "first": "閑さや", "second": "岩にしみ入る", "third": "蝉の声" } ) self.assertEqual(201, resp.status_code)
0
761627c2f089322df70a19c94da1e5c1
5380de29f7c96fae41283d0783a70f43
Function Name: EnableAndDirection_Sleep Prepares the component for entering the low power mode. None None
void CupSensor_1_VDAC8_1_Sleep(void) { if(CupSensor_1_VDAC8_1_ACT_PWR_EN == (CupSensor_1_VDAC8_1_PWRMGR & CupSensor_1_VDAC8_1_ACT_PWR_EN)) { CupSensor_1_VDAC8_1_backup.enableState = 1u; } else { CupSensor_1_VDAC8_1_backup.enableState = 0u; } CupSensor_1_VDAC8_1_Stop(); C...
0
d55f4c21979f694495738d75df94fdc6
be2f813c7c6f013ff2c58d3ebfeba34e
Beam state in beam decoding
class BeamDecoder(Decoder): def decode(self, prob_tensor, frame_seq_len=None): probs = prob_tensor.transpose(0, 1) res = self._decoder.decode(probs, frame_seq_len) return res
0
b4419ce6b48504305ce3c50a59283a16
e95d724b8183d362470ce577e4ff3485
Receive Setup config from LEMAConsole
class Lora(): def enterConfig(self): self.M1.high() self.u4 = UART(6,115200) self.u4.init(115200, bits=8, parity=None, stop=1)
0
b26cf5a40fde676b18e71131b454c383
a5326dde60a2d8ecb1314bfd844b37a9
retrieves info for whichever single ellipse is currently being manipulated
public class EllipseLayer extends PlotLayer implements EllipseRegionsModelListener public IPlotPolygon getActiveEllipse() { return _activeEllipse; }
1
0c07832c96dd8eb0df603b057d532abc
9ef1b35ce4a842cbdcf7f84d3c1729ce
查询所有SeckillOrder
List<Seckill> findAll();
0
1282363b967c8ea60c0b6ce4ac8e2f1c
a9dd625655cb80579c2fe4858e65436b
delete benchmarks that no combination of parameters solved.
for benchmark in ['400.perlbench','401.bzip2','403.gcc','429.mcf','433.milc','444.namd','445.gobmk','450.soplex','453.povray','456.hmmer','458.sjeng','462.libquantum','464.h264ref','470.lbm','471.omnetpp','473.astar','482.sphinx3','483.xalancbmk','998.specrand']: name = benchmark.split('.')[1] if be...
0
467b8abcc626556c3770c57fbaa7f691
39595af77a29720fbb825372d88b54c3
@brief Function for handling a CoAP request for test results.
static void coap_response_handler(void * p_context, otMessage * p_message, const otMessageInfo * p_message_info, otError result) { (void)p_message_info; if (strncmp(p_cont...
0
867cdf84766942a054ba34dd72439b39
b2498fca42349193e921bc9794d458b5
Build the cache table of "is detected" values for in gel lanes, returning the table's name once it's been built. The table maps from a _GelLane_key to a 0 (ambiguous, not specified), 1 (no), or 2 (yes) flag that can be sorted by priority in descending order.
spgGetCache(Relation index) { SpGistCache *cache; if (index->rd_amcache == NULL) { Oid atttype; spgConfigIn in; FmgrInfo *procinfo; Buffer metabuffer; SpGistMetaPageData *metadata; cache = MemoryContextAllocZero(index->rd_indexcxt, sizeof(SpGistCache)); Assert(IndexRelationGetNumberOfK...
0
397102834c709e8cbc065a499d210741
d8349b831e4694f1c1ea5d071d623d0b
renvoie la valeur en hexadécimal d'une trame envoyée par un capteur identifié par son id
String hex = "0x"; String tmp = ""; for(byte singleByte : this.id) { tmp = Integer.toHexString(singleByte); if(tmp.length() < 2) { tmp = "0" + tmp; } hex = hex + tmp; } return hex; }
1
39b20f0b09dc6dea90332fba20ccaa9a
fa8410cabdb8d70ccaaa5cc235dc749c
obtiene el total de fichas publicadas
public class FichaSeleccionada : MonoBehaviour public static int GetTotalFichasSeleccionadas() { return totalFichasSeleccionadas; }
0
ce9f6fdb374c93e16ed6e70ae46ec573
615b0509a4296fb05df8ba844f3d1b6b
Create an error representation between two full states.
return { tree: { error, children: [left.tree, right.tree] }, error: left.error || right.error || !!error, }; }
1
d917ab6f15800adc8e683651c9ba97cb
4fe0bdb84c0cb4ceac88c52f676b68bd
Find the last index of the specified item in a sub-range of this collection. Start looking with the item at <paramref name="startingIndex"/> and work backwards considering <paramref name="count"/> items.
namespace System.Collections.Generic [DebuggerTypeProxy(typeof(CollectionDebuggerView))] [DebuggerDisplay("Count={Count}")] [Serializable] public class List<T> : IEnumerable, ICollection, IList, ICollection<T>, IEnumerable<T>, IList<T> public int FindLastIndex(int startIndex, int count, Predicate<T> match) { ...
1
3f196ed30b216fae51c71792a1ad07d6
95128a814b371231d0288a4062ee5420
This routine opens the overscan parameters table, finds the columns that we need, and gets the total number of rows in the table.
static int OpenOverTab (char *tname, TblInfo *tabinfo) { extern int status; int nocol[NUMCOLS]; int i, j, missing; char *colnames[NUMCOLS] = {"CCDAMP", "CCDCHIP", "BINX", "BINY", "NX", "NY", "TRIMX1", "TRIMX2", "TRIMY1", "TRIMY2", "VX1", "VX2...
1
6fbbfb54742f071ee4e69b9cdef6c557
854e3ab15b472bbae69388978a65c43e
<p> Sets the <code>unitName</code> field. </p>
@MappedSuperclass public abstract class BaseMenuItem extends BizObjectBase public void setUnitName (java.lang.String unitName) { this.unitName = unitName; }
1
12cebf64fab3c1a11c3c933be7a9ae14
cd2ee47f5e3b53d459d03951488f0d42
查询这个组的所有的模板
public List<TemplateModel> findByGropNo(String gropNo);
1
93b656d7571253282e4724e8604b14f7
8944177a6dce7c4974c4c1b0feeadc1a
Instantaneously simulate that the object was touched.
class DeviceView: def touch(self,duration=0.05): (x, y) = self.getCenter() if DEBUG_TOUCH: print >>sys.stderr, "should touch @ (%d, %d)" % (x, y) self._device.touch(x, y, duration=duration, wait=0)
1
5952f013af7ca3c815c576e9ff3f05b3
e7fb8343e58edcbe07d800ec5f6b61b0
Reads an XSP-Config-file
public FPAConfig readFPAConfig(String fileName) throws ReadXMLException;
0
832b7dba241d2e6f576ae5c7913ae1de
0274ff08b34b7bd76ead8ad8aec812b2
Returns the value of the '<em><b>Shear Area Z</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Shear Area Z</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
public float getShearComponent();
0
8314eb6f75cb0138a6220684fdbd555e
c9f1ca48c7bf640c393f3d3840d020ee
returns array of the jersey numbers for a team
def get_wicket_delivery_numbers_array(player): ipl_matches_array =np.genfromtxt('data/ipl_matches_small.csv', dtype='|S50', skip_header=1, delimiter=',') return np.array([x[11] for x in ipl_matches_array if x[20]==player])
0
cb882af5a54c3b7518a1fe4aa69ba41f
a6f76a86c3771bfa5f2ef688bfff281f
Gets the given point from a point segment in world space
{ int segmentStartPointIndex; if (t >= 1f) { t = 1f; segmentStartPointIndex = Points.Length - 4; } else { t = Mathf.Clamp01(t) * SegmentCount; segmentStartPointIndex = (int) t;...
1
350d87801971467e1723d98796dfde35
f6258ec59258f7925c4f01235c6c83e9
GOOD: escaped.
func TestHexUnescapeOnInvalid(t *testing.T) { for _, s := range []string{ "0x68", "_0x68_", "__0x68_", "_0x68__", "__1x68__", "__0y68__", "__0xag__", "__0x8fffffff__", } { got := HexUnescape(s) if got != s { t.Errorf("%s: got %q want %q", s, got, s) } } }
0
855c6d192bf679266e1d8f20605f0aed
cd21bce47fb2f1296fbec008893dd418
设置 年收入-保证人
public class Sur0001s01Dto extends PagingBaseCondDto public void setGuaranteeAnnualBudge(String guaranteeAnnualBudge) { this.guaranteeAnnualBudge = guaranteeAnnualBudge; }
1
03aaa4f61c29a81d493fcb701198779e
41b9f33f3d33553783df02538f4c41d2
Returns the PREDICTED length of the stream in question (depends on the Fish)
public class RayNav750 extends AbstractSentence public int getEstimatedLength () { return ESTIMATED_SENTENCE_LENGTH; }
0
7677ea91c4505a96126288c44d510039
0b0f957ebe3166e011c4beae6aeb8718
Вычитает из значения поля balance значение поля hold, обнуляет значение поля hold и сохраняет запись account
def refresh_holds_account(): Account.objects.filter(hold__gte=0).update( balance=F('balance')-F('hold'), hold=0 )
1
b15c47959130587bae2ae7e4f7a54ec3
932bcbb310d6279613814b528a4ad5c3
取得最近的订单model
{ if ($this->orders()->exists()) { return $this->orders()->latest('created_at')->first(); } return null; }
1
8aea59fd5758d8daa6ccd59fef79f90e
090cc038f149fe5acc709a1d5da07b5c
retrieve a random ingredient
def get_ingredient(fillingType) config = YAML.load_file('sandwich_fillings.yaml') fillingsList = config[fillingType] if (rand(2) == 1) ingredient = fillingsList[rand(fillingsList.length)] else ingredient = nil end end
1
31e9f2ca69fcc509e59a99682f71e514
7f1d749efd9849b27ea21a1e553ecaa4
This function should fill up the CurrentGameSet with the approrpriate type of images and Game Objects
class UI(): def __setWorld(self): level = self.__world.getLevel() world_data = self.__world_service.getInitWorldData(level) world_object_size = self.__world.getObjectSize() world_start_y = self.__world.getStartY() wall_image = pygame.image.load("image/brick_wall.png") r...
1
79118f3a676f65fc61f9c4f3b3e3fb94
a70f15bc8070164a8e41defd9c2a5239
返回当前座位图
class Booking public function getSeatMap() { return $this->seatMap; }
1
d74ebcd3a5ee0d6d70a5302b2de0419e
c0c38802e1c808b2c08604070276e544
実行中の命令を走査し、新たに完了した命令が無いか調べる
namespace AutoBrowser public partial class Form1 : Form private void command_BreakLoop() { int temp_index = commandIndex; int loopcount = 0; while (temp_index < commandMemery.Length) { ++temp_index; if (CodeAnalysis.getCommandSt...
0
759df89f43d66b6d29870be4b00cd483
33c11a5c91afbe184bb2e9a6033bd721
Return the string representation of ShareTensor.
from crypten.debug import debug_mode share = self.share plain_text = self._tensor.get_plain_text() if debug_mode() else "HIDDEN" ptype = self.ptype return ( f"MPCTensor(\n\t_tensor={share}\n" f"\tplain_text={plain_text}\n\tptype={ptype}\n)" )
1
6ae0dae306e095aa0f00ba9f6e355b8c
03ba2d6865659174533805359bd26049
返回MultiValueMap的不可修改视图.
public Map<String, String> toMap() { return Collections.unmodifiableMap( _values ); }
0
26a85b9bc7dbd223e43b908ccafaabc3
493b2f79915ddf1dec57a42982742367
多条微博分析
url1='https://m.weibo.cn/status/' for url in urls: response = requests.get(url,headers=headers,proxies=ip) for sj in response.json()['data']['cards']: try: text = sj['mblog']['text'] result = re.sub('<a href.*?"surl-text">',"",text) re...
1
7e719d74b62dc178043548fce4f4401d
ee83f58bc7e3113fa396a138be38cf5a
Cannot create primary key varchar with string length greater than 255.
namespace Aurum.Tests [TestClass] public class CrudTest [TestMethod, ExpectedOracleException(2290)] public void TestSimpleConstraintException2() { SimpleConstraintClass o = new SimpleConstraintClass(); o.Value = 5; o.State = "State3"; o.Save(); }
0
43a7e9635cb21d6a2784bc0a2cf0aaec
87cf98698529a012af47cead35d6865b
Displays uniswap pools by volume. [Source: https://thegraph.com/en/]
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-19T09:56:11.979115Z[Etc/UTC]") public class UniswapV3TokenDTO @javax.annotation.Nullable public String getVolume() { return volume; }
0
ae9ee14b93148c5839653dcd860597c4
0c9f1d8118af4108e31cf7e3608f8a84
Returns an array of annotation objects for a task with the given id Created by: Glen McNeur Last Update: 18/4/2016
export class StudyDataService getAnnotationByID( studyID: string, chapterReference: string, annotationID: string ) { return this.afs .collection('studies') .doc(studyID) .collection('annotations') .doc(chapterReference) .collection('chapter-annotations') .doc(annota...
0
f7301cb260c29de8af632157025e6ff7
1916596d443dc0be1b9aabac2cb6f4b4
确认请求是否正确
def verification_request(): input = web.input() signature = input.signature timestamp = input.timestamp nonce = input.nonce tmp_str = ''.join(sorted([TOKEN, timestamp, nonce])) tmp_str = hashlib.sha1(tmp_str).hexdigest() if tmp_str == signature: return True else: return F...
1
19ac985bc4d5ad9f7af9b63e919bb66f
570318fc894a53801fec6a0553063c73
获取默认不进行任何验证的证书管理器
return arrayOf(object : X509TrustManager{ override fun checkClientTrusted(chain: Array<out X509Certificate>?, authType: String?) { } override fun checkServerTrusted(chain: Array<out X509Certificate>?, authType: String?) { } override fun getAcceptedIssu...
1
78dbe87141e98fda3a1eed8556b80753
5f5c012c2a27f4922cb5ae2e8975d1e7
检测同一监控区域Id对应的同类联系方式下,是否有使用相同号码的记录
@SuppressWarnings("unchecked") @Controller @RequestMapping("/myorder/orderDetails") public class OrderDetailsController @ResponseBody @RequestMapping(value = "/check/repeatMobile", method = RequestMethod.POST) public Map<String, Object> checkRepeatMobile( @RequestParam(value = "contactId", required = true) String ...
1
b5d4765bf481bc67bb3042feacaac180
10a1ed657366b228b5acae5b81249de2
Is address within text region?
os_addr_is_text(uintptr_t addr) { extern void *__text; extern void *__etext; uintptr_t start = (uintptr_t)&__text; uintptr_t end = (uintptr_t)&__etext; if (addr >= start && addr < end) { return 1; } return 0; }
1
16d03a6aeed50b60fc248e0f9434c2ae
44ded14afdefac826287d5e4a4119f86
transforms and dumps the translation strings into config/locales/template.yml
def dump_translations(): parser = get_arg_parser() args = parser.parse_args() parse_required_switch_pairs(args) languages_to_extract = SUPPORTED_LANGUAGES if args.all_languages else [args.language] for lang in languages_to_extract: dump_file_name = f'{args.target_dir}/{lang}.json' if args.al...
0
885664189d343c4c18d7d3d41d7111db
be58f2919f9a9163496b5730decfc788
获取当前日期 YYYY-MM-DD
@Slf4j public class DateUtils extends org.apache.commons.lang3.time.DateUtils public static String getDate() { return dateTimeNow(YYYY_MM_DD); }
1
060a77df0fb47a53209941b7b6a6b692
7543d92632593b8171736746429509c2
Metodo para obtener todas las animaciones del concurso
ArrayList<MotionAnimation> getAnimations();
1
58e0116bebec4ac8fe5fdf38fd3cf458
a862334375c403d37d258ba0fda8f983
Unset any DOMINO_USER_API_KEY var from the environment. If the API key is present in the environment, python-domino uses it automatically, which will affect some negative testing.
_environ = dict(os.environ) try: if os.environ.get("MAPBOX_API_KEY"): del os.environ["MAPBOX_API_KEY"] with pytest.warns(UserWarning) as record: d = Deck() os.environ["MAPBOX_API_KEY"] = "pk.xx" d = Deck() assert len(record) == 1 finall...
0
110eba95c9b7b88e4a4e7471c72f9191
58c54a7ba5eb1c25cc04f0b4b64c4125
View all transactions by block hash
$cursor = $this->dbs['transactions']->find(array("blockNumber" => (int)$block)); $result = array(); while($cursor->hasNext()){ $res = $cursor->getNext(); unset($res["_id"]); $result[] = $res; } return $result; }
0
4815b5acd553660ace88fedffb923054
5252431d15edf23786b4b4d22aaa9858
interrupt service routine for Timer 2 --> TIMEOUTMODE
{ if(mode == 1) { if(LED_TIMEOUT_OFF > 0) { LED_TIMEOUT_OFF--; if(LED_TIMEOUT_OFF == 0) { BLUE_LED = 0; GREEN_LED = 0; } } if(LED_TIMEOUT_ON > 0) { LED_TIMEOUT_ON--; if(LED_TIMEOUT_ON == 0) { ...
1
133487ff5d99abc5464166545941f143
80946b3e9565347b75bd5bad6230e9dd
syntax check for macros from compensated_sums.h, no code generation expected
let foo = 0u32; let _ = prefix_underscore(foo); in_macro_or_desugar(foo); in_struct_field(); let _ = non_prefix_underscore(foo); let _ = unused_underscore_simple(foo); let _ = unused_underscore_complex(foo); let _ = multiple_underscores(foo); non_variables(); }
0
4f93bce34508fe43f16013faf066e02e
e99974a9a1aa1534dcf406ec0d0f4e86
Sets Book title in View
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); getActivity().setTitle(" Mr. Favor"); }
0
884985c5088fa9c58e856ed6f8a07ba3
95cef43bb67e26ab7f6f35e2a7e395b6
Build() A partir do grafo de interferências, cria os conjuntos que serão uma nova representarão deste grafo, com os quais o algoritmo de alocação de registradores trabalhará.
public class Group public void build(List<Group> groups, int whoIAm, List<Character> alphabet) { for (Entry e : entrys) { for (int i = 0; i < alphabet.size(); i++) { char ccha = alphabet.get(i); int whereIdGo = -1; for (SimplifiedTransition...
1
5e3338b40d53b03f4bbe9f891cf27500
81a249d3d48d226176db6136f502b38d
GET: SysSamples
namespace BloodDonorApp.PL.Controllers public class SampleStationController : BaseController public async Task<ActionResult> Index(int page = 1) { var filter = Session[FilterSessionKey] as SampleStationFilterDto ?? new SampleStationFilterDto { PageSize = PageSize }; filter.RequestedP...
0
2f2f2b41fbbfe82f9d635d43d98fd403
5347e74a8074bddca19189b52c407596
Creates a styled string representing this instruction.
class Styled(str): def __str__(self): return self.TEMPLATE.format(self._join(*self._codes), self.data)
1
fdf685a0a21460071e1912f79b366810
76eddefa06885549de025e4012ca5c63
查询单人封面
class Mychat extends Controller{ public function getSingleHead($id) { $head = Db::name('user')->where('id',$id)->value('headimgurl'); return $head; }
0
9f3cde6f6f118e43ee5b393f4aac07a5
46064098f7d42aa41da1f0120c9b56c5
Returns the cause of the failed operation if the operation has failed. {@code null} if succeeded or this future is not completed yet.
Throwable cause();
1
3de0c7bacec9b777908ddf59a7feae4d
183116c08d57c1d45c1e08abbe677aca
Lista todos os pedidos de auxílio sem resposta
$control = new Cadastro_clientesControl(); $response = $control->listarNaoIsentos(); echo json_encode($response); }
0
abb02be31d98a79b5674133df7f4d865
339bbabaa99b4b16ca6ae367a1322a53
Update the discard filter text field.
const String& filterText) { if (mTextFilterEnabled && !filterText.IsNullOrEmpty()) { } return NOERROR; }
0
369ca23e47879288557fdbbdb3e6edb3
c51a036592d0dca2d50ee4d4f0433bf9
传入指定页数返回最新排序文章
def get_articles(conn: Redis, page: int, order='score:'): start = (page - 1) * ARTICLES_PER_PAGE end = start + ARTICLES_PER_PAGE - 1 ids = conn.zrevrange(order, start, end) articles = [] for id in ids: article_data = conn.hgetall(id) article_data['id'] = id articles.append(ar...
1
ba4001a4c7a18f3c04561bff41eab907
88a5d3bd3891be526456f152a5a52dd7
Grants a lock on the identified resource to the calling thread (blocking until it is available).
boolean lock(String name);
1
e05f2a5e5227a942d1d775b2af33308f
f586ae411bf42e29a5fe783114b860d1
@brief prints out the correspondence between pre- and post-correction error probabilities for the given ECC function
void es_util_print_solution(mpz_t primes[], gsl_multiset *c, gsl_vector *v) { size_t i, l = gsl_multiset_k(c); unsigned long n; printf("Group: "); for (i = 0; i < l; i++) { n = (unsigned int)gsl_multiset_get(c, (l - i - 1)); if (n > 0) { gmp_printf("%Zd^%d", primes[i], n); if (l - i > 1) printf("*"); } ...
0
569a5bb3f83694baf8088896d749407e
a50f247aa86c323ccf1edcc9f1d8ddee
Returnerer brukeres som er i en gitt kanal
final Collection<User> values = SceneMainHolder.mainScene.users.values(); return values.parallelStream().filter(user -> user.getChannel() == channel) .findFirst(); }
1
85df9914a755f3d1275fdd178aa47157
996ba8e5fe46dbdcf95ec7945195729a
Sets the <code>TabbedFormListener</code> to be notified when tab changes happen.
@SuppressWarnings("deprecation") public class CenterPanel extends Composite implements SelectionHandler<Integer>, IFormSelectionListener, SubmitListener, LayoutChangeListener, ICenterPanel{ public void setFormChangeListener(IFormChangeListener formChangeListener){ propertiesView.setFormChangeListener(formChangeListen...
0
f91a30b6908a5fa0d85340a4978d5504
06e81d8945c6a700f578f67054c4c37a
Gets the "used_in_product_listing" element
public function getIsUsedInGrid();
0
d97fb43757e48dacba13a80fde94b2a8
eeeeb3bfc8c75422f7dc94574743cfe9
Carga un archivo de un path y lo convierte en una lista donde en cada lista se almacena un string con las etiquetas o palabras de un documento Parámetros: filePath -- path del archivo a cargar
def load_label(filepath): return open(filepath, 'r', encoding='utf-8').read().split('\n')
1
db5c4c3fe8920c5a032dc2e874e9cc0c
7c7b6bd93e06db66f4e91bf7897e8369
@brief Enables or disables the specified ADC interrupts. This parameter can be one of the @ref adc_it_t.
{ assert_param(IS_ADCIU_CHANNEL_NUMBER(ChannelNumber)); assert_param(IS_ADCIU_IT(ADCIU_IT)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if(NewState != DISABLE) { MDR_ADCIU->INTEN |= ((uint32_t)ADCIU_IT << ChannelNumber); } else { MDR_ADCIU->INTEN &= ~((uint32_t)ADCIU_IT...
1
dcd24f41a454b21de38de265b87f155d
699c973719932fcdd37dcebb3cdf10df
根据活动id和用户id获取活动信息
@Slf4j @RestController public class ActivityController @GetMapping("/get/activity") public CommonReturnType getActivity(@RequestParam(value = "activityId")Integer activityId, @RequestParam(value = "userId")Integer userId) throws BusinessException { ActivityVO activi...
1
2b730a36d6edbd8f03af9fdab6d9fff2
ef0fcbaff8f40b83a2de4449c1a486c3
Operator converter for hard_sigmoid.
def convert_softsign(g, op, block): x = g.get_node(op.input("X")[0]) dtype = infer_type(x).checked_type.dtype out = x / (_op.const(1.0, dtype) + _op.abs(x)) g.add_node(op.output("Out")[0], out)
0
7a0a5ba97840ed30fdff39528e179c2e
113fb44fe86549e0175fc8a6bb63ad0d
Whether a simple identifier is a class
bool isCIdentifier(const char* id) { if (id==NULL || *id==0) return false; if (!isalpha(*id) && *id!='_') return false; for (++id; *id != 0; id++) if (!isalnum(*id) && *id!='_') return false; return true; }
0
849b65ad32b099dd91506afdd4069277
e837e63d2a28de5d714e0e3bc78006b4
Terminate the current process thread
void exit_kthread() { KILL_CURRENT_THREAD; }
1
33e3309013a8381b821661728ffe7dde
82d0be305f76da0abdf7031c29c6014e
Builds a reader message with command and optional payload parameters
{ List<byte> result = new List<byte>(); result.AddRange(BitConverter.GetBytes((int)cmdCommand)); if (strName != null) result.AddRange(BitConverter.GetBytes(strName.Length)); else result.AddRange(BitConverter.GetBytes(0)); ...
1
81b8d1132b9fc1d64345cd3253a2da48
4d3dcd97113cd54bc764fbebab4eb836
Calculate BBox for the rectangle during drag operation
function resizeRect() { var dragCorners; function getDragCorners(bb0) { return { topleft: function (d, m) { p.x = Math.max(0, Math.min(bb0.x + bb0.width, m[0])); p.y = Math.max(0, Math.min(bb0.y + bb0.height, m[1])); p.w = (m[0] > 0) ? Math.min(Math.abs(self.options.w...
1
58fc50199aea350a1d9c06b2e7da27d8
98d3b380e7e04fcca256c70931feb00d
{EV_APPLICATION_IMP}.on_char
{ GTCX char *l_feature_name = "on_text_mark_changed"; RTEX; EIF_INTEGER_32 loc1 = (EIF_INTEGER_32) 0; EIF_INTEGER_32 loc2 = (EIF_INTEGER_32) 0; EIF_INTEGER_32 loc3 = (EIF_INTEGER_32) 0; #define arg1 arg1x.it_p #define arg2 arg2x.it_p EIF_TYPED_VALUE up1x = {{0}, SK_POINTER}; #define up1 up1x.it_p EIF_TYPED_VALU...
0
33db0e2e8936718bd92cd700a2f0ac91
b8c2dbe424a382887c29775b84ad3de5
Neuen Termin einfügen
try: date_time = datetime.datetime.strptime(f"{date} {time}", self.fmt) except ValueError: await channel.send("Fehler! Ungültiges Datums und/oder Zeit Format!") return if not utils.is_valid_time(reminder): await channel.send("Fehler! Benachrichtigu...
1
dc819b87578fd27702b282a066a1b5d8
559e3205a231c95aa74325ec86ad649e
Write job store data to the store file.
class AbstractJobStore(ABC): def write_file(self, local_path: str, job_id: Optional[str] = None, cleanup: bool = False) -> str: raise NotImplementedError()
1
62b218d781ca933b28cadc86597edfc2
1ab3d58a2e6636028bf2e5b4d5166c1c
初始化,创建相应目录及文件,并将文件内容读取到程序中
func main() { readConfDir() initConf() createHomeDir() getData() createPartDir() }
1
1f72b0d93f6ceee0d659704fbf714492
d0a0eed36ac9bb7556f2e1a546af7480
平仮名の名前でソートしたItemDictionaryを返す
[Serializable] [CreateAssetMenu(fileName = "AllyStatus",menuName ="CreateAllyStatus")] public class AllyStatus : CharaStatus public IOrderedEnumerable<KeyValuePair<Item,int>> GetSortItemDictionary() { return itemDictionary.OrderBy(item => item.Key.GetHiraganaName()); }
1
6cbe8a56f868d558c2941cb7fefe777c
58a9672615388e7f085f52719e76d44d
FUSE function called to get the value of an extended attribute of a path.
int cloudfs_getxattr(const char *path, const char *name, char *value, size_t size) { int retval = 0; char fpath[MAX_PATH_LEN]; cloudfs_fullpath(fpath, path); retval = lgetxattr(fpath, name, value, size); if (retval < 0) retval = cloudfs_error("cloudfs_getxattr getxattr"); else retval ...
1
22e6c2affd3e1ceb3b1634399f9a83db
f3f75ffb3c04bdf5596fad94e06c8eb0
Removes a property change listener for a specific property from this document.
public void removePropertyChangeListener(String propertyName, PropertyChangeListener al);
1