problem
stringlengths
26
131k
labels
class label
2 classes
static int wmavoice_decode_packet(AVCodecContext *ctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { WMAVoiceContext *s = ctx->priv_data; GetBitContext *gb = &s->gb; int size, res, pos; for (size = avpkt->size; size > ctx->block_align; size -=...
1threat
static int ape_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { AVFrame *frame = data; const uint8_t *buf = avpkt->data; APEContext *s = avctx->priv_data; uint8_t *sample8; int16_t *sample16; int32_t *sample24; in...
1threat
static int coroutine_fn nfs_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *iov) { NFSClient *client = bs->opaque; NFSRPC task; char *buf = NULL; nfs_co_init_task(client, &task); ...
1threat
GoogleMaps API KEY for testing : <p>I'd like to add an API_KEY for <code>GoogleMaps</code> for testing and in documentation I've read this : </p> <blockquote> <p>Tip: During development and testing, you can register a project for testing purposes in the Google Cloud Platform Console and use a generic, unrestricted A...
0debug
Chagne the width of the dropdownlist : Goal: Change the width of the select dropdownlist that use bootstrap v2. Problem: I don't know how to change the width of it in relation to bootstrap. Info: Please remember that I have three dropdownlist in the same page and it is one of them that I want to change t...
0debug
Google App Engine - automatic-scaling with always on instance? : <p>One of the most irritating things about using GAE for a brand new app is having to deal with instances being fired back up if no one has hit your servers in 15 minutes. Since the app is new, or just has few users, there will be periods of great latency...
0debug
void kvm_mips_reset_vcpu(MIPSCPU *cpu) { CPUMIPSState *env = &cpu->env; if (env->CP0_Config1 & (1 << CP0C1_FP)) { fprintf(stderr, "Warning: FPU not supported with KVM, disabling\n"); env->CP0_Config1 &= ~(1 << CP0C1_FP); } DPRINTF("%s\n", __func__); }
1threat
static void test_none(void) { struct qdist dist; char *pr; qdist_init(&dist); g_assert(isnan(qdist_avg(&dist))); g_assert(isnan(qdist_xmin(&dist))); g_assert(isnan(qdist_xmax(&dist))); pr = qdist_pr_plain(&dist, 0); g_assert(pr == NULL); pr = qdist_pr_plain(&dist, 2...
1threat
SVG animation on IE : <p>I am creating an animation with SVG images and JS, but I've realised that the SVG animations doesn't work in IE... Do you know if there's a way to make it work in IE? If not, is it possible to do it with JS?</p> <p>You can see the working code <a href="https://codepen.io/anon/pen/ddgQzw" rel="...
0debug
Multiple pipelines that merge within a sklearn Pipeline? : <p>Sometimes I design machine learning pipelines that look something like this:</p> <p><a href="https://i.stack.imgur.com/2mw5F.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2mw5F.png" alt="Example pipeline"></a></p> <p>Normally I have to hack the...
0debug
static void v9fs_wstat_post_chown(V9fsState *s, V9fsWstatState *vs, int err) { V9fsFidState *fidp; if (err < 0) { goto out; } if (vs->v9stat.name.size != 0) { char *old_name, *new_name; char *end; old_name = vs->fidp->path.data; end = strrchr(old_nam...
1threat
Explain "export =" and "export as namespace" syntax in TypeScript : <p>I am trying to make use of the type declarations files in the <a href="https://github.com/DefinitelyTyped/DefinitelyTyped" rel="noreferrer">DefinitelyTyped</a> repository. Many of these files use the following pattern:</p> <pre><code>export = React...
0debug
static int transcode(OutputFile *output_files, int nb_output_files, InputFile *input_files, int nb_input_files) { int ret, i; AVFormatContext *is, *os; OutputStream *ost; InputStream *ist; uint8_t *no_packet; int no_packet_...
1threat
java regex split multiple separators : I have a string that contains urls separate by | like this: (http://...|http://...|http://...) but inside some urls I may have the caracheter **|**, so I could split it with .split("|http://") but the problem is that inside some urls contains another urls like this (...
0debug
I got a PHP syntax error and I don't know what I did wrong? : <p>I was trying to make a page so I put a post on a specific page on Wordpress and I ended up getting a syntax error. Below is the code I used.</p> <pre><code> &lt;?php /* Template Name: blog */ global $more; $more = 0; query_posts('cat=29'); ...
0debug
UVA.112 Tree Summing and Runtime Error : For a couple of weeks ago, I got some homeworks from my university and the thing is that, though other problems are accepted on the uva, I cannot figure out what is going wrong with this problem. I've already run the input from udebug website and there was no problem. I double-c...
0debug
static void spr_write_tbu(DisasContext *ctx, int sprn, int gprn) { if (ctx->tb->cflags & CF_USE_ICOUNT) { gen_io_start(); } gen_helper_store_tbu(cpu_env, cpu_gpr[gprn]); if (ctx->tb->cflags & CF_USE_ICOUNT) { gen_io_end(); gen_stop_exception(ctx); } }
1threat
Delete file if another file does not exist : <p>I've searched quite a bit on this topic but can only find "delete if file or another file exists" which is not what I need...</p> <p>Windows 7 from a batch file or command prompt:</p> <p>Search a specific directory and if any .edl files exist, delete them only if an ind...
0debug
static void mcf5208evb_init(MachineState *machine) { ram_addr_t ram_size = machine->ram_size; const char *cpu_model = machine->cpu_model; const char *kernel_filename = machine->kernel_filename; M68kCPU *cpu; CPUM68KState *env; int kernel_size; uint64_t elf_entry; hwaddr entry; ...
1threat
Changing the results of a complex query or altering the results after they are returned : I have an extremely complex and long query that I did not write and that spans over 14 lines that returns something like this |data| fromDateTime | toDateTime | -----------------------------------------...
0debug
static int vdpau_alloc(AVCodecContext *s) { InputStream *ist = s->opaque; int loglevel = (ist->hwaccel_id == HWACCEL_AUTO) ? AV_LOG_VERBOSE : AV_LOG_ERROR; AVVDPAUContext *vdpau_ctx; VDPAUContext *ctx; const char *display, *vendor; VdpStatus err; int i; ctx = av_mallocz(sizeo...
1threat
STORING MULTIPLE DATA TYPE IN AN ARRAY - C#? : I want to store multiple data type in an array of c# . I researched on this and found one answer i.e to use object type , the code for which goes like this object[] array = new object[2]; Is there any other way to achieve this?? Please help me out
0debug
Laravel 5 How to configure the Queue database driver to connect to a non-default database? : <p>In Laravel 5.1, we can set the Queue connection configurations in <code>config/queue.php</code>.</p> <pre><code>QUEUE_DRIVER=database </code></pre> <hr> <pre><code> 'database' =&gt; [ 'driver' =&gt; 'database',...
0debug
static int load_sofa(AVFilterContext *ctx, char *filename, int *samplingrate) { struct SOFAlizerContext *s = ctx->priv; int ncid, n_dims, n_vars, n_gatts, n_unlim_dim_id, status; char data_delay_dim_name[NC_MAX_NAME]; float *sp_a, *sp_e, *sp_r, *data_ir; char *sofa_conventions; char...
1threat
void qemu_cpu_kick(CPUState *cpu) { qemu_cond_broadcast(cpu->halt_cond); if (tcg_enabled()) { cpu_exit(cpu); qemu_cpu_kick_rr_cpu(); } else { if (hax_enabled()) { cpu->exit_request = 1; } qemu_cpu_kick_thread(cpu); ...
1threat
How to calculate date and change format date : How to calculate date and change format date. I can't compare date code below. I want to know why help me please i want example compare date or calculate day results of different days <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: l...
0debug
how to download attachments from multiple emails on a specific range date and specific subject using Perl? : <p>I need to download attachments from multiple emails on a specific range date and specific subject.</p> <p>In specific range date, i.e. 01/10/2016 to 02/02/2017 and subject "Cambridge".</p> <p>I use imap gma...
0debug
How to display exactly 6 previous month's by their name from the current date in a select drop down list? : <p>The project i am working on needs to display 6 previous months by name in a select drop down list which will then be sent to service units . Is there a way to do it using JavaScript?</p>
0debug
static void test_rtas_get_time_of_day(void) { QOSState *qs; struct tm tm; uint32_t ns; uint64_t ret; time_t t1, t2; qs = qtest_spapr_boot("-machine pseries"); g_assert(qs != NULL); t1 = time(NULL); ret = qrtas_get_time_of_day(qs->alloc, &tm, &ns); g_assert_cmpint(r...
1threat
Trying to calculate retention rate in R, how to divide one row by another with the same date and then apply same logic across entire data frame? : <p>I am attempting to calculate retention rate of an Instagram story (# of viewers on the last frame divided by # viewers on first frame) within the same date. I have this d...
0debug
Add User in my andiod app : Hi I Implemented an android app. 1. A Splash screen 2. Then MainActivity - GetSharedPerf - if(sharedpref == empty or null) { * Open activity --> Login Activity - } 3. else { Stay on MainActivity } My Question is After Successful login i need to add new user -->...
0debug
static void nbd_coroutine_start(NBDClientSession *s, NBDRequest *request) { if (s->in_flight == MAX_NBD_REQUESTS) { qemu_co_queue_wait(&s->free_sema, NULL); assert(s->in_flight < MAX_NBD_REQUESTS); } s->in_flight++; }
1threat
(Java)Why is my array not working as intended? : I have been unable to submit my assignment because of one final discrepancy in my code. I've spent several hours trying to resolve it. My code takes 20 test answers that can either be 'A', 'B', 'C', or 'D', and then tells you whether you passed (>=15 correct) or failed, ...
0debug
static int v410_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, void *data) { AVFrame *pic = data; uint8_t *dst = buf; uint16_t *y, *u, *v; uint32_t val; int i, j; int output_size = 0; if (buf_size < avctx->width * avctx->height * 3) { ...
1threat
static void sunkbd_event(void *opaque, int ch) { ChannelState *s = opaque; int release = ch & 0x80; trace_escc_sunkbd_event_in(ch); switch (ch) { case 58: s->caps_lock_mode ^= 1; if (s->caps_lock_mode == 2) return; break; case 69: s->n...
1threat
window.location.href = 'http://attack.com?user=' + user_input;
1threat
void ff_configure_buffers_for_index(AVFormatContext *s, int64_t time_tolerance) { int ist1, ist2; int64_t pos_delta = 0; const char *proto = avio_find_protocol_name(s->filename); if (!(strcmp(proto, "file") && strcmp(proto, "pipe") && strcmp(proto, "cache"))) return; for (is...
1threat
How to turn off telemetry for SQL 2016 : <p>Installing SQL 2016 automatically turns on all of the "CEIP", or Customer Experience Improvement Program elements. These elements report back to Microsoft about various aspects of your installation experience as well as your feature usage. I want to turn it off, because it'...
0debug
Using InfluxDB subquery to subtract values : <p>I have a Influx database that is getting filled with values. These values are presented by Grafana. What I need is to get the actual values depending on the selected time interval.</p> <p>Currently I have the following query for a single metric:</p> <pre><code>SELECT me...
0debug
pytest run only the changed file? : <p>I'm fairly new to Python, trying to learn the toolsets.</p> <p>I've figured out how to get <code>py.test -f</code> to watch my tests as I code. One thing I haven't been able to figure out is if there's a way to do a smarter watcher, that works like Ruby's Guard library.</p> <p>U...
0debug
How to create a new laravel project without internet connectivity? : <p>I have composer installed and can use the</p> <pre><code>laravel new ProjectName </code></pre> <p>command to create a new project. However this requires an active internet connection. I need to be able to do the same thing offline as well. Will i...
0debug
I Cant Get My Tkinter Checkbutton Variable Using .get() : So ive been working on a project and recently encountered an issue with my check button, As whenever I try to do variablenname.get() it never works as it says int value has no attribute get(), I did use variablename = IntVar() too, what I am tring to do is to m...
0debug
static int caca_write_trailer(AVFormatContext *s) { CACAContext *c = s->priv_data; av_freep(&c->window_title); caca_free_dither(c->dither); caca_free_display(c->display); caca_free_canvas(c->canvas); return 0; }
1threat
Ruby Exception: Get Object information that caused the exception : Below is the piece of code that I have written to handle my exception. Class Business < ExceptionController def work(arg1,arg2) #####some business logic that cause exception end end class ExceptionContro...
0debug
static int posix_aio_process_queue(void *opaque) { PosixAioState *s = opaque; struct qemu_paiocb *acb, **pacb; int ret; int result = 0; for(;;) { pacb = &s->first_aio; for(;;) { acb = *pacb; if (!acb) return result; ...
1threat
Javascript ajax global variable undefined : <p>I try to get some info from external php with ajax and use the data but my global var return undefined.I try with async false but is deprecated.If i console in success function it has value outside is undefined.</p> <pre><code> var pkz; $(function(){ $.ajax({ ...
0debug
Should changes in a package.json file be commited to a repository as well? : <p>I am not sure that if it is correct to commit and push the changes in the package.JSON file into a repository. as far as I understood, the others in the git can install new dependencies by executing this command: npm install and accordingly...
0debug
In C++,why reference can't change when it is Initialize? : <p>In c++ primer,the book says the concept that when reference is initialized,it can't change .But I found a problem,here is the coding:</p> <pre><code>int a[]={1,2,3,4}; for(auto &amp;c:a)cout&lt;&lt;c; </code></pre> <p>Then,the output is the element of a.Bu...
0debug
Swift 4 JSON Decoding Error with Collection View Cell : I am trying to build an iOS app in Xcode 9.2, Swift 4 that uses a Collection View Cell to display each of the categories in the JSON file. I was working through this tutorial as an example - https://www.youtube.com/watch?v=hPJaQ2Fh7Ao, but I am getting an error: ...
0debug
No provider for ChildrenOutletContexts (injectionError) : <p>I am getting the following error when using Angular CLI to generate a routing module for my application:</p> <pre><code>ERROR Error: No provider for ChildrenOutletContexts! at injectionError (core.es5.js:1169) at noProviderError (core.es5.js:1207) ...
0debug
React-Native: Get current page in FlatList when using pagingEnabled : <p>I have a FlastList that looks like this:</p> <pre><code>&lt;FlatList pagingEnabled={true} horizontal={true} showsHorizontalScrollIndicator={false} data={[ {key:"A"}, {key:"B"} ]} renderItem={ ({item, index}) =&gt; &lt;MyC...
0debug
Distant work for designer : <p><br> I have django project with some additional libs (like geo and etc.) on my pc, and git. And I've a friend, who don't know nothing about programming and development. <br> And my question is: <strong> How can she make design for my project on distant? </strong> <br> She will be a distan...
0debug
query = 'SELECT * FROM customers WHERE email = ' + email_input
1threat
IE doesn't display some images : <p>I have a few ".jpg" images on my website. They all are displayed correctly in every browser... except Internet Explorer. In IE, most of them are displayed, but there are also images that aren't displayed and there's a black-white cross instead of them. It's not a problem with wrong p...
0debug
ObservableCollection does not update UI : <p>On startup i bind an ObservableCollection to a menu:</p> <pre><code>Menu.ItemsSource = _manager.Selection; </code></pre> <p>This menu correctly displays all objects from the collection.</p> <p>Now i want to update the collection and add/remove some of the items in it:</p>...
0debug
Image size taken from Flutter Image_Picker plugin is way too big : <p>I want to use auto-focus on the camera, which is available on the image_picker plugin. However, when I call:</p> <pre><code>var bytes = new File(imagePath); var enc = await bytes.readAsBytes(); print(enc.length); </code></pre> <p>I got: 5121126</p>...
0debug
static int alloc_refcount_block(BlockDriverState *bs, int64_t cluster_index, uint16_t **refcount_block) { BDRVQcowState *s = bs->opaque; unsigned int refcount_table_index; int ret; BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_ALLOC); refcount_table_index = cluster_index >> (s->cluster_bits - REFC...
1threat
Androidx modules, android:attr/ttcIndex & android:attr/fontVariationSettings not found : <p>I'm migrating all my support/appcompat libraries to androidx. After all updates I can't build my project because of this error</p> <pre><code>:app:processDebugManifest UP-TO-DATE AGPBI: {"kind":"error","text":"error: resource a...
0debug
Share a URL that is sharable on Facebook on LinkedIN : I've worked on sharing dynamic content to be sharable on Facebok populating OpenGraph tags, I know LinkedIn uses OpenGraph tags. To my surprise when I've tried sharing the same url on LinkedIn nothing shows up. did anyone have such expericne? I;ve used htt...
0debug
Uninitialized C structure field : <p>Is trying to access an uninitialized struct field in C considered undefined behavior?</p> <pre><code>struct s { int i; }; struct s a; printf("%d", a.i); </code></pre>
0debug
anguar 1.5 access data in http.get without scope : i'm new here. And that's a pleasure to be with you. I use Angular 1.5. I can't access to my data, from the http.get, out the http.get. Let me explain: I have my component: (function(){ 'use strict'; class myComponent { constructor( $http, ...
0debug
static inline int _find_pte (mmu_ctx_t *ctx, int is_64b, int h, int rw) { target_ulong base, pte0, pte1; int i, good = -1; int ret, r; ret = -1; base = ctx->pg_addr[h]; for (i = 0; i < 8; i++) { #if defined(TARGET_PPC64) if (is_64b) { pte0 = ldq_phys(base + (i * ...
1threat
Django 1.9 - JSONField in Models : <p>I'm trying to set up a models file in Django 1.9 using the new JSONField. I have found examples using postgres but none with MySql. In the examples with postgres they do a </p> <pre><code>from django.contrib.postgres.fields import JSONField </code></pre> <p>How do I go about im...
0debug
Is it safe to store a logged_in option as a SESSION? : <p>Is it safe to set the session <code>logged_in</code> as <code>true</code> if the login is correct? Will the user be able to edit this, or set their own session? </p>
0debug
Graphics lags after suspend. Ubuntu 16.04 NVIDIA GeForce GTX 950M : <p>After suspend ubuntu 16.04 this weird stuff on borders of every window. I have tried four of this drivers but it not helps. Drivers:<a href="https://i.stack.imgur.com/fYZjx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fYZjx.png...
0debug
Apply a function to each element of a pandas serie : I am trying to tokenize each sentence of my pandas serie. I try to do as I see in documentation, using apply, but didn't work: x.apply(nltk.word_tokenize) If I just use nltk.word_tokenize(x) didn't works too, because x is not a string. Someone have any ide...
0debug
what's the difference between google.appengine.ext.ndb and gcloud.datastore? : <p>ndb: (from google.appengine.ext import ndb)</p> <p>datastore: (from gcloud import datastore)</p> <p>What's the difference? I've seen both of them used, and hints they both save data to google datastore. Why are there two different imple...
0debug
Cannot implicitly convert System.xml.linq.xdocument to string[] : i have an x m l file which pretty much looks like this: " <?x m l version="1.0" en co n ding ="u t f-8"?> <Hangman><string>سال</string><string>کل</string><string>منٹ</string><string>بجے</string></Hangman> " i want to store it's contents to an Ar...
0debug
How do I hide the shadow under react-navigation headers? : <p>How do I hide the shadow under react-navigation headers?<br> They look like this.<br> <a href="https://i.stack.imgur.com/c763q.png" rel="noreferrer"><img src="https://i.stack.imgur.com/c763q.png" alt="enter image description here"></a></p>
0debug
Contents are not being displayed from the databse because of if else misplaced : so this is the code to in which depending on the categories suppose a user clicks on a button of the category then all the events under that category have to be dislayed so this is what i have given as an code for that there are no errors...
0debug
i have json object and i want to fetch it by ajax call ,i wrote ajax but im getting error : i have one json object and i want to fetch it by calling ajax [ { "color":"black", "productid":"1", "price":"1000" }, { "color":"blue", "productid":"2", "price":"2000" }, { "color":"green", "productid":"3", "pric...
0debug
woocommerce plugin to add database content to product page : <p>my problem is that i want to build a price comparison site based on woocommerceand that is exactly my problem. i want to develop a plugin, which makes it possible to post a database entry to my product page. i tried to add the content with normal sql query...
0debug
av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) { int i; int usesVFilter, usesHFilter; int unscaled; SwsFilter dummyFilter = { NULL, NULL, NULL, NULL }; int srcW = c->srcW; int srcH = c->srcH; ...
1threat
SocketAddress *socket_remote_address(int fd, Error **errp) { struct sockaddr_storage ss; socklen_t sslen = sizeof(ss); if (getpeername(fd, (struct sockaddr *)&ss, &sslen) < 0) { error_setg_errno(errp, errno, "%s", "Unable to query remote socket address"); re...
1threat
Hi! Kindly refer to the image attached : I am unable to run this javascript code in terminal even though the code is correct! I am using visual studio. and it runs perfectly when i click on run code but doesn't run in terminal [error][1] [1]: https://i.stack.imgur.com/VSPPG.jpg
0debug
Delphi - How to correctly register a graphic class since XE8? : <p>I'm writing a Delphi package, which provides a new custom TGraphic object, allowing to read a new image format in VCL components like TImage.</p> <p>I originally developed this package with RAD Studio XE7, and it worked well. However I migrated recentl...
0debug
How to rate-limit upload from docker container? : <p>I need to prevent a long-running multiterabyte upload from eating all of my network's bandwidth, but I can only constrain its bandwidth usage on a process level (meaning that slowing down the whole machine's network interface or slowing down this user's network traff...
0debug
Using XPATH to select specific input element when text is on another child's grandchild : [Screenshot link][1] [1]: https://i.stack.imgur.com/zoC7T.png I'm trying to target this specific input element while using the textfile name "timmy.txt". I'm not entirely sure why `//div//a[contains(text(), "timmy.txt")]...
0debug
static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S) { union { float f; uint32_t u; } value; int sign; int exp = s->float_max_exp; if (s->got_extra_bits) { const int max_bits = 1 + 23 + 8 + 1; const int left_bits = get_bits_l...
1threat
BlockBackend *blk_new_open(const char *filename, const char *reference, QDict *options, int flags, Error **errp) { BlockBackend *blk; BlockDriverState *bs; uint64_t perm; perm = BLK_PERM_CONSISTENT_READ; if (flags & BDRV_O_RDWR) { perm...
1threat
static int send_palette_rect(VncState *vs, int w, int h, struct QDict *palette) { int stream = 2; int level = tight_conf[vs->tight_compression].idx_zlib_level; int colors; size_t bytes; colors = qdict_size(palette); vnc_write_u8(vs, (stream | VNC_TIGHT_EXPLICIT_FILTER) << 4); vnc...
1threat
rmarkdown error "attempt to use zero-length variable name" : <p>When i generate a new rmarkdown file (or open existing rmarkdown-files) and try to run a rmarkdown chunk, i get this error: "Error: attempt to use zero-length variable name". I have Win10 and did a fresh install of R and Rstudio yesterday. What did i miss?...
0debug
static inline int asym_quant(int c, int e, int qbits) { int m; c = (((c << e) >> (24 - qbits)) + 1) >> 1; m = (1 << (qbits-1)); if (c >= m) c = m - 1; av_assert2(c >= -m); return c; }
1threat
How to check anaconda's version on mac? : <p>I installed <code>anaconda</code> a while ago, and I want to know if I need to re-install it to catch up the new updates.</p> <p>However, i don't know how to check the current version of <code>anaconda</code></p> <p>In command line, I type <code>anaconda -V</code> it gives...
0debug
template and derived class definition : error: 'myClass' is not a class, namespace, or enumeration : <p>I'm trying to learn templates in C++ and I have the following code :</p> <pre><code>#include &lt;stack&gt; template&lt;typename T&gt; class myClass : public std::stack&lt;T&gt;{ public: myClass(void); myC...
0debug
static void via_ide_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); k->init = vt82c686b_ide_initfn; k->exit = vt82c686b_ide_exitfn; k->vendor_id = PCI_VENDOR_ID_VIA; k->device_id = PCI_DEVICE_ID_VIA_IDE; ...
1threat
void tcg_profile_snapshot(TCGProfile *prof, bool counters, bool table) { unsigned int i; for (i = 0; i < n_tcg_ctxs; i++) { const TCGProfile *orig = &tcg_ctxs[i]->prof; if (counters) { PROF_ADD(prof, orig, tb_count1); PROF_ADD(prof, orig, tb_count); ...
1threat
static int msix_is_masked(PCIDevice *dev, int vector) { unsigned offset = vector * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_VECTOR_CTRL; return dev->msix_function_masked || dev->msix_table_page[offset] & PCI_MSIX_ENTRY_CTRL_MASKBIT; }
1threat
static int decode_slice_chroma(AVCodecContext *avctx, SliceContext *slice, uint16_t *dst, int dst_stride, const uint8_t *buf, unsigned buf_size, const int16_t *qmat, int log2_blocks_per_mb) { ProresContext *ctx = avctx...
1threat
static int virtqueue_num_heads(VirtQueue *vq, unsigned int idx) { uint16_t num_heads = vring_avail_idx(vq) - idx; if (num_heads > vq->vring.num) { error_report("Guest moved used index from %u to %u", idx, vring_avail_idx(vq)); exit(1); return num_h...
1threat
umur = thnsaiki - thnlahir TypeError: unsupported operand type(s) for -: 'int' and 'str' : <pre><code>from datetime import datetime import time print ("######## $$ ########") print ("# #") print ("# WELCOME. #") print ("# #") print ("####################") print ("") #input y...
0debug
int load_image_gzipped(const char *filename, hwaddr addr, uint64_t max_sz) { uint8_t *compressed_data = NULL; uint8_t *data = NULL; gsize len; ssize_t bytes; int ret = -1; if (!g_file_get_contents(filename, (char **) &compressed_data, &len, NULL)) { ...
1threat
What does it mean for a Service to be of type NodePort, and have both port and targetPort specified? : <p>I am becoming more familiar with Kubernetes by the day, but am still at a basic level. I am also not a networking guy.</p> <p>I am staring at the following snippet of a Service definition, and I can't form the ri...
0debug
Not work Convert Number into Word in C# window : I try to Convert Number into Word in C# windows. I apply Code is ::- namespace Num2Text { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void textBox1_TextChanged(ob...
0debug
static void r2d_init(MachineState *machine) { const char *cpu_model = machine->cpu_model; const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; SuperHCPU *cpu; CPUSH4State *env;...
1threat
Unable to swap the variables using perl? : <hr> <p>Here by i tried to swap the variables using perl.</p> <pre><code>#!/usr/local/bin/perl use strict; use warnings; my $v1=23; my $v2=43; $v1,$v2)=($v2,$v1) print $v1,$v2; </code></pre> <p>Error:</p> <pre><code>syntax error at exchange.pl line 7, near ") print" ...
0debug
Aligning collection view cells to fit exactly 3 per row : <p>I am trying to make a collection view of images, so that there are 3 per row, with no spacing in between.</p> <p>My collection view data sources are:</p> <pre><code>func numberOfSections(in collectionView: UICollectionView) -&gt; Int { return 1 } func ...
0debug
Just starting looking into python, Want to as about beautiful soup : So I was trying to get the web crawling element in Google drive. What I want is the date the file was modified. And I use F12 to find the elements, got the following selector body > div.ndfHFb-c4YZDc.ndfHFb-c4YZDc-AHmuwe-Hr88gd-OWB6Me.ndfHFb-c4Y...
0debug
static ssize_t vnc_tls_pull(gnutls_transport_ptr_t transport, void *data, size_t len) { struct VncState *vs = (struct VncState *)transport; int ret; retry: ret = recv(vs->csock, data, len, 0); if (ret < 0) { if (errno == EINTR) go...
1threat
Does pytest have an assertItemsEqual / assertCountEqual equivalent : <p><code>unittest.TestCase</code> has an <a href="https://docs.python.org/3.6/library/unittest.html#unittest.TestCase.assertCountEqual" rel="noreferrer"><code>assertCountEqual</code> method</a> (<code>assertItemsEqual</code> in Python 2, which is argu...
0debug