query_id
string
corpus_id
string
query
string
code
string
label
int64
6c25e2ba7c60381197a692166f4c280e
701e8c150197bbb3f12fc3eeddde0df8
Compute one edge cost
def distanceCost(edge): return edge[2]
1
88599881cbc6123f7bec2a26c508ba5b
982f96fb7c4cfc4d285cfe8bc7a3da38
Set the field separator to use when writing rows in columns.
public function setFieldSeparator($separator);
1
137416a0e08f0f8b77bd337b2df21405
43b7559500aa86a7a88e7e2394316c3b
Set the language model weight parameter.
zero_ary = np.zeros((1,)) new_lam = zero_ary + lam_l2w self.lam_l2w.set_value(new_lam.astype(theano.config.floatX)) return
1
49ca48b063848233fddd0d634a588bcd
270842493903fd1aa096945a807a082a
Returns the internal representation two dimensional array, so be careful as no defensive copy is made.
public class MatrixDouble public double[][] getArray () { return this.m; }
1
f9dadeb9b40ad684ff4a514a05b74326
536c6ac6b3c5ad1fa25ed54cb697bb24
Normalizes the DB table metadata.
namespace Piranha public sealed class Db : DbContext protected override void OnModelCreating(ModelBuilder mb) { mb.Entity<Author>().ToTable("Piranha_Authors"); mb.Entity<Author>().Property(a => a.UserId).HasMaxLength(128); mb.Entity<Author>().Property(a => a.Name).HasMaxLength(128).IsRequired(); mb.Enti...
1
fa078953e21ae9bb4d9de9cf9071c582
7f61448ad6da3ef0f9cb03f40c5be655
emit operator implementation w/o any abstract operator methods.
cases like (1)
0
ca1842294ef22a9fb048ff81b0d591ef
c55053c5d256a188ea8470aa9f6740f7
### Ratio-to-TP Method
TPP <- function(model, beta) { true_coefs <- which(beta > 0) k <- length(true_coefs) coefs <- coef.glmnet(model)@i common_coefs <- intersect(true_coefs, coefs) length(common_coefs)/max(k, 1) }
1
5b4060b242b89c7f693f1018b8937573
b275189228fe22ceade7a7d6f5ea92c7
車位狀態資訊圖
[Route("ParkImage/{id}")] public async Task<IActionResult> ParkImageAsync(int id) { ParkArea park = await db.ParkAreas.Where(p=>p.ID==id) .Include(p=>p.ParkingSpaces) .Include(p=>p.Walls) .Include(p=>p.Aisles) .FirstOrDe...
1
225a3672436a754757edaf510bcfa6b8
2d0a55dc3436ee9512d48b4eade96581
Fonction permettant de récupérer l'extension d'un fichier
$zExtension=substr(strrchr($_zNomFichier, "."), 1); if($zExtension == false) { $zExtension == ''; } return $zExtension; }
1
8633f4807deabf0f2654356d6248fb14
fba3bee646e6e55010bb4fd6f0434934
Nos retorna el ancho y el largo del rectángulo dado.
box_width = abs(rect[0] - rect[2]) box_height = abs(rect[1] - rect[3]) return (box_width, box_height)
1
94bf30392177d02ab4a4fff3ca7a9f58
e87096cd54187a0dc525fffe5a83bff7
Moves the tetrad one space to the left if the new locations are empty and valid.
if rightmost(self.tetromino_shape) < grid_width-1: self.tetromino_shape = right(self.tetromino_shape) if len(self.settled_tetrominos) > 0: all_squares = squares_only(self.settled_tetrominos) + self.tetromino_shape if any(all_squares.count(x) > 1 for x in all_squares) == True: self.tetromino_shape =...
0
0c597c953084b07d92b733ae5118d837
1d8e8af419dd89e30743b948d6d43a23
判断x是否是素数,是则返回1,不是则返回0。
int flag=1; for(int i=2;i<x;i++){ if(x%i==0){ flag=0; break; } } return flag; }
1
7861d3165d293ddc74b406d1119fdc43
56b225327a8dbd7f3c0a20c7198d301a
根据部门编号实时查询部分人员明细(unitId & page)
namespace WebAPI.Controllers public class PersonController : ApiController public Model.ResponeData getPersonByProjectIdUnitId(string projectId, string unitId, int pageIndex) { var responeData = new Model.ResponeData(); try { var getDataList = APIPersonSer...
1
d01d04837e6fce8faa248b946d944570
52625a8312e55580f1f1cd1a7db801dc
reduces the current capacity of the bag to the actual size (# of elements) of the bag
public void trimToSize();
1
5950fba89519c7bbd87a7667e75859b8
c5602d1378ee2e1dfaf17ba417680721
Processes a chunk of the incoming request, parsing it with the stream processor as well as resetting anything that is used to track failure (as a chunk implies that it's successful)
def process_chunk_helper(video_index, video_pathname, sink, num_frames, fps, resource, start_timestamp, simulate_failure): decoder = Decoder.remote(video_pathname, 0) print("decoder init started") ray.get(decoder.ready.remote()) decoder_pid = ray.get(decoder.get_pid.remote()) print("Decoder PID: ", ...
0
557d5650446e51e846267b1ca55aa6d2
6136cf14456bb757d333fd9409c9e65b
Get previous block pointer for a given block pointer.
Planner_blockIndex_t Planner::getPreviousBlockIndex(Planner_blockIndex_t blockIndex) { if (blockIndex == 0) { blockIndex = BLOCK_BUFFER_SIZE; } blockIndex--; return(blockIndex); }
1
5faa5ddaf05e5f16bd1436755369b32e
7c4215a7b52bd84f15d538d18071305e
create a small page descriptor
page_directory[1].addr = 0x400; page_directory[1].avail = 0; page_directory[1].global_page = 1; page_directory[1].size = 1; page_directory[1].reserved_dirty = 0; page_directory[1].accessed = 0; page_directory[1].cache_disabled = 0; page_directory[1].write_through = 0; page_directo...
1
2b119ef0e4bb86c6b57dc825a7780243
ac1b2564eeedc7f5b58d462f26d28117
Methode qui génère l'énoncé de l'exercice.
Exercises exercises = new Exercises(); parseQuestion(exercises, question); parseNumber(exercises, question); return exercises; }
0
829497024db15e4cb7acc30d8a8c0447
6e96d9e376d86d288f471c9bd968c60b
根据code_type获取code
@SuppressWarnings("rawtypes") Map get(final String codeType);
1
63df87676e9e99dbd3a48f86d73889d8
5cb660f02d77ee7fd938b8f688eff590
Sets the Success URL
class SagepaySettings public function setFormSuccessUrl($formSuccessUrl) { $this->_formSuccessUrl = $formSuccessUrl; }
1
2112b692d4aafbee9a2e20bd9e1ee25c
4e92f8d579b1d3b726fe2a10f9d7e271
根据用户id查询item
@Service("itemsService") public class ItemsServiceImpl implements ItemsService public List<Items> findItemsByUserId(String userId) { return itemsMapper.findItemsByUserId(userId); }
1
04079d4c393ccc4dbf4680dad5440a71
a83522c45f56e978fa209ece3d263526
Returns the element at the given element_handle.
namespace pegr namespace Algs class QIFU_Map Entity* Entity_Collection::get_entity(Entity_Handle handle) { if (handle == -1) return nullptr; Entity* retval = get_entity_inside(handle, m_handle_to_index, m_vector); if (m_deferred_mode && !retval) { retval = get_entity_inside(handle, ...
1
d5528ac92b15644d86ecfb619286552c
7e1261ee6f29f9a607e12a3c3d0aa09f
Asynchronously loads the given URL. Returns a promise that will resolve to the result once loaded, or reject if the URL failed to load. The data is loaded using XMLHttpRequest, which means that in order to make requests to another origin, the server must have Cross-Origin Resource Sharing (CORS) headers enabled. Load...
function fetchAsync (url, timeout, onData, onError) { }
0
9bced1b41fd8d87953e826cbcdfcd7bd
4a1a82ca1214a6a367366a390bb759fa
Returns x * number, y * number, z * number.
{ return Vector3D(_coords[X] * num, _coords[Y] * num, _coords[Z] * num); }
1
5dc9e26c4ec1ef167a421e66f96aa79e
8b90a7e4c569ea8789f1452b5c72fc13
This method returns the buffering state for data received from the serial device/port.
unsigned char get_buffer_state() { return buffer_state; }
1
a37ad08f442a61e16614c30ef520c23b
34445b171b5cb3ce1c84db3375e5daae
`True` if the current user has sufficient permissions to create the passed pathname; `False` otherwise.
class FileSystem(object, metaclass=ABCMeta): def isdir(self, pathname):
0
f0c077e4e1e8993e62e7a5a3a7c77af9
ab63335127f99c8ce3dacb026d3937d8
Visit a parse tree produced by VerexParser#event_identifier.
identifier = ctx.getChild(0).getText() if type(ctx.exp_type) is PTypeEvent: if identifier in self.current_visited_fn.local_decls or identifier in self.current_visited_fn.params or identifier in self.current_visited_machine.var_decls: return identifier else: ...
1
6c986b8926d4a9f7004a0eea2d8b6739
30447ba8bc2c89b1addfe8072fbb7776
Draw a colored sphere at the passed-in point.
void testApp::drawPoint(ofPoint point) { ofPushMatrix(); ofTranslate(point); ofNoFill(); ofSetColor(0xDD, 0xDD, 0xDD, 255); ofSphere(3); ofPopMatrix(); }
1
8b15354a4b6dd7660c46278df65a3c4f
6fb41a3211a0bc06eae3f0a353ffac55
Выбор шага оси графика: set... <int>
namespace GazdalkodjOkosan.Control IAction Step(int fields);
0
148bb32727d6866819d9b854d53f1f38
d54ca63f74bdc0bacb7e54f1e93232df
Set block and instruction layers
BlockLayer::BlockLayer(BlockDir * poBlockDir, uint32 nLayer) : mpoBlockDir(poBlockDir), mnLayer(nLayer) { }
0
7b75600e59d88423b216146efe1375a9
0e278bc679b75b711c63e5871da794a2
Checks for instances of potential verification failures in implicit casting -- when an expression is of one type but used as a different type. This is an issue when the expected type exists in an API level but the actual type does not. The verifier will see an Object used as another type, which isn't valid. This can be...
{ switch(opcode) { case ABCConstants.OP_multiply: case ABCConstants.OP_divide: case ABCConstants.OP_modulo: case ABCConstants.OP_subtract: case ABCConstants.OP_lshift: case ABCConstants.OP_rshift: case ABCConstants.O...
1
8f86e8d6234f99470778ffbd46c58135
19f971df775319831a6be36bad9d5040
GET: CentralTbls
{ List<ListTableViewModel> lst; using (cmEntities db= new cmEntities()) { lst = (from d in db.tabla select new ListTableViewModel { id = d.id, name = d.name, ...
1
4c91bfbe5996bad5d0ecf4dcf07c6d84
ea95aeda1c435e2469c7c077a7c0967d
16进制字符串转byte数组
int iLen = h.length() / 2; byte[] b = new byte[iLen]; for (int i = 0; i < iLen; i++) { b[i] = hexToByte(h.substring(2 * i, 2 * i + 2)); } return b; }
1
8db7b5554765de8554d7e790eaf1eec7
199c593da8e7ae057a1c73d39186a205
Find out how much to scale the health bar by dividing the object's current max health by the max possible health allowed in a health bar
public class PlayerMaster : MonoBehaviour void CalculateHealth () { float calcHealth = playerHealth / maxPlayerHealth; if (calcHealth <= 0) { calcHealth = 0; } SetHealthBar (calcHealth); }
0
468af1f8ce488b39e3226cb380864ee1
fc2475ad564c858802224e2a57f32791
Userhome page The Project table and projectmember field is filtered based on the current user and the Queryset is passed to the template userhome.html This view is used to display the projects created by the current user and the projects in which the current users is added as a member
def createPro(request): global nowUser nowUser=getNowUser() projectsUser=User_of_project.objects.filter(pk_user=nowUser.userName) projects=[] counter=0 color=['red','blue','teal','orange'] for pu in projectsUser: projects+=[((Project.objects.get(name=pu.pk_project)),color[counter%4])...
0
551fb20d1ce4141d217ec219b43e84b4
f49611d2537bef4a6e5ba48677466276
构建团餐换桌打印数据
String orderDate,String orderRemark,List<DeskTableOrder> goodsList) { String ret = ""; ret += "----------"; ret += "桌上点餐"; int a = 32 - 20 - getWordCount("桌上点餐"); ret += getPrintChar(" ", a); ret += "----------"; ret += "\r...
0
59b0fc240473477392e498ad6e762fa7
2205600327bd61bba13cb61b704a2f6f
Read in the original v1.0 dataframe and save as a new parquet file compatible with v1.1
parquetfilename = filename + ".parquet" data_wd = os.path.abspath(os.path.join(cwd, "data")) data_source = os.path.join(data_wd, filename + datasourceformat) try: df = pd.read_csv(data_source) except: df = pd.read_excel(data_source) atomic_write(fastparquet.write(parquetfilename,...
1
15ee545407bc1e51bff8ca4825c94e5f
e091b0abd08f49f880e69ecc48271850
Display visualisation mode user interfaces.
modes = ["Real Datasets", "Experiment"] mode = modes[1] if(mode == "Real Datasets"): realDataset() elif(mode == "Experiment"): experiment()
0
7428fdda427a9be5cc2bd63a7aa95df9
898f05920ac0bb843d40b7b65c554d63
机器人走带陷阱的方格
int n,m; memset(arr,0,sizeof(arr)); arr[0][0]='1'; for(int i=0;i<=2001;i++){ for(int j=0;j<=2001;j++){ if(arr[i][j]=='1') { arr[i+1][j]=arr[i][j+1]=arr[i+1][j+1]='2'; }else if(arr[i][j]==0){ int bools=1; if(i-1>=0&&arr[i-1][...
0
570c3bfbfa4e269b2111f450235220bc
93060695718716fce9437be3e7d1aba1
Get the expiryTime property: Gets or sets the end time of the schedule.
@Fluent public final class ScheduleInner extends ProxyResource public OffsetDateTime expiryTime() { return this.innerProperties() == null ? null : this.innerProperties().expiryTime(); }
1
0e0beb4c936e72f9c034bdfa0d9e90f9
4d359c3a165f928fdfdddc21069876d4
统计客户信息
class CustomerController extends Controller function index() { $data['stat'] = Customer::statistics(); return view('customer.index', compact('data')); }
1
1d43bb76039f50805f302779ca6d6c99
a1522825fa7d2b28dcfdec3b7d9f1f05
Clears the regulation control if the value is not a known (allowed) regulation.
{ String val = controlLawMap.remove(name); return (val != null); }
0
e93b6238e4d0e3629ec2a50c57fa574c
2f1dbd58889498228276f79351df369e
Sets the useable flag of this item.
class ParameterItem(object): def setIsUsed(self, state): pass
1
6fac5f45105e56055ac4636599368a5a
ac67fc0114dac6f870aa796050a45529
Sets the field lengths It's used to construct uniVocity {@link com.univocity.parsers.fixed.FixedWidthFields} instance.
@Dataformat("univocityFixed") public class UniVocityFixedDataFormat extends AbstractUniVocityDataFormat<FixedWidthFormat, FixedWidthWriterSettings, FixedWidthWriter, FixedWidthParserSettings, FixedWidthParser, UniVocityFixedDataFormat> public int[] getFieldLengths() { return fieldLengths; }
0
62b5a9ea9ed0baa62d44a0ee0cb27680
7c55378e99ecd7298233b98779de2cf7
Returns the number of glyphs the face provides.
namespace dalcom uint16_t FontTTF::getNumOfGlyphs() const { MaxpTable *table = tables->getTableMaxp(); assert(table); return table->getNumGlyphs(); }
1
2c35cc8cdb9e8baf3448b00d1040924a
1c6abc671fc5d2410c5470b23bc45b2e
Perform a BST inorder delete maintaining the BST property
if(node == null) { return node; }else if(value.compareTo(node.getValue()) < 0){ node.setLeftChild(delete(value, node.getLeftChild())); }else if(value.compareTo(node.getValue()) > 0){ node.setRightChild(delete(value, node.getRightChild())); }else{ ...
1
424e0200e0c98c6e2f57638dcbda88a2
9504bc8bec3b0fca82993e82a37aaec3
返回mysql所有用户除了密码和salt数据
{ return array_filter(parent::getExportFields(), function ($v) { return !in_array($v, ['password', 'salt']); }); }
1
d85c0fe408ed898427b2f3deb8212126
7aae831208fbd9220514a3632bbb8536
set up display control register and enable sprites
void initialize_display(int nVideoMode, int nDisplayFrame, int nHBlankFree, int nSpriteMappingMode, int nForcedBlank, int nBG0Enable, int nBG1Enable, in...
1
db429d172c3a27d2b94cff254cfb1cdd
1afce5bad8213b42e2ae3cf531381c31
Registers a regex filter response with the shared IrcBot
if regex is not None and repl is not None: if action == ids.ADD_FILTER: self._filters[regex] = repl elif action == ids.REMOVE_FILTER: try: del self._filters[regex] except KeyError: pass
1
c0dd8e1a7021d86bf025aa25d0b86290
f60e0d33a51fc52b1d68de01ab32417c
handle external arm request from alarmo.arm service
if isinstance(payload.get('data', None), basestring): cmd = payload["cmd"] token ='' if "token" in payload: token = payload["token"] if cmd in ["heartbeat", "report", "read_ack"]: if self.data_callback is not None and 'model' in payload: self.data_callback(payload["model"], payloa...
0
37706162a558b94b87dab088dc50a57c
ab6899842ff73c302626f2b34756845b
国外疫情数据解析
url = 'https://view.inews.qq.com/g2/getOnsInfo?name=wuwei_ww_cn_day_counts&callback=&_=%d' % int(time.time() * 1000) data = json.loads(requests.get(url=url).json()['data']) data.sort(key=lambda x: x['date']) date_list = list() confirm_list = list() confirm_add_list = list() suspect_lis...
0
c65bb81ea2da3c1d592f1d1615ee0428
e7b20aa5f14b88aad71dc467ff36f9c4
Zwischen Minimax und Manuell wechseln Gruen
var button = document.querySelector('.set-mines'); if (!gGame.manualMineIsOn && !gGame.GameIsOn && gGame.shownCount === 0) { button.style.backgroundColor = ('lightgreen'); gGame.manualMineIsOn = true; clearMinesOnBoard() } else if (gGame.manualMineIsOn && !gGame.GameIsOn) { ...
1
ec7d90f8ca01d147db1bf558cd02df3b
5839f81c0ffeb68a681f82f1712bcbfc
Returns the annotation adapter.
@SuppressWarnings({ "unchecked", "rawtypes" }) public abstract class SpellingReconcileStrategy implements IReconcilingStrategy, IReconcilingStrategyExtension protected IAnnotationModel getAnnotationModel() { return fViewer.getAnnotationModel(); }
0
c7b7502cb772688b9f8f037c9a8cccee
684798db39f5930f819c71b21d0d4bf0
Determine if the browser is the MSNBot
{ if (stripos($this->_agent, 'YandexBlogs') !== false) { $aresult = explode('/', stristr($this->_agent, 'YandexBlogs')); if (isset($aresult[1])) { $aversion = explode(' ', $aresult[1]); $this->setVersion(str_replace(';', '', $aversion[0])); ...
0
d6143bd6bd2ae23cb41a6037e0cc5257
fa00ab9733c470039944bb29ae10c4a1
Native C method: ARRAY.shift()
arr_proto_shift(js_val *instance, js_args *args, eval_state *state) { unsigned long len = instance->object.length; if (len == 0) return JSUNDEF(); js_val *shifted = fh_get(instance, "0"); fh_del_prop(instance, "0"); unsigned long i; for (i = 1; i < len; i++) { js_val *old_key = JSNUMKEY(i); js_val *...
1
b64218b55180d3e660102560fbcd0dea
6a2fc37e01a3763b9b11bcd0ae66efee
as a heuristic, answer true if repo metadata file exists
class Groot(object): def is_groot_repo(self,dir,git_repo): modules = os.path.join(dir,'.gitmodules') if os.path.exists(modules): return True
1
e54375598a9b57699a7a736e5cab6adc
ac6cd81d57fef1bf27a3895483764848
后置打印装箱清单
{ ViewBag.OrderID = OrderID; PrintBoxModel print = new PrintBoxModel(); DataSet ds = new OrderManagementService().ExportBoxDetails(id.ToString()); DataTable dt = ds.Tables[0]; StringBuilder sb = new StringBuilder(); string OrderNumber = str...
1
3cd8747119486eb7907e96c9994edb2a
93fd2a0e0b4eae60e5d6cb15e63e4676
Creates a static linkage for building static libraries.
def link(objects): linked = 'build/linked.o' cmd = [LD] + LDFLAGS + ['-o', linked] + list(objects) run_command(cmd) return linked
0
98e1129da9d794c2ea3dd068ec197201
fa3b7c7a6f4b08364d86b867a2df47cd
Assigns both css and js lists to smarty template.
{ if ($bDynamicMode) return ''; if ($this->_bJsCssAdded) return ''; list($aJs, $aCss) = $this->_getJsCss(); $this->_oTemplate->addJs($aJs); $this->_oTemplate->addCss($aCss); $this->_bJsCssAdded = true; return ''; }
1
86b60d2dcb5025bcfedd4dc8273f5365
846f4f050fae1a75dac5753087ca23bc
Function to produce a knee plot for K(1,10)
def k_test(c = c): k_test = [cluster.kmeans(c, k_or_guess= i) for i in range(1,10)] plt.plot([variance for (centroids, variance) in k_test]) plt.show()
1
e6001c7d4d33a7b918b9d34313777fea
6cf1ee77062ce04b54f8d7c10b00bdd5
Set name of the Fortify category of the vulnerability. <b>Value of this attribute is optional for non Fortify parsers.</b>. SSC keeps full mapping between Fortify categories and external vulnerability categories like OWASP, CWE, FISMA, PCI, etc. If this value is provided by parser, SSC is able to map this vulnerability...
@Nullable String getCategory();
0
b36323f7e09f9ecb0a2ac1bc1158d629
838ebec81e528e07b088da2ee413c86e
Instructions sent from dataserver to computeserver telling how to perform MC simulation for one or more simulation configs with a common subbeam (beamlet, proton spot)
class XbbConfigTools(object): def getMC(self): return eval(self.config.get('Plot_general', 'samples'))
0
68a4ae32d1b8a95f86d8c2aa264e8d77
498ca7f67d916838e587bf43800ba6d7
显示待派送快递
function showDeliveredOrders(pages_now) { $("tbody").html(''); sessionStorage.pages_now = pages_now; for (var i = 0; i < sessionStorage.authedshops_id.length; i++) { var url = "http://server.shaonvonly.com/api/users/"+sessionStorage.user_id+"/shops/"+sessionStorage.authedsho...
0
06a0b745bf3dd88182b272dbede0b27a
198ca760bca44fe6ae3c770643c0ee77
Purpose: check if the system is already initialize, should be called before initialize. Return: 0 - if not initialize, 1 - otherwise.
int MC_hasInited(void) { return hasInited; }
1
584aed0eea91425eda4b3f626e7235d2
7fc96fa527ed2fb3b7a97302b6622a33
Get which type of directory this one is.
class DirEntry: def gettype(self): return self.parts[0][0]
1
bc06516d574dbe3593454654e2b156f5
b89a432d8c76534f25b2325ad2695cd8
设置手术及操作名称2
@Table(name = "admin_operation") public class AdminOperation public void setOperationTwo(String operationTwo) { this.operationTwo = operationTwo; }
1
40a284b4a1d0ea70febaa9d635bcd14b
d3f54176d3e35ccf448d985f1a4e0cab
Show the given {@code call} as a map marker.
try { await C.showAtPoint2d(this._SMCalloutId, point2D.point2DId); } catch (e) { console.error(e); } }
0
fb463854eddefa3e5bf54b0f0cb5237b
31ad7b79685186b3cd58969a8eace799
Make sure that the sampled goalectories are actually valid
defer gock.OffAll() for _, secret := range validSecrets { test.MockGHCalls(t, repoIdentifier, "master", test.S("pom.xml", "mvnw"), test.S("Java", "Go")) source := test.NewGitSource(test.WithURL(repoURL)) service, err := github.NewRepoServiceIfMatches()(source, git.NewSecretProvider(secret)) require.NoError(t,...
0
745048d9c4d7b8935dfcb28fbe5517ee
1b385d749b7f2dbfe73d8b35de45bdc5
Sistemde kullanıcıya ait araç olup olmadığını sorgular.
class UserRepository implements UserRepositoryInterface public function canDrive(string $username, string $carName): bool { $query = "SELECT * ". "FROM $this->userCanDriveTable AS `ucd`". "WHERE ucd.user_username = :username AND ucd.car_name = :car_name;"; $params...
1
f471fb647d84292339ba507f4acaa9fe
6157aa9e4c27d226b9da6b8c4873a4a4
Getter for <code>photodb.pending_match.source_user</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class MatchNotifySettingRecord extends UpdatableRecordImpl<MatchNotifySettingRecord> implements Record4<Integer, Integer, Integer, Times...
0
c44f16a45e9c913a6caba0a512c026b9
c9975505d871feb8f8a8aa267deba434
ListClsLogTopics 用于显示日志主题列表。注意:一个日志集下至多含10个日志主题。
try: params = request._serialize() headers = request.headers body = self.call("ListClsTopicDomains", params, headers=headers) response = json.loads(body) model = models.ListClsTopicDomainsResponse() model._deserialize(response["Response"]) ...
0
914e9aa002d1f2c09bd1e8959788b56c
c9cb29b7c98340836bf940c8db4715ef
Render the Quill WYSIWYG.
function TextEditor(props) { return ( <ReactQuill theme="snow" value={props.value} onChange={props.onChangeValue} modules={TextEditor.modules} formats={TextEditor.formats} placeholder={props.placeholder} /> ); }
1
5b91110e806e049ed57da4ec46fe1d6f
c060a9205ae53eb4d3492335a2dceadf
Set 账号ID。对应输入参数: AccountType是1时,对应QQ的OpenID。 AccountType是2时,对应微信的OpenID/UnionID。 AccountType是4时,对应手机号。 AccountType是8时,对应imei、idfa、imeiMD5或者idfaMD5。 AccountType是0时,对应账号信息。 AccountType是10004时,对应手机号的MD5。 AccountType是1时,对应QQ的OpenID。 AccountType是2时,对应微信的OpenID/UnionID。 AccountType是4时,对应手机号。 AccountType是8时,对应imei、idfa、imeiMD...
class YiUser public function setAccountId($accountId) { $this->accountId = $accountId; return $this; }
1
c0f3bc5d1287863cad52a9e0553bc2ca
20b2173c30178e8dc95512a5c399dadd
Adds form file to the <see cref="HttpRequest.Form"/>.
namespace Gimela.Infrastructure.Rest public class HttpMultipartMimeForm : IHttpContentCreator public HttpMultipartMimeForm AppendFile(string name, string file, string fileContentType, byte[] fileContent) { this.AddFile(name, file, fileContentType, fileContent); return this; }
1
029c50e362df71e7aced053f7e11de43
ae41148f1980c656e5bd79094aa053e7
Data that is specific to the type of host board.
class Host(pyre.component, family='pyre.platforms.generic', implements=Platform): def __init__(self, **kwds): super().__init__(**kwds) self._cpus = None return
0
5331c6aa51fc73b0c7f6a383d4ff3546
c67d800ddf1c3e4a2c3b77f851b204dc
滚动到顶部或底部回调
var top = document.documentElement.scrollTop || document.body.scrollTop; if (top + this.winHeight + this.options.last > this.scrollHeight - 2) { this.options.fn.call(this, top); } }
0
d1fc43ba3ac34b23b448c66b62ac48ee
5f1600227f5e592ee540c7e98d317767
获取指定商家的所有影院
$method = 'getHallsByCinemaId'; $params = $this->create_params($method,$params); $res = $this->request_api($method,$params); return $res; }
0
a0f596647aff113faf4702dc599a8470
148d8a445423d477a2d83d08b7d3febd
Creates an instance of Texture.
openglHandle(400000000u), targetType(TextureTargetType::Tex2D), textureUnit(Texture::MapTypeToTextureUnit(textureMapType)), mapType(textureMapType), name(newName), errorTextureInUse(false) { glGenTextures(1, &(this->openglHandle)); this->ActivateAndBind(); const GLenum target = static_cast<GLenum>(th...
1
d7ac41236bd965e23e26556107efaf91
0e0cebd60b8adeba5f08fc50433887f2
序列化对象 是否增加type标识
public class ToStringSerializer<T> implements Serializer<T> public void setAddTypeInfo(boolean addTypeInfo) { this.addTypeInfo = addTypeInfo; }
1
744dedd7faa0693dadae0f57d96e0732
6517a903da181cc7e4166b051d22e41f
get the last measures of all nodes and sensors
const measuresRef = this.db.doc('stations/46131002'); return measuresRef.collection('measures', ref => ref.orderBy('date', 'desc').limit(1)).valueChanges(); }
0
126d048001076fb5e08b1de2eac5056d
2ce34d57ee5d9a7217dda28ed92917ad
获取SQLContext 如果spark.local设置为true,那么就创建SQLContext;否则,创建HiveContext
boolean local = ConfigurationManager.getBoolean(Constants.SPARK_LOCAL); if(local) { return new SQLContext(sc); } else { return new HiveContext(sc); } }
1
1db34f3b43ea5bd1034f70cbc254eceb
58ca15d0be7eaf2551c741edc73b3f52
Halt any running threads
public final class EventManager public static void haltEventThreads() { for (EventThread thread: eventThreadInventory) { thread.stopRunning(); thread.interrupt(); } }
1
8a78826eb7a36d3295c249de48a147ef
26f9aa9578cecd634ada448f5a2d9e1b
Sets the maximum number of published items to persist. Note that all nodes are going to persist their published items. The only difference is the number of the last published items to be persisted. Even nodes that are configured to not use persitent items are going to save the last published item.
void setMaxNumberItems(int MaxNumberItems);
1
87edd610f0c4ad481fdaa33aae0d0bff
4004a9aa26a3f5d7134d19211a0ca8a9
Returns the last run.
class ApiReader extends EntityBase public function getLastRun() { return $this->lastRun; }
1
aad68c63f2615ef857ba65a2142bc76b
077b497d7b6db0d1ce8c3844af87ad76
Visit nodes of function declaration of kernel.
{ std::vector<ASTPtr *> out; if (checkFunctionIsInOrGlobalInOperator(func)) { for (auto & child : ast->children) { if (child != func.arguments) out.push_back(&child); else for (size_t i = 0, size = func.arguments->children.size(); i < s...
1
73dc7b1f3037abb0095ad8272b1fd073
49937f37987ace6f24bcb75d42437274
Unwraps an expression contained in zero, one, or more <see cref="ParenthesizedExpressionSyntax" />. For instance, <c>x</c> remains <c>x</c>, <c>(x)</c>, <c>((x))</c>, etc. become <c>x</c>.
namespace NTypewriter.CodeModel.Functions public static partial class TypeFunctions public static IType Unwrap(this IType type) { return type.TypeArguments?.FirstOrDefault() ?? type; }
0
c644d0fce8a66ee97b79db9688d9fd69
9901658c9094f8516b15e8d221fa478d
This is the event handler for the WeightLabel click event
namespace BMIcalculator public partial class BMICalculator : Form private void WeightLabel_Click(object sender, EventArgs e) { NumberButtonTableLayoutPanel.Visible = true; }
1
1a8aa6bd9d9530340227358fc11ff69b
2b6c4a677f11660f827a21e61a02a137
Determine whether this recognizer can recognize the given class of shapes. In the default implementation this returns true for logic gates, wires, and text.
{ string pattern = ToRegexString(shape, ModeType.SYNTHESIS, false); return Regex.IsMatch(word, pattern, RegexOptions.IgnoreCase | RegexOptions.CultureInvariant); }
0
063d62046bd9b5a85a0b92b1bb2ad69f
d47a2c36b0042c874376d926b84dcd99
Checks if a key was released (current frame no, last frame yes) keyCode to check
bool Input::WasKeyReleased( Key key ) { size_t index = static_cast<size_t>( key ); return !_thisFrameKeys[ index ] && _lastFrameKeys[ index ]; }
1
7c388b5fbbbb79594aad0c48759e9bbc
01f4c11326cb497313c7e758530459c4
Возвращает объекты иерархии, где текущая модель является родительской
{ if(!isset($parameters['filter'])) { $parameters['filter'] = array(); } if(!isset($parameters['select'])) { $parameters['select'] = array('*'); } if(!empty($parameters['filter']['MIXED_SHOW_DELETED'])) { unset($parameters['filter']['DELETED_TYPE'], $parameters['filter']['MIXED_SHOW_DELETED'])...
1
2318cc6618caf923259270e0e0e27f18
c56069fb58e3e5b751e3b99f34d2d1aa
Transfer values to a different position on specific doc codes
{ switch ($pos) { case 0: $this->setOccurrencerefno($value); break; case 1: $this->setMuseum($value); break; case 2: $this->setAcronym($value); break; case 3: ...
0
5bbcf97b48fce00e13b36cd3f400c71a
7790b8224d159d062c4bd3f7531ace39
Gets informations about constants (4 => only PHP4, 5 or null => PHP4 + PHP5)
public function getConstants() : array;
0
4b4bdcaff3066e7f498f26c818d818c5
4f68071242e0f81b834a5affe91048e9
takes the dataset as produced by the previous function and prints several statistics about the data does not return anything
def explore_dataset(): employees = data_dict.keys() employee_features = data_dict[employees[0]] print 'Numero total de data points:', len(employees) print 'Numero de features de cada funcionario:', len(employee_features) number_poi = 0 poi_keys = [] for i in data_dict: if data_dict[i...
1
f4396fae6473e03f81ec277b77fea207
34ef88624bb12218cd703a6b5f476fd7
Reads a file, adds up ascii values and thats the hash
hash = md5() try: with open(file, 'rb') as f: for chunk in iter(lambda: f.read(128 * hash.block_size), b""): hash.update(chunk) return hash.hexdigest() except IOError: print("Could not read file")
0
9e52809b7e407578bed2278d08864434
d1e9977465b9feb2c92d6e54eeceb590
屏蔽Home键
try: cls.device.press("home") return True, "" except Exception as err: Show.error("App", "home", str(err)) return False, str(err)
0
53cade357cfb8206ffa50f9f7c820520
52c83bd983866d2a7aee6906a37f2e0e
Translate signals names to codes.
{ if (sen == SIGHUP) return "SIGHUP"; if (sen == SIGINT) return "SIGINT"; if (sen == SIGQUIT) return "SIGQUIT"; if (sen == SIGILL) return "SIGILL"; if (sen == SIGTRAP) return "SIGTRAP"; if (sen == SIGABRT) return "SIGABRT"; if (sen == SIGIOT) return "SIGIOT"; if (sen == SIGBUS) return "...
0
b4a1ed70fe6384b549eb8eee706ab2eb
0abb2d64dd805652cc8edd00d5fc29e0
Check if <referer> has a value
$_bool=false; $pos = stripos( $referer, $string); if($pos === false){ $_bool = false; }else{ $_bool = true; } if($_bool===false && $redirect===true){ self::redirect(); } return $_bool; }
0
1089da7e7e7b60b21c0234208831b2a6
f7e56c6cdcdaf066d73309284a22af80
获取流程定义字符串
namespace FireWorkflow.Net.Designer.WebText public class DesignerService : IDesignerService public String GetWorkflowProcessXml(String id) { WorkflowDefinition wd = RuntimeContextFactory.getRuntimeContext().PersistenceService.FindWorkflowDefinitionById(id); if (wd != null) return wd....
1
06aadbea45608dc3f8a02ddb6adbd50f
296a71702b085028e72d133a46ad53a9
Override init() method to provide package-specific initialization. It is guaranteed to get called exactly once before the execution of any function below.
func init() { fmt.Println("mymath package initialization") }
1
f6b607f819873ae8800b181fccbe71fd
bd2f47322cd1f595d756f2d35f50676c
remove all but whitelisted html tags.
def sanitize(value): soup = BeautifulSoup(value) for tag in soup.findAll(True): if tag.name not in VALID_TAGS: tag.extract() return soup.renderContents()
1