你好寻求一些帮助,
我目前有一些JavaScript代码,允许已登录的用户将图像上传到Firebase存储.我希望他们上传的图片是他们的个人资料图片,但是我似乎无法将上传的图片链接回特定用户?
它工作正常,我可以在控制台中看到上传的图像,但没有什么可以识别用户上传它的内容.
//Upload Profile Picture
//Altered code from: Firebase Youtube Channel.
//Get Elements
var uploader = document.getElementById('uploader');
var fileButton = document.getElementById('fileButton');
//Listen for file
fileButton.addEventListener('change', function(e){
//Get File
var file = e.target.files[0];
//Create a Storage Ref
var storageRef = firebase.storage().ref('profilePictures/' + file.name);
//Upload file
var task = storageRef.put(file);
var user = firebase.auth().currentUser;
//Update Progress Bar
task.on('state_changed',
function progress(snapshot){
var percentage = (snapshot.bytesTransferred / snapshot.totalBytes) *100;
uploader.value = percentage;
//if percentage = 100
//$(".overlay").hide();
},
function error(err){
},
function complete(){ …Run Code Online (Sandbox Code Playgroud) 我有一个jQuery脚本,通过一个div列表,然后它的子,并打印出来:
我注意到的一个问题是,即使两个console.log()s为彼此相邻在内$.each(),我希望看到:
标题1描述1标题2描述2标题3描述3 ...等
相反,我所看到的是:
标题1标题2标题3 ...等
描述1描述2描述3 ...等
更新了内部.find():
脚本:
$('.ghx-backlog').each(function(){
$($(this).find('div[class*=has-issues]')).each(function(index){
console.log($(this).find('.ghx-key > a').text()); //The Title
console.log($(this).find('.ghx-summary > span').text()); //The Description
});
});
Run Code Online (Sandbox Code Playgroud)
标记:
<div id="ghx-backlog" class="ghx-backlog" data-rendered="123456789">
<div class="ghx-issues js-issue-list ghx-has-issues">
<div class="js-issue js-sortable js-parent-drag ghx-issue-compact ghx-type-6" data-issue-id="1233456" data-issue-key="Title 1">
<div class="ghx-issue-content">
<div class="ghx-row">
<div class="ghx-key">
<a href="/browse/Title 1" title="Title 1" class="js-key-link">XXXXXX-##</a>
</div>
<div class="ghx-summary" title="Description 1">
<span class="ghx-inner">Description 1</span>
</div>
</div>
<div class="ghx-row">
<div …Run Code Online (Sandbox Code Playgroud) 我需要创建一个 JQL 过滤器,它使用当前日期并仅使用 FixVersion(字符串)从中减去 2 个月。
有没有一种方法可以基本上说(这是伪代码):
fixVersion = "'"+(now().month() - "2m").toString()+"_2017"
我想在元素变得可见(已加载)后立即隐藏它。
我试过使用timeout和setInterval。他们工作正常,但他们晚了几秒钟。所以首先元素加载然后它消失。但我想要它,所以它根本不出现,只是消失而不先出现。
我试图改变时间并使它更多/更少,但它没有帮助。还有其他方法吗?
我什至试图把超时和setinterval里面window.load没有工作。我还尝试使用长度检查元素何时可见,但它也很慢。
window.setInterval(function(){
jQuery("#vz").find('div').first().hide();
}, 600);
Run Code Online (Sandbox Code Playgroud) 我正在尝试删除ag-grid中的过滤器图标,同时保留过滤框
现在,我正在尝试使用纯CSS来隐藏图标,该图标在webpack中只会添加 aria-hidden="true"
我试过的CSS
* /deep/ div.ag-floating-filter-button{
display:none !important;
}
Run Code Online (Sandbox Code Playgroud)
尝试删除此图标
我要么想使用完全删除网格图标,要么想columnsAPI通过CSS找到一种方法来真正禁用该图标。
这是我的代码:
<table width="562" cellspacing="0" cellpadding="0" border="0" align="center" class="genericClass">
Some nested tags
</table>
Run Code Online (Sandbox Code Playgroud)
我的风格是:
table.genericClass a { ... }
table.genericClass p,li,div,td {}
Run Code Online (Sandbox Code Playgroud)
但是,所有的div,p以及所有列出的标签越来越以上未提及预期的样式.我的语法错了吗?
仅当集合中的值不在值集列表中时,我才尝试求和。
鉴于:
和
和
我试过了:
=SUM(SUMIF(M7:M10,"<>" & X2:X4,H7:H10))
Run Code Online (Sandbox Code Playgroud)
我应该期望看到 10,000(第 8 行),但它不断返回一个无意义的值(120,000)..我如何修改它以正确 SUMIF不在范围内。