problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
How to share a list between two files : <p>So I have two .py files that need to share a list, but I can't get it to work as it always creates a second list in place of using the first that was created.</p>
| 0debug |
I'm getting an error "Error type 'AuthResult' is not a subtype of type 'FirebaseUser' in type cast" when I'm trying to login or signup : <p>I'm making a flutter app for my college project, where I'm adding a login and signup page and authenticating it via Firebase, and when I click login the debug console says <strong>... | 0debug |
Limit max width of Container in Flutter : <pre><code> Widget build(context) {
return Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
width: 300,
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
color: color ?? Colors.blue,
... | 0debug |
C#: I'm looking for a way to create new "primitive" types with additional constraints which are visible at coding time to users of the type : Suppose I have an entity in my universe of discourse called a `Widget`. Widgets are passed around between multiple distributed applications. All systems communicate through a mes... | 0debug |
Concate Explanation : i have a question, please don't downvote it, i need clear explanation.
Take a look at the code
<?php
$user_id = $_GET['user_id'];
include "../database.php";
$query="SELECT name FROM user WHERE user_id='$user_id'";
$result=mysqli_query ($connect,... | 0debug |
static void drive_backup_prepare(BlkTransactionState *common, Error **errp)
{
DriveBackupState *state = DO_UPCAST(DriveBackupState, common, common);
BlockBackend *blk;
DriveBackup *backup;
Error *local_err = NULL;
assert(common->action->kind == TRANSACTION_ACTION_KIND_DRIVE_BACKUP);
bac... | 1threat |
Whats the purpose of typescript's __awaiter : <p>consider this simple class</p>
<pre><code>class Test {
private foo(): Promise<void> {
return new Promise<void>((resolve, reject) => {
resolve();
});
}
private async bar() {
await this.foo();
}
}
</code>... | 0debug |
void memory_region_init_rom_device(MemoryRegion *mr,
const MemoryRegionOps *ops,
void *opaque,
const char *name,
uint64_t size)
{
memory_region_init(mr, name, size);
... | 1threat |
void laio_io_unplug(BlockDriverState *bs, void *aio_ctx, bool unplug)
{
struct qemu_laio_state *s = aio_ctx;
assert(s->io_q.plugged > 0 || !unplug);
if (unplug && --s->io_q.plugged > 0) {
return;
}
if (!s->io_q.blocked && !QSIMPLEQ_EMPTY(&s->io_q.pending)) {
ioq_submit(... | 1threat |
static bool coroutine_fn do_perform_cow_encrypt(BlockDriverState *bs,
uint64_t src_cluster_offset,
unsigned offset_in_cluster,
uint8_t *buffer,
... | 1threat |
Emulator: audio: Failed to create voice `adc' : <p>[ while opening AVD Manager getting </p>
<p>Emulator: qemu-system-i386.exe: warning: opening audio input failed</p>
<p>Emulator: audio: Failed to create voice `adc'</p>
<p>Emulator: audio: Failed to create voice `adc' got this error ? How to remove error ? ]<a href... | 0debug |
void OPPROTO op_decl_ECX(void)
{
ECX = (uint32_t)(ECX - 1);
}
| 1threat |
Easy jQuery issue : <p>If I have a table where a td has a class called "clicky" with the following jQuery code:</p>
<pre><code>$(".clicky").click(function()
{
var td = $(this);
$.post("http://URL/file.php", {val:value})
.done(function(data)
{
$(td).empty().append("hello");
});
});
</code></pre>
<p>How can I... | 0debug |
C# how to remove the last index of an array and store it as a character : <p>i have a character array, I would like to remove the last index and store it as a separate character name checkDigit</p>
| 0debug |
static inline uint16_t mipsdsp_sat16_sub(int16_t a, int16_t b,
CPUMIPSState *env)
{
int16_t temp;
temp = a - b;
if (MIPSDSP_OVERFLOW(a, -b, temp, 0x8000)) {
if (a > 0) {
temp = 0x7FFF;
} else {
temp = 0x8000;
... | 1threat |
static void msmpeg4_encode_dc(MpegEncContext * s, int level, int n, int *dir_ptr)
{
int sign, code;
int pred, extquant;
int extrabits = 0;
int16_t *dc_val;
pred = ff_msmpeg4_pred_dc(s, n, &dc_val, dir_ptr);
if (n < 4) {
*dc_val = level * s->y_dc_scale;
} else {
... | 1threat |
bash won't enter to else : <p>I have this code that expects string from the end user:</p>
<pre><code>#!/bin/bash
echo "You are about to deploy the site from STAGING to PRODUCTION, Are you sure? yes/no ";
read continue
if (( "$continue" == "yes" )) ; then
echo "Yes"
else
echo "No"
fi
</code></pre>
<... | 0debug |
Multiply int in array list OCAML : Hi I'm trying to solve this problem in OCAML:
I have two arrays of variable size like [1;4;5] [3;2;3] that rappresent TWO integer: 145 and 323.
I would to multiply this two number (145*323). The result (46835) I want to rappresent how [4;6;8;3;5].
Can you help me please? | 0debug |
How do I center text vertically and horizontally in Flutter? : <p>I'd like to know how to center the contents a Text widget vertically and horizontally in Flutter.
I only know how to center the widget itself using <code>Center(child: Text("test"))</code> but not the content itself, it's by default left aligned. In Andr... | 0debug |
static av_cold int alac_encode_close(AVCodecContext *avctx)
{
AlacEncodeContext *s = avctx->priv_data;
ff_lpc_end(&s->lpc_ctx);
av_freep(&avctx->extradata);
avctx->extradata_size = 0;
av_freep(&avctx->coded_frame);
return 0;
}
| 1threat |
pvscsi_ring_init_msg(PVSCSIRingInfo *m, PVSCSICmdDescSetupMsgRing *ri)
{
int i;
uint32_t len_log2;
uint32_t ring_size;
if (ri->numPages > PVSCSI_SETUP_MSG_RING_MAX_NUM_PAGES) {
return -1;
}
ring_size = ri->numPages * PVSCSI_MAX_NUM_MSG_ENTRIES_PER_PAGE;
len_log2 = pvscsi_l... | 1threat |
static void qmp_input_start_struct(Visitor *v, const char *name, void **obj,
size_t size, Error **errp)
{
QmpInputVisitor *qiv = to_qiv(v);
QObject *qobj = qmp_input_get_object(qiv, name, true, errp);
Error *err = NULL;
if (obj) {
*obj = NULL;
}
... | 1threat |
static Suite *QList_suite(void)
{
Suite *s;
TCase *qlist_public_tcase;
s = suite_create("QList suite");
qlist_public_tcase = tcase_create("Public Interface");
suite_add_tcase(s, qlist_public_tcase);
tcase_add_test(qlist_public_tcase, qlist_new_test);
tcase_add_test(qlist_public_t... | 1threat |
void arm_load_kernel(CPUState *env, struct arm_boot_info *info)
{
int kernel_size;
int initrd_size;
int n;
int is_linux = 0;
uint64_t elf_entry;
target_phys_addr_t entry;
int big_endian;
if (!info->kernel_filename) {
fprintf(stderr, "Kernel image must be specifi... | 1threat |
Why are the JCE Unlimited Strength not included by default? : <h2>Setup</h2>
<ul>
<li>Java doesn't offer out-of-the-box support for the JCE Unlimited Strength Policy Files</li>
<li>This prevents users from using AES-256, the largest key size of a widely-used encryption standard</li>
<li>Not including the policy files ... | 0debug |
int nbd_client_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset,
int bytes, BdrvRequestFlags flags)
{
NBDClientSession *client = nbd_get_client_session(bs);
NBDRequest request = {
.type = NBD_CMD_WRITE_ZEROES,
.from = offset,
.len = bytes,
... | 1threat |
int qcrypto_init(Error **errp)
{
int ret;
ret = gnutls_global_init();
if (ret < 0) {
error_setg(errp,
"Unable to initialize GNUTLS library: %s",
gnutls_strerror(ret));
return -1;
}
#ifdef DEBUG_GNUTLS
gnutls_global_set_log_level(10);
... | 1threat |
Cluster autoscaler not downscaling : <p>I have a regional cluster set up in <strong>google kubernetes engine (GKE)</strong>. The node group is a single <strong>vm in each region (3 total)</strong>. I have a deployment with <strong>3 replicas minimum</strong> controlled by a HPA.
The <strong>nodegroup is configured to b... | 0debug |
can you insert null value into date datatype in SQL (and if yes, how)? : I have been working on my SQL database for school project and i have a problem with my idea. I am doing a car service database (all made up) and i have a date data type for a collumn 'deadline' for a table 'order' (names for both in my language-'r... | 0debug |
char* qdev_get_fw_dev_path(DeviceState *dev)
{
char path[128];
int l;
l = qdev_get_fw_dev_path_helper(dev, path, 128);
path[l-1] = '\0';
return strdup(path);
}
| 1threat |
static void tci_out_label(TCGContext *s, TCGArg arg)
{
TCGLabel *label = &s->labels[arg];
if (label->has_value) {
tcg_out_i(s, label->u.value);
assert(label->u.value);
} else {
tcg_out_reloc(s, s->code_ptr, sizeof(tcg_target_ulong), arg, 0);
s->code_ptr += sizeof(tcg_... | 1threat |
Why am i getting the wrong milliseconds for a given string? : DateFormat df1 = new SimpleDateFormat("kk:mm");
Date d = null;
try {
d = df1.parse("21:00");
} catch (ParseException e) {
e.printStackTrace();
} | 0debug |
Matlab Error using .* Matrix dimensions must agree : I'm new in matlab, trying to apply high pass butterworth filter on my data images. I'm having this trouble, "Error using .* Matrix dimensions must agree."
**Here's my code:**
function[]=Preprocessing()
I = imread('Photo0029.jpg');
imshow(I);
imDoub... | 0debug |
total price in label from Datagridvie c# : Here is calculation of the Total price in C# and I want to show the total price of products in the label [Like in an image below][1]
**The row with the SalesForm.TotalPrice calculate total price**
if (cbxProdTypeSwitch.SelectedIndex == 0)
{
... | 0debug |
Python while loop not working perfectly as expected : <pre><code>choice = " "
while choice not 'Y' or choice not 'N' :
choice = input("Y for Yes or N for No")
</code></pre>
<p>What is the mistake i have made in this while loop?</p>
| 0debug |
onchange event handler exercise unclear : Im doing an exercise that is getting me used to onchange event handlers and arrays. I am having great trouble with what its asking me to do. Any help would greatly appreciated. Here is my code:
document.getElementById('productID').onchange = function () {
productID = ... | 0debug |
parameters from url using java and spring boot : I am using java and spring boot and i need to get information by a url and put them in my class java: my url is like that localhost:8080/send?adress=exempl. and i want to get just exemple in a variable java ? | 0debug |
int qemu_acl_insert(qemu_acl *acl,
int deny,
const char *match,
int index)
{
qemu_acl_entry *entry;
qemu_acl_entry *tmp;
int i = 0;
if (index <= 0)
return -1;
if (index > acl->nentries) {
return qemu_acl_append(... | 1threat |
int64_t qemu_file_get_rate_limit(QEMUFile *f)
{
return f->xfer_limit;
}
| 1threat |
Creating matrix by multiply columns (Python) : i want to create matrix as it is shown at pic:
Creating new matrices by multiplying columns of matrix in elementwise
Is it possible to create it without using 3 for loop?
(https://i.stack.imgur.com/3TirY.jpg) | 0debug |
static bool blit_region_is_unsafe(struct CirrusVGAState *s,
int32_t pitch, int32_t addr)
{
if (!pitch) {
return true;
}
if (pitch < 0) {
int64_t min = addr
+ ((int64_t)s->cirrus_blt_height-1) * pitch;
int32_t max = addr
... | 1threat |
type hint for an instance of a non specific dataclass : <p>I have a function that accepts an instance of any <code>dataclass</code>.
what would be an appropriate type hint for it ?</p>
<p>haven't found something official in the python documentation </p>
<hr>
<p>this is what I have been doing, but i don't think it's ... | 0debug |
I do not understand the template? can you help me? : <p>create a template function to exchange values stored in the two variables that are passed to that function as arguments</p>
| 0debug |
Making it so the first time you run the app you have to put in a code that can only be used once : <p>In trying to make a app and the first time you run it you would need to put in a code thats 12 digits I would have maybe 10000 diffrent codes but when someone uses a code it can not be used again
PS: The app is for and... | 0debug |
static av_cold int gif_encode_init(AVCodecContext *avctx)
{
GIFContext *s = avctx->priv_data;
if (avctx->width > 65535 || avctx->height > 65535) {
av_log(avctx, AV_LOG_ERROR, "GIF does not support resolutions above 65535x65535\n");
return AVERROR(EINVAL);
}
#if FF_API_CODED_FRAME
F... | 1threat |
why string concatenation giving me error in this code? : <p>Basically I am writing a code to calculate CRC-16(modbus) value.</p>
<p>I have a frame which I pass to my crc calculator method.It works fine when I define my input string as a whole frame.But when I use two string and then concatenate them into one then i ge... | 0debug |
How to exclude classes from the coverage calculation in EclEmma without actually excluding them from the coverage itself : <p>I am using EclEmma to test the coverage of my scenario tests and use case tests on my project.
I have a Base package which contains the most general classes and the use case tests. The coverage ... | 0debug |
static inline void RENAME(yuv2nv12X)(SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
const int16_t *chrFilter, const int16_t **chrSrc, int chrFilterSize,
uint8_t *dest, uint8_t *uDest, int dstW, int chrDstW, ... | 1threat |
my C program doesnt work the way its supposed to : I made this program but it doesnt work.
You enter two numbers.
Then you press + or -.
If you press + it should add the numbers.
If you press - it should subtract.
But that part doesnt work.
```
#include <stdio.h>
#include <stdlib.h>
/* run this program us... | 0debug |
Center page content margin: 0 auto; not working? : <p>I am trying to centre the content on this page <a href="http://www.seoweather.com/google-cache-search/" rel="nofollow noreferrer">http://www.seoweather.com/google-cache-search/</a></p>
<p>I tried adding the below but no luck.</p>
<pre><code>.container_24 .grid_24 ... | 0debug |
Google Firebase signin giving status 12501 (not working), in release build variant and jks SHA : <p><strong>I know this question has been asked by many and have been answered.</strong></p>
<p>So, why am I asking this question again? Cuz I tried those solutions, and I did followed Google docs, followed tutorials and yo... | 0debug |
Uncaught (in promise): TypeError: Cannot read property 'component' of null : <p>Getting this error when trying to use nestet route in Angular 4:</p>
<pre><code>ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'component' of null
TypeError: Cannot read property 'component' of null
at PreActivatio... | 0debug |
bool gs_allowed(void)
{
return get_machine_class()->gs_allowed;
}
| 1threat |
static int virtio_balloon_load(QEMUFile *f, void *opaque, int version_id)
{
VirtIOBalloon *s = opaque;
if (version_id != 1)
return -EINVAL;
virtio_load(&s->vdev, f);
s->num_pages = qemu_get_be32(f);
s->actual = qemu_get_be32(f);
qemu_get_buffer(f, (uint8_t *)&s->stats_vq_el... | 1threat |
static int64_t cvtnum(const char *s)
{
char *end;
return qemu_strtosz_suffix(s, &end, QEMU_STRTOSZ_DEFSUFFIX_B);
}
| 1threat |
New build disappears after uploading it to iTunes Connect : <p>I'm trying to upload a build to iTunesConnect with Xcode 8. Xcode shows me that the uploading is successful. In Activity tab of iTunesConnect I see that my build is appears and it's marked as "processing...". But after a few minutes this build disappears an... | 0debug |
static void colored_fputs(int level, const char *str)
{
if (!*str)
return;
if (use_color < 0) {
#if HAVE_SETCONSOLETEXTATTRIBUTE
CONSOLE_SCREEN_BUFFER_INFO con_info;
con = GetStdHandle(STD_ERROR_HANDLE);
use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR") &... | 1threat |
I am getting this error "your cpu doesn't support vt-x or svm, android studio 2.1.1 in AMD 6300 processor" : <p>I have enabled the virtualization in bios setup but when i try to launch the emulator i am getting the error "your cpu doesn't support vt-x or svm"</p>
<p>I have installed Intel haxm too.</p>
| 0debug |
int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
{
ImgUtils imgutils = { &imgutils_class, log_offset, log_ctx };
if ((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8)
return 0;
av_log(&imgutils, AV_LOG_ERROR, "Picture size %ux%u is invalid\... | 1threat |
refer to the month and year in postgresql : Hi all I'm trying to pass a script that is in mysql to PostgrSQL, but there is a sentancia this in mysql that generates me problems
is this:
$q1="select * from noticias where month(fecha)='".$elmes."' and year(fecha)='".$elanio."'";
I get the following error:
> ... | 0debug |
BigQuery: Pageviews, Sessions, Users by differents sources, medium, campaigns : <p>What is the query for Pageviews, Sessions, Users by differents sources, medium, campaigns?</p>
| 0debug |
CNCopyCurrentNetworkInfo with iOS 13 : <p>Apple changed some things regarding WiFi with iOS 13. If you want to use CNCopyCurrentNetworkInfo your app needs to have one of the following</p>
<ul>
<li>Apps with permission to access location</li>
<li>Your app is the currently enabled VPN app</li>
<li>Your app configured th... | 0debug |
window.location.href = 'http://attack.com?user=' + user_input; | 1threat |
Local Storage not storing/retrieving value : <p>This is my code:</p>
<pre><code> <select name="category" id="category" value="category" class="form-control ddplaceholder" style="width:220px;font-size:18px;font-family:Roboto;" onchange="document.form.submit();">
<script>
var cat = localStorage.g... | 0debug |
sorting a dictionary in descending order of (i) keys (ii) Values [IN PYTHON] : I have a dictionary:
{1: 6, 2: 4, 3: 7}
If I want to sort in in descending order of VALUES, I use:
for w in sorted(dict_test, key=dict_test.get, reverse=True):
print (w, dict_test[w])
What should I do for descending order of... | 0debug |
static int vp3_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
Vp3DecodeContext *s = avctx->priv_data;
GetBitContext gb;
int i;
int re... | 1threat |
SQL that work on ORACLE and not work on DB2 : <p>I have an SQL that put the comma before house address number.
This SQL work great on ORACLE but if I paste it in DB2 (vers. 7.2)
is not work. </p>
<pre><code>SELECT C, REGEXP_REPLACE(C,'(\s+\S*\d+\s*$)',',\1')
FROM TABLE( ... | 0debug |
Google Play - Fully Shadowed apk : <p>I have an existing app on the PlayStore. I am releasing new version of the app as <strong>staged rollout</strong>. However, I am not able to publish the app due to "Fully Shadowed APK" error.</p>
<p><a href="https://i.stack.imgur.com/XhhPS.png" rel="noreferrer"><img src="https://i... | 0debug |
Websocket communication in a symfony project : <p>I want to send notification from server to browsers in a php symfony project.
Is there a simple way to do this in symfony ?</p>
| 0debug |
db.execute('SELECT * FROM employees WHERE id = ' + user_input) | 1threat |
How to handle when VueJS computed properties return HTML code? : <p>I use <code>VueJS 2</code> to render and calculate form items. Now I need to show a number if a propertie is under 10, and I need show a text message if the propertie is over or equal 10.</p>
<p>I use this code:</p>
<pre><code>Vue.component('mycompon... | 0debug |
how can Increase/Decrease Perticular Item quantity in Cart Functionality inside RecyclerView in android : I Have Working on a Cart Items Based Project. In which I have to Increase/Decrease Order item Quantity Two Button. EveryThing is Fine But on Perticular Item Increase/Decrease Value it cann't count from 1 .it can ... | 0debug |
The width of my Web page is 1680px. No matter how big the resolution of the other monitors is let the width of my Web page be same as 1680 px. : The width of my Web page is 1680px. No matter how big the resolution of the other monitors is (1920px, 2560px, 2880px,...), let the width of my Web page be same as 1680 px. I... | 0debug |
void FUNCC(ff_h264_idct8_add)(uint8_t *_dst, int16_t *_block, int stride){
int i;
pixel *dst = (pixel*)_dst;
dctcoef *block = (dctcoef*)_block;
stride >>= sizeof(pixel)-1;
block[0] += 32;
for( i = 0; i < 8; i++ )
{
const int a0 = block[i+0*8] + block[i+4*8];
con... | 1threat |
static int nut_write_trailer(AVFormatContext *s)
{
NUTContext *nut = s->priv_data;
ByteIOContext *bc = &s->pb;
update_packetheader(nut, bc, 0);
#if 0
int i;
for (i = 0; s->nb_streams; i++)
{
put_be64(bc, INDEX_STARTCODE);
put_packetheader(nut, bc, 64);
put_v(bc, s->st... | 1threat |
setup of collection view in horizontal format with an array of images in different cells : I have created a collection view and I want to set five cells with images in them. We can capture the images from camera. I want the cells to be kept like in the horizontal format.
Here in the first image I add the imagePick... | 0debug |
How to reverse "?<=" in regexp : when I use:
String s = "http://google.com, /home/roroco/Dropbox/jvs/ro-idea/META-INF/plugin.xml"
ArrayList<String> ms = s.findAll(/(?<=\/)\/\S+/)
println(ms)
the output:
[/google.com,]
when I change to:
s.findAll(/(?<!\/)\/\S+... | 0debug |
Increase performance async Parallel.Foreach c# code : I have a deviceList of more than 10k items and want to send data by calling another method.
I tried to use Parallel.Foreach but I'm not sure is this the correct way to do it.
I have published this webapp on azure, I have tested this for 100 it works fine but f... | 0debug |
void FUNCC(ff_h264_idct8_dc_add)(uint8_t *_dst, int16_t *block, int stride){
int i, j;
int dc = (((dctcoef*)block)[0] + 32) >> 6;
pixel *dst = (pixel*)_dst;
stride >>= sizeof(pixel)-1;
for( j = 0; j < 8; j++ )
{
for( i = 0; i < 8; i++ )
dst[i] = av_clip_pixel( dst[i] ... | 1threat |
static int pci_bridge_initfn(PCIDevice *dev)
{
PCIBridge *s = DO_UPCAST(PCIBridge, dev, dev);
pci_config_set_vendor_id(s->dev.config, s->vid);
pci_config_set_device_id(s->dev.config, s->did);
s->dev.config[0x04] = 0x06;
s->dev.config[0x05] = 0x00;
s->dev.config[0x06] = 0xa0;
s-... | 1threat |
How index.html in Angular-CLI .NET Core is called? : <p>I have built an Angular-CLI .Net Core SPA with Visual Studio 2017 by using</p>
<pre><code>dotnet new angular -o my-new-app
</code></pre>
<p>What I am struggling to find is how <code>index.html</code> which lies inside <code>ClientApp/src</code> folder is called... | 0debug |
phpmyadmin Failed to set session cookie. Maybe you are using HTTP instead of HTTPS : <p>I install PHP, Apache, and MySQL done and worked.
When I finish installing Phpmyadmin, then open it has an error.</p>
<pre><code>Failed to set session cookie. Maybe you are using HTTP instead of HTTPS.
</code></pre>
<p>I don't kno... | 0debug |
What are the ways available for getting Database from SQL and display it in web page? : <ol>
<li>I know JSP,PHP and ASP.Net are there apart from these what are the
ways are there to get data from database. </li>
<li>It is possible by using J query,Bootstrap and Angular JS. If any
other way means suggest.</li>
</ol>
| 0debug |
Null pointer exception in setText : <p>I am trying to get name of a file using mediastore and display it in text view using <code>setText()</code> but <code>setText()</code> gives null pointer exception on running app.
I am getting name from mediastore , saving it as string and passing the string to <code>setText()</c... | 0debug |
Visual Studio Code, Java Extension, howto add jar to classpath : <p>In Eclipse, I add a jar library using </p>
<p>project -> build path ->configure build path</p>
<p>What is the equivalent in VisualStudioCode? I had a look into launch.json. There is a classpath defined. Adding jars to this classpath (array) variable ... | 0debug |
def remove_spaces(str1):
str1 = str1.replace(' ','')
return str1 | 0debug |
How to make a button to press on Python 3 : <p>How would I make a button that would activate a program? Sort of like a video game.
If you want to solve this question please take these requests into action.
1. It needs to be in <strong>Python 3</strong>
2.it needs to be fairly simple.</p>
<p>Thanks</p>
| 0debug |
static int vc1_parse(AVCodecParserContext *s,
AVCodecContext *avctx,
const uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size)
{
VC1ParseContext *vpc = s->priv_data;
int pic_found = vpc->pc.frame... | 1threat |
psycopg2.OperationalError: could not connect to server: Connection refused Is the server running on host "localhost" : <p>Got Error while doing docker-compose up.</p>
<pre><code>conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Connection ref... | 0debug |
saving following array of object in a nodejs api : {
"resourceID":"5963647f2bf14038f04d4f01",
"privilegeID":["596363222bf14038f04d4efd","5963648b2bf14038f04d4f02","596364942bf14038f04d4f03","596364a02bf14038f04d4f04"]
} | 0debug |
static int virtio_blk_pci_init(VirtIOPCIProxy *vpci_dev)
{
VirtIOBlkPCI *dev = VIRTIO_BLK_PCI(vpci_dev);
DeviceState *vdev = DEVICE(&dev->vdev);
virtio_blk_set_conf(vdev, &(dev->blk));
qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
if (qdev_init(vdev) < 0) {
return -1;
}
re... | 1threat |
Is there a way to overwrite log files in python 2.x : <p>I'm using python2.x logging module, like,</p>
<pre><code>logging.basicConfig(format='%(asctime)s %(message)s',
datefmt='%m/%d/%Y %I:%M:%S %p',
filename='logs.log',
level=logging.INFO)
</code></pre>
<p>I want my pr... | 0debug |
thumb rule for using auto&& and const auto & : I have studied auto and I know it deduces types from initialized values. So if I try to write certain thumb rule for usage of auto, can I put below statements as rule-
1) Use auto && for all values (r-values and l-value, as It is universal ref)those are modifiable. ... | 0debug |
static int tgv_decode_inter(TgvContext *s, AVFrame *frame,
const uint8_t *buf, const uint8_t *buf_end)
{
int num_mvs;
int num_blocks_raw;
int num_blocks_packed;
int vector_bits;
int i,j,x,y;
GetBitContext gb;
int mvbits;
const uint8_t *blocks_raw;
... | 1threat |
import re
def is_valid_URL(str):
regex = ("((http|https)://)(www.)?" +
"[a-zA-Z0-9@:%._\\+~#?&//=]" +
"{2,256}\\.[a-z]" +
"{2,6}\\b([-a-zA-Z0-9@:%" +
"._\\+~#?&//=]*)")
p = re.compile(regex)
if (str == None):
return False
if(re.search(p, str)):
return True
else:
return False | 0debug |
static void h264_loop_filter_strength_mmx2( int16_t bS[2][4][4], uint8_t nnz[40], int8_t ref[2][40], int16_t mv[2][40][2],
int bidir, int edges, int step, int mask_mv0, int mask_mv1, int field ) {
__asm__ volatile(
"movq %0, %%mm7 \n"
"movq %1, %%mm6 \... | 1threat |
static int amovie_get_samples(AVFilterLink *outlink)
{
MovieContext *movie = outlink->src->priv;
AVPacket pkt;
int ret, got_frame = 0;
if (!movie->pkt.size && movie->is_done == 1)
return AVERROR_EOF;
if (!movie->pkt.size) {
while ((ret = av_read_frame(movie->format_... | 1threat |
static void test_i440fx_pam(gconstpointer opaque)
{
const TestData *s = opaque;
QPCIBus *bus;
QPCIDevice *dev;
int i;
static struct {
uint32_t start;
uint32_t end;
} pam_area[] = {
{ 0, 0 },
{ 0xF0000, 0xFFFFF },
{ 0xC0000, 0xC3FFF },
... | 1threat |
I am trying to remove exponential numbers from the results : <p>Help! I am completely new to coding as you can see...lol I need help removing the scientific notation that my code outputs. I would like the results to be displayed as only real numbers...i.e (removing the "e")...I would like to show only maybe 2-4 numbers... | 0debug |
static int read_sm_data(AVFormatContext *s, AVIOContext *bc, AVPacket *pkt, int is_meta, int64_t maxpos)
{
int count = ffio_read_varlen(bc);
int skip_start = 0;
int skip_end = 0;
int channels = 0;
int64_t channel_layout = 0;
int sample_rate = 0;
int width = 0;
int height = 0;
... | 1threat |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.