我正在开发一个网站,其中从嵌入按钮复制后没有显示正确的网址.
单击嵌入按钮(如下图所示),我在ifr中获取以下代码,其中src的值不正确.它应该是一个合适的视频网址.
<iframe src="//content.jwplatform.com/players/dalet_clips/35472P.mp4-88sIiZig.html" width="640" height="360" frameborder="0" scrolling="auto"></iframe>
Run Code Online (Sandbox Code Playgroud)
我在jwplatform.js中使用的代码片段是:
"sharing": {
"code": "%3Ciframe%20src%3D%22http%3A//content.jwplatform.com/players/MEDIAID-6gKQPrHW.html%22%20width%3D%22480%22%20height%3D%22270%22%20frameborder%3D%220%22%20scrolling%3D%22auto%22%3E%3C/iframe%3E",
"link": "http://content.jwplatform.com/previews/MEDIAID-6gKQPrHW"
},
Run Code Online (Sandbox Code Playgroud)
问题陈述:
在iframe src里面,我得到以下//content.jwplatform.com/players/dalet_clips/35472P.mp4-88sIiZig.html不正确的代码.它应该是视频的正确网址.我想知道我需要做哪些更改,以便在iframe src中获得完整的视频网址.
的java.nio.ByteBuffer类有一个ByteBuffer.array()方法,然而,这将返回一个数组,它是该缓冲区的容量的大小,而不是使用容量。因此,我遇到了一些问题。
我有一个 ByteBuffer,我将其分配为某个大小,然后我将数据插入其中。
ByteBuffer oldBuffer = ByteBuffer.allocate(SIZE);
addHeader(oldBuffer, pendingItems);
newBuffer.flip();
oldBuffer.put(newBuffer);
// as of now I am sending everything from oldBuffer
send(address, oldBuffer.array());
Run Code Online (Sandbox Code Playgroud)
我怎么能只发送oldBuffer. 有没有一种班轮可以做到这一点?
我正在处理如下所示的php代码,其中具有air_date,当从UI选择不同时区时,我想更改它。
邮递区号:
$cols = array(
'e.description_' . $opp_lang . ' as translation',
's.air_date', // This is the entry point of air_date and its been used everywhere.
'e.program_id',
);
Run Code Online (Sandbox Code Playgroud)
我用于时区的逻辑:
function tz_translations( $lang = 'en' ) {
$tz_translations = [
'en' => [
'PST' => [
'label' => 'PT',
'diff' => 'subtract 3 hours',
],
'EST' => [
'label' => 'ET',
'diff' => 'subtract 0 hours',
],
],
'fr' => [
'HNP' => [
'label' => 'HP', …Run Code Online (Sandbox Code Playgroud) 我在角度组件中有一个侧导航栏,它在类似于此的点击上展开.用于创建导航栏的HTML代码段为:
HTML:
正如名称(openNav())所示,以下HTML代码将展开导航栏:
<div>
<img (click)="openNav()" src="/imagepath" id="image">
</div>
Run Code Online (Sandbox Code Playgroud)
以下HTML代码 将关闭导航栏:
<div id="mySidenav" class="sidenav">
<ul class="navbar-nav mr-auto" id="sidenavContent">
<li class="nav-item" id="close-btn">
<img class="closebtn" (click)="closeNav()" id="white-cross" src="/assets/imagepath">
</li>
<li class="nav-item" id="close-btn">
<p> Item 1 </p>
</li>
<li class="nav-item">
<p> Item 2 </p>
</li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
打字稿:
使用的打字稿是:
openNav()
{
$("#mySidenav").css("width", "50%"); // Line A
}
closeNav()
{
$("#mySidenav").css("width", "0%"); // Line B
}
Run Code Online (Sandbox Code Playgroud)
上述打字稿代码不包含在ngOnInit()函数中.
问题陈述 :
当我做ng serve我的命令提示符下,我收到以下错误:
错误TS2304:找不到名称'$'.
的 …
我正在研究html电子邮件,其中我使用html和内联样式复制了一个设计.
在展望中,我看到以下设计:
设计小提琴:
附件是我提到我所有的html和内联样式的小提琴.在小提琴中,与上面的设计(Outlook)相比,我得到了不同的设计.
问题陈述:
我想知道我应该在小提琴的内联样式中做些什么改变,这样小提琴中的设计和上面的截图(outlook)看起来都是一样的.
文本下方的空间在前景截图中,与小提琴中的设计相比,获取金钱的步骤太多了.我在该部分中使用的代码片段是:
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="padding-left:15%;padding-bottom:25%;">
<tr>
<td>
<h2 style="text-align: left;
padding-left: 19%;
color: #484848;
padding-top: 2.5%;
padding-bottom: 5%;
padding-right: 12%;">steps to earn your money:</h2>
</td>
</tr>
<tr style="text-align:left;color:#484848;font-size:20px;">
<td>
1. click here to open the XYZ app to the posting requests page<br><br>
2. click on availability check request<br><br>
3. say yes, its availabile ot suggest another date it is<br><br>
4. wait the …Run Code Online (Sandbox Code Playgroud) 我正在解决以下问题:
在有人的房间里,如果他们是直接或间接的朋友,我们将定义两个人是朋友.如果A是B的朋友,B是C的朋友,那么A也是C的朋友.一群朋友是这群人中任何两个人都是朋友的一群人.给出直接朋友的人名单,找到最小的朋友群.
示例:输入:
1<->6
2<->7
3<->8
4<->9
2<->6
3<->5
Run Code Online (Sandbox Code Playgroud)
团体:
1-6-2-7
3-8-5
4-9
Run Code Online (Sandbox Code Playgroud)
最小组中的人数是2,即4-9,所以我们应该返回2.
我想出了下面的代码,但我现在不明白如何使用这个holder地图来获得所需的输出.我在这里有点困惑.解决这个问题的最佳方法是什么?
private static int findGroups(final List<List<Integer>> inputs) {
if (inputs == null || inputs.isEmpty()) {
return 0;
}
int count = Integer.MAX_VALUE;
Map<Integer, List<Integer>> holder = new HashMap<>();
for (List<Integer> input : inputs) {
// storing it in bidirectional way in the map
List<Integer> l =
holder.containsKey(input.get(0)) ? holder.get(input.get(0)) : new ArrayList<Integer>();
l.add(input.get(1));
holder.put(input.get(0), l);
List<Integer> l1 =
holder.containsKey(input.get(1)) ? holder.get(input.get(1)) : new ArrayList<Integer>(); …Run Code Online (Sandbox Code Playgroud) 我正在处理如下所示的 php 代码:
class MyDB extends SQLite3
{
function __construct()
{
$this->open('database/Podcast.db');
}
}
$db = new MyDB();
$f = $mp4_files[$_POST['id']];
$parts = pathinfo($f);
switch ($parts['extension']) {
/* Conversion of mp4 into mp3 is happening */
}
print_r($f); // Line Z
$result = $db->exec("UPDATE Podcast_Export SET Status = 'Completed' WHERE House_number = '" . $f . "'"); // Line A
if ($result == FALSE) {
echo "Error in fetch " . $db->lastErrorMsg(); // Line M
}
Run Code Online (Sandbox Code Playgroud)
在 Line Z,在控制台上打印 …
我有一个如下所示的php代码,我想在一周的两个日历日之间显示任何内容。
的值来内$data->{"select_start_day"}; $data->{"start_time"}; $data->{"select_end_day"};并且$data->{"end_time"};由用户控制的。
PHP代码:
if (file_exists('feeds/ptp-ess_landing.json')) {
$data = json_decode(file_get_contents('feeds/ptp-ess_landing.json'));
}
date_default_timezone_set('America/Toronto');
$arradate = strtolower(date('D'));
$nowtime = (int)date('His');
$start_day=$data->{"select_start_day"};
$start_time=$data->{"start_time"};
$end_day=$data->{"select_end_day"};
$end_time=$data->{"end_time"};
Run Code Online (Sandbox Code Playgroud)
例如,让我们假设用户输入$start_day的sun
$start_time是143400 $end_day作为wed $end_time作为140000
以上持续时间表示我们处于范围内,并且应该显示我们要显示的任何内容,直到明天下午2点为止。我在美国东部时间。
我正在使用以下代码以获取星期几和时间的当前日期:
date_default_timezone_set('America/Toronto');
$arradate = strtolower(date('D'));
$nowtime = (int)date('His');
Run Code Online (Sandbox Code Playgroud)
问题陈述:
我想知道如果我需要使用逻辑,以便它打印任何内容Sunday 143400和Wednesday 140000。
if() {
echo "Its in range";
}
Run Code Online (Sandbox Code Playgroud)
情况:
如果该替代适用于从上午8点的星期一到下午6 点的星期一,而今天是星期三,则该替代不适用。
如果它是星期一下午6点和 …
我正在尝试通过 Gitkraken 从 Beanstalk 克隆存储库,但由于某些原因,我收到以下错误:
“无法解析支持的身份验证方案。操作标识符无效。”
我克隆存储库的方式是访问 Gitkraken 并按照以下步骤操作:
文件 -> 克隆存储库
克隆
最后,当我单击克隆存储库时。
我收到以下错误,如图所示:
我有一个形式如下所示,其中我希望用户输入在输入框中的URL从开始的http://或HTTPS://与一个周期为之后存在子域。如果用户不这样做,它应该说“请匹配请求的格式”。
这是我尝试过的。以下代码仅来自 https 而不是 http。
<label for="url">Enter an https:// URL:</label>
<input type="url" name="url" id="url" placeholder="https://example.com" pattern="https://.*" size="30" required> <!-- Line A -->
Run Code Online (Sandbox Code Playgroud)
我想要的模式是:
在前两种情况下,用户没有在输入框中输入www,在后两种情况下用户输入www在上述四个网址中,它在子域后至少有一个句点,并且从http或https开始。
简而言之,当用户在输入框中输入 url时,我希望满足以下 2 个要求。
问题陈述:
我想知道我应该对上面 A 行的模式进行哪些更改才能满足我的要求。
html ×5
php ×3
java ×2
javascript ×2
algorithm ×1
and-operator ×1
angular5 ×1
arrays ×1
bytebuffer ×1
clone ×1
css ×1
date ×1
embed ×1
git ×1
gitkraken ×1
guava ×1
hashmap ×1
html-email ×1
html-table ×1
if-statement ×1
iframe ×1
jquery ×1
jwplayer ×1
nio ×1
outlook ×1
regex ×1
sql ×1
sqlite ×1
time ×1
timezone ×1
typescript ×1
validation ×1
wordpress ×1