problem
stringlengths
26
131k
labels
class label
2 classes
Are there any examples of serious websites using riot.js? : <p>I have scoured the internet (clicked next page on google a couple of times) and the riot.js docs, and can't find a single high traffic website that uses riot.js. </p> <p>Are there any large scale websites/webapps using riot.js?</p>
0debug
I want to find the percentage : <p>i want to find the 25% value of any int or double like</p> <p>int 100 - 25% should = 75 or int 200 - 25% should = 150 etc</p> <p>how can i do something like that in JAVA</p>
0debug
Do mutexes guarantee ordering of acquisition? : <p>A coworker had an issue recently that boiled down to what we believe was the following sequence of events in a C++ application with two threads:</p> <ul> <li><p>Thread A holds a mutex.</p></li> <li><p>While thread A is holding the mutex, thread B attempts to lock it. ...
0debug
int64_t qemu_strtosz_metric(const char *nptr, char **end) { return do_strtosz(nptr, end, 'B', 1000); }
1threat
void avpriv_do_elbg(int *points, int dim, int numpoints, int *codebook, int numCB, int max_steps, int *closest_cb, AVLFG *rand_state) { int dist; elbg_data elbg_d; elbg_data *elbg = &elbg_d; int i, j, k, last_error, steps=0; int *dist_cb = av_malloc(numpoints*...
1threat
How to use React Router with Laravel? : <p>I needing use <code>React Router</code> with a <code>Laravel</code> project.</p> <p>But when I create router on the <code>React Router</code> and try access, <code>Laravel</code> accuse Route not exist error.</p> <p>How to can I use <code>React Router</code> to manager Larav...
0debug
void do_td (int flags) { if (!likely(!(((int64_t)T0 < (int64_t)T1 && (flags & 0x10)) || ((int64_t)T0 > (int64_t)T1 && (flags & 0x08)) || ((int64_t)T0 == (int64_t)T1 && (flags & 0x04)) || ((uint64_t)T0 < (uint64_t)T1 && (flags & 0x02)) || ...
1threat
static void decode_delta_j(uint8_t *dst, const uint8_t *buf, const uint8_t *buf_end, int w, int h, int bpp, int dst_size) { int32_t pitch; uint8_t *ptr; uint32_t type, flag, cols, groups, rows, bytes; uint32_t offset; int planepitch_byte ...
1threat
Write query for this example : <p>I have a table with below data,I want to write a query that give me id and the number of days that have connection. </p> <p>For example for id 1 give me 2 times (2016-09-20 , 2016-09-22)</p> <p><a href="https://i.stack.imgur.com/vs3t8.jpg" rel="nofollow noreferrer"><img src="https://...
0debug
static int local_mknod(FsContext *ctx, const char *path, mode_t mode, dev_t dev) { return mknod(rpath(ctx, path), mode, dev); }
1threat
How to make 2 varible add side by side?(Java) 2+2=22 : <p>int x= 2;</p> <p>int y= 2;</p> <p>int z= (?);</p> <p>System.out.println(z);</p> <p>I want it to print 22 instead of 4</p>
0debug
A program that replaces all s1's with s2 in a string : <p>I found this program that replaces all s1's with s2 in a string and i don't understant the sequence<br> int i = strstr(s, s1) - s ?</p> <pre><code>enter code here #include&lt;stdio.h&gt; #include&lt;stdlib.h&gt; #include&lt;string.h&gt; char *my_replace(char...
0debug
static int slirp_state_load(QEMUFile *f, void *opaque, int version_id) { Slirp *slirp = opaque; struct ex_list *ex_ptr; while (qemu_get_byte(f)) { int ret; struct socket *so = socreate(slirp); if (!so) return -ENOMEM; ret = vmstate_load_state(f, &vm...
1threat
bool migration_in_setup(MigrationState *s) { return s->state == MIG_STATE_SETUP; }
1threat
How to create a text input box with pygame? : <p>I want to get some text input from the user in python and display what they are typing in a text box, and when they press enter, it gets stored in a string. I've looked everywhere but i just can't find anything.(I'm using pygame)</p>
0debug
clear the contents of dynamic arrays inside the structure from a function in C : This is the sample version of my project and it throws run-time error because I could not clear the contents and already allocated dynamic memory of data array in the bipartition_fn() function. Can someone please help me with clearing th...
0debug
generate ms excle with insert table having merge cells and formulas : **by using Apache poi i can insert table but i have to apply formulas, merge cells on table columns. [enter image description here][1] this the requirement of to generate excel file [1]: https://i.stack.imgur.com/Jg...
0debug
Import Data from .text file using Multithread in Java : <p>I need to load big size data from a .text file using Java. But because the file is very big, I would like to use multithread for this operation. Could you help me about it?</p> <p>Thanks</p>
0debug
Creating dynamic Tuple : <p>Are there a good way to create dynamic number of arguments like:</p> <pre><code>public ??? Tuple&lt;string,?????&gt; returnProperTuple(int NumberOfArgs) {// if/case if(NumberOfArgs == 2) return new Tuple&lt;string, string&gt;(); ... if(NumberOfArgs == 4) return new Tuple&lt;string, string...
0debug
db.execute('SELECT * FROM employees WHERE id = ' + user_input)
1threat
How do i remove JSON Data? : I have the following JSON structure: <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> [{"type":0,"id":1,"children":[{"type":0,"id":14},{"type":0,"id":1}]},{"type":0,"id":16,"children":[{"type":0,"id":15,"children":[{"type":0,"id":13},...
0debug
static int find_unused_picture(MpegEncContext *s, int shared) { int i; if (shared) { for (i = 0; i < MAX_PICTURE_COUNT; i++) { if (s->picture[i].f.data[0] == NULL) return i; } } else { for (i = 0; i < MAX_PICTURE_COUNT; i++) { if (p...
1threat
WARN [middleware:karma]: Invalid file type, defaulting to js. ts : <p>When I run unit testing via karma, I got those warning:</p> <pre><code>12 02 2019 14:01:05.740:WARN [middleware:karma]: Invalid file type, defaulting to js. ts 12 02 2019 14:01:05.741:WARN [middleware:karma]: Invalid file type, defaulting to js. ts ...
0debug
static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf, int buf_size, AVCodecContext *avctx) { HEVCParserContext *ctx = s->priv_data; HEVCContext *h = &ctx->h; GetBitContext *gb; SliceHeader *sh = &h->sh; HEVCParamSets *ps = &h->p...
1threat
AssetManager to parse local JSON file returns NullPointer : <p>I have red many topics and questions about it, but can't find any solution. I am also very new to Android and Java.</p> <p>What I was trying to do is to parse my local JSON file and to set an adapter to view my Strings in a ListView. Shouldn't be too compl...
0debug
How to get a approximate equation for reverse look up : Is there any method or way to get the approximate equation(x = g(y)) for doing a reverse lookup from Y to X. Following is the simple y = f(x) and it's plot. ``` import numpy as np import matplotlib.pyplot as plt formula = "2*x**6 + x**5 -3*x**4 + 7*x**3 + ...
0debug
I'm trying to create a BlackJack game in java.(Ready to Program IDE) How do I turn an 11 into a 1 like I'm trying to do below? : <p>This is my entire code. I can't seem to find a way to pick out the aces and turn them into 1s if the total goes over 21. /**************************************************************...
0debug
Cant search my project database, various warnings : can i just start off by saying im doing a computing course where one of the units is intro to PHP and that im JUST starting to get into PHP so im very basic at this point, I have been tasked with making a site with a search page that you can search different movies et...
0debug
static void pc_cmos_init_late(void *opaque) { pc_cmos_init_late_arg *arg = opaque; ISADevice *s = arg->rtc_state; int16_t cylinders; int8_t heads, sectors; int val; int i, trans; Object *container; CheckFdcState state = { 0 }; val = 0; if (ide_get_geometry(arg->idebu...
1threat
Automatically create card on another HTML page including form information : <p>I'm currently creating a website with a list of members on a page. Members will register via a form, and once the form is filled in, I would like a card component to be created on another page (which will be password protected and only usabl...
0debug
void empty_slot_init(target_phys_addr_t addr, uint64_t slot_size) { if (slot_size > 0) { DeviceState *dev; SysBusDevice *s; EmptySlot *e; dev = qdev_create(NULL, "empty_slot"); s = sysbus_from_qdev(dev); e = FROM_SYSBUS(EmptySlot, s); e->s...
1threat
How to switch the capitals characters transform in DBeaver? : <p>The SQL editor in DBeaver has this unsupportable feature of transforming all capital characters into lower case. This happens as you type, the most schizophrenic thing.</p> <p>I have searched in the menus and the Preferences dialogue, but I can not find ...
0debug
How to launch Chrome Advanced REST Client : <p>There's <a href="https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo?hl=en-US" rel="noreferrer">this great REST client "extension" for Chrome</a>, but the only way I can find to launch it is to go to the Chrome webstore!</p> <p>...
0debug
void qmp_block_set_io_throttle(const char *device, int64_t bps, int64_t bps_rd, int64_t bps_wr, int64_t iops, int64_t iops_rd, int64_t iops_wr, bool has_bps_max...
1threat
Can anyone help we with these xCode errors? : [enter image description here][1]im trying to make an app for my church and am watching a bunch of YT tutorials but im getting a lot of errors http://imgur.com/a/qgals [1]: https://i.stack.imgur.com/IaSxP.png
0debug
*ngIf and *ngFor on <td></td> element : <p>I have a situation where I need *ngIf and *ngFor directive on the same element. I found lot of answers on the stackoverlow but none for the this type of situation.</p> <p>I have a table in which I'm looping through the array of objects and dynamically write cells in header:</...
0debug
void qemu_unregister_clock_reset_notifier(QEMUClock *clock, Notifier *notifier) { qemu_clock_unregister_reset_notifier(clock->type, notifier); }
1threat
cursor.execute('SELECT * FROM users WHERE username = ' + user_input)
1threat
Flutter - SWIFT_VERSION must be set to a supported value : <p>Trying out the library simple_permission, fixed the pod error and this came up, no idea how to proceed. There's no setting for the swift version in Build Settings, I tried adding it, but it didn't work.</p> <pre><code>Launching lib/main.dart on iPhone X in ...
0debug
Return filtered JSON variable in Jquery : I have this function to return `iconurl` value, according to `compname` value: function icons(x){ var comand = x.toLowerCase(); var icon= { "ico":[ { "iconname": "X", "iconurl": "resources/img/x.jpg" }, ...
0debug
def count_char_position(str1): count_chars = 0 for i in range(len(str1)): if ((i == ord(str1[i]) - ord('A')) or (i == ord(str1[i]) - ord('a'))): count_chars += 1 return count_chars
0debug
static inline void pxa2xx_rtc_int_update(PXA2xxState *s) { qemu_set_irq(s->pic[PXA2XX_PIC_RTCALARM], !!(s->rtsr & 0x2553)); }
1threat
Package for listing version of packages used in a Jupyter notebook : <p>I seem to remember there is a package that printed the versions and relevant information about Python packages used in a Jupyter notebook so the results in it were reproducible. But I cannot remember the name of the package. Can any of you point me...
0debug
Installing a specific version of angular with angular cli : <p>I searched through google and angular cli doc but couldn't find any way to install a specific version of angular using angular cli. is it even possible?</p>
0debug
Asp.net foreach loop : <p>Is foreach loop check empty index of array or it terminates on that index where elements are ended? for example at index 0 of array the element exists and index 1 is empty and then at index 2 the element exist, is foreach loop check the element at index 2 or terminates at index 1?</p>
0debug
Null Data from onResponse() of volley in Fragment' onCreateView() : <p>I am trying to get some country data from a URL using volley. In <strong>onResponse()</strong> data is successfully added to <em>countryList</em> and <em>countryList.size()</em> shows it has 5 countries. But in <strong>onCreateView()</strong>, when ...
0debug
sending post request to REST over SSL in json from C# : i looked up every single page on google there was no clear answer right now this is my code:` try { var httpWebRequest = (HttpWebRequest)WebRequest.Create("https://api.hesabit.com/oauth2/token"); httpWebRequ...
0debug
trying to use bulksms,com api using guzzle in laravel but returning erros : i have been trying to use guzzle for sending bulk sms from bulksms.com and it is returning this error,guzzlehttp\exception\clientexception client error: post https://api.bulksms.com/v1/messages resulted in a 401 full authentication is required ...
0debug
In excel i want to compare particular cells and take the highest value and place in parent cell when particular cells update : [enter image description here][1] [1]: http://i.stack.imgur.com/Bfv6L.png 1) Hi in the above image A column is having sum values help me with any formula so that in A13 i need an...
0debug
git checkout my_branch vs. git checkout origin/my_branch : <p>I was on <code>branch1</code> when I checkout <code>branch2</code> like this (both branches are existing).</p> <p><code>git checkout origin/branch2</code></p> <p>then I got a detached head error:</p> <pre><code>You are in 'detached HEAD' state. You can lo...
0debug
Ruglare expermetion in python is not match : I'm doing regular expression on python. I spend much time to fix and to know why the regular expression doesn't work or match. I post the text and my code here. May I know what is wrong with my code: The text is : [pid 30101] 04:15:46 writev(25, [{"\0\225u...
0debug
What is ConstraintLayout Optimizer? : <p>Google published <strong>ConstraintLayout 1.1.0 beta 6</strong> on March 22, 2018. It has a new constraint known as <strong><em>Optimizer</em></strong>. The documentation of Optimizer at <a href="https://developer.android.com/reference/android/support/constraint/ConstraintLayout...
0debug
target_ulong helper_rdhwr_xnp(CPUMIPSState *env) { check_hwrena(env, 5); return (env->CP0_Config5 >> CP0C5_XNP) & 1; }
1threat
Generics in .net 2.0 : Using a Where class on a class defination : During the preparation for "Programing in C#" Certification from [this][1] book at objective 2.1 where the following code is given for Generic Types. class MyClass<T> where T:class,new() { public MyClass() { My...
0debug
static void draw_slice(AVFilterLink *link, int y, int h) { ScaleContext *scale = link->dst->priv; int out_h; AVFilterPicRef *cur_pic = link->cur_pic; uint8_t *data[4]; if (!scale->slice_dir) { if (y != 0 && y + h != link->h) { av_log(scale, AV_LOG_ERROR, "Slices start i...
1threat
static av_cold void sws_init_swscale(SwsContext *c) { enum AVPixelFormat srcFormat = c->srcFormat; ff_sws_init_output_funcs(c, &c->yuv2plane1, &c->yuv2planeX, &c->yuv2nv12cX, &c->yuv2packed1, &c->yuv2packed2, &c->yuv2packedX, &c->yuv2anyX); ...
1threat
static av_cold int oggvorbis_encode_close(AVCodecContext *avccontext) { OggVorbisContext *context = avccontext->priv_data; vorbis_analysis_wrote(&context->vd, 0); vorbis_block_clear(&context->vb); vorbis_dsp_clear(&context->vd); vorbis_info_clear(&context->vi); av_freep(&avccont...
1threat
if $a = 3 and $b = 100 so i can get how many has been minused from $b=100 in $c variable (eg.$c = 3) in php.? : <p>if $a = 3 and $b = 100 so i can get how many has been minused from $b=100 in $c variable (eg.$c = 3) in php.? I just need minused number from the addition of two variable 3 and 100 answer should be 3 in my...
0debug
Regex - extracting numbers from string in Oracle SQL : <p>how to extract using SQL or PL/SQL all numbers from below strings? </p> <p>[ 6d (1.5h; 31h)] x (5 to 7)</p> <p>[ 1d (8h; 24h; 48.5h; 72h; 96h)] x (1 to 5)</p>
0debug
static ExitStatus gen_fbcond(DisasContext *ctx, TCGCond cond, int ra, int32_t disp) { TCGv cmp_tmp = tcg_temp_new(); gen_fold_mzero(cond, cmp_tmp, load_fpr(ctx, ra)); return gen_bcond_internal(ctx, cond, cmp_tmp, disp); }
1threat
PHP - Regex to split string into alpha and numeric : I need to use `preg_split()` function to split string into alpha and numeric. Ex: ABC10000 into, ABC and 10000 GSQ39800 into GSQ and 39800 WERTYI67888 into WERTYI and 67888 Alpha characters will be the first characters(any number of) of the string always ...
0debug
Postgre returns wrong values for varchar-timestamp conversion : I have been encountering a very strange error while working on a postgre server. I have a column which contains times as varchar in the format HH24MMSS and I have to convert it to a timestamp using to_timestamp(varchar, 'HH24MMSS'). However, it returns me ...
0debug
package.config update does not update the references : <p>I have multiple projects referencing the same NuGet Package. When I got latest code, I realized that one of the projects had an updated package.config and also updated reference to the Dll that is provided by that package.</p> <p>Now, I also updated package.con...
0debug
static void xbr2x(AVFrame * input, AVFrame * output, const uint32_t * r2y) { int x,y; int next_line = output->linesize[0]>>2; for (y = 0; y < input->height; y++) { uint32_t pprev; uint32_t pprev2; uint32_t * E = (uint32_t *)(output->data[0] + y * output->linesize[0] * 2)...
1threat
void console_select(unsigned int index) { TextConsole *s; if (index >= MAX_CONSOLES) return; s = consoles[index]; if (s) { active_console = s; if (s->g_width && s->g_height && (s->g_width != s->ds->width || s->g_height != s->ds->height)) dpy_re...
1threat
Assigning users to tasks in Visual Studio Team Services : <p>I've just joined my friend's Team Services account (free for the first 5 users account). If I visit the home page (<a href="https://XXXXXXX.visualstudio.com/Development/Development%20Team" rel="noreferrer">https://XXXXXXX.visualstudio.com/Development/Developm...
0debug
Regex match after semicolon and separated comma : <p>I have a string like</p> <pre><code>Menu: apple, orange-juice, bananas </code></pre> <p>I want to use REGEX to match only <strong>apple</strong> <strong>orange-juice</strong> <strong>bananas</strong> I have tried to search Google and regex101.com for help but still...
0debug
int net_init_socket(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan) { if (qemu_opt_get(opts, "fd")) { int fd; if (qemu_opt_get(opts, "listen") || qemu_opt_get(opts, "connect") || qemu_opt_...
1threat
typescript type of class that has tobe initialized : let circle: Circle; This line says that circle is an instance of Circle. There is a case when I have a list of factories, they have not been initialized(list of classes). I have to process their static properties. What type should I use for? I receive such error:...
0debug
How to use empty view with pagination using paging library android? : <ul> <li>How to determine size of data returned before setting adapter? </li> <li>How to use emptyview with paging library?</li> <li>How to set emptyview if pagedlist returns null or no data?</li> </ul>
0debug
static void do_help(int argc, const char **argv) { help_cmd(argv[1]); }
1threat
static uint64_t icp_control_read(void *opaque, target_phys_addr_t offset, unsigned size) { switch (offset >> 2) { case 0: return 0x41034003; case 1: return 0; case 2: return 0; case 3: return 0x11; default: ...
1threat
Npm not found when running docker container from node image : <pre><code># Dockerfile FROM node:7-alpine RUN mkdir -p /src/app WORKDIR /src/app COPY package.json /src/app/package.json RUN npm install COPY . /src/app EXPOSE 3000 CMD ['npm', 'start'] </code></pre> <p>I'm trying to complete a <a href="https://katacoda.co...
0debug
static inline bool bdrv_req_is_aligned(BlockDriverState *bs, int64_t offset, size_t bytes) { int64_t align = bdrv_get_align(bs); return !(offset & (align - 1) || (bytes & (align - 1))); }
1threat
Create Dynamic Table in Android : I am learning android development ,I want to create dynamic table rows .I don't know how to create .I want to create two table .One should static and Another should be dynamic .I referred in internet and i saw table layout , recycler view and I don't know which is best way to do it.Ple...
0debug
static int amr_wb_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AMRWBContext *s = avctx->priv_data; int mode; int packet_size; static const uint8_t b...
1threat
Junit in springboot not working with autowired annotation : I have a springboot application in which i m creating rest web services using mvc pattern. I have controller ,service and dao class and using autowired annotation for callung methods of service and dao layer. When i creating junit using mockito,the values...
0debug
static void kmvc_decode_inter_8x8(KmvcContext * ctx, const uint8_t * src, int w, int h) { BitBuf bb; int res, val; int i, j; int bx, by; int l0x, l1x, l0y, l1y; int mx, my; kmvc_init_getbits(bb, src); for (by = 0; by < h; by += 8) for (bx = 0; bx < w; bx += 8) { ...
1threat
static void write_frame(AVFormatContext *s, AVPacket *pkt, AVCodecContext *avctx, AVBitStreamFilterContext *bsfc){ while(bsfc){ AVPacket new_pkt= *pkt; int a= av_bitstream_filter_filter(bsfc, avctx, NULL, &new_pkt.data, &new_pkt.size, ...
1threat
int qemu_init_main_loop(Error **errp) { int ret; GSource *src; Error *local_error = NULL; init_clocks(); ret = qemu_signal_init(); if (ret) { return ret; } qemu_aio_context = aio_context_new(&local_error); if (!qemu_aio_context) { error_propagate(err...
1threat
Hi.. How to pull a Dockerfile from github (after edited) via Jenkins and run it on a remote server : Let's say I have a public repo (Github), my file looks like that: docker build -t abrakadabra40404 . I changed it to: docker build -t abrakadabra40404111111111 . Now I want Jenkins to pull this file and run it o...
0debug
c# How to check which line is selected listbox : <p>I need suggestions how to see which line is selected in a Listbox (winforms). So when I click a line in the listbox a messagebox will popup with the text: <code>You clicked line X</code> or <code>You selected line is X</code></p> <p>Hope you guys can help me!</p>
0debug
ruby on rails identifier error 1 : <p>Everytime i run this code i get an error can't find what i had did wrong it said something about synatic error tidentifier, expecting keyword_do or '{' or '('. Anyone has any suggestion on what it could be?</p> <hr> <p>_form.html.haml</p> <pre><code> = simple_form_for @pin, html...
0debug
Compare two IEnumerable : <p>I have two Ienumerables. First consist volleyball,basketboll, soccer events. Second - full history of games. Its all string, because I parse its</p> <pre><code>public class Events { public string Date { get; set; } public string FirstTeam { get; set; } public st...
0debug
Converting factor YYYY/MM to date class in R : I have dataframe with a column of dates of the form YYYY/MM, factor class, and I wish to convert it to date class. E.g. 2000/01 -> Jan 2000 I note that as.Date() is unable to handle date formats without the day component. I have tried using the as.yearmon() function fro...
0debug
static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, const uint8_t *buf, unsigned int substr) { SubStream *s = &m->substream[substr]; unsigned int ch; int sync_word, tmp; uint8_t checksum; uint8_t lossless_check; int start_count = get_bit...
1threat
SQL Filter Orders by Customers Role : <p>I have two tables and i want display in my output list only orders who have customer role 0. <br>this is my db :</p> <h3>table1</h3> <p>Table name : <strong>customers</strong> <br><br> <strong>id | role | name <br><br></strong> 1 | 0 | david<br> 2 | 0 | Opera<br> 3 | 1 | Jac...
0debug
js , jquery, JSP. How to display a generic text inside a text box : I have a textarea/textbox which dynamically gets url from the database.Right now the textbox is showing full url address and does not look good. What I was trying to get is use some generic text like "click here for more info". i tried place holder but...
0debug
Multiple Values in sql : I have two tables, Table A & Table B Table A: G.R.N ITEM QUANTITY 1 ABC001 150 1 CBD001 150 1 SDB001 100 Table B: DELIVERY ITEM QUANTITY 34 ABC001 50 35 ABC001 40 36 ABC001 60 37 CBD001 50 38 CBD001 40 39 CBD001 10 Is it possible...
0debug
Do I have to store return values from methods C# : <p>I just started working with C# and I have noticed that my code works even if I don't store a return value from a method. Example: Lets say I have a method</p> <pre><code>public class Hello(){ public bool GoodMorning(){ return true; } } </code></pre...
0debug
static int vscsi_queue_cmd(VSCSIState *s, vscsi_req *req) { union srp_iu *srp = &req->iu.srp; SCSIDevice *sdev; int n, id, lun; vscsi_decode_id_lun(be64_to_cpu(srp->cmd.lun), &id, &lun); sdev = (id < 8 && lun < 16) ? s->bus.devs[id] : NULL; if (!sdev) { dprintf("VSCSI: ...
1threat
build_fadt(GArray *table_data, BIOSLinker *linker, AcpiPmInfo *pm, unsigned facs, unsigned dsdt, const char *oem_id, const char *oem_table_id) { AcpiFadtDescriptorRev1 *fadt = acpi_data_push(table_data, sizeof(*fadt)); fadt->firmware_ctrl = cpu_to_le32(facs); bios_linker_...
1threat
target_ulong helper_lwr(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, int mem_idx) { target_ulong tmp; tmp = do_lbu(env, arg2, mem_idx); arg1 = (arg1 & 0xFFFFFF00) | tmp; if (GET_LMASK(arg2) >= 1) { tmp = do_lbu(env, GET_OFFSET(arg2, -1), mem_idx); ...
1threat
how apt-get knows where to look for packages : <p>If I just run <code>apt-get update</code> (without any package name) on a new installation, the OS download/updates the packages. How does it know which packages to download and from where? Is the list of <code>sources</code> pre-configured in the <code>OS</code> eg. i...
0debug
How to build a TypeScript class constructor with object defining class fields? : <p>In TypeScript it's possible to create a class with a constructor that takes parameter with access modifiers and it automatically convert those parameters in class fields.</p> <pre><code>class Item { constructor( public id: number...
0debug
void memory_region_init_ram(MemoryRegion *mr, Object *owner, const char *name, uint64_t size) { memory_region_init(mr, owner, name, size); mr->ram = true; mr->terminates = true; mr->destructor = memory_region_des...
1threat
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { TiffContext *const s = avctx->priv_data; AVFrame *const p = data; ThreadFrame frame = { .f = data }; unsigned off; int le, ret, plane, planes; int i, j, entries, stride; ...
1threat
Spring @Scheduler parallel running : <p>I have the following 3 classes:</p> <p><em>ComponantA</em></p> <pre><code>package mytest.spring.test.spring; import org.apache.log4j.Logger; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @Component public class Co...
0debug
static coroutine_fn int qcow_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov) { BDRVQcowState *s = bs->opaque; int index_in_cluster; uint64_t cluster_offset; int ret = 0, n; struct iovec hd_iov; QEMUIOVector hd_qiov; u...
1threat
static void test_wait_event_notifier(void) { EventNotifierTestData data = { .n = 0, .active = 1 }; event_notifier_init(&data.e, false); aio_set_event_notifier(ctx, &data.e, event_ready_cb); g_assert(!aio_poll(ctx, false)); g_assert_cmpint(data.n, ==, 0); g_assert_cmpint(data.active, ==, 1...
1threat