problem
stringlengths
26
131k
labels
class label
2 classes
static inline uint32_t efsctsiz(uint32_t val) { CPU_FloatU u; u.l = val; if (unlikely(float32_is_nan(u.f))) return 0; return float32_to_int32_round_to_zero(u.f, &env->vec_status); }
1threat
def subset(ar, n): res = 0 ar.sort() for i in range(0, n) : count = 1 for i in range(n - 1): if ar[i] == ar[i + 1]: count+=1 else: break res = max(res, count) return res
0debug
How to separate one file or folder with all history from one git repo to another? : <p>Let me explain. For some time I developed some code. Now I want to separate a part and make it open-source. My main problem is to <strong>save all commit history, which concerns that files</strong>.</p>
0debug
When upgrading Angular 5 to 6, I get incompatible peer dependency (using ng update @angular/core) : <p>I am trying to update my Angular app from v5 to v6 following <a href="https://update.angular.io/" rel="noreferrer">this guide</a>.</p> <p>I have ran all these commands successfully:</p> <pre><code>npm install -g @an...
0debug
How to Play Video in Unity 2D? : <p>i need to play Videos in my 2d game. many Tutorials in Youtube how to play Videos but its 3d. so share with me how to play Video File in unity </p> <ul> <li>Video Format</li> </ul>
0debug
static void encode_mb(MpegEncContext *s, int motion_x, int motion_y) { const int mb_x= s->mb_x; const int mb_y= s->mb_y; int i; #if 0 if (s->interlaced_dct) { dct_linesize = s->linesize * 2; dct_offset = s->linesize; } else { dct_linesize = s->li...
1threat
Bootstrap column and row : <p>I'm using bootstrap columns which allows a maximum of 12. I need two different divs in one row, one having 12 cols and the other 4. I need the one of 4 cols to appear on the one of 12. Means both of divs will be in the same row. Please how do I achieve this. Thanks.</p>
0debug
Disappearing Picturebox images : <p>I was successful in loading an image from a file into a picturebox in visual basic. Or so i thought. I had a msgbox in the code and the picture showed up in the picturebox. take the msgbox out and no picture. Any Ideas? Thanks</p> <pre><code> Private Sub DrawImageinSquarePanel...
0debug
static int rgbToRgbWrapper(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[]) { const enum PixelFormat srcFormat = c->srcFormat; const enum PixelFormat dstFormat = c->dstFormat; cons...
1threat
Error Invoking 'Customize'. Details: Object reference not set to an instand on an object : I'm using visual studio 2017 I have a popupmenu on my designer view where I have added a list of popup menu items. When I try to customize the menu items by clicking on popupmenu and then the customize button. Instead of displayi...
0debug
static void gen_msa(CPUMIPSState *env, DisasContext *ctx) { uint32_t opcode = ctx->opcode; check_insn(ctx, ASE_MSA); check_msa_access(ctx); switch (MASK_MSA_MINOR(opcode)) { case OPC_MSA_I8_00: case OPC_MSA_I8_01: case OPC_MSA_I8_02: gen_msa_i8(env, ctx); break; ...
1threat
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
0debug
Matplotlib: TypeError: 'AxesSubplot' object is not subscriptable : <p>I am trying to make a simple box plot of a variable 'x' contained in two dataframes, df1 and df2. To do this I am using the following code:</p> <pre><code>fig, axs = plt.subplots() axs[0, 0].boxplot([df1['x'], df2['x']]) plt.show(); </code></pre> <...
0debug
Need someone to explain this code : <p>I have been trying to understand this:</p> <pre><code>var arrayOfLabels = [ "Hello", "Hey", "Hi", "Howdy" ] @IBOutlet weak var labelHere: UILabel! var currentElementIndex = 0 @IBAction func clickForNextElement(_ sender: UIButton) { currentElementIndex += 1 ...
0debug
document.write('<script src="evil.js"></script>');
1threat
How chnage image size before uploaded on server : <p>I want to change image size before uploaded on server/mysql database, As its for member, so member can uploaded big images in size and i want to prevent and assign a new image size of their images.</p> <p>I need it in PHP.</p> <p>Thanks</p>
0debug
check ALL arguments in c# that they can be numeric : <p>I am writing a small console application in C# and it requires two numeric parameters/arguments to be passed to it. I am checking for no params, more than 2 params, if two params. I am also converting those params if 2 returned to numeric for calculations I'm do...
0debug
Why does clang still need libgcc.a to compile my code? : <pre><code>int main(int argc, char **argv) { return 0; } </code></pre> <p>I cross compile (host= linux x86_64, target= linux aarch64)</p> <p><code>/path/to/clang --target=aarch64-linux-gnu -v main.cpp -o main -fuse-ld=lld -L./libs -lc -lc_nonshared -Xlinke...
0debug
static void init_event_facility_class(ObjectClass *klass, void *data) { SysBusDeviceClass *sbdc = SYS_BUS_DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(sbdc); SCLPEventFacilityClass *k = EVENT_FACILITY_CLASS(dc); dc->reset = reset_event_facility; dc->vmsd = &vmstate_event_facility; ...
1threat
How to add tinted mask with text over images on hover : <p><img src="https://i.ibb.co/ck1BZYk/Screen-Shot-2019-02-16-at-6-43-04-PM.png" alt="my image"></p> <p>Looking to achieve the effect in the image above. I have a bunch of svg icons. When the user hovers over each image, the image tints and white text is reveale...
0debug
Having a Strange Issue in C++ : <p>I'm very, very new to coding. Thought I'd start with C++, which I've been writing for about 3 days. In order to teach myself, I've been using a mix of Sololearn, Hackerrank and writing a Text-Based Adventure Game. </p> <p>Herein lies my issue.</p> <p>I'm in the process of writing ...
0debug
static int alloc_refcount_block(BlockDriverState *bs, int64_t cluster_index, void **refcount_block) { BDRVQcowState *s = bs->opaque; unsigned int refcount_table_index; int ret; BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_ALLOC); refcount_table_index = clus...
1threat
How to get pipenv running in docker? : <p>Im installing pipenv in my docker:</p> <pre><code>RUN pip install pipenv RUN cd /my/app/path/ &amp;&amp; pipenv install RUN cd /my/app/path/ &amp;&amp; pipenv shell </code></pre> <p>Im getting the error:</p> <pre><code>Traceback (most recent call last): File "/usr/local/bi...
0debug
Kafka10.1 heartbeat.interval.ms, session.timeout.ms and max.poll.interval.ms : <p>I am using kafka 0.10.1.1 and confused with the following 3 properties.</p> <pre><code>heartbeat.interval.ms session.timeout.ms max.poll.interval.ms </code></pre> <p><strong>heartbeat.interval.ms</strong> - This was added in 0.10.1 and ...
0debug
how to create a multiple section tableview with horizontal scrolling like as below image? : [I want to implement same as this image][1] [1]: https://i.stack.imgur.com/Wwqas.png i am trying to create a similar collection view as above image in tableview but i have no clue how to do it. My data is coming fr...
0debug
Is there a way in excel to evaluate the content of another cell in the same spreadsheet without any VBA or any other addon : I have a requirement where a cell , say A1 contains a formula , say SUM(B1:b5). In A2 I want to execute content of A!. But when I put =(=A1) in A2 excel gives me formula error. Is there any wa...
0debug
document.write('<script src="evil.js"></script>');
1threat
static void e1000_pre_save(void *opaque) { E1000State *s = opaque; NetClientState *nc = qemu_get_queue(s->nic); if (s->mit_timer_on) { e1000_mit_timer(s); } if (nc->link_down && s->compat_flags & E1000_FLAG_AUTONEG && s->phy_reg[PHY_CTRL] & MI...
1threat
static int bfi_read_header(AVFormatContext * s) { BFIContext *bfi = s->priv_data; AVIOContext *pb = s->pb; AVStream *vstream; AVStream *astream; int fps, chunk_header; vstream = avformat_new_stream(s, NULL); if (!vstream) return AVERROR(ENOMEM); astream ...
1threat
how to remove a cells from coloumn : it's quietly simple when I run this simple syntax in my text editor : [Syntax][1] then the output : [output][2] the problem is how I can remove the column so till I get this : [csv create without python][3] [1]: https://i.stack.imgur.com/TmWZ5.png [2]: https://i.sta...
0debug
static int kvm_put_fpu(X86CPU *cpu) { CPUX86State *env = &cpu->env; struct kvm_fpu fpu; int i; memset(&fpu, 0, sizeof fpu); fpu.fsw = env->fpus & ~(7 << 11); fpu.fsw |= (env->fpstt & 7) << 11; fpu.fcw = env->fpuc; fpu.last_opcode = env->fpop; fpu.last_ip = env->fpip; ...
1threat
Axios/Vue - Prevent axios.all() to keep executing : <p>In my application wile authenticating the user I call the fetchData function. If the user token become invalid, the application will run <code>axios.all()</code> and my interceptor will return a lot of errors.</p> <p>How to prevent <code>axios.all()</code> of keep...
0debug
DynamoDB update Item multi action : <p>I am trying to update an item in DynamoDB table:</p> <pre><code>var params = { TableName: 'User', Key: { id: 'b6cc8100-74e4-11e6-8e52-bbcb90cbdd26', }, UpdateExpression: 'ADD past_visits :inc, past_chats :inc', ExpressionAttributeValues: { ...
0debug
Why must must ngrx / redux effects return actions? Is using a noop action like elm considered bad practice? : <p>I'm using a redux-style state management design with Angular and ngrx/store and ngrx/effects. Whenever I don't return an action from an effect, I get an error: </p> <pre><code>Cannot read property 'type' of...
0debug
How to uninstall LLVM? : <p>I installed LLVM from source (using CMake and <code>make install</code>) but I am unable to uninstall it because there is no <code>make uninstall</code> avalaible.</p> <p>This is LLVM version 3.5.2.</p> <p>I use ArchLinux.</p> <p>How can I uninstall LLVM in an automated way?</p>
0debug
CircleCI: Error unmarshaling return header; nested exception is: : <p>We keep getting the following exception on CircleCI while building out project. Everything runs well when running the job from the CircleCI CLI. Has anyone found a fix / resolution for this?</p> <pre><code>Compilation with Kotlin compile daemon was ...
0debug
sklearn stratified sampling based on a column : <p>I have a fairly large CSV file containing amazon review data which I read into a pandas data frame. I want to split the data 80-20(train-test) but while doing so I want to ensure that the split data is proportionally representing the values of one column (Categories), ...
0debug
Beginner JavaScript OOP vs Functional : <p>I'm just starting to research different programming styles (OOP, functional, procedural).</p> <p>I'm learning JavaScript and starting into underscore.js and came along <a href="http://underscorejs.org/#oop" rel="noreferrer">this</a> small section in the docs. The docs say tha...
0debug
def hamming_Distance(n1,n2) : x = n1 ^ n2 setBits = 0 while (x > 0) : setBits += x & 1 x >>= 1 return setBits
0debug
def max_product_tuple(list1): result_max = max([abs(x * y) for x, y in list1] ) return result_max
0debug
I create search bar in java.But it has some error how i fixed it. Kindly help me : try { con = DriverManager.getConnection(url, username, password); String qry = "SELECT * FOME users WHERE id=?"; pst = con.prepareStatement(qry); pst.setString(1, txtSearc...
0debug
static void rv34_output_i16x16(RV34DecContext *r, int8_t *intra_types, int cbp) { LOCAL_ALIGNED_16(DCTELEM, block16, [16]); MpegEncContext *s = &r->s; GetBitContext *gb = &s->gb; int q_dc = rv34_qscale_tab[ r->luma_dc_quant_i[s->qscale] ], q_ac = rv34_qscale_t...
1threat
What is the Parigot Mendler encoding? : <p>The following encoding of Nats is used in some Cedille sources:</p> <pre><code>cNat : ★ cNat = ∀ X : ★ . X ➔ (∀ R : ★ . (R ➔ X) ➔ R ➔ X) ➔ X cZ : cNat cZ = Λ X . λ z . λ s . z cS : ∀ A : ★ . (A ➔ cNat) ➔ A ➔ cNat cS = Λ A . λ e . λ d . Λ X . λ z . λ s . s · A (λ a . e a · X...
0debug
static int connect_to_ssh(BDRVSSHState *s, QDict *options, int ssh_flags, int creat_mode, Error **errp) { int r, ret; const char *host, *user, *path, *host_key_check; int port; if (!qdict_haskey(options, "host")) { ret = -EINVAL; error_setg(errp, "No h...
1threat
Alpine 3.3, Python 2.7.11, urllib2 causing SSL: CERTIFICATE_VERIFY_FAILED : <p>I have this small Dockerfile</p> <pre><code>FROM alpine:3.3 RUN apk --update add python CMD ["python", "-c", "import urllib2; response = urllib2.urlopen('https://www.python.org')"] </code></pre> <p>Building it with <code>docker build -t al...
0debug
What is the concern about bad request(400) or forbidden(403)? : <p>I am implementing an endpoint which offer some secret data and I want to make a simple verify mechanism. Which status should I response when user does not have the correct crediential?</p> <p>400? 403? Or something else?</p> <p>thanks.</p>
0debug
Flutter - Vertical Divider : <p>In flutter, is there an option to draw a vertical line between components as in the image. </p> <p><a href="https://i.stack.imgur.com/rzquW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rzquW.png" alt="enter image description here"></a></p>
0debug
Javascript reduce a number by a percentage within a class : <p>I have a third-party estimation tool that is consistently providing results 30% higher than it should, and getting the company to update the tool isn't an option. So, how can I use Javascript/jQuery DOM to adjust the numbers being rendered?</p> <pre><code>...
0debug
Returning multiple elements in JSX : <p>I'm trying to return two links if the user is not logged in. Something like this:</p> <pre><code>&lt;Nav&gt; {if(this.state.user) { &lt;NavItem onClick={this.logout}&gt;Log out&lt;/NavItem&gt; } else { &lt;NavItem onClick={this.login}&gt;Log in&lt;/NavIte...
0debug
Change gravity of image drawable in textview : <p>I've added image Drawable start in a TextView . Problem is i cant control the gravity of that Drawable in TextView </p> <p>What i need to achieve <a href="https://i.stack.imgur.com/e1B7N.png" rel="noreferrer"><img src="https://i.stack.imgur.com/e1B7N.png" alt="What i ...
0debug
insert into column data into new table : I have one table that a two column and want to insert this two column data in another table means e.g. Table 1 Column1 Column2 A B table1 column1 and column2 value insert into second table as row wise means result should be below Table2 column3 ...
0debug
tasmerrors! urgent! font : After compiling by Tasm 5 and 3 (I tried with both version of Tasm) it show me a few Error! that I dont know why! please help me thanks a lot **==Error messages==** C:\TASM>tasm fonts.txt Turbo Assembler Uersion 3.0(also: TURBO ASSEMBLER 5.0) Copyright © 1988, 1991 Borland Internatio...
0debug
Continue loop on array after it's over : <p>I have an array with length of 26, each element a letter of the alphabet. I also have an N which can be from -10 to 10. The N takes the letter and changes it this way. if my letter is 'a' and N = 2 my 'a' will become 'c', if my letter is 'c' and N = -1 my 'c' will become 'b'...
0debug
Why seems there is no JavaScript code until I scroll? : I just started using javascript, and I do not understand why my javascript code doesn't works until I start to scroll a little bit(so I see my logo and my menu page like there is no Javascript code). I don't understand also why it works only at the end of the body...
0debug
Portuguese Vehicle plate verification : I want to validate if a plate of a portuguese car is valid. Portuguese Plate is XX-XX-XX alpha numeric. It's Alpha numeric but you can´t have a number and a Char on the same position Example : A5-99-AB -> It's wrong / 55-99-AB-> it's right
0debug
How can i speed up my Android App testing : if have an app release in the playstore and whenever i am working on updates, my testcycles take way too long. The problem is, if i want to copy my own built apk to my phone, it recognizes it as may apk from the playstore and asks if i want to update it. If i try to update, ...
0debug
Does Firebase still support Mac OS X - July 2016 : <p>I have an iOS App that uses the Firebase Realtime Database that I would like to create for Mac OS X. Does Firebase still support Mac OS X in the latest update as the Firebase console only shows the option to Add Firebase to an iOS, Android or web app.</p> <p>If so,...
0debug
static inline TCGv gen_ld16u(TCGv addr, int index) { TCGv tmp = new_tmp(); tcg_gen_qemu_ld16u(tmp, addr, index); return tmp; }
1threat
Sub folder are not copying : This is the [function][1] that i am using to copy folders content into antoher folder but its not copying the sub folder not its internal data: private static void DirectoryCopy( string sourceDirName, string destDirName, bool copySubDirs) { DirectoryInfo dir = new DirectoryInf...
0debug
i want to create a table in javascript in which i have a for loop that generates terms in a sequence : I have to generate a sequence with a difference of 9. starting from 7. sequence should have 20 terms. I have tested my for loop and its working fine. Question is, how do I embedd this for loop in a table in javascript...
0debug
Which are the best methods to reduce the number of variables in R? : <p>Which are the best methods to reduce the number of variables? What are the R functions to perform the same?</p>
0debug
c# double rounding for xx.5 : Is it a good idea to write an extension method for my application , and specify precision or is there any other good idea or other way to achieve **expected** results? Due to the behavior of Convert.ToInt32 to truncate , I am doing something like **below** to achieve expected results ...
0debug
CSS Pointer Events – Accept Drag, Reject Click : <p><strong>tldr; I need an element to register drag and drop pointer events, but pass click and other pointer events to elements behind it.</strong></p> <p>I am building a drag and drop photo upload feature in react using <a href="https://react-dropzone.netlify.com/" re...
0debug
Remove strings from a list that starts with '0' : My code ---------- l=['99','08','096'] for i in l: if i.startswith('0'): i.replace('0','') print(l) Output --------- l=['99','08','096']
0debug
How do I simplify this Python coding? : **I want to simplify the last bit of the code** UserSen = input("Enter a sentence of your choice, ") position = {} # word -> position words = UserSen.split() for word in words: if word not in position: # new word` position[word] = len(position) + 1...
0debug
firebase deploy --only hosting gives Error: HTTP Error: 410, Unknown Error : <p>this is my log : </p> <pre><code> [info] === Deploying to 'test-123'... [info] [info] i deploying hosting [info] i hosting: preparing public directory for upload... [debug] [2018-10-25T15:39:54.587Z] &gt;&gt;&gt; HTTP R...
0debug
Mat-autocomplete - How to access selected option? : <p>I know that <code>[value]</code> stores the selected Object (Offer in my case). According to materials documentation, <code>optionSelected</code> emits an event. I tried <code>[optionSelected] = "fooFn"</code> but it doesn't exist. I just want to access the Offer o...
0debug
void fft_calc_altivec(FFTContext *s, FFTComplex *z) { POWERPC_TBL_DECLARE(altivec_fft_num, s->nbits >= 6); #ifdef ALTIVEC_USE_REFERENCE_C_CODE int ln = s->nbits; int j, np, np2; int nblocks, nloops; register FFTComplex *p, *q; FFTComplex *exptab = s->exptab; int l; FFTSample tmp_re...
1threat
static void wm8750_audio_out_cb(void *opaque, int free_b) { struct wm8750_s *s = (struct wm8750_s *) opaque; wm8750_out_flush(s); s->req_out = free_b; s->data_req(s->opaque, free_b >> 2, s->req_in >> 2); }
1threat
How to sort a 2D character array in lexicographical order in C? : <p>I want to sort a 2D array in lexicographical order.</p> <p>Suppose the given 2D array is </p> <pre><code>ebacd fghij olmkn trpqs xywuv </code></pre> <p>Now after arranging it in lexicographical order the array 2D array will be</p> <pre><code>abcde...
0debug
What is the difference between colorPrimary and colorPrimaryDark in themes : <p>I'm trying to understand how the theme works in android. I don't know why colorPrimaryDark won't work with me or maybe i'm doing it wrong.</p> <p>I tried this set and my action bar turns red because of colorPrimary:</p> <pre><code>&lt;sty...
0debug
How to properly setState to array of objects? : <p>I have an array ob objects that creates <code>Close</code> buttons depending on how many there are of them. When i click <code>Close</code> button i would expect the array to be updated (removed) then the button element will disappear from screen. </p> <p>I have worke...
0debug
static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { PCXContext * const s = avctx->priv_data; AVFrame *picture = data; AVFrame * const p = &s->picture; GetByteContext gb; int compressed, xmin, ymin, xmax, ymax, ret; ...
1threat
alert('Hello ' + user_input);
1threat
how to find tomorrow and yesterday date in accsess : please i want filter form too show tomorrow and yesterday date my form working good today by this macro if [Forms]![issues]![OpenedDateFilter]="today" applyfilter where condition (Year([Opened Date])=Year(Date()) And Month([Due Date])=Month(Date()) And Day([Ope...
0debug
Converting Matlab code to C++ (no image processing is included in the code) : <p>I want to convert my Matlab code to c++. I did search for it but I got more confused. Could anyone show me the simplest way to do that? If any information about code is needed please let me know. Any help is highly appreciated.</p>
0debug
uint64_t blk_mig_bytes_transferred(void) { BlkMigDevState *bmds; uint64_t sum = 0; blk_mig_lock(); QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) { sum += bmds->completed_sectors; } blk_mig_unlock(); return sum << BDRV_SECTOR_BITS; }
1threat
Big Error in android studio : [please solve this problem and thank you][1] My Buil.gradle apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { applicationId "com.seffalabdelaziz.crazyman" minSdkVersion 11 ...
0debug
DisplayState *init_displaystate(void) { gchar *name; int i; if (!display_state) { display_state = g_new0(DisplayState, 1); } for (i = 0; i < nb_consoles; i++) { if (consoles[i]->console_type != GRAPHIC_CONSOLE && consoles[i]->ds == NULL) { text_c...
1threat
How do open programs programatically using registery : ok I have been building voice applications for awhile, and I want to try something different. I want to open programs without manually putting in the programs into code. Process.Start("notepad.exe"); I am wandering how you would execute a program using th...
0debug
First n prime numbers using PrimeCheck fucntion : My task is to print the first n prime numbers using a CheckPrime function. I managed to do this with one number but what should I do in order for this to work and show me the first 'n' prime numbers?! Code: #include <iostream> using namespace std; ...
0debug
How to create package with main and test classes : I'm making a PageRank class that relies on som linear algebra operations that I've written myself. Since I couldn't be bothered to learn JUnit testing, I decided to write my own testing class for my PageRank class. Unfortunately, it wasn't as easy as I expected. Here's...
0debug
Hql ArrayList returning more than one type of class : this is not a "problem" because everything is working correctly, but it is really mind–boggling that it is working correctly and i can't find the answer. So i have some simple hibernate HQL Query: - List<Comment> commentList = session.createQuery(...
0debug
How to build Neural Network in Spark? : <p>The flow should be:</p> <p>Input -> Word2Vectors -> Output -> NeuralNetwork</p> <p>I have tried word2vec function of spark but I am confused with the format "MultilayerPerceptronClassifier" need as a input?</p>
0debug
Why converting from base 10 to base 2 is considered slow? : <p>As stated <a href="http://codeforces.com/blog/entry/22712" rel="nofollow">here</a> it is quadratic, but why?</p>
0debug
void qmp_blockdev_change_medium(const char *device, const char *filename, bool has_format, const char *format, bool has_read_only, BlockdevChangeReadOnlyMode read_only, Error **errp) { ...
1threat
Back colour of button not changing when updated in FOR loop - VB.Net : Working in Visual Studio 2017, in Visual Basic in a Windows Form App (.NET Framework). I'm trying to create a button where the back-colour of the button is a changing gradient. I made a simple algorithm to make the gradient change, and a time del...
0debug
Ionic 4 ion-title in toolbar is not centered on android : <p>I am wondering if this a common problem. My <code>ion-title</code> is not centered in the toolbar on android. </p> <p>I googled it but I couldn't find anything for ionic 4, what I did found was a pretty good solution in ionic 3.</p> <p>here it is: <a href="...
0debug
db.execute('SELECT * FROM products WHERE product_id = ' + product_input)
1threat
How to write Kafka consumers - single threaded vs multi threaded : <p>I have written a single Kafka consumer (using Spring Kafka), that reads from a single topic and is a part of a consumer group. Once a message is consumed, it will perform all downstream operations and move on to the next message offset. I have packag...
0debug
static inline int pic_is_unused(H264Context *h, Picture *pic) { if (pic->f.data[0] == NULL) return 1; if (pic->needs_realloc && !(pic->reference & DELAYED_PIC_REF)) return 1; return 0; }
1threat
La cascade ne marche pas sur doctrine : Je suis sous symfony 4.2.11 et j'ai besoin d'enregistrer une entité PageTemplate. Or cette entité contient des entités PageTemplateBlock qui doivent être mis à jour en base. L'entité PageTemplateBlock contient des entités PageTemplateBlockProfiled, PageTemplateBlockView et PageBl...
0debug
Is &arr[size] valid? : <p>Let's say I have a function, called like this:</p> <pre><code>void mysort(int *arr, std::size_t size) { std::sort(&amp;arr[0], &amp;arr[size]); } int main() { int a[] = { 42, 314 }; mysort(a, 2); } </code></pre> <p>My question is: does the code of <code>mysort</code> (more specificall...
0debug
What programming language is best suited for a 2D platformer game with my experience? : <p>Me and a few friends want to start building a 2D puzzle platformer. It uses a lot of tiles and we experienced that our test level did not run smoothly with Java. Do any of you have suggestions on which programming language/engine...
0debug
Recursion stops after some executions : <p>I am trying to find the largest prime factor of a number. The code stops working (at least I think like that) after some executions. <code>printf</code> parts are for debugging. The number is 600851475143.</p> <pre><code>long recursed(long i, long j){ if (j == 1){ retur...
0debug
void object_property_add_str(Object *obj, const char *name, char *(*get)(Object *, Error **), void (*set)(Object *, const char *, Error **), Error **errp) { StringProperty *prop = g_malloc0(sizeof(*prop)); prop->get = get; ...
1threat
Generate a html document to display my data from c# : Trying to find the best way to put/explain this. I'm working with some API's in c# and the information I'm pulling from them, I want to display in a html document which is generated when my standalone.exe is run. Can't seem to find a clear way to do this. Any sug...
0debug
My code does not work, please help. It is very simple, but does not know why. : This is a test code. It is suppose to show "How are you doing today? Buddy", but it does not show anything on the page right now and console does not say anything. Anyone knows why? Help please. Thank you. <!DOCTYPE html> <html>...
0debug
Git apply skips patches : <p>I'm trying to apply a patch that includes binary files with <code>git apply</code> but only the files are added. I tried running <code>git apply failing.patch -v</code> and it prints something like:</p> <blockquote> <p>Skipped patch 'file.txt'.<br> Checking patch file.bin...<br> Appl...
0debug
MySQL query with increment based on already existing values and only in rows with collum "Confirmed" not zero : I have a table that is manually edited from a webstore. I would like to do this faster with a query. Table: Orders I would like to auto increment collum 'Invoice number' in all rows if collum 'statu...
0debug