query_id
string
corpus_id
string
query
string
code
string
label
int64
cc1e249dfe5ecf65515a4ee361b3cc1f
85430e6ec44694ff677a5c76a251975c
Append a switch table with specified row count.
public class ClassMaker implements ExpressionIfc protected class SwitchStatement extends Statement protected void createTableSwitch() { int low = cases[0]; int high = cases[caseSize - 2]; int startSwitch = cfw.addTableSwitch(low, high); cfw.addTableSwitchDefau...
0
9637099704af308875d04b14dceb1636
0fe30927ff8a72d72803699d1e5adf24
Description : 禁卖商品 Create Date: 2010-8-10下午03:55:09 by sunl Modified Date: 2010-8-10下午03:55:09 by sunl
@SuppressWarnings("serial") public class ProductAction extends BaseAction public String sellOut(){ try { Integer sellerId = userInfoService.getCurrentSellerId(); product.setSellerId(sellerId); productService.sellOut(product); setMessage(Boolean.TRUE.toString(),"售罄成功"); } catch (UhomeStoreException e) { ...
0
6f42df9fab82e275f4fbf45c2aad63d2
cf6e9a162ffa4c1df22f771a71b2f29e
Setup the dummy api from _common.
mocker.default_headers = {"Authorization": "Bearer " + AUTH_TOKEN} mocker.base_url = API_BASE mocker.get(API_LOCATIONS, response="locations") mocker.get(API_LOCATION.format(location_id=LOCATION_ID), response="location") mocker.get(API_ROOMS.format(location_id=LOCATION_ID), response="rooms") mock...
1
50e5b072670f6b006b6906baa6dca66e
2078da4325be0a93279c7ba8930ac969
Main function of the program. Reads the data, and substracts each image from its baseline
def subtract(data, bkg): subtracted_img = data - bkg return subtracted_img
1
6ec2761981f73fddc9bd0532182c995c
4b89251d6154c04d25fa743195994481
Add the target to user connexions
class Graph: def newConnex(self,idx): self.connex[idx] = self.nconnex self.existingConnex.append(self.nconnex) self.nconnex += 1
0
b3fd89b5376d0fb22f4f26974cb3d248
405c4c74597ffdd8e9d826e7c8bd2241
离职原因发生更改
if (data.type == '请假') { const index = this.attenceList.findIndex(item => item.id === data.id); this.attenceList[index].type = '请假'; this.attenceList[index].ltype = '事假'; this.attenceList[index] = { ...this.attenceList[index] }; } }
0
e3e537b1df6e71eb0648f465bf98d926
d847ede656dd766d68739547d2bac150
Resets the exponential backoff, indicating a successful polling.
class Backoff(object): def Succeeded(self): self._current_interval_sec = self.min_interval_sec
1
0d23eaec5920b6a376c8fe62df5dee85
377471dc0a4825e5ed563817d553c9fa
Check if given dll to inject exists
if "CDLL(" in l or "LoadLibrary(" in l or "dlopen(" in l: return True return False
0
04ee986ec64f4a4d2cf782b6007df134
8b77393f1ba640ba2f6c3cb17c01c684
this is executed when the title bar is clicked to move the window
namespace Laffey public partial class MainWindow : Window private void fxTitleBar_MouseDown(object sender, MouseButtonEventArgs e) { Win32.SendMessage(new System.Windows.Interop.WindowInteropHelper(this).Handle, Win32.WM_NCLBUTTONDOWN, (int)Win32.HitTest.HTCAPTION, 0); }
1
14456792c58316feeed8c8f95f0a2aaa
34b1d51d20e8f3b13e8655728fb947fc
유저의 캠페인 리스트 가져오기
public class MypageServiceImpl implements MypageService @Override public List<Challenge> getUserChallInfo(List<Participation> listP) { Connection conn = JDBCTemplate.getConnection(); List<Challenge> list = new ArrayList<>(); Challenge chall = null; for(int i =0; i < listP.size(); i++) { int chNo = listP....
1
1e9aaa08ce503ed79d0c3847039131bd
7436e9a1d308ee6cb216732ebeb9ac19
獲取客服所接待的用戶
class ChatServiceDialogueRecordDao extends BaseDao public function getServiceUserUids(int $uid) { return $this->search(['user_id' => $uid])->group('user_id,to_user_id')->field(['user_id', 'to_user_id'])->select()->toArray(); }
1
7ec689a3dc4cf8d43c99a96db3dd6f3b
2cd366304d7232b90584b1165355ef32
remove template arguments from feature name
fn extract_feature_names(line: &str) -> Option<Vec<&str>> { lazy_static! { static ref RE: Regex = Regex::new(r#"feature\s*=\s*"(?P<feature>((\w*)-*)*)""#).expect("Invalid regex"); } Some( RE.captures_iter(line) .map(|c| match c.name("feature") { Some(v...
0
a4028ccd14aef15b65cd51b7d46bdef4
d85befca514728723c9dcbbaf12b2fd2
Calculate the external physics of the drive cycle
l_motor = hal_data["pwm"][1]["value"] r_motor = hal_data["pwm"][3]["value"] x, y, angle = self.drivetrain.get_distance(l_motor, r_motor, tm_diff) self.physics_controller.distance_drive(x, y, angle) self.l_distance += self.drivetrain.l_velocity * tm_diff self.r_distance +=...
1
24f7132e55ce8aed50265a2cca9bfccf
6dd43e33a95785760eca2ec1e204d48c
See if the sidebar has been slotted so that we can display or not
{ static $display; isset($display) || $display = apply_filters('sage/display_sidebar', false); return $display; }
1
c5c2d6954dd9142b439eec1b3cfb9712
25c0336ce0dce0076e29312f66b6e5e9
Method to get Mutual Fund Value
public class MutualFund extends ShareAsset{ public double getMarketValue(){ return totalShares * getCurrentPrice(); }
1
243bc8a8ba6bba733f8ae3fea1cb8d84
adf50ca6a9125cc101cf9cb52f89cda7
根据子id获取父列表
Set<UserJPA> getParentList(Long childId, Long idProcessType);
1
99d5c3576090371e88c69ef5c455466a
4e1e609e2fdf257b6cd671888043b193
验证汉字格式
class Validator public static function chineseValidator($char) { if (strlen($char) === 0) { return false; } return (preg_match("/^[\x7f-\xff]+$/", $char)) ? true : false; }
0
1932b925ac157c4d0f944e1d344d9813
0d4ce9d7fb8d20a8abdbf20d796a4c78
check to see if there are any pending eligibility forms to be completed
{ return genericQueryCounter("select * from wts where eligible is NULL;"); }
1
8510cc4c66138380c3858741df8cdceb
29985c42a4b55afdcc4311cd143b41a7
计算区块头部 hash
func calculateBlockHash(block Block) string { record := strconv.Itoa(block.Index) + block.Timestamp + block.Datas + block.PrevHash return calculateHash(record) }
1
50bb018585679f8fdfcdbf80d5c6cf35
6d097cbdd084e933e330049fcf4c2a52
Expect 404 not found response code and end the chain
class StatusHandler1(RequestHandler): def get(self, *args, **kwargs): self.set_status(404)
1
697cd9b2763ac0bb18d1bdd4339c5dad
e64d19886bd6bb477a6ffda07f44a416
Set the availability of the device.
public class ElectronicDevice extends LibraryResource public void setAvailable(boolean available) { isAvailable = available; }
1
b3ba1640f8422077e15cd7cb03ce5aa0
d0a632d8763f4c758823b00747112f64
Complete a transfer of AVAX from the X-Chain to the C-Chain.Before this method is called, you must call the X-Chain’s `exportAVAX` method to initiate the transfer. [More Info](https://docs.avax.network/v1.0/en/api/platform/#avmimportava)
let trx: Transaction = TransactionBuilder.transferXAS(amount, recipientId, message) trx = await this.aschWeb.sign(trx) return this.broadcastTransaction(trx) }
0
b02b8974b0210013ee1e344b90a94149
ea9c90be95f3d4c83f96a62368ba97ca
返回入/出站记录dataframe
class DataApi(object): def get_sta_in_out_flow(_type, flow_dict): sta_list = list(flow_dict.keys()) df = pd.DataFrame(index=sta_list, data=np.zeros((len(sta_list), 5), 'int'), columns=['7-9', '10-12', '13-15', '16-18', '19-21']) for sta, sta_dict in flow_dict.items(): ...
1
7612910391b1f850a31031021c393f94
9d3b8dbd1d327d9efa351af76d46771f
调用策略枚举中的方法,计算工资
{ $record = $this->salaryCalculateRepository->getDetail($id); if(!empty($record)){ try { $result = app($record->type_object)->{$record->type_method}($userId); } catch (\Exception $e) { return ['code' => $e->getMessage()]; } ...
1
47ffa9966b15ff061f6e99fbfe5c1456
a4080b7ab2e1e062bb0b2c7ce48dbb07
Method is triggered when a setting value in the property grid has changed.
[Handler(typeof(IHandler))] public class PropertyGrid : Control void OnPropertyValueChanged(PropertyGrid widget, PropertyValueChangedEventArgs e);
1
5c906e16d4a986d16179ea1177a7b40a
65a02ca768a2d7b04d91e50aeee42731
Export transactions report
class TransactionController extends Controller public function report($id) { return view('backend.transaction.report'); }
0
3a82ffc69ad4ab69e49201506829b26f
fab54abcbded94463c0b67904d3090e1
Framework to invert unconstrained parameters.
class Transformer(abc.ABC): def invert_x(self, X):
0
1ade38cad90821ba04d61cf83bd7afd4
2812c94938939833d7eae8d25c671e3d
Notify reception of a message on control channel.
static void MessageReceiverHandler(int socketfd, MessageReceiverObject_t socketObj) { getControlCommandRx_t *pMessageReceiver=(getControlCommandRx_t *)socketObj; DBG_ASSERT(pMessageReceiver); struct sockaddr srcAddr; socklen_t srcAddrLen = sizeof(srcAddr); char buffer[1500]; ssize_t rxLen=0; if(0 < (rxLen=recvf...
1
293ac9bbd5b4f7eee5762b41063b51a0
7477ab48ffc9ea117e502a9bfd9a39c2
Subprogram to build the path from the <see cref="AdvancedEnemy"/>'s current <see cref="Tile"/> to the specified end <see cref="Tile"/>
{ Tile startTile = _gameWorld.GetMapLand((int)Math.Truncate(start.x / 10), (int)Math.Truncate(start.y / 10)) .GetLandPiece((int)Math.Round(start.x) % 10, (int)Math.Round(start.y) % 10); Tile destinationTile = _gameWorld.GetMapLand((int)Math.Truncate(destination.x / 10), (...
1
d58a8cc3ef4dcbe4e2f6c0fb65ad9e62
4e9f4986d80a75fe96afe64d7eccef1e
根据channelId删除merchant表数据
if (StringUtils.isBlank(channelSubMerchantId)){ channelSubMerchantId = "test_channelSubMerchantId"; } MerchantEntryDOExample exam = new MerchantEntryDOExample(); exam.createCriteria().andChannelSubMerchantIdEqualTo(channelSubMerchantId); merchantEntryDAO.deleteByExample(exam); }
0
665627c23c0bacd1841b28bf2056a6e1
48fc65033a18d4abc33459e5cc9541da
Read file line by line
class File public static function readLine($filePath, $callback) { $fh = fopen($filePath, 'r'); while (!feof($fh)) { $line = fgets($fh); $callback($line); } fclose($fh); }
1
151ba6a8425c6841e7be25afadf3a8a3
2010a4a9e248d666f1564e89f2104115
Sets a log writer as the only one
public function setDefault(LoggerInterface $default): LogManagerInterface;
1
18976ba014d8e35d9179eb910f4a0119
67b64697c75fdfd0a0df247b68483c0f
Handles the Apply Button, either just re-populating the Table or looking for a different show name
String showName = textShowName.getText(); if (showName != tv.getShowname()) { otherShowname(showName); } else { populateTable(); } }
1
73ecba1ce0f00338250f6dd9c3088877
0ff9ddbd32ce3650b20c365fc3a0fcdf
Test of izvrsi method, of class ServerAviona.
public class ObradaZahtjeva extends Thread private String stopServera() { String poruka = null; if (provjeraLozinke()) { poruka = "OK"; } else { poruka = "ERROR 00; Korisnicko ime ili lozinka nisu ispravni"; } return poruka; }
0
2f06209ea8d6a5b5356fea45cd979148
7f9ec19673e5689e40861ebd22ce496e
Finds the closest scope with an item of the type specified
namespace TerrariaCraftingCalculator.Extensions static class VisualTreeHelperUtilities public static T FindClosestParentOfType<T>(DependencyObject startingObject) where T : DependencyObject { while (startingObject != null && startingObject is T == false) startingObjec...
1
0e5e9d60ee129dc1750365b25e1b45a8
4a177ad4d1f3df5a90c88ec3298f6166
Создание приложения с таблицой истинности
namespace WindowsFormsApplication1 public partial class Обработка_булевых_функций : Form static char[] TruthTableBuilding(string example_function) { message = string.Empty; if (NumOfVar(example_function) > max_num_of_var) Console.WriteLine("программа не рассчитана на ...
1
2c1fa40f2bfdc177425a32bf7a1facfb
299eb9dbb32fd64940db922c395f169b
按salnumber取得单个活动
{ $sqlstr ="SELECT so.*, u.uid,u.uname,u.email,up.companyname as ucompanyname,up.annex1,up.annex2, p.province,c.city,e.area, a.name,a.companyname,a.address,a.zipcode,a.mobile,a.tel,a.express_name,a.express_account,a.warehousing, pi.province as province_i,ci.city as city_i,ei.area as area_i, ...
0
ae27bafaad6d2bc3d6c13c66835f564e
7a1afc6afa0bf6ff042806bae455e451
return a generator of possible next moves
class maze_t: def nextstate(self, currentstate): if currentstate != self.startstate and self.data[currentstate[0] - 1][currentstate[1]] == 1: yield (currentstate[0] - 1, currentstate[1]) if self.data[currentstate[0]][currentstate[1] + 1] == 1: yield (currentstate[0], currentstate...
1
a35bdf61c1b93f1bd15c6e10c84a64be
4559beeb763ceb6f155e1c8f0667ee72
Test the MC-sampled sqrt decomposition of the input Hessian.
payload = { "function": "stan::services::sample::hmc_nuts_diag_e_adapt", "data": data, "num_samples": 500, "num_warmup": 500, "random_seed": 1, } beta_0 = await helpers.sample_then_extract(api_url, program_code, payload, "beta.1") assert all(np.abs(beta_0 - np.arr...
0
15a180e63b7040cedf5430064a414d9e
11f54d4e9d4d6c75ad9cb329a4677774
子类型是否显示
function showChildAssort(e){ var isChecked = $(e).attr('checked'); if(isChecked){ $(e).parents('td').find('ul:gt(0)').each(function(){ $(this).hide(); }) }else{ $(e).parents('td').find('ul:gt(0)').each(function(){ $(this).show(); }) } }
1
1fb8a44b7a034ed56ea03e2df3d191d1
7934aba36aae875bc4e8385a0fa2702d
Create a new time stamp that can be considered empty.
class TimeRange(list): def from_now(cls): return cls(int(time.time() * 1000), cls._max_stamp)
0
1b37d0b6517e2c15f954e9e0f0d6f3ad
e9a04e4a08040c0fcf26fe53f05b40c3
Format a terminal string for bold and optionally underline.
attr = [color_code] if bold: attr.append('1') return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), self._text)
0
6e3ca6929a219c9b4ea24155f0c0c0d3
96b7d1f6778038a9fa09231bc5868794
Gets the hand's root pose.
public function getHand();
0
5e53993b002086eb62f7c29b56a84389
7adebdb07093c30b868bfd9904e05b86
Get value from internal stack
if (!(p_stack->qty)) { return 0; } *p_val = p_stack->buf[p_stack->qty - 1]; return 1; }
1
f114116109be4f571f594ad51509f5bb
e3543eae91d53b8e802bc725d190c8e5
获取我提交的请假申请
{ PageList<ApplyLeave> result = new PageList<ApplyLeave>(); StringBuilder sqlwhere = new StringBuilder(); List<SqlParameter> sqlParameters = new List<SqlParameter>(); sqlwhere.Append(" And IsDel=0 "); sqlwhere.Append(" And ApplicantType=1 "); ...
1
beebb9434d3990e7a21da0441d593c7d
58a06ddbf2dbbbf99bd03a2cceaa3f61
Verifier si le nom d'une série fait parti des séries préférées de l'utilisateur
if (registre.findPreferencia(idUser, idSerie) != null) throw new Exception("Sèrie '" + idSerie + "' ja afegida a MyList."); registre.addPreferencia(id, idClient, idUser, idSerie); }
1
d0b93dc1fc7425a233242da540fd3f4d
0bceeea98512e75f1b5466161ca8c5d9
Gets the value of the poiSoftware property.
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "POISystemData", propOrder = { "dateTime", "poiSoftware", "poiTerminalData", "poiStatus" }) public class POISystemData public POISoftware getPOISoftware() { return poiSoftware; }
1
0e3218763a91218994a03d0f2dbe4eb8
4fed47f404d3d7bf560c42e4b0da2156
Replaces json schema file references referenced with a $ref property with the actual file content from the referenced schema file.
function replaceRef(schema: Swagger.Schema, dereferencedSchema: Swagger.Schema) { delete schema.$ref; for (let propertyName in dereferencedSchema) { if (dereferencedSchema.hasOwnProperty(propertyName)) { (<any>schema)[propertyName] = (<any> dereferencedSchema)[propertyName]; } } return(schema); }
1
da740a572d6860802b57df4b2ec28a0a
779f266ea1201902b3290ce53ba92411
Converts fdCAN TX/RX ID register value into the libcanard ID format.
static uint16_t convert_peer_data_id_to_type_id(pm_peer_data_id_t peer_data_id) { return (uint16_t)peer_data_id + (uint16_t)peer_data_id_to_type_id; }
0
8806b5a55b8a0306efca662b1d199b10
fad7e807461907284653bfc3835d7fd2
Generate BPO paths.
task = TaskPath(basename=args.basename, outfile=args.pathsfile, unfold_stoichio=args.unfold_stoichio, unfold_compounds=args.unfold_compounds, maxsteps=args.maxsteps, maxpaths=args.maxpaths) launch(tasks=[task], outdir=args.outdir, timeout=None)
1
9593e49be1cf513c0942cbb5ff75819f
cf895eff7f76aa1d9fe2173420cb518a
実部と虚部を設定する。
public void setImaginary(double i) { double real = this.getModulus() * Math.cos(this.getArgument()); this.setModulus(Math.sqrt((Math.pow(real, 2)) + (Math.pow(i, 2)))); setChanged(); notifyObservers(); }
0
f0ead78cfed2ad2e58fed094fe893646
5f0f137c3af76302ef47759d9e22158a
查询拼团活动Id
JSONObject object = JSONObject.parseObject(activeInfo); JSONObject data = object.getJSONArray("data").getJSONObject(0); return data.getInteger("actvie_id"); }
1
df28a25f35ffb00af0ccc44c49654cc8
76f8b6a4e00820a4275a90b2f4158b5f
设置编辑模式,inline or popup。默认inline
public abstract class XBaseSelect extends FXmlObject implements XEditControlFace, XDescSelectFace public abstract void setEditMode(String value);
1
53b29ee800c2ba139614e75b0b645fab
a3faab1877eef434ef5aa703fd09057e
清空上一个测评学生信息
var items = new Array(); items[items.length] = "#subject_id"; items[items.length] = "#kadri_id"; items[items.length] = "#group_id"; items[items.length] = "#study_act_id"; if (type == "single") { items[items.length] = "#student_id"; items[items.length] = "#study_mark"; jQuery("#student_id").empty(); jQuery...
1
4784665d2a5ddeb994c212170cbd53ba
6828d9299c075adecfa180664817e71b
Add credits to student.
{ var state = false; var student = Context.Reader.SingleOrDefault(s => s.reader_id == id); if (student != null) { student.credit ++; state = Context.SaveChanges() > 0; } return state; }
1
720708a1a19ccc5491eb0ae0f8c7a842
6cd08d824e96168345cdb39094173870
保存声音状态
if (mVideoView.getVolume() > 0) { mSoundBtn.setImageResource(R.drawable.soundenable); mVolumeSeekBar.setProgress(mVideoView.getVolume()); SharedPreferencesManager.putSoundable(mContext, true); } else { mSoundBtn.setImageResource(R.drawable.sounddisable); mVolumeSeekBar.setProgress(0); SharedPrefer...
1
80aa29c433c5aabacc748dee5fb88b22
4ca1ad85a7b9338d6d77b45368b865bb
Vérifie si une demande de récupération de mot de passé existe déjà pour un utilisateur donnée
Boolean existsByUtilisateurId(Long id);
1
8605cb597876bfd493b3fe7958c80199
c51eaf77a958ee9a52609dd514cb2287
Function to return the minimum distance between a line segment AB and a point E
AB = [None, None]; AB[0] = B[0] - A[0]; AB[1] = B[1] - A[1]; BE = [None, None]; BE[0] = E[0] - B[0]; BE[1] = E[1] - B[1]; AE = [None, None]; AE[0] = E[0] - A[0]; AE[1] = E[1] - A[1]; AB_BE = AB[0] * BE[0] + AB[1] * BE[1]; AB_AE = AB[0] * AE[0] + AB[1] * AE[1]; Ans = 0; coordinate=[] if (AB_BE ...
1
f9f5e57f1151b1bf230f587b7a5ec447
5123aabcb757d42d8c60759976a9dcdd
Ermittelt den Sprachcode der installierten Windows Version. Der Sprachcode ist zweistellig und kleingeschrieben.
class Grass7Utils: def getWindowsCodePage(): from ctypes import cdll return str(cdll.kernel32.GetACP())
0
52619edb4875f726202eec96fb103e78
ca44500afc6e03ba38e17a338cc5a3d7
Sets the maximum number of components that may be concurrently selected. A value of -1 indicates that there is no limit. maximum number of concurrently selectable components
public class PumpSelectionPanel extends PumpSelectionPanel_generated public void setIdxMaxComp(int idxMax) { this.idxMax = idxMax; initPumpSelectors(); }
1
66481312e33421eb09713dff087bf029
911710ba9df5328fd705e6041142f709
암호화 키와 평문을 받아서 암호화된 문자열을 반환하는 함수
{ char *Ciphertext = NULL; int plain_text_num = 0, key_num = 0; int *key_order = NULL; int i = 0, j = 0, temp = 0; plain_text_num = strlen(plain_text), key_num = strlen(key); Ciphertext = malloc(sizeof(char) * (plain_text_num + 1)); Ciphertext[plain_text_num] = NULL; key_order = Get_order(key); for (i = 0; i ...
1
4bd4b6f62fffc99e49c9011070625ce4
801c0bb9f0ffbea5408af0e15941cff6
获得所有车队在线司机位置
namespace LDLWCFService.Lib public class CoDriverAdapter public static List<CoDriver> GetDriverList() { LDLLogisticsEntities context = new LDLLogisticsEntities(); return context.CoDriver.ToList(); }
0
56bc60c76b61d74cbaef6f72262418ca
6127d759f072339a6fbc60d7c1138755
Sets the quaternion to an identity Quaternion
{ OutQuaternion[0] = 0; OutQuaternion[1] = 0; OutQuaternion[2] = 0; OutQuaternion[3] = 1; return OutQuaternion; }
1
ff4184fca50dd2af7e6791766de21a3b
939183dbbea4dd23c4243e50752e4f46
Cambia el manager de la tarjeta por el que se indica
abstract class Manager public function SetHeader($_new) { $this->manager = $_new; }
1
c6b2bf8ebc3383721b86d15d89cb477c
02fd014c8b4bb72b48772645f83a6a47
Gets the selector for the container holding currently active page contents. This is useful when content is AJAX loaded and in the DOM but not actually on active display
if (getActivePage() != null) { return getActivePage().getActivePart(); } return null; }
0
e5ce086358ebbb981accd02f8b304098
475bcf3b85d0499d41f023b797f3aa2b
Creates a new alias to virtual_aliases table.
{ global $db; $db->insert('path_alias', array('src' => $src, 'dest' => $dest)) ; return $db->lastInsertId(); }
0
be7e78af2731f7d70d82b9577b3bc04e
584ab8b42a910d1a3786475608ac4bd5
ポーカーの交換カードの指定番号取得テスト5
@core.create_deck table = [:_7b,:_5d,:_Ab,:_5s,:_2b,:_4b] list = @core.which_cards_pick(:_Rb, table) res_check = @rescheck.combicheck([[:_5s, :_5d]], list) assert_equal(true, res_check) assert_equal(1, list.size) table = [:_4b,:_4c,:_6b,:_2s,:_3c] list = @core.which_cards_pick(:_Fb, tabl...
1
63cf3ff8759f6b9470700a042d4d6fa3
9db9dc0a7ddefa52aeab9848362c3514
The dimensions of the mesh. Is equal to zero as a 0D mesh. Returns an int, 0.
class ZeroForm(FormsSpace_abstract, Module, UniqueRepresentation): def dimension(self): return 0
1
6d36c7ea3fa4a2f99978c53bcbd33218
ada875292aa8813031156a16419d505c
Tests building an HTTPS request
os.environ['REQUESTS_CA_BUNDLE'] = '/etc/ssl/certs/ca-certificates.crt' mocker.patch.object(demisto, 'params', return_value={ 'server': 'https://self-signed.badssl.com/', 'insecure': True }) mocker.patch.object(demisto, 'command', return_value='test-module') try: main() e...
1
435e7926415445209038a1d6264ca600
484af072cb28d8724746a06e08568dd7
Méthode appelée quand l'utilisateur demande à voir les droits d'un projet
class ProjetController extends Controller public function show(Projet $projet) { $this->authorize('isAgentTCOrChargePrjOrDirecteurOrIntervenant'); return $projet; }
0
453f70c8b0a45238567478615cf4e54b
657c970bc8792fbc0f3820ba218fe4bf
Convert the color to it's compliment (opposite position on the color wheel).
{ $complement = new HSLColor( $this->_hue + 180.0, $this->_saturation, $this->_lightness ); return $complement; }
1
787f55713d0d3dc250da70881b1f3fe0
abae6746e6d6bf50cb3e4cc34e926536
verifie si le joueur peut faire une assurance
class Fiscal public function getAssuranceControle(): ?bool { return $this->assuranceControle; }
0
599bcfc2cb63ddbf859cacbcab3168b8
8be1426b03cd45b44c1380e0f8f5fdb1
Getter jumlah binatang pada cage. Mengembalikan jumlah binatang pada cage.
public class Cetakan int getJumlah(){ return jumlahKue; }
0
14bdc85e2fd92451ad2e50f7c75d7d60
2059978b3103f8cd8bf3e9417975c9da
Возврат во входной поток, восстановление лексемы
class Lexer{ public backup(): void{ print("NUM: " + this.num_chars_in_lexeme); for (let i = 0; i < this.num_chars_in_lexeme; i++){ this.backup_input(); } }
1
cd2d37eda3c93e19d4a34821304843c8
5f438f3feb7994804a543843fd6474ca
获取布阵位对应阵容位的映射表 {key-布阵位, value-阵容位}
local result = {} for i, embattlePos in ipairs(self._embattleCopy) do if embattlePos > 0 then result[embattlePos] = i end end return result end
1
d9b3ded17473d5342931f4cd513769f9
26c72eb62a79863ac3e5f29eb49ec0f6
put a stone into the default basket
{ std::string nr; std::cout << " Number of cars:"; nr = getUserInput(); m_srv.addRandomToBasket(nr); }
0
9eb2b59f8c8c4ef7fa57a10cef5a9529
3a59fdbe58b8f655344bc739f5741514
Max number of multi tabs to open at a time
func openTabCount(mbPerTab int) (int, error) { memPerTab := kernelmeter.NewMemSizeMiB(mbPerTab) memInfo, err := kernelmeter.MemInfo() if err != nil { return 0, errors.Wrap(err, "cannot obtain memory info") } return int((memInfo.Total+memInfo.SwapTotal)/memPerTab) + 1, nil }
1
6116ad23281f94d8eed293c0dbbcef7e
67ecb5921ecb143aa2e67640d0d49097
Класс тест-кейса для запуска тестов внутри него
class TrainTest(Utils): def __init__(self): super().__init__()
0
e9ade62c67678869ea8e86f5e9e44fb5
3847f324e069b26257d91530ab9640d8
Initialize recording helper structure.
CSL_Status appInitRecordAudio( Uint16 status, void *ptr ) { volatile Uint16 i; usb_rec_start = TRUE; usb_rec_mode = FALSE; for (i=0; i<CODEC_INPUT_BUFFER_SIZE; i++) { codec_input_buffer[i] = 0; } codec_input_buffer_input_index = 0; codec_input_buffer_output_index = 0; codec_input_b...
1
3e75cdccaa669775030181d6173e724b
f0b5c8f9e7e9fcfc3ba89f1549fb8e27
Return True if the column specified by the zero-based index is read-only.
def field_is_read_only(field_ir): return field_ir.write_method.read_only
0
7718b40a6ef07baadb28c3e7d2c3557c
e9f92d98269236bd8878c900e7ebf060
50:50 chance between using one of the top 50 candidates (if there are already 50 candidates) and a random candidate
class Hyperband(AbstractOptimizer): def _select_hyperband_candidates(self): top_candidates = self.parameter_domain.get_top_results(50) i = random.randint(0, 99) if i < len(top_candidates): return top_candidates[i][1] else: return self.parameter_domain.draw_random_...
1
7cd60a763a379e07a67f71dc73e29489
7e5afc9332bb443c73f616cfc04b8c48
Returns All Employees from file
class IO_EmployeesFromFile: def get_emp_from_file(self): with open("Crew.csv", "r", encoding="utf-8") as crew_file: all_lines = crew_file.readlines() all_emps = [] for line in all_lines[1:]: line = line.split(',') emp = Model_Employee(line[0], ...
1
1959900fba493f5ddf8cf7eab20bc080
db98dd238b148a68f0346669a6f7ed1b
获取FailItem报表的信息
{ StringBuilder strSql=new StringBuilder(); strSql.Append("select fh_id,fh_adduser,ptype_id,tpoint_id,system_id,fh_phenomenon,fh_caseid,fh_title,fh_description,fh_cause,fh_suggest,fh_explain,fh_reference,fh_experience,fh_keywd,fh_addtime,system_name,ptype_name,tpoint_value,user_name "); strSql.Append(" FROM ...
1
60dfceae6cce57c3feb2d292402761de
957f5c9f4911b097a70215ea6985e0be
Flushes the entity cache: Depending on the entity state, the required DbOperation is performed and the cache is updated.
{ if ($context->isProcessed(self::OPERATION_NAME)) { return; } $parentEntity = $context->getParentEntity(); if (!\is_object($parentEntity)) { return; } $em = $this->doctrineHelper->getEntityManager($parentEntity, false); if (null === $e...
1
63245d8e1b07b4e952f2fab155ac9c11
ca87414476fe81af8ad33d0b1340d42c
Handle chart selected index change event: Pass the event to the host
*[DatasetListModule.event(kSelectedDatasetIdChangeEmitName)]({}) { yield put(ReportCanvasModule.actions.saveSelectedChartId('')) }
0
effa6e7b002952f7410f6532cc16f072
d864fa0889ba755b701226ea3c3fc24e
This renews an individual item from View Items page
{ try { int index = ItemDataGrid.SelectedIndex; if (index < 0) { CodeText.Text = ""; CostText.Text = ""; DescText.Text = ""; } else ...
0
28109b56210b0735e2b80bffcd3768a1
920398599b8aeb88bcdba611f412fa08
Gets whether this control is a focus group for keyboard navigation.
public boolean isFocused();
0
3db812c7b7b407699d2698b32ad1b34d
a90156fa229f13c430585ac25a82c270
#Function to replace continuous variables with woe values
m1 <- matrix(NA, nrow=2, ncol=11) m1 <- as.data.frame(m1) m0 <- m1[-(1:2), ] names(m0) <- c('var','value','N','N0','N1','P0','P1','WOE','IV','est','score') names(m1) <- c('var','value','N','N0','N1','P0','P1','WOE','IV','est','score') for(j in varid){ d <- data.frame(u=datainput1[,j], v=datainput1[,1]) d[, 1] <- factor...
1
8cc4d06ff2ff61177bb6c32c6b64f721
67a0fbc7f199e00dd5545ffcaee17c1b
获取传送原因的描述
class Transfer extends Component public function getDesc() { return $this->get('desc'); }
1
76ad3b37ba03820efbf4d6c1fbd970ff
cbc400d934bd56df7e94f7a2f3086e4f
Returns possible remaining cards in deck based on list of visible one
class PsychicPokerModel extends Model public function dealPotentialCards( $_total = 0 ) { return array_slice($this->_cardDeck_array, 0, $_total); }
0
f64abd76fa241cc98265225c7eda3db3
dc584d6f3140d05c00e286d8bd71425b
加载图标,如果加载不成功,那么使用默认图标
if (imageUrl == null || imageUrl.length() == 0 || imageUrl.equals("null")) { mImageView.setImageResource(R.drawable.photo); return; } if (mIconOptions == null) { mIconOptions = new DisplayImageOptions.Builder() .showImageForEmptyUri(R.drawa...
1
9c0dc1cf9ce490a0eb054fb4760edc4d
22bf589e95826b61fe699261b5c532c2
网站资金代还
class beiyongjinController extends AdminController function guihuan(){ $CommonFunction=new CommonFunction(); $CommonFunction->getQuanxian($this->package."/guihuan"); $sql="select * from payments"; $payments_list=$CommonFunction->getList($sql); $sql="select * from banks"; $banks_list=$CommonFunction->getList...
1
8e524d22d31dd8ef92f47a7cc67ae4d2
e1d8ae77a74897702a77ecfe17bb66c9
Display and animate hotel select
class OpportunityKnocks(): def displayHouseHotel(self): for prop in GUIFunctions.propWHouses: index = GUIFunctions.boardSquares.index(prop.name) if index <11 : if prop.currentRent == 5: x = GUIFunctions.boardPosH[index][0] y = GUIFunctions.boardPosH[index][1] ...
1
2e4f06445d4523531ae99593884dffcb
6cc6381cd0e57a6408a663e4a1a37c2e
Finds the landscape's coastline
for i in range(len(CS)): self.shoreID.append(np.amax(np.where(CS[i].secDep[CS[i].nz-1]>=Sealevel[i])[0])) self.shoreID_elev.append(CS[i].secDep[CS[i].nz-1][int(self.shoreID[i])]) self.depoend.append(np.amax(np.where(sum(np.asarray(CS[i].secTh[0:CS[i].nz]), 0)>0.1)[0])) ...
1
8fe4bb46603e404f9b697737a920b6c5
b187d4989a8dde14bf7ac617bb249b2d
Here we test ability to create Flavors.
class TestAdminOnly(object): def test_create_delete_flavor(self, flavors_steps_ui): flavor_name = flavors_steps_ui.create_flavor() flavors_steps_ui.delete_flavor(flavor_name)
1
5a76fbd6da7bdab4a375d62e58d74ddc
588a4ec46d3a5b345f8cf6fdfbd6ce77
Get value for column or default value
{ try { return GetValue(col); } catch (Exception x) { return "** ERR: " + x.Message; } }
0
5c1abb9ea2601696eb83bdc5e0e44d0c
283ec69d88b3ad82daeca43edca3f368
CProcToStr
{ SSUnsigned32 nProd; RESProd xProd; nProd = PopProd( xProd ); CString sProcedureText; while( nProd == RESTeradataProcTextList_Single || nProd == RESTeradataProcTextList || nProd == RESTeradataProcTextList_Semi ) { CString sTemp = _T(""); switch( nProd...
1
6e0229c3cb93ba0bee14cfdbfe123dff
0cf9ad3c018e59bab28a07179db46b79
Destroys the carousel and hides the element.
willDestroyElement() { this._super(...arguments); this._destroyAccordion(); }
0
92b48859ddae180cc06ef18464da774b
be3fffcaf65fee231c43792b3c9e5caf
If the area of a triangle created by given points is equal to zero, the points are collinear
def areCollinear(x1, y1, x2, y2, x3, y3): epsilon = 0.0001 sideLength1 = ((x1-x2)**(2) + (y1-y2)**(2))**(0.5) sideLength2 = ((x1-x3)**(2) + (y1-y3)**(2))**(0.5) sideLength3 = ((x3-x2)**(2) + (y3-y2)**(2))**(0.5) trianglePerimeter = sideLength1 + sideLength2 + sideLength3 biggestSide = max(sideL...
0
e7ac81546dc6554abb308d6ab4d852ff
c2af8290420ea926feecdf6579a90592
强制转化为整形,非数字时返回99999
Integer ig = 9; Long lg = ig.longValue(); return lg; }
0