query_id
string
corpus_id
string
query
string
code
string
label
int64
b725917f514a5be69ea29a3b9f909a68
8b99265b1b5aa3613a851b52fc3c6bb7
Convert from linear to sRGB color space. Source: Cycles addon implementation, node_color.h.
namespace spectrum_ns vec3 xyz_to_linear_rgb(const vec3& xyz) { static constexpr mat3 M = {{ 3.2406, -1.5372, -0.4986, -0.9689, 1.8758, 0.0415, 0.0557, -0.2040, 1.0570, }}; return mul(M, xyz); }
0
8a28686298b3f486f99f41b9d8ccb025
330c57d763a10c4cf1db7c7ed968d51a
Checks that applying the reverse old_to_new mapping to the new events returns the old events. old_to_new_a ^-1 ○ old_to_new_a (old) = old
public void testEventChangesGFunctionDefinitionReverse() { double maxCheck = 5; double tolerance = 1e-6; double t1 = -11, t2 = -19; List<Event> events = new ArrayList<>(); boolean[] swap = new boolean[1]; ContinuousDetector detectorA = new ContinuousDetector(t1) ...
0
595afc0741e724c226e4139a97b1d10c
4f96e7a8755ec742bfc07577124bd5ba
check, if it's ST3
int find_start_code3 (unsigned char *data) { if(data[0]!=0 || data[1]!=0 || data[2] !=0 || data[3] !=1) return 0; else return 1; }
1
21017cab0ccd77bdd3dd5fe56b74db2b
c36198fa877e6b098601f21f50fdf710
Set the default quote character.
public class YamlConfig static public class WriteConfig public void setQuoteChar (Quote quote) { this.quote = quote; }
1
ed19d85c0f2920652ae5121f06663cfa
5a3cce5cd38008f0fdfcf5228e710a48
Metodo que cambia el nombre de la tabla actualmente seleccionada por el especificado.
if(!$this->isUnsavedEntity()) { if($tableName != $this->databaseTableName) { $em = $this->_getKernel()->getContainer()->get("doctrine")->getManager(); $sm = $em->getConnection()->getSchemaManager(); $sm->renameTable($this->databaseTableName,$tableName); } } $this->databaseTableName = $tableName;...
1
e4decb9ff5c970c932456b03196c9ed3
24b8a1e1b5ce0627946b4b0828155c91
# take the meteorological seasonal average of a field
spc_ave <- function(spc, by = "SampleID") { spc_df_melt <- spc_melt(spc) out <- NULL if (by == "SampleID") { out <- group_by(spc_df_melt, FieldID, SampleDate, PlotID, SampleID, wl) } else if (by == "PlotID") { out <- group_by(spc_df_melt, FieldID, SampleDate, PlotID, wl) } else if (by == "Treatment") ...
0
0edd1b320a4343f97bf9e9439e9911d4
b9725a1feec8b21af463ad87f44e187d
Retorna a distancia do item na posicao P
int item_hchegada(ITEM* i){ if(i != NULL){ return i->hchegada; } return ERRO; }
0
4060cc1206db67dd5a1de5426cbbd358
bd6085a45f8720d8be600bf7d18b0a98
Uses the content root folder (usually the project root) instead of the wwwroot.
public class Startup public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { app.UseFileServer(new FileServerOptions() { FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")) }); }
0
76bc8eb24af138b60e8657db6b28e876
cd107cc8a3fd70fdb86897bedc29efc0
get all the entities for a location
try { $qb = $this->_em->createQueryBuilder(); $qb->select(array(' e, o, p, pv, partial ci.{id, name}, partial cc.{id, name}, partial c.{id, fullName, shortName}')); $qb->from('Location\Entity\Location','e'); $qb->left...
1
41586fd46217795dc4131f2596a4f8e7
1c67670fe3cc82e105e6bf4f9c14e40b
Returns true if a 'iCCP' chunk will be output.
public abstract class mxPngEncodeParam public boolean isICCProfileDataSet() { return ICCProfileDataSet; }
1
91befc0c0cdd0d95efe1782194e8e46c
28c6d0e5158bcf5245ebdef65c84715a
=========================================================================== This function will send an APDU to the UICC. None This function is limited to the use of UICC ie. (technologies of type UICC only). RETURN VALUE: within appropriate ranges. SIDE EFFECTS: None ====================================================...
class INFCTools(object): def exchange_apdu(self, protocol_type, bitrate, data_size, apdu_case, loop): raise TestEquipmentException(TestEquipmentException.FEATURE_NOT_IMPLEMENTED)
0
894770a30eed3187ccc7cae0ec85d312
3e0ede9bd09dfc17df8b3c6947d081c2
Display a listing of the Agente.
class AgentsController extends Controller public function index(Request $request) { $agents = Agents::orderBy('id','DESC')->where('statut',0)->paginate(10); return view('agents.index',compact('agents'))->with('i', ($request->input('page', 1) - 1) * 10); }
1
28cc89a46bc617aa0df3d6638d037dbf
375d28a47a4abfe2f672b1bd379c662f
フォームを閉じる際の確認
namespace Encrypter public partial class MainForm : Form private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { if (_isModified) { if (!SaveConfirm()) { e.Cancel = true; } } }
1
728030193815d4b558b691afa9660311
dc21778d3bdb505b59737fc3adc512cc
calculates 3rd Neighbor correlation values
int calc_2dir_nise_Sp(GNCOMP ***psi_a, GNCOMP ***psi_b1, GNCOMP ***psi_b12, POL_info *pol_info, traj_param *traj_param, GNREAL popfac1Q, GNREAL popfac2Q, int tau1, int tau2, int tau3, int xfr1, int xfr2, int xfr3, int window, GNCOMP **REPH, GNCOMP **NREPH, spec_param *spec_param, int nthreads) { calc_R3_iiii_Sp(psi_a...
1
48e8bae2f0f7b964aa411994f8b0b91f
44abca85689c38f0f7deb3d665b506cd
Get data from input csv files.
def get_data(folder): v_t = zero_to_nan(import_data(folder + 'v_t.csv')) beta = zero_to_nan(import_data(folder + 'beta.csv')) heel = zero_to_nan(import_data(folder + 'heel.csv')) speed = zero_to_nan(import_data(folder + 'speed.csv')) return v_t, beta, heel, speed
1
a74b57c9e082063a7995a192c739c767
1493b3c9bbca822556a83e65f5734af4
Ziskanie poctu transakcii, v ktorých figuru zadaná adresa.
namespace Hope.Utils.Ethereum public class TransactionUtils public static EthCallPromise<BigInteger> GetAddressTransactionCount(string address) { EthCallPromise<BigInteger> promise = new EthCallPromise<BigInteger>(); _GetAddressTransactionCount(address, promise).StartCoroutine(); ...
1
b93ed3ae5ce7d85c005edd453f857e5f
196ab2eb8ef156769d5ed0ac40ee60cd
根据订单号获取在redis中的订单
@Service public class SeckillOrderServiceImpl implements SeckillOrderService @Override public TbSeckillOrder searchSeckillOrderFromRedis(String userId) { return (TbSeckillOrder) redisTemplate.boundHashOps("seckillOrder").get(userId); }
0
bff2a7d136426a2cc48ef6d20a6f1895
9cf3f5d4d86b3a33a9d4085711338d02
Returns the next coordinate from the queue containing pixels which were changed by other players.
def get_next_color() -> Tuple[int, int, int]: color_req = COLOR_QUEUE.pop(0) COLOR_QUEUE.append(color_req) return color_req
0
c0c9e9ba0189111e2883367ffbd9ab49
ebb4c95cf5ff7e6cc11633b68f550695
crea un nuevo usuario inactivo desde invitacion y lo retorna
class RegistrationManager(models.Manager): def create_inactive_user(self, username, password, email, send_email=True): new_user = User.objects.create_user(username, email, password) new_user.is_active = False new_user.save() salt = sha.new(str(random.random())).hexdigest()[:5] ac...
1
3ac69d13f24ef638b53d6a3cfd53f250
a6b773837c532dac10afd97fd06f226b
获取产品URL地址、产品名称
strSQL = "SELECT strProductUrl FROM klook_product WHERE isGot=1" lstRowData = self.db.fetchallSQL(strSQL=strSQL) lstStrProductUrl = [] for rowData in lstRowData: lstStrProductUrl.append(rowData["strProductUrl"]) return lstStrProductUrl
0
f623dd31379ead58d8e3aa53407c0d51
eb44f268fae4134a1796146054b32f91
创建发布单-pm2发布模式
aStr = "" if a == None: return MSG_FAIL if isinstance(a,str): aStr = a elif isinstance(a,list): aStr = "".join(str(x) for x in a) try: if aStr.find('+') > -1: print aStr return MSG_OK elif aStr.index('npm adduser') > -1: ...
0
6daec7254f1a1b143f6b2968bdc66a71
95a4492dae63b371260d6e38e1dd2287
将身份证号码的第4位到第16位替换成* ,身份证号必须18位
String s1 = idNumber.substring(0,3); String s2 = idNumber.substring(idNumber.length()-4,idNumber.length()); String[]ss1 = idNumber.split(s1); for(int i=0;i<ss1.length;i++){ Log.i("wzh",""+i+": "+ss1[i]); } String[]ss = ss1[1].split(s2); idNumber = s1+s...
0
bb3623b114572fdea4f2fc8d65ab6c2c
dc3afe88d2f8f87d0bbc1bd291922967
Generate a single buy signal for each symbol.
class Strategy(): def generate_signals(self): raise NotImplementedError("Should implement generate_signals()!")
0
72505095a688f7348eebdb845dae1539
446c8ff416a495a0416b92dfd70f6d06
从指定的excel文件中获取步骤操作列表
throws InvalidFormatException, IOException { Map<String, ArrayList<String>> testcaselist = new HashMap<String, ArrayList<String>>(); File file = new File(filePath); try { OPCPackage opcPackage = OPCPackage.open(file); XSSFWorkbook xssfWorkbook = new XSSFWorkbo...
1
e6d18d7fa76f51aa6837cad2f99288ca
2c32b304e9845d8f89c1324d6e0c9f30
Устанавливает права группы.
$name = $this->db->safesql($name); $perm = $this->db->safesql($perm); $this->db->query("UPDATE `" . PREFIX . "_admin_sections` set allow_groups = '$perm' where name = '$name'"); }
1
9ede8c46cc4dc792abeb4a5c0b6fd76f
46184add40bc58478ddfaad6d0a4340c
Tests the getAccountBalance function
func TestShowBalance(t *testing.T) { num := 1 balanceexpected := 100.0 balance := ShowBalance(num) if balanceexpected == balance { log.Printf("TestShow Passed") } else { log.Fatal("TestShowBalance failed. Balance Expected:", balanceexpected, " Actual Balance:", balance) } }
0
4a28e7eaae58b35bdf6f4dea94a2cc0a
b2a3b9971c6437faa68e9922e69adc36
Saves a record mode
{ try { SaveVertical(e, Constants.CONST_NEW_MODE); } catch (Exception ex) { CommonFunctions.WriteErrorLog(ex); } }
1
44347a3311aea0bf39937508f475643a
5c7e07ecd3feeabe4bdecca5d37c44a0
GET: RastreadorDePosicaoDoMouse
namespace WeDeliver.App.UI.WebApp.Controllers public class RastreiosController : Controller public async Task<IActionResult> Details(Guid id) { if (id == null) { return NotFound(); } var rastreio = await _appService.GetRastreioAsync(id); ...
0
f1135acce3ad777cb44155e1d2b1dfac
32630166ba92b0c79100f68c7d3c4441
Adds the specified facts into the internal collection by serializing these using DataContractSerializer.
{ Guard.ArgumentNotNull(facts, "facts"); foreach (object fact in facts) { var dcAttribute = FrameworkUtility.GetDeclarativeAttribute<DataContractAttribute>(fact); if (dcAttribute != null) { DataContractSerial...
1
ba479135e1e306334a3438481021b6bc
e28f815be380f661e304112e2b3f9f17
Gets the amount of child elements by their type.
{ final NodeList childNodes = parent.getChildNodes(); int count = 0; for (int i = 0; i < childNodes.getLength(); i++) { final Node item = childNodes.item(i); if (item instanceof Element && name.equals(((Element) item).getTagName())) { ...
1
c472ee40687d8bbc78091b931acbd28f
d78295f96d426d4319f919b025023930
Tries the connection by sending a http POST request.
throws SocketTimeoutException { return sendPostRequest(httpEntity, url, encoding, SOCKET_TIMEOUT, CONNECTION_TIMEOUT); }
1
d2d1a8d198bd6d169abc4a7f30fca379
e010a23e9a091ae1b3335ad08d6a2e80
显示标段信息
public partial class KC_AppMain_HTBAPrjlist : System.Web.UI.Page private void showInfo() { showToDo(); }
0
74d2b0d75815daf7c999f0740c5f6a60
61b0c1afa8f1d4643180fdde445149eb
<p>Creates and shows a blocking warning window.</p>
{ final JDialog warning = new JDialog(this, "Warning", true); JButton ok = new JButton("OK"); warning.getContentPane().add(new JLabel(warn), BorderLayout.CENTER); warning.getContentPane().add(ok, BorderLayout.SOUTH); ok.addActionListener(new ActionListener() ...
1
404d2f74d4f05ac49045340f4fc011e1
1dc79749c9b72427865bfe3fc400751d
刻子または順子を一組探す。 見つかったら格納してtrueを返す、見つからなかったらfalseを返す
{ if (bySuit > 3) { bHonorTile = true; } if (byaSuitTileNum[0] == 0) { return true; } byte byValue = 0; for (byValue = 1; byValue < 10; byValue++) { if (bya...
1
6cf583eeee12f0c6096eea202e59481e
5af6de9c0a18092f934760f92e3cf4df
The initialization of Input Manager Singleton.
namespace Asteroids public class InputManager : MonoBehaviour void Awake() { if (Instance != null) { DestroyImmediate(gameObject); return; } #if UNITY_ANDROID Instance = gameObject.AddComponent<MobileInputManager>(); #endif #if ...
1
96eb0eae601e0124bb7534882852836d
06f03d84006509ebb78658f160799532
Show entry cover widget in the entry editor
class Events extends BaseObject public static function onWallEntryLinksInit($event) { $event->sender->addWidget(widgets\BookmarkLink::class, ['object' => $event->sender->object], ['sortOrder' => ConfigForm::instantiate()->sortOrder]); }
0
cc3c60a484e4049a3a5fbc1fdc50799e
dbaaff0fcab152bb0e977748658ee145
保存/修改一级类目
AjaxResult saveCategoryOne(CategoryOne categoryOne);
1
44eb9b0f320b93bb49e9e4b91c8c799e
127ea7b6551df7ae0b9f6474d96b0204
Test the A and S matrices for the BTC construct.
mAB = np.diag(sAB) mBA = np.diag(sBA) tensors = [np.diag(sBA**2), A, A.conj(), mAB, mAB, B, B.conj(), np.diag(sBA**2)] connects = [[3, 4], [3, -3, 1], [4, -1, 2], [1, 7], [2, 8], [7, -4, 5], [8, -2, 6], [5, 6]] rhoAB = ncon(tensors, connects) tensors = [np.diag(sAB**2), B, B.conj(...
0
a477545433ff441881f1fb93dda54cd0
ba8d710acd6dd225ff55663996937b1d
查询近7天消费阅票累计
@Service("tAlyInfoFacade") public class TAlyInfoFacadeImpl implements TAlyInfoFacade public List<Map<String, String>> searchSevenDayCount(Map<String, String> map){ return tAlyInfoBiz.searchSevenDayCount(map); }
1
522733a9b48c09d417628d68ea1ec54e
fb8e9f4b8032f61983e8e466249570d1
Liefert den Lokalisierten Textwert eines enum-Members.
namespace IChiba.Services.Localization public static class LocalizationExtentions public static string GetLocalizedEnum<T>(this T enumValue, ILocalizationService localizationService, IWorkContext workContext) where T : struct { var languageId = workContext.LanguageId; ret...
1
a11ac802455fb425a5ef15153211a4f5
11cf05fa8c1fbc80e3286490ef5f5836
ゼロ行列
class matrix{ matrix() : mdata_(0), rows_(0), columns_(0) {}
0
26309032f81055417c9efd50e5aebc25
b815bb17242e676fdaab357e92ad8b77
Return the path to the given script, or None if not found.
class ShimPackage(object): def package_shim_script(self, step): for pdir in self.psd: maybe = os.path.join(pdir, step) if os.path.exists(maybe): return maybe return None
1
b447e7b071d50718396f717855008f96
322a753bfc5f373531a6276625f72850
添加Header,当数据已经存在,则不再添加
{ if ($this->checkFlowControl()) { return $this; } $this->arrHeader = array_merge($this->arrHeader, $arrHeader); return $this; }
0
70ac97053645f5da0974154d72d5b42d
330e55ad130533a708c73e13cbf29ed6
Checks if jump target has been analysed before.
namespace Stebs.ViewModel public class ProcessorViewModel : ViewModelBase private bool IsJump(MPMEntry.CRIT crit) { return crit != 0; }
0
18b864643679aacd3c6c26e5d68e4868
1b53b516946af04ea34e32ea9231e7b6
商品spu删除
@Override public Result<JSONObject> deleteGoods(Integer spuId) { spuMapper.deleteByPrimaryKey(spuId); spuDetailMapper.deleteByPrimaryKey(spuId); this.deleteSkusAndStock(spuId); return setResultSuccess(); }
1
b86c0c4e7ede7eaa0e1c52840954d419
2b259f591530d69c5df110c8b81ee337
设置当前的phoneType
public class MainActivity3 extends UI implements View.OnClickListener, ReminderManager.UnreadNumChangedCallback public void okHttpAlias(String alias) { OkHttpUtils.post() .url(Constants.baseUrl + "userapp/updatePhoneType") .addParams("mobile", (String) GetUserInfo.getData(this, "...
1
e9e71214ac08f53f991a6cc5df3be8ee
1659570a9cae86d45a2370cd3db99daa
Find the longest path from the file system tree
function longestPath(root: Map<string, {}>) { let paths: string[] = []; for (const path of root.entries()) { if (path[1] == true) { paths.push(path[0]); } else { paths.push(path[0] + '/' + longestPath(path[1] as Map<string, {}>)); } } paths = paths.filter(path => path.includes('.')...
1
25c65efa24be91c478c601eeeb0c0d02
6eb922fc39ce5f71962795e8b401bd42
Creates and returns a {@code Task} with the details of {@code taskToEdit} edited with {@code editTaskDescriptor}.
public class DeletePersonCommand extends Command private static Meeting createEditedMeeting(Meeting meetingToEdit, EditMeetingDescriptor editMeetingDescriptor) { assert meetingToEdit != null; MeetingName updatedMeetingName = editMeetingDescriptor .getName() .orElse(meetin...
0
32c6913533884c02fae80acd2e75d427
ab6561d90086e0ec4d086ade4af3c1ff
Draws the credits strings
void Menu::creditDraw() { gl::draw(creditDisplay, Vec2f(((float)getWindowWidth()-(float)creditDisplay.getWidth())/2.0f, ((float)getWindowHeight()-(float)creditDisplay.getHeight())/3.0f)); }
1
2a4255c9f8e800fcb56e88732ca394ab
2e51736f21c19ff35b632c6b206c4649
管理者記事一覧を取得
class AdminController extends AppController public function admin_info_list() { $this->layout = "log"; $this->set("title_for_layout","管理者のお知らせ一覧 - 派遣管理システム"); $this->set("headline", '管理者のお知らせ一覧'); $name = $this->Auth->user('name_sei').' '.$this->Auth->user('name_mei'); $this->set...
1
93450c2c4f2e12fd7d6922e66a8bdf0b
98198cdf0ca10dd0b58004619bca86d9
登录普通用户,传入filter为owner=该用户包含的其中一个设备分组username,判断返回status_code和body内容
def test_login01(client,username, password, error_code,msg): client.set_bodys({"username":username, "password":password}) client.send() client.check_status_code(200) client.check_res_times_less_than(1000) client.check_json_value('error_code',error_code)
0
81a9d837cfd1a7035ad7d79b67a0845b
798181c334fbb88511cd5de0adab67a5
Return the amount of cookies gained per click.
class ClickerState: def get_total_cookies(self): return self._total_cookies
0
05a304c49584403eeb1d46a5038d3ddc
10aefac58dd84d5d10bcb6d5f7e9d4d5
通过栏目ID获取高PV文章列表
class NewsList public static function getNewsListByColumnId($column_id, $offset, $count) { $redis_obj = RedisFactory::createRedisInstance(); if (WebConfig::$cache) { $news_list = $redis_obj->lRange('news_list' . $column_id, $offset, $offset + $count - 1); } else { $news_l...
0
560bd129c9f6404fd27e1238115eb5a7
1b05ba91faedf5c4d0a76956ecf13c70
执行js代码s,并将结果保存在Object里
if (StringUtils.isOneEmpty(jsCode, jsFunctionName)) { return null; } try { if (jsEngineManager == null) { jsEngineManager = new ScriptEngineManager(); } if (jsEngine == null) { jsEngine = jsEngineManager.getEngineByN...
1
b8499a81ae1c86f2ae503e7180739b0e
cbf54c15c3b10190fd728611c631a4c2
Objective:main recursive routine for reducing the inessential signature cube. Very similar to aux_ess_test_and_reduction;
{ static unsigned maxNumInduced = 0; if (h.numInduced > maxNumInduced) { maxNumInduced = h.numInduced; std::cout << h; } for (unsigned adj : hypercube<MAX_DIM>::adjLists[lastAddition]) { if (h.vertices[adj].effectiveDegree == 1 && !h.vertices[adj].induced) { h.induce(adj); enumerate(h,adj); h.red...
1
f9857fee73caba8cb6b103b8718fc703
80cc2858625b9919ded05cac223070a1
handles hwo the tankbunnyfrits object reacts to bouncing off of horizontally positioned objects
{ if (other != null) { float topD = 0f, bottomD = 0f, leftD = 0f, rightD = 0f; if (other.VelocityY > 0f) { topD = (other.CenterY + other.Radius) - MinBound.Y; } else { ...
1
f77e636aeedb247e62638af3500cf581
cdc147bc71f7d8d2e849409991e32f22
The minimum delay between notification of readings from the feature detector. If no objects are detected, no notification will occur. Some sensors, such as touch sensors, check the sensor more frequently than other sensors, such as range sensors.
float getDelayMinInterval();
1
e9ec17d5a2300b942924085876083593
85a166cd6129ac45d6fe1a5d10771ee9
文件读取失败回调
public class FilProcessExtractorCallback implements IProcessExtractorCallback public void onError() throws Exception { __insertErrorFileText(null, GSConstFile.READ_KBN_ERROR); }
1
beba9899cd8817ef503d676c4286e362
8cf0ddd8649eddbc34550019c4a25c30
Display url of the Image/Video
[Route("api/AssistiveDevices/ShowImageUrl")] public String ShowImageUrl() { var directory = System.Configuration.ConfigurationManager.AppSettings["imageSrc"]; var outUrl = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority + "/" + d...
1
4c8f60c96c71f9297ed01da069238cb4
e48f2debc521ed744697ceb9ccd8efab
вычисление суммы всех неотрицательных элементов
{ int sum = 0; foreach(int i in array) { if(i >= 0) { sum += i; } } return sum; }
1
c991246eb854b5570f7263d9f4612a02
8b8bfac721a539787248654c50fb1dae
设置原始额度(元)
public class ApplyViewEntity extends PageBaseEntity public void setInitialAmtRatio(BigDecimal initialAmtRatio) { this.initialAmtRatio = initialAmtRatio; }
0
f522753d53b5c29164f7dd56e0608b05
be7ca5179d2df4b2ef635cd4713cfd8f
跳转到县选择页面
public ModelAndView countyData(ModelAndView mv){ mv.addObject("startDate", DateUtil.getYYYY_MM_DD()); mv.setViewName("statistics/county/countydata"); return mv; }
1
455e048e9126ac4978d870bd4e183fba
364550e45fde8b7d49f159d7e63f485e
Méthode qui met à jour les titres des fragments
public class Menu2 extends Fragment{ @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); getActivity().setTitle("Menu 2"); }
1
1c39df447ce9c4aff979dc20b7c22bbc
7bb6584bf3302475ff73fa7bb0468e79
获取房源竞价推广七天的消费和点击统计信息
$pdo = APF_DB_Factory::get_instance()->get_pdo("anjuke_slave"); $sql = "select proid,clicks_nb from ajk_proclicklog_daily where period = ? and brokerid = ?"; $stmt = $pdo->prepare($sql); $stmt->execute(array($period,$brokerid)); $result = $stmt->fetchAll(); return $result...
0
bd8e9b466158205ecd3f497e32eebc30
18fb0d1e7dfaa54c8140ba14bb629856
Adds batch dimension.
def add_channel(x) -> torch.Tensor: return x[np.newaxis, ...].contiguous()
1
9b9050f163f6c4b9b7dc24944f8df2f6
0c95a4c18990d9410a62d9daec8099c7
Посчитаем количество уровней рефералов у запрошенного пользователя.
class UserDao extends BaseDao public static function countLower($user_id) { return User::where('referee_id', $user_id)->where('level', '>', 0)->count(); }
1
16bb94e7c82e25fd4f084adafdf8fc60
808c6e4c46ce7e24cb93746fd96a1412
确认对话框层,点击确定才真正操作
{ this.topDialogGroup.visible = true; this.angelGroup.visible=true; return new Promise<boolean>(resolve => { this.yesButton.once(egret.TouchEvent.TOUCH_TAP, () => { resolve(true); this.topDialogGroup.visible = false; this.angelGroup.visible=false; }, this); this.noButton.once(egret.TouchEven...
1
b2749f1236b10cd369e75d1d3f72c067
ee09869d797dc826a42c73a0a241a421
处理TRADE_USER下的发展人信息
{ $data = [ ]; if (Tak::isPhone ( $username )) { $data = [ 'mobile' => $username ]; } else { $data = [ 'username' => $username ]; } if (! empty ( $company )) { $data = [ 'trim(company)' => $company ]; } $member = Member::findOne ( $data ); if ($member) { $resul...
0
c301486a8019ffd7e7c6693ab7a7f9e4
b638cad220a7a54acd6a2ba06c29a76a
遍历一个字符串并查看每一个码点
public class WritableInfo public static void TextIterator() throws IOException{ Text t=new Text("\u0041\u00DF\u6771\uD801\uDC00"); ByteBuffer buf=ByteBuffer.wrap(t.getBytes(),0,t.getLength()); int cp; while(buf.hasRemaining()&&(cp=Text.bytesToCodePoint(buf))!=-1){ System.out.print(Integer.toHe...
1
0c245f465f4b41f8bfc8253d2128a555
4234996e23e6fd08ce442c80be2b9d29
Returns True if a track_id exists in the download archive
if not path.exists(directory): return False if not path.exists(path.join(directory, '.track')): return False return True
0
cc68e00167dcb73d2e77ae5b783c5990
0634f1463c0e8e0104b32786faf63e6c
静态方法中this不能使用 this是不存在的 它应返回一个对象来更新state 如果返回null则不更新任何内容 此方法用于罕见的用例即state的值在任何时候都取决于props
super(props) this.state = { title: '123', name: 'hanson', bool: true } }
0
c80e3ec877ab27e98728fae4a27b154c
70260ba0b2f791ad9914a7d9bafcf765
<br>[機 能] ファイルの復旧を行う。 <br>[解 説] <br>[備 考]
public class InformationTable extends FileOperationTable public void restoreXmlFiles ( File directory_from, File directory_to ) { Vector copied_list = new Vector(); for (int i = 0 ; i < record_list.size() ; i++) { InformationRecord record = (InformationRecord)record_list.elementAt(i); File file = record.getFi...
1
9883fb12ee8ce5b289f284108c3bc906
c0910f2d3ff6300303926bc3b7acf69f
Compare缓存运行器
public class BeanCopierDemo public static void main(String[] args) throws Exception { BeanCopier beanCopier; String key = generateCacheKey(Person.class, Person.class); if (CACHE.containsKey(key)) { beanCopier = CACHE.get(key); } else { beanCopier = BeanCopier.create(Person.class, Person.class, false); ...
0
b12a0f6299eb66a5d6aad6c757a7d144
3a27503845d4a190a8ff41fc3f091b0e
True displays the artery surrounding the centerline.
class MyFrame(wx.Frame): def SegmentArm(self, frame): centerHalf = 10 center = frame[self.imgHeight/2-centerHalf:self.imgHeight/2+centerHalf, self.imgWidth/2-centerHalf:self.imgWidth/2+centerHalf] center = np.reshape(center, np.prod(center.shape)) medVal = np.median( np.resh...
1
19b4dfac281c60b0bf01b695b00c5918
af9c177c570be61366c42ce7cae762ad
## sets the inverse matrix
setInverse <- function(inverse){ invMatrix <<- inverse }
1
f58061a7a33bdbb6425d835ce5216302
3d85d602ad03a3fdc671c6a66fa72f85
Metodo que permite cambiar la base de el pseudo plano de la linea (Corrimiento/traslación de toda la linea)
{ double x = _transformationMatrix[0][3]; if (x < 100) { x++; } else { x = 0; } _transformationMatrix[0][3] = x; double y = _transformationMatrix[1][3]; if (y < 200) { y += 5; } else { y = 0; } _transformationMatrix[1][3] = y; double z = _transf...
1
e9c38b92ec77e05ae1233f9b6a575205
a77a3e4379934966074591bfa1d3b739
Sets connection failure flag
class DBAPI private function _setFailureFlag() { $this->_pdo = null; $this->_connectionStatus = false; }
1
6a0e096712f3b6df3b6709c813a64ae2
71f3b80f77dc45a8fc5d1c5b436c4135
修改关闭浏览器的开关值为False
def close_browser(*arg): global driver try: driver.quite() except Exception,e: raise e
0
aec217b3ac4eab8bda01f4cbb54dd7f9
b475d95a0b201cb4bdbc26b294931936
将临时文件夹内的文件 转移到正式路径,并返回正式路径字符串
class FileTemp public function getNormalFileArr() { $fileArr = $this->fileArr; foreach ($fileArr as $k => $v) { $point = strpos($v, $this->temp_root); $behind = str_replace($this->temp_root, '', substr($v, $point)); $front = substr($v, 0, $point); $normal...
0
c4485e7f1f2c0c6beca0da33f7c9729a
4f381e07be10e10f39e2b33bdea7d291
使用okhttp-utils请求单张图片
val request = Request.Builder().apply { url(imageUrl) }.build() okHttpClient.newCall(request).enqueue(object : Callback { override fun onFailure(call: Call?, e: IOException?) { Logger.e(e.toString()) } override fun onResponse(call: Call?, response: Res...
1
61176ff60d075790645774b8704b36b7
0299d79ac1d151ed5f0260851ea63259
Сортирует рекорды по имени игрока
void sortAthletickByName();
1
3678b9d2c5b1658d04a589df587eb7c1
4e23632fef7de9feb40bb01ae0fa450f
廠商修改出貨日期、取貨門市(統一超商B2C)
class orderController extends Controller public function updateShipmentDst(Request $request, $id) { $this->validate($request, [ 'shipment_date'=>'required', 'destination'=>'required' ]); $up_order = Order::find($id); $up_order->update($request->all()); ...
1
f6cee8639f92c0d943335f37a2904ff4
8e174ed0b2c66c5b116d456fd482b82d
GET: Minor
{ if (id == null) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } Junior junior = db.Juniors.Find(id); if (junior == null) { return HttpNotFound(); } ViewBag.ProjectID ...
0
2c0093a90181cbca15a02187fb2637ef
6923901d9cb486842f7ae27220a56331
Creates the Window menu.
class TRPreviewer(E5MainWindow): def __showWindowMenu(self): self.windowMenu.clear() self.windowMenu.addAction(self.tileAct) self.windowMenu.addAction(self.cascadeAct) self.windowMenu.addSeparator() self.preview.showWindowMenu(self.windowMenu)
1
6c836da60c225355166074aa1acddb8a
888f42aeeb1c3b59fc9f29370ebc2884
resume all 0_subtree interrupts
namespace autosar void SuspendAllInterrupts ( void ) { LOG_SUSALL_ENTER(); if ( sus_all_cnt == UINT8_INVALID ) { } else if ( sus_all_cnt == 0 ) { disable_int(); sus_all_cnt++; if ( sus_os_cnt == 0 ) { saved_callevel = callevel; callevel = TCL_NULL; } } else { sus_all_cnt++; } LOG_SUSALL_LEA...
0
73d8a28d274430f57688a6086437094b
9879809591817fa19a1c9b8f57a1da13
Testet ob mit den Daten eines LoginDataBean-Objektes ein Login durchgefuehrt werden kann.<br/> Wenn diese Methode keine Exception wirft kann davon ausgegangen werden, dass ein Login moeglich ist.
public class BeanFactory public static void checkLoginBean(LoginBean bean) { DatabaseHandler db = new DatabaseHandler(); String username = bean.getUsername(); String password = bean.getPassword(); String group = bean.getSelectedGroup(); bean.setLogin(db.loginUser( ...
1
f75dcaadee951802c353c43bc958bf96
ac67ee8dcb4a0224258a7eac67e92904
Отправка письма с фидбэком на почту автора
class CommentViewSet(viewsets.ModelViewSet): def email_about_comment(self, serializer): user = serializer.validated_data['parent'].author send_mail(subject='Comment for you :)', message=('К твоему коментарию пользователь ' f'{self.request.user.username} остав...
1
f55585c7024bebb1de2b3ce79388ffa7
88247cf4501e9168d5a9e74ac084dda6
删除旅行计划评论
void deleteById(Long travelId);
0
973bb09a7abaffca3874efdfc4385292
7158fd0ae9825e86f480da670de91ac9
通过orderId和订单状态获取数据
OrderExchange selectByOrderNoAndStatus(String orderNo);
1
f77ee7a7e6682796a41d3fcba006b422
bd5fb3021c683f0d135c20804cace576
Called when a user clicks a button to download an image via an an asynctask. The "Start Downloading" button
Log.d(TAG, "startDownload() executed"); new Thread(new Runnable() { @Override public void run() { } }).start(); }
0
c8cca1cb15dac43c0f7dfd6812f4e4e6
d30ca264fe20ab919111147d69603712
当用户选择的是自动切换城市时,如果自动定位到的城市未开放,则弹出窗口提醒用户去选择
CommonUtil.saveBooleanOfSharedPreferences(context, "CITY_ISOPEN", flag); if (!flag) { initDefaultCityInfo(); Toast_Util.showToastOnlyOne(context, "您当前所在的城市:" + localtion_city + "还未开通,默认城市为:北京", Gravity.CENTER, true); } else { initMyApplicationCityInfo(localtion_city, localtion_cityCode, localti...
1
f796615f1614bec08b25b1b10386274c
fa68cfc9cc2b8a959c7e40d7df39dcda
Returns the named container registry.
class CloudFilesHelper extends AbstractHelper protected function getContainer($name) { if (!isset($this->containers[$name])) { $this->createContainer($name); } return $this->containers[$name]; }
1
735b8e8a58fc20f7fdcd81fce7ad38ad
9b67aec3ec24cb0bcd840c768343636a
请求翅膀注灵
if not selectWing then return; end local aimWid = selectWing.wid; local msg = {}; msg.wid = selectWing.wid; msg.resid = selectWing.resid; msg.flag = WingWear.on; Network:Send(NetworkCmdType.req_wear_wing, msg); end
1
e07ca35f2c828b310a0ba002ff96cd5c
ede769ad7029a7d05dca9909a54fc3f3
r""" An implementation of DeepLIFT on graph in `Learning Important Features Through Propagating Activation Differences <https://arxiv.org/abs/1704.02685>`_.
torch.manual_seed(2) input_dim = 10 batch_size = 5000 class model(LiftedModule): def __init__(self): super(model, self).__init__() self.layer1 = nn.Linear(input_dim,6) self.layer2 = nn.Linear(6,2) self.set_graph({ 'layer1':'relu', ...
0
56109d17eba4c38c43d2d8c36184adef
4c22fc2f5d2da0c6ca8ba73daace0110
用于更新不在输入堆栈中的子块位置
{ int size = this.Size; int[] byteCode; for (int i = 0; i < size; ++i) { byteCode = this.rows[i].ByteCode; switch ((OpCode)byteCode[0]) { case OpCode.BREAK: case OpCode.FINALLY...
0
906d70455086190ef3667a9ef1db3340
523748b2d112339fcc6412b9e2b81828
Recibe una palabra que será añadida al diccionario. Si no existe, se añade al final, si existe, se busca y se aumenta su frecuencia.
if word is None: return wordDict if word in wordDict.keys(): wordDict[word] += 1 else: wordDict[word] = 1 return wordDict
1
8594ed389de379e2d1853d8738af72ed
2c975b90b112753107ad4f8e35a615e9
Test create country
{ $country = factory(Country::class)->create(); $country = Country::find($country->id); $country->name = 'Argentina'; $country->save(); $this->assertDatabaseHas($this->table, [ 'name' => $country->name, ]); }
1
1d06230118218c16ce747ff35ba98155
1116afc88ef9ae3aaa5fe73e01a3633f
Generate random interest rate evolution over time using the CIR model b and r_0 are assumed to be the annualized rates, not the short rate and the returned values are the annualized rates as well
class LiborMarketModel(InterestRateModel): def simulate(self): mean = np.zeros(self._mc_config.num_factors) cov = np.identity(self._mc_config.num_factors) increments = np.random.multivariate_normal(mean, cov, (self._timestruct.num_times, self._mc_config.num_paths)) num_rates = self._time...
0
1baa04605198bfe84f39cb56fcfcbdf9
7b4907f407a0d62c0978b124024aaaba
Verfica se o numero do cartao foi atribuido
function ccExists($cc){ global $conn; $cartao=null; $sql = "select cc from utilizador where cc='".$cc."'"; $retval = mysqli_query($conn, $sql); if(! $retval ){ die('Could not insert data: ' . mysqli_error($conn)); }else{ while($registo = mysqli_fetch_array($retval)){ $cartao = $registo['cc']; ...
1
8ee3f85c5a6089192ced1726d0e5d5f8
20179b04f5fa3accb456fc8afcf58568
Reemplaza las letras griegas por sus nombres (convierte todo a minúsculas).
name = name.lower() remove = u'áéíóúñÁÉÍÓÚÑ' change = "aeiounaeioun" for i in range(len(remove)): name = name.replace(remove[i],change[i]) return name
0