problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
static int decode_tile(J2kDecoderContext *s, J2kTile *tile)
{
int compno, reslevelno, bandno;
int x, y, *src[4];
uint8_t *line;
J2kT1Context t1;
for (compno = 0; compno < s->ncomponents; compno++){
J2kComponent *comp = tile->comp + compno;
J2kCodingStyle *codsty = tile->cod... | 1threat |
static av_noinline void emulated_edge_mc_mmxext(uint8_t *buf, const uint8_t *src,
ptrdiff_t buf_stride,
ptrdiff_t src_stride,
int block_w, int block_h,
... | 1threat |
static void gen_ori(DisasContext *ctx)
{
target_ulong uimm = UIMM(ctx->opcode);
if (rS(ctx->opcode) == rA(ctx->opcode) && uimm == 0) {
return;
}
tcg_gen_ori_tl(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rS(ctx->opcode)], uimm);
}
| 1threat |
How to get spotify access token -Spotify Web API Node : I reffered the link https://www.npmjs.com/package/spotify-web-api-node
**code sample**
var SpotifyWebApi = require('spotify-web-api-node');
// credentials are optional
var spotifyApi = new SpotifyWebApi({
clientId: 'fcecfc72172e4cd267... | 0debug |
Doctrine - How to bind array to the SQL? : <p>My SQL looks something like this:</p>
<pre><code>$sql = "select * from user where id in (:userId) and status = :status";
$em = $this->getEntityManager();
$stmt = $em->getConnection()->prepare($sql);
$stmt->bindValue(':userId', $accounts, \Doctrine\DBAL\Connect... | 0debug |
set a html option selected in a dropdown conatining optgroup tag using javascript : I'm working With Html(JSP) and Javascript. I have a dropdown box with id "examcenter" containing many optgroup as shown in the following code. in the function loadDrivingSchool() in javascript, I would like to set selected the value of ... | 0debug |
Python: IndentationError: unexpected indent : <p>Been pulling what hair I have left over this :-(</p>
<pre><code>if tIn.find("play again") != -1:
tn.write("yes\n")
print tn.read_until("WordsWeNeverSee",1.0)
tn.write("O\n")
</code></pre>
<p>I get the error</p>
<pre><code>root@kali:~# ./TTT.py
Fi... | 0debug |
How to check if a char is in the alphabet in C# : <p>I think the title says enough.</p>
<pre><code>void onClickSubmit(char submit)
{
if(submit.//check if it is alphabetical)
{
//some code
}
}
</code></pre>
<p>how can i check if the char submit is in the alphabet?</p>
| 0debug |
Why do we need to return state from reducer in React : I am new to Redux and was trying to get how to work with Redux properly but I encountered a confusion on why we need to return state in reducer. Here is the code:
const initialState = {
counter: 0
};
const reducer = (state = initialSta... | 0debug |
static void mct_decode(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile)
{
int i, csize = 1;
int32_t *src[3], i0, i1, i2;
float *srcf[3], i0f, i1f, i2f;
for (i = 0; i < 3; i++)
if (tile->codsty[0].transform == FF_DWT97)
srcf[i] = tile->comp[i].f_data;
else
src [... | 1threat |
Saving the text entered in page to a server : <p>I am creating a journal website, i am going to have a text box in it. I need to store the text entered in the website by the user to my file. I have an online free server.please help me to store it in a simple way</p>
| 0debug |
How to i hide/show user controls in form : <p>I need to change between different displays for my game. I need to show different screens where a player can choose what they want to play and what difficulty they want it. Before user control, I wanted to use panels but, they were really hard to customize because I need to... | 0debug |
Css fille issue : I have tried too many times to link the css file externally but it doesn't work yet. It is working fine with internal css and inline css but not with external css. I have checked too many times the name, location and folder of that file but still not find any solution. Here are some codes of mine.
... | 0debug |
Binary operation not working in C : I have 24 bits stored as a string. I'm using C and I want to store each set of 8 bits, starting at position 0, as an element of a u8int_t vector. I've tried different things to no avail. This is my code:
#include <stdio.h>
#include <stdlib.h>
#define SIZE 8
u... | 0debug |
void usb_cancel_packet(USBPacket * p)
{
assert(p->owner != NULL);
usb_device_cancel_packet(p->owner->dev, p);
p->owner = NULL;
}
| 1threat |
void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size,
const char *boot_device,
BusState *idebus0, BusState *idebus1,
FDCtrl *floppy_controller, ISADevice *s)
{
int val, nb;
FDriveType fd0, fd1;
static pc_cmos_init_late_arg arg;
... | 1threat |
My splash screen keeps on crashing and forceclosing the app : My app keeps on crashing upon startup please check my code.I was doing an automatic login on my splash screen. Please help me, this is for my thesis.
**splash.class**
import android.content.Intent;
import android.database.Cursor;
import a... | 0debug |
static void test_qemu_strtoll_invalid(void)
{
const char *str = " xxxx \t abc";
char f = 'X';
const char *endptr = &f;
int64_t res = 999;
int err;
err = qemu_strtoll(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert(endptr == str);
}
| 1threat |
Must both right-hand expressions of a ternary operator be of compatible types? : <p>My Practice Tests book contains this question on the ternary operator:</p>
<pre><code>// What is the output of the following application?
public class Transportation {
public static String travel(int distance) {
return(dist... | 0debug |
Why would we use two servers for one website : <p>I am relatively new to Web development. I was reading about Remote files in PHP, and I came across this question at
<a href="https://www.quora.com/How-do-I-store-data-in-a-JSON-file-on-a-remote-server" rel="nofollow noreferrer">Quara</a></p>
<p>My question is why would... | 0debug |
static int64_t get_clock(void)
{
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000) \
|| defined(__DragonFly__)
if (use_rt_clock) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec * 1000000000LL + ts.tv_nsec;
} else
#endif
... | 1threat |
how to pass the sessions and sessions auth of the App laravel to package And vice versa? : Do you know how to pass the sessions and session auth of the App laravel to package And vice versa ?
It does not work for me, I do not know what I'm missing. Thank you | 0debug |
void helper_fcmp_gt_FT(CPUSH4State *env, float32 t0, float32 t1)
{
int relation;
set_float_exception_flags(0, &env->fp_status);
relation = float32_compare(t0, t1, &env->fp_status);
if (unlikely(relation == float_relation_unordered)) {
update_fpscr(env, GETPC());
} else {
en... | 1threat |
static int buffer_needs_copy(PadContext *s, AVFrame *frame, AVBufferRef *buf)
{
int planes[4] = { -1, -1, -1, -1}, *p = planes;
int i, j;
for (i = 0; i < FF_ARRAY_ELEMS(planes) && frame->data[i]; i++) {
if (av_frame_get_plane_buffer(frame, i) == buf)
*p++ = i;
}
... | 1threat |
“does not name a type” error c++ : <p>I have a class declared as below, and I keep getting "Segment does not name a type" error. I've looked at other similar questions but I can't seem to find a solution to my problem. Any help? Thanks in advance! :)</p>
<pre><code>#ifndef ENTRANCE_H
#define ENTRANCE_H
#include "Segme... | 0debug |
static int mov_read_header(AVFormatContext *s)
{
MOVContext *mov = s->priv_data;
AVIOContext *pb = s->pb;
int err;
MOVAtom atom = { AV_RL32("root") };
int i;
mov->fc = s;
if (pb->seekable)
atom.size = avio_size(pb);
else
atom.size = INT64_MAX;
... | 1threat |
static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc) {
uint_fast16_t cb;
uint8_t *tmp_vlc_bits;
uint32_t *tmp_vlc_codes;
GetBitContext *gb=&vc->gb;
vc->codebook_count=get_bits(gb,8)+1;
AV_DEBUG(" Codebooks: %d \n", vc->codebook_count);
vc->codebooks=(vorbis_codebook *... | 1threat |
static void migration_bitmap_sync_range(ram_addr_t start, ram_addr_t length)
{
unsigned long *bitmap;
bitmap = atomic_rcu_read(&migration_bitmap);
migration_dirty_pages +=
cpu_physical_memory_sync_dirty_bitmap(bitmap, start, length);
}
| 1threat |
Vagrant - Not Supported the capability 'change_host_name' : <p>The problem is about the capability 'change_host_name' isn't supported by the guest when I try to execute the following command line:</p>
<pre><code>vagrant up
</code></pre>
<p>It gives me an error as the following: </p>
<pre><code>Vagrant attempted to e... | 0debug |
How to wrap height of Android ViewPager2 to height of current item? : <p>This question is for the new <strong>ViewPager2</strong> class.</p>
<p>There is a <a href="https://stackoverflow.com/questions/34484833/how-to-wrap-the-height-of-a-viewpager-to-the-height-of-its-current-fragment">similar question for the old View... | 0debug |
long do_rt_sigreturn(CPUM68KState *env)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr = env->aregs[7] - 4;
target_sigset_t target_set;
sigset_t set;
int d0;
if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
goto badframe;
target_to_host_sigset_internal... | 1threat |
str' object has no attribute 'get' attribute : How can I solve it...
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Mani\AppData\Local\Programs\Python\Python36-32\lib\tkinter\__init__.py", line 1699, in __call__
return self.func(*args)
File "F:\Monu\Work\python\PROJECT\New ... | 0debug |
static int try_decode_frame(AVStream *st, AVPacket *avpkt, AVDictionary **options)
{
AVCodec *codec;
int got_picture = 1, ret = 0;
AVFrame picture;
AVPacket pkt = *avpkt;
if(!st->codec->codec){
AVDictionary *thread_opt = NULL;
codec = avcodec_find_decoder(st->codec->codec... | 1threat |
How to delete ios simulator safari cache : <p>I'm trying to test a website on the iphone simulator, I made some javascript changes and my javascript files are being loaded from cache.</p>
<p>I see the old version files with safari web inspector, resources tab (on simulator window), also the network calls have status 3... | 0debug |
Java - what should be basic stuff is giving errors every line : <p>The objective is to receive in a string of letters and return a string of 1's and 0's that correspond for each. So "100000" for 'a' for example. But it refuses to compile, and I'm unsure what is wrong. The errors are popping up practically every line. I... | 0debug |
int ff_mediacodec_dec_close(AVCodecContext *avctx, MediaCodecDecContext *s)
{
if (s->codec) {
ff_AMediaCodec_delete(s->codec);
s->codec = NULL;
}
if (s->format) {
ff_AMediaFormat_delete(s->format);
s->format = NULL;
}
return 0;
} | 1threat |
How to insert a character at a certain position in a number without converting it into a string? : <p>I have to insert "/" between 2020 and 0001 in the number 20200001. I know how to do it by converting the number to string, but I am unable to do it by not converting it.</p>
| 0debug |
Can I create a mySQL DatabaBase from Java code? : <p>I'm learning about JDBC.</p>
<p>Can I create a mysql database from a java code?</p>
<p>How can I make the connection?</p>
<p>Thanks.</p>
| 0debug |
sorecvoob(struct socket *so)
{
struct tcpcb *tp = sototcpcb(so);
DEBUG_CALL("sorecvoob");
DEBUG_ARG("so = %p", so);
soread(so);
tp->snd_up = tp->snd_una + so->so_snd.sb_cc;
tp->t_force = 1;
tcp_output(tp);
tp->t_force = 0;
}
| 1threat |
How to replace the buttons (attachment) only w/ Slack interactive buttons response : <p>I've managed to create a simple interactive button Slack app using a Google Apps Script (GAS). </p>
<p>I know how to replace the original message w/ the response, but I would like to replace only the buttons, as demonstrated (but ... | 0debug |
uint8_t qpci_io_readb(QPCIDevice *dev, void *data)
{
uintptr_t addr = (uintptr_t)data;
if (addr < QPCI_PIO_LIMIT) {
return dev->bus->pio_readb(dev->bus, addr);
} else {
uint8_t val;
dev->bus->memread(dev->bus, addr, &val, sizeof(val));
return val;
}
}
| 1threat |
void qmp_block_dirty_bitmap_remove(const char *node, const char *name,
Error **errp)
{
AioContext *aio_context;
BlockDriverState *bs;
BdrvDirtyBitmap *bitmap;
bitmap = block_dirty_bitmap_lookup(node, name, &bs, &aio_context, errp);
if (!bitmap || !bs) {
... | 1threat |
Char assignment to *char not working : <p>Here is a function used in my main. The issue lies in <code>char</code> assignment. </p>
<pre><code>void takeTurn(int *iap, int *tile, char *cap) {
//*iap is 1 right now
printf("\nThe current active player is %d. His character is %c", *iap, *cap);
//prints The cur... | 0debug |
How does one detect if one is running within a docker container within Python? : <p>I was trying to find out if my script was running inside a docker container or not within the python script.</p>
<p>Something like:</p>
<pre><code>if inside_docker():
do_stuff()
else:
do_some_other_stuff()
</code></pre>
<p>to... | 0debug |
How to open modal ? : <p>I have a link in the top menu to add a new event.
When I am on the events list page, this link open a modal with the new event form.
Howether if I am on an other page, I would like this link (in the top menu) to redirect on this events list page with the modal new event form open.</p>
<p>Is it... | 0debug |
C++ alternative virtual typedef without templates : As many (relatively new?) users of C++, I would like to write
virtual typedef something my_virtual_type;
inside classes definitions.
The most popular alternative seems to be templates, as for instance in http://stackoverflow.com/questions/14741442/alternat... | 0debug |
int qcow2_backing_read1(BlockDriverState *bs, QEMUIOVector *qiov,
int64_t sector_num, int nb_sectors)
{
int n1;
if ((sector_num + nb_sectors) <= bs->total_sectors)
return nb_sectors;
if (sector_num >= bs->total_sectors)
n1 = 0;
else
n1 = bs->total_secto... | 1threat |
filter object_list in django templete : I am new in Django and have some problem:
I create a template with object_list table and run in each object with loop:
but I also need to have filter by substring then when the user will filter the table will updates online.
I attch part from my code .. only the relvant
I deb... | 0debug |
static void mv88w8618_eth_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
mv88w8618_eth_state *s = opaque;
switch (offset) {
case MP_ETH_SMIR:
s->smir = value;
break;
case MP_ETH_PCXR:
s->vlan_header = ((value >> MP... | 1threat |
C++ regex matching a single character : I'm trying to match a single character '=' in a line of code with regex.
Example
if(y == 5 || x = 1) {
Do something ...
}
I want to match to the single '=', and not the "==". I've tried alot of combination of regex strings but I still can't get a match on... | 0debug |
Sort multiple arrays simultaneously "in place" : <p>I have the following 3 arrays: </p>
<pre><code>int[] indexes = new int[]{0,2,8,5};
String[] sources = new String[]{"how", "are", "today", "you"};
String[] targets = new String[]{"I", "am", "thanks", "fine"};
</code></pre>
<p>I want to sort the three arrays based on ... | 0debug |
What is event pooling in react? : <blockquote>
<p>The SyntheticEvent is pooled. This means that the SyntheticEvent object will be reused and all properties will be nullified after the event callback has been invoked. This is for performance reasons. As such, you cannot access the event in an asynchronous way.</p>
</b... | 0debug |
static void test_visitor_in_errors(TestInputVisitorData *data,
const void *unused)
{
TestStruct *p = NULL;
Error *err = NULL;
Visitor *v;
strList *q = NULL;
UserDefTwo *r = NULL;
WrapAlternate *s = NULL;
v = visitor_input_test_init(data, "{ 'inte... | 1threat |
static void gen_neon_zip_u8(TCGv t0, TCGv t1)
{
TCGv rd, rm, tmp;
rd = new_tmp();
rm = new_tmp();
tmp = new_tmp();
tcg_gen_andi_i32(rd, t0, 0xff);
tcg_gen_shli_i32(tmp, t1, 8);
tcg_gen_andi_i32(tmp, tmp, 0xff00);
tcg_gen_or_i32(rd, rd, tmp);
tcg_gen_shli_i32(tmp, t0, 16... | 1threat |
What are the pros and cons of using AWS Code Deploy Vs Jenkins? : <p>We are using a bunch of EC2 instances which might scale in the future (around 100 instances), now we are looking towards auto deployments using either Jenkins or AWS Code deploy.</p>
<p>I found that we can use AWS Code deploy plugin with Jenkins, but... | 0debug |
SQL distinc issues : Hi everyone I have a sql table in this format
Screenname|realname|followers|tweet
bob |jim |5 |hi
bob |jim |20 |hello
tom |joe |15 |JOETHECAT
tim |joe |16 |TEST
I need to write a query that displays eac... | 0debug |
Program that tells to delete a name in an arraylist when that name is on the list more than once : <p>Program that tells to delete a name on an ArrayList when that name is on the list twice. This is the part of the programIi need help on:</p>
<pre><code>if (list.contains(nameToFind) && int i = 1; i < THIS I... | 0debug |
static int realloc_refcount_array(BDRVQcowState *s, uint16_t **array,
int64_t *size, int64_t new_size)
{
size_t old_byte_size, new_byte_size;
uint16_t *new_ptr;
old_byte_size = size_to_clusters(s, refcount_array_byte_size(s, *size))
* s->cl... | 1threat |
Edit a model comment Django : <p>I am stuck because I want to add a comment in my model and I do not know how to do it.</p>
<p>Can you help me please ?</p>
<p>Here is my form in forms.py:</p>
<pre><code>class UpdateActu(forms.ModelForm):
class Meta:
model = models.Actu
fields = ['commentaire']
... | 0debug |
var some = []['forEach']['constructor']; : <p>Im not able to understand this peice of javascript code please can anyone help me understand this.</p>
<pre><code>var some = []['forEach']['constructor'];
</code></pre>
| 0debug |
def sector_area(r,a):
pi=22/7
if a >= 360:
return None
sectorarea = (pi*r**2) * (a/360)
return sectorarea | 0debug |
static av_cold int find_component(OMXContext *omx_context, void *logctx,
const char *role, char *str, int str_size)
{
OMX_U32 i, num = 0;
char **components;
int ret = 0;
#if CONFIG_OMX_RPI
if (av_strstart(role, "video_encoder.", NULL)) {
av_strlcpy(str... | 1threat |
Are these lines acceptable to be inlined in C++? : <p>I am working on a mathematical vector. </p>
<p>I usually inline these types of class function members:</p>
<pre><code>float getY() const { return m_y; }
</code></pre>
<p>But are these suitable to be inlined? </p>
<pre><code>float getLength() const { return sqrt(... | 0debug |
static bool remove_objects(BDRVSheepdogState *s)
{
int fd, i = 0, nr_objs = 0;
Error *local_err = NULL;
int ret = 0;
bool result = true;
SheepdogInode *inode = &s->inode;
fd = connect_to_sdog(s, &local_err);
if (fd < 0) {
error_report_err(local_err);
return false;... | 1threat |
mysqldump syntax error - password being used as database name : <p>I'm trying to duplicate a MySQL (5.5.64-MariaDB) database on the same server by following this guide: <a href="https://stackoverflow.com/questions/675289/cloning-a-mysql-database-on-the-same-mysql-instance">Cloning a MySQL database on the same MySql ins... | 0debug |
Strange behaviour (for me) with ifPresentOrElse of an Optional. (JAVA8) : I have the following code:
Optional<Person> oldestPerson = personenListe.stream().collect(Collectors.reducing(maxAge));
Consumer<Person> personPrinter = p -> System.out.println("The oldest is : " + p.getName());
Runnable noPersonMessagePr... | 0debug |
Why is my asynchronous writeFile method behaving sychronously? : I have a simple .js file that reads a text file and the writes it and reads the changed file. For learning purposes, I have implemented the below code. When the control reaches writeFile, shouldn't it be running in the background and the control should go... | 0debug |
I am doing spring and hibernet integration example getting the below exception. Please advise me that how to solve it : log4j:WARN No appenders could be found for logger (org.springframework.beans.factory.xml.XmlBeanDefinitionReader).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" ... | 0debug |
Whats is the difference between mysql and sql? : <p>Whats is the difference between mysql and sql ?
Please explain with code.</p>
| 0debug |
AddressSpace *pci_device_iommu_address_space(PCIDevice *dev)
{
PCIBus *bus = PCI_BUS(dev->bus);
if (bus->iommu_fn) {
return bus->iommu_fn(bus, bus->iommu_opaque, dev->devfn);
}
if (bus->parent_dev) {
return pci_device_iommu_address_space(bus->parent_dev);
}
... | 1threat |
I have a function in java which may have bug and I can not find it : <p>I have this code which suppose to do the following task:
For example , given M=3, and array built like this:</p>
<pre><code>A[0]=1
A[1]=1
A[2]=3
A[3]=3
A[4]=5
A[5]=1
A[6]=3
</code></pre>
<p>the function may return 1 or 3</p>
<pre><code>import ja... | 0debug |
Object.assign—override nested property : <p>I have an Object <code>a</code> like that:</p>
<pre><code>const a = {
user: {
…
groups: […]
…
}
}
</code></pre>
<p>whereby there are a lot more properties in <code>a.user</code></p>
<p>And I would like to change only the <code>a.user.groups</code> value. If I ... | 0debug |
Why have to use value.length? : <p>guys.....Please help!!!</p>
<p><a href="https://i.stack.imgur.com/ZFaRN.png" rel="nofollow noreferrer">This is the picture of a textbook page that I'm reading</a></p>
<p>So I'm reading this textbook which is totally horrible, they just give codes out without any explanation.....And ... | 0debug |
static void gen_flt3_arith (DisasContext *ctx, uint32_t opc, int fd,
int fr, int fs, int ft)
{
const char *opn = "flt3_arith";
gen_op_cp1_64bitmode();
switch (opc) {
case OPC_ALNV_PS:
GEN_LOAD_REG_TN(T0, fr);
GEN_LOAD_FREG_FTN(DT0, fs);
... | 1threat |
static int xio3130_upstream_initfn(PCIDevice *d)
{
PCIBridge* br = DO_UPCAST(PCIBridge, dev, d);
PCIEPort *p = DO_UPCAST(PCIEPort, br, br);
int rc;
int tmp;
rc = pci_bridge_initfn(d);
if (rc < 0) {
return rc;
}
pcie_port_init_reg(d);
pci_config_set_vendor_id(d-... | 1threat |
Calling parent method inside child class python : <p>Here is my code:</p>
<pre><code>class GUI(playGame):
def __init__(self):
import tkinter as tk
home=tk.Tk()
home.title("Tic Tac Toe")
home.geometry("160x180")
w,h=6,3
self.c1r1=tk.Button... | 0debug |
How do I hash the password? : <p>I'm making custom registration form in laravel. When I submit this, in database the password is not being hashed. How do I hash the following password?</p>
<pre><code><div class="form-group">
{{ Form::label('password', 'Password:') }}
{{ Form::password('pa... | 0debug |
void qht_statistics_init(struct qht *ht, struct qht_stats *stats)
{
struct qht_map *map;
int i;
map = atomic_rcu_read(&ht->map);
stats->head_buckets = map->n_buckets;
stats->used_head_buckets = 0;
stats->entries = 0;
qdist_init(&stats->chain);
qdist_init(&stats->occupancy);
... | 1threat |
Does Elm have a debugging function that can print an object to the console? : <p>I would like to be able to examine a runtime javascript object. Can I print an object to the console instead of a string?</p>
| 0debug |
Python code looping when I don't want it to : <pre><code>x = 0
while True:
choice = int(input ("Choose 1 or 2"))
if choice == 2:
print("You chose 2")
x == 1
if choice == 1:
print("You chose 1")
x == 1
if choice >2:
print("I said 1 or 2.")
x == 0
if choice <1:
print("I said ... | 0debug |
static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
mm_end = end - 15;
#if 1
asm volatile(
"movq %3, %%m... | 1threat |
static inline void mpeg_motion(MpegEncContext *s,
UINT8 *dest_y, UINT8 *dest_cb, UINT8 *dest_cr,
int dest_offset,
UINT8 **ref_picture, int src_offset,
int field_based, op_pixels_func *pix_op,
... | 1threat |
static int mpjpeg_read_probe(AVProbeData *p)
{
AVIOContext *pb;
char line[128] = { 0 };
int ret = 0;
pb = avio_alloc_context(p->buf, p->buf_size, 0, NULL, NULL, NULL, NULL);
if (!pb)
return AVERROR(ENOMEM);
if (p->buf_size < 2 || p->buf[0] != '-' || p->buf[1] != '-')
... | 1threat |
static int do_cont(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
struct bdrv_iterate_context context = { mon, 0 };
if (incoming_expected) {
qerror_report(QERR_MIGRATION_EXPECTED);
return -1;
}
bdrv_iterate(encrypted_bdrv_it, &context);
if (!context.err) {
... | 1threat |
static unsigned int mszh_decomp(unsigned char * srcptr, int srclen, unsigned char * destptr, unsigned int destsize)
{
unsigned char *destptr_bak = destptr;
unsigned char *destptr_end = destptr + destsize;
unsigned char mask = 0;
unsigned char maskbit = 0;
unsigned int ofs, cnt;
while (s... | 1threat |
Error in global variable : <p>When I start my game and it opens to the menu I keep getting the error. "SyntaxWarning: name 'finishes' is assigned to before global declaration". I doesn't disrupt the game but it is just annoying, any ideas on how to fix it?</p>
<pre><code>def load_level(level):
walls = []
playe... | 0debug |
Seaborn Heatmap Colorbar Label as Percentage : <p>Given this heat map:</p>
<pre><code>import numpy as np; np.random.seed(0)
import seaborn as sns; sns.set()
uniform_data = np.random.rand(10, 12)
ax = sns.heatmap(uniform_data)
</code></pre>
<p>How would I go about making the color bar values display in percent format?... | 0debug |
Python slicing explained : <p>OK I understand the basics, but can someone explain code copied from Greg's answer <a href="https://stackoverflow.com/questions/509211/understanding-pythons-slice-notation">here</a>:</p>
<pre><code>a[1::-1] # the first two items, reversed
a[:-3:-1] # the last two items
a[-3::-1] # eve... | 0debug |
cannot resolve method setcontentview(android.widget.TextView) : <p>How to setContentView in a fragment?
I having error with setContentView(tvv);
Any helps will be appreciated. </p>
<p><a href="http://i.stack.imgur.com/sGpxy.png" rel="nofollow">image</a></p>
<p>Continue</p>
<pre><code> Button btnBF = (Button) view.fi... | 0debug |
how to silence warnings about ignored files in eslint : <p>After setting up <code>eslint</code> and adding some files in the ignore list, every time that eslint is run it produces warnings about files that are ignored:</p>
<pre><code> /path/to/file/name.min.js
0:0 warning File ignored because of a matching ignore ... | 0debug |
How would I modify this to put it into a function? : <pre><code>question_prompts = [
"What color are Apples?\n(a) Red/Green\n(b) Purple\n(c) Orange\n\n",
"What color are Bananas?\n(a) Blue\n(b) Yellow\n(c) Green\n\n",
"What color are Strawberries?\n(a) Red\n(b) Blue\n(c) Green\n\n" ]
def main_questions():
... | 0debug |
void do_405_check_ov (void)
{
if (likely(((T1 ^ T2) >> 31) || !((T0 ^ T2) >> 31))) {
xer_ov = 0;
} else {
xer_ov = 1;
xer_so = 1;
}
}
| 1threat |
I Copied the code recommended by google, howeverI receive a syntax error : So I copied the python code that google cloud recommends to you, iv tried it in Jyputer notebooks and as a python file but I still get syntax error
def predict(content, project_id, model_id):
print predict("1.jpg", ispace-254720, ICN886... | 0debug |
Can I have multiple service workers both intercept the same fetch request? : <p>I'm writing a library which I will provide for 3rd parties to run a service worker on their site. It needs to intercept all network requests but I want to allow them to build their own service worker if they like.</p>
<p>Can I have both se... | 0debug |
php write succesful logins and unsuccesful to text file : Hey guys i've been trying to write my succesful logins/failed logins to a txt file but it doesn't work.
Can anyone please take a look at the code?
if($_POST['username']==$username && $_POST['password']==$password) // Check Given user name, password and... | 0debug |
DataGrip: how to connect to Oracle as SYSDBA : <p>I tried to setup in <a href="https://www.jetbrains.com/datagrip/" rel="noreferrer">DataGrip</a> an Oracle connection under SYS user.</p>
<p>But got error:</p>
<blockquote>
<p>ORA-28009: connection as SYS should be as SYSDBA or SYSOPER</p>
</blockquote>
<p>But there... | 0debug |
C++ delete a pointer (free memory) : <p>Consider the following code:</p>
<pre><code>int a = 10;
int * b = &a;
int * c = b;
delete b; // equivalent to delete c;
</code></pre>
<p>Am I correct to understand in the last line, <code>delete b</code> and <code>delete c</code> are equivalent, and that both will free the ... | 0debug |
Rounding numbers to a specific value in Python : <p>I would like to do in python rounding to the specified value. Rounded to a tip or .99, 9.99 or other value. The value can by dynamic.
Example:</p>
<p>Rounded to .99</p>
<pre><code>20.11 => 20.99
11.33 = 11.99
1.00 = 1.99
</code></pre>
<p>Rounded to 9.99</p>
<p... | 0debug |
set_mdic(E1000State *s, int index, uint32_t val)
{
uint32_t data = val & E1000_MDIC_DATA_MASK;
uint32_t addr = ((val & E1000_MDIC_REG_MASK) >> E1000_MDIC_REG_SHIFT);
if ((val & E1000_MDIC_PHY_MASK) >> E1000_MDIC_PHY_SHIFT != 1)
val = s->mac_reg[MDIC] | E1000_MDIC_ERROR;
else if (val & E... | 1threat |
WHERE clause not working for SQLite Android : I am currently doing an Android application with a SQLite database and I want to create a method that will retrieve all tasks that are associated to one owner, but the application cannot retrieve them but instead return me an exception. How can I solve this?
This is the ... | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.