query_id
string
corpus_id
string
query
string
code
string
label
int64
204c869ef485ad6bd477c710b4ffe644
24002b04f3e786efb0f213fe7e2c826d
Add the sync log record for a new footprint
{ UInt64 time = cActivityLog::getTime(); if (pCurrent != pWrite) { pCurrent->EndTime = time; pCurrent = pWrite; } pWrite->StartTime = time; pWrite->EndTime = 0; pWrite->Activity = (activity & kActivityMask) | (iActivity::kSizeSize << 28); pWrite->Details[0] = info.x; pWrite->Details[1] = info....
1
9fbd6b85a40f9f600c5709a2de3b79be
84207e182560fee8775dfbcbf04cfed7
This function evaluates only the shapes during AST construction
bool ETSCustomNode_ShortId_ObjectsHaveSchemaRef::Evaluate( const GDMObject & rxObject, ETSGrammarTree_NodeListenerI *pxListener )const { if ( m_pxNextNode == NULL ) return true; GDMModelI *pxM0 = rxObject.Model(); ASSERT( pxM0 != NULL ); ...
0
f3f89f0b0cabbd18e0361dc2505db1bc
4d0da162224d005c716214f41fd7b675
Saves the track and trace import job.
{ string jobPk = null; Array arrJobPk = null; WorkFlow objWk = new WorkFlow(); try { objWk.OpenConnection(); int i = 0; arrJobPk = jobref.Split(','); for (i = 0; i <= arrJobPk.Length - 1; ...
1
742a0da47aefe34a28a0e7e175a79617
cb17cd46b0607c26895bf4269479fcbe
获取像素偏移模式
namespace EarthView namespace World namespace Display public class DisplayOptions : EarthView.World.Display.Idisplayoptions public override void SetPixelOffsetMode(EarthView.World.Display.EVPIXELOFFSETMODE mode) { EarthView_World_Display_CDisplayOptions_setPixelOffsetMode_void_EVPixelOffsetMode(this.Nati...
0
590ec6d341233731f9291ad32d00bd5d
7d8485ce0f1b1c43f4fae111d7cff7b2
Tile内に配置されたornemntを生成してworldに追加
public static partial class MapWorldFactory static private void buildOrnamentInTile() { foreach (MapFileData.Ornament tData in mOrnamentInTileData) { buildOrnament(tData); } }
1
49a2c44845772bbf1de5a4c169b92a47
455a91186f165342c4f35c1d06e08f70
Generates a SKIP command.
public class ParserStub extends Parser private ParsedCommand generateNext() { ParsedCommand parsedCommand = new ParsedCommand(); parsedCommand.setCommand(Command.NEXT); return parsedCommand; }
0
15d8dd221de2b54229cec1562655c704
1475bce03176c23e267b7905c3224da6
Method to verify the Account Overview page.
return findAccountButton.isDisplayed() && driver.getTitle().contains("Reset Password | LinkedIn") && driver.getCurrentUrl().contains("/uas/request-password-reset"); }
0
07e051782234c03889351a6c64ddc1b0
660ffc3df917d654919c78acc0e8101a
Выбор начального состояния КА
namespace GUI public partial class Form1 : Form private void Initial_State() { bConnectCar.Enabled = true; bManualStart.Enabled = true; bManualStop.Enabled = false; lManualControlsTitle.Enabled = true; lManualControlsEnum.Enabled = true; ...
1
7c89268382e7f9a1e389309729dd4a00
cfc8492538c679088caba4c1b8f5b3ec
Представление: список загрузчиков.
fun loaderStream(storage: Storage, recursive: Boolean = true): Stream<Loader> { try { return if (recursive) { Stream.concat( storage.shelves().stream().flatMap { loaderStream(it) }, storage.loaders().stream() ) } else { ...
1
9c519579ec3ce3da26751794d0d7cca7
b5d53d9a4fc15aa8e6f7dec9edf8148f
Agrega un elemento al final de la lista. El puntero actual no se modifica. Excepto que se trate del primer elemento en ingresar a la lista No contempla datos repetidos. Es responsabilidad de la funcion llamadora
namespace CapaServicios.libColecciones public class clsListaSimpleEnlazada<Tipo> : clsTADSimpleEnlazada<Tipo>, iLista<Tipo> where Tipo : IComparable, new() public bool Agregar(Tipo prmElementoAgregado) { return base.AgregarUltimo(prmElementoAgregado); }
1
17fc0cca90877a6156755e1076976505
2c5a57c7f63281f75c25a63e6e5f06ed
Возвращает все сообщения об ошибках в виде массива
class AppPushMessage public function getError() { return $this->_errors; }
1
6b716c995f1e119e22a65d05ced4a6fd
d98f1c7445a1d65f73c82398b2e89fa7
Gets the countour of a binary mask.
if maskImage.dtype != numpy.uint8: raise TypeError('maskImage must be an array of uint8.') coords = skimage.measure.find_contours( array=maskImage.astype(bool).astype(numpy.double), level=0.5, fully_connected='low', positive_orientation='low' ...
1
e2e1e4b24a7aa1ce3c475d783d74c705
2415bc292acb188536626460a4e5af33
Returns an array of raster values given mesh point data and raster information.
public int[] getPixel(int column, int row, int[] value) { value = this.raster.getPixel(column, row, value); return value; }
0
148d6013c160d22d9906496989c0ac19
4935f4dedfe9bad5900eadebe53f2538
获得用户正在使用的电话号码
String phone_number = db.getphone_byuser(request.getParameter("user_number")); if (phone_number == null) { String jsonStr = JSON.toJSONString("0"); PrintWriter printWtriter = response.getWriter(); printWtriter.print(jsonStr); printWtriter.close(); } else { String jsonStr = JSON.toJSONString(phone_n...
1
c249e94012bf0e30756a008dc23c9a74
3c3db48ec41210072c192766b3415ba6
获取楼层数量接口
public class GenerateBaseDataService public String getFloorCount() { Map<Integer, String> map = Maps.newHashMap(); for (SchemeJudgeObject schemeJudgeObject : getSchemeJudgeObjectList()) { DeclareRecord declareRecord = declareRecordService.getDeclareRecordById(schemeJudgeObject.getDeclareReco...
1
7080f23f9eb1b848d46b797b0c17a219
e587311176f65424f722e0867d1df12a
当点击“添加章节”按钮时,显示Panel2,Panel上有添加章节的控件
{ Panel panel1 = new Panel(); panel1.Location = new Point(56,72); panel1.Size = new Size(264, 152); panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; }
0
151098681362ccb4cdd56996ebefb026
7a8efd76b751de40aa4c6e887eb4c407
숫자금액을 한글로 변환
function num2hangul(num){ num = num+""; num = num.replace(/[^0-9\-]/g,''); var i, j = 0, k = 0; var han1 = new Array("", "일", "이", "삼", "사", "오", "육", "칠", "팔", "구"); var han2 = new Array("", "만", "억", "조", "경", "해", "시", "양", "구", "간"); var han3 = new Array("", "십", "백", "천"); var result = ""...
1
024a75ad705f70c4878df7621ff651c0
7261a3b06383d3724495a8562efe4c73
Loads an sgf file and returns the parsed game tree
try{ return BinaryTree.toTree(BinaryTree.fileToString()); } catch (Exception e){ IO.stderr.println("No save file found. Defalting to new game."); return root; } }
1
2e18b40ed5ee0db8b53d4ec4fab4352c
a72cf08040be58e67fe9e9443cb912bd
Returns the pronunciation of text.
interface SpeechSynthesisService fun textToSpeech(text: String): Speech
1
d40e20d54550054fe209244cfc46f325
7d99119cdb33da397837a5d034648582
Determines if the CCA at the cell location is null or not.
cell_location = self.cartesian_to_cell(arr) cell = self.occ_matrix[cell_location[0], cell_location[1]] return cell == 0
1
b48bee675e13dfe7f87c73a9c48b994f
0576b44e7486b50b30deba6f1bd0aa53
Determine if NRPP data is available and up-to-date in the database.
public final class PartialPageUtils @SuppressWarnings("unchecked") public static boolean isPPRActive(FacesContext context) { Map<String, Object> requestScope = context.getExternalContext().getRequestMap(); return Boolean.TRUE.equals(requestScope.get(_PPR_ACTIVE_FLAG_NAME)); }
0
f890d1382108661d7822d733fabdec1a
3e1f336de98bd0ed8e30f709eb9e6df0
功 能: 对于一个推导式,生成相应的项目集
{ cout<<endl<<endl; cout<<"\t**************************************************************"<<endl; cout<<"\t现在开始输出推导式集合"<<endl; for (std::size_t i = 0 ; i < data.size() ; i++) { cout<<"\t"; cout<<data[i].ToString().c_str()<<endl; } cout<<"\t推导式集合输出完毕"<<endl; cout<<"\t***************************************...
0
d2beeee82439444d49586b8982d05457
68861487e0f808190007ee5f1bd1649e
Clear all active PlexSessions.
namespace Highlander.Core.Common.Encryption public class PhelixSession public void Clear() { phx.Clear(); }
0
3bf77d5fd92a0036a24d8cd2bc596903
cd75fe7226a48db9bf07c3cfd6d89046
Slot when the value of the template combobox has been changed.
public void comboUpdated();
1
c510a23333ea7acf34ed6bc132970175
d026605177918d21b38d29624edb0e7c
r""" Add control dependency to guarantee OP A is executed before OP B. Used to prevent OPs from being rearranged or eliminated during graph compilation.
return { "input_0": set(), "d1": {"input_0"}, "d2": {"input_0"}, "TRTEngineOp_000": {"input_0", "^d1"}, "incompatible": {"TRTEngineOp_000"}, "TRTEngineOp_001": {"incompatible", "^d2"}, "incompatible1": {"TRTEngineOp_001", "d1"}, "incompatible2": {"inco...
0
26c3095e71340d8cc6ef2e31340692b4
5866e4aff504e4df0bbf16910580114d
返回由字节数组中指定位置的一个字节转换来的布尔值。
assert (position > 0 && position <= Integer.SIZE); int index = position - 1; return data & (1 << index); }
0
b3a0634efb868603924af716242cfbf4
37adba7080ee6f1520b680f88bf72d37
Returns the number of regression coefficients
public final class ConstrainedRegressionModel<R,C> public int countRegressors() { return regressorKeys.size(); }
1
ad1a44f4c195bdf90c81e30dc324fd22
8e152761d14f72435c4415a5c0444c3d
Selects the key terms that match the current book filter.
applyFilter(selectedRow) { let keyDisplayList = this.getFilteredKeys(); this.keyFilterList = []; if (keyDisplayList === null) { for (let i = 0; i < this.keyViewList.length; i++) { this.keyFilterList.push(i); } this.adjustRowCount(this.keyViewList.length, selectedRow); } else { ...
1
370b97d01c520967a172880bfbdceb49
3d90754cdaef4becc70f1627e73de69d
replace urls with links
function urlify(text) { var urlRegex = /(https?:\/\/[^\s]+)/g; return text.replace(urlRegex, function(url) { return '<a href="' + url + '">' + url + '</a>'; }) }
1
27e1a51e81dc2d3cbd27b6b29e1bfb90
40937d2da8ff13fcdae675e2064065c0
功能: 根据门店号和商户号跟产品编号来获取产品信息
@Controller @RequestMapping(value = "/supProduct") public class PcmSupProductController extends BaseController @RequestMapping(value="/getProductInfoFromPcmForSup",method = RequestMethod.POST, produces = "application/json;charset=utf-8") @ResponseBody public Map<String,Object> getProductInfoFromPcmForSup(@RequestBody...
1
306719118f1a06ee94e50e73112bd55f
c3362a9dbb782ccfea630d3782384b95
Получение количества непрочитанных сообщений по номеру заказа и id автора сообщения
{ $sql = "SELECT COUNT(message.id) AS messages_count FROM message WHERE recipient_id = ? AND was_read = 0"; $stmt = db_get_prepare_stmt( $con, $sql, [$user_id] ); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); return $result ? mysqli_fetch_assoc($res...
0
5b7b6ad47cb18e512d6fdd7acaf9dd7c
11a8336acc29ac91b5bf6f8f2d632ac6
如果栈为空,抛出异常
class Stack Type top() { assert(top_index >= 0); return data[top_index]; }
0
4403af5810cacf80b2c60b764979673b
0129164de1fe722cb703c14063ddf1ca
根据id获取有效节点
class tree public function getNodeById($id){ return $this->m->where('cate_id = ?', $id)->fetch(); }
1
a4ba726b17a30f9c5cebd3686bed30c0
81cb8b6363058693ca2018df43fcc090
将消息队列中的weburl存入数据库
if QueueName.qsize() < int(QueueName.maxsize / 10): urls = self.sql.getUrlFromDB(tableName, int(QueueName.maxsize / 2)) if urls is None or len(urls) == 0: pass else: for url in urls: QueueName.put(url) self.s...
0
c30406bf4a9ea9454c81c0859b88cf81
9346b10cfde32910a83ab6320981b587
Compile this primitive into a set of svg elements which can directly used within the result file.
class PixiTrack extends Track exportSVG() { const gBase = document.createElement('g'); const rectBackground = document.createElement('rect'); rectBackground.setAttribute('x', `${this.position[0]}`); rectBackground.setAttribute('y', `${this.position[1]}`); rectBackground.setAttribute('width', `${this...
1
ae16cfc37bb4c2c80941b2f505d17406
16acb2c07733a31b11e359c5958d507e
BaseApp constructor.
class Application public function __construct($baseconfig) { $this->register = Register::init($this); $this->baseconfig = $baseconfig; }
0
4181aae4b3ba3e82ae41a04a6b21b296
e9e9b0042fed89119f59957df62cba45
Handles the logic of the sold items page.
clearButtons(); updateMainDisplay(0, "Return to Sell Menu", true, true); updateDisplayFunction(0, Actions.OPEN_SELL); updateMainDisplay(4, "Sell Item", true, true); updateDisplayFunction(4, Actions.SELL); updateDisplayValue(4, value); ArrayList<Item> inventory = new ArrayList<Item>(); inventory.addAll(g...
1
45be318ba938490db75b68d5f33d6e68
d9a79af6c969ac3b05bf5ab16e9f2b16
Função que desenha um quadrado
{ glBegin(GL_QUADS); glVertex2f(vX, vY+tam); glVertex2f(vX, vY); glVertex2f(vX+tam, vY); glVertex2f(vX+tam, vY+tam); glEnd(); }
1
4951428aecf96fed480a34b4cb035ce8
96963708dce8e44ddcd466b40404cb47
Metodo que regresa el apellido paterno de un usuario final
class Empleado{ public function getApellidoPaterno(){ return $this -> apellidoPat; }
1
590dd5496d0544d27cb3740f0a14302e
1515d1561c491b2de012c0c905ffc3be
Set Show upcoming Events on the front page
class HomeController extends Controller public function index() { $featuredEvent = Event::where('featured', 'LIKE', '%' . '1' . '%')->get(); return view('home', compact('featuredEvent')); }
0
e9ee996cf3d1685ddcc41000820f6088
d8bce038b0594fad12a5367b601c1c52
Create a population based on an example.
class Toolkit: def init_pop(self, pop_size): return [self.create() for _ in range(pop_size)]
1
a1ac6f36febffbd8ff6972f4bb8dc5c7
0464e604d3742d322cf661fa8bce2da7
Forms a PCI config space address from the ACPI parameters.
def pci_address_to_name(domain, bus, slot, function): return 'pci_{0}_{1}_{2}_{3}'.format(domain[2:], bus[2:], slot[2:], function[2:])
0
3b231cc1f61d349c8b20c67ae8d6e894
8a0f2141367de4edea24cab96d5c8d87
Serve the location editing page
public class Dashboard extends Controller public Result showEditLocationsPage(Long locationId) { Location location = null; if (locationId != null) { location = Location.findById(locationId); } return ok(edit_location.render(location.id)); }
1
a986333c149299169d21b759ce781293
5a62019c1aea9b491c9c4c16e0ddc374
パスを出した選手が一番先頭にいるか判定(この場合はオフサイドではない)
$pitchers = $this->Position->getStartingPitcher($matchNo); $userNo = $this->Player->getUserNo($pitchers[0]); $myeamMember = array(2); if($userNo[0] == null){ $myteamMember[0] = false; $myteamMember[1] = true; }else{ $myteamMember[0] = true; ...
0
d0bf6972bac5b4577a2012db3bea6dd7
1c30cd636b73fc34b799ed02298daeda
Prints a list of cities, along with their locations. Prints only one or two digits after the decimal point.
public class DevTest public static void main(String[] args) { if(args.length == 0) { LOG.error("No CITY_NAME prvided"); printUsage(System.out, args); System.exit(RESULT_NO_CITY_NAME); } try(final RestClient restClient = new RestClientImpl(ADDRESS); ...
0
4e90893a223f3aaae8dab32adb34c0d3
9f902f8c18e29643382802e236ffddd7
Co decay function for late times (after mulytiple e-folding of 56Ni) Function from J. Sollerman, also used in Sollerman et al. 2004 (for 2000cx)
LSDCRNParameters& CRNp) { double Gamma_neutron = CRNp.Gamma[0]; double C_exp = exp(-dt*CRNp.lambda_14C); double sum_term = 0; sum_term+= (exp(-effective_dLoc/Gamma_neutron)*Gamma_neutron)* (exp(dt*erosion_rate/Gamma_neutron)- exp(-dt...
0
85f506c2474dd356ec6625e62c3c949c
1819cdfebf1dcb31564b27bb9d696f8e
Inserts stop to buffer so we know when to stop handling expression
class Laser_Stairville__150_RGY: # for each laser model define such a class def SetStop(self): self.buffer[0] = chr(0)
1
57d55bdef245061d3b8032fa038955db
2f0d37cd3e64530bdaf934f79028127a
将插件APK拷贝到指定目录
InputStream is = null; FileOutputStream fos = null; try{ if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){ String path = FileUtil.BASE_DIR + relativePath; uri = UrlUtil.addParams(uri, "__t=" + new Date().getTime()); URL url = ...
1
9bf4d7631d10d948f23f2556430b7b6b
13b3c68ff71ca02bdb0156c68329f924
请求url,将response解码并转化为html
class Guoke: def parse_url(self,url): print(url) response = requests.get(url,headers=self.headers) return response.content.decode()
1
bb8aea49c9e585269213e28a8519fc2c
6be3672ed977aa4a97e824b2d0a7f097
construct a long array of setpoints, traj_global, with equal inter-distances, dx, from a set of via-waypoints, P = [[x0,y0], [x1,y1], ..., [xn,yn]]
pts = [] for trv in travpoints: pt = list(trv.P) pt.append(0.0) pts.append(tuple(pt)) return pts
0
cb993c1c1f169855cb962452693a84f6
2f98357ea2ca3f21d51e4d4a28c1ae52
Get configuration for Signature module
{ return array( 'DisplayName' => 'Midtrans Payment Gateway Module', 'APIVersion' => '1.1', 'DisableLocalCredtCardInput' => true, 'TokenisedStorage' => true, ); }
0
c658ed74d92e4fab09e4126ad8032a27
871ed338b9beb6935f7475806720c632
递归式后序遍历
def postorder_re(root): if root == None: return postorder_re(root.lchild) postorder_re(root.rchild) print(root.value, end=' ')
1
44f041cbe29830cf74022694b5ecd3d8
8adb06d778fc1545597b4004e95fa016
case doesn't matter.
public void testOrderUnimportant() { boolean b = true; for (int i=0; i<100; i++) b &= sameResultWithDifferentOrder(); assertTrue(b); }
1
533e0c911f4572b39891e4122fb4b732
881f4fb3ce642323b5b1b37d6ad0b42c
find the shape without trailing 1's
all_ones = [all(st.shape[i]==1 for st in self.sts) for i in range(self.shape_len)] if all(all_ones): all_ones[-1] = False self.reshape_and_permute(lambda shape: [x for i,x in enumerate(shape) if not all_ones[i]], None) self.first_reduce = get_first_reduce([x.shape for x in self.sts])
1
1bb3fb1fd6cdfb7e0d90f71a76fb21a6
bea02800f2162329425fb5278f183a8e
Retorna os campos projecao setados explicitamente
class ProjFinder: def getProjections(self): return self.projections
1
f559c6b6493ba16811465df883e10eef
4946ba20bb221207d79f7578d65c8e36
判断是否有同名调查
@Controller @RequestMapping("/mgr/survey") public class SurveyController private boolean VerifyUniqueness(String id,String title){ boolean result = surveyService.verifyUniqueness(id, title); return result; }
1
1aef82babd8d0f4b410a4b64f200fcd7
59cb33a7a72312b08e03e86e89a88cf7
运动员增加接口
return new Promise((resolve, reject) => { ApiBase .post('v1/athlete/early/edit/admin', data) .then(res => { if (res.status === 'SUCCESS') { resolve(res); } else { reject(res.msg); ...
0
9168e875e64121dfb6d9c8c813a5eb6f
2c0bdeaa2be0131cfe9b1ff9407882e4
Returns an enumarator that iterates through the person collection.
namespace MatchGenerator.ViewModel internal class MemberListViewModel : Microsoft.Practices.Prism.Mvvm.BindableBase, IMemberListViewModel public IEnumerator<IPerson> GetEnumerator() { return Model.GetEnumerator(); }
1
ce175bf6a93ea2042790b96ea08faaf2
418acaa1855320fc078b0f4a82de2c35
Select the correct affiliation type for committee member
{ if ($relationship_key == "faculty") { return "faculty"; } return null; }
0
8877a7cd2e307cc6175f2b6ffcad656b
926c45a8f5a416c68a61db3fa9eda85c
Get all template merging branches (starting with 'nf-core-template-merge-') and check for any open PRs from these branches to the self.from_branch If open PRs are found, add a comment and close them
for cpr in branch: component, pull_request = cpr component = select_components([component, ])[0] if component in REPO_LIST_ALL: if fetch: cmd = 'git fetch upstream' run_command(cmd, component) cmd = 'git checkout -b pr-{0} upstream/pr/{...
0
c86005cf4744960e7d4425fa62b99a72
0e9f488f4c5de12b88a03c546ce21959
发送微信客服图文消息
namespace Builder.Web.Logic public abstract partial class GoLogic public class WeixinHelper public dynamic SendCustomerServiceMsg_Pic(string accesstoken, string openid, string media_id) { var p = FrameDLRObject.CreateInstance(@"{ access_token:'" + accesstoken + @"', touse...
0
775142cf29f891d0d67d7a5ea89cbf88
7c001783584dd8ecc41af89e7048b7fa
Calculate surface temperature and flux changes following [1] (eqs. (32)-(35)).
class AmmoniaRefluxStream(object): def _t(self, t_local, output_vapor=None, output_liquid=None): liquid, vapor = amm.equilibriumStates3(self.vapor_inlet.P, t_local) x_net = self.x_net m_net = self.m_net x_vapor = vapor.x x_liquid = liquid.x m_liquid = m_net * (x_vapor - x...
0
24ac0fa5a6f63c6e42f2b5d1280a44d0
f1f7e8674e3592ed063f1e703bd91b4f
Check the Tomcat server.xml file for the explicit Realm specification needed.
org.apache.commons.httpclient.HttpClient client) { java.lang.String realm = this.props.getProperty("exist.realm"); java.lang.String user = this.props.getProperty("exist.user"); java.lang.String password = this.props.getProperty("exist.password"); java.lang.String host = this.props.getProperty("exist.host...
0
df8c259c8f6dff36e650ff103c1c7d85
9d986d510b5a2030bb89a3f5ecba5a80
The number of texture slots currently in use. Returns
class _Light(DMXLight): def slot_count(self) -> int: return 10
0
7769dc009b3fff4ef341f281462e5411
3f186a68949fecf763fc0331fe63de17
Drops the HR table from the database
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"DBTY_HJ_LIST\""; db.execSQL(sql); }
0
45402378ea3abe30389329a630a4946a
82db2d808e4469126ee93e3c1de5da7c
MakeTimestamp - makes a ms timestamp
def msts(): return int(time() * 1000)
1
7f61b9a000ebe6f51d840f3e7927b0c8
817cdbb53f19f60c6d4bb96efc97cc03
Chatのmessage一覧を取得する
if(!empty($ql)){ $url = self::url().'/chatmessages?ql='.$ql.'&limit='.$limit.'&cursor='.$cursor; } $data = array(); $result = Util_Curl::get($url, $data, array( 'Content-Type' => Util_Curl::JSON_CONTENT_TYPE, 'Authorization' => ...
1
1ec0a26e6e01947a857f72db60fe8147
0249f8f2f05c0520e52f277662e99727
Convert WGS84 coordinates to GCJ02.
def gcj02towgs84(lng, lat): dlat = transformlat(lng - 105.0, lat - 35.0) dlng = transformlng(lng - 105.0, lat - 35.0) radlat = lat / 180.0 * pi magic = np.sin(radlat) magic = 1 - ee * magic * magic sqrtmagic = np.sqrt(magic) dlat = (dlat * 180.0) / ((a * (1 - ee)) / (magic * sqrtmagic) * pi)...
0
1bfe25850b023cbdb6f0e6738fb9c1ce
c17d044173bfa4c74e501e9ccb45535c
converts bits into symbols
{ for (unsigned int i=0; i<bitsPerSymbol; i++) { bitsOut[bitsPerSymbol-i-1] = ( s & 0x01 ) ? BIT1 : BIT0; s >>= 1; } }
0
20d554bf8dfac2c99964f2d7104d41a4
87d0535c0ce8435321c16203beea92ce
Compute the probability movement of an atom for the 6 surounding positions
{ double repulsion=0; double attraction=0; double shift_x, shift_y, shift_z; double dx, dy, dz, dd, d6, d12; int i; for (shift_x=-box_x; shift_x <= box_x; shift_x+=box_x) for (shift_y=-box_y; shift_y <= box_y; shift_y+=box_y) for (shift_z=-box_z; shift_z <= box_z; shift_z+=box_z) for (i=0; i<number_of...
0
173cf3812ba6c3d39a129e32e98eb546
c6d58a3168341ab387ddd7c434eb516d
Retrieve the Change Set Id from the build object
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) // Ignore unknown properties during de-serialization public class ConstructChange implements Serializable, Comparable<ConstructChange> public Long getId() { return id; }
0
b135196861f1780399b67c13a5410d11
07a0b63edcd982442e96923e2433bd53
=> Highlight variables for UI
if ($highlightParams) { return '<strong>' .$param . '</strong>'; } else { return $param; } }
1
c4ff01337e610d42bab4acbc66a3c790
6655b94f9629cb5e4f9499009a244f88
r"""Lookup from memory. A key vector - emitted by controller - is compared to content of each location in memory according to a similarity measurement. The cos sim scores determine a weighting that can be used by the read heads for recall or by the write heads to modify memory. Corresponds to .. math:: D(u, v) &= \frac...
words = kb[0] loc = kb[-1] mem_embed = self.embedding(words) mem = torch.mean(mem_embed, dim=1) self.mem = nn.Parameter(mem.data,requires_grad=True) self.value_mean = nn.Parameter(loc.data,requires_grad=False) self.value_dev = nn.Parameter(torch.rand(loc.data.shap...
0
af1d4cb7891999b936a23dd291fd38e8
67bec7c13f0f6526aa054617ecbec1d6
Retorna el Id de Sala en la que se encontraba la encuesta.
class AsignacionPSA{ public function getCod_sala(){ return $this->cod_sala; }
1
edf90519bc0be29f95ed7bb6b479d3b2
f0c75af527496f02190ddd5f8c541c60
check that a certificate validates against its private key.
{ Botan::AutoSeeded_RNG rng; Botan::ECDSA_PrivateKey key(rng, Botan::EC_Group("brainpool512r1")); Botan::secure_vector<uint8_t> in { 0x01, 0x02, 0x03 }; Botan::PK_Signer signer(key, "EMSA1(SHA-256)", Botan::IEEE_1363); std::vector<uint8_t> sig = signer.sign_message(in, rng); Botan::PK_Verifier verifier(key, "EMSA...
0
75309bd3386e5c4549158a3afb7eabd3
ae931671b449e9bf44faf3a931ad09b6
chama tela de Ranking dos alunos
def tela_rank(largura_janela,altura_janela): janela_rank = pygame.display.set_mode((largura_janela, altura_janela)) fonte_ranking = pygame.font.Font('Gamer.ttf', 80) fonte_ranking2 = pygame.font.Font('Gamer.ttf', 40) sair = False while sair == False: mensagem_ranking = "HIGH SCORES" ...
1
7e220a68b4347776f699e5321071810f
de1fdc8fc9bb8d49ba048d9d5bbe1c33
ブラーフィルタ
class filter: def filter_bilateral(self,image): image_filtered=cv2.bilateralFilter(image, 15, 25, 25) return image_filtered
0
971c8a579d41ba047f01afef76a43a86
c9d377f7b42456eea8ecd8c50d4673a2
非阻塞加锁,线程请求到锁返回true,请求不到锁返回false,不会阻塞。
class MyLock implements Lock{ @Override public boolean tryLock() { return sync.tryAcquire(1); }
1
6896a1c30d6d06a01afbb03cb5203821
7e54f76b96869561745f98176d88c07c
This API is used to query the download links of playback statistics files. You can query the download links of playback statistics files in the past year. The start and end dates for query cannot be more than 90 days apart. Every day, VOD will analyze CDN request logs of the previous day and then generate a playback st...
export class Client extends AbstractClient async QueryDownloadBillURL( req: QueryDownloadBillURLRequest, cb?: (error: string, rep: QueryDownloadBillURLResponse) => void ): Promise<QueryDownloadBillURLResponse> { return this.request("QueryDownloadBillURL", req, cb) }
1
3e6f778829c2cdca205bafd2a81210e8
bba693b4b8a3ae38ee7ead5a32c4dbec
Test mv app to move a folder into another folder, both are different folder
var moveTo2_fail = function(error) { test_result = "NG : " + error.code; setTimeout(function() { finishCallback(error); }, 0); }; var moveTo2_moveToSuccess = function(entry) { test_result = "OK : " + entry.name + " " + entry.fullPath; setTimeout(finishCallback, 0); }; var m...
1
3f5cc88c3f1d3be4b73e395db0173a12
7ff1304a164b026b09d9951709a32694
classe qui permet de gérer les niveaux (Génération des ennemis)
String txt = null; switch (level) { case 1: txt = "ennemis/map1.txt"; break; case 2: txt = "ennemis/map2.txt"; break; case 3: txt = "ennemis/map3.txt"; break; c...
1
5582a7eda7818063f2458c169870d04e
c72ce51c302a26817a5bcdb2e7a4824b
Test that host expression props fail gracefully
async def test_error_invalid_host(hass: HomeAssistant) -> None: with patch( "homeassistant.components.asuswrt.config_flow.socket.gethostbyname", side_effect=gaierror, ): result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, ...
1
7ba36a1fac8ac198b51279dd8cabdd0b
939365148ca29a9798dd05a0b2a7aff9
Set 任务的事件通知信息,用于指定直播流处理的结果。
public class CreateLivePullStreamTaskRequest extends AbstractModel{ public void setCallbackEvents(String [] CallbackEvents) { this.CallbackEvents = CallbackEvents; }
1
dcf37ca0323786f5236c85a2abd91533
cac8b7067965211f61a244f9d3fe5046
注册量
class StatisticsController extends Controller public function Register(StatisticsRepository $repository, Request $request) { return $repository->getRegisterStat($request->get('begin'),$request->get('end')); }
1
35401eb34f899d0278e38183c90da00a
81f730b87b1a612586684deed0adb51e
排布每层书柜
local points = {ccp(47.8, 161.5), ccp(76.5, 162), ccp(102.8, 161)} for i = 1, 3 do D.img("kgarrange/books/book_1_" .. i .. ".png"):p(points[i]):to(self) end if true then for i = 1, 5 do local point = self:convertToNodeSpace(self:getBookPointOnBookcase(true)) D.img("kgarrange/books/book_1_" .. RD.number...
1
6b077f57ccdef5c9932ba212d1e4ad47
8b80235d7c53cdc7395a728e310b9dee
動画スライドのみで構成されるスライドショーかどうか.
const predicate = (el: Link) => el.mediaType.isVideo; return this.items.length > 0 && this.items.every(predicate); }
1
425d90b12a7e384f765cb4cf08fe64f6
39a3591dd4898258c870d658a2745289
Clear the map of PricerResults keyed to BasketItems.
public function clearPricers();
1
7cc74822d9fef63e8291b4de05bd6e4f
625e25bf685c6a6704f56ffe76a08996
In debug mode, RocksDB run consistency checks on the LSM everytime the LSM change (Flush, Compaction, AddFile). These checks are disabled in release mode, use this option to enable them in release mode as well.
expect class Options() : RocksObject fun setAvoidFlushDuringRecovery(avoidFlushDuringRecovery: Boolean): Options
0
cde02343ed6eb211df2ff178f092bcba
6bc7972dfa6795bf614f037f1ef76817
Returns the number of bodies (skeletons) currently being tracked by Kinect.
namespace Kudan.AR int GetNumTrackables();
0
5f298835472f35ce0171daad8b9e84a1
861d3cb356fba69f9f67427d379c9d9f
Set user reference to paper trail
class ApplicationController def user_for_paper_trail current_user.persisted? ? current_user : nil end
1
08231f0d2b547a26dc79689879f091cd
8f696e7f80a18c1e80796b08371d9391
开启代付通道
function PayChannel({ dispatch, payChannel, loading }) onBlock() { dispatch({ type: 'payChannel/onOff', payload: { enable: State.DISABLED, ids: selectedStarts.map(it => it.id), }, }); dispatch({ type: 'payChannel/updateState', payload: { ...
0
2e289dd3a111abe8fc75385ca12e17b1
a341b5afbb305528c1ae433ad31c8cb8
Wrap the breadcrumb items in our tag so we can find them and replace the title
if(isset($breadcrumbItem['url'])) { return '<li class="breadcrumb-item"><a href="' . $breadcrumbItem['url'] . '">' . $breadcrumbItem['title'] . '</a></li>'; } else { return '<li class="breadcrumb-item">' . $breadcrumbItem['title'] . '</li>'; } }
0
602b9803b9d0bdc1f2736f658e27570e
19eb145bea3f2dc8d9fcb1cf529b2eb4
再次获取收件箱内容
Msg(U8('正在读取收件箱的短信,请稍后...')) global Message_Content_Re self.iIndex = -1 if len(Message_Content_Re) == 0: self.Messages = Inbox() self.MessageIDs = self.Messages.sms_messages() for self.mID in self.MessageIDs: try: se...
1
f1e971fe8edc3e4870bdb35c4e179b63
f8d1ec26c0d6272080d451080537d003
example: "25 c0t 1 2 3"
func parse(in string) line { parts := strings.Split(in, " ") if len(parts) != 3 { panic(in) } i, j := parseInts(parts[0]) char := parts[1][0] password := parts[2] return line{i, j, char, password} }
0
3967ae6e45bd7d6e9c0d3125fd2a7bef
456825d9005736812519ba1e42c5bbd6
Serves HTML response to the "frontend" of the service.
function serveFrontend(req: Request, res: Response): void { res.sendFile(path.join(frontendPath, 'index.html')); }
1
3cda545285d42d13da7203e3a7cbcfab
697ff4b07a4a467de0aac4133c6256f7
获取生物多样性救护站台账管理数据
public ResultData getDjphbData(HttpServletRequest request, HttpServletResponse response) { ResultData rd = new ResultData(); try { Map<String,Object> result = gsywssFhService.getDjphbData(); rd.setCode(Const.SUCCESS); rd.setResult(result); }catch(Exception e) { e.printStackTrace(); logger.error(e)...
0
cc1ee9cacad2667c5b2ff4343cce0376
e9c8f53384d3a2267129ce1d8dff37d3
Get all the followers of a channel
{ PagingChannelFollowers paging = new PagingChannelFollowers(); paging.limit = 100; paging.direction = direction; List<Follower> followers = await Paging.GetPagesByCursorAsync<Follower, FollowerPage, PagingChannelFollowers>(GetChannelFollowersPageAsync...
1
449a881fc2cc4ba385b361ecab69af15
8ffceb21a93c77838df22af6a4f966b0
Will be called before replay/reset starts. Do pre-reset logic, like clearing out the Projection table
public class afterProjection : MonoBehaviour void Start () { }
0
adf983b6382b5c51599bbc139fb7ec28
da5d3e530f02a3ecd9899ae013e841ff
Append a child (upstream) reach to this reach.
class Node(object): def append_upstream_connection(self, conn): self.upstream.append(conn)
1
27334a7b15e45f8bebebe7d9efd0772e
879a4f733f7c57dd86c6da07a4680787
Fetch subscriber stats from list of service providers
namespace StrongGrid.Resources Task<Statistic[]> GetInboxProvidersStatisticsAsync(IEnumerable<string> providers, DateTime startDate, DateTime? endDate = null, AggregateBy aggregatedBy = AggregateBy.None, string onBehalfOf = null, CancellationToken cancellationToken = default);
1