problem
stringlengths
26
131k
labels
class label
2 classes
Why does the exit() function in C "never fail"? : <p>I was reading Head First C and it said "<code>exit()</code> is the only function that is guaranteed never to return a value and never to fail."</p> <ol> <li><p>Are there other functions in C that are supposed to not return anything that might?</p></li> <li><p>Why is...
0debug
static void check_watchpoint(int offset, int len, MemTxAttrs attrs, int flags) { CPUState *cpu = current_cpu; CPUClass *cc = CPU_GET_CLASS(cpu); CPUArchState *env = cpu->env_ptr; target_ulong pc, cs_base; target_ulong vaddr; CPUWatchpoint *wp; uint32_t cpu_flags; if (cpu->watc...
1threat
static int encode_bitstream(FlashSVContext *s, const AVFrame *p, uint8_t *buf, int buf_size, int block_width, int block_height, uint8_t *previous_frame, int *I_frame) { PutBitContext pb; int h_blocks, v_blocks, h_part, v_part, i, j; int buf_pos...
1threat
Python Json.loads to list not dict : Hi all I'm a new python developer and I am running into an issue that Google had not been able to address for me for me. I understand that "json.loads(var.text)" will return a dict, and in some cases it will for me. Say the data looks like this: { "PROJECT_ID": 335...
0debug
How to set cookie in vuejs? : <p>What is the best practice for setting a cookie in vuejs? I use SSR, so I guess I can’t use localStorage.</p> <p>What is the best approach here?</p>
0debug
static void virtio_set_status(struct subchannel_id schid, unsigned long dev_addr) { unsigned char status = dev_addr; run_ccw(schid, CCW_CMD_WRITE_STATUS, &status, sizeof(status)); }
1threat
static void virtio_pci_vector_mask(PCIDevice *dev, unsigned vector) { VirtIOPCIProxy *proxy = container_of(dev, VirtIOPCIProxy, pci_dev); VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus); VirtQueue *vq = virtio_vector_first_queue(vdev, vector); int index; while (vq) { index =...
1threat
what is the difference b/w *array[] and array[] ? : - As we know that the value of array name is the address of the first element in the array - and the Value of the pointer is an address . so suppose i declare a pointer to an int int *a= new int(); int *b= new int(); And i want it to...
0debug
Can't seam to add items to a combobox : I have tried these sites for help: http://www.excel-easy.com/vba/userform.html http://sitestory.dk/excel_vba/listboxes.htm https://www.ozgrid.com/forum/forum/help-forums/excel-general/49940-fill-combobox-with-cell-range-link-combobox-to-cell https://stackoverflow.com/...
0debug
Fullcalendar , Make today (for current month) active : Today button disable for current month. when you go next or previous month it appear as active.(when click on the TODAY button control goes to current month). In following code i am showing how to make today button active for current month. function make...
0debug
PChart linear chart image quality : <p>I am using PChart to create linear charts. Everything goes well beside the quality of the actual lines drawn.</p> <p>Of course, antialiasing is <em>not</em> turned off, and even explicitly turned on. </p> <p>Here is an example of the actual image, which looks quite ugly with all...
0debug
How can I make a Python program do some task at some times of the day? : <p>I want to make a Python program do some task at some times of the day (for example at 12:00, 12:30,13:00, 13:30, etc.) without using sleep(), so the program can make other tasks while it waits.</p>
0debug
Get Weekends between two dates if present in php : <p>Example: <code>$startdate = 01-Aug-2018</code> and <code>$enddate = 04-Aug-2018</code></p> <p>so, it should return an array with key date and value day name</p> <pre><code>array( "04-Aug-2018" =&gt; "Sat" ) </code></pre>
0debug
static int cpu_gdb_read_register(CPUState *env, uint8_t *mem_buf, int n) { if (n < 32) { GET_REGL(env->active_tc.gpr[n]); } if (env->CP0_Config1 & (1 << CP0C1_FP)) { if (n >= 38 && n < 70) { if (env->CP0_Status & (1 << CP0St_FR)) GET_REGL(env->active_fpu.fpr[n - 38].d);...
1threat
Add 2 python dictionaries (python 3) : Trying to add 2 python dictionaries in python 3. for example: dict1 = {'a': 10,'b':20} dict2 = {'a': 30,'b':30} expected result: dict_sum = {'a': 40,'b':50} Code: A = Counter (dict1) B = Counter(dict2) dict_sum = A + B ...
0debug
static int try_seek_hole(BlockDriverState *bs, off_t start, off_t *data, off_t *hole) { #if defined SEEK_HOLE && defined SEEK_DATA BDRVRawState *s = bs->opaque; *hole = lseek(s->fd, start, SEEK_HOLE); if (*hole == -1) { return -errno; } if (*hole > start...
1threat
Postgresql: SERIAL incremented on failed constraint INSERT : <p>Having a simple table structure like this:</p> <pre><code>CREATE TABLE test ( id INT PRIMARY KEY, sid SERIAL ); </code></pre> <p>I noticed if I attempt to insert a row but it fails a constraint test (i.e. PRIMARY KEY constraint), the <code>SERIAL...
0debug
ios11 iphone app icon is missing on iPad : <p>I have an iPhone only app but it works in compatibility mode in the iPad too(no surprises). </p> <p>but after I updated the app for the ios11, app icon on the iPad is missing. </p> <p>here is what I've tried; - launch on the iPhone simulator, icon appears - launch on the ...
0debug
What's the time complexity (O(n), O(n^2), etc.) of the algorithm below : <p>Me and my friend were wondering what the time complexity of the below algorithm is. I think it's O(n) but he's saying it's O(n^2). I just wanted second/third/however many opinions</p> <pre><code>def sorting(seq): T = BinarySearchTree() ...
0debug
What causes the attribute error?[ pygame ] : This code is to create a walking animation. I dont know is it causing an attribute error. pls help! class player(pygame.sprite.Sprite): def init(self): pygame.sprite.Sprite.init(self) self.images = [] ...
0debug
moving data from Model to destination ViewController with segue : I am building a quiz app. The app uses TopicsViewController to select a topic and segue to a QuestionsViewController. The question for the topics are stored as separate swift Objects file. I would like to pick the Topic1 Question file when I press the to...
0debug
JQuery: How to select first td compared to the clicked td : ***Hello*** it will have been very easy if the selector was juste < tr> like this : $('tr') But i target td (for example click here or td 2 etc ...) and I want to have the content of the first td compared to the ***clicked td*** that is to say td 1 in this...
0debug
PXA2xxState *pxa270_init(MemoryRegion *address_space, unsigned int sdram_size, const char *revision) { PXA2xxState *s; int i; DriveInfo *dinfo; s = (PXA2xxState *) g_malloc0(sizeof(PXA2xxState)); if (revision && strncmp(revision, "pxa27", 5)) { fprintf(stde...
1threat
comparing sub-list elements in list using python : <p>i have a list a=[[1,2],[3,4],[5,6]] and i need to check if all elements in sublist are in ascending order (e.g [1,2] is less than [3,4] and [5,6], and [3,4] is less than [5,6] and so on). i use the following function:</p> <pre><code>def FirstRuleLink (L): for i...
0debug
How do I prevent downloading media on the website? : <p>I have a website where I put music, but I do not want anyone downloading it, or it gets harder and just listening online, like YouTube.</p>
0debug
Jsoup response coming up as an empty page? : Im trying to connect to a website at Jsoup.connect(http://...php) and it is returning <html> <head></head> <body></body> </html> is it because the page is .php? and not .html
0debug
Find specific word in array of strings In python : I have two lists one with Strings And other With Words To be Found lets say : list1=['Hi I am Tayyab','I am a python programmer', 'I am new To python' ] list2=['Tayyab','Programmer'] I want to check if list 1 contains the words present in list 2 if yes then r...
0debug
Best Practice in Error Handling in Vuejs With Vuex and Axios : <p>I am using Vuex + axios, I want to know the best practice in handling errors for vuex + axios. What I am doing now is that when I request using axios and it returns an error, it will be committed in mutation and update my state. What I want to do is, If ...
0debug
Android Studio 3.0 Preview - Studio does not have write access : <p>I'm using Android Studio 3.0 Canary 1. I'm trying to update it to Android Studio 3.0 Canary 2 but it shows the following error:</p> <blockquote> <p>Studio does not have write access to /private/var/folders/mk/h5qpw_r11_7ggh9q52n9hhlr0000gn/T/AppTran...
0debug
int event_notifier_set_handler(EventNotifier *e, EventNotifierHandler *handler) { return qemu_set_fd_handler(e->fd, (IOHandler *)handler, NULL, e); }
1threat
static int nbd_handle_reply_err(QIOChannel *ioc, nbd_opt_reply *reply, Error **errp) { char *msg = NULL; int result = -1; if (!(reply->type & (1 << 31))) { return 1; } if (reply->length) { if (reply->length > NBD_MAX_BUFFER_SIZE) { ...
1threat
Specific code from SAS to R : <p>I am trying to write this (SAS) comand in R. x is a variable with this specific format: j61915035t</p> <p>x1 = trim(upcase(substr(x,1,1)));</p> <p>I really appreciate what you are doing in this site!</p>
0debug
static inline int parse_command_line(AVFormatContext *s, const char *line, int linelen, char *uri, int urisize, char *method, int methodsize, enum RTSPMethod *methodcode) { RTSPState *rt = s->priv_data; ...
1threat
static int film_read_packet(AVFormatContext *s, AVPacket *pkt) { FilmDemuxContext *film = s->priv_data; AVIOContext *pb = s->pb; film_sample *sample; int ret = 0; int i; int left, right; if (film->current_sample >= film->sample_count) sample = &...
1threat
how do i backup a database in docker : <p>i'm running my app using docker-compose with the below yml file</p> <pre><code> postgres: container_name: postgres image: postgres:${POSTGRES_VERSION} volumes: - postgresdata:/var/lib/postgresql/data expose: - "5432" environment: - POSTGR...
0debug
Visual Studio, Python not auto-indenting : <p>This is probably a simple issue but something is wrong with my Python tools for visual studio. When I first started using VS2015 for Python it would auto-indent whenever I used a colon. Now VS2015 is just acting like a text editor with syntax highlighting. I tried uninstall...
0debug
static void ra144_encode_subblock(RA144Context *ractx, const int16_t *sblock_data, const int16_t *lpc_coefs, unsigned int rms, PutBitContext *pb) { float data[BLOCKSIZE] = { 0 }, work[LPC_ORDER + BLOCKSIZE]; ...
1threat
How does Math.tan(x) actually work? (Javascript) : <p>I'm trying to understand the math behind the Math.tan method but it doesn't make any sense. Can someone please explain to me how it works?</p> <p>Firstly the mathematical formula to solve for a tangent angle is Tangent = Opposite/Adjacent. Which means I need to kno...
0debug
static int execute_decode_slices(H264Context *h, int context_count) { MpegEncContext *const s = &h->s; AVCodecContext *const avctx = s->avctx; H264Context *hx; int i; if (s->avctx->hwaccel || s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) return 0; if (co...
1threat
int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, const AVPacket *avpkt) { AVCodecInternal *avci = avctx->internal; ...
1threat
static void hb_regs_write(void *opaque, hwaddr offset, uint64_t value, unsigned size) { uint32_t *regs = opaque; if (offset == 0xf00) { if (value == 1 || value == 2) { qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); } else if (value == 3) { ...
1threat
pvscsi_on_cmd_setup_rings(PVSCSIState *s) { PVSCSICmdDescSetupRings *rc = (PVSCSICmdDescSetupRings *) s->curr_cmd_data; trace_pvscsi_on_cmd_arrived("PVSCSI_CMD_SETUP_RINGS"); pvscsi_dbg_dump_tx_rings_config(rc); pvscsi_ring_init_data(&s->rings, rc); s->rings_info_valid = TRUE; ...
1threat
Laravel 5.4 LengthAwarePaginator : <p>My brain suddenly crashed on this one. Anyone care to help me is highly appreciated.</p> <p>This is LengthAwarepaginator in laravel 5.4</p> <p>Here is the code.</p> <pre><code>$collection = []; foreach ($maincategories-&gt;merchantCategory as $merchantCat) { ...
0debug
static int mxf_read_generic_descriptor(MXFDescriptor *descriptor, ByteIOContext *pb, int tag, int size, UID uid) { switch(tag) { case 0x3F01: descriptor->sub_descriptors_count = get_be32(pb); if (descriptor->sub_descriptors_count >= UINT_MAX / sizeof(UID)) return -1; d...
1threat
Can not parse json file in go : <p>I'm trying to parse a json file using GoLang but it seems like not work. Am I doing right?</p> <p>this is my Go Code:</p> <pre class="lang-golang prettyprint-override"><code>package main import ( "encoding/json" "fmt" "io/ioutil" ) type info struct { username st...
0debug
static void quantize_and_encode_band_mips(struct AACEncContext *s, PutBitContext *pb, const float *in, float *out, int size, int scale_idx, int cb, const float lambda, int rtz) { quantize_and_encode_band_cost(s, pb, in, out, NUL...
1threat
int cpu_get_dump_info(ArchDumpInfo *info, const GuestPhysBlockList *guest_phys_blocks) { bool lma = false; GuestPhysBlock *block; #ifdef TARGET_X86_64 X86CPU *first_x86_cpu = X86_CPU(first_cpu); lma = !!(first_x86_cpu->env.hflags & HF_LMA_MASK); #endif if (lma) {...
1threat
Add comma in number after every thousand on event of "Enter" in a text box using Angular JS : <p>This is a question from Angular JS. I need to add "comma" after every thousand on event of enter in a text box. Like, if enter a number 1000000 in a text box and hit"Enter" button, text box should now show the value 1,000,0...
0debug
How to efficiently retrieve the indices of maximum values in a Torch tensor? : <p>Assume to have a torch tensor, for example of the following shape:</p> <pre><code>x = torch.rand(20, 1, 120, 120) </code></pre> <p>What I would like now, is to get the indices of the maximum values of each 120x120 matrix. To simplify th...
0debug
snippet for creating object from destructured array : <p>For example, I had an array with 3 numbers:</p> <pre><code>var arr = [124, -50, 24]; </code></pre> <p>and I need to convert this array to the object:</p> <pre><code>{ x: 124, y: -50, z: 24 } </code></pre> <p>I don`t want to use "old-style" syntax for...
0debug
Am I allowed to make circular references with constants structs? : <p>Am I allowed to do this in C99? </p> <pre><code>typedef struct dlNode { dlNode* next,prev; void* datum; } dlNode; const static dlNode head={ .next=&amp;tail, .prev=NULL, .datum=NULL }; const static dlNode tail={ .next=NULL...
0debug
iOS how to take the webview to first page : I have a webview which load a page when the user navigates he can go to 7 levels I mean he can go to 7 different pages with different URL. Now I want to go back to the first page directly instead of going back one by one. I couldn't find any API in webview to do this so...
0debug
static void decode_opc(DisasContext * ctx) { uint32_t old_flags = ctx->envflags; _decode_opc(ctx); if (old_flags & DELAY_SLOT_MASK) { ctx->envflags &= ~DELAY_SLOT_MASK; tcg_gen_movi_i32(cpu_flags, ctx->envflags); ctx->bstate = BS_BRANCH; if (old_flags & ...
1threat
Chrome not Firefox are not dumping to SSLKEYLOGFILE variable : <p>I'm trying to decrypt SSL packages with Wireshark as described <a href="https://jimshaver.net/2015/02/11/decrypting-tls-browser-traffic-with-wireshark-the-easy-way/" rel="noreferrer">here</a>. I have already created a SSLKEYLOGFILE System and User variab...
0debug
Assigning a static_cast<int>(-15) to a static const char type variable : <p>Hello it may be some silly question, but this is bugging me since few days. </p> <p>I have bellow line of code:</p> <pre><code>static const char x1 = static_cast&lt;int&gt;(-15); cout&lt;&lt;x1; static const char x2= 16; cout&lt;&lt; "hello ...
0debug
int attribute_align_arg avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size, const short *samples) { AVPacket pkt; AVFrame frame0 = { 0 }; AVFrame *frame; int ret, samples_size, got_packet...
1threat
Beanstalk: Node.js deployment - node-gyp fails due to permission denied : <p>Deployment of a Node.js application (Node 6, npm 5) to Beanstalk fails with:</p> <blockquote> <p>gyp ERR! stack Error: EACCES: permission denied, mkdir '/tmp/deployment/application/node_modules/heapdump/build'</p> </blockquote> <p>though...
0debug
static int ff_interleave_new_audio_packet(AVFormatContext *s, AVPacket *pkt, int stream_index, int flush) { AVStream *st = s->streams[stream_index]; AudioInterleaveContext *aic = st->priv_data; int size = FFMIN(av_fifo_size(aic->fifo), *aic->samples * aic->sample_si...
1threat
static void get_downmix_coeffs(AC3DecodeContext *ctx) { int from = ctx->bsi.acmod; int to = ctx->output; float clev = clevs[ctx->bsi.cmixlev]; float slev = slevs[ctx->bsi.surmixlev]; ac3_audio_block *ab = &ctx->audio_block; if (to == AC3_OUTPUT_UNMODIFIED) return 0; swit...
1threat
static MaltaFPGAState *malta_fpga_init(MemoryRegion *address_space, target_phys_addr_t base, qemu_irq uart_irq, CharDriverState *uart_chr) { MaltaFPGAState *s; s = (MaltaFPGAState *)g_malloc0(sizeof(MaltaFPGAState)); memory_region_init_io(&s->iomem, &malta_fpga_ops, s, ...
1threat
Comes up with an syntax error on the space : <p>I don't really know why this is happening, can someone help explaining why the syntax error happens </p> <pre><code>Menu_select = input(""" [------------------] [ Menu.model ] [ 1) Start: ] [ 2) Options: ] [ 3) Placeholder1: ] [ 4) Placeholder2: ] [ 5) ...
0debug
React Intl FormattedNumber with the currency symbol before, not after : <p>I am using FormattedNumber from React Intl in a big React project that has the capability for many different languages.</p> <p>Here is a Currency component I made so that I can easily insert a formatted currency into my views:</p> <pre><code>i...
0debug
Word length finding : <p>I'm trying to find out the length of a words in a list in python. Somehow I'm displaying the wrong numbers. I know I need to change line 3 but dunno what to.</p> <pre><code>&gt;&gt;&gt; a = ['Mary', 'had', 'a', 'little', 'lamb'] &gt;&gt;&gt; for i in range(len(a)): ... print i, a[i] </code></p...
0debug
I want to match whole word django : Here is my code that i want to search the input that user fill in the web, I called input as aranan, but it dose not work proper. I search 'urla' but it return me 'memurlarin' . the urla is inside the word memurlarin. but I want to get me back just sentences thet urla is on it.I pl...
0debug
Mac OSX python ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) : <p>Many operations in python require accessing things via https. This includes pip install, or just using http.client.HTTPSConnection, or any modules or applications that use these things internally.</p> <p>If python...
0debug
static void pci_basic(gconstpointer data) { QVirtioPCIDevice *dev; QPCIBus *bus; QVirtQueuePCI *tx, *rx; QGuestAllocator *alloc; void (*func) (QVirtioDevice *dev, QGuestAllocator *alloc, QVirtQueue *rvq, QVirtQueue *tvq, ...
1threat
django can't find new sqlite version? (SQLite 3.8.3 or later is required (found 3.7.17)) : <p>I've cloned a django project to a Centos 7 vps and I'm trying to run it now, but I get this error when trying to <code>migrate</code>:</p> <pre><code>$ python manage.py migrate django.core.exceptions.ImproperlyConfigured: SQL...
0debug
Why P-521 public key X,Y some time is 65 bytes some time is 66 bytes : <p>I use golang generate the P-521 public key. source code look like that:</p> <pre><code>curve:=elliptic.P521() priv, x, y, err := elliptic.GenerateKey(curve, rand.Reader) xBytes:=x.Bytes() yBytes:=y.bytes() //len(xBytes) some time is 65 bytes ,s...
0debug
c++ Realloc() doest not working : i have this code Perro **obj = NULL; obj = (Perro**)malloc(10*sizeof(Perro*)); for (int i = 0; i < 10; i++) { obj[i] = new Perrito((char*)"d",i); } realloc(obj,12*sizeof(Perro*)); for (int i = 9; i < 12; i++) { obj[i] = new Perrito((char*)"d",i...
0debug
static int wm8750_event(I2CSlave *i2c, enum i2c_event event) { WM8750State *s = WM8750(i2c); switch (event) { case I2C_START_SEND: s->i2c_len = 0; break; case I2C_FINISH: #ifdef VERBOSE if (s->i2c_len < 2) printf("%s: message too short (%i bytes)\n", ...
1threat
Sending a positive octet of zero bits over a socket : I am currently attempting to communicate with an external application over TCP/IP based socket. I have successfully established a connection with the client and received some data. This manual [here][1] states that > After this command is received, the client ...
0debug
java.lang.NullPointerException (no error message) APK building : <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } jcenter() } depende...
0debug
Can someone explain me what is flex property? : <p>Hello currently I'm learning flexbox, and I've watched a lot tutorials but I couldn't figure out what does flex property do? Some explanation and links that explain what it does would be really helpful. Thanks.</p>
0debug
php artisan migrate : erorr : <code>$ php artisan migrate Migration table created successfully. In Connection.php line 647: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`)) In Connecti...
0debug
Flutter Text Field: How to add Icon inside the border : <p><a href="https://i.stack.imgur.com/TfQ2u.jpg" rel="noreferrer">The Search Bar to Replicate</a></p> <p>I would like to add the icon in the search bar. Here is my code so far:</p> <pre><code>new TextField( decoration: new InputDecoration( ...
0debug
Configure docker-compose override to ignore / hide some containers : <p>If I have (simplified), the following <em>docker-compose.yml</em>:</p> <pre><code>parent: image: parent links: - child child: image: child </code></pre> <p>Can I construct a <em>docker-compose.override.yml</em> file that will <strong>n...
0debug
static void *spapr_create_fdt_skel(hwaddr initrd_base, hwaddr initrd_size, hwaddr kernel_size, bool little_endian, const char *kernel_cmdline, ...
1threat
static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; dmpi=ff_vf_get_image(vf->next, IMGFMT_YV12, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE | ((vf->priv->scaleh == 1) ? MP_IMGFLAG_READABLE : 0), ...
1threat
float32 HELPER(ucf64_df2si)(float64 x, CPUUniCore32State *env) { return ucf64_itos(float64_to_int32(x, &env->ucf64.fp_status)); }
1threat
When I put a div around an image, why is there spacing at the bottom? : <p>Take for example this fiddle: <a href="https://jsfiddle.net/ou33muc2/" rel="nofollow noreferrer">https://jsfiddle.net/ou33muc2/</a></p> <pre><code>&lt;div class = "overallDiv"&gt; &lt;div id="example"&gt;&lt;img src = "http://writingexercises.c...
0debug
Vue JS: Difference of data() { return {} } vs data:() => ({ }) : <p>I'm curious both of this data function, is there any difference between this two.</p> <p>I usually saw is</p> <pre><code>data () { return { obj } } </code></pre> <p>And ES6 "fat arrow" which I typically used</p> <pre><code>data:()=&gt;({ ...
0debug
static uint32_t nvram_readb (void *opaque, target_phys_addr_t addr) { M48t59State *NVRAM = opaque; uint32_t retval; retval = m48t59_read(NVRAM, addr); return retval; }
1threat
uint64_t HELPER(abs_i64)(int64_t val) { HELPER_LOG("%s: val 0x%" PRIx64 "\n", __func__, val); if (val < 0) { return -val; } else { return val; } }
1threat
Vue component props without value : <p>I want to set an attribute on my component without any value. For example:</p> <pre><code>&lt;my-button primary&gt;Save&lt;/my-button&gt; </code></pre> <p>I'm declaring <code>primary</code> in <code>props</code> of my component:</p> <pre><code>Vue.component("my-button", { pro...
0debug
Conda: Creating a virtual environment : <p>I'm trying to create a virtual environment. I've followed steps from both <a href="https://conda.io/docs/user-guide/tasks/manage-environments.html#" rel="noreferrer" title="Conda">Conda</a> and <a href="https://medium.com/@tk2bit/how-to-set-up-and-maintain-conda-virtual-enviro...
0debug
Ajax request in es6 vanilla javascript : <p>I am able to make an ajax request using jquery and es5 but I want to transition me code so that its vanilla and uses es6. How would this request change. (Note: I am querying Wikipedia's api).</p> <pre><code> var link = "https://en.wikipedia.org/w/api.php?action=query&am...
0debug
Printing the minimum value out of a list (PYTHON) : <p>new to python just trying to figure out how to print the minimum of this generated list, but its giving me the error</p> <pre><code>TypeError: 'int' object is not iterable </code></pre> <p>and this is my code,</p> <pre><code>number = [] for number in range(1,21)...
0debug
static int au_read_packet(AVFormatContext *s, AVPacket *pkt) { int ret; ret= av_get_packet(s->pb, pkt, BLOCK_SIZE * s->streams[0]->codec->channels * av_get_bits_per_sample(s->streams[0]->codec->codec_id) >> 3); if (ret < 0) ...
1threat
static void merge_context_after_encode(MpegEncContext *dst, MpegEncContext *src){ int i; MERGE(dct_count[0]); MERGE(dct_count[1]); MERGE(mv_bits); MERGE(i_tex_bits); MERGE(p_tex_bits); MERGE(i_count); MERGE(f_count); MERGE(b_count); MERGE(skip_count); MERGE(misc...
1threat
The object qualifer that are not compatible with the member functions : <p>I am trying to change a subclass values Capacity, RentRate and RentMin using operation overloading. I'm newish to c++, come from java. I want to create the objects</p> <pre><code>VanIn Van7("Large", 200, 2.0); ManVanIn ManVan8("Abc", 99999, "Me...
0debug
Organizing AWS IAM permissions: limit of 10 policies? : <p>I'm trying to polish the organization of my IAM roles in Amazon and their access to permissions.</p> <p>I have groups, with policies attached, which map to groups within my company. I have reached the 10-policy limit on some groups.</p> <p>So, users have a 10...
0debug
How to change application name in NativeScript : <p>I'm working with <strong>NativeScript</strong> from <strong>Telerik</strong> and I made an app with a debug name ("notiApp") but now I can't change the app's name in launcher and action bar.</p> <p>I already tried configuring my <code>AndroidManifest.xml</code> in <c...
0debug
Why its happening? : So, i'm tryin' to create a full width navbar using bootstrap, but theres a kind of limit in my nav [LIKE THIS][1] This is my html: <div class="row"> <div class="col-md-12 text-center"> <nav class="navbar navbar-default"> <div class="container-fluid"> ...
0debug
Merge JSON array into Object : If I have an Object like. myObj = { "name":"John", "age":30 } and an array like this. myObjArr = [ { "name":"Ford", "models":[ "Fiesta", "Focus", "Mustang" ] }, { "name":"BMW", "models":[ "320", "X3", "X5" ] }, { "n...
0debug
how to make textbox to remembers the previous input in excel vba? : >How to make the textbox to remember the previous input in excel vba? Please give me a simple code too.
0debug
(React native) How to use SafeAreaView for Android notch devices? : <p>I'm actually developing an app with react native and i'm testing with my one plus 6 and it has a notch. The SafeAreaView is a solution for the iPhone X but for Android, it seems there is no solution.</p> <p>Did someone heard about anything to solve...
0debug
quiz in python reading a text file : I am trying to ask the user to pick a quiz, read the relevant questions from a txt file, ask for user answers, validate and check they are correct then add up to scores. I am completely self taught so have picked this code up from various sites but as I have adapted it it no long...
0debug
static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t *buf, const uint8_t *end_buf) { int tag, type, count, off, value = 0; int i, j; uint32_t *pal; const uint8_t *rp, *gp, *bp; tag = tget_short(&buf, s->le); type = tget_short(&buf, s->le); count = tget_lon...
1threat
static void rbd_finish_aiocb(rbd_completion_t c, RADOSCB *rcb) { int ret; rcb->ret = rbd_aio_get_return_value(c); rbd_aio_release(c); ret = qemu_rbd_send_pipe(rcb->s, rcb); if (ret < 0) { error_report("failed writing to acb->s->fds"); g_free(rcb); } }
1threat
Class can't access its own private static constexpr method - Clang bug? : <p>This code does not compile in Clang (6,7,8,9,trunk), but compiles just fine in GCC (7.1, 8.1, 9.1):</p> <pre class="lang-cpp prettyprint-override"><code>template&lt;class T&gt; struct TypeHolder { using type = T; }; template&lt;int i&gt; cla...
0debug