problem
stringlengths
26
131k
labels
class label
2 classes
static void vfio_iommu_map_notify(IOMMUNotifier *n, IOMMUTLBEntry *iotlb) { VFIOGuestIOMMU *giommu = container_of(n, VFIOGuestIOMMU, n); VFIOContainer *container = giommu->container; hwaddr iova = iotlb->iova + giommu->iommu_offset; MemoryRegion *mr; hwaddr xlat; hwaddr len = iotlb->addr_...
1threat
Parameter that's a list of interface{} : <p>I'm trying to create a function that prints out the <code>len</code> of a list passed into it, regardless of the type of the list. My naive way of doing this was: </p> <pre><code>func printLength(lis []interface{}) { fmt.Printf("Length: %d", len(lis)) } </code></pre> <...
0debug
Multi level object data manipulation PHP : I have a multi-level object data with a structure similar to the window below. I am trying to * sum all the direct package values for the top users or say `parents`, only * sum all the nested indirect package values from the `children` tree. The final result is expe...
0debug
static void patch_instruction(VAPICROMState *s, CPUX86State *env, target_ulong ip) { target_phys_addr_t paddr; VAPICHandlers *handlers; uint8_t opcode[2]; uint32_t imm32; if (smp_cpus == 1) { handlers = &s->rom_state.up; } else { handlers = &s->rom_state.mp; } ...
1threat
Need to parse a text file line by line with a certain search string using powershell : <p>I need to parse a text file line by line with a certain search string and if that string is not found in any line, then code should output that entire line to separate text file.</p>
0debug
How to install zookeeper as service on CentOS 7 : <p>I am trying to install zookeeper on CentOS 7 using <code>yum install zookeeper</code> or <code>yum install zookeeperd</code> but it throws: <code>There is no zookeeper package available.</code> </p>
0debug
static int tcp_write_packet(AVFormatContext *s, RTSPStream *rtsp_st) { RTSPState *rt = s->priv_data; AVFormatContext *rtpctx = rtsp_st->transport_priv; uint8_t *buf, *ptr; int size; uint8_t *interleave_header, *interleaved_packet; size = avio_close_dyn_buf(rtpctx->pb, &buf); ptr = ...
1threat
static int hls_read_packet(AVFormatContext *s, AVPacket *pkt) { HLSContext *c = s->priv_data; int ret, i, minvariant = -1; if (c->first_packet) { recheck_discard_flags(s, 1); c->first_packet = 0; } start: c->end_of_segment = 0; for (i = 0; i < c->n_variants; i++) { ...
1threat
Application crashes only in release version : <p>When you run the application in <strong>debug</strong> mode the app can't crash. But when generates the .apk file <strong>release</strong> the app crash. <strong>This error does not happen on all phones</strong>, in just a few that have the android 6.</p> <p>The logcat ...
0debug
db.execute('SELECT * FROM products WHERE product_id = ' + product_input)
1threat
i need to get id when i have another tag a : i have my code is <a class="btn btn-outline-primary" id="1" href="<?php echo site_url(); ?>/InchatroomController/LikeMessage/1" style=""> </a> <a class="btn btn-outline-primary" id="2" href="<?php echo site_url(); ?>/InchatroomController/LikeMessage/2" sty...
0debug
void vncws_tls_handshake_io(void *opaque) { VncState *vs = (VncState *)opaque; if (!vs->tls.session) { VNC_DEBUG("TLS Websocket setup\n"); if (vnc_tls_client_setup(vs, vs->vd->tls.x509cert != NULL) < 0) { return; } } VNC_DEBUG("Handshake IO continue\n"); ...
1threat
query = 'SELECT * FROM customers WHERE email = ' + email_input
1threat
How to show the disk usage of each subdirectory in Linux? : <p>I have a directory, <code>/var/lib/docker</code>, which contains several subdirectories:</p> <pre><code>/var/lib/docker$ sudo ls aufs containers image network plugins swarm tmp trust volumes </code></pre> <p>I'd like to find out how big each direc...
0debug
Python 3: If we have imported urllib and/or urllib3, do we need to also import requests lib independently? : In a course I'm taking, we have the following code: [![enter image description here][1]][1] You can see we are importing the `requests` library, but at the same time it is inside `urllib3` as a module/package....
0debug
Is it possible to use dotenv in a react project? : <p>I am trying to set some environment variables (for making API calls to dev/prod endpoints, keys depending on dev/prod, etc.) and I'm wondering if using dotenv will work.</p> <p>I've installed dotenv, and I am using webpack.</p> <p>My webpack entry is <code>main.js...
0debug
Docker image fails to create netlink handle : <p>Can anyone help me make sense of the below error and others like it? I've Googled around, but nothing makes sense for my context. I download my Docker Image, but the container refuses to start. The namespace referenced is not always 26, but could be anything from 20-29. ...
0debug
Spring boot autowiring an interface with multiple implementations : <p>In normal Spring, when we want to autowire an interface, we define it's implementation in Spring context file. What about Spring boot? how can we achieve this? currently we only autowire classes that are not interfaces. Another part of this question...
0debug
int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q, AVPacket *pkt, const AVFrame *frame, int *got_packet) { mfxBitstream bs = { { { 0 } } }; mfxFrameSurface1 *surf = NULL; mfxSyncPoint sync = NULL; int ret; if (frame) { ret = submit_frame(q, frame, &...
1threat
vue.js: always load a settings.scss file in every vue style section : <p>I find myself repeating this same pattern in every .vue file, in order to use variables, etc.:</p> <pre><code>&lt;style lang="scss"&gt; @import "../styles/settings.scss"; .someclass { color: $some-variable; } &lt;/style&gt; </code></pre> <p...
0debug
Javascript: How to only invoke a function that's called from within another function when a specific div is NOT clicked? : I am calling campusInfo(id) a few places in my code. Inside campusInfo(id) function I am calling campusInfo_2(HouseID). One of the instances where I am calling campusInfo(id) is on the onclick...
0debug
ItemSource/DataSource for Text Blocks : Im using dapper to retrieve some data from a database using a list. I've been able to do it with a ListBox with ``` private void UpdateBinding() { displayLastNameLB.ItemsSource = people; displayLastNameLB.DisplayMemberPath = "FullInfo"; ...
0debug
SQL Table to nested xml file : Action Action2 Name Action3 Batch add PL Steve add 1 add PL Steve add 3 add PL Steve add 4 add PL Steve add 5 add PL Steve add 1 add PL Steve add 3 add PL Steve add 4 add PL Steve ad...
0debug
Turn Array objects into JSON using javascript or jquery : <p>I have dynamic data coming into my website like this:</p> <pre><code>[{ "itemOne": { "url": "www", "name": "Bob" }, "itemTwo": { "url": "www", "name": "fred" } }] </code></pre> <p>Using jQuery or Javascript, I would like to tur...
0debug
LiveData observing in Fragment : <p>As of 2019, I'm trying to follow a best practice on where to start observing <code>LiveData</code> in Fragments and if I should pass <code>this</code> or <code>viewLifecycleOwner</code> as a parameter to the <code>observe()</code> method.</p> <ul> <li><p>According to this <a href="h...
0debug
Cell Complete Problems : There is a colony of 8 cells arranged in a straight line where each day every cell competes with its adjacent cells(neighbour). Each day, for each cell, if its neighbours are both active or both inactive, the cell becomes inactive the next day,. otherwise itbecomes active the next day. ...
0debug
C# download file stealthy? : <p>I was wondering how I would go about retrieving a file in a way that wouldn't be shown (or at least somewhat encrypted) in a web debugger or similar tool (wireshark for instance). <br> <br>I am currently using FTP, but FTP has a couple security flaws such as username and password being v...
0debug
Error - Android resource linking failed (AAPT2 27.0.3 Daemon #0) : <p>I have this error </p> <p><strong>I am try reinstall android studio and remove .gradle folder , any solution please?</strong> </p> <pre><code> Error:FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:pro...
0debug
void muls64(int64_t *phigh, int64_t *plow, int64_t a, int64_t b) { #if defined(__x86_64__) __asm__ ("imul %0\n\t" : "=d" (*phigh), "=a" (*plow) : "a" (a), "0" (b) ); #else int64_t ph; uint64_t pm1, pm2, pl; pl = (uint64_t)((uint32_t)a) * (uint64_t)((uin...
1threat
def count(lst): return sum(lst)
0debug
What is the difference between BeforeTest and BeforeMethod in TestNG : <p>Both annotations runs before the @test in testNG then what is the difference between two of them.</p>
0debug
Does modules are maded of hash tables in python? : import module_name Is above expression is copying whole code inside working module or it'll just know its name(or its path)? If it copies whole code inside working library then why we have to use "module_name.function" kind of system to work with that module? ...
0debug
void virtio_queue_set_notification(VirtQueue *vq, int enable) { vq->notification = enable; if (virtio_has_feature(vq->vdev, VIRTIO_RING_F_EVENT_IDX)) { vring_set_avail_event(vq, vring_avail_idx(vq)); } else if (enable) { vring_used_flags_unset_bit(vq, VRING_USED_F_NO_NOTIFY); } el...
1threat
Python error - "ImportError: cannot import name 'dist'" : <p>I'm on Ubuntu 16.04, and I get:</p> <pre><code>Traceback (most recent call last): File "/home/omermazig/.virtualenvs/fixi/bin/pip", line 7, in &lt;module&gt; from pip import main File "/home/omermazig/.virtualenvs/fixi/lib/python3.6/site-packages/pip...
0debug
¿Add dollar sign in to currency format? Javascript : This is the code I have, it returns numbers in currency format but I wish to add the dollar sign ($) before the numbers. > document.getElementById("numbers").onblur = function (){ > this.value = parseFloat(this.value.replace(/,/g, "")) > ...
0debug
static int qdm2_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; QDM2Context *s = avctx->priv_data; int16_t *out = data; int i; if(!buf) return 0; if(b...
1threat
void bdrv_set_dirty_iter(HBitmapIter *hbi, int64_t offset) { assert(hbi->hb); hbitmap_iter_init(hbi, hbi->hb, offset); }
1threat
std::map key value pairs not iterating in sequence : <p>I am inserting key value pairs in a <code>std::map</code> as</p> <pre><code>key = //something; value = //something; demoMap[key] = value; </code></pre> <p>Printing the key and value here gives me correct results. However, when I iterate this map as:</p> <pre><c...
0debug
How to turn have a .json file as a string in C# : <p>So I have this .json file: temp_file.json</p> <p>Now all I need to do is get whatever is in this .json file, and put it in a string using C# in Visual Studio 2017.</p> <p>That's it.</p> <p>I don't want it to be turned into a object of a certain class or whatever. ...
0debug
Android TextView Hyperlink : <p>I'm implementing a TextView with a string containing two hyperlinks as below but the links are not opening a new browser window:</p> <pre><code>&lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" ...
0debug
How to save the current date/time when I add new value to Firebase Realtime Database : <p>I want to save the current date/time in specific field when I add new value to Firebase Realtime Database via control panel.</p> <p>How can I achieve that?</p> <p>Please help me.</p>
0debug
static void do_loadvm(int argc, const char **argv) { if (argc != 2) { help_cmd(argv[0]); return; } if (qemu_loadvm(argv[1]) < 0) term_printf("I/O error when loading VM from '%s'\n", argv[1]); }
1threat
Serving static assets in webpack dev server : <p>I run webpack-dev-server from the root folder of my project. I have <em>assets</em> folder in <em>/src/assets</em> that is copied by CopyWebPackPlugin:</p> <pre><code>new CopyWebpackPlugin([ { from: 'src/assets', to: 'assets' } ]) </code></pre> <p>If I put <em>logo.png...
0debug
merge multiple txt files as one csv file | table : Hey I have couple of files which contain data like this: file1.txt abc def hij file2.txt def abc qlm file3.txt def lop tmn desired output: mergedfile.csv file1 file2 file2 abc ...
0debug
I am creating change password functionality in android my application is crashing on getResponsecode() : I have provided onCreate and New password method where on debugging it is crashing on getResponsecode().It is crashing and not getting response.It is not going to get response from server protected void on...
0debug
static void pc_q35_init_1_6(QEMUMachineInitArgs *args) { has_pci_info = false; pc_q35_init(args); }
1threat
void helper_wrmsr(void) { uint64_t val; helper_svm_check_intercept_param(SVM_EXIT_MSR, 1); val = ((uint32_t)EAX) | ((uint64_t)((uint32_t)EDX) << 32); switch((uint32_t)ECX) { case MSR_IA32_SYSENTER_CS: env->sysenter_cs = val & 0xffff; case MSR_IA32_SYSENTER_ESP: en...
1threat
static inline abi_long do_semctl(int semid, int semnum, int cmd, union target_semun target_su) { union semun arg; struct semid_ds dsarg; unsigned short *array; struct seminfo seminfo; abi_long ret = -TARGET_EINVAL; abi_long err; cmd &= 0xff; s...
1threat
Junit @Rule and @ClassRule : <p>I am writing JUnit4 test in which I am using TemporaryFolder rule. It seems that it works fine with both @Rule and @ClassRule. What is the difference between Junit @Rule and @ClassRule? Why should I use one and not another? </p>
0debug
How do I install Python 3.7 in google cloud shell : <p>I have python 3.5 on my google cloud shell and want 3.7 so I can do command line debugging of code I am going to deploy via google cloud functions (and use 3.7 features such as f-strings).</p> <p>I try various forms of the following:</p> <pre><code>sudo apt-get i...
0debug
Getting through in Machine Learning : <p>I have just completed Machine learning course from Andrew ng and would like to proceed further. I also want the python implementation of Machine Learning from beginning so that i can practice on Kaggle. Also, is there any better book or tutorial or some resource like that so tha...
0debug
How to detect if stack smashing protection is enabled in an iOS app : <p>I want to be able to check if stack smashing protection (-fstack-protector-all) is enabled in an iOS app built on Xcode 9 with a target of iOS 11.</p> <p>I built an app with -fstack-protector-all enabled in "Other C flags", and it does build and ...
0debug
static int svq3_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { MpegEncContext *const s = avctx->priv_data; H264Context *const h = avctx->priv_data; int m, mb_type; unsigned char *extradata; unsigned int size; s->flags = avctx->flags...
1threat
please help me with the below error in sql URGENT : while running the below query i am getting error for field error_num Implicit conversion from datatype 'VARCHAR' to 'INT' is not allowed. Use the CONVERT function to run this query. below is the query select top 100"Insert into KLG_TRN_SCE..dbBatchReques...
0debug
RestTemplate RestTemplate is empty : I created a REST Web Service with the tutorial "http://www.journaldev.com/2552/spring-rest-example-tutorial-spring-restful-web-services", but I am getting a 404 Error running the client. Debugging I found out that in class RestTemplate, method doWithRequest at line 504 List<Med...
0debug
int pci_device_load(PCIDevice *s, QEMUFile *f) { uint32_t version_id; int i; version_id = qemu_get_be32(f); if (version_id > 2) return -EINVAL; qemu_get_buffer(f, s->config, 256); pci_update_mappings(s); if (version_id >= 2) for (i = 0; i < 4; i ++) ...
1threat
static int amr_wb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) { AMRWBContext *s = avctx->priv_data; const int16_t *samples = (const int16_t *)frame->data[0]; int size, ret; if ((ret = ff_alloc_packet2(avctx, avpkt...
1threat
Bs 4.0 dropdown bug on chrome? : So i've came accross a really weird compatibility issue, i'm using a dropdown for a sidenav menu with bootsrap 4.0 beta, and it works perfectly fine on firefox, but on chrome i have a problem : Basically right when the page loads, if you click the dropdown button it will go up as if ...
0debug
How take date in class constructor? : <p>have json</p> <pre><code>{"id":1,"name":"123","dateoff":"2016-01-12T13:30:46.358+05:00","available":true} </code></pre> <p>and have class</p> <pre><code>export class Compaing { constructor(public id: number, public name: string, public dateoff: Date, publi...
0debug
Place JSON data in label in Swift : <p>I am able to capture my data through GET method. But I wanted to display my data in a label</p> <pre><code>if let data = data, let dataString = String(data: data, encoding: .utf8) { print("data: \(dataString)") } </code></pre> <p><code>dataString</code> displays </p> <p>...
0debug
static inline int decode_subframe(FLACContext *s, int channel) { int32_t *decoded = s->decoded[channel]; int type, wasted = 0; int bps = s->flac_stream_info.bps; int i, tmp, ret; if (channel == 0) { if (s->ch_mode == FLAC_CHMODE_RIGHT_SIDE) bps++; } else { ...
1threat
completion handler's error in swift 3 and Xcode 8 : <p>I have working project in Xcode 7.3 with swift 2.2 version. Now I have updated Xcode 8 and migrated to swift 3. Now my project contains errors specially for blocks like success block of afnetworking.</p> <p><a href="https://i.stack.imgur.com/NYIe1.png"><img src="h...
0debug
TableView is displayed not how it's supposed to : I created a table view in Xcode, and when i run the project it's displayed awfully (pic related). Don't know what could be the problem What i did was : import UIKit class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { ...
0debug
How to subtract months in dates? : <p>I have this dates function:</p> <pre><code>var isAnnual; var setupDate="05/09/2016" var currDate = new Date();//today </code></pre> <p>I need to check if subtraction of the <strong>months</strong> in dates above is equal to zero.</p> <p>Any idea what is the best way to implement...
0debug
Visual Studio Yellow Tooltip stuck on screen : <p>I'm running VS2013 Professional on Windows 7 x64 and often finding that, after a debug session, the yellow tooltips from the debugger don't go away and stay on the screen on top of other windows. For example, the image attached shows a debug tooltip now also showing on ...
0debug
Why I have different outputs in this C++ code which I could not understand ? : I couldn't understand the output of this program even after a debug, specially the line where you find " f(::x) = h(x) " what does it mean ? Could someone help me please to understand the C++ program and how it runs to understand the output...
0debug
Array of dynamic length in c : #include <stdio.h> #include <string.h> #include<stdlib.h> int main(void) { char *names = NULL; int capacity = 0; int size = 0; printf("Type 'end' if you want to stop inputting names\n"); while (1) { char name[...
0debug
static void gen_lea_modrm(DisasContext *s, int modrm, int *reg_ptr, int *offset_ptr) { int havesib; int base, disp; int index; int scale; int opreg; int mod, rm, code, override, must_add_seg; override = -1; must_add_seg = s->addseg; if (s->prefix & (PREFIX_CS | PREF...
1threat
static void put_ebml_uint(ByteIOContext *pb, unsigned int elementid, uint64_t val) { int i, bytes = 1; while (val >> bytes*8 && bytes < 8) bytes++; put_ebml_id(pb, elementid); put_ebml_num(pb, bytes, 0); for (i = bytes - 1; i >= 0; i--) put_byte(pb, val >> i*8); }
1threat
static_cast to a struct type to access all of its member variable : <p>I have a structure like below:</p> <pre><code>struct Param { Param(const void* a, const std::vector&lt;int&gt;&amp; b) : c(a), d(b) {} const void* c; const std::vector&lt;int&gt; d; }; </code></pre> <p>Now after creating a new insta...
0debug
I m looking for a REGEX to split a response with & as part of the value : <p>So I get a response as pairs of keys and values sum=199&amp;name=arik&amp;business=<strong>arik &amp; sons</strong>&amp;address=xyz</p> <p>I m looking for a REGEX that will be able to split the keys and values</p> <p>giving the following gui...
0debug
How to implement view always visible and fixed in MainActivity above fragments? : How to implement view always visible and fixed in MainActivity above fragments? I also need it when the fragment is replaced, not only when add fragment. Thank u! Dave
0debug
rgb16_32ToUV_half_c_template(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, int width, enum PixelFormat origin, int shr, int shg, int shb, int shp, int maskr, int maskg, int maskb, ...
1threat
How to add custom product_meta fields i.e Brand, GTIN, MPN? : <p>I'm looking to add custom product meta to display on single products, basket and checkout. Fields being Brand, GTIN, MPN, Platform, Region and possibly room for Publisher and Developer. I'm unsure if YOAST SEO will submit this information to my sitemap? A...
0debug
About inheritance of java : <p>/** * Created by zhangzhongzheng on 2016/10/15. */</p> <p>public class ExtendsTest {</p> <pre><code>static Dog d = new Dog(); public static void main(String[] args) { Animal a = d; System.out.println(a instanceof Animal);//true System.out.println(a instanceof Dog);//true ...
0debug
InputEvent *qemu_input_event_new_move(InputEventKind kind, InputAxis axis, int value) { InputEvent *evt = g_new0(InputEvent, 1); InputMoveEvent *move = g_new0(InputMoveEvent, 1); evt->type = kind; evt->u.rel = move; move->axis = axis; move->value ...
1threat
static void exec_accept_incoming_migration(void *opaque) { QEMUFile *f = opaque; int ret; ret = qemu_loadvm_state(f); if (ret < 0) { fprintf(stderr, "load of migration failed\n"); goto err; } qemu_announce_self(); DPRINTF("successfully loaded vm state\n"); ...
1threat
void slirp_init(int restricted, struct in_addr vnetwork, struct in_addr vnetmask, struct in_addr vhost, const char *vhostname, const char *tftp_path, const char *bootfile, struct in_addr vdhcp_start, struct in_addr vnameserver) { #ifdef _WIN32 W...
1threat
DVMuxContext* dv_init_mux(AVFormatContext* s) { DVMuxContext *c; AVStream *vst = NULL; int i; if (s->nb_streams > 3) return NULL; c = av_mallocz(sizeof(DVMuxContext)); if (!c) return NULL; c->n_ast = 0; c->ast[0] = c->ast[1] = NULL; for...
1threat
static void m5206_mbar_writel(void *opaque, target_phys_addr_t offset, uint32_t value) { m5206_mbar_state *s = (m5206_mbar_state *)opaque; int width; offset &= 0x3ff; if (offset > 0x200) { hw_error("Bad MBAR write offset 0x%x", (int)offset); } width...
1threat
Kubectl run set nodeSelector : <p>Is there a way to specify the nodeSelector when using the Kubernetes run command? </p> <p>I don't have a yaml file and I only want to override the nodeSelector.</p> <p>I tried the following but didn't work:</p> <pre><code>kubectl run myservice --image myserviceimage:latest --overrid...
0debug
static void memory_map_init(void) { system_memory = qemu_malloc(sizeof(*system_memory)); memory_region_init(system_memory, "system", UINT64_MAX); set_system_memory_map(system_memory); }
1threat
static int qemu_rdma_broken_ipv6_kernel(Error **errp, struct ibv_context *verbs) { struct ibv_port_attr port_attr; #ifdef CONFIG_LINUX int num_devices, x; struct ibv_device ** dev_list = ibv_get_device_list(&num_devices); bool roce_found = false; ...
1threat
why is this crashing ? how to fix? : well im doing a recycler view with a database on firebase . that is working perfectly... now i want to implement a share button but i cant make the button reference each img. i found a tutorial to do so but when i try to implement this line (if i remove it the apps goes well but ...
0debug
IF statement with multiple expressions : <p>I'm trying to construct IF statement with multiple conditions but I can't get echo 'TRUE' with this PHP code.</p> <pre><code>&lt;?php $totalDays = 4; $startDateL = 'Friday'; $endDateL = 'Monday'; $pickupTime = '12:00:00'; $returnTime = '9:00:00'; if($totalDays == 4 AND $pi...
0debug
jQuery Horizontal Scrolling? : <p>I would like to show animation on the below to show the horizantal scroll is there. Which means i the scroll move left few second and right few second after page load completed</p>
0debug
how to get youtube comment : <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/xH7vTWir9uU" frameborder="...
0debug
Div with text around : <p>I'd like insert a div into another div, with text that goes around.</p> <p><a href="https://i.stack.imgur.com/fkbxO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fkbxO.jpg" alt="example"></a></p>
0debug
static int idcin_read_header(AVFormatContext *s) { AVIOContext *pb = s->pb; IdcinDemuxContext *idcin = s->priv_data; AVStream *st; unsigned int width, height; unsigned int sample_rate, bytes_per_sample, channels; width = avio_rl32(pb); height = avio_rl32(pb); sample_rate = avio_rl32...
1threat
void ff_xvmc_init_block(MpegEncContext *s) { struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.f->data[2]; assert(render && render->xvmc_id == AV_XVMC_ID); s->block = (int16_t (*)[64])(render->data_blocks + render->next_free_data_block_num * 64); }
1threat
How do I use the SqlResource method in EF Migrations? : <p>MSDN says this method "Adds an operation to execute a SQL resource file". Its signature is:</p> <pre><code>protected internal void SqlResource( string sqlResource, Assembly resourceAssembly = null, bool suppressTransaction = false, object anon...
0debug
int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) { int pqindex, lowquant, status; if (v->finterpflag) v->interpfrm = get_bits1(gb); if (!v->s.avctx->codec) return -1; if (v->s.avctx->codec_id == AV_CODEC_ID_MSS2) v->respic = v->rangered = ...
1threat
document.location = 'http://evil.com?username=' + user_input;
1threat
Bootstrap 4 IE 11 does not work : <p>so I have the problem, that my whole website does not work in IE 11. I don't get why because officially IE 11 should be supported by bootstrap 4... Website: www.ergotherapie-klinkicht.de I'm a bit helpless right now, because I don't know where to start. Did I miss something for IE 1...
0debug
AOF and RDB backups in redis : <p>This question is about Redis persistence. </p> <p>I'm using redis as a 'fast backend' for a social networking website. It's a single server set up. I've been transferring PostgreSQL responsibilities to Redis steadily. Currently in <code>etc/redis/redis.conf</code>, the appendonly sett...
0debug
void co_run_in_worker_bh(void *opaque) { Coroutine *co = opaque; thread_pool_submit_aio(aio_get_thread_pool(qemu_get_aio_context()), coroutine_enter_func, co, coroutine_enter_cb, co); }
1threat
Incremental Numbering with PHP : <p>I have a website where I mention how long the company has been in business (53 years currently). I would like this number to automatically update each year. Is this possible with PHP?</p>
0debug
How to create per workspace snippets in VSCode? : <p>I would like to add some project specific snippets.</p> <p>How can I add snippets in the <code>.vscode</code> folder?</p>
0debug
int bdrv_truncate(BlockDriverState *bs, int64_t offset) { BlockDriver *drv = bs->drv; int ret; if (!drv) return -ENOMEDIUM; if (!drv->bdrv_truncate) return -ENOTSUP; if (bs->read_only) return -EACCES; ret = drv->bdrv_truncate(bs, offset); if (ret == 0) { ...
1threat
Create object from array : <p>I want to create object from list of array. I have an array which is dynamic which suppose to be look like this:</p> <p><code>var dynamicArray = ["2007", "2008", "2009", "2010"];</code></p> <p>and with some javascript es6 I want to make an object like this:</p> <pre><code>const obj = { ...
0debug