problem
stringlengths
26
131k
labels
class label
2 classes
static inline void gen_bx(DisasContext *s, TCGv_i32 var) { s->is_jmp = DISAS_UPDATE; tcg_gen_andi_i32(cpu_R[15], var, ~1); tcg_gen_andi_i32(var, var, 1); store_cpu_field(var, thumb); }
1threat
I have an issue with ${name} thing, how do i construct it? : <p>This is the code:</p> <pre><code>function greetings(input){ let name = input.shift(); console.log('Hello, ${name}!'); } greetings(["Niki"]); </code></pre> <p>Where is the issue, because by the given example it is written the same way and the exit code is...
0debug
forEach not a function error in node JS : I was taking a Udemy course, here is my code for an exercise that I was doing. Faker is a package downloaded from the NPM library var faker = require("faker"); console.log("+++++++++++++++++++"); console.log("Welcome to my shop!"); console.log("++++++++...
0debug
Detecting odd and even number in batch script : <p>I would like to know if I can make my batch script (<code>.bat</code>) to detect if a number is odd or even. Example: if the imput is an odd number, do this, if even, do that. This would be very helpfull for my next project.</p> <p>Thanks!</p>
0debug
How to implement a switch button with a button : <p>Helllo, i'm new in programming android my question is there a method for let a button create a new switch button with some caratteristic i want to, for example the name and a number.</p>
0debug
how can i copy an array from a class and double the size of the new array? : CDCatalogue::CDCatalogue() //creates array of 4 { maxsize=4; numcds = 0; cds = new CD[maxsize]; } //this copy cat into new array with double the size of cat CDCatalogue::CDCatalogue(const CDCatalogue...
0debug
static void disas_ldst_excl(DisasContext *s, uint32_t insn) { int rt = extract32(insn, 0, 5); int rn = extract32(insn, 5, 5); int rt2 = extract32(insn, 10, 5); int is_lasr = extract32(insn, 15, 1); int rs = extract32(insn, 16, 5); int is_pair = extract32(insn, 21, 1); int is_store = ...
1threat
ScalaTest DeferredAbortedSuite error when running simple tests. : <p>My original code had a lot more going on, which distracted me from the true cause of the problem. This captures the essential problem.</p> <pre><code>import org.scalatest.AsyncFlatSpec import scala.concurrent.Future class AsyncFlatSpecSpec extends A...
0debug
Category and Sub category in one row in sql : How we can show category and sub category in one row in sql.Both columns are present in same table.If anyone knows please help. Thanks in advance!!!!!
0debug
How do I only allow letters when asking for a name in python? : <p>I am new to coding in python and need to know how to only allow the user to enter letters when inputting a name. So if they input a number or nothing at all, I want the code to say something like "Please only use letters, try again".</p> <p>Cheers Chri...
0debug
What goes in a Stack package.yaml file? : <p>I notice that Stack supports using a <code>package.yaml</code> file that it will use to generate a <code>.cabal</code> file. For example, <a href="https://github.com/yi-editor/yi/blob/2f0c7b738b3a1f79ff149034db2c4392273ee26f/yi-core/package.yaml">yi-core/package.yaml</a>. It...
0debug
static int slice_decode_thread(AVCodecContext *c, void *arg){ MpegEncContext *s= *(void**)arg; const uint8_t *buf= s->gb.buffer; int mb_y= s->start_mb_y; const int field_pic= s->picture_structure != PICT_FRAME; s->error_count= (3*(s->end_mb_y - s->start_mb_y)*s->mb_width) >> field_pic; ...
1threat
my echo "<tr> </tr"; error when i use bootsrap : echo "<tr class ='a'> <td>".$data->id."</td> <td>".$data->nis."</td> <td>".$data->nama."</td> <td>".$data->jenis_kelamin."</td> <td>".$data->telp."</td> <td>".$data->alamat."</td> <td><a class="btn btn-warning" href="'.base_url("siswa/ubah/".$data->i...
0debug
how to search with specific permission in unix : Print a listing, in long form, of all non-hidden entries ( files, directories, etc.) in the current directory that are executable by at least one of owner, group, other (the other permission bits could be anything).
0debug
Convert Object to a List of Arrays : <p>I am being passed a key/value object called obj that needs to convert to a list of arrays in an array ( arr[ [key: value] [key: value] ] )</p> <pre><code>function convertObjectToList(obj) { var arr = []; var i = 0; for(var key in obj){ arr[0][i][0] = key; arr[0][i]...
0debug
Error:Internal error: (java.lang.ClassNotFoundException) com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index : <p>Android Studio 3.4.</p> <p>Project SDK (Android API 19 Platform).</p> <p>Not using FindBugs or SpotBugs.</p> <p>Every attempt to build, I get this error:</p> <pre><code>Information:9/05/20...
0debug
NSDateFormatter and current language in iOS11 : <p>It appears that default behavior for <code>NSDateFormatter</code> has been changed in iOS11. This code used to work and produced date formatter according to currently selected iPhone/iPad language prior to iOS11:</p> <pre><code> _dateFormatterInstance = [[NSDateFormat...
0debug
Firebase gets stuck on no INTERNET connection : <p>In my app, I am using Firebase for database. Now when I am listening for any change in child nodes of a particular location, and if there is no internet connection, no callback gets fired. The firebase call just gets stuck.</p> <p>I am using this,</p> <pre><code>Fire...
0debug
window.location.href = 'http://attack.com?user=' + user_input;
1threat
android - ViewCompat setBackgroundTintList not working in API 21 : <p>I have a <em>AppCompatEditText</em> with the property <em>backgroundTint</em> setted to an specific color. I've created a method to change the background tint programmatically and its working in all Android versions since API 17 (4.2 Jelly Bean) to ...
0debug
why when modal pops up, other places are darkened? : [a modal](https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_modal) example is here, I can not figure out which part of the code makes the things darkened when we click open modal, please give me any hint, thank you.
0debug
HTML set values : I have these 2 table cells. The One span is outside td, other is around td. <tr height="30"> <span data-name="toDD1" class="sstNumber"> </span> <td>Y</td> <span data-name="toDD2" class="sstNumber"> <td>Y</td> </span> </tr> When I do the fo...
0debug
php file isn't working properly, I can't open it on browser, it opens the text editer instead : <p>So I'm just starting to learn php, and when trying " Hello World" the file isn't executing properly. I have Bitnami MAMP Stack 5.6.31 . I'm pretty sure it's not something wrong with the code, possibly with the install of...
0debug
How do you reference images contained in a folder in the Firebase storage and display them in a recycler view : <p>I'm trying to get a reference to images stored within a folder in firebase Storage,with text(which are stored in Firebase Database) on a card view stored and display them on a recycler view. please i hope ...
0debug
Undefined index: action : <p>The highlighted line is line 24</p> <p>Notice: Undefined index: action in C:\xampp\htdocs\authors.php on line 24</p> <pre><code> **if($_GET['action'] == "list") {** $current = "members"; $list = "members"; } else if($_GET["list"] == "authors") $current = "authors"...
0debug
static float get_band_cost_NONE_mips(struct AACEncContext *s, PutBitContext *pb, const float *in, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, ...
1threat
static void vnc_zlib_start(VncState *vs) { buffer_reset(&vs->zlib); vs->zlib_tmp = vs->output; vs->output = vs->zlib; }
1threat
int socket_connect(SocketAddress *addr, NonBlockingConnectHandler *callback, void *opaque, Error **errp) { int fd; switch (addr->type) { case SOCKET_ADDRESS_KIND_INET: fd = inet_connect_saddr(addr->u.inet.data, callback, opaque, errp); break; case SOCKET_AD...
1threat
static void qemu_chr_free_common(CharDriverState *chr) { g_free(chr->filename); g_free(chr->label); if (chr->logfd != -1) { close(chr->logfd); qemu_mutex_destroy(&chr->chr_write_lock); g_free(chr);
1threat
Parse download of Json Data from URL in C# : I have some json data which i have downloaded from a URL as gz file, i then decropressed and read the json as a string I am trying to loop through the records and neither jArray or JObject seem to work Any ideas how best to read in this data object by object? ...
0debug
static void fill_buffer(AVIOContext *s) { int max_buffer_size = s->max_packet_size ? s->max_packet_size : IO_BUFFER_SIZE; uint8_t *dst = s->buf_end - s->buffer + max_buffer_size < s->buffer_size ? s->buf_end : s->buffer; int len = ...
1threat
int img_convert(AVPicture *dst, int dst_pix_fmt, const AVPicture *src, int src_pix_fmt, int src_width, int src_height) { static int inited; int i, ret, dst_width, dst_height, int_pix_fmt; const PixFmtInfo *src_pix, *dst_pix; const ConvertEntry *ce; AVPicture t...
1threat
static int http_open(URLContext *h, const char *uri, int flags) { HTTPContext *s = h->priv_data; h->is_streamed = 1; s->filesize = -1; av_strlcpy(s->location, uri, sizeof(s->location)); if (s->headers) { int len = strlen(s->headers); if (len < 2 || strcmp("\r\n", s->hea...
1threat
ConcurrentDictionary AddOrUpdate method(C#) throwing Index was outside the bounds of the array : Looks like objects are trying to get added to the HashSet at the same time and throwing this error. Is there any solution for this ? System.IndexOutOfRangeException: Index was outside the bounds of the array. at Syst...
0debug
static void set_port(struct sockaddr_storage *ss, int port) { sockaddr_union ssu = (sockaddr_union){.storage = *ss}; if (ss->ss_family == AF_INET) ssu.in.sin_port = htons(port); #if HAVE_STRUCT_SOCKADDR_IN6 else if (ss->ss_family == AF_INET6) ssu.in6.sin6_port = htons(port); #endif ...
1threat
ValueError: all the input arrays must have same number of dimensions : <p>I'm having a problem with <code>np.append</code>.</p> <p>I'm trying to duplicate the last column of 20x361 matrix <code>n_list_converted</code> by using the code below:</p> <pre><code>n_last = [] n_last = n_list_converted[:, -1] n_lists = np.ap...
0debug
How block a keyboard to write in other Applications? : I am using a simple Hookup to record the keys from a BarcodeScanner which is a connect via Usb as Keyboard. I am using this example out of the I-net: using System.Windows.Forms; namespace RawInput { public partial class Form1 : Form { ...
0debug
static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) { int b1, op1_offset, op2_offset, is_xmm, val, ot; int modrm, mod, rm, reg, reg_addr, offset_addr; void *sse_op2; b &= 0xff; if (s->prefix & PREFIX_DATA) b1 = 1; else if (s->prefix & PREFIX_REPZ) ...
1threat
Reusing exception handling code in C++ : <p>I have these two functions, with duplicated exception treatment, which has the sole purpose of displaying an error message:</p> <pre><code>void func1() noexcept { try { do_task(); do_another_task(); } catch (const std::out_of_range&amp; e) { show_msg("Out of ...
0debug
How to make a responsive sticky/fixed position (links floated right) with dropdown links? : <p>I am trying to make a responsive drop-down menu which has the following criteria; the links are floated right; the menu is responsive; and there is a drop-down menu.</p> <p>I have tried modifying the w3 schools responsive na...
0debug
Can I detect element visibility using only CSS? : <p>I checked the API for some pseudo-selector such as <code>:visible</code> or <code>:hidden</code>, but was disappointed to find no such selector exists. Since jQuery has supported these selectors for a while now, I was hoping they'd be implemented. The idea is, that I...
0debug
Don't delete AppSettings not declared in a template : <p>When deploying an <strong>Azure Function App</strong> and <strong>AppSettings</strong> via an <strong>ARM Template</strong>, is it possible to tell Azure not to delete <strong>AppSettings</strong> that are not declared in the template?</p> <p>For example, take t...
0debug
Create a function that return the pow b^e - is my function correct? : int function_power (int b, int e) { int power; power = pow(b,e); return power; } Is my code correct? I have to create a function that return the value of b^e. Excuse me for my noob question, I'm...
0debug
SQLite3connection: near "(":Systax error in Lazarus : I have a Sql deviation statement, but I found the error when running. I have researched many related topics to come up with solutions, but I have not yet solved it. SQLite3connection: near "(":Systax error I hope to get help from everyone. -----------------------...
0debug
static void kvm_s390_enable_cmma(KVMState *s) { int rc; struct kvm_device_attr attr = { .group = KVM_S390_VM_MEM_CTRL, .attr = KVM_S390_VM_MEM_ENABLE_CMMA, }; if (kvm_s390_check_enable_cmma(s) || kvm_s390_check_clear_cmma(s)) { return; } rc = kvm_vm_ioctl(s,...
1threat
static void gen_farith (DisasContext *ctx, uint32_t op1, int ft, int fs, int fd, int cc) { const char *opn = "farith"; const char *condnames[] = { "c.f", "c.un", "c.eq", "c.ueq", "c.olt", "c.ult", ...
1threat
Java 8/9: Can a character in a String be mapped to its indices (using streams)? : <p>Given a <code>String s</code> and a <code>char c</code>, I'm curious if there exists some method of producing a <code>List&lt;Integer&gt; list</code> from <code>s</code> (where the elements within <code>list</code> represent the indice...
0debug
Using Ansible per directory instead of per host : <p>I know it will sound a bit strange but I wonder if there is a way to use Ansible per directory instead of per host.</p> <p>Our current use case is the following: the same application (here WordPress) is deployed into multiple folders onto the same host (probably a v...
0debug
Extract normal font to new cell : <p>I have multiple cells with bold font and normal font, I am looking to only extract the font that isn't bold to a new cell. Does anyone know how I can do this?</p> <p>Thanks</p>
0debug
I can't find a way to input on the screen value of the words in Morse Alphabet : Don't be punish please me , I am just trying to create a output Morse Alphabet in java , but in my case , there are problems , when I input the letter , this coincide to my require , for example - A output ".-" . There are two problems in...
0debug
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { AnsiContext *s = avctx->priv_data; uint8_t *buf = avpkt->data; int buf_size = avpkt->size; const uint8_t *buf_end = buf+buf_size; int ret, i...
1threat
How can i remove duplicate words unseparated in a python string? : string1 = "calvin kleinklein design dress" How can I remove the second duplicate "klein"? The result should look like string2 = "calvin klein design dress"
0debug
static void create_header32(DumpState *s, Error **errp) { DiskDumpHeader32 *dh = NULL; KdumpSubHeader32 *kh = NULL; size_t size; uint32_t block_size; uint32_t sub_hdr_size; uint32_t bitmap_blocks; uint32_t status = 0; uint64_t offset_note; Error *local_err = NULL; size = siz...
1threat
How to sort an array given a range? : <p>First of all I am using java and my first objective is to use bubble sort to sort an array in descending order given the range lowindex..highindex (inclusive). So my question is how to sort an array given a range? An example would be greatly appreciated to get me started on doin...
0debug
static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst, int dstWidth, const uint8_t *src, int srcW, int xInc) { int16_t *filterPos = c->hLumFilterPos; int16_t *filter = c->hLumFilter; void *mmx2FilterCode= c->lumMmx2FilterCo...
1threat
def sorted_models(models): sorted_models = sorted(models, key = lambda x: x['color']) return sorted_models
0debug
Gradle duplicate entry error: META-INF/MANIFEST.MF (Or how to delete a file from jar) : <p>I've cloned a github repository because I wanted to study the code, but when I tried to build it in Android Studio, I ran into some trouble. After adding the google maven repository (as prompted by Android Studio) and updating bo...
0debug
Why "try...else" is "invalid syntax" in Python? : <p>normal:</p> <pre><code>try: something may go wrong... except: pass else: others func... </code></pre> <p>what i need:</p> <pre><code>try: something may go wrong... else: others func... </code></pre> <p>Are there some reasons for 'try...else' n...
0debug
static int ohci_eof_timer_pre_load(void *opaque) { OHCIState *ohci = opaque; ohci_bus_start(ohci); return 0; }
1threat
Different MD5 hash with the same value : <p>I'm making a registration page, and I encrypt users' password with md5, when I made the login page everytime I tried to logged in it said wrong password, so I checked if the md5 hash is the same as in the database, but it's not, and I'm sure the password is correct. I use the...
0debug
static void pxb_host_class_init(ObjectClass *class, void *data) { DeviceClass *dc = DEVICE_CLASS(class); SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(class); PCIHostBridgeClass *hc = PCI_HOST_BRIDGE_CLASS(class); dc->fw_name = "pci"; sbc->explicit_ofw_unit_address = pxb_host_ofw_unit_addr...
1threat
fetch API to get HTML response : <p>I am trying to get a page's HTML using fetch API. Here is my code.</p> <pre><code>var quizUrl = 'http://www.lipsum.com/'; var myHeaders = new Headers(); myHeaders.append('Content-Type', 'text/html'); fetch(quizUrl,{ mode: 'no-cors', method: 'get', headers: myHeaders }).t...
0debug
Margin defined in XML file to be included has no impact : I am trying to re-use the XML defined for a button in a calculator app but the margin value defined within the Button's XML has no effect after it is included in a layout file. Button's XML: <?xml version="1.0" encoding="utf-8"?> <Button ...
0debug
mixlibshellout not executing with specified location : begin > cwdkernel = Dir.glob('/var/cache/acpchef/src/ap-kernelmodule-10*') > cmd = Mixlib::ShellOut.new("build cmd", :cwd => 'cwdkernel') > cmd.run_command > log 'run' end this does seem to execute the comma...
0debug
SQL - display by query the table, groups of rows as columns : i am trying to take range of codes in one column and display their results under one column per catgory<br> <br> example of my table <br> ID | TEST_NUM | RESULT | <BR> 1 | R1 | 33 |<BR> 1 | R2 | 31 |<BR> 1 | C1 | 24 |...
0debug
void do_mulldo (void) { int64_t th; uint64_t tl; muls64(&tl, &th, T0, T1); if (likely(th == 0)) { xer_ov = 0; } else { xer_ov = 1; xer_so = 1; } T0 = (int64_t)tl; }
1threat
Ouputting data using system.out from array that's inside a loop JAVA : **The code below supposed to take the users input, name and bad/good teeth, ( allow the user to enter that in an array using a loop, 10 times and the program supposed to output that list of data in a table format ( the format you can find at the bot...
0debug
static int bdrv_write_em(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf, int nb_sectors) { int async_ret; BlockDriverAIOCB *acb; async_ret = NOT_DONE; qemu_aio_wait_start(); acb = bdrv_aio_write(bs, sector_num, buf, nb_sectors, ...
1threat
int main_loop(void *opaque) { struct pollfd ufds[2], *pf, *serial_ufd, *net_ufd, *gdb_ufd; int ret, n, timeout; uint8_t ch; CPUState *env = global_env; if (!term_inited) { term_inited = 1; term_init(); } for(;;) { ret = cpu_x86_exec(env); ...
1threat
QT Applications - Replacing embedded resources : <p>Is it possible to replace embedded resources [e.g. styles, images, text] in a Linux [ELF] binary?</p> <p>I noticed that I can change text but if I type more text or if I remove text, then the segmentation faults start coming up. I have not gone through the ELF spec y...
0debug
Creating simple 'calculator' (Javascript) : I am trying to solve a problem given to me and it involves using basic loops, functions and conditions. I have been given the below: // TODO: complete program console.log(calculate(4, "+", 6)); // Must show 10 console.log(calculate(4, "-", 6)); // Mus...
0debug
static int mov_read_wave(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { AVStream *st = c->fc->streams[c->fc->nb_streams-1]; if((uint64_t)atom.size > (1<<30)) return -1; if (st->codec->codec_id == CODEC_ID_QDM2) { av_free(st->codec->extradata); st->codec->extra...
1threat
Ipad Safari elements are disappear and reapear with a delay : For this bug I have referred the below stack overflow question and applied in the css as follows (Refer: http://stackoverflow.com/questions/9807620/ipad-safari-scrolling-causes-html-elements-to-disappear-and-reappear-with-a-dela) *:not(html) { ...
0debug
Django Programming error column does not exist even after running migrations : <p>I run <code>python manage.py makemigrations</code> and I get: No changes detected Then, <code>python manage.py migrate</code> and I get: No migrations to apply.</p> <p>Then, I try to push the changes to production: git push h...
0debug
static int decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, int log2w, int log2h, int stride) { const int index = size2index[log2h][log2w]; const int h = 1 << log2h; int code = get_vlc2(&f->gb, block_type_vlc[1 - (f->vers...
1threat
Python: List existing values in a list : <pre><code>data = [{u'class': u'A'}, {u'class': u'A'}, {u'class': u'B'}] </code></pre> <p>I want to get a list with all existing class values in data. Is there any efficient way to sort out double values?</p> <pre><code>output = [{u'class': u'A'}, {u'class': u'B'}] </code></pr...
0debug
how convert double to string : <pre><code>public String solve() { ss = log(pow(y, -sqrt(abs(x)))) * (x + y / 2) + sin(atan(z)); result = toString(ss); return result; } </code></pre> <p>Don't get how do I convert <code>ss</code> to string. I neen return result in String format</p>
0debug
static inline void tcg_out_qemu_st(TCGContext *s, int cond, const TCGArg *args, int opc) { int addr_reg, data_reg, data_reg2; #ifdef CONFIG_SOFTMMU int mem_index, s_bits; # if TARGET_LONG_BITS == 64 int addr_reg2; # endif uint32_t *label_ptr; #endif data_reg = *args++; ...
1threat
static int parse_times(void *log_ctx, int64_t **times, int *nb_times, const char *times_str) { char *p; int i, ret = 0; char *times_str1 = av_strdup(times_str); char *saveptr = NULL; if (!times_str1) return AVERROR(ENOMEM); #define FAIL(err) ret = err; got...
1threat
Regex use in Notepad++, searching : <p>I have a bunch of JSON key-value pairs. Most of them are empty, like this </p> <pre><code>"object": [] </code></pre> <p>However, some of them aren't. I want to use Notepad++'s regex search to find every "object" that has something between the []. I know this is a very basic ques...
0debug
Ngrok errors '502 bad gateway' : <p>Quite new to using any sort of Web App stuff, and I've been trying to slowly build a Facebook Messenger Bot. When I try to use ngrok I can't visit the address I'm given, i.e:</p> <pre><code>ngrok http 5000 </code></pre> <p>is what I'm putting in the command line, and it's returning...
0debug
iOS Swift 3 : Convert "yyyy-MM-dd'T'HH:mm:ssZ" format string to date object : <p>Hello i have a dictionary</p> <pre><code>self.publishedAt = dictionary["publishedAt"] as? NSString </code></pre> <p>in which i'm getting date "<strong>2017-01-27T18:36:36Z</strong>". I want to convert it in readable format : <strong>dd-M...
0debug
ONLY FOR THE BRAVE AND FEARLESS... AttributeError: 'module' object has no attribute 'cbook' NEW VERSION : I've been trying to solve this issue on my own but have concluded that this issue is above my capabilities. I viewed various answers but none seem to work. I've uninstalled matplotlib and all its accessories and re...
0debug
Configuration.resolve has an unknown property 'root' : <p>I get the following error :</p> <blockquote> <p>Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. - configuration.resolve has an unknown property 'root'. These properties are valid...
0debug
Amazon S3 static hosting with Namecheap DNS - How to correctly route non-www prefixed url : <p>I have been reading other posts to try to get down to the bottom of this issue... but I need some clarification.</p> <p>I am able to get all of my domain requests to hit my Amazon S3 bucket perfectly when entering www.FOO.co...
0debug
void qemu_input_event_send_key_number(QemuConsole *src, int num, bool down) { KeyValue *key = g_new0(KeyValue, 1); key->type = KEY_VALUE_KIND_NUMBER; key->u.number = num; qemu_input_event_send_key(src, key, down); }
1threat
Converting UNIX timestamps into pandas datetime taking timezone into account : <p>I would like to convert the following pandas series containing UNIX timestamps into a pandas datetime using either <code>to_datetime()</code> or <code>arrow</code> library in Python. I want to set the timezone to UTC and currently it is <...
0debug
Open cv - Processing - detect and tracking some ball : I have a problem with opencv, I must detect and tracking some balls using the program: processing, how do it do? Can I have an exemple? thankyou
0debug
int av_fifo_generic_read(AVFifoBuffer *f, int buf_size, void (*func)(void*, void*, int), void* dest) { int size = av_fifo_size(f); if (size < buf_size) return -1; while (buf_size > 0) { int len = FFMIN(f->end - f->rptr, buf_size); if(func) func(dest, f->rptr, len); ...
1threat
static int init_tile(Jpeg2000DecoderContext *s, int tileno) { int compno; int tilex = tileno % s->numXtiles; int tiley = tileno / s->numXtiles; Jpeg2000Tile *tile = s->tile + tileno; if (!tile->comp) return AVERROR(ENOMEM); tile->coord[0][0] = FFMAX(tilex * s->tile_widt...
1threat
How to add Adsense to a website built with GatsbyJS? : <p>I'd like to know where I should add the <code>&lt;script&gt;&lt;/script&gt;</code> provided by Google Adsense.</p> <p>They say to add it into the <code>&lt;head&gt;&lt;/head&gt;</code>, but in Gatsby you have Helmet as <code>&lt;head&gt;</code>.</p> <p>I tried...
0debug
static MemTxResult address_space_write_continue(AddressSpace *as, hwaddr addr, MemTxAttrs attrs, const uint8_t *buf, int len, hwaddr addr1, ...
1threat
theres a syntax error but i didn't find it? : <pre><code>#include &lt;iostream&gt; #include &lt;bits/stdc++.h&gt; using namespace std; int main() { char a[27]= {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' '}; char A[27]= {'A','B','C','D','E','F','G','H'...
0debug
json_decode a json string sent via cors : I was looking around and tried to decode, but it doesn't seem to work for me. //Receive the RAW post responseData. $contentJSON = trim(file_get_contents("php://input")); //Attempt to decode the incoming RAW post responseData from JSON. $contentDEC...
0debug
How is a GUI made from scratch? : <p>I just got into java GUIs, but the graphics are built upon layers of abstractions. At the fundamental level, what goes into these layers? For example, do primitive types build images. Are they simply a multidimensional array of integers? </p> <p>What should I study to understand ho...
0debug
db.execute('SELECT * FROM employees WHERE id = ' + user_input)
1threat
what is the difference between ASP.NET Identity and IdentityServer? : <p>I can not understand the difference between the two, asp.net identy is based on OWIN and does not introduce a middleware while IdentityServer introduced him, I'm confused ..</p>
0debug
How to compare a string as a variable to an another variable string? : <p>So, I want to get an answer from the user (Yes or No), and if it's yes do someting, and if no, do something else.</p> <p>I'm using c++ (with Code::Blocks), and I'm a beginner at programming. This is what I managed to do:</p> <pre><code>#include...
0debug
static int scale_vector(int16_t *vector, int length) { int bits, max = 0; int64_t scale; int i; for (i = 0; i < length; i++) max = FFMAX(max, FFABS(vector[i])); max = FFMIN(max, 0x7FFF); bits = normalize_bits(max, 15); scale = (bits == 15) ? 0x7FFF : (1 << bits); ...
1threat
How can I create a while loop that runs all the time but doesn't interfere with the order that the code runs in (PYTHON)? : I'm making a text adventure game in Python to get myself started, as I am not that good at Python yet. I have tried to implement a set of health rules: while True: if health == max...
0debug