problem
stringlengths
26
131k
labels
class label
2 classes
static int64_t coroutine_fn iscsi_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file) { IscsiLun *i...
1threat
Why is a closing brace showing no code coverage? : <p>I've got a Swift function for which Xcode is showing 0 passes in code coverage. The line is a closing brace (highlighted in red below).</p> <p>Is this a bug in Xcode? If not, what condition do I need to hit to run that line? I thought I was covering all paths throu...
0debug
How to find min and max in Two Dimensional array . Java : public class Average { static Integer[][] myDouble = new Integer[10][12]; static int x = 0, y = 0; static int strDouble; public Average() { try { BufferedReader in = new BufferedReader(new FileReader("StudentIdAverag...
0debug
void qemu_peer_using_vnet_hdr(NetClientState *nc, bool enable) { if (!nc->peer || !nc->peer->info->using_vnet_hdr) { return; } nc->peer->info->using_vnet_hdr(nc->peer, enable); }
1threat
Snackbar is not dismissing on swipe : <p>i have a snackbar in my appcompat activity. It has a button OK which dismiss the snackbar.It is working perfact. but i can't dismiss the snackbar on swipe(left to right).</p> <p>Following is my code for snackbar....</p> <pre><code>final Snackbar snackbar = Snackbar ...
0debug
static int decode_block_coeffs(VP56RangeCoder *c, DCTELEM block[16], uint8_t probs[8][3][NUM_DCT_TOKENS-1], int i, int zero_nhood, int16_t qmul[2]) { uint8_t *token_prob; int nonzero = 0; int coeff; do { token_prob = probs[v...
1threat
VB.NET Creating multiple FileSystemWatcher dynamically : I'm trying to solve a very similar problem to this question: http://stackoverflow.com/questions/30807006/multiple-configurable-filesystemwatcher-methods The answer provided is in C# and I'm working in VB.NET and failing to translate the example despite trying...
0debug
static void check_mct(uint8_t *ref0, uint8_t *ref1, uint8_t *ref2, uint8_t *new0, uint8_t *new1, uint8_t *new2) { declare_func(void, void *src0, void *src1, void *src2, int csize); randomize_buffers(); call_ref(ref0, ref1, ref2, BUF_SIZE / sizeof(int32_t)); call_new(new0, ne...
1threat
Where should Full stack JS beginner start? : <p>So I won't say I'm a complete beginner, as I know the very basics and have a CS degree(that I'm very rusty at) but I have gone back through and refreshed myself with the CS50 Harvard course.</p> <p>The last project is to build something, and I've gotten more into learnin...
0debug
After we split a String via regex, how could us get the length of new String? : public class TestString { public static void main(String[] args) { String str = "AaaaABBBBcc&^%adfsfdCCOOkk99876 _haHA"; String[] upStr = str.split("[a-z0-9&^% _]"); System.out.println("Printout uppercase"); for (Strin...
0debug
Flutter - Listview.builder inside another Listview : <p>I want my screen to be scrollable so I put everything in a Listview.</p> <p>Now I want to show another Listview inside to show details of a List. When I try this an error is thrown - " Expanded widgets must be placed inside Flex widgets." </p> <p><a href="https:...
0debug
Adding bitwise operations and conversion-to-bool to scoped enums - a Christmastide exploration : <p>Let's say that I'm crazy and decided to create the following monstrosity:</p> <pre><code>#include &lt;type_traits&gt; #include &lt;iostream&gt; // Utility proxy type - convertible back to E but also permits bool conver...
0debug
JavaScript Regular Expression Find and Replace : <p>I need to check if a string contains the following string, "Password:". If so I want to replace the word immediately following the ':'. For example, I have a string that has "Password:Test". I would like "Test" removed and replaced with "Removed".</p>
0debug
The report definition has an invalid target namespace rsInvalidReportDefinition : <p>I have created a ReportProject with Visual Studio data tools 2015. When I create a report.rdl file using the report wizard, the rdl file has schema for 2016. My reporting server is of version 12.0.4213.0. </p> <p>How can I create a ...
0debug
how to display div id value in form input : i am trying to show JavaScript output value in form input. bellow my div which output the value. <div id="geo" class="geolocation_data"></div> but i want to show in input box. i tried bellow code but not showing any <input type="text" placeholder="Please typ...
0debug
int ff_wmv2_decode_picture_header(MpegEncContext * s) { Wmv2Context * const w= (Wmv2Context*)s; int code; #if 0 { int i; for(i=0; i<s->gb.size*8; i++) printf("%d", get_bits1(&s->gb)); printf("END\n"); return -1; } #endif if(s->picture_number==0) decode_ext_header(w); s->...
1threat
SUM TWO TEXT BOX VALUE AND GET GRADE LETTER IN THIRD TEXTBOX : i have an html form with three textboxes i want to sum the automatically using juery at the same time i want to use if else statement to check if the result is greater than 100 the value in next text box should be A see the code below <script>` ...
0debug
static int qcow2_load_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos) { BDRVQcow2State *s = bs->opaque; bool zero_beyond_eof = bs->zero_beyond_eof; int ret; BLKDBG_EVENT(bs->file, BLKDBG_VMSTATE_LOAD); bs->zero_beyond_eof = false; ret = bdrv...
1threat
Incorrect syntax near ','. : I have been running into this error for a while now, and still haven't been able to solve it. I am trying to Update the data in my database, with a button press in a windows form. I am using SQL 2011. private void btnEdit_Click_1(object sender, EventArgs e) { ...
0debug
static int local_parse_opts(QemuOpts *opts, struct FsDriverEntry *fse) { const char *sec_model = qemu_opt_get(opts, "security_model"); const char *path = qemu_opt_get(opts, "path"); if (!sec_model) { fprintf(stderr, "security model not specified, " "local fs needs security mo...
1threat
static void ich9_cc_write(void *opaque, hwaddr addr, uint64_t val, unsigned len) { ICH9LPCState *lpc = (ICH9LPCState *)opaque; ich9_cc_addr_len(&addr, &len); memcpy(lpc->chip_config + addr, &val, len); pci_bus_fire_intx_routing_notifier(lpc->d.bus); ich9_cc_update(...
1threat
static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) { MpegEncContext * const s = avctx->priv_data; MJpegContext * const m = s->mjpeg_ctx; const int width= s->width; const int height= s->height; AVFrame * co...
1threat
"Empty collection literal requires an explicit type" error on Swift3 : <p>I have a variable on my class:</p> <pre><code>var list = [] </code></pre> <p>and I use it on a function of my class:</p> <pre><code>func chargeData (data: NSArray){ list = data } </code></pre> <p>It worked well on my project in <code>Swif...
0debug
what do i have 2 do now? : ok i got the same problem as this guy who asked this.. I want to code some basic stuff for a little minesweeper-game, that we do in university. Now I have the problem that my code `enter code here`public class Minesweeper1 { public static int[][] makeRandomBoard(int s, int z, i...
0debug
static inline void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, int opc) { int addr_reg, data_reg, data_reg2, bswap; #ifdef CONFIG_SOFTMMU int mem_index, s_bits; # if TARGET_LONG_BITS == 64 int addr_reg2; # endif uint32_t *label_ptr; #endif #ifdef TARGET_WORDS_BIGENDIAN bswap = 1;...
1threat
Disable Angular 5 Input fields correct way : <p>I have a FormGroup that was created like that:</p> <pre><code>form: FormGroup; constructor(private _formBuilder: FormBuilder) { } this.form = this._formBuilder.group({ name: ['', Validators.required], email: ['', Validators.required, Validators.email] }); </code></...
0debug
Spring Boot Localization issue - Accept-Language header : <p>We are using Spring Boot for the application. In ApplicationConfig.java I have the below code</p> <pre><code> @Bean public LocaleResolver localeResolver() { return new SmartLocaleResolver(); } </code></pre> <p>and the SmartLocaleResolver.jav...
0debug
Switch between vertical and horizontal stepper material : <p>How to switch between <strong>mat-vertical-stepper</strong> and <strong>mat-horizontal-stepper</strong> from angular component with same stepper steps?</p>
0debug
static void FUNC(transquant_bypass32x32)(uint8_t *_dst, int16_t *coeffs, ptrdiff_t stride) { int x, y; pixel *dst = (pixel *)_dst; stride /= sizeof(pixel); for (y = 0; y < 32; y++) { for (x = 0; x < 32; x++) { dst[x] += *coeffs; ...
1threat
Take ownership of parameter by rvalue-reference : <p>I want to make clear that the constructor of my class <code>A</code> will take ownership of the passed <code>Data</code> parameter. The obvious thing to do is take a <code>unique_ptr</code> by value:</p> <pre><code>class A { public: A(std::unique_ptr&lt;Data&gt;...
0debug
computer cannot be accessed after connecting Junos Pulse VPN : <p>I have 2 machines in LAN, one is desktop, the other is a laptop. Before I connecting vpn on laptop, the laptop IP is 192.168.1.104 and the desktop is 192.168.1.107, I can ping the laptop from my desktop. After I connecting Junos Pulse vpn, I saw the foll...
0debug
ASP.NET Core 2.0 disable automatic challenge : <p>After upgrading my ASP.NET Core project to 2.0, attempts to access protected endpoints no longer returns 401, but redirects to an (non-existing) endpoint in an attempt to let the user authenticate.</p> <p>The desired behaviour is for the application simply to return a ...
0debug
static void cpu_common_parse_features(const char *typename, char *features, Error **errp) { char *featurestr; char *val; static bool cpu_globals_initialized; if (cpu_globals_initialized) { return; } cpu_globals_initializ...
1threat
All about Context: How to Use context? : <p>As a newbie I am trying to make an app thorough watching some tutorials. I am approaching further and getting more and more confused about "Context". About its definition as well as its contribution. Most puzzling part is when to put the "context" as a parameter.</p> <p>Whic...
0debug
Getting the next number in php : <p>I'm not sure what the easiest way to go about this is, I just want one button on a page called assign.</p> <p>When you visit the page, it says 001, once you click assign, the page refreshes and it says 002 and so on. Do I need a DB to keep track of the current number? </p> <p>Is th...
0debug
Selenium, combining css issue : <p>I'm having an issue with css ( cannot find the proper way how to write it)</p> <pre><code>&lt;div class="d-flex flex-row align-items-center justify-content-end col-6"&gt; &lt;button disabled="" class="btn btn-primary disabled"&gt;'Text 1'&lt;/button&gt; &lt;button disabled="" class="...
0debug
angular2 @input - change detection : <p>Is there a way to listen for @Input change?</p> <p>In following example, I would like to be informed whenever 'inputData' value is changed.</p> <pre><code>@Input() inputData: InputData; </code></pre>
0debug
Testing Google Cloud PubSub push endpoints locally : <p>Trying to figure out the best way to test PubSub push endpoints locally. We tried with ngrok.io, but you must own the domain in order to whitelist (the tool for doing so is also broken… resulting in an infinite redirect loop). We also tried emulating PubSub locall...
0debug
C++ - Convert Hex to DIN-Code : so first of all, I wanted to thank this Community. This Forum helped me a lot over years. Now it was time to register. So I need help. I want convert a HEX-Code to a DIN-Code. The calculation is in the picture below. The Hex-Code gets converted to Binary-Code. After that, it will get r...
0debug
static int init_tiles(Jpeg2000EncoderContext *s) { int tileno, tilex, tiley, compno; Jpeg2000CodingStyle *codsty = &s->codsty; Jpeg2000QuantStyle *qntsty = &s->qntsty; s->numXtiles = ff_jpeg2000_ceildiv(s->width, s->tile_width); s->numYtiles = ff_jpeg2000_ceildiv(s->height, s->tile_height);...
1threat
java.lang.NoClassDefFoundError: com/ibm/as400/access/AS400 : <p>[9/7/18 10:38:02:453 EDT] 000000b3 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service Uncaught service() exception thrown by servlet action: java.lang.NoClassDefFoundError: com/ibm/as400/access/AS400 at com.bb.sweb.actions.Authentic...
0debug
document.location = 'http://evil.com?username=' + user_input;
1threat
invalid syntax for from import random WHY : when i try to run this module from import random def guessnum(): randomnum = random.randint(1,6) awnser = input ("what do you think the number is? ") if awnser==randomnum: print ("good job. you are correct. ") else: print...
0debug
static int64_t mmsh_seek(URLContext *h, int64_t pos, int whence) { MMSHContext *mmsh = h->priv_data; MMSContext *mms = &mmsh->mms; if(pos == 0 && whence == SEEK_CUR) return mms->asf_header_read_size + mms->remaining_in_len + mmsh->chunk_seq * mms->asf_packet_len; return AVERROR(ENOSYS)...
1threat
How can I get `sed`-like behavior from within python when running windows? : The beginnings of a solution are shown below. If someone would complete it and get it working, I would be eternally grateful. import subprocess import os import sys def sed(stryng, istream=None, ostream=None): ...
0debug
PgAdmin 4: Cannot edit rows from one table : <p>Something strange is happening with my new created tables in Postgres, I can add data to them, but I cannot use PgAdmin to edit the any row.</p> <p>This is my table columns description:</p> <p><a href="https://i.stack.imgur.com/SsbdF.png" rel="noreferrer"><img src="http...
0debug
static void net_socket_receive_dgram(void *opaque, const uint8_t *buf, size_t size) { NetSocketState *s = opaque; sendto(s->fd, buf, size, 0, (struct sockaddr *)&s->dgram_dst, sizeof(s->dgram_dst)); }
1threat
void colo_do_failover(MigrationState *s) { if (!colo_runstate_is_stopped()) { vm_stop_force_state(RUN_STATE_COLO); } if (get_colo_mode() == COLO_MODE_PRIMARY) { primary_vm_do_failover(); } }
1threat
Recursive Bool Function "skipping" return : <p>I've been breaking off the rust with C coding, and have been working on an exercise in sorting and searching; in particular, binary searching using recursion. I am getting unexpected results, as when my binary search function does find the value it's looking for, it "shou...
0debug
Visual Studio 2017 15.7 New Chrome Window when debugging : <p>Just updated to 15.7 and now when I begin debugging Chrome opens in new window.</p> <p>My JS debugging is off (tried turning it on and back off) and unlike when it's on the new window is under my standard Chrome profile. However If I snap the chrome window ...
0debug
Why would webpack 4 generate files named 0.js, 1.js 2.js? : <p>In my attempts to switch from webpack 3 to 4, I use a configuration that simplified looks like the following extract. The build is successful but generates some chunks that have only a number a filename and I cannot seem to understand why?</p> <pre><code>0...
0debug
void palette8tobgr15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette) { long i; for(i=0; i<num_pixels; i++) ((uint16_t *)dst)[i] = bswap_16(((uint16_t *)palette)[ src[i] ]); }
1threat
get error code 400 when send request on stripe for get token : This is My Object for get bank account token this.myObject= { country: 'US', currency: 'usd', routing_number: '110000000', account_number: '000123456789', account_holder_name: 'Jenny Rosen', acc...
0debug
Multiple Slick Sliders Issue : <p>I am using Slick.js plugin with its Slider Syncing feature. The issue I am having is that if I use multiple sliders on a single page, by clicking next or prev buttons plugin performs the action for all sliders on page. I wonder is there anything I could do with JQuery to have the next ...
0debug
void mips_r4k_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { char *filename; MemoryRegion *address_space_mem = get_system_memory()...
1threat
How to write JSON inside of java : <p>i have a JSON string and i want to write it as a JSON file(.json) inside of java. because my final application needs to import .json file not a string. (i am using spring to create a web app)</p> <p>this is my json string:</p> <pre><code>String str = "{"polygons": {"landuse": ["_...
0debug
Add Facebook like button after all image in string : <p>How can I add facebook like button, after all image in string.</p> <p>For example:</p> <pre><code>&lt;p&gt;This is some text. This is some text. This is image: &lt;img src='url'/&gt;. This is some tekst. This is new image: &lt;img src='url'&gt;&lt;/p&gt; </code>...
0debug
int s390_cpu_restart(S390CPU *cpu) { if (kvm_enabled()) { return kvm_s390_cpu_restart(cpu); } return -ENOSYS; }
1threat
static inline void gen_evmergehilo(DisasContext *ctx) { if (unlikely(!ctx->spe_enabled)) { gen_exception(ctx, POWERPC_EXCP_APU); return; } #if defined(TARGET_PPC64) TCGv t0 = tcg_temp_new(); TCGv t1 = tcg_temp_new(); tcg_gen_ext32u_tl(t0, cpu_gpr[rB(ctx->opcode)]); tcg_...
1threat
static int32_t read_s32(uint8_t *data, size_t offset) { return (int32_t)((data[offset] << 24) | (data[offset + 1] << 16) | (data[offset + 2] << 8) | data[offset + 3]); }
1threat
Mapstruct - How can I inject a spring dependency in the Generated Mapper class : <p>I need to inject a spring service class in the generated mapper implementation, so that I can use it via </p> <pre><code> @Mapping(target="x", expression="java(myservice.findById(id))")" </code></pre> <p>Is this applicable in Mapstr...
0debug
I am a beginner in programming and currently learning Ruby. Can't figure this out. Could someone solve? : You are given a string S Count the number of occurrences of all the digits in the string S. Input: First line contains string S Output: Count the number of occurences of 1 in the entered number and print th...
0debug
static int decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src){ H264Context *h= dst->priv_data, *h1= src->priv_data; MpegEncContext * const s = &h->s, * const s1 = &h1->s; int inited = s->context_initialized, err; int i; if(dst == src || !s1->context_initialized) retu...
1threat
How to implement a single item for a linked list class? C++ homework : I'm extremely new to C++, so I wanted to get some help on a homework problem that I've been working on for the past few hours. The criteria of the problem is this: In the problems below, we will be implementing a list of "items." In this proble...
0debug
static void ide_set_signature(IDEState *s) { s->select &= 0xf0; s->nsector = 1; s->sector = 1; if (s->drive_kind == IDE_CD) { s->lcyl = 0x14; s->hcyl = 0xeb; } else if (s->bs) { s->lcyl = 0; s->hcyl = 0; } else { s->lcyl = 0xff; ...
1threat
js pass object to callback function : <p>I would like to reference the item object in the geocoder callback function. Item always refers to the state of the last $each iteration, if I use the code below. I assume this is because the callback is run after the $each loop finishes. I would therefore need to pass the item ...
0debug
Command prompt to check TLS version required by a host : <p>Is there a command to check the TLS version reuired by a host site. Right now, the only way I know to check is by adjusting the max TLS version of my browser and checking if I can still access the site. However, I suspect there is a more sophisticated way to d...
0debug
Convert Hex to Hex with base 2 python : <p>How i convert number HEX with base 1 (0x1) to base 2 (0x01).</p> <p>Hex_B1 = 0x1 Hex_B2 = 0x01</p> <p>hex(int('110', 2)) = 0x06</p>
0debug
static void s390_cpu_initfn(Object *obj) { CPUState *cs = CPU(obj); S390CPU *cpu = S390_CPU(obj); CPUS390XState *env = &cpu->env; static bool inited; static int cpu_num = 0; #if !defined(CONFIG_USER_ONLY) struct tm tm; #endif cs->env_ptr = env; cpu_exec_init(env); #if !defi...
1threat
static int local_open2(FsContext *fs_ctx, V9fsPath *dir_path, const char *name, int flags, FsCred *credp, V9fsFidOpenState *fs) { char *path; int fd = -1; int err = -1; int serrno = 0; V9fsString fullname; char buffer[PATH_MAX]; flags |= O_NOFOLLOW...
1threat
static uint64_t pxa2xx_fir_read(void *opaque, hwaddr addr, unsigned size) { PXA2xxFIrState *s = (PXA2xxFIrState *) opaque; uint8_t ret; switch (addr) { case ICCR0: return s->control[0]; case ICCR1: return s->control[1]; case ICCR2: ...
1threat
static DWORD WINAPI do_suspend(LPVOID opaque) { GuestSuspendMode *mode = opaque; DWORD ret = 0; if (!SetSuspendState(*mode == GUEST_SUSPEND_MODE_DISK, TRUE, TRUE)) { slog("failed to suspend guest, %s", GetLastError()); ret = -1; } g_free(mode); return ret; }
1threat
static char *qemu_rbd_parse_clientname(const char *conf, char *clientname) { const char *p = conf; while (*p) { int len; const char *end = strchr(p, ':'); if (end) { len = end - p; } else { len = strlen(p); } if (strncmp(p,...
1threat
Play local Video in webview : <p>I want to play local videos in crosswalk webview. I'm getting the video path from an intent opening my activity, so it could be stored internally or on sd card. </p> <p>Using this url <code>file:///storage/emulated/0/Download/movies/movie.mp4</code> i get <code>Failed to load resource:...
0debug
static void dec_mul(DisasContext *dc) { TCGv d[2]; unsigned int subcode; if ((dc->tb_flags & MSR_EE_FLAG) && !(dc->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK) && !(dc->env->pvr.regs[0] & PVR0_USE_HW_MUL_MASK)) { tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP); ...
1threat
Can you set rounded pixel corners in Photoshop? : <p>I'm making a pixel art that's why my canvas is only 30x60 pixels, and I don't think using a rectangle shape will work because the canvas is just too small and I only need one pixel to have a rounded corner.</p>
0debug
Testing post method of java web service : <p>Please anyone give me a clear understanding of why web service with post request cannot be run by putting the url in the browser unlike get method. I tried running the url in the browser for post method,but it didn't display anything.But when i tried it on SoapUI, I got my d...
0debug
def check_k_elements(test_list, K): res = True for tup in test_list: for ele in tup: if ele != K: res = False return (res)
0debug
static int sd_create(const char *filename, QemuOpts *opts, Error **errp) { int ret = 0; uint32_t vid = 0; char *backing_file = NULL; char *buf = NULL; BDRVSheepdogState *s; char tag[SD_MAX_VDI_TAG_LEN]; uint32_t snapid; bool prealloc = false; s = g_m...
1threat
Mousedown on appended items : <p>The function below toggles the highlight on a cell when a user clicks the cell.</p> <p>It works well if the cells are there when the document loads. However, it does not work on newly appended cells.</p> <p>What could I change to make it work for new cells?</p> <pre><code> $(functi...
0debug
static void setup_frame(int sig, struct target_sigaction *ka, target_sigset_t *set, CPUMBState *env) { struct target_signal_frame *frame; abi_ulong frame_addr; int err = 0; int i; frame_addr = get_sigframe(ka, env, sizeof *frame); if (!lock_user_struct(VERIFY_WR...
1threat
Laravel check if relation is empty : <p>I have an object with some relationships and I need to check if these relations are empty or not, I'm trying to check with is_null, isset, != undefined, etc but nothing works, here is the relationship I get when it's empty :</p> <pre><code>object(Illuminate\Database\Eloquent\Col...
0debug
How can I read in a specific number of characters from a line? (C++) : <p>I am working on a homework assignment where I need to error check the first line of a .txt file. In this case, the first line of the text file should read "Number of samples: ", followed by an unspecified number. If the line DOES NOT start with "...
0debug
What does the statement Object[][[] data = new Object [][] mean in Java? : int [ ] [ ] data = new int [ ] [ ] means An array of Integers. char [ ] [ ] data = new char [ ] [ ] means An array of Characters. String [ ] [ ] data = new String[ ] [ ] means An array of Strings. Then... What does the statement **Object[...
0debug
document.getElementById('input').innerHTML = user_input;
1threat
Multiple Regression Line Using R : I have a regression model analysis for a set of data. I am trying to determine a regression line from this set of data, it is multiple regression. I am having trouble determining the line of regression. I have attached a picture of of my regression analysis.[![enter image description ...
0debug
How can I Draw rectangle in programmatically : <p>How can I draw rectangle(Oblique projection view) in programmatically(python) by giving height, width and depth.</p>
0debug
Convert csv rows into columns in python : <p>i have CSV file like: <a href="https://i.stack.imgur.com/9oBYs.png" rel="nofollow noreferrer">CSV DATA</a></p> <p>want to convert into single list like: 253,514,517,6514,6518,407,865</p> <p>reading data row wise while neglecting 0 and duplications</p>
0debug
int bdrv_aio_multiwrite(BlockDriverState *bs, BlockRequest *reqs, int num_reqs) { MultiwriteCB *mcb; int i; if (bs->drv == NULL) { for (i = 0; i < num_reqs; i++) { reqs[i].error = -ENOMEDIUM; } return -1; } if (num_reqs == 0) { return ...
1threat
def replace_list(list1,list2): list1[-1:] = list2 replace_list=list1 return replace_list
0debug
static void term_insert_char(int ch) { if (term_cmd_buf_index < TERM_CMD_BUF_SIZE) { memmove(term_cmd_buf + term_cmd_buf_index + 1, term_cmd_buf + term_cmd_buf_index, term_cmd_buf_size - term_cmd_buf_index); term_cmd_buf[term_cmd_buf_index] = ch; term_c...
1threat
static CharDriverState *qemu_chr_open_ringbuf(ChardevRingbuf *opts, Error **errp) { CharDriverState *chr; RingBufCharDriver *d; chr = g_malloc0(sizeof(CharDriverState)); d = g_malloc(sizeof(*d)); d->size = opts->has_size ? opts->size : 65536; ...
1threat
static void set_sensor_type(IPMIBmcSim *ibs, uint8_t *cmd, unsigned int cmd_len, uint8_t *rsp, unsigned int *rsp_len, unsigned int max_rsp_len) { IPMISensor *sens; IPMI_CHECK_CMD_LEN(5); if ((cmd[2] > MAX...
1threat
I have this code in CSS: : figure > figcaption::before{ > content: "*\002607\0000a0caption\A*"; white-space: pre; font-style: italic;*emphasized text* font-variant: small-caps; font-size: 0.5em; } What does the marked part mean?
0debug
Using cmake to create main and sub-projects, and be able to compile them individually : <p><strong>DISCLAIMER:</strong> I am new to CMakeLists.txt, I have a working implementation and would like to improve and enhance it, problem described below:</p> <p>If I want <code>root/sub-directories/</code> as separate sub-proj...
0debug
static void avc_h_loop_filter_luma_mbaff_intra_msa(uint8_t *src, int32_t stride, int32_t alpha_in, int32_t beta_in) { uint64_t load0, load1; uint32_t out...
1threat
static int wma_decode_superframe(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; WMACodecContext *s = avctx->priv_data; int nb_frames, bit_offset, i, pos, len, ret; uint8_t...
1threat
getenv + string in c and converting types : <p>I want to add /home/username + "/path.png?5667!http-get:*:image/png:!!!!!" just as in Java. but in C</p> <p><code>name = malloc(strlen(hm)+strlen("/path.png?5667!http-get:*:image/png:!!!!!") + 2);</code></p> <pre><code>#include &lt;stdlib.h&gt; #include&lt;stdlib.h&gt; #...
0debug
how to avoid parameter missing when using printf? : #include<stdio.h> void main() { int a = 1; printf("%d:this is for test:%s",a); } there is missing parameter for function printf, no warning when compiling, but fatal at run.
0debug
import re def change_date_format(dt): return re.sub(r'(\d{4})-(\d{1,2})-(\d{1,2})', '\\3-\\2-\\1', dt)
0debug