problem
stringlengths
26
131k
labels
class label
2 classes
Can't bind to 'ngModel' since it isn't a known property of 'mat-slide-toggle' : <p>I am trying to get the current value of a <code>mat-slide-toggle</code> but unfortunatly I will get an error:</p> <pre><code>Error: Template parse errors: Can't bind to 'ngModel' since it isn't a known property of 'mat-slide-toggle'. </...
0debug
How can i achieve the follwoing layout using Bootstrap css : [![Basically a background image with pattern overlay that only covers half of the image. On the pattern have some text and may be a link][1]][1] Basically a background image with pattern overlay that only covers half of the image. On the pattern have some ...
0debug
Detect when "Inspect Element" is open : <p>Samy Kamkar's website, <a href="http://samy.pl">http://samy.pl</a>, knows when the console is being opened and wipes the source/console when it does open.</p> <p><a href="https://i.stack.imgur.com/kag6U.jpg"><img src="https://i.stack.imgur.com/kag6U.jpg" alt="enter image desc...
0debug
Spring framework ERROR 10904 : <p>I was trying to build an application using the Spring framework but I got the following errors and am not sure why. Whenever I try to run the application I get the bellow errors. I did set up my Maven in C drive and my application in D drive due to space. Can that be an issue? </p> <p...
0debug
Learning scripting/programming (beginning) : <p>What I am asking can be a bit silly and weird by anyway, I decided to ask you.</p> <p>I am working as network security administrator and have knowledge and experience on cyber security as well. 2 month ago I Started my master degree on Cyber Security and now really want ...
0debug
static always_inline void check_cp1_3d(CPUState *env, DisasContext *ctx) { if (unlikely(!(env->fpu->fcr0 & (1 << FCR0_3D)))) generate_exception(ctx, EXCP_RI); }
1threat
If and else statement in PHP inside of an echo : <p>I want to give the admin the ability to activate the user account so I have to status active and inactive When I run my code I get 4 status Active Inactive Active Inactive You will find here a screenshot to understand the problem I’m facing </p> <p><a href="http:...
0debug
int event_notifier_set(EventNotifier *e) { uint64_t value = 1; int r = write(e->fd, &value, sizeof(value)); return r == sizeof(value); }
1threat
void stream_start(BlockDriverState *bs, BlockDriverState *base, const char *backing_file_str, int64_t speed, BlockdevOnError on_error, BlockCompletionFunc *cb, void *opaque, Error **errp) { StreamBlockJob *s; s = block_job_create(&...
1threat
Possible regression in G++ 6.1.0 : <p>The following code</p> <pre><code>#include &lt;string&gt; #include &lt;map&gt; #include &lt;cassert&gt; struct AV { explicit AV(std::string const&amp;) {} }; #if 1 static void check_cache_item( std::map&lt;std::string, std::string&gt; const&amp;...
0debug
¿How can I stop my number sequence from growing? : <p>I am trying to make a sequence of numbers that starts with number 10 and grows like 10...11...12...13 etc every two seconds. But lets say that I want it to stop when it reaches 100, how do i do it. So far I have this.Any ideas?</p> <pre><code>function conteo(num){ ...
0debug
int Configure(void **ctxp, int argc, char *argv[]) { ContextInfo *ci; int c; *ctxp = av_mallocz(sizeof(ContextInfo)); ci = (ContextInfo *) *ctxp; optind = 1; ci->dir = "/tmp"; ci->threshold = 100; ci->file_limit = 100; ci->min_interval = 1000000; ci->inset = 10; ...
1threat
how I can resolve this issue? : hi I am writing filter program grouping kindergarten, preschool and school for ages I wrote if program but it outputs conditions wrong who is willing to take look at my program? #include<iostream> using namespace std; int main() { int input;// age int kindergarden , prescho...
0debug
laravel orm : How to treat obsessive-compulsive disorder : <p><strong>chinese description:</strong></p> <p>laravel orm的命名规范对强迫症来说简直是一种灾难,为什么会有这样的设计。。</p> <p>数据库字段设计成小写字母+下划线,例如order_item表中有个字段goods_name</p> <p>那么laravel代码中,就得这样写:$orderItem->goods_name</p> <p>驼峰和全小写混合,强迫症表示实在受不了啊。。。受不了。。。受不了。。。</p> <p><strong>engli...
0debug
how to integrate firebase performance monitoring in Android : <p>Hi I need to monitor my methods and network calls performance in Android using Android Studio. Anyone help me out?</p>
0debug
PPC_OP(cmpi) { if (Ts0 < SPARAM(1)) { T0 = 0x08; } else if (Ts0 > SPARAM(1)) { T0 = 0x04; } else { T0 = 0x02; } RETURN(); }
1threat
DeviceState *qdev_create(BusState *bus, const char *name) { DeviceState *dev; dev = qdev_try_create(bus, name); if (!dev) { hw_error("Unknown device '%s' for bus '%s'\n", name, bus->info->name); } return dev; }
1threat
Remove all text from a specific tag using Javascript : I want to clear all list items in my body. So on a button press, the item text from all the lists are removed. No use of IDs or anything, just if there is an li tag, it's innerHTML is cleared out. I have tried a few different methods, but I cannot figure it out....
0debug
static int hls_read_header(AVFormatContext *s) { void *u = (s->flags & AVFMT_FLAG_CUSTOM_IO) ? NULL : s->pb; HLSContext *c = s->priv_data; int ret = 0, i; int highest_cur_seq_no = 0; c->ctx = s; c->interrupt_callback = &s->interrupt_callback; c->strict_std_compliance...
1threat
Python3 strange float rounding : <p>Can someone explain me why i do not get 166.9 (i know there is a round() function) i just would like to understand. :)</p> <pre><code>&gt;&gt;&gt; 165.0 + 1.45 + 0.45 166.89999999999998 </code></pre>
0debug
static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) { MpegEncContext *s = &ctx->m; int width, height, vo_ver_id; skip_bits(gb, 1); s->vo_type = get_bits(gb, 8); if (get_bits1(gb) != 0) { vo_ver_id = get_bits(gb, 4); skip_bits(g...
1threat
Create a diffrent table in html : I want to create a table with less rows but with large columns where every 4th column right boundary is 2times thick of other boundary. Example: ``` | | | | || | | | || | | | || | | | || | | | | || | | | || | | | || | | | || | | | | || | | | ...
0debug
static int flic_decode_frame_8BPP(AVCodecContext *avctx, void *data, int *got_frame, const uint8_t *buf, int buf_size) { FlicDecodeContext *s = avctx->priv_data; GetByteContext g2; int pixel_ptr; int palette_ptr; unsigned ...
1threat
split with regex is not returning correct repsonse : <p>I have a string </p> <pre><code>var str3 = "[a,b,c] there [s,b,c] how are u"; </code></pre> <p>What i want is <code>[there, how are u]</code> but I am getting <code>["", "how are u"]</code>, when splitting with <code>str3.split(/\[.*\]/);</code></p> <p>Any idea...
0debug
static int mpl2_probe(AVProbeData *p) { int i; char c; int64_t start, end; const unsigned char *ptr = p->buf; const unsigned char *ptr_end = ptr + p->buf_size; for (i = 0; i < 2; i++) { if (sscanf(ptr, "[%"SCNd64"][%"SCNd64"]%c", &start, &end, &c) != 3 && sscanf(pt...
1threat
static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt) { ConcatContext *cat = avf->priv_data; int ret; int64_t delta; while (1) { if ((ret = av_read_frame(cat->avf, pkt)) != AVERROR_EOF || (ret = open_next_file(avf)) < 0) break; } delta = av_rescale_q(...
1threat
static void scsi_cancel_io(SCSIRequest *req) { SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req); DPRINTF("Cancel tag=0x%x\n", req->tag); if (r->req.aiocb) { bdrv_aio_cancel(r->req.aiocb); scsi_req_unref(&r->req); } r->req.aiocb = NULL; }
1threat
Background color and scroll issue. : <p>I need some help here. My final project is due tomorrow and the mobile responsive view of the app is completely off. I don't know how else to explain it other than just giving you the link to the URL. </p> <p><a href="https://venpresath.github.io/FinalProject/#!/home" rel="nofol...
0debug
How to convert string to array of string in golang : ---------- I am trying to convert string `'["211007@it_4","211008@it_4"]'` which is saved in mysql database to array of string to use it as index value. I can not find a good option to do this in golang.
0debug
Why wont this work ? Dynamic memory beginner program : enter code here int main() { //FILE *out = fopen("keimeno.txt", "w+"); FILE *in = fopen("keimeno.txt", "r"); int fullbufflen=0 , i; char buffer[100]; fgets(buffer, 100, i...
0debug
Notepad++ Search Window disappeared : <p>I'm working with NotePad++ text editor, the 'Search Results' window does not show up anymore, i've tried to open it from the menu (Search Result Window F7), but it does not seem to have any effect, how can i restore it?</p>
0debug
How to implement a deep bidirectional LSTM with Keras? : <p>I am trying to implement a LSTM based speech recognizer. So far I could set up bidirectional LSTM (i think it is working as a bidirectional LSTM) by following the example in Merge layer. Now I want to try it with another bidirectional LSTM layer, which make it...
0debug
static inline void terminate_compression_threads(void) { int idx, thread_count; thread_count = migrate_compress_threads(); quit_comp_thread = true; for (idx = 0; idx < thread_count; idx++) { qemu_mutex_lock(&comp_param[idx].mutex); qemu_cond_signal(&comp_param[idx].cond); ...
1threat
Working in Eclipse IDE, values that should equal not equal : <p>I am reasonably experienced with programming, but not specifically in Java. I am coming across the following error when working in eclipse. My code is the following:</p> <p><a href="https://i.stack.imgur.com/5gqc3.png" rel="nofollow noreferrer"><img src="...
0debug
static void mips_cps_realize(DeviceState *dev, Error **errp) { MIPSCPSState *s = MIPS_CPS(dev); CPUMIPSState *env; MIPSCPU *cpu; int i; Error *err = NULL; target_ulong gcr_base; bool itu_present = false; for (i = 0; i < s->num_vp; i++) { cpu = cpu_mips_init(s->cpu_mod...
1threat
dplyr mutate/transmute: drop only the columns used in the formula : <p>Suppose my data frame has columns A, B, C, D, E.</p> <p>I want to produce a data frame with columns A, B, C, X, where X = D * E.</p> <p>Obviously I can use <code>%&gt;% mutate(X = D * E) %&gt;% select (-D, -E)</code>, but for more elaborate situat...
0debug
static void test_visitor_in_wrong_type(TestInputVisitorData *data, const void *unused) { TestStruct *p = NULL; Visitor *v; strList *q = NULL; int64_t i; Error *err = NULL; v = visitor_input_test_init(data, "[]"); visit_type_TestStruct...
1threat
How can I debug my Quarkus application that is running in dev mode? : <p>I have launched my application using the Quarkus dev mode (<code>mvn quarkus:dev</code>) and I would like to be able to debug it.</p> <p>How can do that?</p>
0debug
Indent/format code in Visual Studio code on MAC : <p>i'm trying to indent my code in visual studio code. I searched and i found that ctrl + F + K should be work, but it doesn't. I tried cmd + k + f too, but it still not working. I hope you can help me!</p>
0debug
static av_cold int X264_close(AVCodecContext *avctx) { X264Context *x4 = avctx->priv_data; av_freep(&avctx->extradata); av_free(x4->sei); if (x4->enc) x264_encoder_close(x4->enc); av_frame_free(&avctx->coded_frame); return 0; }
1threat
void OPPROTO op_divw_AX_T0(void) { unsigned int num, den, q, r; num = (EAX & 0xffff) | ((EDX & 0xffff) << 16); den = (T0 & 0xffff); if (den == 0) { raise_exception(EXCP00_DIVZ); } q = (num / den) & 0xffff; r = (num % den) & 0xffff; EAX = (EAX & ~0xffff) | q; EDX ...
1threat
How to convert milliseconds to date string in swift 3 : <p>I am trying to convert milliseconds to date string in swift 3,i tried by setting date fomatter but i am not getting current date string.</p> <pre><code>var milliseconds=1477593000000 let date = NSDate(timeIntervalSince1970: TimeInterval(milliseconds)) let for...
0debug
how to make select drop down list read only and unchangeable : Here is a link of js fiddle [select drop down example][1] i make select dropdown read only but when i click on it it shows me the drop down option which should not show and it is changeable Can you suggest a solution [1]: https://jsfiddle...
0debug
Where to use empty character constant '' in C++? : <p>The empty character constant '' can not be cout or assigned to character in C++. The compiler will say "error: expected expression". Can we put it in C++ source code? If not, what's the usage of ''? (empty character constant '' is one ' followed with another ') ...
0debug
static int mov_write_single_packet(AVFormatContext *s, AVPacket *pkt) { MOVMuxContext *mov = s->priv_data; MOVTrack *trk = &mov->tracks[pkt->stream_index]; AVCodecParameters *par = trk->par; int64_t frag_duration = 0; int size = pkt->size; int ret = check_pkt(s, ...
1threat
How to connect mysql workbench with putty using python language : I have database in mysql workbench and Im using 'Putty' SSH shell to connect to my database using python language. But I am unable to import mysql.connector or mysqlDb ( got this suggestion form w3school) So I am unable to connect to my database. ...
0debug
static int shall_we_drop(AVFormatContext *s) { struct dshow_ctx *ctx = s->priv_data; static const uint8_t dropscore[] = {62, 75, 87, 100}; const int ndropscores = FF_ARRAY_ELEMS(dropscore); unsigned int buffer_fullness = (ctx->curbufsize*100)/s->max_picture_buffer; if(dropscore[++ctx->video_...
1threat
static void gen_msa(CPUMIPSState *env, DisasContext *ctx) { uint32_t opcode = ctx->opcode; check_insn(ctx, ASE_MSA); check_msa_access(ctx); switch (MASK_MSA_MINOR(opcode)) { case OPC_MSA_I8_00: case OPC_MSA_I8_01: case OPC_MSA_I8_02: gen_msa_i8(env, ctx); break; ...
1threat
Invalid configuration object in webpack : <p>I am following <a href="https://www.lynda.com/React-js-tutorials/React-js-Essential-Training/496905-2.html" rel="noreferrer">Lynda.com - React.js essential training</a> by Eve Porcello. In the video "Building with Webpack", I followed the steps author described exactly, but ...
0debug
I am getting lost inside my own code : <p>I have noticed I am getting lost more often than not when writing more than one screen of code. Most of my code is C++ which tends to be lengthy, and I am using a Mac with Xcode9.</p> <p>I haven't found a solution like a minimap for Xcode (the ones I have found seem deprecated...
0debug
Why the output of 5u and -5u are different? : <pre><code>cout&lt;&lt;-5u </code></pre> <p>It give output: 65531 why? </p> <pre><code>cout&lt;&lt;5u </code></pre> <p>It just give output 5 Then why the outputs are different why -5u cant give -5 output. </p>
0debug
onCreateView dialogfragment : So i created an fragment and there's a button inside it when clicked it pop an dialogfragment, so my problem is it crashed when i run it public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { final View view = inflater.inflate...
0debug
static int create_vorbis_context(vorbis_enc_context *venc, AVCodecContext *avctx) { vorbis_enc_floor *fc; vorbis_enc_residue *rc; vorbis_enc_mapping *mc; int i, book, ret; venc->channels = avctx->channels; venc->sample_rate = avctx->sample_rate; ...
1threat
How can I switch to Swift 4.0 in Xcode 9.3? : <p>It seems like I have only options to go to 3.3, or unspecified:</p> <p><a href="https://i.stack.imgur.com/hR8ZK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hR8ZK.png" alt="enter image description here"></a></p> <p>Can I switch to 4.0 somehow?</p>
0debug
How are Pointer Expressions in C are solved? Ex: ((4* (-(*p2)))/(*p1)+10 where *p1=12 ,*p2=4 : <p>I want to solve pointer problems.</p> <p>The code was taken from book &amp; I want to know how it was compiled</p> <p>Ex: ((4* (-(*p2)))/(*p1)+10 where *p1=12 ,*p2=4</p> <p>expected output is 9 but why?</p>
0debug
Python: How to change a "penny" image color (copper) to different gray levels? Example given in image : [penny image in different gray levels][1] https://i.stack.imgur.com/Cb2Jk.png
0debug
whois lookup shows correct ip but why my browser cant find ip of domain? : I am facing very strange situation. my website suddenly stooped working. when i search for the domain name in WHOIS websites its showing the correct server ip address and correct DNS IP address. I can reach the website by its IP address...
0debug
How to restrict file type (e.g. .pdf) using thymeleaf? : How to restrict file type (e.g. .pdf) using thymeleaf? The accept tag does not serve the purpose fully, as I can type some other file type and the file gets uploaded. The field is of input type "file". Is there any thymeleaf tag that can serve the purpose?
0debug
Single instance of class in Python : <p>I am creating a Python application that includes socket communication with a server. I would like to have a module which can be used throughout my entire application (several other modules). Currently my module look like this:</p> <pre><code>class SocketCommunication: def _...
0debug
Get selected radio item true OR false : <p>I was trying to get weather the radio button is selected or not by Jquery, but it always returns me false even if the id is checked</p> <p>So far i tried this:</p> <pre><code>$("#opt_34709").prop('checked'); </code></pre> <p>This is my HTML:</p> <pre><code>&lt;input type="...
0debug
void tcg_dump_ops(TCGContext *s) { char buf[128]; TCGOp *op; int oi; for (oi = s->gen_op_buf[0].next; oi != 0; oi = op->next) { int i, k, nb_oargs, nb_iargs, nb_cargs; const TCGOpDef *def; TCGOpcode c; int col = 0; op = &s->gen_op_buf[oi]; c...
1threat
Javascrip for loop not working : Can anyone tell me why this loop is not working when I put the start value of 2 in but it works when I do 1 or 10. var button = document.getElementById('generate'); var resultsDiv = document.getElementById('results'); var start; var end; button.onclick = fu...
0debug
Publising Failed - We are unable to create an authentication session : <p>I am trying to upload an iOS App to the App Store in Visual Studio on my Mac.</p> <p>However, I am getting this error shown in the image.</p> <p><a href="https://i.stack.imgur.com/PjRsI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/...
0debug
int av_write_header(AVFormatContext *s) { int ret, i; AVStream *st; if (s->nb_streams == 0) { av_log(s, AV_LOG_ERROR, "no streams\n"); return AVERROR(EINVAL); } for(i=0;i<s->nb_streams;i++) { st = s->streams[i]; switch (st->codec->codec_type) { ...
1threat
How can I extract date from since time component : <p>I have to extract date in the format MM-dd-yyyy in java from the since time value. Since time is the time at which the doucment is created. For example, if since time is <strong>1452413972759</strong>, date would be "<strong>Sun, 10 Jan 2016 08:19:32 GMT</strong>" ...
0debug
static int32_t ide_nop_int32(IDEDMA *dma, int x) { return 0; }
1threat
How do I pass an expression as a function keyword in Python : <p>I am trying to be pythonic with my code but can't figure out how to do:</p> <pre><code>dfSort.assign(i+5=pd.Series(dfWork)) </code></pre> <p>where dfSort is a Dataframe and pd is pandas import. Of course the <code>i+5</code> is an expression and therefo...
0debug
static ExitStatus gen_call_pal(DisasContext *ctx, int palcode) { if (palcode >= 0x80 && palcode < 0xC0) { switch (palcode) { case 0x86: break; case 0x9E: tcg_gen_mov_i64(cpu_ir[IR_V0], cpu_unique); ...
1threat
How do I convert 000041933, a string, to 41933, an integer in Python? : <p>I know how to convert a string to an integer, but what I really am having trouble with is removing the leading zeros. Any help?</p>
0debug
How to add a cut string in the list with javascript? : <p>I have a small problem with the JavaScript. I would like to add the string (format:one-two-three) the list, but this cut the sign ("-") and every elements tag add. I try solve this problem, unfortunatelly don't succeeded. Here my function:</p> <p>function listA...
0debug
Make the heart move up/down/left/right : <p>I was able to make a heart in matlab as:</p> <pre><code>n=100; x=linspace(-3,3,n); y=linspace(-3,3,n); z=linspace(-3,3,n); [X,Y,Z]=ndgrid(x,y,z); F=((-(X.^2) .* (Z.^3) -(9/80).*(Y.^2).*(Z.^3)) + ((X.^2) + (9/4).* (Y.^2) + (Z.^2)-1).^3); isosurface(F,0) lighting phong axis eq...
0debug
How to give Sort option to the hierarchy(List of Elements) in the Windows Form : I am using EA with C# Add-in and MDG Technology, From C# Add-in I have created few list of elements in that windows form. In this Window i have a hierarchy to display. And now i want to give Sort option to that list/tree/flow in that windo...
0debug
document.location = 'http://evil.com?username=' + user_input;
1threat
Function on a variable declaration : <p>I'm reading the C Programming Language (chapter 5), and I'm confused by this example:</p> <pre><code>int n, array[SIZE], getint(int *); </code></pre> <p>Why is this function call in here like that? Is this just some tricky example and invalid code?</p>
0debug
static AVBufferRef *dxva2_pool_alloc(void *opaque, int size) { AVHWFramesContext *ctx = (AVHWFramesContext*)opaque; DXVA2FramesContext *s = ctx->internal->priv; AVDXVA2FramesContext *hwctx = ctx->hwctx; if (s->nb_surfaces_used < hwctx->nb_surfaces) { s->nb_surfaces_used++; ...
1threat
Java script for json object nothing shows in the html page? : I'm following a JS tuto , and I've faced a problem the list is not showing on my browser . I checked the script part but It's all okay. I did'nt find the error in my code. The output on my page's browser should be somthing like this list : ...
0debug
How to generate Signature in AWS from Java : <p>When I invoke API endpoints from REST client, I got error by concerning with Signature.</p> <p>Request:</p> <blockquote> <p><strong>Host</strong>: <a href="https://xxx.execute-api.ap-southeast-1.amazonaws.com/latest/api/name" rel="noreferrer">https://xxx.execute-api.a...
0debug
static av_cold int ape_decode_init(AVCodecContext * avctx) { APEContext *s = avctx->priv_data; int i; if (avctx->extradata_size != 6) { av_log(avctx, AV_LOG_ERROR, "Incorrect extradata\n"); return -1; } if (avctx->bits_per_coded_sample != 16) { av_log(avctx, AV_LOG...
1threat
static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height) { const int w = 8; const int ix = ox >> (16 + shift); const int iy = oy ...
1threat
def sum(a,b): sum = 0 for i in range (1,min(a,b)): if (a % i == 0 and b % i == 0): sum += i return sum
0debug
PPC_OP(mulhwu) { T0 = ((uint64_t)T0 * (uint64_t)T1) >> 32; RETURN(); }
1threat
void ppce500_init(MachineState *machine, PPCE500Params *params) { MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *ram = g_new(MemoryRegion, 1); PCIBus *pci_bus; CPUPPCState *env = NULL; uint64_t elf_entry; uint64_t elf_lowaddr; hwaddr entry=0; hwaddr loadadd...
1threat
Questions needs to asked before we need upgrade TFS 2013 upgrade to TFS 2018 upgrade? : One of our client wants to move from TFS 2013 to TFS 2018. We don't have much information about the current TFS setup at client's end. Can anyone please guide with what questions we need to ask to client to get the information r...
0debug
Please help out : Hello coders i am trying to display an array using angularjs and type script but their is an error i am not understanding. Please help. I am learning Angular js an type script [When i move my cursor to the The Goal that red lined it shows this: Type '{ id: number; name: string; }[]' is missing the...
0debug
Get rid of "warning: command substitution: ignored null byte in input" : <p>I'm getting <code>-bash: warning: command substitution: ignored null byte in input</code> when I run <code>model=$(cat /proc/device-tree/model)</code></p> <pre><code>bash --version GNU bash, version 4.4.12(1)-release (arm-unknown-linux-gnueabi...
0debug
static inline void idct4col_put(uint8_t *dest, int line_size, const DCTELEM *col) { int c0, c1, c2, c3, a0, a1, a2, a3; const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; a0 = col[8*0]; a1 = col[8*2]; a2 = col[8*4]; a3 = col[8*6]; c0 = ((a0 + a2) << (CN_SHIFT - 1)) + (1 << (C_SHIFT - 1...
1threat
static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq) { SCSIBus *bus = sreq->bus; VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus); VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s); VirtIOSCSIReq *req; uint32_t n; req = g_malloc(sizeof(*req)); qemu_get_be32s(f, &n); ...
1threat
static int ff_sctp_send(int s, const void *msg, size_t len, const struct sctp_sndrcvinfo *sinfo, int flags) { struct msghdr outmsg; struct iovec iov; outmsg.msg_name = NULL; outmsg.msg_namelen = 0; outmsg.msg_iov = &iov; iov.iov_base = m...
1threat
How can I parse the xml? : <p>In my project, the url return the xml data,and How can I parse the xml? <a href="https://i.stack.imgur.com/TlxzU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TlxzU.png" alt="enter image description here"></a></p>
0debug
static int ipvideo_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; IpvideoContext *s = avctx->priv_data; AVFrame *frame = data; int...
1threat
Serving mp3 files using the webpack file loader : <p>I have a problem with getting my mp3 files to work using the webpack file loader.</p> <p>This is the issue:</p> <p>I have a mp3 file on my harddisk, that if I open using chrome by for example "c:\somefolder\somemp3file.mp3" opens up in a tab in the browser and play...
0debug
static void spr_write_dbatu (void *opaque, int sprn) { DisasContext *ctx = opaque; gen_op_store_dbatu((sprn - SPR_DBAT0U) / 2); RET_STOP(ctx); }
1threat
int fw_cfg_add_bytes(FWCfgState *s, uint16_t key, uint8_t *data, uint32_t len) { int arch = !!(key & FW_CFG_ARCH_LOCAL); key &= FW_CFG_ENTRY_MASK; if (key >= FW_CFG_MAX_ENTRY) return 0; s->entries[arch][key].data = data; s->entries[arch][key].len = len; return 1; }
1threat
What happends in this simple Recursion code : I can't seem to understand why does the following code prints 00 1 10 1 by how i see it,it should print the premutations of 2 binary digits please,dont fix my code. i want an explanation of why it works the way it is right now.thanks ahead public static St...
0debug
static int asf_read_value(AVFormatContext *s, uint8_t *name, uint16_t name_len, uint16_t val_len, int type, AVDictionary **met) { int ret; uint8_t *value; uint16_t buflen = 2 * val_len + 1; AVIOContext *pb = s->pb; value = av_malloc(buflen); if (!value) ...
1threat
download file 1Gb : I am having difficulty downloading files with a size of 1 GB. Smaller files works fine. I've tried some options. My file is a zip folder that contais some pdf files. I've tried some options like use WebClient namespace This is my code that works just smaller files. byte[] fileBytes =...
0debug
static int read_quant_tables(RangeCoder *c, int16_t quant_table[MAX_CONTEXT_INPUTS][256]) { int i; int context_count = 1; for (i = 0; i < 5; i++) { context_count *= read_quant_table(c, quant_table[i], context_count); if (context_count > 32768U) { ...
1threat
css image masonry grid in a square space : How can I make masonry grid of only 4 images, that will always look like this: [image of a grid][1] [1]: https://i.stack.imgur.com/pM3Dw.jpg I need this alignment to stay on every screen sizes. And to form a square. Is this possible. I tried a lot of CSS combination...
0debug
static void rm_read_audio_stream_info(AVFormatContext *s, AVStream *st, int read_all) { RMContext *rm = s->priv_data; ByteIOContext *pb = &s->pb; char buf[256]; uint32_t version; int i; version = get_be32(pb); if (((version >> 16) & 0xf...
1threat
static int qemu_savevm_state(QEMUFile *f) { SaveStateEntry *se; int len, ret; int64_t cur_pos, len_pos, total_len_pos; qemu_put_be32(f, QEMU_VM_FILE_MAGIC); qemu_put_be32(f, QEMU_VM_FILE_VERSION); total_len_pos = qemu_ftell(f); qemu_put_be64(f, 0); for(se = first_se; se != ...
1threat