problem
stringlengths
26
131k
labels
class label
2 classes
void opt_output_file(const char *filename) { AVStream *st; AVFormatContext *oc; int use_video, use_audio, nb_streams, input_has_video, input_has_audio; int codec_id; if (!strcmp(filename, "-")) filename = "pipe:"; oc = av_mallocz(sizeof(AVFormatContext)); if (!file_for...
1threat
Sql sever wirdest error ever : The C# code: SqlConnection c; string str = "Data Source =(LocalDB)\\MSSQLLocalDB;"; str += "AttachDbFilename=|DataDirectory|\\DinoData.mdf;"; str += "Integrated Security= True"; c = new SqlConnection(str); if (Sessi...
0debug
What is the use of this line. i am new for lua programming char lua : code=55 local convert=string.char(4,1,0,0,0,0,math.floor(224 + (code/16)), code % 16) print(convert) here-string.character inside using (4,1,0,0,0,0,0) what is purpose this using. anyone have to answer please help me.
0debug
Write sql query to Entity Framwork : select * from [InterViewerComment] where commentID in( select max(commentID) as commentID from [InterViewerComment] where jobID=45 group by qenID) This Query is correct in SQl but i want to re write it in EntityFramwork basically i want latest comment for each qenID based...
0debug
Laravel environment variables leaking between applications when they call each other through GuzzleHttp : <p>I have two Laravel 5.2 applications (lets call them A and B) on my local machine, both configured on two different virtualhosts on my local Apache 2.4 development server.</p> <p>Both applications sometimes are ...
0debug
static av_cold int xma_decode_init(AVCodecContext *avctx) { XMADecodeCtx *s = avctx->priv_data; int i, ret; for (i = 0; i < avctx->channels / 2; i++) { ret = decode_init(&s->xma[i], avctx); s->frames[i] = av_frame_alloc(); if (!s->frames[i]) return AVERROR(ENOME...
1threat
Android weird test sharding : <p>I'm experimenting with test sharding on Android and I'm getting pretty weird results:</p> <pre><code>+ adb -s emulator-5580 shell am instrument -e numShards 2 -e shardIndex 0 -e class com.package.etc.automation.Tests.SanityTest.SanityTest -w com.package.etc.test/android.support.test.ru...
0debug
Angular 2 Http testing multiple connections : <p>Can anyone help me with testing Http requests in Angular 2. I have a service that gets a stream from two http requests. How do I mock this behaviour in my test?</p> <pre><code>loadData() { return Observable.forkJoin( this.http.get('file1.json').map((res:Resp...
0debug
static void do_commit(int argc, const char **argv) { int i; for (i = 0; i < MAX_DISKS; i++) { if (bs_table[i]) bdrv_commit(bs_table[i]); } }
1threat
static void vfio_platform_realize(DeviceState *dev, Error **errp) { VFIOPlatformDevice *vdev = VFIO_PLATFORM_DEVICE(dev); SysBusDevice *sbdev = SYS_BUS_DEVICE(dev); VFIODevice *vbasedev = &vdev->vbasedev; VFIOINTp *intp; int i, ret; vbasedev->type = VFIO_DEVICE_TYPE_PLATFORM; vbase...
1threat
How to fix a While Loop only running once : Im trying to calculate how long until India surpasses China in population, my while loop only executes the first iteration though. I have tried setting a while loop to execute within the loop itself and it just became an infinite loop instead,i have tried indenting print w...
0debug
How do i query mysql database using where like or like in array? : <p>How do i query mysql database using where like (array) or like (array)? </p>
0debug
Its showing some error .. How to correct this query? : My problem is when I run this query , its showing some error like Warning: mysqli::query(): (21000/1242): Subquery returns more than 1 row Help me to correct this query. Thank You in advance "SELECT a.sname,a.date,a.Roll_Number,b.branch, COUNT(DI...
0debug
Vector Drawable in the circle : <p>is there an easy way to generate Vector Drawable that is a circle with the icon inside from the existing vector drawable?</p> <p>Example: <a href="https://i.stack.imgur.com/X73Vn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/X73Vn.png" alt="existing vector drawable"></a><...
0debug
static void vmdk_refresh_limits(BlockDriverState *bs, Error **errp) { BDRVVmdkState *s = bs->opaque; int i; for (i = 0; i < s->num_extents; i++) { if (!s->extents[i].flat) { bs->bl.write_zeroes_alignment = MAX(bs->bl.write_zeroes_alignment, s...
1threat
I need it to run in a way that it wont need any spaces. : I need this program to be able to run without requiring any spaces between each character. As of right not, this code will calculate the expressions if there is a space in between every character entered, I need it to run so that it will run without or with spac...
0debug
static int nvme_init(PCIDevice *pci_dev) { NvmeCtrl *n = NVME(pci_dev); NvmeIdCtrl *id = &n->id_ctrl; int i; int64_t bs_size; uint8_t *pci_conf; if (!(n->conf.bs)) { return -1; } bs_size = bdrv_getlength(n->conf.bs); if (bs_size < 0) { return -1; ...
1threat
Hello, please help in fixing error related to combintion of IF and choose function below : I have used used choose function to extract data from 4 diff sheets =CHOOSE($H$3,sheet1!A2,sheet2!A2,sheet3!A2,sheet4!A2). Now, I want to use "IF" function with CHOOSE to replace the false results with "". But it's not working, p...
0debug
Unused parameters passed to Capybara::Queries::SelectorQuery : <p>I have spec like this:</p> <pre><code> it 'contains Delete link' do expect(page).to have_link('Delete', admin_disease_path(disease)) end </code></pre> <p>when I run specs it returns warning in the console:</p> <pre><code>Unused parameters passe...
0debug
void virtio_scsi_dataplane_start(VirtIOSCSI *s) { int i; int rc; BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(s))); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s); if (s->dataplane_started || s->dataplane_starting || s->...
1threat
static uint64_t coroutine_fn mirror_iteration(MirrorBlockJob *s) { BlockDriverState *source = s->common.bs; int nb_sectors, sectors_per_chunk, nb_chunks; int64_t end, sector_num, next_chunk, next_sector, hbitmap_next_sector; uint64_t delay_ns = 0; MirrorOp *op; s->sector_num = hbitmap_i...
1threat
Problemns with return the json : **Hi, everyone, i have a funtion in json and this function i call controller passing the parameter the type string, and in this function I enter into the database and retrieve the desired information , so that´s okay. however my result dont show in this view. returning a error and not a...
0debug
static int rtmp_packet_read_one_chunk(URLContext *h, RTMPPacket *p, int chunk_size, RTMPPacket **prev_pkt_ptr, int *nb_prev_pkt, uint8_t hdr) { uint8_t buf[16]; int channel_id, timestamp, size; uint32_t ts_field; uint3...
1threat
How Convert packages to units : <p>I have a question, I'm programming in Java if I have a decimal "3.02" (this is equivalent to 3 packages (1 package = 10 units) and 2 units) and want to convert to "32" (this is equivalent to 32 units ). Does anyone know how to do it? There is a feature that allows java?</p>
0debug
How to get only all HTML tags to list from string using javascript or jquery? : <p>How to get list with only all HTML tags from string? We can use javascript, jquery or any C# library or api. We have one big string:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; qwe &lt;button type="button"&gt;Cli...
0debug
Copy a directory when logged in via ssh to my desktop via terminal : <p>How can I copy a directory to my local desktop from a remote machine ? I accessing the remote machine via ssh in the terminal.</p>
0debug
static void add_to_pool(BufferPoolEntry *buf) { AVBufferPool *pool; BufferPoolEntry *cur, *end = buf; if (!buf) return; pool = buf->pool; while (end->next) end = end->next; while ((cur = avpriv_atomic_ptr_cas((void * volatile *)&pool->pool, NULL, buf))) { ...
1threat
Java subclass methods are not overriding despite explicit use of @Override : <p>I am trying to make an abstract algorithm class for informed search with different heuristics. My idea was to have different subclasses overwrite the default heuristic() method, but the dynamic binding seems not to be working when I call th...
0debug
How to improve camera quality in ARKit : <p>I am building an ARKit app where we want to be able to take a photo of the scene. I am finding the image quality of the ARCamera view is not good enough to take photos with on an iPad Pro.</p> <p><strong>Standard camera image:</strong> <a href="https://i.stack.imgur.com/hNzE...
0debug
Commenting on Python : I am a student taking my first Python class and am using Anaconda & Jupyter for Python 3. I have read up on commenting and understand they begin with a hash mark ( # ) and whitespace character and continue to the end of the line. It is my understanding that they should not affect the execution of...
0debug
static int open_self_maps(void *cpu_env, int fd) { #if defined(TARGET_ARM) || defined(TARGET_M68K) || defined(TARGET_UNICORE32) CPUState *cpu = ENV_GET_CPU((CPUArchState *)cpu_env); TaskState *ts = cpu->opaque; #endif FILE *fp; char *line = NULL; size_t len = 0; ssize_t read; fp ...
1threat
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int linesize_align[AV_NUM_DATA_POINTERS]) { int i; int w_align= 1; int h_align= 1; switch(s->pix_fmt){ case PIX_FMT_YUV420P: case PIX_FMT_YUYV422: case PIX_FMT_UYVY422: c...
1threat
Docker + Virtual Box = VT-x is not available (VERR_VMX_NO_VMX) : <p>I installed docker. During installation, it complained that you can't have two virtualization environments, and that it would make docker the primary one. I said: "OK."</p> <p>Now, I need to go back to enabling virtualbox. I uninstalled Docker, hoping...
0debug
static double lfo_get_value(SimpleLFO *lfo) { double phs = FFMIN(100, lfo->phase / FFMIN(1.99, FFMAX(0.01, lfo->pwidth)) + lfo->offset); double val; if (phs > 1) phs = fmod(phs, 1.); switch (lfo->mode) { case SINE: val = sin(phs * 2 * M_PI); break; case TRIA...
1threat
What is the best option here to manage DAO layer in ASP.net based project? : <p>Moved from Java based Sites to ASP.net. What is the best option here to manage DAO layer here. </p>
0debug
query = 'SELECT * FROM customers WHERE email = ' + email_input
1threat
Pack multiple assemblies with dotnet pack : <p>Just as the question says really, how can I pack multiple projects / assemblies using dotnet pack?</p> <p>Using VS2017 with new csproj files.</p>
0debug
static int encode_init(AVCodecContext * avctx){ WMACodecContext *s = avctx->priv_data; int i, flags1, flags2; uint8_t *extradata; s->avctx = avctx; if(avctx->channels > MAX_CHANNELS) { av_log(avctx, AV_LOG_ERROR, "too many channels: got %i, need %i or fewer", avctx-...
1threat
float32 HELPER(ucf64_negs)(float32 a) { return float32_chs(a); }
1threat
Markdown: How to reference an item in a numbered list, by number (like LaTeX's \ref / \label)? : <p>Is there any way in markdown to do the equivalent of the cross-referencing in this LaTeX snippet? (Taken from <a href="http://texblog.org/2012/03/21/cross-referencing-list-items/" rel="noreferrer">here</a>.)</p> <pre><...
0debug
Disable zoom in WKWebView? : <p>Does anyone know a nice simple way to disable double-click and pinch zooming in a WKWebView? Nothing I've tried works:</p> <pre><code>Webview.scrollView.allowsMagnification = false; // Error: value of type WKWebView has no member allowsMagnification Webview.scrollView.isMultipleTouc...
0debug
IntelliJ: “Output exceeds cutoff limit” in scala worksheet : <p>How can I grow the number of output lines in IntelliJ, such that I do not receive any more this message in Scala worksheet:</p> <pre><code>Output exceeds cutoff limit. </code></pre> <p><a href="https://i.stack.imgur.com/BvOzb.png" rel="noreferrer"><img s...
0debug
kotlin-android-extensions in ViewHolder : <pre><code>class MyViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { fun bindata(text: SingleText){ itemView.title.text = text.title itemView.desc.text = text.desc } } </code></pre> <p>like this code, Kotlin has any cache i...
0debug
Infinite loop while traversing through linked list : <p>Deleting and viewing entire queue causes the problem- I'm assuming it is an infinite loop case for traversing. It works perfectly fine for adding the element but execution stops right after 2 or 3 are selected by the user.</p> <p>I'm just adding some lines of ran...
0debug
Vector comparison in C++ without set_intersection or set_difference : <p>just a novice learning C++. It's a great language with a steep learning curve and I am climbing that mountain. </p> <p>Currently, I want to compare two vector, the first vector already has predefined elements, while the other vector's elements ar...
0debug
How does the "Or" operator work? (In C++) : <pre><code>#include "stdafx.h" #include &lt;iostream&gt; int x = 0; int main(){ std::cin &gt;&gt; x; if (x == 5 || 6) { std::cout &lt;&lt; "5 or 6\n"; } else { std::cout &lt;&lt; "Not 5 or 6\n"; } return 0; } </code></pre> <p>This simple code only returns "5 or 6" to ...
0debug
for loop with table wchich return 12 values(month) php : I write this code when i try to return 12 numbers from 1 to 12: public function getMonths() { for($monthNum = 1; $monthNum <= 12; $monthNum++) { $month[$monthNum]=$monthNum; } return [$month];...
0debug
def min_Jumps(a, b, d): temp = a a = min(a, b) b = max(temp, b) if (d >= b): return (d + b - 1) / b if (d == 0): return 0 if (d == a): return 1 else: return 2
0debug
Is there a way to check if an element is enabled only after let's say 30 seconds : I have a link in my application which gets enabled after 30 seconds. I have to verify this scenario using selenium , that the link only gets enabled after 30 seconds not before that. I have used fluent wait but it didn't work.
0debug
how to count alphabetic characters in a string : ok so im kinda new to php and still learning and i can't figure out how to do this: $string = "this is a test sentence"; so what i wanted to do was search for alphabetic characters in that sting and show how many of each character is in there something like this --...
0debug
static int qxl_init_secondary(PCIDevice *dev) { static int device_id = 1; PCIQXLDevice *qxl = DO_UPCAST(PCIQXLDevice, pci, dev); ram_addr_t ram_size = msb_mask(qxl->vga.vram_size * 2 - 1); qxl->id = device_id++; if (ram_size < 16 * 1024 * 1024) { ram_size = 16 * 1024 * 1024; ...
1threat
14/9 PL/SQL: Statement ignored 14/13 PLS-00222: no function with name 'P' exists in this scope : Package Specification :- `CREATE OR REPLACE PACKAGE dt_pkg IS PROCEDURE Simpleint(p NUMBER,n number,r number := 10); PROCEDURE Compoundint( p number,n number, r number); END dt_pkg; /` Package BODY:- ...
0debug
static int kvm_s390_supports_mem_limit(KVMState *s) { struct kvm_device_attr attr = { .group = KVM_S390_VM_MEM_CTRL, .attr = KVM_S390_VM_MEM_LIMIT_SIZE, }; return (kvm_vm_ioctl(s, KVM_HAS_DEVICE_ATTR, &attr) == 0); }
1threat
Query on non-key attribute : <p>It appears that dynamodb's <code>query</code> method must include the partition key as part of the filter. How can a query be performed if you do not know the partition key?</p> <p>For example, you have a User table with the attribute <code>userid</code> set as the partition key. Now we...
0debug
static int xsub_encode(AVCodecContext *avctx, unsigned char *buf, int bufsize, void *data) { AVSubtitle *h = data; uint64_t startTime = h->pts / 1000; uint64_t endTime = startTime + h->end_display_time - h->start_display_time; int start_tc[4], end_tc[4]; uint8_t *hdr =...
1threat
Msg 195, Level 15, State 10, Line 2 'CONCAT' is not a recognized built-in function name : SELECT CONCAT(CCYYMM,RIGHT(C.AMT001,2)) ACCDAT ,CSTCOD ,PRPCOD ,C.RevenueAmount ,D.RevenueAllowance ,OUTLET ,AMTYTD ,ALWYTD ...
0debug
static int smvjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const AVPixFmtDescriptor *desc; SMVJpegDecodeContext *s = avctx->priv_data; AVFrame* mjpeg_data = s->picture[0]; int i, cur_frame = 0, ret = 0; cur_frame = avpkt->pts % s...
1threat
How to add code in variable in bat file? : I have written bat file to get path from system variable using %JAVA_HOME% and assigned it into one variable, now how to use as set path, because in set path its asking me this path between "" code, which i am not able to add in. Please help me to add it, how ?
0debug
This isnt working. it isnt actually accepting that this is actually entered... when i enter manually it works.selenium python : im trying to get this code to work, but it isnt. i enter manually and it works but not when i automate it import selenium import time import os from selenium import w...
0debug
How to reduce git repository size : <p>Earlier I pushed some big files to git branch which increased the repository size. Later I removed those redundant files from that branch using,</p> <pre class="lang-sh prettyprint-override"><code>git rm big_file git commit -m 'rm bg file' git push origin branch-name </code></pre...
0debug
static void qtest_process_command(CharDriverState *chr, gchar **words) { const gchar *command; g_assert(words); command = words[0]; if (qtest_log_fp) { qemu_timeval tv; int i; qtest_get_time(&tv); fprintf(qtest_log_fp, "[R +" FMT_timeval "]", ...
1threat
PCIDevice *pci_try_create_multifunction(PCIBus *bus, int devfn, bool multifunction, const char *name) { DeviceState *dev; dev = qdev_try_create(&bus->qbus, name); if (!dev) { return NULL; } qdev_prop_s...
1threat
What is the signature of method which gets four double numbers and returns a double array? : <p>I'm a bloody Java beginner and need some help.</p> <p>I was wondering what the signature of a public method called "feld" looks like which gets four double numbers and returns a double array.</p> <p>My exercise says "retur...
0debug
sum of list elements of specific index of list : I want to find the sum of elements of the list of index 2, index3 and index3,index4 and index4,index5 on so on like:- list=[7,5,9,4,7,11] aspSum=[12,14,13,11,18] ## 7+5, 5+9, 9+4, 4+7, 7+11 please help me. I am new user of stackOverFlow,
0debug
static void set_stream_info_from_input_stream(AVStream *st, struct playlist *pls, AVStream *ist) { avcodec_parameters_copy(st->codecpar, ist->codecpar); if (pls->is_id3_timestamped) avpriv_set_pts_info(st, 33, 1, MPEG_TIME_BASE); else avpriv_set_pts_info(st, ist->pts_wrap_bits, ist-...
1threat
static void visitor_reset(TestOutputVisitorData *data) { visitor_output_teardown(data, NULL); visitor_output_setup(data, NULL); }
1threat
Uploading a file to a S3 bucket with a prefix using Boto3 : <p>I am attempting to upload a file into a S3 bucket, but I don't have access to the root level of the bucket and I need to upload it to a certain prefix instead. The following code:</p> <pre><code>import boto3 s3 = boto3.resource('s3') open('/tmp/hello.txt',...
0debug
Creating a chrome extension that allow you see a HTML in all tabs : I was think in a project to study how Google Extensions works, what is my idea? I want to create a HTML that works in all tabs in the same moment. Example: I'm in the first tab of Chrome and will have a button in html element when I press the bu...
0debug
I want to know whether there is a default functionality for updating a django template from the server side based on an event : <p>I am a beginner django developer. I am supposed to make an auction website. I have to update the template which shows the listing of the items and bids and I will have to update the templat...
0debug
Time schedule algorithm : <p>I have been trying for some time solve a scheduling problem for an App that I used to work at. This problem is as follows...</p> <p>First time the list gets populated:</p> <ul> <li>will look at all contacts that a user has made “Active” in the Contacts list.</li> <li>For each, it should l...
0debug
Regex for to validate only US and India retail number : I am trying to get a regex which serves belwo Requirements. 1) validates US,India Retail phone no 2) exclude special purpose/Business purpose phone nos in both countries. i.e. starting from 800, 888, 877, and 866,900,at least 10 digits for US, there can be mor...
0debug
static int upload_texture(SDL_Texture *tex, AVFrame *frame, struct SwsContext **img_convert_ctx) { int ret = 0; switch (frame->format) { case AV_PIX_FMT_YUV420P: ret = SDL_UpdateYUVTexture(tex, NULL, frame->data[0], frame->linesize[0], f...
1threat
MongoDB query $in with regex array of element : <p>Ok i am trying to implement a query, which is trying to perform regex search ( which contains an array list ) on a bunch of document</p> <p>Its hard for me to explain...so I am basically coming to direct point.</p> <p>There is query which works with regex array...</p...
0debug
static int decode_hextile(VmncContext *c, uint8_t* dst, uint8_t* src, int w, int h, int stride) { int i, j, k; int bg = 0, fg = 0, rects, color, flags, xy, wh; const int bpp = c->bpp2; uint8_t *dst2; int bw = 16, bh = 16; uint8_t *ssrc=src; for(j = 0; j < h; j += 16) { dst...
1threat
react-intl vs react-i18next for ReactJS internationalization (i18n) : <p>I need to build a multilanguage application using ReactJS. The application needs a custom dictionary for different languages as well as automatic formatting of date/time, numbers and currency.</p> <p>From all I´ve seen there are 2 very popular li...
0debug
!= operator condition usage in c# : <p>I know that in C++ you can do this kind of declarations:</p> <pre><code>size = 8 * (x % 8 != 0); </code></pre> <p>What would be the equivalent in C#? Do I have to use an "if"? Thanks for the help!</p>
0debug
Move a player in the direction it is facing? Using transform matrix : <p>I have two characters in 3d space. I want the enemy to move towards the player. I've just finished making a function which takes the transform of two objects, and returns a matrix, which I then apply to my enemy (overwrite the position part), and...
0debug
why is the output contains 4 time 0's? : <p>why is the output contains 4 time 0's.The main call again and again until if condition become false and then it should be exit from if block.</p> <pre><code>#include &lt;stdio.h&gt; int main() { static int i=5; if(--i) { ...
0debug
Excluding Ip Address With custom Html : I have a custom landing page i would like to use for my website. Everyone who visit my website is redirected to For2dayprinting/for2day.html. How ever when I'm Editing my Wordpress i am also redirected to the landing page is there a plugin or code any one could recommend for me t...
0debug
I can't figure out what's wrong with my Java code : <p>I am making a currency converter app which converts CAD to Pounds. It gives me a error:</p> <pre><code>Error:(16, 41) error: class expected Error:(16, 57) error: ';' expected Error:(16, 96) error: ';' expected </code></pre> <p>I can't find anything. </p> <p>Here...
0debug
Need to fetch the password using Regular expression : <pre><code>a= &lt;&lt;EOF Password : 7UV1ceFQ (You will be asked to change this after logging in for the first time) EOF </code></pre> <p>I need to extract the value "7UV1ceFQ" using regular expression, I have tried using '/Password : 7UV1ceFQ/ but it's no...
0debug
Rename columns in postgres : <p>I am running next postgres command in cmd to rename column, but getting next error: </p> <pre><code>postgres=&gt; ALERT TABLE tableName RENAME "colum1" TO "column2"; ERROR: syntax error at or near "ALERT" LINE 1: ALERT TABLE tableName RENAME "colum1" TO "co... </code></pre>
0debug
how to solve the ` Component should be written as a pure function ` error in eslint-react? : <pre><code>class Option extends React.Component { constructor(props) { super(props); this.handleClickOption = this.handleClickOption.bind(this); } handleClickOption() { // some code } render() { return...
0debug
static void setup_rt_frame(int sig, struct target_sigaction *ka, target_siginfo_t *info, target_sigset_t *set, CPUX86State *env) { abi_ulong frame_addr, addr; struct rt_sigframe *frame; int i, err = 0; frame_addr = get_sigframe(ka, env, sizeof(*frame)); if (!lock...
1threat
static void exynos4210_rtc_write(void *opaque, target_phys_addr_t offset, uint64_t value, unsigned size) { Exynos4210RTCState *s = (Exynos4210RTCState *)opaque; switch (offset) { case INTP: if (value & INTP_ALM_ENABLE) { qemu_irq_lower(s->alm_irq); s->reg_in...
1threat
prototype does not match function definition, but it does : <p>I have a program with 2 functions, one of them counts number of words in a file, and works perfectly, and the other one counts the number of tymes a specific word appears in file. This las function does work perfectly (i have tested it isolated from the mai...
0debug
Sorted() in lambda's not working as intended - Java 8 : <p>While learning lambda's, I found sorted method is not working as intended.</p> <p>The following program is giving <code>[1, 33, 2, 4, 5, 11]</code> as an output, however I am expecting a sorted output.</p> <p>Strange thing is when I replace the <code>[33, 2,...
0debug
Why isn't this "if statement" working? : <p>I have built a weather app that works perfectly. I decided to add in icons that change with the weather id variable from an API which has been assigned. It works for the first id in the if statement, but when I add else if statements inside it don't work for the else if parts...
0debug
syntax of join in sql : <p>i want to know the syntax of joins in sql so please help regarding this</p> <p>thanks</p>
0debug
how to get selected values to jquery? : <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-html --> foreach($data as $row) { $output .= ' <tr> <td class="col-xs-3">'.$row->policyno.'</td> <td class="col-xs-3">'.$row->q_tree.'</t...
0debug
How does vector's growth function work? : <pre><code>int main () { std::vector &lt;int&gt; elements; elements.push_back (1); elements [10000] = 102; std:: cout &lt;&lt; elements [10000]; return 0; } </code></pre> <p>How does the above code work? As far as I have read, vector's growth will be 1.5 - ...
0debug
static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap) { AVIOContext *pb = s->pb; DXAContext *c = s->priv_data; AVStream *st, *ast; uint32_t tag; int32_t fps; int w, h; int num, den; int flags; tag = avio_rl32(pb); if (tag != MKTAG('D', 'E', 'X', 'A')...
1threat
The way to use background-image in css files with Django : <p>I'd like to use an image file as a background-image on <code>Django</code>. But I do not know how. First, I read <a href="https://docs.djangoproject.com/en/1.10/intro/tutorial06/" rel="noreferrer">this</a> and tried to write like following this in a css file...
0debug
static int bmp_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; BMPContext *s = avctx->priv_data; AVFrame *picture = data; AVFrame *p = &s->...
1threat
Why is the Visual Studio C++ Compiler rejecting an enum as a template parameter? : <p>I'm using the Microsoft Visual Studio 2019 compiler (cl.exe), and it is rejecting some code accepted by both Clang and GCC, related to using enums as template parameters, where the templates are specialized for particular enum values....
0debug
Why my regex doesn't match : it's the first time i use regex. I used .Net regex tester...all is ok....but in my C# application, IsMatch return false. Here is my code : Regex reg = new Regex(@"^[0 - 9]{ 3}_RE_[0 - 9]{ 4}[0-9]{2}[0-9]{2}_[0 - 9]{2}[0-9]{2}[0-9]{2}.TXT$"); string fileName = "102_RE_201201...
0debug
GoLang Int24 to Int32 : <p>Hi guys i wrote this function in GoLang to cast a 24 bit int (3 bytes) to a 32 bit int (4 bytes)</p> <pre><code>func int24ToInt32(bytes []byte) uint32 { return binary.BigEndian.Uint32(append([]byte{0x00}, bytes...)) } </code></pre> <p>I want to know if this is a bad solution to the prob...
0debug
Where gcc come from when using lunux terminal? : I'm a beginner of linux, and I don't know the commands details now. I have a question about where I can get some packages from. For example, when I want to get "gcc", I entered "yum install gcc". Where it comes from Internet Web? or linux has it from the beginning? I was...
0debug
How to Use PHP headers() in Wordpress to Download Files from my Custom Plugin Page? : <!-- What are you trying to accomplish? (Please include sample data.) --> I am Trying to Use **PHP headers() in wordpress to download files from my plugin page view** but is not working as this Error Message return for each header li...
0debug
How to pick a Kafka transaction.id : <p>I wonder could I get some help understanding transactions in Kafka and in particular how I use transaction.id. Here's the context:</p> <ol> <li>My Kafka application follows the pattern: consume message from input topic, process, publish to output topic. </li> <li>I am using not ...
0debug