problem
stringlengths
26
131k
labels
class label
2 classes
How can I make a generic TypeScript interface extend from another generic interface? : <p>I have an interface, with several elements:</p> <pre><code>export interface Item { id: string; code: string; createdAt: string; updatedAt: string; level: number; seq: number; hasChildren: boolean; parentObject?: ...
0debug
static void ffmpeg_cleanup(int ret) { int i, j; if (do_benchmark) { int maxrss = getmaxrss() / 1024; printf("bench: maxrss=%ikB\n", maxrss); } for (i = 0; i < nb_filtergraphs; i++) { FilterGraph *fg = filtergraphs[i]; avfilter_graph_free(&fg->graph); ...
1threat
Front-End Website learning sources : <p>I've seen a lot of awesome websites from Awwwarrds ranking and trying to learn how they made their websites, all their effects are just wonderful and beautiful. But I have no clue how to do something similar, I understand this involves a lot of javascript. Is there somewhere on t...
0debug
Android app crashes when trying to add data to sqlite database : <p>So I've created an sqlite database table which I checked was created. However the app crashes every time I try to add data. I have another similar table that is implemented the same way and works just fine so I'm guessing the problem is somewhere in th...
0debug
static int mov_write_moov_tag(ByteIOContext *pb, MOVContext *mov, AVFormatContext *s) { int i; offset_t pos = url_ftell(pb); put_be32(pb, 0); put_tag(pb, "moov"); mov->timescale = globalTimescale; for (i=0; i<MAX_STREAMS; i++) { if(mov->tracks[i]...
1threat
what's wrong with this simple code : `public static void main (String[] args) { Scanner input = new Scanner(System.in); int[] array = new int[5]; System.out.print("Please enter five numbers. \na="); array[0] = input.nextInt(); System.out.print("\nb="); array[1] = input.nextInt(); System.out.print("...
0debug
how to validate form in jquery this code not working : $(document).ready(function(){ var name = $('#signup-name').val(); var email = $('#signup-email').val(); var password = $('#signup-password').val(); var email_regex = new RegExp(/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/i...
0debug
How to Pass List<> to Store Proc : I am trying to pass alist to database (sql server 2008 r2) using user defined table types but get some errors my code is: public int DAL_SaveIncramentSalary(tbl_Employee_Master obj, List<dtIncrementSalary> tbl) { try { SqlParameter[] objSq...
0debug
Automatic documentation/contract generation for Pub/Sub RabbitMQ : <p>In the REST world, we have something like a Swagger Specification, which fully describes the contract over a REST interface boundary (between client and server). Those Swagger specifications can be used to auto-generate REST clients, but also to auto...
0debug
Library to build animation like slack-demo : <p>I want to build an animation like the one in <a href="https://slackdemo.com/?vst=.1wl4q6p32ubd8c0zflxmi0kfn#Team" rel="nofollow noreferrer">slack-demo</a> page. Basically I am trying to demonstrate a feature of my Application with animation. I can do so using Vanilla JS a...
0debug
static void usbredir_control_packet(void *priv, uint32_t id, struct usb_redir_control_packet_header *control_packet, uint8_t *data, int data_len) { USBRedirDevice *dev = priv; int len = control_packet->length; AsyncURB *aurb; DPRINTF("ctrl-in status %d len %d id %u\n", control_packet->s...
1threat
static bool vring_notify(VirtIODevice *vdev, VirtQueue *vq) { uint16_t old, new; bool v; if (((vdev->guest_features & (1 << VIRTIO_F_NOTIFY_ON_EMPTY)) && !vq->inuse && vring_avail_idx(vq) == vq->last_avail_idx)) { return true; } if (!(vdev->guest_features & (1 << V...
1threat
NullPointerException when using a fragment to get values from another class : <p>I am a beginner in android and having some problem in handling NullPointerException.I need to pass the magnetometer reading values in an array from one class to a fragment. Here is the magnetometer class:</p> <pre><code>public class Magne...
0debug
The respons from the retrofit call is too slow and it returns a null list : public class RequestClass { private static final String TAG = RequestClass.class.getSimpleName(); private final static String API_KEY = "apikey"; static ApiInterface apiService = ApiClient.getClient().create(ApiInt...
0debug
C# Fill array values in just one line of code : <p>I'm adding value to an array of bytes with the following code:</p> <pre><code>byte[] ConnectionPath; ConnectionPath[0] = 0; ConnectionPath[1] = 2; ConnectionPath[2] = 1; ConnectionPath[3] = 0; </code></pre> <p>My question is, can't I do this in just 1 line of code?...
0debug
How to change whole page background-color in Angular : <p>I am trying to change the background color for the whole page in Angular(would use body, or html tag when working without framework). and I can't find the best practice for this, I want it to be within the framework if possible since I am building an application...
0debug
Can we use a closure within a closure in javascript? : <p>If I write something like below </p> <pre><code>function sum(x){ return function(y){ return function(z){ return x + y + z; } } } </code></pre> <p>and call it like sum(2)(3)(4) // output is 8</p> <p>can we call the above function, an ex...
0debug
PHP is not recognizing file upload extension : <p>I have the following array sent by ajax when echoed in php</p> <pre><code>[file] =&gt; Array ( [name] =&gt; XXXX.jpg [type] =&gt; image/jpeg [tmp_name] =&gt; D:\xampp\tmp\phpC5F2.tmp [error] =&gt; 0 [size] =&gt; 25245 ) </code></pre> <p>and th...
0debug
void OPPROTO op_fdiv_STN_ST0(void) { ST(PARAM1) /= ST0; }
1threat
if else statement in boolean operations : <pre><code>L = [1,2,3,4,5] r = None for item in L: #if item is odd or 0 bind it to r. if r is None then 0 if (item % 2 or item == 0) and item &gt;= 0 if r == None else r: print(r) r = item </code></pre> <p>This prints:</p> <pre><code>None 1 2 3 4 </code></...
0debug
static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ int y, h_size; if(c->srcFormat == PIX_FMT_YUV422P){ srcStride[1] *= 2; srcStride[2] *= 2; } h_size= (c->dstW+7)&~7; if(h_s...
1threat
"UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure." when plotting figure with pyplot on Pycharm : <p>I am trying to plot a simple graph using pyplot, e.g.:</p> <pre><code>import matplotlib.pyplot as plt plt.plot([1,2,3],[5,7,4]) plt.show() </code></pre> <p>but the ...
0debug
static void init_proc_POWER9(CPUPPCState *env) { init_proc_book3s_common(env); gen_spr_book3s_207_dbg(env); gen_spr_book3s_ids(env); gen_spr_amr(env); gen_spr_iamr(env); gen_spr_book3s_purr(env); gen_spr_power5p_common(env); gen_spr_power5p_lpar(env); gen_spr_power5p_ear(en...
1threat
static void omap_mcbsp_writew(void *opaque, hwaddr addr, uint32_t value) { struct omap_mcbsp_s *s = (struct omap_mcbsp_s *) opaque; int offset = addr & OMAP_MPUI_REG_MASK; if (offset == 0x04) { if (((s->xcr[0] >> 5) & 7) < 3) return; if (s->tx_req...
1threat
how to replace all the zeros in javascript : How can I replace all the zeros in a javascript variable, I have some variables like this one: var a = 00000004567, and I need to replace the zeros with *, I'm using : a.replace(/0*\d/g,'*') the problem is that it returns -> ****567 Thanks
0debug
ajax send data to php file : send `$username` php with ` data: new FormData(this),` to add.php like `data: new FormData(this),$username` how can i do it with ajax code <script type="text/javascript"> $(document).ready(function (e) { $("#uploadFormuserimg").on('submit',(function(e) { e.preventDefaul...
0debug
attempt to set an attribute on NULL in R : Error in data.table::rbindlist(.data, ...) : attempt to set an attribute on NULL I am getting this error at: FBInsightsExpanded <<- list.stack(list.select(FBInsightsExpanded, website_purchase_roas = website_purchase_roas$action_link_click_destination)); ...
0debug
I want to generate tableview form with JSON data : <p>I have a JSON data in my local file, I want to replicate same in my form.</p> <p>JSON data tell us info like, which field is required, which is dropdown, placeholder and more info. </p> <p>Almost I achieved my goal, but only the thing is keyboard taking double ta...
0debug
void cpu_loop(CPUTLGState *env) { CPUState *cs = CPU(tilegx_env_get_cpu(env)); int trapnr; while (1) { cpu_exec_start(cs); trapnr = cpu_tilegx_exec(cs); cpu_exec_end(cs); switch (trapnr) { case TILEGX_EXCP_SYSCALL: env->regs[TILEGX_R_RE] = do_s...
1threat
Write PHP code in Python : <p>Would like to know whats the Python function to call if I would like to write PHP script in Python. I am trying to utilise a PHP function that would take in values from a table created in python, operate on the text in PHP (using that PHP library) and throw the result back into a python ta...
0debug
Track user location through mobile number : <p>I want to create an application, when I enter any mobile number it should give me current location of that number. Guys please help me if it is possible then tell me how it is possible ?</p>
0debug
Executing sbt run in current project with ensime emacs : <p>I have a Scala project called <code>scala-playground</code> and I generated the configuration for Ensime with <code>sbt ensimeConfig</code> and <code>sbt ensimeConfigProject</code>.</p> <p>When running <code>M-x ensime</code> from a buffer of the project, I c...
0debug
void OPPROTO op_lmsw_T0(void) { T0 = (env->cr[0] & ~0xf) | (T0 & 0xf); helper_movl_crN_T0(0); }
1threat
import math def degree_radian(radian): degree = radian*(180/math.pi) return degree
0debug
nil is the only return value permitted in initializer? : <p>I'm attempting to subclass UICollectionViewFlowLayout but I get the error that 'nil is the only return value permitted in an initializer.' I attempted to check the super class for an initializer and if there wasn't, I would return nil, but alas, I get another ...
0debug
static inline bool extended_addresses_enabled(CPUARMState *env) { return arm_el_is_aa64(env, 1) || ((arm_feature(env, ARM_FEATURE_LPAE) && (env->cp15.c2_control & (1U << 31)))); }
1threat
How to send a packed structure in C++ and recieve it in C# : I need to write a client on C++, which would send packed structure to the server. Server must be written on C#. I dont understand, how to convert it in C#. May be you will suggest a better way to do this.
0debug
How to add data to a Linked Link : Am working on a Linked list in java when i add data in it and print out the linked the result i get shows that the linked list is empty. but i just added some data to it below is my code. package linked; import java.util.LinkedList; public class workPls { pu...
0debug
How to print text in center of receipt using cpcl language (not ZPL & EPL) in Zebra Printers through Android app? : This answers doesn't helped me https://stackoverflow.com/questions/7158308/centering-a-receipt-title-with-cpcl-programmingzebra-mobile-printeres
0debug
QemuOpts *qemu_opts_parse(QemuOptsList *list, const char *params, int permit_abbrev) { const char *firstname; char value[1024], *id = NULL; const char *p; QemuOpts *opts; assert(!permit_abbrev || list->implied_opt_name); firstname = permit_abbrev ? list->impli...
1threat
static bool scsi_block_is_passthrough(SCSIDiskState *s, uint8_t *buf) { switch (buf[0]) { case READ_6: case READ_10: case READ_12: case READ_16: case VERIFY_10: case VERIFY_12: case VERIFY_16: case WRITE_6: case WRITE_10: case WRITE_12: case WRITE_16: ca...
1threat
How to give Image src dynamically in react js? : <p>I am trying to give image name in src dynamically. I want to set image name dynamically using variable with path. but I am not able to set src correctly. I tried solutions on stackoverflow but nothing is working. </p> <p>I tried to give path like this </p> <pre><cod...
0debug
Unlimited ArrayList in Java : <p>I need to make trivial array of strings in Java but I can not find a simple way to do it. I try to use <code>List&lt;String&gt; myList = new ArrayList&lt;&gt;();</code> but implementation says this is limited to 10 items. The question is simple how to make array of strings without limit...
0debug
static void scsi_unrealize(SCSIDevice *s, Error **errp) { scsi_device_purge_requests(s, SENSE_CODE(NO_SENSE)); blockdev_mark_auto_del(s->conf.blk); }
1threat
Chrome DevTools won't let me set breakpoints on certain lines : <p><a href="https://i.stack.imgur.com/utVAf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/utVAf.png" alt="enter image description here"></a></p> <p>In the image above, I tried setting breakpoints on every line from line 437 to line 443. Howeve...
0debug
Vector Array in C++ : <p>If vector consists from these numbers <code>55 55 55 55 1 23 45</code>, how I am possible to print the number who repeat itself for more then once, so basically <strong>it should print:</strong> <code>55, 1, 23, 45</code>.</p>
0debug
char variables doesn't work with switch properly c++ : <p>I'm new to c++ and coding and having a problem trying to write a simple program based on switch-case instruction. I want to let the user set value for char variables and then compare them using switch-case instruction, but the problem is that when I enter values...
0debug
int64_t qemu_strtosz(const char *nptr, char **end) { return do_strtosz(nptr, end, 'B', 1024); }
1threat
static void filter_line_c(uint8_t *dst, uint8_t *prev, uint8_t *cur, uint8_t *next, int w, int refs, int parity, int mode) { int x; uint8_t *prev2 = parity ? prev : cur ; uint8_t *next2 = parity ? cur : next; for (x = 0; x < w; x++) { ...
1threat
How to limit the results on a percentage rather than fix limit numer in mysql? : The below mysql question returns only the 10 first rows. How can I limit the them to 10% of all? SELECT page, poso, diff FROM (SELECT page, Count(*) AS poso, ...
0debug
How to lay out B-Tree data on disk? : <p>I know how a B-Tree works in-memory, it's easy enough to implement. However, what is currently completely beyond me, is how to find a data layout that works effectively on disk, such that:</p> <ul> <li>The number of entries in the B-Tree can grow indefinitly (or at least to > 1...
0debug
Cannot read property 'charAt' of undefined wordpress theme : <p>Can anyone please help me in understanding what am i doing wrong here. Downloaded a theme for a client and the whole theme is breaking due to: Cannot read property 'charAt' of undefined.</p> <p><a href="https://i.stack.imgur.com/3NDvh.png" rel="nofollow n...
0debug
Why is my CSS keyframe fade in animation working? : <p><a href="https://i.stack.imgur.com/hrUR3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hrUR3.png" alt="enter image description here"></a> <a href="https://i.stack.imgur.com/YnCdm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.co...
0debug
warning: Swift error in module. Debug info from this module will be unavailable in the debugger : <p>I have no debugging values in my console for my swift + obj-c app, and I get a really unhelpful message that explains why the debugger isn't working: "warning: Swift error in module XXX.". XXX is the name of my module, ...
0debug
Laravel Passport token lifetime : <p>I don't get what I'm doing wrong. I can't set token expiration time.</p> <pre><code>&lt;?php namespace App\Providers; class AuthServiceProvider extends ServiceProvider { public function boot() { $this-&gt;registerPolicies(); Passport::tokensExpireIn(Carbo...
0debug
How I can rearrange the last element of an array to the first place? : <p>I have an array of objects in javascript:</p> <pre><code>shapeToolsTarget: Array(4) 0: {id: 20, name: "Background", type: "shape"} 1: {id: 21, name: "BorderColor", type: "shape"} 2: {id: 22, name: "BorderWeight", type: "shape"} 3: {id: 3, name: ...
0debug
int qemu_strtoull(const char *nptr, const char **endptr, int base, uint64_t *result) { char *p; int err = 0; if (!nptr) { if (endptr) { *endptr = nptr; } err = -EINVAL; } else { errno = 0; *result = strtoull(nptr, &p, base...
1threat
Excel Macro to auto fill formula : I want to create an Excel macro that can expand my formula on a column with different sizes. I currently have 2 Pivot Tables and at the end of each one I have created a column of concatenated values. Eg: - Table 1: Cols D:I , concatenated col J First Cell with formula is J12...
0debug
the result of uint32_t become octonary automatically : int main() { uint32_t n1 = 00000000000000000000000000001000; uint32_t n2 = 00000000000000000000000000000100; cout << n2; } when I use vs2013 (c++): the result is 64. why this turns to octonary number system instead of binary?
0debug
static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, unsigned int width, unsigned int height, int lumStride, int chromStride, int srcStride) { unsigned y; const unsigned chromWidth= width>>1; for(y=0; y<height; y+=2) { #ifdef HAVE_MMX asm volatile( ...
1threat
int spapr_vio_send_crq(VIOsPAPRDevice *dev, uint8_t *crq) { int rc; uint8_t byte; if (!dev->crq.qsize) { fprintf(stderr, "spapr_vio_send_creq on uninitialized queue\n"); return -1; } rc = spapr_tce_dma_read(dev, dev->crq.qladdr + dev->crq.qnext, &byte, 1); if (...
1threat
static void coroutine_enter_cb(void *opaque, int ret) { Coroutine *co = opaque; qemu_coroutine_enter(co, NULL); }
1threat
Converting a Google Apps Script to VB Script (Excel) : I guess this will seem a bit lazy, but I have been working on this for quite a few hours to get it to work in Google Sheets. Now I have the need to also get it to work in Excel, using VB script. It's a pretty simple script for experienced programmers, which I am no...
0debug
av_cold void ff_fft_fixed_init_arm(FFTContext *s) { int cpu_flags = av_get_cpu_flags(); if (have_neon(cpu_flags)) { s->fft_permutation = FF_FFT_PERM_SWAP_LSBS; s->fft_calc = ff_fft_fixed_calc_neon; #if CONFIG_MDCT if (!s->inverse && s->mdct_bits >= 5) { s->...
1threat
static void tricore_cpu_class_init(ObjectClass *c, void *data) { TriCoreCPUClass *mcc = TRICORE_CPU_CLASS(c); CPUClass *cc = CPU_CLASS(c); DeviceClass *dc = DEVICE_CLASS(c); mcc->parent_realize = dc->realize; dc->realize = tricore_cpu_realizefn; mcc->parent_reset = cc->reset; cc-...
1threat
static TCGv_i64 gen_muls_i64_i32(TCGv a, TCGv b) { TCGv_i64 tmp1 = tcg_temp_new_i64(); TCGv_i64 tmp2 = tcg_temp_new_i64(); tcg_gen_ext_i32_i64(tmp1, a); dead_tmp(a); tcg_gen_ext_i32_i64(tmp2, b); dead_tmp(b); tcg_gen_mul_i64(tmp1, tmp1, tmp2); tcg_temp_free_i64(tmp2); ret...
1threat
visual basic 2017 - how do i use keyboard keys to trigger controls? : i have been trying this for the past week and i need this information urgently for an upcoming competition. please help me out if you can... it took me a long time to research and make my select case code error free, but i have done it, and it just ...
0debug
How to Draw a point in an image using given co-ordinate with python opencv? : <p>I have one image and one co-ordinate (X, Y). How to draw a point with this co-ordinate on the image. I want to use Python OpenCV.</p>
0debug
How to remove side space : <p>I'm working on this website <a href="http://shapeofyou.lotusong.info/" rel="nofollow noreferrer">http://shapeofyou.lotusong.info/</a> and I am trying to make the boxes on the main page fill up the entire screen. How do I do that? I tried looking for any padding or margin but there wasn't a...
0debug
DISAS_INSN(branch) { int32_t offset; uint32_t base; int op; int l1; base = s->pc; op = (insn >> 8) & 0xf; offset = (int8_t)insn; if (offset == 0) { offset = cpu_ldsw_code(env, s->pc); s->pc += 2; } else if (offset == -1) { offset = read_im32(env...
1threat
Addition of integers in C : <p>I want to create a program which asks to the user to type in two integers, from 0 - 10. The program then turns the integers into words and the result is also printed into words. EXAMPLE: Please enter two integers: 2 5 two + five = seven</p>
0debug
Font Awesome 5 Icons not working on Bootstrap 4 : <p>I was trying to add the github (<code>class="fas fa-github"</code>) icon on a bootstrap dark button, but the button icon and text doesn't appear (the console shows nothing)</p> <p>Code:</p> <pre><code>&lt;div class="jumbotron"&gt; &lt;h1 class="display-4"&gt;He...
0debug
static void x86_iommu_realize(DeviceState *dev, Error **errp) { X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(dev); X86IOMMUClass *x86_class = X86_IOMMU_GET_CLASS(dev); MachineState *ms = MACHINE(qdev_get_machine()); MachineClass *mc = MACHINE_GET_CLASS(ms); PCMachineState *pcms = PC_MA...
1threat
How to convert string to char in Kotlin? : <pre><code>fun main(args: Array&lt;String&gt;) { val StringCharacter = "A" val CharCharacter = StringCharacter.toChar() println(CharCharacter) } </code></pre> <p>I am unable to convert string A to char. I know that StringCharacter = 'A' makes it char but I need th...
0debug
void stl_phys_notdirty(target_phys_addr_t addr, uint32_t val) { uint8_t *ptr; MemoryRegionSection *section; section = phys_page_find(address_space_memory.dispatch, addr >> TARGET_PAGE_BITS); if (!memory_region_is_ram(section->mr) || section->readonly) { addr = memory_region_section_add...
1threat
How can I call a function out of another functione inside a Class : I have the following problem: I want to call the Function "printHello" from the Function "testHello". The printHello function works on its own, however, when I try to call "printHello" from the "testHello" function, I get an reference error. Thank you ...
0debug
static void spapr_finalize_fdt(sPAPRMachineState *spapr, hwaddr fdt_addr, hwaddr rtas_addr, hwaddr rtas_size) { MachineState *machine = MACHINE(qdev_get_machine()); sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS...
1threat
No shortcut for DDMS in Android Studio 2.2 : <p>After updating Android studio to version 2.2, I am not able to find option of DDMS in the toolbar. Though I can find it in <em>Tools -> Android -> Android Device Monitor</em>. <br><br> Any help is highly appreciated.</p>
0debug
def is_Perfect_Square(n) : i = 1 while (i * i<= n): if ((n % i == 0) and (n / i == i)): return True i = i + 1 return False
0debug
Runtime error happens when deleting a node of the linklist : <p>Here's my C++ code of a simple structured linklist.</p> <pre><code>#include &lt;iostream&gt; using namespace std; class Node{ public: int data; Node* next; Node* prev; Node(){ data=-1; next=NULL; prev=NULL; } ...
0debug
static void monitor_read_command(Monitor *mon, int show_prompt) { if (!mon->rs) return; readline_start(mon->rs, "(qemu) ", 0, monitor_command_cb, NULL); if (show_prompt) readline_show_prompt(mon->rs); }
1threat
will an hashcode ever give a negative value? : <p>In the code given, it was trying to give a valid index for a hashtable by checking for any collision using another method linearprobe. I am just confuse of why we need to check for index &lt; 0, so will there be instance when hashCode will be negative? When/why will tha...
0debug
static av_cold int libopenjpeg_encode_close(AVCodecContext *avctx) { LibOpenJPEGContext *ctx = avctx->priv_data; opj_cio_close(ctx->stream); ctx->stream = NULL; opj_destroy_compress(ctx->compress); ctx->compress = NULL; opj_image_destroy(ctx->image); ctx->image = NULL; av_free...
1threat
What kind of font files do I need for modern browsers, Android and IOS? : <p>I have these as my font files:</p> <pre><code>@font-face { font-family: 'FontAwesome'; src: url('@{fa-font-path}/fontawesome-webfont.eot') format('embedded-opentype'), url('@{fa-font-path}/fontawesome-webfont.woff2') format('woff2'), ...
0debug
Html/css Table border lines/separate editing : i am working on a html/css project for my school but have run into a problem on one of my pages i have 3 table's witch i want to edit with css separately if tried to put class in all of the table's but it still only takes the commands of the second table am i suppose to ...
0debug
WPF display record weekly wise in Datagrid with Summary : <p><a href="https://i.stack.imgur.com/lkJTM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lkJTM.png" alt="enter image description here"></a></p> <p>I have a timesheet data, whose data model is defined as</p> <pre><code>public class Timeshe...
0debug
Testing if an event has been triggered in Jasmine : <p>How do you test if an event has been fired in Jasmine without <code>jquery-jasmine</code>? </p> <p>I'm working on a project where we don't use jQuery (wohoo), and I'm trying to write a unit test for my menu triggering function. It works like this:</p> <ul> <li>Yo...
0debug
custom CMD command for running python script with input parameter : <p>I want to create a custom cmd command that will open a python script and also have a input parameter.</p> <p>example: C:\Users\myName> create newFolder</p> <p>so create is for opening the python script (create.py) and the parameter is for making a...
0debug
want to remove 2 consecutive lines in r : [Data base Picture][1] [1]: https://i.stack.imgur.com/52NrJ.png Hi, attached is the link of transaction. this is a scenario of cancelled transaction in a restaurant check. I want R to check if an item has flag "U", then remove the U and 1 similar item which is ...
0debug
understading tcpdump.c file in contiki : I am trying to go through this file in contiki and finding it difficult to comprehend what is the purpose and why it is using such obfuscated code /*---------------------------------------------------------------------------*/ static char * s(char *str, char *...
0debug
How to make an image provider from an Icon in flutter for FadeInImage widget? : <p>I want to use <code>FadeInImage</code> with an icon as a placeholder.</p> <p><code>FadeInImage</code> has few constructors.</p> <p>In a default constructor it takes <code>ImageProvider</code> as a placeholder, and in <code>FadeInImage....
0debug
static abi_long lock_iovec(int type, struct iovec *vec, abi_ulong target_addr, int count, int copy) { struct target_iovec *target_vec; abi_ulong base; int i; target_vec = lock_user(VERIFY_READ, target_addr, count * sizeof(struct target_iovec), 1); if (!target_vec)...
1threat
static int ahci_populate_sglist(AHCIDevice *ad, QEMUSGList *sglist, int32_t offset) { AHCICmdHdr *cmd = ad->cur_cmd; uint16_t opts = le16_to_cpu(cmd->opts); uint16_t prdtl = le16_to_cpu(cmd->prdtl); uint64_t cfis_addr = le64_to_cpu(cmd->tbl_addr); uint64_t prdt...
1threat
Iterate over nth amount of indexes in an array of objects : <p>i am trying to return the sum of the <strong>first 4</strong> grid values from the object below (expected output <strong>5</strong>)</p> <pre><code>[ { "id": 1, "grid": 1 }, { "id": 2, "grid": 2 }, { "id": 3, "grid": 1 }...
0debug
project migrating to new version of java (Java 1.8) : <p>Currently my project uses java 1.7 and we have requirement to upgrade it to 1.8. what are the key points i have to consider before estimating the hours?</p>
0debug
static int poll_rest(gboolean poll_msgs, HANDLE *handles, gint nhandles, GPollFD *fds, guint nfds, gint timeout) { DWORD ready; GPollFD *f; int recursed_result; if (poll_msgs) { ready = MsgWaitForMultipleObjectsEx(nhandles, handles, timeout, ...
1threat
static void gen_rac(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); #else TCGv t0; if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } t0 = tcg_temp_new(); gen_addr_reg_index(ctx, t0); ...
1threat
Decrease List style bullet size using css? : <p>I searched at different sites but I can't get an actual solution for me. I want to decrease the size of bullet icon on li. But I don't wanna use the image at li:: before. Are there any ideas?</p>
0debug
static int svq1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MpegEncContext *s=avctx->priv_data; uint8_t *current, *previous; int ...
1threat
static VncServerInfo *vnc_server_info_get(VncDisplay *vd) { VncServerInfo *info; Error *err = NULL; info = g_malloc(sizeof(*info)); vnc_init_basic_info_from_server_addr(vd->lsock, qapi_VncServerInfo_base(info), &err); info->has_auth = true; info...
1threat