title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
undefined is not a function (evaluating 'fetch('apiurl')') | <p>I am using below versions</p>
<ol>
<li>react-native-router-flux ^3.39.1 </li>
<li>react-native 0.44.0</li>
</ol>
<p>I expecting that will call API which I am using with "fetch"
Have used componentDidMount but it's showing another error</p>
<blockquote>
<p>undefined is not an object (evaluating 'this._component.... | 3 | 3,902 |
Unrecognized selector sent to instance when using UIPanGesture | <p>Hi I am trying to add UIPanGestureRecognizer to UIImageView (in my case, it's an emoji). All other UIGestureRecognizers such as long press, rotation, and pinch work well. However, it gives me an error: unrecognized selector sent to instance when I add UIPanGestureRecognizer. I've spent a day trying to figure out the... | 3 | 1,549 |
Render multiple pixels using OpenGL ES 2.0 | <p>To tell from the beginning, I'm very novice within OpenGL world but I need to use it for some rendering optimisations in Android. I have to render a block or a bunch of contiguous pixels in a 2D space using OpenGL ES 2.0. I've found some suitable solutions, however (<a href="https://stackoverflow.com/questions/14083... | 3 | 3,285 |
HDF5 Attribute unsigned long long value | <p>When I try and add an unsigned long long attribute to a dataset, the attribute is added but not the value. Using a similiar method for an integer seems to work file.</p>
<p>Am using HDF view to view the attributes. The attribute names are displayed, but for the unsigned long long attributes, the values are not vi... | 3 | 1,235 |
Kivy: Why Button is losing its property in case 2? | <p><em><strong>This question seems long but isn't. Just added code and corresponding logs for viewers reference.</strong></em></p>
<p>I'm experimenting with Clock.schedule_interval.</p>
<p><strong>Objective</strong>: <em>Upon button press, label text initially 0 will be increment 10 times.</em></p>
<p>I have written th... | 3 | 5,723 |
HashMap value (object) incorrectly overridden with incorrect value | <p>I am iterating over a hashmap that is made of string keys and has objects as values and I am setting the attributes of the objects. The value of my hashmap is an object which has other objects as attributes. The problem is that once I set the value for the first object with key "1-1", in the second iteration when I... | 3 | 1,056 |
How to use AWK with string as a RS? | <p>I want to use AWK, but I don't seem to get the first record right. I hope anyone can help to get it right.</p>
<p>I have this file, every record is 3 lines but sometimes it has 4 lines (so there is a $3 and $4). My goal is to print all three lines of each record, and if there is a forth line I want also to print th... | 3 | 2,988 |
Extra cost for shipping method based on product categories | <p>I'm trying to add extra cost (with $multiplier) to user selected shipping method based on product category.</p>
<p>So, I need to check if any of products in cart is on $product_category_id .
And if so then I need to multiply selected shipping cost to $multiplier value.</p>
<p>This $multiplier should be applied to ... | 3 | 1,148 |
how to find nearest lower and upper value of sp? | <p>Example:</p>
<pre><code>Array
(
[0] => stdClass Object
(
[Big] => 1.32
[FAN_MODEL] => AFPV3G-500-2800
[FAN_DIA] => 500
[FAN_RPM] => 2800
[FAN_SERIES_NAME] => AFPV3G
[BigVALUE] => 26.00
[FAN_CMH] => 10000
[BigPEAK_POWER] =>... | 3 | 2,219 |
Error after updgrading from EF 5 to EF 6.0.2 | <p>After upgrading from EF 5 to EF 6.0.2 I'm getting this error when executing the <code>Update-Database</code> command from the <code>Package Manager Console</code>:</p>
<blockquote>
<p>Could not load file or assembly 'System.Web.Helpers, Version=3.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one o... | 3 | 1,539 |
GetImage with JApplet | <p>I have the following runnable code:</p>
<pre><code>import java.awt.Graphics;
import javax.swing.ImageIcon;
import javax.swing.JApplet;
import javax.swing.JPanel;
public class Main extends JApplet{
public static Main instance;
public static ImageIcon getImage(String fname){
return new ImageIcon(in... | 3 | 1,112 |
How to add round corners to a Circular Progress Bar in Android? | <p>Hello I am trying to design a Circular bar progess component. I have managed to do this, but I can't get to design the circle round corners.</p>
<p>For the moment I have this:</p>
<p><a href="https://i.stack.imgur.com/1QOVZ.jpg" rel="nofollow noreferrer">Example 1</a></p>
<p>Here is the code that I am using:</p>
<p>... | 3 | 1,697 |
maven springboot test not running integration tests with specific datasource bean | <p>I have been struggling for a couple of days with spring testing.
We are using maven-failsafe-plugin and using docker containers for our two specific databases.</p>
<p>But when we include the non-primary datasource configuration, no tests are run.</p>
<p>So config is (docker-maven-plugin sets the ip/host system prope... | 3 | 1,986 |
Compatibility issues with H2O.ai Hadoop on MapR 6.0 via python API? | <p>Having apparent compatibility issues running H2O (via the 3.18.0.2 MapR 5.2 <a href="http://h2o-release.s3.amazonaws.com/h2o/rel-wolpert/2/index.html" rel="nofollow noreferrer">driver</a> (trying with the latest driver (3.20.0.7) as recommended in another SO <a href="https://stackoverflow.com/a/43795304/8236733">pos... | 3 | 2,742 |
SuggestBox in GWT not scrolling with keyboard | <p>I'm using gwt-suggestbox (GWT 2.4) in my project. It contains huge number of records so I put scroll here.</p>
<p>When I scroll with mouse its showing all records, but when I use my keyboard down/up keys records don't show, and keyboard scroll not working.</p>
<pre><code>SuggestBox suggestbox = new SuggestBox(getC... | 3 | 1,070 |
Pass current item position to inner class? | <p>How can I pass the current Hashmap key position to my inner class?</p>
<p>I need to pass data.get(position) to my inner class Click. Normally I would declare it final, but I'm not seeing how this is done in this case?</p>
<pre><code> public class UpcomingGridViewAdapter extends BaseAdapter {
public boolean... | 3 | 1,332 |
CSS navbar background showing up as white instead of transparent | <p>My navbar background keeps showing up as white instead of transparent no matter what I do.</p>
<p>CSS</p>
<pre><code>body{
margin: 0;
line-height: 1.5;
font-size: 16px;
}
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
a{
text-decoration: none;
}
:before,:after{
box-sizing: bor... | 3 | 1,807 |
Firestore: Checking NotNull in a transaction and impede from calling the OnSuccessful callback | <p>In the function <code>apply</code> of my Firestore transaction, I've written <code>DocumentSnapshot snapshot = transaction.get(xyz);</code> so that I get a reference to the document snapshot. I want to read one of it fields, but before I should check this field is contained (<code>if(snapshot.contains("the field"))<... | 3 | 1,441 |
JS fade in not working correctly | <p>I have searched for about 2 hours now and I just can't get a hold of this. </p>
<p>I am using bootstrap and I want to have three columns with "col-xs-6" placed next to each other. However, when I click the button, I want the outer column that is visible to collapse in and the column on the other side to show up. Th... | 3 | 1,186 |
How to get the uiimage currently showing in a uiscrollview? | <p>I have the following code that takes an array of nsdictionaries that contain the path to a uiimage and add them one by one to the uiscrollview. </p>
<pre><code>- (void)displayAssets:(NSArray*)postAssets //configured for search
{
for (UIView *v in self.scrollview.subviews) {
[v removeFromSuperview];
... | 3 | 1,058 |
Div does not refresh after opinion insert to array | <p>i insert some values to my array (array and output is viewed in console after insert) but html content does not refresh (I must press F5 and then content comes out).
Thank you for help (I am using jquery/js).</p>
<pre><code>
if(localStorage.myTreesComments){
opinions=JSON.parse(localStorage.myTreesComments);
}
c... | 3 | 1,809 |
how to retrospectively adjust columns in Pandas so it loops through and adjusts the subsquent columns | <p>thanks in advance. apologies for the awful title i couldnt work out how to put it into words</p>
<p>i currently have a program writtin in python with Pandas that goes through stock data and tests my trading strategy. i was looking to expand on the complexity but i have hit a road block. i ahve it set up to return a... | 3 | 1,297 |
How do I add cases to the switch statement for this terminal emulator codepen? | <p>I am editing the script of this codepen: <a href="https://codepen.io/rafael-casachi/pen/qLEeJV" rel="nofollow noreferrer">https://codepen.io/rafael-casachi/pen/qLEeJV</a>
to use on my website, but I can’t figure out how to add more cases to the switch statement that will perform the functions I need. Here’s what I ... | 3 | 1,245 |
Angular 2 Access input value of a different routed component via ngOnInit? | <ol>
<li><p>I have a search bar in <code>app.component.ts</code> that has an input value.</p></li>
<li><p><code>results.component.ts</code> is embedded with a router-outlet in <code>app.component.html</code></p></li>
<li><p>When <code>results.component.ts</code> is the current activated route, the search works fine and... | 3 | 1,175 |
app crashes after exiting? | <p>I am making an app in which multiple HorizontalScrollview ,Overall the app runs well but when the user exit Boom app crashes , logcast tells me that it has multiple markers in onPostExecute :</p>
<pre><code>rootView = inflater.inflate(R.layout.three_fragment, container, false);
L1= (LinearLayout) rootView.findV... | 3 | 1,304 |
PHP code not outputting what I need it to. How can I fix this? | <p>I posted the other day with errors that I needed help fixing and it seems that I have got them fixed but I ran into another issue. My code is made to take user inputs for an invoice and when they click submit I want it to output 'This Invoice is %y years, %m months, and %d days. I can't seem to get my code to work c... | 3 | 2,332 |
How do I make my ArrayList<ColorSaver> persistent in android? | <p>I have the <code>ArrayList</code>...</p>
<pre><code> ArrayList<ColorSaver> tempList = new ArrayList<ColorSaver>();
</code></pre>
<p>and I want it so that when the user closes the app or leaves the app, all the <code>ColorSaver</code> objects in the <code>ArrayList</code> will be there when the user reo... | 3 | 5,787 |
How to consider cos(phi) & cos(psi) in my following code to calculate the received optical power for VLC LED system? | <p>dears. I am trying to implement Matlab's indoor visible light communication system to calculate the optical received power. And I successfully made a line of sight calculation for the power between the source LED and the receiver PD based on the following formula,</p>
<p><a href="https://i.stack.imgur.com/SQ2ZT.png"... | 3 | 1,475 |
Apache Flink - External Jar | <p>i'm trying to create a Flink application using maven and an extra dependency : </p>
<pre><code> <dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>8.2.2.jre11</version>
</dependency>
</code></pre>
... | 3 | 5,925 |
Redirect a route to admin panel of Typo3 in Laravel | <p>My directory structure of Laravel site look like this...</p>
<pre><code>app
bootstrap
...
public
resources
routes
storage
typo3Folder
...
</code></pre>
<p>I want if User hit <strong>www.example.com/admin</strong>, it redirect to this typo3 sub-folder
contents which is Typo3 Admin Panel..</p>
<blockquote>
<p>typ... | 3 | 7,661 |
Hoverable nav icons | <p>I am trying to do an icon navbar where on hover the icon also hovers the same colour, I have the icon sort of positioned but at the same time I can't push it to the right or it disappears.</p>
<p>The main goal is pretty much put the icon to the left of the a href with about 3px of padding of the right so it's not t... | 3 | 1,097 |
Angular: assign and access promise via rootScope | <p>I would like to use a promise and access it through a rootScope instead of using return statement. The problem I am having is that promise is getting resolved before my resolve finishes. In the code below, successFunction in my ajax call is getting executed before my defer.resolve() is completed. Is there anyway I c... | 3 | 1,317 |
Run Time Error '424' Object Required | <p>i'm Going to make the Copy Paste file using dialogbox, i successfully copy and paste the data to the desire sheets and cell but in the VBA Appear Run Time Error '424' Object Required message box. sorry for the mess i'm new for this. would really appreciate for the help to figure whats the problem and how to fix it :... | 3 | 1,605 |
Trouble with recursive python file copy program | <p>I've recently started learning python and am having some trouble. The functions in question attempt to start at a given directorty, in my case, '/home/jesse/ostest', search through all of the sub-directories, and copy all '.txt' files to '/home/jesse/COPIES'. When I run the program, a few files get coppied but it ge... | 3 | 1,156 |
I want to make my radio buttons sticky in my form in php? | <p>My form has some radio buttons and I wish to make them sticky so when the user goes back to the form to fill it again after getting errors, the value he previously entered should be their for radio buttons as well. Sticky form is working for all the other inputs but not radio buttons?</p>
<p>html code</p>
<pre><code... | 3 | 5,937 |
How to set default browser size with Capybara + Selenium + Firefox? | <p>Looking at <a href="https://gist.github.com/mars/6957187#gistcomment-3019727" rel="nofollow noreferrer">https://gist.github.com/mars/6957187#gistcomment-3019727</a> and several other places, it appears that the way to change the default options is to overwrite the driver registration with your own code. Here's my dr... | 3 | 1,662 |
Convert Access database to late binding to work with Access runtime | <p>I wrote code in Access database 2016 contains functions and macros, then I move this file to share with some users that don't have Access Application so, I install Access runtime it works well but I face many problems with reference libraries.
I decided to use late binding (by writing EarlyBinding = 0 in a database... | 3 | 1,790 |
Having trouble to build a package on Mac OSX | <p>I am not sure if this is the right place to ask this question, so apologies in case this is not the right place. Here is my question:
I am trying to build <a href="https://github.com/Microsoft/AirSim" rel="nofollow noreferrer">this</a> github repository which is a Microsoft repository for simulating drones and cars... | 3 | 2,080 |
android dynamically created spinner not scrolling | <p>I have created a layout dynamically and added spinner and swipe layout to it via code in a fragment instead of xml files.</p>
<p>Everything works fine except that the spinner does not scroll.</p>
<p>The spinner's onItemSelected methods works fine though.</p>
<p>Here is the code inside onCreate method of the Fragm... | 3 | 2,242 |
Star rating system problem, need to click twice for it to be highlighted | <p>I have problem with my star rating system. The star rating functioning well, but the star only be highlighted when I clicked it twice. For example, if I want to rate 3/5, I will need to click the star number 3 for two times for it to be highlighted. How do I make it to only single click? :/ Thank you! </p>
<p><div ... | 3 | 1,387 |
Error C++ invalid types 'int[int]' for array subscript | <p>I have a problem with this code. I don't know why it's wrong. I have no idea how to fix it.
I started learning C++ not long time ago, so sorry if the question is stupid.
This is a university exercise to special mathematics, and we have a teacher who didn't explain anything.</p>
<p>P.S. Visual Studio Code, compiler M... | 3 | 6,459 |
Vue multiselect element triggers event on wrong element | <p>I am using this <a href="https://vue-multiselect.js.org/" rel="nofollow noreferrer">Vue Multiselect component</a>.</p>
<p>I have 8 dropdown multi-select elements on my form.</p>
<p>When selecting an option from the second dropdown, the <code>onSearchResellerCompanies</code> method gets triggered, instead of the <c... | 3 | 4,508 |
Sqlite C API in multiprocess | <p>I'm testing Sqlite C Api for multiprocess concurrency and I'm hitting a bug that I don't understand.</p>
<p>The test is simple: 1 database, 1 table of 1000 rows with 2 columns. Column 1 are uuids, column 2 is a status set to 0. I'm launching then 2 workers that concurrently select 2 uuids at status 0 and update the... | 3 | 1,131 |
Get number of words from two tables | <p>I have two tables: <code>z_words</code>, and <code>z_words_products</code>. You can see bellow the structure of these tables.</p>
<p>In the <code>z_words_products</code> table could be the same values for: </p>
<p><code>wordId</code>,<code>smaId</code>,<code>productId</code>,<code>siteId</code> and the <code>type<... | 3 | 1,928 |
How to enable location setting through allow button | <p>I am creating an app, i want to turn on location settings when press on allow button. when my app starts first it works properly going to the current location but when i close the app and start again it not get on to the current location. So please help me using my source code.....</p>
<pre><code>public class MapsA... | 3 | 4,134 |
navigation.navigate does not work on one of useEffect(); | <p>I am developing a code and always need the user to enter the application to check if there is an update, if there is to send the user to an information screen. But for some reason when I use navigation.navigate ('update') it doesn't work, but console.log ("oi"); above it works. What happens <strong>is normal</strong... | 3 | 1,146 |
Touch Behaviour of onMouseWheel on Mobile Devices - three.js | <p>How to implement forward and backward scroll on Mobile Touch Devices or have the same behaviour as on Desktop (onMouseWheel)? Examples:</p>
<p>JS Fiddle: <a href="https://jsfiddle.net/xzwve647/" rel="nofollow noreferrer">https://jsfiddle.net/xzwve647/</a></p>
<p>Desktop (animation work ok on Desktop back and forth... | 3 | 2,036 |
Class with property that is a List Of items in a subclass | <p>I want a class for a Customer, with a text property name.
Another property CustAddress will be a list of multiple addresses.
Each address will have two string properties.</p>
<p>Here is what I have.
I am not sure if I need something in the constructor of the class address.
And I'm even not sure what the code would ... | 3 | 1,069 |
MPI Gatherv seems to send/receive wrong values (in C) | <p>I have some trouble using MPI (with C). My program calculates the edge list of a huge network. Every process calculates a small portion of this edge list (root process 0 also does calculate an portion of this edge list). The edge list is a 1-D int array with 2*edge_count_slave elements. The edges are ordered by the ... | 3 | 4,183 |
Can't update JLabels of minutes and hours for my chronometer in java.swing | <p>I'm trying to make a stopwatch with java.swing and a stopwatch
I have already tried the swing.Timer and TimerTask.
<em>Could you help me?</em></p>
<p>This is the stopwatch.java class</p>
<pre><code> public class Cronometro {
private int secondi;
private int minuti;
private int ore;
private boolean... | 3 | 1,144 |
Error when using SVN for Spring Cloud Config server | <p>I am getting an error when attempting to use SVN for my Spring Cloud Config server. Here is my simple configuration.</p>
<pre><code>spring:
cloud:
config:
server:
svn:
uri: https://mysvnserver.com/repos/Config
server:
port: 8001
</code></pre>
<p>But when I run my application I get ... | 3 | 3,797 |
mongodb index works differently | <p>I do not understand if the index was executed with {createdAt: 1}.</p>
<p>Should {device.objectId: 1} index be run?</p>
<p>Sometimes this happens during many attempts.</p>
<p>I know I need to walk a composite index.</p>
<p>But</p>
<p>Even if you do not have a composite index,</p>
<p>We know that if the key use... | 3 | 1,831 |
Opcode for identifying switch case in javassist | <p>How to find the op-code for identifying switch case in a java class using javassist or asm.</p>
<p>I used the Below Snippet</p>
<pre><code>List methods = lClassFile.getMethods();
for (Object m : methods) {
MethodInfo lMethodInfo = (MethodInfo) m;
System.out.println("method name: " ... | 3 | 1,160 |
How to call other view in Sencha Touch | <p>How can I call a new view on image tap which is defined in tpl.</p>
<p>Code:</p>
<pre><code>tpl: Ext.create('Ext.XTemplate','<tpl for="sample">',
'<div> {tittle}</div>
<div><a href="{link}"><img src="{photo}"/></a></div>',
'</tpl>',
... | 3 | 1,063 |
haw to insert an Image of base64 from database to recycleView | <p>I'm building a recycle view that gets API information, It works fine but until now I used an Image from my drawable folder but I need to change it with a base64 (in form String) Image from my API.</p>
<p>then guys how to change my code to make recycle get API image. </p>
<p>NewsItem.class</p>
<pre><code> publi... | 3 | 2,347 |
ASP.NET Core Web API - How to resolve Error CS0103 The name 'score' does not exist in the current context | <p>In ASP.NET Core 6, I have this code.</p>
<pre><code>public static class Paginator
{
public static async Task<PageResult<IEnumerable<TDestination>>> PaginationAsync<TSource, TDestination>(this IQueryable<TSource> querable, int pageSize, int pageNumber, IMapper mapper)
where T... | 3 | 1,423 |
Traversing through vector does not work, returns more elements when trying to print it | <p>Sample input: <code>tokens = ["2","1","+","3","*"]</code><br />
Sample output: <code>9</code><br />
Here is the code:</p>
<pre><code>class Solution {
public:
int evalRPN(vector<string>& tokens) {
stack<int> s1;
for(size_t i = 0; i ... | 3 | 1,097 |
Can't connect Redis with Heroku | <p>I'm kinda new but what I did so far was the following:</p>
<ol>
<li>Created Redis cloud account, set it up on RedisInsight on my computer.</li>
<li>Heroku was fully deployed, went to my account and set the Redis Vars (URL and password).</li>
<li>Added requested code into App.js file, everything seems to be working f... | 3 | 5,311 |
Not able to send checkbox data from all pagination in datatable from template to view in django | <p>I have a datatable in my django template in which there is a checkbox next to every row to send the row data to a view function to make some mass updations in django model. But problem is if the multiple rows are on the same page in pagination then i can send the data accurately BUT if i select row 2 from page 1 and... | 3 | 3,276 |
SharePoint 2013 - Need to Split Names from a Multi-Select People Picker | <p>I'm working in SharePoint 2013, and I have created a custom display template for a Content Search Web Part. Three of my fields use multi-select people pickers, and all three are returning the names in one string as shown below:</p>
<p>Brown, JohnSmith, MikeJones, Mary</p>
<p>I want to return the names in the forma... | 3 | 1,635 |
Multi-threaded core data sometimes returns nil properties | <p>I am new to core data. I have an app that uses core data as local store. Writing to and reading from core data is done by background threads. While this works generally, in rare cases are the fetched data wrong, i.e. properties of a fetched entity are <code>nil</code>.<br>
To check the situation, I wrote a unit test... | 3 | 1,328 |
Problems with making my dataframe in 'wide' structure while trying using spread() function in R | <p>I'm trying to use <code>spread()</code> function to make my data.frame wide, but i have some errors that i don't even understand...</p>
<p>some part of my dataframe is looks like this:</p>
<pre><code>> df
NO2 Month
1 23 01
2 27 01
3 16 01
4 13 01
5 26 01
6 23 01
7 51 ... | 3 | 1,167 |
AngularJS share data bettween parent and child scope directives | <p>I have a widget like directive called waComments, it loads components via a RESTful service and displays them. In my view I'm using ng-repeat to loop over them and to render them with a button that if pressed Shows a new reply to form. This his handled by the waCommentsReply directive. One waComments widget has many... | 3 | 2,891 |
Flex Canvas child Randomly resizes | <p>I have an application with a viewstack that contains all the components that need to be displayed. The navigation is defined in the main application.
All the components are based on canvas.</p>
<p>The main application looks like that:</p>
<pre><code><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layo... | 3 | 2,655 |
Maximum call stack size exceeded - know why (too many functions) but how to fix it? | <p>On my page I have a simple piece of code based on nested functions, which helps me to show one elements after another in right order:</p>
<pre><code> var fade = 700;
$('#s2icon-center').fadeIn(fade, function() {
$('#s2icon-1').fadeIn(fade, function() {
$('#s2icon-3, #s2ico... | 3 | 1,160 |
AttributeError: exp when using numpy on data loaded using scipy.io.loadmat | <p>I get the following output from the unit test below:</p>
<pre><code>[[array([[-1.57079633]])]]
[[array([[0.+1.57079633j]])]]
<module 'numpy' from '/usr/local/lib/python2.7/dist-packages/numpy/__init__.pyc'>
E
======================================================================
ERROR: test_TestWECTrain_Basic... | 3 | 1,230 |
Mybb reputation system | <p>Is there any possibility to make these javascript and css style work in MyBB Forums?
With this script, people can give improved reputation in posts. There are two buttons: thumbs up and thumbs down. When user hits thumbs up button, then thread/post author gets automatically +1 reputation and thumbs down, then gets a... | 3 | 3,863 |
Creating a maven wrapper pom.xml from gradle: can't create the <build> element | <p>How do I set the <code>sourceDirectory</code>, <code>testSourceDirectory</code> and build <code>plugins</code> in a pom.xml that I'm creating using the gradle maven-plugin's <code>pom</code> DSL?</p>
<p>When I add <code>build</code> without a <code>Closure</code> to my DSL section, it's ok.. but when I add <code>bu... | 3 | 1,464 |
Dataframe: extract multiple parents from single ID and count occurrences | <p>Don't know if the headline is good enough. Feel free to adjust it!</p>
<p>Here's the <strong>situation</strong>: I got a dataframe that is basically a product catalogue. In this there are two important columns. One is the product ID and one is a 12-digit category. This is some sample data. Of course, the original d... | 3 | 1,421 |
Java NQueens Recursion and Enumeration Logic Explanation | <p>I am doing some practice exercises with recursion and came across the nQueens problem <a href="http://introcs.cs.princeton.edu/java/23recursion/Queens.java.html" rel="nofollow">here</a>.</p>
<p>I am not sure whether I am misunderstanding what is happening with the recursion or not, but I don't understand how this c... | 3 | 1,695 |
Can't get plotly + node.js to stream data coming through POST requests | <p>I'm trying to get plotly to stream data received by my server through a <code>POST</code> request to <code>http://localhost:3000/step</code>.</p>
<p>Building on the <code>rest-example.js</code> in plotly-nodejs/examples, here's my server code (I've blurred out my username, apikey, and token):</p>
<pre><code>'use s... | 3 | 1,674 |
Note Access denied for user 'root'@'localhost' (using password: NO) | <p>I am using MySQL Workbench and I am trying to connect to MySQL server as "root". The server is up and running and connection to MySQL has been successful. But it says <a href="http://i.stack.imgur.com/r5JlE.png" rel="nofollow">Access denied for user 'root'@'localhost' (using password: NO)</a> I don't understand what... | 3 | 1,540 |
How to use google Map Api2 along-with-other-fragments-in-an-app | <p>Am trying to create and app with one activity but multiple fragment. i am using android.support.v4.* to build the fragment.
Each item i have created so far by extending Fragment, I want to use the google Map Api2 in my application, </p>
<p>All the tutoril i found so far adding the "SupportMapFragment" as an element... | 3 | 1,609 |
Replicating the column first nonzero value while a condition is true, without loops | <p>The example data goes like this, with prices of a stock, and buy indicating the possible buy points.</p>
<pre><code> Price Buy
0 121385 0
1 121375 0
2 121375 0
3 121360 121360
4 121360 121360
5 121350 121350
6 121350 121350
7 121340 121340
8 121345 121345
9 121340 121340
10 121340... | 3 | 1,606 |
Getting NA for only one specific month in all years when calculating SPEI using the SPEI package on R | <p>I am trying to calculate the Standard Precipitation-Evaporation Index (SPEI) for two of my datasets. I am following exactly as shown in this link: <a href="https://www.youtube.com/watch?v=dLpmUVDRFbM" rel="nofollow noreferrer">https://www.youtube.com/watch?v=dLpmUVDRFbM</a></p>
<p>For the first dataset, I am able de... | 3 | 2,342 |
Converting MS SQL to Snowflake SQL, How do I return a count of records using a subquery | <p>I am converting a query from MS SQL to Snowflake SQL and I would like to know how to turn a record count using a subquery (or Snowflake equivalent). In the code below, "NUM_VISITS" returns the number of encounters that occurred for each patient.</p>
<p>If I hardcode a static number in place of "NUM_VI... | 3 | 1,583 |
Implement Middleware in Laminas API Tools | <p>So the question is how to connect my middleware to the specific route (or controller) in Laminas API Tools.</p>
<p>My middleware is:</p>
<p>EnsureMessageBelongsToTicket.php</p>
<pre><code>namespace Application\Middleware;
use Fig\Http\Message\StatusCodeInterface;
use Laminas\Router\RouteMatch;
use Psr\Http\Message\... | 3 | 1,253 |
JavaMail - inlined images are also being attached to the email | <p>I have added inline images in my mail but it's getting attached with mail as well. My code:</p>
<pre><code>public Map<String, String> sendMail(final String campaignId, final String emailTo[], final String emailSubject, final String emailBody, final MultipartFile[] mailAttachment) {
Map<String, String&... | 3 | 2,466 |
Rotate what is painted in a JPanel keeping the centroid's location | <p>I want to rotate what is painted in a <code>paintComponent(Graphics g)</code> method according to a rotation angle and around the centroid of the corresponding panel.</p>
<p>Here's what I have initially:</p>
<p><img src="https://i.stack.imgur.com/Dise7.png" alt="Initial state"></p>
<p>A control panel (textfield +... | 3 | 2,473 |
Java old application first time run on Eclipse | <p>I spent 14 days or more to get this application running.</p>
<p>My java version is jdk1.6.0_39, tomcat is 6.0 and Spring is 2.5.4.</p>
<p>When I import it to Eclipse and run the application on the server I get this:</p>
<pre><code>INFO: Initializing Spring root WebApplicationContext
ERROR [main] ContextLoader.ini... | 3 | 2,789 |
Pandoc: in a .md file, how to modifiy the YAML metadata block and put the modified block in markdown format using a lua filter | <p>I want to transform some parts of the metadata in the YAML header of a block-empty .md file before passing it to a template file. That is, the workflow would be this:</p>
<pre><code>source_YAML_md_file -> lua_filter -> transformed_YAML_md_file -> template -> xml_file
</code></pre>
<p>The lua_filter is me... | 3 | 1,623 |
How to resolve JavaProjectRole when building an ear using Ant4Eclipse ? | <p>I am using Ant4Eclipse to build an ear package.</p>
<p>Can you please let me know how to proceed with it?</p>
<pre><code><ear destfile="${deploy}/pto-web-ear.ear">
<ant4eclipse:jdtProjectFileSet workspaceDirectory="/data/temp/ANT/PSFBUILD"
projectName="pto-web-ear" />... | 3 | 1,133 |
Classes with runtime parameters built by custom factories: how to honor container lifetime using .NET Core DI? | <p>Given some class that relies on a constructor parameter that can only be obtained at runtime, how do I ensure instances of that class have their lifetimes still be controlled by the Microsoft DI container if I'm using a custom factory to bypass the runtime parameter limitation?</p>
<p>For example, say we have a inte... | 3 | 1,221 |
How do you autofill dates in a column when a date is imported from another sheet by button press weekly? | <p>I am attempting to write a code in VBA to copy weekly comments and the date that the week begins on from one sheet (ws1) to a second one for storage (ws4), auto-populate the remaining dates for the week, and finally add a new line to the bottom of the sheet.</p>
<p>I can get the program to copy the comments and the... | 3 | 1,185 |
trouble connecting android app to localhost | <p>So I have connected my laptop to my androids wifi and used the gateway IP address however I am stuck trying to pull from the database. The database works as I have tested it separately.<br>
Logcat suggests there's an error in login. (Ill Mark where the errors come up so you don't have to) </p>
<pre><code>07-31 0... | 3 | 3,855 |
TWIG and "unexpected T_FUNCTION" which return a server 500 error with hostmonster.com | <p>I have this code which works on my localhost and with one.com web hosting. But when uploaded in hostmonster.com's ftp, the browser return a 500 error.
I'm using TWIG as template engine.</p>
<p>Here are the link to the pages: </p>
<ul>
<li><p>doesn't work(hostmonster.com): <a href="http://armourertech.com/produit.... | 3 | 4,424 |
BitmapFactory.decodeStream returns null | <p>I know this question came up a lot, but I can't find any solution that helps me. I'm downloading avatars from my webpage and save them on internal storage.</p>
<p>In my activity:</p>
<pre><code> // check if user has an custom avatar
if (!bet.getUser().getAvatar().isEmpty()) {
... | 3 | 1,447 |
when get pagecontent from URL the connect alway return nopermistion? | <p>I have a methor to return pagecontent of link </p>
<p>but when it run, alway return "Do not perrmisson ", plesea check it </p>
<p>here is code to return string pagecontent </p>
<pre><code>public static String getPageContent(String targetURL) throws Exception {
Hashtable contentHash = new Hashtable();
... | 3 | 1,319 |
Invalid characters appearing at random in XML output, including within the tags | <p>I have a php script which generates an XML document, however there is a strange problem with the output.</p>
<p>I'm getting invalid characters seemingly at random throughout the document, even in the tags themselves? For example:</p>
<pre><code><id><![CATA[JS-DWLG001]]></id>
</code></pre>
<p>I'm... | 3 | 1,079 |
Using Form to Upload PDF to Server and Data to SQL Database | <p>I am trying to use a modal form to upload and retrieve PDF files. The form includes a file upload and descriptive text (Vendor Name, Category, and Notes) which gets sent to MySQL database through AJAX/PHP. I end up with a table with last column including a button (which I will want a click to open the PDF related to... | 3 | 3,087 |
ionic app google maps displaying - mobile device location issue | <p>I am developing an android app with <strong>Ionic Cordova and Angular</strong>. in one of the page my requirement is to display google map with current location.</p>
<p>So by installing <strong>ionic Cordova google map and geolocation plugins</strong> and with the <strong>google maps API key</strong> and iam able to... | 3 | 2,216 |
How to change marker labels in anychart horizontal gauge? | <p>I am using anychart for creating a percentage horizontal gauge. </p>
<p>And i want to change the marker information to show what i want. </p>
<p>I found nothing on the documentation about it.</p>
<p>I'm using the javascript anychart playground (link below).
The final implementation is on Angular 5.</p>
<p>The o... | 3 | 1,156 |
Configuring Auth0 authentication on Google App Engine Standard and the Cloud Endpoints Frameworks with Python | <p>I am using <a href="https://cloud.google.com/endpoints/docs/frameworks/python/about-cloud-endpoints-frameworks" rel="nofollow noreferrer">Cloud Endpoints Frameworks with Python</a> in a Google Cloud App Engine Standard environment to provide an API.</p>
<p>As far as I can tell, I should be able to use python decora... | 3 | 2,302 |
HTML5 / CSS: Is there a benefit in using multiple wrapper-divs within section-elements? | <p>Years ago I have learned to made a website by putting everything below the body-tag into a div with a class "wrapper".
These makes sense (without doubt) because that way one can align the whole content vertically and horizontally. </p>
<p>Yesterday I have seen this <a href="https://youtu.be/kXHoNdomHAs" rel="nofol... | 3 | 1,468 |
Simple jquery ajax return | <p>i have this simple script:</p>
<pre><code>function paginateUsers(page){
get( _config_remote_host+'/users?page='+page,function(json){
json = JSON.parse(json);
var _html = "";
var json_users;
var json_num_users;
if(json.users){
json_users = json.users;
json_n... | 3 | 1,697 |
class object is not reading from text file using fsream | <p>Hi I am having an issue with fstream variable. my movie class can't read info from the a text file: </p>
<p>here is the output is produces: </p>
<pre><code>-858993460 Ì -858993460 -858993460 -9.25596e+061 -858993460 -858993460
-858993460 Ì -858993460 -858993460 -9.25596e+061 -858993460 -858993460
-858993460 Ì -858... | 3 | 2,018 |
Understanding facet_grid scale="free" | <p>I want to use facet_grid with stat_compare_means and have individual scales for y. I thought scale = "free" would take care of it, but it doesn't. Level "B" in my Name factor is not scaled properly.</p>
<pre><code>library(tidyverse)
library(ggpubr)
set.seed(2)
my_comparisons <- list(c(&quo... | 3 | 1,360 |
Reusable pop up throwing error at onclick event | <p>First post here, and newer to Javascript.</p>
<p>I have a node.js / express app that I am building and would like to re-use a yes no pop up in my front end by just changing some variables.
The pop up works and displays the messages, but when I click the yes button I get</p>
<p>Uncaught ReferenceError: yesNoResponse ... | 3 | 1,035 |
C++20 Join the inner values of a map with value_type vector of vector using std::ranges | <p>Let's go for it:</p>
<pre class="lang-cpp prettyprint-override"><code>#include <iostream>
#include <vector>
#include <ranges>
#include <map>
namespace rv = std::ranges::views;
int main()
{
std::map<unsigned, std::vector<std::vector<unsigned>>> m
= {{0, {{0, 1, ... | 3 | 4,123 |
Codeigniter: How to fix pagination links, not updating when clicked, using ajax | <p>I'm trying to put pagination links into my website using ajax to keep the page from refreshing. I managed to make it work but the pagination links are not updating. When I click on the next page, the page will load but the pagination link will stay on page 1. I tried putting <code>$this->pagination->create_lin... | 3 | 1,405 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.