query_id
string
corpus_id
string
query
string
code
string
label
int64
d0c589c96530a1cd0d826e384146e9e7
da8070c4ceb6e916f4929dbdb1e7d5e2
Get the local volume currently set in the Web Playback SDK.
@Variability(id = AnnotationConstants.VAR_VOLUME_DATA) class VolumeDataGatherer implements IVolumeDataGatherer @Variability(id = AnnotationConstants.VAR_VOLUME_DATA, value = "0") private static native long getCurrentVolumeAvail0();
0
a35ce9514ce9582ade47129cde3c807a
f279090790d4bd70a604cbcc7bfc7b3d
Verifica se o módulo Cielo existe e está ativo.
class CSI_Module: def is_Module_Valid(self): return True
0
d180c23440296c408701038ed81daa3a
0554c62b1e770614053a7838d8ddf88e
Devuelve los campos fecha que asignan la fecha del sistema automaticamente al insertar
class User extends Model implements AuthenticatableContract, CanResetPasswordContract public function getDates() { return array('created_at', 'updated_at', 'deleted_at'); }
1
d031e5f392c1eb32ad38815c929aeb53
2ab8f77b4c0e5bfc46aea43b57681a83
Instruct the EC sensor to take a measurement, and block until the measurement has been received from the EC sensor
{ ccs811.wake(); ccs811.setEnvironmentalData(measuredValue.humidity, measuredValue.temperature); while (!ccs811.dataAvailable()) delay(1000); ccs811.readAlgorithmResults(); measuredValue.co2 = ccs811.getCO2(); measuredValue.tvoc = ccs811.getTVOC(); ccs811.sleep(); }
1
93564566e00d5e12b791b1b4f2e05dc6
8aebfcabe6a2e8af24d761759f615f2c
Get a user by ID. If found and given meta, updates and returns updated user. if given meta and ID not found, creates new user.
class UserGetters static async getById(request, response, next) { let id = _.get(request, 'params.userId') || _.get(request, 'body.id') || _.get(request, 'body.data.id') || _.get(request, 'params.id'); if(!id) { return response.boom.badRequest('A user ID is required'); } try { request.pre = ...
0
56e86ad1df068040b0c969e77f868659
cb7cb729c70419a0a4d2268859e2375d
根据liveId获取相关的live
@Service("liveDbStorage") public class LiveDbStorageImpl implements LiveDbStorage @Override public Live getLive(long liveId) { return liveDao.selectById(liveId); }
1
0805316f8e10dd923f5c19f45d4b5173
4b896dd09d0b3e5694f1691d6ab9fec1
true positive rate (sensitivity) between predicted and true binary masks
try: return true_positive(pred, target) / (target == 1).sum().item() except: return -1
1
6f0085c0e7729db96c9a6894fedb2389
bdf6efc5595935a20efba0246b592bc1
Sets the value of the refundAmount property.
public class AlipayOverseasTaxOrderPayModel extends AlipayObject public void setTaxRefundAmount(String taxRefundAmount) { this.taxRefundAmount = taxRefundAmount; }
0
90676eb5aa0ec552684d22806c8f1a06
a0e0632d5dce6447ee6f9a31730702da
勝敗レコードをFirebaseから取得する
{ firebaseDB.child(Config.DB_NODE_SCORES).child(bundle.getString("id")!!).addListenerForSingleValueEvent(object : ValueEventListener { override fun onDataChange(dataSnapshot: DataSnapshot) { val listSucces = dbSucces.allSucces val dataSucces = SparseArray<List<String>>() val niveauSucces = ArrayL...
1
6d2af402509eacda8b5abbdae8f57230
9bffbe614ad6772cee1ce411e7ca36ce
True if font should be reset to system defaults.
namespace GD public class Image : IDisposable public static int useFontConfig(bool useIt) { return LibGD.gdFTUseFontConfig(useIt ? 1 : 0); }
0
b9ab4d01d0bd474a8fe84ec86691bb6b
6b640af132105aa7702fc8b48a6bbef4
Returns the meta object for the containment reference list '{@link AuthorizationLayerPSM.ResourceAccessRule#getHasAllowedAction <em>Has Allowed Action</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EOperation getAccount__HasPermissions__EList();
0
5a2e63b40dcc9ed5e93f0cb469ebda34
cf1d0bae7d6dce74dadec688eac97125
Compares the areas of boxes
def less_area(): return lambda bbox1, bbox2: _area(bbox1) < _area(bbox2)
1
c02a088e17daf6864324b4b7f92415c2
fb92e765f7adbc73ef11e0ddba18400e
修改当前登录group用户的storeid
{ $result = array(); try { if (empty($merchant_id)) { throw new Exception('参数merchant_id不能为空'); } $model = ShopProduct::model()->findByPk($shop_id); $model->group_id = $group_id; if ($model->update()) { $resu...
0
53d5a1029ec9f61196f915b2ead3c5d1
d15426ec1219cfcbf52c058c1868b0b2
判断字符串是否全部为数字(正则)
public class MatcherUtils public static boolean isAllNumber(String matchStr) { return matchStr == null ? false : matchStr.matches(ALLNUMBER); }
1
18b7d0a51755331d8b8bd7f8c86b9851
ee31eed2479f09cfc46b20729b3c2888
Add the WSU Namespace to this T. The namespace is not added by default for efficiency purposes.
public class WSDLImportHelperUI extends WSDLImportHelper{ public static void addToolingNamespaces(Definition definition) { WSDLImportHelper.addToolingNamespaces(definition); addNamespace(definition, XMLNS_XSD, "xsd"); }
0
55e9091e59163a6b6a5febf74207abb5
0091363de312b89304c336492a224853
assembles readings dictionary from readings soup
results = {} for row in soup.find(class_="item_detail_info_table").find_all('tr'): name = row.find('th') value = row.find('td') results[name.text] = value.text return results
1
f1c8195f611d79ec94e9b18b2c9d9062
4a386778866dd76a211cf95c0c4eae34
获取新插入的数据
class GenericType extends Data public function getNewEntities() { $list = []; foreach ($this->index_new as $offset) { $list[] = $this->data[$offset]; } return $list; }
1
ccb2d7d4bfd692afd1c32ec24a010809
55b485e580d45a9540ffaa7a4879d753
Reads the egglaying data from Avelino and discards samples that do not have entries in both files.
read_batch = {} read_batch, many = gather_reads(sample, chromA, posA, ciA, z, read_batch, max_reads) if many: return {}, True read_batch, many = gather_reads(sample, chromB, posB, ciB, z, read_batch, max_reads) if many: return {}, True return read_batch, many
0
322f5fe534a536a7efe7d69c6272a922
060641302deac1e44696fdd9562297fe
Returns an array of 3 numeric values from an 'rgb(val1, val2, val3)' string
function stripRGBValues(string) { rgbValues = string.substring(4, string.length-1).replace(/ /g, '').split(','); for (i = 0; i < rgbValues.length; i++) { rgbValues[i] = Number(rgbValues[i]) } return rgbValues }
1
a1bd98f54ba1d37ad677e6d27c01707b
f8fa035b3ed371ce9d0e5819cf8942e1
function for finding place by latitude and longitude stored in database
namespace Console_Server.Model public sealed class Parking public List<TableParkingPlace> FindParkingByLocation(double longtitude, double latitude, double altitude) { List<TableParkingPlace> parking_places; try { var list = from pp in db.TableParkingPlaces...
1
92ff92ad5971da9a5f22059045327945
7ebbb56b5437f7eee23f814f3a2d8744
pair 和struct拆包
func struct_2() { type user struct { name string age int personid int } u1 := user{"allen", 21, 13} u3 := user{ name: "allen", age: 21, personid: 13, } fmt.Println(u1, u3) }
0
872e4c7c428a16939c331586025cf006
8c60472dac3818d2b0ab20e7b7b2c910
Returns the structure factor obtained from the stored scatterers.
class Info(RCBase): def getStructureInfo(self): d=_rawfct['ncrystal_info_getstructure'](self._rawobj) nc_assert(d) return d
0
e5cdea8a94ee02d18975cfe7e1101c17
c6f4860bc9d32c2e9981a2062eee9604
Maps the current data transfer object to the domain object.
{ if (domainObject == null || dataTransferObject == null) return; dataTransferObject.Id = domainObject.Id; dataTransferObject.MasterName = domainObject.MasterName; #region Customized. DO NOT REGENERATE #endregion return; }
0
319cd1bcdc7edce468a2a3c4f8632006
c1f1d04b6f67d558221add367aed925d
for n>=1 it returns a youngest participant under the first n participants in the list
participants.sort() completions.sort() for i, j in zip(participants, completions) : if i != j : return i return participants.pop()
0
f7667a30fe7414facdd3eb7f2909d4a7
e7e4756921045d74235a718e58170240
finds user id from userName
public class UserDaoImpl public static int getUserId(String userName) { PreparedStatement pst = null; ResultSet rs = null; int index = 0; try { pst = DBUtil.openConnection().prepareStatement(GET_USERID_BY_NAME); pst.setString(1, userName); rs = pst.executeQuery(); if (rs.next()) { index = ...
1
ea98d00da58e8c7172dda57f2f60c70f
9ff9aa0c3008a758af3863d6b2ed8ce7
添加或修改曝光信息
@Action(value = "eduExp", results = { @Result(name = "eduExp", location = "/general/eduManage/eduExp.jsp"), @Result(name = "eduExpView", location = "/general/eduManage/eduExpView.jsp"), @Result(name = "eduExpAdd", location = "/general/eduManage/eduExpAdd.jsp"), @Result(name = "eduExpEdit", location = "/gene...
1
c3d800aa05d953db008bb8173f734199
2a14d9b37490bec5fd6cd450901afde6
Processes @GET and @POST annotations and creates request mappings used by the routing process and url security mappings used by web security
public abstract class WebService extends HttpServlet @Override public void init() throws ServletException { var type = getClass(); var webServlet = type.getAnnotation(WebServlet.class); var urlPatterns = webServlet.urlPatterns(); if (urlPatterns.length == 0) { throw new S...
1
c6df6ddf3251541bbc744b766caeb2d1
55f852c1b785a69022f46d9a4ab2a22a
手动构造假期类型
val list: MutableList<String> = ArrayList() list.add("年假") list.add("事假") list.add("病假") list.add("调休") list.add("婚假") list.add("产假") list.add("陪产假") list.add("丧假") list.add("哺乳假") return list }
1
f7e96f9e333f275280d693e4cabfe298
01e9406fc9b3a7a1a1f014eb0b275f5d
Tests valid maximum torque values.
namespace fawkes size_t DynamixelServoInterface::maxlenof_torque_limit() const { return 1; }
0
75b7c90cc30099c9d5ea8593480d948c
1b300cac18582b0959fa518b919bf809
Return the set of locations that haven't yet been visited.
class UrlQueue: def getUnvisitedUrl(self): return self.unVisited
1
fd9772f61cbe7b490c40301471aa144b
636408346948752d6e778170069b97b6
Strips off the time format Blizzard appends to highlights.
processTimeFormat(hourly) { for (let i = 0; i < hourly.length; i++) { hourly[i].time = hourly[i].time.slice(11); } return hourly; }
1
606352272125ef1f9d5045d12b6e4d59
d05e91d234f99e2788872f31cdc16dd6
2.斐波那契数列前n项
let arr = [0,1]; if(n>1){ for (let i=2;i<n+2;i++){ arr.push(arr[i-2]+arr[i-1]); } } return arr[n+1]; }
0
65eb5d1c65f1bb7bdf08ca97e86403bd
88cfad3286846f693dd1c94787de1f31
The float clearing shortcode.
$content = shortcode_empty_paragraph_fix( $content ); extract( shortcode_atts( array( 'col' => 'default', ), $atts ) ); return '<div class="owcol-' . $col . '">' . $content . '</div>'; }
0
3dbb9a020c4172d1a24af68f889c3c1d
2386fde3792a8ca25c4009520c35dc1b
通过机构ids查找用户列表
List<User> queryUserByOrgIds(List<String> orgIds);
1
bb802d6946d5e81aac2ff981f8749e97
d76cc8fa94f2ceaf27b8ac18ced67ce2
Enter context. Default implementation does nothing.
class NoOpCtx: def __enter__(self): pass
1
4a45140697f5d6be37d5394c9023fb7a
b75f7ee2462bacf51e0843ece4176435
Return the track number of the given file name.
def file_name_to_track_name(fn): tn = os.path.split(fn)[1] tn = os.path.splitext(tn)[0] return tn.lstrip('0123456789').lstrip(' -.')
0
9ad40aafdb7575f349eac432350c1eb8
5909383648d0215503f3bb50d0295ad3
node optimization method (currently only works for static entities)
tCIDLib::TVoid TGenProtoCheckSumNode::Optimize(TGenProtoCtx& ctxThis) { m_pnodeOfs = pnodeOptimize(ctxThis, m_pnodeOfs); m_pnodeLen = pnodeOptimize(ctxThis, m_pnodeLen); }
1
fa20c319f957a5a96d44c179451d54ff
d00832f5390b70d74628191ae3e3ac08
returns a Set that contains all the elements in set A and B, but only list duplicates once.
new_set = set() for i in A: if i in B: new_set.add(i) return new_set
0
5fd9712c74ce79f57e59cb41619b4e8c
426aa5c247c45d844467f3ad5cce04d1
funcion rad, si n es primo devuelve n. Sino, calcula los primos p < n/2 tal que p|n, los pone en una lista y al final recorre la lista multiplicando sus elementos
def rad(num): primes = set() isDivBy2 = num % 2 == 0 if isDivBy2: primes.add(2) while isDivBy2: num = num/2 isDivBy2 = num % 2 == 0 x = 3 while x <= math.sqrt(num): isDivByX = num % x == 0 if isDivByX: primes.add(x) while isDivByX: ...
0
37e1fa23397db14bec1ca29d3b820cce
29440e3389e5f7b215692390542cacae
The address being used to connect to Redis by the underlying connection or pool.
class ConnectionInfo: def hostaddr(self) -> str: return self._get_pgconn_attr("hostaddr")
0
044ada46740a9d7f71f3f725922e7f2f
61722e8bbb9d0129b64e74844a4bda97
检查授权方式的数据是否正确
namespace WebTester.Areas.Api.Controllers public class OAuth2Controller : OpenApiBaseController private void CheckOAuthParam(int client_id, string client_secret, string grant_type) { if (grant_type != "password") throw new ApiException("手机端只支持password方式授权", ResultCode.GrantType_E...
1
13b37afd37053eb56d81835ba9957d89
4ea40cb774f0b0a8db705b74fcbc2a4d
Set the maximum grid points to be a low number that should be exceeded by the refinement
latCount = self.NWCornerGridPoint.LattitudeInt - self.SWCornerGridPoint.LattitudeInt lonCount = self.SWCornerGridPoint.LongitudeInt - self.SECornerGridPoint.LongitudeInt resolutionDecrease = 0 maxResolutionDecrease = MAXIMUM_RESOLUTION - MINIMUM_RESOLUTION while latCount*lonCount...
1
556e084c0c16a2f544b614c1b700bd2c
a6c4b4228997a53f78dfb137ba174fd3
Generate flow size according to specified random model.
Solution.__init__(self, 2) self.flows_num = flows_num self.path_num = path_num self.net_model = net_model self.attributes = self.generate_new_solution() self.evaluate_solution()
0
5807aa6b8f9516dcfda80535f2c5359f
5ed6e8f64f86edd689736aa815eff114
Returns `True` if the resource is related with remote XML data.
class BaseType(BaseModel, ABC): # pylint: disable=too-many-public-methods def is_xml(self) -> bool: return bool(self.xml_metadata)
1
343bd0d6a46f590bf2a19d60751b9032
0202d19130a7e9c7626942957f5e8b09
\brief Erases the flash sectors from first_sector up until last_sector.
{ HAL_StatusTypeDef status = HAL_ERROR; uint32_t FirstSector = 0, LastSector = 0, NbOfSectors = 0, SECTORError = 0; FLASH_EraseInitTypeDef EraseInitStruct; HAL_FLASH_Unlock(); if (GetFlashSector(StartAddress, &FirstSector) == 0) { if (GetFlashSector(EndAddress, &LastSector) == 0) { NbOfSectors = L...
1
e2427e7881c2dcdd3a3c860caeb7fb8a
19a948e828a6c8eb8643cf258b7c3563
네이버 메인 뉴스 스탠드 스크랩핑 메인 함수
news_query = 'https://search.naver.com/search.naver?where=news&query=' for i, title in enumerate(news_title_list): time.sleep(1) print("%d %s" % (i+1, title)) driver.get(news_query+title) try: element = WebDriverWait(driver, 5).until( EC.presence_of_el...
1
eaf117355fcd0b9c0ee142d89053aa52
5eaa6467f6aaa3f4bd353bbd734c86c8
Automatically update all packages
packages = gather_packages() for package in packages: subprocess.run(['pipsi', 'upgrade', package], stdout=sys.stdout, stderr=sys.stderr, stdin=sys.stdin)
1
d38257ae6c898b701160941332505787
41fa736dc0144ebc51fd70cdf1b23534
유조가 선호하는 장르를 조회합니다.
class ActorController extends Controller public function favourite_genre($id) { try { $actor = Actor::findOrFail($id); } catch (ModelNotFoundException $e){ return response()->json([], 404); } $rolesFiltered = $actor->roles()->get(); $movies = []; ...
1
589879fae6b3768450ea61e01b95fd43
40746d9851f0da0eff2163e6950fa85f
Metodo encargado de Actualizar un registro de Usuario_App_Rol en base a los parametros ingresados.
class Rol extends Comun public function update() { $this->con->beginTransaction(); $sql = sprintf('UPDATE %s SET rol=:rol WHERE id=:id', $this->getTabla()); $statement = $this->con->prepare($sql); $statement->bindValue(':rol', $this->getRol(), \PDO::PARAM_STR); $statement->bi...
1
b1aae60b054be90a1869f6d5ebd9c5d5
40724943696648a01f2597126b0f2a82
Gets the value of the rateComponentListLink property. possible object is {@link RateComponentListLink }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "osiv", "osi", "qual1", "qual2", "id", "idType", "idText1", "idText2", "vType", "vnd", "versionNum", "prodType", "sourceSys", "custID", "serviceProviderCode", "productProviderCode", ...
0
07612344c2b34f006c59c7d37d7a7968
6efec9b0f1bff5ee0e5f46c14b9a2059
replace "\" with "/" and add an "/" to the end of the path if it's not already done
void addSlash(char * address) { char last = address[strlen(address)-1]; if (strcmp(&last,"/") != 0) { strcat(address,"/"); } }
0
2a173d3863a7d1e88eca72514e1e41db
2059e82ac3ffe0f5aa331a4a3498090d
Calculate the noise correlations of cells via their traces. Uses the method of Marlene Cohen and John Maunsell.
def collate_fissa_traces(exp, tiff=0, region='cell', trace_type='corrected'): nrois = exp.nCell nframes = exp.result[0][tiff].shape[1] nregions = exp.result[0][tiff].shape[0] nregions_np = nregions - 1 tracemat = np.empty((nframes, nrois)) for ridx in range(len(exp.result)): meandiffs = ...
0
bc26639856b683c2a4674f28c9a7d3f9
ea4fabe0e87b89ee53982326c280f3b9
Updates topology when node that is expected to be in topology fails.
public class TcpDiscoveryStatistics public void onNodeFailed() { failedNodesCnt.increment(); }
0
d63a4e9e2d304b0323f75be843bd1d41
42f64e4d56fc218eb9861da8965eb1ba
Goes through and acts like the user just reset every box to refresh everything. Not always needed but won't lag at all, so why not?
public class Sudoku extends Panel implements ActionListener public void resetPuzzle() { Random r = new Random(); int randSudoku = r.nextInt(SUDOKU_COUNT); getSolvedSudoku(randSudoku); getUnsolvedSudoku(randSudoku); for (int i = 0 ; i < BOX_COUNT ; i++) for (int j = 0 ; j < BOX_ROWS ; j++) for (int k...
1
b98db7fbfe605aa8d92b8ef78cb89cda
5ce70e7b8211f9112a50e7ce8cdbcd09
Serializes a FHIR primitive into an element with the given name
def serialize_primitive(obj, spec, ctx): return ctx.dumpval('', obj)
0
8e02cdd92e01ee519c9230c946d821a9
eb85c11137604e86322de1c438557254
Add Room Type
class RoomTypeController extends SchedulerMainController public function postCreate(RoomTypeRequest $room_type_request) { $room_type = new RoomType(); $room_type ->name = $room_type_request->name; $room_type ->code = $room_type_request->code; $room_type ->created_by_id = Auth::id(); ...
1
af925af051d99ba6b5bef3c4656798e6
90a40923f6535df26f42e6349e79abb9
Returns a dictionary with cell id as the key and the index of the cell id as the value. The index is used to locate the cell id's values in the arrays that this reader returns
split_ids = {} n = len(cell_ids[ cell_ids.keys()[0] ]) num_subseries = int(n/tau) for u in cell_ids: path = cell_ids[u] for i in range(0, num_subseries): sub = path[ i*tau : (i*tau) + tau ] split_ids[str(u) + '-' + str(i)] = sub ...
0
3f86cca2b87c9ea9bf2aa2b2807b824c
1a8d9f66016201338801447c55e051c4
Send new request status ("approved") to DAO layer to change current status in database.
namespace Lib.Repositories public class UserRepository : Abstract.AbstractRepository, IDisposable public bool approveRequest(long id) { bool approved = false; var request = context.RequestCities.Where(u => u.Id == id).FirstOrDefault(); if (request != null) { ...
1
24ac3e3ed7af2836c07d0212318217e4
275272a0dba89673012bdf8a1c01fd6e
Define o CEP de Origem
class ICMSSN101 extends \Sped\Components\Xml\Element public function addOrig($value = NULL) { return $this->appendChild(new \Sped\Schemas\V200\Torig(self::ORIG, $value, 'http://www.portalfiscal.inf.br/nfe'), true); }
0
cbe7ca3ca9e77f5380cf6d1dd6f9a17c
251e722a369dac2ee518e47503e74665
Calculate Mean Obliquity of the Ecliptic for a Greenwich Date
namespace MapWinGeoProc public class TerrainAnalysis private static double calcMeanObliquityOfEcliptic(double t) { double seconds = 21.448 - t*(46.8150 + t*(0.00059 - t*(0.001813))); double e0 = 23.0 + (26.0 + (seconds/60.0))/60.0; return e0; }
1
d2d8d3471dacc61ffb60243a35ba4313
627c60925572fc3545bea5229da05b32
初期巡回路を生成(nearest neighbor法)
{ DArea first = areas[ Random.Range(0, areas.Count) ]; for (int i=0; i<areas.Count-1; i++) { if (RoadGen(areas[i], areas[i+1], ref cells)) { List<DArea> nexts = DArea.GetNextAreas(areas, areas[i], RDirection4.ALL); if (nexts.Count > 0) { RoadGen(areas[i], nexts[Random.Range(0, nexts.Count)], r...
0
875c1c6ad7c187db9edff45a54de289a
2927d50393e0d4cbd4c5863454e2da08
Draws the spacebar instructions (last slide of the tutorial).
textFont(titleFont); textAlign(CENTER, CENTER); textSize(50); fill(255, 255, 255); text(`SPACE SWEEPERS`, width / 2, height / 2 - 150); }
0
1087664b4dae7d7c766b690774f29311
7e8e6a103283f88e1e8d1f02b51ffd54
Adds a new Predecessor to the node
predecessor_task_id = predecessor_task.wf_id current_predecessors = self.get_fields(["predecessors:*"])["predecessors"] if not any(p["predecessorID"] == predecessor_task_id for p in current_predecessors): new_predecessor = {"predecessorID": predecessor_task_id, ...
1
e4b30cc12fd520a389f6e2a85cc2c8cb
ca6d09d7766de5c0149cb32b0ba3d888
Return the path to the portal
class Cluster(object): def portal_url(self): return '/'.join((self.url, 'portal'))
1
2fcead2cfd2547bc76d79a77997ea5e1
03f814a4b40161530ac7cb35ee5439a1
Gets a value that specifies the collection of user custom actions for the site.
{ if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name)); web.Context.Load(web.UserCustomActions); web.Context.ExecuteQueryRetry(); var customActions = web.UserCustomActions.AsEnumerable(); foreach (var customActi...
0
1e9a35c20d8d849ef4b3daa349aee498
cec026ef99acfc9b4f6b980298104c85
Sets the orderLineCount.
public class CrpCustLogsImpl extends EntityImpl public void setOrderLinesId(Number value) { setAttributeInternal(ORDERLINESID, value); }
0
3f09d193353e65bab4a739d943177400
bb79fffb2848838817ad20b7b5d5e199
得到字段名字和判断条件的一一对应关系
{ Dictionary<string, string> retdictionary = new Dictionary<string, string>(); string[] fieldvalues = whereFields.Split(new string[] { " and DATEDIFF(DAY,N'" ," and CHARINDEX(N'" ," and DATEDIFF(SS,N'" ," and 1=0" ...
1
7e28ab59c5e2ade9b5666a2d54c364cf
398345fc7683661a438432682ecd6931
根据指定group 和file 文件名 获取多个storage server 用于下载或修改文件 (即该文件已经存在于服务器)
class FastDFS public function tracker_query_storage_fetch($group_name, $remote_filename, $tracker_server = NULL){ return fastdfs_tracker_query_storage_fetch(); }
1
1df2034dec38b2ff990b9eafd8fcad12
22f1d6f68446694aec6b3beca6eff95a
Check if @a s1 knows every member of @a s2's table.
for (const v2 of s2) { if (!s1.has(v2)) { return false; } } return true; }
1
a73a21c9e5c7d9515a51809b46ad482c
cbac85e7411f22e41d8b7eb4495b2160
查询一级公司纠纷类型
function getIssueFirstType() { return request({ url: '/CLGSHZ/eventBasicInfo/getIssueFirstType', method: 'post' }) }
1
2de3c83b7b90b67fe19b217a96dd993a
7f6622addc4880879f4dd88861b4ae98
根据会员创建时间删除会员
@Service("visitorService") public class VisitorServiceImpl implements VisitorService @Override public void delVisitorByAddTime(Date date) { visitorDao.delVisitorByAddTime(date); }
1
0ea93849988cfe05dc96dceff18185ea
192d9fc1f70238c14dc9adb83c67d876
Sets all writing systems in an FDO multi string from a LanguageForge MultiText field. Destination is first parameter, like the order of an assignment statement.
public String findMultiString(String name, String language){ FXmlNode xconfig = _configs.get(name); if(xconfig != null){ FMultiString result = new FMultiString(); result.unpack(xconfig.text()); result.get(language); } return null; ...
0
9fb237f035d57a7557806f87de7407a6
8b92fe101fd56a3f8df9ee995df4b46f
Start both motors. `run-direct` command will allow to vary motor performance on the fly by adjusting `duty_cycle_sp` attribute.
class Motor(object): def turn_on(self, speed): self._motor.run_direct(duty_cycle_sp=speed)
1
e802fc91f8405d713a3c0d651684ac01
e99aa3b6d523b13e39573b697c2492f0
checks if player owns a country that can attack
namespace RiskLib public abstract class NormalTurnState protected bool CanAttack() { return (Turn.Game.CurrentPlayer.Territories.Where( t => t.CanAttack).Count() > 0); }
1
89e7c1231749d7056fd939f99c36341f
a4d680d4b0274714fab1ce0fe161df3c
测试TomcatStatus链接是否连通,是否能返回数据
public class TestWsdlConnection public int TestConnection(String address){ int status=404; try { URL url=new URL(address); HttpURLConnection oc=(HttpURLConnection) url.openConnection(); oc.setUseCaches(false); oc.setConnectTimeout(3000); status...
1
0cd68b0fa2424c9756d5b1944017f136
6d81377df23a103f351a0dcf583e0528
获取法人银行账户户名
class ZhengxinPage(BasePage): def get_zhengxin_bank_name(self): return self.find_element(*self.zhengxin_bank_name_loc).text
0
dc02dc5804d752249b68adbfbf411086
9c2a0711a1b04d455ed5d762dbcec333
Sets the default byte order of all new buffers created by this object the requested byte order for all new buffers
mByteOrder = order; if (mBuffer != null) { mBuffer.order(order); } return this; }
0
53cb71055231c2e8defb5cc195c9a322
d770dfe0a5e9ff91df31fabd086ca518
Retrieve Content objects first according to matching criteria and then "copy" them. Possible values for $matches, refer to method "updateAction".
class XenResource_Search_DataHandler_Update extends XenForo_Search_DataHandler_Abstract public function quickIndex(XenForo_Search_Indexer $indexer, array $contentIds) { $updates = $this->_getUpdateModel()->getUpdatesByIds($contentIds, array( 'join' => XenResource_Model_Update::FETCH_RESOURCE )); foreach ($upd...
0
0f567c49885f70251dcd1e6a45077e22
d52398f3f1c31d8ac1e594bd35852608
Unsets the value of the '{@link org.oasisopen.names.tc.opendocument.xmlns.text.UserIndexSourceType#getUseObjects <em>Use Objects</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
void unsetUseCharacterMaps();
0
980fa18ad4d51da49b4aa1e1e87deb1f
26cbc95f33ec33b2bc848c99764a62a1
Найти жанр книги по индентификатору
public Genre read(int id) { ResultSet rs = null; Connection con = connectionPool.getConnection(); try (PreparedStatement ps = con.prepareStatement(SQL_QUERY_GENRE_READ)) { ps.setInt(1, id); rs = ps.executeQuery(); if (rs.next()) return buidEntity(rs); } catch (SQLException e) { logger.error("SQ...
1
3015b9b50af3d6f44b4ef97ada3fc742
4ee6500238b5419bcd23a1752fc6925b
convert nanosecond to milliseconds on timestamps
public class TimeFormatters public static long convertToMilliseconds(long nanoSeconds) { return (nanoSeconds + (1000000 - 1)) / 1000000; }
1
7a6cf265d38e3840aec3e4472d90a3f8
cbe6b21e0b3410c106563f18e79ca46a
We add all users except the one connected on this session
for (Map.Entry<String, Connection> connectionEntry : connectionMap.entrySet()){ if(!connectionEntry.getKey().equals(userName)) connection.send(new Message(MessageType.USER_ADDED, connectionEntry.getKey())); } }
1
38dadb710f0c953fc4c323f908616df2
c8d48e5395194597f1b6bbaba642e8c9
Get the capacityObjectId property: The object ID of the capacity resource associated with the auto scale v-core resource.
@Entity public class EntryEntity implements Comparable<EventEntity> @Generated(hash = 1365333349) public EntryCapacityEntity getCapacity() { long __key = this.entryCapacityEntityId; if (capacity__resolvedKey == null || !capacity__resolvedKey.equals(__key)) { final DaoSession daoSession = this.daoSession...
0
fcd796d23d0b6ef1be998d582cc2a778
eae77ff7a7a19f23edb670fb4089c429
Muestra todos los cuerpos de pedido de la base de datos.
class PedidosController extends Controller public function index() { $pedidos = Pedido::all(); return view('pedidos.index',compact('pedidos')); }
1
eec30e4fe536b4ef305ec297e81ab953
eab1cf00b891353c87608b5df6454759
Called when btnEditorHotspotApply is clicked.
private void onApplyClick() throws IOException { this.shouldSave = true; this.saveEditedEntities(); }
1
3f2069d14031587a98f279c89c1d4bd5
21b786f8b9f8901930b13c06b645446b
Passing the wrong number of arguments to methods will raise exceptions.
class Dummy: pass with self.assertRaisesRegex(AttributeError, "bad"): wrap_method(Dummy, "bad", before=lambda self: None)
0
64979646103eed0b0e9c55d4d389d734
9bfcbcd730b3fa61345aeb22aa6a0b01
Make sure that the given action is a subclass of Action.
abstract class Action public static function isActionInstance($action) { return $action instanceof Action ? true : false; }
1
70449ce4f2c0df5360643d11692fba04
18a56ae459684ee58058ceba4df1f956
Wait for a DMA channel to be idle.
{ if (g_pMemDescrip[DmaChan]) { #ifdef __linux__ int ret = 0; AMB_STATE_DMA_CHANNEL StateDescrip; StateDescrip.DmaChanNum = DmaChan; StateDescrip.Timeout = msTimeout; ret = IPC_ioctlDevice( g_hWDM, IOCTL_AMB_WAIT_DMA_BLOCK, &StateDescrip, sizeof(AMB_STATE_DMA_CHANNEL), &StateDescrip, sizeo...
1
85a649510aad3ab8c291f1d1249260b4
0db9ce9e1e16a902efd5d54e2e40a8d2
Get annotations for the given test case.
class BisectPerformanceMetrics(object): def _RunTestWithAnnotations( self, step_text, error_text, head_revision, target_depot, command_to_run, metric, force_build): if self.opts.output_buildbot_annotations: bisect_utils.OutputAnnotationStepStart(step_text) run_test_results = self.RunTest( ...
1
70ce94bcf178c30ea6d368519b16593c
75f11e6ef7df321c558a6a64a11d23c5
Prints Header Feature Content Image
if( get_header_image() ) { ?> <div id="headimg"> <div id="siteImage_overlay"></div> <div id="indexFix"> <div id="network"> <div id="wsuLogo"><a href="http://wsu.edu/" title="Washington State University" onclick="return false;"><span>Washington State University</span></a></...
1
a6c5d6b992cddf318dd1079f19ce4f17
abf639c79a7e3601299570bd626a8e96
Обновляем описание выбранного примера и обновляем состояние кнопок
namespace UnitEngineUI public partial class EditorBehaviorInspector : DockContent void UpdateItemDesc() { _editItem = null; _panelDesc.Enabled = false; _textBoxPropName.Text = string.Empty; _nmrPropPriority.Value = 0; FormWorker.ClearDataGrid(_data...
1
4fd42de03c8187f2e214a6304ef4d03e
e87ce94e993f6f68ae2a50d0624369fc
Calculate the harmonic number of a given integer
def hermonic_sum(amount_times): total = 0 fraction = 1 for num in range(amount_times): fraction = fraction * 2 total += (1/(fraction)) return round(total, 10)
0
b2e42c375c0f8f6688379ad9c1cd0cb8
59a1649ed6d5c18b8087b0dd1472bd4f
根据任务id和用户账号查询段落id
@Service public class ActBusinessServiceImpl extends ServiceImpl<ActBusinessMapper, ActBusiness> implements IActBusinessService public List<String> findUserIdByTypeAndTaskId(String type, String taskId) { return baseMapper.findUserIdByTypeAndTaskId(type, taskId); }
0
449fbbd9d84c5481600f4f1a462df697
3817f61e59c0e30a45671b9859df3aac
Retourne une vue représentant cette instance.
public class View extends JInternalFrame implements Observer public Fenetre getFenetre() { return this.fenetre; }
0
d9425372b65ae954d7ffc2a2e5ec0d1c
fa406f98a333130d3fce9849ac576bdf
This method use to get user profile by created By ID for Admin.
{ string returnResult = string.Empty; Int32 createdBy = Models.Utility.Number.Zero; if (Session["UserId"] != null) { createdBy = Convert.ToInt32(Session["UserId"]); } var ObjAdmin = ObjOCRP.Users.Where(c => (c.ID == createdB...
1
5224ed7f5d594d5a3d4b6ca044084ae0
6ad6ae30ad52c38c4e631b39bd0d48e0
Converts tf-idf weight matrix to a pandas df.
column_sums = np.count_nonzero(tf_matrix, axis=0) tf_idf_matrix = tf_matrix / column_sums return tf_idf_matrix
0
72dbc476692fa6257e58ff3e5d303960
a4f217c38d33fb976c6a531840410449
ConfigGetTempDisplay() Return the temperature display configuration value None uint8_t
s16 DTCheckGetTVSTemp(void) { return (s16)gSampleData.TVSTemp; }
0
c8220fe4fecadb79acbd5c2d8a61bc12
8f3d0b5900a993866808f3860394f5af
Detect javaw.exe via reg. 从注册表中查找可能的javaw.exe位置
File javaHome = new File(System.getProperties().getProperty("java.home")); File applicationDir = javaHome.getParentFile().getParentFile(); File[] files = applicationDir.listFiles(new FilenameFilter() { @Override public boolean accept(final File dir, final String name) { return name.startsWith("unins") &...
0
dddbb3ce32ccdcd37fa1c7fb0f811f4d
3806da13bcb1a71c167af8ae6941a961
Computes all the eigenvalues, and optionally, the eigenvectors of a complex banded generalized Hermitian-definite eigenproblem (divide-and- conquer). http://www.nag.co.uk/numeric/CL/nagdoc_cl23/html/f08/f08uqc.html TypeError will be raised when the following arguments are not instances of numpy.ndarray: ab, bb, w, z Ty...
namespace CSparse.Double.Solver public sealed class Spectra : SpectraContext<double> public IEigenSolverResult SolveGeneralized(int k, double sigma, ShiftMode mode, Spectrum job = Spectrum.LargestMagnitude) { if (!symmetric && !(mode == ShiftMode.None || mode == ShiftMode.Regular)) {...
0
c27530bef5e1d611340dcde1387fe5d7
9a71f21dec5d4a829a91ff8a689d8a82
Converts map element into a float or returns None if conversion is not possible.
func AsFloatOr(item map[string]interface{}, key string, elze float64) float64 { if v, ok := item[key].(float64); ok { return v } return elze }
0