problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
How to concatenate constant string with jsonpath : <p>I have AWS step machine and one of the step is used to notify failure using SNS service. I want to select some metadata from <code>input</code> json into outgoing message. So i am trying to concatenate constant string with jsonpath like below</p>
<pre><code>"Notify... | 0debug |
Properties of __proto__ in Javascript : <p>I have the below code</p>
<pre><code>var person={
firstname:"Geet",
getFullName:function(){
return this.firstname;
}
}
var test={
firstname:"Test"
}
test.__proto__=person;
for (var prop in test){
console.log(prop + ': '+test[prop]);
}
</code></pr... | 0debug |
qemu_irq isa_reserve_irq(int isairq)
{
if (isairq < 0 || isairq > 15) {
hw_error("isa irq %d invalid", isairq);
}
if (isabus->assigned & (1 << isairq)) {
hw_error("isa irq %d already assigned", isairq);
}
isabus->assigned |= (1 << isairq);
return isabus->irqs[isairq];
}... | 1threat |
Como modificar, apenas via CSS, uma cor já definida no HTML? : olá
estou tentando modificar uma cor em um texto, marcado que a pela tag "U" com a cor ja definida no html.
está assim no html:
<u> <font color="#0000c0">somente no seu e-commerce</font> </u>
tentei da seguinte maneira no css:
u{ color:rgb(20... | 0debug |
Why doesn't time() from time.h have a syscall to sys_time? : <p>I wrote a very simple program with calls <code>time()</code> to illustrate the use of<code>strace</code>, but I'm having a problem; the <code>time()</code> call doesn't seem to actually produce a syscall!</p>
<p>I ended up stepping into the <code>time()</... | 0debug |
static int decode_coeffs(WMAProDecodeCtx *s, int c)
{
static const int fval_tab[16] = {
0x00000000, 0x3f800000, 0x40000000, 0x40400000,
0x40800000, 0x40a00000, 0x40c00000, 0x40e00000,
0x41000000, 0x41100000, 0x41200000, 0x41300000,
0x41400000, 0x41500000, 0x41600000, ... | 1threat |
Open actovity by verify text of textview : I have button and text view in mainactivity and i have another three activities like one.java, two.java, three.java, four.java so i want when text is 'hi' in textview then on button click the one.java will be open and with text 'hello'
Avtivity two.java, with 'nice' text acti... | 0debug |
OutofBounds Exception : <p>I am trying here to measure how many white spaces there are in text typed in a JTextArea. I am getting an outofbounds exception. Why so? </p>
<pre><code>Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(Strin... | 0debug |
Div can't be resized beyond content : <p><a href="https://i.stack.imgur.com/9MEQD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9MEQD.png" alt="enter image description here"></a></p>
<p>The Div didn't stretch to the end of the screen</p>
<p>CSS:</p>
<pre><code>#page {
background-color:white;
... | 0debug |
OpenALPR not work with PyQt : <p>I tried to build a GUI app with PyQt and openalpr, but there are an issue with my code. A simple example:</p>
<pre><code>from openalpr import Alpr
from PyQt4 import QtCore, QtGui
class AnalizePlate(object):
def __init__(self):
self.alpr = None
try:
se... | 0debug |
Android Studio pref Editor.putString identifier expected : <p>Getting a - cannot resolve symbol "putString" "putInt" "commit" - in the code below.Help please.</p>
<pre><code> public class Alpha extends Activity {
public static final String GAME_PREFERENCES = "GamePrefs";
SharedPreferences setti... | 0debug |
static void virtio_pci_device_plugged(DeviceState *d, Error **errp)
{
VirtIOPCIProxy *proxy = VIRTIO_PCI(d);
VirtioBusState *bus = &proxy->bus;
bool legacy = virtio_pci_legacy(proxy);
bool modern;
bool modern_pio = proxy->flags & VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY;
uint8_t *config;
ui... | 1threat |
passing data from web form PHP application to Java web application : There is two WEB applications based on two different servers. How I can pass data from the web form, which consist 5-10 fields (php web application) to Java application(Struts2, Spring2) in the most elegant and safe way. please give me suggestions | 0debug |
How to delete specific file with command prompt/bacth file : I have 2 file in the same folder.
These file names is
**test.xlsx**
and
**test.xlsx.jhdrsx**
I want to delete secondary file.( test.xlsx.jhdrsx)
it's mean,
I should say , If file extension lenght is 6 character then "delete to file"
or
If there i... | 0debug |
How to get data from 100 txt files in a folder, and put it in a single file(need file name as a column)? : I have a folder with 80 txt files and their names are years they were created(example 2008P1,2008P2 2009 P1 etc). Each file has a single column of data with more than 100000 rows. I want to put all these data in a... | 0debug |
Updating a colum in tableA with values from colum in table B : I'm trying to make an update of a multiple colums in table1 with values from a table that i've created
so i declare a table like this :
TYPE mon_tableau IS VARRAY (2) OF FLOAT;
v_tab mon_tableau;
i give it some values like this
v_tab := mon... | 0debug |
When using conemu with Windows 10 bash shell, why doesn't the UP key show the previous command? : <p>The up arrow scrolls through command history, but it doesn't work after I launch bash shell.</p>
| 0debug |
is LEAD a reserved word in MySQL SQL? : For this simple table, created in MySQL 8.012
CREATE TABLE `lead` (
`ID` int(11) NOT NULL,
`TS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`RS` json DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
The statement
*INSERT INTO lea... | 0debug |
void cpu_reset(CPUX86State *env)
{
int i;
memset(env, 0, offsetof(CPUX86State, breakpoints));
tlb_flush(env, 1);
env->old_exception = -1;
#ifdef CONFIG_SOFTMMU
env->hflags |= HF_SOFTMMU_MASK;
#endif
env->hflags2 |= HF2_GIF_MASK;
cpu_x86_update_cr0(env, 0x60000010);
env->a20_mask = ~... | 1threat |
static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
{
AVFilterContext *ctx = inlink->dst;
AVFilterLink *outlink = ctx->outputs[0];
AVFilterBufferRef *outpicref = outlink->out_buf;
OverlayContext *over = ctx->priv;
if (over->overpicref &&
!(over->x >= outpicref-... | 1threat |
why this PHP and SQL code with HTML ( drop-down) select item do nothing? : <p>I write this code to retrieve data from the database table and insert the data in "select" drop-down menu, the below code do nothing and the select list empty, the table contains records. I guess there is something wrong with the code. any he... | 0debug |
I made a game with Ruby, How do I make it playable on the internet?[Ruby] : <p>It is a very simple game, only consisting of about 80 lines of code, and 2 images. I am a new developer, so pardon my ignorance.
I uploaded the three files to a domain, but when I visit the location, it just downloads the file.
What do I nee... | 0debug |
Ruby: Use the return of the conditional for variable assignment and comparison : <p>I have a method and in order to check whether it is being passed a block, I do the following:</p>
<pre><code>if block_given?
res = yield(array[i], array[i+1])
else
res = array[i] - array[i+1]
end
</code></pre>
<p>However R... | 0debug |
How to remove text from String : <p>I have string as </p>
<p>------=_Part_0_rtkakab</p>
<p>Hello Testing1.
------=_Part_0_rtkakab</p>
<p>I want to change to
<strong>Hello Testing1.</strong> </p>
<p>What is the best way to do this.</p>
| 0debug |
Jar files not opening : <p>Okay so im not sure this is the place to ask, But all .jar files on my PC wont open, I don't understand why</p>
<p>I've tried reinstalling java, and messed with enviroment variables</p>
<p>Thank you for any help</p>
| 0debug |
How to make dropdown menu that only loads the text not whole new page? : <p>For my F.A.Q page I want the questions displayed in a drop menu where they click on it and then it displays the questions and then depending on which question they choose it shows the answer below.</p>
<p>I want to make it so that it does not ... | 0debug |
rearrangement based on matching text in excel? : I will try and keep this as simple as possible. I have a list of names (first, last) in one column (A), then I get a second list which is usually about a quarter of the list in column A. **I want the cells in column b (the short list) to automatically rearrange so that t... | 0debug |
Difference between min_samples_split and min_samples_leaf in sklearn DecisionTreeClassifier : <p>I was going through sklearn class <a href="http://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html" rel="noreferrer">DecisionTreeClassifier</a>.</p>
<p>Looking at parameters for the class,... | 0debug |
How to create an new instance of an Object in React? : <p>Obviously in normal JS I can do this</p>
<pre><code>var Card = function(rank, suit){
this.rank = rank;
this.suit = suit
}
var cardOne = new Card('3', 'H');
cardOne // Card {rank: "3", suit: "H"}
</code></pre>
<p>So how would I do that in react and... | 0debug |
static int32_t parse_gain(const char *gain)
{
char *fraction;
int scale = 10000;
int32_t mb = 0;
int db;
if (!gain)
return INT32_MIN;
gain += strspn(gain, " \t");
db = strtol(gain, &fraction, 0);
if (*fraction++ == '.') {
while (av_isdigit(*fraction) && ... | 1threat |
How to add a name column of character vectors to a data frame in R : <p>I have a data frame built as such:</p>
<pre><code>dput(au.weighted.scores)
structure(list(AUDIT = c(0.283333333333333, 0.283333333333333,
0.183333333333333, 0.3, 0.2625), CORC = c(0.2, 0, 0.76, 0.82,
0.545), GOV = c(0.82, 0.82, 0.74... | 0debug |
Why this code return segmentation fault error : Im writing these code to optimize the time of problem and it is a dp problem
Given string S is .574674546476
for index 1
Number of even numbers from 5 to end of the string is 7 so the result of index 1 is 7.
for index 2
Number of... | 0debug |
static void mxf_write_multi_descriptor(AVFormatContext *s)
{
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
const uint8_t *ul;
int i;
mxf_write_metadata_key(pb, 0x014400);
PRINT_KEY(s, "multiple descriptor key", pb->buf_ptr - 16);
klv_encode_ber_length(pb, 64 + 16 * s->nb... | 1threat |
Promise vs setTimeout : <p>I've observed that in the following code:</p>
<pre><code>setTimeout(function(){console.log('setTimeout')});
Promise.resolve(1).then(function(){console.log('promise resolve')})
</code></pre>
<p>No matter how many times I execute this, the promise callback always logs before the setTimeout.</... | 0debug |
window.outerWidth is 0 in Safari on iOS 10 beta : <p>Using an iPad with iOS 10 installed, I entered <code>window.outerWidth</code> in the browser console and got a value of <code>0</code>. OTOH, <code>window.innerWidth</code> correctly produced <code>1024</code> (landscape mode).</p>
<p>In iOS 9, <code>window.outerWid... | 0debug |
Can't break lines on Wordpress / Never programmed before, be patient : I'm totally a newbie in programming. In fact, I never programmed before. I'm creating a WordPress and everytime that I insert a code that was supposed to work in breaking a line doesn't and it turns off my WordPress.
If you could, ***please***, w... | 0debug |
db.execute('SELECT * FROM products WHERE product_id = ' + product_input) | 1threat |
How do I check the last integer in the file in C? : <p>I need some help in finding the last integer in the file for my program. I have a file called "sample.txt" and I have a bunch of numbers in the file so I just want to get the last integer in the file and for example print it. Can somebody help me?</p>
| 0debug |
CLI error permission denied when connecting to MS SQL server via SAS ODBC : [enter image description here][1]
[1]: https://i.stack.imgur.com/fZckL.png
The user I am using has the highest allowed privilege in the db. We've also tested the script against the DB and we are able to delete but when running it in S... | 0debug |
static void vfio_map_bar(VFIOPCIDevice *vdev, int nr)
{
VFIOBAR *bar = &vdev->bars[nr];
uint64_t size = bar->region.size;
char name[64];
uint32_t pci_bar;
uint8_t type;
int ret;
if (!size) {
return;
}
snprintf(name, sizeof(name), "VFIO %04x:%02x:%02x.%x B... | 1threat |
How can I do some functions in Ruby : In ruby
Using the oliver.txt ---> http://hills.ccsf.edu/~dputnam/oliver.txt
write a function called count_paragraphs() that counts the number of paragraphs in the text.
In oliver.txt the paragraph delimiter consists of two or more consecutive newline characters, like this: \n\... | 0debug |
static void lsi_do_msgout(LSIState *s)
{
uint8_t msg;
int len;
uint32_t current_tag;
SCSIDevice *current_dev;
lsi_request *p, *p_next;
int id;
if (s->current) {
current_tag = s->current->tag;
} else {
current_tag = s->select_tag;
}
id = (current_tag... | 1threat |
How to resolve the undefined reference error to readimagefile in dev C++ : <p>I am getting an error in Dev C++ with the function readimagefile.
It says 'undefined reference to readimagefile' whenever I try to use the function included in the header file 'graphics.h'. Here is my code to show an image:</p>
<pre><code>in... | 0debug |
React Router v4 nested routes props.children : <p>I'm updating my universal react redux app to use react router v4. I have nested routes under a main layout route. Previously I used {props.children} to show contents of child routes, but this doesn't work anymore. How does this work in V4? </p>
<pre><code><Provider ... | 0debug |
How does this simple program not represent recursion? : <p>How does this "not" demonstrate recursion? It is a simple high/low find where I set "mid" to be the guess of the program's randomly selected number within the range. I am in a pissing match with an instructor. What do you think?</p>
<pre><code>#include <... | 0debug |
How to give jupyter cell standard input in python? : <p>I am trying to run a program on a jupyter notebook that accepts user input, and I cannot figure out how to get it to read standard input. For example, if I run the code with shift-enter:</p>
<pre><code>a = input()
print(a)
</code></pre>
<p>the cell indicates it ... | 0debug |
static int parse_picture_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
PGSSubContext *ctx = avctx->priv_data;
uint8_t sequence_desc;
unsigned int rle_bitmap_len, width, height;
if (buf_size <= 4)
return -1;
buf_size -= 4;
... | 1threat |
How to get all the details from multiple tables in Cake php? : I have two different tables as Post and Post_Info.
I want to get all the details using post_id in cake php from both the tables. The Post_Info table having post_id as foreign key and other related details.
I am new to cakephp and i don... | 0debug |
static void blkverify_aio_bh(void *opaque)
{
BlkverifyAIOCB *acb = opaque;
if (acb->buf) {
qemu_iovec_destroy(&acb->raw_qiov);
qemu_vfree(acb->buf);
}
acb->common.cb(acb->common.opaque, acb->ret);
qemu_aio_unref(acb);
}
| 1threat |
Cooperative Scheduling vs Preemptive Scheduling? : <p>In the book <em>Core Java : Volume 1 Fundamentals -> chapter MultiThreading</em> . </p>
<p>The Author wrote as follows :</p>
<blockquote>
<p>"All modern desktop and server operating systems use preemptive
scheduling. However, smaller devices such as cell phone... | 0debug |
cursor.execute('SELECT * FROM users WHERE username = ' + user_input) | 1threat |
static void handle_arg_cpu(const char *arg)
{
cpu_model = strdup(arg);
if (cpu_model == NULL || strcmp(cpu_model, "?") == 0) {
#if defined(cpu_list_id)
cpu_list_id(stdout, &fprintf, "");
#elif defined(cpu_list)
cpu_list(stdout, &fprintf);
#endif
exit(1);
}
}
| 1threat |
How to remove an instance of object from a list in python? : <p>I'm working on implementing Dijkstra's algorithm in python and I was wondering how I can remove an instance of an object from a list ?
Here's a part of my code in which I get an error: "list.remove(x): x not in list".</p>
<pre><code>class Vertex:
def... | 0debug |
static void digic_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = digic_realize;
} | 1threat |
def odd_values_string(str):
result = ""
for i in range(len(str)):
if i % 2 == 0:
result = result + str[i]
return result | 0debug |
firebase.initializeApp callback/promise? : <p>This is my web page</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">... | 0debug |
static void core_rtas_register_types(void)
{
spapr_rtas_register(RTAS_DISPLAY_CHARACTER, "display-character",
rtas_display_character);
spapr_rtas_register(RTAS_GET_TIME_OF_DAY, "get-time-of-day",
rtas_get_time_of_day);
spapr_rtas_register(RTAS_SET_TIME_O... | 1threat |
static int coroutine_fn iscsi_co_flush(BlockDriverState *bs)
{
IscsiLun *iscsilun = bs->opaque;
struct IscsiTask iTask;
if (bs->sg) {
return 0;
}
if (!iscsilun->force_next_flush) {
return 0;
}
iscsilun->force_next_flush = false;
iscsi_co_init_iscsitask(is... | 1threat |
int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt,
AVFormatContext *src)
{
AVPacket local_pkt;
local_pkt = *pkt;
local_pkt.stream_index = dst_stream;
if (pkt->pts != AV_NOPTS_VALUE)
local_pkt.pts = av_rescale_q(pkt->pts,
... | 1threat |
Angular-cli 8 - Is it possible to build only on es2015? : <p>In version 8 of angular-cli, the build is done 2x. One in es5 and one in es2015.</p>
<p>Is it possible to build only on es2015?</p>
<p>Changing the target to es5, it is done only in es5 .. But I have not found a way to do it only in es2015.</p>
| 0debug |
I want to create a word macro for table farmatting : I want to create a word macro that can do the following task at a single click.
Please help me.
I have a large document thats a trouble for me.
**The task includes a table formatting such as**
table width 11 cm,
left aligned,
font TNR 10,
border bla... | 0debug |
static void tosa_init(ram_addr_t ram_size, int vga_ram_size,
const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
struct pxa2xx_state_s *cpu;
struct tc6393xb_s *tmio;
str... | 1threat |
Unable to Remove Nan values. From dataset : When I am tring to predict the values for z , I am getting an error of
"ValueError: Input contains NaN, infinity or a value too large for dtype('float32')." Am i making a mistake in line data.fillna(0, inplace=True) or is there something else?
import pandas as pd
... | 0debug |
static int decode_codestream(Jpeg2000DecoderContext *s)
{
Jpeg2000CodingStyle *codsty = s->codsty;
Jpeg2000QuantStyle *qntsty = s->qntsty;
uint8_t *properties = s->properties;
for (;;){
int oldpos, marker, len, ret = 0;
if (bytestream2_get_bytes_left(&s->g) < 2) {
... | 1threat |
Removing disabled from checkbox : <p>I have 2 checkboxes styled as toggle buttons.
The 2nd checkbox is by default <code>disabled</code>.
When the 1st checkbox is to ja I would like the 2nd checkbox to have <code>disabled</code> removed.</p>
<p>I have tried this with 2 codes but I did not succeed.
In my console I see n... | 0debug |
static TCGv gen_vfp_mrs(void)
{
TCGv tmp = new_tmp();
tcg_gen_mov_i32(tmp, cpu_F0s);
return tmp;
}
| 1threat |
static int vp3_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
Vp3DecodeContext *s = avctx->priv_data;
GetBitContext gb;
static int counter = 0;
*data_size = 0;
init_get_bits(&gb, buf, ... | 1threat |
int qemu_savevm_state_complete(Monitor *mon, QEMUFile *f)
{
SaveStateEntry *se;
QTAILQ_FOREACH(se, &savevm_handlers, entry) {
if (se->save_live_state == NULL)
continue;
qemu_put_byte(f, QEMU_VM_SECTION_END);
qemu_put_be32(f, se->section_id);
se->save_live_sta... | 1threat |
How to position a text below an ImageView that takes up entire screen? : I am trying to code one of my first android apps. I am trying to position a text below an image, but the image takes up most of the screen and any of the textviews which are supposed to be below it are not displayed. I am using a Relative Layout.
... | 0debug |
static int get_physical_address_data(CPUState *env,
target_phys_addr_t *physical, int *prot,
target_ulong address, int rw, int is_user)
{
target_ulong mask;
unsigned int i;
if ((env->lsu & DMMU_E) == 0) {
*physical =... | 1threat |
React component render is called multiple times when pushing new URL : <p>I am building a PhotoViewer that changes photos when the user presses left or right. I am using React, Redux, react-router, and react-router-redux. When the user presses left or right, I do two things, I update the url using <code>this.context.re... | 0debug |
destructor in Kotlin programming language : <p>I am new to Kotlin, have written a class in kotlin to perform database operation</p>
<p>I have defined database connection in constructor using init but I want to close database connection using destructor.</p>
<p>Any Idea of how to achieve this using kotlin destructor?<... | 0debug |
How to use generator function in typescript : <p>I am trying to use generator function in typescript. But the compiler throws error</p>
<p><code>
error TS2339: Property 'next' does not exist on type
</code></p>
<p>Below is an closest sample of my code.</p>
<pre><code>export default class GeneratorClass {
constru... | 0debug |
How to set stroke color to draw a rectangle on canvas? : <p>I want to draw a round rectangle which its stroke is blue and its fill is red, but I can't find a method in Paint class to set stroke color. How can I do that?</p>
<pre><code> mCanvas.drawColor(mBackgroundColor, PorterDuff.Mode.CLEAR);
mCanvas.setDrawF... | 0debug |
How to scale Lambda when /tmp is reused? : <p>I have a lambda function that reads from DynamoDB and creates a large file (~500M) in /tmp that finally uploaded to s3. Once uploaded the lambda clears the file from /tmp (since there is a high probability that the instance may be reused)</p>
<p>This function takes about 1... | 0debug |
Installing odoo-12 on ubuntu-16.04 : <p>** ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
File "/home/eslammofreh/.local/lib/python3.5/site-packages/werkzeug/serving.py", line 270, in run_wsgi
execute(self.server.app)
File "/home/eslammofreh/.local/lib/python3.... | 0debug |
how to do a column split and dcast in r : <p>I have following dataframe in r</p>
<pre><code> Date Weather
2018-01-01 Rain,Fog
2018-01-02 Fog,Rain
2018-01-03 Rain
2018-01-04 Thunderstorm
2018-01-05 Rain,Fog
2018-01-06 Rain,Thunderstorm
</code></pre>
<p>My desired d... | 0debug |
void spapr_tce_reset(sPAPRTCETable *tcet)
{
size_t table_size = (tcet->window_size >> SPAPR_TCE_PAGE_SHIFT)
* sizeof(sPAPRTCE);
tcet->bypass = false;
memset(tcet->table, 0, table_size);
}
| 1threat |
int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx)
{
if (!strcasecmp(color_string, "random") || !strcasecmp(color_string, "bikeshed")) {
int rgba = ff_random_get_seed();
rgba_color[0] = rgba >> 24;
rgba_color[1] = rgba >> 16;
rgba_color[2] = rgba >... | 1threat |
i have a json data in controller i am passing it to twig file . i want to loop json data in twig file to create equal attributes like shown below : ** this is my controller where i am creating json data and passing it to twigfile**
/**
*this route is for inserting data into datatable of modal ... | 0debug |
Retrieve Xml attribute value using XElement and modified and send back c# : <p>I have below mention input. I found this xml input as string and fetch datetime field as desired and change there datetime to utcdatetime and also want to change in diffrent UTC format.After change modify this xml and send back for peocess. ... | 0debug |
static int nvdec_hevc_decode_init(AVCodecContext *avctx)
{
const HEVCContext *s = avctx->priv_data;
const HEVCSPS *sps = s->ps.sps;
return ff_nvdec_decode_init(avctx, sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering + 1);
}
| 1threat |
(PHP) Array push string with variable : <p>I'm new to PHP, I tried to use the array push function which I would like to combine the string with variable but it turns out strange result.</p>
<p>I applied it to Google Chart which it will create the chart.</p>
<pre><code>for($i = 0; $i < $table_counter; $i++){
a... | 0debug |
NPM - Failed to replace env in config: ${NPM_TOKEN} : <p>I am trying to build a react app, but when I execute the command <code>npm -i</code> it gives me the following error:</p>
<pre><code>Error: Failed to replace env in config: ${NPM_TOKEN}
at /usr/local/lib/node_modules/npm/lib/config/core.js:415:13
at Stri... | 0debug |
Export more than one variable in ES6? : <p>I'm trying to export more than one variable in ES6:</p>
<p>exports.js</p>
<pre><code>var TestObject = Parse.Object.extend('TestObject')
var Post = Parse.Object.extend('Post')
export default TestObject
export Post
</code></pre>
<p>main.js:</p>
<pre><code>import TestObject ... | 0debug |
int bdrv_open2(BlockDriverState *bs, const char *filename, int flags,
BlockDriver *drv)
{
int ret, open_flags;
char tmp_filename[PATH_MAX];
char backing_filename[PATH_MAX];
bs->is_temporary = 0;
bs->encrypted = 0;
bs->valid_key = 0;
bs->buffer_alignment = 512;... | 1threat |
alert('Hello ' + user_input); | 1threat |
static av_cold int nvenc_check_cuda(AVCodecContext *avctx)
{
int device_count = 0;
CUdevice cu_device = 0;
char gpu_name[128];
int smminor = 0, smmajor = 0;
int i, smver, target_smver;
NvencContext *ctx = avctx->priv_data;
NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
... | 1threat |
static int ffm_write_packet(AVFormatContext *s, AVPacket *pkt)
{
FFMContext *ffm = s->priv_data;
AVStream *st = s->streams[pkt->stream_index];
int64_t pts;
uint8_t header[FRAME_HEADER_SIZE];
pts = ffm->start_time + pkt->pts;
header[0] = pkt->stream_index;
header[1] = 0;
... | 1threat |
How do I import the pytest monkeypatch plugin? : <p>I want to use the <a href="https://pytest.org/latest/monkeypatch.html" rel="noreferrer">pytest monkeypatch</a> plugin, but I can't figure out how to import it. I've tried:</p>
<ul>
<li><code>import monkeypath</code></li>
<li><code>import pytest.monkeypatch</code></li... | 0debug |
PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in line 24 : <p>I have just moved from windows 5.2.0 to Linux 5.5.34 and have countered this error message within my code. It states that the error is on "line 24"</p>
<p>Here is a screenshot to my code...</p>
<p><a href="https://ibb.... | 0debug |
Copying the location of file names : I have a root folder called "Project" below that I have hundreds of sub folders and I want to export the location of those folder which ever consists a excel file to a separate text file.how can i achieve that in python..?
**Example**
D:\Project\Folder1
D:\Pr... | 0debug |
static void reset_codec(WmallDecodeCtx *s)
{
int ich, ilms;
s->mclms_recent = s->mclms_order * s->num_channels;
for (ich = 0; ich < s->num_channels; ich++) {
for (ilms = 0; ilms < s->cdlms_ttl[ich]; ilms++)
s->cdlms[ich][ilms].recent = s->cdlms[ich][ilms].order;
... | 1threat |
loop never ends in sql server using While Exists : [Question is in the image][1]
[1]: http://i.stack.imgur.com/0Gdd7.jpg
I was unable to post the code so had to put it in the form of image. Thanks | 0debug |
Timestamp from Mysql Database into readable : <p>Hi to everyone please Help me with this problem I am new to android programming.
I am developing an android application that the person can post something and as it is needed the post should have a time that shows when it is posted and I have set a column for the time in... | 0debug |
static int vpc_open(BlockDriverState *bs, int flags)
{
BDRVVPCState *s = bs->opaque;
int i;
struct vhd_footer* footer;
struct vhd_dyndisk_header* dyndisk_header;
uint8_t buf[HEADER_SIZE];
uint32_t checksum;
int err = -1;
int disk_type = VHD_DYNAMIC;
if (bdrv_pread(bs->fil... | 1threat |
R dataframe: How to slpit by 2 colums and calculate the mean : I have a dataframe with several columns like that: (I ha ve lots of columns from which I want to calculate the mean, so I cannot adress them by name)
df:
A B C D E F....
1 1 10 ... ... ...
1 1 ... | 0debug |
Can't Parse Regex : For some reason I can't parse this regex, which works in a live demonstration.
I took the code from the live demo, pasted it into a new PHP file, saved it and ran it in my server.
Works here: [live demo](https://3v4l.org/fKIqa)
My code + the error: [here](http://image.prntscr.com/image/d498... | 0debug |
My Java Code Throws java.lang.NullPointerException : <p>I'm writing a Java code that would run a simple automation scenario in Chrome or Firefox - depending on the user's input. It starts running (opens a browser), but then throws java.lang.NullPointerException. I thought then the null I assigned the driver variable wo... | 0debug |
static int pci_pcnet_init(PCIDevice *pci_dev)
{
PCIPCNetState *d = PCI_PCNET(pci_dev);
PCNetState *s = &d->state;
uint8_t *pci_conf;
#if 0
printf("sizeof(RMD)=%d, sizeof(TMD)=%d\n",
sizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));
#endif
pci_conf = pci_dev->config;
pc... | 1threat |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.