problem
stringlengths
26
131k
labels
class label
2 classes
ArrayList duplicates removal : <p>I have an Arraylist with pings, these are dates linked to a name, I want to delete all duplicates of the names and keep the closest date of the name.</p> <p><strong>Code</strong></p> <pre><code>private ArrayList &lt;String&gt; deleteDuplicates() { ArrayList &lt;Ping&gt; tempPings =...
0debug
No R interpreter defined: Many R related features like combination, code checking and help won't be available : <p>I am newbie to pycharm , I have installed this and everytime I got an error when I created a new project , K am not able to find the solution plz help me out .</p> <p>[ No R interpreter defined. Many R r...
0debug
Predict an estimate based on image and numerical value : <p>I am trying to predict a number based on an image and a numerical value. To put it in a practical matter, let's say I am trying to add to the standard house price predictor an image. So among the other features (price, sqm, no of rooms, etc.) there will be an ...
0debug
static void sdram_unmap_bcr (ppc4xx_sdram_t *sdram) { int i; for (i = 0; i < sdram->nbanks; i++) { #ifdef DEBUG_SDRAM printf("%s: Unmap RAM area " TARGET_FMT_plx " " TARGET_FMT_lx "\n", __func__, sdram_base(sdram->bcr[i]), sdram_size(sdram->bcr[i])); #endif cpu_register_...
1threat
Boxing/Unboxing in C# : <p>I'm having trouble with a C# assignment dealing with boxing/unboxing. Here are the directions:</p> <ul> <li>Create an empty List of type object</li> <li>Add the following values to the list: 7, 28, -1, true, "chair"</li> <li>Loop through the list and print all values (Hint: Type Inference mi...
0debug
USBBus *usb_bus_new(DeviceState *host) { USBBus *bus; bus = FROM_QBUS(USBBus, qbus_create(&usb_bus_info, host, NULL)); bus->busnr = next_usb_bus++; TAILQ_INIT(&bus->free); TAILQ_INIT(&bus->used); TAILQ_INSERT_TAIL(&busses, bus, next); return bus; }
1threat
Is c1.equals(c2) true or false? : <p>I have to guess the output for this code sequence:</p> <pre><code>Circle c1 = new Circle(5); Circle c2 = new Circle(5); Circle c3 = new Circle(15); Circle c4 = null; System.out.println(c1==c1); System.out.println(c1==c2); System.out.println(c1==c3); System.out.println(c1.equals(c1)...
0debug
What is __ChadronAlwaysEqualString? : <p>I have a cloud based Ruby app with a public API. My server log files are showing attempts to access the API with the above odd parameter. Specifically, I have a GET request like :</p> <pre><code>GET "/tenant/api/resource/__ChadronAlwaysEqualString </code></pre> <p>I Googled th...
0debug
passing char pointer to the function in C. just thirst position is taken : I have a tiny problem. I want to pass a string (char pointer) to a function. In the function, I can just pass the first position of the char pointer. Here is the code-snippet: void put(struct DataItem* hashArray[SIZE], char* key){ ...
0debug
How to get iOS device apps count? : <p>I am working on to get the total apps count of the User device, Please let me know if somebody has an answer to this Topic. </p>
0debug
static target_ulong h_client_architecture_support(PowerPCCPU *cpu, sPAPRMachineState *spapr, target_ulong opcode, target_ulong *args) { target_ulong list = ppc64...
1threat
Get text from header besides some attrbute : Elements on the page map like this: <!-- language: lang-html --> <span [@class="some class"]> <h1> Some text <a> another text </a> </h1> </span> How could I write xpath for getting text under "h1" besides "a" ? "a" is child for "h1"...
0debug
How do I infinitely repeat a sequence in Kotlin? : <p>I want to infinitely repeat <code>T</code> elements in a <code>Sequence&lt;T&gt;</code>. This can't be done using <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/as-sequence.html" rel="noreferrer">kotlin.collections.asSequence</a>. For examp...
0debug
java.lang.Exception: No tests found matching Method using Intellij IDEA : <p>I am experiencing a strange behavior of Intellij IDEA 2016.3. Having a class with method <code>foo</code> and a JUnit test for the method when I get <code>java.lang.Exception: No tests found matching Method foo</code> when running the test. Af...
0debug
static QObject *visitor_get(TestOutputVisitorData *data) { visit_complete(data->ov, &data->obj); g_assert(data->obj); return data->obj; }
1threat
Split string to array - JavaScript - ES6 : Hove I split this string to array with Javascript ES6 Syntax? let dataString = "<p>Lorem ipsum</p> <figure><img src="" alt=""></figure> <p>Lorem ipsum 2</p> <figure><img src="" alt=""></figure>" I want do my array look like this: let dataArray = ["<p>Lorem ips...
0debug
static uint64_t empty_slot_read(void *opaque, target_phys_addr_t addr, unsigned size) { DPRINTF("read from " TARGET_FMT_plx "\n", addr); return 0; }
1threat
static int kvm_irqchip_create(MachineState *machine, KVMState *s) { int ret; if (!machine_kernel_irqchip_allowed(machine) || (!kvm_check_extension(s, KVM_CAP_IRQCHIP) && (kvm_vm_enable_cap(s, KVM_CAP_S390_IRQCHIP, 0) < 0))) { return 0; } ret = kvm_arch_irqchi...
1threat
int qemu_read_config_file(const char *filename) { FILE *f = fopen(filename, "r"); int ret; if (f == NULL) { return -errno; } ret = qemu_config_parse(f, vm_config_groups, filename); fclose(f); if (ret == 0) { return 0; } else { return -EINVAL; ...
1threat
How to generate numeric Numbers? : when ever i call one method I need to generate random Numbers.like `test 1` next time `test 2`like that. If i use below code it is generating different numbers. `NSInteger randomNumber = arc4random() % 16;`. But I need one after another please help me.
0debug
static void tcx_screen_dump(void *opaque, const char *filename, bool cswitch, Error **errp) { TCXState *s = opaque; FILE *f; uint8_t *d, *d1, v; int ret, y, x; f = fopen(filename, "wb"); if (!f) { error_setg(errp, "failed to open file '%s': %s", fil...
1threat
void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr) { CPUState *cpu; PageDesc *p; uint32_t h; tb_page_addr_t phys_pc; assert_tb_locked(); atomic_set(&tb->cflags, tb->cflags | CF_INVALID); phys_pc = tb->page_addr[0] + (tb->pc & ~TARGET_PAGE_MASK); ...
1threat
Trying to change the INSTALLDIR value to $APPDATA, but won't work. : <!-- What are you trying to accomplish? (Please include sample data.) --> I'm trying to make an installer to extract some texture packs and stuff into the AppData folder, but keeps changing to program files. (Its for school, they have a gaming club, ...
0debug
static void usbredir_alt_setting_status(void *priv, uint32_t id, struct usb_redir_alt_setting_status_header *alt_setting_status) { USBRedirDevice *dev = priv; AsyncURB *aurb; int len = 0; DPRINTF("alt status %d intf %d alt %d id: %u\n", alt_setting_status->status, a...
1threat
Android Studio, ImageButton not working when multi-threading. How to solve this? : came across a major problem while game developing in Android Studio. I've made a Class which creates a separate thread. The class it's purphose is to be an animation of a cloud moving: `package com.example.j9.triqshot;` `import and...
0debug
static void sdhci_data_transfer(void *opaque) { SDHCIState *s = (SDHCIState *)opaque; if (s->trnmod & SDHC_TRNS_DMA) { switch (SDHC_DMA_TYPE(s->hostctl)) { case SDHC_CTRL_SDMA: if ((s->trnmod & SDHC_TRNS_MULTI) && (!(s->trnmod & SDHC_TRNS_BLK_CNT_EN) || s...
1threat
Only Enable the last Remove Element Button of a ListBox : <p>In my ListBox.ItemTemplate i have a TextBlock and a Remove button, the button must be enabled only if it's the last element o the listbox.</p>
0debug
Sorting alphabetically in ruby on rails : <p>How do i make ActiveRecord to sort my movies title alphabetically when i click on a link in ruby on rails? Movies contains title with alphabets and others numbers. Thanks</p>
0debug
static int vid_read_packet(AVFormatContext *s, AVPacket *pkt) { BVID_DemuxContext *vid = s->priv_data; AVIOContext *pb = s->pb; unsigned char block_type; int audio_length; int ret_value; if(vid->is_finished || pb->eof_reached) return AVERROR(EIO); ...
1threat
def check_subset(test_tup1, test_tup2): res = set(test_tup2).issubset(test_tup1) return (res)
0debug
Code help to Play Multiple Sounds (objective c) to swift(x-code 7) : Hi programmers i am new to programming language! Trying to convert the below code (objective c ) to swift plz help me by doing so or help me with a new code to play MULTIPLE SOUNDS *** -(IBAction)pushButton { NSString *path = [[NSBund...
0debug
Parsing JSON as String in Javascript : <p>I have a String whose value is a JSON object.</p> <pre><code>var json = '{ "Name": { "1": "Adam", "2": "Tim", "3": "Bob" }, "Height": { "1": "181", "2": "157", "3": "173" } }'; </code></pre> <p>How to parse it to get values <strong>Adam</strong>, <stro...
0debug
ASP.NET Core 2.1 Identity: How to remove the Default UI razor pages? : <p>Expanding the answer in this question: <a href="https://stackoverflow.com/questions/50682108/change-routing-in-asp-net-core-identity-ui/50682681">Change routing in ASP.NET Core Identity UI?</a></p> <blockquote> <p>Javier recommends one of the ...
0debug
static int usb_qdev_init(DeviceState *qdev) { USBDevice *dev = USB_DEVICE(qdev); int rc; pstrcpy(dev->product_desc, sizeof(dev->product_desc), usb_device_get_product_desc(dev)); dev->auto_attach = 1; QLIST_INIT(&dev->strings); usb_ep_init(dev); rc = usb_claim_port(dev)...
1threat
Referencing a Managed Service Identity in ARM-template deploy : <p>When deploying a Microsoft.Web resource with the new MSI feature the principleId GUID for the created user is visible after deployment. Screenshot below shows the structure in the ARM-template.</p> <p><a href="https://i.stack.imgur.com/nr4b8.png" rel="...
0debug
int qemu_strtoul(const char *nptr, const char **endptr, int base, unsigned long *result) { char *p; int err = 0; if (!nptr) { if (endptr) { *endptr = nptr; } err = -EINVAL; } else { errno = 0; *result = strtoul(nptr, &p, ba...
1threat
@RestController @ResponseBody @RequestBody cant ready Model : We has "web service" rest with this O problem consist in ready object with model, when ready attribute for attribute can ready, - Project with spring 4.2.4-RELEASE - User jackson 2.8.0 same stacktrace wrong, same call method create <pre><code> ...
0debug
Miliseconds in C# - long or int? : <p>I'm working with Milisecond and I've used it like </p> <pre><code>Timeout = (int)TimeSpan.FromMinutes(TimeoutVal).TotalMilliseconds </code></pre> <p>But I read on few places people are casting it to <code>long</code> instead of <code>int</code>? Why is that?</p>
0debug
Initialization functionality unavailable for this session, in google Ads : <p>I'm getting this error of google Ads, suddently. I can't find anything here with this error. </p> <p>Notice that ads are displaying correctly</p> <pre><code>Google Mobile Ads SDK initialization functionality unavailable for this session. Ad...
0debug
I am using editText for password field in android. How to show the password visible for few seconds and then mask it with asterisk symbol?. : https://lh3.googleusercontent.com/-JqvpdKKQ2Eo/UOB9ixNzpLI/AAAAAAAAApQ/6nH9bvwc1ko/s512/p2.png The output should look like this image.
0debug
using *args and **kwargs as a substitute for function's arguments : <p>I hava a question about *args and **kwargs. I know that they are used when you do not know how many arguments will be passed to function. But can it be a substitute for some arguments that are actually required when I do not know what those are? </p...
0debug
static void throttle_fix_bucket(LeakyBucket *bkt) { double min; bkt->level = bkt->burst_level = 0; min = bkt->avg / 10; if (bkt->avg && !bkt->max) { bkt->max = min; } }
1threat
void qbus_free(BusState *bus) { DeviceState *dev; while ((dev = QLIST_FIRST(&bus->children)) != NULL) { qdev_free(dev); } if (bus->parent) { QLIST_REMOVE(bus, sibling); bus->parent->num_child_bus--; } if (bus->qdev_allocated) { qemu_free(bus); }...
1threat
can't remove parameter using javascript : <p>i have a url like this</p> <pre><code>test.html?dir=asc&amp;end_date=2016-09-23&amp;order=created_at&amp;start_date=2016-08-14 </code></pre> <p>i want to remove the parameter using the following javascript</p> <pre><code>function removeParam(uri) { uri = uri.replace(...
0debug
Nodemcu temperature readings to raspberry pi wireless : I'm currently having issues sending data collected from a temperature sensor to my raspberry-pi. The PI says it hasn't received any data. I'm also not sure how GET and POST work. I'm fairly new to this stuff so any help would be much appreciated. Also can someone ...
0debug
Property 'switchMap' does not exist on type 'Observable<User>' : <p>I have been getting the following error message when trying to apply the switchMap operator to my Observable:</p> <blockquote> <p>Property 'switchMap' does not exist on type 'Observable'.</p> </blockquote> <p>I'm currently using rxjs version 5.5.2,...
0debug
static av_cold void x8_vlc_init(void){ int i; int offset = 0; int sizeidx = 0; static const uint16_t sizes[8*4 + 8*2 + 2 + 4] = { 576, 548, 582, 618, 546, 616, 560, 642, 584, 582, 704, 664, 512, 544, 656, 640, 512, 648, 582, 566, 532, 614, 596, 648, 586, 552, 584,...
1threat
When I compress a tar gz file using paths, folders get included : <p>When I compress a tar gz file using paths, folders get included. However, I want to just compress the file only. This is what I tried:</p> <pre><code>$ tar -czf ../coolfile.tar.gz newfol/coolfile </code></pre> <p>When I uncompress this tar.gz, I get...
0debug
static inline void RENAME(hScale)(int16_t *dst, int dstW, const uint8_t *src, int srcW, int xInc, const int16_t *filter, const int16_t *filterPos, int filterSize) { #if COMPILE_TEMPLATE_MMX assert(filterSize % 4 == 0 && filterSize>0); if (filterSize==4) { x86_reg...
1threat
Can anyone extract significant digit from 0.0007? : I want to extract significant digit of 7 from XX=0.0007 The code is as follows XX=0.0007 enX1=XX//10**np.floor(np.log10(XX)); But XX becomes 6 not 7. Can anyone help me? Thank you!!!
0debug
static int cloop_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVCloopState *s = bs->opaque; uint32_t offsets_size, max_compressed_block_size = 1, i; int ret; bs->read_only = 1; ret = bdrv_pread(bs->file, 128, &s->block_size, 4); if (ret < 0) ...
1threat
prevent bots / scrappers executing javascript to get output : <p>I see allot about Cpatcha's and Submission forms / methods to block bots and content scrappers / leechers but nothing about blocking those who take the entire JavaScript contents and execute it to obtain and view what it is outputting.</p> <p>Is it possi...
0debug
Invert Angular 2 *ngFor : <pre><code>&lt;li *ngFor="#user of users "&gt; {{ user.name }} is {{ user.age }} years old. &lt;/li&gt; </code></pre> <p>Is it possible to invert the ngFor that the items are added bottom up? </p>
0debug
No return in function in R : <pre><code>&gt; B_linkages &lt;- function (J,j) {sum((X-X_omit(J,j))/X[j+56*(J-1)])} &gt; B_linkages(1,1) [1] 0.9723767 </code></pre> <p>This one works just fine but</p> <pre><code>&gt; B_linkages_inter &lt;- function (I,J) { + for (j in 1:56) { + for (i in 1:56) { + sum((X[i+...
0debug
Java Array Index Out Of Bounds Error For Array That Shouldn't Be Going Off Bounds : Hello helpful strangers on StackExchange. I have recently been working on a bit of a Java code and seems like I'm stuck. Here is my code http://pastebin.com/XcFWjbUt This line in particular: ma[count - 1] += 1; Keeps going ou...
0debug
Pip install of scikit-learn: No matching distribiution found. : <p>I am trying to install scikit-learn through pip on Mac OSX. I have updated all of numpy, scipy and pip itself but when I type:</p> <blockquote> <p>"pip install scikit-learn -U" </p> </blockquote> <p>I receive an error saying:</p> <blockquote> <p>...
0debug
NOOB! Replacing part of a string using a For loop : Hi i am a complete python and coding NOOB. recently started a college course. currently on For loops and have a question where i need to get a user to enter a sentence. using a FOR loop i then need to replace all spaces with %20 in order to prep the string to be used ...
0debug
ListView in BottomSheet : <p>I ran into a problem where I had a simple <code>ListView</code> in a <code>BottomSheet</code> and <code>ListView</code> had enough items to fill the screen and scroll even more.</p> <p>When I scroll down, everything seems to work however when I tried to scroll back up, it was scrolling the...
0debug
static int dnxhd_10bit_dct_quantize(MpegEncContext *ctx, DCTELEM *block, int n, int qscale, int *overflow) { const uint8_t *scantable= ctx->intra_scantable.scantable; const int *qmat = ctx->q_intra_matrix[qscale]; int last_non_zero = 0; ctx->dsp.fdct(block); ...
1threat
Python 3 type annotations and subclasses : <p>How do I refer to 'any object that subclasses a parent class' in Python type annotations?</p> <p>Example: <code>FooBase</code> is an abstract base class, from which <code>Foo1</code>, <code>Foo2</code>, etc. are subclassed. I want the function to accept any descendant of <...
0debug
TypeError 'x' is not a function : <p>TypeError: this.props.handleClick is not a function</p> <pre><code>class Task extends React.Component{ render(){ return( &lt;div className="Task"&gt; &lt;span style = {{ textDecoration : this.props.todo.done ? 'line-through' : 'none'}}&gt;{t...
0debug
How to stop the loop when the same values appear in the list in Python? : [enter image description here][1] [1]: https://i.stack.imgur.com/RmOKX.png Above my task. I have to stop the loop when the same items appear in the list then sum them. def squareA(a,b): res = [] z = 0 ...
0debug
alert('Hello ' + user_input);
1threat
how can change some [MSChart] series AxisLabel in c# : I want to change some series not all of them for my chart I tried but I didn't solve this challenge I wanna learn it for my progress Thank You Masters
0debug
static int transcode(void) { int ret, i; AVFormatContext *is, *os; OutputStream *ost; InputStream *ist; uint8_t *no_packet; int no_packet_count = 0; int64_t timer_start; if (!(no_packet = av_mallocz(nb_input_files))) exit_program(1); ret = transcode_init(); ...
1threat
How does SQL SERVER broke down View code and pick the right tables to extract? : I encountered a problem regarding views in SQL SERVER 2017. When query with a view, which has multiple underlying tables behind. Besides table involved in SELECT Clause, other tables also get logical read by SQL Server, want to know why. ...
0debug
Error on amazon SES: SendEmail operation: Illegal addres : <p>I'm trying to send email through <a href="http://docs.aws.amazon.com/ses/latest/DeveloperGuide/setting-up-email.html" rel="noreferrer">AWS SES</a>, but I'm receiving this error:</p> <pre><code>botocore.exceptions.ClientError: An error occurred (InvalidParam...
0debug
static int svag_read_header(AVFormatContext *s) { unsigned size, align; AVStream *st; avio_skip(s->pb, 4); st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); size = avio_rl32(s->pb); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; s...
1threat
No 'Access-Control-Allow-Origin' header is present on the requested resource while accessing a local server by angular app : <p>I was trying to get results from a local server. The class which I am using in the service is as follows:</p> <pre><code>@Injectable() export class GridSearchService { server = 'http://127...
0debug
static void tgen_ext8s(TCGContext *s, TCGType type, TCGReg dest, TCGReg src) { if (facilities & FACILITY_EXT_IMM) { tcg_out_insn(s, RRE, LGBR, dest, src); return; } if (type == TCG_TYPE_I32) { if (dest == src) { tcg_out_sh32(s, RS_SLL, dest, TCG_REG_NONE, 24); ...
1threat
def rgb_to_hsv(r, g, b): r, g, b = r/255.0, g/255.0, b/255.0 mx = max(r, g, b) mn = min(r, g, b) df = mx-mn if mx == mn: h = 0 elif mx == r: h = (60 * ((g-b)/df) + 360) % 360 elif mx == g: h = (60 * ((b-r)/df) + 120) % 360 elif mx == b: h = (60...
0debug
No javascript source from Github pages : <p>I cannot find the javascript source for a resume I'm trying to host on github pages. I'm not sure what is wrong...</p> <p>Here is a link to the site <a href="https://rowansdabomb.github.io/" rel="nofollow">https://rowansdabomb.github.io/</a></p> <p>Thanks in advance for any...
0debug
undefined reference to outputVLI? : I have to make 2 arrays and use functions to input, output, add, and compare them but I keep getting error message: "undefined reference to outputVLI(int*, int)". I am not sure what this means or how to fix it. Any help would be appreciated #include <iostream> using names...
0debug
how to get specific data from Json and display in Google map in rails : i connected to DB NOSQL online return json value for example `{"_id"=>"5b2e880c1de0c46b00001dda", "gps_lattitude"=>"30.63","gps_longitude"=>"31.09", "gps_speed_kph"=>"0.1", "gps_heading"=>"129.36", "gsm_csecond"=>58, "gsm_second"=>46, "g...
0debug
How to redirect a .html file to a subfolder? : <p>I trying to create an online multilingual cv by using html. Just I don't find any solutions how can redirect "www.cv.com/cvfiles/index_en.html" url to "www.cv.com/en/cvfiles/" ? As well with French (index_fr.html) and German (index_de.html) too...</p> <p>All files of t...
0debug
def remove_odd(l): for i in l: if i % 2 != 0: l.remove(i) return l
0debug
Postgres Docker image is not creating database with custom name : <p>The documentation of the <code>postgres</code> Docker image <a href="https://hub.docker.com/_/postgres/#postgres_db" rel="noreferrer">says</a> the following about the env var <code>POSTGRES_DB</code>:</p> <blockquote> <p>This optional environment v...
0debug
static int xen_add_to_physmap(XenIOState *state, hwaddr start_addr, ram_addr_t size, MemoryRegion *mr, hwaddr offset_within_region) { unsigned long i = 0; int rc = 0; XenPhysmap *p...
1threat
static int parse_frame_header(DCACoreDecoder *s) { DCACoreFrameHeader h = { 0 }; int err = avpriv_dca_parse_core_frame_header(&s->gb, &h); if (err < 0) { switch (err) { case DCA_PARSE_ERROR_DEFICIT_SAMPLES: av_log(s->avctx, AV_LOG_ERROR, "Deficit samples are not supporte...
1threat
Converting Decimal value to Binary in Java.(problem with used method in this code!) : Sir! here my problem is on method. in this code used method was void type. ok then why there is return and next it does recursion! if anyone little describe it, then i think it will be easy for me :) ` import java.util.S...
0debug
Is it possible to add two functions together in C++? : <p>I am looking for a way to return the addition of two functions within int main(). Is this possible or do I have to take the long route?</p>
0debug
how do i insert expandable listview child item into sqlite? : <p>I am new in android. I want to insert expandable listview child click item into sqlite database Any help please give me suggestion.</p>
0debug
Using Php and Mysql : <p>I recently joined this forum because I was impressed with the way problems are solved.. And i hope you guys will be of help..</p> <p>K..I recently started working on php and mysql, and I have been able to create a database, login and sign up form.. I want to create a peer to peer donation w...
0debug
Batch - Commenting on YouTube : <p>I would like to create a simple program that can comment on youtube videos automatically. If This is possible then maybe i can find a Way To automatically comment on youtube Thanks in advance</p>
0debug
JButton ActionListener (Java 8 JDK 1.8.0_74) is not working : <p>I was in the middle of making a program to remove commented lines from any file, I had just finished the main GUI and added two action listeners to my JButtons and then it all broke. I feel like I made a really stupid mistake somewhere but I can't figure ...
0debug
How to send an ArrayList of objects to other activity? : <p>I want to know how to do it to make a listview in second activity</p> <pre><code>Person person = new Person(nome, idade, numero); this.list.add(person); int number= this.list.size(); this.numero.setText(String.valueOf(number)); ...
0debug
C# Regex replace all word that start with specific character : <p>I have an string and I wanna to replace all word that start with <code>$</code> and end with <code></code> (white space) with something else.</p> <p>Whats the best practice for this?</p>
0debug
JavaScript detect alert and stop it from showing : <p>I am using a 3rd party js that shows <code>alert</code>'s to the user, is there a way to catch the alert before it is displayed, and show something else instead? example:</p> <pre><code>function doOtherPeopleCode(){ sdk.doStuff(); //catch all sdk alerts } </code...
0debug
How to delete a row of code in java : This is my code that im working with right now and even if it sounds like the most ez problem ever i still want to know how to solve it. My problem is that i want the command g.drawString(String.valueOf(FULLHEALTH), 50, 15); to be deleted when my player class goes under 100 hp and ...
0debug
What's the point of <button type="button">? : <p>Is <code>&lt;button type="button&gt;</code> any different from a simple <code>&lt;button&gt;</code> with a blank or missing <code>type</code> attribute? MDN and the HTML5 spec say that <code>type=button</code> is for buttons whose purpose is to trigger custom JavaScript,...
0debug
Python 3: Activity 1 of task 1 prompt a user to input firstname, lastname and initials : Hi everyone I have been trying to figure out the best way to do this question I have to fix for my task 1. The teacher asks me to not hard code the answer or the name because I have to prompt user input. These are his errors he wro...
0debug
Python class and main function not running? : <pre><code>#Homework 10 Question 6 Zachariah Huckstep #Employee Management System #Employee Class class Employee(): #Init method def __init__(self,empName,empID,empDept,empTitle): #Set self name, id number, department and job title self.name=empName...
0debug
static int mxf_parse_index(MXFContext *mxf, int track_id, AVStream *st) { int64_t accumulated_offset = 0; int j, k, ret, nb_sorted_segments; MXFIndexTableSegment **sorted_segments; int n_delta = track_id - 1; if (track_id < 1) { av_log(mxf->fc, AV_LOG_ERROR, "TrackID not positive:...
1threat
Can someone help me out with the download code in PHP with passing variables from links? : hey i crated a page indes.php with the following code : <?php include "db.php"; $select="SELECT *FROM alldocs "; $query=mysqli_query($conn,$select); <form action="upload.php"...
0debug
av_cold void ff_dcadsp_init(DCADSPContext *s) { s->lfe_fir[0] = dca_lfe_fir0_c; s->lfe_fir[1] = dca_lfe_fir1_c; s->qmf_32_subbands = dca_qmf_32_subbands; s->int8x8_fmul_int32 = int8x8_fmul_int32_c; if (ARCH_ARM) ff_dcadsp_init_arm(s); if (ARCH_X86) ff_dcadsp_init_x86(s); }
1threat
void do_rfi (void) { env->nip = env->spr[SPR_SRR0] & ~0x00000003; T0 = env->spr[SPR_SRR1] & ~0xFFFF0000UL; do_store_msr(env, T0); #if defined (DEBUG_OP) dump_rfi(); #endif env->interrupt_request |= CPU_INTERRUPT_EXITTB; }
1threat
JAVA: string problems : i'm realized a RSA cryptography program, but i have a problem with string. Because if i code this letter for example: l , and use the key (n,e)=(221,31) to code, my coded message is: Î, and this is correct. Problem is when i decode my message, because if i realize in Java this: String mess...
0debug
Concatenate 2 dictionaries and Add parent to it in python : I have multiple dictionaries which i need to concatenate and add a parent in the end. How do i achieve this dict1 = { "project":"test1", "summary": "A Test","issuetype": { "name": "Test" }} dict2 = { "project":"test2", "summary": "B Te...
0debug
static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs) { BDRVQcow2State *s = bs->opaque; ImageInfoSpecific *spec_info = g_new(ImageInfoSpecific, 1); *spec_info = (ImageInfoSpecific){ .kind = IMAGE_INFO_SPECIFIC_KIND_QCOW2, { .qcow2 = g_new(ImageInfoSpec...
1threat
How to remove a contour inside contour in Python OpenCV? : <p>OpenCV in Python provides the following code:</p> <pre><code>regions, hierarchy = cv2.findContours(binary_image, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) for region in regions: x, y, w, h = cv2.boundingRect(region) cv2.rectangle(image, (x, y), (x ...
0debug