problem
stringlengths
26
131k
labels
class label
2 classes
int bdrv_is_allocated_above(BlockDriverState *top, BlockDriverState *base, int64_t sector_num, int nb_sectors, int *pnum) { BlockDriverState *intermediate; int ret, n = nb_sectors; intermediate = top; while (in...
1threat
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { JvContext *s = avctx->priv_data; const uint8_t *buf = avpkt->data; const uint8_t *buf_end = buf + avpkt->size; int video_size, video_type, i,...
1threat
How to redirect to html error page when error 403 occurs on Google Cloud Plateform? : I'm looking for a way to redirect 403 errors to a html error page on Google Cloud Plateform.
0debug
unsigned int qemu_get_be32(QEMUFile *f) { unsigned int v; v = qemu_get_byte(f) << 24; v |= qemu_get_byte(f) << 16; v |= qemu_get_byte(f) << 8; v |= qemu_get_byte(f); return v; }
1threat
How can I click a button while a textarea is focused with jquery? : I'm using jquery's focus() to alter a textarea when focused. However, I need to click a submit button outside of the focused area. The submit button currently only worked after the textarea is un-focus. Here's my code <html> <head> <sc...
0debug
React method binding explained : <p>Hope this will help newcomers to understand the purpose of method binding in react. There's a good explanation [here][1] and [here][2], but this will be more to the point and crux of the problem.</p>
0debug
static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) { VC1Context *v = avctx->priv_data; MpegEncContext *s = &v->s; AVFrame *pict = data; uint8_t *buf2 = NULL; if (buf_...
1threat
how I could use each index for print index of each element in ruby? : I have an array array = ["mm,GATO,nIn","mm,GATO,nn","mm,PERRO,nIn","mm,PERRO,nn","mm,LOBO,nIn","mm,LOBO,nn"] I need to use each_index for obtain array = ["mm,GATO,nn1","mm,GATO,nn2","mm,PERRO,nn1","mm,PERRO,nn2","mm,LOBO,n...
0debug
from itertools import combinations def find_combinations(test_list): res = [(b1 + a1, b2 + a2) for (a1, a2), (b1, b2) in combinations(test_list, 2)] return (res)
0debug
static int decode_display_orientation(H264Context *h) { h->sei_display_orientation_present = !get_bits1(&h->gb); if (h->sei_display_orientation_present) { h->sei_hflip = get_bits1(&h->gb); h->sei_vflip = get_bits1(&h->gb); h->sei_anticlockwise_rotation = get_bits(&h->...
1threat
select TOP designated employees per department IN A SINGLE qUERY : I HAVE A TABLE AND VALUES HOW TO FINED TOP designated employees per department. TAHNKS IN ADVANCED OUT PUT SHOULD BE emp_id dept_name emp_name desig 1 IT JAFFERY DIRECTOR 12 QA GEORGE MANAGER 13...
0debug
int attribute_align_arg avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, uint8_t *buf, int buf_size) { int ret; if((avctx->codec->capabilities & CODEC_CAP_DELAY) || buf_size){ if(*frame_size_ptr < AVCO...
1threat
static int decode_b_mbs(VC9Context *v) { MpegEncContext *s = &v->s; GetBitContext *gb = &v->s.gb; int current_mb = 0, i ; int b_mv_type = BMV_TYPE_BACKWARD; int mquant, mqdiff; int ttmb; static const int size_table[6] = { 0, 2, 3, 4, 5, 8 }, offset_table[6] = { 0, 1,...
1threat
static int context_init(H264Context *h){ MpegEncContext * const s = &h->s; CHECKED_ALLOCZ(h->top_borders[0], h->s.mb_width * (16+8+8) * sizeof(uint8_t)) CHECKED_ALLOCZ(h->top_borders[1], h->s.mb_width * (16+8+8) * sizeof(uint8_t)) CHECKED_ALLOCZ(s->allocated_edge_emu_buffer, ...
1threat
How can I Handle Socket.IO rooms with cluster? : <p>I have a server working with cluster and to make that work with socke.IO I am using sticky-session, but I have a problem with my rooms (I don't know if the way I did is the best option): The cluster is instantiating processes and each process has a specific number of ...
0debug
Ionic **Build Failed** Code signing is required for product type 'Application' in SDK 'iOS 10.1' : <p>When I am running <code>ionic run ios --device </code> the build is failing, It was working fine few days ago and now I am getting this error, How to solve it, I have searched the solution but none worked for me.</p> ...
0debug
static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int threadnr) { ProresContext *ctx = avctx->priv_data; SliceContext *slice = &ctx->slices[jobnr]; const uint8_t *buf = slice->data; AVFrame *pic = ctx->frame; int i, hdr_size, qscale, log2_chroma_blocks_per_mb; in...
1threat
Send newsletter - best pratic - order by email host or not : for a newsletter mailing, about 50,000 users, using pear, is it convenient to order the list by mail provider or leave it all randomly?
0debug
static void kvmppc_pivot_hpt_cpu(CPUState *cs, run_on_cpu_data arg) { target_ulong sdr1 = arg.target_ptr; PowerPCCPU *cpu = POWERPC_CPU(cs); CPUPPCState *env = &cpu->env; cpu_synchronize_state(cs); env->spr[SPR_SDR1] = sdr1; if (kvmppc_put_books_sregs(cpu) < 0) { error_re...
1threat
clk_setup_cb cpu_ppc_tb_init (CPUState *env, uint32_t freq) { ppc_tb_t *tb_env; tb_env = qemu_mallocz(sizeof(ppc_tb_t)); if (tb_env == NULL) return NULL; env->tb_env = tb_env; tb_env->decr_timer = qemu_new_timer(vm_clock, &cpu_ppc_decr_cb, env); #if defined(TARGET_PPC64H) ...
1threat
reshape data based on column name : How can one reshape data based on column name x1 x2 x3 x4 1 1 5 6 1 2 3 5 2 1 6 1 2 2 2 4 to x1 1 x1 1 x1 2 x1 2 x2 1 . . . I have read many posts but I could not figure this out
0debug
static void test_visitor_out_native_list_int16(TestOutputVisitorData *data, const void *unused) { test_native_list(data, unused, USER_DEF_NATIVE_LIST_UNION_KIND_S16); }
1threat
error 1005 laravel because of migrations pariorities : i have some tables that are connected to each other. i should declare foreign key for those. when i doing this by migrations, the error 1005 appear. I know that this error due to migrations priorities. now i dont know how to solve this problem. this is one o...
0debug
Compiler Linker error? : <p>I'm programming for Arduino and since I'm a beginner when I get this error message I'm unable to interpret it in order to solve it.</p> <p>"<em>C:\Users\VITOR~1.NUN\AppData\Local\Temp\ccmmwX2d.ltrans0.ltrans.o: In function <code>setup': ccmmwX2d.ltrans0.o:(.text+0x16a): undefined reference ...
0debug
Why isn't "export default" recommended in Angular? : <p>According to the <a href="https://www.typescriptlang.org/docs/handbook/modules.html" rel="noreferrer">Typescript documentation (section "Guidance for structuring modules")</a>:</p> <blockquote> <p><em>If you’re only exporting a single class or function, use exp...
0debug
ERB Comparison signs ( less than, less than equal to, etc) : I'm wondering how to test if a variable is between two values such as 1 and 10. For example I have the following: <% bullet_hit = rand(1..10) %> <% if 1 < bullet_hit < 10 %> <%= bullet_hit %> <% end %> It seems pretty straight, but I think I ...
0debug
sever receive message and convert from lower case to upper case : code to receive message like " hi i am man" and convert it to upper case "HI I AM MAN" n = read( newsockfd,buffer,255 ); printf("Here is the message: %s\n",buffer);
0debug
Using a Progress Bar while Seeding a database in Laravel : <p>I have to seed quite a lot of data into a database and I want to be able to show the user a progress bar while this happens. I know this is documented:</p> <ul> <li><a href="https://laravel.com/docs/master/artisan#registering-commands" rel="noreferrer">http...
0debug
Rails 4 - JS for dependent fields with simple form : <p>I am trying to make an app in Rails 4.</p> <p>I am using simple form for forms and have just tried to use gem 'dependent-fields-rails' to hide or show subset questions based on the form field of a primary question.</p> <p>I'm getting stuck.</p> <p>I have added ...
0debug
int av_get_packet(AVIOContext *s, AVPacket *pkt, int size) { int ret; size= ffio_limit(s, size); ret= av_new_packet(pkt, size); if(ret<0) return ret; pkt->pos= avio_tell(s); ret= avio_read(s, pkt->data, size); if(ret<=0) av_free_packet(pkt); else ...
1threat
ReactJS APP in Heroku "Invalid Host header" HOST configuration? : <p>I am trying to put my <a href="https://github.com/gitlwh/MembershipSample/tree/master/client" rel="noreferrer">React app</a> on the Heroku. The whole project include one API (express) and one client (ReactJS). I have put my API on heroku. But when I p...
0debug
static uint64_t bw_conf1_read(void *opaque, target_phys_addr_t addr, unsigned size) { PCIBus *b = opaque; return pci_data_read(b, addr, size); }
1threat
Spring Boot & Swagger UI. Set JWT token : <p>I have a Swagger config like this</p> <pre><code>@EnableSwagger2 @Configuration public class SwaggerConfig { @Bean public Docket api() { List&lt;SecurityScheme&gt; schemeList = new ArrayList&lt;&gt;(); schemeList.add(new ApiKey(HttpHeaders.AUTHORIZAT...
0debug
NLTK download SSL: Certificate verify failed : <p>I get the following error when trying to install Punkt for nltk:</p> <pre><code>nltk.download('punkt') [nltk_data] Error loading Punkt: &lt;urlopen error [SSL: [nltk_data] CERTIFICATE_VERIFY_FAILED] certificate verify failed [nltk_data] (_ssl.c:590)&gt; ...
0debug
<androidx.fragment.app.FragmentContainerView> vs <fragment> as a view for a NavHost : <p>When using <code>androidx.fragment.app.FragmentContainerView</code> as a navHost instead of a regular <code>fragment</code> app is not able to navigate to a destination after orientation change.</p> <p>I get a following error: <c...
0debug
How i get the file name when i upload anyfile from my fileupload control : <p>I want the file name in description. When user submit the anyfile from frontend, the file name will show in separate div. i am using asp.net mvc framework so, can anyone help me in it.</p>
0debug
Kotlin with-statement as an expression : <p>We can do</p> <pre><code>val obj = Obj() with (obj) { objMethod1() objMethod2() } </code></pre> <p>But is there a way to do this?</p> <pre><code>val obj = with(Obj()) { objMethod1() objMethod2() } </code></pre> <p>To solve a common case where you create an...
0debug
How to add field to NSMutableDictionary Swift : <p>Here is what I've tried </p> <pre><code>var villages = [NSDictionary]() var bars = [NSMutableDictionary]() var allBars = [NSMutableDictionary]() (bars[2]).setObject(distanceInMiles, forKey: "Distance" as NSCopying) //And this bars[2]["Distance"] = distanceInMiles...
0debug
static void cpu_exec_nocache(CPUState *cpu, int max_cycles, TranslationBlock *orig_tb) { TranslationBlock *tb; if (max_cycles > CF_COUNT_MASK) max_cycles = CF_COUNT_MASK; tb = tb_gen_code(cpu, orig_tb->pc, orig_tb->cs_base, orig_tb->flags, ...
1threat
TypeOf and CType code equivalent in C# : <p>Can someone help me the equivalent code to C#</p> <pre><code>Public Sub ClearTextBox(ByVal root As Control) For Each ctrl As Control In root.Controls ClearTextBox(ctrl) If TypeOf ctrl Is TextBox Then CType(ctrl, TextBox).Text = String.Empty ...
0debug
BigDecimal Round to 2 decimal places and then to one significant figure : <p>How do i round a BigDecimal to 2 decimal places and then to one significant figure?</p> <p>Thanks</p>
0debug
static void vtd_iotlb_page_invalidate_notify(IntelIOMMUState *s, uint16_t domain_id, hwaddr addr, uint8_t am) { IntelIOMMUNotifierNode *node; VTDContextEntry ce; int ret; QLIST_FOREACH(node, &(s->notifiers_lis...
1threat
int img_pad(AVPicture *dst, const AVPicture *src, int height, int width, int pix_fmt, int padtop, int padbottom, int padleft, int padright, int *color) { uint8_t *optr, *iptr; int y_shift; int x_shift; int yheight; int i, y; if (pix_fmt < 0 || pix_fmt >= PIX_FM...
1threat
Average of first and last variable : <p><a href="https://i.stack.imgur.com/TEkoN.png" rel="nofollow noreferrer">Sample Data</a></p> <p>The highlighted color is the first and the last of each customer ID how do I use R code to do this and below is the answer expected</p> <p><a href="https://i.stack.imgur.com/quZLQ.png...
0debug
c# save program output to a (.txt) file : My program namespace trim2 { class Program { static void Main(string[] args) { //ask user to start, if yes then continue, else then close DataConversion() } ...
0debug
bool qemu_co_queue_next(CoQueue *queue) { Coroutine *next; next = QTAILQ_FIRST(&queue->entries); if (next) { QTAILQ_REMOVE(&queue->entries, next, co_queue_next); QTAILQ_INSERT_TAIL(&unlock_bh_queue, next, co_queue_next); trace_qemu_co_queue_next(next); qemu_bh_sched...
1threat
Docker in Docker : <p>We have app and which will spin the short term (short span) docker containers. Right now, it runs in Ubunut16.04 server (VM) and we installed docker, and nodejs in same server. We have nodejs app which runs in same server so whenever a request comes in, then the nodejs app will spin up a docker co...
0debug
MalformedPolicyDocument error when creating policy via terraform : <p>I am getting the following error when running terraform:</p> <pre><code>* aws_iam_role_policy.rds_policy: Error putting IAM role policy my-rds-policy: MalformedPolicyDocument: The policy failed legacy parsing </code></pre> <p>Here is my definition ...
0debug
Set date() to midnight in users timezone with moment.js : <p>I use moment.js to display a UTC date in the users local timezone:</p> <pre><code>var date = new Date(Date.UTC(2016,03,30,0,0,0)); var now = new Date(); var diff = (date.getTime()/1000) - (now.getTime()/1000); var textnode = document.createTextNode(moment(d...
0debug
static int block_crypto_create_generic(QCryptoBlockFormat format, const char *filename, QemuOpts *opts, Error **errp) { int ret = -EINVAL; QCryptoBlockCreateOptions *create_opts = NULL; ...
1threat
React.js - using property initializers for all component methods : <p>I am working on a React Native project and I'm using ES6 classes for React components.</p> <p>Since React components defined via ES6 classes don't have autobinding, the React team <a href="https://facebook.github.io/react/blog/2015/01/27/react-v0.13...
0debug
expression must be a modifiable lvalue (for array) : <p>I have this program I'm working on, and one part of it is a linked list which I am working on making. I got this far, but at this point in the code it tells me (on the 3rd to last line) that inst must be a modifiable lvalue. I'm not sure what I'm doing wrong her...
0debug
def swap_List(newList): size = len(newList) temp = newList[0] newList[0] = newList[size - 1] newList[size - 1] = temp return newList
0debug
How to find first non-zero item of an Array? : Is there a way to grab the first non-zero item from an array of numbers? I have an Array with many zeros at the beginning and I need only the first item that is not a zero. For example `Array = [0,0,0,0,25,53,21,77]` Return: "25"
0debug
static void ref405ep_init(MachineState *machine) { ram_addr_t ram_size = machine->ram_size; const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; char *filename; ppc4xx_bd_info_...
1threat
void pc_init_pci64_hole(PcPciInfo *pci_info, uint64_t pci_hole64_start, uint64_t pci_hole64_size) { if ((sizeof(hwaddr) == 4) || (!pci_hole64_size)) { return; } pci_info->w64.begin = ROUND_UP(pci_hole64_start, 0x1ULL << 30); pci_info->w64.end = pci_...
1threat
How to declare factory constructor in abstract classes? : <p>I want to declare, but not define a factory constructor in an abstract class.</p> <p>In my case, I want to create a method that accepts any class that implements a <code>String toJson()</code> method as well as a <code>fromJson(Map&lt;String, dynamic&gt; dat...
0debug
jQuery count elements Start from 0? : <p>I'm trying to count the elements on page BUT i need the numbers to start from 0 as opposed to 1.</p> <p>I know I can simply do <code>var tadada = $('.clickableDiv').length;</code></p> <p>but this will return the numbers from 1.</p> <p>is this possible using jquery or javascri...
0debug
c# constructor calling toString : <p>I have an object that overrides iComparable and that also overrides toString().</p> <p>When the constructor is called it is also calling toString(), but not hitting any break points in the toString() method.</p> <p>The toString() is also called when each line of the constructor is...
0debug
Setting android:extractNativeLibs=false to reduce app size : <p>I am not sure, if I got this right. It seems it is doing the oposite. If I keep the flag <a href="https://developer.android.com/reference/android/R.attr.html#extractNativeLibs" rel="noreferrer">android:extractNativeLibs</a> set to true, the app is taking a...
0debug
How to switch a branch using GitHub Shell. : I am having an issue with my GitLab Repository. Somehow there is a conflict between my local repo and the remote one. GitHub Desktop says `Commit is not successful because there is a conflict and refer to Shell`. When I open the GitHub Shell to find out which file is causing...
0debug
Google maps polyline not rendering perfectly : <p>I am drawing polyline using latest google maps API for iOS. I am constructing polyline point by point but it is not rendering properly as when i zoom out the polyline vanishes(not in literal terms) from the map and when i zoom in it simply shows the line.</p> <p><a hre...
0debug
static int handle_hypercall(S390CPU *cpu, struct kvm_run *run) { CPUS390XState *env = &cpu->env; cpu_synchronize_state(CPU(cpu)); env->regs[2] = s390_virtio_hypercall(env); return 0; }
1threat
static void coroutine_fn v9fs_lcreate(void *opaque) { int32_t dfid, flags, mode; gid_t gid; ssize_t err = 0; ssize_t offset = 7; V9fsString name; V9fsFidState *fidp; struct stat stbuf; V9fsQID qid; int32_t iounit; V9fsPDU *pdu = opaque; v9fs_string_init(&name); ...
1threat
How do I add Lua to a C++ Project : <p>1) How do I add Lua to a C++ project in microsoft visual studio 2017. I have downloaded all the Lua files but I need to Add Lua to the project properties. 2) Whats the main difference between C++ and C 3) Which language is best to create a GUI, Lua, C, C# or C++. Thanks in advance...
0debug
static int revert_channel_correlation(ALSDecContext *ctx, ALSBlockData *bd, ALSChannelData **cd, int *reverted, unsigned int offset, int c) { ALSChannelData *ch = cd[c]; unsigned int dep = 0; unsigned int channels = ctx->a...
1threat
How do I make a batch web browser? : <p>I am trying to make a batch web browser for my own mini os. I have tried using the type command but that won't work. How do I embed websites into batch files? Here is what I have so far:</p> <pre><code> @echo off set /p website=What site do you want to read? type %web...
0debug
static int cow_create(const char *filename, QemuOpts *opts, Error **errp) { struct cow_header_v2 cow_header; struct stat st; int64_t image_sectors = 0; char *image_filename = NULL; Error *local_err = NULL; int ret; BlockDriverState *cow_bs = NULL; image_sectors = DIV_ROU...
1threat
docker base image with solaris operating system : <p>Does anybody know from where i can get docker base image with Solaris OS in it?</p> <p>I tried finding it on Dockerhub but couldn't find one.</p> <p>Please provide me the detail 'dockerhost/namespace/imagename:tag'</p>
0debug
SQLSERVER 2014:- Invalid length parameter passed to the LEFT or SUBSTRING function : I am getting the following error while trying to execute the below query in sql server 2014 . I have data customers chat data and I want to replace the customers with "Customer" and Agent name with "Agent" Error :- Invalid length pa...
0debug
static int inc_refcounts(BlockDriverState *bs, uint16_t *refcount_table, int refcount_table_size, int64_t offset, int64_t size) { BDRVQcowState *s = bs->opaque; int64_t start, last, cluster_offset; int k; int errors = ...
1threat
Gradle - equivalent of test {} configuration block for android : <p>Gradle has the test configuration block </p> <p><a href="https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html" rel="noreferrer">https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html</a></p> <p>```</p> <pre>...
0debug
Equivalent of InterlockedExchangeAdd for Linux using Delphi 10.2) : <p>Delphi 10.2 (having support for Linux) has a cross Platform function AtomicExchange which is equivalent to Windows InterlocekdEchange. So far so good...</p> <p>I have to port Win32 code making use of InterlockedExchangeAdd which has no AtomicExchan...
0debug
Parse error: syntax error, unexpected 'if' (T_IF) in D:\Xampp\htdocs\profile\new\view.php on line 29 : <p>I am getting parse error unexpected IF (T_IF). please help me correcting my code i have session_start() before tag and using session username for selecting row from database. please help me my code is not working...
0debug
Not a statement error with objects : <p>I am getting a "not a statement" error in my code and i have no idea why here is the code </p> <pre><code> for (int i = 0; i &lt; Champ.length; i++) { for (int j = 0; j &lt; Champ[i].length; j++) { if (Champ[i][j].getLegume() != null) { ...
0debug
How to deploy Java stadnalone application on JBOSS along with other web applications : I am writing a Java program which will keep on listening to JMS/ActiveM queue for any messages. When there is a message posted on the queue, this program will pick up the message and process it. this program has a main method. Now I ...
0debug
Micro web-framework for Kotlin : <p>I would like to develop a very simple web-application. Is there something similar to Flask from Python world for Kotlin?</p> <p>I know there is for instance Kara framework, but it looks abandoned.</p>
0debug
static void rtc_realizefn(DeviceState *dev, Error **errp) { ISADevice *isadev = ISA_DEVICE(dev); RTCState *s = MC146818_RTC(dev); int base = 0x70; s->cmos_data[RTC_REG_A] = 0x26; s->cmos_data[RTC_REG_B] = 0x02; s->cmos_data[RTC_REG_C] = 0x00; s->cmos_data[RTC_REG_D] = 0x80; ...
1threat
Cpp/C++ - Is this an alternative to tolower? : I was solving a very easy problem to convert a character in a string to lowercase, I obviously used tolower(). However, I saw someone use this and it was an accepted solution. **Is this an alternative to tolower() function in cpp? If so, why?** Reference to the prob...
0debug
uint64_t helper_addqv (uint64_t op1, uint64_t op2) { uint64_t tmp = op1; op1 += op2; if (unlikely((tmp ^ op2 ^ (-1ULL)) & (tmp ^ op1) & (1ULL << 63))) { arith_excp(env, GETPC(), EXC_M_IOV, 0); } return op1; }
1threat
How to get a versionName in react-native app on Android? : <p>I've made a timestamped versionName in build.gradle like 20150707.1125. I want to show the version of the package in react-native app in about window. How I could get versionName in code?</p>
0debug
int ff_amf_get_field_value(const uint8_t *data, const uint8_t *data_end, const uint8_t *name, uint8_t *dst, int dst_size) { int namelen = strlen(name); int len; while (*data != AMF_DATA_TYPE_OBJECT && data < data_end) { len = ff_amf_tag_size(data, data_end); ...
1threat
What determines how much RAM texture takes? : Does this depend on the physical size of the texture? Let's say I have two empty textures: Texture1 - 1kb, 1024x024 and Texture2 - 1kb, 32x32. Will they take up a single amount of RAM?
0debug
Why is my result varying if I am performing division with a Global constant vs local variable? : I have been working on a C code. I have declared few constants using #define. However I have observed that while I am performing division of a local variable with a constant(defined using #define) I am numerically getting ...
0debug
static int read_uncompressed_sgi(const SGIInfo *si, AVPicture *pict, ByteIOContext *f) { int x, y, z, chan_offset, ret = 0; uint8_t *dest_row, *tmp_row = NULL; tmp_row = av_malloc(si->xsize); url_fseek(f, SGI_HEADER_SIZE, SEEK_SET); pict->linesize[0] = si->xsize; ...
1threat
aio_read_done(void *opaque, int ret) { struct aio_ctx *ctx = opaque; struct timeval t2; gettimeofday(&t2, NULL); if (ret < 0) { printf("readv failed: %s\n", strerror(-ret)); return; } if (ctx->Pflag) { void *cmp_buf = malloc(ctx->qiov.size); memset(cmp_buf, ctx->pattern, ctx->qiov.size)...
1threat
Broken code in company contact form : <p>The contact form on my employer's website doesn't work so they asked me to fix it. I examined the code and found some issues. The "form method" was incorrect so I changed that. Also, the email address in the send_form_email.php was wrong so I fixed that as well but the form stil...
0debug
SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockBackend *blk, int unit, bool removable, int bootindex, const char *serial, Error **errp) { const char *driver; char *name; DeviceState *dev; Error *err = NULL; ...
1threat
Sort a list according to a property java : <p>I have a list of Strings </p> <pre><code>ArrayList&lt;String&gt; titles = t1,t1,t2,t2,t3,t3,t3 </code></pre> <p>I want a sublist with the unique values ie. <code>titles2 = t1,t2,t3</code></p> <p>How can I do this? Any help is appreciated</p>
0debug
static int blkverify_open(BlockDriverState *bs, const char *filename, int flags) { BDRVBlkverifyState *s = bs->opaque; int ret; char *raw, *c; if (strncmp(filename, "blkverify:", strlen("blkverify:"))) { return -EINVAL; } filename += strlen("blkverify:"); c =...
1threat
static int parse_meter(DBEContext *s) { if (s->meter_size) skip_input(s, s->key_present + s->meter_size + 1); return 0; }
1threat
simple java error i don't know how to fix : <p>I am new to Java. I wrote this program and when I run it, it always gives me that the answer is <strong>0.0</strong> </p> <p>Can you tell me what I did wrong?</p> <pre><code>import java.util.Scanner; public class Learnclass { public static void main(String[] args) { ...
0debug
Parsing Json array and object : <p>Can someone give me a good link or help explain the workings of parsing json. I have a array of objects like so........ [{}{}{}]. Im trying to get the value of for example {"name" :"John"....} do I call .get (name) to get value John.or .getString (name) to get value John. </p> <p>Ano...
0debug
static void mirror_write_complete(void *opaque, int ret) { MirrorOp *op = opaque; MirrorBlockJob *s = op->s; if (ret < 0) { BlockDriverState *source = s->common.bs; BlockErrorAction action; bdrv_set_dirty(source, op->sector_num, op->nb_sectors); action = mirror_erro...
1threat
How to train using neural network in python? : <p>I am in my final year Project. In my project,I will collect data from a specific road. I have choosen 5 points in that road.From each point i will collect data from GPS about which day of the week,time of the day and time Taken to reach from previous point to that point...
0debug
Convert String obtained from edittext to Integer in Kotlin language : <p>I am trying to make a simple Android application using Kotlin language. I have one EditText, I am getting its value in String but I want to convert that value into an integer. How can I convert this string to integer in <strong>Kotlin language</st...
0debug
int qemu_mutex_trylock(QemuMutex *mutex) { int owned; owned = TryEnterCriticalSection(&mutex->lock); if (owned) { assert(mutex->owner == 0); mutex->owner = GetCurrentThreadId(); } return !owned; }
1threat
static inline void chroma_4mv_motion_lowres(MpegEncContext *s, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t **ref_picture, h264_chroma_mc_func * pix_op, ...
1threat
SUM AND GROUPING JSON OUTPOUT : I have a json output on php like: [{"Title":"Message","count":"180","Number":"200"},{"Title":"Message","count":"200","Number":"400"}] how can obtain result like: [{"Title":"Message","count":"380","Number":"600"}] thank you very much
0debug
Google Play App Review doesn't show App Version code or name : <p>I have released an app on play store, and have received some reviews. In google play developer console, I could not see the version of app in few of the reviews. This is what I found under the APPLICATION heading.</p> <p><code>Version code — Version nam...
0debug