query_id
string
corpus_id
string
query
string
code
string
label
int64
10eb4d4986148fb4a9666f51cbc42370
322cff154fa66286aaeed70ddbf3b2c5
Densifies a geometry using a given distance tolerance, and respecting the input geometry's <see cref="IPrecisionModel"/>.
namespace NetTopologySuite public class NtsGeometryServices public PrecisionModel CreatePrecisionModel(PrecisionModel precisionModel) => new PrecisionModel(precisionModel);
0
aaa1661006d16cc4bc7c2731cc51c812
d8ecc83c0e8d5ddb6c69775bf2f18a7b
Validate existing runs for starting run
function checkActiveRuns(json) { const activeRuns = Object.keys(json).filter((dagId) => { const dagRuns = json[dagId] .filter(({ state }) => state === "running" || state === "queued") .filter((r) => r.count > 0); return dagRuns.length > 0; }); if (activeRuns.length === 0) { $("#auto_refres...
0
c3f0572458b9b7ba259eea5a49e81f47
6291b59ccacbbe6ac13d4f655bd776e6
Verify the MCP9800 configuration.
{ short result = 0; if (!BQ27441_control(SET_CFGUPDATE, 1000)) return 0; __delay_cycles(1000000); result = 0; while(!(result & 0x0010)) { if (!BQ27441_read16(FLAGS, &result, 1000)) return 0; } if (!BQ27441_command(BLOCK_DATA_CONTROL, 0x00, 1000)) return 0; if (!BQ27441_command(DATA_CLASS, 0x40, 1000))...
0
48ff8412dfe73ea7f6dd28213a753f28
c9975e64dd3a04cdfcb59df37d244e4b
手机信息查询接口授权key状态查询
Map<String, Object> result = new HashMap<String, Object>(); RealNameAuthenticationAuthorizeReq req = new RealNameAuthenticationAuthorizeReq(); try { req.setSubMchId(tdMerchantDetailInfo.getWxChildNo()); req.setReqId(DateUtil.format(new Date(), DateUtil.YYYYMMDDHHMMSS)); logger.info("-----------------微信子商...
0
b51d5e91426f4782901c1b01e2a86231
ab088f25b82536d26bed6c728402ac76
Sets the width of a rectangle centered on a drag point to allow for limited movement of the pointer before a drag operation begins.
public class Note implements Playable @Override public void setMovingDuration(MouseEvent event) { widthOffset = x_coord + rectWidth - event.getX(); }
0
ce0b86319313875dd9f33fb85ba367b7
370db5f4cfd09b41a386a321f895a3ee
Sets a state of the apriori algorithm.
namespace Fuzzware.Schemer.Fuzzers void SetState(string NodeIndexStr, string TypeStr, uint FuzzIndex);
0
15cc016201b5ecc82ebc76c9410604d1
a15627c2f70b2f64604e9ff304419878
Converts int to a double.
namespace MMO.Animation public class LocomotionMomentum : StateMachineBehaviour private double ConvertToDouble(float i) { return Mathf.Round(i * 10) / 10; }
0
05edbff4d054a9b21635b5761f6e3211
51b23e5fd0d67c5ad5ce5ef33708f6a6
Reset all tests reports.
self.skipped = [] self.passed = [] self.failed = [] self.errored = [] self._current_test = None
1
d962c2c4e4ca0e1a0112f625acc73ebb
6c1a8e35ad0978bd84e96dff61f1f9ba
Cambio delle fermate dell'andata
this.grid[x][y].setStatus(Status.FENCEPOSSIBLE); if (dir.equalsIgnoreCase("h")) { this.grid[x][y - 1].setStatus(Status.FENCEPOSSIBLE); this.grid[x][y + 1].setStatus(Status.FENCEPOSSIBLE); } else if (dir.equalsIgnoreCase("v")) { this.grid[x - 1][y].setStatus(St...
0
905c2af38789f3a06d6011b4c9334257
68399c07f628096000ade8765ab5ade8
Gets the collection of User classes which hold listed owner's information.
export default class DBManager extends Singleton<DBManager>{ static getUserCollection(): Collection { return DBManager.getInstance(DBManager).userCollection; }
1
1b516c7e214e71ea18d79f7c22a74858
3a8f6d7f7a171f09e7ba270d3ef7d231
Add a new alarm action.
{ assert(alarmdb); assert(alarmdata); struct sqldb_bindval bval[] = { { ":mailbox", SQLITE_TEXT, { .s = alarmdata->mailbox } }, { ":resource", SQLITE_TEXT, { .s = alarmdata->resource } }, { ":action", SQLITE_INTEG...
1
23d0fe6ad7d26e508ce3133de5f54547
e78cbe7ccc88b454cb9eb2377955f250
test for r_single_t for regression examples
reg = GPARRegressor( replace=True, scale=1.0, per=True, per_period=1.0, per_decay=10.0, input_linear=True, input_linear_scale=0.1, linear=True, linear_scale=1.0, nonlinear=True, nonlinear_scale=1.0, rq=True, nois...
0
ba5d845b9ec4fa655af5c955c51f52c1
0acb6d1a641697dc007bc5a90af39d01
Handles the RowDeleting event of the grdWaitingList control.
public partial class EmployeeOrganization : BaseClass protected void gvOrganisation_RowDeleting(object sender, GridViewDeleteEventArgs e) { try { int deleteRowIndex = 0; int rowIndex = -1; Boolean Flag = false; BusinessEntities.OrganisationDetails objO...
0
73089ad677105a32907287747cecb4f2
54cf4d04f20cadf142e850077a6898d4
导航到addOrUpdtPdtAttrVal.jsp页面
@Controller @RequestMapping("/invoicing/goods/property/value") public class GoodsPropertyValueController @RequestMapping(value = "/add", method = RequestMethod.GET) public ModelAndView goToGoodsPropertyValueAdd(){ String url="/basedate/Role/Role_add"; return new ModelAndView(url); }
0
13374ea994dd664bb5f39bb6a3f92b2f
9178db36b864004a54b842c3b7e8be53
Register a callback fn for whenever the cfg changes
class ConfigDefBuilder onUpdate(func) { this.def.onUpdate = func; return this; }
1
d2eff0036c2fec1c631e743821a05fac
7b8a0a1c8d0ece9f24271a16cd907207
Check to see if EstimatedOnDemandCost property is set
namespace Amazon.EC2.Model public partial class SpotFleetRequestConfigData internal bool IsSetOnDemandMaxTotalPrice() { return this._onDemandMaxTotalPrice != null; }
0
0a4018030d5686d5bb9cde4ecb7bb5be
ccf1132f9652141b8c34102524fac727
计算旋转后图片的尺寸
public class ImageUtils private static Rectangle CalcRotatedSize(Rectangle src, int angel) { double cos = Math.abs(Math.cos(Math.toRadians(angel))); double sin = Math.abs(Math.sin(Math.toRadians(angel))); int des_width = (int) (src.width * cos) + (int) (src.height * sin); int des_height ...
1
c44b5be3d515a1cbee8767a1f00efbb7
fa2e7cbf3addab044b33010594b3cc7a
/////////////////////////// construct ////////////////////////////////
void CTe2State::ConstructL() { }
1
59e14335df1f81023745ee1c4c6fbcbc
5e8c75c9e81dd7da14e2958ba93d0d3d
Finds all the revenue types.
{ using (var db = new SRISContext()) { List<SRType> SRTypeList = db.SRTypes.ToList(); return SRTypeList; } }
0
6e0fe1c2d8b986865a368455c31f098c
ec3f66f72f92e78b28bc01daa7419985
清除地图上的学区要素
if (yumPoly !== '') { for (var i = 0; i < yumPoly.length; i++) { if (yumPoly[i] != null) { yumPoly[i].setMap(null); } } yumPoly = []; } }
1
29ae12271cb3f580fd36a7af471533bc
9714d63aee81091acc6fd0b8025d2adc
Generates ERD in Block-Format
output = "" outputdict = {0:[0]} output += "[B" + str(self._blockID) + "]\n" i = 0 for e in self._elements.rbegin(): output += str(i) + ": " + e.printer() + "\n" i += 1 for e in self._preds.begin(): if(e.getReachableBlock() is not None...
0
565b3766ed5406b1a1cab7b9112ec2a7
0130a3e03d7a080cd09135afee9de6e1
socket (error) state to string
error_msg(unsigned err) { static char buf[256]; switch (err) { case WSA(ECONNRESET): return "TCP connection reset"; case WSA(ECONNREFUSED): return "Connection refused"; case WSA(ETIMEDOUT): return "Timed out"; case WSA(ECONNABORTED): return "Connection aborted"; case WSA(EACCES): return "Access denied"; case WS...
1
1cd4c85e1b5d40ff9c1409c7585868a3
07116bab3026872c401d71c3e7ad2c7f
Assigns a comma-separated list of video embed codes (or a single embed code) to a particular player. An existing player will be overwritten when using this mode.
class AnalyticsImpressionSample extends \BitmovinApiSdk\Common\ApiResource public function supportedVideoCodes(array $supportedVideoCodes) { $this->supportedVideoCodes = $supportedVideoCodes; return $this; }
0
fd7893b8ec9b7d125a2f9fcb751e70bb
c6e3dfaeeee55ad2248cad025cb3f85d
字符串转Long型List
public class StringUtil public static List<Long> str2Longs(String str, String sepa) { if (sepa == null) { sepa = SEPARATOR_COMMA; } List<Long> longs = null; try { if (isNoEmpty(str)) { String[] strs = str.split(sepa); if (strs != nu...
1
d752ea4410c3c2e617c08a09eafb2069
ed19f20065c3868fab0b6971a47ee73f
Get the vary headers that should be honoured by the cache.
class VarnishLog: def con_vary(self, base): for trx in base['data']: var = trx['var'] if 'obj' in var and 'http' in var['obj']: for objhttp in var['obj']['http']: if 'vary' == objhttp['lkey']: spl = objhttp['val'].split(',') ...
1
dcf39514984265daa231b6ff60b9c240
257e678117921f00b9f4adaca66731ff
Consume data in advance of what the decompressor requires.
namespace JPEG{class RWSource{ static void skipInputData(j_decompress_ptr cinfo, long num_bytes) { RWSource* src = (RWSource*) cinfo->src; if (num_bytes > 0) { while (num_bytes > (long) src->pub.bytes_in_buffer) { num_bytes -= (long) src->pub.bytes_in_buffer; fillInputBuffer(cinfo); ...
1
af4cc8eee2d74d719856164dbfa7cd42
ddf580c2ce7904ce7fe688a6e19da61d
通过hostname(即ip)获取host所在的监控组名 返回由组名组成的字符串
try: groups = self.zapi.host.get( search={"host":hostname}, selectGroups=['name'], output=['groups'] )[0]['groups'] except requests.exceptions.ConnectionError as e: self.log.error("connect to zabbix failed") ...
1
d0a82a8c54fc6c0fd6bcb7ad6d7dc036
0ccf2060dcb6ac6accae698839b0f9d1
Returns the value of the '<em><b>Mechanism Name</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Mechanism Name</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
public abstract class SASLMechanism implements CallbackHandler protected abstract String getName();
1
0e10c98f6bb16654f215807fb079342a
6d0f17c62e371d8d3ee9399bbf682f9f
Set (replace) the ordering to sort by the day field.
public class SortResultAlterKey extends DefaultSQLAlterKey @Deprecated public void setPlanDay(String[] values) { setKey(SortResult.PLAN_DAY, values, true) ; }
1
4b7f817c6997dd376e0d877a2f2d692e
41c2f2c1347f57bdc2c8a9810ad0e13e
Searches for friends and returns them.
class ProfileController extends Controller public function searchFriends() { if(Auth::guest()){ return view('auth.login'); } else{ $user = Auth::user(); $friends = Friend::where('user_id', '=', $user['id'])->select('friend_id')->get(); $users = User::all(); $results = []; ...
1
4c6f069dae1e49c795b9e35165f7d0d9
9bba217e94c54f1456d002caefcb9ffc
Unschedule renewal payment
function pmpropfpro_deactivation() { wp_clear_scheduled_hook( 'pmpro_payflow_recurring_orders' ); }
1
5de0274c502edd8946206f4d0b72e174
23eeb035d6137455f2654e13442a476d
下载video的中英字幕并保存到video model中
class VideoEditAction extends Action{ public function subtitlesCommand() { $ffmpeg_url = $this->getFfmpegInfo(); $sourceVideo = I('post.svideo', ''); $subtitle = I('post.subtitle', ''); $savename = I('post.savename', ''); $sourceVideo = urldecode($sourceVideo); $subt...
0
30a314aaf6284e54a8efc5f5ccb783dd
518d18217cfd21a64044d2136c1ed0be
<br>[機 能] メッセージからラベルを削除する <br>[解 説] <br>[備 考]
class ModuleMember function deleteMemberLabel($midx,$label=null) { $labels = $this->db()->select($this->table->member_label,'label')->where('idx',$midx); if ($label !== null) $labels->where('label',$label); $labels = $labels->get(); for ($i=0, $loop=count($labels);$i<$loop;$i++) { $this->db()->delete($this->...
1
b027a3db8d694433eba0fe7f734ffd1a
af9d711b48a918b8294b38006c28f9cf
Get a driver allowing to change station position along Zenith axis.
function wxDriverTWC(stationID) { this._twcinit(stationID); }
0
fa2b49a7fbc5c7e9d9860fbdfcff7901
9cb1e2560e41d74a414098fdae0e4c56
hent navnet på transportmidlets ejer
{ SqlConnection conn; const String db = "F20ST2ITS2201908775"; conn = new SqlConnection("Data Source = st-i4dab.uni.au.dk;Initial Catalog = " + db + ";Persist Security Info = True;User ID = " + db + ";Password = " + db + ""); conn.Open(); SqlDataReader...
0
51c479b9884634c79f33968ef8662946
7823508d14e262e7d854bc63d36a50be
No processing requried
public class AbstractChunkProcssorTestingImp2 extends AbstractChunkProcssor @Override public void doProcess(ExecutorRequest request, ExecutorResponse response, ExecutorContext context) throws Exception { }
1
09327905f46b9ee04bbcb34e91de9d7a
ed4687e10e547ce127d6932189c2071d
[`GlobalFlags`](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-globalflags) function.
namespace Vanara.PInvoke public static partial class Kernel32 [DllImport(Lib.Kernel32, SetLastError = true, ExactSpelling = true)] [PInvokeData("WinBase.h", MSDNShortId = "aa366577")] public static extern GMEM GlobalFlags([In] IntPtr hMem);
1
af7e8556e95d4fdb2f8b675a96b94646
87907ac35819b4979a6ac491c7bbcebe
The Y combinator.
def map(f, m): x = yield m yield lift(f(x))
0
3fe1371062661d97b8df77109b310aeb
b3a09082d976bba2750c825c93f48e8c
Calculates the Eulidean Distance b/w Two Points on an n-Dimensional Plane
def euclidDist(pair1,pair2): return ((pair1[0]-pair2[0])**2+(pair1[1]-pair2[1])**2)**0.5
0
2ce001c5ae628f726b5658161e19ee8b
5c295684f2ebe8483b2cebd337283c2c
# Computes total population afected by technology # # Args: # time: vector with time points defining technology lifetime # prev: present prevalence # incid: incidence # disc: discount factor; deafult = 0. # # Returns: # tot.pop: total population afected by technology over technology lifetime # # Technolo...
Nh_total <- function(t,l,r) { Nh_t(t,l,r) + Nh_initial(t,l,r) }
0
62e0ea21c62f32442d2c6390bbb5315b
e3b2e20dace97f40f3cebc25ca0fc4cc
*mysounds A command that displays all sounds uploaded by the author.
class Media:: SoundsController def index @sounds = Sound.all end
0
5073e3b0e3d5a2ed1dd7e5b3e0a5c38d
86ee0d6e7d1a0a9057f6cc743d783eb6
자소설 오브젝트들 중에서 author 값이 현재 유저인 값만 전부 가져오기
class Subscribe_List_Author(Resource): def post(self): current_user = get_jwt_identity() user_id = request.form['id'] if current_user is None: return make_response(jsonify({ "result": "fail", "contents": "잘못된 토큰값입니다." }), 401) else:...
0
6e6ae1421e87685094f6be1b36da7f57
8505ce00c92dc84e56dd365870b83e11
检查商户编号是否存在
namespace Datebass class Merchant public bool merchantexist(string merchantID) { string sqlmerchant = "select * from merchant where merchant_id='" + merchantID + "'"; if (select.Do(sqlmerchant) == null) { return false; } else ...
1
2d52b661a89104acc51af223c3636204
b5dbbf5a7c7aec3c4857072caf2da94b
Test that the canonization service tries again when the first transaction hasn't been attested.
{ uint32_t child_context = 1023; const uint8_t EXPECTED_TXN_ID[16] = { 0x82, 0xfd, 0xa8, 0xd1, 0x6e, 0x45, 0x4e, 0xbf, 0xae, 0x32, 0xc9, 0xf0, 0x8a, 0x4b, 0x0a, 0xeb }; mock->start(); mock->stop(); EXPECT_FALSE( mock->request_matches_canonized_transaction_get( ...
0
ddf3ec54b730498d77fb4765de1087c6
7f61448ad6da3ef0f9cb03f40c5be655
https://atcoder.jp/contests/abc146/tasks/abc146_a
cases like (1)
0
14e58b925c09a0656cac2e7fc6217a67
5453b802f026185bdbeb8dfa409d246e
Загрузить изображение и изменить его размер до размера миниатюры. Для отображения миниатюры, нужно сперва явно вызвать этот метод, чтобы картинка загрузилась и сохранилась в кеше.
if (name != NO_PHOTO) { if (name != null) { val path = "" + context.filesDir + File.separator + name + ".jpg" if (!File(path).exists()) { Api.getMiniatureById(name) { if (it != null) saveImage(context, name.toString(), it.data) ...
0
424408992952d1424660035972e7b479
73bdf808a22ff176c42dc7689813093f
Gets the first visual descendent that matches the requested type.
namespace Catel.Windows public static class DependencyObjectExtensions public static T FindVisualAncestorByType<T>(this DependencyObject startElement) { return (T)FindVisualAncestor(startElement, o => (o is T)); }
0
3f55128fa12bcfa251a7062d52fc690e
75dc695dcea17ea92ba7a3cd0f7c4bc9
Returns the host component of the authority.
class Uri extends BaseObject implements UriInterface public function getHost() { return $this->getComponent('host', ''); }
1
7ba776e2b6e8b8c2b10ce5fc4d693579
846dab29d9c64f648032ea64b1ef3f50
decorator for handlers to save every handler call to database
def log(called_func): def log_saver(*args, **kwargs): ret_log_saver = called_func(*args, **kwargs) DEC_LOGGER.debug(f'Called function:{called_func.__module__}.{called_func.__name__}:({args}, {kwargs}). ' f'Called from function: {inspect.stack()[1][3]}') return ret_lo...
0
d708bcc9b7668d559d95b2ea697f9d49
20d7f8af40e05ea9a0e421867df5551c
Active our private credential cache.
ob_start(); $this->credentials = \request_filesystem_credentials( '', '', false, false, null ); $ob_contents = ob_get_contents(); ob_end_clean(); if ( wp_filesystem( $this->credentials ) ) { global $wp_filesystem; $this->wp_filesystem = $wp_filesystem; $this->use_filesystem = true; } }
0
5e763896f21813082366885d8db56bb9
dafe80a2a70a7c1cb44c7c62dda620e9
Update Employee's genderId which has specified idEmployee
namespace Com.Wiseape.ERP.HR.Webservice string UpdateGenderId(Int16 idEmployee, Int16 genderId);
1
5981f3328df7c9b3491138aa0c775ddf
9e7e6dae4147f1c74c3941dd64510284
ABRIR ARQUIVO
user_dir = str(Path.home()) self.view.caminho = filedialog.askopenfilename(initialdir = user_dir,title = "Selecione O Texto",filetypes = [("Arquivos txt","*.txt")]) if len(self.view.caminho) != 0: self.lblArquivo["text"] = self.view.caminho self.controller.cifra.caminho =...
1
ba21a6a3d126aeb4e43a719f54272650
6af2cbefe3c3e33f46744d3e7172d5e1
Попытка обновления с пустыми данными
{ $school = School::where('id', 1)->first(); $input = ['name' => 'Зош номер 20', 'city_id' => 1]; $res = $this->logic->update($input, $school); $this->assertLessThan($res, 0); }
0
8ece158a1a4db02fe6df93b95e5df486
a8dd4a88979ba2b3fbce118499a03a1f
获取redis 缓存数据,生成sql语句,写入统计表
public class Yunguan_G4JK_ZhWordsCountToRedis extends BaseRichBolt @Override public void execute(Tuple tuple) { redisserver=RedisServer.getInstance(); fileserver=FileServer.getInstance(); String tdate=tuple.getStringByField(Yunguan_G4JK_Basic4GFields.STARTTIME); String chwords=tuple.getStringByField("ChineseIn...
0
b3bc9b1a0570f0be962f7926832893c3
1e7a68ad1353d8c2fab3b52439dda266
Añade campos a ocultar
def campo_oculto(variable, dato): print "<input type='hidden' name='%s' value='%s'>" % (variable, dato)
1
70c473cb80af45ec375bfaf0df4b7565
8caea00889041c240c8d034508ba972c
___________________________________________________________________________________________________ main
def main(): test() for game in range(1, 5): print("Game {}:".format(game)) hands = deal(10) print("Hands Dealt:") for hand in hands: print(hand) winner = poker(hands) hand_type = hand_rank(winner[0])[0] if len(winner) > 1: print("\n...
1
07b3d3282b56a654145fe9c3ba2ff236
133d1aad29f6cd2cbf4dcd790e09018a
根据讲师ids查询讲师
public List<Teacher> getTeachers(String[] teacherIds);
1
a67985658b8b9ed532493c224d1687ca
af8f5fb2edd115056f8860272785001d
检查date 是否在时间 startDate endDate之间 <br/>
public class DateTools public static boolean dateBetwen(Date startDate, Date middDate, Date endDate) { return dateCompare(middDate, startDate) > 0 && dateCompare(endDate, middDate) > 0; }
1
368c54598c2732dd4c51fc504537906b
520ab588b4f592218472d1b23a249565
Adds the transaction fee to contract product.
namespace EstateManagement.Client Task DisableTransactionFeeForProduct(String accessToken, Guid estateId, Guid contractId, Guid productId, ...
0
b0628893e7d6563820a11221782db076
74422d0e3be0d5cf682b993629ef447f
Runs until the user inputs a non-blank value.
int main() { printf("\nEnter a value (10..20)\n"); flushInputBuffer(); while (true) { } }
0
21bdfd7103956631d851f930b16233db
6b0521ff860debb17914194f818299db
@brief unmark the given constraint for singularity
nplc_constraint *temp_cst; while (cst->next != NULL && cst->next->cmp == cst->cmp && cst->next->vert < cst->vert+cst->num_verts) { if (cst->next->vert + cst->next->num_verts <= cst->vert + cst->num_verts) { temp_cst = cst->next; cst->next = cst->next->next; fre...
0
7758784e2bcb171c95871f45a7b21317
e97f87e61ceb93d4be68273d39fde9e7
Returns the tileset index of the specified character
{ if (c == ' ') return 0; return _charMap.IndexOf(c); }
1
5a18a5bde1a075ba7d99d48fe8b18df1
f00ce32ecf958e5585492188ce66ac70
retorna uma lista com todas as propriedades de classes e habilidades
local result = {} for k,v in pairs(self:weapons()) do result[k] = v end for k,v in pairs(self:armors()) do result[k] = v end return result end
0
5b92a37d9390bdc110412fedf0f2b78f
5917d18b37b94ebd08a57640b6bcfd49
Adds the current user's CSRF token (see User.GetCSRFToken()) to the URL for purposes of preventing CSRF attacks. This method should be used on all URLs to be put into all links and forms the application generates.
{ HttpRequestBase request = new HttpRequestWrapper(Context.Request); Context.Response.SuppressFormsAuthenticationRedirect = true; }
0
05b31bcedf01d8c435e02473097ccf18
141ad0add1dc38dad6ce637c7f878b57
method to apply ScheduleFavorite Settings of the query window
namespace TVProgViewer.TVProgApp.Controls public partial class VisibleSettings : UserControl private void rbQuery_CheckedChanged(object sender, EventArgs e) { if (rbQuery.Checked) Settings.Default.AllWeekMode = "Query"; }
0
3e9a76efeedd529bd41c026dba68c83d
31d703bc1bce17f2623ea02d649ae2ca
Set external trigger level in Volts
public void SetExternalInputEcl210(int value) { Transport.CurrentCommand = _commands.SetExternalInputEcl210; Transport.CurrentCommand.NetworkAddress = _deviceAddress; Transport.Send(_functions.SetExternalInputEcl210(value), true); Wait(); }
0
7000368b10ab028a20dc59b44c171698
553bda4b30e3d961b1e0e3b464af8fba
Creates and returns a random maze.
function random_maze () { console.log("[random_maze()]") var parent = {}; var frontier = [[null, [0,0]]]; while (frontier.length > 0) { var i = Math.floor (Math.random () * frontier.length); var p = frontier[i][0]; var c = frontier[i][1]; if (frontier.length == 1) frontier.pop (); else...
1
330cd573777b1913eebd66e0665ff6af
cfaa0f12cb8682bdf7e1e9102c9f782a
Returns whether the mock client is active and can support API calls with no errors.
class ClientApi(ABC): def is_active(self):
1
06dc0b1d400ab10bdb6f12ca3986298e
ec4c24bdf1d494fb49a59f4fa5b1418e
获取美甲作品列表
@GET("/meituApi") Observable<BaseResponse<List<GirlBean>>> getBeautyList(@Query("page") int page);
0
aa620a4ec516e1c785dc435c77f9a299
39dfc6c6d2fe4cd97f38cb74f6bc7de1
WRITE PDB TRAJECTORY (TAKES restart.pdb and appends to trajectory file
double timeInPs, double energyInKcal, const MyAtomInfo atoms[], const Bonds bonds[], std::string traj_name) { int EndOfList=-1; FILE* pFile; pFile = fopen (traj_name.c_str(),"a"); fprintf(pFile,"MODE...
1
029b76d8b8adf703e0584be6f1ad92e0
ab52a879807e3d50d5461d93caef55e7
Crea el menú inferior.
menuFondo = glutCreateMenu(self.mundo.onMenu) glutAddMenuEntry("Negro", self.mundo.opcionesMenu["FONDO_1"]) glutAddMenuEntry("Verde oscuro", self.mundo.opcionesMenu["FONDO_2"]) glutAddMenuEntry("Azul oscuro", self.mundo.opcionesMenu["FONDO_3"]) menuDibujo = glutCreateMenu(self.mu...
0
06c522af2c0150ea9ba5ffeeea850e1e
44e1ca8a96ef30e84b2d70a3dc9c087d
Removes all additional supporting documents
@Service public class CooperatorService @Transactional public void deleteAllDocuments() { documentRepository.deleteAll(); ; }
1
905c0bd652e94e8eda0bcfb649535c17
2c5b7467498fe5b02ea3e379135a6e3b
Return a still image response from the camera.
class AmcrestCam(Camera): def camera_image(self): response = self._data.camera.snapshot(channel=self._resolution) return response.data
1
8641b2a98c0a7daecd39510f1199b35c
b90c59cb9a2096d4323294cf0fc16aa8
fonction qui retourne les données de stagiaires
{ Log::info('=> ' . get_class($this) . ' :: ' . __FUNCTION__ .' ()'); return $stagiaire->toJson(); }
1
2b0a203d32465d1669c0722e6273c3d5
77d2a0202df0924c4b25d525a9c9ab18
打开天游戏服务条款
class IndexController extends HomebaseController public function service_terms() { $service_terms = M('web_info')->where(array('info_key'=>'service_terms'))->find(); $lang = sp_check_lang(); if ($lang == "en-us") { $this->assign('service_terms',$service_terms['info_value_en']); ...
1
0654471ff461e41b538c4b5bc2a6f744
df0464d155ffea1fbacb836a1e8a137a
haversine formula @ http://www.movable-type.co.uk/scripts/latlong.html
def haversines_formula(lat1,lon1,lat2,lon2): p = 0.017 a = 0.5 - cos((lat2 - lat1) * p)/2 + cos(lat1 * p) * cos(lat2 * p) * (1 - cos((lon2 - lon1) * p)) / 2 return asin(sqrt(a))
1
bb45da91a043b4dee332415e43d82deb
2aceaf1c9f54966fbfd1b20f3e85e9d1
JDK RSA 签名
{ try { PKCS8EncodedKeySpec priPKCS8 = new PKCS8EncodedKeySpec( Base64.decode(privateKey) ); KeyFactory keyf = KeyFactory.getInstance("RSA"); PrivateKey priKey = keyf.generatePrivate(priPKCS8); java.security.Signature ...
1
4e3b31b5f2c9a097bf0eef781c5cc7b3
6be59abcfe5c92fa448124d694abd6b0
设置标定板长度
{ try { byte[] Cmd = null; switch (UseMK) { case "IGBT": string tempstr = Diameter.ToString(); string diameter = ""; for (int i = 0; i < 5 - tempstr...
0
3d1314c2743ba433c078ead9e861e7de
5e570661021cc557207ba7cc4adf155a
根据UUID获取text
public ReplyText getByUuid(String uuid);
1
6627d5107b4e38170bfa547373f09258
9262c5f0dd4e46fb0ac461e93f210fbc
Calculate the pseudo-Voigt function.
def ft_pseudo_voigt(S,mu,wL,wG): return mu * ft_line(S,0,1.,wL) + (1-mu) * ft_gauss(S,0,1.,wG)
1
6a36719d3da66fd9dc65030ea3f5d772
19d04c626149e7092fbe67c49611dea4
pop head node from queue
void *pop_head_queue(struct queue **queue) { error_handler(queue == NULL,"queue is NULL"); void *data = NULL; struct queue_node *temp_queue_node = (*queue)->head; data = temp_queue_node->data; if( (*queue)->length == 0 ) { printf("There is no data to be removed.\n"); return NULL; ...
1
4b526a0dec00bfb49a6221fdc462b271
f5ea2e97612dfd925328c633cc2703de
convert x tile position and zoom to wgs84 longitude
def ul(xtile, ytile, zoom): n = 2.0 ** zoom lon_deg = xtile / n * 360.0 - 180.0 lat_rad = math.atan(math.sinh(math.pi * (1 - 2 * ytile / n))) lat_deg = math.degrees(lat_rad) return LngLat(lon_deg, lat_deg)
1
69cd608e4b10e9e4c96583c40e0d9a3e
2cdc762e250da3dbf8435ff7199bc628
writes failures and errors into the reporting database
session = getsess('sqlite:///robi.db') rows = session.execute('SELECT message, dst_site, src_site, amount FROM error').fetchall() if rows == []: pass for row in rows: pass for activity in ['transfer', 'deletion']: r = read_efficiency(activity, HEADERS) for link in r: ...
1
e4cbdf7340de441948bf076a66e13281
7fa055c5f543491201ba9c3e974bde9d
采购退单明细查询
function queryDetailTable (options) { return Post({ url: '/inventory/procurement-return/detail-search', data: options }) }
1
05b2c7e17fca1f009a0f622f7bda2555
e646222b5a23b57470a80b29fade4e1f
Convert a global ban into local ones.
public function liftBan() : void { $this->update([ self::banField() => null, ]); }
0
61321f74b4c3392cb615a08e0eaf14a5
2a7007506827adfa28fb180850caf40a
Ermittelt alle Fotos, die eingegangen sind, aber nach einem bestimmten Zeitraum noch nicht bestätigt wurden.
{ if(!in_array($day, $this->getDays(-1))) { return []; } $startTimestamp = $this->date->dateToTimestamp($day); $endTimestamp = $this->date->nextDayToTimestamp($day); $imagesTemp = []; $heap = $this->getImagesFromFilesystem(); $index = $this...
0
d66045184eae748c8fbbd3c9da7b3e45
f0df87562ebbf72cddbc14ac556eff78
Creation of a desktop delegate based on a supplied persistent identifier.
namespace ClearCanvas.Controls.WinForms public sealed class Pidl : IDisposable, ICloneable, IEquatable<Pidl> [DllImport("shell32.dll", CharSet = CharSet.Unicode, ExactSpelling = false)] private static extern IntPtr ILCreateFromPath([MarshalAs(UnmanagedType.LPWStr)] string pszPath);
0
303c29adcbc0d7cf4fafc7a991d74d6e
bf301cca53226385f98f339387872cac
Hook to reset notification protocol to properly reset function with TPM.
EFIAPI EMpTcmDxeClose( IN EFI_TPM_DEVICE_PROTOCOL *This ) { if(TcmDrvProtocol != NULL) return EFI_SUCCESS; else return EFI_NOT_FOUND; }
0
4722087f328ea6522e74698c79dc9ad8
d3c9992f2b13023c6c75a726603ce5e2
Returns the amount of silver of a unit.
this.silver -= silver; this.silver = this.silver < 0 ? 0 : this.silver; }
0
c8b89d2fcb94ef919f76ac15bcbf8a31
51dc9cfb8a3f3d21da2f170e7aad5e7d
Указать актёру стоять
function C012_AfterClass_Sarah_KickForActor(KickedForActor) { ActorSpecificChangeAttitude(KickedForActor, 2, 1); }
0
ce85593b785761839e40b34134c1a865
3793e6f730d5a2fa304f8420f2b57c93
! This method returns the global position of the opponent goal.
{ int oppPosX = opposition->getPosX(), oppPosY = opposition->getPosY(); if(oppPosX > 3) { if(oppPosY < 2) { oppPosY++; } else if(oppPosY > 5) { oppPosY--; } } else { if(oppPosY < 2) { oppPosY++; ...
0
75e3d824f7d29ff2d26969639ce521e6
761fbab74fe4c9f78f0c6d3d7dc9a2c5
1) Create the affinity scheduler policy 2) Update the cluster with the affinity scheduler policy
def proc_cpu_affinity_set(*args, **kwargs): pass
0
f9df4afbcec9d30707ff8451a38ca5a0
9c5dd908a28c3c65539cd6e1c8da7bb4
Block players from eating This is also pointless but might be useful.
public static void onPlayerPlaceBlock(BlockPlaceEvent event) { if (arenaPlayerEntryMap.containsKey(event.getPlayer().getUniqueId()) && !active) { event.setCancelled(true); return; } woolBlocksPlaced.add(event.getBlockPlaced().getLocation()); }
0
c146dc381e4346bdbdbab3252e9c1355
4840ce5c3715ae4019b547cf69d61230
Marks all bundles as selected / deselected.
export class DeliveryEditableComponent implements OnInit public selectAllMaterials(isAllSelected: boolean) { const process = isAllSelected ? material => this.materialStore.addActive(material.id) : material => this.materialStore.removeActive(material.id); applyTransaction(() => this.materialQuery.get...
1
36798951cb43668ecb4e9a0d9fb62e54
d0be5fcf271e2fc5b580f78352e20284
Gets the undelete of this DdboostStorageUnitModify. # noqa: E501 If true, undeletes a previously deleted Storage Unit in the delete state. Default is false. # noqa: E501
try : return self._undefaction except Exception as e: raise e
0
def8c29c084ee11b173db508d41e6d6c
bbdbf20a6ce4c5190dd5c2c33c2b7f14
resets chop colors
function resetChair() { resetChairColors(); view.renderSelectedColors(); view.renderFeatures(); view.resetChosenOptions(); view.resetSelectedFeatures(); }
1
384d285a6295b7748e704e722473cf97
9d249df6287f7fd358a2f14724d8f63e
2階層dropdown(ラベル選択可)の処理 表示形式:dropdown、かつカテゴリ選択:可の場合
Usr200ParamModel paramMdl, Connection con, int sessionUserSid, int catSid) throws Exception { GsMessage gsMsg = new GsMessage(reqMdl__); String textAll = gsMsg.getMessage("cmn.all"); CmnLabelUsrCategoryDao categoryDao = new CmnLabelUsrCategoryDao(con); ArrayList<LabelValu...
1
f07786e64596a508deccf244d1d7bc7c
763c6ab6967ecef4f8312cfa4fd9fac6
Compares two Elements and determines which is "first". This is for use with usort (and similar) functions, for sorting a list of NodeElements by their coordinates. The typical use case is to determine the order of elements on a page as a viewer would perceive them.
element_compare (element_t* aElementPtr, element_t* bElementPtr) { long aNumCoordinate = aElementPtr->numCoordinate; long bNumCoordinate = bElementPtr->numCoordinate; coordinate_t* aCoordinates = aElementPtr->coordinates; coordinate_t* bCoordinates = bElementPtr->coordinates; if (aNumCoordinate < bN...
1
6d79f8021e34aaad3fec26df1f8c938f
4db88b7c15332a73054ed16aff5ff482
Sets the danh sach job persistence.
public abstract class QuanHeGiaDinhLocalServiceBaseImpl implements QuanHeGiaDinhLocalService, IdentifiableBean public void setTrinhDoHocVanPersistence( TrinhDoHocVanPersistence trinhDoHocVanPersistence) { this.trinhDoHocVanPersistence = trinhDoHocVanPersistence; }
0
9f6e8a749f1feaf525ee26ee6f981d14
1ca80998896ff1083a89b0c2327d7f4c
Initialize the list of named bits.
class MetaRegister(type): def __prepare__(mcs, name, bases): namespace = OrderedDict() namespace["BITS"] = [] return namespace
1