problem
stringlengths
26
131k
labels
class label
2 classes
why my code is always giving the same result i.e ' the string is not a palindrome' : <p>my code always give the same result i.e. 'the string is not a palindrome' why is this happening? but the reversing of string is working properly</p> <pre><code>original = input('enter string: ') index = len(original) - 1 reverse_st...
0debug
static void virtio_gpu_resource_destroy(VirtIOGPU *g, struct virtio_gpu_simple_resource *res) { pixman_image_unref(res->image); QTAILQ_REMOVE(&g->reslist, res, next); g->hostmem -= res->hostmem; g_free(res); }
1threat
How to fix the TypeError (list indices must be interger) in this program? : In one of the program I am using, I am getting a `TypeError` when trying to mine/parse a value out of `dict type` data. Error Type: <type 'exceptions.TypeError'> Error Value: list indices must be integers, not str I tried to prin...
0debug
static void scsi_dma_restart_bh(void *opaque) { SCSIDiskState *s = opaque; SCSIRequest *req; SCSIDiskReq *r; qemu_bh_delete(s->bh); s->bh = NULL; QTAILQ_FOREACH(req, &s->qdev.requests, next) { r = DO_UPCAST(SCSIDiskReq, req, req); if (r->status & SCSI_REQ_STATUS_RETR...
1threat
how to create mysql dynamc pivot rows to colum : please am in need of urgent help from anyone who can solve this. SELECT DISTINCT _2_12_company.companyInitials, _2_05_comptype.typeInitials FROM _2_12_company, _2_05_comptype, _2_19_companycomptype WHERE _2_12_company.id = _2_19_company...
0debug
Why is statically linking glibc discouraged? : <p>Most of the sources online state that you can statically link glibc, but discourage from doing so; e.g. <a href="https://centos.pkgs.org/7/centos-updates-x86_64/glibc-static-2.17-260.el7_6.4.x86_64.rpm.html" rel="noreferrer">centos package repo</a>:</p> <pre><code>The ...
0debug
How can I find the highest and lowest values in a list? : <p>I have a code that looks something like this for school:</p> <pre><code> print ("Couple A Results") coupleA = [] judges = 5 while len(coupleA) &lt; judges: judge1 = input("Input Scores For Couple A in round 1: ") judge2 = input("Input Scores For Coup...
0debug
how do I centralize (center) a navigation bar? : ``` <div class="topnav" align="middle"> <a href="http://actividad.csjpr.xyz>Actividad</a> <a href="http://clase.csjpr.xyz">Clase</a> <a href="http://club.csjpr.xyz">Club</a> <a href="http://comite.csjpr.xyz">Comite</a> <a href="htt://competencia.cs...
0debug
ASP.NET Identity - custom UserManager, UserStore : <p>I am a bit confused with customizing UserManager and UserStore. Out of the box solution comes with EF implementation and i don't want to use EF but my own DAL that uses MSSQL. I want to have Claims based security where one of the users Claims will be roles.</p> <p>...
0debug
import re pattern = 'fox' text = 'The quick brown fox jumps over the lazy dog.' def find_literals(text, pattern): match = re.search(pattern, text) s = match.start() e = match.end() return (match.re.pattern, s, e)
0debug
variable length data types inside a buffer in C : <p>What would be the easiest way to handle serialization of data of variable number of bits put into a uint8 buffer?</p> <p>For example, the first 4 bits are one variable, then 1 bit is a boolean, another one is 3 bits long. Then you have an array of 8 bytes, and then ...
0debug
How to create one vertical column in between rows in Flexbox : <p><a href="https://i.stack.imgur.com/7VcfC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7VcfC.png" alt="enter image description here"></a></p> <p>Is there is a way to create this style with Flexbox? </p>
0debug
How to range array in golang to not randomize predetermined key? : <p>I have a trouble with my current golang's project.</p> <p>I have another package in go that result an array with pretedermined key, example :</p> <pre><code>package updaters var CustomSql map[string]string func InitSqlUpdater() { CustomSql = ...
0debug
How to Add, Delete new Columns in Sequelize CLI : <p>I've just started using Sequelize and Sequelize CLI</p> <p>Since it's a development time, there are a frequent addition and deletion of columns. What the best the method to add a new column to an existing model?</p> <p>For example, I want to a new column '<strong>c...
0debug
static int32_t scsi_send_command(SCSIDevice *d, uint32_t tag, uint8_t *buf, int lun) { SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, d); uint64_t nb_sectors; uint64_t lba; uint32_t len; int cmdlen; int is_write; uint8_t command; uint8_t *out...
1threat
static uint64_t unassigned_mem_read(void *opaque, hwaddr addr, unsigned size) { #ifdef DEBUG_UNASSIGNED printf("Unassigned mem read " TARGET_FMT_plx "\n", addr); #endif if (current_cpu != NULL) { cpu_unassigned_access(current_cpu, addr, false, false, 0, size); ...
1threat
How to prevent a product on WooCommerce from being indexed by Google? : <p>I'm referring to specific product not all products. I've googled and can't find any answer to this.</p>
0debug
how do i grep the output from first grep of the date : This is what I have find /tttt/aaaa/bbb -type f -mtime -1 -mtime 0 -print0| xargs -0 grep -l "abc" I would like to find the output that also contains "def"
0debug
how to filter the existing month into next month : i have a code : SELECT pegawai.Nama, pegawai.Tempat_Lahir, pegawai.Tanggal_lahir, pegawai.NIP, pegawai.Tingkat_Ijasah, pegawai.Jurusan, pegawai.Golongan_CPNS,pegawai.TMT_CPNS, pegawai.Alamat, pensiun.TMT_Pensiun, pensiun.SKPensiun from pegawai JOIN pensiun on pegawai....
0debug
static int megasas_dcmd_set_properties(MegasasState *s, MegasasCmd *cmd) { struct mfi_ctrl_props info; size_t dcmd_size = sizeof(info); if (cmd->iov_size < dcmd_size) { trace_megasas_dcmd_invalid_xfer_len(cmd->index, cmd->iov_size, dcmd_size); ...
1threat
Scanf Didn't work : <p>In my code second scanf doesn't work and couldn't read the character. How can I solve that ?</p> <pre><code>#include &lt;stdio.h&gt; int main() { int a, result; // ***************** Menu ******************* printf("Hello !!! \n The Operations That This Calculator Can Do :"); printf("\n1. Simple ...
0debug
Find duplicate images algorithm : <p>I want to create a program that find the duplicate images into a directory, something like <a href="https://profesionalsoftware.com/image-cleaner-duplicate-photo-finder-and-remover/" rel="nofollow noreferrer">this app</a> does and I wonder what would be the algorithm to determine if...
0debug
How to access object within a json object in angular 2+ : I am a beginner of angular. I tried to access this json object using console.log(this.selected[0].delivery.shipping_type); Selected is an array and i am trying to show the 0th element of selected.How to access shipping_type within delivery.console.log return...
0debug
What's the correct way to have Singleton class in c# : <p>I am learning Singleton design pattern in C#, and I have written below code in two ways, and I want to know Which one is the right way to create a Singleton class:</p> <pre><code>public sealed class TranslationHelper { // first way private static readon...
0debug
Purpose of import this : <p>There is a well known Easter Egg in Python called <code>import this</code> that when added to your code will automatically output</p> <pre><code>The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is bette...
0debug
int ffio_open2_wrapper(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options) { return avio_open2(pb, url, flags, int_cb, options); }
1threat
Why won't this Python 3.x function not work. : We just learned functions in class a couple days ago and I am not sure why this function won't run. It is basically identical to the functions that I did in class. def pay(hrs, rate, finalPay): hrs = int(input("Hours worked")) rate = float(input("...
0debug
def max_product(arr): arr_len = len(arr) if (arr_len < 2): return None x = arr[0]; y = arr[1] for i in range(0, arr_len): for j in range(i + 1, arr_len): if (arr[i] * arr[j] > x * y): x = arr[i]; y = arr[j] return x,y
0debug
Passing boolean Vue prop value in HTML : <p>I am fairly new to Vue and have started with a project with <a href="https://github.com/vuejs/vue-cli" rel="noreferrer">vue-cli</a>.</p> <p>I am looking into conditional rendering based on a prop sent from parent.</p> <p><strong>Home.vue</strong> <em>(parent)</em></p> <pre...
0debug
void nvdimm_acpi_hotplug(AcpiNVDIMMState *state) { nvdimm_build_fit_buffer(&state->fit_buf); }
1threat
Is there a way to create clusters in arcgis : <p>I have arcgis Web application.In that I need to create clusters.I have tried with examples which I got in Google search. Can anyone tell me how to do it</p>
0debug
Why does the order of elements in a Boolean expression change the outcome? : <p>If x is 0, 0 is printed. If y is 0, we get an error.</p> <p>Why is this? The only thing I can think of is that the order in which the Boolean expression is compiled matters. If x is 0 then we get (false)&amp;&amp;(error value) where false ...
0debug
static inline int cris_bound_b(int v, int b) { int r = v; asm ("bound.b\t%1, %0\n" : "+r" (r) : "ri" (b)); return r; }
1threat
There is an image with an insecure URL loaded in the code of my wordpress site but I cannot find i to delete as it? : <p>I have a woocommerce WP website and I previously installed a currency converter plugin so my website could display multiple currencies.</p> <p>I uploaded some flag images of different countries to t...
0debug
java.io.IOException: com.android.jack.api.v01.CompilationException: Failed to compile : <p>Below is the error I am getting while migrating yo Java 8 with API Level 24 Looks like it's from lombok pre-processor. Any help appreciated Error:/MyApp.native.android/AndroidApp/src/main/java/com/cba/MyApp/android/view/fragm...
0debug
execute stored procedure using table adapter in c# : In VB.net i can simply execute stored procedure from sql server 2008 using the query in image below, but in c# i got this error. can you help me about the proper syntax in c#? thanks [![enter image description here][1]][1] [1]: https://i.stack.imgur.c...
0debug
how to increase numeric value present in the string in vb.net : i m using this query in vb.net Raw_data = Alltext_line.Substring(Alltext_line.IndexOf("R|1")) and i want to increase R|1 to R|2,R|3 and so on using for loop i tried it many ways but getting error "string to double is invalid" any help will b...
0debug
VS Code Refresh Integrated Terminal Environment Variables without Restart/Logout : <p>If you add/change some environment variables (e.g. PATH) on windows, even after restarting 'VS Code' it will not be available in VS Code integrated terminals.<br> But if you open that terminal from windows (Command Prompt/Powershell/....
0debug
static void v9fs_remove(void *opaque) { int32_t fid; int err = 0; size_t offset = 7; V9fsFidState *fidp; V9fsPDU *pdu = opaque; pdu_unmarshal(pdu, offset, "d", &fid); trace_v9fs_remove(pdu->tag, pdu->id, fid); fidp = get_fid(pdu, fid); if (fidp == NULL) { err =...
1threat
Looking up data by key in Hugo with a string : <p>I'm trying to create a HUGO-based API documentation site which reads JSON schemas, and prints them in HTML.</p> <p>I'm almost there, but I'm stumped on how exactly to pass in the data I want to a partial. </p> <p>Given a standard JSON schema file, such as the followin...
0debug
How do I redirect from port 80 to port 8080? : I'm trying to redirect my port 80 to 8080 because the user need not type the url as webapp:8080 to access the web site. Here's the command that I came across to redirect from port 80 to 8080 : sudo iptables -A PREROUTING -t nat -i enp0s25 -p tcp --dport 80 -j RED...
0debug
Stuck at the java code Android Studio : <p>i'm making a sample quiz app with yes no questions, my xml is already done, but i'm really stuck with the java part. i need to display a toast when i click the button, so i can say: you like your phone brand, and when is negative i need to show a toast saying: you don't like y...
0debug
static void check_threshold_8(void){ LOCAL_ALIGNED_32(uint8_t, in , [WIDTH_PADDED]); LOCAL_ALIGNED_32(uint8_t, threshold, [WIDTH_PADDED]); LOCAL_ALIGNED_32(uint8_t, min , [WIDTH_PADDED]); LOCAL_ALIGNED_32(uint8_t, max , [WIDTH_PADDED]); LOCAL_ALIGNED_32(uint8_t, out_ref , [WIDT...
1threat
static void test_visitor_in_int_overflow(TestInputVisitorData *data, const void *unused) { int64_t res = 0; Error *err = NULL; Visitor *v; v = visitor_input_test_init(data, "%f", DBL_MAX); visit_type_int(v, &res, NULL, &err); g_ass...
1threat
java SimpleDateFormat? : <pre><code>public static void main(String[] args) { Date now = new Date(); String dateString = now.toString(); System.out.println(" 1. " + dateString); SimpleDateFormat format = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy"); try { Da...
0debug
static void complete_request_vring(VirtIOBlockReq *req, unsigned char status) { stb_p(&req->in->status, status); vring_push(&req->dev->dataplane->vring, req->elem, req->qiov.size + sizeof(*req->in)); notify_guest(req->dev->dataplane); }
1threat
Removing one letter from a word : <p>So Is it possible to remove one letter from a string? For example</p> <p>String Word = "Hello";</p> <p>I want to create a function where decrementation happens like if you clicked it it will be Hell then Hel then He then H and "" is it possible? </p>
0debug
static void setup_frame(int usig, struct emulated_sigaction *ka, target_sigset_t *set, CPUState *regs) { struct sigframe *frame; abi_ulong frame_addr = get_sigframe(ka, regs, sizeof(*frame)); int i, err = 0; if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0)) return; err |= setup_sigcontext...
1threat
void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s) { BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(s->vdev))); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); VirtIOBlock *vblk = VIRTIO_BLK(s->vdev); unsigned i; unsigned nvqs = s->conf->num_queues; if (!vblk->dataplane_started |...
1threat
query = 'SELECT * FROM customers WHERE email = ' + email_input
1threat
FacebookShare causing compiler error after update : <p>I just ran <code>pod update</code> for my app, and now it won't compile, giving these issues from <code>LinkShareContent.swift</code> in <code>FacebookShare</code>.</p> <pre><code>Cannot assign to property: 'contentDescription' is a get-only property Cannot assign...
0debug
How to block a thread efficiently until a particular condition is met : <p>I am working on a multi-threaded server application in Linux using pthread library.For each client being connected there are two threads as I make two connection from device and one thread has dependency on other.until a particular condition is ...
0debug
The name does not exist in the current context. Why? : <p>My code is:</p> <pre><code> if (textBox1.Text != "") { StreamReader tx = new StreamReader(textBox1.Text); } else { StreamReader tx = new StreamReader("new.txt"); } string line; ...
0debug
exponential 1/3 in Java : <p>Wondering what is the right way to represent <code>x^(1/3)</code>? Here is my code and it returns right value <code>2</code> for <code>8^(1/3)</code>. Wondering if any other better methods? </p> <pre><code>int a = 8; System.out.println(Math.pow(8, 1/3.0)); // returns 2 </code></pre> <p>re...
0debug
static InputEvent *qapi_clone_InputEvent(InputEvent *src) { QmpOutputVisitor *qov; QmpInputVisitor *qiv; Visitor *ov, *iv; QObject *obj; InputEvent *dst = NULL; qov = qmp_output_visitor_new(); ov = qmp_output_get_visitor(qov); visit_type_InputEvent(ov, NULL, &src, &error_abort...
1threat
ASP.NET Core RC2 Area not published : <p>So I just updated my app to use ASP.NET Core RC2. I published it using Visual Studio and noticed that my Area is not published:</p> <p>This snapshot is from <code>src\MyProject\bin\Release\PublishOutput</code>:</p> <p><a href="https://i.stack.imgur.com/FjpgY.png" rel="noreferr...
0debug
def are_Equal(arr1,arr2,n,m): if (n != m): return False arr1.sort() arr2.sort() for i in range(0,n - 1): if (arr1[i] != arr2[i]): return False return True
0debug
open an unsuported file type with a program automatically in a batch file : Im trying to open a file using a program, i would like to automatically do this with a batch file, everything i needs to run is in the same folder. Im not that good at batch files or coding but am trying to get better, if anyone knows how to do...
0debug
static void usb_msd_copy_data(MSDState *s) { uint32_t len; len = s->usb_len; if (len > s->scsi_len) len = s->scsi_len; if (s->mode == USB_MSDM_DATAIN) { memcpy(s->usb_buf, s->scsi_buf, len); } else { memcpy(s->scsi_buf, s->usb_buf, len); } s->usb_len -= len...
1threat
where to get oracle database vm without oracle account? : <p>I want to install Oracle database either 11g or 12c but since I am on Ubuntu 18.04 and since I neither have oracle account nor able to have one I was looking for virtual box image that contain the database. note : I was thinking to create windows VM and then ...
0debug
Get the output value of bash script executed with java : <p>I use this code to execute a script within my java program</p> <pre><code>pb.environment().put("time", time); pb.environment().put("value", value); Process p = pb.start(); p.waitFor(); // get the return value </code></pre> <p>After waiting for the pro...
0debug
Apollo GraphQl react. How to clear query cache for all variable combinations? : <p>I am using apollo graphql in my react application. Say I have the following query:</p> <pre><code>query ListQuery($filter: String!) { items(filter: $filter) { id name } } </code></pre> <p>This query lets me query a list...
0debug
static void term_exit(void) { tcsetattr (0, TCSANOW, &oldtty); }
1threat
Error when checking model input: expected convolution2d_input_1 to have 4 dimensions, but got array with shape (32, 32, 3) : <p>I want to train a deep network starting with the following layer:</p> <pre><code>model = Sequential() model.add(Conv2D(32, 3, 3, input_shape=(32, 32, 3))) </code></pre> <p>using </p> <pre><...
0debug
VBA _Excel Collections method : I am new in vba please help me to solve the following problem using by Collections. I want name of student from below data where student is from USA or England that study maths or history using Collections Student Country Subject Mark Norris Reid ...
0debug
Firebase push key - allowed characters : <p>I am wondering what kind of characters are allowed in the push key. Does it generate also a symbol underscore(_)? I always get a push key with letters with -.</p>
0debug
Typing React components in Flow when passing a component as a prop : <p>I want to pass a React component as input prop to another React component. I tried to reference it as React.Component&lt;*, *, *> but when I use the passed component in the render method I get an error. This is how I wrote out my flow code.</p> <p...
0debug
static void xbzrle_cache_zero_page(ram_addr_t current_addr) { if (ram_bulk_stage || !migrate_use_xbzrle()) { return; } cache_insert(XBZRLE.cache, current_addr, ZERO_TARGET_PAGE); }
1threat
Java script )) Questions about random quiz game : <p>I'm making a simple random quiz game</p> <p>I wrote some scripts for the game </p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override...
0debug
Reactjs how to use ref inside map function? : <p>I'm mapping through an array and for each item display a button with text. Say I want that on clicking the button, the text underneath will change its color to red. How can I target the sibling of the button? I tried using ref but since it's a mapped jsx, only the last r...
0debug
How are HSV color values used? : <p>I've just read about HSV and what I found out is that the Hue, actually specifies that in what color range (like pink, orange,etc.) the color is, the Saturation specifies its tendency to white (the lower the value is, the whiter the color is) , and about the Value, it's just the same...
0debug
What's wrong with my command Insert using a datagriedview : I'm trying to insert data into my database using a DataGriedView in C #. However when I click the save button appears the following error message: System.Data.OleDb.OleDbException was unhandled    HResult = -2147217900    Message = Syntax erro...
0debug
How to find all open windows running on separate thread WPF : <p>In my WPF application, I have to show some windows on UI thread and some on separate thread. I can access all windows running on UI thread using System.Windows.Application.Current.Windows, but unable to find windows that are running on separate thread.</...
0debug
How to get the user's canonical ID for adding a S3 permission : <p>I want to add a S3 permission for a specific user. The AWS console is asking me for the Canonical ID for the user. I used the AWS CLI command <code>aws iam list-users</code> to retrieve the list of users, but there was no "Canonical ID" field, and the "...
0debug
How to sort matrix diagonally : <p>How to go from:</p> <pre><code>0 2 3 1 5 1 5 6 8 </code></pre> <p>to</p> <pre><code>0 1 3 1 2 5 5 6 8 </code></pre> <p>or something similar?</p>
0debug
:focus:active together not working on firefox. : I want outline should not come on "a" tag on click. it should only come when focus is on link by Tabbing on by jQuery focus event. Now outline comes on focus and doesnt go out till we not click anywhere else.
0debug
static void spapr_tce_reset(DeviceState *dev) { sPAPRTCETable *tcet = SPAPR_TCE_TABLE(dev); size_t table_size = tcet->nb_table * sizeof(uint64_t); tcet->bypass = false; memset(tcet->table, 0, table_size); }
1threat
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; C93DecoderContext * const c93 = avctx->priv_data; AVFrame * const newpic = &c93->pictures[c93->currentpic]; AVFra...
1threat
Dictionary to list of strings pair : <p>I have the following dictionary: </p> <pre><code>{'PoP': 4, 'apple': 1, 'anTs': 2, 'poeT': 1} </code></pre> <p>And I wish to have a list of values like this:</p> <pre><code>['PoP, 4', 'apple, 1', 'anTs, 2', 'poeT,1'] </code></pre> <p>Which is like having a list of tuples but ...
0debug
precision of java floating-point numbers : If we run the following code: float f = 1.2345678990922222f; double d = 1.22222222222222222222d; System.out.println("f = " + f + "\t" + "d = " + d); it prints: f = 1.2345679 d = 1.2222222222222223 The long tail in the literal 1.2345678990922222 is...
0debug
static ssize_t local_lgetxattr(FsContext *ctx, const char *path, const char *name, void *value, size_t size) { if ((ctx->fs_sm == SM_MAPPED) && (strncmp(name, "user.virtfs.", 12) == 0)) { errno = ENOATTR; return -1; } return lg...
1threat
Angular 2 conditional ngFor : <p>I'm trying to clean up my template code. I have the following:</p> <pre><code>&lt;ul&gt; &lt;li *ngIf="condition" *ngFor="let a of array1"&gt; &lt;p&gt;{{a.firstname}}&lt;/p&gt; &lt;p&gt;{{a.lastname}}&lt;/p&gt; &lt;/li&gt; &lt;li *ngIf="!condition" *ngFor="let b of array...
0debug
schedule queue job don't work for me i cant find any solution : protected function schedule(Schedule $schedule){ `enter code here`$schedule->job(new SendFeedbackEmail)->everyMinute(); }
0debug
connection.query('SELECT * FROM users WHERE username = ' + input_string)
1threat
How to get top 50 countries and leave the rest of the countries grouped to others in MS sql server : I would like to see TOP 50 countries, remaining countries need to be grouped as other countries using CASE statement. IS that possible to do. Please suggest.
0debug
Why do i get two references for the same singletonPattern instance? : I was learning about the Singleton design pattern through a tutorial. Basically from what I understand it ensures that only one instance of a class is ever created, and any interaction with that class is done through that one instance in the heap...
0debug
Assign a value to Integer between two constant values? : <p>Lets say I have 3 Integers:</p> <pre><code>int a, b, c; b = 25; c = 10; </code></pre> <p>Now I want <code>a</code> to be either 25 or 10 but by random not something like:</p> <pre><code>a = b; </code></pre> <p>I want something like in if statement:</p> <p...
0debug
attributes required not work when clone element html : i have some elements with attribute required and i write jQuery code to clone this element when i press submit it should be show message must fill input but dosen't work just for this clone elements ... so what's problem <div class='col-md-12'> ...
0debug
How convert std::string to byte : <p>I want to convert a string to a byte, but I don't know how. This is my code:</p> <pre><code>void keyboard::SimKey(std::string def) { keybd_event(def, 0, 0, 0); } </code></pre> <p>I don't know how to change def to a byte.</p>
0debug
void qxl_spice_update_area(PCIQXLDevice *qxl, uint32_t surface_id, struct QXLRect *area, struct QXLRect *dirty_rects, uint32_t num_dirty_rects, uint32_t clear_dirty_region, qxl_async_io async) { if (asy...
1threat
static void ppc6xx_set_irq (void *opaque, int pin, int level) { CPUState *env = opaque; int cur_level; #if defined(PPC_DEBUG_IRQ) if (loglevel & CPU_LOG_INT) { fprintf(logfile, "%s: env %p pin %d level %d\n", __func__, env, pin, level); } #endif cur_level = (env->...
1threat
Laravel change pagination data : <p>My Laravel pagination output is like laravel pagination used to be, but I need to change the data array for each object. My output is:</p> <p><a href="https://i.stack.imgur.com/wokI8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/wokI8.png" alt="Output"></a></p> <p>As yo...
0debug
router subscribe calls multiple time : <p>I have this code</p> <pre><code>ngOnInit() { this.router.events.subscribe((val) =&gt; { if (this.router.url.indexOf('page') &gt; -1) { let Id = this.activedRoute.snapshot.params['Id']; this.busy = this.httpCall.get('/pub/page/GetPageById/' +...
0debug
Realm ORM: how to deal with Maps? : <p>I am creating an Android app and I need to persist a <code>Map&lt;String,MyClass&gt;</code>. I've just started to use <a href="https://realm.io" rel="noreferrer">Realm ORM</a>, as it supports one-to-one and one-to-many, enumerations and lists. I also found a workaround for lists o...
0debug
ClickListener in PagerAdapter fires on wrong position : <p>I'm using <a href="https://github.com/crosswall/Android-Coverflow">this project (Android-Coverflow)</a> in my app, which works as expected with one exception: when setting a <code>View.OnClickListener</code> on the single items in <code>instantiateItem</code> I...
0debug
int bdrv_pread(BlockDriverState *bs, int64_t offset, void *buf, int bytes) { QEMUIOVector qiov; struct iovec iov = { .iov_base = (void *)buf, .iov_len = bytes, }; int ret; if (bytes < 0) { return -EINVAL; } qemu_iovec_init_external(&qiov, &iov, 1); ...
1threat
static void mvc_fast_memmove(CPUS390XState *env, uint32_t l, uint64_t dest, uint64_t src) { S390CPU *cpu = s390_env_get_cpu(env); hwaddr dest_phys; hwaddr src_phys; hwaddr len = l; void *dest_p; void *src_p; uint64_t asc = env->psw.mask & PSW_MASK_ASC; ...
1threat
QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque) { QEMUBH *bh; bh = qemu_malloc(sizeof(*bh)); bh->cb = cb; bh->opaque = opaque; return bh; }
1threat
static inline void RENAME(rgb24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused) { #if COMPILE_TEMPLATE_MMX assert(src1==src2); RENAME(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_RGB24); #else int i; assert(src1==src2); for (i=0; i...
1threat
How to make `Map::get` return either an `Optional` of the found value or `Optional.empty()` : <p>I'm trying to do this:</p> <pre><code>return Optional.of(myMap.getOrDefault(myKey, null)); </code></pre> <p>Really, what I want is to return an <code>Optional.of(foundVal)</code> if found, otherwise <code>Optional.empty()...
0debug