problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff){
MpegEncContext * const s = &h->s;
static const int coeff_token_table_index[17]= {0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3};
int level[16];
int... | 1threat |
Make request POST angular 1.x using 'Content-Type': 'application/json' : Previously I used the following type of headers in my function to make the request from the application:
###Html
<label class="item item-input">
<i class="icon ion-person placeholder-icon"></i>
... | 0debug |
static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
int buf_size, AVSubtitle *sub)
{
DVBSubContext *ctx = avctx->priv_data;
DVBSubDisplayDefinition *display_def = ctx->display_definition;
DVBSubRegion *region;
DVBSubRegionDisplay... | 1threat |
def maximum_product(nums):
import heapq
a, b = heapq.nlargest(3, nums), heapq.nsmallest(2, nums)
return max(a[0] * a[1] * a[2], a[0] * b[0] * b[1]) | 0debug |
PPC_OP(addc)
{
T2 = T0;
T0 += T1;
if (T0 < T2) {
xer_ca = 1;
} else {
xer_ca = 0;
}
RETURN();
}
| 1threat |
static int alsa_init_in (HWVoiceIn *hw, audsettings_t *as)
{
ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
struct alsa_params_req req;
struct alsa_params_obt obt;
snd_pcm_t *handle;
audsettings_t obt_as;
req.fmt = aud_to_alsafmt (as->fmt);
req.freq = as->freq;
req.nchannels = as->nc... | 1threat |
simple PHP signup form wont POST to MySQL Database : <p>I'm very new to this, I made a php to test the connection with the database and it seems fine, but writing information to a table isn't working.</p>
<p>Heres the index.php (where the signup form is)</p>
<p><div class="snippet" data-lang="js" data-hide="false" da... | 0debug |
static void s390_cpu_initial_reset(CPUState *s)
{
S390CPU *cpu = S390_CPU(s);
CPUS390XState *env = &cpu->env;
int i;
s390_cpu_reset(s);
memset(&env->start_initial_reset_fields, 0,
offsetof(CPUS390XState, end_reset_fields) -
offsetof(CPUS390XState, start_initial_reset_... | 1threat |
Border bottom animation : <p>How can I make the bottom border animations like <a href="http://htmlcoder.me/preview/the_project/v.1.1/template/index-construction.html" rel="nofollow">here</a> ? In main header.</p>
| 0debug |
AWS S3 integration yields undefined method `match' : <p>I'm working on a simple project using Paperclip to upload images. Everything has been working just fine until I attempted to integrate S3 with Paperclip. Upon 'uploading' a user's image I get a <code>NoMethodError (undefined method 'match' for nil:NilClass):</co... | 0debug |
static ssize_t qsb_grow(QEMUSizedBuffer *qsb, size_t new_size)
{
size_t needed_chunks, i;
if (qsb->size < new_size) {
struct iovec *new_iov;
size_t size_diff = new_size - qsb->size;
size_t chunk_size = (size_diff > QSB_MAX_CHUNK_SIZE)
? QSB_MAX_CHUNK... | 1threat |
How does spring dependency injection work? : <p>I want to know when are the dependencies injected in a spring bean.
I have the following code :</p>
<pre><code>import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component... | 0debug |
static int film_read_close(AVFormatContext *s)
{
FilmDemuxContext *film = s->priv_data;
av_free(film->sample_table);
av_free(film->stereo_buffer);
return 0;
}
| 1threat |
Change name of a cell in data frame in R : <p>I have a data set:</p>
<pre><code> x y z
1 apple a 4
2 orange d 3
3 banana b 2
4 strawberry c 1
</code></pre>
<p>How can I change the name "banana" to "grape"? I want to get:</p>
<pre><code> x y z
1 apple a 4
2 orange d 3
3 g... | 0debug |
Can't compile a g++ file using OpenGL library on Mac OS using Xcode and Terminal : I am trying to compile this simple program:
[enter image description here][1]
But every time I try to do it using Xcode or terminal they give me the following warnings and the following errors:
[enter image description here][2]
... | 0debug |
static int decode_mb_info(IVI5DecContext *ctx, IVIBandDesc *band,
IVITile *tile, AVCodecContext *avctx)
{
int x, y, mv_x, mv_y, mv_delta, offs, mb_offset,
mv_scale, blks_per_mb;
IVIMbInfo *mb, *ref_mb;
int row_offset = band->mb_size * band->p... | 1threat |
Regular expressions doubts : <p>I have a few doubts that I have not managed to clear up by research and am hoping for some help.</p>
<p>1) What does the <code>m</code> do, and what do the <code>/ /</code> before the m and at the end do?
$var =~ m/[^0-9]+/</p>
<p>2) <code>/[^0-9]+/</code> Which of the follow... | 0debug |
Display the same data and summation in mysql : I want to ask and hopefully the readers can help.
I have a case showing data details based on order number.
the following data.
+ order number | item | total kg<br>
1. 99684 | CF Rice Pandan Wangi 10 kg | 50.0 kg<br>
2. 99684 | CF Rice Rojolele 10 kg | 100.0 kg<br... | 0debug |
static AVCodec *AVCodecInitialize(enum AVCodecID codec_id)
{
AVCodec *res;
avcodec_register_all();
av_log_set_level(AV_LOG_PANIC);
res = avcodec_find_decoder(codec_id);
if (!res)
error("Failed to find decoder");
return res;
}
| 1threat |
How to display a button when there is no network and make it disappear when connection is available in Android App Development? : <p>I am creating an Android app and want to disappear retry button when there is network and it should be visible when there is no network, so the user can retry to load.</p>
| 0debug |
Jquery select multiply of 3 : Hi in my Ul li i want to select only muliply of 3 other wise it will show alert msg. How i achive this
<ul>
<li><input type="checkbox" />a</li>
<li><input type="checkbox"/>b</li>
<li><input type="checkbox"/>c</li>
<li><input type="che... | 0debug |
static int init_input(AVFormatContext *s, const char *filename)
{
int ret;
AVProbeData pd = {filename, NULL, 0};
if (s->pb) {
s->flags |= AVFMT_FLAG_CUSTOM_IO;
if (!s->iformat)
return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, 0);
else if (s->iformat->flags... | 1threat |
npm install hangs on loadIdealTree:loadAllDepsIntoIdealTree: sill install loadIdealTree : <p>I have a Node.js application. When I try to run <code>npm install</code> it hangs with this:</p>
<pre><code>loadIdealTree:loadAllDepsIntoIdealTree: sill install loadIdealTree
</code></pre>
<p><code>npm install --verbose</code... | 0debug |
Count how many rows you have in your db with PHP : <p>Hellow, </p>
<p>I want to count how many rows i have in a table. I got a table (workstations) in my mysql database (phpmyadmin). I want to print it out, so ik can see how many workstations their are "active" in my environment</p>
<p>I've read many blogs about this... | 0debug |
static inline void RENAME(yuv2packedX)(SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
const int16_t *chrFilter, const int16_t **chrSrc, int chrFilterSize,
const int16_t **alpSrc, uint8_t *dest, long dstW... | 1threat |
static int init_image(TiffContext *s)
{
int i, ret;
uint32_t *pal;
switch (s->bpp * 10 + s->bppcount) {
case 11:
if (!s->palette_is_set) {
s->avctx->pix_fmt = AV_PIX_FMT_MONOBLACK;
break;
}
case 21:
case 41:
case 81:
s->avctx->pi... | 1threat |
static inline void vc1_pred_b_mv(VC1Context *v, int dmv_x[2], int dmv_y[2],
int direct, int mvtype)
{
MpegEncContext *s = &v->s;
int xy, wrap, off = 0;
int16_t *A, *B, *C;
int px, py;
int sum;
int r_x, r_y;
const uint8_t *is_intra = v->mb_type[0];
r_x = v... | 1threat |
Keras - using activation function with a parameter : <p>How is it possible to use leaky ReLUs in the newest version of keras?
Function relu() accepts an optional parameter 'alpha', that is responsible for the negative slope, but I cannot figure out how to pass ths paramtere when constructing a layer. </p>
<p>This line... | 0debug |
static int dxva2_h264_start_frame(AVCodecContext *avctx,
av_unused const uint8_t *buffer,
av_unused uint32_t size)
{
const H264Context *h = avctx->priv_data;
AVDXVAContext *ctx = avctx->hwaccel_context;
struct dxva2_picture_context *c... | 1threat |
Is it safe to link gcc 6, gcc 7, and gcc 8 objects? : <p><a href="https://stackoverflow.com/q/46746878/2069064">Is it safe to link C++17, C++14, and C++11 objects</a> asks about linking objects compiled with different language standards, and Jonathan Wakely's excellent answer on that question explains the ABI stability... | 0debug |
rollup.JS and "'this' keyword is equivalent to 'undefined' : <p>I'm trying to bundle Angular2 modules using Rollup.js.
this is my rollup.config.vendor.js file:</p>
<pre><code>import typescript from 'rollup-plugin-typescript2';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-common... | 0debug |
static int read_sl_header(PESContext *pes, SLConfigDescr *sl, const uint8_t *buf, int buf_size)
{
GetBitContext gb;
int au_start_flag = 0, au_end_flag = 0, ocr_flag = 0, idle_flag = 0;
int padding_flag = 0, padding_bits = 0, inst_bitrate_flag = 0;
int dts_flag = -1, cts_flag = -1;
int64_t dts ... | 1threat |
In C++ how can I extract members from an array and return an array of the member's type? : <pre><code>namespace detail
{
template <typename T, typename U>
Array<U> extract_(const Array<T>& array, std::function<U(const T&)> member)
{
Array<U> extracted;
... | 0debug |
How can i convert an array into an object of key-value pairs, where keys are previous value in array? : I am trying to convert an array like this into an object:
[
"a",
"11993",
"b",
"18486",
"c",
"13240388"
]
by grouping by 2 where first item is key an... | 0debug |
static void nic_receive(void *opaque, const uint8_t * buf, size_t size)
{
EEPRO100State *s = opaque;
uint16_t rfd_status = 0xa000;
static const uint8_t broadcast_macaddr[6] =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
assert(!(s->configuration[20] & BIT(6)));
if (s-... | 1threat |
Exception in thread "main" java.lang.NullPointerException while performing selection sort? : <p>I was writing some code to create a selection sort algorithm that sorted objects of the distance class. However, when I ran the program, the program returned the error:</p>
<pre><code>> Exception in thread "main" java.l... | 0debug |
static int scsi_cd_initfn(SCSIDevice *dev)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, dev);
s->qdev.blocksize = 2048;
s->qdev.type = TYPE_ROM;
s->features |= 1 << SCSI_DISK_F_REMOVABLE;
if (!s->product) {
s->product = g_strdup("QEMU CD-ROM");
}
return scsi_initfn(&s... | 1threat |
static void omap_sysctl_write8(void *opaque, target_phys_addr_t addr,
uint32_t value)
{
struct omap_sysctl_s *s = (struct omap_sysctl_s *) opaque;
int pad_offset, byte_offset;
int prev_value;
switch (addr) {
case 0x030 ... 0x140:
pad_offset = (addr - 0x30) >> 2;
... | 1threat |
static void virt_acpi_get_cpu_info(VirtAcpiCpuInfo *cpuinfo)
{
CPUState *cpu;
memset(cpuinfo->found_cpus, 0, sizeof cpuinfo->found_cpus);
CPU_FOREACH(cpu) {
set_bit(cpu->cpu_index, cpuinfo->found_cpus);
}
}
| 1threat |
Does chnaging v4l2 default settings improves usb camera performance? : I'm have USB ELP camera. I'm using v4l2 driver to capture images from that USB camera. I've found that we can change v4l2 default parameters like brightness, contrast, gamma, exposure, resolution. Can we able to increase the speed of camera access t... | 0debug |
static int16_t g726_decode(G726Context* c, int I)
{
int dq, re_signal, pk0, fa1, i, tr, ylint, ylfrac, thr2, al, dq0;
Float11 f;
int I_sig= I >> (c->code_size - 1);
dq = inverse_quant(c, I);
ylint = (c->yl >> 15);
ylfrac = (c->yl >> 10) & 0x1f;
thr2 = (ylint > 9) ? 0x1f << ... | 1threat |
static void put_pixels_clamped4_c(const DCTELEM *block, uint8_t *restrict pixels,
int line_size)
{
int i;
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
for(i=0;i<4;i++) {
pixels[0] = cm[block[0]];
pixels[1] = cm[block[1]];
pixels[2] = cm[bl... | 1threat |
Using IIS Server instead of IIS Express in Visual Studio 2015 : <p>How can we configure our already developed ASP.Net website to use IIS Server instead of using IIS Express in VS2015?</p>
<p>IIS Express is the default server in Visual Studio 2015. My website runs fine with ASP.NET web Development server in Visual stud... | 0debug |
static int pix_sum_altivec(uint8_t *pix, int line_size)
{
int i, s;
const vector unsigned int zero =
(const vector unsigned int) vec_splat_u32(0);
vector unsigned int sad = (vector unsigned int) vec_splat_u32(0);
vector signed int sumdiffs;
for (i = 0; i < 16; i++) {
... | 1threat |
Insert JSON file in SQL tables using C# : <p>Can someone please provide example
How to Insert JSON file in SQL tables using C#.</p>
| 0debug |
How to add an image in an SQL database? : I'm currently working in Microsoft Visual studio and I am doing a project for school where I have to make an app that lets you book seats at a cinema and see the description of the movie you have selected as well as leave/read a review.
In my app I have decided that I want t... | 0debug |
static int test_vector_dmul_scalar(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp,
const double *v1, double scale)
{
LOCAL_ALIGNED(32, double, cdst, [LEN]);
LOCAL_ALIGNED(32, double, odst, [LEN]);
int ret;
cdsp->vector_dmul_scalar(cdst, v1, scale, LEN);
... | 1threat |
Eslint errorring importing jsx without extension : <p>I am trying, in es6, to import jsx files without requiring the .jsx extension:</p>
<pre><code>import LoginErrorDialog from './LoginErrorDialogView';
</code></pre>
<p>Not:</p>
<pre><code>import LoginErrorDialog from './LoginErrorDialogView.jsx';
</code></pre>
<p>... | 0debug |
Can link prefetch be used to cache a JSON API response for a later XHR request? : <p>Given a JSON API endpoint <code>/api/config</code>, we're trying to use <code><link rel="prefetch" href="/api/config"></code> in the head of an HTML document. Chrome downloads the data as expected when it hits the link tag in the... | 0debug |
connection.query('SELECT * FROM users WHERE username = ' + input_string) | 1threat |
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.'Admin')' : <p>When I Try to add value of role in DB it shows me this error ,
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version f... | 0debug |
Sorting aray using BubbleSort fails : Following algorithm works pretty fine in C#
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-html -->
public int[] Sortieren(int[] array, int decide)
{
bool sortiert;
int temp;
... | 0debug |
static int bayer_to_rgb24_wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
uint8_t *dstPtr= dst[0];
const uint8_t *srcPtr= src[0];
int i;
void (*copy) (const uint8_t *src, int src_... | 1threat |
Looping different div using V-for in vue js : someone can help me to looping using v-for statement the layout like this.
[enter image description here][1]
[1]: https://i.stack.imgur.com/bfF5f.png
how can i using v-for in this case ? | 0debug |
c++ vector intialise a vector of agents for a gennetic algorithm : So i have the following c++ code, but i get some errors in mainly stuff like the following (after the block of code) the Agent is just a class that i created in a seperate file
vector<Agent> population;
for (vector<int>::iterator i = population... | 0debug |
def reverse_Array_Upto_K(input, k):
return (input[k-1::-1] + input[k:]) | 0debug |
How can I print data that i filtered out of my mysql table : I am currently developing a school project and once again require some advice from fellow coders. I basically have a mysql table from which i filter out data (according to conditions). I used to print this filtered data to the console, however I now want to g... | 0debug |
"The filename or extension is too long error" using gradle : <p>I have recently updated my code and when I tried to run our application using <strong>g bootRun</strong> in the command line, I encountered this error. </p>
<p><strong>Stack Trace:</strong></p>
<pre><code>org.gradle.api.tasks.TaskExecutionException: Exe... | 0debug |
How to change chekbox like this? : I need to change checkbox from [1]: http://i.stack.imgur.com/fPqOp.png
to [2]: http://i.stack.imgur.com/3hLdB.png
please help me to make checkbox like this...
| 0debug |
Visual studio team services build .net core 1.1 : <p>I'm trying to build a .net core 1.1 project on vsts. The project is developed in vs2017 and it uses the csproj instead of project.json. I have tried multiple options to build id on vsts with the hosted agents (windows and linux).</p>
<p>i have tried the following bu... | 0debug |
static int qcow2_cache_do_get(BlockDriverState *bs, Qcow2Cache *c,
uint64_t offset, void **table, bool read_from_disk)
{
BDRVQcow2State *s = bs->opaque;
int i;
int ret;
int lookup_index;
uint64_t min_lru_counter = UINT64_MAX;
int min_lru_index = -1;
trace_qcow2_cache_get(qemu_coroutine_s... | 1threat |
cursor.execute('SELECT * FROM users WHERE username = ' + user_input) | 1threat |
problema esercizio python 2.7 : ho un problema con il mio codice. Devo creare un codice che dica se il numero inserito sia pari o dispari. L'errore è : TypeError: unsupported operand type(s) for %: 'builtin_function_or_method' and 'int'
e il codice è print ("inserisci un numero")
a=input
if a%2 == 0 :
print ("pari... | 0debug |
How to get the earliest date of a List in Java? : <p>I have an ArrayList which stores 0...4 Dates.</p>
<p>The amount of Dates in the list depends on a Business logic.</p>
<p>How can I get the earliest date of this list? Of course I can build iterative loops to finally retrieve the earliest date. But is there a 'clean... | 0debug |
Google+ login winform c# : i'm working on a simple winform application that allow to user to create an account with his google account , i have check to the documentation of google Api but i don't how it can work with winforms.
The idea of the app is sample, i have 2 form:
1. ***Main Menu*** , with a button that ... | 0debug |
I don't understand the purpose of for in loops : <p>I've been working my way through the Javascript development track on Treehouse and am struggling with for in loops. I have been unable to locate any explanation of this loop in everyday language and am subsequently getting confused. What does for in actually do, and w... | 0debug |
static int64_t coroutine_fn vpc_co_get_block_status(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum)
{
BDRVVPCState *s = bs->opaque;
VHDFooter *footer = (VHDFooter*) s->footer_buf;
int64_t start, offset;
bool allocated;
int n;
if (be32_to_cpu(footer->type) =... | 1threat |
Optimizing GC on EMR cluster : <p>I am running a Spark Job written in Scala on EMR and the stdout of each executor is filled with GC allocation failures. </p>
<pre><code>2016-12-07T23:42:20.614+0000: [GC (Allocation Failure) 2016-12-07T23:42:20.614+0000: [ParNew: 909549K->432K(1022400K), 0.0089234 secs] 2279433K-&g... | 0debug |
Mysql query to retrive data from join of three table : <p>I have tree tables:</p>
<p>Persons:</p>
<ul>
<li>id</li>
<li>name</li>
</ul>
<p>Books</p>
<ul>
<li>id</li>
<li>title</li>
</ul>
<p>Quantity:</p>
<ul>
<li>People_id</li>
<li>Product_id</li>
<li>quantity</li>
</ul>
<p>I need a result with :
in the columns t... | 0debug |
void ff_put_h264_qpel8_mc32_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avc_luma_midh_qrt_8w_msa(src - (2 * stride) - 2, stride, dst, stride, 8, 1);
}
| 1threat |
angular guard not returning data : I'm using google maps API to get maxLat,maxLng,minLat,minLng and then I want to resolve data from the database before create the component, this is for SEO metas and description
the problem is, that the guard is resolving the data, but not resolving the component
my app-routing.mo... | 0debug |
Why JavaScript parses data wrongly? : <p>There are two strange things:</p>
<ul>
<li>day 30 instead of 31?</li>
<li><p>it set 13 as time instead of 00?</p>
<pre><code>new Date('Dec 31, 2019').toISOString()
// '2019-12-30T13:00:00.000Z'
</code></pre></li>
</ul>
<p>Basically what I'm trying to do is to convert original... | 0debug |
static inline void *alloc_code_gen_buffer(void)
{
void *buf = static_code_gen_buffer;
#ifdef __mips__
if (cross_256mb(buf, tcg_ctx.code_gen_buffer_size)) {
buf = split_cross_256mb(buf, tcg_ctx.code_gen_buffer_size);
}
#endif
map_exec(buf, tcg_ctx.code_gen_buffer_size);
return buf;
... | 1threat |
static void qemu_co_queue_next_bh(void *opaque)
{
struct unlock_bh *unlock_bh = opaque;
Coroutine *next;
trace_qemu_co_queue_next_bh();
while ((next = QTAILQ_FIRST(&unlock_bh_queue))) {
QTAILQ_REMOVE(&unlock_bh_queue, next, co_queue_next);
qemu_coroutine_enter(next, NULL);
... | 1threat |
Split an array of strings into other array of stings : I`m making a project, which gets an array of strings from a .txt file, which contains the two names of a person. The problem is that when i try to split the elements from the string "line" and try to give other two strings those values, something happens.
The t... | 0debug |
Why do I get no error when running one codes on multiple terminals? : I'm parsing text files with Python code on Linux.
I never majored in computer, and I don't know what material to look for and which keyword to search for.
Using vim on multiple terminals targeting a file on Linux gives an error. (Maybe because ... | 0debug |
Fragment Tabs inside Fragment : <p>I have in my Main Activity an Action bar navigation using tabs using Fragments (with Material Design), as below which works well, but now I wish to have Tab navigation within my Fragments...</p>
<pre><code>// Add Fragments to Tabs in Main Activity
private void setupViewPager(ViewPage... | 0debug |
Why does this code returns "true"? : <p>I have some weird situation with following code:</p>
<pre><code>$string = '///';
var_dump(!stripos($string, '//'));
</code></pre>
<p>This code section returns <code>true</code>. Now take a look at next code section:</p>
<pre><code>$string = 'a//';
var_dump(!stripos($string, '... | 0debug |
Import GoogleNews-vectors-negative300.bin : <p>I am working on code using the gensim and having a tough time troubleshooting a ValueError within my code. I finally was able to zip GoogleNews-vectors-negative300.bin.gz file so I could implement it in my model. I also tried gzip which the results were unsuccessful. The e... | 0debug |
Python code example for 'square root' time complexity : <p>I'm learning about the different Big O time complexities, and the last one I have is the 'square root', but I just can't seem to find any useful Python code snippets that uses a <em>simple</em> algorithm for demonstrating this time complexity.</p>
<p>I find it... | 0debug |
bool address_space_access_valid(AddressSpace *as, hwaddr addr, int len, bool is_write)
{
MemoryRegion *mr;
hwaddr l, xlat;
rcu_read_lock();
while (len > 0) {
l = len;
mr = address_space_translate(as, addr, &xlat, &l, is_write);
if (!memory_access_is_direct(mr, is_write)... | 1threat |
CSV to JSON using python : I want to populate my json message with data from a CSV file. I want each row to be a "new" json message. I am using python and will connect the the code to an API once done. Some of the data is categorized under "personalinfo" and "carinfo" and I need the correct data to be populated under t... | 0debug |
void event_notifier_cleanup(EventNotifier *e)
{
close(e->fd);
}
| 1threat |
void virtqueue_get_avail_bytes(VirtQueue *vq, unsigned int *in_bytes,
unsigned int *out_bytes,
unsigned max_in_bytes, unsigned max_out_bytes)
{
unsigned int idx;
unsigned int total_bufs, in_total, out_total;
idx = vq->last_avail_idx;
... | 1threat |
dynamic generation of images with js : as a part of coursera exercise, I am trying to show the same photo at 5 different positions of a div tag. Although I used the `img {position: absolute;}`, all photos seem to be stacked above each other.
here is the code I am trying to use in the body tag:
<div i... | 0debug |
I'm getting " no match for 'operator[]' 'std::vector<int> []' and 'std::vector<int>')" in C++ :
vector<int>g2[10000];
for(int u=0;u<N;u++) //N is the number of vertices
{ for(vector<int>::iterator it=v[u].begin();it!=v[u].end();it++)
{g2[v[*it]].push_back(u);}}
//v is of vec... | 0debug |
static int check_protocol_support(bool *has_ipv4, bool *has_ipv6)
{
#ifdef HAVE_IFADDRS_H
struct ifaddrs *ifaddr = NULL, *ifa;
struct addrinfo hints = { 0 };
struct addrinfo *ai = NULL;
int gaierr;
*has_ipv4 = *has_ipv6 = false;
if (getifaddrs(&ifaddr) < 0) {
g_printerr("Fai... | 1threat |
static const char *addr2str(target_phys_addr_t addr)
{
return nr2str(ehci_mmio_names, ARRAY_SIZE(ehci_mmio_names), addr);
}
| 1threat |
Create Git Repo with New Project in Visual Studio 2019 : <p>In Visual Studio 2017, there used to be an option when creating a New Project to "Make a new Git Repository with Solution", or something similar.</p>
<p>I can't seem to find the option in Visual Studio 2019. Has it been removed? I was thinking maybe it requir... | 0debug |
Visitor *validate_test_init(TestInputVisitorData *data,
const char *json_string, ...)
{
Visitor *v;
va_list ap;
va_start(ap, json_string);
v = validate_test_init_internal(data, json_string, &ap);
va_end(ap);
return v;
}
| 1threat |
bool vring_enable_notification(VirtIODevice *vdev, Vring *vring)
{
if (vdev->guest_features & (1 << VIRTIO_RING_F_EVENT_IDX)) {
vring_avail_event(&vring->vr) = vring->vr.avail->idx;
} else {
vring_clear_used_flags(vdev, vring, VRING_USED_F_NO_NOTIFY);
}
smp_mb();
return !vri... | 1threat |
void avcodec_flush_buffers(AVCodecContext *avctx)
{
if(HAVE_PTHREADS && avctx->active_thread_type&FF_THREAD_FRAME)
ff_thread_flush(avctx);
if(avctx->codec->flush)
avctx->codec->flush(avctx);
}
| 1threat |
variable re-identification causing an infinite loop : <p>Why does this code cause an infinite loop:</p>
<pre><code>#include <iostream>
using namespace std;
int main() {
int y = 5;
while (y < 6) {
int y = 7;
cout << y << endl;
}
}
</code></pre>
<p>yet removing the "int"... | 0debug |
html center align the button on media screen : i want to align the button horizontally in same line which is divided in columns in blue color called "Läs mer" in media screen. following is the link
http://www.visbyhemtjanst.se/
i added the following media query:
@media only screen and (max-width: 1450px) {
... | 0debug |
Fixing 'define' is not defined no-undef in react create app third party imports : <p>i have imported momentjs in my react app, after importing react create app is throwing following error restricting the build</p>
<blockquote>
<p>./src/shared_components/quiz-player/node_modules/moment/moment.js<br>
Line 9: 'defin... | 0debug |
I have a csv file with two different formats of date value, how to bring it to a single format : My CSV file looks like this
id date
1602 11/23/2015 14:10
1602 11/23/2015 22:45
1602 18/10/2011 09:19:46 AM
1702 18/10/2011 09:07:33 AM
1863 18/10/2011 09:07:35 AM
1436 18/10/2011 09:07:36 AM
| 0debug |
Blue/Green Deployments with Azure ServiceFabric : <p>I'm currently building an application using the ReliableActors framework on Azure ServiceFabric. As we scale up, I'm looking at doing blue/green deployments. I can see how to do this using a stateless system. Is there's a way to do this using statefull actors?</p>
| 0debug |
query = 'SELECT * FROM customers WHERE email = ' + email_input | 1threat |
cursor.execute('SELECT * FROM users WHERE username = ' + user_input) | 1threat |
What type of ssl certiifcate are acceptable in android? : I found there are three types of ssl certificate, Extended Validation (EV SSL) Certificates,Organization Validated (OV SSL) Certificates,Domain Validated (DV SSL) Certificates, Which of these supported in android?(I am using retrofit to call web services.) | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.