problem
stringlengths
26
131k
labels
class label
2 classes
React Native KeyboardAvoidingView covers last text input : <p>I'm using React Native's <a href="https://facebook.github.io/react-native/docs/keyboardavoidingview.html" rel="noreferrer">Keyboard Avoiding View</a> with the behavior set to padding (testing on Android). </p> <p>I have multiple TextInputs on my screen. Whe...
0debug
is it possible to populate a hash using a for loop? : I want a hash that holds keys which are ints from 1 to 18. Essentially, at the start I want the hash to look like this: myHash = Hash.new myHash[1] = "free" myHash[2] = "free" ... myHash[18] = "free" But I want to know if there's a nic...
0debug
Aspectj doesn't work with kotlin : <p>i want to use aspectj aop in kotlin,here is my code:</p> <p>my annotation in annotation.lazy_list:</p> <p>Kotlin:</p> <pre><code> package anotation @Retention(AnnotationRetention.RUNTIME) @Target(AnnotationTarget.FUNCTION) annotation class lazy_list </code></pre> <p>my aspectj...
0debug
Angular material design : We are using angular material mat radio button and it is selected. This radio button gets unchecked on opening angular modal pop up with another set of angular material radio button.
0debug
How can i check what is the biggest string in a list : <p>I want to check what is the biggest string in a list</p> <p>Is there any function for this? for example:</p> <pre class="lang-py prettyprint-override"><code>lis = ['rafa', 'now', 'lucky'] </code></pre> <p>And it returns 'lucky' or 5</p>
0debug
static void tlb_info_pae32(Monitor *mon, CPUState *env) { int l1, l2, l3; uint64_t pdpe, pde, pte; uint64_t pdp_addr, pd_addr, pt_addr; pdp_addr = env->cr[3] & ~0x1f; for (l1 = 0; l1 < 4; l1++) { cpu_physical_memory_read(pdp_addr + l1 * 8, &pdpe, 8); pdpe = le64_to_cpu(pdpe...
1threat
int av_opencl_buffer_write(cl_mem dst_cl_buf, uint8_t *src_buf, size_t buf_size) { cl_int status; void *mapped = clEnqueueMapBuffer(gpu_env.command_queue, dst_cl_buf, CL_TRUE,CL_MAP_WRITE, 0, sizeof(uint8_t) * buf_size, 0, NULL, NU...
1threat
Learning DOM. Not sure why my function works in the HTML file but not in JS file : I'm creating a web page that has a text area in it and the user can enter code and have it displayed underneath. If I place my function in the HTML file it works just fine but when I move it to the JS file it doesn't work. Any help, even...
0debug
void virtio_blk_data_plane_destroy(VirtIOBlockDataPlane *s) { if (!s) { return; } virtio_blk_data_plane_stop(s); g_free(s->batch_notify_vqs); qemu_bh_delete(s->bh); object_unref(OBJECT(s->iothread)); g_free(s); }
1threat
static int vp56_size_changed(VP56Context *s) { AVCodecContext *avctx = s->avctx; int stride = s->frames[VP56_FRAME_CURRENT]->linesize[0]; int i; s->plane_width[0] = s->plane_width[3] = avctx->coded_width; s->plane_width[1] = s->plane_width[2] = avctx->coded_width/2; s->plane_height[0] = s->p...
1threat
What does batch, repeat, and shuffle do with TensorFlow Dataset? : <p>I'm currently learning TensorFlow but i come across a confusion within this code:</p> <pre><code>dataset = dataset.shuffle(buffer_size = 10 * batch_size) dataset = dataset.repeat(num_epochs).batch(batch_size) return dataset.make_one_shot_iterator()...
0debug
How to find the variance between two groups in python pandas? : <p>I have a dataframe like this,</p> <pre><code>ID total_sec is_weekday 1 300 1 1 200 0 2 280 1 2 260 0 3 190 1 4 290 0 5 500 1 5 520 ...
0debug
static int mov_write_udta_tag(ByteIOContext *pb, MOVContext* mov, AVFormatContext *s) { offset_t pos = url_ftell(pb); int i; put_be32(pb, 0); put_tag(pb, "udta"); mov_write_meta_tag(pb, mov, s); if(mov->mode == MODE_MOV){ for (i=0; i<M...
1threat
Code executes when typed into console but not in script : <p>I have a javascript project i am running,and i have finished the first phase.The second phase requires for me to start by assigning a <code>variable</code> to a <code>dom</code> object.</p> <p>I assigned the <code>variable</code> and it worked.Then i updated...
0debug
RecyclerView (horizontal) nested in BottomSheet preventing vertical scrolling : <p>I have a <code>RecyclerView</code> using a <code>LinearLayoutManager</code> with <code>HORIZONTAL</code> orientation, nested inside a <code>FrameLayout</code> using the <code>BottomSheet</code> <code>Behavior</code>.</p> <p>When attempt...
0debug
Display full background image : <p>I have the following inline css code:</p> <pre><code>&lt;div class="home-hero" style="background-image: url(https://dummyimage.com/300); background-position: 100% center; background-repeat: no-repeat; background-size: cover; height: 100%; width: 100%;"&gt; </code></pre> <p></p> <p>...
0debug
UITableView compiling error in AppDelagate Swift : This is my viewcontroller: import UIKit class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { let list = ["Facebook: 2000$", "Twitter: 10000$", "Vine: 23356$", "Uber: 35000", "Adobe Systems: 400900", "Agilent Tech: 45...
0debug
How to function for a null string input in c++? : In java, this can be used, Scanner s = new Scanner (System.in); String x = s.next(); if(x == null || x.length() == 0) cout << "Please enter someting" ; as a condition which says "Please enter something" if anyone hits the ENTER key typing n...
0debug
ERRO[0043] failed to dial gRPC: unable to upgrade to h2c, received 501 : <p>When I tried building my Dockerfile with <code>docker build -t myimage1 .</code> today I got this error:</p> <pre><code>ERRO[0043] failed to dial gRPC: unable to upgrade to h2c, received 501 context canceled </code></pre> <p>I have successful...
0debug
from operator import eq def count_same_pair(nums1, nums2): result = sum(map(eq, nums1, nums2)) return result
0debug
restrict a textbox to only integers between 1 and 99 : I am trying to add a text box which accepts only integers between 1 and 99. I tried adding a number type element with min and max but that works only when changing the number using the ticker <input type="number" min="1" max="99" /> **May I know a better ...
0debug
static int qcow2_truncate(BlockDriverState *bs, int64_t offset) { BDRVQcowState *s = bs->opaque; int ret, new_l1_size; if (offset & 511) { return -EINVAL; } if (s->nb_snapshots) { return -ENOTSUP; } if (offset < bs->total_sectors * 512) { ...
1threat
int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp) { struct addrinfo ai,*res,*e; const char *addr; char port[33]; char uaddr[INET6_ADDRSTRLEN+1]; char uport[33]; int slisten, rc, to, port_min, port_max, p; memset(&ai,0, sizeof(ai)); ai.ai_flags = AI_PASSIVE | ...
1threat
how to subtract more than 2 numbers in c# : i am trying to make simple calculation and taking input of my own choice to subtract using loop but result is not coming true.. Console.WriteLine("Enter how many numbers u want to perform operations?"); int b = int.P...
0debug
static void do_pci_unregister_device(PCIDevice *pci_dev) { pci_dev->bus->devices[pci_dev->devfn] = NULL; pci_config_free(pci_dev); if (memory_region_is_mapped(&pci_dev->bus_master_enable_region)) { memory_region_del_subregion(&pci_dev->bus_master_container_region, ...
1threat
How to change all buttons' text using a function(without hardcoding)? : <p>How do i do this without hardcoding and without using setText for each button,How do i do it by using a function? I have a dialog box, whenever "OK"(+ve button) is clicked I want all 10 buttons in Activity to change text and set it to some eleme...
0debug
i am new in PHP learning try to add some data in database ,all the solutions available in net is tried but can not solve my issue : // this is my php code starting and used connection type is pdo //connection with server $servername = "localhost"; $username = "root"; $passwo...
0debug
Check if celery beat is up and running : <p>In my Django project, I use Celery and Rabbitmq to run tasks in background. I am using celery beat scheduler to run periodic tasks. How can i check if celery beat is up and running, programmatically?</p>
0debug
xCode10: What am I getting an unrecognized selector error? : This code: override func viewDidLoad() { super.viewDidLoad() mqttDataClient.delegate = self mqttDataClient.connect() let tableRefresh = UIRefreshControl() tableView.refreshControl = tableRefresh tab...
0debug
What is this techinique called? : <p>I come from C#. A small example with C# syntax:</p> <pre><code>// using System.Linq; int[] array = { 1, 2, 3, 5 }; int result = array.SingleOrDefault(x =&gt; x % 2 == 0); </code></pre> <p>I want to <code>convert</code> that syntax to javascript syntax:</p> <p><div class="snippet...
0debug
How to use multiple values in when (Evaluate )? : I have the following code and as can be seen that in both the cases I'm using Section = A. But, is there a way to check both 1&2 in "When" so that to avoid more lines of code? Evaluate INTERFACE When "1" SECTION = "A"; Break; When "2" SECTION = "A"; ...
0debug
Docker-compose using host environment variable : <p>I'm trying to do the following in my docker-compose.yml</p> <p>But I hit this warning? <code>WARNING: The HOSTNAME variable is not set. Defaulting to a blank string</code></p> <p><code>environment: KAFKA_ADVERTISED_HOST_NAME: ${HOSTNAME} </code></p> <p>The HO...
0debug
C CreateThread() to slow? : i have a following code for matrix-vector multiplication: <!-- begin snippet: js hide: false --> <!-- language: lang-html --> std::chrono::steady_clock::time_point start, end2; void fillMatrixConditions(LPVOID lpv) { end2 = std::chrono::steady_clock::now(); std:...
0debug
void nbd_client_close(BlockDriverState *bs) { NbdClientSession *client = nbd_get_client_session(bs); struct nbd_request request = { .type = NBD_CMD_DISC, .from = 0, .len = 0 }; if (client->ioc == NULL) { return; } nbd_send_request(client->ioc, &requ...
1threat
How Only get name easyImage Android? : <p><strong>Before</strong></p> <p>[/data/user/0/com.example.hx_loom.evpa/cache/EasyImage/a85f8011-10d5-4050-89d2-1e575da55522.jpg,</p> <p>/data/user/0/com.example.hx_loom.evpa/cache/EasyImage/4737a29f-7df2-4e1f-abe3-18b71293d76e.jpg]</p> <p><strong>After</strong> a85f8011-10d5-...
0debug
HTML with a Jquery btn : So I made a web site on WordPress in which I need to put an arrow that scroll down in the page, and it works but just one time and I need that buttom work the hole page. This is the code: '<script type="text/javascript"> ''$(document).ready(function(){ ''$('.ir-abajo').click(function(...
0debug
how to change bullet color of jquery slider : I want to change the default bullet(li) color of jquery slider into orange color. If not selected then circle border orange. If selected then circle fill with orange color. Please help.
0debug
static MemTxResult vtd_mem_ir_write(void *opaque, hwaddr addr, uint64_t value, unsigned size, MemTxAttrs attrs) { int ret = 0; MSIMessage from = {}, to = {}; from.address = (uint64_t) addr + VTD_INTERRUPT_ADDR_FIRST; from.d...
1threat
static av_cold int read_specific_config(ALSDecContext *ctx) { GetBitContext gb; uint64_t ht_size; int i, config_offset; MPEG4AudioConfig m4ac; ALSSpecificConfig *sconf = &ctx->sconf; AVCodecContext *avctx = ctx->avctx; uint32_t als_id, header_size, trailer_size; init_get_bi...
1threat
static uint32_t qvirtio_pci_get_features(QVirtioDevice *d) { QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d; return qpci_io_readl(dev->pdev, dev->addr + VIRTIO_PCI_HOST_FEATURES); }
1threat
Strange "!*" entry in LocalVariableTypeTable when compiling with eclipse compiler : <p>Let's compile the following code with ECJ compiler from Eclipse Mars.2 bundle:</p> <pre><code>import java.util.stream.*; public class Test { String test(Stream&lt;?&gt; s) { return s.collect(Collector.of(() -&gt; "", (a...
0debug
iOS Logging: How to Formatting Log Messages(get time_t, timeval, errno) in swift : How to the use System log through Logging. I go throw this apple Document > https://developer.apple.com/documentation/os/logging for logging. But cant get the Formatting Log Messages. Using this code > os_log(OS_LOG_DEFAULT...
0debug
static inline int ohci_put_hcca(OHCIState *ohci, uint32_t addr, struct ohci_hcca *hcca) { cpu_physical_memory_write(addr + ohci->localmem_base, hcca, sizeof(*hcca)); return 1; }
1threat
Unreachable code in the Eclipse editer : I have a problem with this code, it says "Unreachable code". It says that the "EntityLivingBase entity = (EntityLivingBase) theObject;" is a unreachable code. Please Help Me! Here's my project: @Override public void onRender() { if (!this.isToggled()) ...
0debug
how to get Id option selected on modal show using js : I tried to get the ID on the option selected when the modal was in show state. This My Js $("#modal-form").on('shown.bs.modal',function(e){ console.log("CHANGE"); var id = $("#customer option:selected").val(); console.log(id); });...
0debug
svg animation not display button click event : Im created some `svg` animation im added it my application , when i click the button after i want to display this animation same page move to top (like Facebook text delight animation ), next redirect next page(addacore) its cant do that , how can i correctly do that ...
0debug
What code can I use to recreate the picture? : I need to recreate this photo, colors and all. Having trouble with positioning the turtle to stack the circles. Any help? I've already tried setheading and position[enter image description here][1] [1]: https://i.stack.imgur.com/qOZWS.png
0debug
Cant Run Android application on eclipse : i have problem with eclipse and i hope to help me to solve it !! so, my problem is i cant run my android appliction on eclipse when i click run it show to me this form and dont have android application choise ! this is a screenshot [picture][1] [1]: http://i.stack...
0debug
static void taihu_405ep_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const cha...
1threat
form that saves information entered into a data.txt file php none of them works : <p>i'am looking for form that has index.html and process.php In index you enter Your Name: Your age: (but you dont enter it gives you option from 10 to 50) and you click submit and that information saves in data.txt file on /var/www/htm...
0debug
static gboolean nbd_accept(QIOChannel *ioc, GIOCondition condition, gpointer opaque) { QIOChannelSocket *cioc; if (!nbd_server) { return FALSE; } cioc = qio_channel_socket_accept(QIO_CHANNEL_SOCKET(ioc), NULL); if (...
1threat
How to show image as product on other domain as advertising : <p>As we know when we visit e-commerce site like amazon and see some product, after some time if we go to some other domain like Facebook, we should see same amazon product showing on Facebook.</p> <p>Can you please tell me, how it achieve? </p>
0debug
Does await guarantee execution order without assignment in JavaScript? : <p>Subject. Can I say that two pieces of code below are equal:</p> <pre><code>await someFunc() // no assignment here doSomethingAfterSomeFunc() </code></pre> <p>and:</p> <pre><code>someFunc().then(() =&gt; doSomethingAfterSomeFunc() ) </code...
0debug
Filter a value when using regex and grep : <p>I am reading memory usage for an android app named <code>mobile_cep</code> as follows</p> <p><code>adb shell dumpsys meminfo | grep mobile_cep</code></p> <p>But this command this output as </p> <pre><code>amar@admin:~/Desktop/bash-andy$ adb shell dumpsys meminfo | grep m...
0debug
static void chr_read(void *opaque, const void *buf, size_t size) { VirtIORNG *vrng = opaque; size_t len; int offset; if (!is_guest_ready(vrng)) { return; } offset = 0; while (offset < size) { if (!pop_an_elem(vrng)) { break; } len ...
1threat
static int usb_net_handle_datain(USBNetState *s, USBPacket *p) { int ret = USB_RET_NAK; if (s->in_ptr > s->in_len) { s->in_ptr = s->in_len = 0; ret = USB_RET_NAK; return ret; } if (!s->in_len) { ret = USB_RET_NAK; return ret; } ret = s->in_le...
1threat
Why is the CSS attribute ‘stroke’ named so? : <p>Why is the CSS attribute ‘stroke’ named so?</p> <p>I find no dictionary meaning of stroke as border/outline, isn’t that what the attribute does, defining the properties of border/outline?</p> <p>Shouldn’t the attribute have been named border/outline instead?</p>
0debug
static int seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int data_size) { const unsigned char *data_end = data + data_size; GetBitContext gb; int flags, i, j, x, y, op; unsigned char c[3]; unsigned char *dst; uint32_t *palette; flags = *data++; if (flags &...
1threat
Installing GD in Docker : <p>I am a complete Docker novice but am having to maintain an existing system. The Dockerfile I am using is as below:</p> <pre><code>FROM php:5.6-apache RUN docker-php-ext-install mysql mysqli RUN apt-get update -y &amp;&amp; apt-get install -y sendmail RUN apt-get update &amp;&amp; \ ...
0debug
static int raw_eject(BlockDriverState *bs, int eject_flag) { BDRVRawState *s = bs->opaque; switch(s->type) { case FTYPE_CD: if (eject_flag) { if (ioctl (s->fd, CDROMEJECT, NULL) < 0) perror("CDROMEJECT"); } else { if (ioctl (s->fd, CDROMCLOS...
1threat
Using npm with an MVC project : <p>I am getting a bit confused here.</p> <p>I have an <code>MVC</code> 5 project, I want to use the <code>npm</code> for managing my javascript packages.</p> <p>I installed <code>npm</code> from <code>nuget</code> and here i am stuck, I cant find the commandline console window or anyth...
0debug
ListView OnItemClick Listner does not work? : Am trying to call the fragment from the fragment, on a list view OnItemClick Listner. But the click listner does not work for me. I have set the list items by using the adapter. Here is my code. listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { ...
0debug
Generating code for property initialisers from an object instance : Can we use Roslyn to generate the object initialisers only from an instance of object? Not trying to decompile the object as in this post : http://stackoverflow.com/questions/29567489/can-roslyn-generate-source-code-from-an-object-instance Would it ...
0debug
How can I compare more than one string by using == in php? : How can I compare more than one string by using `==` in php: if( $variables == "string-1" or "string-2"){ $variables='desired string'; } Is there any better or more formal method for it?
0debug
Iterating and return elements using for loop in JSX : <p>I was trying to access my component by using loop to iterate and call my component. I encountered no syntax error, however I didn't get desired elements out of my loop. Here is a sample code which I tried.</p> <pre><code> render() { return ( &lt;div...
0debug
static bool object_create_initial(const char *type) { if (g_str_equal(type, "rng-egd")) { return false; } if (g_str_equal(type, "filter-buffer") || g_str_equal(type, "filter-dump") || g_str_equal(type, "filter-mirror") || g_str_equal(type, "filter-redire...
1threat
Gdal Installation error using pip : <p>Im trying to install GDAL latest version using pip, but im getting the following error, Failed building wheel for GDAL. My python version is 2.7.9, Please help me. It is installing gdal 1.11.3 version if i specify the version but i need latest version or >=2.0</p>
0debug
php mail sending multiple mails : <p>I am using php mail to send response to client after successfull submission. This works fine. I have a foreach loop that deals with comma seperated entries and what is happening is that mail sending an email for each item instead of 1 email showing entries like: item1,item2,item3 et...
0debug
Mapbox GL js available icons : <p>I am rewriting a web application from Mapbox.js to Mapbox GL js. Using the standard 'mapbox://styles/mapbox/streets-v8' style, where can I find a list of all working marker icons?</p> <p>Here is my code:</p> <pre><code>m.map.addSource("markers", { "type": "geojson", "...
0debug
How to get the src attribute from a JSON object? : <p>This is one object of my JSON :</p> <pre><code> { "box": [ { "htm": "&lt;div style=\"float:left;margin:0 0 10px\"&gt;&lt;img alt=\"BICYCLE GARAGE\" src=\"//cdn.membershipworks.com/u/5ceef04cf033bfad7c9d9c82_lgl.jpg?1565140...
0debug
void kvm_s390_apply_cpu_model(const S390CPUModel *model, Error **errp) { struct kvm_s390_vm_cpu_processor prop = { .fac_list = { 0 }, }; struct kvm_device_attr attr = { .group = KVM_S390_VM_CPU_MODEL, .attr = KVM_S390_VM_CPU_PROCESSOR, .addr = (uint64_t) &prop, ...
1threat
Inject character between substring of a string in Java : <p>I have a list of words stored in a list, words.</p> <p><code>private String[] words = new String[]{"world", "you"};</code></p> <p>I then have a string, helloWorld</p> <p><code>private String helloWorld = "Hello world how are you?";</code></p> <p>I would li...
0debug
Going back and forth with methods in java : I built a tic tac toe game using java but I just have one issue. I want my code to bounce back and forth from the `validPlayerOneInput` and `validPlayerTwoInput` methods. As you can see in my main, I'm calling both methods procedurally which be incorrect as it just stops af...
0debug
GraphQL Java client library : <p>I am looking for a java <em>client</em> library for GraphQL. This is to use for server-to-server communication, both in java. No android, not javascript... just java. Apollo is the nearest answer, and it seems like it is for Android only, not for plain-java applications. Lots of exampl...
0debug
check not null for list in a list at specific index : <p>How do I access <code>list2</code> in <code>list1</code> below and check <code>IsnotNull</code> in an Assert </p> <pre><code>List&lt;Object&gt; list1= new List&lt;Object&gt;(); List&lt;int&gt; list2= new List&lt;int&gt;(); list1.add(someValue); list1.add(list2...
0debug
Android Studio - No option to Link C++ to Gradle : <p>I have been trying to access some CPP Libraries from android and have been following the instructions here:</p> <p><a href="https://developer.android.com/studio/projects/add-native-code.html#link-gradle" rel="noreferrer">https://developer.android.com/studio/project...
0debug
How to insert a 3D Photo using only Html and Css : <p>I created a 3d photo and i want to upload it to my website, and by animation that photo will be always rotating like a 3D Photo, but the command <code>&lt;img src="example.glb" alt="3D Photo"&gt;</code> doesn't work so i am having trouble inserting the photo.</p> <...
0debug
Disable autostart of docker-compose project : <p>I have a docker-compose project using Docker for Mac that autostarts when I boot the computer.</p> <p>I usually start the project with <code>docker-compose up -d</code>, but even running <code>docker-compose stop</code> before shutting down autostarts it again on boot.<...
0debug
def max_run_uppercase(test_str): cnt = 0 res = 0 for idx in range(0, len(test_str)): if test_str[idx].isupper(): cnt += 1 else: res = cnt cnt = 0 if test_str[len(test_str) - 1].isupper(): res = cnt return (res)
0debug
static int dx2_decode_slice_444(GetBitContext *gb, AVFrame *frame, int line, int left, uint8_t lru[3][8]) { int x, y; int width = frame->width; int ystride = frame->linesize[0]; int ustride = frame->linesize[1]; int vstrid...
1threat
Preventing users from creating unnamed instances of a class : <p>For many <strong>RAII "guard"</strong> classes, being instantiated as anonymous variables does not make sense at all:</p> <pre><code>{ std::lock_guard&lt;std::mutex&gt;{some_mutex}; // Does not protect the scope! // The unnamed instance is im...
0debug
Expand a string wich have '\t' to a specific lenght : Here I have a string wich have 3 '\t's and when I use the proper methods like: string.padright(totalWidth); Or string.format("{0,width}",myText); Or even a function from skrach, I get a problem with that '\t' escape in the string wich counts one but depend on st...
0debug
ogm_dshow_header(AVFormatContext *s, int idx) { struct ogg *ogg = s->priv_data; struct ogg_stream *os = ogg->streams + idx; AVStream *st = s->streams[idx]; uint8_t *p = os->buf + os->pstart; uint32_t t; if(!(*p & 1)) return 0; if(*p != 1) return 1; t = AV_RL32(p + 96); ...
1threat
Apache Airflow DAG cannot import local module : <p>I do not seem to understand how to import modules into an apache airflow DAG definition file. I would want to do this to be able to create a library which makes declaring tasks with similar settings less verbose, for instance.</p> <p>Here is the simplest example I can...
0debug
Error - Use of undeclared type 'Error' : <p>Im getting an error saying - Use of undeclared type 'Error' i cannot move on without solving this error, I have tried looking online numerous times, but it doesnt help, I am using swift 2, and xcode 7.3</p>
0debug
static void rng_egd_free_requests(RngEgd *s) { GSList *i; for (i = s->parent.requests; i; i = i->next) { rng_egd_free_request(i->data); } g_slist_free(s->parent.requests); s->parent.requests = NULL; }
1threat
static void spapr_vio_quiesce_one(VIOsPAPRDevice *dev) { dev->flags &= ~VIO_PAPR_FLAG_DMA_BYPASS; if (dev->rtce_table) { size_t size = (dev->rtce_window_size >> SPAPR_VIO_TCE_PAGE_SHIFT) * sizeof(VIOsPAPR_RTCE); memset(dev->rtce_table, 0, size); } dev->crq.qladdr ...
1threat
How to generate random number that must contains predefined characters? : <p>In my application i need to generate random numbers that should contain certain character like capital letter, a number and of certain length. It will be an honor if you guys help me out.</p>
0debug
How do we see full commands in the output of docker history command? : <p>How do we see full commands in the third column (CREATED BY) in the output of docker history command?</p> <pre><code>$ docker history docker.company.net/docker-base-images/image:1.0 IMAGE CREATED CREATED BY ...
0debug
I can t get enum class opertaors to work : I get an error as "FastOut<NMAX>::Flags FastOut<NMAX>::operator&(FastOut<NMAX>::Flags, FastOut<NMAX>::Flags)' must take either zero or one argument| " template<int NMAX> class FastOut{ enum class Flags; protected: char buffer[NMAX]; std...
0debug
Get console user input as typed, char by char : <p>I have a console application in Elixir. I need to interpret user’s input on by keypress basis. For instance, I need to treat “q” as a command to end the session, without user to explicitly press <kbd>⏎</kbd> a.k.a. “carriage return.”</p> <p><a href="http://elixir-lang...
0debug
document.getElementById('input').innerHTML = user_input;
1threat
Is re-exporting modules harmful for tree-shaking? : <p>I've come into an argument with my co-workers for which we can't seem to find an answer from any official source (MDN, webpack documentation, ...). My research <a href="https://stackoverflow.com/questions/38077164/es6-export-from-import">hasn't yielded much</a> eit...
0debug
How to create horizontal funnel like this? : <p>I wish there was a horizontal funnel plugin available in the market. I'm not a good js developer but I'm a designer with html/css skills in hand. I have designed similar funnel like below in psd but I couldn't find any plugin to plug in into the html. The funnel links sho...
0debug
Node JS Express - message is not defined - error.ejs : ** http://localhost:3000/buyersearch/buyersearch -> link I'm using 1. app.js ** var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieParse...
0debug
How do I display a div over a div then disappear after 10 seconds? : <p>I have a SWF file that I play on my website. But before this SWF plays, I want to play another SWF file before it. It's about 10 seconds. So I have a two DIVs: one containing the SWF file that I want to play before, and the other div to contain the...
0debug
sql - trying to select a column with datetime with a condition of date only : <p>so i have this table: <a href="http://prntscr.com/it53pm" rel="nofollow noreferrer">http://prntscr.com/it53pm</a> (in this link).</p> <p>what im trying to do is select schedule where schedule date = current date. </p>
0debug
Beginner Needing Java Programming help! I can't figure out how to go about solving this without if statement : "Given an amount of change less than one dollar, find the coins required to make up this amount. Your program should find the minimum number of coins. For example, if the change was $0.56, you would need 2 qua...
0debug
static void vga_get_text_resolution(VGACommonState *s, int *pwidth, int *pheight, int *pcwidth, int *pcheight) { int width, cwidth, height, cheight; cheight = (s->cr[VGA_CRTC_MAX_SCAN] & 0x1f) + 1; cwidth = 8; if (!(s->sr[VGA_SEQ_CLOCK_MODE] & VGA_SR01_C...
1threat
Python Binary tree search : <pre><code># stack_depth is initialised to 0 def find_in_tree(node, find_condition, stack_depth): assert (stack_depth &lt; max_stack_depth), 'Deeper than max depth' stack_depth += 1 result = [] if find_condition(node): result += [node] for child_node in node.child...
0debug