problem
stringlengths
26
131k
labels
class label
2 classes
static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb) { int superblock_starts[3] = { 0, s->u_superblock_start, s->v_superblock_start }; int bit = 0; int current_superblock = 0; int current_run = 0; int num_partial_superblocks = 0; int i, j; int current_fragment; ...
1threat
static int make_ydt15_entry(int p2, int p1, int16_t *ydt) #else static int make_ydt15_entry(int p1, int p2, int16_t *ydt) #endif { int lo, hi; lo = ydt[p1]; lo += (lo * 32) + (lo * 1024); hi = ydt[p2]; hi += (hi * 32) + (hi * 1024); return (lo + (hi * (1 << 16))) * 2; }
1threat
Java - Sort an array with Extreme Minimum or maximun values : I want to get the maximum or minimum values from an Arraylist. For example I have follwing values in my Arraylist, 1.22 , 2.55 , 6.00 , 3.00 , 4.77 , 9.88 , 7.23 , 8.22 I would like to get it sorted like 9.88, 1.22 , 8.22 , 2.55 , 7.45 ... ... ......
0debug
Why Python's Collection Counter sort like this? : I was trying to sort few values in list using Python's Counter from collection module. But it gives weird result when >>> diff=["aaa","aa","a"] >>> c=Counter(diff) >>> sorted(c.items(), key = lambda x:x[1] , reverse=True) [('aa', 1), ('a', 1), ('a...
0debug
Cant add a marker in this code anyhow : I have tried to use traditional marker function with this code but the marker is not visible. How can i add marker attached to this info window.please please please help function initMap() { map = new google.maps.Map(document.getElementById('map'), { ...
0debug
How to add primary sort key to an already existing table in AWS dynamo db? : <p>I have a pre-existing dynamo db table to which i want to add a primary sort key. All the items in the table contain the key which i want to delegate as the primary sort key.</p>
0debug
void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, VP8FilterStrength *f) { int interior_limit, filter_level; if (s->segmentation.enabled) { filter_level = s->segmentation.filter_level[mb->segment]; if (!s->segmentation.absolute_vals) filter_level += s->filter.level; ...
1threat
To check which jTextfields are empty and stop saving details to Database (I DO NOTt want to disable Jbutton) : I have this code sample to see which Jtextfield is empty. I have attached a image of my application too. All I need to know is that, when a user was not entering the details in a specific jTextfield, and then ...
0debug
int avformat_queue_attached_pictures(AVFormatContext *s) { int i; for (i = 0; i < s->nb_streams; i++) if (s->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC && s->streams[i]->discard < AVDISCARD_ALL) { AVPacket copy = s->streams[i]->attached_pic; if (copy...
1threat
integrate puppeteer in gitlab with gitlab-ci.yml : <p>Im currently working on e2e test in Chrome Puppeteer. I am at the stage where it would be ideal to integrate my tests in the development process. </p> <p>What I want to accomplish is the following: my tests run automated before every deploy to production. If they s...
0debug
Combine cells into one string : How can I combine a column of text into one list: row 1: Hail Mary. row 2: Hi Bob. row 3: Hey Sue. Looking for a list with len(list)=1.
0debug
Arduino Leonardo choking after a few loop()s : So, I'm making a GPS tracker that sends the data to a server, but after 1-2 loop() cycles of working perfectly(it sends the packages), but then it chokes(stops making output to Serial and does not send anything) Why is this happening and how to fix it? gps is connected t...
0debug
how to solve aws lambda creation Error creating application: You are not authorized to perform: serverlessrepo:GetApplication : can u tell me any solution to solve this error... Error creating application: You are not authorized to perform: serverlessrepo:GetApplication. while creating lambda applicaion by IAM user acc...
0debug
create a list of length n-1 in python : I have an existing list e.g. months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"] len(months) would equal 6 in this example. If I were to create an empty list of the same length as months, I'd use: newList = [[] for i in months] which would give me: [[], [], [],...
0debug
What do I need to learn to code an app like Snapchat? : <p>I am new to programming and have been learning for the past month. I am trying to build an app that can record and upload short videos like Snaps to a database. Then the app can access these videos from the database. I am learning Java and Android Studio curren...
0debug
static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom) { MOVFragment *frag = &c->fragment; AVStream *st = NULL; MOVStreamContext *sc; MOVStts *ctts_data; uint64_t offset; int64_t dts; int data_offset = 0; unsigned entries, first_sample_flags = frag->flags; i...
1threat
python regex with multiple separators : <p>I am trying to separate all the images from the following string.</p> <p>how can I get a list of images that start with "comp1/img_" and are either split by a "," or a ";"</p> <pre><code> /*jsonp*/jsonresp({"img_set":"comp1/img_23434;comp1/img_3243r43r,comp1/img_o43nfjr...
0debug
library not found for -lRCTGeolocation : <p>Have installed react-native-firebase &amp; and i'am using my project.xcworkspace for getting build on iOS with Xcode that was fine when I installed only auth &amp; core packages. When i installed messaging package I get the error "library not found for -lRCTGeolocation" anyw...
0debug
What is the difference betwwen the older alloctaor::construct and the new one and explicit constructor? : <p>As I know <code>std::allocator&lt;T&gt;::construct</code> takes only two parameters on older version of C++; the first is a pointer to raw, un-constructed memory in which we want to construct an object of type <...
0debug
static void qemu_chr_parse_file_out(QemuOpts *opts, ChardevBackend *backend, Error **errp) { const char *path = qemu_opt_get(opts, "path"); ChardevFile *file; if (path == NULL) { error_setg(errp, "chardev: file: no filename given"); return; }...
1threat
"Named colors do not work prior to iOS 11.0" error referring to a storyboard : <p>While developing an iOS application for targets below iOS 11, I accidentally left a named color in one of my storyboards. However, the error I got only shows the name of the storyboard and not the exact view that is causing the issue:</p>...
0debug
Depend on git repository in setup.py : <p>I'm trying to make a project depend on a git dependency. However, I can't seem to get it to work. What I basically want to achieve is the following, but it doesn't work:</p> <pre><code>#!/usr/bin/env python3 from setuptools import setup setup( name='spam', version='0...
0debug
Why does the c variable always output 0? : <p>I am trying to write a program to convert fahrenheit to celsius. No matter what you input, <code>c</code> always outputs <code>0</code>.</p> <pre><code>#include &lt;stdio.h&gt; int main() { int f; float c; printf("Enter a temperature in fahrenheit: "); scanf("%d", &amp;f...
0debug
No FileSystem for scheme: s3 with pyspark : <p>I'm trying to read a txt file from S3 with Spark, but I'm getting thhis error:</p> <pre><code>No FileSystem for scheme: s3 </code></pre> <p>This is my code:</p> <pre><code>from pyspark import SparkContext, SparkConf conf = SparkConf().setAppName("first") sc = SparkConte...
0debug
static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, uint8_t *buf, int buf_size) { RTSPState *rt = s->priv_data; RTSPStream *rtsp_st; fd_set rfds; int fd, fd_max, n, i, ret, tcp_fd, timeout_cnt = 0; struct timeval tv; for (;;) { if (...
1threat
void kvm_inject_x86_mce(CPUState *cenv, int bank, uint64_t status, uint64_t mcg_status, uint64_t addr, uint64_t misc, int flag) { #ifdef KVM_CAP_MCE struct kvm_x86_mce mce = { .bank = bank, .status = status, .mcg_status = mcg_status, ...
1threat
Where can I download SignalR.Client.20.dll? : <p>I want to make multiplayer game in Unity. So I need <strong>SignalR.Client.20.dll</strong> file . Where can I download this?</p>
0debug
Getting error on ng serve: ERROR in Cannot read property 'listLazyRoutes' of undefined : <p>When running <code>ng serve</code> in command-line for an angular-cli generated project, I am getting error below: </p> <pre><code> ERROR in Cannot read property 'listLazyRoutes' of undefined </code></pre> <p>Any thoughts on h...
0debug
Right order of doing feature selection, PCA and normalization? : <p>I know that feature selection helps me remove features that may have low contribution. I know that PCA helps reduce possibly correlated features into one, reducing the dimensions. I know that normalization transforms features to the same scale.</p> <p...
0debug
What is the base branch when a new one is created? : <p>I need to confirm/correct my assumptions when creating branches. If I'm in master branch, after doing:</p> <pre><code>git checkout -b some_branch </code></pre> <p>it means I have started a new branch from master.</p> <p>On the other hand, if I checkout another ...
0debug
Javascript Mediasource play video and audio? : how i can play video and audio using Media Source in Javascript i have all the code and i can play only one of them , Video Or Audio but i can't play both of them . i just need to know how does it work so i can implement it . some code let mse = function() { ...
0debug
int main(void){ int i,k; AVTreeNode *root= NULL, *node=NULL; for(i=0; i<10000; i++){ int j= (random()%86294); if(check(root) > 999){ av_log(NULL, AV_LOG_ERROR, "FATAL error %d\n", i); print(root, 0); return -1; } av_log(NULL, AV_LOG...
1threat
Pyhton/Django: I need some code to run between requests, which concept to look for? : I am trying Django for my project, which contains server-side code, which should work between requests. It should be initialized at server start, keep state, and polled sometimes between HTTP requests. I can write own server with ...
0debug
Not Found - PUT https://npm.pkg.github.com/package-name : <p>I'm trying to upload a package on GPR (Github Package registry). I log in successfully:</p> <pre><code>npm login --registry=https://npm.pkg.github.com </code></pre> <p>and then run these command:</p> <pre><code>npm set registry https://npm.pkg.github.com/ ...
0debug
Visual Studio code - cannot connect to runtime process timeout after 10000 ms : <p>I was trying to launch the program from the debug console in VS Code but got the error on <code>cannot connect to runtime process timeout after 10000 ms</code></p> <p>launch.json</p> <pre><code> "version": "0.2.0", "configuration...
0debug
How to find the middle of a element and use the left float : somebody can help me? I dont know how i can find the middle of a div and use the left float to set our Arrow in the middle of the div. Screen: [enter image description here][1] --------------------------------------------- At the moment i "hard...
0debug
vbs script keeps turning errors such as declaration expected on line 10 and others >_< : if someone could lend a hand with this i am quite new to vbs and well i seem to be having some problems on line 10 there are probably other errors as well ive run debug to try and isolate the problems, any help is greatly apprecia...
0debug
What does a number of cores of "~2, bursted" mean? : <p>According to <a href="https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments" rel="noreferrer">the docs</a> the sudo-enabled environment offers "~2" cores, "bursted". I don't understand what that is supposed to mean.</p> <p>I think there's a ...
0debug
static int xen_pt_word_reg_read(XenPCIPassthroughState *s, XenPTReg *cfg_entry, uint16_t *value, uint16_t valid_mask) { XenPTRegInfo *reg = cfg_entry->reg; uint16_t valid_emu_mask = 0; valid_emu_mask = reg->emu_mask & valid_mask; *value = XEN_PT_MERGE_VALUE(...
1threat
int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) { int ret; int user_packet = !!avpkt->d...
1threat
File Modification : I want to append some values in my property file This is my property file ## Portal.Group=Security Role:Extranet Role Portal.Advisor=MAS:MAS,SRM:SRM,SIV:SIV,ADN:ADN,IFA:IFA,ACC:ACC,BSR:BSR,TRD:TRD,VOC:VOC,VFC:VFC,VFA:VFA,BDD:BDD,EFA:EFA,EAC:EAC,DDM:DDM,PFM:PFM,PDA:PDA,PAM:PAM Por...
0debug
def multiple_to_single(L): x = int("".join(map(str, L))) return x
0debug
How to ask in Javascript? : <p>I want to write a line of code which asks a question and the user has to enter a number. The number is then stored as a variable and used throughout the rest of the script. Such as:</p> <p>fit1 = "What is your fitness level?" level = <em>the number the user had entered</em></p> <p>somet...
0debug
Absence of pointers in Java : <p>If there is no concept of pointers is Java, does this mean there is no way to access memory of a computer through Java? Or if it is possible, how does Java compensate for absence of pointers?</p>
0debug
static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; if (vf->priv->in.fmt == vf->priv->out.fmt) { dmpi = mpi; } else { int out_off_left, out_off_right; int in_off_left = vf->priv->in.row_left * mpi->stride[0] + ...
1threat
Generate numbers by algorithm (interesting) : Maybe anyone know how to generate numbers in this way. I have function, for example, `generate (current, count, limit)` current – central number in array count – max numbers count limit - for example, 2 means two numbers before and after current number. Thi...
0debug
static void ffm_set_write_index(AVFormatContext *s, int64_t pos, int64_t file_size) { av_opt_set_int(s, "server_attached", 1, AV_OPT_SEARCH_CHILDREN); av_opt_set_int(s, "write_index", pos, AV_OPT_SEARCH_CHILDREN); av_opt_set_int(s, "file_size", file_size, AV_OPT_SEARCH_C...
1threat
Java if statement (beginner request) : <p>If someone can help me with this. I'm complete -n o o b, only started to learn and got stuck.</p> <p>If I'm asking this - </p> <pre><code>Scanner buck = new Scanner(System.in); String fname; System.out.println("Please Enter your Name "); fname = buck.next(); </code></pre> <p...
0debug
Why cannot we have access modifiers and static keyword for creating an object in C#? : for example :- class Something { ... ... ... } class Program { public/private/internal/protected/protected internal static Something s = new Something(); //compilation error why? }
0debug
static int asf_write_header(AVFormatContext *s) { ASFContext *asf = s->priv_data; asf->packet_size = PACKET_SIZE; asf->nb_packets = 0; asf->last_indexed_pts = 0; asf->index_ptr = (ASFIndex*)av_malloc( sizeof(ASFIndex) * ASF_INDEX_BLOCK ); asf->nb_index_memory_alloc = ASF_INDEX_BLOCK; ...
1threat
static inline void RENAME(nv21ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused) { RENAME(nvXXtoUV)(dstV, dstU, src1, width); }
1threat
A toast message is displaying on versions lower than Android M? : I have an Android app in production. Everything is working correctly but on Versions lower than Android M, in each activity i'm getting a toast message "not greater than M"? Is there anyone who can help me fixing this? I'm attaching a screenshot![![enter...
0debug
Very poor performance of async task run on threadpool in .Net native : <p>I've observed a strange difference in managed vs .Net native code. I've a heavy job redirected to threadpool. When running the app in managed code, everything works smooth but as soon as I switch on native compilation - the task run few times slo...
0debug
Swift - Remove Optional() from string : I am trying to assign a string to a label like so: self.MsgBlock4.text = "\(wsQAshowTagArray![0]["MsgBlock4"]!)" but it display the label like so `Optional(James)` how do I remove the Optional() ? The Dictionary inside the array comes from here: self.wsQAshowT...
0debug
Filtering render functions from CodeClimate method-lines check : <p>We're adding CodeClimate to a project and running into a lot of <code>method-lines</code> errors for the <code>render</code> functions in our React components, e.g.</p> <blockquote> <p>Function <code>render</code> has 78 lines of code (exceeds 40 al...
0debug
bdrv_rw_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos, bool is_read) { if (qemu_in_coroutine()) { return bdrv_co_rw_vmstate(bs, qiov, pos, is_read); } else { BdrvVmstateCo data = { .bs = bs, .qiov = qiov, ...
1threat
ReactJS - prevState in the new useState React hook? : <p>I really like the new <a href="https://reactjs.org/docs/hooks-state.html" rel="noreferrer">React hooks</a> and I'm using them frequently for a project I'm working on. I'm coming across a situation where I want to use the <em>prevState</em> in the <code>useState</...
0debug
Spring security - creating 403 Access denied custom response : <p>I have a spring boot rest api with jwt authentication. The problem is i cannot get rid of default 403 Access Denied rest response which looks like this: </p> <pre><code>{ "timestamp": 1516206966541, "status": 403, "error": "Forbidden", "...
0debug
static void palmte_init(ram_addr_t ram_size, int vga_ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { struct omap_mpu_state_s *cpu; int flash_size = 0x00800000; ...
1threat
ADD failed : No such file/Directory while building docker image : <p>I have below Dockerfile:</p> <pre><code>FROM python:3 RUN mkdir -p /test/code/ RUN mkdir -p /test/logs/ RUN mkdir -p /test/configs/ ADD test.py /test/code/ ADD test_output.txt /test/code/ ADD test_input.txt /test/configs/ ADD logfile.log /test/logs...
0debug
just started learning selenium.while i run my first selenium code i got this error : at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296) at org.openqa.selenium.firefox.FirefoxDriver.createCommandExecutor(FirefoxDriver.java:277) at org.openqa.selenium.firefox.FirefoxDriver.<init...
0debug
Getting n number of words on either side of a particular word in a sentence : <p>I need to extract context words on either side of a particular word in a string. The particular word in this case pertains to a proper noun in the string. E.g.</p> <p>I love the cakes Martha bakes as they are so delicious!</p> <p>In this...
0debug
static void dummy_signal(int sig) { }
1threat
efficiently generate 2^n combinations (/w java) : I'm trying to generate all 2^n as efficiently as possible (and save them to an array), i.e 0001 0010 0011 etc. where n could be up to 15. public static void main(String args[]) { final long startTime = System.nanoTime(); fin...
0debug
query = 'SELECT * FROM customers WHERE email = ' + email_input
1threat
How to write PHP code that insert records in this table without checking the uniqueness of user_id by comparing all user_id present in the table? : <p>I have a table with primary key as user_id. This user _id is a random alphanumeric string of length 6. How to write PHP code that insert records in this table without ch...
0debug
static int chunk_mux_init(AVFormatContext *s) { WebMChunkContext *wc = s->priv_data; AVFormatContext *oc; int ret; ret = avformat_alloc_output_context2(&wc->avf, wc->oformat, NULL, NULL); if (ret < 0) return ret; oc = wc->avf; oc->interrupt_callback = s->interrupt_callba...
1threat
void ff_decode_dxt3(const uint8_t *s, uint8_t *dst, const unsigned int w, const unsigned int h, const unsigned int stride) { unsigned int bx, by, qstride = stride/4; uint32_t *d = (uint32_t *) dst; for (by=0; by < h/4; by++, d += stride-w) for (bx=0; b...
1threat
Ajax function , or ) expected : <p>So I'm following a tutorial trying to implement an Ajax search form on my site, my Ajax.js looks as follows:</p> <pre><code>$(funcrion () { $('#search').keyup(function () { $.ajax({ type: "POST", url: "/cooks/search/", data: { 'search_text': $(...
0debug
void helper_idivq_EAX_T0(void) { uint64_t r0, r1; if (T0 == 0) { raise_exception(EXCP00_DIVZ); } r0 = EAX; r1 = EDX; idiv64(&r0, &r1, T0); EAX = r0; EDX = r1; }
1threat
static void format_string(StringOutputVisitor *sov, Range *r, bool next, bool human) { if (r->end - r->begin > 1) { if (human) { g_string_append_printf(sov->string, "0x%" PRIx64 "-0x%" PRIx64, r->begin, r->end - 1); } ...
1threat
Could not find a version that satisfies the requirement django (from versions: ) No matching distribution found for django : <p>I was able to install django once in a virtual enviroment. Now whenever i try to install it with <pre>pip install django==2.07</pre></p> <p>it returns:</p> <pre> Cache entry deserializat...
0debug
static inline uint32_t search_chunk(BDRVDMGState* s,int sector_num) { uint32_t chunk1=0,chunk2=s->n_chunks,chunk3; while(chunk1!=chunk2) { chunk3 = (chunk1+chunk2)/2; if(s->sectors[chunk3]>sector_num) chunk2 = chunk3; else if(s->sectors[chunk3]+s->sectorcounts[chunk3]>sector_num) retu...
1threat
Working with Long Click Listener with recycler-android : <p>i am working on a notapad like android app project. i which i have implemented recycler. My project contains NotedAdaper class that extends <code>RecyclerView.Adapter&lt;NotesAdapter.ViewHolder&gt;</code><br> in that class using the below code i used click lis...
0debug
e1000e_write_ext_rx_descr(E1000ECore *core, uint8_t *desc, struct NetRxPkt *pkt, const E1000E_RSSInfo *rss_info, uint16_t length) { union e1000_rx_desc_extended *d = (union e1000_rx_desc_extended *) desc; memset(d, 0, sizeof(*...
1threat
How to check if integer array is spiral sorted? : <p>Spiral Sort Involves: a[0] &lt;= a[n-1] &lt;= a[1] &lt;= a[n-2] &lt;= a[2].... How would i check if a given array is spiral sorted or not?</p> <p>I have tried this the brute force way.</p>
0debug
static void tcg_target_init(TCGContext *s) { tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xffffffff); tcg_regset_set32(tcg_target_call_clobber_regs, 0, (1 << TCG_REG_R0) | #ifdef _CALL_DARWIN (1 << TCG_REG_R2) | #endif (1 <<...
1threat
Javascript code displaying error on for loop : What's the problem in this javascript code,there is a constant red line under the for loop, The code does work in a Java class but not in javascript: <%! EntityManagerFactory emf = javax.persistence.Persistence.createEntityManagerFactory("Dima_TestPU"...
0debug
uint64_t helper_fdiv (uint64_t arg1, uint64_t arg2) { CPU_DoubleU farg1, farg2; farg1.ll = arg1; farg2.ll = arg2; #if USE_PRECISE_EMULATION if (unlikely(float64_is_signaling_nan(farg1.d) || float64_is_signaling_nan(farg2.d))) { farg1.ll = fload_invalid_op_exc...
1threat
Kotlin sequence concatenation : <pre><code>val seq1 = sequenceOf(1, 2, 3) val seq2 = sequenceOf(5, 6, 7) sequenceOf(seq1, seq2).flatten().forEach { ... } </code></pre> <p>That's how I'm doing sequence concatenation but I'm worrying that it's actually copying elements, whereas all I need is an iterator that uses elemen...
0debug
static int alac_set_info(ALACContext *alac) { const unsigned char *ptr = alac->avctx->extradata; ptr += 4; ptr += 4; ptr += 4; if(AV_RB32(ptr) >= UINT_MAX/4){ av_log(alac->avctx, AV_LOG_ERROR, "setinfo_max_samples_per_frame too large\n"); return -1; } ...
1threat
Print out every n-th item of array list depeding on the number of items : I have an array list : ArrayList<String> melody = new ArrayList<>(); And it contains strings like EEAABB, AAGDFE ... The size of list may varry Now depending of the size i would like to print out every N-th string, and the last f...
0debug
static void test_visitor_in_null(TestInputVisitorData *data, const void *unused) { Visitor *v; Error *err = NULL; char *tmp; v = visitor_input_test_init(data, "{ 'a': null, 'b': '', 'c': null }"); visit_start_struct(v, NULL, NULL, 0, &e...
1threat
How can I route 403 errors? : I have this in my startup: app.UseMvc(routes => { routes.MapRoute( "404-PageNotFound", "{*url}", new { controller = "Home", action = "Error" } );...
0debug
How to convert 1000000 to 1M and 1000 to 1K on javascript : <p>I want to convert 1000000 to 1M also for 1000 To 1K</p> <p>Any ideas?</p> <p>I need it for my special project</p>
0debug
How to use import with absolute paths with Expo and React Native? : <p>I'm trying to use absolute import paths instead of relative paths with <a href="https://github.com/expo/expo-sdk" rel="noreferrer">Expo</a> and React Native.</p> <p>I looked on the expo docs and couldn't find an answer... Searching for the subject ...
0debug
Replace space with %20 in r : <p>I have following string: </p> <pre><code>url &lt;- https://www.google.mu/webhp?sourceid=chrome-instant&amp;ion=1&amp;espv=2&amp;ie=UTF-8#q=green carot </code></pre> <p>I want to replace the space between green and carot with %20</p> <pre><code>&gt;url https://www.google.mu/webhp?sour...
0debug
react evironment variables .env return undefined : <p>I am building a react app and i need to fetch data from my api, now i want to store the api url as an environment variable. I have my .env file, i have dotenv installed, here is my code process.env.API_URL is returning undefined.</p> <pre><code>import React, { Comp...
0debug
did you specify the right host or port? error on Kubernetes : <p>I have followed the helloword tutorial on <a href="http://kubernetes.io/docs/hellonode/" rel="noreferrer">http://kubernetes.io/docs/hellonode/</a>. </p> <p>When I run:</p> <pre><code>kubectl run hello-node --image=gcr.io/PROJECT_ID/hello-node:v1 --port=...
0debug
static void scsi_read_data(SCSIDevice *d, uint32_t tag) { SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, d); SCSIDiskReq *r; r = scsi_find_request(s, tag); if (!r) { BADF("Bad read tag 0x%x\n", tag); scsi_command_complete(r, CHECK_CONDITION, HARDWARE_ERROR); ...
1threat
PHP session notice:undefined index : I am trying to pass a value using session from one page to another but it says > Notice: Undefined index: user_id in path\file.php on line 61 The file where i am creating session is as follows if(!isset($_SESSION)) { session_start(); ...
0debug
Using a C# 7 tuple in an ASP.NET Core Web API Controller : <p>Do you know why this works:</p> <pre><code> public struct UserNameAndPassword { public string username; public string password; } [HttpPost] public IActionResult Create([FromBody]UserNameAndPassword usernameAndPassword) ...
0debug
static int _do_bit_allocation(AC3DecodeContext *ctx, int chnl) { ac3_audio_block *ab = &ctx->audio_block; int16_t sdecay, fdecay, sgain, dbknee, floor; int16_t lowcomp, fgain, snroffset, fastleak, slowleak; int16_t psd[256], bndpsd[50], excite[50], mask[50], delta; uint8_t start, end, bin, i, ...
1threat
Limit Kafka batches size when using Spark Streaming : <p>Is it possible to limit the size of the batches returned by the Kafka consumer for Spark Streaming?</p> <p>I am asking because the first batch I get has hundred of millions of records and it takes ages to process and checkpoint them.</p>
0debug
get the % of my dataframe with NA : <p>here is my dataframe</p> <p>I would like to fid the % of each row</p> <pre><code> a b c 1 NA 10 10 2 NA 11 13 3 NA 20 12 4 NA 20 20 5 NA 3 15 6 10 2 8 </code></pre> <p>first I sum the first row 1...
0debug
jQuery removeClass() not working but hasClass() works : I am using some CSS classes and jQuery to make a custom selectbox. But I keep having problems with the removeClass() function. I know there are alternatives to this problem. But could somebody explain me WHY it is not working? $(".filterselect").on("click",f...
0debug
PHP Debug in Visual Studio Code breaks on every exception : <p>I am just starting to use the PHP Debug extension in Visual Studio Code (Ubuntu 14.04). It mostly works fine for me, but I have a problem that every time an exception is thrown, the debugger automatically breaks. We have lots of exceptions which are inter...
0debug
static void gen_tlbli_74xx(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); #else if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } gen_helper_74xx_tlbi(cpu_env, cpu_gpr[rB(ctx->opcode)]); #end...
1threat
static av_cold int twolame_encode_init(AVCodecContext *avctx) { TWOLAMEContext *s = avctx->priv_data; int ret; avctx->frame_size = TWOLAME_SAMPLES_PER_FRAME; avctx->delay = 512 - 32 + 1; s->glopts = twolame_init(); if (!s->glopts) return AVERROR(ENOMEM); twolame_s...
1threat
Set default image if img src= null : <pre><code> &lt;img src="&lt;%# ReturnEncodedBase64UTF8(Eval("Data")) %&gt;" style="width:100%; height:30%;"/&gt; </code></pre> <p>Hi, I'm new to C# and ASP.NET, I would like to know how do I set the img src to a default img for example ~\images\myimage.png if the img src above re...
0debug