query_id
string
corpus_id
string
query
string
code
string
label
int64
af584d2b21a00c7fd35241e350d6b0f7
14afe0e15d5b399bbbf6505c3a179c0c
https://stackoverflow.com/a/8534275
va_list vaArgs; va_start(vaArgs, fmt); va_list vaArgsCopy; va_copy(vaArgsCopy, vaArgs); const int iLen = vsnprintf(NULL, 0, fmt, vaArgsCopy); va_end(vaArgsCopy); int iSize = iLen + 1; char* buff = (char*)malloc(iSize); vsnprintf(buff, iSize, fmt, vaArgs); va_end(vaArgs); std::string s = buff; fr...
1
12349a5868a0a00682f561b2d4e38d8f
5b7360c1a921ca90f89604c49ccc210f
Map the sparse tensor to dense storage.
class TableHandler(object): def _sparse_lookup(self, inputs): values = self._lookup_and_mask(inputs.values) values = self._replace_oov_buckets(inputs.values, values) indexed_data = sparse_tensor.SparseTensor(inputs.indices, values, inputs.dense_shape) return...
0
34b5e0645ec36ac3f1c5baf10d7b8e00
972d1922b6683dd4512a4d0ba05d2e88
Get the number of frames input by a transport.
void __stdcall gettotalnumframes(int &numberOfFrames){ int numberFrames; if(!hwInit) {numberOfFrames = 0; return;} if(!hw->vidInit) {numberOfFrames = 0; return;} if(hw->mediaType==1) {numberOfFrames = 0; return;} if(loggerOn) { logger = fopen(loggerFileName, "a+"); fprintf(logger,"gettotalnumframes ");...
1
c7da0dc5317aa0eba8ef8530df7479b0
dd0a46f00c4b554787e4994c4b1392b2
计算反向传播结果(最大值池化)
class MaxPoolLayer: def execute_backward_pass(self, d_pool): doutput = np.zeros(self.input.shape) output_x = output_y = 0 for input_index in range(self.input.shape[0]): for y in range(0, self.input.shape[1], self.stride): for x in range(0, self.input.shape[2], self.st...
1
5543347ed0d4cbc1737722823ecbdd4d
078e6667cce7e4fe65d2d750fde752ba
将邮件中的有用信息提取出来,存储到dic中
def mailContentToDic(file_path): file = open(file_path, "r", encoding="gb2312", errors='ignore') content_dict = {} try: is_content = False for line in file: line = line.strip() if line.startswith("From:"): content_dict['from'] = line[5:] ...
1
8a3d82214ae4e091c54d3a2a0e38f6b5
c6a517bc7c6a87770a3a1da51ddc9a3c
ログインしたユーザーのみWebサイトの閲覧可能にする
public class AccessLogInitAction extends WebBackAction<AccessLogBean> @Override public boolean authorize() { return Permission.ANALYSIS_READ_SITE.isGranted(getLoginInfo()); }
0
8ba4a7168793d1f773e4355dd1fbe446
08d59b29a064e7f3eb4ff768fa43c404
This method uses SHGetFileInfo to check whether a path to a directory exists.
{ string realPath = ConvertPath(path); if (string.IsNullOrEmpty(realPath)) return false; else if (string.Compare(path, "desktop", true) == 0) return true; string[] pathParts = realPath.Split('\\'); for (int i = 0; i < pa...
1
ddec91cf065a03941519d23b4df93e23
fcc6ab3dce5edb57c6b5b3bf6b5f8987
用时间戳获取小时
public class DateTimeUtils public static int getHour(long timestamp) { return getHour(newDateTime(timestamp)); }
1
16f26a6fb639dba7027b1ab534180483
136973d8a0a97f003f32c2ffb44d89b0
ConcatValues concatenates property, value & salt into one byte slice.
func SHA1ByBytes(value []byte, salt ...[]byte) (result string, err error) { var s []byte if len(salt) > 0 { s = salt[0] } h := sha1.New() _, err = h.Write(value) if err != nil { return } if s != nil { _, err = h.Write(s) if err != nil { return } } result = hex.EncodeToString(h.Sum(nil)) return }
0
9b4e0b5d6a080bf2cea4c98490ddf758
fdd9aae546abb5d313a34968e047c3f9
Executes the POP3 List command.
class Pop3Client extends Pop3Protocol list(listener: (messages: Array<[number, number]>) => void, id?: number) { let cmd = "LIST"; if (id !== undefined) { cmd += " " + id; } this.sendLine(cmd, line => { if (id !== undefined) { listener([this.parseIdAndSize(line)]); } else { ...
1
a7538d658e7825ebbcb87f57c229ec9e
551f198cdc5b807754ae97c071d1e769
마이페이지 - 1:1 문의 : 1:1문의 내에서 내가 작성한 문의글만 가져오기
@Slf4j @AllArgsConstructor @Service public class MemberServiceImpl implements MemberService @Override public List<InquiryVO> getMyqInquiry() { log.info("getMyqInquiry()......"); return memberMapper.getMyqInquiry(); }
1
3b7a584bbb8234043a30d97743d28452
fd70ed9c84a5a85ee5204015d44d127f
Enables the command queue. none none N/A
void cxl_memcpy_activate_queue(void) { cxl_memcpy_queue[0].cmd |= MEMCPY_WE_CMD_VALID; }
1
74baced87ba4973345ce82d46f046aa3
4a3ae3049fbdb0c805b46ada4f916625
Check if any inv/rem critical key has changed. If yes, call the respective handler for further processing
{ if (!shiftRegStabilizationActive) { if (!Util_isActive(&keyScanRepeat)) { Util_startClock(&keyScanRepeat); } if (keyTimerEvtFunction) { keyTimerEvtFunction(); } } }
0
503472a729af17c224c9720156b54f48
070acdf2de33cd7272081e5a3a5aeab5
Draw an ASCII table with the results.
for var in xrange(n): print col_names[var], ' ', print '\n', '-'*(4*n - 1) for row in result: for col in row: print col, '|', print ''
1
dfe7c35a758a8f4dec4a1fd8cf5df479
a44d04ec2e5b3fe8244383f0ad655455
整合多頁的文章標題訊息物件
if(tw_message.articles.length>0){ var $message; for(var i=0;i<tw_message.articles.length;i++){ var img; if (i > 0){ addSubMessage(); img = '<img " style="max-width:90px;max-height:90px;" src="../image.do?path='+tw_message.articles[i].pic+'"/>'; } else { img = '<div style="width:384px...
1
2169250a0d99eb492528764b1df68ac7
ebde4c39d24fd8445e1bdd58055dcb93
Move the current tab to the left in the tab order.
namespace Gwen.Control.Internal public class TabButton : Button protected override bool OnKeyLeft(bool down) { if (down) { var count = Parent.Children.Count; int me = Parent.Children.IndexOf(this); if (me - 1 >= 0) { ...
1
5ccd707fdc2ba52eac81130ab78bec1f
071754930467fd52294560bd49e2bcb9
GET /api/v1/cars
class Api::V1::CarsController def create if(!(user = tokenAuthorize(params['session']))) head(:unauthorized) return end puts params.inspect carrequest = params['car'] car = Car.new(:model => carrequest['model'], :test_drive => carrequest['test_drive']) car.brand = Brand.find(params['car']['brand_id'])...
0
ac40c753e36aa25a060eedc12806ca3a
575bddef25fa04df200f61bd4da140bb
Fit a trend to fluxes in function of one or more jitter parameters
for obs in observations: p0 = np.zeros(2) try: obs.jacchia_fit, _ = scipy.optimize.curve_fit(jacchiaLagFunc, obs.time_data, obs.lag, p0=p0) except RuntimeError: obs.jacchia_fit = p0 obs.jacchia_fit = np.abs(obs.jacchia_fit) ...
0
b439198af90d5bcabfef50fbe7239c0c
aaecef355a64274a2c1ba219244fe687
反色图像
return function(inImg) { var w = inImg.width; var h = inImg.height; var outImg = createTmpImage(w, h); for (var y = 0; y < h|0; y=(y+1)|0) { for (var x = 0; x < w|0; x=(x+1)|0) { var i = (y * w + x) * 4; outI...
1
69db8ca7edde89940bbf37b4d4206142
9b00e935e9e3ceca16dcca2cf5a371ac
This is called to initialize the GRPC client to autopilot. Once `autopilotReady` is set to true on the store GRPC calls can be made to the client.
abstract class BaseFragment : Fragment() protected abstract fun onDriveClientReady()
0
c07bbed1b16c89262eaf5cf7a4465b5f
6372b84208f3504cd9b89d3dfe155b96
get the number of selected elements in the grid
public class Board public int numberSelected() { int count = 0; for (int i = 0; i < myBoard.length; i++) for (int j = 0; j < myBoard.length; j++) if (isSelected[i][j]) count++; return count; }
1
338be61519c94580c17593055e847ba3
bfd889c0609f767f0e03f3c13628486b
Convert city into geo-coordinates and focus on map
var input = document.getElementById('architect_city'); var autocomplete = new google.maps.places.Autocomplete(input); autocomplete.setTypes(['(cities)']); autocomplete.setFields(['address_components']); autocomplete.addListener('place_changed', function () { let place = autocomplete.getPlace...
0
bc6d959afdae15eb8c88e4c52198cdaf
9ba66b7d45fdf7e60bb9e3dd050012d8
불용어 및 특수 문자 등을 제거한 뒤, 어근만 추출하여 list로 반환합니다.
class BayesianFilter: def mysplit(self, text): results = [] twitter = Twitter() malist = twitter.pos(text, norm=True, stem=True) for word in malist: if not word[1] in ["Josa", "Eomi", "Punctuation"]: results.append(word[0]) return results
1
787877219142f3e84941d4202bd9181c
6df485cf23856942a3801b21d1f56603
get a summed value for all stats in this set
int Fitness::getSumOfAll(){ return _IniAttack + _IniSpeed + _IniDefense + _IniIntelligence + _IniMagic + _IniEnergy + _IniBloot + _IniRunesPower;; }
1
2360a4a23f48a72f37567feb4eb82bd2
af181dc14d76303cdc326f0ea8f0b2e2
Replaces any references to internal activity list specifications with fully-qualified versions that include the name of the current file.
$this->add_related_files('mod_promising', 'intro', null); $this->add_related_files('mod_promising', 'xslfilter', null); $this->add_related_files('mod_promising', 'cssfilter', null); $this->add_related_files('mod_promising', 'localfile', 'deliverable'); $this->remap_tree('requirem...
0
7d6857c2c9f5e898a0c1c7c7e1bc0e15
919e1692868d9e14dcebbbfd90b94cb3
Gets the names of tag items from their ID.
{ var items = GetItems(state: State.all); return items.Where(item => item.Tags != null) .SelectMany(item => item.Tags) .GroupBy(item => item.Name) .Select(item => item.First()) ...
0
47cda6f68f99d8dc784d0acaecf7eafb
429f40117b26470cb28c9b9219e3924f
Ensure we have a valid MAGNUMDB enum
class TestEnum: def test_set_enum(self): obj = UselessThing(useless_enum=UselessEnum.enval1) DBSession.add(obj) DBSession.flush()
0
d736cf0a2b7f1751e7433fc7f9b86b3d
37e21fc520c450ce6e5a2311d6741a80
随机出一张牌
if len(self.pokerUnUsd) == 0: self.__init__(False) pokerfapai1 = random.sample(self.poker, 1) self.pokerUsed.append(pokerfapai1[0]) self.pokerUnUsd.remove(pokerfapai1[0]) return pokerfapai1[0]
1
1a587b516e8b7c39c9ee513793d5eb3c
41cb593692d0c249435c3b82bf9a6adb
Returns the email addresses of any stored credentials
class MiiUserProfile public function getEmailAddresses() { return $this->emailAddresses; }
1
5d769795f68f3afad3273d4acc5f142f
f776baf87e0af20305a848ae4c0bb65a
получение счета матча общего и по периодам
{ $calcTypeCode = ($scheme == Cfg::SCHEMA_EU) ? Cfg::CODE_TYPE_CALC_BONUS_TEAM_EU : Cfg::CODE_TYPE_CALC_BONUS_TEAM_DEF; $req = new AGetPeriodRequest(); $req->setBaseCalcTypeCode(Cfg::CODE_TYPE_CALC_VALUE_TV); $req->setDepCalcTypeCode($calcTypeCode); $r...
1
234b152a0607d1b9e38d18746b082ece
88ae02661594d92d124497abd68db579
更改两个 listBox 上的数量提示
{ this.textBox_paramCount.Text = count + ""; this.textBox_startParamIndex.Text = from + ""; }
0
4a9e93e1accb895a1f7b5e42f9820bd1
720bc9de1bd04c0b70682310cc66ea0d
Check whether the device is connected to WiFi network and it is active connection otherwise return false
public class Network public static boolean getWifiConnectityStatus(Context context) { conMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); activeNetwork = conMgr.getActiveNetworkInfo(); if (activeNetwork!=null && activeNetwork.getTypeName().equals("WIFI")) { ...
1
8c86600db8890cb5f676712346650cc9
17273d2a9a230a55ea4283e6d03e57fa
Get the last update weight from the local repository.
class Nodelist(object): def get_last_updated(self, node_id=None): if not node_id: node_id = self.conn.id dt = self.conn.client.hget(self.nodelist_key, node_id) return int(dt) if dt else None
0
36ea82dd210ff4cd658ba957206586df
979e6392a0606119a352365633e59ccb
Test case for get_order_by_id
class TestMeApi(unittest.TestCase): def test_get_order(self): pass
0
7adfddb59678a53b48282aff3b3e65a4
a0583aa7463a70f5c5a20f6485018c3c
Returns the value of the '<em><b>Guid2</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Guid2</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc --> extendedMetaData="kind='attribute' name='guid2'"
String getGuid1();
0
edc7fc9e605d33bcca65d7bbcd2fbd1e
d02fcf436936daf5b3302923c6476a83
Evalua y produce una lista de promedio radial de densidad y presion
int i, index; init_to_zero(rho,length); for (i = 0; i < P->N_cells; ++i) { index=radioSq(P, i); rho[index]+=P->P[i]; pres[index]+=P->P[1*P->N_cells+i]; } for (i = 0; i < length; ++i) { if(contador[i]==0){ rho[i]=-1; pres[i]=-1; } else{ rho[i]=rho[i]/contador[i]; pres[i]=pres[i]/contador[i];...
1
2dfef68a1ecdac458c653675acdbc0da
1976725317d0df8a9a7de6903d36e121
Data provider for testSeek
return array( array( array(), 101, array(), 0 ), array( array(100), 101, array( ...
1
b71203e551b2a8d1dc28ee82d48642b3
17a8a715ff992dc042d550f2198d05d6
添加磁盘进度显示
$para = [ 'idisk_list'=> $diskListStr, ]; $curl_result = Curl::post(INFINITY_DISK_ADDWIZARD, $para); return $curl_result; }
0
903f41e2d58e4270e0a507ed28810cb5
f8336868b92de362afc26cb6f1ad0235
根据关键字和类型查询商品
@Service @Slf4j public class SearchService public SearchResult findGoodsByKey(SearchRequest searchRequest) { String key = searchRequest.getKey(); Integer page = searchRequest.getPage(); Integer size = searchRequest.getSize(); NativeSearchQueryBuilder builder = new NativeSearchQueryBuilde...
1
21ca426f67b8d47332b47e00070110e2
2e24d580440e420bc1a878c36b55c0a1
Get Pytorch Transform function for test data Returns: Compose: Composed transformations
def test_transform(size, crop): transform_list = [] if size != 0: transform_list.append(transforms.Resize(size)) if crop: transform_list.append(transforms.CenterCrop(size)) transform_list.append(transforms.ToTensor()) transform = transforms.Compose(transform_list) return transfor...
1
85bcc5e214ba4d2c61ccc319fd215116
ecfe1c12a83f5a03ff4514a74d2fa90f
加载投诉列表
abstract class Presenter extends BasePresenter<View, Model> public abstract void complainList(Map<String, String> params);
1
b6bebc905c3df39ddc83361fbc0ab003
c46a7a02bb47e1916ff736f7aa6f91c7
Check if it is possible to go from p1 to p2 given the elevation difference - maximum_grade = max steepness before impossible to go to p2
dy = abs(p1[0] - p2[0]) dx = abs(p1[1] - p2[1]) return (dx > 0 and dx * 0.4 > dy)
0
ffa7b0c9ac1e5c89394d1f8d0491962b
6130767926471656a98888c6bcae9b04
@brief set route destination
int linphone_proxy_config_set_route(LinphoneProxyConfig *obj, const char *route) { if (obj->reg_route!=NULL){ ms_free(obj->reg_route); obj->reg_route=NULL; } if (route!=NULL){ SalAddress *addr; char *tmp; if (strstr(route,"sip:")==NULL){ tmp=ms_strdup_printf("sip:%s",route); }else tmp=ms_strdup(route)...
1
bc0ffca1cf5eeb80c9ee7cdac6c389f6
82dfc1e4a982ed49d628ec92e984ee3f
Renvoie une chaîne de caractères sur deux lignes donnant les coordonnées.
sprintf(buff, "Pos [ligne : %i, colone : %i]", self.ligne, self.colone); return buff; }
0
096b1c3b9b7542ab44100c3cd67ea698
c6862635cde80b62314727028ec46784
判断是否到达尾部
public class ChapterTextActivityThree extends Activity implements View.OnClickListener, TouchListener @Override public boolean currentIsLastPage() { boolean should = currentBottomEndIndex < textLenght; if (!should) { currentTopEndIndex = currentShowEndIndex; final int nextInd...
1
51ca04099eae6cdc615df15dd5daf9e4
613b2d5deabf1a9f2aeb949aa8b73b05
Set the sort direction for field: HotReqBillRefNo
public class InterimBillObjectFilter extends BaseFilter implements Serializable public void setHotReqBillRefNoSortDirection (boolean ascending) { this.HotReqBillRefNoSortAscending = ascending; }
1
7931e3abc177fbff422482a86bcacd9c
0ffb1a432d417bdfcfadedb2871d314f
ViewモデルのインスタンスからDTOモデルのインスタンスを作成する
public class CategoryMappingHelper public static CategoryListDTO viewToDTO(CategoryListSiteView view){ CategoryListDTO dto = new CategoryListDTO(); dto.setId(view.getId()); dto.setText(view.getName()); dto.setThumbId(view.getThumbId()); return dto; }
1
1407012474f2d32f9d349946cd9349cf
5016e5f8b79821de0d3493be9293e4b7
logging模块配置: 格式及日志级别
def my_log__config(): logger = logging.getLogger() logger.setLevel(logging.INFO) to_1 = logging.StreamHandler() to_2 = logging.handlers.TimedRotatingFileHandler(PRO_PATH + '/log/mylog.log', when='h', ...
1
1fe080a2a4f15f5c74e508730e28e649
cda3bfa737d2312d8a086b0fc99a5661
获取base64图片byte大小
@JvmStatic fun getBitmapSize(bitmap: Bitmap)=bitmap.byteCount
0
432e3767b0e1f2785398a72fbb29ebe7
278ed2eaa242a7fc72578dcedd45cd3c
moves start angle towards end angle by shift amount (all in radians) clamping the result and choosing the shortest path. start can be less than or greater than end. this method works very similar to approachAngle, the only difference is use of radians instead of degrees and wrapping at 2*Pi instead of 360.
namespace Nez public static class Mathf [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float approachAngleRadians( float start, float end, float shift ) { float deltaAngleRadians = Mathf.deltaAngleRadians( start, end ); if ( -shift < deltaAngleRadians && deltaAngleRadians < shift ) retu...
1
bbdf9d04eec961156cdf54a5c8554d30
b2448b649f35e315fe47d6fb76c55a51
初始化,给lua绑定onTooltip方法,获得lua里的文本
function LieExp_OnEnter() LieExp:ShowExpToolTip(); end
0
b4b8dc77f9eb8c232007cf7dd32f0fd6
13f7287dd3b98ffc8c678ead9406803f
Obtém todos as entidades em que a especificação foi satisfeita
namespace Esqueletus.Api.Domain.Validation.Contracts.Specification Task<bool> IsSatisfiedBy(TEntity entity);
0
e3e84300fd3ddd61a5d4b4e1ffe3bc9c
9703e5e24d14de33326cfa51422f9542
Normaliza la operación de términos en una forma estándar para operar
def normalize(operation, expr): dualoperation = operation.getdual() expr = expr.literalize() expr = expr.eval() def rdistributive(expr): if expr.isliteral: return expr args = tuple(rdistributive(arg).eval() for arg in expr.args) if len(args) == 1: return a...
1
2bb197aa1818b5ad5385dad81eab892f
dd724ec854230796530f04c5bf486504
从串口1数据缓冲区读取全部数据,并清零缓冲区
int ClearPort(MM::Device& device, MM::Core& core, const char* sPort) { const int nBufSize = 255; unsigned char sClear[nBufSize]; unsigned long lRead = nBufSize; int ret; while ((int) lRead == nBufS...
1
afa4923a5cc4a0cc81d5cce67714de41
8cd58e5a586aa4a20bd0c0da1a528b81
Creates a step 3 sub-problem. Returns: A newly created optimization problem.
op3 = QuadraticProgram() binary_size = len(self._state.binary_indices) for i in range(binary_size): name = self._state.op.variables[self._state.binary_indices[i]].name op3.continuous_var(lowerbound=-np.inf, upperbound=np.inf, name=name) quadratic_y = self._params....
1
b56b05d3db4c21db9c2b8dd92c5f6adc
9aac4e5eef0bea95cfcd12da4f91b5f2
透過完整路徑,刪除檔案 只可以刪除檔案,不可以刪除資料夾
namespace jx_upload class Functions public static void DeleteFile(string path) { File.Delete(path); }
1
601d63ca1d6de44a98e2ebfd0cbdf615
3823bb00040b0467a23b96dbe73b8107
首先获取CLUSTER_OP_TYPE这个系统环境变量 如果是"create",就走创建集群的逻辑,如果是"scale",就走扩容或者缩容逻辑
Integer saveOpt(ClusterNodeRequest request, String operator);
0
84b0b37e8761139e06011ee6936737e9
6a171d8e72b4475a7a48f12ec26f72bf
Setup Main Area containing left button bar and right panes
HorizontalPanel mainPanel_HorizontalPanel = new HorizontalPanel(); VerticalPanel leftPanel_VerticalPanel = new VerticalPanel(); leftPanel_VerticalPanel.setStyleName(CSS_STYLE_COLUMN); mainPanel_HorizontalPanel.add(leftPanel_VerticalPanel); VerticalPanel centerPanel_VerticalPanel = new VerticalPanel(); cente...
1
f7c6c7a1ee72eff087fc06eedbd6e313
2090c462b591a2332a97453d92016675
Se habilita la opción de Guardar cuando se cambia la opción en el ComboBox.
namespace Diccionario public partial class CIngreDat : Form private void dgvIngreDat_CellValueChanged(object sender, DataGridViewCellEventArgs e) { int i; bool b=true; for (i = 0; i < LA.Count; i++) { if (dgvIngreDat[i, 0].Value == null) ...
0
b1323c57160cf454f218b0ffc73f439e
d12d6f84a502ba996e695b9fea0306e9
Given the name of a text file with a single word on each line, the longest word is returned (File IO 1)
public class Utility public static String alphaWord(String filenametxt) throws IOException { BufferedReader theFile = new BufferedReader(new FileReader(filenametxt)); String strLine; String strAlpha; strAlpha = theFile.readLine(); if(strAlpha == null){ theFile.close(); return ""; } ...
0
64a0ae271269e929812c0433d730d1a7
211ca2821e7f03a0aed7b08c7105083c
returns the death master record if there is one.
void mondied(mdef) register struct monst *mdef; { mondead(mdef); if (mdef->mhp > 0) return; if (corpse_chance(mdef, (struct monst *)0, FALSE) && (accessible(mdef->mx, mdef->my) || is_pool(mdef->mx, mdef->my))) (void) make_corpse(mdef); }
0
e081b4bc0cc3ba70de8e6ccc3ee11534
02bb836de476481238364e6e5987b8e1
Check the Operation Mode for the Service Trade Hook
if(opmode == 2 || opmode == 3){return false;} else{return true;} }
1
1683643b5f042b6cb2f373f8090b293f
07ebb20130eccb5759f3ed6b6615ac05
@brief Check the transmission status of a CAN Frame.
CAN_STATUS can_tx_status(CAN_Port* CANx, CAN_TX_MBX mbx) { uint8 state = 0; switch (mbx) { case CAN_TX_MBX0: state |= (uint8)((CANx->TSR & CAN_TSR_RQCP0) << 2); state |= (uint8)((CANx->TSR & CAN_TSR_TXOK0) >> 0); state |= (uint8)((CANx->TSR & CAN_TSR_TME0) >> 26); break; case CAN_TX_MBX1: state |= (uint8...
1
0cb3fb11dd4531a9ce6ab85f9a85f816
afa1667f55662f327327872b712135c8
@see MyrmidonEditorLayoutElement.ProcessEvents(Event) The override method call ProcessEvents on all element and apply a "OR" operation on result to determine if we need to repaint the window
{ if(m_bIgnoreEvents == false) { SetControlStates(); } return false; }
0
1b9df4da97a47d7611a36a391d07daea
05f05526e5b34baa5e6bad3381fe320e
The port used for https requests to the origin.
class GetOriginResult: def https_port(self) -> Optional[int]: return pulumi.get(self, "https_port")
1
aa5f03af95c17e618df5d9322c4021e4
244bce132d50f80620759b04e6bbb84a
Request the tag map of all connected peers.
return new Promise((resolve, reject) => { const promises = []; this.tags().forEach((tag) => { if (tag.canBeLoaded()) { promises.push( tag.request() ); } }); Promise.all...
0
ffe1287dc14854deb87e6999df87d729
e8239610ed77b7597564873a4f699b99
# Function: Write the tibble content to disk. Create the directory if # it does not already exist.
target_dir <- dirname(target_file) dir.create(path = target_dir, recursive = TRUE, showWarnings = FALSE) write_csv(content, target_file) cat("Content written to disk!\n") }
1
d19f0bee2617ed7c3fd0415f8eabc041
eb8d0556e38ddcaf44db755de896b730
Given a track, transfer its cover art if missing.
if ( !file_exists($file) ) return; $cover = substr($file,0,strrpos($file,'.')).'.jpg'; if ( file_exists($cover) ) return; if ( file_exists(preg_replace('!jpg$!','png',$cover)) ) return; $zip = zip_open($file); if (!$zip || is_int($zip)) { $GLOBALS['logger']->error("! Could not ZIPopen '$file'",'SCAN...
1
9da7eea71226083bc7adbc07069631b0
52f22287f9a26fa0861fe5beeec9f16d
when option 1 of the two option selection is pressed while chatting
if (click.getClickCount() == 2) { App.ChatWindow cW = window.new ChatWindow(buddyList .getSelectedValue().toString()); String buddy = buddyList.getSelectedValue().toString(); int i = buddy.indexOf(':'); if (i != -1) { buddy = buddy.substring(i + 2); } chatWindows.put(buddy, cW); chatWind...
0
d461a0ed6c55441aff04288d3fbc3ad5
c02c95cdffe66d61842e10d5d84e2f69
根据婚姻的两个人获得对象
p1_id="text", p1_begin="int", p1_end="int", p2_id="text", p2_begin="int", p2_end="int", doc_id="text", sentence_index="int", sentence_text="text", tokens="text[]", lemmas="text[]", pos_tags="text[]", ner_tags="text[]", dep_types="text[]", dep_token_indexes="int[]", ): MAR...
1
bf67984e84e0b4d6a5daf62e46fdf193
1bb9fc318396c5a1de45318539431f11
Validates a EnsEMBL acc string.
def valid_uniprot_ac_pattern(uniprot_ac): ac_pat = "[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9]([A-Z][A-Z0-9]{2}[0-9]){1,2}" if re.match(ac_pat, uniprot_ac): return True else: return False
0
43333fcac6d154ebb876b94514b8ed4d
40e2227942ab883a85d5cf784bd79dab
flips the visibility when creating new profile or not
{ if (Newprofile_panel.Visible == false) { Newprofile_panel.Visible = true; } else { Newprofile_panel.Visible = false; } }
1
f964c4ed001a98042485967d7bc359e3
2a10cecadb9633fbfccfbbe01d873f50
Funkcja aktualizująca wyświetlanie wartości surowców, ich generacji i sprawdzająca warunek kończący rozgrywkę
textgen.setString("Generation: " + std::to_string(generationNum)); textfit.setString("Best fitness: " + std::to_string(bestScore)); window.draw(textgen); window.draw(textfitgen); window.draw(textfit); window.draw(textprog); }
0
3dbff431bff16c71fecff1251a68e424
996c00f456f58700ea3875666642ec08
A test to see if P1 is on the same side as P2 of a line segment ab
bool Triangulate::SameSide(AGVector a, AGVector b, AGVector p1, AGVector p2) { AGVector v = b - a; return (AGVector::crossProduct(v, (p1 - a)).getz() * AGVector::crossProduct(v, (p2 - a)).getz()) >= 0; }
1
f8a1a5c31daf71090ba27f5a1fba70e7
b0fe8aec9f780493524a4c5449415310
telnet access into DUT(sagemCmLANIpAddress), run swversion, the return will be save as a file, version_rg.
try: filename = get_filename(hostname) ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(ip, port=22, username='zhangguangyi', password='p@ssw0rd') chan = ssh.invoke_shell() print (chan.send_ready()) chan.send('terminal length 0 \n') time.sleep(1) resp =...
0
f71f99a79d7a7bfa97a7483fe858d6f1
2973b1bad789659b1ca8caa60a8939d4
Returns a sentence embedding 512-dimensional vector
class Sentence2Embedding(object): # Class attribute model def run(cls, text): model = cls.get_model() return model.encode([text])[0]
1
dc917ca528d59c34c7e781b5c9d709da
bd5a0955622359319ed21a9d3cd4b24f
Write the data frame to SQL.
df = df.copy() if if_exists is None: if_exists = self.out_table_if_exists if table_name is None: if self.out_table_prefix != '': table_name = '%s_%s' % (self.out_table_prefix, self.out_table_name) else: table_name = self.out_tab...
1
51e098bded023a069bc1762278857233
833aafae7f9bdfd4b93f9733f139f3a3
创建一个指向lval Number的指针
lval* lval_num(long num){ lval *lnum = malloc(sizeof(lval)); lnum->type = LVAL_NUM; lnum->num = num; return lnum; }
1
d3c0d381b4d77fa074daba5947d3064a
7968a3ad269a1eea62ef0d6485a3eb3b
Project point from 3D space to 2D space See http://en.wikipedia.org/wiki/Pinhole_camera_model
bool project2 (const Point3 &pt, int &u, int &v, bool useOpenGLCoord=false) { float nearPlane = 1.0; float farPlane = 200.0; Point3 _pt = transform (pt, trf); float _u = _pt.x()*fx/_pt.z() + cx; float _v = _pt.y()*fy/_pt.z() + cy; u = static_cast<int>(_u); v = static_cast<int>(_v); if ( u < 0 || imageWi...
1
fb71b479e9d016644ba16acb46189d5b
dd9605da5361fc68968a4357cba17663
enables/disables the auto grid property
public class IronAjax extends PolymerWidget public void setAuto(boolean value) { getPolymerElement().setAuto(value); }
1
bbcae21d21e384a59d08bd79e57b00cc
f07ca2bcaf789e138f8b5c60a872a23f
Returns a by ref type reference of the specified type reference
class ITypeInfo: def GetRefTypeInfo(self, hRef, ppTI): pass
1
407618d92b134be585ce19b560452565
7bc42f966343b29951b2a3969bd3abde
天罰
function lose() { alert("沉迷游戲 無法自拔 英雄? 不如再來一把!?"); }
0
8f7b2190d6ad289e87b65ac1c8e5a59f
0fcf3291d87d45b8b4761285592d5cfc
清楚所有的要显示的列
if (colCC != null) { colMethodName.getColumn().dispose(); colCC.getColumn().dispose(); } if (colLCOL != null) { colMethodName.getColumn().dispose(); colLCOL.getColumn().dispose(); } if (colCBF != null) { colFileName.getColumn().dispose(); colCBF.getColumn().dispose(); } if (colLOC != nul...
1
97fc305a766057be01b51653293ed106
175bb0bfa1541ae37a92ad13c48f0478
Menyiapkan objek replikator.
class monologManager internal fun nextReplik() { replikCounter++ characterCounter = 0 stopAnimation() startDialog() }
0
58ef958e5d80de5508b21f530af7269d
364ee4c51e951c2d950e1d7412ecc6b1
سرویس پاسخ به درخواست عضویت در خانواده
namespace BL public class ChildBL public static bool UpdateTheStatus(int id) { child c = volunteeringET.child.Find(id); if (c != null) { c.status = EStatusChild.ACTIVE.ToString(); string password = GlobalBL.ToRaffleAndPostUserNameAndPasswo...
1
f6869d7e711b9e3c2dbd43858759a6df
1e90b965bee984f1f4dd648686206bcc
Spell the reason why we reject/fail to reject the null hypothesis.
class CVQualifierConstraint extends AbstractConceptConstraint public function failureReason($other): string { if (!$other instanceof CVQualifier) { return $this->instanceReason(CVQualifier::class, $other); } if ($this->isConstant) { if (!$other->isConst()) { ...
0
9209cae937686fbead4fb8607fa05aff
f4dc840d3c877f41e805cde5bd939fab
EFECTO: Realiza un mapeo de las columnas de las tablas en memoria con las columnas de las tablas en la base de datos. REQUIERE: Conexion instanciada y abierta hacia la base de datos. MODIFICA: n/a
namespace DataManager.CLS public class DBConexion public void Configurar() { _DATOS.Columns.Add("Usuario"); _DATOS.Columns.Add("Password"); _DATOS.Columns.Add("Servidor"); _DATOS.Columns.Add("BaseDatos"); }
0
cf7a3105198f4ced6be3940b111383f8
8060a4d1d1639e9ac4c6820e4b6a1aa0
根据 MaterialUnitId 获取实体信息。
{ using (MaterialServiceClient client = new MaterialServiceClient()) { MethodReturnResult<Material> result = client.Get(materialCode); if (result.Code <= 0 && result.Data != null) { return Json(result.Data.Unit, JsonRequ...
0
313f3fb7f02b56bc2700a0362e40441f
364d2f78fc2a0b7716e58b4af3c8753d
Recupera el JSON enviado vía post, lo decodifica y lo retorna.
class Controller extends \Symfony\Bundle\FrameworkBundle\Controller\Controller public function fromJson() { return json_decode($this->getRequest()->getContent(),true); }
1
a796f7a11ba6bd0a553977b2ebae5e0b
b32ed01564f50750ffe10c5a7c733ec8
Check that multiple transactions succeeded.
@inlineCallbacks def check(txn): self.assertEquals(len((yield self.node1.activeNodes(txn))), 2) self.assertEquals(len((yield self.node2.activeNodes(txn))), 2) return inTransaction(self.store.newTransaction, check)
0
6a58f7eef47512256a8a1d0cec4264d1
bccfcbc63c19d07eb11e7745b54733ef
该运营负责的疾病是否有需要审核的患者
$diseaseids = $this->getDiseaseIdArr(); if (empty($diseaseids)) { return 0; } $ids = implode(',', $diseaseids); $sql = "SELECT COUNT(a.patientid) FROM optasks a INNER JOIN opnodes b ON a.opnodeid = b.id INNER JOIN optask...
1
a5b5d4ab0e53019cf7763e7c258e5d99
d5c77ddc268ea23924dff504f0e5a6e9
gettxoutsetinfo JSON-RPC command.
class BitcoinRPC public function getTxoutSetInfo() { return $this->call('gettxoutsetinfo'); }
1
526dfb51c2947def6a3b6ddf74c94caa
956c4f4b42aade0d9d2aaa2edf13ca01
literal(types.Type, value any, id.Environment option): string Returns a C++ representation of a value
{ const BoundType* type = this; byte* data = (byte*)value; if (this->CopyMode == TypeCopyMode::ReferenceType) { Handle* handle = (Handle*)value; if (handle->StoredType != nullptr) type = handle->StoredType; data = handle->Dereference(); if (data == nullptr) ret...
1
d9154659734e98257a68c946b836e574
3825f25e01d5aeee4cf804ef70b5d106
Puts the robot in passive mode
public int switchToPassiveMode();
1
a0f5be9a00e477fb41b55179d9b164ff
81cfe898343eee70665e1bf3061acdee
! 复位当前字段,主要指清除缓存操作,例如globalDataOffset
{ $config = $this->_get_offset_config($key); if ( ! $config ) { return; } $offset_exist = isset($this->_offset_data[$key]); if ( $this->_orm_data_is_created ) { if ( $offset_exist && $config['is_readonly'] ) { ...
1
8cb4069904548efcc023a33c5d24646f
1fc4da4a1f8151cf591f1ed2616af55e
create service and its price
class DatabaseSeeder extends Seeder public function run() { $services = [ array( "name" => "Gown", "washing_price" =>1000, "ironing_price" => 1000, "cleaning_price" =>2000, "exp_washing_price" => 1200, ...
1
b7156740575b8c6b3c04bf9c378929de
674516576d9c95b2d658e4de6c815690
minimum time in milliseconds, that a simulated user will wait between executing each task
def get_min_delay(): return globals_variables.get_simulator().min_delay
1
7c9b1b3d20b5c31069d424098ea7510c
eabea02ac9ca709fd55777856223c1d2
[serialization_use
END_DEFAULTS void ACustomInventory::Serialize (FArchive &arc) { Super::Serialize (arc); arc << UseState << PickupState << DropState; }
1
15dc4ace0320b7e51e2a2310606ad785
3bf7ec02bab11b12f6c0597ca205057b
Not Tablosunu Yenile
{ misafirliste(); dataGridView1.Columns[0].Visible = false; dataGridView1.Columns[1].HeaderText = "Rezervasyon No"; dataGridView1.Columns[1].Width = 130; dataGridView1.Columns[2].HeaderText = "Oda No"; dataGridView1.Columns[3].Visible = fal...
0
25ffacc86b1804e07134d0ae56d27adc
9c4cb6cd3119ade4dd932b6d48608a53
Deletes a Quiz entity.
abstract class QuizManager extends Manager abstract public function delete($id);
1