problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
Copy/move elision requires explicit definition of copy/move constructors : <p>Consider the following program:</p>
<pre><code>#include <iostream>
#include <utility>
class T {
public:
T() { printf("address at construction: %zx\n", (uintptr_t)this); }
// T(const T&) { printf("copy-constructed\... | 0debug |
var not receiving correct value inside a function - Javascript : <p>I have this function called <strong>getQuotes()</strong>, and a <strong>console.log()</strong> at the end of it that shows the correct value of <strong>currentQuote</strong>.</p>
<pre><code>function getQuote() {
$.ajax({
headers: {
... | 0debug |
Hi i got this error in Laravel, please help me out : ErrorException thrown with message "syntax error, unexpected '"', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) (View: C:\xampp\htdocs\blog\resources\views\posts\view.blade.php)"
Stacktrace:
#0 Symfony\Component\Debug\Exception\FatalThrowableError in C:\xampp\htdocs\blog... | 0debug |
College Swift Xcode game : I need help with the fact that I try to add two variables together and it says this:
'''
Cannot convert value of type 'CGFloat' to expected argument type 'CGPoint'
'''
I would appreciate it if someone would help me to understand ow to fix this problem with my game application.
the code ... | 0debug |
How to use both google+ and facebook login in same appdelegate.swift : <p>My app use google+ signin and in my appdelegate.swift i have:</p>
<pre><code>func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization a... | 0debug |
Who wants to be a millionaire (special help option) : I have wrote a very very simple quiz c++ program (who wants to be a millionaire) which reads the questions from the file,
I would like to include a special help option which will skip the answer when used. The problem is that I do not want the user to use that opti... | 0debug |
static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadFunc *read_child, int ctx_size, enum MXFMetadataSetType type)
{
AVIOContext *pb = mxf->fc->pb;
MXFMetadataSet *ctx = ctx_size ? av_mallocz(ctx_size) : mxf;
uint64_t klv_end = avio_tell(pb) + klv->length;
if (!ctx)
... | 1threat |
Add Reference to dll vs. adding a NuGet package in .NET Standard project : <p>I have a .NET Standard 2.0 project in my solution and I am using the IConfiguration interface. When I write the name VS suggest that I reference Microsoft.Extensions.Configuration.Abstractions.dll. If I do it is added under the reference node... | 0debug |
static av_cold void common_init(H264Context *h){
MpegEncContext * const s = &h->s;
s->width = s->avctx->width;
s->height = s->avctx->height;
s->codec_id= s->avctx->codec->id;
ff_h264dsp_init(&h->h264dsp, 8, 1);
ff_h264_pred_init(&h->hpc, s->codec_id, 8, 1);
h->dequant_coeff_pps=... | 1threat |
int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const char *command, const char *arg, int flags, double ts)
{
int i;
if(!graph)
return 0;
for (i = 0; i < graph->nb_filters; i++) {
AVFilterContext *filter = graph->filters[i];
if(filter && (!strcmp(target, "a... | 1threat |
Easiest way to change code in a laverel and angular project : i want to make changes in a new script. This is based on laverel and angularjs. With both in have no experience.
So it seems that this work completely differet as i normaly work with standalone php and js files.
So could somebody explain me, what is th... | 0debug |
Why does printf function ignore the latter \0? : <p>I am stuck with some features that \0 has.</p>
<p>I know that \0 is a null character and it is a term to indicate that the formal is a string. </p>
<pre><code>int j;
j = printf("abcdef\0abcdefg\0");
printf("%d", j);
return 0;
</code></pre>
<p>When I tried to pri... | 0debug |
Unable to reproduce WebKitLegacy -[_WebSafeForwarder forwardInvocation:] crash : <p>I am Getting [_WebSafeForwarder forwardInvocation:] and crash report as following on crashlytics. Unable to reproduce the same condition in my code. I added <code>webview.delegate = nil</code> and <code>[webview stopLoading]</code> in e... | 0debug |
Google API javacript : I am doing a custom google map with API
I put the URL link : https://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap&markers=color:blue|label:S|40.702147,-74.015794&markers=color:green|label:G|40.711614,-74.012318&markers=color:re... | 0debug |
static void new_video_stream(AVFormatContext *oc, int file_idx)
{
AVStream *st;
AVOutputStream *ost;
AVCodecContext *video_enc;
enum CodecID codec_id;
AVCodec *codec= NULL;
st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
if (!st) {
... | 1threat |
How to convert the string to methods(like .Sendkeys) in Java? : Need to convert variable contains String to method call.
Example:
Variable:
//Enter the name and value of the locator
public String[] LoginID_Button = {"name","Log in"};
In my another class:
exact code:
driver.findElement(By.**nam... | 0debug |
What's the difference between shouldBe vs shouldEqual in Scala? : <p>When should I be using shouldBe and when should I be using shouldEqual?</p>
<pre><code>port shouldEqual 8000
port shouldBe 8000
</code></pre>
| 0debug |
static int ram_decompress_open(RamDecompressState *s, QEMUFile *f)
{
int ret;
memset(s, 0, sizeof(*s));
s->f = f;
ret = inflateInit(&s->zstream);
if (ret != Z_OK)
return -1;
return 0;
}
| 1threat |
Create a rectangle around a binary image mask : <p>From a given image i'm able to create a binary mask that detect certain objects, how i can draw multiple rectangles a round those detected objects so that i're draw it to the original image also if it possible to obtain the corrdinates of those rectangle so i can plot ... | 0debug |
how can I merge an asp.net mvc app with android app : <p>I am working an E-commerce buy sale online asp.net mvc website. I am working in a group. we are beginners. we are confused about the fact that how we will be connecting an asp.net mvc app with java based android app? For example how android app will connect to th... | 0debug |
Qualtrics Word Counter Javascript : <p>I am setting up a survey on Qualtrics. One question has a text box, in which participants shall write 100-130 words. I want to have a word counter so people can see how much they have written already. Can anyone help me out with a Javascript code for a word counter that is usable ... | 0debug |
Android make transition on activity recreate() : <p>I would like to put a transition on activity recreate() after changing theme, is it possible?</p>
<p>I tried:
@android:anim/fade_in
@android:anim/fade_out
but it didn't work, and that will also affect the transition when I open and close activity, but I don't want th... | 0debug |
Mean Programm in python : I'm trying to implement the median in Python language, but when I run the script, it doesn't work properly. But just stop, nothing else happen. Could someone help me, pls.
**Median Programm**
data = []
value = input("Enter a value (blank line to quit): ")
while value ... | 0debug |
def check_monthnum_number(monthnum1):
if monthnum1 == 2:
return True
else:
return False | 0debug |
def frequency_Of_Smallest(n,arr):
mn = arr[0]
freq = 1
for i in range(1,n):
if (arr[i] < mn):
mn = arr[i]
freq = 1
elif (arr[i] == mn):
freq += 1
return freq | 0debug |
Why should initialize list in Java : <p>If I use the below code</p>
<pre><code>List<String> listOfStrings=new ArrayList<>();
listOfStrings.add("first string");
</code></pre>
<p>or the following code</p>
<pre><code>List<String> listOfStrings;
listOfStrings.add("first string");
</code></pre>
<p>to c... | 0debug |
static void flash_sync_page(Flash *s, int page)
{
QEMUIOVector *iov = g_new(QEMUIOVector, 1);
if (!s->blk || blk_is_read_only(s->blk)) {
return;
}
qemu_iovec_init(iov, 1);
qemu_iovec_add(iov, s->storage + page * s->pi->page_size,
s->pi->page_size);
blk_aio... | 1threat |
C++: Convert Win32 textbox input into ASCII integers, do some math, convert back into characters that can be printed in another Win32 textbox : This is hopefully, someday, going to be an encryption program. I decided to get fancy and make a window with two text boxes and two buttons; one text box for input, one text bo... | 0debug |
static void block_io_signals(void)
{
sigset_t set;
struct sigaction sigact;
sigemptyset(&set);
sigaddset(&set, SIGUSR2);
sigaddset(&set, SIGIO);
sigaddset(&set, SIGALRM);
sigaddset(&set, SIGCHLD);
pthread_sigmask(SIG_BLOCK, &set, NULL);
sigemptyset(&set);
sigaddset... | 1threat |
static int do_cont(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
struct bdrv_iterate_context context = { mon, 0 };
bdrv_iterate(encrypted_bdrv_it, &context);
if (!context.err) {
vm_start();
return 0;
} else {
| 1threat |
any reasons for inconsistent numpy arguments of numpy.zeros and numpy.random.randn : <p>I'm implementing a computation using numpy zeros and numpy.random.randn</p>
<pre><code>W1 = np.random.randn(n_h, n_x) * .01
b1 = np.zeros((n_h, 1))
</code></pre>
<p>I'm not sure why <strong><em>random.randn()</em></strong> can acc... | 0debug |
static void rcu_qtest_init(void)
{
struct list_element *new_el;
int i;
nthreadsrunning = 0;
srand(time(0));
for (i = 0; i < RCU_Q_LEN; i++) {
new_el = g_new(struct list_element, 1);
new_el->val = i;
QLIST_INSERT_HEAD_RCU(&Q_list_head, new_el, entry);
}
atom... | 1threat |
static void fill_gv_table(int table[256 + 2*YUVRGB_TABLE_HEADROOM], const int elemsize, const int inc)
{
int i;
int off = -(inc >> 9);
for (i = 0; i < 256 + 2*YUVRGB_TABLE_HEADROOM; i++) {
int64_t cb = av_clip(i-YUVRGB_TABLE_HEADROOM, 0, 255)*inc;
table[i] = elemsize * (off + (cb ... | 1threat |
static void resume_all_vcpus(void)
{
CPUState *penv = first_cpu;
while (penv) {
penv->stop = 0;
penv->stopped = 0;
qemu_thread_signal(penv->thread, SIGUSR1);
qemu_cpu_kick(penv);
penv = (CPUState *)penv->next_cpu;
}
}
| 1threat |
static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
uint8_t *buf, int buf_size)
{
RTSPState *rt = s->priv_data;
RTSPStream *rtsp_st;
fd_set rfds;
int fd, fd_max, n, i, ret, tcp_fd;
struct timeval tv;
for(;;) {
if (url_interrupt_cb()... | 1threat |
static void qed_check_for_leaks(QEDCheck *check)
{
BDRVQEDState *s = check->s;
size_t i;
for (i = s->header.header_size; i < check->nclusters; i++) {
if (!qed_test_bit(check->used_clusters, i)) {
check->result->leaks++;
}
}
}
| 1threat |
How do I insert a Machine Name info a path? : So my goal is to put a MachineName string into the path location.
Here = MachineName1
string MachineName1 = Environment.MachineName;
Path = @"C:\Users\ Here \AppData\Local\Secret\Secret"; | 0debug |
static ssize_t handle_aiocb_ioctl(struct qemu_paiocb *aiocb)
{
int ret;
ret = ioctl(aiocb->aio_fildes, aiocb->aio_ioctl_cmd, aiocb->aio_ioctl_buf);
if (ret == -1)
return -errno;
return aiocb->aio_nbytes;
}
| 1threat |
How to set focus on element with binding? : <p>In Angular2 how can I set binding on element focus.
I don't want to set it with elementRef.
I think in AngularJS there is ngFocus directive
In Angular2 there is no such directive</p>
| 0debug |
av_cold int MPV_common_init(MpegEncContext *s)
{
int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y, threads;
if(s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
s->mb_height = (s->height + 31) / 32 * 2;
else
s->mb_height = (s->height + 15) / 16;
... | 1threat |
Disable autouse fixtures on specific pytest marks : <p>Is it possible to prevent the execution of "function scoped" fixtures with <code>autouse=True</code> on specific marks only?</p>
<p>I have the following fixture set to autouse so that all outgoing requests are automatically mocked out:</p>
<pre><code>@pytest.fixt... | 0debug |
Maven AspectJ plugin fails to build with Java 9 due to missing tools.jar : <p>I switched my JDK version from 8 to 9 and the AspectJ plugin no longer works due to missing tools.jar:</p>
<p><em>Execution default of goal org.codehaus.mojo:aspectj-maven-plugin:1.10:compile failed: Plugin org.codehaus.mojo:aspectj-maven-pl... | 0debug |
C++ | Game Stops after If statement : I run this code but when I reach the edge of the screen, it doesn't allow me to enter a new travel direction instead the console closes down.. need help fixing this please
class weapon
{
public:
weapon();
weapon(int x, int y);
int xPos;... | 0debug |
JavaScript returning code : I've made a list of ships that it represented like so:
var fleet = [
"RMS MARY", 2000, 15],
["TITANIC 2", 10000, 13],
["Boaty McBoatface", 2000, 18],
["Jutlandia", 1945, 10],
["Hjejlen", 250, 8],
];
What i need to do now is make a function that will fi... | 0debug |
Why we use #!/bin/bash in Bash script? : <p>What is the significant of using <strong>#!/bin/bash</strong> in the starting of bash script? Can we write a bash script without <strong>#!/bin/bash</strong> ?</p>
| 0debug |
static struct omap_sti_s *omap_sti_init(struct omap_target_agent_s *ta,
MemoryRegion *sysmem,
target_phys_addr_t channel_base, qemu_irq irq, omap_clk clk,
CharDriverState *chr)
{
struct omap_sti_s *s = (struct omap_sti_s *)
g_malloc0(sizeof(struct om... | 1threat |
AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b)
{
AVFilterFormats *ret;
unsigned i, j, k = 0;
ret = av_mallocz(sizeof(AVFilterFormats));
ret->formats = av_malloc(sizeof(*ret->formats) * FFMIN(a->format_count,
... | 1threat |
static void shpc_set_status(SHPCDevice *shpc,
int slot, uint8_t value, uint16_t msk)
{
uint8_t *status = shpc->config + SHPC_SLOT_STATUS(slot);
pci_word_test_and_clear_mask(status, msk);
pci_word_test_and_set_mask(status, value << (ffs(msk) - 1));
}
| 1threat |
How to find same/mutual/common entries of two users? : <p>I want to find all pages two users like (<code>status = 1</code>) or dislike (<code>status = 0</code>).</p>
<p>Structure <code>pages_likes</code>:</p>
<p><a href="https://i.stack.imgur.com/maVNL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.co... | 0debug |
How to enable maven artifact caching for gitlab ci runner? : <p>We use gitlab ci with shared runners to do our continuous integration. For each build, the runner downloads tons of maven artifacts.</p>
<p>Is there a way to configure gitlab ci to cache those artifacts so we can speed up the building process by preventin... | 0debug |
How can i stream audio from one device to another device over same wifi network? : I have music player and need to add sync play functionality with other mobile for example if 2 or more users are using my music player and want to play same song on all devices then they just connect through same network and can play mus... | 0debug |
static int adpcm_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
ADPCMContext *c = avctx->priv_data;
ADPCMChannelStatus *cs;
int n, m, channel, i;
int block_predictor[2];
short *samples;
uint8_t *src;
int st;
... | 1threat |
Move Object in its own X - axis to and fro, on mouse drag : [Image][1]
I want to move a particular object in its own X- axis to and fro, by using mouse.Clamp the movement between that box gap.
[1]: https://i.stack.imgur.com/wxZ2P.jpg
| 0debug |
static USBDevice *usb_serial_init(USBBus *bus, const char *filename)
{
USBDevice *dev;
Chardev *cdrv;
char label[32];
static int index;
while (*filename && *filename != ':') {
const char *p;
if (strstart(filename, "vendorid=", &p)) {
error_report("vendorid is... | 1threat |
jwt_auth_no_auth_header error on validating WordPress REST API JWT token : <p>I have two AWS instances, one for WordPress website and another for React application. To connect them together I am using "WP REST API - OAuth 1.0a Server" and "JWT Authentication for WP-API" for accessing WP REST API. </p>
<p>I am able to ... | 0debug |
static int aac_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AACContext *ac = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
GetBitContext gb;
int buf_consumed;
int buf_offset;
int ... | 1threat |
why is the if statement associated with the second radio button not writing? : i am working on a project in which There are two options in the selection screen.
Block Title - Search
1)Flight Information
2)Customer ID
On Choosing the first radio button, a selection block with the following fields must appear
CA... | 0debug |
html mobile and laptop website design : <p>I am working on a project on html in which we have to make a website which is both laptop and mobile compatible.
what I want is that I want two different navigation bar meaning when I open the normal website it shows different one and when I open mobile it would have a differ... | 0debug |
php video upload doesn't work : <p>I have a php script. The script can't upload a video.</p>
<p>When I submit the form, I get the error: Warning: getimagesize(): Filename cannot be empty. I have search on the internet, I change getimagesize in file() and $_FILES["uploaded_file"]["type"];
But this doesn't work.</p>
<p... | 0debug |
void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
uint8_t *d = (uint8_t *)dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while(s < end)
{
register uint16_t bgr;
bgr = *s++;
#ifdef WORDS_BIGENDIAN
*d++ = 0;
*d++ = (bgr&0x1F)<<3;... | 1threat |
Is there a concise way to "invert" an Option? : <p>Say I have a function that can take an optional parameter, and I want to return a <code>Some</code> if the argument is <code>None</code> and a <code>None</code> if the argument is <code>Some</code>:</p>
<pre><code>def foo(a: Option[A]): Option[B] = a match {
case So... | 0debug |
Multiple stores in ngrx : <p>I am writing an enterprise-scale application with Angular and ngrx. The intention is to use Flux and ngrx throughout. For reuse and separability we require (at least) two state stores that do not interact with each other. But we do need both stores to be active at the same time, and potenti... | 0debug |
static int oma_read_packet(AVFormatContext *s, AVPacket *pkt)
{
OMAContext *oc = s->priv_data;
AVStream *st = s->streams[0];
int packet_size = st->codec->block_align;
int byte_rate = st->codec->bit_rate >> 3;
int64_t pos = avio_tell(s->pb);
int ret = av_get_packet(s->pb,... | 1threat |
What are the internals of Pythons str.join()? (Hiding passwords from output) : <p>I just stumbled upon an interesting(?) way to hide passwords (and other personal data) from general output from screen to logfiles.</p>
<p>In his book <a href="http://www.oreilly.com/programming/free/files/how-to-make-mistakes-in-python.... | 0debug |
php7 driver non trouvé (mysql) : voici mon code de connexion (php 7):
try {
$conn = new PDO('mysql :host='.$host.';dbname='.$database, $user, $password);
} catch (Exception $e) {
die('Erreur : ' . $e->getMessage());
}
et je reçois un message "Erreur : could not find driver"
u... | 0debug |
C# 7.0 Feature or what - [ClassName] obj when obj.Type is SomeType some : <p>I have been recently assigned to a project which is using C# 7.0. While I was debugging the code I came across some switch case statement and in that it was written something like below: </p>
<pre><code>switch (message)
{
case MyClass ob... | 0debug |
static int decode_cabac_field_decoding_flag(H264Context *h) {
MpegEncContext * const s = &h->s;
const int mb_x = s->mb_x;
const int mb_y = s->mb_y & ~1;
const int mba_xy = mb_x - 1 + mb_y *s->mb_stride;
const int mbb_xy = mb_x + (mb_y-2)*s->mb_stride;
unsigned int ctx = 0;
... | 1threat |
void ide_exec_cmd(IDEBus *bus, uint32_t val)
{
uint16_t *identify_data;
IDEState *s;
int n;
#if defined(DEBUG_IDE)
printf("ide: CMD=%02x\n", val);
#endif
s = idebus_active_if(bus);
if (s != bus->ifs && !s->bs)
return;
if ((s->status & (BUSY_STAT|DRQ_STAT)) ... | 1threat |
const char *postproc_configuration(void)
{
return FFMPEG_CONFIGURATION;
}
| 1threat |
How to make this Java code formatter more beautiful : <p>I'm learning programming skill from Robert C.Martin《Clean code》.When I read the content about code format,I confused. So I write below code.Can tell me which is good? Or is there any more good way.Thanks for all.</p>
<p><strong>version one</strong></p>
<pre cla... | 0debug |
Why is the Linq-to-Objects sum of a sequence of nullables itself nullable? : <p>As usual, <code>int?</code> means <code>System.Nullable<int></code> (or <code>System.Nullable`1[System.Int32]</code>).</p>
<p>Suppose you have an in-memory <code>IEnumerable<int?></code> (such as a <code>List<int?></code>... | 0debug |
static inline int hpel_motion_lowres(MpegEncContext *s,
uint8_t *dest, uint8_t *src,
int field_based, int field_select,
int src_x, int src_y,
int width, int height, int... | 1threat |
static inline void tcg_out_brcond(TCGContext *s, TCGCond cond, TCGReg arg1,
TCGReg arg2, int label_index, int cmp4)
{
TCGLabel *l = &s->labels[label_index];
uint64_t imm;
if (l->has_value) {
imm = l->u.value_ptr - s->code_ptr;
} else {
... | 1threat |
How to Type Cast null as Bool in C#? : <p>I'm having one null-able bool (<code>bool?</code>) variable, it holds a value null. One more variable of type pure <code>bool</code>, I tried to convert the null-able bool to bool. But I faced an error "<strong>Nullable object must have a value.</strong>"</p>
<p>My C# Code is ... | 0debug |
void vp78_decode_mv_mb_modes(AVCodecContext *avctx, VP8Frame *curframe,
VP8Frame *prev_frame, int is_vp7)
{
VP8Context *s = avctx->priv_data;
int mb_x, mb_y;
s->mv_min.y = -MARGIN;
s->mv_max.y = ((s->mb_height - 1) << 6) + MARGIN;
for (mb_y = 0; mb_y < s-... | 1threat |
How to choose between Azure data lake analytics and Azure Databricks : <p>Azure data lake analytics and azure databricks both can be used for batch processing. Could anyone please help me understand when to choose one over another?</p>
| 0debug |
def is_octagonal(n):
return 3 * n * n - 2 * n | 0debug |
.class Expected error in java : <p>I get only two errors of .class expected <a href="https://i.stack.imgur.com/2RcQt.jpg" rel="nofollow noreferrer">I am getting this error in my program</a></p>
<pre><code>String[] email= {"Sarangmemon8","Alimutaba626","Kali_denali"};
String[] pass= {"Sarang","Mujtaba","Kali"};
System.... | 0debug |
static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb,
int channel, int *last)
{
int t, t2;
int sign, base, add, ret;
WvChannel *c = &ctx->ch[channel];
*last = 0;
if ((ctx->ch[0].median[0] < 2U) && (ctx->ch[1].median[0] < 2U) &&
!ctx->zero &&... | 1threat |
How to deploy a project made in PHP with MVC structure in Google APP Engine? : I hope you can help me, I have the following problem: I am uploading my PHP project with MVC structure to Google App Engine, when I deploy everything is fine, but when I show it in the browser, I do not send, inspect the console and mark me ... | 0debug |
void error_propagate(Error **dst_err, Error *local_err)
{
if (dst_err) {
*dst_err = local_err;
} else if (local_err) {
error_free(local_err);
}
}
| 1threat |
static int pte_check_hash32(struct mmu_ctx_hash32 *ctx, target_ulong pte0,
target_ulong pte1, int h, int rwx)
{
target_ulong mmask;
int access, ret, pp;
ret = -1;
if ((pte0 & HPTE32_V_VALID) && (h == !!(pte0 & HPTE32_V_SECONDARY))) {
mmask = P... | 1threat |
Data is not enter in database using php : <p>I want to insert data into the database.but when i click on save button than data did not go in database.i did not understand where i did mistake. This is my php code:</p>
<pre><code> <?php
$host = "localhost";
$user = "root";
$password ="";
$database = "crud";
$conn ... | 0debug |
How do i generate a random number in c++ between 1 and 16? : <p>I don't know how to generate a random number between 1 and 16 in c++, i only know the <code>int random = rand() % 100</code> method to generate a number between 0-99. can someone help me out please?</p>
| 0debug |
static void h264_h_loop_filter_chroma_intra_c(uint8_t *pix, int stride, int alpha, int beta)
{
h264_loop_filter_chroma_intra_c(pix, 1, stride, alpha, beta);
}
| 1threat |
Does dictionaries add another one in a random order? : <p><a href="https://i.stack.imgur.com/IJ6eK.jpg" rel="nofollow noreferrer">enter image description here</a></p>
<p>Please find the above program that I have used as an example to demonstrate what happened when I tried to update one dictionary with another.</p>
| 0debug |
How to reverse value of string array? : <p>Let's say I have this array :</p>
<pre><code>fruits: string[] = ['banana', 'strawberry', 'kiwi', 'apple'];
</code></pre>
<p>How can I do to have :</p>
<pre><code>fruits = ['ananab', 'yrrebwarts', 'iwki', 'elppa'];
</code></pre>
| 0debug |
Export HTML to PDF always align at the bottom of a new page : <p>I am having a problem with export html to PDF. I would like section at the bottom to be always aligned at the bottom of a new page.</p>
<p>Right now this section (when it comes to page break) is aligned at the top of a new page:</p>
<p><a href="https://... | 0debug |
static void set_fifodepth(MSSSpiState *s)
{
unsigned int size = s->regs[R_SPI_DFSIZE] & FRAMESZ_MASK;
if (size <= 8) {
s->fifo_depth = 32;
} else if (size <= 16) {
s->fifo_depth = 16;
} else if (size <= 32) {
s->fifo_depth = 8;
} else {
s->fifo_depth = 4;
... | 1threat |
static CharDriverState *qemu_chr_open_win_path(const char *filename)
{
CharDriverState *chr;
WinCharState *s;
chr = qemu_chr_alloc();
s = g_malloc0(sizeof(WinCharState));
chr->opaque = s;
chr->chr_write = win_chr_write;
chr->chr_close = win_chr_close;
if (win_chr_init(chr, f... | 1threat |
static inline int tcg_target_const_match(tcg_target_long val,
const TCGArgConstraint *arg_ct)
{
int ct;
ct = arg_ct->ct;
if (ct & TCG_CT_CONST)
return 1;
else if ((ct & TCG_CT_CONST_S11) && ABS(val) == (ABS(val) & 0x3ff))
return 1;
... | 1threat |
Multiply all numbers in a list - Haskell : <p>I'm really new to haskell and would like to multiply all numbers in an array. For example.:</p>
<p>Array:</p>
<pre><code>[3,2,4] //3*2*4
</code></pre>
<p>Output</p>
<pre><code>24
</code></pre>
<p>Thanks, any help is greatly appreciated. </p>
| 0debug |
static int sch_handle_start_func_passthrough(SubchDev *sch)
{
PMCW *p = &sch->curr_status.pmcw;
SCSW *s = &sch->curr_status.scsw;
int ret;
ORB *orb = &sch->orb;
if (!(s->ctrl & SCSW_ACTL_SUSP)) {
assert(orb != NULL);
p->intparm = orb->intparm;
}
if... | 1threat |
static uint32_t arm_v7m_load_vector(ARMCPU *cpu)
{
CPUState *cs = CPU(cpu);
CPUARMState *env = &cpu->env;
MemTxResult result;
hwaddr vec = env->v7m.vecbase + env->v7m.exception * 4;
uint32_t addr;
addr = address_space_ldl(cs->as, vec,
MEMTXATTRS_UNSPECIFI... | 1threat |
static int openpic_init(SysBusDevice *dev)
{
OpenPICState *opp = FROM_SYSBUS(typeof (*opp), dev);
int i, j;
struct memreg list_le[] = {
{"glb", &openpic_glb_ops_le, true,
OPENPIC_GLB_REG_START, OPENPIC_GLB_REG_SIZE},
{"tmr", &openpic_tmr_ops_le, true,
... | 1threat |
playercontrols.cs(11,26): error CS1513: ; expected : <p>playercontrols.cs(11,26): error CS 1513: }expected
I started making games 2 days ago. Now im making my first game and I have error. I don't know how to solve this problem this is my script:</p>
<pre><code>using System.Collections;
using System.Collections.Generic... | 0debug |
alert('Hello ' + user_input); | 1threat |
JavaScript Function within a function undefined : <p>Can someone explain to me why the second function within the first function is undefined?</p>
<pre><code>var a = 1
function abc () {
alert(a);
function xyz () {
alert(a);
}
}
</code></pre>
<p><a href="https://jsfiddle.net/kp950... | 0debug |
whats wrong with my if statement if x + y = z : I am trying to evaluate if the selected item meats the requirment by using the following code
if @weight.nominal + x = required
weights << @weight.id
end
However rather than doing what I would expect which is evaluate the result of nomina... | 0debug |
Accessing same-type inactive member in unions : <p>I have something like this:</p>
<pre><code>union DataXYZ
{
struct complex_t
{
float real, imag;
} complex;
struct vector_t
{
float magnitude, phase;
} vector;
};
</code></pre>
<p>I have some vectors of these, being general-pur... | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.