problem
stringlengths
26
131k
labels
class label
2 classes
condition check for Jquery radio button : <div class="error-message"></div> <form id="satisfaction" onsubmit="return validateInput()"> <input type="radio" name="satisfied" value="yes" required /> Satisfied <input type="checkbox" name="donate" /> Donate<br /> <input type="radio" name="sat...
0debug
db.execute('SELECT * FROM employees WHERE id = ' + user_input)
1threat
static uint32_t drc_isolate_logical(sPAPRDRConnector *drc) { g_free(drc->ccs); drc->ccs = NULL; if (spapr_drc_type(drc) == SPAPR_DR_CONNECTOR_TYPE_LMB && !drc->unplug_requested) { return RTAS_OUT_HW_ERROR; } drc->isolation_state = SPA...
1threat
Cannot install kurento-media-server-6.0 in Ubuntu Linux 16.04 : <p>Cannot install kurento-media-server-6.0 in Ubuntu Linux 16.04 its always showing dependencies problem as below.</p> <pre><code>sudo apt-get install kurento-media-server-6.0 Reading package lists... Done Building dependency tree Reading state inf...
0debug
Celery tasks received but not executing : <p>I have Celery tasks that are received but will not execute. I am using Python 2.7 and Celery 4.0.2. My message broker is Amazon SQS.</p> <p>This the output of <code>celery worker</code>:</p> <pre><code>$ celery worker -A myapp.celeryapp --loglevel=INFO [tasks] . myapp.ta...
0debug
trying to decipher the mathematical meaning of an if statement in matlab : I have this piece of code that I'm trying understand what is going on. I usually use R, but had to look at a piece of code from matlab. So can anyone tell me what this if statement does in math?? prob = exp(-dE / kT); if dE <= 0 I I ran...
0debug
Learned how to make responsive HTML Emails from scratch using HTML & CSS. What's next? : <p>Looking at jobs online most of them have: Experience using MailChimp or Oracle responsys. Are these what most HTML Email developers use at work? </p> <ul> <li>Also I tested my code using the free <a href="https://putsmail.com...
0debug
static void parse_type_int64(Visitor *v, const char *name, int64_t *obj, Error **errp) { StringInputVisitor *siv = to_siv(v); if (!siv->string) { error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null", "integer"); return; ...
1threat
I have a counting from 1 to 20 I want every 3rd and 4th value print as * how to empliment it : i used this but not working and i got stuck either one another got print as star or 3rd another not every 3rd and 4th. I am using java for loop with the % and also it not worked
0debug
i need a PHP code to find longest contiguous sequence of characters in the string. : i need a PHP code to find longest contiguous sequence of characters in the string. So if 'b' is coming together for maximum number of times your program should echo 'b' and count Example String: "aaabababbbbbaaaaabbbbbbbbaa" Outpu...
0debug
static void gen_compute_branch (DisasContext *ctx, uint32_t opc, int insn_bytes, int rs, int rt, int32_t offset) { target_ulong btgt = -1; int blink = 0; int bcond_compute = 0; TCGv t0 = tcg_temp_new(); TCGv t1 = tcg_temp_new();...
1threat
How do you look at console.log output of the amazon lambda function : <p>When you do a </p> <pre><code>console.log('Loading function'); </code></pre> <p>in an amazon lambda function, where does that go?</p> <p>My setup api gateway lambda function nodejs6.10 curl <a href="https://n2tredacted.execute-api.us-east-1.am...
0debug
Explanation on how this code works for House robber in Python : So I was browsing solutions on leetcode and found this for HouseRobber 1: last, now = 0, 0 for i in nums: last, now = now, max(last + i, now) return now I'm kind of confused on how the code itself executes w...
0debug
ConstraintLayout: Unable to scale image to fit a ratio in RecyclerView : <ul> <li>I have a recycler view with StaggeredGridLayoutManager. </li> <li>Within in I have custom items/views. </li> <li>Each item is defined as a ConstraintLayout where there is an image which is supposed to have a constant aspect ratio.</li> <l...
0debug
static void expand_timestamps(void *log, struct sbg_script *s) { int i, nb_rel = 0; int64_t now, cur_ts, delta = 0; for (i = 0; i < s->nb_tseq; i++) nb_rel += s->tseq[i].ts.type == 'N'; if (nb_rel == s->nb_tseq) { now = 0; if (s->start_ts != AV_NOPTS_VALUE) ...
1threat
how to pass data from textfield to another textfiled : override func prepare(for segue: UIStoryboardSegue, sender: Any?) { var secondController = segue.destination as! EditBillsViewController secondController.textField = items secondController.notesTextBox = notes secondCo...
0debug
why my login is not work in my app in localhost with xampp : I have created a app which can users to login by entering their email and password and the database for the activity was created from php my admin with xampp. The database name is user and table name is details.I test it by entering email and password which i...
0debug
int ff_j2k_init_component(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty, Jpeg2000QuantStyle *qntsty, int cbps, int dx, int dy, AVCodecContext *avctx) { uint8_t log2_band_prec_width, log2_band_prec_he...
1threat
int qemu_loadvm_state(QEMUFile *f) { QLIST_HEAD(, LoadStateEntry) loadvm_handlers = QLIST_HEAD_INITIALIZER(loadvm_handlers); LoadStateEntry *le, *new_le; Error *local_err = NULL; uint8_t section_type; unsigned int v; int ret; int file_error_after_eof = -1; if (qemu_sa...
1threat
How to find an optimum location point on a line? : <p>A line is given and a bunch of points are given. I have to find a point on line for which sum of distances from given points is minimum. <strong>I could't find any algorithm to implement in c</strong>. Please help, thanks in advance.</p>
0debug
How to reverse the scroll movement? : <p>I try to make a reverse navigation. I show the page from the bottom with scrollTo. I want reverse the wheel movement, when the whell movement is down the page goes to the top.</p> <p>The body has a fix height so I use:</p> <pre><code> window.scrollTo(0, 2000); </code></pre>
0debug
static uint32_t taihu_cpld_readl (void *opaque, hwaddr addr) { uint32_t ret; ret = taihu_cpld_readb(opaque, addr) << 24; ret |= taihu_cpld_readb(opaque, addr + 1) << 16; ret |= taihu_cpld_readb(opaque, addr + 2) << 8; ret |= taihu_cpld_readb(opaque, addr + 3); return ret; }
1threat
The page will strangely refresh when I click the button : <p>Here's my code:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang="zh-CN"&gt; &lt;head&gt; &lt;title&gt;中国工程院无线投票系统&lt;/title&gt; &lt;meta http-equiv="Content-Type" content="text/html;charset=utf-8"&gt; &lt;link rel="stylesheet" href="https://cd...
0debug
How to know which typescript version running on angular 4 project : <p>So i did <code>ng -v</code> it shows me everything except typescript, so how can i check Typescript version of my angular 4 project.</p>
0debug
I'm trying to declare a cursor. But I would like a certain parameter to be user input. However it is not compiled and displaying the following error : Code: DECLARE CURSOR currsor1 IN SELECT messid, studentname, messname FROM studentsmessdata WHERE messid = &messid; Error Message...
0debug
av_cold int ff_vc2enc_init_transforms(VC2TransformContext *s, int p_width, int p_height) { s->vc2_subband_dwt[VC2_TRANSFORM_9_7] = vc2_subband_dwt_97; s->vc2_subband_dwt[VC2_TRANSFORM_5_3] = vc2_subband_dwt_53; s->vc2_subband_dwt[VC2_TRANSFORM_HAAR] = vc2_subband_dwt_haar; s->vc2_subband_dw...
1threat
How does Firebase Analytics define a session? : <p>Firebase Analytics has a number of stats around "Sessions" (like "Sessions per user" and "Average session length"), but how exactly does Firebase Analytics define a session?</p>
0debug
navigation drawer baseactivity get crashed : hey guys when i choose my second activity in the navigation drawer ill get crashed. How to fix this? Please help me. Newbie Here. here is my code in my BaseActivity public abstract class BaseActivity extends AppCompatActivity implements NavigationView.On...
0debug
How can I change Sourcetree theme? : <p>I use all my development's tools in the dark theme except Source Tree.</p> <p>It has not option in its configuration to change theme.</p> <p>Is there any other way to change for a dark theme?</p>
0debug
Project 'Pods' was rejected as an implicit dependency for 'Pods.framework' because its architectures didn't contain all required architectures : <p>Target 'AAA-Pods' for project 'Pods' was rejected as an implicit dependency for 'Pods_AAA.framework' because its architectures 'x86_64' didn't contain all required architec...
0debug
Let a = 5 (or any other integer). Use that to produce a = ’0..1..2..3..4’ in just one line : So far what I have come up with is a = list(range(5)), however I need it to output in the format of '#,#,#,#' so I thought oh this is just a string format so I just did a = str(list(range(5))), but this just makes a [#,#,#,#] ...
0debug
.NET Core use Configuration to bind to Options with Array : <p>Using the .NET Core <code>Microsoft.Extensions.Configuration</code> <strong>is it possible to bind to a Configuration to an object that contains an array?</strong></p> <p><code>ConfigurationBinder</code> has a method <a href="https://github.com/aspnet/Conf...
0debug
Why should you use 2D array of structs? : I curious if there are use cases for a 2D array of structs. typedef struct { //member variables }myStruct; myStruct array2D[x][y]; //Uses cases of array2D[x][y]? Do we need them?
0debug
How to sum all the numbers that I entered in the console : So my code looks like this <import java.util.Scanner; public class homework3 { public static void main(String[] args) { System.out.println("Enter a positive number: "); Scanner scan = new Scanner(System.in); int i = scan.nextInt...
0debug
void helper_rfci(CPUPPCState *env) { do_rfi(env, env->spr[SPR_BOOKE_CSRR0], SPR_BOOKE_CSRR1, ~((target_ulong)0x3FFF0000), 0); }
1threat
av_cold void ff_dsputil_init_x86(DSPContext *c, AVCodecContext *avctx) { int cpu_flags = av_get_cpu_flags(); #if HAVE_7REGS && HAVE_INLINE_ASM if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_CMOV) c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_cmov; #endif if (X86_MMX(cpu_flags)) {...
1threat
Android 8.0: IllegalBlocksizeException when using RSA/ECB/OAEPWithSHA-512AndMGF1Padding : <p>I usually find answers for most of our issues here but this time I need to ask :-).</p> <p>We have encountered a problem with RSA encryption / decryption in one of our Apps running on Android 8.0 (API level 26).</p> <p>We've ...
0debug
static inline uint16_t mipsdsp_sub_i16(int16_t a, int16_t b, CPUMIPSState *env) { int16_t temp; temp = a - b; if (MIPSDSP_OVERFLOW(a, -b, temp, 0x8000)) { set_DSPControl_overflow_flag(1, 20, env); } return temp; }
1threat
C# Write a program that computes the average of five exam scores : <p>I am doing my homework. English is not my first language, so I am confused.</p> <p>This is the question: Write a program that computes the average of five exam scores. Declare and perform a compile-time initialization with the five exam values. Decl...
0debug
Get information from between two tags in Java HtmlUnit : <pre><code>&lt;span&gt; &lt;a&gt;&lt;/a&gt; Hello &lt;div&gt;A very lot of unnecessary text&lt;/div&gt; &lt;/span&gt; </code></pre> <p>So I want to extract the "Hello" from the web page. I can select the span via XPath, but if I call .getTextContent() on it I al...
0debug
static int encode_block(SVQ1Context *s, uint8_t *src, uint8_t *ref, uint8_t *decoded, int stride, int level, int threshold, int lambda, int intra){ int count, y, x, i, j, split, best_mean, best_score, best_count; int best_vector[6]; int block_sum[7]= {0, 0, 0, 0, 0, 0}; int w= 2<<((level+2)>>1); ...
1threat
Is there any way to invoke PowerQuery/M outside of Excel or PowerBI? : <p>Our BI team is really growing to like the <a href="https://support.office.com/en-us/article/Introduction-to-Microsoft-Power-Query-for-Excel-6E92E2F4-2079-4E1F-BAD5-89F6269CD605?ui=en-US&amp;rs=en-US&amp;ad=US" rel="noreferrer">Power Query ETL too...
0debug
What's the effect of -Yrangepos other than giving me source locations in macros : <p>So I googl'ed a bit, but no information other than the sparse:</p> <pre class="lang-none prettyprint-override"><code>-Yrangepos Use range positions for syntax trees. </code></pre> <p>Ok. And I know I need to use i...
0debug
static void put_codebook_header(PutBitContext * pb, codebook_t * cb) { int i; int ordered = 0; put_bits(pb, 24, 0x564342); put_bits(pb, 16, cb->ndimentions); put_bits(pb, 24, cb->nentries); for (i = 1; i < cb->nentries; i++) if (cb->entries[i].len < cb->entries[i-1].len) break; i...
1threat
Wordpress site wont load : Im getting this issue anyone be able to help me ?? Warning: require_once(/customers/4/7/0/jetpackprint.co.uk/httpd.www/wp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in /customers/4/7/0/jetpackprint.co.uk/httpd.www/wp-content/themes/xstore/fram...
0debug
static int local_link(FsContext *ctx, V9fsPath *oldpath, V9fsPath *dirpath, const char *name) { int ret; V9fsString newpath; char buffer[PATH_MAX], buffer1[PATH_MAX]; v9fs_string_init(&newpath); v9fs_string_sprintf(&newpath, "%s/%s", dirpath->data, name); ret = ...
1threat
How to find if users exist in firebase : I am using Firebase web sdk, and know methods to check wether a child in a collection exists or not. However I can't find a concise example checking the existance of an user, without trying to sign him/her in. Do you have any piece of code we could reuse?
0debug
SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockDriverState *bdrv, int unit, bool removable, int bootindex, const char *serial, Error **errp) { const char *driver; DeviceState *dev; Error *err = NULL; driver = ...
1threat
Update Android Support Library to 23.2.0 cause error: XmlPullParserException Binary XML file line #17<vector> tag requires viewportWidth > 0 : <p>I try to update my Support Library up to 23.2.0 and face this error:</p> <pre><code>Exception while inflating &lt;vector&gt; org.xmlpull.v1.XmlPullParserException: Binary XM...
0debug
I ENTER THIS CODE INTO MYSQL SERVER TO 'Write an SQL that will display authors and their publications even authors that have no publications ' : SELECT a.auth_name AS 'NAME', p.pub_title AS 'PUBLICATION' FROM publication p LEFT OUTER JOIN author_publication d ON p.pub_id = d.pub_id ...
0debug
e1000e_setup_tx_offloads(E1000ECore *core, struct e1000e_tx *tx) { if (tx->props.tse && tx->props.cptse) { net_tx_pkt_build_vheader(tx->tx_pkt, true, true, tx->props.mss); net_tx_pkt_update_ip_checksums(tx->tx_pkt); e1000x_inc_reg_if_not_full(core->mac, TSCTC); return; } ...
1threat
void av_register_input_format(AVInputFormat *format) { AVInputFormat **p = &first_iformat; while (*p != NULL) p = &(*p)->next; *p = format; format->next = NULL; }
1threat
What is $t in Vue.js : <p>First time ever working with <code>Vue.js</code> and have no clue what is <code>$t</code>. For instance I have someone's code like this: </p> <pre><code> &lt;li class="category-filter__back"&gt; &lt;button class="category-filter__button" @click="back(categoryPath)"&gt; {{ $t...
0debug
Android firebase 9.0.0 setValue to serialize enums : <p>I have this class making use of enums. Parsing to Firebase json used to work just fine - using Jackson. While migrating to firebase-database:9.0.0 I get the following:</p> <blockquote> <p>com.google.firebase.database.DatabaseException: No properties to serializ...
0debug
Need to create a button for a link using jquery : <p>I am having a link on the website which says "USE CURRENT LOCATION". I want to change that link to a shape of button. ID of the button is btnGeolocation</p> <p>You can have a look at that link in this page <a href="https://order.subway.com/Stores/Find.aspx?pid=1#pg...
0debug
int net_init_hubport(const NetClientOptions *opts, const char *name, NetClientState *peer) { const NetdevHubPortOptions *hubport; assert(opts->kind == NET_CLIENT_OPTIONS_KIND_HUBPORT); hubport = opts->hubport; if (peer) { return -EINVAL; } net_hub_add_...
1threat
Accessing a PHP Website Source Code : <p>I'm a PHP beginner. I usually use ASP.NET C# using Visual Studio just developing my own practice unpublished websites.</p> <p>I have recently be asked to assist with a website using PHP and MySQL. I have been given the following details to access the code:</p> <p>host: www.ho...
0debug
How can i convert account format from 101000002035 to 101-000002-03-5 in MySql : <p>It is possible to convert account column value from 101000002035 to 101-000002-03-5 in MySql?</p> <p>Please help. How can i do it.</p>
0debug
void virtio_scsi_common_realize(DeviceState *dev, Error **errp, VirtIOHandleOutput ctrl, VirtIOHandleOutput evt, VirtIOHandleOutput cmd) { VirtIODevice *vdev = VIRTIO_DEVICE(dev); VirtIOSCSICommon *s = VIRTIO_S...
1threat
AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame, int perms) { AVFilterBufferRef *samplesref = avfilter_get_audio_buffer_ref_from_arrays((uint8_t **)frame->data, frame->linesize[0], perms, ...
1threat
void ahci_hba_enable(AHCIQState *ahci) { uint32_t reg, ports_impl; uint16_t i; uint8_t num_cmd_slots; g_assert(ahci != NULL); ahci_set(ahci, AHCI_GHC, AHCI_GHC_AE); reg = ahci_rreg(ahci, AHCI_GHC); ASSERT_BIT_SET(reg, AHCI_GHC_AE); ahci->c...
1threat
if there's no super object created,why can I call the super constructor in java : <p>if there's no super object created when creating a new sub-class object,why can I call the super constructor in the sub-class constructor &amp; pass to it parameters in java?</p>
0debug
How to call inherited method of superclass from the overridden subclass method? : <p>I have a class <strong>shape</strong> that has a toString() method. I have another class <strong>circle</strong> that extends shape. This <strong>circle</strong> class overrides the inherited toString() method. What I want to do is cal...
0debug
void coroutine_fn co_aio_sleep_ns(AioContext *ctx, QEMUClockType type, int64_t ns) { CoSleepCB sleep_cb = { .co = qemu_coroutine_self(), }; sleep_cb.ts = aio_timer_new(ctx, type, SCALE_NS, co_sleep_cb, &sleep_cb); timer_mod(sleep_cb.ts, qemu_clock_get_ns(type) +...
1threat
Find duplicate registers in R : <p>I have an excel file with a list of emails and channels that collected it. How can I know how many emails per channel are duplicated using R and automate it (every time I import a different file just have to run it and get the results ) ? </p> <p>Thank you!! </p>
0debug
Why in so many places *p() is called a function that return a pointer instead of a function that return an address? : <p>I see in so many places that the code <code>*p()</code> it refer to a <em>function that return a pointer</em>. But when coding looks clear that the function is not returning a pointer, its returning ...
0debug
How to config visual studio to use UTF-8 as the default encoding for all projects? : <p>I did the search, but only found ways to change the encoding for individual files. I want to start projects with the encoding already configured as UTF-8.</p>
0debug
Convert geopandas shapely polygon to geojson : <p>I created a circle using geopandas and it returned a shapely polygon: </p> <pre><code>POLYGON: ((...)) </code></pre> <p>I want this same polygon as a geojson object. I ran across this:</p> <pre><code>shapely.geometry.mapping(shapelyObject) </code></pre> <p>which ret...
0debug
Checking auth token valid before route enter in Vue router : <p>I have a simple use case, where my application is using <code>vue-router</code> and <code>vuex</code>. Then <code>store</code> contains a <code>user</code> object which is <code>null</code> in the beginning. After the user is validated from the server it s...
0debug
Why does gcc compile f(1199) and f(1200) differently? : <p>What causes GCC 7.2.1 on ARM to use a load from memory (<code>lr</code>) for certain constants, and an immediate (<code>mov</code>) in some other cases? Concretely, I'm seeing the following:</p> <p>GCC 7.2.1 for ARM compiles this:</p> <pre><code>extern void ...
0debug
static int qed_write_header_sync(BDRVQEDState *s) { QEDHeader le; int ret; qed_header_cpu_to_le(&s->header, &le); ret = bdrv_pwrite(s->bs->file, 0, &le, sizeof(le)); if (ret != sizeof(le)) { return ret; } return 0; }
1threat
Visual Studio Code color theme in Visual Studio 2017 for JavaScript and TypeScript files : <p>As the topic suggests I would like to import/set Visual Studio Code color theme in Visual Studio 2017 for JavaScript and TypeScript files. The files I therefore would like to set color theme for are: <code>.js, .jsx, .ts and ....
0debug
static int decode_thread(void *arg) { VideoState *is = arg; AVFormatContext *ic; int err, i, ret; int st_index[AVMEDIA_TYPE_NB]; AVPacket pkt1, *pkt = &pkt1; AVFormatParameters params, *ap = &params; int eof=0; int pkt_in_play_range = 0; ic = avformat_alloc_context(); ...
1threat
¿ How to check admin role? : I am looking the best way to check admin rolewith component in angular. I have the following code in component checkIfIsAdmin(): any { let user_string = localStorage.getItem("currentUser"); if (!isNullOrUndefined([user_string])) { ...
0debug
R Studios: How can create a new column in a dataset filled with random preselected values? : I want to fill the dataset "TEAM" with a new column , and at each row I want to input a random value from lets say a vector of integers (1, 1729, 4679, 10257). My end goal is to link two datasets TEAMS and LEAGUES.
0debug
How to parse from a string the numbers and punctuation in Python : <p>I want to turn a string like "$1,234.56" into 1234.56 so I can add it to a database, my current solution is using <code>re.sub("[^0-9]", "", str1</code> this however strips the punctuation too, is there a way to keep it?</p> <p>I'm using python 3.6....
0debug
how to make predefined tags/code in html or css : <p>Let's say I have this html code:</p> <pre><code>&lt;h1&gt;My website&lt;/h1&gt; &lt;p&gt;Welcome to my website&lt;/p&gt; </code></pre> <p>Let's say that I want to put that on pretty much every page of my website without copy and pasting the same thing every time. H...
0debug
how to optimize this query for my school project : its my assignment kindly help me to optimzed below two quries Optimize Assignment 1: SELECT n.node_id, MIN(LEAST(n.date,ec.date)) date FROM n, ec WHERE (n.node_id = ec.node_id_from OR n.node_id = ec.node_id_to) AND n.date - ec.date > ...
0debug
static void print_report(int is_last_report, int64_t timer_start, int64_t cur_time) { char buf[1024]; AVBPrint buf_script; OutputStream *ost; AVFormatContext *oc; int64_t total_size; AVCodecContext *enc; int frame_number, vid, i; double bitrate; int64_t pts = INT64_MIN; ...
1threat
Gradle: is it possible to publish to Gradle's own local cache? : <p>I know that I can use the <code>maven</code> plugin coupled with <code>mavenLocal()</code> to install an artifact and use it locally.</p> <p>However investigating this a bit further, I notice that this means the artifacts are installed to Mavens's sta...
0debug
int monitor_fdset_dup_fd_remove(int dup_fd) { return monitor_fdset_dup_fd_find_remove(dup_fd, true); }
1threat
javascript - How to get the content of a paragraph? : I have 10 paragraphs, each displaying a number from 1 to 10. I need a function that when clicking on the paragraph, reads the description of it an stores it in an array. So far I managed to do this: function readValue(p) { var text = document.getElementsBy...
0debug
ConstraintLayout: What does `layout_constraintLeft_creator` do in xml? : <p>Example code:</p> <pre><code> &lt;EditText android:id="@+id/msg_type" android:layout_width="0dp" android:layout_height="40dp" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" andr...
0debug
static av_cold int dnxhd_encode_end(AVCodecContext *avctx) { DNXHDEncContext *ctx = avctx->priv_data; int max_level = 1 << (ctx->cid_table->bit_depth + 2); int i; av_free(ctx->vlc_codes - max_level * 2); av_free(ctx->vlc_bits - max_level * 2); av_freep(&ctx->run_codes); av_f...
1threat
Suddenly background is not visible in my chrome.Iam able to set only background color but not background image.why is this happening suddenly? : body{ background-image:linear-gradient(rgba(0, 0, 0, 0.5),rgba(0, 0, 0, 0.5)),url("images/smile.jpg"); height:100vh; ` `width:100%; ` `background-size: cover; ` ...
0debug
Issues with Macros in C : I'm still trying to firgure out macros in C #define A(x) #x int main() { int i = -i; char *s = A(i); i = -(s[0] == 'i'); printf("%d", i); return 0; } Anyone care to enlighten me and comment the code, especially wha...
0debug
Vertical link in page sides : <p>How can I have links in my pages sides like places i colored in image below and move as page scrolls (fixed position)?</p> <p><a href="https://i.stack.imgur.com/HzKk0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HzKk0.png" alt="sample"></a></p>
0debug
PCIBus *pci_prep_init(qemu_irq *pic) { PREPPCIState *s; PCIDevice *d; int PPC_io_memory; s = qemu_mallocz(sizeof(PREPPCIState)); s->bus = pci_register_bus(NULL, "pci", prep_set_irq, prep_map_irq, pic, 0, 4); register_ioport_write(0xcf8, 4, 4, pci_prep_ad...
1threat
Can someone please tell me why the following Java code (for comparing two linked lists) is giving NullPointerException? This was in HackerRank : int CompareLists(Node headA, Node headB){<br> // This is a "method-only" submission. // You only need to complete this method int i =1;<br> Node tempA = ...
0debug
Repeatedly process items in parallel : <p>I have a set of items that need to be processed in parallel over and over again. </p> <p>I can do this:</p> <pre><code>while (true) { Parallel.ForEach(sources, source =&gt; { // do lots of work with source }) } </code></pre> <p>But the problem is, if one sourc...
0debug
Unit testing internal methods in VS2017 .Net Standard library : <p>I am currently playing around with the latest Visual Studio 2017 Release Candidate by creating a .Net Standard 1.6 library. I am using xUnit to unit test my code and was wondering if you can still testing internal methods in VS2017.</p> <p>I remember t...
0debug
Python get last month and year : <p>I am trying to get last month and current year in the format: July 2016.</p> <p>I have tried (but that didn't work) and it does not print July but the number:</p> <pre><code>import datetime now = datetime.datetime.now() print now.year, now.month(-1) </code></pre>
0debug
Properly handle DrawerLayout animation while navigating through fragment : <p>I'm currently struggling with the <code>DrawerLayout</code> animation doing weird stuff; The <strong>hamburger icon</strong> is laggy and often switch from hamburger to arrow without animation if I don't put an Handler to delay the <code>frag...
0debug
How to fail a (cron) job after a certain number of retries? : <p>We have a Kubernetes cluster of web scraping cron jobs set up. All seems to go well until a cron job starts to fail (e.g., when a site structure changes and our scraper no longer works). It looks like every now and then a few failing cron jobs will contin...
0debug
create and store cookies of onclick div (dynamically) : I'm trying to create a cookie to store a text value of a div. I know I can use Document.getElementById('whatever') to get the text but I need the function to be dynanmic (non-specific) by getting the text of the onclick div. Can anyone lend me a helping hand by sh...
0debug
I can not do a swap operation while sorting. It crashes when I do it. Why? : <pre><code>struct Dates { int day; int month; int year; }accountinfo[3]; struct Accounts { string name,lastname; int number; float balance; }account[3]; void sortduetoaccnumbers() { for (i=0;i&lt;3;i++) { ...
0debug
How can i concatenate string+int+string in c++ : How can I concatenate i+name+letter+i ? for(int i = 0; i < 10; ++i){ //I need a const char* to pass as a parameter to another function const char* name = "mki"; //letter is equal to "A" for the first 2, "B" for the second 3, /...
0debug
static int patch_hypercalls(VAPICROMState *s) { hwaddr rom_paddr = s->rom_state_paddr & ROM_BLOCK_MASK; static const uint8_t vmcall_pattern[] = { 0xb8, 0x1, 0, 0, 0, 0xf, 0x1, 0xc1 }; static const uint8_t outl_pattern[] = { 0xb8, 0x1, 0, 0, 0, 0x90, 0xe7, 0x7e }; uint8...
1threat
db.execute('SELECT * FROM products WHERE product_id = ' + product_input)
1threat
static int con_init(struct XenDevice *xendev) { struct XenConsole *con = container_of(xendev, struct XenConsole, xendev); char *type, *dom; dom = xs_get_domain_path(xenstore, con->xendev.dom); snprintf(con->console, sizeof(con->console), "%s/console", dom); free(dom); type = xen...
1threat