query_id
string
corpus_id
string
query
string
code
string
label
int64
1b180906183413b8d9007e3f113aab4e
73c9494dd934482e484ea5a949e00bf2
Show the form for creating a new nose.
{ if(Auth::user()->is_super_admin == 1){ $pumps = Pump::pluck('name', 'id')->toArray(); $tanks = Tank::pluck('name', 'id')->toArray(); return view('Admin.nozzles.create', compact('pumps', 'tanks')); }else{ $user = auth()->user(); $tanks = T...
1
d719f478f4a3bc1d1367653faf6f77b5
27362ba9c1bc9a1723e47e35ee518344
Subscribe the observable to get the data from the data stream
abstract class BaseObservableWatcherAdapter<T, DB : ViewDataBinding>( @LayoutRes itemLayout: Int, val dataSetObservable: Observable<List<T>>, diffCallback: DiffUtil.ItemCallback<T>? = null ) : BaseBindingAdapter<T, DB>(itemLayout, diffCallback) override fun onAttachedToRecyclerView(recyclerView:...
1
9c5d7a1c5a2dbd2d302f4c5ca02fa0f2
fa45f1e44fdbe05eda5eea87e862c05b
The distance of a Vector3 from a line made from Vector31 and Vector32.
{ Vector3 vectorToProject = line.GetPoint() - point; Vector3 toProjectOn = line.GetDirection(); Vector3 projection = VectorProjection(vectorToProject, toProjectOn); return (vectorToProject - projection).Magnitude(); }
1
16b6188fd78cf3fe25ed1574e294f9f3
a331594efb5503c1eca5287c9a2bc9bf
POST /league_years
@Controller public class UsersController @RequestMapping(value = "/addLeague", method = RequestMethod.POST) public String addLeague(@ModelAttribute("leagues") Leagues league, BindingResult result, RedirectAttributes attributes) { try { league.setMaxPlayers(32); league.se...
0
bb026f75912fc952ebb71a2e304a79b3
d54783d4f440f9e766ed2dcf73a14f59
Returns the Purge value
class SensorReadingResponse(BaseResponse): def pur(self): return self._pur
1
84254be86c6653717d451292e1a912fc
49d5df6c4af5587ec44de7f76c2075af
根据key获取String值,失败时一段时间内会重复尝试
public class RedisProperties public static String getString(String key, String defaultValue) { String val; try { val = (String) RedisHandler.get(key); } catch (Exception e) { Logs.e(RedisProperties.class, "redis get error>>key=" + key, e); return defaultValue;...
0
a0e1a55ad4ea0ff213aedaf150b9e4b5
064bc626423a72a925b53e8cde7a0e16
Generate the day that the observation was taken
class LWIR(data.Dataset): def _get_day(self, lwir_dir): lwir_dir = lwir_dir[len(self.root_dir)+1:] return lwir_dir.split('_')[2]
1
6e9f52fa8ed155f177036df0545a15fc
e326a51bf7dbc379db4b049b5f6961f8
Replace the camera name in related ROS topics.
namespace feeding void FTThresholdHelper::swapTopic(const std::string& topic) { #ifdef REWD_CONTROLLERS_FOUND std::string ftThresholdTopic = topic; if (topic == "") { ftThresholdTopic = getRosParam<std::string>( "/ftSensor/controllerFTThresholdTopic", mNodeHandle); } mFTThresholdClient.reset( ...
0
787a359ce51cc13178ad01f69ef15f6c
c030ba6c7f47c828d4ba754d8cf0b236
遍历一下所有的菜单对应的路由,再根据地址栏的地址核对是哪个菜单,将其设为默认选项
const {menuList} = this.state const defaultmenuId = menuList[0].menus[0].id if(!routerParams){ this.setState({ [type]: defaultmenuId, },() => { this.props.history.push({search:`menu=${this.state.menu}`}) }) } else { this.setState({ [type]: routerParams ...
0
e4f2c80fe410f41f963d8d7d55cd36a3
e297ceda43ef7ed1a746621d508553a6
Gets the last time the forum was read.
class Forum_driver_ipb_shared extends Forum_driver_base public function mrow_lastvisit($r) { return $r['last_visit']; }
1
ff2b20ae64067990c5d6fa6a7c1b4786
fcd98e195569c18a60e76605aebe3535
Method to get the current Experiment instance. Lazily populated.
if ($this->_experiment === null) { $this->_experiment = new Scenario_Experiment( $this->experiment_name, $this->experiment_id, false, $this->experiment_data ); if ($this->parent_id !== null) { $this->_experiment->setParent($this->getParent()); } } return $this->_experiment; }
1
2c0b7483168bcd84e41194a60c271366
27a3eb552d4b101083e9a7325f8bfa1f
获取圆心Y坐标
class Circle{ public int getCenterY() { return center.getY(); }
1
38d60ff347ee6219d713b68d651ef4af
0fd30768457d4fc05afc687d858af1dc
#' Internal method to update the availability column.
const endTime = timeColumn.values.reduce(function(latest, value, index) { const current = finishFromIndex(timeColumn, index); if ( !defined(latest) || (defined(current) && JulianDate.greaterThan(current, latest)) ) { return current; } return latest; }, finishFromIndex(timeColum...
1
87d2b6c55471fccb56d3a408788cb780
9147266a57d72d4e4e16651407371f8e
Creates My Posts widget Shows a list of the "posts you're following" sorted by most recent activity.
function recent_posts_load_widget() { register_widget('recent_posts_widget'); }
0
dcea252d38b9ae065c3ae754da7b2e6b
eca98a289541feaaf4573e11399e5050
Constructs a new LineReader.
inputStream : ReadableStream ) { super(); this._line = ''; inputStream.on( 'data', this.onStreamData.bind( this ) ); inputStream.on( 'end', this.onStreamEnd.bind( this ) ); }
1
25ca999e5c952703b7f1a4c6f59737af
707306418158c948bae0a87eb75ca208
Test of setFirstName method, of class Contact.
public void testSetFName() { System.out.println("setfName"); String fName = "Matt"; StudentForm instance = new StudentForm(); instance.setFName(fName); String defaultName = ""; assertNotSame(instance.getFName(),defaultName); }
0
4d0234ecead26215db06b5c1e7762739
a59a45b58dc83ebb1b8466f2e2fd936d
Default value when no flag exists
class Flags public function getDefaultFlagHandler(): ?\Closure { return $this->default_flag_handler; }
0
4933f816289adfc57ed14fe88b910b2c
daa207389ee7392d5916dd856db60762
Get a ScrollBar based on his ID.
createInstance(name, elem, options) { let { scrollbarInstances, deferreds } = this; if (scrollbarInstances.hasOwnProperty(name)) { return scrollbarInstances[name]; } let instance = scrollbarInstances[name] = new SmoothScrollbar(elem, options); ...
1
32d9ba02cfc54534e3670fd00c70174c
369a89c77a27b51982b30d5e73dadb13
后台下载GIS坐标表数据
{ string gridField = "GridCode"; IFeatureLayer pFeatureLayer = (IFeatureLayer)pClsCom.GetLayerByName(pMapControl, cbxLayerName.Text); IDataset cDataset = pFeatureLayer.FeatureClass as IDataset; IGeoDataset cGeoDataset = cDataset as IGeoDataset; ISpatia...
0
a5687711d73f6a76f3b846cac8dbf547
b888d312e134215e8e37fd6028b5ef29
集群增加一个数据存储节点
namespace MicroService.Data.KetamaHash void AddNode(StoreNode node);
1
9ae62f572a4b107773150ba45556126a
be620272368024a9df125c8a950687d5
\brief Gets the current coolant temperature of car in C° Reads out the current coolant temperature of the car.
{ uint8_t Buf[2]; ReadI2CDeviceREG(SlaveAddress, CURRENT, 2, Buf); return BYTES2UINT(Buf[0], Buf[1]); }
1
c6952d92a9fdc6c0563a7b40b00a082f
c8891bbcaf984e4b3a1209a45da8440c
Get fieldset legend.
class Zend_Form implements Iterator, Countable, Zend_Validate_Interface public function getLegend() { return $this->_legend; }
1
b52ddcfb5417579b7de0aacc7deaa35f
1a8c09dea743066c1ad9478fc9c3ae46
TestNonceBasics verifies basic nonce behaviors.
data := []byte{0x20, 0x30} key := [32]byte{0x40, 0x45} encryptedData, err := encryptData(data, key) require.NoError(t, err) encryptedDataWrongNonce := encryptedData encryptedDataWrongNonce.Version++ tlfCryptKey := TLFCryptKey{privateByte32Container{key}} half := [32]byte{0x50, 0x51} blockServerHalf := BlockCry...
1
dd1e5cf9d0a4a0f323f9a8b40f411e5f
4dd66c9b9c602aa5a85ea21331d2fe1b
Get brewery.
{ try { $response = Http::get('https://api.openbrewerydb.org/breweries')->json(); return BrewerResource::collection($response); } catch (\Exception $exception) { abort(500, 'Error endpoint'); } }
1
7fbe0658d398029dc77819e2464c27fe
8617b646067256111a78ccbaa75f57a4
移除已购
{ $data = input(); $product_id = $this->purchased->where('purchased_id', $data['purchased_id'])->value('product_id'); if($this->purchased->remove($data)){ $this->product->where('product_id', $product_id)->setInc('quantity'); return 1; } else { ...
1
cd296a26013807ec422102dc58520604
fce2470296f15144432d8909a0cf9040
Create a dataframe for the segments in the given file
ann = pandas.read_csv(ann_path, sep=',', delimiter=None) img_segments = [] for i in range(len(ann)): segment = Segment(ann["x1"][i], ann["y1"][i], ann["x2"][i], ann["y2"][i]) img_segments.append(segment) return img_segments
0
7c637c5f43d6602a910e24ac455f853d
79233412b6510edbfabf4c085fccb4fd
Takes a version string and constructs a Vulkan packed version number from it.
{ bool okMajor { false }; bool okMinor { false }; bool okPatch { false }; int major = QString(str.at(0)).toInt(&okMajor); int minor = QString(str.at(2)).toInt(&okMinor); int patch = QString(str.at(4)).toInt(&okPatch); if (okMajor && okMinor && okPatch) { return std::nullopt; } ...
0
8ddaf6f1780f410881c9954dbc0b958b
3412c8b4a08a8d3e1e9ca87f62719c07
次へラジオボタン生成
class Prog (wx.Frame): def create_radio_item (self, i): pos = ((i%3)*30 + 550, (i/3)*24 + 266) if (i == 0): style = wx.RB_GROUP else: style = 0 radio_item = wx.RadioButton(self.panel, new_id('radio_item_num_' + str(i), 'optimal', 'checkbox'), str(i+1), pos, style=...
1
8cc1b9885b5534aef5863c5e08524cbd
3badd084bf992a790a0cb68e981cdcce
plot the lines on the transformed image, then do the inverse transform to get the lines on the original image
def drawing_double(undist, bin_warped,Minv, left_fitx, right_fitx, ploty): warp_zero = np.zeros_like(bin_warped).astype(np.uint8) color_warp = np.dstack((warp_zero, warp_zero, warp_zero)) pts_left = np.array([np.transpose(np.vstack([left_fitx, ploty]))]) pts_right = np.array([np.flipud(np.transpose(np.v...
1
6093edc9abd73112ae5fdc9482e26bf0
fac399879321c702154ab5886bf9565f
Sync Core 2.0 has it always enabled.
BOOLEAN STATIC IsCoreLevelingEnabled ( IN PLATFORM_CONFIGURATION *PlatformConfig, IN AMD_CONFIG_PARAMS *StdHeader ) { CORE_LEVELING_TYPE CoreLevelMode; CoreLevelMode = (CORE_LEVELING_TYPE) PlatformConfig->CoreLevelingMode; if (CoreLevelMode != CORE_LEVEL_NONE) { return (TRUE); } else...
0
94a9a8de571455c19d7956f589e2d4b7
d0a2a058f8974549aac1707d1e4a435b
Read a completely clean CSV file, given the filename, expected column count, and options (common options would be encoding, and whether there are headers)
public void Populate([NotNull] string filePath, bool hasHeaderRow, bool trimColumns) { Populate(filePath, null, hasHeaderRow, trimColumns); }
0
8e51d5a943760e63f150bea307099c10
d9d4fc4a9e0a090f2bba71a82b96ffd8
显示演员的具体的信息方法 Enter description here ...
global $db, $smarty; $actor_id = $_REQUEST["actor_id"]; $smarty -> assign("actor_id", $actor_id); $sqlstr = "select * from hmc_projectactor where pactor_id='{$actor_id}' "; $oactor = $db -> QueryArray($sqlstr); $actor = (array)$oactor["0"]; $birthdate = $actor['birthdate']; $smarty -> assign("birthdate", $...
1
b41ef04323760eddc598db7feb68fa25
e0dd5377846681b05ae07327e89eea79
Create table of next occurrences.
occ_replacer = OccurrenceReplacer(self.occurrence_set.all()) generator = self._occurrences_after_generator(after) while True: next = generator.next() yield occ_replacer.get_occurrence(next)
0
a2d574e91de99ef2aaa3f5c0ebc32863
b9ab4b03b3ce9674e8c40f7c08f7ce61
Get live version of this.ContentItem using this.provider
namespace Sdl.Web.Tridion.Mapping public class DefaultContentProvider : IContentProviderExt, IRawDataProvider public virtual StaticContentItem GetStaticContentItem(string urlPath, Localization localization) { using (new Tracer(urlPath, localization)) { string localFil...
0
dcf2f48093b38dd145679f1f2abc6beb
4d72a6526f4f7e7d12c995c9047d9d68
删除浏览过的机场列表
public class MenuMeFragment extends BaseFragment private void clearAllowCondition() { AllowAirportDB.deleteAllowAirports(Url.getLANG()); }
1
4a26151128c9a4eaebd48707bd9eafde
51d5190b9a9f3d6d7dd2230ba108e6d8
发送同意添加好友请求
request({ url: "/message/addFriend", method: "post", data: { uid: JSON.parse(sessionStorage["user_info"])._id, uname: JSON.parse(sessionStorage["user_info"]).user_name, incr_uid: friend.fid, fname: friend.fname } }).then((res) => { console.log(res.da...
1
698ece1781c958805590ca1717b3e85c
160b65723f5ff352578e49876bdce96a
創建系統選單關係
function iniSystem(){ $("#yMenuGroup").html(""); $("#yChildMenuGroup").html(""); for(var i=0;i<systemJson.length;i++){ if(systemJson[i].SELECTED){ doAction(0,systemJson[i].UUID,systemJson[i].LEFTPAGEURL,systemJson[i].PAGEURL); $("<option selected='selected' value='"+systemJson[i].UUID+"'>"+systemJson[i].NAME...
1
a1d414e99472975f414ffe76135683a5
0272c8549ce4b9f9b2ca411ab7a6ab1c
Niveau de l'élève dans la matière concernée à la date la plus récente
{ $query="SELECT utilisateur_niveau FROM user WHERE utilisateur_id=?"; $prepQuery=getDb()->prepare($query); $prepQuery->execute(array($etudId)); $niveau=$prepQuery->fetch()["utilisateur_niveau"]; if(!aSucces(1,$etudId) && $niveau>=2) { ReussirSucces(1,$etudId); } if(!aSucces(2,$e...
0
2a7819eb9a9750212628deff0d40f9e5
4374eb553e8b1a5b542622349497cb4b
[Documentation](https://wow.gamepedia.com/API_GetNumArtifactsByRace)
function GetNumArtifactsByRace(raceIndex) end
1
aa9a09224cd517ca3e59950ab70d43c2
939ee714b364f677bd49fc2329282df9
Muestra la lista de los archivo, me permite elegir el archivo a editar, lo abre.
JFileChooser dig = new JFileChooser(); dig.setFileFilter(filter); int option = dig.showOpenDialog(this); if (option == JFileChooser.APPROVE_OPTION){ try { String file = dig.getSelectedFile().getPath(); String datos=informacion.datos(file)...
0
52e6f4de9a2d3804e5030a397474e149
04ad1a0935b11c39e4caabd3a1243f42
Recursively extract cont ent ids from elements (bloc, attribute, collection attribute, etc ...)
var all_tags = []; var all_elem_ids = []; self.html.main.inner.map( collect_all_tags( self.html.main.inner ) ); return { tags: all_tags, ids: all_elem_ids }; function collect_all_tags( parent ){ return function ( elem, index ) { if ( condition(...
1
1609ad30acae3c10b915fda686e4dfea
a0147f77a0aa0036462fa3e0f1eaa8ae
Getting credentials by Login filtered via <a href="https://www.javatpoint.com/java-regex">Regular Expression</a>
System.setProperty("webdriver.chrome.driver", "Drivers/chromedriver.exe"); ChromeDriver driver = new ChromeDriver(); driver.get("https://www.freecrm.com/index.html"); WebElement username = driver.findElement(By.name("username")); JavascriptExecutor js = (JavascriptExecutor) (driver); js.executeScript("argum...
0
81a99e3f5cd7ba22b2341ec6dba3baf1
6ff9e127f4eac6b47af38824cfe37bbb
boss 后台签名验证
{ string s_sign = String.Join("#", new string[] { Cps360Config.BID, active_time, Cps360Config.CP_KEY }); s_sign = Cps360Utils.getMd5Hash(s_sign); if (String.Compare(s_sign, sign) != 0) { msg = "签名失败"; return false; } msg = "成功"; return ...
1
0c52cccde1e3a157cd160751251d746c
c35ec48ece8d4b0495c64d5b73117921
Boş olan odaları müşterinin seçebilmesi için ComboBoxa dolduruyor
namespace Sinama_Final public partial class Yeni_Projem : Form void musteriGetir() { _customerLİst.Clear(); cmb_musteri.Items.Clear(); _customerLİst = Db_Connection.baglanti().getir_Musteri(); foreach (Customer item in _customerLİst) { ...
1
37669858a1c34dce6311685d57b58ec3
e5fe1e736de259fbd401ab702e9fb270
Metodo que ejecuta el proceo de conciliar la Cartera de Kasten con la de ilimitada. Este Metodo se ejecuta en el evento onclick del boton BtConciliar
public RespuestaConciliarPagoDTO realizarConciliacionRecaudo();
1
38b52a9d819da10f988e375dc4b4b2b4
28139aa8bb742448b5b828f1cda523da
configure/modify instance launch template with options
namespace Amazon.Mgn Task<UpdateLaunchConfigurationTemplateResponse> UpdateLaunchConfigurationTemplateAsync(UpdateLaunchConfigurationTemplateRequest request, CancellationToken cancellationToken = default(CancellationToken));
1
839c326d1c69aae7a0384749df64e675
945f77d561d54b9e7b8ea5345cb46859
De-initialize the TTF engine
void cleanup_fonts() { FT_Done_FreeType(ft); }
0
36e82f081dde1651a1af351ac85c9742
7f6d4a6650decf37af84996373e06dc2
返回 省区本月SMS销量
HTablePool pool = new HTablePool(configuration, 1024); HTable table = (HTable) pool.getTable(Constants.MONTH_PROVINCE_STAT_NAME); int result = 0; Scan scan = new Scan(); scan.addColumn(Constants.PROVINCE_AGENT[0], Constants.PROVINCE_AGENT[1]); Filter filter = new RowFilter(CompareFilter.CompareOp.EQUAL, ...
1
46202c730ae13e0477c083574fb041ba
3d007a7fc0874e5e949b925e31531fe3
储存身份识别照片
{ $info = []; $info['name'] = Input::get("name"); if (empty($info['name'])) return $this->json(1,[],"请填写姓名"); $info['idnumber'] = Input::get("id_number"); if (empty($info['idnumber'])) return $this->json(1,[],"请填写身份证号"); if (empty(Input::get('img1'))) return $this->js...
1
95b9e2c74c82a2fb7a1b3754b6d06101
5d9a6f72b1f66a662c994d183bf30d06
掲示板投稿履歴詳細
class forum extends ForumController function view( $id, $start = 0 ) { $this->load->library( "frontpagination" ); $data = $this->postmodel->getInfo( array("id" => $id) ); $this->load->model( "usermodel" ); $data->user = $this->usermodel->getInfo( array('id' => $data->user_id) ); $data->user->posts...
1
62ae091ee95ddd9014cc4aff4deb8715
e0997507298eaeaf4b50514ff7378754
Движение корабля вправо
namespace SpaceInvaders.Actors.Player public class SpaceShip public void MoveRigth() { _graphicUtil.FillRectangles(_ship, Color.Black); if ((_ship[0].Location.X + _ship[0].Width + 15) < _game.ContainerWidth) for(int i = 0; i < _ship.Length; i++) _s...
1
27ddf482c2a9eee1c62154eb79e0104e
fb0c812cd16225b011acaeb067a112f5
Returns the font cache size in bytes.
int imlib_get_font_cache_size(void) { if (!ctx) ctx = imlib_context_new(); return imlib_font_cache_get(); }
1
a8b79058bfa8b8d92c76d53f9e0476bb
e6720ae911fece9fee1e22e71a268393
Pick new daily quests and adventurers for each new day
local function _new_day(...) _jctx.log.i("job_aoi _new_day", ...) end
0
afa4d23a420aa6b29a2413426688a6a4
f2840a727be0cabcd0e4a652c9107cd0
与其他PCollection做右连接操作,等同于 :func:`bigflow.transforms.right_join(self, other, *others) <bigflow.transforms.right_join>`
class Flow(metaclass=_FlowMeta): def __rshift__(self, other: 'Flow') -> 'Flow': return Flow(_chain=[*list(self), *list(other)])
0
34ecdc961aa7e5df9168b613a544fd76
2f33ac406b4c0e2cc23f4ba01ae21d99
When the update is the same as the original, it's a noop.
class JBoss7StateTestCase(TestCase): def test_should_not_update_bindings_if_same(self): __salt__['jboss7.read_simple_binding'].return_value = {'success': True, 'result': {'value': 'DEV2'}} result = jboss7.bindings_exist(name='bindings', jboss_config={}, bindings={'env': 'DEV2'}) self.assertEqual...
1
ae57f6fa0b6208fc3a04aeb9ce340911
f3b90964abdf7de5f264374f8887b0cd
Sets global configurations and returns the configuration parameters as an object.
def set_config(): config = configparser.ConfigParser() config.read(get_file("config/credentials.ini")) run_env = config['APP']['run_env'] api_token = config['APP']['api_token'] aws = dict(config['AWS']) shoe_database = dict(config['SHOE_DATABASE']) apparel_database = dict(config['APPAREL_DAT...
1
54b661612852096b99896b6f786074af
4e8edc1010966087595aa796ab68ecd8
Return the system file descriptor for STREAM.<br> <i>native declaration : ..\voice\local\headers\\usr\include\stdio.h:670</i>
int so_fileno(SO_FILE *stream) { return stream->fd; }
1
d106ac8b65923b0af67e5c370a08cdd3
037ecbf817f085f0587020db21bae9a0
Creates file(s) named after the keys, with contents from the values of the dictionary.
self.write_key_values_to_file([(key, hashmap[key]) for key in sorted(hashmap.keys())], filename) self._num_files += 1 hashmap.clear() gc.collect() self.spills += 1
0
65d5ed61cf8dcfcc127112173a0a4f79
c9ade8b758e72dde28d3f5a139889726
实际抽样数改变事件
flag = True for i in range(0, self.m_auinotebook1.PageCount): if self.m_auinotebook1.GetPage(i) == self.m_panel21: flag = False if flag: self.m_panel21 = wx.Panel(self.m_auinotebook1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, ...
0
10a4cbb07f6e24dd78adc4aec15fa5ec
ff54a188bfc1b8fbe4a3a0c33e950e72
List outlet product taxes. Returns a paginated list of outlet-product-tax records.
class TaxController extends Controller public function index() { $taxes = Tax::paginate($this->pagination); return response()->json($taxes, 200); }
0
f6f6c876eeabc559d7e90bfdc10739c1
25355dd39dbb0a2242fddf9bd1bdc55d
Create user with empty username.
public void emptyEmail() throws Exception { final String EMPTY_EMAIL = "@"; createUser(VALID_USER, EMPTY_EMAIL); }
0
55e32d0c92894fc37f3c761036db65d9
3c705f972f52150aafd4ec8fbf720dcc
Query if a USB Mass Storage (UMS) is enabled on the device.
try { Method method = mStorageMgr.getClass().getMethod( "isUsbMassStorageConnected"); return ((Boolean) method.invoke(mStorageMgr)).booleanValue(); } catch (Exception e) { LogInfo.e("StorageManagerEx::isUsbMassStorageConnected err, info: " + e.toString()); } return false; }
1
55fe9a3224cf4e53d7208379e91fa760
7fdb42e5641d7bab16dc2d7eddaab46d
Método recupera a extensão original do arquivo
class OriginalFile(models.Model): def get_extension(self): return FileUtils.get_extension(self.filename)
1
b7288322da0d1b30677bad0bad6f81cd
701387e96632c36378ad55c5ab2125b4
Logic to identify ads with multiple users
Set<Integer> userIdIncExcAds = new HashSet<Integer>(); for(int adId : adIdSet) { AdEntity adEntity = this.adEntityCache.query(adId); TargetingProfile targetingProfile = adEntity.getTargetingProfile(); if(targetingProfile.getUserIdInclusionExclusionType() != InclusionE...
0
7963adb2bb915e88bf20a502158851ba
3f56ca63f3a5de66620b99695152d713
检测是否落后太多
if redu<10000: return 0 max_value = df['close_price'][len(df)-11 : len(df) - 1].max() print('max_value:',max_value) index = df.query("close_price == {}".format(max_value)).index[-1] for i in range(index,len(df)): if df.loc[i,'close_price'] <= df.loc[i,'avg_5']: return 0 ...
1
5c5292f485096222a04dfbf761a8133a
e304509e909e7b7b86fe0209b04ce709
Get counter of words from tweet and save as attributes
{ List<WordCount> result = new List<WordCount>(); Dictionary<string, int> wordCount = new Dictionary<string, int>(); Regex rgx = new Regex("[^a-zA-Z0-9 +-]"); int countTotal = 0; foreach (string text in tweets) { string word...
1
7caf9c64ebb07dd374d06cdb91c894a7
df9a8f88d7ab7a59c8ed9f9912475dc5
determines the output character set based on input character set
terminalpp::character_set const &source, terminalpp::character_set const &dest, behaviour const &terminal_behaviour) { std::string result; if (source != dest) { if (dest == terminalpp::ansi::charset::utf8) { if (!terminal_behaviour.unicode_in_all_charsets) ...
1
7e562a57022039148d56c51abb45fa00
69ec6440ac59b134477d67e22bd08614
Convert ungapped coordinate to gapped.
class AlignmentMapper(object): def g_to_c(self, g_interval): return self.n_to_c(self.g_to_n(g_interval))
0
b2cc39f85c78ab5d57e8aba1496371cc
653342c975afd0d89e184b0c5e1afcff
Reload the list of articles already downloaded (if any)
class Main extends React.Component componentDidMount() { helpers.getSaved().then(function(response) { if (response !== this.state.savedArticles) { this.setState({ savedArticles: response.data }); } }.bind(this)); }
1
2a9c2c0fe750653e649f8349842d9275
9927d8cd574a37456166f90da012b80e
Detect the best language for the user (cookie first, Accept-Language otherwise).
$langcode = NULL; if ($this->languageManager && $request && $request->server->get('HTTP_ACCEPT_LANGUAGE')) { $http_accept_language = $request->server->get('HTTP_ACCEPT_LANGUAGE'); $langcodes = array_keys($this->languageManager->getLanguages()); $mappings = $this->config->get('language.mappings...
0
09bb6798f6a108d109a8f7248092ae08
d6d8c89d0455b17a72475a0b0c0e1283
Returns the value of field is_paid
@SuppressWarnings("serial") public abstract class BaseCtrctInv<M extends BaseCtrctInv<M>> extends Model<M> implements IBean public java.lang.String getIsPaid() { return getStr("IS_PAID"); }
1
3089122daa50b7e47dadc875d02f4ea9
2988f6dcf6ae2ac99d91b78f1762f5dd
DB Query - Get Lots data for lots from the development (development_id)
{ $this->db->join('stages', 'stages.stage_id = lots.stage_id'); $this->db->join('precincts', 'precincts.precinct_id = stages.precinct_id'); $this->db->join('lot_icons', 'lot_icons.development_id = precincts.development_id', 'left'); $this->db->where('lots.status !=', 'Hidden'); $this->db->where('stage...
1
e5ea5c35f5c5a25099ed28b75bfadf47
16be6efc626c31f187ef1a1654feb117
Gets a max point depending on the direction.
namespace Engine public readonly Vector3 GetMaxPoint() { return Vector3.Max(Point1, Vector3.Max(Point2, Point3)); }
0
1ae467773d81abc88e54e7367805f2f4
b320d7bf3b9af014cb78cbb317c4936e
Join and and weld meshes within some precision distance.
namespace gs public class TopoOffset2d protected int JoinInTolerance_Parallel_Cache(DGraph2 graph, double fMergeDist) { double mergeSqr = fMergeDist * fMergeDist; int NV = graph.MaxVertexID; if (collapse_cache.size < NV) collapse_cache.resize(NV); ...
1
39f3f7c7259a7fa5678c4cc4027232a1
f8f12a9333cad8c03c1941a3a2e15d58
Allows this field object to keep track of details about its declaration on the owning document class.
public class FieldInfo implements PropertyHolder public ClassInfo getDeclaringClassInfo() { return _declaringClassInfo; }
1
68a19b9af4ec32eb99151c9ccd1ab1e1
9acb209dc2872d1c3f14408fdd1df2e3
remove all Entities from the world
public class EntityManager : MonoBehaviour public void Wipe() { Entity_iterator.Wipe(); }
1
591a51105c1ff26b8de2cb912f014b0c
594c12e92fcd2255787b2c7022cd673b
Restrict to memberships of users that are in an organization accessible to the authenticated user.
class VikundiAdmin(admin.ModelAdmin): def queryset(self, request): qs = super(VikundiAdmin, self).queryset(request) if not request.user.is_superuser: qs = qs.filter(org = request.user.organization_set.get()) return qs.exclude(group_type = 'mine')
1
0254de57f5637c8d1f15f20539b5dedd
477357276b8d0f49cb377cf3bc2eeecb
Pasa un string a entero. No verifica que el String contenga solo números
{ double numero = 0; double.TryParse(numeroString, out numero); return numero; }
0
f8a9149c96955067727e32ebdf200f6c
441badb8c9fb4f75b611da2061b5c193
带单选框的Dialog
public class DialogHelp public static AlertDialog.Builder getSingleChoiceDialog(Context context, String title, String[] arrays, int selectIndex, DialogInterface.OnClickListener onClickListener) { AlertDialog.Builder builder = getDialog(context); builder.setSingleChoiceItems(arrays, selectIndex, onClickL...
1
b5cc510aa8b61ed9dbae5729cfb73036
f9906e997a1795318fcc94ae8cc27d66
Gets the sample containing all the information needed for training and testing tasks.
SamplingDefinition getSample();
1
7bef3fa60b788ecabc6732ebf79dcb4b
e87a831fb5d25a4e7db5cc33c6acc655
Uses Grover's quantum search to find the single answer to a problem with high probability.
vec_len = vector.shape[0] vec_size = int(log2(vec_len)) prob_array = abs(vector) prob_array = multiply(prob_array, prob_array) prob_array = prob_array.reshape([vec_len]).numpy() samples = random.choice(range(vec_len), shots, p=prob_array) count_samples = Counter(samples) bit_freq = {} ...
0
05d926e58f4f97171dea5f84444c60da
f2c8652065c33f2a8f9077c6e3b1d9b1
Returns the writer for {@link StateMetaInfoSnapshot}.
public class DeltaWriterBucket<IN> DeltaWriterBucketState snapshotState(String appId) { return new DeltaWriterBucketState(bucketId, bucketPath, appId); }
0
de69e75020a852795c180bd09387cea3
5c00eae3d3027dc921c49fa6326bc2ea
saves the user's latest presence, to be used to show green, orange or grey blob
for (i = 0; i < gameData.games.length; i++) { if (gameData.games[i].name === name) { img = gameData.games[i].img; break; } } rpc.updatePresence({ details: name, state: desc, largeImageKey: img, largeImageText: name }); }
0
9ec7496c8288162f90822367ee3b432c
28bb9a5123bcbfdb373d65d6171bd58c
metodo para cadastrar Produtos no banco local
namespace GerenciadorDeEstoque.Modelo public class Controle public string CadastrarProdutos(string nome, string cor, string preco, string quantidade, string tamanho, string preco_custo, string custo_marketplace) { LoginDaoComandos loginDao = new LoginDaoComandos(); this.mensagem = l...
1
316f53c9e8d9493500e607d65c9f5188
f1ddac132b721bcffa3740250087cc6b
Function Name: selectProductFromPLPWithIndex Objective: To select a product from the PLP using index Created On: 07/01/2015 Created By: Arka Dasgupta Automation Team Last Modified On: 02/13/2018 Last Modified By: Arka Dasgupta
{ $query = 'SELECT id, product_name, amount FROM ' . $this->table . ' WHERE index_number = :index_number'; $stmt = $this->conn->prepare($query); $this->index_number = htmlspecialchars(strip_tags($this->index_number)); $stmt->BindParam(':index_number', $this->index_number); if...
1
78cc896be5cc0105463363e604102777
01f56f48f00d41b3245cc4c9a994f2e4
Return the map which has gathered all cq event operations since the last resetGatherMap call.
class Object extends CComponent public function getMapReduce($reset = false) { return $this->client->getMapReduce($reset); }
0
623ebfdccfbe05b6a04547c0f2f52370
c1986b2da3092457238560c34342712e
Log out of the AlertMe servers.
q = 'logout' self.write_line(q) response = self.__get_response() while response[0] < 200: response = self.__get_response() if response[0] >= 400: raise error, (response[0], response[3]) self.alias = None
1
878df3666ce50d6b4c00fee68007438a
7a354585d5a71f932e238847817a22c1
Retrieves a string containing the data_type identifier
class Message_Data public function getDataTypeName() { return $this->_dataTypeName; }
1
d74d336072901c73a08ab7d28c82c6af
1a47076d0b20900c035542987c8a9427
插入一个左子节点,我们首先获取对应于当前左子节点的列表(可能是空的)。然后,我们添加新的左子节点,将原来的左子节点作为新节点的左子节点。这使我们能够将新节点插入到树中的任何位置。
class TreeNode(object): def insert_left_child(self, new_left_child): new_left_child._node_type = 1 if self.has_left_child(): self.left_child().clear_descendant() del self._left_child self._left_child = None self._left_child = new_left_child self.update...
0
f4419ccb11d9566b3f194a8b2fced906
c04c0717c7ac2f7e826a80cce3d19955
give player warning when there's low air
namespace ProjectXenocide.Model.Geoscape.Vehicles void OnFuelLow();
0
1550f94a35e5dbbd0ba7dd16ad08abc2
9ea774c87c66ceaf8fef1d18b7a5c79d
Get a map of all RT-STPS nodes.
class HpSum: def getAllNodes(self, refresh = True): if (not refresh) and hasattr(self, 'nodes'): return self.nodes relurl = '/Session/' + self.session +'/node/index' self.nodes = {} r = requests.get("https://%s%s" % (self.baseurl, relurl), verify = False, ...
1
0cde11870a657ceab2c70c5a0c754bad
c098a2adaf6717a511883407282137f6
オペランドフェッチ(A)
static void OpAAX0 (struct SRegisters * reg, struct SICPU * icpu, struct SCPUState * cpu) { #ifdef VAR_CYCLES cpu->Cycles += ONE_CYCLE; #endif reg->X.W = reg->A.W; SETZN16 (reg->X.W); }
0
a5a4a93454206f5f8e851e8d35b93398
9dc55c1a6ed4f823282955dabe727a63
Check for da btree operation errors. See the section about handling operational errors in common.c.
{ if (errno==ENOENT) show_err_on_both(E_FILENOTFOUND,(void *) filename,CHAR_TYPE); else if (errno==EACCES) show_err_on_both(E_NORIGHTS,(void *) filename,CHAR_TYPE); else if (errno==EMFILE) show_err_on_both(E_TOOMANYFILES,(void *) filename,CHAR_TYPE); else if (errno==EDQUOT) show_err_...
0
cbb387e71d2ad7cf79eecbc353b6da52
bbbf1da4ede37d6dd1faa1242ff1b7f4
保存重置数据
final SettingMotionDialog loadingDialog = SettingMotionDialog.getInstance(); loadingDialog.showLoadingDialog(AppManager.getInstance().getCurrentActivity(), "配置保存中,请稍后..."); InitDevices.getInstence().ResetDevices(variablesMap, new InitDevices.SaveSettingInfoFinishCallBack() { @Overrid...
1
d0b8ddb5ffccf3dd1e58a765e15756ea
cda9058d2cb3e57738bf9f1e09b576ed
检查消费金币的频率,不能一个用户同一秒执行同类操作超过1次
class AccountService{ public static function checkUserSendCodeFrequency($address){ $configUserSendCodeFreqLimit = ConfigService::getConfig(ConfigService::USER_SEND_CODE_FREQ); $redisKey = RedisKey::getUserSendCodeFreqKey($address); $number = Redis::get($redisKey); if(!$number){ ...
0
44d125f6aa7f0518a01d122546d437f4
e391cae0586c1ca88e9f4991ed4e0c55
Return the transform of the window in this room
class Robot(object): def getTransform(self): return self._transform
0
ab987fe857a5414a189d9e1dcef0ce74
9f0fde5276ddb28c54d31938d145fbe7
Load widgets when an core element is selected
if (element.dataset.isEditing == "false") { $(element).children(".widgetEditor").show(); element.style.backgroundColor = "rgba(0,0,0,0.4)"; element.dataset.isEditing = "true"; $LayerBetweenWallpapersAndWidgets.css("pointerEvents", "auto"); $LayerBetweenWallpapersAndWidgets.on...
0
6633d9ed3c17bf9c4f88ec4f0c10bda4
0c6e3a5574e107a90420012e6c2bd923
try to collapse and eliminate dead conditional branches
namespace osu_patch.Editors public class MethodEditor : IExplorerParent public void OptimizeBranches() => Body.OptimizeBranches();
1
baf9b393376ae9c57e09735275707008
fd17b0579b6d8a91bfdeccc6c6aab359
Utility to round up to a multiple of 16.
public class Math2 public static int UpTo16N(int num) { return (((num)+15) &~ 15); }
1
ea9658090bd78d90e5a859896a1d4538
d9ce1009150e90191eff8c8f44ebb6f8
查询User_id=5365894在20160510到20160520之间使用优惠券发生的线下购买行为
def get_action_user_feat2(start_date, end_date): def user_feat_2_2(start_date, end_date): actions = get_actions(start_date, end_date)[['user_id', 'type', 'time']] actions['time'] = actions['time'].map(lambda x: x.split(' ')[0]) visit = actions[actions['type'] == 1] visit ...
0