problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
void ff_simple_idct248_put(uint8_t *dest, int line_size, DCTELEM *block)
{
int i;
DCTELEM *ptr;
ptr = block;
for(i=0;i<4;i++) {
BF(0);
BF(1);
BF(2);
BF(3);
BF(4);
BF(5);
BF(6);
BF(7);
ptr += 2 * 8;
}
... | 1threat |
RegEx not match if matched in previous group : I have some HTML pages and I want to match some pattern but not in comment.
So let's say i have for example following part of page:
<div>
<div>Hello $world$</div>
<div>Another text <!-- $example$--></div>
</div>
<div>
How are $you$?
... | 0debug |
static int ebml_parse_elem(MatroskaDemuxContext *matroska,
EbmlSyntax *syntax, void *data)
{
static const uint64_t max_lengths[EBML_TYPE_COUNT] = {
[EBML_UINT] = 8,
[EBML_FLOAT] = 8,
[EBML_STR] = 0x1000000,
[EBML_UTF8] = 0x1000000,
... | 1threat |
static int colo_packet_compare_tcp(Packet *spkt, Packet *ppkt)
{
struct tcphdr *ptcp, *stcp;
int res;
trace_colo_compare_main("compare tcp");
ptcp = (struct tcphdr *)ppkt->transport_header;
stcp = (struct tcphdr *)spkt->transport_header;
if (ntohs(ppkt->ip->ip_of... | 1threat |
How to print data from database? : <p>I am supposed to create webpage with a list of literature, where admin will maintain the list and users will be able to choose the books and print a list. I already have the web app done, but I have no idea, how to print it. Definetly some button, which will print just the data in ... | 0debug |
Mounting Volume as part of a multi-stage build : <p>How can I mount a volume to store my .m2 repo so I don't have to download the internet on every build?</p>
<p>My build is a Multi stage build:</p>
<pre><code>FROM maven:3.5-jdk-8 as BUILD
COPY . /usr/src/app
RUN mvn --batch-mode -f /usr/src/app/pom.xml clean packag... | 0debug |
import re
def replace_specialchar(text):
return (re.sub("[ ,.]", ":", text))
| 0debug |
Simulate display: inline in React Native : <p>React Native doesn't support the CSS <code>display</code> property, and by default all elements use the behavior of <code>display: flex</code> (no <code>inline-flex</code> either). Most non-flex layouts can be simulated with flex properties, but I'm flustered with inline te... | 0debug |
Why Does code.runnable.com Allow Me to Change a Variable's Value in Java? : <p>I heard that Java integers are <strong>pass by value</strong>, so why does the following code work in code.runnable.com? </p>
<pre><code>public class HelloWorld {
public static void main(String[] args) {
int number = 0;
number = 2... | 0debug |
how to write standard deviation? : do i calculate my standard deviation in the loop. also i know the formula for standard deviation just not how to get it to accept the numbers from the users. im new to programming so explain everything. also dont mind my sorry attempt at trying to write out Standard deviation formula ... | 0debug |
static int xenfb_map_fb(struct XenFB *xenfb)
{
struct xenfb_page *page = xenfb->c.page;
char *protocol = xenfb->c.xendev.protocol;
int n_fbdirs;
xen_pfn_t *pgmfns = NULL;
xen_pfn_t *fbmfns = NULL;
void *map, *pd;
int mode, ret = -1;
pd = page->pd;
mode = sizeof(unsi... | 1threat |
static int cris_mmu_enabled(uint32_t rw_gc_cfg)
{
return (rw_gc_cfg & 12) != 0;
}
| 1threat |
Regular expresion : I'm trying to understand regex, and I want to prevent entering numbers starting with 550, if length is 8, or starting with 393 if length is 5.
Tried it here (https://regex101.com/) and the correct expression is shown below
^((?!550)\d{8}|(?!393)\d{5})$
but the mask in my code works in ... | 0debug |
static void vp9_superframe_close(AVBSFContext *ctx)
{
VP9BSFContext *s = ctx->priv_data;
int n;
for (n = 0; n < s->n_cache; n++)
av_packet_free(&s->cache[n]);
}
| 1threat |
I am trying to write a haskell function that takes a list of dates and a month and returns how many dates in the list match the given month : this is what I have so far and it doesn't seem to be working
numInMonth :: [(Int,Int,Int)] -> Int -> Int
numInMonth x [] = x
numInMonth x (y:ys)
minList1 (x:xs) = c... | 0debug |
document.write('<script src="evil.js"></script>'); | 1threat |
RxJava 2.0 - How to convert Observable to Publisher : <p>How to convert Observable to Publisher in RxJava version 2?</p>
<p>In the first version we have the <a href="https://github.com/ReactiveX/RxJavaReactiveStreams" rel="noreferrer">https://github.com/ReactiveX/RxJavaReactiveStreams</a> project that do exactly what ... | 0debug |
How to configure exim4 to send & receive email on a VPS using my own domain name? : <p>I just bought a new "public cloud" to put my new website on it.</p>
<p>This public cloud is in "advanced zone", which means that every instance I deploy is in a NAT network with private IP (10.1.1.x), and there is a firewall in fron... | 0debug |
Amazon Redhisft: Re-occurring date for public holiday table : I am trying to create a table for the public holiday for the countries we deal with. However, I want the dates to be re-occurring so that I can apply a date key for each.
For example, if I have 2018-06-16 and 2018-12-25 as a public holiday, then I want th... | 0debug |
static int decode_chunks(AVCodecContext *avctx,
AVFrame *picture, int *got_output,
const uint8_t *buf, int buf_size)
{
Mpeg1Context *s = avctx->priv_data;
MpegEncContext *s2 = &s->mpeg_enc_ctx;
const uint8_t *buf_ptr = buf;
const uint8_t *buf_end ... | 1threat |
static av_cold int mss2_decode_init(AVCodecContext *avctx)
{
MSS2Context * const ctx = avctx->priv_data;
MSS12Context *c = &ctx->c;
int ret;
c->avctx = avctx;
avctx->coded_frame = &ctx->pic;
if (ret = ff_mss12_decode_init(c, 1, &ctx->sc[0], &ctx->sc[1]))
return ret;
c->pal_s... | 1threat |
cant define a variable in html : guys i cant define variable in html .. here is my code
sb.appendHtmlConstant("<div id='Button +"i"' class=\"" + getClass(c.getIndex()) + "\">");
here i cant define "i" to be a variable .. any help please ??
thanks a lot
| 0debug |
Manipulating css on iframe : i have `iframe` embed external website to my website, but text, button and content very large.
how to manipulate the content?
content like
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/XfO5l.png
my code:
<div class="row-container">
... | 0debug |
How to get the duration of video using cv2 : <p>I can only get the number of frames <code>CAP_PROP_FRAME_COUNT</code> using CV2.</p>
<p>However, I cannot find the parameter to get the duration of the video using cv2. </p>
<p>How to do that? </p>
<p>Thank you very much.</p>
| 0debug |
How to check for an intermediate page while Automating in Selenium : <p>There is an option to turn the intermediate page ON/OFF.
How to navigate to the page if the page is present. If not present how to continue the code.</p>
| 0debug |
can i reference a random function's values with a list? : i have a list of different characters, three of which are randomly chosen each time i run the program. if my functions look like this (with each string in the list referencing to these functions)
`public void Character1()
{ agility = UnityEngine.Rand... | 0debug |
JQuery: How to find an input with a value that is defined in a variable : <p>I have a list of HTML radio buttons each with their own value (say 1 - 10)</p>
<p>I also have a hidden field with a set value (say 5)</p>
<p>I want to find the input that has the value of the hiddenfield</p>
<pre><code>$('.block').each(func... | 0debug |
Is it possible to create an object with a space in python? : <p>Is it possible to create an object named 'Stack Overflow' and is valued 5.</p>
<p>For example:</p>
<pre><code>stack overflow = 5
</code></pre>
| 0debug |
static void realview_init(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)
{
CPUState *env;
ram_addr_t ram_offset;
DeviceState *dev;... | 1threat |
adb touchscreen swipe fail in a call : <p>I'm trying to simulate a auto video call with adb using touches and swipes.
The scenario: </p>
<p>Device1 audio calls Device2, Device2 answers, Device1 asks for video call(bidirectional), Device2 tries to answer and fails.
The wired thing is that sometimes it works but most of... | 0debug |
Self-update / shadow-copy with Asp.Net Core : <p>I'm writing a Asp.Net Core application which should be able to update itself (replace its own binaries while running).</p>
<p><a href="https://msdn.microsoft.com/en-us/library/ms404279.aspx" rel="noreferrer">This MSDN article</a> describes shadow copying with the classi... | 0debug |
join mysql with null value : I have sample data in the following table on MySQL:
Id value Source
===== === ====
1 24 F
2 20 M
3 10 F
And I want to join with this table
Id value Sourc... | 0debug |
static void av_estimate_timings_from_bit_rate(AVFormatContext *ic)
{
int64_t filesize, duration;
int bit_rate, i;
AVStream *st;
if (ic->bit_rate == 0) {
bit_rate = 0;
for(i=0;i<ic->nb_streams;i++) {
st = ic->streams[i];
bit_rate += st->codec->bit_... | 1threat |
Laravel find all data from child_category table using Eloquent ORM with related category & subcategory name? : I have three table:
category
subcategory
child_category
need all data from child_category table using Eloquent ORM with related category & subcategory name.
| 0debug |
static inline void idct4col_put(uint8_t *dest, int line_size, const int16_t *col)
{
int c0, c1, c2, c3, a0, a1, a2, a3;
a0 = col[8*0];
a1 = col[8*2];
a2 = col[8*4];
a3 = col[8*6];
c0 = ((a0 + a2) << (CN_SHIFT - 1)) + (1 << (C_SHIFT - 1));
c2 = ((a0 - a2) << (CN_SHIFT - 1)) + (1 << ... | 1threat |
Coversion of the regular expression of VBA code to C# code : sFileText = Replace(sFileText, vbCrLf & " ", "|").
Can anyone tell me how to convert this regular expression of VBA Code to C# code? | 0debug |
C passing pointet to pointer in function : I am very confused... I am reading about pointer to pointer and now I think I know less than previous.
Passing double pointer is needed to change value of that pointer but if we have let's say pointer to some structure and we want to change value of some its member we use pas... | 0debug |
Python regex wont match or escape backslashes : <p>So I'm trying to run through a file and match to a line in python, I understand regex but for some reason I can't get this one to work. </p>
<pre><code> p1 = re.compile("\s*(service_description)\s*([A-Z]:\\\s*Drive\s*Space)")
for x in cfg: #cfg is an array of everyli... | 0debug |
Iterating over object values in JavaScript : <p>What is the most efficient / elegant way to iterate object values in JavaScript? </p>
<p>As an example, assume the following object: <code>let myObj = {p1: "v1", p2: "v2"}</code></p>
| 0debug |
sql query with TextBox1.Text Id value in where condition in Appsettings of C# asp.net : I want to use sql query in appsettings C# with TextBox.Text value(which from .cs code)in condition.
For example:
<add key="test" value="Select * from table where id=Textbox1.Text" />
Is it possible ?
| 0debug |
static int pc_rec_cmp(const void *p1, const void *p2)
{
PCRecord *r1 = *(PCRecord **)p1;
PCRecord *r2 = *(PCRecord **)p2;
if (r1->count < r2->count)
return 1;
else if (r1->count == r2->count)
return 0;
else
return -1;
}
| 1threat |
React native - connection has no connection handler error meaning? : <p>I created a new react project and when I run it on iOS from xcode, the console gives me this:</p>
<pre><code>2017-05-19 23:25:34.119 [info][tid:main][RCTBatchedBridge.m:77] Initializing <RCTBatchedBridge: 0x6100001a6c80> (parent: <RCTBrid... | 0debug |
How to keep scroll position using flatlist when navigating back in react native ? : <p>I am new to react native. I am facing problem in maintaining the position of flatlist when navigating forward and then come back to that screen. </p>
<p>Current behavior<br>
When navigating forward and then back, the scroll positio... | 0debug |
static int decode_mb_cabac(H264Context *h) {
MpegEncContext * const s = &h->s;
const int mb_xy= s->mb_x + s->mb_y*s->mb_stride;
int mb_type, partition_count, cbp = 0;
int dct8x8_allowed= h->pps.transform_8x8_mode;
s->dsp.clear_blocks(h->mb);
tprintf("pic:%d mb:%d/%d\n", h->frame_num, ... | 1threat |
int main_loop_init(void)
{
int ret;
qemu_mutex_lock_iothread();
ret = qemu_signal_init();
if (ret) {
return ret;
}
ret = qemu_event_init();
if (ret) {
return ret;
}
return 0;
}
| 1threat |
GZIP in .net core not working : <p>I'm attempting to add Gzip middleware to my ASP.net core app. </p>
<p>I have added the following package : </p>
<blockquote>
<p>"Microsoft.AspNetCore.ResponseCompression": "1.0.0"</p>
</blockquote>
<p>In my startup.cs for the Configure Services method I have the following : </p>
... | 0debug |
Html script doesn't work anymore after moving into source file - why so? how to fix? : <p>I got an html file that looks somewhat like this:
</p>
<pre class="lang-html prettyprint-override"><code><html>
<head>
<script type="text/javascript" src="lang-parser.js"></script>
<script id="code"... | 0debug |
got error while download gattlib via pip3 : <p>I use Ubuntu 16.04 64bit OS<br>
when I run </p>
<pre><code>$ sudo pip3 install gattlib
</code></pre>
<p>I got this error message</p>
<blockquote>
<p>/usr/bin/ld: cannot find -lboost_python-py34<br>
collect2: error: ld returned 1 exit status<br>
error: com... | 0debug |
ReactJS, Calling setState with same parameter : <p>I have been reading the React docs and came across <code>shouldComponentUpdate()</code>. My understanding is that everytime <code>setState()</code> is called, a re-render of that component will be updated. </p>
<p>My question is that If the value to be updated is the ... | 0debug |
int ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in)
{
char *param, buffer[128], tmp[128];
int len, tag_close, sptr = 1, line_start = 1, an = 0, end = 0;
SrtStack stack[16];
int closing_brace_missing = 0;
stack[0].tag[0] = 0;
strcpy(stack[0].param[PARAM_SIZE], "{\\fs}... | 1threat |
static int decode_frame(AVCodecContext * avctx,
void *data, int *data_size,
UINT8 * buf, int buf_size)
{
MPADecodeContext *s = avctx->priv_data;
UINT32 header;
UINT8 *buf_ptr;
int len, out_size;
short *out_samples = data;
*data_size = 0;
buf_ptr = buf;
while (buf_size ... | 1threat |
void ff_svq3_add_idct_c(uint8_t *dst, DCTELEM *block, int stride, int qp,
int dc)
{
const int qmul = svq3_dequant_coeff[qp];
int i;
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
if (dc) {
dc = 13*13*((dc == 1) ? 1538*block[0] : ((qmul*(block[0] >> 3)) / 2));
... | 1threat |
I'm trying to sum up the top 80% by value of sales $ and give a count on how many customers make up that 80% : I'm trying to build a sales query for a rolling 12 months. I know my sales by customer, and my total sales. I'm trying to sum up the top 80% of sales $ and give a count on how many customers make up that 80%... | 0debug |
size_t mptsas_config_ioc_0(MPTSASState *s, uint8_t **data, int address)
{
PCIDeviceClass *pcic = PCI_DEVICE_GET_CLASS(s);
return MPTSAS_CONFIG_PACK(0, MPI_CONFIG_PAGETYPE_IOC, 0x01,
"*l*lwwb*b*b*blww",
pcic->vendor_id, pcic->device_id, pcic->rev... | 1threat |
Can anybody help me with this output , because i dont understand it , its 30 . and im a beginner in Java : <p>When I compile the output is 30 . I thought it would be 2 beacause z is smaller than 0 so z = z + 3 , (-1 + 3 = 2):(. I dont get it </p>
<pre><code> int z = -1;
if(z < 0)
z += 3;
else i... | 0debug |
C# Select the Header as the range to search in microsoft word : I have some text in the header of a word document. I have a find and replace method that searches for text and then replaces it if it is found. My question is, how do I only select the header to be the range to search and replace for key words? | 0debug |
static int mpc8_probe(AVProbeData *p)
{
const uint8_t *bs = p->buf + 4;
const uint8_t *bs_end = bs + p->buf_size;
int64_t size;
if (p->buf_size < 16)
return 0;
if (AV_RL32(p->buf) != TAG_MPCK)
return 0;
while (bs < bs_end + 3) {
int header_found = (bs[0] == 'S... | 1threat |
Is Haskell's type system isomorphic to an inconsistent logic system? If so, what are the consequences? : <p>In Haskell there is a term <code>undefined :: a</code>, which is said to be a term
representation of a bad computation or endless loop. Since <code>undefined</code> has
type <code>a</code>, them it's possible to ... | 0debug |
Convert to base 2 then split in an array : <p>I want to convert my base 10 number to base 2 and then store parts in an array. </p>
<p>Here are two examples:</p>
<p>my value is 5 so it will be converted to 101 then I have an array like this: {1,0,1}</p>
<p>or my value is 26 so it will be converted to 11010 then I wil... | 0debug |
static int spapr_tce_table_realize(DeviceState *dev)
{
sPAPRTCETable *tcet = SPAPR_TCE_TABLE(dev);
if (kvm_enabled()) {
tcet->table = kvmppc_create_spapr_tce(tcet->liobn,
tcet->window_size,
&tcet->fd);
... | 1threat |
How can i publish app with different names in play store? : <p>I already published one app in play store.After that i made some changes in the code, now i want to publish that app with different name in play store.How can i release it with out affecting the previous app,so that previous app and present app are showing ... | 0debug |
void cpu_ppc_set_papr(PowerPCCPU *cpu)
{
CPUPPCState *env = &cpu->env;
env->msr_mask &= ~((1ull << MSR_EP) | MSR_HVB);
env->spr[SPR_AMOR] = amor->default_value = 0xffffffffffffffffull;
if (kvm_enabled()) {
kvmppc_set_papr(cpu);
}
} | 1threat |
-bash: gcloud: command not found on Mac : <p>I'm following the <a href="https://cloud.google.com/sdk/docs/quickstart-mac-os-x" rel="noreferrer">Quickstart for Mac OS X</a> to install the cloud SDK. Following the steps exactly,</p>
<p>1) <code>python -V</code> returns "Python 2.7.10"</p>
<p>2) Download and extract us... | 0debug |
static void floor_fit(venc_context_t * venc, floor_t * fc, float * coeffs, int * posts, int samples) {
int range = 255 / fc->multiplier + 1;
int i;
for (i = 0; i < fc->values; i++) {
int position = fc->list[fc->list[i].sort].x;
int begin = fc->list[fc->list[FFMAX(i-1, 0)].sort].x;
... | 1threat |
Macro and function with same name in header file : <p><code>tool.c</code></p>
<pre><code>#include <stdlib.h>
#include "tool.h"
void safeFree(void** pp) {
if (pp != NULL & *pp != NULL) {
free(*pp);
*pp = NULL;
}
}
</code></pre>
<p><code>tool.h</code></p>
<pre><code>#ifndef tool_h
#... | 0debug |
Javascript ArrayBuffer to Hex : <p>I've got a Javascript ArrayBuffer that I would like to be converted into a hex string.</p>
<p>Anyone knows of a function that I can call or a pre written function already out there?</p>
<p>I have only been able to find arraybuffer to string functions, but I want the hexdump of the a... | 0debug |
Search and replace a particular string having special characters in a file using Perl : Search and replace a particular string in a file using Perl.
I have a .txt file. where i need to search and replace a string.
i code i have is working fine for string not having special characters.but for the string containing spe... | 0debug |
Remove all Jbuttons and passing the setText value to other variables : <p>I want to be able to remove all the JButton that is tied to b by just clicking on whichever of them and also to pass the value from the button that the user clicked to outside the loop. The code below only removes the button the user clicked on o... | 0debug |
void spapr_tce_table_enable(sPAPRTCETable *tcet,
uint32_t page_shift, uint64_t bus_offset,
uint32_t nb_table)
{
if (tcet->nb_table) {
error_report("Warning: trying to enable already enabled TCE table");
return;
}
tcet->bus_off... | 1threat |
static int proxy_rename(FsContext *ctx, const char *oldpath,
const char *newpath)
{
int retval;
V9fsString oldname, newname;
v9fs_string_init(&oldname);
v9fs_string_init(&newname);
v9fs_string_sprintf(&oldname, "%s", oldpath);
v9fs_string_sprintf(&newname, "%s... | 1threat |
How to round of 0.5 in sql server : How to round of 0.5 in sql server | 0debug |
Keras - NN prediction of error in metrological measurement. : <p>I have example data which contain coordinates of points on the x-y plane (for
example 2.0000 , 4.0000), next using monte carlo method, a small random error
is added to those coordinates to simulate a set of points measured by a
metrological machine.</p... | 0debug |
let promise wait a couple of seconds before return : <p>I'm having a function returning a promise. In this function, we call a third party vender to send some push notification through their server. </p>
<p>it looks like </p>
<pre><code>apiGetLoggedInUser.then(
user => {
return sendMessage(user.name);
}
)
... | 0debug |
static void test_parse_invalid_path_subprocess(void)
{
qemu_set_log_filename("/tmp/qemu-%d%d.log");
}
| 1threat |
How to use string C data type in PIC C Compiler : How to use `string` in [CCS](https://ccsinfo.com/forum/viewtopic.php?p=205898)?
I tried:
```
#include<string.h>
```
>But I still have error with it:
```
string myString = "My String"; // Error
``` | 0debug |
static void dss_sp_shift_sq_sub(const int32_t *filter_buf,
int32_t *error_buf, int32_t *dst)
{
int a;
for (a = 0; a < 72; a++) {
int i, tmp;
tmp = dst[a] * filter_buf[0];
for (i = 14; i > 0; i--)
tmp -= error_buf[i] * (unsigned)fi... | 1threat |
recursion and binary trees. how do i write the commented parts : how do i write the code to find a certain node. specifically how do i say a node was visited after i check it
public Iterator<T> pathToRoot(T targetElement, BinaryTreeNode<T> current)
throws ElementNotFoundException
{
Stack<BinaryTreeNode<... | 0debug |
Ruby how to test thread : How to check the result of some method inside thread.
For example:
we have thread:
module Task
def self.execute
"result"
end
end
threads = []
threads << Thread.new do
Task.execute
end
Now we need to specify the test which check th... | 0debug |
Missing array data in codeignitor php : i have menu which get data from database
here is my code
<nav id="mysidebarmenu" class="amazonmenu">
<ul>
<?php
//Get Category array
$categories = json_decode($this->db->get_where('... | 0debug |
static uint64_t cirrus_vga_mem_read(void *opaque,
target_phys_addr_t addr,
uint32_t size)
{
CirrusVGAState *s = opaque;
unsigned bank_index;
unsigned bank_offset;
uint32_t val;
if ((s->vga.sr[0x07] & 0x01) == 0) {
... | 1threat |
Jenkins Pipeline: is it possible to avoid multiple checkout? : <p>I've moved a few old Jenkins jobs to new ones using the <a href="https://jenkins.io/doc/pipeline/">pipeline feature</a> in order to be able to integrate the Jenkins configuration within the git repositories.
It's working fine but I'm asking myself if th... | 0debug |
Running NodeJS project in Visual Studio Code with yarn : <p>I have a NodeJS project which I can start from command line with <code>yarn start</code> command. My <code>package.json</code> looks similar to this:</p>
<pre><code>{
"name": "projectname",
"version": "0.0.1",
"description": "",
"author": "My Name",
... | 0debug |
c strcmp() with array of strings : <p>I am trying to count the amount of times which any word is repeated in the words[] array. I already have i, j, num_words and the words array initialized. The words array is type char *words[n]. The frequency[] array runs parallel to the words[] array and keeps track of the number o... | 0debug |
Trying to make the answer randomly generated after retry in C# : <pre><code>using System;
namespace Test
{
class Program
{
static void Main(string[] args)
{
int num1 = int.Parse(args[0]);
int num2 = int.Parse(args[1]);
bool GameOver = false;
... | 0debug |
static void qobject_input_check_struct(Visitor *v, Error **errp)
{
QObjectInputVisitor *qiv = to_qiv(v);
StackObject *tos = QSLIST_FIRST(&qiv->stack);
assert(tos && !tos->entry);
if (qiv->strict) {
GHashTable *const top_ht = tos->h;
if (top_ht) {
GHashTableIter iter... | 1threat |
int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *frame, int *got_packet)
{
NVENCSTATUS nv_status;
CUresult cu_res;
CUcontext dummy;
NvencSurface *tmpoutsurf, *inSurf;
int res;
NvencContext *ctx = avctx->priv_data;
NvencDynLoa... | 1threat |
Get selected feature names TFIDF Vectorizer : <p>I'm using python and I want to get the TFIDF representation for a large corpus of data, I'm using the following code to convert the docs into their TFIDF form.</p>
<pre><code>from sklearn.feature_extraction.text import TfidfVectorizer
tfidf_vectorizer = TfidfVectorizer(... | 0debug |
How to declare a property of NSArray of NSObjects in Objective C : <p>I have a custom User class where I am storing user data. For now I have Group class where I want to add Users as an array. Somewhere I seen once something like, but I lost it and can't find.</p>
<pre><code> @property (strong, nonatomic) User<NSAr... | 0debug |
How to remove the Xcode warning Apple Mach-O Linker Warning 'Pointer not aligned at address : <p>I have a slight issue when build my Xcode project, get tones of warning after update pod. It looks like this</p>
<p><a href="https://i.stack.imgur.com/kDrX2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kDrX2.p... | 0debug |
static int tcg_target_const_match(tcg_target_long val, TCGType type,
const TCGArgConstraint *arg_ct)
{
int ct = arg_ct->ct;
if (ct & TCG_CT_CONST) {
return 1;
}
if (type == TCG_TYPE_I32) {
val = (int32_t)val;
}
if (ct & TCG_... | 1threat |
static gboolean fd_trampoline(GIOChannel *chan, GIOCondition cond, gpointer opaque)
{
IOTrampoline *tramp = opaque;
if ((cond & G_IO_IN) && tramp->fd_read) {
tramp->fd_read(tramp->opaque);
}
if ((cond & G_IO_OUT) && tramp->fd_write) {
tramp->fd_write(tramp->opaque);
}
... | 1threat |
C++ replacing character in strings : <p>Im currently trying to capitalize the character 'i' but only if it's by itself </p>
<p>this is the code i have </p>
<pre><code>int main()
{
string textMessage = "Yesterday’s Doctor Who broadcast made me
laugh and cry in the same episode! i can only wonder what the
... | 0debug |
difference between button button = (button) v and button button = (button)findviewbyid(r.id.button1) : could somebody tell me what is the difference between Button button = (Button)v and Button button = (Button)findviewbyid(R.id.button) | 0debug |
why recursion is returning undefined in javascript? : <p>I'm using recursion to reverse the number. in the terminating condition i am returning the result. but it's returning "undefined". the console inside the if is showing the correct output. </p>
<p>// reverse the number</p>
<pre><code>var result= "";
var rever... | 0debug |
I have been trying a program in python for mapreduce and need some help in it : To get more hands-on experience I wanted to try a project word count. Here is the sample data which I have.
> The United Nations (UN) is an intergovernmental organisation
> established on 24 October 1945 to promote internationa... | 0debug |
static void e100_pci_reset(EEPRO100State * s, E100PCIDeviceInfo *e100_device)
{
uint32_t device = s->device;
uint8_t *pci_conf = s->dev.config;
TRACE(OTHER, logout("%p\n", s));
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL);
pci_config_set_device_id(pci_conf, e100_devi... | 1threat |
static inline void vring_used_idx_set(VirtQueue *vq, uint16_t val)
{
VRingMemoryRegionCaches *caches = atomic_rcu_read(&vq->vring.caches);
hwaddr pa = offsetof(VRingUsed, idx);
virtio_stw_phys_cached(vq->vdev, &caches->used, pa, val);
address_space_cache_invalidate(&caches->used, pa, sizeof(val));
... | 1threat |
CSS3 - Use part of an image for background : <p>I want to use some images as backgrounds but I have no control over the images. If the images are 500px x 500px , is it possible with just CSS3 to scale the image down to 200px x 200px and then only use 100px x 100px from the center?</p>
| 0debug |
Cannot add click events to dynamic generated list items by jquery : <h1>Jquery Code</h1>
<p>this is my jquery function for retrieving list or categories from database which is dynamically genrated by jquery function, I have added click event on each of the generated list items. But its not giving any alert on click.</... | 0debug |
Vectors must be the same lengths : <p>I want to plot angles against time. Here the code:</p>
<pre><code>clear all
close all
params.t0 = 0; % start time of simulation
params.tend = 10; % end time
params.m=2^8; %number of steps in each Brownian path
params.deltat=params.tend/params.m; % time increment for each B... | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.