title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
FFMPEG Audio and Video Streams merging and restreaming
<p>I have multiple streaming sources that need to combined and re-streamed as a single source. </p> <p>My sources are:</p> <ul> <li>A local low rate RTP audio stream</li> <li>A camera</li> </ul> <p>I need to redistribute the combined stream (via UDP multicast) across the local network. </p> <p>The problem I am seei...
2
1,473
Can't find JUnit on Mac
<p>So I am trying to build a project from <a href="http://loggly.com/blog/2011/11/java-code-coverage-with-cobertura-and-jenkins/" rel="nofollow">this</a> tutorial. I run ant, and get the error. The first thing I see is ...error: package junit.framework does not exist [javac] import junit.framework.TestCase...
2
3,041
3D rotations to connect balls and cylinders
<p>I've been tasked with writing a python based plugin for a graph drawing program that generates an STL model of a graph. A graph being an object made up of vertices and edges, where a vertex is represented by a 3D ball (a tessellated icosahedron), and an edge is represented with a cylinder that connects with two bal...
2
1,776
C++ can't modify private variable with setter in a class of class
<p>I know that setter functions are basic in C++, but I can't seem to create one properly.</p> <p>I have a class, <code>Graph</code>, that contains another class, <code>Vertex</code>. In <code>main</code>, I instantiate an object of type <code>Graph</code> and use that object to read a file that adds objects of type <...
2
1,697
Reading a text file with boolean values into an array list as objects
<p>I am trying to read a file of string int and boolean values into an array list as object blocks. The string values go into the array list just fine, its the boolean values I'm having trouble with. Every time I encounter the variable 'active'there is a mismatch exception. Please help! The text file for if the block i...
2
2,011
Solution for downloading hundreds of files asynchronously
<p>I have an app in which the user may need to download up to 760 files, totaling around 350MB. It is <em>not</em> possible to zip these files, they must be downloaded as loose files!</p> <p>I'm currently using <a href="http://loopj.com/android-async-http/" rel="nofollow">Android Asynchronous Http Client</a> to downlo...
2
1,528
Multi-part Identifier : Error while using PIVOT in SQL stored procedure
<p>I want to use <code>PIVOT</code> in a stored procedure to get the rows. What I've performed is:</p> <pre><code>DECLARE @cols NVARCHAR(MAX) DECLARE @stmt NVARCHAR(MAX) SET @cols = '' SELECT @cols = @cols + Table3.vAnalyteName+ ',' FROM Table3,Table5,Table6 ...
2
1,752
Place nav-pills in card-header and tab-content in card-body using ngbTabSet
<p>I'd like to place <strong>nav-pills in card-header</strong> and <strong>tab-content in card-body</strong> using <strong>ngbTabSet</strong>. But I don't get on how to do this.</p> <p>Here is a sample of what I try to achieve (using bootstrap.js)</p> <p><a href="https://i.stack.imgur.com/CIwxX.png" rel="nofollow nor...
2
1,353
Backup Script in Python
<p>can some one please provide me with an explanation of the code especially the use of maxversions and statements following the line "for f in files:".</p> <p>I want to understand what <code>xrange(MAXVERSION)</code> means? What is the use of indexing i.e </p> <pre><code>for index in xrange(MAXVERSIONS): backup = '%...
2
1,305
Emacs - Company: An error occurred in auto-begin Invalid function
<p>I'm working in a fresh configuration of GNU Emacs 24.3.1. I want to use emacs-eclim with company. Company works correctly, but if I open a java file, it stops working correctly, yelling this error message: </p> <pre><code>Company: An error occurred in auto-begin Invalid function: (java-mode javascript-mode js-mode...
2
1,255
Ajax/jQuery Abort on timeout
<p>Newbie - Quesiton - </p> <p>Problem trying to solve: In case there are some open connections that aren't closed by XMLHttprequest, we want to abort them.</p> <p>In a javascript file, where there are Ajax calls, I need to start a timer for each call, and clear the timer in both success and failure callbacks. Want t...
2
1,328
Varnish - HTTP/1.0 response served as HTTP/1.1
<p>I am trying to get HTTP 1.0 response for this request:</p> <pre><code> curl -v -A "VLSub" -0 http://api.opensubtitles.org/xml-rpc * Trying 92.240.234.122... * Connected to api.opensubtitles.org (92.240.234.122) port 80 (#0) &gt; GET /xml-rpc HTTP/1.0 &gt; Host: api.opensubtitles.org &gt; User-Agent: VLSub &gt; Ac...
2
2,645
Embedded fonts versus an external resource
<p>I have been tackling the problems of Webfonts across various browsers, and have been following the <a href="http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax" rel="nofollow">recommendations of FontSpring</a> that seems to be the latest recommended solution.</p> <p>However, as I am using a CDN and ...
2
1,257
How to include future values in a time series prediction of a RNN in Keras
<p>I currently have a RNN model for time series predictions. It uses 3 input features &quot;value&quot;, &quot;temperature&quot; and &quot;hour of the day&quot; of the last 96 time steps to predict the next 96 time steps of the feature &quot;value&quot;.</p> <p>Here you can see a schema of it:</p> <p><a href="https://i...
2
2,581
ajax post call does not return any json response to jquery
<p>I am facing issue with ajax post type call. I get blank php json response when an ajax call is invoked from jquery.</p> <p>Below are the html, jquery and php code which i am using in-order to send HTML form data and get the json response.Please advice if there is any issue with the code or if it has got to do somet...
2
1,368
how to read stack trace error crash report
<p>Say I have the following (from TestFlight):</p> <pre><code>0 MyApp 0x000ef881 MyApp + 395393 1 MyApp 0x000efc97 MyApp + 396439 2 libsystem_c.dylib 0x37dc6539 _sigtramp + 48 3 MyApp 0x00093e51 MyApp + 20049 4 Foundation 0x338fd943 __NSFireDelayedPerform + 414 5 CoreFoundation 0x36daea63 __CFRUNLOOP_IS_CALLING_OUT_TO...
2
1,349
Refining list based on checkboxes and dropdown selection
<p>I've got an unorganized list, populated with items that have several data attributes. </p> <pre><code>&lt;ul&gt; &lt;li data-category="option1" data-green="t" data-blue="f" data-soft="t"&gt;Product 1&lt;/li&gt; &lt;li data-category="option1,option3" data-green="f" data-blue="t" data-soft="t"&gt;Product 2&lt...
2
1,553
C++11 thread to modify std::list
<p>I'll post my code, and then tell you what I think it's doing.</p> <pre><code>#include &lt;thread&gt; #include &lt;mutex&gt; #include &lt;list&gt; #include &lt;iostream&gt; using namespace std; ... //List of threads and ints list&lt;thread&gt; threads; list&lt;int&gt; intList; //Whether or not a thread is runnin...
2
1,561
Fedex PHP API Integration for indian address
<p>Does anyone integrated fedex API in PHP to generate tracking numbers and shipping label? I am submitting below XML to fedex -</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/...
2
3,728
Accessing the number of shared memory mapped file views (Windows)
<p>I am developing a multi-platform C++ application (mainly Windows and Linux), now I face the need to be able to limit the maximum number of instances of the application that may run at the same time (in the same machine).</p> <p>I have already a shared memory module that uses:</p> <ul> <li>Linux: System V shared me...
2
2,039
winsock error 10022 in listen
<p>Here is my first question in this great website.</p> <p>I am writing a simple server, obtaining the port number form the user:</p> <pre><code>#include &lt;winsock2.h&gt; #include &lt;ws2tcpip.h&gt; #include &lt;iostream&gt; #include &lt;string&gt; #include &lt;cstring&gt; class socketConexion { private: WSA...
2
1,644
Orchard CMS - Sudden 404 during development
<p>I was getting close to completing my first site using Orchard CMS, and when I went to enable the 'blog' module I saw an error page. I wish I had paid more attention to it, instead I closed it and restarted my site.</p> <p>Now, I get 404 errors and I can access the front or back end of my site. I'm at a loss.</p> <...
2
3,797
Validation for names in a text input
<p>I have a text input for a name. I want to allow only letters and non-consecutive white-spaces anywhere, except that white-space isn't allowed at the start or end of the input. So I have to invalidate numbers, symbols, and consecutive white-space.</p> <p>Examples:</p> <ol> <li><code>rohit_kumar_mehta</code></li> <l...
2
1,122
Setting ASIO no_delay option
<p>I'm having troubles setting the no_delay option on an asio socket. The following code runs well, except for the delay. My server receives the messages only after the 5000 ms expire.</p> <pre><code>#include &lt;boost/asio.hpp&gt; #include &lt;boost/thread.hpp&gt; using namespace boost::asio; struct Client { io_...
2
1,188
Why signing an app for android with apache cordova fails?
<p>I am using Apache Cordova that allows developers to create apps for various platforms. I created a keystore file in Android Studio and I entered this command in the CLI in order to produce a signed apk file that will be running in android devices:</p> <pre><code>cordova run android --release --keystore=../keystores-...
2
2,405
Bad Request with 400 status code in Spring boot
<p>Recently I am using Spring boot framework with Kotlin. Every thing is all okey with GET method. But when registering a new user with POST method I go faced some problem having Bad Request with status code 400. Here is my code associate with my spring boot project</p> <p><code>User.kt</code></p> <pre><code>@Entity @T...
2
1,682
is there a shorter way to do this?
<p>surely, there is a shorter way to do this?</p> <pre><code>NSString *filePathA = [[NSBundle mainBundle] pathForResource:@"A" ofType:@"txt"]; NSString *myTextA= [NSString stringWithContentsOfFile:filePathA encoding:NSUTF8StringEncoding error:nil]; NSArray *arrayStructuresA = [myTextA componentsSeparatedByString:@"-"]...
2
2,460
Laravel 5.1 Uploading & Saving Base64 Image Sent From Form
<p>I'm using laravel as the backend of my application, the front end allows the user to enter the first name aswell as uploading a photo of themselves.. Using html5 they can crop the photo on page and the cropped photo is sent on form submit to my controller.. </p> <p><strong>I'm getting the following error:</strong><...
2
1,356
Define default values for layout_width and layout_height properties for a subclass in a style
<p>Min and target SDK are 21 (Lollipop), no support library is used.</p> <p>I am trying to create a <a href="http://www.google.de/design/spec/components/buttons.html#buttons-flat-raised-buttons" rel="noreferrer">floating action button</a>. So far so good, it does indeed work (based on a few other SO threads), here is ...
2
1,816
Yarn support on Ooyala Spark JobServer
<p>Just started experimenting with the JobServer and would like to use it in our production environment.</p> <p>We usually run spark jobs individually in yarn-client mode and would like to shift towards the paradigm offered by the Ooyala Spark JobServer.</p> <p>I am able to run the WordCount examples shown in the off...
2
1,125
How to Embed C# code correctly inside JavaScript Block contained within a C#.net Page?
<p>I am basically merging two features of my Google map web app. but I need the co-ordinates which are accessible by backend so I have made a <code>Data Table</code> and it is then passed on to the javascript.</p> <p>But as I was merging the code I am facing some syntax problem (most likely).</p> <p><strong>Update:</...
2
3,492
ASP.NET Core EF Query ignoring OrderBy when using Skip/Take with Subquery
<p>I've been running into problems with my application using asp.net core 1.1 and mvc. As best as I can tell, I'm getting incorrect results when performing a query, when combining orderby, skip/take, and a query on an included table.</p> <p>The schema is pretty straight forward.</p> <pre><code>public Class Member { ...
2
1,266
How to set GPU resource requirements on a container with the fabric8 kubernetes Java client API
<p>I write an example with fabric8 kubernetes Java client API to set GPU resource requirements on a container. I've got the following runtime error:</p> <pre><code>spec.containers[0].resources.requests[gpu]: Invalid value: "gpu": must be a standard resource type or fully qualified, spec.containers[0].resources.reques...
2
2,034
Jquery tab disabling
<p>I am using jquery tab. I want to disable the tabs when the form is in edit mode. Iam using a query string <code>id</code> for this and <code>type</code> for identifying the tab</p> <p>According to the value of id the tab is disabled. Iam using following code</p> <pre><code> $(document).ready(function() { v...
2
1,666
DataJoins in Hadoop MapReduce
<p>I am trying to implement one use case as given in Book Hadoop In Action, but I am not being to compile the code. I am new to Java so, not being able to understand the exact reasons behind the errors.</p> <p>Interesting thing is, another piece of coding using same classes and methods are compiled successfully.</p> ...
2
2,548
Error on MYSQL Workbench trying to import a dump folder of existing tables in a new database
<p>In my short developer live i have managed my MySQL with Workbench , cause is what really vialize my process on developing without being an expertise on Database managament. In this last project im involved at , after building my app i set each an every module of it (microservices) on a image of a docker container ...
2
2,643
Run Maven webapp on server from Eclipse with properties injection from profile
<p>I use Eclipse &amp; Maven to develop a Spring + Hibernate webapp, and in my <code>pom.xml</code> I have several profiles with different properties that I inject to a <code>.properties</code> file. This file is used in <code>applicationContext.xml</code> to configure Spring, and when I want to launch the application,...
2
1,396
how to pass data to controller actions in extjs or jsp(I don't know what I have to use) by using MVC architecture?
<p>In login screen. I want to check user by connecting database. But I have to do it in Java MVC architecture.</p> <p>Firstly, In login.js I want to reach the login.action which is in Contact controller and it Finally, returns the json array as success or failed. Then I go to services and DAO.</p> <p>Also, I am new ...
2
3,166
Dynamic Table using jQuery template
<p>I am trying to create a Dynamic Table using jQuery Template plugin.</p> <p>My requirement is that columns are created dynamically i.e. there is a ListBox with ColumnNames... when item is clicked it should create a table with that column and when another item is clicked it should update the existing template and add...
2
1,123
Dynamically Created Button Events in MFC Doesn't Fire After Clicking the Button
<p>So i was asked to make a bunch of buttons in MFC to update the app with new functions. </p> <p>What have i done is </p> <p>a. Reserving the ID in resource.h</p> <pre><code>#define IDC_MAINFRM_BTN_1 40501 #define IDC_MAINFRM_BTN_2 40502 #define IDC_MAINFRM_BTN_3 40503 #def...
2
1,514
CyclicBarrier re-use Example
<p>Does CyclicBarrier best suitable, in this case. I want to run n threads parallel in Stages (wait at Stages until all threads completes that Stage). </p> <pre><code> public class CyclicBarr { public static void main(String[] args) { CyclicBarrier barrier = new CyclicBarrier(3, n...
2
1,041
If text in a cell contains a specific word then put an image in it
<p>I hope someone can help me. How can I a put an Image in a td if there is a specific word in it? Here is my code:</p> <pre><code> var allTableCells = document.getElementsByTagName("td"); for (var i = 0, max = allTableCells.length; i &lt; max; i++) { var node = allTableCells[i]; var currentT...
2
1,123
Error adding auto-complete component to ICEFaces screen
<p>I am trying to create a pretty straight forward screen that has a text field with auto-complete functionality. I have been following the examples found on the ICEFaces website <a href="http://component-showcase.icefaces.org/component-showcase/showcase.iface?rvn=3" rel="nofollow noreferrer">here</a>. No matter what ...
2
6,922
Recording video and audio with AVAssetWriter in Swift
<p>Im trying to add the devices microphone audio to a video recording from the devices camera. The video is filtered with a CIFilter and works as expected. My problem is the mic audio is not attached to the video once saved.</p> <p>I have tried setting the audio settings manually like this</p> <pre><code>let audioSetti...
2
4,080
Jenkins java.lang.OutOfMemoryError: PermGen space - Facing frequently even after increasing the perm memory
<p>I get the following error very often in Jenkins and as suggested by other answers I restarted Jenkins (Running on Solaris) by increasing the MaxPermSize parameter.</p> <p>Initially when I faced the error it was 128 MB, I increased it to 512. There were no issues for some weeks. Then again got the error hence increa...
2
4,102
How to start ReplayKit screen recording in SpriteKit SKScene class
<p>I have implemented <code>ReplayKit</code> in my <code>SpriteKit</code> game, but since everything is done within the <code>GameViewController</code> the record button appears too early. Please see my <code>GameViewController</code> class below:</p> <pre><code>class GameViewController: UIViewController, RPPreviewVie...
2
1,899
How to access rails request object in rspec integration test?
<p>In Rails 3.2.13, subdomain is provided by default. As such, I want to test my application such that when a merchant signs up, he goes by default to root_url with subdomain 'merchant' i.e. <a href="https://merchant.lvh.me:3000" rel="nofollow">https://merchant.lvh.me:3000</a>. However, I am having trouble testing the ...
2
3,690
jQuery Custom Vertical Drop Down Menu
<p>I have a problem in my drop-down-menu (here's my fiddle: <a href="http://jsfiddle.net/iamthestig/Vhs2v/" rel="nofollow">http://jsfiddle.net/iamthestig/Vhs2v/</a>). When you click products there's a drop-down-menu on the left side, but the other navigation elements in the bottom slide down too. Is there a way to stop...
2
1,448
JavaFX TitledPane changed title background is reset on mouse entered
<p>I need to change the TitledPane title background based on some incoming value during runtime and reset it otherwise.</p> <p>All my TitledPane's is styled on a CSS attached to the Scene.</p> <p>Changing the background is no problem. The problem is when the mouse enters over the title after the background has been c...
2
2,045
Where to store static/template files in Django according to "Two Scoops of Django"
<p>I'm a reader and a big fan of the popular book <a href="http://twoscoopspress.com/products/two-scoops-of-django-1-6" rel="nofollow">Two Scoops of Django</a>. The book is full of great ideas, but there is one which is not that clear to me.</p> <p>The authors advice to create a <code>static</code> and a <code>templat...
2
1,362
Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "FALSE"
<p>My Code:</p> <pre><code>public class BehemothSelectGUI extends javax.swing.JFrame { private static DBUtil db = new DBUtil(); private static Populate populate = new Populate(); static int WepHitPoints; static int ShoulderHitPoints; static int ChestHitPoints; static int WristHitPoints; static int HelmHitPoints; stati...
2
2,123
Cannot connect to aws-iot using paho-mqtt java client code
<p>I created thing on AWS core. Then downloaded cert, private key and rootCa certificate too. My main goal is to publish and subscribe to AWS . I tried to connect to aws iot using paho mqtt java client code, using following code.</p> <pre><code>public class App{ public static void main(String args[]){ try{ ...
2
3,035
Laravel: How submit checked checkbox values without form action?
<p>I will display messages in this way using loop:</p> <pre><code>&lt;tr @if($message-&gt;seen == 0) class="unread" @elseif($message-&gt;seen == 1) class="" @endif &gt; &lt;td class="inbox-small-cells"&gt; &lt;div class="checkbox checkbox-default inline-block"&gt; &lt;input type="ch...
2
1,053
Flask jinja template not recognizing css when more than 1 parameter is used
<p>I have a problem when rendering template in flask it doesn't recongnize the CSS file but this issue occurs only when I give more than one parameter to the funtion.</p> <p>for this example the css is working on the page:</p> <pre><code>@app.route('/test/&lt;usrn&gt;') def test(usrn): return render_template('tes...
2
1,267
Token indices sequence length is longer than the specified maximum sequence length for this model (28627 > 512)
<p>I am using BERT's Huggingface DistilBERT model as a backend for a question and answer application. The text I am using with which to train the model is one very large single text field. Even though the text field is a single string, the punctuation was left in place as a clue for BERT. When I execute the applicati...
2
1,203
How to track mobx global store changes in componentDidUpdate
<p>I am playing around with <code>react</code> + <code>mobx</code> + <code>mobx-react</code> library. I have created mobx store to store the app settings(<code>appSettingsStore</code>). My react app has 2 components namely<code>AppHeader</code> &amp; <code>AppBody</code>. The AppHeader has dropdown and onChange value i...
2
1,127
Console Output - Could not initialize class org.jenkinsci.plugins.workflow.cps.CpsThread
<p>When I run a script in jenkins the following error is displayed:</p> <pre><code>Started by user ********* Running in Durability level: MAX_SURVIVABILITY java.lang.NoClassDefFoundError: Could not initialize class org.jenkinsci.plugins.workflow.cps.CpsThread at org.jenkinsci.plugins.workflow.cps.CpsScript.&lt;ini...
2
2,941
maven-surefire-plugin:2.18.1:test failed
<p>I'm studying &quot;Cloud-Native Applications in Java&quot; and I'm doing the exercise in this book. This is my pom.xml:</p> <pre><code>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4...
2
2,096
Could not prepare statement while saving via entity manager
<p>I've got the following error:</p> <pre><code>07:27:02,736 INFO Version:37 - HCANN000001: Hibernate Commons Annotations {4.0.1.Final} 07:27:02,745 INFO Version:41 - HHH000412: Hibernate Core {4.2.0.Final} 07:27:02,755 INFO Environment:239 - HHH000206: hibernate.properties not found 07:27:02,757 INFO Environment:...
2
4,337
How can this knight's tour algorithm be fixed?
<p>In the 8X8 chess board, taking only knight into consideration, if we start the knight from any square of the chessboard, the aim is to cover max number of square , without repeating any square . so far I have found the most efficient solution with my code below is:</p> <pre><code>60 29 34 49 0 15 ...
2
1,946
Checkbox .change() event doesn't fire, when "fired" by another checkbox
<p>I'm using a checkbox to check all other checkboxes in a table.<br /> After a checkbox being checked INSIDE the table (on change) I sum up every textbox value in the same tr.<br /><br /> <b>It works well on Firefox and Chrome.</b><br /><br /> On IE11 and below (it's important for me that it works in EVERY browser) th...
2
1,306
Uncaught TypeError: Cannot read property 'add' of undefined :: javascript :: bing maps
<p>so i am having problems with this displayinfobox function. I was looking into the Bing Maps v8 API trying to link up events with infobox. I am following Bing and storing event handlers in the infobox object. Im getting this read property 'add' error.</p> <p>In in the stacktrace, it is taking me to either the line w...
2
1,559
NoClassDefFoundError when dynamically adding jar files at runtime
<p><strong>UPDATE: I think the issue may be caused by the fact that the TestFramework.jar depends on JUnit and somehow is not finding the junit jar when it (TestFramework) loads. Still not sure on a solution, if I'm right I need a way to specify the order in which jars are loaded.</strong></p> <p>First here is some b...
2
5,026
Cannot count the correct answers for quiz app android using if statements
<p>Whenever I click on the button, it should change the score if the answer is correct. However, when i click on next, it does not change the score. it just shows its default which is 0. Everything is okay except for the score.</p> <pre><code> public class QuizActivity extends Activity { DBAdapter db = new DBAdapt...
2
1,296
Config file XDT transformation InsertIfMissing is skipping children
<p>I am having trouble doing config transform, adding app settings on nuget package install where element <code>appSetting</code> may or may not exist. </p> <p><strong>What I want to happen:</strong></p> <ul> <li><code>appSetting</code> element does not exist <ul> <li>Insert <code>appSetting</code> element and its c...
2
1,422
Accessing dogstatsd (datadog) Pod from adjecent Kubernetes Pods
<p>I'm running a number of python apps as Replica Sets inside of kubernetes on Google Container Engine (gke). Along side them I've created the Datadog DaemonSet which launches a dd-agent on each node in my cluster.</p> <p>Now I would like to use that agents dogstatsd for metrics logging from python apps as well as try...
2
1,267
Adding restrictions to xsd generated from wcf
<p>So I'm doing some research on how to format the WSDL and XSD generated from WCF, specifically adding annotations/documentation to the WSDL and XSDs along with adding restrictions to various parameters.</p> <p>So far I've been able to add the documentation to both the WSDL and XSDs by creating attributes that implem...
2
1,450
How to solve android.content.res.Resources$NotFoundException: Resource ID #0x0 & properly display data from a database to a cardview?
<p>I am trying to build a card view that displays a list of data from my SQLite database. I use <code>grocery_item</code> class to create the recycler view &amp; take the data from <code>MyDataBaseHelper</code> &amp; put the data into ArrayList. In the same class, I then create an object of <code>captionedImagesAdapter...
2
5,730
Scipy interp1d inversion when using an array input: how to find the root of the output function array?
<p>Let's say I have the following 3d-Numpy-array A:</p> <pre><code>array([[[ 1, 2, 3], [ 1, 4, 9]], [[ 1, 8, 27], [ 1, 16, 81]]]) </code></pre> <p>I want to interpolate the data using <code>interp1d</code> with <code>axis=2</code>, i.e. interpolate the function values <code>1,2,3</code>, ...
2
1,042
Broadcast advanced indexing numpy
<p>I have an array of values for example</p> <pre><code>x = array([[[-0.78867513, -0.21132487, 0. , 0.78867513, 0.21132487, 0. , 0. , 0. , 0. ], [ 0. , -0.78867513, -0.21132487, 0. , 0.78867513, 0.21132487, 0. , 0. , 0. ...
2
1,543
Android MapView v2 Black screen
<p>I've been trying to implement v2 of android's MapView. I got it working just fine with the exception to this bug.</p> <p>This is what it looks like when I load the app from scratch... <img src="https://i.stack.imgur.com/rVXr9.png" alt="enter image description here"></p> <p>As you can see, no problems there.</p> ...
2
5,300
"System.ArgumentException: An item with the same key has already been added." when trying to order an in-memory LINQ query by a LINQ association
<p>We are doing a query against an in-memory collection of LINQ data objects. The wrinkle is that we are ordering by a column in a related table whose records have not necessarily been loaded yet (deferred loading:)</p> <pre><code>Dim oPkgProducts = _ From b In oBillPkg.BillProducts _ Where b.Successful.GetValueOrDefa...
2
1,147
Eloquent join with scopes having ambiguous column names
<p>I've got two tables, <code>venues</code> and <code>venue_plans</code>, having a <code>hasOne</code> relationship. The former contains geolocation data, while the latter contains a "distance bonus", so the more the distance bonus, the closer the venue will be shown to the user who's searching around its location.</p>...
2
1,348
CEF base::ThreadRestrictions::AssertIOAllowed() assertion fails on app exit
<p>I have a simple CEF application for OSX that is based on the provided cefsample app. One notable change is that I'm running in single-process mode (<code>settings.single_process = true</code>). I'm getting a crash on exit due to an assertion failure. Oddly, this crash occurs in release builds, too, not just debug bu...
2
1,883
Can FindComponent Be Used To Find A Ruler on a PageControl Created at Runtime
<p>Actually I am using a ImageEN TRulerBox and a TAdvOfficePager (TMS) rather than a TPageControl; however, the TAdvOfficePager functions the same way as a TPageControl aside from property names.</p> <p>Two ImageEN TRulerBoxes and a TImageENView are added to a TAdvOfficePage at runtime. The ruler orientation is set b...
2
1,643
How to save the current image from viewpager?
<p>I have images in a <code>ViewPager</code> and I want user to can save the current image by click on a button to save the image to sd card in phone</p> <p>This is my demoactivity.java</p> <pre><code>public class DemoActivity extends Activity { Button play; MediaPlayer mp; public int playstop = 0; private Button e...
2
2,216
Form Validation won't work using javascript/html
<p>I've been testing my code all day, but nothing happens. The form automatically opens the success.html and doesn't use the script.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override">...
2
1,757
Swift difficulty understanding UINavigationController & navigationController re: presentingViewController
<p>My code works, but I'm trying to understand it. It's a bit of code used to manage a "Cancel" button that can return from either a "Show" segue (presented when user clicks on a table view cell for editing) or a "Present Modally" segue (when the user clicks a "+" bar button item to add a new cell to the table view). ...
2
1,129
Loading Mysql Data from Laravel Backend using Ember.js
<p>I created some restful routes in laravel 4 to provide some sample data to my ember.js app at front end. I am using Laravel 4 at backend and mysql as a database.</p> <p>While loading data from mysql server I came across one strange error. It successfully load all the contents from one ember resource/route while if t...
2
2,164
Android app https deeplink and Chrome browser
<p>I have implemented https deeplinking in my Android app following the <a href="https://developers.google.com/app-indexing/android/app" rel="nofollow">Google guidelines</a>.</p> <p>It is working almost fine, when user opens Chrome browser, searches something related to <em>mycompany</em> and clicks on a link, the OS ...
2
1,040
Using exif to rotate an image
<p>i was following this link <a href="https://stackoverflow.com/questions/7286714/android-get-orientation-of-a-camera-bitmap-and-rotate-back-90-degrees">Android get Orientation of a camera Bitmap? And rotate back -90 degrees</a> to rotate my image if/when necessary, but its not working for me, i get this error</p> <p>...
2
1,201
Navigation drawer icon not showing
<p>I'm building Xamarin Android application and I want to implement right navigation drawer with drawer toogle in a custom action bar. Everything is working (drawer slides from right side,...) except one thing: the navigation drawer icon is not showing.</p> <p>So, this is my <code>Activity.axml</code>:</p> <pre><code...
2
1,856
Applying min-height to List item
<p>I am using a bootstrap theme with Laravel framework and I'm experiencing issues allowing a list item to increase height based on its contents. </p> <p>JSFiddle: <a href="http://jsfiddle.net/h66br41p/" rel="nofollow noreferrer">http://jsfiddle.net/h66br41p/</a></p> <p>I have changed:</p> <pre><code>.framemail .win...
2
1,739
Array of chars in socket client and socket server written in ANSI C
<p>I'm trying to write simple client and server based on sockets in C. The client sends the size of the char array (including last cell for '\0') and then array of chars. Server gets the size and tries to allocate memory for the array of chars from the client. After this, the server looks for a space and copy the chara...
2
2,120
closing mongodb connection in node.js while inserting lot of data
<p>I am trying write a program to parse and insert iis logs data in to mongodb. The files aren't that huge it's around 600 lines. Trying to convince my management nodejs and mongodb is better for this compared to .net and sql server :).<br/> Have a look at the below code in nodejs. Logic: I parse every line and convert...
2
1,057
Exception, but only on 3rd time - The IAsyncResult object was not returned from the corresponding asynchronous method on this class
<p>I have a legacy (2008) Windows service application (using System.ServiceProcess.ServiceBase) that I need to utilize in a slightly different way to how it's working now. At the moment it starts up and creates a TCPLISTENER on a specific port, for a client app to connect to (which it does once) in order to send/receiv...
2
7,909
epipolar geometry / stereo vision using openCV
<p>I am developing epipolar geometry using openCV. (the ultimate goal is estimating world coordinate of model or depth information from two images taken from different viewpoints using same camera)</p> <p>However i am struggling with estimating fundamental matrix and essential matrix that are used in epipolar geometr...
2
1,035
boost io_service initialization SIGSEGV
<p>I'm writing a smpp client and I have a problem that I can't solve. I wrote a <strong>tcp_client</strong> class with an internal <strong>io_service</strong> class to encapsulate all the process of the tcp comunication. After that I realize that I need that control in inherited classes, to run another tasks to be done...
2
1,490
How to make divs have the same height using flexbox properties?
<p>how to align the height of each column to make them all equal ? I followed the rules from the page: <a href="https://www.w3schools.com/howto/howto_css_equal_height.asp" rel="nofollow noreferrer">https://www.w3schools.com/howto/howto_css_equal_height.asp</a>, using the properties <code>display:flex</code> and <code>f...
2
1,654
How to solve Value Error assign error in Django?
<p>I am creating a system with Django. I create a system for limiting. I have several company, and every company has to create their own limit criteria. I think I can use foreign key for that. What I mean is I want to take company name from user's company name. You can understand clearly from my models. But user should...
2
1,775
WPF Radio Button Fires Converter in strange order
<p>I am writing a simple program using the MVVM Model on WPF. Basicly when the user clicks a radio button in a group of radio buttons, it will update a property in the View Model with the new Account number. The problem is, when I click a different button the converter is called for the new button IsChecked Binding, ...
2
1,617
Ansible bitbucket clone provisioning ssh error
<p>In summary, When provisioning my vagrant box using Ansible, I get thrown a mysterious error when trying to clone my bitbucket private repo using ssh. The error states that the &quot;Host key verification failed&quot;.</p> <p>Yet if I vagrant ssh and then run the '<em>git clone</em>' command, the private repo is succ...
2
1,592
How to create QTcpServer on a QThread and then stop it from the main thread
<p>I have provided my entire code below. Please excuse the design as I am new to Qt and this is a quick and dirty example. </p> <p>What I want to do is create a QThread that manages a QTcpServer listener. I want it to be able to close listener when stopped and then reopen it when started again. Please ignore the fact ...
2
1,313
Unable to access current frame being processed in the "ML Kit Vision Quickstart Sample App"
<p>I am working on an android project where I have access <strong>facial landmarks</strong> from the currently processed frame. Then I have to perform some calculation based on the face positions. At last I have to save the current frame being processed.</p> <p>For this I am using <a href="https://github.com/googlesamp...
2
12,958
Help for Mapping JSON Twitter answer to Jaxb with Jettison
<p>I'm a bit new to use JSON format manipulation and not very experimented in JAXB either. What I try to do is building a small client to launch search on Twitter. My starting framework is JBoss RESTEasy (JAX-RS implementation) that provides an elegant way to consume Rest services JSON services by mapping JSON to JAXB ...
2
1,232
HIghchart show current month data with week interval
<p>I am using the highchart line graph to show the current month data in weekly interval. But the chart lines not displayed Here is my code:</p> <pre><code> $(function () { $('#container').highcharts({ chart: { type: 'line' }, title: { text: 'Monthly Average Rainf...
2
2,646
How to access appsettings.json from Azure Service Fabric stateless service
<p>I have a solution with a stateless service project (.sfproj) and a corresponding console app project.</p> <p>I have added appsettings.json to the console app project and am trying to set up access to it using this:</p> <pre><code>protected override IEnumerable&lt;ServiceInstanceListener&gt; CreateServiceInstanceLi...
2
1,790
how to resize image and reorient it if it rotates when uploaded through IOS devices using image intervention package?
<p>I have developed a Laravel web application with the help of some tutorial videos and codes given by other developers on stackoverflow .The app is working pretty good except for the image upload feature. I am facing an issue related to the uploaded image being cut either on the sides or on the bottom as well as the i...
2
3,598
The provided ContentType is not supported; the supported types are 'application/json' in blazor
<p>I am calling a blazor serverapp(webwebapi) in blazor webassemblyapp(client side) but I am facing content type error:</p> <pre><code>crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: The provided ContentType is not supported; the suppor...
2
2,378
Variable results with dplyr summarise, depending on output variable naming
<p>I'm using the <code>dplyr</code> package (<code>dplyr</code> 0.4.3; R 3.2.3) for basic summary of grouped data (<code>summarise</code>), but get inconsistent results (NaN for 'sd', and incorrect count for 'N"). Changing the "name" of the output has variable effects (examples below). </p> <p><strong>Summary of resul...
2
1,876