problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor,
int point_transform, int nb_components)
{
int i, mb_x, mb_y, mask;
int bits= (s->bits+7)&~7;
int resync_mb_y = 0;
int resync_mb_x = 0;
point_transform += bits - s->bits;
mask = ((1 <... | 1threat |
static struct mmsghdr *build_l2tpv3_vector(NetL2TPV3State *s, int count)
{
int i;
struct iovec *iov;
struct mmsghdr *msgvec, *result;
msgvec = g_malloc(sizeof(struct mmsghdr) * count);
result = msgvec;
for (i = 0; i < count ; i++) {
msgvec->msg_hdr.msg_name = NULL;
msg... | 1threat |
if input is abcdexyzbwqpoolj the output should be b.find first repeating character : #include<stdio.h>
#include <stdlib.h>
#include<string.h>
int main()
{
int i,j;
char str[1000];
scanf("%s",str);//input the string
for( i=0;i<strlen(str);i++)
{
for(j=i+1;j... | 0debug |
updating the label from changing the value from rating : how do i code peer to peer textboxes connected to label, it is a rating system in asp.net using vb codes, when i rate "1" to textbox1, the textbox2 will appear in the label1 then when i rate 2 in textbox1 the textbox2 value will appear in label2, the same in text... | 0debug |
THEN ARRAY EMPTY PROMISSE : <p>Create a method to fetch time in the firestore by calling the promise, but the array comes empty because the promise has not yet been resolved. How to resolve to call the array only when a getTime () call terminates.</p>
<p>Angular Cli 8</p>
<pre><code>example.service.ts
teste: [];
ge... | 0debug |
detecting if a text is non-English : What is the most accurate method for detecting if a text (specifically Instagram comments) are non-English? Your code could be in any language prefferably Python, php, etc.
$ sudo pip2 install guess_language
>>> from guess_language import guessLanguage
>>> guessLang... | 0debug |
static void vda_decoder_callback(void *vda_hw_ctx,
CFDictionaryRef user_info,
OSStatus status,
uint32_t infoFlags,
CVImageBufferRef image_buffer)
{
struct vda_context *vda_ctx = vda_hw... | 1threat |
Loop ignores limits: How can I handle this corrupt c++ program? : <p>When I execute my program it doesn't terminate. I haven't changed anything and it has been working before. There is clearly something wrong but I don't understand what and why.</p>
<p>In the screenshot you can see the line</p>
<pre><code>for ( size_... | 0debug |
static void guess_palette(DVDSubContext* ctx,
uint32_t *rgba_palette,
uint32_t subtitle_color)
{
static const uint8_t level_map[4][4] = {
{0xff},
{0x00, 0xff},
{0x00, 0x80, 0xff},
{0x00, 0x55, 0xaa, 0xff}... | 1threat |
void HELPER(ipte)(CPUS390XState *env, uint64_t pto, uint64_t vaddr,
uint32_t m4)
{
CPUState *cs = CPU(s390_env_get_cpu(env));
uint64_t page = vaddr & TARGET_PAGE_MASK;
uint64_t pte_addr, pte;
pte_addr = (pto & _SEGMENT_ENTRY_ORIGIN);
pte_addr += (vaddr & VADDR_PX) >>... | 1threat |
Date and time in 24 hours format : <p>I have a date in this format <code>Fri, 15 Jan 2016 15:14:10 +0800</code>, and I want to display time like this <code>2016-01-15 15:14:10</code>.</p>
<p>What I tried is:</p>
<pre><code>$test = 'Fri, 15 Jan 2016 15:14:10 +0800';
$t = date('Y-m-d G:i:s',strtotime($test));
echo $t;
... | 0debug |
Ruby 1.9.3 Digest::SHA1.hexdigest equivalent in Golang : <p>How can I replicate this method from Ruby 1.9.3 to Golang 1.7?</p>
<pre><code>require 'digest/sha2'
text = Digest::SHA1.hexdigest("Hello world")
</code></pre>
| 0debug |
static void apply_delogo(uint8_t *dst, int dst_linesize,
uint8_t *src, int src_linesize,
int w, int h, AVRational sar,
int logo_x, int logo_y, int logo_w, int logo_h,
unsigned int band, int show, int direct)
{
... | 1threat |
How do I make my code look for a name in my list instead of a number? : <p>I have a file called classgrades.txt and it contains student data from a sample class. Each line in the file consists of a student's last name, a space, and a sequence of integers (separated by spaces), which represent scores on assignments.</p>... | 0debug |
Is there a shortcut way to create a new object if an object is null? : <p>I have some simple code:</p>
<pre><code> public static void InitializeScreenTimeStopwatch()
{
if (ScreenTimeStopwatch == null)
ScreenTimeStopwatch = new Stopwatch();
}
</code></pre>
<p>Is there a simple way that t... | 0debug |
Making TabLayout text bold : <p>I'm using the TabLayout from the Android Design Support library and want to style its text (title). Specifically making it bold. How to achieve that in <strong>XML</strong> only?</p>
<pre><code><android.support.design.widget.TabLayout
android:id="@+id/sliding_tabs"
android:layout_wid... | 0debug |
static void pmac_ide_writeb (void *opaque,
target_phys_addr_t addr, uint32_t val)
{
MACIOIDEState *d = opaque;
addr = (addr & 0xFFF) >> 4;
switch (addr) {
case 1 ... 7:
ide_ioport_write(&d->bus, addr, val);
break;
case 8:
case 22:
... | 1threat |
static void single_quote_string(void)
{
int i;
struct {
const char *encoded;
const char *decoded;
} test_cases[] = {
{ "'hello world'", "hello world" },
{ "'the quick brown fox \\' jumped over the fence'",
"the quick brown fox ' jumped over the fence" },
... | 1threat |
static void mirror_set_speed(BlockJob *job, int64_t speed, Error **errp)
{
MirrorBlockJob *s = container_of(job, MirrorBlockJob, common);
if (speed < 0) {
error_setg(errp, QERR_INVALID_PARAMETER, "speed");
return;
}
ratelimit_set_speed(&s->limit, speed / BDRV_SECTOR_SIZE, SLICE_... | 1threat |
Adding buttons to toolbar programmatically in swift : <p>I'm having a hard time adding a button to the toolbar in swift, below you can see an image of the toolbar that I'm after, unfortunately even though I have it designed in my Storyboard file, it doesn't show up when setting the toolbar to be visible.</p>
<p>The w... | 0debug |
static int rtmp_open(URLContext *s, const char *uri, int flags)
{
RTMPContext *rt = s->priv_data;
char proto[8], hostname[256], path[1024], auth[100], *fname;
char *old_app, *qmark, fname_buffer[1024];
uint8_t buf[2048];
int port;
AVDictionary *opts = NULL;
int ret;
if (rt->li... | 1threat |
static void RENAME(yuv2rgb555_1)(SwsContext *c, const uint16_t *buf0,
const uint16_t *ubuf0, const uint16_t *ubuf1,
const uint16_t *vbuf0, const uint16_t *vbuf1,
const uint16_t *abuf0, uint8_t *dest,
... | 1threat |
def ap_sum(a,n,d):
total = (n * (2 * a + (n - 1) * d)) / 2
return total | 0debug |
Do without look error : When running this code I get a error that is "loop without do". I want if "case vbno" is selected then it returns to the original input box. If it the user selects "case vbyes" I want it to highlight then cell then loop back to do and return to original input box. If cancel is selected I want it... | 0debug |
void bdrv_invalidate_cache(BlockDriverState *bs, Error **errp)
{
BdrvChild *child;
Error *local_err = NULL;
int ret;
if (!bs->drv) {
return;
}
if (!(bs->open_flags & BDRV_O_INACTIVE)) {
return;
}
bs->open_flags &= ~BDRV_O_INACTIVE;
if (bs->drv->bdrv... | 1threat |
static void mcf_fec_do_tx(mcf_fec_state *s)
{
uint32_t addr;
mcf_fec_bd bd;
int frame_size;
int len;
uint8_t frame[FEC_MAX_FRAME_SIZE];
uint8_t *ptr;
DPRINTF("do_tx\n");
ptr = frame;
frame_size = 0;
addr = s->tx_descriptor;
while (1) {
mcf_fec_read_bd(&... | 1threat |
Swift's JSONDecoder with multiple date formats in a JSON string? : <p>Swift's <code>JSONDecoder</code> offers a <code>dateDecodingStrategy</code> property, which allows us to define how to interpret incoming date strings in accordance with a <code>DateFormatter</code> object.</p>
<p>However, I am currently working wit... | 0debug |
returning a number to it's double value : i'm creating a program to evaluate the number inputted for example i inputted 5 the function should be able to return the number 5 = 500 or 4 = 400, 6 = 600, 10 = 1000 and so on.
this is what i've done so far.
public int NumberEval(int theNumber)
{
... | 0debug |
void HELPER(wsr_lbeg)(uint32_t v)
{
if (env->sregs[LBEG] != v) {
tb_invalidate_phys_page_range(
env->sregs[LEND] - 1, env->sregs[LEND], 0);
env->sregs[LBEG] = v;
}
}
| 1threat |
What programming languages used to create terminal apps? : <p>What are the languages that used to build apps like:
ls, curl, nmap, htop
and other homebrew apps like: youtube-dl.</p>
<p>I'm wonder about; if I want to build an app to run it through terminal and published in homebrew, what language should I used?</p>
| 0debug |
static int quant_psnr8x8_c(MpegEncContext *s, uint8_t *src1,
uint8_t *src2, ptrdiff_t stride, int h)
{
LOCAL_ALIGNED_16(int16_t, temp, [64 * 2]);
int16_t *const bak = temp + 64;
int sum = 0, i;
av_assert2(h == 8);
s->mb_intra = 0;
s->pdsp.diff_pixels(temp, ... | 1threat |
How to verify the mouse hover message in selenium : I have tried to print the mouse hover message by using below code
**Code used**
'WebElement element = driver.findElement(By.xpath("/html/body/div/form/div/div/div/div/div[1]/div/div/div"));
Actions action = new Actions(driver);
action.moveToElement(... | 0debug |
How do you make the computer select random elements from an array? : <p>I tried looking at other similar topics about this issue, but none of them solved my issue. I have basically made an array, that consists of animal names, and I am trying to tell the computer to select a random animal name, but I don't know how to ... | 0debug |
int bdrv_can_snapshot(BlockDriverState *bs)
{
BlockDriver *drv = bs->drv;
if (!drv || bdrv_is_removable(bs) || bdrv_is_read_only(bs)) {
return 0;
}
if (!drv->bdrv_snapshot_create) {
if (bs->file != NULL) {
return bdrv_can_snapshot(bs->file);
}
retu... | 1threat |
How to force class template argument deduction when constructing a class in its own member functions? : <p>Consider following code:</p>
<pre><code>struct A {};
template <typename T> struct B
{
B(T) {}
auto foo() {return B(A{});} // error: no matching function for call to 'B<int>::B(A)'
};
auto fo... | 0debug |
wiremock equivalent for websockets? : <p>I have used wiremock for testing http calls, but my current work requires websockets and I was wondering if anyone has found/used a library for standing up a localhost that will create a websocket connection that you can mock responses. </p>
<p>I have googled it but nothing see... | 0debug |
WordPress post tiles in custom PHP application : Is it possible to pull tiles of blog posts into my php based website outside of the directory i'm hosting wordpress in?
Can i use WordPress Post Title and Post Content in my PHP applications.
I have tried this one:
<?php
include('/wordpress/wp-load.php... | 0debug |
Google API Client "refresh token must be passed in or set as part of setAccessToken" : <p>I am currently facing a very strange problem, indeed I've been following this very same guide (<a href="https://developers.google.com/google-apps/calendar/quickstart/php" rel="noreferrer">https://developers.google.com/google-apps/... | 0debug |
How to index a pdf file in Elasticsearch 5.0.0 with ingest-attachment plugin? : <p>I'm new to Elasticsearch and I read here <a href="https://www.elastic.co/guide/en/elasticsearch/plugins/master/mapper-attachments.html">https://www.elastic.co/guide/en/elasticsearch/plugins/master/mapper-attachments.html</a> that the map... | 0debug |
Diagnostic Tools in Visual Studio 2017 : <p>I've installed Visual Studio 2017 and I was playing with Diagnostic Tools. suddenly, after some restarts, the window does not open anymore and I don't figure out how to do it. Anyone knows how can I open it again ?</p>
| 0debug |
'System.Drawing.Color' does not contain a definition for 'FromARgb' : <p>I have added System.Drawing as a reference, yet this code seems to fail on the line where I declare the new color</p>
<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
u... | 0debug |
Need HTML & CSS for simple 3 buttons in a DIV : <p>I have created a webpage with a google map embedded and need some code for 3 buttons in a div below the map, i have tried a few things yet nothing seems to work, they need to be inline e.g [BUTTON 1] [BUTTON 2] [BUTTON 3]</p>
| 0debug |
For what is the method openFileOutput() used for Android Studio? : I have this snippet of code. Can someone please help what '0' attribute in openFileOutput stands for in the following code?
`public void Save(String fileName) {
try {
OutputStreamWriter out =
new OutputStreamWriter(openFileOu... | 0debug |
static inline int check_physical(CPUPPCState *env, mmu_ctx_t *ctx,
target_ulong eaddr, int rw)
{
int in_plb, ret;
ctx->raddr = eaddr;
ctx->prot = PAGE_READ | PAGE_EXEC;
ret = 0;
switch (env->mmu_model) {
case POWERPC_MMU_32B:
case POWERPC_MMU_601:
... | 1threat |
void qdev_init_gpio_out_named(DeviceState *dev, qemu_irq *pins,
const char *name, int n)
{
NamedGPIOList *gpio_list = qdev_get_named_gpio_list(dev, name);
assert(gpio_list->num_in == 0 || !name);
assert(gpio_list->num_out == 0);
gpio_list->num_out = n;
gpio_list->out = ... | 1threat |
Get length of json array in SQL Server 2016 : <p>You know about the new JSON_ support in SQL Server 2016 so
let's say I have this data in a row</p>
<pre><code>{
"BaseBoarding": 1,
"PriceLineStrategy": "PerPersonPerNight",
"Currency": "EUR",
"BasePriceLineList": [
{
"RoomTypeId": 1,
"PeriodId": ... | 0debug |
static int ipvideo_decode_block_opcode_0x8(IpvideoContext *s, AVFrame *frame)
{
int x, y;
unsigned char P[4];
unsigned int flags = 0;
P[0] = bytestream2_get_byte(&s->stream_ptr);
P[1] = bytestream2_get_byte(&s->stream_ptr);
if (P[0] <= P[1]) {
for (y = 0; y < 16; y++) {
... | 1threat |
static size_t save_page_header(RAMState *rs, RAMBlock *block, ram_addr_t offset)
{
size_t size, len;
if (block == rs->last_sent_block) {
offset |= RAM_SAVE_FLAG_CONTINUE;
}
qemu_put_be64(rs->f, offset);
size = 8;
if (!(offset & RAM_SAVE_FLAG_CONTINUE)) {
len = strlen... | 1threat |
Can not insert data codeigniter : Why i can't insert data use form?
im sorry i can't share my code in here, because my coding is too long
**My View Form**
<form method="post" enctype="multipart/form-data" action="<?php echo base_url(); ?>admin/Ca_pendaftar/tambah" data-parsley-validate class="form-horizon... | 0debug |
static void notdirty_mem_writel(void *opaque, target_phys_addr_t ram_addr,
uint32_t val)
{
int dirty_flags;
dirty_flags = phys_ram_dirty[ram_addr >> TARGET_PAGE_BITS];
if (!(dirty_flags & CODE_DIRTY_FLAG)) {
#if !defined(CONFIG_USER_ONLY)
tb_invalidate_phys_pag... | 1threat |
C# Sorting String Array Items by the numbers inside : I'm trying to sort string array items which includes numbers.
You can also think about it for ListBox items. For example, our items are:
London 4, Berlin 6, Paris 2, Roma 7, Istanbul 5.
Sorting codes will return to us:
Roma 7, Berlin 6, Istanbul 5, Londo... | 0debug |
Gradle - add directory to classpath : <p>My application requires that a <code>\config</code> directory be available on the classpath when it looks for configurations files under the directory. I currently have dependencies configured like so, though this is probably not the correct way to make a directory available to ... | 0debug |
I'm trying to write VB code in Excel such when I paste a image in worksheet1 is automatically pastes is to worksheet2 : I would like a user to paste an image into a worksheet and automatically have it pasted to a second worksheet. I have found some VB code that gets me close, but can't figure out how to finish it. Th... | 0debug |
How to apply on click action on images in javascript/jquery? : <p>I have a <a href="https://jsfiddle.net/hpmawvy0/embedded/result/" rel="nofollow noreferrer">fiddle</a> which I have replicated by seeing the screenshot below:</p>
<p><a href="https://i.stack.imgur.com/D4nY5.png" rel="nofollow noreferrer"><img src="https... | 0debug |
void *qemu_ram_mmap(int fd, size_t size, size_t align, bool shared)
{
size_t total = size + align;
void *ptr = mmap(0, total, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
size_t offset = QEMU_ALIGN_UP((uintptr_t)ptr, align) - (uintptr_t)ptr;
void *ptr1;
if (ptr == MAP_FAILED) ... | 1threat |
What's the meaning of function eval() in torch.nn module : <p>Official comment shows that "This has any effect only on modules such as Dropout or BatchNorm." But I don't understand its implementation.</p>
| 0debug |
Enforcing the type of medium on a Virtual Memory system : <p>Suppose I'm designing a software application that requires high bandwidth / low latency memory transfers to operate properly.
My OS uses Virtual Memory addressing.</p>
<p>Is there a way to enforce the variables (that I choose) to be located in DDR and not on... | 0debug |
Difference between <script async> and $.ajax : <p>Is there any major difference? </p>
<p>Does one allow additional functionality?</p>
| 0debug |
datables alert with aLengthMenu : I use the plugin https://datatables.net/
i want to add onclick on aLengthMenu and show the chosen value with alert here is my code: $(document).ready(function() { var oTable = $('# Table_id').DataTable({ 'iDisplayLength': '50', "aLengthMenu": [ [20, 50, 100, 200], [20, 50, 100, 200] ... | 0debug |
segmentation of an image using frequencies (c++ or python) : I would like to segment this image [image to segment][1] (I want only the bees, I have 100 images like that not labelled). I think that the best way to do that is to use frenquency domai because the bees seems to have specific frequencies. But I'm not sure ho... | 0debug |
static int init_filters(const char *filters_descr)
{
char args[512];
int ret;
AVFilter *abuffersrc = avfilter_get_by_name("abuffer");
AVFilter *abuffersink = avfilter_get_by_name("abuffersink");
AVFilterInOut *outputs = avfilter_inout_alloc();
AVFilterInOut *inputs = avfilter_inout_allo... | 1threat |
I want to increment the value of age in a table every 24hours : <p>I have a column "age" in my database.table
So here it goes the moment i input a name the age will increment every day so ill get its day old as age
Pls help</p>
| 0debug |
BlockAIOCB *bdrv_aio_ioctl(BlockDriverState *bs,
unsigned long int req, void *buf,
BlockCompletionFunc *cb, void *opaque)
{
BlockAIOCBCoroutine *acb = qemu_aio_get(&bdrv_em_co_aiocb_info,
bs, cb, opaque);
Coroutine *co;
acb->need_bh = true... | 1threat |
Applicative is to monad what X is to comonad : <p>Can we solve this equation for X ?</p>
<blockquote>
<p>Applicative is to monad what X is to comonad</p>
</blockquote>
| 0debug |
static void pc_init1(ram_addr_t ram_size,
const char *boot_device,
const char *kernel_filename,
const char *kernel_cmdline,
const char *initrd_filename,
const char *cpu_model,
int pci_enab... | 1threat |
int qemu_sem_timedwait(QemuSemaphore *sem, int ms)
{
int rc = WaitForSingleObject(sem->sema, ms);
if (rc == WAIT_OBJECT_0) {
return 0;
}
if (rc != WAIT_TIMEOUT) {
error_exit(GetLastError(), __func__);
}
return -1;
}
| 1threat |
java.util.HashMap cannot be cast to java.util.Date : <p>I am trying to get a timestamp from cloud firestore and store it in a date variable but I am getting this exception :</p>
<pre><code>java.util.HashMap cannot be cast to java.util.Date
</code></pre>
<p>this is the code for getting the value from the cloud firesto... | 0debug |
Will it cause any issue if I use multiple Facebook Pixel in one page? : <p>I would like to include both my Facebook Pixel id and customer's Facebook Pixel id in one page, so both of us can have some insight about users, and customer can also create ADs for the page if he or she wants to.</p>
<p>I already test tracking... | 0debug |
static int decode_info_header(NUTContext *nut)
{
AVFormatContext *s = nut->avf;
AVIOContext *bc = s->pb;
uint64_t tmp, chapter_start, chapter_len;
unsigned int stream_id_plus1, count;
int chapter_id, i;
int64_t value, end;
char name[256], str_value[1024], type_str[256];
const... | 1threat |
Matplotlib: how to adjust space between legend markers and labels? : <p>I want to adjust space between legend markers and labels. Sometime the space is too much as default. Does anyone know how to do this? </p>
<p>Thanks.</p>
| 0debug |
void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src)
{
dst->pts = src->pts;
dst->pos = src->pos;
switch (src->type) {
case AVMEDIA_TYPE_VIDEO: {
if (dst->video->qp_table)
av_freep(&dst->video->qp_table);
copy_video_p... | 1threat |
Quorum Blockchain Chat Forum : <p>I am new to Quorum blockchain. I have tried to find Quorum's online discussion forums where I can clarify Quorum related queries, but I could not find any. Please someone provide the URLs for the same. Thanks</p>
| 0debug |
HOW TO: Tell a module which region the view to register to at runtime : Is it possible to pass in the regionname to the module so it know which region the view should register with?
I see in many code example that the regionName is hardcoded in the module initialize method.
What I want to do is have the SHELL pas... | 0debug |
Obtaining the value of SON query into PHP : Hi please am trying to assign the value of town_B to a variable in PHP.
I tried using the mothod below but no success. Please any suggestions will be appreciated
$varx = $update["result"]["parameters"]["town_two"];
Below is the JSON response
{
"id": "86726c... | 0debug |
Viewing Unit Test and Coverage Reports Generated in AWS CodeBuild : <p>I am using AWS CodeBuild to run unit tests for my python project using pytest. I am using the --junitxml argument and the pytest-cov package to generate test reports and coverage reports that I've listed as artifacts in my buildspec.yml.</p>
<p>I'... | 0debug |
how to use multiple if conditions in AWK? : i am quite new to awk so i have a following query.
i have below input file which i need to parse.
input.csv
"11111","TRUE","aa"
"456789","TRUE","aa;bb;cc"
"2345","TRUE","bb"
"434566","","cc"
**i am trying to create an awk command which should give me foll... | 0debug |
WPF String formatting the contents of a list : <p>I have a list box which I populate with a list of type Foo, which contains the following properties: Name and ID.</p>
<p>I am binding it to a list box control. The problem is that I am getting "<strong>MyNamespace.Model.Foo</strong>" over an over in my list box. Is it ... | 0debug |
int ff_cmap_read_palette(AVCodecContext *avctx, uint32_t *pal)
{
int count, i;
if (avctx->bits_per_coded_sample > 8) {
av_log(avctx, AV_LOG_ERROR, "bit_per_coded_sample > 8 not supported\n");
return AVERROR_INVALIDDATA;
}
count = 1 << avctx->bits_per_coded_sample;
if (avc... | 1threat |
iOS - How to ignore the duplicates in NSMutableArray. : <p>For example I have an array = [12,13,13,13,14,15,16,16,17];</p>
<p>and my output will be 12,13,14,15,16,17.</p>
<p>Please help me on this.</p>
| 0debug |
static int jpeg_read_close(AVFormatContext *s1)
{
JpegContext *s = s1->priv_data;
av_free(s);
return 0;
}
| 1threat |
How to handle errors in fetch() responses with Redux-Saga? : <p>I try to handle <code>Unauthorized</code> error from server using redux-saga. This is my saga:</p>
<pre><code>function* logIn(action) {
try {
const user = yield call(Api.logIn, action);
yield put({type: types.LOG_IN_SUCCEEDED, user});
} catch ... | 0debug |
static int mov_write_udta_tag(ByteIOContext *pb, MOVContext* mov,
AVFormatContext *s)
{
int pos = url_ftell(pb);
int i;
put_be32(pb, 0);
put_tag(pb, "udta");
mov_write_meta_tag(pb, mov, s);
for (i=0; i<MAX_STREAMS; i++) {
if(mov->... | 1threat |
def lateralsurface_cuboid(l,w,h):
LSA = 2*h*(l+w)
return LSA | 0debug |
rgb48funcs(rgb, LE, PIX_FMT_RGB48LE)
rgb48funcs(rgb, BE, PIX_FMT_RGB48BE)
rgb48funcs(bgr, LE, PIX_FMT_BGR48LE)
rgb48funcs(bgr, BE, PIX_FMT_BGR48BE)
#define input_pixel(i) ((origin == PIX_FMT_RGBA || origin == PIX_FMT_BGRA || \
origin == PIX_FMT_ARGB || origin == PIX_FMT_ABGR) ? AV_RN32A(... | 1threat |
static int rv30_decode_intra_types(RV34DecContext *r, GetBitContext *gb, int8_t *dst)
{
int i, j, k;
for(i = 0; i < 4; i++, dst += r->intra_types_stride - 4){
for(j = 0; j < 4; j+= 2){
int code = svq3_get_ue_golomb(gb) << 1;
if(code >= 81*2){
av_log(r->s.... | 1threat |
PHP: Get the days name in lowercase? : <p>I'm trying to get the days name in PHP which suppose to be a simple task.</p>
<p>I can simply do this:</p>
<pre><code>echo date('L');
</code></pre>
<p>This will print <code>Sunday</code> <-- Today's name.</p>
<p>However, I need to know if its possible to get the same day... | 0debug |
static void fd_put_buffer(void *opaque, const uint8_t *buf,
int64_t pos, int size)
{
QEMUFileFD *s = opaque;
ssize_t len;
do {
len = write(s->fd, buf, size);
} while (len == -1 && errno == EINTR);
if (len == -1)
len = -errno;
if (... | 1threat |
Angular *ngIf variable with async pipe multiple conditions : <p>There's quite good doc of using *ngIf in Angular: <a href="https://angular.io/api/common/NgIf" rel="noreferrer">https://angular.io/api/common/NgIf</a>
But, is that possible to have *ngIf async variable and multiple checks on that?
Something like:</p>
<pre... | 0debug |
static void bonito_writel(void *opaque, target_phys_addr_t addr,
uint64_t val, unsigned size)
{
PCIBonitoState *s = opaque;
uint32_t saddr;
int reset = 0;
saddr = (addr - BONITO_REGBASE) >> 2;
DPRINTF("bonito_writel "TARGET_FMT_plx" val %x saddr %x\n", addr, val,... | 1threat |
static void scsi_generic_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(klass);
sc->realize = scsi_generic_realize;
sc->unrealize = scsi_unrealize;
sc->alloc_req = scsi_new_request;
sc->parse_cdb ... | 1threat |
int s390_ccw_cmd_request(ORB *orb, SCSW *scsw, void *data)
{
S390CCWDeviceClass *cdc = S390_CCW_DEVICE_GET_CLASS(data);
if (cdc->handle_request) {
return cdc->handle_request(orb, scsw, data);
} else {
return -ENOSYS;
}
}
| 1threat |
how to get data from API in vuex using axios? : <p>I have data taken from API laravel, and here is my code in state.js</p>
<pre><code>import axios from 'axios'
import {apiPostGet} from '../api/api'
export default {
data: axios({
method: 'GET',
url: apiPostGet('Kategori')
}).then(
response => {
... | 0debug |
def move_zero(num_list):
a = [0 for i in range(num_list.count(0))]
x = [ i for i in num_list if i != 0]
x.extend(a)
return (x) | 0debug |
JNI How to allocate memory for object array dynamically : I am working on JNI with C language. Here i have created a object array of size 4000. According to my requirements the array size has to grown dynamically. How can i allocate memory dynamically. I have tried using malloc. But i cant achieve this.
OriginalArra... | 0debug |
static bool kvmppc_is_pr(KVMState *ks)
{
return kvm_check_extension(ks, KVM_CAP_PPC_GET_PVINFO) != 0;
}
| 1threat |
AppCompatSpinner vs android.widget.Spinner for app with min SDK version 14 : <p>I am developing application with minimum SDK version 14 Ice-cream sandwitch and targeted version is Android Marshmallow.</p>
<p>DO I need to use AppCompatSpinner or normal spinner will work on ICS devices with all material look and feel?</... | 0debug |
how to access the rows and able to move back and forth in spark dataframes sing scala : I am trying to solve following problem:
input dataframe :
+------+------+------------+
|emp |Group |Spouse |
+------+------+------------+
|John |L1 |Dana |
|Mary |L1 |Rick |
|***Harry*** |L3... | 0debug |
static Visitor *validate_test_init_internal(TestInputVisitorData *data,
const char *json_string,
va_list *ap)
{
validate_teardown(data, NULL);
data->obj = qobject_from_jsonv(json_string, ap);
g_assert(data->obj);... | 1threat |
static void vfio_intp_interrupt(VFIOINTp *intp)
{
int ret;
VFIOINTp *tmp;
VFIOPlatformDevice *vdev = intp->vdev;
bool delay_handling = false;
qemu_mutex_lock(&vdev->intp_mutex);
if (intp->state == VFIO_IRQ_INACTIVE) {
QLIST_FOREACH(tmp, &vdev->intp_list, next) {
if... | 1threat |
static int format_name(char *buf, int buf_len, int index)
{
const char *proto, *dir;
char *orig_buf_dup = NULL, *mod_buf_dup = NULL;
int ret = 0;
if (!av_stristr(buf, "%v"))
return ret;
orig_buf_dup = av_strdup(buf);
if (!orig_buf_dup) {
ret = AVERROR(ENOMEM);
... | 1threat |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.