query_id
string
corpus_id
string
query
string
code
string
label
int64
10aa62984eb6a647239cca7ba8d6721f
e1ed929495a228405286458daed5f93a
Aşağıdaki fonksiyon datPersonel tablosundaki bir kayıdı günceller.
namespace DataAccessLayer public class EtPersonnel public static void Update(BusinessObject.EtPersonnel etPersonnel) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@Id", etPersonnel.Id), new SqlParameter("@Name_First", etPersonnel.Name_First), new SqlParameter("@Name_Last", et...
1
a51df8e31ee4ffa3ec9ccf925c953b6d
205c948c0ac4e5e73eeb888cfa9e5dcc
ค้นหา access_token จาก user_id กรณีได้มีการลงทะเบียนรับข่าวสารทาง LINE ไว้แล้ว เพื่อนำไปส่ง LINE Notify
this.logger.LogTrace( $"UserIds is {userIds}" ); string channelAccessToken = this.oAuthRepository.GetNewlyChannelAccessToken(); this.logger.LogTrace( $"Channel Access Token is {channelAccessToken}" ); if( string.IsNullOrEmpty( channelAccessToken ) ) { ChannelAccessToken cat = this.channelAccessTokenServ...
0
aac58f90f449e30a6f0892b82eeccf8a
6028c775ffb660e4cf6324aa985ff641
Python to C++ enum conversion.
static void QReadWriteLock_RecursionMode_PythonToCpp_QReadWriteLock_RecursionMode(PyObject* pyIn, void* cppOut) { *((::QReadWriteLock::RecursionMode*)cppOut) = (::QReadWriteLock::RecursionMode) Shiboken::Enum::getValue(pyIn); }
1
a8b5b48e9a13bf5e94f9e750c0583d46
8091d3ecc070e8a9e811105fe0777fbf
Inject authorization key into all requests.
class BigOvenAuthPlugin implements EventSubscriberInterface public function onRequestBeforeSend(Event $event) { $apiKey = $this->config->get('api_key'); $username = $this->config->get('username'); $password = $this->config->get('password'); $this ->addApiKey($event['req...
1
0a0496e7704813cdeea81ffd5e9ff35d
d9aba84207d44a0eee36f5fb29f7d3a9
Gets the rowCount property value. Returns the total number of rows in the range. Read-only.
InternalUnsafeMethods.GetRowCount__Args _args = new InternalUnsafeMethods.GetRowCount__Args() { }; int _engineResult = InternalUnsafeMethods.GetRowCount()(ObjectPtr, _args); return _engineResult; }
1
37115b27198cdb8f54fd8d1faf5b83b4
0f6e8c16751a4834a507d3d338e1a5b2
Get a DirectInput-compatible Guid (equivalent to DIDEVICEINSTANCE guidProduct field)
namespace osum.Input.Sources.UsbHID.USB public class HIDUSBDevice : IDisposable public string getProductID() { return productID; }
0
7858ad9a6d4688413f932039b3b633f3
3e2e8ae4f1627fcf0f75d9b1106da5cb
按照openid删除数钱游戏结果
$sql = 'select wx_id,wx_mobile from h_wxuser where wx_openid="'.$openid.'" and wx_status!=3'; $user = $this->db->query($sql); if ($user->num_rows<1) { $this->msg = 'nouser'; return false; } $user = $user->result_array(); if ($user['0']['wx_mobile']...
0
6ceea624e31b239df22b9a08e56ccb66
d23088d10c8c186a94bd711beee5df52
Updates the lobby screen.
void UpdateLobbyUI() { startGameButton.interactable = PhotonNetwork.IsMasterClient; playerListText.text = ""; foreach (Player player in PhotonNetwork.PlayerList) { playerListText.text += player.NickName + "\n"; } roomInfoText.text = "<b>Room Name</b>\n...
1
865c2a0e1e00c173cd44f0782526eba7
20b3f65cc523bf567356586d3ae8ac93
Calculate tasseled cap transformation
(h,w) = np.shape(J) H = cv2.resize(H, (w, h), interpolation=cv2.INTER_CUBIC) epsilon = 1e-5 H = np.float64(H+epsilon) J = np.float64(J+epsilon) H_vec = np.reshape(H, w*h) J_vec = np.reshape(J, w*h) logH = np.log(H_vec) logJ = np.log(J_vec) idt = np.ones(w*h) Dx = spdiags(np....
0
4d2ef6c08e48ca23edd5cca7cff3e402
80b701fcdc84ab4075ff6e3b96b9239b
Test behavior when passed a filename only.
def test_filenames_from_a_single_file(): filenames = list(utils.filenames_from('flake8/__init__.py')) assert len(filenames) == 1 assert ['flake8/__init__.py'] == filenames
1
4b1833ef7097ed5343f496efa7d96ce7
d7dcaa03d622d35031c3f3b7de054cac
counts number of empty tiles
int sum = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (tiles[i][j] != goalForTile(i, j) && tiles[i][j] != 0) { sum++; } } } return sum; }
0
9fb42c2d891c2420d85db0d3744f49c3
7e86fa791d0bb4d4026014d82a09900f
Simplified method form for invoking the DescribeReservedCacheNodesOfferings operation.
{ var options = new InvokeOptions(); options.RequestMarshaller = DescribeReservedInstanceOfferingsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeReservedInstanceOfferingsResponseUnmarshaller.Instance; return BeginInvoke(request, options, callba...
0
3e5d5950572e1def8a1bd605af673f94
23d8e7f11b33c194251d9cb789534f05
CheckIfConnectedToNetwork returns true if connected to a network
func IsClosedNetwork(err error) bool { if err == nil { return false } return strings.Contains(err.Error(), "use of closed network connection") }
0
6cc6a537b0e56ac62f7e9c461e27a80e
cb3837a5e6ffa85f701b697ee727553a
Returns an SVG path string of a cubic bezier curve.
const verticalDirection = Math.sign(y2 - y1); const w1 = midPointX - curveRadius - x1 + (curveRadius * verticalDirection); const w2 = x2 - curveRadius - midPointX - (curveRadius * verticalDirection); const v = y2 - y1 - (2 * curveRadius * verticalDirection); const cv = vertical...
1
d9fced2e369ec6d83b3854627ced499c
d35a86a35b953f84fdb6e4424b67174f
得到一个菜单的所有记录
{ StringBuilder strSql=new StringBuilder(); strSql.Append("select mid,mname,murl,mstatus "); strSql.Append(" FROM t_menus "); if(strWhere.Trim()!="") { strSql.Append(" where "+strWhere); } return DbHelperSQL.Query(strSql.ToString()); }
1
4bee455c44b5ba8dfb5ba5a5f8910d2c
4f1e76d183b9dea6b4ce9371bb7c701d
Coin flip game with a 50/50 chance to win. Pick heads or tails and place your bet.
def flip_coin(): pass
0
99cdcea26a4a9c0d1454cda4c3e338d0
123574da62549699974f1d5f9260f1ba
Each inbound doorbell bit can be masked from generating IRQ by setting the corresponding bit in inbound doorbell mask. So this method returns the value of the register.
uint32_t GPIO::getIRQBits() { return readRegister(IRQSTATUS_1); }
1
9583a7f5a1ca608ec9704c5bc166080e
23576e5d7f6d731e4924a460bd4cd362
Initializes the store with the starting url from request.
class StartSessionMiddleware implements MiddlewareInterface protected function storeCurrentUrl(ServerRequestInterface $request, StoreContract $session): StoreContract { if ($request->getMethod() === 'GET' && $request->getHeaderLine('x-requested-with') !== 'XMLHttpRequest' ) { ...
1
b85d8425629576c67841a210413fa089
940bcf3c7e10181ecf4aa1233603ed1d
Метод вывода списка исполнителей проекта.
class Projects extends SuperActiveRecord public function getListOfAllPerformers($projectId) { $stages = Stages::model()->findAll('stages_project_id = :projectId', array(':projectId' => $projectId)); foreach($stages as $stage) $stagesArray[] = $stage->stages_note_id; foreach($stagesArray as $...
1
3bc783159bbd6de121c3776ca17649f0
913d578bd67461d970394d59d672d652
Cambia la apariencia del botón al ganar enfoque
public class UIAnimator : MonoBehaviour public void ButtonFocused(GameObject target) { target.GetComponent<Image>().DOColor(new Color32(167, 255, 245, 255), fadeTime) .SetEase(fadeType); }
1
33d07e4602ff410956fcb76e7d7962ab
08b0154a9534e16068ed200d28d28e5a
@brief Enables or disables the SEQB Start.
void ADC_SEQB_StartENCmd(FunctionalState NewState) { assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { ADC->SEQB_CTRL_b.SEQB_START = 1; } else { ADC->SEQB_CTRL_b.SEQB_START = 0; } }
1
970684cc62521304c05a265a83703119
5e350bfbba212bcf4e46a0d8e52ec604
Test case for get_self_addon_by_id
class TestSelfApi(unittest.TestCase): def test_deprovision_self_addon_by_id(self): pass
0
c63cb148fccedc3fd4cd3fa711ed29e2
297cc84c9e1a570240064885ae5a30f5
This should be called when changes have been made to the server, but the list has not syncronized yet
namespace Indiefreaks.Xna.Sessions.Local public class LocalSession : Session protected override void NotifyServerSynchronizationDoneOnClient() { ChangeSessionStateRequest(SessionState.Playing); }
0
5f4567516fe8f4b25d35ee43c78ce008
41751df1a0226a49b89bd1546d4189dc
Tests the multiple HTTP POST functionality of the RestClient.
mock_oauth2.Client().request.return_value = ({"status": "200"}, {}) post = twitter_post.TwitterPost(TWITTER("key", "secret", "userKey", "userSecret")) post.prepare("1", "tweet this please") post.prepare("2", "tweet that please") post.prepare("3", "tweet one more please") ...
1
7c01636d3506574cbb1d6979002d84f4
1d8a36ed829de0c4ad76b255170d952e
得到方法的参数列表 并转换为json
{ try { string param = paramses.ToJson(); return param; } catch (Exception) { return ""; } }
1
ce41f670a270592bb28ad71ab9bccf24
b7323f3a59983b7df80da19ec7ae906e
Iterate over the reactions in the set.
class TerminalView: def reactions(self, cls): reactions = (cls(c, r, **self._kwargs) for c, r in self._system.reactions()) return sorted(self._filter(reactions), key=lambda l: l.sort_key, reverse=True)
1
2b0b7f137281fa89e41c538601ed9cc2
7282f70151ab2285b9a21d4801f3d100
Sets the gpu of this InlineResponse2002DataNodeRequirements.
if os is None: raise ValueError("Invalid value for `os`, must not be `None`") self._os = os
0
20b925133d50e45f1d70db2c306e7f87
c4bb9db50105d7b2e42b525fb64d7e9e
destroys drawer when component closed
public class DrawerFragment extends Fragment @Override public void onStop() { super.onStop(); }
0
73a431397b8258bc3b7c926ca52e074e
11b8013d859ce96a635a6be6a3c92c87
Fuehrt eine Dreieckszerlegung nach Gauss durch.
class LinearesGleichungsSystem(AglaObjekt): def gauss(self): if mit_param(self): print("agla: nicht implementiert (Parameter)") return self._gauss(kurz=True) return
1
3f01c149e947ee9a4efc91b640e7802d
ba36e356d57ebfcd751074164a7d1509
Test l1-regularized logistic regression create under particular
class TestLogistic(unittest.TestCase): def test_default(self): f, g = logistic(w, X, y, reg_coef) self.assertTrue(isinstance(g, np.ndarray)) assert_almost_equal(f, 0.693, decimal=2) assert_array_almost_equal(g, [0, -0.25])
0
320f001843bdb725b205072aa5449150
3e8b7d5ee08373ac93e1cddad1b3005a
set the scale of the confirmation dialog to be 0 (ie. disabled)
onConfirmDisableDialogConfirm_() { this.setPrefValue('arc.enabled', false); this.$.confirmDisableDialog.close(); }
0
cc732a71522b8303f1dfb9b40ac117b4
d78b90092ae168f6d35778ccb51616dc
コストを支払う
public class ScoreManager : SingletonMonobehaviour<ScoreManager> public void BuyUnit(int cost) { PuzzleCoin -= cost; }
1
8f20aeaa99c60881812a2ed10c31b53b
ea77053cee491aba0d04f1d2bea2dc97
Populate the address based on the user's location.
public class MapManager public static void getAddressFromLocation(Context context, MapUser caller, LatLng location) { new AddressFromLocationTask(context, caller).execute(location); }
1
a02d2e9f789d22661acadd3f97dd4ee3
6c0ca14e2e2cc38a2bc57c1a417dc783
จำนวนนิสิตในแต่ละชั้นปี ตามหลักสูตรและระดับการศึกษา
{ $newstd_result = mssql_query("SELECT std_enrollyear, count([std_stdno]) as num FROM [SOAA].[SoAA].[dbo].[vw_bigdata_student] where std_academyno like '$academe' and std_depno like '$dep_no' and std_enrollyear >= $start_year and std_enrollyear <= $end_year and std_degree = 2 and std_enrolltype != 3 and (std_schoo...
1
33e7ab007a7b61bfe70bdbee1be819c3
4e9fddc2461147f087e5bec2d38d0779
Update nutrition based on new quantity
{ var multiplier = food_weight / 100; $.ajax({ method: 'get', url: '/WP/WP_Nutrition_Site/PHP/nutrition_update.php', data: { 'NDB_No' : food_NDB_No }, success:function(data){ var array = jQuery.parseJSON(data); $("#calories").html((array['calories']*multiplier).toFixed(2)); $("#total_fat").html...
1
1b729a2c3e9d9822905d0824991e044f
f7ac8a3321cd64543503ea8578fc4d76
Creates links to other methods within the module.
function populateLinks() { include_once('vtlib/Vtiger/Module.php'); $accountInstance = Vtiger_Module::getInstance('Accounts'); $accountInstance->addLink( 'DETAILVIEWBASIC', 'LBL_ADD_NOTE', 'index.php?module=Documents&action=EditView&return_module=$MODULE$&return_action=DetailView&return_id=$RECORD$&parent_id=$RE...
1
cb6b88db522ccf8fec593d2696e47704
7d61deba0dbc61cb4e853c16c42f99a4
When digit reach to its maximum reset the digit and increase following digit
class Encrytion_decryption: def digit_encryption(self,num): if num==9: num_input=0 else: num_input=num+1 return num_input
0
c228f4724a129c4f364f7b84729d3038
01972aad0a17824817e08e47bdb13f77
Pops the specified tagname off of the stack, and returns the number of tags with the same name left on the stack.
int i = indexOfTag(tagName); return i>=0 ? stack.subList(i, stack.size()) : null; }
0
a3b200711c2c84b392be7045937b430a
af827ab2f6256545fc1cc3fa7fd5a531
恢复slot为正常状态
for (var i = 0; i < this.slotDisplayList.length; i++) { this.slotDisplayList[i].resetSlot(); } }
1
7ef55c60794fbbe0957fc95a84d86af7
c731d1ea70db6f7596a9e8ea9973e9fb
Get MySQL based database server IP address
String getDbIP();
1
8c8d4ba0ccac807840072b721a1ab724
65a31c4dad0a4c8068bf52d985a72176
@brief View::~View View destructor. Deletes scenegraph when view is destroyed.
View::~View() { if (scenegraph!=NULL) delete scenegraph; }
1
50f3007de3da88d3daeccd0ca9884327
f6bff5b89db0e782384c1cc7deba830d
Margin account list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
local_var_params = locals() all_params = ['currency_pair'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwar...
1
f1285fb92cb510f1840568039b71e70f
2b298ed6e112d7459049b64ef1f305d4
#extract matches and mismatches from MD tag
x <- gsub( "([A-Z-]*)\\((.*)\\).*", "\\1;\\2", x ) x <- ldply(strsplit(x, ";"), function(y) c(y, "value")[1:2]) }
0
ca15d4b0ca7c1ad915151ff9e0d8cd26
5bc7248f2c1c570ce56bab6a8b34db4b
根据历史记录寻找之前点击过的书的相似书籍
redis_connect = get_redis_connection('historyorcollection') user_id = self.request.user.id history_key = "history_user_%s" % user_id history_bookstore_id = redis_connect.lrange(history_key, 0, -1) if not history_bookstore_id: return Response({'msg': 'no history'}) ...
0
b35c6a706f0f8a4f08055fcc5564a8f4
3cc1ea7f434e69db493cc198eca92559
返回一个小于或等于maxValue的随机正整数
namespace OTA.Callbacks public class Rand : Random public override int Next(int maxValue) { if (maxValue <= 0) return 0; return base.Next(maxValue); }
0
e7e1d93a1a53b88d15b23d81969240b7
cc13a0ee9d38ef5aa8db101e597bcf4f
一个参数,求1到n的和
class Solution: def Sum_Solution(self, n): res = 0 for i in range(1, n + 1): res += i return res
1
cce648a6b7f96145a93a32750d7887b0
d32fcf144f87faefb62f482a3b833022
Custom formatter for FirstContact link.
$url = wp_strip_all_tags( $field_value ); $parts = parse_url( $url ); if ( isset( $parts['scheme'] ) ) { if ( strtolower( $parts['scheme'] ) !== 'tel' ) { $scheme = preg_quote( $parts['scheme'], '#' ); $url = preg_replace( '#^' . $scheme . '#i', 'tel', $url ); } $url_text = preg_replace( '#^...
1
47c775641a7da86c870273810f16d05f
fa1bd0dad78d93677977cd8369ccd7a2
Select a camera type fixed free or other by passing in ( Basic3dExampleCamera. CAM_TYPE_ options )
public class LibOmniProCam [DllImport("libOmniProCam")] public static extern void setCameraSDKType(int type);
1
74f80a3aad9b2c9a4ad57d4e43ac5bc1
febb01d03b17198f3a9765eb21a13259
BGMを速くする関数
namespace MEUniLibrary.Audio public class PlaySound : SingletonMonoBehaviour<PlaySound> public void playBGM(AudioClip bgm, float delay = 0.0f) { const float DURATION = 0.3f; Sequence sequence = DOTween.Sequence(); sequence.AppendInterval(delay); sequence.Append(audioS...
0
e7b5760df379f84d0e2e4a4baf42ecd8
413bba038fef3d8ccad40cb87b12845b
Helper function to write out phase file for the light curve and the aggregated curve if requested
lc = self.lc(snid) df = lc.lightCurve df['band'] = df['band'].astype(str) with pd.get_store(fileName) as store: store.append('tile_{}'.format(self.tileID), df)
0
d2a88f67effa14b067e06733c4724294
f940ee58acfb69221d45c1c674c4efbd
Integrates a filter_transmission profile against a spectrum to obtain the flux of the bandpass.
if isinstance(filt, str): xr, yr = get_filter(filt) else: xr = filt[0] yr = filt[1] if ccd == 'yes': yr = yr * xr return old_div(np.trapz(yr * xr, xr), np.trapz(yr, xr))
1
d4b04906c7be57ecc03e8072de611e1f
58bcea1672326b9d00b1c6436e4c3e30
Get the file that has the status of "Playing"
class MPlayerWrapper private function getPlayingFile() { try { $file = URLRequest::where('status', 'Playing')->first(); } catch (\Exception $exception) { throw new \Exception($exception); } return $file; }
1
242759a6b1e5f2cb57f5d3c121682999
bbfbb8e7d547f7fea9ab21c717ea1cef
生成征信授权书
$file_dir = FcsFtp::getLocalFileDir($lid); $file_path_signed = $file_dir . '/credit_contract_' . $lid . '.pdf'; $file_path = $file_path_signed . '.raw.pdf'; if (is_file($file_path_signed)) { unlink($file_path_signed); } $loan = ARPFLoan::getLoanById($lid); ...
1
041508d8ac6d288a7328f56a457986d5
0131a761e1c0f821b685eb6d31427e43
Returns a hostname pattern. If the pattern matches the hostname the command is allowed on the host
match_hostname(const char *host, const char *pattern) { char *hostcopy = xstrdup(host); int r; lowercase(hostcopy); r = match_pattern_list(hostcopy, pattern, 1); free(hostcopy); return r; }
1
999b185578b455a05ce5e4348bd6b74b
a33f8963724c8d511d627968a88e30df
Toggles all elements while the application is processing.
class PileManagerDemo: def on_btnToggle_toggled(self, _widget, _callback_data=None): print "Toggled" while gtk.events_pending(): gtk.main_iteration()
0
5fd1fbb99e3cce6dc4a6043066cca58a
3c7a10d9f494bed3432cda9cfdb50d41
Override sidebar widget area for INB template
register_sidebar(array( 'name' => __('Knowledge Base Widget Area', 'pressapps'), 'id' => 'pakb-main', 'before_widget' => '<div class="widget %1$s %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>', )); }
0
881715e65328789f8db7a61ed9fa208b
65a4a506971a75f93f59b50da9c93523
客户案例生成静态HTML
@GetMapping(value = "/createHtml/{id}") Result createHtml(@PathVariable("id") String id);
1
d5c430df3281804ee1beaa07cb4f4160
a3842a6907a7df866dcf9e8a5b719a74
Вывод всех не повторяющихся работающих мастеров которые используют ВК
class InterfaceView public function showAddWorkerTopologySelectedWorkersView($room_id=null, $department_id=null) { $HTML = ""; $all_workers=$this->model->sendQuery("SELECT workers.*, users.first_name, users.patronymic, users.surname FROM workers LEFT JOIN users ON workers.user_id=users.id LEFT J...
0
c51d22078c552fb3b6f2c6b81667482c
07cef9d96a6bf893d8496978d81fa52e
dp到px的转换
dp2rem(dp) { return window.lib.flexible.px2rem(dp) }
0
4d5e9dc7917e5c18f73361724489551d
13896868934211f94ccfc6208e4fd8ec
测试激活服务凭证方法
$.ajax({ url: "user/activeServiceCard", type: "POST", data: { account: account, cardNumber: cardNumber }, error: function () { showMessage(getMessage("1004")); }, success: function (data) { if (data == "200") { ...
1
20bd3e47c5f11cf507e32294db32b49a
13b40109f73213964982bb9ec5dd563c
Translate a contextualized string and escape HTML entities
$rendered = htmlentities($this->_renderUnescaped($tag_name, '', '', $local_context_key, $filename), ENT_QUOTES, $this->_charset); return $leading . $rendered . $trailing; }
1
253c459631a0e9da2cf1c696b1c5813c
adb73103b0052fea6327f797db62ae80
checks if all the columns to extract actually exist in the ucsc table
if ("#chr" in row.keys() and "start" in row.keys() and "end" in row.keys() and "ref" in row.keys() and "obs" in row.keys() and ("coding_and_splicing_details" in row.keys() or "coding" in row.keys() or "coding_and_splicing" in row.keys())): return True return False
1
9e143ef5137448f5d6588d229de021a8
b6378f3de20b06643925ffc0db6cb1b9
Return the libraries defining which elements are included in the scope.
vector<string> class_wizard::get_libraries() const { return libraries_; }
1
0f235ba57e3cabc27bbba2209685206f
2b81b6971a8fde97677379e5e4e63aa3
El autómata AFN básico está compuesto de solamente dos estados conectados por una transición, en donde el símbolo que los conecta es el leído
{ Automata r3 = new Automata(); for (int i = 0; i <= r1.le.Count() - 1; i++) r3.le.Add(r1.le.ElementAt(i)); for (int i = 0; i <= r1.lt.Count() - 1; i++) r3.lt.Add(r1.lt.ElementAt(i)); for (int i = 0; i <= r2.le.Count() - 1; i++) ...
0
9da9f3fc302bb44a773497d0b884b064
db8ff536c8a969a92957f6642db935a2
Función para mostrar el componente para redactar un correo teniendo en cuenta de mostrar una advertencia o error si alguno el correo, asunto o mensaje no han sido escritos
function SendMail(){ const {register, handleSubmit, formState :{errors} } = useForm(); const onSubmit = (formData) =>{ console.log(formData); }; const dispatch = useDispatch(); return( <div className="sendmail"> <div className="sendmail-header"> <h3>Nuevo ...
1
57e62ecbffacb1b97bc3b267c86eb2ac
c0acd22bba39674f91c78fa5e55744c6
Adjust all incoming candidate poses into a "Global" frame. Positive arm offset to move the approach point "right"
def cvt_local2global3(local_pose, src_pose): return pose_multiplication3(src_pose, local_pose)
1
6ce31e53a77526482ebc13fe0e8dd53c
0ddbc23f3c99428894f6e784dfcd326c
根据库位和物料,查询盘点单行项详情
{ List<T_StockInfo> lstStock = new List<T_StockInfo>(); string strSql = string.Empty; if (model.FromErpWarehouse.Contains("BH") && string.IsNullOrEmpty(model.FromErpAreaNo.Trim())) { strSql = "select a.id,a.Serialno,a.Batchno,a.Qty,a.Barcode,a.Comp...
1
8b1dcff9e3dc8b36c8b13aa4f7a61154
beb2b128ed33925e29f21d49922b8569
Test the property 'WorkspaceName'
class PythonAlgorithmTest(unittest.TestCase): def test_generic_workspace_property(self): algm_par = mtd._createAlgProxy("CreateWorkspace") algm_par.setPropertyValues(OutputWorkspace="test", DataX=1, DataY=1, DataE=1) algm_par.execute() ws = algm_par.getProperty("OutputWorkspace").value ...
0
091a70f66d3f770a1ba2ff2a81ff734a
0dea2dea48ba91f7bcdc7a1e3c982fff
Returns the directory the running osu! executable is in. Requires osu! to be open.
def getcwd(): pass
0
7bea7279f550f1aee287b52b44d5a63c
a315cad3768ce05441f196409b0be3bf
Sets all fields of a TCP stream listener to their initial values.
public class TCP extends drcl.inet.Protocol implements TCPConstants, Connection, ActiveComponent protected void win_init() { CWND = MSS; AWND = AWND_DEFAULT * MSS; MAXCWND = MAXCWND_DEFAULT / MSS * MSS; sthld = INIT_SS_THRESHOLD / MSS * MSS; if (sstPort._isEventExportEnabled()) sstPort.exportEvent(SST_EV...
1
55671c9f07c1b80fae341e8b21b05315
7e8bd5a07da482a8e3ca14ebed6711cf
Disable use of singleton pattern.
class Component static get isSingleton() { return false; }
1
cfc7de993d2459f62b639ee10286de7c
b9046389f98b3ee17ae219218d81bed2
! @brief Locks the option bytes block access
FLASH_Status FLASH_EraseOptionBytes(void) { uint16_t rdptmp = RDP_Key; FLASH_Status status = FLASH_COMPLETE; if(FLASH_GetReadOutProtectionStatus() != RESET) { rdptmp = 0x00; } status = FLASH_WaitForLastOperation(EraseTimeout); if(status == FLASH_COMPLETE) { FLASH->OPTKEYR = FLASH_KEY1; FLA...
0
8d409f09ee230462a655aad34bac4f31
94434fd32173bc621aa808319d0cf0f3
获取当前设备的本地时间跟UTC时间相差的【分钟数】,可正可负
function getCorrectLocalTime(): number { return TimeManager.now() - LocalTimeSubServerTime; }
0
f711eee188e8c78a7bced6f40290eb41
6002e237249bf6e2b151891d6d18a337
从上发接口表的数据对象转成历史表数据对象
@Service public class Cube1Step2 extends BaseCube private Map<String, Object> transferHistory(Map<String, Object> historyData, String type) { Map<String,Object> cube1 = new HashMap<String,Object>(); if(null == historyData || historyData.isEmpty()){ return cube1; } cube1.put(VehicleCube1.DEALERCODE.getValu...
1
c0191dd6c45984fe4132a53807f229c1
f667899e1de6416595019db5331c5c28
获取用户的FD列表
{ char sqlMsg[512]; MYSQL_RES *sqlRes; int frdNum = 0; MYSQL_ROW sqlRow; sprintf(sqlMsg, "select frdID from frdList where ID = %d", userID); sqlRes = sql_run(&sql, 1, sqlMsg); serr(&sql, "get frdLis", __LINE__); while ((sqlRow = mysql_fetch_row(sqlRes))) { cJSON *item; ...
1
0dc604096766fc21cf2ba45c5bd26d6a
1907331a2a0cc065d7333c40c37a631b
Create new ry single qubit gate.
class Graph: def x(self, q): self._append_node(type='gate', op=Pauli_X(q))
0
fd96e834d4183c3e6d30c4e8d6dae021
4291d5cb7ce9d00fd213fd8971123f44
Get sample width of an audio stream
class Audio: def getSampleWidth(self): return self.sample_width
1
93115cf21afb36b193322a575d3b566d
1a2751ad5e408384802be2c9ab46276b
判断当前商品是否被选中
getIsSelectedGoodsShopcar(state){ if (state.goodsShopcar.findIndex(ele => { return ele.isSelected }) === -1) { return false } else { return true } }
0
23a69c66cf224a059edcdd0437e2fa41
db00d4b5c8453f287e8d479fbd30dc70
make permanent the export options added via hang_options_setup()
COptionsDlg::OnSetPermanent() { HCURSOR prev_cursor = SetCursor(LoadCursor(0, IDC_WAIT)); TCHAR msg[MAX_PATH]; HKEY hk; int res; res = RegOpenKeyEx(HKEY_CURRENT_USER, _T("Environment"), 0, KEY_WRITE, &hk); if (res != ERROR_SUCCESS) { _stprintf(msg, _T("Error writing to HKEY_CURRENT_USER\...
1
6bd2e5908fc71c9dc9d7d73eea55969a
98dd87668c33cc432f0d61268f872696
レイヤー番号からレイヤーを取得
Layer* Component::getLayer(std::string key) { return Registry->getLayer( key ); }
0
e9739a5f438645eb8f3739eba58b48f8
4418c2c053cff67480359e2c338031ec
Ищет по индексу брэнда с проверкой наличия товаров
class SiteController extends Controller public function actionBrand($id) { $brand = Brands::find()->where(['url'=>$id])->asArray()->one(); $products = Products::find() ->select(['products.id','products.name','products.preview','categories.name AS cat_name','categories.url']) ...
1
20803e21c0e748a7bd8c1d53ce76952d
c813830f8cf94e2c6bcb45b489047d3f
Gets a logger for current thread.
static Logger getLogger(Class<?> targetClass) { return new LoggerImpl(targetClass, null); }
0
47adb29e63795b0004d99c8251cd68d2
50a832e0c4ed06d85577af7e67cb7fb7
反地理云编码
bd_encrypt(gcjLat, gcjLon) { let x = gcjLon let y = gcjLat let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * this.x_pi) let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * this.x_pi) let bdLon = z * Math.cos(theta) + 0.0065 let bdLat = z * Math.sin(theta) + 0.006 return { lat: bdL...
0
ca4fe4148277f833c4d19a267b10981d
e52ecde198ef418327474f7bf3029f05
Given the UDP Socket, this function reads from it and then writes what ever was streamed to the socket to STDOUT. Literally doing exactly what it's name implies.
void udp_socket_stream() { int slen = sizeof(si_other); char buf[BUFLEN]; while (1) { memset(buf, '\0', BUFLEN); if (recvfrom(s, buf, BUFLEN, 0, (struct sockaddr *) & si_other, &slen) == SOCKET_ERROR) { printf(" recvfrom() failed with error code : %d", WSAGetLastError()); Sleep(1000); exit(EXIT_FAILU...
1
4d8ee4e9c5f0359818e4a7c21328e0e9
0e204ae3e252ef886e7c913500171a99
Updates the health label with the specified health values.
{ percentage = (float) amount / (float) stats.defaultHealth; if (orientation == BarOrientation.Vertical) { barChange = percentage * healthDisplay.barDefaultHeightSize; healthDisplay.UpdateBar(BarAttribute.Height, barChange, stats.currentHealth); } if (...
0
1249ec77c1a82a9ac84f6bbf2bcc2776
058fb3df4d24d60db723d2d3e804d386
Returns the data for page or returns an error
{ set_error_handler(function($severity, $string, $file, $line, $context){ throw new \ErrorException($string, 0, $severity, $file, $line); }, error_reporting()); $content=''; try{ ob_start(); include($pageData['path']); $content = $content.ob_get_clean(); } catch( ...
1
6c8c6a1b304970bedeacf96564c4183b
61b7d2ba23b59d1bf6be7e4850f943fa
Gets query for [[TicketSlots]].
public async Task<IEnumerable<CalendarSlotModel>> GetAsync([FromQuery] string titleLike, [FromQuery] bool? active, int? take, int? skip, string orderBy, string orderMode) { var entities = await _service.GetCalendarSlotsAsync(); var calendarSlotModels = _map...
0
ace2d964c31b4a8fbcf5dcd57d7ad4a2
10dff39e16c66e05186d4ea34077f046
#' @description explore coverage of starting epidemic parameters
examineposteriors = function(ABC_plognorm15){ p1=ABC_plognorm15$param[,1] p2=ABC_plognorm15$param[,2] p3=ABC_plognorm15$param[,3] rzero = exp(p1 + 0.5*p2^2) rmed=sort(rzero)[floor(length(p1)*(0.5))] rlo=sort(rzero)[floor(length(p1)*(0.025))] rhi=sort(rzero)[floor(length(p1)*(0.975))] mean(rzero) print...
1
a06308dd0b5687724c82e8c3501f739a
4420141abcd42e09b1f4e0dc69559beb
Verify we get None when the searched for text isn't there.
result = search("adsfasdf", self.db.test) self.assertIsNone(result) result = search(["Alice", "Bob", "Charlie"], self.db.test) self.assertIsNone(result)
1
5d8a76f5b881da4823fa0d44ea900757
9e2598516b0639770eae75cf2f01eafd
Restore interrupts to the previous state.
namespace class SuppressInterrupts SuppressInterrupts() { mInterruptsWereOn = (SREG & (1<<SREG_I)); cli(); }
0
635acd7447267ae07577542791d3f051
cafdd34e5d0c7085293bd25c37cf305a
Log communication errors when logging is enabled
namespace Microsoft.MixedReality.Toolkit.Extensions.Sharing.Communication.Photon public class PhotonParticipants : IInRoomCallbacks, IDisposable private void LogError(string messageFormat, params object[] args) { _logger.LogError(messageFormat, args); }
1
77e65e4f1ffc1533882f35e91086223e
f516eea3190a34d924af5bf06c2a0df3
Generates a list of size 2^power with numbers from set {1, 2, 3}.
lst = [] for _ in range(2 ** power): lst.append(random()) return lst
0
d7a63cbe4283519ee6630b9c6f26e03b
ffddea35770c5cecd39a319262641685
The authorization URL to be used for this flow. This MUST be in the form of a URL. This is a REQUIRED property. <p> Applies to oauth2 ("implicit", "authorizationCode"). </p> <p> This method sets the authorizationUrl property of an OAuthFlow instance to the given authorizationUrl argument. </p> the authorization URL use...
public final class OAuth2AuthorizationCodeRequestAuthenticationToken extends AbstractAuthenticationToken public static final class Builder implements Serializable public Builder authorizationUri(String authorizationUri) { this.authorizationUri = authorizationUri; return this; }
1
7cfeca956be9fd7818c5fb151246dd0a
5339fd4f27de83e173f882113f85f572
This method tests that the GetCountries method works in a valid situation.
return [ new Country(1, 'Tanzania', [{time: 'Office Hours', number: '+255 784 999 736'}, {time: 'After Hours', number: '+255 784 666 510'}, {time: 'Alternate After Hours', number: '+27 72 710 4045'}], 'B0gBaqoW4NP7eIdjUcFx'), new Country(2, 'Rwanda', [{time: 'Office Hours', number: '+250 280 301 000'}, ...
0
923e6ceae4c2511c1b7986be305a7831
b97a025f3f9713959a00b108519890ec
最后注册的函数最先调用,栈模式
{ BYTE i; UINT *init_stack_ptr; USHORT stack_size; init_stack_ptr = OS_Task_Tbl[OS_W_Task_Id].stack_ptr; stack_size = ((OS_Task_Tbl[OS_W_Task_Id].stack_size / 4) - 1); init_stack_ptr += stack_size; *init_stack_ptr = (UINT)OS_W_Func; init_stack_ptr--; for(i = 0;i < eRegi...
1
af4bb263b50b4b793a9a97a940e1bdeb
78208163b566311f9f268449f024d819
adiciona à lista de usuários ativos
class UsersController extends AppController public function ativar($id) { $this->autoRender = false; $user = $this->Users->get($id); $user->status ="ativado"; $this->Users->save($user); $this->redirect(['controller'=>'Users','action'=>'listar']); }
0
73f62309086c6b09103d40eae43d6a53
1ff2f62aa8c793e761026c7145353692
Handler for font colour button
{ System.Windows.Forms.ColorDialog colorDialog = App.colorDialog; colorDialog.AllowFullOpen = true; colorDialog.FullOpen = true; colorDialog.ShowHelp = true; colorDialog.Color = System.Drawing.Color.Pink; if (colorDialog.ShowDialog() == Sys...
1
d5b51cac1e79d806bc18ee97c63251b2
7d9c9c355f577bc9e1f101017e10d570
Preprocess data for CTR model
class Regression_Model(): def _preprocess_train(self): train_df = self.sale_df[self.sale_df['item_price'] >= 0] train_df = train_df.groupby(['date_block_num', 'shop_id', 'item_id']).agg({'item_cnt_day': 'sum', 'item_price': 'mean', 'date': 'first'}) train_df = train_df.rename(columns={'item_cnt_day': 'item_cnt_mo...
0
c97f22e3f0bf765e2d416bce3759965b
23467207aa3c269cd00b694611b9dadd
Integrate a given two column (x,y) spectrum array
XX = w['XX'] X = w['X'] Y = w['Y'] ccstrtwo = r'2e$^2$/h' ccstr = r'e$^2$/h' modifier = 1 if ccstrtwo in w['data_unit']: modifier = (2*sc.elementary_charge**2/sc.h) elif ccstr in w['data_unit']: modifier = (sc.elementary_charge**2/sc.h) if XX.ndim == 1: intarr = np.nancumsum(XX)*np.diff(X,prepend=X[0...
1
b2564ea3af3ad94996208dca67f4f58a
b755fec65ecf9ee99568fe117e37d42a
Create full text index
TextIndex textIndex = IndexFactory.createDefaultTextIndex(QuickFind.INDEX_NODES); textIndex.addToIndex("Apple", new String()); textIndex.addToIndex("Apple Long Long Long Long Long Label", new String()); textIndex.addToIndex("Bat", new String()); textIndex.addToIndex("Bat", new String()); textIndex.addToInde...
1