problem
stringlengths
26
131k
labels
class label
2 classes
static int http_proxy_open(URLContext *h, const char *uri, int flags) { HTTPContext *s = h->priv_data; char hostname[1024], hoststr[1024]; char auth[1024], pathbuf[1024], *path; char line[1024], lower_url[100]; int port, ret = 0; HTTPAuthType cur_auth_type; char *authstr; h->i...
1threat
dynamiclly creating a connection string for a database created using c# : I have created a database programmatically is there a way create its connection string dynamically using c#, So that after db creation all data is stored in the new db using c#
0debug
In android studio i'm getting thi below error while running : In android studio i'm getting this error while running the project... Error:Execution failed for task ':app:compileDebugJava'. > Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system ...
0debug
someone please help me solve this thank you : total=0 output=("enter next sales value") sales=input total_sales=total+sales i keep getting this error Traceback (most recent call last): File "python", line 4, in <module> TypeError: unsupported operand type(s) for +: 'int' and 'builtin_function_or...
0debug
dotnet is not recognized as the name of a cmdlet : <p>We have downloaded and run <code>DotNetCore.1.0.1-SDK.1.0.0.Preview2-003133-x64.exe</code>. After having closed and reopened our command prompt, running <code>dotnet</code> gives the following output. </p> <blockquote> <p>The term 'dotnet' is not recognized as th...
0debug
How to exclude Pods from Code Coverage in Xcode : <p>Is there a way to <strong>exclude</strong> Pods from Code Coverage?<br> I would like to see Code Coverage only for the code I've written.</p> <p>Not that it should matter, but I'm using Xcode 8.</p>
0debug
How to get an object from a list of objects in Terraform? : <p>I have the following list of objects variable:</p> <pre><code>variable "objects" { type = "list" description = "list of objects default = [ { id = "name1" attribute = "a" }, { id = "name2" attribute =...
0debug
void ppc_store_sdr1(CPUPPCState *env, target_ulong value) { qemu_log_mask(CPU_LOG_MMU, "%s: " TARGET_FMT_lx "\n", __func__, value); assert(!env->external_htab); env->spr[SPR_SDR1] = value; #if defined(TARGET_PPC64) if (env->mmu_model & POWERPC_MMU_64) { PowerPCCPU *cpu = ppc_env_get_cpu(e...
1threat
static void piix4_pm_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); k->no_hotplug = 1; k->init = piix4_pm_initfn; k->config_write = pm_write_config; k->vendor_id = PCI_VENDOR_ID_INTEL; k->device_id = ...
1threat
Running async methods in parallel : <p>I've got an async method, <code>GetExpensiveThing()</code>, which performs some expensive I/O work. This is how I am using it:</p> <pre><code>// Serial execution public async Task&lt;List&lt;Thing&gt;&gt; GetThings() { var first = await GetExpensiveThing(); var second = a...
0debug
static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; MOVStreamContext *sc; unsigned int i, entries, sample_size, field_size, num_bytes; GetBitContext gb; unsigned char* buf; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->n...
1threat
static void event_scan(PowerPCCPU *cpu, sPAPRMachineState *spapr, uint32_t token, uint32_t nargs, target_ulong args, uint32_t nret, target_ulong rets) { uint32_t mask, buf, len, event_len; sPAPREventLogEntry *event; struct rtas_erro...
1threat
disconnect() is deprecated: Please use the shouldEstablishDirectChannel property instead : <p>When looking at the disconnect() method and it's description it says the following in the docs</p> <blockquote> <p>Disconnect the current FIRMessaging data connection. This stops any attempts to connect to FIRMessaging. Cal...
0debug
How can I disable past dates in my datepicker? : <p>How can i disable my past date from the current date. I check already the other threads but its not working in my codes.</p> <pre><code>&lt;script&gt; $("#checkinDate").datetimepicker({ format: "yyyy-mm-dd", startView: "month", minView: "month...
0debug
static BlockStats *bdrv_query_stats(BlockBackend *blk, const BlockDriverState *bs, bool query_backing) { BlockStats *s; s = bdrv_query_bds_stats(bs, query_backing); if (blk) { s->has_device = true; s->device ...
1threat
How to annotate a default value inside a android room entity? : <p>I couldn't find any information how to annotate a SQL - "DEFAULT" value while looking into the <a href="https://developer.android.com/reference/android/arch/persistence/room/ColumnInfo.html" rel="noreferrer">@ColumnInfo</a> docs for the new Android Pers...
0debug
Java XOR for an array : I'm trying to XOR an array of numbers all at once in Java. the array size is determined at the start of the program by the user and so has no limit. I thought of doing it this way but realised that it would not work. static void cpuTurn(int[] nimArray){ int[] val = new int[nimArr...
0debug
why String is not convertible to datetime? : I am passing 2 dates to store procedure but conversion throws error 'String not convertible to datetime' txtFromDate.Text = DateTime.Now.ToString("dd/MM/yyyy"); txtToDate.Text = DateTime.Now.ToString("dd/MM/yyyy"); System.Data.DataTable dt = RejFiles.Re...
0debug
static void musicpal_init(ram_addr_t ram_size, int vga_ram_size, const char *boot_device, DisplayState *ds, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { CPUState *env; qemu_irq *pic; int ind...
1threat
android java.lang.NoClassDefFoundError: org.bouncycastle.crypto.engines.AESEngine api 16 : <p>I am using <code>com.nimbusds.jose.crypto</code> library in my android client for doing some jwt stuff. </p> <p>This is what i declare in my gradle file : </p> <pre><code> compile 'com.nimbusds:nimbus-jose-jwt:4.23' </cod...
0debug
static inline int get_dwords(uint32_t addr, uint32_t *buf, int num) { int i; for(i = 0; i < num; i++, buf++, addr += sizeof(*buf)) { cpu_physical_memory_rw(addr,(uint8_t *)buf, sizeof(*buf), 0); *buf = le32_to_cpu(*buf); } return 1; }
1threat
Good name for this angular service : <p>at first I thought this is to stupid to ask, but then I said why not :-). I'm building a angular 4 app. I have a tranasction entity in database. The only purpose of this transasction is to group other orders. tranasction has 2 properties</p> <ol> <li>Id</li> <li>UserId - the us...
0debug
Insert buttons on a picture on mouse hover and image darken : <p>I want the image to be darkened a little bit when the mouse is hovered on it (Overlay?). Then, the buttons like in the picture should appear when hover, then if mouse is hovered on one button, it should turn to red (just like picture), and image descripti...
0debug
Copy a string to clipboard from Mac OS command line : <p>is there a way to copy a string to clipboard from command line?</p> <p>To be more specific, I want to make a script which copies my email address to clipboard, so that when I need to insert it several times for logging in / register, I just run the script once a...
0debug
How to build a sparkSession in Spark 2.0 using pyspark? : <p>I just got access to spark 2.0; I have been using spark 1.6.1 up until this point. Can someone please help me set up a sparkSession using pyspark (python)? I know that the scala examples available online are similar (<a href="https://databricks-prod-cloudfron...
0debug
Lldb : Setting conditional breakpoint with string equality as condition : <p>I would like to set a conditional breakpoint with lldb. This is usually done using <code>-c</code> option :</p> <pre><code>breakpoint set -f myFile.cpp -l 123 -c 'a==3' </code></pre> <p>However, in my case I want to test if a <code>std::stri...
0debug
static void qmf_32_subbands(DCAContext * s, int chans, float samples_in[32][8], float *samples_out, float scale) { const float *prCoeff; int i; int sb_act = s->subband_activity[chans]; int subindex; scale *= sqrt(1/8.0); ...
1threat
static void imc_get_coeffs(AVCodecContext *avctx, IMCContext *q, IMCChannel *chctx) { int i, j, cw_len, cw; for (i = 0; i < BANDS; i++) { if (!chctx->sumLenArr[i]) continue; if (chctx->bandFlagsBuf[i] || chctx->bandWidthT[i]) { for (j ...
1threat
static int vfio_initfn(PCIDevice *pdev) { VFIOPCIDevice *vdev = DO_UPCAST(VFIOPCIDevice, pdev, pdev); VFIODevice *vbasedev_iter; VFIOGroup *group; char path[PATH_MAX], iommu_group_path[PATH_MAX], *group_name; ssize_t len; struct stat st; int groupid; int ret; snprin...
1threat
NodeJS: How to fix different node module version? : <p>I'm trying to start a nodeJS application, but I do get the error</p> <pre><code>Error: The module '/Users/api/node_modules/bcrypt/lib/binding/bcrypt_lib.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 46. This version of Node.js re...
0debug
static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb, int channel, int *last) { int t, t2; int sign, base, add, ret; WvChannel *c = &ctx->ch[channel]; *last = 0; if((ctx->ch[0].median[0] < 2U) && (ctx->ch[1].median[0] < 2U) && !ctx->zero && !ctx->one){ if(ctx->zeroe...
1threat
How to mock a custom hook inside of a React component you want to test? : <p>If you have a React component that calls a custom hook that fetches data, what is the best way to mock that internal custom hook result when testing the React component? I see 2 main approaches:</p> <p>1) Jest.mock the custom hook. This seems...
0debug
Language for Android Development : <p>Which language should I learn for Android Development? I know Java, and is it possible to write code using Eclipse Java SE, and Develop Android App?</p>
0debug
What is the correct implementation of Collections.max()? : So to my understanding the Collections.max method inplements a loop to determine the greatest value of an array. However, for some reason it does not return the greatest value for me, instead returning the first value, I've tried this with multiple data sets...
0debug
static void avc_luma_midv_qrt_and_aver_dst_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, ...
1threat
Enable AWS S3 MFA delete with the console : <p>Is it possible to enable AWS S3 MFA delete with the console? How? </p> <p>I don't manage to find any way to do it, neither have found any answer googling.</p>
0debug
If two cells have information, then : I want to check two cells and if both are filled in I would like to have the term 'Switch' in my third cell. I found some information about doing this with blank celss (e.g. **http://stackoverflow.com/questions/27439738/if-1-or-2-cells-are-blank-then#_=_**). However, I would li...
0debug
Javascript Syntax Error { : <p>The if statement is broken and just returns "Syntax Error {" no matter how I format it. I still get a syntax error for something on it. PS. IM PROBABLY JUST AN IDIOT</p> <pre><code>var userChoice = prompt("Do you choose rock, paper or scissors"); var computerChoice = Math.random(); con...
0debug
How to pop out ion-select using different button : <p>How do I pop out the ion-select using different button?</p> <pre><code>&lt;ion-select [(ngModel)]="choices" multiple="true"&gt; &lt;ion-option&gt;Appliances&lt;/ion-option&gt; &lt;ion-option&gt;Automobile&lt;/ion-option&gt; &lt;ion-option&gt...
0debug
Winston not Logging to console in typescript : <p>I am confused by winston. I am using the following typescript code to log onto the console in my *.ts file:</p> <pre><code>import { Logger, LoggerInstance } from "winston"; const logger:LoggerInstance = new Logger(); logger.info('Now my debug messages are written to t...
0debug
bool s390_cpu_exec_interrupt(CPUState *cs, int interrupt_request) { if (interrupt_request & CPU_INTERRUPT_HARD) { S390CPU *cpu = S390_CPU(cs); CPUS390XState *env = &cpu->env; if (env->ex_value) { return false; } if (env->psw.mask & PSW_MA...
1threat
How to emulate Android's showAsAction="ifRoom" in Flutter? : <p>In my Flutter app I have a screen that is a MaterialApp with a Scaffold widget as it's home.</p> <p>The appBar property of this Scaffold is an AppBar widget with the actions property filled with some actions and a popup menu to house the rest of the optio...
0debug
static void init_proc_750 (CPUPPCState *env) { gen_spr_ne_601(env); gen_spr_7xx(env); spr_register(env, SPR_L2CR, "L2CR", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, NULL, 0x00000000); gen_tbl(env); gen_spr_thrm(env); ...
1threat
void ff_llviddsp_init_x86(LLVidDSPContext *c) { int cpu_flags = av_get_cpu_flags(); #if HAVE_INLINE_ASM && HAVE_7REGS && ARCH_X86_32 if (cpu_flags & AV_CPU_FLAG_CMOV) c->add_median_pred = add_median_pred_cmov; #endif if (ARCH_X86_32 && EXTERNAL_MMX(cpu_flags)) { c->add_bytes = ff...
1threat
static size_t cache_get_cache_pos(const PageCache *cache, uint64_t address) { size_t pos; g_assert(cache->max_num_items); pos = (address / cache->page_size) & (cache->max_num_items - 1); return pos; }
1threat
Java scanner usage with \R pattern (issue with buffer boundary) : <p><strong>Executive summary:</strong> Are there any caveats/known issues with <code>\R</code> (or other regex pattern) usage in Java's <code>Scanner</code> (especially regarding internal buffer's boundary conditions)?</p> <p><strong>Details:</strong> S...
0debug
How to view data, that are parsed from the MySQL database, in offline, using SQLite? : <p>I am developing my school's timetable app for android. I am getting timetable data from MySQL database. -> I have access to the timetable, only when I have an internet. But I want to make timetable accessible without the internet...
0debug
static inline int RENAME(yuv420_rgb24)(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
Wait page in search in symfony2? : <p>I'm doing a search engine and I want to make a waiting page while searching, as do the sites of the airlines while looking for availabilities? Any ideas I'm using Symfony2</p>
0debug
Dart 2: Difference between Future<void> and Future<Null> : <p>Having an asynchronous function that doesn't return a value, what's the ideal return type <code>Future&lt;Null&gt;</code> or <code>Future&lt;void&gt;</code>?, or more specifically, what's the difference in using either? Both are legal, and in both cases the ...
0debug
int ff_h264_context_init(H264Context *h) { ERContext *er = &h->er; int mb_array_size = h->mb_height * h->mb_stride; int y_size = (2 * h->mb_width + 1) * (2 * h->mb_height + 1); int c_size = h->mb_stride * (h->mb_height + 1); int yc_size = y_size + 2 * c_size; int x, y, i; FF_AL...
1threat
Updating the changes to an open file (Python) : Important Notes: **** **I know how to modify a file**. **** **By file, I mean notepad.** **** **When I say that I have a file open, I don't mean that the Python program has the file open with the `Open()` fu...
0debug
static int decode_slice_header(H264Context *h){ MpegEncContext * const s = &h->s; int first_mb_in_slice, pps_id; int num_ref_idx_active_override_flag; static const uint8_t slice_type_map[5]= {P_TYPE, B_TYPE, I_TYPE, SP_TYPE, SI_TYPE}; int slice_type; int default_ref_list_done = 0; s...
1threat
Set text-cursor position in a textarea : <p>I'm working on a BBCode editor and here is the code:</p> <pre><code>var txtarea = document.getElementById("editor_area"); function boldText() { var start = txtarea.selectionStart; var end = txtarea.selectionEnd; va...
0debug
static void replay_enable(const char *fname, int mode) { const char *fmode = NULL; assert(!replay_file); switch (mode) { case REPLAY_MODE_RECORD: fmode = "wb"; break; case REPLAY_MODE_PLAY: fmode = "rb"; break; default: fprintf(stderr, "Repla...
1threat
Name of construction : <pre><code>private final EventManager eventManager; private final DateManager dateManager; private final UserManager userManager; </code></pre> <p>What is the name of this construction? Is this object or something else? EventManager, DateManager, UserManager are the names of classes.</p>
0debug
i want to display All "name" values in array (underscore/js) : var data=[{ "name": "cA", "leaf": false, "largeIconId": null, "label": "cA", "hideAllSearchFilters": false, "guidePage": null, "expanded": false, "defaultSearchCategory": false, "childCategories": [{ ...
0debug
How to preload images in React.js? : <p>How to preload images in React.js? I have dropdown select component which works like menu , but i have to preload image icons for items,because sometimes they are not visible on first open.</p> <p>I have tried:</p> <p><a href="https://github.com/sambernard/react-preload" rel="...
0debug
ionic2 remove blue line color input md : <p>How can I remove the default line below the text input md.</p> <p>I already tried all of these below, but the "default" styling still keeps this line.</p> <p><a href="https://i.stack.imgur.com/wqI3m.png" rel="noreferrer"><img src="https://i.stack.imgur.com/wqI3m.png" alt="e...
0debug
static void spin_kick(void *data) { SpinKick *kick = data; CPUState *cpu = CPU(kick->cpu); CPUPPCState *env = &kick->cpu->env; SpinInfo *curspin = kick->spin; hwaddr map_size = 64 * 1024 * 1024; hwaddr map_start; cpu_synchronize_state(cpu); stl_p(&curspin->pir, env->spr[SPR_PI...
1threat
static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom) { int64_t offset = avio_tell(pb) + atom.size, pts, timestamp; uint8_t version; unsigned i, j, track_id, item_count; AVStream *st = NULL; AVStream *ref_st = NULL; MOVStreamContext *sc, *ref_sc = NULL; AVRational ti...
1threat
FireStore create a document if not exist : <p>I want to update a doc like this:</p> <pre><code>db.collection('users').doc(user_id).update({foo:'bar'}) </code></pre> <p>However, if the doc user_id does not exists, the above code will throw an error. Hence, how to tell Firestore to create the student if not exists, in ...
0debug
Elastic search - search_after parameter : <p>I read this <a href="https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-request-search-after.html" rel="noreferrer">doc</a> to understand 'search_after' and have two question.</p> <ol> <li>I'm curious that where "tweet#654323" comes from. Is this one of docu...
0debug
Should package-lock.json also be published? : <p>npm 5 introduced <em>package-lock.json</em>, of which the documentation is <a href="https://docs.npmjs.com/files/package-lock.json" rel="noreferrer">here</a>.</p> <p>It states that the file is intended to be included with version control, so anyone cloning your package ...
0debug
static int hds_write_header(AVFormatContext *s) { HDSContext *c = s->priv_data; int ret = 0, i; AVOutputFormat *oformat; mkdir(s->filename, 0777); oformat = av_guess_format("flv", NULL, NULL); if (!oformat) { ret = AVERROR_MUXER_NOT_FOUND; goto fail; } c-...
1threat
decode_cabac_residual_internal(H264Context *h, int16_t *block, int cat, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff, int is_dc, int chroma422) { static const int significant_coeff_flag_offset[2...
1threat
def remove_tuples(test_list, K): res = [ele for ele in test_list if len(ele) != K] return (res)
0debug
int ff_mpeg4_decode_picture_header(MpegEncContext * s, GetBitContext *gb) { int startcode, v; align_get_bits(gb); if(s->avctx->codec_tag == ff_get_fourcc("WV1F") && show_bits(gb, 24) == 0x575630){ skip_bits(gb, 24); if(get_bits(gb, 8) == 0xF0) return decode_vop_h...
1threat
How to sum each user totals per category : <p><a href="https://i.stack.imgur.com/rvPC0.png" rel="nofollow noreferrer">table preview</a></p> <p>I have the above table which I'd like to sum all users total per category. Totals for user 1, User 2, ..., user 20 to be shown at the end of the table. how can i achieve this i...
0debug
Is there a way to speedup npm ci using cache? : <p>for now <code>npm ci</code> is the most common way to install node modules when using CI. But it is honestly really slow. Is there a way to speedup <code>npm ci</code> using cache or do not fully remove existing packages (whole node_modules folder)?</p>
0debug
static inline void decode_block_intra(MadContext * t, DCTELEM * block) { MpegEncContext *s = &t->s; int level, i, j, run; RLTable *rl = &ff_rl_mpeg1; const uint8_t *scantable = s->intra_scantable.permutated; int16_t *quant_matrix = s->intra_matrix; block[0] = (128 + get_sbits(&s->gb, 8)...
1threat
Read string from index 1 in C : <p>I'm trying to use string by char array from index 1.</p> <pre><code>char a[100]; scanf("%s", a+1); </code></pre> <p>I thought it will work well, but it didn't work. What is wrong?</p> <p>How can I skip index 0 and read string from index 1?</p>
0debug
static int vorbis_residue_decode(vorbis_context *vc, vorbis_residue *vr, uint_fast8_t ch, uint_fast8_t *do_not_decode, float *vec, uint_fast16_t vlen) { GetBitContext *gb=&vc->gb; uint_fast8_t c_p_c=vc->codebooks[vr->classbook].dimensions; uint_fast16_t n_to_read=vr->end-vr->begin; uint_fast16_t ptn...
1threat
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android : <p>Can anyone tell me why I am receiving this error? I have downloaded a series of projects from GitHub for a Udacity course. Since there are about 50 or 60 projects (Exercises and Solutions) in the repo, I presume it has t...
0debug
Segmentation fault in C and infinite loop : Consider the code below: #include<stdio.h> int main() { Printf("hello"); main(1,2); return 0; } On executing the code i am getting a rum time error ( Segmentation Fault) and a output : hello...infinite times I understand th...
0debug
static inline void gen_op_fcmpes(int fccno, TCGv_i32 r_rs1, TCGv_i32 r_rs2) { switch (fccno) { case 0: gen_helper_fcmpes(cpu_env, r_rs1, r_rs2); break; case 1: gen_helper_fcmpes_fcc1(cpu_env, r_rs1, r_rs2); break; case 2: gen_helper_fcmpes_fcc2(cpu_env, ...
1threat
Android java string division when has whitespaces (space) : <p>i have an simple question. It is possible to make some function, that will division my string to several other strings? It will works like that:</p> <blockquote> <p>if string has whitespaces count spaces, make as many string as whitespaces count and divi...
0debug
jenkins authentication fails with gitlab : Before to say my problem, i installed my **gitlab**(omnibus settting) and gitlab is connected external **nginx** server. And than now i am setting jenkins. While i am making new jenkins item, when i select "Git" in "Source code management" i receive following message in th...
0debug
Change the dictionary on c# model : <p>I have a dictionary and I need to change the dictionary on c# model.How to do it?</p> <pre><code>var number = new Dictionary&lt;string, int&gt; { {"One", 1}, {"Two", 2}, {"Three", 3} }; </code></pre> <p>Model:</p> <pre><code>public class Number...
0debug
static void monitor_puts(Monitor *mon, const char *str) { char c; for(;;) { assert(mon->outbuf_index < sizeof(mon->outbuf) - 1); c = *str++; if (c == '\0') break; if (c == '\n') mon->outbuf[mon->outbuf_index++] = '\r'; mon->outbuf[mon->...
1threat
void memory_region_set_skip_dump(MemoryRegion *mr) { mr->skip_dump = true; }
1threat
Docker Python set utf-8 locale : <p>I am trying to run my python file that first reads a string in Chinese language and print it.</p> <p>This is my Dockerfile</p> <pre><code>FROM python:2.7-onbuild ENV LANG en_US.UTF-8 ADD . /code WORKDIR /code RUN pip install -r requirements.txt CMD ["python", "app.py"] </code></pre...
0debug
How To Extract Data Inside This Single Quoted String in C? I Need This in 2 Hours Please : Simple question and lets be straightforward. I have this string. ('string1', 'string2', 'string3'); I want to extract data ONLY the string1, string2, string3 using C. Anyone have an idea? Have tried something like this ...
0debug
Configuring a second NIC in Azure : I have a VM in Azure with two NICs. Each NIC has its own subnet. Azure only lets the Primary NIC have a public IP address. It appears that unless you have a public IP address a NIC cannot access the Internet but I need both to have Internet access. Config details: The Primary N...
0debug
Use aggregate function with arithmetic operation. : [according to the picture, I have a table with two columns][1] Here I need to find a SQL according to the following function, Z = accelx-AVG(accelx) for every rows. [1]: https://i.stack.imgur.com/vjWAe.png
0debug
static void fill_picture_parameters(AVCodecContext *avctx, struct dxva_context *ctx, const VC1Context *v, DXVA_PictureParameters *pp) { const MpegEncContext *s = &v->s; const Picture *current_picture = s->current_picture_ptr; me...
1threat
static void do_getfd(Monitor *mon, const QDict *qdict) { const char *fdname = qdict_get_str(qdict, "fdname"); mon_fd_t *monfd; int fd; fd = qemu_chr_get_msgfd(mon->chr); if (fd == -1) { monitor_printf(mon, "getfd: no file descriptor supplied via SCM_RIGHTS\n"); return; ...
1threat
Why SQLite to ImageView, BitmapFactory.decodeByteArray Returning Null Android Studio? : I'm developing a contacts app with a photo. I have Store and retrieve data from SQLite and it's working fine on my list view. The problem is when I click a list item from it's supposed to show an image view and few other details....
0debug
ssize_t virtio_pdu_vmarshal(V9fsPDU *pdu, size_t offset, const char *fmt, va_list ap) { V9fsState *s = pdu->s; V9fsVirtioState *v = container_of(s, V9fsVirtioState, state); VirtQueueElement *elem = &v->elems[pdu->idx]; return v9fs_iov_vmarshal(elem->in_sg, elem->in_nu...
1threat
static void apply_param_change(AVCodecContext *avctx, AVPacket *avpkt) { int size = 0; const uint8_t *data; uint32_t flags; if (!(avctx->codec->capabilities & CODEC_CAP_PARAM_CHANGE)) return; data = av_packet_get_side_data(avpkt, AV_PKT_DATA_PARAM_CHANGE, &size); if (!data ||...
1threat
Android Studio maven { url "https://jitpack.io" } can't download : <p>Can't use anymore <code>maven { url "https://jitpack.io" }</code>. I have following gradle:</p> <pre><code>apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "test.com.myapplicatio...
0debug
Plot with darker color for denser areas and transparent color for less dense areas : <p>How can I make a plot in R with ggplot2 that is darker where there are more points and more transparent where there are less points? I tried making a geom_hex plot with a gradient but it is ignoring alpha values.</p>
0debug
static void vc1_decode_p_blocks(VC1Context *v) { MpegEncContext *s = &v->s; int apply_loop_filter; switch (v->c_ac_table_index) { case 0: v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA; break; case 1: v->codingset = CS_HIGH_MOT_INTRA...
1threat
static void memory_dump(Monitor *mon, int count, int format, int wsize, hwaddr addr, int is_physical) { int l, line_size, i, max_digits, len; uint8_t buf[16]; uint64_t v; if (format == 'i') { int flags = 0; #ifdef TARGET_I386 CPUArchState *env = mon_get...
1threat
Basic loop in google sheets : Im trying to use a macro i made in excel in google sheets. This is my first time using this and i have it kinda working but seems real slow compared to excel. not sure whats going on and making it so slow. I have messed with the loop a bunch of different ways but still seems slow. it s...
0debug
static int get_qcx(J2kDecoderContext *s, int n, J2kQuantStyle *q) { int i, x; if (s->buf_end - s->buf < 1) return AVERROR(EINVAL); x = bytestream_get_byte(&s->buf); q->nguardbits = x >> 5; q->quantsty = x & 0x1f; if (q->quantsty == J2K_QSTY_NONE){ n -= 3; ...
1threat
import re def start_withp(words): for w in words: m = re.match("(P\w+)\W(P\w+)", w) if m: return m.groups()
0debug
static int oma_read_seek(struct AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { OMAContext *oc = s->priv_data; int err = ff_pcm_read_seek(s, stream_index, timestamp, flags); if (!oc->encrypted) return err; if (err || avio_tell(s->pb...
1threat
Why does it have to cast to "struct in_addr" in this code? : TCPStream::TCPStream(int sd, struct sockaddr_in* address) : msd(sd) { enter code here char ip[50]; inet_ntop(PF_INET, (struct in_addr*)&(address->sin_addr.s_addr), ip, sizeof(ip)-1); m_peerIP = ip; m_peerPort...
0debug
Printing list items within a specific format : <p>I have a list containing:</p> <pre><code>lst = [10,20,30,40] </code></pre> <p>and i want to print it in a form as such:</p> <pre><code>output: 10 --&gt; 20 --&gt; 30 --&gt; 40 </code></pre> <p>i tried writing:</p> <pre><code>print("output: " + "--&gt;".join(lst)) <...
0debug