problem
stringlengths
26
131k
labels
class label
2 classes
int main(int argc, char **argv, char **envp) { const char *gdbstub_dev = NULL; int i; int snapshot, linux_boot; const char *icount_option = NULL; const char *initrd_filename; const char *kernel_filename, *kernel_cmdline; char boot_devices[33] = "cad"; DisplayState *ds; Dis...
1threat
how can I modulo operation for strings issue? : <p>I am trying to use modulo operation with my dummy data <code>msg</code> if msg mutiples by 8 <code>msg%8</code> then give me the output of <code>printf("[-] Error: Size too long");</code> if not then it will be okay , but using directly to <code>msg%8</code>doesnt mean...
0debug
wpf binding not refreshing if equals and gethashcode (NO IPROPERTYCHANGED NEEDED!) : <p>My WPF binding is not working because my viewmodel has overwritten Equals and GetHashCode. If i comment it out (region Object-Stuff), everything works fine.</p> <p>Further info about my reasons: All my viewmodels have an Id. I load...
0debug
Python pandas : Merge two tables without keys (Multiply 2 dataframes with broadcasting all elements; NxN dataframe) : <p>I want to merge 2 dataframes with broadcast relationship: No common index, just want to find all pairs of the rows in the 2 dataframes. So want to make N row dataframe x M row dataframe = N*M row dat...
0debug
How to slide a activity in android : <p>how to Slide an activity like the image below, after sliding the trail of the activities must be visible like the below image.</p> <p><a href="https://i.stack.imgur.com/aoXy7.png" rel="nofollow noreferrer">enter image description here</a></p>
0debug
HashMap Java. Code is correct but not running : import java.util.*; public class Map { public static void main(String[] args) { Map map = new HashMap(); map.put("father", "Rob"); System.out.println(map.get("father")); } }
0debug
void op_ddiv (void) { if (T1 != 0) { env->LO = (int64_t)T0 / (int64_t)T1; env->HI = (int64_t)T0 % (int64_t)T1; } RETURN(); }
1threat
cursor.execute('SELECT * FROM users WHERE username = ' + user_input)
1threat
static int eject_device(Monitor *mon, BlockDriverState *bs, int force) { if (bdrv_is_inserted(bs)) { if (!force) { if (!bdrv_is_removable(bs)) { qerror_report(QERR_DEVICE_NOT_REMOVABLE, bdrv_get_device_name(bs)); return -1; ...
1threat
Angular4 reactive form validation not working : <p>In pic1 I have written a input tag (line: 101) and another input tag copied from other place (line: 102) But first input tag is working but not second one, because for second input tag there is no "ng-invalid ng-touched" class in DOM (pic2). <a href="https://i.stack.im...
0debug
Firebase shows app version needs investigation : <p>My app's firebase dashboard shows needs investigation (Analytics -> App release) I don't know why it is showing like that. Please see the screenshot</p> <p><a href="https://i.stack.imgur.com/MMbYM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MMbYM.png" a...
0debug
Write a PERL script that lists the directory contents of a directory specified by the user : I have tried this code but it doesnt work for the user-input directory. It only lists the PWD. Help! [My code screenshot][1] [1]: https://i.stack.imgur.com/kirW6.png
0debug
void qemu_co_rwlock_unlock(CoRwlock *lock) { assert(qemu_in_coroutine()); if (lock->writer) { lock->writer = false; qemu_co_queue_restart_all(&lock->queue); } else { lock->reader--; assert(lock->reader >= 0); if (!lock->reader) { qemu_co_queue_nex...
1threat
static int ccid_handle_bulk_out(USBCCIDState *s, USBPacket *p) { CCID_Header *ccid_header; if (p->len + s->bulk_out_pos > BULK_OUT_DATA_SIZE) { return USB_RET_STALL; } ccid_header = (CCID_Header *)s->bulk_out_data; memcpy(s->bulk_out_data + s->bulk_out_pos, p->data, p->len); s-...
1threat
Check if user is logged in with Token Based Authentication in ASP.NET Core : <p>I managed to implement this token based authentication system in my application, but I have a little question. How can I check if a user is signed it (eg if the there is a valid token in the request) within the method? So with the [Authoriz...
0debug
docker-compose up vs docker-compose up --build vs docker-compose build --no-cache : <p>I couldn't figure out what the difference between those.</p> <ul> <li><p><code>docker-compose up</code> </p></li> <li><p><code>docker-compose up --build</code></p></li> <li><p><code>docker-compose build --no-cache</code></p></li> </...
0debug
static av_cold void rv34_init_tables(void) { int i, j, k; for(i = 0; i < NUM_INTRA_TABLES; i++){ for(j = 0; j < 2; j++){ rv34_gen_vlc(rv34_table_intra_cbppat [i][j], CBPPAT_VLC_SIZE, &intra_vlcs[i].cbppattern[j], NULL, 19*i + 0 + j); rv34_gen_vlc(rv34_table_intra_...
1threat
Linq Group with inside array element : ``` a = new { Key = new[] {1, 2} }; b = new { Key = new[] {2, 3} }; c = new { Key = new[] {3} }; ``` I want a linq func that will got the result below, after `new [] {a, b, c}.func(x => x.Key)` ``` new KeyValuePair[] { { Key = 1, Value = new [] { a } }, { Key = 2,...
0debug
How TO Generate Number Incrementing by previous number in php : I want TO generate A Number In Sequence in php On Page Refresh. Like if I start with 1 then after Page Refresh It Should Be 2.Please Help
0debug
What is the recommended project structure for spring boot rest projects? : <p>I'm a beginner with spring boot. I'm involved in the beginning of a project where we would build rest services using spring boot. Could you please advise the recommended directory structure to follow when building a project that will just exp...
0debug
How can I select unique row based on value matched in other column : I have searched a lot but can not get my head around this. I need to filter the results based on comparing values in 2 rows. Data) [Data I want to filter][1] Results I want to end up with [Desired results][2] Is this possible in MySQL? ...
0debug
static void gen_thumb2_parallel_addsub(int op1, int op2, TCGv a, TCGv b) { TCGv tmp; switch (op1) { #define gen_pas_helper(name) glue(gen_helper_,name)(a, a, b, tmp) case 0: tmp = tcg_temp_new(TCG_TYPE_PTR); tcg_gen_addi_ptr(tmp, cpu_env, offsetof(CPUState, GE)); PAS_OP(s) ...
1threat
Is there any other way of doing this? if section of this code make it work but is there any way of using setw() to organize (*) properly? : void showTheater(char theater[][20],int row,int seat) { cout << "Seats: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19" << endl; for (int i = 0; i <= row; i++) ...
0debug
static int libopenjpeg_copy_packed8(AVCodecContext *avctx, const AVFrame *frame, opj_image_t *image) { int compno; int x; int y; int *image_line; int frame_index; const int numcomps = image->numcomps; for (compno = 0; compno < numcomps; ++compno) { if (image->comps[compno]...
1threat
How to solve MongoError: pool destroyed while connecting to CosmosDB : <p>I have Node.js service in which I am using mongo-API to communicate with Document/Cosmos DB. My service run's fine and performs all the crud operation but after 1 min some mongo error throws from the service.</p> <pre><code>/document-db-service/...
0debug
CocoaPods and Carthage : <p>I had a project with both Carthage and Cocoapods. They both have one common dependency (PureLayout, to be precise). Strange, but project compiles fine without any errors about class redeclaration, etc. So the question is: why it works and which version of dependency is actually used when I c...
0debug
Need a few clarifications for C++ related items : <p>So I am taking a class right now to learn C++ at my University. </p> <p>I would like some clarifications that my professor has made. </p> <p>First...<br> He said that .hpp was a depreciated file as of 2003 and that because Apple uses the .hpp in Xcode they could no...
0debug
C# random number and greater than operator : <p>I'm trying to generate a random number and give the user 5 tries to guess the right number. I want to compare their guess and tell them if they're too high or too low. VS wont execute and I don't understand why I'm getting errors.</p> <pre><code>using System; using Syste...
0debug
static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) { VideoData *s = s1->priv_data; int ret, first_index, last_index; char buf[1024]; ByteIOContext pb1, *f = &pb1; AVStream *st; st = av_new_stream(s1, 0); if (!st) { av_free(s); return -ENOMEM; ...
1threat
Convert column to timestamp - Pandas Dataframe : <p>I have a Pandas Dataframe that has date values stored in 2 columns in the below format:</p> <pre><code>Column 1: 04-APR-2018 11:04:29 Column 2: 2018040415203 </code></pre> <p>How could I convert this to a time stamp. Datatype of both these column is Object.</p>
0debug
How do i add an item to the end of a linked list? : class Node: def __init__(self, item, next): self.item = item self.next = next class LinkedList: def __init__(self): self.head = None def add(self, item): self.head = Node(item, self.head) def is_empty(self...
0debug
Comparing two dates using if statement not working - javascript + nodejs : <p>Here my below code:</p> <pre><code>var date = new Date().toLocaleString(); console.log(date); // output: 2018-01-15 16:39:00 var schedule = 2018-01-15 16:39:00 (which is coming from my html form, i putting this date in one input box and get...
0debug
static int get_cluster_duration(MOVTrack *track, int cluster_idx) { int64_t next_dts; if (cluster_idx >= track->entry) return 0; if (cluster_idx + 1 == track->entry) next_dts = track->track_duration + track->start_dts; else next_dts = track->cluster[cluster_idx + 1].d...
1threat
def max_profit(price, k): n = len(price) final_profit = [[None for x in range(n)] for y in range(k + 1)] for i in range(k + 1): for j in range(n): if i == 0 or j == 0: final_profit[i][j] = 0 else: max_so_far = 0 for x i...
0debug
static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size) { GSMParseContext *s = s1->priv_data; ParseContext *pc = &s->pc; int next; if (!s->block_size) { ...
1threat
static int xan_decode_frame_type1(AVCodecContext *avctx) { XanContext *s = avctx->priv_data; uint8_t *ybuf, *src = s->scratch_buffer; int cur, last; int i, j; int ret; if ((ret = xan_decode_chroma(avctx, bytestream2_get_le32(&s->gb))) != 0) return ret; bytestream2_seek(&...
1threat
How to Add mysql foreign key from another table primary key in php : <? $connect->exec("INSERT INTO questions (questions_points, questions_ask, answer_option, contest_id) VALUES ('$questionspoints', '$questionsask', '$answeroption', '$lastid') "); $connect->exec(" INSERT INTO answers(choice_option...
0debug
int ff_ps_read_data(AVCodecContext *avctx, GetBitContext *gb_host, PSContext *ps, int bits_left) { int e; int bit_count_start = get_bits_count(gb_host); int header; int bits_consumed; GetBitContext gbc = *gb_host, *gb = &gbc; header = get_bits1(gb); if (header) { ps->...
1threat
OpenCV Python: cv2.VideoCapture can only find 2 of 3 cameras, Windows Camera app finds all : <p>I'm trying to create 3 real-time capture frames with webcams into a USB hub into my laptop. Using the "camera" app on Windows, I can change the camera source one at a time and confirm that all 3 webcams are working. However,...
0debug
How to validate if data and column headers in the table are refreshed or not : <p>Given : There is table with 3 rows and 5 columns and a refresh button . After Refresh button is triggered, the data along with the column headers (3 columns headers) getting changed on every refresh except 2 columns headers.</p> <p>How c...
0debug
Python replace part of long url : <p>I have a long url like</p> <pre><code>https://yyyyyy.com/yyyyy/xxxxx/yyyyy/yyyyyy/yyyyy/pppp/kkkk </code></pre> <p>And I want to replace the xxxx part to zzzz</p> <p>I tried with the re.sub</p> <pre><code>b = url.split('/')[-6] #which gives me the right part of the url to change...
0debug
init_disasm (struct disassemble_info *info) { const struct s390_opcode *opcode; const struct s390_opcode *opcode_end; memset (opc_index, 0, sizeof (opc_index)); opcode_end = s390_opcodes + s390_num_opcodes; for (opcode = s390_opcodes; opcode < opcode_end; opcode++) { opc_index[(int) opcode...
1threat
static void sbr_hf_inverse_filter(SBRDSPContext *dsp, int (*alpha0)[2], int (*alpha1)[2], const int X_low[32][40][2], int k0) { int k; int shift, round; for (k = 0; k < k0; k++) { SoftFloat phi[3][2][2]; SoftFloat ...
1threat
iscsi_allocmap_update(IscsiLun *iscsilun, int64_t sector_num, int nb_sectors, bool allocated, bool valid) { int64_t cl_num_expanded, nb_cls_expanded, cl_num_shrunk, nb_cls_shrunk; if (iscsilun->allocmap == NULL) { return; } cl_num_expanded = sector_num / iscs...
1threat
How to convert 007898989 to 7898989 python : I am trying to convert 007898989 to 7898989 using long(007898989) but it gives error as invalid token. please help
0debug
query = 'SELECT * FROM customers WHERE email = ' + email_input
1threat
static void do_bit_allocation1(AC3DecodeContext *ctx, int chnl) { ac3_audio_block *ab = &ctx->audio_block; int sdecay, fdecay, sgain, dbknee, floor; int lowcomp = 0, fgain = 0, snroffset = 0, fastleak = 0, slowleak = 0; int psd[256], bndpsd[50], excite[50], mask[50], delta; int start = 0, end ...
1threat
for (auto room : rooms) explanation? : <p>i'm trying to learn c++. The problem of this task is to print out the total rent of rooms. The code work fine. but there are something i want to ask:</p> <p>i don't get this line in the main function: "for (auto room : rooms)", i thought for loop suppose to have ";" ? and aut...
0debug
How do i search divs for text from a select form and change diplay of the divs to none? : I'm trying to hide divs based on a value in a dropdown selector. I'm not sure where I have went wrong. here is my code. document.getElementById("SearchFilter").onchange = function() { var matcher = new RegExp(docum...
0debug
How to get 1 or 0 according to the content of a list : <p>I'm scraping with python and I have a list made at most of two letters(R and D), where the content can be always the same (i.e. all the elements are R or alternatively D) or it can be that there are some D and some R. How can I get 1 if the list is made of eithe...
0debug
int swri_realloc_audio(AudioData *a, int count){ int i, countb; AudioData old; if(count < 0 || count > INT_MAX/2/a->bps/a->ch_count) return AVERROR(EINVAL); if(a->count >= count) return 0; count*=2; countb= FFALIGN(count*a->bps, ALIGN); old= *a; av_ass...
1threat
void vnc_display_open(const char *id, Error **errp) { VncDisplay *vs = vnc_display_find(id); QemuOpts *opts = qemu_opts_find(&qemu_vnc_opts, id); QemuOpts *sopts, *wsopts; const char *share, *device_id; QemuConsole *con; bool password = false; bool reverse = false; const char *v...
1threat
python switch/case with conditions : <p>if-else statements are cumbersome. I want to construct a switch/case statement in Python. But switch/case statements in Python are geared towards specific cases such as: </p> <pre><code>def switch(case): return { "a":fa, "b":fb, }.get(case, f_default) </c...
0debug
int url_open_dyn_packet_buf(AVIOContext **s, int max_packet_size) { if (max_packet_size <= 0) return -1; return url_open_dyn_buf_internal(s, max_packet_size); }
1threat
Passing Multiple Arguments to GraphQL Query : <p><strong>First thing</strong></p> <p>Appreciate this may be a bit of a stupid question, but I'm working with GraphQL having come from the RDF/Linked Data world and having a lot of trouble getting my head around how I would return a set. Essentially I want something where...
0debug
PowerPCCPU *ppc4xx_init(const char *cpu_model, clk_setup_t *cpu_clk, clk_setup_t *tb_clk, uint32_t sysclk) { PowerPCCPU *cpu; CPUPPCState *env; cpu = POWERPC_CPU(cpu_generic_init(TYPE_POWERPC_CPU, cpu_model)); if (cpu == NULL) { fpr...
1threat
Print everything in column of file bash : <p>My file looks like this </p> <pre><code>ID Done Have ETA Up Down Ratio Status Name 2 100% 858.1 MB Done 56.0 0.0 1.2 Seeding lubuntu-16.04.1-desktop-i386.iso </code></pre> <p>What I need to do is write a grep/awk stri...
0debug
Does passing an object via props to child react component, clone the original object or pass by reference? : <p>If am to pass an object to a child component via the components props, does this object get cloned or does it simply pass a reference to the original object?</p> <p>For example in my <code>App.js</code> I am...
0debug
R from For-Loop to apply : this is my second day developing in R, so please bare with me/forgive any naivety. My following code has Vector BaseSal with the Base Salary for 38 different positions, as well as Vector AnnualInc which is the annual amount the Base Salary increases for each of the 38 positions. This code wor...
0debug
I have a Relational tables in sql server : I have a Relational table in sql server. When i delete a field in one of them, the Related field in second table also have delete. I don't want the second one delete. How can i do it? [enter image description here][1] [1]: https://i.stack.imgur.com/owCbx.png
0debug
Am I 'allowed' to modify props in the constructor? : <p>They say you shouldn't modify the <code>props</code> in a React Component. Does that extend to modifying them in the constructor?</p> <p>Specifically,</p> <pre><code>export default class BookingForm extends React.Component { constructor(props) { // ...
0debug
def extract_missing(test_list, strt_val, stop_val): res = [] for sub in test_list: if sub[0] > strt_val: res.append((strt_val, sub[0])) strt_val = sub[1] if strt_val < stop_val: res.append((strt_val, stop_val)) return (res)
0debug
3 divs same line (boostrap4) : I wanna make a layout with a left menu, ight menu and a middle with pages stuff just like this: http://3.bp.blogspot.com/-82HunzQsyzI/T0RaxdMxUvI/AAAAAAAAAx0/mKkTADcL_34/s1600/tc.PNG I'm trying to do with with boostrap 4 (to help me with responsible stuff), but i can not put the 3 men...
0debug
why after I connection to sql server with library golang go-mssqldb , they print <nil>? : I have problem , after I connection to sql server , they print `<nil>` , what wrong with my code or problem with my connection to sql server because they just print `<nil>`? error can see in here [enter image description here]...
0debug
static inline void mix_dualmono_to_stereo(AC3DecodeContext *ctx) { int i; float tmp; float (*output)[256] = ctx->audio_block.block_output; for (i = 0; i < 256; i++) { tmp = output[1][i] + output[2][i]; output[1][i] = output[2][i] = tmp; } }
1threat
Kotlin - creating a mutable list with repeating elements : <p>What would be an idiomatic way to create a mutable list of a given length <code>n</code> with repeating elements of value <code>v</code> (e.g <code>listOf(4,4,4,4,4)</code>) as an expression.</p> <p>I'm doing <code>val list = listOf((0..n-1)).flatten().map{...
0debug
IntelliJ IDEA - What is the keyboard shortcut for 'git pull' command? : <p>Since Intellij relies on keyboard shortcuts a lot,I was wondering if there is one for "git pull" command. That would save couple of seconds. I am using Intellij Version 15.0.4 on Windows.</p>
0debug
static CoroutineThreadState *coroutine_get_thread_state(void) { CoroutineThreadState *s = pthread_getspecific(thread_state_key); if (!s) { s = g_malloc0(sizeof(*s)); s->current = &s->leader.base; QLIST_INIT(&s->pool); pthread_setspecific(thread_state_key, s); } ...
1threat
document.location = 'http://evil.com?username=' + user_input;
1threat
static int usb_serial_handle_data(USBDevice *dev, USBPacket *p) { USBSerialState *s = (USBSerialState *)dev; int ret = 0; uint8_t devep = p->devep; uint8_t *data = p->data; int len = p->len; int first_len; switch (p->pid) { case USB_TOKEN_OUT: if (devep != 2) ...
1threat
Understanding _ids array in CakePHP model data : <p>Using CakePHP v3.1 w/ Postgres DB. When I retrieve records with associations I often see an extra array of <code>_ids</code>. Something like this:</p> <pre><code> ... (int) 26 =&gt; [ 'agency_id' =&gt; (int) 23, 'routes' =&gt; [ '_i...
0debug
Having services in React application : <p>I'm coming from the angular world where I could extract logic to a service/factory and consume them in my controllers.</p> <p>I'm trying to understand how can I achieve the same in a React application.</p> <p>Let's say that I have a component that validates user's password in...
0debug
Missing Marketing Icon : <p>When trying to submit my app, iTunes Connect says</p> <blockquote> <p>Missing Marketing Icon. iOS Apps must include a 1024x1024px Marketing Icon in PNG format. Apps that do not include the Marketing Icon cannot be submitted for App Review or Beta App Review.</p> </blockquote> <p>I do hav...
0debug
Looping through Arrays : I am trying to write a program to simulate an airline reservation system. I an supposed to use an array of type boolean to represent the number of seats. First five seats represent first class and last five represent economy. Initially the program must allow the user to make a choice between fi...
0debug
Karma webpack outputting multiple "webpack: wait until bundle finished" : <p>After the recent releases of webpack 1.14.0 / karma 1.4.0 / karma-webpack 2.2.0, that I now see a lot of these messages when karma starts its webpack build. </p> <pre><code>webpack: wait until bundle finished: </code></pre> <p>Sometimes I se...
0debug
React native TouchableOpacity onPress not working on Android : <p>TouchabelOpacity works fine on iOS but the onPress method does not work on Android for me. </p> <p>My react-native version: 0.57.4</p> <p>My code:</p> <pre><code>const initDrawer = navigation =&gt; ( &lt;TouchableOpacity style={{ left: 16 }} ...
0debug
How can I select these green color values and paste it in a single separate column? : These are the multiple choice answers, green one are the correct ones. I want only green answeres in the 5th column. Please suggest some way. [Click here for image][1] [1]: https://i.stack.imgur.com/PewzC.png
0debug
Change divs width/height dinamically : <p>Hi stackoverflow community! I'm making some practice with css/html5 "copying" other websites layouts and stuff to learn and understand how things works.</p> <p>Now I'm get into this website codepen.io/picks/10/ where the divs after "Picked Pens" change their size dinamically i...
0debug
static int ds1338_init(I2CSlave *i2c) { return 0; }
1threat
static target_ulong h_enter(PowerPCCPU *cpu, sPAPREnvironment *spapr, target_ulong opcode, target_ulong *args) { CPUPPCState *env = &cpu->env; target_ulong flags = args[0]; target_ulong pte_index = args[1]; target_ulong pteh = args[2]; target_ulong ptel = args[3]; ...
1threat
Fresh install of Rails and getting OpenSSL errors: "already initialized constant OpenSSL" : <p>I am stuck trying to get going with RoR. I did the Ruby Installfest, but am running into an issue with what I think is openssl.bundle.</p> <p>I am using RVM, and am running Rails 5.0.1 and Ruby 2.4.0</p> <p>I tried a full r...
0debug
static av_cold int asink_init(AVFilterContext *ctx, const char *args, void *opaque) { BufferSinkContext *buf = ctx->priv; AVABufferSinkParams *params; if (!opaque) { av_log(ctx, AV_LOG_ERROR, "No opaque field provided, an AVABufferSinkParams struct is required\n"); re...
1threat
Bootstrap button inside input-group : <p>How to make it so that it appears nicely after input page with same height?</p> <pre><code>&lt;div class="input-group"&gt; &lt;input type="text" class="form-control"/&gt; &lt;button class="input-group-addon" type="submit"&gt; &lt;i class="fa fa-searc...
0debug
How to call function properties from other file : <p>There are 2 Files 1.Frontend 2.Backend In Frontend There is one function pop(), which basically is b = a.get() and what i want is whenever user type something in entry box it should be printed via backend...</p> <h1>FRONTEND</h1> <pre><code>from tkinter import * im...
0debug
static void dcr_write_pob (void *opaque, int dcrn, uint32_t val) { ppc4xx_pob_t *pob; pob = opaque; switch (dcrn) { case POB0_BEAR: break; case POB0_BESR0: case POB0_BESR1: pob->besr[dcrn - POB0_BESR0] &= ~val; break; } }
1threat
Error setcontentview : I have a problem in android studio. When run aplication in emulator or a device, appear the next error. 11-21 13:20:10.248 1191-1191/com.foca.deboInventario E/AndroidRuntime: FATAL EXCEPTION: main java.lang.Runtime...
0debug
Javascript Functions - Calling Two Function In A File : <p>Question: Two Functions Return Different Data But After Calling Both Functions Receive Output From Last Function. Why? </p> <blockquote> <p>javascript</p> </blockquote> <pre><code>var printStudentInfo = function () { return 'Name'; } var printStudent...
0debug
void qemu_opts_print(QemuOpts *opts, const char *separator) { QemuOpt *opt; QemuOptDesc *desc = opts->list->desc; const char *sep = ""; if (opts->id) { printf("id=%s", opts->id); sep = separator; } if (desc[0].name == NULL) { QTAILQ_FOREACH(opt, &opts->head...
1threat
How to properly remove a control from memory, in VB.Net? : <p>Relatively simple problem.</p> <p>I have a panel with some textboxes on it, all dynamically created. The user fills in some of the textboxes and then proceeds to close the panel.</p> <p>Now in the code I use the line;</p> <pre><code>Me.Pnl_Main.Controls.C...
0debug
how to append to a list in jinja2 for ansible : <p>Below is the jinja2 template that i wrote to use in ansible.</p> <pre><code>{% set port = 1234 %} {% set server_ip = [] %} {% for ip in host_ip %} {% do server_ip.append({{ ip }}:{{ port }}) %} {% endfor %} {% server_ip|join(', ') %} </code></pre> <p>Below is the my...
0debug
Can code that doesn't execute cause segmentation fault? : <p>I have this piece of code working just fine. Statement in <code>if</code> is true which leads me to printing <code>TRUE</code>. However when I remove the content of <code>else</code> statement, this gives me segmentation fault, even if it doesn't execute (sti...
0debug
PHP Mysql Inbox feature in messaging system : <p>Hello I am saving messages in my mysql database. The columns are </p> <pre><code>id sender_id receiver_id dateTime </code></pre> <p>I want to build an inbox functionality. I don't understand how can I build this feature. I mean sender can be receiver and receiver...
0debug
static void cpu_openrisc_load_kernel(ram_addr_t ram_size, const char *kernel_filename, OpenRISCCPU *cpu) { long kernel_size; uint64_t elf_entry; hwaddr entry; if (kernel_filename && !qtest_enabled()) { kernel_siz...
1threat
Java - Sort ArrayList of Objects based on another array : I want to sort arraylist of object based on another array using Java 7. List A ={[id:1,name:"A"],[id:2,name:"B"],[id:3,name:"C"],[id:4,name:"D"]} Array : {2,4} Output: {[id:2,name:"B"],[id:4,name:"D"],[id:3,name:"C"],[id:1,name:"A"]} Something simila...
0debug
How do I pass variables between stages in a declarative Jenkins pipeline? : <p>How do I pass variables between stages in a declarative pipeline?</p> <p>In a scripted pipeline, I gather the procedure is to write to a temporary file, then read the file into a variable.</p> <p>How do I do this in a declarative pipeline?...
0debug
PreferenceFragmentCompat custom layout : <p>I need a custom layout for my PreferenceFragmentCompat. In the docs for <a href="http://developer.android.com/reference/android/support/v7/preference/PreferenceFragmentCompat.html#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle)" rel="n...
0debug
static unsigned int dec_abs_r(DisasContext *dc) { TCGv t0; DIS(fprintf (logfile, "abs $r%u, $r%u\n", dc->op1, dc->op2)); cris_cc_mask(dc, CC_MASK_NZ); t0 = tcg_temp_new(TCG_TYPE_TL); tcg_gen_sari_tl(t0, cpu_R[dc->op1], 31); tcg_gen_xor_tl(cpu_R[dc->op2], cpu_R[dc->op1], t0); tcg_gen_sub_tl(cpu...
1threat
static int ac3_parse_sync_info(AC3DecodeContext *ctx) { ac3_sync_info *sync_info = &ctx->sync_info; GetBitContext *gb = &ctx->gb; sync_info->sync_word = get_bits(gb, 16); sync_info->crc1 = get_bits(gb, 16); sync_info->fscod = get_bits(gb, 2); if (sync_info->fscod == 0x03) retur...
1threat
call function in another aws lambda using existing call : Please refer the code snippet below: import awsgi import json from flask import ( Flask, jsonify, request ) app = Flask(__name__) @app.route('/') def index(): return jsonify(status=200, message='O...
0debug
Error System.OverflowException: Value was either too large or too small for an Int32 : <pre><code> protected void Button3_Click(object sender, EventArgs e) { UserStore&lt;IdentityUser&gt; userStore = new UserStore&lt;IdentityUser&gt;(); userStore.Context.Database.Connection.ConnectionString = System....
0debug