problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
Replace Single Quotes and Comma in Nested List : <p>Have a list of list that looks like this:</p>
<pre><code>mylist = [['A'],['A', 'B'], ['A', 'B', 'C']]
</code></pre>
<p>Need to remove and replace all ', ' instances with a comma only (no spaces). Output should look like this:</p>
<pre><code>mynewlist = [['A'],['A,B... | 0debug |
def count_vowels(test_str):
res = 0
vow_list = ['a', 'e', 'i', 'o', 'u']
for idx in range(1, len(test_str) - 1):
if test_str[idx] not in vow_list and (test_str[idx - 1] in vow_list or test_str[idx + 1] in vow_list):
res += 1
if test_str[0] not in vow_list and test_str[1] in vow_list:
res +=... | 0debug |
how to pass javascript variable value to another javascript function? : I need to pass javascript variable value to another javascript function
$("#myTabs form").on('submit', function (e) {
e.preventDefault();
var linkHref = $(this).parents('.tab-pane').attr('id');... | 0debug |
static int decode_frame_apng(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
PNGDecContext *const s = avctx->priv_data;
int ret;
AVFrame *p;
ff_thread_release_buffer(avctx, &s->last_picture);
FFSWAP(ThreadFrame, s->pictu... | 1threat |
When is it useful to use "strict wildcard" in Haskell, and what does it do? : <p>I was looking at some Haskell source code and came across a pattern match with <code>!_</code>, the code is here: <a href="http://hackage.haskell.org/package/base-4.9.0.0/docs/src/GHC.List.html#unsafeTake">http://hackage.haskell.org/packag... | 0debug |
static int decode_ref_pic_list_reordering(H264Context *h){
MpegEncContext * const s = &h->s;
int list, index, pic_structure;
print_short_term(h);
print_long_term(h);
if(h->slice_type==FF_I_TYPE || h->slice_type==FF_SI_TYPE) return 0;
for(list=0; list<h->list_count; list++){
m... | 1threat |
Object *user_creatable_add(const QDict *qdict,
Visitor *v, Error **errp)
{
char *type = NULL;
char *id = NULL;
Object *obj = NULL;
Error *local_err = NULL, *end_err = NULL;
QDict *pdict;
pdict = qdict_clone_shallow(qdict);
visit_start_struct(v, NULL, N... | 1threat |
What's wrong with my code? Please help! (Java) :
public class night {
public static void main(String[] args) {
System.out.println(addition(1,1,1,1));
}
public static int addition (int...numberz){
int total=0;
for(int x=1; x<=numberz.length; x++) {
total+=x;
}
return total;
... | 0debug |
How to get name of color from hexa code in java? : I use openCV for color identification and I get color in hexa form like #FF0000 Nnow I want to convert it in string. I have search alot but I didnt find any useful code please help and tell me if anyone knows the answer. | 0debug |
i dont get anything in my recylerview when i slect image from gallery to show in recylerview android : i am just trying to pick image from gallery and show in recylerview but when i go to the gallery and slect image it show blank recylerview here is my code
public void onActivityResult(int requestCode, int resultCod... | 0debug |
static int h264_probe(AVProbeData *p)
{
uint32_t code = -1;
int sps = 0, pps = 0, idr = 0, res = 0, sli = 0;
int i;
for (i = 0; i < p->buf_size; i++) {
code = (code << 8) + p->buf[i];
if ((code & 0xffffff00) == 0x100) {
int ref_idc = (code >> 5) & 3;
in... | 1threat |
Cake PHP Godaddy installation issues : I just started using Cake PHP. I installed through the Godaddy app "installatron".
I am accessing the command line through Putty as they recommend, which works fine. Changed .htpaccess as instructed etc..
When ever I try to enter bin/cake bake it tells me "Permission Denied"
An... | 0debug |
static void tcg_out_brcond(TCGContext *s, TCGCond cond, TCGReg arg1,
TCGReg arg2, int label_index)
{
static const MIPSInsn b_zero[16] = {
[TCG_COND_LT] = OPC_BLTZ,
[TCG_COND_GT] = OPC_BGTZ,
[TCG_COND_LE] = OPC_BLEZ,
[TCG_COND_GE] = OPC_BGEZ,
};
... | 1threat |
Ansible + Ubuntu 18.04 + MySQL = "The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required." : <p>I’m seeing the above message on multiple playbooks using Ansible 2.8 on Ubuntu 18.04. In the interests of simplicity I’ve reproduced it using this basic playbook for a single node Drupal serv... | 0debug |
how to clear history in safari while button clicked in objective c : Could you please let me know how to clear safari history while button clicked in our app using ios sdk?
Thanks,
| 0debug |
Why are await and async valid variable names? : <p>I was experimenting with how <code>/</code> is interpreted when around different keywords and operators, and found that the following syntax is perfectly legal:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div ... | 0debug |
Opening a from from another form : I have no idea why this isn't working. Here's the code
private void button1_Click(object sender, EventArgs e)
{
this.Close();
new MainScreen().Show();
}
All that this is doing is closing the current form, it isn't opening t... | 0debug |
drawing a building by using python : I'm Creating a function to draw a office tower
:windows are 20 pixels square
the gap between the windows is 10 pixels
the door is 20 pixels wide, 50 pixels tall, and orange.
I can't draw it properly and here is my code:
from graphics import *
from random import *
... | 0debug |
static int dxva2_mpeg2_start_frame(AVCodecContext *avctx,
av_unused const uint8_t *buffer,
av_unused uint32_t size)
{
const struct MpegEncContext *s = avctx->priv_data;
AVDXVAContext *ctx = avctx->hwaccel_context;
struct dxva2_pictu... | 1threat |
C++ Putting a character into a cin for a while loop causes the loop to execute outside of it : <p>I decided to try to make a little game. It's a simple survival game. Part of it has people try to survive as long as they can by choosing options. I've scaled down the game as much as possible from 1000 lines to this for t... | 0debug |
def subject_marks(subjectmarks):
#subject_marks = [('English', 88), ('Science', 90), ('Maths', 97), ('Social sciences', 82)])
subjectmarks.sort(key = lambda x: x[1])
return subjectmarks | 0debug |
php code to solve this i am new to php.I have 2 tables named "registration" table and "first_allotement" table : Please can anyone help me out with php code to solve this i am new to php.I have 2 tables named "registration" table and "first_allotement" table
'registration' Table:
Altno | pid | appno | name | col... | 0debug |
Best way to handle data for several options C# : <p>My program workflow:</p>
<p>1) Show menu</p>
<p>2) Catch option by switch</p>
<p>2.1)Add float to a list </p>
<p>2.2)Increment int1</p>
<p>2.3)Increment int2</p>
<p>2.4)Show inputs</p>
<p>Now I wanna to add a generator which will print in console how my fiber t... | 0debug |
static void vfio_pci_write_config(PCIDevice *pdev, uint32_t addr,
uint32_t val, int len)
{
VFIODevice *vdev = DO_UPCAST(VFIODevice, pdev, pdev);
uint32_t val_le = cpu_to_le32(val);
DPRINTF("%s(%04x:%02x:%02x.%x, @0x%x, 0x%x, len=0x%x)\n", __func__,
vdev-... | 1threat |
want to find specific string from given text using regex : <p>I want specific string from below text using regex.</p>
<pre><code>str = 'Supervision68 - Outdoor Supervision In Compliance922 KAR 2:100 -
Section 10(15) Each child'
</code></pre>
<p>Specific string : '68 - Outdoor Supervision In Compliance'</p>
<p>I hav... | 0debug |
import re
def end_num(string):
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False | 0debug |
How to access all children of linearLayout? : <p>I have imageviews inside a linearlayout. I am trying to get all the imageviews(children) when its parent(linearlayout) is clicked. Could you please tell me how to access all the children of linearlayout when the linearlayout is clicked? </p>
| 0debug |
Android - Use cases of Context in Android Development (Fragment, etc) : In the time I have spent learning Android Development, I have realized that the use of "Context" is a common theme in nearly everything we do.<br>
I recently read the following Article, and all of it's references: [What is it about Context](http:/... | 0debug |
VBA Help: Simple Arithmetic Operations : I am completely new to VBA and I need some help. I have made the object so I will use that to describe my problem. I want to make program that takes in 4 user inputs (cost of product, number of units sold, number of units returned, and cost of fix per unit) and then calculates 6... | 0debug |
TS2531: Object is possibly 'null' : <p>I have the following function:-</p>
<pre><code>uploadPhoto() {
var nativeElement: HTMLInputElement = this.fileInput.nativeElement;
this.photoService.upload(this.vehicleId, nativeElement.files[0])
.subscribe(x => console.log(x));
}
</code></pre>
<p>however on ... | 0debug |
Refresh Today Widget every time opened : <p>I thought that Today View every time when i open it it calls "viewWillAppear" but its not. When i change something in my app, and then I slide down for Today View it sometimes refresh the view and sometimes not.</p>
<p>I do all logic in viewWillAppear (fetch data from coreDa... | 0debug |
int slirp_is_inited(void)
{
return slirp_inited;
}
| 1threat |
static void stereo_processing(PSContext *ps, INTFLOAT (*l)[32][2], INTFLOAT (*r)[32][2], int is34)
{
int e, b, k;
INTFLOAT (*H11)[PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC] = ps->H11;
INTFLOAT (*H12)[PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC] = ps->H12;
INTFLOAT (*H21)[PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC] = ps-... | 1threat |
Mocking an API response type : <p>I have function which accepts an Oracle Jolt ServletResult. I'm looking to unit test this function to verify that it correctly uses the data that it's been passed. ServletResult has a protected Constructor and the objects seem to be created internally in Jolt by a Factory. </p>
<p>I'... | 0debug |
void check_aligned_anonymous_unfixed_colliding_mmaps(void)
{
char *p1;
char *p2;
char *p3;
uintptr_t p;
int i;
fprintf (stderr, "%s", __func__);
for (i = 0; i < 0x2fff; i++)
{
int nlen;
p1 = mmap(NULL, pagesize, PROT_READ,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
fail_unless (p1 != MAP_FA... | 1threat |
c#. How to Highlight Link in textbox : I have to create some controls similar to a control Textbox. But I want this control can Highlight link as Richtextbox, Because i have problem with Richtextbox so i can't use richtexbox , how to highlight link in textbox? or I have to set each property by a line of code? | 0debug |
How to Get File info from Multiple Folders : I have multiple file listed in files.txt These files are located in different folders. I need to get the file info such as date modified and size and then export them in a text or csv file.
Is there a command in Windows or how can I put it in batch file or Power shell s... | 0debug |
how to remove Dynamic UITextField from Subview : how to remove array of UITextField from Scroll Subview, initially when i call Api i get some Array Value based on Count i have created Dynamic UITextFiled in My View, But i do no how to remove the Subview
**here my sample Code :**
// NSArray *strings;
//... | 0debug |
static void jpeg2000_flush(Jpeg2000DecoderContext *s)
{
if (*s->buf == 0xff)
s->buf++;
s->bit_index = 8;
s->buf++;
}
| 1threat |
int inet_connect(const char *str, Error **errp)
{
QemuOpts *opts;
int sock = -1;
opts = qemu_opts_create(&dummy_opts, NULL, 0, NULL);
if (inet_parse(opts, str) == 0) {
sock = inet_connect_opts(opts, true, NULL, errp);
} else {
error_set(errp, QERR_SOCKET_CREATE_FAILED);
... | 1threat |
When I select the incorrect answer the next question loads with the the answer already displayed : I am completely new to coding and c#. I am studying a level 3 ICT and in my programming subject we are asked to make a quiz for essential skills students(Using forms.).
I have been asked to create a very basic login in ... | 0debug |
How is this c++ code with default parameters can be compiled? : <p>Here is a simple example program which demonstrates what I want to asking for:</p>
<pre><code>class A {
public:
int writemem(FilInfo* file, IN BYTE* mem, IN DWORD memSize, BYTE obfs=0, BOOL bEnc=TRUE);
};
void main() {
...
(this->writemem(f... | 0debug |
Django ImportError: cannot import name 'render_to_response' from 'django.shortcuts' : <p>After upgrading to Django 3.0, I get the following error:</p>
<pre><code>ImportError: cannot import name 'render_to_response' from 'django.shortcuts'
</code></pre>
<p>My view:</p>
<pre><code>from django.shortcuts import render_t... | 0debug |
static void sun4uv_init(MemoryRegion *address_space_mem,
MachineState *machine,
const struct hwdef *hwdef)
{
SPARCCPU *cpu;
M48t59State *nvram;
unsigned int i;
uint64_t initrd_addr, initrd_size, kernel_addr, kernel_size, kernel_entry;
PCIBus *p... | 1threat |
void HELPER(wfe)(CPUARMState *env)
{
CPUState *cs = CPU(arm_env_get_cpu(env));
cs->exception_index = EXCP_YIELD;
cpu_loop_exit(cs);
}
| 1threat |
Collapse and expand div without scrollbars appearing : <p>I am using Jquery to try to collapse a div. The element to be collapsed sits above a footer on the page, as illustrated below:</p>
<p><a href="https://i.stack.imgur.com/0Lvt3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0Lvt3.png" alt="I... | 0debug |
C++ code compiles but doesn't run : <p>I am currently writing a Texas Hold'em code in order to learn more about c++ and gain experience. But I recently ran into a problem in which I have no idea what to do.My code compiles just fine without errors but once I make it run and it arrive at a specific function it just stop... | 0debug |
NameError: name 'i' is not defined in python : i am using following code to find the sum of digit in python but it shows an error[enter image description here][1]
[1]: https://i.stack.imgur.com/ZX8WN.png | 0debug |
ReactorNotRestartable error in while loop with scrapy : <p>I get <code>twisted.internet.error.ReactorNotRestartable</code> error when I execute following code:</p>
<pre><code>from time import sleep
from scrapy import signals
from scrapy.crawler import CrawlerProcess
from scrapy.utils.project import get_project_setting... | 0debug |
static void avc_h_loop_filter_chroma422_msa(uint8_t *src,
int32_t stride,
int32_t alpha_in,
int32_t beta_in,
int8_t *tc0)
{
int32_t co... | 1threat |
static void gen_flt3_arith (DisasContext *ctx, uint32_t opc,
int fd, int fr, int fs, int ft)
{
const char *opn = "flt3_arith";
switch (opc) {
case OPC_ALNV_PS:
check_cp1_64bitmode(ctx);
{
TCGv t0 = tcg_temp_local_new();
TCGv_i32 ... | 1threat |
C Program can help me? : Hello i am start programing c ut i dont know why my program is make bad outputs.
#include <stdio.h>
void main(void)
{
char res,res1;
float money=10;
printf("***Wealcome to Peace of Mind***");
printf("\nHello we have the menu please check::");
pr... | 0debug |
static int proxy_statfs(FsContext *s, V9fsPath *fs_path, struct statfs *stbuf)
{
int retval;
retval = v9fs_request(s->private, T_STATFS, stbuf, "s", fs_path);
if (retval < 0) {
errno = -retval;
return -1;
}
return retval;
}
| 1threat |
static void put_psr(target_ulong val)
{
env->psr = val & PSR_ICC;
env->psref = (val & PSR_EF)? 1 : 0;
env->psrpil = (val & PSR_PIL) >> 8;
#if ((!defined (TARGET_SPARC64)) && !defined(CONFIG_USER_ONLY))
cpu_check_irqs(env);
#endif
env->psrs = (val & PSR_S)? 1 : 0;
env->psrps = (val & PSR... | 1threat |
Google DevTools Timeline Panel missing : <p>If I open the google DevTools I cant find the Timeline Panel
as described here: </p>
<p><a href="https://i.stack.imgur.com/ab8nB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ab8nB.png" alt="enter image description here"></a> </p>
<p>There is simply no tag. What... | 0debug |
make a GET call 100,000 times : <p>I have a requirement where I am writing a small utility to test apis(ofcourse there are existing tools but it has been decided to write one). I am required to bombard the api, for the same api call, with say 100 threads, around say 100,000 times.</p>
<p>I am using 'PoolingHttpClientC... | 0debug |
static SCSIGenericReq *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun)
{
SCSIRequest *req;
req = scsi_req_alloc(sizeof(SCSIGenericReq), d, tag, lun);
return DO_UPCAST(SCSIGenericReq, req, req);
}
| 1threat |
static int kvm_physical_sync_dirty_bitmap(MemoryRegionSection *section)
{
KVMState *s = kvm_state;
unsigned long size, allocated_size = 0;
KVMDirtyLog d;
KVMSlot *mem;
int ret = 0;
hwaddr start_addr = section->offset_within_address_space;
hwaddr end_addr = start_addr + int128_get64(s... | 1threat |
Warning: unable to access index for repository https://www.stats.ox.ac.uk/pub/RWin/src/contrib: : <p>From today, every time I try to install a new package on R (3.4.1) with Rstudio 1.0.143 I receive this error message:</p>
<p>Warning: unable to access index for repository <a href="https://www.stats.ox.ac.uk/pub/RWin/s... | 0debug |
Some functions in package appear as undefined Goe Ilang : I am attempting to create a Golang application. I have one function in my package which I can use fine, the GetCoin function. however my function CreateWallet keeps giving me an error saying it's not defined in the package, it's driving me crazy. The function na... | 0debug |
How to pass argument while using apply in javascript : var Person = {
name: "jana",
getName: function(callBack){
callBack();
console.log("** "+this.name);
}
}
<br>
var anotherPerson = { name: "prabu"}
I have 2 object. I need "anotherPerson" is bind with Person object. As well as i want to... | 0debug |
static NetSocketState *net_socket_fd_init_dgram(VLANState *vlan,
const char *model,
const char *name,
int fd, int is_connected)
{
struct sockaddr_in saddr;
int ne... | 1threat |
how to find consecutive rows, that an employee is 'Absent'? I need it Urgent? : I have a table name employee. which has 4 columns: id, name, statuse and date_present. the date_present column contains all the dates an employee is present and absent. i need to write a query to find if any employee is continuously absent ... | 0debug |
Error: It looks like you called `mount()` without a global document being loaded : <p>I'm trying to mount a component for testing with enzyme, and get this error.</p>
| 0debug |
validation not working in php on submission the form data by click the submit button plz help me by explaination : validation not working in php on submission the form data by click the submit button plz help me by explaination
<?php
if (isset($_POST['validate'])) {
if (empty($_... | 0debug |
Merging apps on Play and Store : I have a client for whom I have made three apps for different regions (App 1, App2, App3).
Now the client changed his strategy and instead of having a different brand for every region he wants just one global brand which also means one app. He obviously doesn't want to lose the user... | 0debug |
Javascript: How to put properties in an array into seperate <p> tags : I am trying to put each property (first name, last name, and credit) into separate p tags inside separate div. I managed to get them into separate divs but still can't seem to get each property in separate p tags instead it looks like this..[Here ar... | 0debug |
Understanding how spring-data handles @EntityGraph : <p>(I made a <a href="https://github.com/ArnaudDenoyelle/sscce-entity-graph" rel="noreferrer">SSCCE</a> for this question.)</p>
<p>I have 2 simple entities : <code>Employee</code> and <code>Company</code>. <code>Employee</code> has a <code>@ManyToOne</code> relation... | 0debug |
How to get specific a word with Regular Expression ? please show the regex : I want to get "INFO","ERROR","DEBUG" with one Regular Expression.
Eg,when meet "1",will get INFO; when meet "2",will get ERROR;when meet "3",will get DEBUG.
1. [0;39m [http-nio-9000-exec-1] 2017-09-13 17:52:45,394 [34m|-INFO [0;39m... | 0debug |
How can I enable a WinForms or WPF project in F#? : <p>I have the very latest version of Visual Studio 2017 installed. I selected F# language support and F# desktop support. After restarting and going to File -> New Project I was expecting to see an option to start a new WPF or WinForms project for F# but I don't have ... | 0debug |
static void bonito_cop_writel(void *opaque, target_phys_addr_t addr,
uint64_t val, unsigned size)
{
PCIBonitoState *s = opaque;
((uint32_t *)(&s->boncop))[addr/sizeof(uint32_t)] = val & 0xffffffff;
}
| 1threat |
static inline int mpeg2_fast_decode_block_intra(MpegEncContext *s, int16_t *block, int n)
{
int level, dc, diff, j, run;
int component;
RLTable *rl;
uint8_t * scantable = s->intra_scantable.permutated;
const uint16_t *quant_matrix;
const int qscale = s->qscale;
if (n < 4) {
... | 1threat |
Parse error: syntax error, unexpected '$result' (T_VARIABLE), expecting function (T_FUNCTION) : <p>we are trying to rewrite core shipping model in magento.we are trying following code : but we are getting error as follows : </p>
<p>we removed the line that we are getting error</p>
<p>but still the problem didt resolv... | 0debug |
static void vfio_pci_size_rom(VFIOPCIDevice *vdev)
{
uint32_t orig, size = cpu_to_le32((uint32_t)PCI_ROM_ADDRESS_MASK);
off_t offset = vdev->config_offset + PCI_ROM_ADDRESS;
DeviceState *dev = DEVICE(vdev);
char name[32];
int fd = vdev->vbasedev.fd;
if (vdev->pdev.romfile || !vdev->pdev... | 1threat |
how to spit this complex json array? : I have a array like
["1-India","2-xxx","3-yyyy"]
I want arry like
["India","xxxx"]
Please help me to this | 0debug |
unresolved external symbol _MsiLocateComponentW@12 : <p>I know that simply posting code and asking for a solution isn't a good idea, but I have no idea what's causing this.</p>
<p>I'm trying to find the installation path of PowerPoint based on <a href="https://docs.microsoft.com/en-us/previous-versions/office/troubles... | 0debug |
What do I build in .Net to automatically generate a file every morning? : <p>I normally work directly in .aspx web files, but we have a need to generate files automatically every morning for use by the website and other processes. </p>
<p>The process of generating the day's files needs to run whether or not website is... | 0debug |
How to loop until all lines read from a file : I'm trying to set up a score system where I need to input all the scores from a text file into an 'array of records'.
I'm fairly new to Python and hope for a simple solution.
In my program, the array of records would technically class as a list of namedtuples.
Cur... | 0debug |
constructor vs componentWillMount; what a componentWillMount can do that a constructor cannot? : <p>As far as I could see, the only thing a <code>componentWillMount</code> can do and a <code>constructor</code> cannot is to call <code>setState</code>.</p>
<pre><code>componentWillMount() {
setState({ isLoaded: false... | 0debug |
document.getElementById('input').innerHTML = user_input; | 1threat |
What is a changeset in Git? : <p>What is changeset in Git? I keep hearing this term said, but cannot seem to find the answer online, and wikipedia is very vague. Is it if you commit 5 files at once via a git repository and type git log and see a single commit for that 5 files, that entire change is called a changeset?<... | 0debug |
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean : <p>When i run the application using main application, i got the error in consoleUnable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplic... | 0debug |
pl/sql deduping : I have a data structure like the following
ID ID2 DATE
A AA 2017-01-01
A BB 2017-01-01
A CC 2017-01-01
B DD 2018-01-01
B DD 2018-01-01
C EE 2018-02-01
I would like to dedup by ID keeping only one ID2 and on... | 0debug |
Ingress responding with 'default backend - 404' when using GKE : <p>Using the latest Kubernetes version in GCP (<code>1.6.4</code>), I have the following <code>Ingress</code> definition:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: myproject
namespace: default
annotations:
ingr... | 0debug |
General K8s question If I create an object, how long to wait before a get succeeds? : If I create an object, how long to wait before a get succeeds? I don't want to add a sleep with arbitrary values.
If there is a better pattern , please advise
```
err := r.CreateSAandSecret()
370 if err ... | 0debug |
static void copy_block(uint16_t *pdest, uint16_t *psrc, int block_size, int pitch)
{
int y;
for (y = 0; y != block_size; y++, pdest += pitch, psrc += pitch)
memcpy(pdest, psrc, block_size * sizeof(pdest[0]));
}
| 1threat |
static int64_t cpu_get_clock_locked(void)
{
int64_t ti;
if (!timers_state.cpu_ticks_enabled) {
ti = timers_state.cpu_clock_offset;
} else {
ti = get_clock();
ti += timers_state.cpu_clock_offset;
}
return ti;
}
| 1threat |
How I can use refs to change styling class in ReactJS? : <p>I'm trying to change background of a <code>div</code> when color value changes. Here is my function which receives color value:</p>
<pre><code>ChangeColor(oColor) {
this.props.ChangeColor(oColor);
console.log("Refs: ", this.refs.colorPicker.className)... | 0debug |
static uint16_t nvme_identify_ns(NvmeCtrl *n, NvmeIdentify *c)
{
NvmeNamespace *ns;
uint32_t nsid = le32_to_cpu(c->nsid);
uint64_t prp1 = le64_to_cpu(c->prp1);
uint64_t prp2 = le64_to_cpu(c->prp2);
if (nsid == 0 || nsid > n->num_namespaces) {
return NVME_INVALID_NSID | NVME_DNR;
... | 1threat |
void dp83932_init(NICInfo *nd, target_phys_addr_t base, int it_shift,
qemu_irq irq, void* mem_opaque,
void (*memory_rw)(void *opaque, target_phys_addr_t addr, uint8_t *buf, int len, int is_write))
{
dp8393xState *s;
int io;
qemu_check_nic_model(nd, "dp83932");
... | 1threat |
Got error in Android studio.. I am creating android app of wallpaper with admob and push notification. Please help me : Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library [com.onesignal:OneSignal:3.8.1]... | 0debug |
Xcode 9 - "Fixed Width Constraints May Cause Clipping" and Other Localization Warnings : <p>I downloaded the new Xcode and in Interface Builder I'm having a ton of problems with warnings that say things like:</p>
<blockquote>
<p>Fixed Width Constraints May Cause Clipping</p>
</blockquote>
<p>It looks like this:</p>... | 0debug |
int ioinst_handle_schm(CPUS390XState *env, uint64_t reg1, uint64_t reg2,
uint32_t ipb)
{
uint8_t mbk;
int update;
int dct;
trace_ioinst("schm");
if (SCHM_REG1_RES(reg1)) {
program_interrupt(env, PGM_OPERAND, 2);
return -EIO;
}
mbk = SCH... | 1threat |
static int nvdec_vc1_end_frame(AVCodecContext *avctx)
{
NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
int ret = ff_nvdec_end_frame(avctx);
ctx->bitstream = NULL;
return ret;
}
| 1threat |
Fixed navbar separates from top of browser on Chrome for iPhone : <p>I have a website with a bootstrap fixed-to-top navigation bar (<a href="https://getbootstrap.com/examples/navbar-fixed-top/" rel="noreferrer">example here</a>), and noticed that, using Chrome on an iPhone, the navbar separates from the top of the scre... | 0debug |
Laravel: Change base URL? : <p>When I use <code>secure_url()</code> or <code>asset()</code>, it links to my site's domain <strong><em>without</em></strong> "www", i.e. "example.com".</p>
<p>How can I change it to link to "www.example.com"?</p>
| 0debug |
static void dummy_m68k_init(QEMUMachineInitArgs *args)
{
ram_addr_t ram_size = args->ram_size;
const char *cpu_model = args->cpu_model;
const char *kernel_filename = args->kernel_filename;
CPUM68KState *env;
MemoryRegion *address_space_mem = get_system_memory();
MemoryRegion *ram = g_new... | 1threat |
Why scanf() function reads two values when we put spaces after formate specifier even we are passing one reference : #include<stdio.h>
main()
{
int a;
printf("Enter a value \n");
scanf("%d ",&a);
printf("a=%d \n",a);
}
in scanf() function i put space after formate specifier. wh... | 0debug |
void HELPER(set_cp15)(CPUState *env, uint32_t insn, uint32_t val)
{
int op1;
int op2;
int crm;
op1 = (insn >> 21) & 7;
op2 = (insn >> 5) & 7;
crm = insn & 0xf;
switch ((insn >> 16) & 0xf) {
case 0:
if (arm_feature(env, ARM_FEATURE_XSCALE))
break... | 1threat |
continue to retrieve data even the result is null c# : I have a program that will retrieve Student information and Class information.
I already use "if (!reader.HasRows)" to check if the student is existing but the problem is not all student is already registered in a certain class and I want it continue retrieving ... | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.