query_id
string
corpus_id
string
query
string
code
string
label
int64
a06d65a31e2bb58c4eed1b0477d165d8
16bd82a3d99a0e33c3bdeb9651261a40
Method Tested: to_json Context: Passing test model blocks Expectation: Should return OK
template = Template(('{% load model_filters %}' '{{ pepulator|as_detail_block:"My Pepulator" }}')) pepulator = Pepulator.objects.get(serial_number=1235) context = Context({'pepulator':pepulator}) expected_detail = (u"My Pepulator:pepulator," "seri...
0
7c9503bcc3c7bb60cbd32c5369a6436c
8d794eef71945253613fd3e8df4b4657
@brief These settings are wrt enabling TIMER0 on Lunchbox
{ CMU_ClockEnable(cmuClock_TIMER0, true); const TIMER_Init_TypeDef timerInit = { .enable = true, .debugRun = false, .prescale = timerPrescale1024, .clkSel = timerClkSelHFPerClk, .fallAction = timerInp...
1
50bc9ce7990d56c1bdf3444e876ce9d2
339f125fc3a2d632597a167625155b7c
Same as GetDataSource, but if a remote/XML data source needs to be constructed, then this method will issue a <b>blocking</b> Refresh call on that data source.
public class DataManager public static String getDatasourceXml(String type, String label, Class datasourceClass, Hashtable properties) throws Exception { return getDatasourceXml(type, label, datasourceClass, properti...
0
9d46c3a0544e9fec37c25af679bc5780
da32551447edc605c452419c3c944fae
懒惰单例模式得到ObjectMapper实例 此对象为Jackson的核心
@Slf4j public class JacksonUtils public static ObjectMapper getInstance() { return OBJECT_MAPPER; }
0
01df73ecee68f5bf7cc8d27261e157a5
dea1a953477449e56501ce83a6d0dd6c
Retrieves the earthquakes between a date range
class NCDC: def get_range(self, startdate, enddate): df = self.call_api(self.base_url + '&startdate=' + startdate + '&enddate=' + enddate) return df
1
ccbfa339c967990d78df2b1108b770b2
14580296ff96cf6804f8154281d65f74
Set when the maintenance event starts
class Event public function setStart($start) { $this->start = $start; return $this; }
1
43d9876ce007008e01e25bb51484b080
5482bd431ad101105f76b4ef4ee0af15
数据是按列排列并用空格分隔的, 按列读取
def string_column(rows=5): col = [] for _ in xrange(rows): row = sys.stdin.readline().rstrip() col.append(row) return col
0
43458ba9b7261fbfcdda1817695e5f6a
915b98976c34d9e000934d166360e679
calculates expected reward for partition given context and user classes proportion
N_w = np.sum(N_wA, axis = 1) N_W = np.sum(N_wA) N_V = N_wA.shape[0] N2 = N_w + 1 * alpha D2 = N_W + alpha * N_V P_w = N2/D2 return P_w
0
af5a37ab7046f00884f9cb840a06ae28
92aa45f26e35fc26c240fa0b5c0047dd
Check update duplicate Value in Car Maker
$color_id = $this->input->post('color_id'); $color_name = trim($this->input->post('color_name')); $query = "select `color_name` from `car_color` " . "where `color_name` = '$color_name' " . "and `delete_state` = 0 and language_id = 1 " . "and color_...
0
3a3b97117db3fec047e5dfbf8c8d648e
b77b373cb9dc3776620c59f4a87372bb
Duration of system maintenance (in mins)
class ClusterArgs: def defer_maintenance_duration(self) -> Optional[pulumi.Input[int]]: return pulumi.get(self, "defer_maintenance_duration")
1
b66cd095e0d079ef7493f44978f4d1e8
e3fc0a7bb86e701d94e32daef97cc1d0
获取该单头id下的书本数量
{ GetkindbookSum getkindbookSum = new GetkindbookSum(bookID); getkindbookSum.Execute(); return getkindbookSum.Booksum; }
1
d10ac7cba057f90fccc0713e5f92ab66
6020f6c115242ee5525f487c9e1e04cb
Indique si une donnée est deja dans le hash à partir de sa clef d'identification
int isKeyInBucket(struct hash *hash, char *key) { if ( findHashElementByKey(hash, key) != NULL ){ return 1; } return 0; }
1
546c04ae4abb83006c67a4bbf16747fe
6d73fb878c7b09c4aaadcc46f95177a3
increment both variables of the shared data
int pmt_inc_shared_every(pmt_share_t *shr, pmt_priv_t *priv) { ++shr->count; return 0; }
0
3e0f5409aa44b929c14574db4b0c9bf9
f0513a6939975a9007fc43d8915a5d5c
获取后天天气的数据
const request = new Request("https://www.iamwawa.cn/home/nongli/ajax") const defaultHeaders = { "Accept": "*/*", "Content-Type": "application/json" } request.method = 'POST' request.headers = defaultHeaders request.addParameterToMultipart("type", "solar") request.addParameterToMultipart("year", ye...
0
757847244b079901b3f268df58e3d0c1
88ca5853f471a9b8c062101c64b36d9c
Verify that current popup is Reconnect to mobile device via: - title - Close button
@report openResetAndConnectDevicePage() { }
0
58265073c1574c9564b558a608fddb6e
e3212b3a4b330d596339445beb3420a5
converts parsecs to meters
public class Distances public static double MpcToM( double distMpc ) { return distMpc * 1e6 * METRE_PER_PARSEC; }
0
bec9b6cae8d068082985e64d96b8c4f1
14338f9aa9e5623f2ff52dcbdf66572c
Sets the percentage of the instances to deploy in each batch.
public class ArticleBatch extends Article public void setPercentage(double percentage) { this.percentage = percentage; }
1
aa42932f9a29eb9aad09603528c287e9
e9859a9212cf864d7f4d0bd06931c6b2
! \brief Store buffer contents in DS1307 RAM.
{ time_buf[1] = ds1302_read_byte(ds1302_year_add); time_buf[2] = ds1302_read_byte(ds1302_month_add); time_buf[3] = ds1302_read_byte(ds1302_date_add); time_buf[4] = ds1302_read_byte(ds1302_hr_add); time_buf[5] = ds1302_read_byte(ds1302_min_add); time_buf[6] = (ds1302_read_byte(ds1302_sec_add)) & 0x...
0
e3467016e89806dee6235a80ac20babd
9014d43310281fa0cca00fedd6a74cb4
这里需要补全
class MainActivity : BaseActivity<List<GanBean>,MainModel>() override fun bindModel(): Class<MainModel> { TODO("not implemented") }
1
11fa0203f06b112fce35467b7acb3865
ddd94165c3cd266c8b8603e8b0e2891e
列印醫檢費匯款明細表
public void PrintInpatientReg(OPD_InpatientReg inpatientReg) { DataTable dtPatient = iFrmInpatientCert.DtPatient; Dictionary<string, object> myDictionary = new Dictionary<string, object>(); myDictionary.Add("MemID", dtPatient.Rows[0]["CardNO"].ToString()); ...
0
5957b36ab30aec2750b609627820d5c9
81cf41452b47925afe315cbe8b59c64c
Container's getter for OppurtunityTeamFk3Link1.
class ShopImage public function getOtt36() { return $this->ott36; }
0
510bd66f341b559432c39e7208023738
125f931f4bb7f9f1acba99f5c4776bab
https://stackoverflow.com/a/17141899/190597 (falsetru)
function copyTextToClipboard(text) { var textArea = document.createElement('textarea'); textArea.style.position = 'fixed'; textArea.style.top = 0; textArea.style.left = 0; textArea.style.width = '2em'; textArea.style.height = '2em'; textArea.style.padding = 0; textArea.style.border = 'no...
1
a1f74f3f1f8fde45cc92dac49528e8ed
13f47ce3763b8acce454e802ba044ec6
get the rankings for an apartment by its url
response = requests.get( url ) soup = BeautifulSoup( response.content ) housing_ads = soup.find_all('p',{'class':'row'}) L = [] for post in housing_ads: D={} attr = post.find('span',{'class':'l2'}).stripped_strings num_bed = re.findall('[0-9]br', ' '.join(attr) ) if n...
0
761807107ae8a675dd3d039456226898
7e6ccf0a7c36311eb63b47f1001940ff
计算初始化。加载TPN项目
namespace FloodPeakUtility.UI public partial class PnlLeftControl : UserControl public void InitialzeProject(string projectPath) { LogHelper.BindLog(projectPath); LogHelper.LogInfo("项目开始计算...", true); _isIni = true; _projectPath = projectPath; Init...
1
e8471027c9f151b18a4818aab25644bc
a2a0bf5c0b09844e779ff2f2c6774bce
Метод вызывающий начальный метод родительского класса
class PotentialCustomers extends Home protected function initialize() { call_user_func(['parent', __FUNCTION__]); }
1
87e628111ff113684fdd8b298b09b46a
20ca76f64c261f79dcad54b3178b0c35
Returns the access level of this playerEntry
public class VideoEntryWrapper implements VideoEntry, ModelWrapper<VideoEntry> public int getAccessModifier() { return _videoEntry.getAccessModifier(); }
0
4b3253ac2deab33c1d417f91730baa25
d127d8b6e176b4e6abe0b5acf777e597
用户绑定钉钉
{ $data = []; if (!$bonusNumber) { $this->set_local_error('优惠券号码不能为空'); return false; } $data['bonusNumber'] = $bonusNumber; if (!$phone) { $this->set_local_error('手机号码不能为空'); return false; } $data['phone'] = $ph...
1
bc22d6a7175369cf5ba693acc7b66efc
f0638a54e5afc288c06e95b011b6bb51
Función que realiza la suma de dos vectores con números complejos (lista,lista)->(lista)
class unit_complejos(unittest.TestCase): def test_sumaVector(self): self.assertEqual(Complejos.sumaVector([(8,3),(-1,-4),(0,-9)],[(8,-3),(2,5),(3,0)]),[(16,0),(1,1),(3,-9)]) self.assertEqual(Complejos.sumaVector([(3, 2),(3, 4),(5, 6)],[(2, 1),(5, 4),(6,3)]),[(5,3),(8,8),(11,9)])
1
2f27660e875badd09562707e740a7149
141165b4a76d139acdaf78c8b5a5761d
Tests if retrieval correctly manages capacity.
const size_t sizeMax = ~static_cast<size_t>(0); const size_t totalCapacity = sizeMax / 4; const size_t minDeadCapacity = sizeMax / 16; const size_t maxDeadCapacity = sizeMax / 8; memoryCache()->setCapacities(minDeadCapacity, maxDeadCapacity, totalCapacity); EXPECT_EQ(totalCapacity, memoryCache()->capacity()...
1
1f034488ec2b3b4796af07beb1d9d48e
c8d64df26ac26808ae72603e13b3cddf
If there is a short help, then create the longer version from it.
namespace Sumo public class SumoClient : BaseScript private void ShowHelp(string msg, bool bleep, bool saveToBrief) { if (suddenDeath) { BeginTextCommandDisplayHelp("TWOSTRINGS"); AddTextComponentSubstringPlayerName(msg); AddTextCompone...
0
7c3e704dbab474d35227e13d774dd4b3
623dde8079401a8ef71097b89589cc40
Return the the type of the operator as a string
class TextRiseOperator extends AbstractOperator function getOperator(): string { return "Ts"; }
1
21a2568b519e1995d06d3a62c11aa43e
1ee69ca14d2180f6a82f0f6fbb33b5de
Convert subscripts to linear indices
def indtosub(data, dims, order='F', onebased=True): _check_order(order) def indtosub_inline_onebased(k, dimprod): return tuple(map(lambda (x, y): int(mod(ceil(float(k)/y) - 1, x) + 1), dimprod)) def indtosub_inline_zerobased(k, dimprod): return tuple(map(lambda (x, y): int(mod(ceil(float(k+1...
0
c44df0260c388bbd241b7eb725606ccb
f6a7441f563f2d82acee510881580fa7
주어진 인증 정보로 HTTP 요청 메시지를 작성하여 반환합니다.
MessageRes authenticate(String authentication, String url, String method);
1
5713c597253d31fb9fb47719c278dfd9
fb325cdec14b60d60337fcb37dffcc04
根据ID停用/启用终端
public FeignJson doStartOrStop(String ids, String status) { int successFlag = tabTemplateEntityServiceImpl.doStartOrStop(ids, status); FeignJson feignJson = new FeignJson(); if (successFlag==1){ feignJson.setMsg(status+"成功"); }else{ feignJson.setMsg(status+"失败...
1
03a709e07743697051a99d69710c3716
305309a013065f453b3cd3f4445d1be3
make sure we don't attempt to region compile a map with the camera outside the region
void SMEntity::VRender(SDL_Surface * pDisplaySurface) { cVector2 Pos = m_LevelPosition - SMGame::GetCameraPosition(); if (Pos.x < -200 || Pos.x > SMGame::GetScreenSize().x || Pos.y < -200 || Pos.y > SMGame::GetScreenSize().y) { return; } SMSurface::OnDraw(pDisplaySurface, m_pSurface, static_cast<int>(m_LevelP...
1
8ff495d2240d15250f0db4c2344466c2
6cb95bbf0ad843d9a4afd090e478ae83
Problem 3 - Encodes a list using run-length encoding
def rle_encode(byte_arr): output = b"" streak = 1 try: prev = next(byte_arr) except StopIteration: return b"" while True: try: char = next(byte_arr) except StopIteration: break if char == prev and streak < 255: streak += 1 ...
1
a00159e20e35abeb0cd98f6f558a8d71
7ba675e7a5e15deb841ec7a71375b4f7
Returns all the geozones where geozoneId = &#63;.
public com.ext.portlet.halcon.model.FondosMutuosZonas fetchByPrimaryKey( long idFondoMutuoZona) throws com.liferay.portal.kernel.exception.SystemException;
0
bcdc649582436a5f17b2cad6ff53df00
90bd03276bdba59b3e2a0365fa38f343
Posts a patient view to the database
def insertPatientVisit(data): myDB = dbconfig.connectDB() myCursor = myDB.cursor() sqlInsert = "INSERT INTO PATIENTVISITS (PATIENT_ID, " sqlInsert += " PATIENTCLASS, " sqlInsert += " ADMISSIONTYPE, " sqlInsert += " PREAD...
1
cbe3f9c3dbecba6d813f8b6f50a57120
50101a387b6bf7e2d0a4e0b668d44f1a
Remove the cache when pickling.
class RedisPersistentCache(PersistentCache): def __getstate__(self): return (self._args, self._kwargs, self._prefix)
0
e72f780088897dec5fa8d6dac712a905
4e53fec7c4bdb75343167b3229b69274
A RuleRef is "optional" when it's not required to be included to complete the alternative (i.e., because it is inside a "*" block and therefore can occur 0 or multiple times, or inside a "?" block, and therefore can occur 0 or 1 times).
public class RuleReplaceLitOverOptional extends Rule @Override protected boolean checkPrecondition(final Map<String, BasicOperator> mso) { final Optional optional = (Optional) mso.get("optional"); final ReplaceLit replaceLit = (ReplaceLit) mso.get("replaceLit"); final Object[] optionalVars = optional.getIntersec...
0
195cf0ded544cf2e3afdb6f71165ebe1
2b08f17d75900fbaccc0d5d9fa765107
Mezcla de forma aleatoria las filas de una matriz.
namespace ml void shuffle(cv::Mat_<double>& data) { cv::Mat_<double> tmp = data.clone(); std::vector<int> seeds; for (int i = 0; i < tmp.rows; ++i) seeds.push_back(i); cv::randShuffle(seeds); for (int i = 0; i < tmp.rows; ++i) tmp.row(seeds[i]).copyTo(data.row(i)); }
1
850af340e7ed011834d0588c21342003
e8946c05055436cf767e12cca3507035
创建线程后台进行录音操作
class Recorder(): def start(self): threading._start_new_thread(self.recording, ())
1
d6f476001ea6fd9bda992373910e35ca
e3434b2443342e55eb0a767e3b06bf55
Apply pixelate filter to regions of interest.
class DetectionAnonymization(BaseAnonymization): def pixelating(self, image, response, degree=None, id=None, mask=None): boxes = find_boxes(response) for i in boxes: cropped_image = image.crop((i[0], i[1], i[2], i[3])) w, h = cropped_image.size small = cropped_image.r...
1
932e418c68f701809ff1b29fab6b994e
9078ed85846206fc8c29c88dc9d106f0
实例化BeanDefinitons列表中的定义的bean
Iterator it = this.beanDefinitionNames.iterator(); while (it.hasNext()) { String beanName = (String) it.next(); getBean(beanName); } }
1
be7ff5267981f5612ddc0218dbf3af3b
c2bb8f5377d297f3f5b6778aad36e4db
将source转为byte,若source为null或转换失败,则返回defaultValue
namespace Com.HSJF.Infrastructure.ExtendTools public static class StringExtend public static byte ToByte(this string s, byte defaultValue) { var v = s.ToByte(); return v != null ? (byte)v : defaultValue; }
1
a72b70ce8de9b462b03272e939cae878
fe780b3f7ee791dab559178c07b162f0
登陆请求操作
return dispatch => { dispatch({type: types.LOGIN_DOING}); let result = fetch('http://www.baidu.com') .then((res)=>{ dispatch({type: types.LOGIN_SUCCESS, result: true, user:{phoneNumber:opt.phoneNumber,id:1}}); }) .catch((e)=>{ dispa...
1
9a3f807081d8bba3bb65c4e9bc15914a
9fa80511bf436dc621d20e3a2f339941
used for bishop's and Queen's movement
function movQueen(color, pos) { return movRook(color, pos).concat(movBishop(color, pos)); }
1
79590e81b64cc70140ca3e4a4ca56cca
0f787c44ff1b876e8ceaaf8d2b767068
공사_구간_이력(TH_CNTRWK_SCTN_HIST)을 삭제한다.
@Service("cntrwkSctnHistService") public class CntrwkSctnHistServiceImpl extends AbstractServiceImpl implements CntrwkSctnHistService public int updateCntrwkSctnHist(CntrwkSctnHistVO cntrwkSctnHistVO) throws Exception { return cntrwkSctnHistDAO.updateCntrwkSctnHist( cntrwkSctnHistVO); }
0
1248769b8ac1d0c4bad24475d5458408
3e9fe7203356f8556953f60440b78e30
Returns error-message based on valid-location check
{ String prohibition = stock.getValue(Shelf.PROHIBITION_FLAG, "").toString(); String shelfStatus = stock.getValue(Shelf.STATUS_FLAG, "").toString(); String palletStatus = stock.getValue(Pallet.STATUS_FLAG, "").toString(); String palletEmpty = stock.getValue(Pallet.EMPTY_FLAG, "").toS...
1
ccc1c893427e0a079e201bd4cb6e7793
e9781eefa27e4216290c7a7f399a233e
Requests a redraw of the entire keyboard. Calling {@link #invalidate} is not sufficient because the keyboard renders the keys to an off-screen buffer and an invalidate() only draws the cached buffer.
void forceRedraw();
1
9b10e544d0a34891c9e26867ee3db392
00ef6a2b53a5b5599c04767526306ef8
This method processes the search task type.
{ switch(searchType) { case TargetSearchType.Closest: FindClosestTarget(); break; case TargetSearchType.Weakest: FindWeakestTarget(); break; case TargetSearchType.Strongest: FindStrongestTarget(); break; } }
1
524fbbdca5aab415c0bb3d1c8bfb7c66
3ff50ef223603d3325d9cb0efc67ff15
Never select for writes.
func pointQueryWriteOptions() *rdb.WriteOptions { wopt := rdb.NewDefaultWriteOptions() wopt.SetSync(false) return wopt }
0
8aac238f2208ff5f8cc70dbcb1a73412
fb8c6b75f35f3c4224b3023029d2bf9e
Sets avatar medium.
class SteamAPI function getAvatarMedium() { return $this->avatarMedium; }
0
ea39fb91cd98e14181341892ac9cf398
9eecff5cb64b01829c9ad5cbdb00f755
returns a 3x3 scale matrix for scaling by sx, sy along the X and Y axes.
def scaling3D(sx, sy, sz): mat = np.array([[sz, 0, 0, 0], [0, sy, 0, 0], [0, 0, sz, 0], [0, 0, 0, 1]]) return mat
0
b61140041944e71c123a932ae3897609
26de844e13a759f8d8b5aeb4aabec01b
ゲームオーバの画面です。
namespace KAMI_HIKOKI public class GameMgr : asd.Scene void GameOver() { LayerOfMain.IsUpdated = false; LayerOfBackGround_A.IsUpdated = false; if (CountOfGameOver == 0) { if (Score > BestScore) { TextOfGameOv...
1
133a6c85490df64492f06345097b05ca
6c3c1d7efd03472546facb9deec5211d
Calculates and displays the number of stars earned
j++; if(j<=15){ $(".stars").empty(); $(".stars").append("<li><i class='fa fa-star'></i></li><li><i class='fa fa-star'></i></li><li><i class='fa fa-star'></i></li>"); }else if(j>16 && j<20){ $(".stars").empty(); $(".stars").append("<li><i class='fa fa-star'></i></li><li><i cla...
1
6c429e2108cfe08e3702f5257ce9c5c9
6d832e9d63093ec64750833d4894fb10
Gadget connected to the paired Echo device.
function MyConnectionsGadget() { }
0
ea4c55ea864cd9b69eff9809c7f15614
74e88b0fd6241d4e2419d60d3031d101
Hide navigation arrows from recently list
public class ContentListHandler public void hideArrowsRecentlyList() { contentRecentlyArrowRight.setVisibility(View.INVISIBLE); contentRecentlyArrowLeft.setVisibility(View.INVISIBLE); }
1
484ebc7dc56c1241d084655ca9c8fe12
877f7852a76c45d551f06cc81e74401c
Retrieves pending friendship requests for the logged user.
namespace TraktPlugin.TraktAPI public class TraktAPI public static IEnumerable<GUIFriendItem> GetFriendRequests() { string response = Transmit(TraktURIs.FriendRequests, GetUserAuthentication()); return response.FromJSONArray<GUIFriendItem>(); }
1
32dc01811394165ee51aba8e03e0720e
8d239e0f86e72e99d40fe837cc1f888c
Handle clicks on the genre dropdown list
class FilterView(QFrame): def __search_clicked(self): rating_dict = {"0+": 0.0, "1+": 1.0, "2+": 2.0, "3+": 3.0, "4+": 4.0, "5+": 5.0, "6+": 6.0, "7+":...
0
9635b5234af2c74c04947663889526dc
30514a33e764972b1cdb8ddbe3bf9dc5
Gets if stream is encoded in a supported video format.
isSupported() { return this.obtainStream !== null; }
0
cee7c2e2a37e2e5745e2a7145f1447e3
704ead41020641672cf887ddd5389b97
Metodo Congruencial Lineal Combinado Generator.
def lcg(a,c,m,seed): while True: seed = (a*seed+c)%m yield seed
1
68e480fd5c20f357bfb13220723e981f
2a2fbe562bef412fd2439d6a0bb8fe4c
Compute 3D length of given geometry
namespace Atma.Math public static partial class glm public static double Length(long3 v) => v.Length;
1
0733cf7038c4cafd9f37ab62c3a71e6d
beebba696c20b611575074d1ee6f868a
reroot
void makeroot(int u) { access(u); splay(u); tree[u].flip ^= 1; }
1
86b842c199368f9f3d70aa96bc3cc541
ba8cf0dab48b8dd375369992d8b075e9
Gets the evaluation function.
{ var c = chromosome as GhostwriterChromosome; var text = c.BuildText(); return m_evaluateFunc(text); }
0
86123e9f2ab680da9474c0e010666b92
afcf3f1ea6381cb5390a58c79aaa4841
Function that generates the frequency range used to investigate the impedance response of an electrical circuit Frequency Generator with log-spaced frequencies
class Calculus(): def init_vec_frequencies(self, f_bounds): if f_bounds[2] > 0: frequencies = np.linspace(f_bounds[0], f_bounds[1], f_bounds[2]) elif f_bounds[2]<0: frequencies = np.logspace(np.log10(f_bounds[0]),np.log10(f_bounds[1]),abs(f_bounds[2])) return frequenc...
1
0b01052d1e6884a3da329f135ec070fb
9e5ff6eb81e2f739480701a2858d8ac1
지정한 파일에 문자열 컬렉션을 씁니다
file = File.new(file_path, "w:UTF-8") for item in to_strings do file.puts(item) end file.close end
1
3b718ec76195670ec732adf925f07de8
8e6c2f712f2844a2434319025fbf5e18
Este metodo retorna uma referencia da Tabela Cargos do Dialogo.
public class VentanaPrincipal extends JFrame{ public DialogoTabla getDialogoTabla() { return dialogoTabla; }
0
4f77a0ac5abc68934b3866e13fa52595
acc5f147fbd3eb08a7205ac5a2fb85d0
合并坐标和可消除的颜色
export default class Main mergeBase(type) { let startRowIndex = this.currentShape.position.row - this.currentShape.keyPixe.row let endRowIndex = startRowIndex + this.currentShape.size.row - 1 let startColumnIndex = this.currentShape.position.column - this.currentShape.keyPixe.column let ...
1
91b29414994415f5ac199309bd4d4d7e
462c2a3295be8e56df59c1c31ce0e56e
Return the <code>StringManager</code> for use in looking up messages.
public class MessageTypesAction extends BaseAction protected IMessageManager getMessageManager() { return _messageManager; }
0
f5be1cfe109156345be10141152bb77a
0b30c87e6ea5b6ba02a6770c27b52936
Export the settings as an importable model
{ $post = [ 'fieldSelection' => [], 'sectionSelection' => [], 'assetSourceSelection' => [], 'assetTransformSelection' => [], 'globalSelection' => [], 'categorySelection' => [], 'userSelection' => [], 'groupSelect...
1
62f5fed6999e3d80b7d428910ea7b07f
c0eda1df7c9e0e3613a654b046a5b50d
防止线程池名称出现TBase类
if (exec instanceof ThreadPoolExecutor) { ((ThreadPoolExecutor) exec).setCorePoolSize(100); }else { throw new AssertionError("heoo"); } }
0
16f52de948fce81fe992504e1747cc7e
abe59c1962c7ee574f58b8ffb46688d2
估算当前问题所能达到的最小代价
int minCost(vector<vector<int>> &costs) { if(costs.size()==0) return 0; int premin = INT_MAX; int smin = INT_MAX; for(int i=0;i<costs[0].size();i++) { if(costs[0][i]<premin) { smin = premin; premin = costs[0][i];...
1
13f761a0dc1dba28f3a4ab7db3153ba0
0589194a9322455fc07f11108a05fe74
获取最大排名奖励
function MatchLayer_WindowBase:getMaxAwardCount(mid) local allMtchData = DataCenter:getData(MatchCfg.InnerEvents.MATCH_EVENT_DETAIL) local tempmatchData =allMtchData[mid] if tempmatchData and tempmatchData.awardList and next(tempmatchData.awardList) then local temp1 = {} copyTable(tempmatchData.awardList,temp1) ...
1
39f18af540eb5fc22882a0112802f42e
ad1e2cdb2e02d1b335823a7e384057dc
Implementations should set the 'current' and 'next' frames of animation that will be interpolated.
void TextureCoordinates::SetFrames() { AnimationInfo *animationInfo = mAnimations[mCurAnimation.mAnimation]; int frameIndex = animationInfo->mFrames[mCurFrame] % mMaxFrames; int animationIndex = animationInfo->mFrames[mCurFrame] / mMaxFrames; mXValues[0] = frameIndex * mXGain[0] + mBias[0]; mXValues[1] = (fra...
1
947f20a2d4995dd60eb093f1a4618b04
fb82aa0b01deb2f4b67af9243e1cc3f5
Given a MouseEvent (or SyntheticMouseEvent) object, determine the coordinates of the mouse pointer with respect to the top-left corner of its target.
const canvasElem = event.currentTarget; const canvasBounds = canvasElem.getBoundingClientRect(); const x = event.clientX - canvasBounds.left; const y = event.clientY - canvasBounds.top; return { x, y }; }
1
b2dbff2823451cb84f323eb6df9533fa
3c889a50e265bcc87c5de09bdf123cec
NewExecModeCmdByCmd creates an exec mode command.
func Command(name string, arg ...string) *Cmd
0
878217cd4163d873dc5f9b1053787edc
5f53713eef2a6a230ec4d2317fbcea16
frees up registers/memory that has been written to
int i = 0; for (i = 0; i < PC; i++) { arm_write_reg(i, saved_regs[i]); } arm_write_reg(PC, saved_regs[PC]); }
0
a175793185848d4a84af67014e3b3be2
3bb5ecbf07d1c66a62865a946462c291
Test availableLocaleList() method.
class JobTemplateLocalesApiTest extends TestCase public function testJobTemplateLocalesList() { }
0
995516ed8d41c37351b194c415091acb
9cd2ab9467394bcac267caeb17c44d2e
positionne l'événement un jour plus tôt
var dateDebut = new Date(event.dateDebut); dateDebut.setHours(dateDebut.getHours()-2); var dateFin = new Date(event.dateFin); dateFin.setHours(dateFin.getHours()-2); this.calendar.deleteEvent(event.title, event.location, event.description, dateDebut, dateFin); }
0
e04ddb517344b2dab5569b6532286e0b
9c8caf3e0110f01cf983212713e6f0f0
Fill the crypt array with the ascii values for use by the encoding process.
arr = [[], [], [], []] for i in range(4): for j in range(66): arr[i].append(0) arr[0][0] = '0' arr[0][1] = '1' arr[0][2] = '2' arr[0][3] = '3' arr[0][4] = '4' arr[0][5] = '5' arr[0][6] = '6' arr[0][7] = '7' arr[0][8] = '8' arr[0][9] = '9' arr[0][1...
0
0ec9f055fa52d673fff0b3d89fd73256
ba505ab64e2399509436ace4a834bca7
Returns the dummy log to use if none has been set
abstract class Rx_Model_Abstract extends Rx_Configurable_Object public function getLog($type = null) { static $_dummy = null; $_type = ($type !== null) ? $type : '_default'; $log = null; if (array_key_exists($_type, $this->_logs)) { $log = $this->_logs[$_type]; } ...
1
7d071cad69d3cbb40a6abb95c90035e7
42da8fb5a1ddea8856914b375f0b2b1f
Set the sort direction for field: InactiveDt (BILL_INSERT_GROUPS.inactive_dt)
public class BillInsertGroupMapObjectFilter extends BaseFilter implements Serializable public boolean getInactiveDtSortDirection () { return this.InactiveDtSortAscending; }
0
0a6e091e87420c4e91a2796915218986
9616be277925c0762057b782d79f9dd2
Template for writing igbpveg.nml namelist file
{ fileName <<".........M1(Msun)"; fileName <<"...............R1(Rsun)"; fileName <<"...............L1(Lsun)"; fileName <<"..................Teff1(K)"; fileName <<"...............I1(MsunRsun^2)"; fileName <<"...............M2(Msun)"; fileName <<"...............Pspin(min)"; fileName <<"...............Porb...
0
b4970c71b004bd2c5a3e6e2f8baa9389
d054c8c1f6b1005f125da9182e83e853
This function updates the addresses of data labels in the label tabel.
void update_segment(Assembly* assembly, Segment* segment) { int pos; int id; int i; int location; unsigned char c; int counter; pos = counter = 0; while (MS_Read(segment->mask, &c, 1)) { if (c != 0) { for (i = 0; i < 8; i++) { if (!counter && (c & 0x80)) { MS_Seek(seg...
1
a109e867eadc53be25b1f6c0a75bf693
f1ed046575897a5732421e8e8d7a6ce3
This function is responsible for check if Perfotron dashboard is already installed or not
$locator = new TableLocator(); $tableReg = $locator->get('Installations'); $result=$tableReg->getConfiguration('basic'); return ($result['result']); }
0
84aa67f12191de60fcd2b5879088fc12
837d8cd5f598f583cec9224a5d3040ce
Returns \c true if the undo stack contains no commands.
class zUndoStack(object): def is_init(self): return self.__undo == 0
1
9ce491e6cf0a1129bf5579c64c3008f3
91673aef5eb3ab367f10a53aa2ffbd9c
Implements ISet{int}.ExceptWith <remarks> <para>For this operation is irrelevant wheter IEnumerable{int} is a set (contains no duplicates) or not.</para> <para>For this operation argument set IEnumerableOf{int} is not required to be within BitSetArray.domain.</para></remarks>
namespace Ngol.Collections.Generic void ExceptWith(IIterable<T> other);
1
11dfcd6823cd7130c4489ca774ddb665
33411a5d718dcc7133a2af97f46eda76
클릭시 풍선생성
public class MainActivity extends AppCompatActivity @Override protected void onCreate(Bundle savedInstanceState) public void onClick(View v) { launchActivity("fish"); }
0
fdcf85bde7eea9eb3a87b143e7504551
f35ccd3cd7fd634f03d7f2f28c46fc60
Exibição de ecran de vitória
cprint(f"""+-------------------------------+ | Bem-Vinda(o) ao Jogo da Velha | +-------------------------------+ | Author: {__author__} | | Date: {__date__} | +-------------------------------+\n""", 'green', attrs=['bold'])
0
9cef3ded68a87a56634d4e9d5d7c8d93
4ffcc56b7bef7ea947254f15ac820b00
Gets rows from the datasource based on the PK_SalesPerson_SalesPersonID index.
namespace autotask.CodeGen.DataAccessLayer.SqlClient public class Template_peopleRepositoryBase : ICodeGenBaseDataFiller public static void GetBysales_order_id(TransactionManager transactionManager, int sales_order_id, int start, int pagelen, DataSet ds, string tableName) { if (transactionManager.IsOpen) GetBysal...
0
cae6b848fdc11011790293fd469aa3a0
b5fb301287c77b06c921a0af4328a4a2
处理多个图片链接,并用逗号连接成字符串
let linkInput = document.getElementById("findImgMulti").value.split('\n'); for (let i = 0; i < linkInput.length; i++) { let objImg = document.createElement("img"); objImg.setAttribute("src", linkInput[i]); let element = document.getElementById("nextImg"); element.appendChild(objI...
0
f2599d591018834f2b73da9adb1265c4
0158c25e497b67cc44de9d1a61accdfc
判断当前用户是否可以回复当前咨询
public class CommonConsultService private Boolean canRequestConsult(Consult consult) { Boolean returnFlag = true; ConsultDAO consultDao = DAOFactory.getDAO(ConsultDAO.class); Integer requestMode = consult.getRequestMode(); String requestMpiId = consult.getRequestMpi(); String mpi...
0
5c9e27d2d16c39e5877a42381eeebf47
bf58b79ce35ca350fa02122723bd97bf
calculate net force in Y exerted by all planets in given array
double netForceY = 0; for(Body b : bodies) { if(! b.equals(this)) { netForceY += this.calcForceExertedByY(b); } } return netForceY; }
1
ff6aa86b73ca7f9085a1cf93d9aa8360
644552e590598b5d512021c5a05ec1e5
一个化验报告单的抬头信息
namespace HospitaPaymentService.Wzszhjk public class OperatorHandle public static XmlDocument LaboratoryTestsReportNameInformation(ParameterHandler handler) { XmlDocument rtdoc = null; string doctadviseno = null; try { doctadviseno = handler.ge...
1
520d8040c373fb2362fd9e04092d84f6
1f679c139b5f4766f528bd6be03a38ec
Check to see if FontScript property is set
namespace Amazon.QuickSight.Model public partial class ReferenceLineLabelConfiguration internal bool IsSetFontConfiguration() { return this._fontConfiguration != null; }
0
d494cb37af746267f3ebf18a9e894756
ae0afc5ec32c2675e11cd0969fff3434
Находит максимальное количество автомобилей на парковке за определенный период
{ StringBuilder builder = new StringBuilder(); builder.Append("SELECT COALESCE(r1.type, r2.type) AS type, SUM(price) AS s FROM toll "); builder.Append("LEFT JOIN gps_gate ON gps_gate.id = toll.gps_gate_id "); builder.Append("LEFT JOIN road r1 ON gps_gate.road_numb...
0
03078f32b382337dec2634050e79b5a6
e969f16c8aac328325c3ede0b6e1abf5
数据解包,解包顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpLLToClaimDuty>历史记账凭证主表信息</A>表字段
public class LLBCaseSchema implements Schema, Cloneable public boolean decode(String strMessage) { try { EditNo = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 1, SysConst.PACKAGESPILTER ); CaseNo = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 2, SysConst.PACKAGESPILTER ); RgtNo = StrTool.getStr(St...
1
950b6583f13e5f7062af5a1b2ce02139
49e00821300b6a923118080fd59fa8c9
This method is used to update multiple the ClientTypeModuleAccess details.
{ ENTResponse oENTResponse = new ENTResponse(); try { SafeTransfer.DATA.catClientesDATA datacatClientes = new SafeTransfer.DATA.catClientesDATA(); return datacatClientes.updatecatClientes(entcatClientes); if (oENTResponse.Genera...
0
0e93e7c0ebb051c4427f3c06803079dd
1bc6ef3c217ed1783814339deffba5e8
Attempts to log in a receptionist.
try: ID = str(int(ui.loginLineEdit.text())) except Exception as e: print(e) self.showError_message("Error: ID Entry must be a number") return successful = core.log(ID) if successful: ui.loginLineEdit.setText('')
1