problem
stringlengths
26
131k
labels
class label
2 classes
scope of macro puzzle : #include <iostream> using namespace std; void sum(){ #define SUM(a,b) a+b } int main(void){ int a = 10; int b = 20; int c = SUM(a,b); int d = MUL(a,b); cout << c << endl; cout << d << endl; r...
0debug
static int tqi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; const uint8_t *buf_end = buf+buf_size; TqiContext *t = avctx->priv_data; Mpe...
1threat
Difference between daemonsets and deployments : <p>In Kelsey Hightower's Kubernetes Up and Running, he gives two commands :</p> <p><code>kubectl get daemonSets --namespace=kube-system kube-proxy</code></p> <p>and</p> <p><code>kubectl get deployments --namespace=kube-system kube-dns</code></p> <p>Why does one use da...
0debug
Finding an object in a nested object array : I have an object array that looks like the image below depicts. I need to iterate through that object array and return the object where the text property is equals to a string variable that comes as a param. e.g: an object where the text property is "Book an Internal Intervi...
0debug
Overriding configuration with environment variables in typesafe config : <p>Using <a href="https://github.com/typesafehub/config" rel="noreferrer">typesafe config</a>, how do I override the reference configuration with an environment variable? For example, lets say I have the following configuration:</p> <pre><code>fo...
0debug
document.write('<script src="evil.js"></script>');
1threat
JS/ES6: Destructuring of undefined : <p>I'm using some destructuring like this:</p> <pre><code>const { item } = content console.log(item) </code></pre> <p>But how should I handle <code>content === undefined</code> - which will throw an error?</p> <p>The 'old' way would look like this:</p> <pre><code>const item = co...
0debug
Asking Solution for Login Activity : **When I press Login Button it shows (Username/Password Wrong) even if i put the right Username & password. It doesn't go to next Activity. the Sing up activity is working fine. i am not able to solve this problem. if anyone can find the problem it would be very helpful. This is my ...
0debug
def div_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even/first_odd)
0debug
How to delete a pull request? : <p>I am getting a deployment error and I want to delete an unmerged pull request. I have to make changes to the pulled code and create a new PR.</p>
0debug
Angular Email Validation Per RFC 5322 Specs : I have a form which I need to do email validation on before submission. I've come across `ng-pattern="email.text"` which passes `bob@bob`. This lead me to several googles, which I found several suggestions with bad examples, such as http://stackoverflow.com/questions/24...
0debug
Android Studio - Adding an imageview with source : <p>When I add an ImageView in Android Studio from the Palette the program doesn't prompt me to select an actual image like it used to be in Eclipse. It just puts an empty ImageView there like this: </p> <pre><code>&lt;ImageView android:layout_width="wrap_content" ...
0debug
void qemu_aio_flush(void) { AioHandler *node; int ret; do { ret = 0; qemu_aio_wait(); QLIST_FOREACH(node, &aio_handlers, node) { if (node->io_flush) { ret |= node->io_flush(node->opaque); } } } while (qemu...
1threat
static void x86_cpuid_get_apic_id(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { X86CPU *cpu = X86_CPU(obj); int64_t value = cpu->apic_id; visit_type_int(v, name, &value, errp); }
1threat
static int tight_compress_data(VncState *vs, int stream_id, size_t bytes, int level, int strategy) { z_streamp zstream = &vs->tight_stream[stream_id]; int previous_out; if (bytes < VNC_TIGHT_MIN_TO_COMPRESS) { vnc_write(vs, vs->tight.buffer, vs->tight.offset); ...
1threat
static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int flags) { uint8_t *buf1; RMMuxContext *rm = s->priv_data; AVIOContext *pb = s->pb; StreamInfo *stream = rm->audio_stream; int i; buf1 = av_malloc(size * sizeof(uint8_t)); write_packet_header(s,...
1threat
void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, Error **errp) { Location loc; DriveInfo *dinfo; int unit; Error *err = NULL; loc_push_none(&loc); for (unit = 0; unit <= bus->info->max_target; unit++) { dinfo = drive_get(IF_SCSI, bus->busnr, unit); if (dinfo == NULL) ...
1threat
SQL Insert duplicating values : <p>I'm trying to insert data in SQL table, but it's duplicating the values:</p> <pre><code> $star1 = trim($_GET['star1']); $star2 = trim($_GET['star2']); $star3 = trim($_GET['star3']); $star4 = trim($_GET['star4']); $star5 = trim($_GET['star5']); $conn = new mysqli($...
0debug
static int get_phys_addr_lpae(CPUARMState *env, target_ulong address, int access_type, ARMMMUIdx mmu_idx, hwaddr *phys_ptr, MemTxAttrs *txattrs, int *prot, target_ulong *page_size_ptr) { CPUState *cs = CPU(arm_env_get_cpu...
1threat
Enter Key To Download Product : <p>I'm a game developer who is creating a website for his project. I want players to enter a key before downloading my game from this website. I am trying to use HTML and JavaScript to make this possible. I haven't done something like this before and would like some help writing the code...
0debug
Java if else loop not working : I am currently working on a interactive timeline page generated all in js, but this loop is making the page not work <!-- begin snippet: js hide: false --> <!-- language: lang-js --> if (i = 0) { console.log('magic'); } else if (i = 1) { console.log('mag...
0debug
SSIS licensing when deployed on different machine than the sql server : I have data warehouse database on SQL Server Enterprise. Currently the SSIS that feeds the data warehouse is running on the same server. I would like to move the SSIS execution on another server. What are the licensing options for SQL Server for r...
0debug
C# - converting from an exact number of seconds to DateTime : Newbie here! I have almost completed my given problem - got a total number of seconds. Now I need to print those seconds to a d:HH:mm:ss format. Like I mentioned, I'm kind of new, so it's kind of confusing. I tried the following: double totalSeconds =...
0debug
static int64_t ratelimit_calculate_delay(RateLimit *limit, uint64_t n) { int64_t delay_ns = 0; int64_t now = qemu_get_clock_ns(rt_clock); if (limit->next_slice_time < now) { limit->next_slice_time = now + SLICE_TIME; limit->dispatched = 0; } if (limit->dispatched + n > limi...
1threat
static void rtsp_send_cmd (AVFormatContext *s, const char *cmd, RTSPMessageHeader *reply, unsigned char **content_ptr) { rtsp_send_cmd_async(s, cmd, reply, content_ptr); rtsp_read_reply(s, reply, content_ptr, 0); }
1threat
What is the difference in these C function argument type? : <pre><code>void f(int **); void g(int *[]); void h(int *[3]); void i(int (*)[]); void j(int (*)[3]); void k(int [][3]); void f(int **a) {} void g(int *a[]) {} void h(int *a[3]) {} void i(int (*a)[]) {} void j(int (*a)[3]) {} void k(int a[][3]) {} int main(vo...
0debug
static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_time, int flags) { AVStream *st = s->streams[stream_index]; int64_t seconds; if (!s->bit_rate) return AVERROR_INVALIDDATA; if (sample_time < 0) sample_time = 0; seconds = av_rescale(sample_time, s...
1threat
how to use setSupportActionBar in fragment : <p>I need to use the setSupportActionBar in fragment which I am unable to also I am unable to use setContentView please to help with it also Thankyou in advance the related code is given</p> <pre><code>public class StudentrFragment extends Fragment { Toolbar toolbar...
0debug
How to align a text inside a <div> element horizontally? : <p>How to align the text inside a div centrally vertically?</p> <p>I have a div element inside my html page where and the height of the div is the screen size and the text inside that div need to be at the center. I have used text-align : center property to al...
0debug
How to not evaluate an expression until it is used? : I have a global variable that references local variables within a function, but I don't want the global variable to be evaluated until it's used. var a = (c > d) funciton b() { var c = 5; var d = 3; if (a) { return...
0debug
How to use Robot Frame Ride execute branch statement : I met a question with use Robot Framework Ride to test. The test case structure as below: ---------------------------------- if A>B: print 1 print 2 print 3 if C>D: print 4 print 5 ---------------------------------- I didn't find a way to ...
0debug
static ssize_t net_socket_receive(NetClientState *nc, const uint8_t *buf, size_t size) { NetSocketState *s = DO_UPCAST(NetSocketState, nc, nc); uint32_t len; len = htonl(size); send_all(s->fd, (const uint8_t *)&len, sizeof(len)); return send_all(s->fd, buf, size); }
1threat
Get variable from inside of a method : <p>I am quite new to swift and I am learning to make HTTP requests from an API.</p> <p>Right now I have this struct</p> <pre><code>struct CNJokesProvider { let url = URL(string: "https://api.chucknorris.io/jokes/random")! func getRandomJoke() -&gt; String { var...
0debug
How do I enable the Ruby 2.3 `--enable-frozen-string-literal` globally in Rails? : <p>I am building a greenfield Rails application on top of Ruby 2.3, and I would like all Rails commands (e.g. <code>rails s</code>, <code>rails c</code>) and all Ruby commands (e.g. <code>rake do:something</code>) to use the new immutabl...
0debug
Error creating Node.js Express App. Cannot find : <p><a href="https://i.stack.imgur.com/Tr1vv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Tr1vv.png" alt="error msg"></a></p> <p>Im trying to create a node.js project in WebStorm Can you tell what am I missing here?</p>
0debug
void ff_h264_direct_ref_list_init(const H264Context *const h, H264SliceContext *sl) { H264Ref *const ref1 = &sl->ref_list[1][0]; H264Picture *const cur = h->cur_pic_ptr; int list, j, field; int sidx = (h->picture_structure & 1) ^ 1; int ref1sidx = (ref1->reference & 1) ^ 1; for...
1threat
How to Dynamic ID of static Users from a text file : How to get Dynamic ID of static user using python script. Currently i tried to store it in variable and trying to find it. mgmt = user-data (user-data contain below table information) dynamicID = user-data.find("User ID" sp001 ) pri...
0debug
Difference between OpenCV type CV_32F and CV_32FC1 : <p>I would like to know if there is any difference between OpenCV types CV_32F and CV_32FC1? I already know that 32F stands for a "32bits floating point" and C1 for "single channel", but further explanations would be appreciated.</p> <p>If yes, how are they differe...
0debug
How to use php in html coding to reduce no. Of .html files? : <p>I have made the structure of a website. I have made three .html files named index.html, blog.html, posts.html. index.html is the home page and on that page their is a link for blog.html on the blog.html page thier are some posts heading and i have connect...
0debug
static inline int get_segment(CPUState *env, mmu_ctx_t *ctx, target_ulong eaddr, int rw, int type) { target_phys_addr_t sdr, hash, mask, sdr_mask, htab_mask; target_ulong sr, vsid, vsid_mask, pgidx, page_mask; int ds, vsid_sh, sdr_sh, pr, target_page_bits; int ret, re...
1threat
def zip_tuples(test_tup1, test_tup2): res = [] for i, j in enumerate(test_tup1): res.append((j, test_tup2[i % len(test_tup2)])) return (res)
0debug
How to create good database design using sql-server and asp.net? : <p>Right now, I'm learning all about database design. Basically the contents of my database are brands for musical instruments. And there are two types of musical instruments which is Guitar and Bass. Now, I have stumbled upon a problem where sometimes ...
0debug
Need help writing to a file in Python : I am making a French Translator and purely for experience I want to make a 'Save' button they will save what is currently entered into the entry fields. e1 = Entry(master) e2 = Entry(master) e1.grid(row=0, column=1) e2.grid(row=1, column=1) ...
0debug
Comparing of various nullable values in C# : How to translate these lines of VB.NET code into C#? this is a fragment of code which I don't understand ... cmd.Parameters.AddWithValue("@ID", res_ID) Dim m1 As Object = cmd.ExecuteScalar() If m1 Is DBNull.Value Or Nothing Then ...
0debug
static void test_visitor_out_union_flat(TestOutputVisitorData *data, const void *unused) { QObject *arg; QDict *qdict; UserDefFlatUnion *tmp = g_malloc0(sizeof(UserDefFlatUnion)); tmp->enum1 = ENUM_ONE_VALUE1; tmp->string = g_strdup("str"); tmp->...
1threat
static void print_report(OutputFile *output_files, OutputStream *ost_table, int nb_ostreams, int is_last_report, int64_t timer_start) { char buf[1024]; OutputStream *ost; AVFormatContext *oc; int64_t total_size; AVCodecContext *enc; int ...
1threat
May I know what language is this? is this javascript or jquery? : <p>these code makes me confuse, I would like to add an image for this variable but idk what is the code of adding an image is it image: ? or picture: ? </p> <pre><code> var goldStar = { path: 'M 125,5 155,90 245,90 175,145 200,230 125,180 50...
0debug
Creating a Scientific Calculator in Javascript : <p>I have a scientific calculator and I have a Calculator. My question is how do I write a scientific calculator class that matches this specification.</p> <pre><code>describe( "ScientificCalculator", function(){ var calculator; beforeEach( function(){ calculator = n...
0debug
BlockInfoList *qmp_query_block(Error **errp) { BlockInfoList *head = NULL, **p_next = &head; BlockBackend *blk; Error *local_err = NULL; for (blk = blk_next(NULL); blk; blk = blk_next(blk)) { BlockInfoList *info = g_malloc0(sizeof(*info)); bdrv_query_info(blk, &info->value, &loc...
1threat
static int v9fs_synth_close(FsContext *ctx, V9fsFidOpenState *fs) { V9fsSynthOpenState *synth_open = fs->private; V9fsSynthNode *node = synth_open->node; node->open_count--; g_free(synth_open); fs->private = NULL; return 0; }
1threat
static inline void vmsvga_fill_rect(struct vmsvga_state_s *s, uint32_t c, int x, int y, int w, int h) { DisplaySurface *surface = qemu_console_surface(s->vga.con); int bypl = surface_stride(surface); int width = surface_bytes_per_pixel(surface) * w; int line = h; int column; ...
1threat
IndexOutOfRangeException was unhandled c# : I'm getting an error IndexOutOfRangeException was unhandled at the line " int euros = int.Parse(values[1])". My .csv file looks: name, 1, 2 name1, 3, 4 name2, 5, 6
0debug
static void coroutine_fn aio_read_response(void *opaque) { SheepdogObjRsp rsp; BDRVSheepdogState *s = opaque; int fd = s->fd; int ret; AIOReq *aio_req = NULL; SheepdogAIOCB *acb; uint64_t idx; if (QLIST_EMPTY(&s->inflight_aio_head)) { goto out; } ret...
1threat
How do you use a private variable in child classes? : <p>i have a private variable in my main class, is it possible to use it in other classes without making it a protected variable?</p>
0debug
static void do_branch(DisasContext *dc, int32_t offset, uint32_t insn, int cc, TCGv r_cond) { unsigned int cond = GET_FIELD(insn, 3, 6), a = (insn & (1 << 29)); target_ulong target = dc->pc + offset; if (cond == 0x0) { if (a) { dc->pc = dc->npc + ...
1threat
Why drivers are required for JDBC-ODBC? : <p>I am having a little confusion of what I have studied. I have studied that drivers are software programs that are required to interact external hardware devices like printers,mouse,mobiles etc. But when I connect ODBC or JDBC in Java,it requires that we specify the drivers.<...
0debug
Can Spark Dataframe's where clause take Variable as argument? : I am running where clause from Spark Dataframe. When I put String variable as argument, it throws me an error message. If I copy that string and put that one in the query, it works. val a = """col("foo")==="bar" || col("abc")==="def"""" val df...
0debug
void *block_job_create(const BlockJobDriver *driver, BlockDriverState *bs, int64_t speed, BlockDriverCompletionFunc *cb, void *opaque, Error **errp) { BlockJob *job; if (bs->job || bdrv_in_use(bs)) { error_set(errp, QERR_DEVICE_IN_USE, bdrv_get_devic...
1threat
Why does my querySelectorAll is not working even though I converted it to an array? : # querySelectorAll is not working Hey guys I have been trying to inject some data from my JavaScript file to my index html with dom manipulation (querySelectorAll) but it is not working. Note that I have also tried converting nodel...
0debug
static void qemu_rdma_init_one_block(void *host_addr, ram_addr_t block_offset, ram_addr_t length, void *opaque) { __qemu_rdma_add_block(opaque, host_addr, block_offset, length); }
1threat
JQuery - Get the minimum and maximum date and grouped it by id : I have this array of data [{"id":1, "start":"2018-10-10", "end":"2018-11-10"}, {"id":1, "start":"2018-11-10", "end":"2018-12-10"}, {"id":2, "start":"2018-11-22", "end":"2018-11-30"}] I wanted to get the `minimum` in the start and t...
0debug
Casting Objects -- How do they work? : <p>I have a Person class, and Object class is just the Object class of Java. I have a Student class that extends the Person Class as well. Can somebody explain why in these different scenarios I get errors when casting and some work?</p> <pre><code>Person p = (Person) new Object(...
0debug
static int filter_frame(AVFilterLink *inlink, AVFrame *src_buffer) { AVFilterContext *ctx = inlink->dst; ATempoContext *atempo = ctx->priv; AVFilterLink *outlink = ctx->outputs[0]; int ret = 0; int n_in = src_buffer->nb_samples; int n_out = (int)(0.5 + ((double)n_in) / atempo->tempo); ...
1threat
static void ecc_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val) { ECCState *s = opaque; switch (addr & ECC_ADDR_MASK) { case ECC_MER: s->regs[0] = (s->regs[0] & (ECC_MER_VER | ECC_MER_IMPL)) | (val & ~(ECC_MER_VER | ECC_MER_IMPL)); DPRINTF("Write...
1threat
static inline int decode_seq_parameter_set(H264Context *h){ MpegEncContext * const s = &h->s; int profile_idc, level_idc; unsigned int sps_id, tmp, mb_width, mb_height; int i; SPS *sps; profile_idc= get_bits(&s->gb, 8); get_bits1(&s->gb); get_bits1(&s->gb); get_bits1...
1threat
Angular 2 - Global CSS file : <p>Is it possible to add a global CSS file to Angular 2? At the moment I have many different components that have the same button styling - but each of the components have their own CSS file with the styling. This is frustrating for changes.</p> <p>I read somewhere on Stack Overflow to a...
0debug
What is the best and most used way of wiring in spring dependency injection : <p>This question is not pure coding but pre coding. Actually I am new to spring in winter season. I have a question is that What is the best and most used way of wiring in spring dependency injection? I come to know that xml based wiring is o...
0debug
Understanding the use of Task.Run + Wait() + async + await used in one line : <p>I'm a C# newbie, so I'm struggling to understand some concepts, and I run into a piece of code that I'm not quite understanding:</p> <pre><code>static void Main(string[] args) { Task.Run(async () =&gt; { await SomeClass.Initiate(new Conf...
0debug
HTML - How do I reveal a checkbox group based on radio group? : <p>I want to have an html form with a required radio group. If one particular option in this radio group is selected, it reveals a checkbox group. This checkbox group should only be required if it is revealed. How could I do this? Preferably in pure HTML, ...
0debug
static int vmsa_ttbcr_raw_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { if (arm_feature(env, ARM_FEATURE_LPAE)) { value &= ~((7 << 19) | (3 << 14) | (0xf << 3)); } else { value &= 7; } env->cp15.c2_control = value;...
1threat
static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) { int64_t total_size = 0; MOVAtom a; int i; if (atom.size < 0) atom.size = INT64_MAX; while (total_size + 8 <= atom.size && !url_feof(pb)) { int (*parse)(MOVContext*, AVIOContext*, MOVAtom) = NULL; ...
1threat
static void gen_spr_BookE206(CPUPPCState *env, uint32_t mas_mask, uint32_t *tlbncfg) { #if !defined(CONFIG_USER_ONLY) const char *mas_names[8] = { "MAS0", "MAS1", "MAS2", "MAS3", "MAS4", "MAS5", "MAS6", "MAS7", }; int mas_sprn[8] = { SPR_BOOKE_MAS0, SPR_...
1threat
SQL server Function to select rows from multiple tables based : can anyone please help with this query ? I’m using SQL server 2008 . Objective is to select rows from multiple tables based on condition and values from different tables . 1) I have table1, table2, tableN with columns as ID,ColumnName,ColumnValue . Thes...
0debug
Method not found System.Net.Http.Formatting.MediaTypeFormatter.get_SupportedMediaTypes() after adding .NET Standard 2.0 dependency : <p>I have a .NET Framework 4.6.1 WebApi project that is referencing a small NuGet package we use internally to share common utility methods.</p> <p>We want to start moving some of our st...
0debug
static void curl_block_init(void) { bdrv_register(&bdrv_http); bdrv_register(&bdrv_https); bdrv_register(&bdrv_ftp); bdrv_register(&bdrv_ftps); bdrv_register(&bdrv_tftp); }
1threat
How do you populate two Lists with one text file based on an attribute? : <p>I have a text file with 40000 lines of data.</p> <p>The data is formatted as such:</p> <pre><code>Anna,F,98273 Christopher,M,2736 Robert,M,827 Mary,F,7264 Anthony,M,8 ... </code></pre> <p>I want to create two Lists based on a char value. T...
0debug
Running Custom Android ROM on Emulator : <p>I built a custom ROM based out of AOSP (7.0 for Nexus 6) and I would like to use this ROM with SDK emulator. The lunch combo for the build is 'aosp_x86_64-eng' which I believe </p> <p>should work on SDK emulator. However, I don't see an option in AVD Manager to specify my cu...
0debug
How to apply ensemble modelling approach for each group in data set? : Suppose , I have a data set which consists of variables like population age, life expectancy,gender , country, year(monthly data for each year). I would like to predict life expectancy (years) by each country. How can I apply ensemble modelling appr...
0debug
Group elements of array of objects Js : <p>I've been trying to group elements with the same values in the array for hours but I'm going nowhere </p> <p>Array:</p> <pre><code>list = [ {id: "0", created_at: "foo1", value: "35"}, {id: "1", created_at: "foo1", value: "26"}, {id: "2", created_at: "foo", value:...
0debug
How can I run a docker windows container on osx? : <p>I'm running docker for mac and want to start up a windows container. From what I see this should work via a virtual machine. But I'm unclear where to find out how to get it to work? Or does it only work for linux containers? Thanks in advance!</p> <pre><code>docker...
0debug
How to take input from text file for adjacency matrix in c language : <p>Here is the inline input for my code.</p> <pre><code>int graph[V][V] = {{0, 2, 0, 6, 0}, {2, 0, 3, 8, 5}, {0, 3, 0, 0, 7}, {6, 8, 0, 0, 9}, {0, 5, 7, 9, 0}, ...
0debug
What does the standard Keras model output mean? What is epoch and loss in Keras? : <p>I have just built my first model using Keras and this is the output. It looks like the standard output you get after building any Keras artificial neural network. Even after looking in the documentation, I do not fully understand what...
0debug
undefined method `detailsFileTag' for nil:NilClass : Aim is to test a design pattern -here which is a decorator pattern I have taken the below codes from the lib folder , controller folder. Idea is to test the decorator patter sample code here. The library file here has a BasicTag class which is inherited b...
0debug
static void init_proc_620 (CPUPPCState *env) { gen_spr_ne_601(env); gen_spr_620(env); gen_tbl(env); spr_register(env, SPR_HID0, "HID0", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, 0x00000000); ...
1threat
remove fragment in viewPager2 use FragmentStateAdapter, but still display : <p>I have a viewPager2 and FragmentStateAdapter, and there are Fragement1, 2,3 4, I am in fragment2, and want to remove fragment3, and display fragment4 after fragment2. The problem is it always show me fragment3(data), the debug shows the fra...
0debug
static int yuv4_read_header(AVFormatContext *s) { char header[MAX_YUV4_HEADER + 10]; char *tokstart, *tokend, *header_end; int i; AVIOContext *pb = s->pb; int width = -1, height = -1, raten = 0, rated = 0, aspectn = 0, aspectd = 0; ...
1threat
static int hls_write_trailer(struct AVFormatContext *s) { HLSContext *hls = s->priv_data; AVFormatContext *oc = hls->avf; av_write_trailer(oc); hls->size = avio_tell(hls->avf->pb) - hls->start_pos; avio_closep(&oc->pb); avformat_free_context(oc); av_free(hls->basename); hls_ap...
1threat
int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2Meta *m) { BDRVQcowState *s = bs->opaque; int i, j = 0, l2_index, ret; uint64_t *old_cluster, *l2_table; uint64_t cluster_offset = m->alloc_offset; trace_qcow2_cluster_link_l2(qemu_coroutine_self(), m->nb_clusters); assert(m->n...
1threat
Would like to run powershell code from inside a C++ program : I want to be able to run like 30 lines of powershell script from my c++ program. I've heard it's a terrible idea, I don't care. I still would like to know how. I just want to code directly in the c++ program, i do not want to externally call the powershe...
0debug
void axisdev88_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; struct etraxfs...
1threat
Do i always need to use a container/container fluid in bootstrap? : <p>I was watching this video and the instructor said that bootstrap requires us to use a container/container fluid when using the grid system. However, she failed to always use a container even when she used the grid system. If you have 1 row and a bun...
0debug
How to add hyperlink in this code? : This is a code to show blinking text on webpages. I want to add a hyperlink to the blinking text. How to do that? <script type="text/javascript"> function blinker() { if(document.getElementById("blink")) { var d = document.getElementBy...
0debug
conditional formating table jquery : I have a quiz with 9 skills, and 1 skill has 2 questions - total 18 questions So when ppl submit the quiz, the result table returns 4 ranges (Rangea,b,c,d). So based on the score, I want to highlight the row for each skill [result table][1] [1]: https://i.stack.imgur.com/rPt5...
0debug
How to summarize the employees by net revenue and not order date? : 8. The sales director would like to reward the employees with net sales over $150,000 for the years 2015 and 2016 combined. The Sales Manager would like the resulting query to display the following columns: Employee ID, Employee Name (First and Last as...
0debug
static void register_subpage(MemoryRegionSection *section) { subpage_t *subpage; target_phys_addr_t base = section->offset_within_address_space & TARGET_PAGE_MASK; MemoryRegionSection *existing = phys_page_find(base >> TARGET_PAGE_BITS); MemoryRegionSection subsection = { .offset_...
1threat
How to use windows authentication with SQL server docker container : <p>I have gone through all the examples I could find online for building docker container based applications. I would want to run two services running in two docker containers: </p> <ol> <li>A windows container running ASP.NET</li> <li>A windows cont...
0debug
JAVA - Create object from generic class : I want to create objects from different classes extending the same class. Can you explain how it will work. Examples would be nice. Thank you. class MainClass{ private <T extends DataPoint> void someMethod(Class<T> clazz) { new clazz();//<-- cr...
0debug
Keycodes alt shift number : I am trying to use ALT + SHIFT + number. I have tried: if (e.which === 18 && e.which === 16 && e.which === 49) { //DO SOMETHING } if (e.altKey && ( e.which === 16 ) && ( e.which === 49 )) { //DO SOMETHING } if (e.which === 18) && (e.which === 16) && e...
0debug
static av_cold int libgsm_encode_init(AVCodecContext *avctx) { if (avctx->channels > 1) { av_log(avctx, AV_LOG_ERROR, "Mono required for GSM, got %d channels\n", avctx->channels); return -1; if (avctx->sample_rate != 8000) { av_log(avctx, AV_LOG_ERROR, "Sample rat...
1threat
Vuex store state is undefined : <p>I am trying to use <code>Vuex ("^2.1.3")</code> with <code>vuejs ("^2.1.10")</code> project in this way:</p> <p>store.js:</p> <pre><code>import Vue from 'vue'; import Vuex from 'vuex'; Vue.use(Vuex); export const store = new Vuex.Store({ state: { inTheaters: [ ...
0debug