problem
stringlengths
26
131k
labels
class label
2 classes
Array sort method unexpected behavior : <p>I have an array having values are <strong>1,10,6,8,7</strong> and I want to sort this using <code>sort()</code> method, It's giving result like this <strong>1,10,6,7,8</strong> rather than <strong>1,6,7,8,10</strong></p> <p><em>I wrote code below :</em></p> <pre><code>var ar...
0debug
What does the stacktrace mean? : <pre><code>E/AndroidRuntime: FATAL EXCEPTION: main Process: dev.game.adventure, PID: 21482 java.util.ConcurrentModificationException at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966) ...
0debug
Plotting images side by side using matplotlib : <p>I was wondering how I am able to plot images side by side using <code>matplotlib</code> for example something like this:</p> <p><a href="https://i.stack.imgur.com/dDepR.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/dDepR.jpg" alt="enter image description h...
0debug
What is the difference between a UICollectionView Item, Section, and cell? : <p>I am implementing a UICollectionView with dynamic number of buttons/cells in it. I am trying to understand the difference between each (Item, Section, and cell), so I can understand the collectionView methods provided by Apple.</p>
0debug
Create a redirect link to an another page using javascript (codeigniter) : <p>Hi please i dont succeed to make redirection in Javascript. i am using codeigniter. below is my code</p> <pre><code>&lt;button type="submit" class="btn btn-default" id="btn_login" style="color:#ffffff; background-color:#00b9f2;" onclick="win...
0debug
static int read_sbr_grid(AACContext *ac, SpectralBandReplication *sbr, GetBitContext *gb, SBRData *ch_data) { int i; ch_data->bs_freq_res[0] = ch_data->bs_freq_res[ch_data->bs_num_env[1]]; ch_data->bs_num_env[0] = ch_data->bs_num_env[1]; ch_data->bs_amp_res = sbr->bs_amp...
1threat
How to call SOAP web services from AngularJS : <p>Is there anyway to call soap web services from angularJS ? is there any service like $http to call SOAP web services?</p>
0debug
static int config_output(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; LIBVMAFContext *s = ctx->priv; AVFilterLink *mainlink = ctx->inputs[0]; int ret; outlink->w = mainlink->w; outlink->h = mainlink->h; outlink->time_base = mainlink->time_base; outlink->sample...
1threat
Footer margin - How to remove it? : <p>Trying to figure why, when on some pages there's a huge margin (space) in the footer, see here for example</p> <p><a href="https://wrestlenation.net/misc.php?action=help&amp;hid=8" rel="nofollow noreferrer">https://wrestlenation.net/misc.php?action=help&amp;hid=8</a></p> <p>It's...
0debug
void bdrv_dirty_bitmap_deserialize_ones(BdrvDirtyBitmap *bitmap, uint64_t start, uint64_t count, bool finish) { hbitmap_deserialize_ones(bitmap->bitmap, start, count, finish); }
1threat
static void stream_component_close(VideoState *is, int stream_index) { AVFormatContext *ic = is->ic; AVCodecContext *avctx; if (stream_index < 0 || stream_index >= ic->nb_streams) return; avctx = ic->streams[stream_index]->codec; switch (avctx->codec_type) { case AVMEDIA_TYPE...
1threat
Are addslashes() and prepared statements redundant : <p>Do i need to escape characters when inserting into prepared statements? Do prepared statements escape the code for me?</p>
0debug
Responsive design with vmin and mobile address bars : <p>I am trying to create a number of square divs next too each other (which can expand in height if there is too much text..but most of the time there will not be too much text). I am trying to set it up in a responsive fashion. </p> <p>When scrolling on the page, ...
0debug
i have to make sum of values using php : i have a database table having date and amount column, i have to make the some of them monthly, so how can i do it. [Please refer image for database table][1]. actually i wanted the output as in this month this much is the total, eg if we have 5 entries in the month of jan th...
0debug
SVG Path Data Regex C# : <p>I am looking for a regex that matches each of the individual values within an SVG path.</p> <pre><code>m4507-396.4c-2.2-3.5-2.6-7.3-0.2-11.4M4545.5-428.7c3.5 1.2 7 2.7 9.9 7.3 5.5 8.3 3.7 20.7 3 22.4-2.6 6.6-6.5 9.4-10.1 12.7-1.6 6-6 4.8-9.7 5.4-3.9 3.5-9.4 4.3-11.8 4.3-11.8 0.1 m3918.1-73...
0debug
static void vtd_update_iotlb(IntelIOMMUState *s, uint16_t source_id, uint16_t domain_id, hwaddr addr, uint64_t slpte, bool read_flags, bool write_flags) { VTDIOTLBEntry *entry = g_malloc(sizeof(*entry)); uint64_t *key = g_malloc(sizeof(*key)); ...
1threat
Add leading zeroes to number in Dart : <p>I want to add some leading zeroes to a string. For example, the total length may be eight characters. For example:</p> <pre><code>123 should be 00000123 1243 should be 00001234 123456 should be 00123456 12345678 should be 12345678 </code></pre> <p>What is an easy way to do th...
0debug
how to switch values between integers? : <p>So I need to switch between A and B without using another integer.</p> <p>I was able to do this easily with a third integer (tmp). Is there any way to do this without it?</p> <pre><code>int a = 53, b = 12, tmp = 0; tmp = a; a = b; b = tmp; </code></pre>
0debug
What is the difference between delete a pointer and set the pointer as NULL? : <p>Suppose I have a pointer to MyClass:</p> <pre><code>MyClass *myPointer = new MyClass(); </code></pre> <p>What is the difference between <code>delete myPointer;</code> and <code>myPointer = NULL;</code>?</p> <p>Thanks</p>
0debug
Can't iterate trough array in javascript : I have an array in javascript and I can't access any data in it. The array prints out like this: [console View][1] [1]: https://i.stack.imgur.com/59C77.png Can anyone help? This is getting really frustrating. Thanks!
0debug
static void spapr_populate_pa_features(CPUPPCState *env, void *fdt, int offset) { uint8_t pa_features_206[] = { 6, 0, 0xf6, 0x1f, 0xc7, 0x00, 0x80, 0xc0 }; uint8_t pa_features_207[] = { 24, 0, 0xf6, 0x1f, 0xc7, 0xc0, 0x80, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x...
1threat
static int encode_rgb_frame(FFV1Context *s, uint8_t *src[3], int w, int h, int stride[3]) { int x, y, p, i; const int ring_size = s->avctx->context_model ? 3 : 2; int16_t *sample[4][3]; int lbd = s->bits_per_raw_sample <= 8; int bits = s->bits_per_raw_sample > 0 ? s->bits_per_raw_sample :...
1threat
Golang : passing int[] to function but function returning empty array : I am passing in a string array and an empty integer array into a function. The point of the function is to convert each element of the string array to an integer and store that into the integer array. When I print the integer array from within the ...
0debug
Java class is despite new ...; not called up : <p>I have a problem with call up a class. I'm programming in Eclipse and I have another Java Program, which works very well, but I can't see any difference. Here is the code of the Main class:</p> <pre><code>public class Main { public static void main(String[] arg...
0debug
(Android App/Web App) (Noob) How do I get started on making an app like this? : <p>Ok so first off: I am a complete noob when it comes to Android app development. I used to have Android studio and wanted to make an app. I found it very confusing and hard to learn.</p> <p>Second: I know HTML and CSS pretty well, but no...
0debug
static void escaped_string(void) { int i; struct { const char *encoded; const char *decoded; int skip; } test_cases[] = { { "\"\\b\"", "\b" }, { "\"\\f\"", "\f" }, { "\"\\n\"", "\n" }, { "\"\\r\"", "\r" }, { "\"\\t\"", "\t" }, ...
1threat
static int oss_poll_out (HWVoiceOut *hw) { OSSVoiceOut *oss = (OSSVoiceOut *) hw; return qemu_set_fd_handler (oss->fd, NULL, oss_helper_poll_out, NULL); }
1threat
Previewing ContentView with CoreData : <p>When I try to a SwiftUI ContentView that contains a CoreData fetch request, the preview crashes. Wondering what the correct way to setup the @environment so the preview can access the coredata stack. This works fine when building to a simulator but not with a PreviewProvider</p...
0debug
static int tcg_cpu_exec(CPUState *cpu) { int ret; #ifdef CONFIG_PROFILER int64_t ti; #endif #ifdef CONFIG_PROFILER ti = profile_getclock(); #endif if (use_icount) { int64_t count; int64_t deadline; int decr; timers_state.qemu_icount -= (cpu->icount_decr.u16...
1threat
static void gdb_chr_receive(void *opaque, const uint8_t *buf, int size) { GDBState *s = opaque; int i; for (i = 0; i < size; i++) { gdb_read_byte(s, buf[i]); } }
1threat
C++ - Unresolved External in DLL Injector : <p>I can't really see the reason I am getting this error, I have had a look arround and apparently it's something to do with defining a function that does nothing? I can't really tell what the issue is here unfortunately so any help would be appreciated.</p> <p>Here is my so...
0debug
Upgrade Terraform version : <p>I'm start using Terraform and I'm following the project updates on his Github repository.</p> <p>I see new releases are available on releases section: <a href="https://github.com/hashicorp/terraform/releases" rel="noreferrer">https://github.com/hashicorp/terraform/releases</a></p> <p>I ...
0debug
static void vorbis_free_extradata(PayloadContext * data) { av_free(data); }
1threat
Oracle sql subtring in case dont work : I have a query like this: SELECT id, (CASE WHEN com_column IS NULL THEN '' ELSE SUBSTR(com_column,0,50) || '...' END) AS ss From Table; Any idea how to solve this?
0debug
Dynamically creating list in a dictionary using Python : <p>I have thousands of products with ingredients of each for example:</p> <pre><code>ProductID | Ingredients 00001 | itemA, itemB, itemC, itemD 00002 | itemF, itemD, itemG, itemA, itemI 00003 | itemH, itemI, itemD, itemF, itemT,itemB, itemC </...
0debug
What's involved in becoming a software architect? : <p>I have been working as a Sr. developer for a while now and would like to transition to an architect role. I wanted to know from those who are already in this role as to what knowledge does it require?</p>
0debug
python 2.7 set and list remove time complexity : <p>Wondering the time complexity of remove of list, and remove of set. </p> <p>My thought and study result is,</p> <ol> <li>Removal of list is <code>O(n)</code></li> <li>Removal of set is <code>O(1)</code>.</li> </ol> <p>I just studied some discussion, but never prove...
0debug
How can I upload multiple files to a model field? : <p>I want to upload multiple files through a ModelForm,with all files to be assigned to a <code>file</code> field of the Model.I have gone through the docs and I saw an example on it and I ve implemented it here but I can only get my form to pick multiple files but on...
0debug
Alert a variable returns 'undefined' : <p>For some reason I can't seem to alert the value of a variable, my variable is global and defined at the top of the page...</p> <pre><code>var slickTog = 'dsadsdasd'; </code></pre> <p>I then have a window resize function that I have the alert in only it doesn't work!</p> <pre...
0debug
static void dec_misc(DisasContext *dc, uint32_t insn) { uint32_t op0, op1; uint32_t ra, rb, rd; #ifdef OPENRISC_DISAS uint32_t L6, K5; #endif uint32_t I16, I5, I11, N26, tmp; TCGMemOp mop; op0 = extract32(insn, 26, 6); op1 = extract32(insn, 24, 2); ra = extract32(insn, 16, 5...
1threat
Python. Recurring error in int condition. : Aleksa is having a New Year's Eve party! His house has a magic doorway that only allows person to enter per second, and he knows people will show up. If two guests arrive at same time, one guest must wait for the other to enter. If two guests arrive at different times, ...
0debug
ActionController::InvalidAuthenticityToken Rails 5 / Devise / Audited / PaperTrail gem : <p><strong>Background Details</strong></p> <p>I am using <strong>Devise</strong> for authentication to login to a <strong>Rails 5</strong> application. </p> <p>Whenever I bundle either the <strong>Audited</strong> or <strong>Pap...
0debug
Opacity error please help html : Can anyone please help me ? opacity issue this is my whole code i need a opacity background and everything working fine but when i add opacity to the backgorund i cant use my bar like if u copy and paste the code u'll see everything with opacity but i cant use the bar buttons and i want...
0debug
How to read the below text file in matlab and plot. I have similar multiple files I need to run over loop to read and plot. Help me : WC-02 18507.0 1115851.0 1092068.3 4239.94 Fault_interpretation_22 1 WC-02 WC-02 18451.0 1114476.0 1091761.0 5012.56 Fault_interpretation_22 1 WC-02
0debug
static void search_for_quantizers_faac(AVCodecContext *avctx, AACEncContext *s, SingleChannelElement *sce, const float lambda) { int start = 0, i, w, w2, g; float uplim[128], maxq[128]; int minq, maxsf; float distfact =...
1threat
mst_fpga_readb(void *opaque, target_phys_addr_t addr, unsigned size) { mst_irq_state *s = (mst_irq_state *) opaque; switch (addr) { case MST_LEDDAT1: return s->leddat1; case MST_LEDDAT2: return s->leddat2; case MST_LEDCTRL: return s->ledctrl; case MST_GPSWR: return s->gpswr; case MST_MSCWR1...
1threat
Extracting Regex Array Indices in PHP : <p>I'm working on a small script that pulls two values out of a string that is URL. You can see an example URL in the code below and I'm attempting to pull out the two-digit "i=" value and the longer "l=" value.</p> <p>I did some extensive searching about this and all of the ot...
0debug
How do I make an empty in variable? : I'm trying to make an Int variable, but I can't set it to zero. I need it to be empty. I've tried let variable: Int But that does nothing. I want to do something like this: Let variable: Int = (Nothing) Like a placeholder sort of. What is something I can use that ...
0debug
cannot resolve keyword 'user' into field. choices are : **I am trying to edit data of model UserProfile. Here is code for same.** #form.py class UserprofileForm(forms.ModelForm): class Meta: model = UserProfile fields = ['profile_photo', 'gender', 'contact_number', 'age', 'address'] #view.py def edit_user(...
0debug
White label for angular 2 project : <p>I have an Angular 2 application and I need to create a white label project based on the that. In the white label I need to alter some of the components css and also add new routes / new components. What is the recommended way to approach this?</p>
0debug
void ff_put_h264_qpel16_mc02_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_vt_16w_msa(src - (stride * 2), stride, dst, stride, 16); }
1threat
char *vnc_display_local_addr(DisplayState *ds) { VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display; return vnc_socket_local_addr("%s:%s", vs->lsock); }
1threat
How does a game-app works with views : <p>I'm new in this field, and I have a question -<br> How do regular game-apps work with views? doesn't they use one big view in implement things in them? What do they do?<br> Thanks in advance!</p>
0debug
<if i am "npm install -g express-generator" using this command on ubantu 16.04 > : npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/nodemon/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"dar...
0debug
How to upload a file with selenium on remote node [Python] : <p>Found here (stackoverflow) a way to handle a file selection on local host. I'm using Autoit and run a local script which writes in the file path. But how can I run this on the <strong>remote</strong> node, when I'm using selenium hub. Is there a way run on...
0debug
(Android) How can I make a message bubble in list view just like Whatsapp do : I am doing a chat app. When I long click a message, then show up some choices. I don't have any idea to do this. Hope some people can help me, please. [enter image description here][1] [1]: http://i.stack.imgur.com/Qnue7.jpg
0debug
Why header and payload in the JWT token always starts with eyJ : <p>I am using <code>JWT</code> token to authorize my APIs, during implementation I found header and payload in token always start with <code>eyJ</code>. What does this indicate?</p>
0debug
Macro variables in R : <p>I wonder how to use macros in R.</p> <p>I´m looking for a simple macro so I only need to change for example a date once in a syntax and not on every place where the date is used in the syntax.</p> <p>In other words like the %let functions in SAS but in R. </p>
0debug
URL for Settings>Privacy>Location Services in iOS 11+? : <p>If <code>locationServicesEnabled() == false</code>, I'm prompting the user to enable their Location Services. The following <code>URL</code> works for 10.0+, redirecting the user to the Settings app and directly to the Location Services screen:</p> <pre><code...
0debug
When should I use * and when &? : <p>I am learning some C++, and I came across pointers and addresses. However, in none of the materials, I could find a good explanation on when to use pointer, and when to use address. As I understand it is that when I use pointer, I POINT to address in memory, where some variable is s...
0debug
Create a one-time subscription to capture authState : Is it possible to create a subscription that attempts to get the user's auth state repeatedly until `user != null`: ngOnInit() { this.isMobile = this.breakpointObserver.observe([Breakpoints.Handset]); this.authSubscription = this.afAuth.au...
0debug
static int ehci_init_transfer(EHCIPacket *p) { uint32_t cpage, offset, bytes, plen; dma_addr_t page; cpage = get_field(p->qtd.token, QTD_TOKEN_CPAGE); bytes = get_field(p->qtd.token, QTD_TOKEN_TBYTES); offset = p->qtd.bufptr[0] & ~QTD_BUFPTR_MASK; qemu_sglist_init(&p->sgl, p->queue->e...
1threat
git: See changes to a specific file by a commit : <p>I want to see the what changes were made to <a href="https://github.com/LibreOffice/core/blob/master/include/svl/itemset.hxx" rel="noreferrer">this</a> file's at line 147. So i enquired the file line by line for commits by: </p> <pre><code>git blame include/svl/item...
0debug
string does not exsist in current context : string declared inside class MyClass(TransactionId And pnrno) is not working in button click > ERROR MESSAGE > the name (TransactionId And pnrno) does not exsist in current context class MyClass { public string Tr...
0debug
Golang fasthttp very slow response : I have very slow http response perfomance Used Go and Fasthttp ```golang package main import ( "fmt" "github.com/valyala/fasthttp" ) func fastHTTPHandler(ctx *fasthttp.RequestCtx) { var s string = "" for i := 1; i <= 100000; i++ { s += "hello " } ctx.Set...
0debug
Will GCM be deprecated and FCM will take place of it? : <p>Is firebase taking GCM place or what extra is firebase doing so that we can relay on FCM rather than GCM.</p> <p>If we use GCM in our new messaging app shall we have to completely migrate to FCM in near future ?</p>
0debug
static int opus_header(AVFormatContext *avf, int idx) { struct ogg *ogg = avf->priv_data; struct ogg_stream *os = &ogg->streams[idx]; AVStream *st = avf->streams[idx]; struct oggopus_private *priv = os->private; uint8_t *packet = os->buf + os->p...
1threat
Python: How to loop a list and append it to a dictionary in a loop? : It is for a dynamic ring topology project. Specifically, I need to name each node: s1,s2...sz, and name each host h1-1,h1-2,...hz-n. So z is the number of the nodes, and n is the number of the host connected to each node. So I have a list of the node...
0debug
Get html table content via Pyton : i would like to extract the following table content and save it in a csv file via pandas, but only extract the date (e.g. Thu, 11/02) and all values, which are tagged by €/MWh. Thank you all very much in advance. Source code: <table cellspacing="0" cellpadding="0" border="0"...
0debug
Trailing class template arguments not deduced : <p>The code below fails to compile with gcc 7.1.0, which complains about providing the wrong number of template arguments in the second line of main. This version of GCC is <a href="https://gcc.gnu.org/projects/cxx-status.html" rel="noreferrer">supposed to implement</a> t...
0debug
Trouble installing opencv in docker container using pip : <p>I want to build a python docker container that has scikit-learn, opencv, and numpy. Unfortunately, I couldn't find a pre-built container that contained all these, but I did find the one below that contains numpy and scikit-learn.</p> <p><a href="https://hub....
0debug
static int pci_pcnet_init(PCIDevice *pci_dev) { PCIPCNetState *d = DO_UPCAST(PCIPCNetState, pci_dev, pci_dev); PCNetState *s = &d->state; uint8_t *pci_conf; #if 0 printf("sizeof(RMD)=%d, sizeof(TMD)=%d\n", sizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD)); #endif pci_conf = pc...
1threat
What is <String> called? : I am new to Java and saw them several times. The last time within this code example: List<String> myList = Arrays.asList("element1","element2","element3"); Now I want to know what this `<String>` or the <> signs is doing. Or especially what it is called so that I can search for it. ...
0debug
Argument passed to function must be callable, array given : <p>I'm trying to run a method on each element inside a collection. It's an object method residing in the same class:</p> <pre><code>protected function doSomething() { $discoveries = $this-&gt;findSomething(); $discoveries-&gt;each([$this, 'doSomething...
0debug
static struct omap_eac_s *omap_eac_init(struct omap_target_agent_s *ta, qemu_irq irq, qemu_irq *drq, omap_clk fclk, omap_clk iclk) { struct omap_eac_s *s = (struct omap_eac_s *) g_malloc0(sizeof(struct omap_eac_s)); s->irq = irq; s->codec.rxdrq = *drq ++; s->codec.tx...
1threat
Whats the difference between OpenSSL and LetsEncrypt? : <p>Historically we have used LetsEncrypt at work, but the nginx container we are using has Openssl installed on it already.</p>
0debug
Is there a way to create X number of buttons without me having to write each and one of them? : <p>So i'm trying to create a store using WPF and I've come to the point where I need to start adding the products, but I can't add each and every product to a button by myself, so I'm wondering is there a way to add an X amo...
0debug
How to modify sentence in following format : I have a input string "SQLSELECT SELECT location_id, department_name "Department" FROM tttt UNION SQLSELECT SELECT location_id, warehouse_name FROM warehouses EXCEPT SQLSELECT SELECT location_id, department_name "Department" FROM XYZ UNION ALL SQLSELECT SELECT location_id,...
0debug
static inline void gen_op_jnz_ecx(TCGMemOp size, int label1) { tcg_gen_mov_tl(cpu_tmp0, cpu_regs[R_ECX]); gen_extu(size, cpu_tmp0); tcg_gen_brcondi_tl(TCG_COND_NE, cpu_tmp0, 0, label1); }
1threat
MATLAB: How can I convert the number 1 into a date value 20150101 (yyyyMMdd)? : How can I convert A: A = [ 1 2 3 4 5 ... 731] into B = [ 20150101 20150102 20150103 20150104 20150105 ... 20161231]
0debug
AdvertisingIdClient#getAdvertisingIdInfo sometimes returns null since v9.8.0 : <p>I got an issue since I bumped the play-services version to v9.8.0. I notice that the method AdvertisingIdClient#getAdvertisingIdInfo sometimes returns null (i have not identified any pattern to reproduce this case yet).</p> <p>Do you if ...
0debug
How to upload multiple files in django rest framework : <p>In django rest framework, I am able to upload single file using <a href="https://github.com/danialfarid/ng-file-upload" rel="noreferrer">danialfarid/ng-file-upload</a> </p> <p>views.py:</p> <pre><code>class PhotoViewSet(viewsets.ModelViewSet): serializer_...
0debug
Why doesn't the code work? : <pre><code>import java.util.Scanner; public class Formula { public static void main(String[] args) { Scanner numIn = new Scanner(System.in); Scanner form = new Scanner(System.in); double r, d, h, a; String formula; System.out.println("Please state which circle formu...
0debug
static void ptimer_trigger(ptimer_state *s) { if (s->bh) { qemu_bh_schedule(s->bh); } }
1threat
VSCode prevent file Explorer from jumping : <p>Is there a way to prevent VSCode from jumping all over the place when closing a tab? It jumps to the location of the selected tab, but this is very disorienting when opening various files to inspect within a lib.</p>
0debug
Python - Most elegant way to extract a substring, being given left and right borders : <p>I have a string - Python :</p> <pre><code>string = "/foo13546897/bar/Atlantis-GPS-coordinates/bar457822368/foo/" </code></pre> <p>Expected output is :</p> <pre><code>"Atlantis-GPS-coordinates" </code></pre> <p>I know that the ...
0debug
C 2-d array initialization throws segfault : <p>I'm trying to dive a little bit into C programming. So I'm trying to create a 2-d array using double pointers and initializing it with random values. However during the access phase it throws a segmentation fault</p> <p>Below is a striped down snippet of my code:</p> <p...
0debug
Confusion in syntax related to Deallocating Heap Arrays : <p>When we deallocate the heap memory occupied by an array, I have a little confusion regarding the syntax</p> <pre><code>int *p = new int[5]; </code></pre> <p>Now for deallocating, which one is correct from the following:</p> <pre><code>delete p; </code></pr...
0debug
static target_ulong h_add_logical_lan_buffer(PowerPCCPU *cpu, sPAPRMachineState *spapr, target_ulong opcode, target_ulong *args) { target_ulong reg = args[0]; target_ulong...
1threat
linking two UITextView to scroll together if one is scrolled : I have two textViews beside each other with multiple lines of text. How can I make them both scroll together based on scrolling either one of them at the same time I am using objective-C
0debug
static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, int Al, const uint8_t *mb_bitmask, int mb_bitmask_size, const AVFrame *reference) { int i, mb_x, mb_y; uint8_t *data[MAX_COMPONENTS]; c...
1threat
DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi, int *fatal_error) { const char *buf; const char *file = NULL; char devname[128]; const char *serial; const char *mediastr = ""; BlockInterfaceType type; enum { MEDIA_DISK, MEDIA_CDROM } media; int bus_id, unit_id; i...
1threat
My Table Invoice and LineItem arent outputting its values : enter code here SET NOCOUNT ON Create Database FinalDatabase GO USE FinalDatabase GO /* Create tables */ Create TABLE tblSalesPerson ( SalesID INT IDENTITY(1,1)PRIMARY KEY, FName VARCHAR...
0debug
Sow to fix size of function is unknown or zero and function call missing in main : I'm trying to complete this problem but I cant figure out how to get rid of the errors. Other code that I've looked at that uses arrays and functions looks the same and works but my code wont work for some reason. These are the errors th...
0debug
bool st_init(const char *file) { pthread_t thread; pthread_attr_t attr; sigset_t set, oldset; int ret; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); sigfillset(&set); pthread_sigmask(SIG_SETMASK, &set, &oldset); ret = pthread_cre...
1threat
int qemu_show_nic_models(const char *arg, const char *const *models) { int i; if (!arg || strcmp(arg, "?")) return 0; fprintf(stderr, "qemu: Supported NIC models: "); for (i = 0 ; models[i]; i++) fprintf(stderr, "%s%c", models[i], models[i+1] ? ',' : '\n'); return 1; }
1threat
Object *object_dynamic_cast(Object *obj, const char *typename) { if (object_class_dynamic_cast(object_get_class(obj), typename)) { return obj; } return NULL; }
1threat
HTML To PDF conversion of invoice : <p><strong>I want to convert this HTML invoice to PDF in .NET. I tried many libraries but none of them worked. When i tried to convert this HTML file to PDF it don't open up in adobe reader or any other software only in windows 10</strong></p> <p><div class="snippet" data-lang="js" ...
0debug
def arc_length(d,a): pi=22/7 if a >= 360: return None arclength = (pi*d) * (a/360) return arclength
0debug
Sh script what does $? : i want to know the function of **$?** for example if a variable has this value like **VARIABLE=$?** There is way to know this kind of operators if is a opertator of course
0debug