query_id
string
corpus_id
string
query
string
code
string
label
int64
9cda7e256c9bbe0a21eaf3d5233abd10
3256c38985268055d7ca77694b09b129
Convert DIB to Bitmap.
HBITMAP BitmapFromDib ( HANDLE hdib, HPALETTE hpal) { LPBITMAPINFOHEADER lpbi; HPALETTE hpalT = NULL; HDC hdc; HBITMAP hbm; StartWait(); if (!hdib) return NULL; lpbi = (tagBITMAPINFOHEADER *)GlobalLock(hdib); if (!lpbi) ...
1
83854c058bdd7dfb369b559fb08ecd03
c99b95817b876c0e1da2156aac846728
文字列をダブルクォートで囲む。
class Access private fun String.q(): String = "'$this'"
0
e0724f2ae15a6ca3df2c20681f04a908
12a66ce2c2037a62b8d8244c3cd58586
Filters 'get_the_post_format_url' to make for a more robust and back-compatible function. If WP did not find a URL, check the post content for one. If nothing is found, return the post permalink.
function templatemela_url_grabber() { if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ) return false; return esc_url_raw( $matches[1] ); }
0
2a56732277851ea7fec6d000e71d1d6a
a1215dd46cfa7d2805a4242a7b0183c3
设置保留最近通知条数。
{ if (args == null || args.Length == 0) return; MaxShowNum = Convert.ToInt32(args[0]); Reset(); }
1
dc1b73078ec60ce7e53e08da488aa54e
2e2d16201e61c199b2fd7a9aa621fb24
PrettyJson marshals an object in a human-friendly format.
func Stringify(v interface{}) string { b, err := json.MarshalIndent(v, "", " ") if err != nil { panic(err) } return string(b) }
1
59a0a4309a56886d93d589a9537d88be
5cf09c43d1101a29df15678378f04b9e
根据首字母来获取对应歌手信息列表
@ResponseBody public Object listSingerBySingerType(@PathVariable String area, @PathVariable String type, HttpServletRequest request, HttpServletResponse response) throws Exception { RequestClientInfo clientInfo = ApiUtils.getRequestClientInfo(request); Pagination<?> pageInfo = ApiUtils.getReqPageData(request);...
1
fe4a4ce32396f76e535dd2f15577b162
02764c42abf2d8bc1eee14ec9aa97365
根据电塔编号获取电塔信息
namespace ZGM.WUA.WebAPI.Controllers public class CameraController : ApiController public CameraInfoModel GetCameraInfoByTHCId(decimal tchId) { CameraInfoModel camera = cameraBLL.GetCameraInfoByTHCId(tchId); return camera; }
0
b83dbb9d9da624a7cd2b03d6aca90a1e
8de85748005749138665bbad83d61a8b
Initialize the v1 api /api/v1
export default class V1Controller extends Controller protected constructor(container: ServiceContainer, rootPath: string) { super(container, `/v1${rootPath}`); }
1
40c7728c4a47ad6d2f823fe91b8f1abc
0ea7c3f9dfab9eb816e1da23047e8ce4
Hanning window.
if mono: win = np.hanning(n) + 0.00001 else: win = np.array([np.hanning(n) + 0.00001, np.hanning(n) + 0.00001]) win = np.transpose(win) return win
1
e1424f9be53688bba59518ad98c3a684
8ec663a6c571dc2a1a5e0d53fb87a634
A* algorithm to find the shortest path between two generic points.
public class Board public AStar aStar(Coordinate startPoint, Coordinate endPoint){ boolean[][] tempStarBoard = aStarBoard(); AStar root = new AStar(null, 0, getDistance(startPoint, endPoint),startPoint); Queue<AStar> fringe = new PriorityQueue<AStar>(); fringe.add(root); AStar temp = null; tempStarBoard[sta...
1
6d767c7393fd598d2683890c9273d3af
331987432252979b33f2f057f05e7374
switch between starting point and destination
public class SelectCoordsActivity extends MapActivity private class CoordButtonListener implements OnClickListener private void switchButtons(int i) { if(i == 1) { startButton.setChecked(true); endButton.setChecked(false); } else if(i == 2){ startButton.setChecked(false); endButton.setChecke...
1
23ea5f1c1fb5a2a8e50ec5ec4baa3578
ed39c0635daf2b1faee7bc9192769126
Returns the current sample unpacked, iterates to the next one
if self.data is not None: d = self.data[self.__current_pos, :] else: d = self.read_sample(sample_index=self.__current_pos) self.__current_pos += 1 return d
1
ae2bac908006c43a4d9c8a9526bd146d
8ea301a3fe176f852f6a40ba47d9bfcb
生成日志分类的XML文件
namespace HATWidget.Data public class DataManager public void createLogXML(string datapath) { try { XmlDocument xmlDoc = new XmlDocument(); XmlDeclaration xmlDeclaration = xmlDoc.CreateXmlDeclaration("1.0", "UTF-8", null); XmlElement root = xmlDoc.Document...
1
99b95604d775790e725311e8c2bab8c9
aaeb28c306e4b85edcf258845d3d3e56
关闭主菜单
public class AllClickFunc : MonoBehaviour public void CloseAllMainPanel() { AllNeedUI.Instance.mainMenuToggles[0].GetComponent<Toggle>().isOn = false; AllNeedUI.Instance.mainMenuToggles[1].GetComponent<Toggle>().isOn = false; AllNeedUI.Instance.mainMenuToggles[2].GetComponent<Toggle>().isOn ...
1
647271fae2d77fbf21f57fedee92fb5d
c1c80b226ccc404d88cddebc89f5d380
Sets facility id.
@SuppressWarnings("serial") public class VerifyPickSession implements Serializable public void setFacilityId(String facilityId) { this.facilityId = facilityId; }
1
0fc12d4b9155ece3427e902b6906f2b7
285873518a76ee1f80661057aae0869a
Set which Match to use. This can be any positive number, indicating the exact match to use, or <code>0</code>, which is interpreted as meaning random. The number of the match to be used
public class HtmlExtractor extends AbstractScopedTestElement implements PostProcessor, Serializable public void setMatchNumber(int matchNumber) { setProperty(new IntegerProperty(MATCH_NUMBER, matchNumber)); }
1
490ed3cfa39204d5db9c78751cf472e8
45e0dd4b7a5f3b83148fb6691113ce64
Swaps the tiles at the two indices.
{ var request = new SwappingRequest(firstIndex, secondIndex); ExecuteRequest(image, request); }
1
354b193ab8c726464fb66ccea2189c3f
40c9ad7e7fba145ff56ba484bb8658b3
Converts it back to original format.
class ApplicationAcceptanceDataTransformer implements DataTransformerInterface public function reverseTransform($value): Acceptance { return $value; }
1
badc2a74a4a0ffa7960fca26a3d17d83
55c03a71010845fbfd72911b16b41522
对于广播接收的数据做分类处理
public class BroadcastReceiverS extends BroadcastReceiver @Override public void onReceive(Context context, Intent intent) { if("com.example.brdcst_rec.toast".equals(intent.getAction())){ Integer received = intent.getIntExtra("com.example.brdcst_rec.text", -1); switch (received) { ...
1
739fdcbc3c4f5c2b931575b5c6c8ef8e
a5e5451a7e77dde13a16d751fae50055
Returns True if filter is applied, otherwise returns False. Tries to find its argument(s) in request querystring.
class RequiredWithFilter(BaseFilter): def filter_required(self): if self.rule.required_with is not None: return True return False
0
eb5adb71c4a1c0f7a624f796e4b2c1de
425c21b3ef5be081cceb1c785b3779e6
Get clear title without tags
class TagProcessor: def get_content(self): if self._tag_to_process == "title": title = self._soup.title if title: try: title = title.string.split(" ") title = [ word.strip(",").strip("|").strip(".").lower() f...
1
bad13179fa0e513d51279d7aee971b06
4db47efe0bad4f3208996145c024d944
Returns the buy button
@SuppressWarnings("serial") public class MarketView extends JPanel public JButton getWaterBuy() { return waterBuy; }
1
e9371ea47b1840e8b493ab236077d344
b96a4c9d8572763b9bf3ee8d979770d4
Adds the completed selected ballots to the aggregate ballots file.
{ Ballot enteredData = generateBallotObjectFromEnteredData(); try { displayIndeterminateProgressIndicator(); bool successful = await Task.Run(() => groupController.CreateBallotAsync(AffectedGroup.Id, enteredData)); if (successfu...
0
2de02b3262b8b14344031d7348ba531e
6fa1b75b1d1a5f4ca23ba9bb45303311
Удаление вектора скорости и сопутсвующего текста, если таковые присутствуют
namespace Degree_Work class PlotWindowModel : INotifyPropertyChanged internal void DeleteArrow() { if (arrow != null) { PlotModel.Annotations.Remove(arrow); } if (arrowText != null) { PlotModel.Annotations.Remove(arr...
1
b14de47c2d3687bb121ea0eeb93aca8d
f523090bc9548f8d77b772f91e560b4d
Function called from the MainMenu scene to continue the most recent save
{ sceneToContinue = PlayerPrefs.GetInt("SavedScene"); if(sceneToContinue!=0) { SceneManager.LoadScene(sceneToContinue); } else { New(); } }
1
91e6c16659a422a78cb827357fcbd3aa
8c6cdd854f59c70f1f01b468cda4575f
bind threads to processes
def connect_threads(self): pass
0
fff785affb91d16a31206f2524ebfbcd
c2c25ad3fe4e17ad0a75a75966bf0eb3
> Test when no intersection between point and circle.
l1 = Line2dCy(Vec2dCy(1, 0), Vec2dCy(-1, 0)) l2 = Line2dCy(Vec2dCy(0, 1), Vec2dCy(0, 0.5)) self.assertEqual(line_line_intersection_cy(l1, l2), (False, None))
0
4e37f65a0dc1a9a82bd5063ede450eb9
79473ba104e91cab75918054202e3a08
Run a task using a base path and parameters
class BaseTask(AbstractTask): def __init__(self, _type: str, address: str, endpoints: Callable): self._type = _type self.address = address self.endpoints = endpoints()
0
bcec2ca89d5e408ce069ed75143357e1
ee95e82206976e79d315927a0e1ee068
Update form counters
class UserAuth function updateLoginCount() { global $siteData, $site; if ( $siteData[login_form_id] == 0 ) return; $loginFormID = $siteData[login_form_id]; $submitCounter = $this->db->getOne( 'select counter_submit from ' . FORMS_TABLE . " where id = '$loginFormID' and site_key = '$site'" ); $submitCounter...
1
6eb4a5a5ad1189b75b9cdd871134412f
999cc16825e17f33c29576dc2e51e277
Add to current x number between -radius and radius
max_val = self.get_stepwise() val = self.current_x + dval if val < 0: val = max_val - dval if val > max_val - dval: val = 0 self.current_x = val
0
fb05f120ee31fab3d288c45bcb0809af
39cad2fb675abf5b5f94d4da6ec4fb22
根据键获取Byte数组
public class RedisTemplate public byte[] get(final byte[] key) { return execute(new RedisCallback<byte[]>() { @Override public byte[] execute(Jedis jedis) { return jedis.get(key); } }); }
1
ce39e4021cca4aaba5d74c1da7911c52
7f61448ad6da3ef0f9cb03f40c5be655
According to the documentation modifying the text from this method is an error so we don't need to worry.
cases like (1)
0
11bd3847c159c2748bd997662a6f0daf
f7918d7637963dd5f21044c16325626b
Parse an XML string and extract a map of all attributes
public function getAttributesFromXml($xml);
1
c2b15f55a7710450cc07ab16fd3c2e1d
043dc11c785aef621a0fbda2180939e9
Use linked list to store the index of frames, the order of the list is the order of victims. The larger index, the more recent frame.
deque<int> sorted_frames; sorted_frames.push_back(frames.back()); frames.pop_back(); int front_nearest = -1, back_nearest = -1; double front_absdiff, back_absdiff; while (!frames.empty()) { if (front_nearest == -1) { front_nearest = NearestFrameIndex(sorted_frames.front(), frames); front_abs...
0
8b1a4b3eaaf6a092e38a13cefcfb9d34
8a55fb4edcd9989d59e0122cf63b7f4e
Tells if this note letter can be assigned with any pitch modifier to a semitone distance to C. Ex.: D can be assigned to 3, because D# is 3 semitones above C. On the other hand, A cannot be assigned to 6, because only 8 (Ab), 9 (A) and 10 (A#) are assignable.
(bar, beat) = index cf_note = self._cantus[bar] if self._is_unison(note, cf_note) and beat == 0: return False prev_note, next_note = self._get_prev_note(index), self._get_next_note(index) prev_index, next_index = self._get_prev_index(index), self._get_next_index(index) n...
0
777c806845819631b13adcc012422861
6738ff892b23821519eb9cb380e796e4
修改宠物属性
class PetController static async updatePet(ctx) { let data = ctx.request.body; if(data){ try{ let result = await PetModel.update(data); ctx.response.status = 200; ctx.body = { code: 200, msg: "success", ...
1
ca5bc9516beecb08dfb06f0f36741589
c5768771347b4487e916ca6d386e54d9
设置此窗口 y轴正位移 unit : px
namespace EarthView namespace World namespace Spatial namespace Display public class PictureFillSymbol : EarthView.World.Spatial.Display.FillSymbol public void SetOffsetY(double value) { EarthView_World_Spatial_Display_CPictureFillSymbol_setOffsetY_void_ev_real64(this.NativeObject, value); }
1
ec22394c76c625389f3a0c352bdaf683
9f92f433277db39a2870213ae129b15a
检测是否有安装安全芯片
const devices_list = await navigator.hid.getDevices(); for (var i = 0; i < devices_list.length; i++) { if (devices_list[i].productName == "CMSIS-DAP") { console.log("CMSIS-DAP启用 :", devices_list[i]); document.getElementById('consoleinfo').innerHTML = "⚠️警告:设备CMSIS-DAP刷机功能开启" + '<...
0
1ab269e739ba4bf8c3d71fb89c772d84
b853a1e58cf0ee7b087313259e9bdb53
栅栏密码解密(未知栅栏数,自动计算,返回第一个可分的结果)
class ZhaLan: def decrypt(self, text_encrypted): if len(text_encrypted) % self.num != 0: raise RuntimeError("待解密的密文应该是栅栏数的倍数") text_decrypted = str() groups = ZhaLan.__divide_group(text_encrypted, len(text_encrypted) // self.num) for order in range(len(text_encrypted) // self...
0
64f681b06e084f5791a55ae8c54d0c70
09b034a17d73d19ddab76b04d519dc33
取得各科的平均值,总分平均值为各科平均值的和
namespace Class_Grade class STD public void GetTotal(UInt16[] num) { total = (num[0] * seatwork + num[1] * homework + num[2] * experiment + num[3] * exam) / 100; }
0
060f3da708cfa3392e0642e5039dce4b
efbfb5e5e4bd1cde7311117e24f03916
find first selected extruder
unc_pl *p1u = NULL; for(p1u = crt_head; p1u->p_gcom->gccommander != fbel && p1u != NULL; p1u = p1u->next); if(p1u != NULL) return p1u->sockfdex; return -1; }
0
161f1f1b794c7e095372b6c114c09cfa
1643dd23cc981df29a9c6a273a04ab5b
登陆后将登陆前提交的反馈信息绑定到该账号
class User extends Model function submitFeedback($token,$content){ $user = User::where('open_id',$token)->find(); $user->feedback = $content; $user->save(); return 0; }
1
30b3db2bf81a6c4b6d7c76629830ed3f
50c68846ae97855842bf40334aad0e46
Sets the uid to the incoming integer value.
public class AddReviewActivity extends JacksonSpringSpiceSherlockFragmentActivity implements OnSignedInListener public void setUid(String uid) { this.uid = uid; }
0
afd9990184ad773c54986b785d106936
66211d9f6d226ec18aaeceb77bba3f03
Get contribution date.
$data = ''; if(!empty($contribution_day)){ $data = date('Y/n/j', strtotime($contribution_day)); } return $data; }
1
3bfc6b2bcc02500cb66231b8ad1e1c95
1fc619b8ef084420c867838e1581806f
Postcondition: Returns the device's basic information.
class BlueAir(object): def get_info(self, device_uuid: str) -> Dict[str, Any]: return self.api_call(f"device/{device_uuid}/info/")
1
068ce21d95dba195b908cbc15479c995
5a8769750f5a8d5e70319736c2380e5e
Returns language code for the given command data.
{ $languages = Languages::getAvailable([ 'area' => $this->area, 'include_hidden' => $this->area === 'A', ]); $lang_code = $this->safeGet($params, 'lang_code', $default_languade_code); if (isset($languages[$lang_code])) { return $lang_code...
1
bfdfb9fff652835e04ebdb88e7d49cf0
655f2e3f1c04aaf1e496f064290b671d
アクセス認証を考慮したWeb APIのClientを生成します。
{ var webClient = new WebClient(); if (parameters != null) webClient.QueryString = parameters; if (!string.IsNullOrEmpty(apiKey)) { webClient.QueryString["key"] = apiKey; } else if (cache != null) ...
1
6f3ec0c62c01603478c139b3056e3dc6
920ed954dcb65bb33f07196c024f2924
双向BFS 时间复杂度为O(M * N) M为字符长度 N为wordList 大小
if (!wordList.contains(endWord)) { return 0; } int len = beginWord.length(); HashMap<String, List<String>> allComboDict = new HashMap<>(); wordList.forEach(word -> { for (int i = 0; i < len; i++) { String newCommonWord = word.substring(0, i...
1
9929a56394a3343e435e9eefd7ea9b14
7ab3bee9d54ca76df903f607c4d307cb
Make sure that the judge works correctly for a correct C++ program.
with open("examples/project_11/Seven/Main.jack") as f: src = f.read() ast = project_10.parse_class(src) asm = AssemblySource() project_11.compile_class(ast, asm) expected = """ function Main.main 1 push constant 1 push constant 2 push constant 3 call Math.multiply 2 add call Ou...
0
e98be14788e9dc2d73551601d05783e5
2e68db037df482cb285a2727a0071b32
reads file at given test filepath
def load_file(name): path = os.path.abspath(os.path.dirname(__file__)) filename = os.path.join(path, "tests/input", name) with open(filename, "r") as f: data = f.read() return data
1
cddc7f388739e9773873043a9126c22d
3fdea9d0e81fd9b51ce71aca090d54f6
Returns a new object of class '<em>Rule Ref</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
@Override public LeafElement createLeaf(@Nonnull IElementType type, @Nonnull LanguageVersion languageVersion, @Nonnull CharSequence text) { if(type == ANTLRv4TokenTypes.TOKEN_ELEMENT_TYPES.get(ANTLRv4Lexer.RULE_REF)) { return new ParserRuleRefNode(type, text); } else if(type == ANTLRv4TokenTypes.TOKEN_ELE...
1
3b4931c5ce0ef239e1f6cc70ae65c2c4
09e2304f49b20506fb6101bf0981d6b0
Returns the name of the role the user would prefer to have.
public class Credentials public String getPreferredRole() { return preferredRole; }
1
ca8e698a1e492b09ad1e1a924e24a745
e22e2c9ecdcbad8d9133a4d99fe9f8eb
Calculate the n-th moment of histogram about the value c.
class Circllhist(object): def moment(self, k): return ffi.C.hist_approx_moment(self._h, k)
0
97806a0fa9b4f21982b280468532b2bb
fb6199b586a3d5e63a60954a3c19a146
how to convert the format of seconds to minutes and seconds MM:SS
@RestController @RequestMapping("/improvisation") public class ImprovisationController public static String secondsToMmss(int duration) { return String.format("%02d:%02d", duration / 60, duration % 60 ); }
1
f63548318ac89e17a5eab9d53ec24985
c8924e02297495107e6e749251acb34e
если уже отправлял ранее
if (!Yii::$app->user->isGuest && \Yii::$app->request->post()) { if (Yii::$app->request->get('id_client')) { $id_client=Yii::$app->request->get('id_client'); } else { $id_client= Yii::$app->session->get('id_client'); } $document=next(\Yii::$app->request->post())["document"]; $email=next(\Yii::$app...
0
1b4eec9a0592934d0fc2e323c6aed964
4975f4ec21c751915bbfd063a0595f53
slave : Address of the slave to which write is to be performed addr : Offset address at which data is to be written addr_size : Number of bytes of offset data : Data to be written to the specified offset 0 on Success, -ve on failure
twi_ret_t twi_master_addr_write (twi_t twi, twi_slave_addr_t slave_addr, twi_iaddr_t addr, uint8_t addr_size, const void *buffer, twi_size_t size) { return twi_master_addr_write_timeout (twi, slave_addr, addr, addr_size, buffer,...
1
4d5da574135cfc16a704812e6eb182f4
e7b3741eb5f0532403ee9d7e3c924dd5
Selects subset of training data to get balanced classes
HOME = os.getcwd() mndata = mn(HOME+'/Total_Dataset') mndata.select_emnist('byclass') trainingImages, trainingLabels = mndata.load_training() testImages, testLabels = mndata.load_testing() selectedTrainImages = [] selectedTrainLabels = [] selectedTestImages = [] selectedTestLabels = ...
0
1d6b0d147d144be5f3edd334d45a1f9f
65e7a1fa32fa48d010c1dd68c01bdd36
Returns the value of the '<em><b>Schedulers</b></em>' containment reference list. The list contents are of type {@link com.misc.touse.moplaf.tousescheduler.ToUseScheduler}. <!-- begin-user-doc --> <p> If the meaning of the '<em>Schedulers</em>' containment reference list isn't clear, there really should be more of a de...
namespace Amazon.MWAA.Model public partial class CreateEnvironmentRequest : AmazonMWAARequest internal bool IsSetSchedulers() { return this._schedulers.HasValue; }
0
8fc2a5d71d81af5d84afa4cfe706e70e
075d6978b9653a1d38edd67bd64dac20
\brief Set server's callbacks
{ SILABS_BLE_LOG_FUNC_ENTRY_INFO( "%s", "" ); BTStatus_t xStatus = eBTStatusParamInvalid; if( pxCallbacks ) { pxGattServerCallbacks = pxCallbacks; xStatus = eBTStatusSuccess; } SILABS_BLE_LOG_FUNC_EXIT_INFO( "xStatus=%d", xStatus ); return xStatus; }
1
5ce33d1a78b40ee343f3e4e56236625d
f5f3c0872c597bfef40542f6dce66312
Convert chess coordinate into coordinate on screen
function whichSquareFromCoordinates(boardProps, x, y){ let squareSize = boardProps.squareSize let originX = boardProps.originX let originY = boardProps.originY let col = Math.floor((x - originX)/squareSize) let row = boardProps.rows - Math.floor((y - originY)/squareSize) let rank = row let file = alphabet...
0
95f9802a80a819dbf5d66a18fcacb21e
cb035c28b64ef5834dd7a0832f3acdc0
Opens a dialog and starts listening to file change events
class PreprocessDialog(QtGui.QMainWindow): def on_actionOpen(self): fileDialog = FileSelectionDialog(self) fileDialog.fileChanged.connect(self.on_FileChanged) fileDialog.show()
1
caf6f61ef292b292d0abd6ed55707826
fe5df13d5eae4d68c3ebce4534648833
saves the user's address to the database
{ var u = GetUserByUsername(username); u.Address_Json = adress; db.Users.Update(u); try { db.SaveChanges(); return true; } catch (Exception) { ...
1
1f57c480b50a5f7e1d6e91f90d705b64
fa6baca0befffe045da2a0174d5f141f
Function to replace stars with zeroes
def cleanStar(stars): star = re.sub("[^1-9,]", "", stars) if star == u'0': newStar = -3 elif star == "0,5": newStar = -2.5 elif star == "1": newStar = -2 elif star == "1,5": newStar = -1.5 elif star == "2": newStar = -1 elif star == "2,5": ...
0
d3b79a4f826e62b6a367c52577bb738f
cbc34509f8b1de5c37399520de4827e6
[5.1c]
Q_5step_2pi.1_step4b <- function() { Q= Q_5step_2pi.1_core() iDigits= 4 qtype= "num" dZ= round(qnorm(sample(81:99, 1)/100), digits = 2) if (Q$direction == -1) dZ=-dZ Text= c(Q$setting$TotalIntro, sprintf("You test $H_0: \\pi_1 %s \\pi_2$ using a test statistic $z = (p_1 - p_2)/\\sqrt{p_c(1-p_c)/n_1 + p_c(1-...
0
83a8af422cb1b2eda58b2a35d9a8b981
edc5c3e0dbaba7773ce4b6577da714e9
Sets the CIty Params for Complaint on Index, New and Create.
this.cignalinksGroupAddressForm = this.formBuilder.group({ dynamicText: ["", {updateOn: "blur", validators: []}], partnerName: ["", {updateOn: "blur", validators: []}], entityType: [ "", { updateOn: "blur", ...
0
88ded24f1d881f3770898dab9cebf9ea
f5cd94b5a63493fe6440571049b7308b
Add the teleport State at the correct place in the State buffer.
size_t links_count = transitions_count(state); struct class_transition_descriptor transition_descriptor; int8_t is_final = is_final_state(state); uint32_t transitions_count; Transition *transition; TransitionList *transition_list; void *loop_memo = NULL; StateDescriptionSize result_size; result_size =...
0
103d4342b26e77cfa47b76bdaca1741c
6eb69637c9044704445dbfb2875f81e0
通过text查找到元素并且输入内容
el = self.find_element(selector) try: el.send_keys(text) mylog.info(u'输入文字:%s' %text) except NameError as e: mylog.error(e) self.get_window()
1
56f1a96acbb32ce530c17a72ce479d5a
054ace9af015600e46663e24ee3f278e
Method to retrieve excel column index using row number and cell value
public class ExcelUtils public static int getRowIndexByValue(String cellValue) { int numberOfCols = excelWSheet.getRow(0).getLastCellNum(); int numberOfRows = excelWSheet.getPhysicalNumberOfRows(); int temp = 0; for (int i = 0; i < numberOfRows; i++) { Row temprow = excelWSheet.getRow(i); for (int j =...
0
40a8155ec1d592a4343f619ae532e1fc
d5e8616d861812baebcf97497cb0e624
Tests that the context lookup created by TreeView.takeAction() only contains the node once when the node doesn't contain itself in its lookup.
public void DeleteProductNodeThenSyncTreeView() { var treeview = new MultiSelectTreeViewModelView(); var node = GetProductNode(treeview); treeview.SelectedNodes.Add(node); treeview.SelectedNodeDeletionCommand.Execute(null); Assert.IsFalse(Has(t...
0
ad9c074913cfd51d3d1cb089f88cae60
af04d202d9a01875fbf1ce1495674de3
查询影片的描述信息
ImagesResultVO describeFilmImages(String filmId) throws CommonServiceException;
0
17bd249e67030b39d82101ae843f83e2
4b2733a6603cd46b387458fd4ea35551
Le navigateur prend-il réellement en charge l'élément vidéo ?
class Fmp4 extends Html5 seekable() { console.log('seekable'); return this.el_.seekable; }
0
22203f3d0fa0fcddae430b55349a8cdd
b660333611891e1ff6b004211c9ada97
Load collection point by entity id.
return $this->find('first', array( 'conditions' => array( 'RestorePoint.id' => $id ), 'fields' => array( 'RestorePoint.id', 'RestorePoint.model', 'RestorePoint.entity_id', 'RestorePoint.json_object' ...
0
efe4b39dbf680068b2671750a81ffd60
81c81cbe413f74e398e2885da774f2a7
Performs status-checking on the response given from the LCBO API server.
def check_response(response): if response.status_code != 200: raise ConnectionError("No connection with the API. Status code {}. Message: '{}'.".format( response.status_code, ast.literal_eval(response.text)['message'])) return
1
0ccdb900b2ba953a8b905834125c2aa1
3c5f3e11c4642c2e011bf3f2bfeb21a9
Test the property 'TimeZoneId'
namespace EWSoftware.PDI.Objects [TypeDescriptionProvider(typeof(VAlarmTypeDescriptionProvider))] public class VAlarm : CalendarObject public override void UpdateTimeZoneId(string oldId, string newId) { CalendarObject.UpdatePropertyTimeZoneId(trigger, oldId, newId); }
0
ecd4a34a0f1e885c11e766e15b154618
cd74ecdce6e882bff8ded9a44d09d470
剩余数量转化为采购时的单位
@Repository public class AcceptNotifyDaoImpl extends BaseDao implements AcceptNotifyDao @Override public void restorePurcWithQty(int andid, double uqty) { Object pdid = null; Object qty = 0; Object aq = 0; uqty = Math.abs(uqty); pdid = getFieldDataByCondition("AcceptNotifyDetail", "and_orderid", "and_id=" + ...
0
3bee1bd8af6313011f4536e6ca40ffef
06331690f2876c3e71a34e3c85f51770
Update the default window co-ordinates
class DrawerScreen(turtle.TurtleScreen): def set_defaulthome(self, lowerX, lowerY, upperX, upperY): self.setworldcoordinates(lowerX, lowerY, upperX, upperY)
1
f6fa0842ce51e865208ff01c84547dbb
ee41c6f9aef2d752bc186cc1c85d818a
不正コンディション一覧
{ return [ [ "name" => "お注射", "addHP"=> 0, "damage"=> $this->randomDamage(50, 100), "useMP" => 0, "text" => "にお注射をねじ込んだ!!", "death" => $this->isDead(0), "poison" => $this->isPoison(100) ], [ ...
0
4154b78a28ec204eb93492c1b7307c3e
d8b396100f95fcf9c7a9d27bb9ca2573
Perform a response heartbeat to keep the video download connection alive.
class Client: def heartbeat(self) -> Response: return requests.put(self.routes["heartbeat"], headers=self.headers)
1
feac0e4662942f6895bc2acf6bf3de69
c501b4e70feb7a985a485e176401cd97
レアリティ画像を設定する関数
class Color public function setLRV($int) { $this->lrv = $int; }
0
54d88d46fe63a341cd656d60729a2d55
7f16ee25f320a55db2c32e6566365b3a
It changes the mouse cursor into a hand
void DraggableRectangle::hoverEnterEvent(QGraphicsSceneHoverEvent * event) { QApplication::setOverrideCursor(QCursor(Qt::OpenHandCursor)); update(); }
1
becbb4a2d8f665538c7fa86837ea6d26
95f2da71729c2aed93e474e8314ce2b0
处理开福袋弹框-关闭
function closeLuckPopup() { isOperate=true; $('#luckPopup').hide(); }
1
44a74c597836205780fbd21653dcebe0
820ce443b3aaf1d38b3cba85d0d32f85
删除充值余额记录
@Controller @RequestMapping("/user") public class UsersController extends BaseController{ @RequestMapping("/delRecharge") public void delRecharge(Integer id) { returnToView(rs.delRecharge(id)); }
1
48c7c5e4bb2056e1a5856855f0b8777c
12dd82acc3f2f3560a73ef18e7b0e2eb
stops movement upon release
public class ReturnToStart : MonoBehaviour public void OnReleased() { rb.velocity = Vector3.zero; rb.freezeRotation = true; }
1
46dd610d4a4a8a6c02833992b404d71f
703ae2b0c736cbd6686bbb47970e836a
Divides two ExtendedDecimal objects, and returns the integer part of the result, rounded down, with the preferred exponent set to this value's exponent minus the divisor's exponent.
public ExtendedFloat DivideToIntegerNaturalScale( ExtendedFloat divisor ) { return DivideToIntegerNaturalScale(divisor, PrecisionContext.ForRounding(Rounding.Down)); }
1
995461c47a0dfbf5000a68d1fee39e7a
904964e3c6e2e7781474cfcbea2acd69
设置重泡比Service
class BezierView : BaseView fun setRate(rate: Int) { mRate = rate }
0
3f2d24104f26a6cac789a7b41e6fcd1e
7f3d03b0a0423c9733417cce9535c95b
Получает пространство, на котором действует это природное явление
ReSymbolSpace* ReASNamedValue::symbolSpace() const { return m_symbolSpace; }
0
cb003ef314be2ea3125f77cc7689774c
bb56d7f147c3e5c035f040b2b7cb01c9
Excluye las instancias que tengan problemas.
List<BundleVersion> list = new ArrayList<BundleVersion>(); for(BundleVersion version : problems) { if(!version.getBundle().getStatus().isSuccess()) { if(!list.contains(version)) { list.add(version); } } } return list; }
0
9dffee40d580fd3ee3c5d21531d53097
2fd9c511998bc73531934e7bf61edd3b
Get a list of giveaways for the given deal ID.
class SocialIngot public function deals_get($fields='', $search=array(), $lim=100, $off=0, $order_by='') { $params = array('fields'=>$fields, 'lim' => $lim, 'off' => $off, 'order_by' => $order_by); foreach ($search as $key=>$val) { $params[$key] = $val; } return $this->call_authenticated_get_metho...
0
fd6cb7fa4693c885e72e4a30ed512b69
06d5637660525e729897674c963ab1d5
Loads instances for analysis and give possibility to extract properties of interest.
public static Instances loadInstances() { ClassLoader classLoader = ClassLoader.getSystemClassLoader(); XLSLoader dataLoader = new XLSLoader(); dataLoader.setSource(new FileResource(new File(classLoader.getResource(DATA_PATH).getFile()))); return dataLoader.loadInstances(); }
1
421eb4dc5e46ae8f95e5e4fba62a65ff
282da7c23f8a6d11bd519b304acd5860
Gets the upload information from the database.
VideoUpload getUploadInfo(int videoId, int siteId);
1
c41b635fb4b9e887b87f632fb60ba700
4b967bc3ae1ff5e588f79264171b53cf
Setup the peer listener. The peer listener listens on a tcp socket, the peer connections will come through it.
class PeerClient(object): def listen(self): self.sel.listen()
1
c0a5def06ae51dd5ad83fcca658a0d2e
1c9f4a02472803871d2ef2adf83c3ed7
Return all lemma names for all synsets for the given part of speech tag and language or languages. If pos is not specified, all synsets for all parts of speech will be used.
def all_lemma_names(pos: str = None, lang: str = "tha"): return wordnet.all_lemma_names(pos=pos, lang=lang)
1
d5db17c2bc512b087cdadb60ed27a5bd
171c4ad5bccd5642c320801dc9df13f3
Memoization decorator for functions taking a nonzero number of arguments. References: http://code.activestate.com/recipes/578231-fastest-memoization-decorator
def memo(func): def _wrapper(self, *args): key = (func,) + args if key not in self._memos: self._memos[key] = None self._memos[key] = func(self, *args) if not self._memos[key]: print("recursion detected", func.__name__, repr(args)) assert False ...
1
75ccb587c3b5e03465fbe988f3852296
5eaec1ed1d34bff2978891fc4c2540d7
Launch histogram tool on a database.
class GXEDB(gxapi_cy.WrapEDB): def launch_histogram(self, chan): self._launch_histogram(chan.encode())
1
c709c332db752b1acaac995e14fb773f
a0a91e0108f4893b3399feb17015c082
Swap lower and upper sand
void swap_buttons(int i) { unsigned l,t; g_object_ref (buttons[p_rand[i]]); g_object_ref (buttons[p_rand[i+1]]); gtk_container_remove (GTK_CONTAINER(table), buttons[p_rand[i]]); gtk_container_remove (GTK_CONTAINER(table), buttons[p_rand[i+1]]); l = i%4; t = (i - l)/4; gtk_table_attach_defaults (table, buttons[p...
0
e51184359bfb946786564f7c694a39ac
7bc1ec5973fe9c128f5682424e7857a7
获取消息并发送给下一个组件的方法,会被storm 不断地调用 从goods数据中随机取一个商品名称封装到tuple中发送出去
public class SourceSpout extends BaseRichSpout public void nextTuple() { final Random r = new Random(); int num = r.nextInt(5); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } this.collector.emit(new Values(dataMa...
1
7cfd284ee2d88bc420850b0bd82b294a
5b9c3f7c8cebf271e77eb08f217a9d60
Construct a boarding card.
class BusCard extends BoardingCard public function __construct( string $transportationId, string $startingPoint, string $destination ) { parent::__construct( $transportationId, $startingPoint, $destination ); }
1
2504675011de4970069e38ec9d3cef00
a57153acac6fd45c965eafad4befdade
删除填充矩形
if (deletePath.size() > 0) { DrawPath dp = deletePath.get(deletePath.size() - 1); savePath.add(dp); mCanvas.drawPath(dp.path, dp.paint); deletePath.remove(deletePath.size() - 1); invalidate(); } }
0
18cc25ae048e00492a68cb7aad1880d5
b645070bd300d68de162d596dd87e42c
Dodaj novog zaposlenika u salon s id-jem $id. Postavi mu smjenu i ime na prazno te traži od salona da napravi izmjene u podacima.
{ $db = DB::getConnection(); try { $st = $db->prepare('INSERT INTO employees(hair_salon_id, shift, employee_name) VALUES (:hair_salon_id, :shift, :employee_name)'); $st->execute(['hair_salon_id' => $id, 'shift' => 0, 'employee_name' => '']); } catch (PDOEx...
1
7e8215718440f28d313f609abe589e68
4e96786a5c4c2d679e9dd635024c236a
Display error message and exit out of this Activity
Intent intent = new Intent(_context, RedditPageActivity.class); intent.putExtra(_context.getString(R.string.extra_error_message), message); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); clearPrefrences(); _context.startActivity(intent); }
1