problem
stringlengths
26
131k
labels
class label
2 classes
static void setup_frame(int sig, struct emulated_sigaction * ka, target_sigset_t *set, CPUState *regs) { struct sigframe *frame; abi_ulong frame_addr; int i; frame_addr = get_sigframe(ka, regs, sizeof(*frame)); if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0...
1threat
Android Studio - Assigning multiple value to ManifestPlaceholders in Gradle : <p>I have two environment of my project one <strong>Prod</strong> another one is <strong>Staging</strong>. So whenever I have to build any of the environment, I have to change multiple keys like map key, label name and other things in manifes...
0debug
static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int size, UID uid, int64_t klv_offset) { MXFDescriptor *descriptor = arg; descriptor->pix_fmt = AV_PIX_FMT_NONE; switch(tag) { case 0x3F01: descriptor->sub_descriptors_count = avio_rb32(pb); if (descriptor...
1threat
Do I need bcsymbolmap files created by Carthage : <p>I am using Carthage dependency manager in my iOS project. I have the <code>Carthage/build</code> folder in my repository to always have ready to go built frameworks when checking out the repo.</p> <p>I am wondering what the <code>bcsymbolmap</code> files in the buil...
0debug
Flexbox -how to get first child 50% widht and 100% height while stacking remaining children? : <p>I can't do much with the markup, if I could I'd just add 2 containers side by side. Basically it is a UL that looks like this:</p> <pre><code>&lt;ul&gt; &lt;li&gt;one&lt;/li&gt; &lt;li&gt;two&lt;/li&gt; &lt;li&gt...
0debug
static void define_debug_regs(ARMCPU *cpu) { int i; define_arm_cp_regs(cpu, debug_cp_reginfo); if (arm_feature(&cpu->env, ARM_FEATURE_LPAE)) { define_arm_cp_regs(cpu, debug_lpae_cp_reginfo); } for (i = 0; i < 16; i++) { ARMCPRegInfo dbgregs[] = { ...
1threat
How can dynamically generate some values in php? : <p>I want to store these values in an array</p> <pre><code>$hours = array("06:00", "06:15", "06:30"....etc ); </code></pre> <p>The last value is <code>23:45</code> </p> <p>I wish it to be stored in ascending order.</p> <p>My question is ... how I can automatically ...
0debug
golang string.ToLower not working : <p>I have a simple input string which I need to read and count the repeated words.</p> <p>But, while doing that I need to convert the string to lower case, but some how the func ToLower is not working.</p> <p>I have attached the golang link, Please, help me understand what can be t...
0debug
why can't I import geopandas? : <p>My only line of code is </p> <pre><code>import geopandas </code></pre> <p>and it gives me the error </p> <pre><code>OSError: Could not find libspatialindex_c library file </code></pre> <p>has anyone encountered this before? my script was working just fine until this error came up....
0debug
Live video streaming with HTML 5? : <p>I want to make <strong>live video streaming</strong>. For example there is discussion. And somebody is recording it. I want the video record to appear on my web page. I want to do this with <strong>HTML 5</strong>. I don't know if it's possible, but has anyone tried ? <strong><em>...
0debug
Java script and php code is not working : I have simple code wirh html, javascript and php. I am trying to pass variable from html to php through ajax. A text box appears on screen with button . user inputs in the text field and clicks the button. field text should appear beloe the field then. But in my case nothin...
0debug
Dinamic memory leak c++ : bool CPythonNonPlayer::LoadNonPlayerData(const char *c_szFileName) { DWORD dwElements; TMobTable *pTable = (TMobTable *) zObj.GetBuffer(); for(DWORD i = 0; i < dwElements; ++i, ++pTable) { TMobTable *pNonPlayerData = new TMobTable; mem...
0debug
static void unimp_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); dc->realize = unimp_realize; dc->props = unimp_properties; }
1threat
How to completely delete a commit from GitHub? : <p>On GitHub, I forked a repositary and cloned on my PC. Then, for testing purpose, I edited a file, made a commit and pushed it to GitHub. But now I would like to completely delete this commit.</p> <p>I did the following:</p> <pre><code>git reset --hard &lt;sha1_of_pr...
0debug
static int read_block_types(AVCodecContext *avctx, GetBitContext *gb, Bundle *b) { int t, v; int last = 0; const uint8_t *dec_end; CHECK_READ_VAL(gb, b, t); dec_end = b->cur_dec + t; if (dec_end > b->data_end) { av_log(avctx, AV_LOG_ERROR, "Too many block type values\n"); ...
1threat
int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { IVI45DecContext *ctx = avctx->priv_data; const uint8_t *buf = avpkt->data; AVFrame *frame = data; int buf_size = avpkt->size; int result, p, b;...
1threat
void qmp_blockdev_change_medium(bool has_device, const char *device, bool has_id, const char *id, const char *filename, bool has_format, const char *format, bool has_read_only, ...
1threat
Can you save the data from the Visual Studio Diagnostic Tools Windows to review after application is done processing? : <p>When using Visual Studio 2015 Enterprise Edition, can you save the data that is accumulated in all the windows (Timeline, CPU Usage, Memory Usage, etc) of the Diagnostic Tools to review after the a...
0debug
C scanf ignored when invalid input : <p>I wrote this code, and all it meant to do is input ints until a negative is entered:</p> <pre><code>int result = 0, input_number = 0; while(input_number &gt;= 0){ printf("Please enter students IDs(negetive to stop)= "); result = scanf("%d", &amp;input_number); if(re...
0debug
Can I make the pytest doctest module ignore a file? : <p>We use pytest to test our project and have enabled <code>--doctest-modules</code> by default to collect all of our doctests from across the project.</p> <p>However there is one <code>wsgi.py</code> which may not be imported during test collection, but I cant get...
0debug
error TS2339: Property 'x' does not exist on type 'Y' : <p>I don't understand why this code generates TypeScript error. (It's not the original code and is a bit derived, so please ignore the non-sense in the example):</p> <pre class="lang-js prettyprint-override"><code>interface Images { [key:string]: string; } fun...
0debug
PHP Предупреждение: недопустимое смещение строки в Wordpress : There is a warning: Warning: Illegal string offset 'alt' in /home/procsi/galina3000.ru/wp-content/themes/memoir/epanel/custom_functions.php on line 112 Warning: Illegal string offset 'title' in /home/procsi/galina3000.ru/wp-content/themes/memoir/epanel/...
0debug
int ffurl_open(URLContext **puc, const char *filename, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options) { int ret = ffurl_alloc(puc, filename, flags, int_cb); if (ret < 0) return ret; if (options && (*puc)->prot->priv_data_class && (ret = av_opt_set_dic...
1threat
static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file) { int...
1threat
C++ Iterating through files in a directory: Is it bad practice? : <p>The question has been asked many times here: "How do I iterate through files in a directory in c++?"</p> <p>I've seen the responses, typically suggesting to use an external library (usually boost filesystem) to handle this and the OS differences in i...
0debug
Setting the Color of a TextView Drawable : <p>Im trying to change the color of a TextView Drawable in Xamarin.</p> <p>In Java you can do it like this:</p> <pre><code>@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView txt = (TextView) findViewById(R.id....
0debug
Importing html files with es6 template string loader : <p>I want to import my templates into my js with <a href="https://www.npmjs.com/package/es6-template-string-loader" rel="noreferrer">es6 template string loader</a>. The only difference in my case is that I don't want to include css, only html. My code is as follows...
0debug
About a book application program in Java using linked list : This is book Application code. I am making a code in which the program shows some options like insert Book, delete Book etc. Program asks us to enter certain details about a book by Insert method. Once I enter details it goes back and show the options again. ...
0debug
How can I remove duplicated code between classes? : <p>I have 2 class: RecursiveFibonacci and MemorizedRecursiveFibonacci. This is what I have so far. </p> <p><strong>RecursiveFibonacci Class</strong></p> <pre><code>public class SimpleRecursiveFibonacci { public BigInteger fibonacci(int n) { if(n &lt; 2) { ...
0debug
Landing Page Redirect Based on Location Choice (Cookies?) : <p>Before someone gets upset that I haven't included code, please understand that it is because I am not sure what the best practice would be.</p> <p>I have a site that operates in 3 cities specifically, and also a nation-wide version. This is an eCommerce si...
0debug
solve recurrence relation in which there is a separate relation for even and odd values : [enter image description here][1] [1]: https://i.stack.imgur.com/wjjWw.png Can someone help me how to solve these type of questions? What kind of approach should I follow?
0debug
def power(a,b): if b==0: return 1 elif a==0: return 0 elif b==1: return a else: return a*power(a,b-1)
0debug
When nodeType() used in object behaves different in jQuery versions '1.11.2' and '3.1.1' : <p>I am eager to know why the jQuery versions '1.11.2' and '3.1.1' behaves in two different ways while using nodeType() function in jQuery object.</p> <p>To illustrate this, I have two fiddle links for these two versions. ...
0debug
What is the best augmented reality SDK that supports Android to use for monuments detection and recognition in a museum? : <p>I'm new to AR and there seems to be many SDKs for Android and I don't which is best to use and which ones to avoid.</p>
0debug
Simple code help needed for " http://12.13.14.15/table1.php?Name=Billy&Number=6 " : I am in need of some help, please? I can successfully do a MySQL query using: IP_Address/fund_list.php?Id_Number=555666 $ID = $_GET['Id_Number']; $sql = "SELECT * FROM fund_list WHERE Number = ".$ID; --------------------------...
0debug
static int tta_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; TTAContext *s = avctx->priv_data; int i, ret; int cur_chan = 0, framelen = s->frame_length; int3...
1threat
In robot framework how to create object of class and call the methods in corresponding class? : this is code snippet. *** Settings *** Documentation A resource file with reusable keywords and variables. ... Use keywords in this file in testcases directory. Library /home/k...
0debug
Convert html/css file to pdf file : <p>I just designed CV with html/css. Is there a way to convert my CV to pdf ? Or can you recommend me to write a CV by any tool? please help me !</p>
0debug
VueJS - Object Props validation : <p>In VueJS, how can I validate Object type props in order to ensure that the object has some specific fields defined?</p> <p>For example, i want to ensure that the user prop will have the fields 'name', 'birthDate', and so on.</p> <p>Thanks in advance.</p>
0debug
how to use play/pause in one button on ionic3 : <p>I Developing a New mobile Musical app in ionic3</p> <p>Now In my Project, I Have a Two buttons </p> <p>1.<code>play</code>button</p> <p>2.<code>pause</code> button</p> <p>Here I need some help</p> <p>When user click <code>play</code> button then <code>play</code>b...
0debug
static int qemu_signal_init(void) { int sigfd; sigset_t set; #ifdef CONFIG_IOTHREAD sigemptyset(&set); sigaddset(&set, SIGUSR2); pthread_sigmask(SIG_UNBLOCK, &set, NULL); sigemptyset(&set); sigaddset(&set, SIG_IPI); pthread_sigmask(SIG_BLOCK, &set, NULL)...
1threat
Sublime Text 3 - Limit images to viewsize : <p>I'm working on a Sublime Text 3 plugin, which displays images in a view. Those images are created by an jupyter kernel, therefore the size of the images depend on the code producing them. Since I create really big images, they are to big to fit in the view.</p> <p>I would...
0debug
int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* frame) { V4L2Buffer* avbuf = NULL; avbuf = v4l2_dequeue_v4l2buf(ctx, ctx_to_m2mctx(ctx)->draining ? 200 : -1); if (!avbuf) { if (ctx->done) return AVERROR_EOF; return AVERROR(EAGAIN); }...
1threat
Protractor: Support for the Firefox >=48 : For quite sometime now I have been trying to run protractor with Firefox(Windows) v48 and above to run my AngularJS application. However, as per [protractor docs][1] > WebDriver support fr Firefox has changed recently, and FireFox version > 48 does not work properly wit...
0debug
Visual Studio 2017 References vs Dependencies : <p>I have a .NET Core solution in visual studio 2017 that is building against the .NET 4.7 framework. </p> <p>In the main web application there is a dependencies menu that breaks down references into logical categories (Analyzers, Assemblies, NuGet, Projects).</p> <p><a...
0debug
I am using r code to extract the statistics of some youtube channels. I am using the package tuber and specifically get_all_video_stats : I am using r code to extract the statistics of some youtube channels. I am using the package tuber and specifically get_all_video_stats. My problem is that i only want the statis...
0debug
How to return from python function : <p>This is my first programming practice. I have a python function like this: </p> <pre><code>sum = 0 def summation(a,b): sum = a+b return sum </code></pre> <p>and when I call function as </p> <pre><code>summation(3,4) </code></pre> <p>It does not return anything. Why?</...
0debug
The average of a field in array of objects : <p>I have the following array of objects:</p> <pre><code>[ { items: { "1554038371930_ajhnms9ft" : { "mark" : 5 }, "1554038905938_le34li2cg" : { "mark" : 2 }, "15540391579...
0debug
static int read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { BinkDemuxContext *bink = s->priv_data; AVStream *vst = s->streams[0]; if (!s->pb->seekable) return -1; if (avio_seek(s->pb, vst->index_entries[0].pos, SEEK_SET) < 0) return -1; ...
1threat
static int rm_write_packet(AVFormatContext *s, AVPacket *pkt) { if (s->streams[pkt->stream_index]->codec.codec_type == CODEC_TYPE_AUDIO) return rm_write_audio(s, pkt->data, pkt->size); else return rm_write_video(s, pkt->data, pkt->size); }
1threat
void mips_cpu_do_interrupt(CPUState *cs) { #if !defined(CONFIG_USER_ONLY) MIPSCPU *cpu = MIPS_CPU(cs); CPUMIPSState *env = &cpu->env; bool update_badinstr = 0; target_ulong offset; int cause = -1; const char *name; if (qemu_loglevel_mask(CPU_LOG_INT) && cs->exception_inde...
1threat
Can anyone help me with my SQL statement? : I assigned the code below to an commandbutton. When i execute it, it returns an error(3061) CurrentDb.Execute "INSERT INTO tblVerlof(Aanmaakdatum, VerlofDatum, VerlofReden, Aantal, me.VerlofPoule, Notitie, Status)VALUES(now(), me.startdatum, 2, me.txturen, me.verlo...
0debug
Dagger 2 injection in non Activity Java class : <p>I am trying to use Dagger2 for DI, it works perfectly fine for Activity/Fragment related classes where there is a onCreate lifecycle event. Now I have a plain Java class which I want to be injected. Any ideas as to how to go about it would be appreciated. The code I ha...
0debug
static av_cold int libgsm_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->codec->decode){ if(!avctx->channels) avctx->channel...
1threat
static unsigned char get_ref_idx(AVFrame *frame) { FrameDecodeData *fdd; NVDECFrame *cf; if (!frame || !frame->private_ref) return 255; fdd = (FrameDecodeData*)frame->private_ref->data; cf = (NVDECFrame*)fdd->hwaccel_priv; return cf->idx; }
1threat
how to connect an android application to MySQL database? : <p>I am developing an android application,and I have create a MySQL database in my computer,and I want to know how can I get the information in android application from the database ?</p>
0debug
static void sd_set_ocr(SDState *sd) { sd->ocr = 0x80ffff00; }
1threat
In SQL How to convert time intoUNIX_timestamp : In hive there is some data I have. Now I want to convert the start_timestamp into unix_timestamp in second. How to do? Because the start_timestamp has two format. start_timestamp First format : 2018-03-22 02:54:35 , Second Format: May 15 2018 5:15PM Any help? Appr...
0debug
Empty constructor function : <p>In a code i've come across a class which had this function at the start: </p> <pre><code>private function __construct() { } </code></pre> <p>Why would there be an empty function at the top? Is there any purpose to this? Or does this depend on the rest of the code? If it does could...
0debug
Android Sudio - Basic Calculator - app shows unfortunately stopped : I am a newbie at android studio. Tried this code and builded and generated an unsigned apk. I tried in on Samsung galaxy trend GT-s7392 and Asus Zenfone 5, also tried in bluestacks. But when the app is opened , It shows - " Unfortunately Calculator ha...
0debug
SKStoreKitReviewController and Darkmode : <p>Is there any way to alter the colors/tint of an SKStoreKitReviewController? When I am modifying my apps to support DarkMode, when in dark mode, the presented viewController does not look good.</p> <p><a href="https://i.stack.imgur.com/iishh.png" rel="noreferrer"><img src="...
0debug
static gnutls_anon_server_credentials_t vnc_tls_initialize_anon_cred(void) { gnutls_anon_server_credentials_t anon_cred; int ret; if ((ret = gnutls_anon_allocate_server_credentials(&anon_cred)) < 0) { VNC_DEBUG("Cannot allocate credentials %s\n", gnutls_strerror(ret)); return NULL; ...
1threat
ggplot - grouped marplot for 2x2 table : Given a contingency table 2x2 with the counted numbers in cells, how can I get a grouped bar plot with stacked percentages? Here is an example code specie=c(rep("sorgho" , 1) , rep("poacee" , 1) ) condition=rep(c("normal" , "stress") ,1) value=abs(rnorm(4 , ...
0debug
int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, const AVPacket *avpkt) { AVCodecInternal *avci = avctx->internal; ...
1threat
Fetching size of object's list - Optional.get() without .ifPresent : <p>I have method that return <code>Optional</code> of Book object (do not mind with names as it is just a sample of code). I want to fetch the size of list which is inside Book class:</p> <pre><code>public class Book { Integer b; DateTime da...
0debug
static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s) { AVCodecContext *VideoCodec = s->streams[0]->codec; AVCodecContext *AudioCodec = s->streams[1]->codec; int AudioRate = AudioCodec->sample_rate; int FrameRate = ((VideoCodec->time_base.den) * (0x10000))/ (VideoCodec->time_bas...
1threat
two counts with differents status in one group in mysql? : > <i>SELECT services, COUNT( * ) AS Total_queue, COUNT( * ) AS balance_queue FROM tqueue WHERE STATUS IN ('8','4') and STATUS ('4') AND get_tiket BETWEEN '2016-11-10 00:00:01' AND '2016-11-10 23:59:59' GROUP BY services</i> but not working, if just 1...
0debug
static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width, int height) { const uint8_t *frame_end = frame + width * height; uint8_t *line_ptr; int count, i, v, lines, segments; lines = bytestream2_get_le16(gb); if (lines > height) return -1; while (lines--) { ...
1threat
Remove last value in an array elements : <?php $values = "aaa,bbb,ccc,ddd,";//Remove last comma $values = "aaa,bbb,,,";//Remove all commas before bbb like aaa,bbb ?> How to remove commas in this example
0debug
Value-initialization of class containing std::queue : <p>Here is a MCVE:</p> <pre><code>#include &lt;queue&gt; struct S { std::queue&lt;int&gt; q; int r; }; int main() { S s{}; } </code></pre> <p>With gcc 6.x <code>-std=c++14 -pedantic</code> I get warnings </p> <pre><code>&lt;source&gt;:11:9: warning:...
0debug
Java OpenCV from Maven : <p>Is there any way to get OpenCV from repository? Which artifact should I add to <code>pom.xml</code>? Every tutorial I'd found is from '14 and it seems like something changed - they say it is'nt in official Maven repository yet, but I've found entry:</p> <pre><code>&lt;!-- https://mvnreposit...
0debug
Get invalid value from input type number : <p>I am using input type number. How can I get the value from this when its not valid. For example using type number and printing just 'e' thats not valid by itself.</p> <p>I am using React but I think this question is very general. </p> <pre><code>onChange(event) { consol...
0debug
hello,a = np.array([[1,2],[3,4],[5,6]]).What is the difference between a[:,:-1] and a[:,-1]? : a = np.array([[1,2],[3,4],[5,6]]) How to understand the difference between a[:,:-1] and a[:,-1]? [enter image description here][1] [1]: https://i.stack.imgur.com/AiyI6.png
0debug
static inline int coeff_unpack_golomb(GetBitContext *gb, int qfactor, int qoffset) { int coeff = dirac_get_se_golomb(gb); const int sign = FFSIGN(coeff); if (coeff) coeff = sign*((sign * coeff * qfactor + qoffset) >> 2); return coeff; }
1threat
Mysterious Cipher appeared in my news feed : <p>SMK XKL JVWW JWDTDVQVW DWXCC WV GFY</p> <p>I have been trying to decipher this for past hours, but I am not anywhere close to finding the solution. I'd appreciate a clue or starting point, or perhaps a spoilery solution if anyone figures it out. This is seriously getting...
0debug
static int parse_pixel_format(AVCodecContext *avctx) { DDSContext *ctx = avctx->priv_data; GetByteContext *gbc = &ctx->gbc; char buf[32]; uint32_t flags, fourcc, gimp_tag; enum DDSDXGIFormat dxgi; int size, bpp, r, g, b, a; int alpha_exponent, ycocg_classic, ycocg_scaled, normal_map, array; ...
1threat
How do you output a String, integer, and double from an array? : <p>I am trying to print out names with their associated information. I want their age, salary, insurance, etc. I am trying to use a for loop to accomplish this, but I'm obviously missing something. I also don't want it to total the ages, I want it individ...
0debug
Python - ValueError: Cannot index with vector containing NA / NaN values : <p>I'm trying to get the average price of products containing any substrings from a wordlist from a dataframe. I've been able to do so with the following code on multiple spreadsheets - </p> <pre><code>dframe['Product'].fillna('', inplace=True)...
0debug
dataframe.describe() suppress scientific notation : <p>How do I suppress scientific notation output from dataframe.describe(): </p> <pre><code>contrib_df["AMNT"].describe() count 1.979680e+05 mean 5.915134e+02 std 1.379618e+04 min -1.750000e+05 25% 4.000000e+01 50% 1.000000e+02 75% 2.50...
0debug
static BlockStats *bdrv_query_stats(const BlockDriverState *bs, bool query_backing) { BlockStats *s; s = g_malloc0(sizeof(*s)); if (bdrv_get_device_name(bs)[0]) { s->has_device = true; s->device = g_strdup(bdrv_get_device_name(bs)); } if (bdrv_get_...
1threat
Change order of (sub-) strings in dataframe column based on white spaces : I have a dataframe with a column in python: ``` df columnA Apple Banana Orange Citron Pineapple ``` How can I reserve the order of the substrings based on the white spaces? The outcome should be: ``` columnA Banana Apple Pineapple Cit...
0debug
How to continue programm after first iteration with input : After the end of the first round of my program (Collatz function) i want my program to continue to calculate from the previous result I wrote a program with the possibility of one iteration, which starts from the input def collatz(number): if nu...
0debug
static int find_vdi_name(BDRVSheepdogState *s, char *filename, uint32_t snapid, char *tag, uint32_t *vid, int for_snapshot) { int ret, fd; SheepdogVdiReq hdr; SheepdogVdiRsp *rsp = (SheepdogVdiRsp *)&hdr; unsigned int wlen, rlen = 0; char buf[SD_MAX_VDI_LEN + SD_MAX_V...
1threat
If input says x and y then print : Hi I'm trying to get this example code to work: a = ("good ") b = ("morning") z = input("Hi: ") z if z == "hello": print("good day!") elif z == a and b: print("Good Night") else: print("nope") so I want it to print "Good ...
0debug
docker version number confusion: 17.06 vs 1.13? : <p>I am confused by the version number of <code>docker</code></p> <p>Some documentation refers to version numbers like <code>17.06</code> E.g. (from <a href="https://docs.docker.com/engine/admin/volumes/volumes/" rel="noreferrer">here</a>)</p> <blockquote> <p>Howev...
0debug
alert('Hello ' + user_input);
1threat
Regex match any character except given prefix : <p>I am looking for a regex pattern with can do as the title, it's mean with 3 given prefixs "#,@,+", the following character will be ignore until it is whitespace. Example:</p> <blockquote> <p>"+20 @facebook #hashtag with my love"</p> </blockquote> <p>will return</p>...
0debug
Toggle pages backgroundcolor in html/css : <p>On my HTML/CSS page I need to have a switch to toggle the background color and text color. (for example black theme to white theme). Is there any way to do this?</p>
0debug
How to play flv video on mobile web browsers? : <p>Is it possible to view .flv format video movies with standard android web browsers fromm my web page? I tried to watch using videojs, but get an error "no compatible source was found for this video". </p>
0debug
static void mips_cpu_realizefn(DeviceState *dev, Error **errp) { MIPSCPU *cpu = MIPS_CPU(dev); MIPSCPUClass *mcc = MIPS_CPU_GET_CLASS(dev); cpu_reset(CPU(cpu)); mcc->parent_realize(dev, errp); }
1threat
Is there a way to make .NET Core GetHashCode deterministic : <p>I just wasted few hours of debugging before realizing that contrary to .NET, in .NET Core, GetHashCode returns a different value every time you run your code. I totally understand the rationale for this. Relying on hash code values is a very bad idea (like...
0debug
How to test navigation via Navigator in Flutter : <p>Let's say, I have a test for a screen in Flutter using <code>WidgetTester</code>. There is a button, which executes a navigation via <code>Navigator</code>. I would like to test behavior of that button. </p> <p><strong>Widget/Screen</strong></p> <pre><code>class My...
0debug
How can I echo it properly? HTML+PHP issue : <p>I have a problem with this line,is there any solution for a line which must contain both single and double quotation marks?</p> <pre><code>echo "&lt;a href='/ad/.$row['id_ad']'&gt;".$row['title']; </code></pre> <p>I get this error:</p> <pre><code>Parse error: syntax e...
0debug
static void ne2000_cleanup(NetClientState *nc) { NE2000State *s = qemu_get_nic_opaque(nc); s->nic = NULL; }
1threat
How can I check if a string with a comma if bigger than 232.68 : I have an input with a decimal number (comma used instead of a dot): <input id="amount" name="amount" maxlength="7" type="text" value="0,00" /> I want to check if the amount is higher than 232.68 I tested: $('#amount').change(funct...
0debug
Swift 3: Cannot convert value of type 'NSMutableDictionary' to expected argument type '[AnyHashable : Any]!' : <p>This code worked before Swift 3. (Curse you Swift 3!)</p> <p>Now it's showing this error against the <code>Flurry.logEvent(eventName, withParameters: userData!)</code> line:</p> <blockquote> <p>Cannot c...
0debug
Equivalent of C#'s Array.GetUpperBound() in java : <p>I am trying to translate C#'s <code>GetUpperBound()</code> in java. Let's say we have a 2D array in java:</p> <pre><code>int[][] array = new int[2][3] { {1, 2, 3}, {4, 5, 6} }; </code></pre> <p>I understand that in C# <code>array.GetUpperBound(0)</code> would retu...
0debug
Do I need to call next() after res.send()? : <p>If I called <code>res.send()</code>, but didn't call <code>next()</code>:</p> <ol> <li>Any middleware after this middleware won't be executed.</li> <li>If this middleware is not the last middleware, then the request will "hang" forever, and will not be garbage collected,...
0debug
Cannot run the macro 'Main'. error occurred in "invoke vba" uipath : I am trying to retrieve some cell addresses from excel sheet with uipath invoke VBA activity. I am new to VB script, here i have written a function to retrieve cell address array and i have written a sub procedure to call that function. I am calling t...
0debug
looping through javascript object : <p>How do you access properties of a javascript object like the following? Please explain each step if possible.</p> <pre><code>var contacts = [ { "firstName": "Akira", "lastName": "Laine", "number": "0543236543", "likes": ["Pizza", "Coding", "Brownie Points"] }, { ...
0debug