title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
can I modify the consumer auto-offset-reset to latest of kafka stream? | <p>Working with kafka 0.10.1.0, I used these config</p>
<pre><code>val props = new Properties
props.put(StreamsConfig.APPLICATION_ID_CONFIG, applicationId)
props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, broker)
props.put(StreamsConfig.KEY_SERDE_CLASS_CONFIG, Serdes.String.getClass)
props.put(StreamsConfig.VALUE_SER... | 2 | 1,208 |
Iterating list of user defined objects using mybatis/ibatis in java | <p>I have an existing query in mybatis as below.</p>
<pre><code> <select id="getVessslScore" parameterType = "com.dpworld.mpc.camel.cxfrs.model.FilterCriteria" resultMap="vesselDetailResultMap">
select SUM(msm.MSM_SCORE) Score
FROM mpc_score_master msm
WHERE msm.MSM_SCORE_TYPE='MPCSCR' AND
... | 2 | 2,132 |
Jasper Reports: Page Number inside subreport does not work | <p>I have several similar reports in my application, for this reason I have created a basic structure with a subreport inside the Title and another one inside the Page Footer.</p>
<p>The problem is that I have 70 similar reports and if one day I need to change the footer structure I don´t wanna have to change 70 repor... | 2 | 1,710 |
Angular/PHP: upload file data in $_POST, not $_FILES | <p>I'm using <strong>AngularJS v1.6.1,</strong> <strong>Apache 2.4.10</strong> on Debian with <strong>PHP 5.6.24</strong> and I'm trying to upload a file to my server using <code>$http</code> POST service.
On my <code>php.ini</code>, max file size is set to 8Mo, max post size too, upload file is on, and memory size lim... | 2 | 1,251 |
Android Content provider Cursor returns 0 | <p>I have looked at this for a couple of days now and I completely can't work out why my content provider return 0 using the arguments I am passing it.</p>
<p>Here's my contentResolver code:</p>
<pre><code>String[] expenditureProjection = {
BusinessOpsDatabase.COL_EXPEND_CAT_ID,
BusinessOpsDat... | 2 | 1,447 |
.htaccess rewrite for date i.e. /2012/12/31 | <p>I am trying to create some rewrite rules to organize content by date via URL in a short, readable way.</p>
<p>i.e.</p>
<pre><code>http://mysite.com/post/index.php?a=Dave&b=2012&c=12&d=31&e=1
http://mysite.com/post/index.php?a=Dave&b=2012&c=12&d=31
http://mysite.com/post/index.php?a=Dave... | 2 | 1,272 |
How to set implementation of OncePerRequestFilter to filter only one endpoint | <p>Im using this Filter to log my requests and responses, it works very well, but I noticed that I didnt need actualy this filter for all my endpoints - it will be more efficient and enough to filtering and logging requests from only one endpoint.
Is it possible without making if statement in <code>afterRequest</code> ... | 2 | 1,865 |
How access sender object of one button in click event of another button | <p>I am working on Xamarin.Forms and I have two buttons in my ListView and they are treated as radio button. On click event I am changing image property of button so that it works as a radio button. But in my case I need to have one button selected at one time. If user clicks on one radio button, other radio button sho... | 2 | 1,265 |
Grouped bar chart turns into stacked bar chart ggplot | <p>I have an issue where a grouped bar chart made with ggplot unintentionally transforms into a stacked bar chart after minor changes in my dataset. I have the following initial dataset and bar chart:</p>
<pre><code>> DataT
Treatment Round N Initial sd se ci
1 EE 1 3 3000.000 ... | 2 | 1,665 |
Cross-origin request blocked when using AJAX | <p>Hey I just installed script on same host, twice, just different accounts.
The scripts worked fine, but for random reason, one of them started to drop all AJAX requests, and print the following messsage in Mozilla: </p>
<blockquote>
<p>Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remo... | 2 | 1,171 |
How to unserialize an ArrayObject | <p><strong>Note</strong>: I have tried using unserialize function but it say that first argument should be an string and not an Object and so my question - </p>
<p><strong>Q:</strong> How can I unserialize an ArrayObject in php, my ArrayObject contains:</p>
<pre><code>O:11:"ArrayObject":2:{s:14:"shoppingBasket";a:1:... | 2 | 1,722 |
How to configure two way ssl communication between two weblogic server? | <p>I am trying to do two way ssl communication. My server is deployed on one weblogic server and client on another. I have imported valid certificate at client side and trying to invoke webservice running on https.
I have written simple servelet class which invoke webservice on https. I have set following properties i... | 2 | 3,873 |
Retrieve data from firebase database to nested dictionary | <p>I'm having a lots of problems trying to retrieve data from the firebase database and moving that data to a unity dictionary.</p>
<p>So I would like to do this, to just retrieve the data one time and then place all the data to a dictionary, the problem is that I can't find the way to do it if the dictionary is a nes... | 2 | 1,418 |
IInAppBillingService Program type already present | <p>I just updated my CompileSDKVersion and TargetSDK Version to 27, and updated the dependencies accordingly, and now my app won't run, it's getting this error:</p>
<pre><code>Program type already present: com.android.vending.billing.IInAppBillingService
Message{kind=ERROR, text=Program type already present: com.andro... | 2 | 2,062 |
jqgrid AfterShowForm event | <p>I have a jqGrid with a function "MyFunction" in AfterShowForm event.</p>
<pre><code>MyFunction= function() {
alert("#MyElementId");
$("#MyElementId").attr("disabled", "true");
}
</code></pre>
<p>The code above works, but if I remove the alert does not work!!</p>
<p>Why?</p>
<p><strong>Edit</strong></p>
<p>The... | 2 | 1,097 |
Not able to persist to sql server database using persistence.xml | <p>I am new to java. I am trying to connect my application to SQL server database on my machine but getting following error: </p>
<pre><code>javax.persistence.PersistenceException:No Persistence provider for EntityManager named Sub: The following providers:
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactor... | 2 | 1,236 |
Nexus 4 - NFC AAR and Filter | <p>I'm writing the Static Handover Select Record on a Tag with the Wifi Protected Setup Configuration as specified in the NFC Forum. (SSID, Encryption, ...).</p>
<p>The type is <code>application/vnd.wfa.wsc</code></p>
<p>Additionally I add the Android Application Record as last NDEF Record into my NDEF Message.</p>
... | 2 | 1,657 |
Pymongo Query Filtering a versioned data | <p>Here's a sample data from my database:</p>
<pre><code> {'data':
[{'is_active': True, 'printer_name': 'A', 'vid': 14510},
{'is_active': True, 'printer_name': 'Changed A', 'vid': 14511}
]
},
{'data':
[{'is_active': False, 'printer_name': 'B', 'vid': 14512}]
}
</code></pre>
<p>The <code... | 2 | 1,230 |
Is there a way to programmatically activate Windows on Windows 7 | <p>I am working on a project where I need to activate Windows on a Windows 7 PC. I wrote the code below using the Windows Software Licensing API. MSDN says that the three functions used below require Windows 8 or Windows Server 2012 which suggests that these functions aren't available on Windows 7. But if I open slc... | 2 | 1,082 |
How can I make a recyclerView to take up to half the screen(max) in android constraint layout? | <p>I have a screen that contains 2 views, a map(top) and a recycler(bottom)
The rules are simple .</p>
<p>the recycler view is allowed to extend up to the middle of the screen, if more space is needed then it should scroll instead, the map will occupy the rest of the space, Of course if the recycler has less elements ... | 2 | 1,025 |
Add places API data in RecyclerView | <p>I am working on an android app that get places around the user and display it to him. I want to present the places to him on a <code>CardLayout</code> using the <code>RecyclerView</code> in a fragment. I tried to implement these but when I run the app on my device , it displays just a blank page while in the Logcat,... | 2 | 2,570 |
xcode iOS6 orientation landscape | <p>I see a lot of questions about this subject but am unable to find a solution to the problem I am experiencing. I have created an iPad app that should be Landscape only - it works fine when ran on any os prior to iOS6 but on iOS6 the app opens in portrait view. This screenshot shows what I mean (sorry not a great exp... | 2 | 1,358 |
how to add multiple containers inside a container in flutter | <p>I'm a student learning flutter. How do I add multiple containers to my flutter code. as shown in the right side picture. I was tried multiple times but alignments went wrong. can someone tell me where do I start to add another container set? I want to add 5 containers that display with xs, s, m,l, xl sizes texts. ca... | 2 | 2,309 |
tapply - creating NA? | <p>I'm trying to calculate the mean number of unique fruits per person (my usual practice data). This works perfectly well with both these lines of code: </p>
<pre><code>with(df, tapply(fruit, names, FUN = function(x) length(unique(x))))->uniques
sum(uniques)/length(unique(df$names))
aggregate(df[,"fruit"], by=lis... | 2 | 1,247 |
How to improve Lucene performance in a distributed environment? | <p>I'm facing long search times (order of 10s of seconds) while searching on a master - shard implementation in a distributed environment. However the same query via Luke returns in milliseconds.</p>
<p>The application is a distributed system. All the nodes share a common NFS mount where the indexes reside. For simpl... | 2 | 2,019 |
Android - basic download progress text | <p>I found a snippet online for showing a download's progress. The error I'm getting is <code>android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.</code> My goal is to have the phone download a file and then when completed, switch to the chapt... | 2 | 1,996 |
Using base64 images in pdfsharp html to pdf conversion | <p>I am trying to embed base64 images in HTML which will then be converted to PNG, normal images work fine but if I set the src to a base64 string is shows the broken image in my pdf:</p>
<p><a href="https://gyazo.com/7c86e05373b165840225e931cf5975c9" rel="nofollow noreferrer">https://gyazo.com/7c86e05373b165840225e93... | 2 | 1,447 |
Difference in dealing with ssl certificate in respect of browser and jvm? | <p>This is how browser deals with ssl certificate when connecting to https site</p>
<ol>
<li><p>When i type <a href="https://myDemoSite.com" rel="nofollow">https://myDemoSite.com</a> in browser , first of all my browser asks for the certificate from myDemoSite.com(due to https), then myDemoSite send that certificate t... | 2 | 1,064 |
XSD namespace "ns2" issue | <p>I have schema defined in Request.xsd which will refer common.xsd.
I'm expecting the output should come as below</p>
<pre><code><Request xmlns="http://ws.myref.com/schemas/test"
xmlns="http://ps.myref.com/schemas/2008/Common">
<EmailList>
<Mail>test@gmail.com</Mmail>
</Ema... | 2 | 1,089 |
How to toggle input fields based on dropdown menu with multiple selection | <p>I have a dropdown menu made by with multiple selection feature.
I also have some form inputs fields containing some divs, label and input tags.
I want to show a particular form field on selection of that particular item in select menu.</p>
<p>Lets say, I have</p>
<pre><code> <div class="col-md-6 col-12">... | 2 | 2,614 |
Attempted to load class Error Symfony 2 | <p>My problem is, I am trying to execute a command, but give me the next error:</p>
<blockquote>
<p>Attempted to load class "XMLReport" from namespace
"BusinessName\Core\LibraryDatabaseBundle\Repository". Did you
forget a "use" statement for
"BusinessName\Core\LibraryDatabaseBundle\Entity\XMLReport"?</p>
<... | 2 | 1,078 |
OMAP 3 Linux I2C SMBUS SmartBattery (SBS) not Detected | <p>I am working on an embedded Linux project with the OMAP 3730. We are using version 3.2.23 of the Kernel. I2C works fine and I can see various sensors from the board on bus #2. I2C bus #3 only has a Smart Battery attached and I can remove the power cord and the battery keeps the board running. The issue is that I can... | 2 | 1,144 |
Need to encode NSString for URL. CFURLCreateStringByAddingPercentEscapes mangling my strings | <p>My music player app needs to be able to send song, artist, and album names to Last.fm via the REST API. In order to properly POST these values I need to encode them so they are URL safe (replace &, /, +, etc.)</p>
<p>I've done a lot of research but I cannot find an answer that works for me. The most common answ... | 2 | 1,037 |
Kafka stops after a certain period of time, lost brokers | <p>I have 4 kafka running with debezium. After some days running well, three kafka machines get out of the network for a period of time and, on <code>connectDistributed.out</code> log file I have a lot of messages with the following error:</p>
<pre><code>[2020-05-04 13:27:02,526] WARN [Consumer clientId=connector-con... | 2 | 1,107 |
Facebook post not showing | <p>I created a app in facebook developers site and used the appId in my app and try to post in facebook, when i logged using the same fb account in my app and posted using my facebook, it posts successfully , but when i tried login with a different account its not posting...can any body help....</p>
<pre><code>import... | 2 | 2,775 |
Spring AMQP StatefulRetryOperationsInterceptor not used | <p>I am trying configure spring amqp to only retry a message a defined amount of times. Currently a message that fails e.g. because of a <code>DataIntegrityViolationException</code> is redelivered indefinitely.</p>
<p>According to the documentation <a href="http://docs.spring.io/spring-amqp/reference/htmlsingle/#retr... | 2 | 1,211 |
load on startup tag in web.xml | <p>am working on EJB 1.0 Application. I want to start my schedular servlet on jboss server startup for that i put.
<code><load-on-startup>1</load-on-startup></code> in my <code>web.xml</code>. After adding this tag to my application taking nearly 45 min to start. I don't know problem in that.</p>
... | 2 | 1,511 |
MP3 streaming in C# .NET 4.5.1 MVC 5.2.2 on Samsung 6S | <p>I have to use a TTS (Text to Speak) SaaS from <a href="http://www.readspeaker.com/" rel="nofollow noreferrer">ReadSpeaker</a> in order to add audio to the application that I am developing. </p>
<p>Now the basic SCAPI account that we are currently using has a basic setup were you simply set a URL and get a MP3 strea... | 2 | 1,122 |
interface OpenCV's Mat containers with blas for matrix multiplication | <p>I am processing UHD (2160 x 3840) images.
One of the processing I do consist to process a Sobel filtering on X and Y axis then I have to multiply every output matrix by it's transpose and then I process the gradient image as the square root of the sum of the gradient.</p>
<p>So : S = sqrt( S_x * S_x^t + S_y * S_y^t... | 2 | 1,835 |
Rspec similar code for testing DELETE request gives different results | <p>Following Michael Hartl's book on Ruby on Rails, I can't seem to understand why one of the tests pass and another fails, considering they do mostly the same. This derives from testing <code>UsersController#destroy</code> from Exercise 9.6-9.</p>
<p>This is my <code>spec/requests/user_pages_spec.rb</code>:</p>
<pre... | 2 | 5,915 |
'str' object has no attribute 'attname' | <p>I am trying to display a link to the next and previous object according the title field using get_next_or_previous_by_FIELD. Django 1.6 is throwing me this error.</p>
<p>Error during template rendering
<code>'str' object has no attribute 'attname'</code></p>
<p>Error occurs here in template. </p>
<p><code>{% wit... | 2 | 2,885 |
Flutter Kotlin Get Data from Broadcast receiver | <p>I'm trying to have my own bluetooth kotlin implementation, but am running into a problem. </p>
<p>I am starting a broadcast receiver for scanning bluetooth devices by following the kotlin tutorial <a href="https://developer.android.com/guide/topics/connectivity/bluetooth#kotlin" rel="nofollow noreferrer">here</a>. ... | 2 | 2,114 |
RabbitMQ app install - /usr/bin/env: escript: No such file or directory | <p>I'm attempting to build a chat app built in <code>rabbitmq</code> from <a href="https://github.com/videlalvaro/rabbitmq-chat" rel="nofollow">https://github.com/videlalvaro/rabbitmq-chat</a> but ran into this problem when doing a <code>make</code>:</p>
<pre><code>...
inflating: deps/rabbit_common/ebin/rabbit_msg_sto... | 2 | 2,288 |
Getting ArrayIndexOutOfBoundsException in Adapter | <p>I am displaying data in a recyclerview. I am using Firebase Firestore. Here is how I am setting up my Adapter in MainActivity: </p>
<pre><code>@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
setUpRecyclerView();... | 2 | 2,179 |
How to change textcolor of textview in listview depending on it's value? | <p>I'm having difficulties changing textview's textcolor in my listview.</p>
<p>I have a row that consists of more than one textview but only one textview is visible.</p>
<p>I want the text of that textview to change the color of textview depending on the other textview's value in that row. I'm pretty sure you'll und... | 2 | 1,456 |
How to show-or-hide image loader in the row that button clicked on it in jquery? | <p>I have a grid view with update panel and I set an image loader when the post back occur, But when I click on one button in for example row 5, all of loader display inline,but i just need to show the exactly image loader near my button that i click on it,How can I do that in j query or java script? </p>
<pre><code>... | 2 | 3,484 |
Docker with .NET core: How to run 2 apps (.Net Core Api and .Net React) on a docker (Docker for Windows (linux))? | <p>I have 2 projects(Diagnostique.FO and Diagnostique.BO) in my solution, i want to execute all my projects using Docker.</p>
<ol>
<li>Diagnostique.BO project is ASP.NET CORE API project (CORE 2.1).</li>
<li>Diagnostique.FO Project is ASP.NET CORE React.js project (CORE 2.1).</li>
</ol>
<p>The 2 projects are independ... | 2 | 3,486 |
osgi spring hibernate virgo example ClassNotFoundException: org.hibernate.cfg.Configuration | <p>I'm trying to build very simple app that saving data to DB run as osgi bundle (under Virgo).
When I try to upload jar to virgo trough webinterface, and get next error.</p>
<pre><code>[2011-02-13 23:19:26.317] start-signalling-4 org.eclipse.virgo.medic.eventlog.default DE0006E Start... | 2 | 4,557 |
rails s throws an error extconf failed, exit code 1 | <p>I run 'rails s' in a rails app folder and get the following</p>
<pre><code>extconf failed, exit code 1
Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.2/gems/debugger-1.6.8 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0-static/debugger-1.6.8/gem_m... | 2 | 3,463 |
Use jquery datatable in angular6 | <p>I am new to angular and i want to implement jquery datatable in my project.When i implement in a demo project it working perfectly but when i implement on my working project it shows an error,below is my codes</p>
<p>my angular.json file</p>
<p>here i add </p>
<pre><code> "styles": [
"node_modules/dat... | 2 | 1,977 |
adjust date range of bootstrap datepicker dynamically | <p>I need help to adjust date range of date picker dynamically based on data-value selected on dropdown list. I've tried with code i written below but it just didnt work.</p>
<p>I use bootstrap, jquery, and bootstrap datepicker.</p>
<p>Here is my code</p>
<pre><code><link rel="stylesheet" href="<?php echo base... | 2 | 2,548 |
How to update volume bar in MinimalMediaRouteProvider | <p>I am using <a href="https://developers.google.com/cast/reference/android/javadoc/reference/com/google/cast/MediaRouteHelper#registerMinimalMediaRouteProvider%28com.google.cast.CastContext,%20com.google.cast.MediaRouteAdapter%29" rel="nofollow noreferrer">registerMediaRouteProvider</a> and it gives you a volume bar t... | 2 | 2,422 |
Select a range of number | <p>Query:</p>
<pre><code>SELECT nummer
FROM tabell_med_nummer
WHERE SUBSTR(nummer, -1) = 0
</code></pre>
<p>This query selects a number in the table tabell_med_nummer, that ends with "0". For example it will select 1000, 1010, 1020, but not 1001, 1002 and so on.</p>
<p>I need to get a range based on this. For e... | 2 | 1,204 |
Import Excel Data to Mongodb using Java | <p>Tried Importing Excel Data to Mongo db in the Following Document Format</p>
<pre><code>[
{"productId":"",
"programeName":"",
"programeThumbImageURL":"",
"programeURL":"",
"programEditors":["editor1","editor2"],
"programChapters":[
{
"chapterName":"chapter1",
"authorNames":["authorName1","authorname2"]
},
{"chapterN... | 2 | 1,286 |
jquery show hide div on hover and retain visibility until mouseout | <p>I have select language drop down menu.</p>
<p>When the Flag is hovered it should display the language options and remain showed. When the mouse leaves the language options or when the flag is hovered again the language options should be hidden. I tried but it is showing and hiding instantly.</p>
<p>Html:</p>
<pre... | 2 | 1,611 |
Exception not being caught in mulesoft | <p>I am working on an app and in case any exception occurs it prints the exception message appropriately.Here is my custom filter</p>
<pre><code> package filter;
import java.io.IOException;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.Servlet... | 2 | 1,965 |
QWebTemplateNotFound: External ID not found in the system: account.report_invoice_custom | <p>I have received a module written for v7 that I wish to port to v8. There is a report written in RML that I supposed to work on v8 (RML is deprecated but still functional correct?) The report is declared as following:</p>
<pre><code> <report
auto="False"
id="account.account_invoices"
mo... | 2 | 5,162 |
How to call multiple function in react hooks | <p>Here I am using, to call Modal which when the user clicks the particular button it will show a multiple dropdown button and while updating the button it will call the Modal to ask why and the user will insert some data and it will update.
<strong>i am using a react Hooks.</strong></p>
<p>1.Main.js</p>
<p><strong>f... | 2 | 1,342 |
Error creating bean with name 'entityManagerFactory' , 'dataSource' and 'delegatingApplicationListener' | <p>I need some help.
I have a Spring project and I'm migrating to a Spring Boot project. but I'm having some issue.
could you help me?</p>
<p>this is the problem</p>
<pre><code>2017-05-30 07:39:32.067 INFO 60280 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' an... | 2 | 3,220 |
Is it possible to select the exact password to a username in a database? | <p>I have created a database with a table (<code>UserPass</code>) which essentially stores Usernames and Passwords.</p>
<p>Now in my form I want to ask a user to input his username and password and while testing this, I realized that I can input any username from the database and any password to login.</p>
<p>Is it p... | 2 | 1,582 |
Recaptcha Translations | <p>I am trying to use reCAPTCHA.net's captcha service, however I would like to use the custom translations (<a href="https://developers.google.com/recaptcha/docs/customization#i18n" rel="nofollow noreferrer">https://developers.google.com/recaptcha/docs/customization#i18n</a>) as the built in ones do not cover all the l... | 2 | 1,767 |
Saving Canvas Image to Server with Javascript+PHP | <p>I have implemented a system where people can report from when to when they have visited a customer, and what they have done there. Now i want to add a function that lets the customers sign the specified service. They can rewiew the reported data, and under this overview i have implemented an HTML5 canvas with signat... | 2 | 2,431 |
trouble with solrnet when swapping cores | <p>I'm using SolrNet.0.3.1 and SolrNet.Ninject.0.3.1 in an ASP.NET MVC 3 app pointing to a Solr 3.4 instance. </p>
<p>I'm using multiple cores so I can test out schema changes on a second core without breaking the app. Multiple cores are not the problem per se; the app happily uses "core-live" while I'm beating "core-... | 2 | 2,125 |
xcode restoreCompletedTransactions not working in sandbox with Apple hosted content | <p>I have a number of apps in the app store but am having a problem with my first in-app purchase.
I'm testing with xcode 5 on an iPad with a number of test users in the sandbox.
The in-app purchases are for additional video files hosted by Apple.</p>
<p>The original purchases and video downloads go fine. Restores of... | 2 | 1,120 |
CRM Dynamics How to get the current user view url in c# code | <p>I have a scenario in CRM where I have a MVC application that connect to CRM and user uploads an excel file with data, that data gets validated against a proc the validated results(records) are then created in CRM using the MVC Application. After the records are created I then send an email to the logged in user's ma... | 2 | 1,276 |
Unable to pip install aiohttp python | <p>Actually I'm just trying to install discord via pip and after some initial trouble achieving this. However I still get a traceback error.
"ModuleNotFoundError: No module named 'aiohttp'"
I tried so much now, via pip there is again an error:</p>
<pre><code>Microsoft Windows [Version 10.0.17134.285]
(c) 2018 Microso... | 2 | 2,976 |
Share PHAsset stored in camera roll using UIActivityViewController | <p>I'm storing images and videos in a Camera Roll album using PhotoKit, and want to allow the user to share them using UIActivityViewController. If I pass UIActivityViewController a UIImage instance, it works as expected, probably because the image data is passed in memory. However, videos need to be passed by URL beca... | 2 | 1,195 |
Make a delete button for RecyclerView in Kotlin | <p>This is my first app in Kotlin, but I don't think I am understanding well the logic. I am trying to make a delete button for every single element in a List with Recycler View:</p>
<p>my MusicianRecyclerAdapter:</p>
<pre><code>package com.example.genremusicians
import android.content.Context
import android.content.I... | 2 | 2,463 |
cannot run android app with own class which extends SeekBar | <p>I'm trying to write an extension to SeekBar to customise it's behaviour. </p>
<p>I'm having problems getting the most basic form of the new class to run in the emulator.</p>
<p>I can't even get a class that doesn't add any new functionality to start up.</p>
<p>Can anybody tell me what basic thing I'm missing out... | 2 | 4,966 |
getting "Not Found (JIRA::HTTPError)" while using jira-ruby gem | <p>I am trying to execute jira-ruby(<a href="https://github.com/sumoheavy/jira-ruby" rel="nofollow">https://github.com/sumoheavy/jira-ruby</a>) command line example program.</p>
<pre><code> username = "username"
password = "password"
options = {
:username => username,
:password => passwor... | 2 | 1,512 |
Woocommerce Hide Shipping method based on category | <p>I am trying to disabel/hide a shipping method based on a category in Woocommerce (2.1.12).</p>
<p>I successfully achieved hiding a paymeny method using this function:</p>
<pre><code>function filter_gateways($gateways){
$category_ID = array('14'); // <----------- add the ids for which u want to turn off "ca... | 2 | 1,391 |
Unique array values with callback | <p>SO,</p>
<p><strong>Problem</strong></p>
<p><em>First case</em></p>
<p>I have an array with some values - for start, let them all be strings (or can be plainly treated as strings). Example:</p>
<pre><code>$rgData = ['foo', 'feo', 'bar', 'baz', 'bee'];
</code></pre>
<p>Now, I want to create unique array from this... | 2 | 1,544 |
Using xslt to parse and then format names | <p>I'm attempting to write an XSLT stylesheet that will handle author's names and create APA versions of the citation. The format for APA citation regarding author's name(s): Names are listed last name, then initials, if name(s) is the first element of the citation. Separate names with a comma, and an ampersand (&)... | 2 | 1,861 |
How to select first item in javascript object using javascript? | <p>I am quite new to javascript/angular and was pondering whether or not there is an easy way to grab the first item in a javascript object/array. </p>
<p>EDIT: I do have control at this point in time in how I format the array, so perhaps there is a better way to do this using ID as keys?</p>
<p>Lets say I want to ma... | 2 | 1,116 |
how to get over these maven/m2eclipse issues | <p>(first, I admit, I have no love for maven/m2eclipse, but it wouldn't be that bad if I could figure out how to overcome these issues)</p>
<p>I am using maven/m2eclipse. m2eclipse is the only good way I know of to suck in the maven jars. Some of these may not have solutions(but I am hoping to be surprised). Maybe ... | 2 | 1,053 |
How to get specific HTML control from a <table><tr><td></td></tr></table> and append the selected control to the same <td>? | <p>I've following table in HTML:</p>
<pre><code><table id="blacklistgrid_1" class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th style="vertical-align:middle">Products</th>
<th style="vertical-align:middle">Pack Of</th>
<th style... | 2 | 2,053 |
Suffix Array Construction O(N LogN) - Competitive Programming 3 Steven Halim | <p>I reading up the book Competitive Programming 3 by Steven Halim and Felix Halim</p>
<p>I'm reading the chapter on Strings.I'm trying to understand the suffix array construction algorithm. I dont understand the radix sort part. (Although, I understand how radix sort and counting sort works)</p>
<p>Here is the... | 2 | 1,187 |
Angular 4 JWT Http Interceptor doesn't work on chain requests | <p>I've implemented http interceptor for new HttpClient and everything works fine, token is refreshed for single request, but if I try to access the route which lazy load data from two api's I received an error and my JWT token is blacklisted.</p>
<p><strong>Laravel Backend Token Refresh Method:</strong></p>
<pre><co... | 2 | 1,685 |
How could I detect an Intent with a context ? (node.js SDK for Dialogflow API V2) | <p>How could I detect an Intent with a context ?</p>
<p>I defined an Intent "Book" with an input Context "Activity", then trained my bot with "Book this activity in my schedule".
I don't want to use dialog flow to manage context flow because it may evolve from other inputs in my app. So I want pass it as a parameter f... | 2 | 1,226 |
Cannot Read Bytes from an FTDI Serial I2C to Android Eclipse Java app | <p>I have an FTDI UMFT201XB (I2C serial USB Interface) connected to an android 4.2 tablet through a OTG cable. The FTDI is connected to a PIC MCU. I have run the example TN-147 from FTDI and the device is recognized correctly.</p>
<p>I have modded the TN-147 example to read 12 bytes that the MCU has send to UMFT201XB.... | 2 | 1,359 |
While loop foreach returning values that are repeated in next for loop | <p>What is happening in my code is I'm passing a keyword through a query. For each keyword I want to run the array get the results for that keyword and insert them into my database.</p>
<p>The issue I'm running into is that instead of getting keyword inspiration and passing that through once it carries the value from ... | 2 | 1,114 |
Present view controller while current view controller has a UITabBar but no UITabBarController | <p>I have a <code>UIViewController</code> with a <code>UITabBar</code> at top of it. I am not using a <code>UITabBarController</code> because I need the <code>UITabBar</code> at the top and not at the bottom of the view. Here is my current view controller :</p>
<pre><code>class CustomTabBarController: UIViewController... | 2 | 1,119 |
How to update my table in my MVC pattern program | <p>I have created a program using a version of MVC architecture. The purpose of the code is to scrape the h1 titles of a list of webpages and to return the results to a JTable. </p>
<p>So far I have the program working fine. It's returning the results just as I want them to but it doesn't update the table until the ve... | 2 | 2,074 |
How to change the Menu colour when selected? | <p>I have created a menu in my asp.net website and I want the active Menu item in the menu to be highlighted when it is clicked. That is usually the menu is White but when the user choose any of the menu then it should become red. Please find below what I have tried so far:</p>
<p>Jquery:</p>
<pre><code> <head run... | 2 | 1,604 |
Caused by: java.lang.NoSuchMethodError: 'java.lang.String javax.servlet.ServletContext.getVirtualServerName()' | <p>I'm trying to create a Gradle project to register Eureka services. Main method configuration:</p>
<pre><code>import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
@SpringBootA... | 2 | 7,883 |
SimpleXMLElement' is not allowed in session_write_close() | <p>Im not sure what to do. im trying to make a session with my string inside of my function and parse the session outside of it , if that makes sense.... but im getting this error "SimpleXMLElement' is not allowed in session_write_close()" any suggestions on what i can do to solve it?</p>
<pre><code>function api_info(... | 2 | 1,177 |
Rails - wrong number of arguments(1 for 0) for a newly generated Rails app? | <p>I just setup a new rails app, and I uses <code>rails generate controller Pages</code> to create a blank page controller, then I added empty methods and views. I changed the route.rb to redirect to <code>pages/:action</code>, so it should display <code>foo.html.erb</code> for <code>pages/foo</code>. However, I have t... | 2 | 2,715 |
Populate Observable collection from XML file in project (WPF) | <p>I Have XML file in my project</p>
<p>Here is it</p>
<pre><code> <?xml version="1.0"?>
<catalog>
<car id="1">
<model>Scoda Fabia</model>
<year>2011</year>
<producer>Folkwagen</producer>
<price>6000</price>
<owner&... | 2 | 2,112 |
Parsing Nested JSON in Swift 4 with codable | <p>I am trying to parse JSON using decodable in Swift 4</p>
<p>The JSON is as below:</p>
<pre><code>{
"_id": {
"$oid": "5afceaa0c1743f37b4ee1cf8"
},
"Con_id": "xxx",
"S_id": "xxx",
"I_Image": [
{
"$binary": {
"base64": "",
"subType": "00"
}
}
],
"T_Agreements": [
... | 2 | 5,670 |
react-native-camera convert Image base64 to jpeg | <p>I've managed to use <code>react-native-camera</code> to take an image then display it in the <code><Image></code> element, then send the image's <strong>base64</strong> string back to my back-end, however, I can't manage to display the image once it is on my back-end because it's in base64, the image is displa... | 2 | 1,755 |
How do I disable a CSS line that is causing a bug in IE7? | <p>My users with IE7 were reporting that borders were missing for the second column in tables. I was finally able to track down what's causing it--a single line in telerik.common.css which is included because various pages on the site use Telerik's MVC extensions.</p>
<p>I would like to be able to disable just that o... | 2 | 1,287 |
Creating a parsing dictionary to use with sys.argv | <p>I'm trying to make a very basic script that utilises TkInter to draw lines based on user input. The user will execute the script through a command line, using parameters to determine the lines drawn.</p>
<p>The possible commands are:</p>
<pre><code>(# signifies any whole number the user chooses)
P # (selects a ... | 2 | 1,445 |
Setting up Gitlab using Docker on Windows host, issue with shared folders | <p><strong>TLDR;</strong></p>
<p>Does anyone know how to solve the "Failed asserting that ownership of "/var/opt/gitlab/git-data" was git" error?</p>
<p><strong>Background:</strong></p>
<p>I want to set up the <a href="https://hub.docker.com/r/gitlab/gitlab-ce/" rel="nofollow noreferrer">Gitlab Docker</a> on Windows... | 2 | 3,113 |
Avoid refreshing the page at pagination | <p>I want to avoid refreshing page when i switch the pages using pagination from Laravel because when I switch the page from 1 to page 2, It redirects to the parent page. How can I avoid reloading page when i switch the pages? I have 2 tabs at <code>Invitation</code> - <code>Received</code> and <code>Initiated</code>. ... | 2 | 7,430 |
EJB lookup with InitialContext | <p>I have a problem to look up a EJB hosted on a server. The server itself is an SAP environment, which is basicly a modified tomcat.</p>
<p>I tried several lookupstrings starting with </p>
<pre><code>java:comp/env/
</code></pre>
<p>and </p>
<pre><code>ejb:/
</code></pre>
<p>but nothing works.</p>
<p>This is w... | 2 | 2,065 |
Is it possible to write a C++ template to check for a constructor's existence? | <p>This question is in spirit a follow-on from this question from another user, which has some excellent answers:
<a href="https://stackoverflow.com/questions/257288/is-it-possible-to-write-a-c-template-to-check-for-a-functions-existence">Is it possible to write a template to check for a function's existence?</a></... | 2 | 1,334 |
scipy.integrate.ode, issue with function returning tuple | <p>So I've written a function to use a particular solver type to integrate a couple system of ODEs. For some reason, which I can't quite get a handle on, the function I wrote to define the RHS of the ODE is returning a tuple when run inside the integrating function (or so the error indicates), but whenever I test the a... | 2 | 1,146 |
GridView CheckBox If checked is defaulted but users unchecks, on postback checkbox is still checked | <p>I have a page with 5 grids. The first field in each grid is a within a template. Upon pageload and if not postback i set this checked box .checked based on return from database. </p>
<p>If the user unchecks the checkbox, this checkeboxed.checked = false is not being preserved on postback. Interesting enough, i... | 2 | 2,107 |
Communication between injected iframe and content script -- message passing via background page | <p>I am injecting an <code>iframe</code> in a <code>tab</code>. Now inside the the <code>iframe</code>, based on user's actions, I need to show some <code>error/warning/success notifications</code>. However I want to display these notifications in the <code>tab</code> not in <code>iframe</code>. So I need to communicat... | 2 | 1,755 |
Unable to setup Kubernetes Ingress for QuestDB via Helm | <p>I'm a beginner to Kubernetes, Helm and Yaml. I'm trying to access the QuestDB Console via Kubernetes Ingress Controller setup in my minikube, but i'm getting the below error when running a helm upgrade. Could anyone advice how I can correct this?</p>
<pre><code>Error: UPGRADE FAILED: failed to create resource: Ingre... | 2 | 1,577 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.