我正在使用Boostrap 3,我有一个模式显示一些HTML内容,并且它有一个滚动条,因为所有内容都不适合视口.在这个模态中,有一个链接可以打开另一个模态.一切正常,第二个模态打开但是当我关闭它时,滚动条消失了,我无法在第一个模态上滚动(也不可能在鼠标上滚动滚轮).这是模态的代码:
<!-- First modal for creating voucher -->
<div class="modal fade" id="createVoucherModal" tabindex="-1" role="dialog" aria-labelledby="createVoucherModal" aria-hidden="true">
<div class="modal-dialog" style="width: 800px;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Zatvori</span></button>
<h4 class="modal-title">Izradi voucher</h4>
</div>
<div id="voucher-modal-body" class="modal-body" style="margin: 20px 40px 20px 40px;">
<!-- here goes dinamically created content (with jQuery) -->
</div>
<div class="modal-footer">
<a id="modal-create-pdf" href="" target="_blank"><button type="button" class="btn btn-primary" id="">Kreiraj PDF</button></a>
<button type="button" class="btn btn-default" data-dismiss="modal">Zatvori</button>
</div>
</div>
</div>
</div>
<!-- Second modal for editing note voucher …Run Code Online (Sandbox Code Playgroud) 我在写共享内存段时遇到问题.这是代码:
编辑:我删除了==(错误)后,现在我收到总线错误(核心转储),这是编辑后的代码:
// Struct for data from shared memory
typedef struct {
pthread_mutex_t shared_mutex;
int last_used_job_id;
} shared1;
static void *job_generator(void *param)
{
int J = *((int *) param);
shared1 *shd;
int shm;
int job_id;
// Open shared memory, don't create it if doesn't exist
shm = shm_open("/lab5", O_RDWR, 00600);
// Check
if (shm == -1) {
// Open shared memory, create it if doesn't exist (O_CREAT)
shm = shm_open(q_name, O_RDWR | O_CREAT, 00600);
// Map space for struct
shd …Run Code Online (Sandbox Code Playgroud)