problem
stringlengths
26
131k
labels
class label
2 classes
Take some Random numbers as a input print the numbers in descending order : # include<iostream> using namespace std; int print_max(int a, int b); main() { int low=0,max,min; int num[5]; for(int i=1; i<=5; i++) { cout<<"Plz Enter the number "<<endl; cin>>num...
0debug
Extract float numbers from string in python : <p>i want to extract the numbers from the <strong>following string</strong>:</p> <p>FRESENIUS44.42 BAYER64.90 FRESENIUS MEDICAL CARE59.12 COVESTRO45.34 BASF63.19</p> <p>I've tried the following approach but that didn't work:</p> <pre><code>l = [] for t in xs.split(): t...
0debug
static void process_synthesis_subpackets(QDM2Context *q, QDM2SubPNode *list) { QDM2SubPNode *nodes[4]; nodes[0] = qdm2_search_subpacket_type_in_list(list, 9); if (nodes[0] != NULL) process_subpacket_9(q, nodes[0]); nodes[1] = qdm2_search_subpacket_type_in_list(list, 10); if (nodes...
1threat
static void boston_flash_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { }
1threat
C do{} while(function(argumen)==1) in I/O FILES : <p>So i need to enter ID(int)(it has to be a 3 digit format) argument and make a check function if there is same ID in FILE datoteka.txt that i made. Thanks for help</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;string.h&gt; struct stru...
0debug
int avpriv_dca_parse_core_frame_header(GetBitContext *gb, DCACoreFrameHeader *h) { if (get_bits_long(gb, 32) != DCA_SYNCWORD_CORE_BE) return DCA_PARSE_ERROR_SYNC_WORD; h->normal_frame = get_bits1(gb); h->deficit_samples = get_bits(gb, 5) + 1; if (h->deficit_samples != DCA_PCMBLOCK_SAMPLE...
1threat
Error using cell2mat Matlab : <p>I have the cell below:</p> <pre><code> aa={[1.0094]} {[1.0370]} {[1.0956]} {[1.0957]} {[1.0171]} {[1.0362]} {[1.1355]} {[1.0503]} {[1.5280]} {[1.1928]} {[1.0148]} {[0.9822]} {[1.0316]} {[1.1135]} {[1.1135]} </code></pre> <p>I used the co...
0debug
int kvm_arch_put_registers(CPUState *env, int level) { int ret; assert(cpu_is_stopped(env) || qemu_cpu_is_self(env)); ret = kvm_getput_regs(env, 1); ret = kvm_put_xsave(env); ret = kvm_put_xcrs(env); ret = kvm_put_sregs(env); ret = kvm_put_msrs(env, level); ...
1threat
Why templates must be defined outside class : <p>I know that templates must be declared and defined in the same file. But, why I cannot:</p> <pre><code>#ifndef guard #define guard template&lt;typename T&gt; class Test{ void method(){ } }; #endif </code></pre> <p>And it is causes compiler error ( not directly ...
0debug
how can i count the number of times a certain string occurs in a variable? : <p>im just learning how to program on edx, and theres this question that i just can seem to understand not to even talk of solving. please i need solutions and idea on how to understand the question and implement it</p> <ul> <li>QUESTION-</l...
0debug
static void mov_parse_stsd_audio(MOVContext *c, AVIOContext *pb, AVStream *st, MOVStreamContext *sc) { int bits_per_sample, flags; uint16_t version = avio_rb16(pb); AVDictionaryEntry *compatible_brands = av_dict_get(c->fc->metadata, "compatible_brands", NULL, AV_DICT_MA...
1threat
Which is more preferable? Performance or Memory while spliting a string in C#? : <p>I would like to ask that which case of the two below is more preferable than the other considering garbage collection, memory and cpu usage in C#.</p> <pre><code>a = data.Split('|')[0]; b = data.Split('|')[1]; c = data.Split('|')[2]; d...
0debug
Office 365 - Distribution groups On premises to Cloud : <p>I am performing the migration in a hybrid environment: Office365 / Exchange. Our users are synchronized using AD Connect and the email boxes have already been migrated from on premises to the cloud. The intention is to later disable the exchange on premises ser...
0debug
How can I access an instance outside of the method it was created in? C# : I am working on a console app that transmits OutGauge data to an Adruino, but I'm stuck with the problem described below. Here's the top of my code: using System; using InSimDotNet.Out; using ArduinoDriver; using Arduino...
0debug
POP an integer out of a list and keep going til list is gone? : I have created a random list and trying to pop a number out by using a userInput and keep going but it keeps giving me the error, pop index out of range. Even .remove() is not working. I am a little confused. import random hand= [] for i in ran...
0debug
static uint64_t kvmppc_read_int_cpu_dt(const char *propname) { char buf[PATH_MAX]; union { uint32_t v32; uint64_t v64; } u; FILE *f; int len; if (kvmppc_find_cpu_dt(buf, sizeof(buf))) { return -1; } strncat(buf, "/", sizeof(buf) - strlen(buf)); ...
1threat
C++ For loops: N lines of input : I am only just learning C++ so I am not sure how to do this. The question asks me to determine whether LHS of an simple expression equals its RHS. The input consists of an integer N, and then N lines of expressions. The output also consists of N lines, whether the expression is corr...
0debug
AVCodecParserContext *av_parser_init(int codec_id) { AVCodecParserContext *s; AVCodecParser *parser; int ret; if(codec_id == CODEC_ID_NONE) return NULL; for(parser = av_first_parser; parser != NULL; parser = parser->next) { if (parser->codec_ids[0] == codec_id || ...
1threat
static inline hwaddr booke206_page_size_to_tlb(uint64_t size) { return (ffs(size >> 10) - 1) >> 1; }
1threat
Python defaultdict initialise while creation : <p>Is there any way of initialise defaultdict during creation time ? I mean to achieve the same behaviour as this in one line:</p> <pre><code>x = defaultdict(int) x[1] = 2 </code></pre> <p>something like:</p> <pre><code>x = defaultdict(int, {1:2}) </code></pre> <p>wher...
0debug
How can i get location on center of screen with Google Map Api : <p>I need to make it like in PlacePicker API But i want it to mapsActivity when move screen location is change on center of screen plz guide me</p>
0debug
def rombus_area(p,q): area=(p*q)/2 return area
0debug
How to convert Int to Hex String in Kotlin? : <p>I'm looking for a similar function to Java's <code>Integer.toHexString()</code> in Kotlin. Is there something built-in, or we have to manually write a function to convert <code>Int</code> to <code>String</code>?</p>
0debug
int socket_dgram(SocketAddressLegacy *remote, SocketAddressLegacy *local, Error **errp) { int fd; switch (remote->type) { case SOCKET_ADDRESS_LEGACY_KIND_INET: fd = inet_dgram_saddr(remote->u.inet.data, local ? local->u.inet.data : NULL, errp); ...
1threat
cursor.execute('SELECT * FROM users WHERE username = ' + user_input)
1threat
Idiomatic way to append an element in JSX : <p>Given the following JSX:</p> <pre><code>const elems = &lt;div&gt;&lt;p&gt;hello&lt;/p&gt;&lt;p&gt;world&lt;/p&gt;&lt;/div&gt; </code></pre> <p>If I want to add another element to the end, is there a more idiomatic way than doing:</p> <pre><code>const moreElems = &lt;div...
0debug
static int virtqueue_num_heads(VirtQueue *vq, unsigned int idx) { uint16_t num_heads = vring_avail_idx(vq) - idx; if (num_heads > vq->vring.num) { error_report("Guest moved used index from %u to %u", idx, vring_avail_idx(vq)); exit(1); } if (n...
1threat
How to make a particular Text Bold after a Text : <p>Suppose I have a sample text. var sample="id:123 Hello How are you id:456 I am fine".</p> <p>123 and 456 are ids. There can be multiple ids in a sentence. So, How to make every id bold in the sentence. And then after that how to remove "id:" from the sample text.</...
0debug
What is the output of this C program? : I expect the output to be "short int" but the output is "float". #include <stdio.h> int main() { int x = 1; short int i = 2; float f = 3; if (sizeof((x == 2) ? f : i) == sizeof(float)) printf("float\n"); e...
0debug
How to solve "Error: Uncaught (in promise): Error: No provider for" error in Ionic 3 : <p>I'm learning Ionic 3 and I'm getting this error when trying to make a custom validator which checks for a unique username. I've tried my best but couldn't solve this issue.</p> <p>CustomValidators.ts</p> <pre><code>import { Dire...
0debug
static inline int get_amv(Mpeg4DecContext *ctx, int n) { MpegEncContext *s = &ctx->m; int x, y, mb_v, sum, dx, dy, shift; int len = 1 << (s->f_code + 4); const int a = s->sprite_warping_accuracy; if (s->workaround_bugs & FF_BUG_AMV) len >>= s->quarter_sample; if (s->real_...
1threat
static void __attribute__((__constructor__)) rcu_init(void) { QemuThread thread; qemu_mutex_init(&rcu_gp_lock); qemu_event_init(&rcu_gp_event, true); qemu_event_init(&rcu_call_ready_event, false); qemu_thread_create(&thread, "call_rcu", call_rcu_thread, NULL, QEMU_T...
1threat
static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt) { struct video_data *s = ctx->priv_data; struct v4l2_buffer buf = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, .memory = V4L2_MEMORY_MMAP }; int res; pkt->size = 0; while ((res = v4l2_ioctl(s->fd, VIDI...
1threat
Modifying contents of Android .aar file / Converting to and from .zip format : <p>So I have a .aar file which has a file I need to remove from inside it. </p> <p>I am running on mac and changed the extention from .aar to .zip and unzipped the zip file. I then removed the file from the folder, recompressed it back into...
0debug
void address_space_init(AddressSpace *as, MemoryRegion *root, const char *name) { memory_region_transaction_begin(); as->root = root; as->current_map = g_new(FlatView, 1); flatview_init(as->current_map); as->ioeventfd_nb = 0; as->ioeventfds = NULL; QTAILQ_INSERT_TAIL(&address_spaces...
1threat
static void virtio_blk_reset(VirtIODevice *vdev) { VirtIOBlock *s = VIRTIO_BLK(vdev); AioContext *ctx; VirtIOBlockReq *req; ctx = blk_get_aio_context(s->blk); aio_context_acquire(ctx); blk_drain(s->blk); while (s->rq) { req = s->rq; s->rq = req->next; ...
1threat
static void palmte_init(MachineState *machine) { const char *cpu_model = machine->cpu_model; const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; MemoryRegion *address_space_mem = g...
1threat
ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider" after androidx migration : <p>I'm trying to move to migrate to androidx. I used the migration tool in Android Studio. When I do this I get the following stacktrace when I run my app.</p> <pre><code>E/AndroidRuntime: FATAL EXCEPTION: ma...
0debug
static int swScale(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]) { const int srcW= c->srcW; const int dstW= c->dstW; const int dstH= c->dstH; const int chrDstW= c->chrDstW; cons...
1threat
I am new to python programming and I need help in finding numbers less than the number the user has entered with loops. How do I do that? : With this code, I only get to test if the number the user entered is prime or not. How do I add another loop to this code in order to find all the prime numbers less than or equa...
0debug
remove or \r in javscript or C# : how can I remove or replace \r in javascript text or in backend code in C# I have a variable in javascript like this : var text=name\r\hi\r\ > \r means line break or next line I try to this apporach to replace : text=text.replace("r",","); but dosent work
0debug
Passing arguments from one script to another, in a script : <p>I am trying to pass a python script variables from another python script in a python script. What I am trying to do in code form:</p> <p>file1.py</p> <pre><code>global x x = 7 </code></pre> <p>file2.py</p> <pre><code>print x </code></pre> <p>file3.py</...
0debug
How to upload file to AWS S3 using AWS AppSync : <p>Following <a href="https://docs.aws.amazon.com/appsync/latest/devguide/building-a-client-app-react.html#complex-objects" rel="noreferrer">this docs/tutorial</a> in AWS AppSync Docs.</p> <p>It states:</p> <blockquote> <p>With AWS AppSync you can model these as Grap...
0debug
static int mlp_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size) { MLPParseContext *mp = s->priv_data; int sync_present; uint8_t parity_bits; int next;...
1threat
want to get the value of array key : <p>I have a complicated array and want to find the value of this. but the problem is answer getting like 0,1,2,3,4,5</p> <p>following is the code to getting the value of state of array</p> <pre><code>var shardState = Object.keys(mydata.cluster.collections[collectionName].shards[St...
0debug
static int cpu_x86_fill_model_id(char *str) { uint32_t eax, ebx, ecx, edx; int i; for (i = 0; i < 3; i++) { host_cpuid(0x80000002 + i, 0, &eax, &ebx, &ecx, &edx); memcpy(str + i * 16 + 0, &eax, 4); memcpy(str + i * 16 + 4, &ebx, 4); memcpy(str + i * 16 + 8, &ecx,...
1threat
Why is sub class' static code getting executed? : <p>I have written the following code and created object for the super class.</p> <pre><code>class SuperClass{ static int a=2; static int b(){ return 2; } int c(){ return 2; } SuperClass(){ System.out.println("Super"); ...
0debug
Jira - Auto-Calculate Estimate based on story point : <p>Is there a way within Jira that I can auto assign an Estimate value when I assign Story points to an issue? </p> <p>As a business we get great use out of both - but I'm finding it slightly annoying to have to enter the data in multiple places. </p> <p>Understoo...
0debug
PIP 10.0.1 - Warning "Consider adding this directory to PATH or..." : <pre><code>The script flake8.exe is installed in 'c:\users\me\appdata\local\programs\python\python36-32\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. <...
0debug
getElementById returns an object instead of an element : <p>I have an input with an id of <code>name</code>:</p> <pre><code>&lt;input type="text" id="name"&gt; </code></pre> <p>When I run <code>document.getElementById("name")</code> in the console, I get the element itself (<code>&lt;input type="text" id="name"&gt;</...
0debug
static int get_int8(QEMUFile *f, void *pv, size_t size) { int8_t *v = pv; qemu_get_s8s(f, v); return 0; }
1threat
How to set the root directory for Visual Studio Code Python Extension? : <p>I have no trouble running and debugging my project with VSCode Python Extension (<code>ms-python.python</code>), but since python sub-project root directory is not the whole project directory, all imports from my sources are underlined with red...
0debug
why is smalltalk the second most love programming language : <p><a href="https://i.stack.imgur.com/8AegY.png" rel="nofollow noreferrer">smalltalk second most loved</a></p> <p>What is smalltalk used for that makes it so popular? Where can I learn some basic smalltalk?</p>
0debug
Wordpress: plugin generated 11 characters of unexpected output during the activation : <p>I use Wordpress and my plugin generated 11 characters of unexpected display during the activation but i don't know why. I'm I trying to activate the plugin and to generate the table on Workbench.</p> <p><div class="snippet" data-...
0debug
Keras (Tensorflow backend) slower on GPU than on CPU when training certain networks : <p>I am having some difficulty understanding exactly why the GPU and CPU speeds are similar with networks of small size (CPU is sometimes faster), and GPU is faster with networks of larger size. The code at the bottom of the question ...
0debug
How do I return to a previous step after throwing an exception rather than from the beginning of my program? : The code I'm working on is a main method to test a class called Triangle that takes two doubles and is used to calculate the hypotenuse of a triangle. My code is set up to throw exceptions whenever the inpu...
0debug
Parse poisson function in javascript to php : <p>I have the next code in javascript:</p> <pre><code>var exponential = 2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746; var numerator, denominator; function fact(x) { if(x==0) { return 1; } return x * fact(...
0debug
int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs, struct image_info * info) { struct elfhdr elf_ex; struct elfhdr interp_elf_ex; struct exec interp_ex; int interpreter_fd = -1; abi_ulong load_addr, load_bias; int load_addr_set = 0; un...
1threat
How can I compile this program in C with Oracle Solaris 10 1/13 s10s_u11wos_24a SPARC : <p>Hello everyone Im triying to compile a C program correctly, but when I run the program throw the Error Ivalid Argument.</p> <p>Im tried to put the architecture type like -xarch=sparc or -m64 but nothing</p> <pre><code>bash-3.2$...
0debug
Can I run Windows on a server? : <p>I want a Windows machine to act as a server, being able to open ports to clients and send data to them over the Internet.</p> <p>Is it possible to install Windows on any server to act like it or should I purchase Windows Server?</p> <p>I have never truly worked with servers before ...
0debug
static void dnxhd_decode_dct_block_8(const DNXHDContext *ctx, RowContext *row, int n) { dnxhd_decode_dct_block(ctx, row, n, 4, 32, 6); }
1threat
How to upload and read CSV files in React.js? : <p>I would like the user to upload a .csv file, and then have the browser be able to parse the data from that file. I am using ReactJS. How would this work? Thanks.</p>
0debug
how select field work when we have multiple and we can choose only one second will b disable according to choose item : how to choose one field in select box if one will choose second one will be disable and if second one will choose than first one will be disable how it will work help me for that `<select> </s...
0debug
static av_cold int init(AVFilterContext *ctx, const char *args0) { PanContext *const pan = ctx->priv; char *arg, *arg0, *tokenizer, *args = av_strdup(args0); int out_ch_id, in_ch_id, len, named, ret; int nb_in_channels[2] = { 0, 0 }; double gain; if (!args0) { av_log(ctx, AV_L...
1threat
static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { MOVFragment *frag = &c->fragment; AVStream *st = NULL; MOVStreamContext *sc; uint64_t offset; int64_t dts; int data_offset = 0; unsigned entries, first_sample_flags = frag->flags; int flags, distance, i; ...
1threat
static always_inline void gen_store_mem (DisasContext *ctx, void (*tcg_gen_qemu_store)(TCGv t0, TCGv t1, int flags), int ra, int rb, int32_t disp16, int fp, int clear, int local) { TCGv ad...
1threat
Expected a file name : <p>So basically, I was looking at this source code to try and edit it and learn from it, but I'm constantly getting an "Expected a file name" error (E0013) With any source code that I attempt to use... Error is on the first line (using scripts\codescripts\struct) "scripts"</p> <pre><code>#using ...
0debug
Uncaught SyntaxError: Failed to execute 'querySelector' on 'Document' : <pre><code>'&lt;button id="'+item['id']+'" class="btnDeactivateKeyInChildPremiumCustomer waves-effect waves-light&gt;ok&lt;/button&gt;' </code></pre> <p>I used above code for generating button inside of jquery each function.The button created dyna...
0debug
How do you make a dictionary inverse and then use that to swap letters in a string in Python : <p>quick explanation of what im trying to do. I've been wondering how to inverse a dictionary as im trying to make a Monoalphabetic cipher which will help me for a challenge soon. My aim after learning how to inverse a dictio...
0debug
Pandas DataFrame sort ignoring the case : <p>I have a Pandas dataframe in Python. The contents of the dataframe are from <a href="https://en.wikipedia.org/wiki/UK_Singles_Chart_records_and_statistics#Most_weeks_at_number_one" rel="noreferrer">here</a>. I modified the case of the first alphabet in the "Single" column sl...
0debug
Can R Create a plot like this? : <p>The plot below (taken from a e-text book on statistics) shows some hypothetical data for TV advertising dollars and associated sales. A line is fitted for the data and then the error of each data point is shown. Is there a pre-created plot like this that exists either using the nativ...
0debug
static int mszh_decomp(unsigned char * srcptr, int srclen, unsigned char * destptr) { unsigned char *destptr_bak = destptr; unsigned char mask = 0; unsigned char maskbit = 0; unsigned int ofs, cnt; while (srclen > 0) { if (maskbit == 0) { mask = *(srcptr++); ...
1threat
What is the difference between events and helpers? : <p>What is the difference between <code>Meteor.templateName.events</code> and <code>Meteor.templateName.helpers</code>.</p> <p>and how do I know which one I need to implement for my template?</p>
0debug
static av_cold int raw_close_decoder(AVCodecContext *avctx) { RawVideoContext *context = avctx->priv_data; av_freep(&context->buffer); return 0; }
1threat
static int video_open(VideoState *is) { int w,h; if (screen_width) { w = screen_width; h = screen_height; } else { w = default_width; h = default_height; } if (!window) { int flags = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE; if (!window_...
1threat
How can I select max TASK_ID and CREATED_DATE from below data? Have already tried using MAX and DISTINCT : I have this data: REFERENCE_NO TASK_ID CREATED_DATE 244038 83102 2020-01-14 09:23:21:000000 244038 83114 2020-01-14 09:23:21:867000
0debug
Parsing in Java : <p>I have a few, theoretical ideas, but I don't know the language well. We basically need to make a rudimentary lexical analyzer. I have most of the bits, but here's the context. The straight-forward question is at the end.</p> <p>I need to read in a line from the console, then see if parts match up ...
0debug
HTML Password pattern with minimal requirements : I've a little problem with a pattern for a input password. I need that this has this pattern but I can't find any solution for this problem. The password value needs: - 8 characters minimal length. - Begin with a number. - Finish with a uppercase letter. ...
0debug
can frontend-maven-plugin use node, npm already installed? : <p>I am new using maven and frontend-maven-plugin. I understand that we can add this code to pom.xml to run grunt for example:</p> <pre><code> &lt;plugin&gt; &lt;groupId&gt;com.github.eirslett&lt;/groupId&gt; &lt;artifactId&gt...
0debug
Creating a List "C" in HASKELL, which is a specific Composition of A and B lists : Im just starting to learn Haskell, and I have to create a function "**composite**" that receives 2 lists A and B (with same type) as input and outputs a new list "C", which is a composition of both A and B, specifically - list C has to i...
0debug
Dropzone Submit Button on Upload : <p>I want to add a button upload to my dropzone file uploader. currently it's uploading the file directly after selecting or dragging the file into the dropzone area. What I want to do is: 1. Select or drap file to be uploaded. 2. Validate 3. Hit or press the button upload to upload t...
0debug
char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int width, int height, void *log_ctx) { int ret; char *name = NULL; char *supported_type = NULL; int attached = 0; JNIEnv *env = NULL; struct JNIAMediaCodecListFields jfields = { 0 }; jobject format = NULL; jobjec...
1threat
(Swift iOS) Getting all numbers below a certain integer : Quick Question. I was wondering how to be able to get all the numbers below a certain integer. So like if the number is 5, it should get 4,3,2,1,
0debug
static void glib_select_fill(int *max_fd, fd_set *rfds, fd_set *wfds, fd_set *xfds, uint32_t *cur_timeout) { GMainContext *context = g_main_context_default(); int i; int timeout = 0; g_main_context_prepare(context, &max_priority); n_poll_fds = g_main_context_q...
1threat
What is wrong with this post? : Is there any typo error? I cannot find any! It is a simple crud application with slim framework I am using mysql database... slim version is 2.6.2 Image of postman: [![enter image description here][1]][1] // Adds a customer function addCustomer() { //$request =...
0debug
Commit message with --no-verify with git kraken : <p>I want to ignore git hook in some scenario i have.</p> <p>How can i commit using <code>gitKraken</code> while specifying <code>--no-verify</code> flag.</p> <p>Thanks.</p>
0debug
make Ionic App visible only for mobile phone : my app does not have registration, how can I make it visible only for trusted mobile phone ? and How can I prevented to use my api publicly ?
0debug
void put_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h) { POWERPC_TBL_DECLARE(altivec_put_pixels16_num, 1); #ifdef ALTIVEC_USE_REFERENCE_C_CODE int i; POWERPC_TBL_START_COUNT(altivec_put_pixels16_num, 1); for(i=0; i<h; i++) { *((uint32_t*)(block )) = (((const stru...
1threat
How to generate 3 non repeated random numbers from a range? : <p>Using PHP, how can I select 3 numbers from a numbers range, that don't repeat theirselves?</p> <p>For example from a range 1 - 100, an answer may be 5, 32, 12, but not 5, 5, 93</p> <p>Thank you</p>
0debug
static int get_transform_coeffs1(uint8_t *exps, uint8_t *bap, float chcoeff, float *coeffs, int start, int end, int dith_flag, GetBitContext *gb, dither_state *state) { int16_t mantissa; int i; int gcode; mant_group l3_grp, l5_grp, l11_grp; for (i = 0; i < 3; i++) ...
1threat
How can ı add new drawer items? but ı get exception : when ı add much more driwerItem ı get exception. How can ı fix. please help..:) https://github.com/flutter-tuts/drawer_demo
0debug
Where is documentation on Python's `set`'s class methods? : I gather that Python's built-in type `set` has a number of useful class methods, such as `set.intersection()`. Where are they documented? I haven't found them documented [here](https://docs.python.org/3.7/library/stdtypes.html?highlight=set#set), which seems t...
0debug
why i can not write subroutine between do and write? : [enter image description here][1] [enter image description here][2]com/UqpSq.png [1]: https://i.stack.imgur. [2]: https://i.stack.imgur.com/El05K.png
0debug
How are pointers derefrenced in C/C++? From addr to addr+size or addr-size on a modern linux machine? : If I have a pointer `p`. I want to read 4 bytes i.e data from `p` to `p+3` address. Will casting `p` to `int *` and dereferencing give me the data?
0debug
Python Waiting for a Button press and execute accordingly : from gpiozero import Button, LED from time import time, sleep from random import randint led = LED(17) btn = Button(27) while True: btn.wait_for_release() start = time() led.on() btn.wait_for_press() end = time() led.o...
0debug
How to Default a program using c# : <p>I created a media player in winforms.i want to default it using c#.when you clicked an mp3 anywhere ,windows media player open that mp3file.i want to my program open files when double clicked on a mp3 or other files.</p> <p>I hope someone helps me.</p>
0debug
static void gen_neon_dup_u8(TCGv var, int shift) { TCGv tmp = new_tmp(); if (shift) tcg_gen_shri_i32(var, var, shift); tcg_gen_ext8u_i32(var, var); tcg_gen_shli_i32(tmp, var, 8); tcg_gen_or_i32(var, var, tmp); tcg_gen_shli_i32(tmp, var, 16); tcg_gen_or_i32(var, var, tmp); ...
1threat
How to exchange or return varibale values in different methods within same class in python? : <blockquote> <p>I want to pass a method value to to other method of the same class</p> </blockquote> <pre><code>class abc: def me(self): self.x = 5 def you(self): print('I want to print here -&gt;...
0debug
static void build_pci_bus_end(PCIBus *bus, void *bus_state) { AcpiBuildPciBusHotplugState *child = bus_state; AcpiBuildPciBusHotplugState *parent = child->parent; GArray *bus_table = build_alloc_array(); DECLARE_BITMAP(slot_hotplug_enable, PCI_SLOT_MAX); DECLARE_BITMAP(slot_device_present, PCI...
1threat
Random number always 0 : <p>I have a function that generates a number and i'm pushing it into my array, but the number generated is always 0, why ?</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js pret...
0debug