problem
stringlengths
26
131k
labels
class label
2 classes
static void qemu_cleanup_net_client(NetClientState *nc) { QTAILQ_REMOVE(&net_clients, nc, next); nc->info->cleanup(nc); }
1threat
av_cold void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) { #if HAVE_ALTIVEC if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) return; if (bit_depth == 8) { c->h264_idct_add = h264_idct_add_altivec; if ...
1threat
ngrx effects error handling : <p>I have a very basic question concerning @ngrx effects: How to ignore an error that happens during the execution of an effect such that it doesn't affect future effect execution?</p> <p>My situation is as follows: I have an action (LOGIN) and an effect listening to that action. If an er...
0debug
Table View Data Source in MVVM-C : <p>where should I put UITableView Data Sources (I am using RxDataSources) when using MVVM-C architecture?</p>
0debug
fill 3 listview that's in separate tabs in android tabhost : I have 3 tabs in my tabhost and each tab have one list view. How can I fill each listview when switch each tab? (Android activity)
0debug
static int usb_hub_handle_control(USBDevice *dev, int request, int value, int index, int length, uint8_t *data) { USBHubState *s = (USBHubState *)dev; int ret; ret = usb_desc_handle_control(dev, request, value, index, length, data); if (ret >= 0) { retu...
1threat
Formatting text in C : <p>I need an advice on how to handle this task. I would like to format chars so that only a given number of characters were on one line. User input would be the number representing the max length of the line. The program would then print the char formatted in a way that words are divided by only ...
0debug
Xcode 9.3 Playground - diagnosticd : <p>I noticed every time I launch a Playground in Xcode (version 9.3) a daemon starts in the background and uses more that 100% of my CPU!</p> <p>I deleted Xcode's cache and its DerivedData folder but no change.</p> <p>Does anyone know how to resolve this problem?</p>
0debug
Angular 2: Two different types with this name exist : <p>In my Angular 2 app, I have following code:</p> <pre><code>import { Observable } from 'rxjs/Rx'; import { Subscription } from '@angular-cli/ast-tools/node_modules/rxjs/Rx'; ... private broadcastDataSubject: BehaviorSubject&lt;Event&gt;; ... let sub: Subscription...
0debug
decimal to string convertion : What is the parameter that I should use to convert following decimal values to string.(decimalVariable.ToString("x");) decimal values 120.5 => 120.50 (string) 110 => 110 (string) 25.356 => 25.356 (string)
0debug
Systemd with multiple execStart : <p>i Would know if it's possible to create service with the same script started with different input parameters. Such as:</p> <pre><code>[Unit] Description=script description [Service] Type=simple ExecStart=/script.py parameters1 ExecStart=/script.py parameters2 Restart=on-failure [...
0debug
In C# can you define an alias to a value tuple with names? : <p>I know it's possible to define aliases in C# with the <em>using</em> keyword.</p> <p>e.g.</p> <pre><code>using ResponseKey = System.ValueTuple&lt;System.Guid, string, string&gt;; </code></pre> <p>However, is it possible to define one using the new synta...
0debug
alert('Hello ' + user_input);
1threat
static void avc_wgt_16width_msa(uint8_t *data, int32_t stride, int32_t height, int32_t log2_denom, int32_t src_weight, int32_t offset_in) { uint8_t c...
1threat
static void nal_send(AVFormatContext *ctx, const uint8_t *buf, int len, int last_packet_of_frame) { RTPMuxContext *rtp_ctx = ctx->priv_data; int rtp_payload_size = rtp_ctx->max_payload_size - RTP_HEVC_HEADERS_SIZE; int nal_type = (buf[0] >> 1) & 0x3F; if (len <= rtp_ctx->max_pay...
1threat
static int get_cox(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c) { uint8_t byte; if (s->buf_end - s->buf < 5) return AVERROR(EINVAL); c->nreslevels = bytestream_get_byte(&s->buf) + 1; if (c->nreslevels < s->reduction_factor) c->nreslevels2decode = 1; else ...
1threat
Jupyter notebook taking forever to iterate over a for loop : <p>I an using the following for loop to iterate over df (droping a row if condition match) :</p> <pre><code>for index, row in df.iterrows(): if(pd.isnull(row["CR Date"])): df.drop(index, inplace=True) </code></pre> <p>the df shape 240,000*30 It is w...
0debug
Tcl script for getting windows service is exist or not : <p>I want to check whether windows service is already installed or not by using tcl script. note that i am using ActiveTcl.8.6.7 version.</p> <p>Thanks in advance.</p>
0debug
static void usbredir_handle_data(USBDevice *udev, USBPacket *p) { USBRedirDevice *dev = DO_UPCAST(USBRedirDevice, dev, udev); uint8_t ep; ep = p->ep->nr; if (p->pid == USB_TOKEN_IN) { ep |= USB_DIR_IN; } switch (dev->endpoint[EP2I(ep)].type) { case USB_ENDPOINT_XFER_CONT...
1threat
static void monitor_fdset_cleanup(MonFdset *mon_fdset) { MonFdsetFd *mon_fdset_fd; MonFdsetFd *mon_fdset_fd_next; QLIST_FOREACH_SAFE(mon_fdset_fd, &mon_fdset->fds, next, mon_fdset_fd_next) { if (mon_fdset_fd->removed) { close(mon_fdset_fd->fd); g_free(mon_fdset_fd->o...
1threat
Having trouble with "Rectangles" (am a simpleton) : I recently got back into coding and have forgotten most things (am a simpleton), tried warming up with a simple question ":Create a class Rectangle with instance variables length and width to have default value of 1 for both of them. The class should have suitable set...
0debug
static int64_t asf_read_pts(AVFormatContext *s, int64_t *ppos, int stream_index) { ASFContext *asf = s->priv_data; AVPacket pkt1, *pkt = &pkt1; int64_t pos= *ppos; int64_t pts; assert(pos % asf->packet_size == 0); url_fseek(&s->pb, pos + s->data_offset, SEEK_SET); do{ ...
1threat
unsigned int codec_get_tag(const CodecTag *tags, int id) { while (tags->id != 0) { if (tags->id == id) return tags->tag; tags++; } return 0; }
1threat
static int shorten_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { AVFrame *frame = data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; ShortenContext *s = avctx->priv_data; int i, input_buf_size...
1threat
Importing any 3d model in unreal engine 4 in-game from local disk : <p>I want to import a 3d model/mesh inside a game. Kinda like import a mesh from file explorer kinda thing. Is there any good way to do this? Without much coding.</p>
0debug
int av_opencl_create_kernel(AVOpenCLKernelEnv *env, const char *kernel_name) { cl_int status; int i, ret = 0; LOCK_OPENCL; if (strlen(kernel_name) + 1 > AV_OPENCL_MAX_KERNEL_NAME_SIZE) { av_log(&openclutils, AV_LOG_ERROR, "Created kernel name %s is too long\n", kernel_name); ret =...
1threat
How to Edit a File Text in Perl : <p>I have a file now in that i want to update the value of variable.How can we do this . <strong>File Content:</strong></p> <pre><code>&lt;Config&gt; NUM1 = 8 AMV1 = 8 AMV2 = 8 DEF2 = 8 DGF = 8 &lt;/Config&gt; </code></pre> <p>Now in this i want to change the value of <cod...
0debug
static void test_qemu_strtoul_full_max(void) { const char *str = g_strdup_printf("%lu", ULONG_MAX); unsigned long res = 999; int err; err = qemu_strtoul(str, NULL, 0, &res); g_assert_cmpint(err, ==, 0); g_assert_cmpint(res, ==, ULONG_MAX); }
1threat
Syntax: const {} = variableName, can anyone explain or point me into the right direction : <p>What does this syntax mean in JavaScript (ES6 probably):</p> <p>const {} = variablename;</p> <p>I'm currently trying to get a grip of React. In a lot of examples I came across that syntax. For example:</p> <pre><code>const ...
0debug
static void raw_aio_writev_scrubbed(void *opaque, int ret) { RawScrubberBounce *b = opaque; if (ret < 0) { b->cb(b->opaque, ret); } else { b->cb(b->opaque, ret + 512); } qemu_iovec_destroy(&b->qiov); qemu_free(b); }
1threat
Easy way to prevent add object with the same value to array : <p>Like in title easy way to prevent add object with the same value to array</p> <pre><code>const array = [ { name:'John' }, { name: 'Mark' } ] array.push({name: 'John'}) //don't add array.push({name: 'Kevin'}) //add console.log(array) <...
0debug
static target_ulong h_register_logical_lan(CPUPPCState *env, sPAPREnvironment *spapr, target_ulong opcode, target_ulong *args) { target_ulong reg = args[0]; target_ulong buf_lis...
1threat
The problem with the markers in Google maps : There was a problem, how to remove these buttons from the bottom? https://imgur.com/3JXa8xe
0debug
for loops and arrays in python : I've been far from python for a while. when I try bellow code it gives me > IndexEroor n = int(input()) array = [] for i in range(n): array[i] = i+1
0debug
switch statement not changing a variable : <p>I have a switch statement that goes as follows:</p> <pre><code> switch (event.key.keysym.sym) { case SDLK_ESCAPE: running = false; break; case SDLK_w: y -= 10; std::cout ...
0debug
static int vfio_add_std_cap(VFIODevice *vdev, uint8_t pos) { PCIDevice *pdev = &vdev->pdev; uint8_t cap_id, next, size; int ret; cap_id = pdev->config[pos]; next = pdev->config[pos + 1]; size = vfio_std_cap_max_size(pdev, pos); if (next) { ...
1threat
Possible to bring the app from background to foreground? : <p>When running an XCT UI test it is possible to put the application under test in the background with:</p> <pre><code>XCUIDevice().pressButton(XCUIDeviceButton.Home) </code></pre> <p>It it possible in some way to bring the app back to foreground (active stat...
0debug
static int make_ydt24_entry(int p1, int p2, int16_t *ydt) { int lo, hi; lo = ydt[p1]; hi = ydt[p2]; return (lo + (hi << 8) + (hi << 16)) << 1; }
1threat
Python Questions help. Im lost : Write a program that asks a user how many numbers they wish to process, then ask for that many numbers. Find the total and the maximum of the numbers processed. Example output: Enter the number of values to process: 5 First value: 3 Next value: 9.2 Next value: -2.5 Next value: ...
0debug
static inline int epoll_events_from_pfd(int pfd_events) { return (pfd_events & G_IO_IN ? EPOLLIN : 0) | (pfd_events & G_IO_OUT ? EPOLLOUT : 0) | (pfd_events & G_IO_HUP ? EPOLLHUP : 0) | (pfd_events & G_IO_ERR ? EPOLLERR : 0); }
1threat
uint64_t HELPER(neon_sub_saturate_s64)(uint64_t src1, uint64_t src2) { uint64_t res; res = src1 - src2; if (((res ^ src1) & SIGNBIT64) && ((src1 ^ src2) & SIGNBIT64)) { env->QF = 1; res = ((int64_t)src1 >> 63) ^ ~SIGNBIT64; } return res; }
1threat
Displaying KML Layers on Maps at Native Android apps Best Practice : <p>I have big KML file to a native Android application, please check the following details and give an advice.</p> <p><strong>KML file details</strong>:</p> <ul> <li><strong>size</strong>: 1.7 MB</li> <li><strong>total number of kml file elements</s...
0debug
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (NSConcreteData)' : Getting an error NSInvalidArgumentException', reason: 'Invalid type in JSON write . I hope this error when i post image data string in Request.Please help let imageData : NSDat...
0debug
MatDialog Service Unit Test Angular 6 Error : <p>I'm having modal service to open, confirm and close dialog and i am making its unit test file but i got and error on Angular and this is the code.</p> <p><strong>modal.service.ts</strong></p> <pre><code>@Injectable() export class ModalService { constructor(private d...
0debug
restore_fpu_state(CPUSPARCState *env, qemu_siginfo_fpu_t *fpu) { int err; #if 0 #ifdef CONFIG_SMP if (current->flags & PF_USEDFPU) regs->psr &= ~PSR_EF; #else if (current == last_task_used_math) { last_task_used_math = 0; regs->psr &= ~PS...
1threat
void OPPROTO op_idivw_AX_T0(void) { int num, den, q, r; num = (EAX & 0xffff) | ((EDX & 0xffff) << 16); den = (int16_t)T0; if (den == 0) { raise_exception(EXCP00_DIVZ); } q = (num / den) & 0xffff; r = (num % den) & 0xffff; EAX = (EAX & ~0xffff) | q; EDX = (EDX & ~...
1threat
Irregular bootstrap3 grid, one column out of container : <p>I'm seeing some crazy layouts sometimes. One of them is layout where we have boostrap container that has max width, let's say 1120px.</p> <p>One of columns has 50% width of container, and the second has 50% width, not container but browser. </p> <p>I've atta...
0debug
Why output other date? : <p>i have this code </p> <pre><code>public class HelloWorld{ public static void main(String []args){ try{ java.util.Date mDate; java.text.SimpleDateFormat readFormat = new java.text.SimpleDateFormat("yyyy-mm-dd"); mDate = readFormat.parse("2017-02-05"); S...
0debug
How to design a good JWT authentication filter : <p>I am new to JWT. There isn't much information available in the web, since I came here as a last resort. I already developed a spring boot application using spring security using spring session. Now instead of spring session we are moving to JWT. I found few links and...
0debug
how to write test case using NUnit which has a dependency of intefaces? : public List<CustomerViewModel> GetResellerCustomersWithProperties(string shortCode) { var businessManager = DependencyContainer.GetInstance<ICortexBusinessManager>(); return businessMan...
0debug
`createDraweerNavigation()` has been moved to `react-navigation-drawer` : [createDrawerNavigation() has been moved to react-navigation-drawer. See https://reactnavigation.org/docs/4.x/drawer-navigator.html for more details][1] [1]: https://i.stack.imgur.com/yoadY.jpg
0debug
static inline void RENAME(rgb32to16)(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
static int cook_decode_init(AVCodecContext *avctx) { COOKextradata *e = (COOKextradata *)avctx->extradata; COOKContext *q = avctx->priv_data; if (avctx->extradata_size <= 0) { av_log(avctx,AV_LOG_ERROR,"Necessary extradata missing!\n"); return -1; } else { ...
1threat
Python pathlib make directories if they don’t exist : <p>If I wanted to specify a path to save files to and make directories that don’t exist in that path, is it possibly to do this using the pathlib library in one line of code? </p>
0debug
Can't make git stop tracking package-lock.json : <p>With npm v5 here is now <code>package-lock.json</code> file being created after <code>npm install</code></p> <p>It is recommended to commit this file, but I have issue that this file is different for some reason between my dev machine and my server. Even if I push th...
0debug
Which typeface in Intellij IDEA for MAC OS X : I have Windows but I want this typeface. [PIC][1] [1]: http://i.stack.imgur.com/FPEec.png
0debug
How to get connectionString from EF Core 2.0 DbContext : <p>In EF6 works this code:</p> <pre><code> public string GetConnectionString(DbContext ctx) { ObjectContext _objectContext = ((IObjectContextAdapter)ctx).ObjectContext; if (_objectContext?.Connection != null) { EntityCo...
0debug
static int ehci_process_itd(EHCIState *ehci, EHCIitd *itd) { USBDevice *dev; USBEndpoint *ep; int ret; uint32_t i, len, pid, dir, devaddr, endp; uint32_t pg, off, ptr1, ptr2, max, mult; dir =(itd->bufptr[1] & ITD_BUFPTR_DIRECTION); devaddr = get_field(i...
1threat
static void filter_mb_mbaff_edgev( H264Context *h, uint8_t *pix, int stride, int16_t bS[7], int bsi, int qp ) { int index_a = qp + h->slice_alpha_c0_offset; int alpha = alpha_table[index_a]; int beta = beta_table[qp + h->slice_beta_offset]; if (alpha ==0 || beta == 0) return; if( bS[0] < 4 )...
1threat
How to get all the names from all the tags from form with Bottle python as dict? : Coudl you help me with the following question. How to get all the names from all the tags form with the library Bottle on python as a dict ?. Because actually the request.forms only provides me the last set of "names" from the HTML t...
0debug
Why my recursion doesn't work in os.listdir() : [This is my code. And it seems like it didn't go into the recursion function][1] [1]: https://i.stack.imgur.com/qp33h.png
0debug
R : function lapply error : subscript out of bounds : I have to make a 4*4 Kohonen map for a project. However, I get the error > Error in win_index[1, ] : subscript out of bounds > In addition: There were 16 warnings (use warnings() to see them) After testing my code, I guess it's the lapply function (line ...
0debug
How to create custom regex pattern in java script : <p>I have text box that can accept only numbers (floated number too (1.5 or 2.5 like this) with percentage symbol at end of the number but this % symbol not mandatory it an optional. I want do this using regular expression in javascript.</p>
0debug
How to using math jax? : I've been read the docs and I still don't get how to apply it from TeX so basically i wanted to convert this string ` <p><span class='math-tex'>\\( x&gt;0,y&gt;0 \\)</span></p>` `<p><span class='math-tex'>( (\\frac{2}{7},\\frac{2}{18}) )</span></p>` they are tex version right ?...
0debug
static void intel_hda_mmio_writew(void *opaque, target_phys_addr_t addr, uint32_t val) { IntelHDAState *d = opaque; const IntelHDAReg *reg = intel_hda_reg_find(d, addr); intel_hda_reg_write(d, reg, val, 0xffff); }
1threat
recursion with or without return statement : <p>this is the problem I solved for recursion<br/></p> <blockquote> <p>phone_book return <br/> [119, 97674223, 1195524421] false <br/> [123,456,789] true <br/> [12,123,1235,567,88] false</p> </blockquote> <p>when it have the prefix of the any number it will re...
0debug
Clone text from p to an input value without update : I can not find the way to clone the displayed inside a p into an input value. the text inside a p looks like ".30, .31, .6, .38" and it is updated without recharging, so i need is clone in each update. any idea? thx!!! Copy this: <p id="filter-display">....
0debug
MySQL Workbench 6.3 (Mac) hangs on simple queries : <p>I am using MySQL Workbench 6.3.7 build 1199 CE (64 bits) on a Mac with OS X Yosemite 10.10.5. I am connecting to an Amazon RDS MySQL instance.</p> <p>When I enter a simple query such as</p> <pre><code>select * from `devices`; </code></pre> <p>and click the ligh...
0debug
LocalDate.plus Incorrect Answer : <p>Java's LocalDate API seems to be giving the incorrect answer when calling <code>plus(...)</code> with a long <code>Period</code>, where I'm getting an off by one error. Am I doing something wrong here?</p> <pre class="lang-java prettyprint-override"><code>import java.time.LocalDate...
0debug
Delphi type mismatch in expresion when try to filter dbgrid : Am geting this error when i try to filter `DBGrid` by date with `DateTimePicker` component > Type mismatch in expresion **Code** procedure TGrupeForm.DateCreatedFilterChange(Sender: TObject); begin if CreatedEditPicker.Date <> Dat...
0debug
Specifying array size with constructor (Java) : I found some answers on this but I probably didn't understand it correctly because it didn't work for me Employee is an object defined in another class public class Firm { Employee employees[]; public Firm (int rosterSize){ this.employees = new empl...
0debug
How do I use roxygen to document a R package that includes a function with the same name? : <p>I'm learning to use roxygen. I see that the <a href="https://cran.r-project.org/web/packages/roxygen2/vignettes/rd.html#documenting-packages" rel="noreferrer">rd vignette</a> advocates using "_PACKAGE" to indicate that I'm cr...
0debug
static int scsi_disk_emulate_command(SCSIDiskReq *r, uint8_t *outbuf) { SCSIRequest *req = &r->req; SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev); uint64_t nb_sectors; int buflen = 0; int ret; switch (req->cmd.buf[0]) { case TEST_UNIT_READY: if (!bdrv_is_inse...
1threat
def reverse_vowels(str1): vowels = "" for char in str1: if char in "aeiouAEIOU": vowels += char result_string = "" for char in str1: if char in "aeiouAEIOU": result_string += vowels[-1] vowels = vowels[:-1] else: result_string += char return result_string
0debug
static TCGv gen_mulu_i64_i32(TCGv a, TCGv b) { TCGv tmp1 = tcg_temp_new(TCG_TYPE_I64); TCGv tmp2 = tcg_temp_new(TCG_TYPE_I64); tcg_gen_extu_i32_i64(tmp1, a); dead_tmp(a); tcg_gen_extu_i32_i64(tmp2, b); dead_tmp(b); tcg_gen_mul_i64(tmp1, tmp1, tmp2); return tmp1; }
1threat
uint64_t HELPER(neon_abdl_u16)(uint32_t a, uint32_t b) { uint64_t tmp; uint64_t result; DO_ABD(result, a, b, uint8_t); DO_ABD(tmp, a >> 8, b >> 8, uint8_t); result |= tmp << 16; DO_ABD(tmp, a >> 16, b >> 16, uint8_t); result |= tmp << 32; DO_ABD(tmp, a >> 24, b >> 24, uint8_t); ...
1threat
static void do_video_out(AVFormatContext *s, AVOutputStream *ost, AVInputStream *ist, AVFrame *in_picture, int *frame_size) { int nb_frames, i, ret; int64_t topBand, bottomBand, leftBand, rightBand; A...
1threat
void monitor_disas(Monitor *mon, CPUState *cpu, target_ulong pc, int nb_insn, int is_physical) { CPUClass *cc = CPU_GET_CLASS(cpu); int count, i; CPUDebug s; INIT_DISASSEMBLE_INFO(s.info, (FILE *)mon, monitor_fprintf); s.cpu = cpu; monitor_disas_is_physical = is_ph...
1threat
make "continue" button appear when items selected and disappear when items unselected using javascript : my question is abou make "continue" button appear when items selected and disappear when items unselected using javascript thank you :D
0debug
static void raw_lock_medium(BlockDriverState *bs, bool locked) { bdrv_lock_medium(bs->file->bs, locked); }
1threat
Finding columns in dataframe with specific number of values in R : <p>I have a dataframe(data.table) with over 3000 columns. I need to find out the columns in my dataframe that have only 2 and less than 2 values in them. I then after extracting those columns with 2 and less then 2 values I want to drop them out of the ...
0debug
Redux Form - initialValues not updating with state : <p>I am having some issues with setting the inital form field values using redux-form.</p> <p>I am using redux-form v6.0.0-rc.3 and react v15.3.0.</p> <p>So here's my issue, I have a grid of users and when a user row is clicked on, I am navigating to an edit users ...
0debug
Double* to double conversion error when trying to pass a function C++ : I am fairly new to c++ and I am writing a program that has a struct, and 3 functions named win_percentage, Wins_losses, and winning_teams. The object of this assignment is to create a program that prints out 13 school teams, their records, and then...
0debug
cursor.execute('SELECT * FROM users WHERE username = ' + user_input)
1threat
Why is it that when i run my code it says "AttributeError: Enemy instance has no attribute 'enemy'"? : <p>my code can both be found and ran here : <a href="https://repl.it/Bda9/10" rel="nofollow">https://repl.it/Bda9/10</a></p> <p>right now i'm focusing on the 'explore' then 'attack' pathways, but for some reason this...
0debug
Filter out all users created 23 days ago using mysql : <p>I want to make a user expiring notification module. In that module I want to send emails when users completed 23 days from their 30 days trial period.And after the 30 days trial period completed I wanna send them the trial period expired email. To do that task I...
0debug
static void io_write(IPackDevice *ip, uint8_t addr, uint16_t val) { IPOctalState *dev = IPOCTAL(ip); unsigned reg = val & 0xFF; unsigned block = addr >> 5; unsigned channel = addr >> 4; unsigned offset = (addr & 0x1F) ^ 1; SCC2698Channel *ch = &dev->ch[channel]; SCC26...
1threat
I have code like this need to fetch only one specific value from the database : <?php $stmt = $conn->prepare('SELECT Distinct(specificcategoryname) FROM `clientstable` c,specificcategories s where c.PhoneNumber=:phNo and c.SpecificCategoryId=s.SpecificCategoryId'); $stmt...
0debug
Dockerfile: Setting multiple environment variables in single line : <p>I was under the impression that environmental variables could be set on a single line as follows so as to minimize intermediary images.</p> <pre><code>FROM alpine:3.6 ENV RUBY_MAJOR 2.4 \ RUBY_VERSION 2.4.1 \ RUBY_DOWNLOAD_SHA256 4fc8a9992d...
0debug
html helper syntax for radio button in asp.net mvc : how to write this code with html helper in asp using html helper in asp.net mvc <label> <input name="form-field-radio" type="radio" class="inverted"> <span class="text">OF BASIC</span> ...
0debug
static void matroska_merge_packets(AVPacket *out, AVPacket *in) { out->data = av_realloc(out->data, out->size+in->size); memcpy(out->data+out->size, in->data, in->size); out->size += in->size; av_destruct_packet(in); av_free(in); }
1threat
Slicing words from string : <p>I have a string that has words and spaces,</p> <pre><code>var version = "One Forty Six 1.1 V2 (10 kilo / 20 kilo) (2000 - 2005)" </code></pre> <p>I want to extract</p> <pre><code>One Forty Six 1.1 V2 </code></pre> <p>out of it. What is the best practice of doing it? How can i use <str...
0debug
static av_always_inline void decode_bgr_1(HYuvContext *s, int count, int decorrelate, int alpha) { int i; OPEN_READER(re, &s->gb); for (i = 0; i < count; i++) { unsigned int index; int code, n; UPDATE_CACHE(re, &s->gb); i...
1threat
How to colour tables in R - Conditional Fomatting : <p>I want to assign colors to tables in R.</p> <p><a href="https://i.stack.imgur.com/YjF3r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YjF3r.png" alt="enter image description here"></a></p> <p>Is it possible to create a table like this in R - ...
0debug
static void mxf_write_package(AVFormatContext *s, enum MXFMetadataSetType type, const char *package_name) { MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; int i, track_count = s->nb_streams+1; int name_size = mxf_utf16_local_tag_length(package_name); int user_comment_count = 0; ...
1threat
Use arrow function in vue computed does not work : <p>I am learning Vue and facing a problem while using arrow function in computed property.</p> <p>My original code works fine (See snippet below).</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false"> <div class="snipp...
0debug
PIX_SAD(mmxext) #endif av_cold void ff_dsputil_init_pix_mmx(DSPContext *c, AVCodecContext *avctx) { #if HAVE_INLINE_ASM int cpu_flags = av_get_cpu_flags(); if (INLINE_MMX(cpu_flags)) { c->pix_abs[0][0] = sad16_mmx; c->pix_abs[0][1] = sad16_x2_mmx; c->pix_abs[0][2] = sad16...
1threat
How can I tell if a given git tag is annotated or lightweight? : <p>I type <code>git tag</code> and it lists my current tags:</p> <pre><code>1.2.3 1.2.4 </code></pre> <p>How can I determine which of these is annotated, and which is lightweight?</p>
0debug
Algorithms in DHCP : <p>What are the algorithms that dictate how DHCP assigns IP addresses? Are there any references, algorithms, C/Assembly/C++/etc. source code that demonstrates how DHCP assigns IP addresses almost so flawlessly? Thanks.</p>
0debug
Is there a way to retrieve available disk space in java or some other language? : <p>I want to build an application that gives me a warning when my harddrive is about to become full. For this the program needs to retrieve the amount of available disk space. Anyone kows how I can do this?</p>
0debug