problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
Trying to understand a Bash script given to me, specifically the while loop : <p>I am using a script made by one of my former colleagues, he told me I'll need some working with it. I am wondering what this while loop does:</p>
<pre><code># This is the loop that does the simulation
lastsim=0
nextsim=`/usr/bin/expr $las... | 0debug |
Android: Error while installing APKs : <p>I'm slowly trying to do some simple tasks in <code>Android Studio</code>. The following app is installed on emulator without any errors. But when I tried to install it on a real device Redmi 3S this error occured:</p>
<pre><code>Unknown failure (Failure - not installed for 0)
... | 0debug |
static int coroutine_fn raw_co_pwrite_zeroes(BlockDriverState *bs,
int64_t offset, int count,
BdrvRequestFlags flags)
{
return bdrv_co_pwrite_zeroes(bs->file->bs, offset, count, flags);
}
| 1threat |
Core data complicated array : <p>I have this kind of array:</p>
<pre><code>var vakken: [(String,[Int],[Int])]
</code></pre>
<p>but I don't know how i could put this in core data and pull it back?</p>
<p>Has anyone advice how to make this or even some code?</p>
<p>Thanks in advance</p>
| 0debug |
Redirect after log in to index using php : <p>I want to make the system login. After user insert username and password, he/she is redirect to index.php
But, i got a problem for the process script.</p>
<pre><code>Notice: Undefined variable: conn in C:\xampp\htdocs\file\login.php on line 15
Fatal error: Call to a membe... | 0debug |
Convert incoming bytestream into integers and export to excel Arduino/C : I am very new to programming and am working on an Arduino project to measure wavelengths of light. I am using the Spectruino 3 (http://myspectral.com/spectruino-installation.html) and am trying to read in the bytes that it records into an array, ... | 0debug |
CouchDb Which is the Best Performing approach to find data using Views or N1sql : i am building an php application using couchdb (mostly), but still not completely clear on the best approach for fetching contents, there are 2 different ways to get data (if i am correct)
1. Using View functions
2. Querying Data wi... | 0debug |
pgAdmin 4 always open in browser not as a standalone desktop application : <p>installed PSQL10 but when pgAdmin is run from start then always open in browser.There is no option to run as a Desktop Application</p>
| 0debug |
Python how to use the __str__ code for the __repr__? : <p>I've stated programming in Phyton just few days ago, so I'm sorry if the question is quite easy.</p>
<p>I've written this code:</p>
<pre><code>>>> class Polynomial:
def __init__(self, coeff):
self.coeff=coeff
def __repr_(se... | 0debug |
static int tta_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
TTAContext *s = avctx->priv_data;
int i;
init_get_bits(&s->gb, buf, buf_size*8);
{
int cur_chan = 0,... | 1threat |
How can I update a dataclass in place? : <p>Given two instances of the same dataclass, how can I update the first one in-place with values from the second one?</p>
<p>i.e.</p>
<pre class="lang-py prettyprint-override"><code>@dataclass
class Foo:
a: str
b: int
f1 = Foo("foo", 1)
f2 = Foo("bar", 2)
# Update i... | 0debug |
How to do an ElasticSearch Select Distinct : <p>I just want to do the following request with elasticsearch.</p>
<p>In SQL :</p>
<pre><code>Select distinct(id) from my_table where userid = '20' or activity = '9';
</code></pre>
<p>I just have :</p>
<pre><code>{
"query" : {
"bool" : {
"should... | 0debug |
NameError: name 'user_id' is not defined. For no apparent reason : <p><strong>Error description</strong></p>
<p>I would fire up the server program, and fire a request (GET) at the path <code>/test_connection</code> which is the path used by the client to test the server IP address btw. The server would then respond by... | 0debug |
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unexpected start state' : <p>I've strange and rare to reproduce crash that happening on iOS 9. The question are <strong>How to fix this</strong> or <strong>What leads to this exception</strong> </p>
<p>As you can see traces not cont... | 0debug |
Does Gensim library support GPU acceleration? : <p>Using Word2vec and Doc2vec methods provided by Gensim, they have a distributed version which uses BLAS, ATLAS, etc to speedup (details <a href="http://rare-technologies.com/word2vec-in-python-part-two-optimizing/" rel="noreferrer">here</a>). However, is it supporting G... | 0debug |
What is the difference between NumPy array and simple python array? : <p>Why do we use numpy arrays in place of simple arrays in python? What is the main difference between them?</p>
| 0debug |
static av_cold int decode_init(AVCodecContext * avctx)
{
KmvcContext *const c = avctx->priv_data;
int i;
c->avctx = avctx;
if (avctx->width > 320 || avctx->height > 200) {
av_log(avctx, AV_LOG_ERROR, "KMVC supports frames <= 320x200\n");
return -1;
}
c->frm0 = av_m... | 1threat |
Use route parameters with `app.use` on Express : <p>I cannot use route parameters with <code>app.use</code> on Express 4.16.2.</p>
<p>I have a statement like this:</p>
<pre><code>app.use('/course-sessions/:courseSessionId/chapter-sessions', chapterSessionsRouter)
</code></pre>
<p>And, in chapter sessions router:</p>... | 0debug |
what are store, dispatch, payloads, types, actions, connect, thunk, reducers in react redux? : <p><strong>what are store, dispatch, payloads, types, actions, connect, thunk, reducers in react redux??</strong></p>
<pre><code>import { createStore, applyMiddleware } from 'redux'
import thunk from 'redux-thunk'
const crea... | 0debug |
PASSING DATA to PHP query using Ajax : how can I pass the input text data in HTML to a PHP function, without clicking the submit button?
I already had the idea to use Ajax to fetch the data from the database, but I only wanted to query a specific row.
[php function to fetch specific row][1]
[html page that a... | 0debug |
how can i fill null value with S.T in postgersSQL? : Does anyone know how to fill null value in postgerSQL?
For example, Null values are replaced with X
column
A
B
Null
C
D
Null
column
A
B
x
C
D
x
| 0debug |
how can i read list of object of array : how can i read with ngfor unter
lebens = [
{
lebenslage: "Arbeit & Ruhestand",
kata: [
{
unter: "altervorsorge",
unterunter: [
"Erbschein",
"Zusätzliche Altersvorsorgeförderung",
"Urkundenverwahrung u... | 0debug |
sqlalchemy postgresql enum does not create type on db migrate : <p>I develop a web-app using Flask under Python3. I have a problem with postgresql enum type on db migrate/upgrade.</p>
<p>I added a column "status" to model:</p>
<pre><code>class Banner(db.Model):
...
status = db.Column(db.Enum('active', 'inacti... | 0debug |
how to show time performance for merge sort? : <p>show the time performance analysis for merge sort algorithm in c programming
how to print merge sort algorithm the time performance (in ms) in c programming.
Merge sort time complexity is (n log n) whether the condition in the worst case or best case. Someone can help ... | 0debug |
How do I write the data from Scapy into a CSV file : <p>Using Scapy I have extracted the ethernet frame length, IP payload size, and the header length I would like to write this information to a csv file for further examination </p>
<pre><code>from scapy.all import *
pcap = rdpcap('example.pcap')
out = open("out.csv"... | 0debug |
uint64_t helper_mulqv(CPUAlphaState *env, uint64_t op1, uint64_t op2)
{
uint64_t tl, th;
muls64(&tl, &th, op1, op2);
if (unlikely((th + 1) > 1)) {
arith_excp(env, GETPC(), EXC_M_IOV, 0);
}
return tl;
}
| 1threat |
File extension naming: .p vs .pkl vs .pickle : <p>When reading and writing pickle files, I've noticed that some snippets use <code>.p</code> others <code>.pkl</code> and some the full <code>.pickle</code>. Is there one most pythonic way of doing this?</p>
<p>My current view is that there is no one right answer, and t... | 0debug |
static int lzw_get_code(struct LZWState * s)
{
int c;
if(s->mode == FF_LZW_GIF) {
while (s->bbits < s->cursize) {
if (!s->bs) {
s->bs = *s->pbuf++;
if(!s->bs) {
s->eob_reached = 1;
break;
}
... | 1threat |
How to run a sql query in C# and asp.net and show the result in csv file locally : <p>I don't have permission to create files on the server so, I cannot write to file and then show it to user. I am trying to redirect the query result to a file which user can open/save locally in their computers.</p>
| 0debug |
av_cold void ff_dct_init_mmx(DCTContext *s)
{
#if HAVE_YASM
int has_vectors = av_get_cpu_flags();
if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE)
s->dct32 = ff_dct32_float_sse;
if (has_vectors & AV_CPU_FLAG_SSE2 && HAVE_SSE)
s->dct32 = ff_dct32_float_sse2;
if (has_vectors & AV_CPU... | 1threat |
static void test_ide_drive_user(const char *dev, bool trans)
{
char *argv[256], *opts;
int argc;
int secs = img_secs[backend_small];
const CHST expected_chst = { secs / (4 * 32) , 4, 32, trans };
argc = setup_common(argv, ARRAY_SIZE(argv));
opts = g_strdup_printf("%s,%s%scyls=%d,heads=%... | 1threat |
No suitable driver found for jdbc:oracle:thin:@localhost:1522:xe : <p>I am trying to create a connection to my database(oracle), when I put test my code using the main method, it works seamlessly.
However, when trying to access it through Tomcat 8, it fails with error:
No suitable driver found for "jdbc:oracle:thin:@l... | 0debug |
Why is parameter not a constant expression? : <p>Could you please explain why this code doesn't compile?</p>
<pre><code>// source.cpp
constexpr const char* func(const char* s) { return s;}
constexpr bool find(const char *param) {
constexpr const char* result = func(param);
return (param == 0);
}
int main()
{
... | 0debug |
Checking GPS Status in android permanently : <p>I have an android application ,I want to show GPS status permanently in my application , I used timer before to check GPS status every 3 seconds , it works correct,But I don't want to use timer now. I just want when GPS turned on , my application notify and when GPS tern... | 0debug |
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt; | 0debug |
can i get a solution for this error please? : File "<ipython-input-15-155e515d797c>", line 3
DOWNLOAD_BASE = 'file:H:\New_folder\models\research\object_detection'
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 7-8: malformed \N character escape | 0debug |
static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
{
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
int tag, len;
get_be32(pb);
len = mp4_read_descr(c, pb, &tag);
if (tag == MP4ESDescrTag) {
get_be16(pb);
get_byte(pb);
} else
get_... | 1threat |
Programming Homework: Robot Genetic Algorithm : <p>This program is built to run 10000 generations of 200 robots, allowing evolution to shape the digits in the robot's "DNA". The problem I'm having is that, even though there is nothing but numbers going into the 'robotGenes' array, the resulting DNA that prints is a ran... | 0debug |
VBA code to count columns : how do i select the last column from second row and move the cursor one cell above.
For eg. if I am at cell A2, how do I make macro to count the number of columns starting from Row 2 and select the cell above it. | 0debug |
static void aio_epoll_disable(AioContext *ctx)
{
ctx->epoll_available = false;
if (!ctx->epoll_enabled) {
return;
}
ctx->epoll_enabled = false;
close(ctx->epollfd);
}
| 1threat |
1067: Implicit coercion of a value of type congrate to an unrelated type flash.display:DisplayObject : in one input text field has two possible answer which is luah or hal. why it is not working at all.someone please help me the right way to write a code??
stop();
//var jawapan1=Array;
txt_zuhal.addE... | 0debug |
static void user_monitor_complete(void *opaque, QObject *ret_data)
{
MonitorCompletionData *data = (MonitorCompletionData *)opaque;
if (ret_data) {
data->user_print(data->mon, ret_data);
}
monitor_resume(data->mon);
g_free(data);
}
| 1threat |
how to use phpexcel in yii2 : <p>I have a excel file with the extension .xlsx. I need to read this file and save into database. how to do this. I have no idea about this. plese guide me how to do step by step. Im using yii2 basic version.</p>
| 0debug |
void qmp_blockdev_mirror(const char *device, const char *target,
bool has_replaces, const char *replaces,
MirrorSyncMode sync,
bool has_speed, int64_t speed,
bool has_granularity, uint32_t granularity,
... | 1threat |
static void network_to_compress(RDMACompress *comp)
{
comp->value = ntohl(comp->value);
comp->block_idx = ntohl(comp->block_idx);
comp->offset = ntohll(comp->offset);
comp->length = ntohll(comp->length);
}
| 1threat |
int tcp_socket_incoming(const char *address, uint16_t port)
{
char address_and_port[128];
Error *local_err = NULL;
combine_addr(address_and_port, 128, address, port);
int fd = inet_listen(address_and_port, NULL, 0, SOCK_STREAM, 0, &local_err);
if (local_err != NULL) {
qerror_repor... | 1threat |
static int aasc_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AascContext *s = avctx->priv_data;
int compr, i, stride, psize;
s->frame.refere... | 1threat |
static void decode_opc (CPUState *env, DisasContext *ctx)
{
int32_t offset;
int rs, rt, rd, sa;
uint32_t op, op1, op2;
int16_t imm;
if (ctx->pc & 0x3) {
env->CP0_BadVAddr = ctx->pc;
generate_exception(ctx, EXCP_AdEL);
return;
}
if ((ctx->hflags & ... | 1threat |
static int rm_read_header(AVFormatContext *s)
{
RMDemuxContext *rm = s->priv_data;
AVStream *st;
AVIOContext *pb = s->pb;
unsigned int tag;
int tag_size;
unsigned int start_time, duration;
unsigned int data_off = 0, indx_off = 0;
char buf[128], mime[128];
int flags = 0;
... | 1threat |
int qemu_devtree_add_subnode(void *fdt, const char *name)
{
int offset;
char *dupname = g_strdup(name);
char *basename = strrchr(dupname, '/');
int retval;
if (!basename) {
return -1;
}
basename[0] = '\0';
basename++;
offset = fdt_path_offset(fdt, dupname);
... | 1threat |
strange missing value message from geom_point : I have a really strange missing values message which is not reproducible and I also can't find the problem. Any suggestion?
Once I get the warning, once not, and by counting NAs, I don't find it.
> ggplot(jnk, aes(x=Experiment, y=Log2Intensity)) +
+ geo... | 0debug |
unable to run 'aws' from cygwin : <p>I'm using <code>cygwin</code> installed on <code>Windows 10</code> and trying to access <code>awscli</code> from it.</p>
<p>I used <code>pip install awscli</code> to install <code>awscli</code>. This installed <code>awscli</code>. I then tried to run only <code>aws</code> to see if... | 0debug |
How can ı convert png to base64 and than use it in asp.net mvc project? : I have an ımage list an ı want it to be in html export .So the way that ı need to achive is base64.But ı didnt find valuable information how to transform to base64 and in html use it.Can you help me on this? | 0debug |
query = 'SELECT * FROM customers WHERE email = ' + email_input | 1threat |
Safely assign value to nested hash using Hash#dig or Lonely operator(&.) : <pre><code>h = {
data: {
user: {
value: "John Doe"
}
}
}
</code></pre>
<p>To assign value to the nested hash, we can use</p>
<pre><code>h[:data][:user][:value] = "Bob"
</code></pre>
<p>However if any part in the middle is m... | 0debug |
static av_cold int dnxhd_decode_init(AVCodecContext *avctx)
{
DNXHDContext *ctx = avctx->priv_data;
ctx->avctx = avctx;
ctx->cid = -1;
avctx->colorspace = AVCOL_SPC_BT709;
avctx->coded_width = FFALIGN(avctx->width, 16);
avctx->coded_height = FFALIGN(avctx->height, 16);
ctx->r... | 1threat |
Getting text between 2 strings in JS Regex : <p>I have this JavaScript code:</p>
<pre><code>var str = "#foo#";
var regex = /(?<=#)(.*)(?=#)/ig;
var result = str.replace(regex,"<a href='https://www.google.com/search?q=$1'>$1</a>");
alert(result);
</code></pre>
<p>I want the text between surrounded by # ... | 0debug |
Can't set visibility on constraint group : <p>When i try to set the visibility of the group on button click,it doesn't affect the view's visibility.Using com.android.support.constraint:constraint-layout:1.1.0-beta4. I've tried setting it element-wise without problems,but no success with the group. </p>
<p><strong>My M... | 0debug |
How to use time.Parse with string Go? : <p>I have func use to get hour . </p>
<pre><code>func GetHourFromAPI(lastUpdate string) int {
t, err := time.Parse(time.RFC3339, lastUpdate)
var hourTime = t.Hour()
if err != nil {
fmt.Println(err)
}
return hourTime
}
</code></pre>
<p>lastUpdate is... | 0debug |
chart js 2 how to set bar width : <p>I'm using Chart js version: 2.1.4 and I'm not able to limit the bar width. I found two options on stackoverflow</p>
<pre><code>barPercentage: 0.5
</code></pre>
<p>or</p>
<pre><code>categorySpacing: 0
</code></pre>
<p>but neither of one works with the mentioned version. Is there ... | 0debug |
static void vqa_decode_chunk(VqaContext *s)
{
unsigned int chunk_type;
unsigned int chunk_size;
int byte_skip;
unsigned int index = 0;
int i;
unsigned char r, g, b;
int index_shift;
int cbf0_chunk = -1;
int cbfz_chunk = -1;
int cbp0_chunk = -1;
int cbpz_chunk = ... | 1threat |
static int mxf_decrypt_triplet(AVFormatContext *s, AVPacket *pkt, KLVPacket *klv)
{
static const uint8_t checkv[16] = {0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b};
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
int64_t end = avio_tell(pb... | 1threat |
Converting Date Format to numeric Date : <p>I have a Date in this format:</p>
<pre><code>Tue Mar 10 00:00:00 UTC 1987
</code></pre>
<p>It is stored in a Object Date.</p>
<pre><code>Object tmp = solrDoc.getFieldValue("date_from")
</code></pre>
<p>I would like to convert it to a strictly numeric format, without the h... | 0debug |
def dict_depth(d):
if isinstance(d, dict):
return 1 + (max(map(dict_depth, d.values())) if d else 0)
return 0 | 0debug |
static int ra144_decode_frame(AVCodecContext * avctx, void *vdata,
int *data_size, const uint8_t *buf, int buf_size)
{
static const uint8_t sizes[10] = {6, 5, 5, 4, 4, 3, 3, 3, 3, 2};
unsigned int refl_rms[4];
uint16_t block_coefs[4][30];
unsigned int lpc_refl[10... | 1threat |
static int get_cluster_table(BlockDriverState *bs, uint64_t offset,
uint64_t **new_l2_table,
uint64_t *new_l2_offset,
int *new_l2_index)
{
BDRVQcowState *s = bs->opaque;
unsigned int l1_index, l2_index;
uint64_t l2... | 1threat |
NullPointerException when pressing JOptionPane Cancel button : <p>I am writing a program to choose between different shape and then input the values (e.g. radius) to calculate the volume of the shape using JOptionPane, I did some input validation, but the problem is whenever I press the cancel button of the JOptionPane... | 0debug |
<identifier> expected Error in java Compilation : <p>As i am new in java. I have searched about static mean in java and i got solution on stack overflow <strong><a href="https://stackoverflow.com/questions/413898/what-does-the-static-keyword-do-in-a-class">here</a></strong> but when i compiled it it is showing error. C... | 0debug |
Python create all possible combinations from a integer : <p>I have integer for example "123", using this i want to create all possible combinations listed below.
123
12,3
1,23 and so on irrespective of the digits i have entered.
Is there any way possible using python for the same? I am not able to get any idea.</p>
| 0debug |
Error! : 'function' object has no attribute '_getexif' : [enter image description here][1]
[1]: https://i.stack.imgur.com/BcCrr.jpg
Where am I wrong? help.. I'm extracting information from my image. | 0debug |
static void do_commit(void)
{
int i;
for (i = 0; i < MAX_DISKS; i++) {
if (bs_table[i])
bdrv_commit(bs_table[i]);
}
}
| 1threat |
Leaflet: Map container not found : <p>I have the below react class which fetches the geolocation through the browser.</p>
<p>I am mapping a leaflet map. I want to geolocation to be an input to the setView, for such that the map "zooms" into the region of the client browser location. </p>
<p>Here's the react class: ... | 0debug |
static void vfio_put_device(VFIOPCIDevice *vdev)
{
g_free(vdev->vbasedev.name);
if (vdev->msix) {
g_free(vdev->msix);
vdev->msix = NULL;
}
vfio_put_base_device(&vdev->vbasedev);
} | 1threat |
db.execute('SELECT * FROM employees WHERE id = ' + user_input) | 1threat |
Populating Dropdown in ASP.net Core : <p>Does anyone know how to deal with Dropdowns in Asp.net core. I think I made myself very complicated to understand the new Asp.net core concept. (I am new to Asp.net Core).</p>
<p>I have models called <code>Driver</code>, <code>Vehicle</code>. Basically one can create bunch of v... | 0debug |
static int build_def_list(Picture *def, Picture **in, int len, int is_long, int sel)
{
int i[2] = { 0 };
int index = 0;
while (i[0] < len || i[1] < len) {
while (i[0] < len && !(in[i[0]] && (in[i[0]]->reference & sel)))
i[0]++;
while (i[1] < len && !(in[i[1]] && (in[i[1... | 1threat |
document.getElementById('input').innerHTML = user_input; | 1threat |
Removing sandbox accounts from tvOS 13 : <p>I have been developing a tvOS app that uses in-app purchasing. As part of the development process, the app must be tested using iTunes sandbox user accounts. When beginning the in-app purchase using a local build, the user is prompted for the account credentials to one of the... | 0debug |
Vuejs doesn't render components inside HTML table elements : <p>I want to render a custom component that displays a row inside a table.</p>
<p>I have the following code:</p>
<pre><code>// js file
Vue.component('message-row', {
data: function () {
return {
msg: 'Hello'
}
},
temp... | 0debug |
int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err)
{
FILE *fh;
int fd;
int64_t ret = -1, handle;
if (!has_mode) {
mode = "r";
}
slog("guest-file-open called, filepath: %s, mode: %s", path, mode);
fh = fopen(path, mode);
if (!fh... | 1threat |
How to add an HTTP header to all Django responses : <p>I'd like to add a few headers to all responses that my Django website returns. Is there a way to do this (besides adding a wrapper to the <code>render</code> function)?</p>
| 0debug |
static int v9fs_do_lstat(V9fsState *s, V9fsString *path, struct stat *stbuf)
{
return s->ops->lstat(&s->ctx, path->data, stbuf);
}
| 1threat |
jQuery code to JavaScript : <pre><code>$(function () {
$(document).on('click', 'td', function () {
$(this).toggleClass('active');
});
});
</code></pre>
<p>Can someone please show what this code would be in vanilla javascript?</p>
<p><a href="https://stackoverflow.com/questions/22105868/difficulty-chan... | 0debug |
static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
{
unsigned tag, type, count, off, value = 0, value2 = 0;
int i, start;
int pos;
int ret;
double *dp;
ret = ff_tread_tag(&s->gb, s->le, &tag, &type, &count, &start);
if (ret < 0) {
goto end;
}
off = byte... | 1threat |
How to find which Yocto Project recipe populates a particular file on an image root filesystem : <p>I work with the Yocto Project quite a bit and a common challenge is determining why (or from what recipe) a file has been included on the rootfs. This is something that can hopefully be derived from the build system's e... | 0debug |
document.getElementById('input').innerHTML = user_input; | 1threat |
C++ dereferencing for std::priority_queue::top : <p>Documentation states <code>std::priority_queue::top</code> returns a constant reference to the top element in the priority_queue, but when printing the top element, the unary dereference operator is not used. </p>
<pre><code>// priority_queue::top
#include <iostre... | 0debug |
db.execute('SELECT * FROM employees WHERE id = ' + user_input) | 1threat |
bool net_tx_pkt_send(struct NetTxPkt *pkt, NetClientState *nc)
{
assert(pkt);
if (!pkt->has_virt_hdr &&
pkt->virt_hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
net_tx_pkt_do_sw_csum(pkt);
}
if (VIRTIO_NET_HDR_GSO_NONE != pkt->virt_hdr.gso_type) {
if (pkt->pay... | 1threat |
python generators garbage collection : <p>I think my question is related to <a href="https://stackoverflow.com/questions/15490127/will-a-python-generator-be-garbage-collected-if-it-will-not-be-used-any-more-but">this</a>, but not exactly similar. Consider this code:</p>
<pre><code>def countdown(n):
try:
wh... | 0debug |
Why is this Java code returning a memory address? : <p>This code is returning a memory address of an array being returned by the rgb2hsv function. I am not sure as to why this is, or if it is even a memory address that it is returning as I am familiar with memory addresses looking something along the lines of "0x038987... | 0debug |
How to get kNN in python (visual studio)? I thought it was part of sklearn? : <p>I tried to import it</p>
<pre><code>from numpy import *
import kNN
from matplotlib import *
from matplotlib.pyplot import *
from os import *
</code></pre>
<p>but kNN is highlighted with an error: ImportError: No module named kNN</p>
| 0debug |
static int write_elf32_load(DumpState *s, MemoryMapping *memory_mapping,
int phdr_index, hwaddr offset)
{
Elf32_Phdr phdr;
int ret;
int endian = s->dump_info.d_endian;
memset(&phdr, 0, sizeof(Elf32_Phdr));
phdr.p_type = cpu_convert_to_target32(PT_LOAD, endian);
... | 1threat |
HTML & CSS formatting bug when printing web page : I am attempting to print a web page via Ctrl-P or right-click print so I can save it as a PDF. Up until several minutes ago, this was working flawlessly. I have made some minor sizing edits to the grid I am working with on the page and now when I attempt to print, the... | 0debug |
char *g_strdup_printf(const char *format, ...)
{
char ch, *s;
size_t len;
__coverity_string_null_sink__(format);
__coverity_string_size_sink__(format);
ch = *format;
s = __coverity_alloc_nosize__();
__coverity_writeall__(s);
__coverity_mark_as_afm_allocated__(s, AFM_free);... | 1threat |
Airflow - how to make EmailOperator html_content dynamic? : <p>I'm looking for a method that will allow the content of the emails sent by a given EmailOperator task to be set dynamically. Ideally I would like to make the email contents dependent on the results of an xcom call, preferably through the html_content argum... | 0debug |
How to fill in [x]% of a 2d array with the values of another array : <p>I have 2 two-dimensional arrays, one is filled and one is to be filled, both of the same size (n x m). I need to fill in [some random]% of my second array with the exact same values as my first array.
So let's say</p>
<pre><code>int[][] arr1 = new... | 0debug |
void virtio_init(VirtIODevice *vdev, const char *name,
uint16_t device_id, size_t config_size)
{
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
int i;
int nvectors = k->query_nvectors ? k->query_nvectors(qbus->parent) : 0;
... | 1threat |
static void pxa2xx_rtc_swupdate(PXA2xxRTCState *s)
{
int64_t rt = qemu_get_clock(rt_clock);
if (s->rtsr & (1 << 12))
s->last_swcr += (rt - s->last_sw) / 10;
s->last_sw = rt;
}
| 1threat |
Post files from ASP.NET Core web api to another ASP.NET Core web api : <p>We are building a web application that consist of an Angular2 frontend, a ASP.NET Core web api public backend, and a ASP.NET Core web api private backend.</p>
<p>Uploading files from Angular2 to the public backend works. But we would prefer to p... | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.