title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
C++11 Smart Pointer Semantics
<p>I've been working with pointers for a few years now, but I only very recently decided to transition over to C++11's smart pointers (namely unique, shared, and weak). I've done a fair bit of research on them and these are the conclusions that I've drawn:</p> <ol> <li>Unique pointers are great. They manage their own ...
1
1,198
PDO rowCount() error when calling its object from extended classes
<p>I have a database class that I made that uses PDO to connect to my queries, I'm calling it in my main classes constructor as an object.</p> <pre><code>class MyClass { protected $db; public __constructor() { $this-&gt;db = new Database(); } } class Themes extends MyClass { public $avatar...
1
1,252
Receiving CORS Errors when trying to send an Angular GET Request
<p>Here is my end point:</p> <p><a href="http://d.biossusa.com/api/distributor?key=#####" rel="nofollow noreferrer">http://d.biossusa.com/api/distributor?key=#####</a></p> <p>I get this response: </p> <pre><code>{"152":{"user":{"id":198,"firstname":null,"lastname":null,"username":"Lucerna-chem","email":"oliveri@luce...
1
1,159
Yii2 save image to database as base64
<p>I am trying to save image as a base64 into database. But when I submit form I am getting the image NULL. I couldn't understand what's wrong.</p> <h1>VIEW:</h1> <pre><code>&lt;div class="content"&gt; &lt;?php $form = ActiveForm::begin([ 'id' =&gt; 'products-add-form', ...
1
1,558
Remove a drop down item if it is selected
<p>I have multiple instances of select drop downs on a form, eight to be exact. If I select a number on the first select drop down I want to hide the selected number from the second select drop down up to eighth.</p> <p>For the purpose of this I will only show two of the eight select drop downs.</p> <p>View Code - </...
1
1,311
Maven Dependency Netty - NoSuchMethodError
<p>I have an Java Spring application war file connecting to JMS queues in JBoss EAP 7.0. Artemis</p> <p>Once I send the message log is showing the follow message:</p> <p><code>java.lang.NoSuchMethodError: io.netty.util.internal.ObjectUtil.checkPositiveOrZero(ILjava/lang/String;)I</code></p> <p>My investigation point...
1
9,991
ScrollView not showing everything and is cut off
<p>I need this screen to <strong><em>show all the contents</em></strong> that is inside the scrollview, I've tried everything setting ScrollView's flexGrow to 1, parent view's flex to 100. The scrollview is scrolling down until iteration of Bark Central Dog Park &amp; Cafe but it is cut off to half and can't scroll any...
1
3,008
setOnCheckedChangeListener for checkbox in fragment
<p>so I'm quite new on android development and I'm here to learn. I have been doing some tutorials online for listviews.</p> <p>I'm on this one now: <a href="http://www.survivingwithandroid.com/2013/02/android-listview-adapter-checkbox-item_7.html" rel="nofollow">http://www.survivingwithandroid.com/2013/02/android-lis...
1
1,587
jQuery navigating the dom with Each and Nth Child
<p>I'm trying to navigate through each of the tr element and select the 5th td element then store the value in it. What am I doing wrong?</p> <pre><code> $("table tbody tr td tbody tr:nth-child(4)").each(function (i) { alert(this.text); }); &lt;table&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="center"&gt;&l...
1
1,459
Javascript cannot be found to be loaded from the JSP/controller path
<p>When I try to load a js file externally I keep getting a 404 error in the firebug NET console. The JSP can't seem to be detecting the js file and I have tried many combinations with no luck, also searched the net without any real progress, can anyone point out what I am doing wrong here?</p> <p>Web XML</p> <pre><c...
1
1,073
Error while parsing JSON "Unescaped control character around character 981"
<blockquote> <p>Error Domain=NSCocoaErrorDomain Code=3840 &quot;Unescaped control character <br /> around character 981.&quot; UserInfo={NSDebugDescription=Unescaped control <br /> character around character 981.}</p> </blockquote> <p>I am getting the above error in response to a request.</p> <p>Below are the lines of ...
1
1,778
How to add mysql datasource to applicationContext.xml
<p>I am making a dynamic web application. In my application I use Spring and Hibernate.</p> <p>Here is my pom.xml</p> <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd...
1
8,823
Kafka consumer receive null value when sending customer object
<p>So i want to implement application which reads data from json format files. And I have created customer object for the data in json. And I want to send these object through kafka topic. So far i have successfully send String message to producer to consumer. But when i try to send object, in the consumer side, when I...
1
3,025
MySQL - Error 1823: Failed to add the foreign key constraint to system tables
<p>I'm updating a database to correct the foreign key behaviour on update and delete. However, on one table in particular this has been unexpectedly difficult.</p> <p>On most tables, I've been doing the following without any issues:</p> <ol> <li>Drop the foreign key constraint</li> <li>Drop the corresponding index</l...
1
1,663
java.io.IOException: Error writing to server
<p>In my project I'm trying to send file to Amazon S3. The code can run now but SOMETIME an error is occur and I can't see the file on S3. The log below: </p> <pre><code>java.io.IOException: Error writing to server at sun.net.www.protocol.http.HttpURLConnection.writeRequests(HttpURLConnection.java:625) at sun.net.www....
1
2,650
startActivity(intent) is not opening activity
<p>I'm making an android app with 2 activities and a Java class that reads/writes RFID data using NFC. </p> <p>I'm using the <code>enableReaderMode()</code> method to enable reader/writer mode in the <code>mainActivity</code>, which then calls <code>onTagDiscovered</code> in a separate java class. Once in the <code>on...
1
2,212
"Actions must be plain objects. Use custom middleware for async actions." with react/redux
<p>I've encountered this error and spent the last few hours trying to figure it out. I've looked at all the questions that appear to be duplicates - but they don't solve the issue.</p> <p>In my react/redux app, when I made an ajax request in one of my actions, it throws this error out: <code>Uncaught Error: Actions mu...
1
1,313
react-typescript - You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file
<p>I ran into an error while setting up webpack to work with React and TypeScript:</p> <pre class="lang-none prettyprint-override"><code>You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | import * as React ...
1
6,955
Room query returning Maybe<List> crashes app when returns empty result
<p>I have a room query:</p> <pre><code>@Query("SELECT * FROM classes WHERE _id IN(:values) ORDER BY date DESC") fun getClassesByIds(values: List&lt;Int&gt;): Maybe&lt;List&lt;YClass&gt;&gt; </code></pre> <hr> <pre><code>compositeDisposable.add(viewModel.getClassesById(classesTaken) .subscribeOn(S...
1
3,496
collection Field Type not creating form elements
<p>I'm trying to create a form which will add a new text box every time the 'Add new box' link got clicked. I read through the following example. <a href="http://symfony.com/doc/current/reference/forms/types/collection.html" rel="nofollow">http://symfony.com/doc/current/reference/forms/types/collection.html</a></p> <p...
1
1,048
How to correctly receive data from pipes?
<p>So I wrote a program using pipes and execl to do some arithmetic. I'm not sure how to debug pipes and different processes, but from what I can see it has to have something to do with my pipes reading the numbers. So my setup so far is the children are created, and based on thier given operation, they execl to differ...
1
2,366
Delete rows in Gridview
<p>I am having a problem with deleting gridview rows. I am populating my gridview by selecting value in a dropdownlist then by clicking the add button, value will be added in my gridview, here is my code:</p> <p><strong>In my aspx:</strong></p> <pre><code>&lt;asp:GridView ID="GridView1" runat="server" Cs...
1
1,420
Enthought - Canopy Express Installation Problems (Windows 7 x64)
<p>I am having difficulties installing the Enthought Canopy Express program. I have tried both the x64 and x86 versions. </p> <p>My login is normal alpha characters only (as goes for the hostname). I have also tried installing under the local admin account (my account has admin rights as well). The installer runs thro...
1
6,993
Dropdown with input field
<p>I'm using <code>react-bootstrap</code> for adding <code>bootstrap</code> elements to my application. I need to add a dropdown-button that has a list of "labels" that the user can use to tag their items with.</p> <p>My problem is with adding an input field so that they can add a "custom" label. Here's how it looks c...
1
1,317
'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing
<p>Trying to get familiar with maven and taking an online course and am stuck .... appreciate any help provided.</p> <p>I'm running the Site phase and although it completes and I'm able to actually view index.html in a browser I am getting a lot of errors along the way, specifically:</p> <p>'build.plugins.plugin.vers...
1
2,520
Sortable with jQuery and Ajax
<p>I have data that I am accessing via ajax from a Coldfusion component. I am trying to display the data in a sortable jQuery ui format but the sortable feature is not working. Here is the code I am trying to use.</p> <pre><code>$(document).ready(function() { // get assets to display var showid = &lt;cfoutput...
1
2,055
FileNotFoundError: [WinError 3] The system cannot find the path specified: ''
<p>I get this error when Ii execute runserver and I try to access the API:</p> <pre><code>FileNotFoundError: [WinError 3] The system cannot find the path specified: '' </code></pre> <p>I check imports, models, serializer, viewsets and URLs. I don't know what does it means?</p> <p>Here you have a screenshot of the er...
1
1,999
SQL Command cannot be converted to string
<p>Here's my code</p> <p>I seem to be getting an error <code>SQL command cannot be converted to string</code> with this code </p> <pre><code>Dim LogData2 As sterm.markdata = New sterm.markdata() Dim query As New SqlCommand("Select * from openquery (db, 'SELECT * FROM table WHERE person=@person')") query.Parameters.A...
1
1,294
Hangfire ContinueWith with multiple sources
<p>I am chewing on a way to accomplish the following using <strong>ContinueWith</strong>:</p> <ol> <li>Originating App submits a (NonConcurrent) Job</li> <li>Job starts up, does a little processing, calls a Web Service elsewhere</li> <li>Job "completes" (goes quiescent)</li> <li>Web Service submits a "continuation" jo...
1
1,079
Listbox filtering using a combo box
<p>I'm trying to filter the content that is displayed in my listbox depending on the currently selected item of a combo box. I'm not sure how I can accomplish this and I have not found even a simple, plain example online. Any ideas? I'd really appreciate some help.</p> <p>Here are code excerpts. </p> <p>Listbox:</p> ...
1
1,290
javax.ejb.NoSuchEJBException: EJBCLIENT000079 with JBoss 7.1 and Eclipse
<p>I am quite new to JavaEE and tried to get a little Hello World example running (<a href="https://ibytecode.com/blog/how-to-create-a-simple-ejb3-project-in-eclipse-jboss-7-1/" rel="nofollow noreferrer">https://ibytecode.com/blog/how-to-create-a-simple-ejb3-project-in-eclipse-jboss-7-1/</a>), but I am stuck with an </...
1
5,273
Using onUpgrade() to create new database table SQLite Android
<p>I'm new to SQLite databases in Android so I need a little help. The app I'm trying to make will store the users workout exercises and reps for each exercise. I have a database set up and working that will store one exercise and it's reps but I can't get the onUpgrade() method to work so that I can create a larger da...
1
4,033
Parse complex JSON In flutter and type 'Future<dynamic>' is not a subtype of type 'Future<AllUsers>'
<p>I'm just parsing complex JSON and display on listView for learning purpose.</p> <blockquote> <p><strong>API:</strong> <a href="https://jsonplaceholder.typicode.com/users" rel="nofollow noreferrer">https://jsonplaceholder.typicode.com/users</a></p> </blockquote> <p><strong>1) Model Class</strong></p> <p><div cl...
1
2,474
Create Playlist without End-User auth - YouTube API v3
<p>I am trying to figure out a way to create playlists, upload videos, and so on without having the user authentication themselves, but instead having the server do it for them using my YouTube account.</p> <p>I started off by just doing a channel list adding the <code>mine</code> parameter since that requires authent...
1
1,268
Facing NullPointerException while using BIRT
<p>I am using BIRT APIs in a java program.My code is :</p> <pre><code>package com.tecnotree.mdx.product.utils; import java.util.HashMap; import java.util.logging.Level; import org.eclipse.birt.core.exception.BirtException; import org.eclipse.birt.core.framework.Platform; import org.eclipse.birt.report.engine.api.Eng...
1
1,261
Error on creating first Hello world application using Spring mvc
<p>First of all, I want to apologize for maybe duplicate topic but I couldn't find the answer to my question.</p> <p>I started today with spring mvc and i have some issues with my "hello world" application. Can anyone help me make this program to work? Because i have followed some instructions and i have no clue how t...
1
7,651
android notification with seekbar
<p>want to populate My notification with images and a seekbar..... My notification function is as follows...</p> <pre><code>public void showNotification(){ // define sound URI, the sound to be played when there's a notification //Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFI...
1
1,721
Moving Child Form with Parent Form
<p>I've got 2 forms: A Parent and a supporting Child form.</p> <p>When the Child form is initially displayed, I set something called my "Zero Point", which is where the Child form should be positioned relative to the Parent, and defined by one of the controls on the Parent:</p> <pre><code> private void miShowChild...
1
1,305
prettyPhoto in bootstrap not loading lightbox
<p>I am trying to make a simple lightbox gallery, using prettyPhoto and bootstrap. For some reason, when I click on the image thumbnail it just opens it in a blank image page rather than with the js. </p> <p>Chrome dev tools gives me this: </p> <pre><code>Uncaught TypeError: undefined is not a function - bootstrap....
1
1,559
update data in custom adapter using swipeRefreshLayout
<p>I am trying to update the data using swipeRefreshLayout, but every time I swipe down to refresh it repeats the old ones instead of showing the new data.</p> <p>Can you please help me with that and show me where did i make the mistake and how to fix it.</p> <p>My code in fragment:</p> <pre><code>public class Stori...
1
3,328
Roulette random number and if statement c++
<p>I am making a roulette table and wanted to ask a question, but also have help with fixing code.</p> <p>1, currently I am using rand()%37 as my random number generator for the 0-36 numbers. Is there a better generator that gives a more random number? </p> <p>2, I am unsure how to check values in an array against an...
1
3,046
How to change MVC custom client-side validation error message at runtime using jQuery?
<p>I am using MVC5, and I have a ViewModel for my View, which contains a simple form with the following fields:</p> <pre><code>MinFirstNameLength FirstName MinLastNameLength LastName </code></pre> <p>Now, I wish to apply a validation rule on <code>FirstName</code>, based on the value of <code>MinFirstNameLength</code...
1
1,207
Convert array of paths into UL list
<p>I have a table in a database that contains a variety of paths to pages of my website. Each path is listed only one time. I currently have a very long and convoluted series of queries and PHP to pull all these and rewrite the data into an unordered list (to create a menu for my website). It seems that there is probab...
1
2,852
How do I open packages and require dependencies on test scope modules only for JUnit testing
<p>I'm migrating a jar project from java 10 using classpath to java 11 using the java 9 jigsaw modules. There are JUnit5 tests for the project. The test dependencies are provided at test scope by maven. How to make all packages open for testing but not open when the module is used by another project?</p> <p>The jar pr...
1
1,100
Ionic 2: View does not update based on model change
<p>I have a very simple page with a couple of controls.</p> <p>My issue is that the page does not pickup changes to the model when the icon in upper right corner is clicked. This toggles the showFilterPane variable, which again should show or hide a div based on *ngIf="showFilterPane".</p> <p>I have another page just...
1
2,195
FileNotFoundError When file exists (when created in current script)
<p>I am trying to create a secure (e.g., SSL/HTTPS) XML-RPC Client Server. The client-server part works perfectly when the required certificates are present on my system; however, when I try to <strong>create</strong> the certificates during execution, I receive a <strong>FileNotFoundError</strong> when opening the ssl...
1
3,292
AJAX error "setRequestHeader" is not defined
<p>I am a little confused on what I am doing wrong in my code </p> <pre><code>function submitArticle() { var postTitle = encodeURIComponent(document.getElementById('postTitle').value); var postDes = encodeURIComponent(document.getElementById('postDes').value); var postCont = encodeURIComponent(document.ge...
1
1,214
How to perform action when user taps on map using MapKit, Swift
<p>I have custom views, that appear when user taps on annotation, but I don't know how to make those views disappear when user taps somewhere else on map. In Google Map SDK for iOS it would be <code>didTapAtCoordinate</code> and then I would set <code>view.hidden = true</code>.</p> <p>I think it can be done using <cod...
1
1,141
Connect 4 Minimax Algorithm (with Alpha-Beta Pruning) in Java
<p>I'm trying to write a connect four game with AI using the minimax algorithm and alpha-beta pruning. I know that the heuristic works OK (at the very least it scores 4 in the row very highly), but for some reason my minimax isn't working. </p> <p>It seems like the problem is that the current score and the minimax sco...
1
1,744
eclipse cdt tools installing error
<p>I am trying to install the CDT plugin on an exisitng 32-bit installation of Eclipse on Ubuntu Jaunty. I've tried both web-update and standalone-package install and both fail with the following error-</p> <pre><code>Application Started: 4000 !SESSION 2009-10-05 21:24:55.947 ------------------------------------------...
1
1,904
Making Custom Android SurfaceView Transparent
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/5391089/how-to-make-surfaceview-transparent">how to make surfaceview transparent</a> </p> </blockquote> <p>I am trying to make a custom surface view semi translucent. Currently the activity is transparent so I ...
1
1,455
dynamic wsdl creation by spring-ws error
<p>I want to create my wsdl by spring-ws automatically and I inserted the code below to my app context file, but I got the error; </p> <p>"Cannot locate BeanDefinitionParser for element [dynamic-wsdl]"</p> <p>what does that mean and what can I do? tnx</p> <pre><code>&lt;beans xmlns="http://www.springframework.org/sc...
1
1,377
Programmatically Expand/Collapse Group
<p>I want to display to the user a list of all the units and all their sub-units to select from in an ExpandableListView where they can check off which ones they want to move. Since it would seem having clickable Views inside of the ListView prevents it from expanding and collapsing as it naturally would, I was going ...
1
2,319
Issue with Layout Horizontal Anchors - Swift 3
<p>Can anyone provide insight on why my code isn't working?</p> <p>I'm trying to add horizontal spacing between the 2 views in the picture (Red and Black one) but for some reason I keep getting that error and I'm not sure how to fix it.</p> <p>I'm assuming the other constraints are working correctly since I'm not see...
1
1,899
converting mysql database to sql server
<p>i have a mysql database:</p> <pre><code>/* MySQL Data Transfer Source Host: 10.0.0.5 Source Database: jnetdata Target Host: 10.0.0.5 Target Database: jnetdata Date: 5/26/2009 12:27:33 PM */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for chavrusas -- ---------------------------- CR...
1
1,075
typeorm createConnection return Pending even with Await on MacOS with PG
<p>MacOS Catalina 10.15.4</p> <p>How to reproduce, simply install using quick guide</p> <pre><code>npm install typeorm --save npm install reflect-metadata --save npm install @types/node --save npm install pg --save npm install typeorm -g typeorm init --name MyProject --database postgres cd MyProject npm install npm s...
1
1,076
How to force alpha blending on a videoview
<p>I have an android app that displays a VideoView with buttons in front of it. On the target device the buttons display on top properly until the VideoView redraws itself (for instance when returning from another activity). Then the buttons are hidden by the VideoView. </p> <p>This does not occur on two other device...
1
1,158
Pandas: Counting frequency of datetime objects in a column
<p>I have a column (from my original data) that I have converted from a string to a datetime-object in Pandas.</p> <p>The column looks like this:</p> <pre><code>0 2012-01-15 11:10:12 1 2012-01-15 11:15:01 2 2012-01-16 11:15:12 3 2012-01-16 11:25:01 ... 4 2012-01-22 11:25:11 5 2012-01-22 11:40:01...
1
1,210
How can I insert millions of records into a mongo DB from a large zipped csv file efficiently?
<p>I am trying to insert about 8 million of records into Mongo and it seems to insert them with the rate of 1000 records per second, which is extremely slow.</p> <p>The code is written in python, so it may be the problem of python, but I doubt it. Here is the code:</p> <pre><code>def str2datetime(str): return None ...
1
2,235
Phoenix Error while trying to create table
<p>When I either log in to sqlline.py in phoenix or I try to create table in phoenix through api's I get an exception.</p> <p>With my limited knowledge of phenix I am unable to figure out why phoenix is checking for System.Catalog table even before it creates it.Any help will be greatly appreciated.</p> <p>StackTrac...
1
2,034
Mibian returning "NameError: name 'norm' is not defined..." when using with xlwings
<p>I was trying to write an Excel UDF using xlwings to return finance options calculation from the Mibian library. I've tried the code below.</p> <pre><code>import xlwings as xw import mibian @xw.func def BSPutOptionImpVol(underlyingPrice,strike,interestRate,expiryDays,premium): c = mibian.BS([underlyingPrice, st...
1
1,115
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ArrayAdapter.clear()' on a null object reference
<p>I have a ArrayAdapter which updates the ListView by fetching data from an API. API is working fine and I'm getting the data using an AsyncTask.</p> <p>The <code>OnPostExecute</code> method should clear the ArrayAdapter and add new data to it.</p> <p>But I'm facing some errors saying <code>java.lang.NullPointerExce...
1
6,425
Trying to use a uint*& as a const unit*& fails: invalid initialization of reference of type ‘const uint8_t*&’ from expression of type ‘uint8_t*
<p>The following code fails to compile for me (gcc 4.6.3, Ubuntu 12.04): </p> <pre><code>#include &lt;inttypes.h&gt; #include &lt;stdio.h&gt; static inline void adjustBuffer(const uint8_t *&amp;buf, size_t &amp;bufSize, size_t len) { buf += len; bufSize -= len; } uint16_t packInt(uint8_t *&am...
1
1,152
ExecuteMultipleResponse; How to read and store Guids from the response
<p>I am using ExecuteMultipleResponse method to insert 10 account records at a time using SSIS.</p> <pre><code> List&lt;Entity&gt; _Accounts = new List&lt;Entity&gt;(); // Check the batch size and process public override void InputAccount_ProcessInput(InputAccountBuffer Buffer) { //List&lt;int&gt; personIDs = ...
1
1,147
Can't open PID file /var/run/mongodb/mongod.pid (yet?) after start: Too many levels of symbolic links MongoDB Centos 7
<p>I've installed mongodb on centos 7, but I can't start the service with systemctl. Running <code>mongod</code> starts successfully.</p> <p>I've followed all the instructions from here: <a href="https://mongoing.com/docs/tutorial/install-mongodb-on-red-hat.html" rel="nofollow noreferrer">https://mongoing.com/docs/tut...
1
1,711
Error in response to storage.get: TypeError: Cannot read property 'style' of null
<p>I am trying to get data from an oracle database into an LineChart using GoogleCharts but I am always confronted with some errors.</p> <p>If someone could help me, it'd be greatly appreciated !</p> <p>Here is the script in order to get the line chart :</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type...
1
1,920
angular 5: Cannot read property 'intercept' of undefined at HttpInterceptorHandler.handle
<p>We are getting error after updating to angular 5: Console error: "ERROR TypeError: Cannot read property 'intercept' of undefined at HttpInterceptorHandler.handle (http.js:1777)......"</p> <p>"Unhandled Promise rejection: Cannot read property 'intercept' of undefined ; Zone: ; Task: Promise.then ; Value: TypeError:...
1
1,288
InvalidValueError: setCenter: not a LatLng or LatLngLiteral with finite coordinates: in property lat: NaN is not an accepted value
<p>I am making a map through google maps with the aim of showing 2 points on the map, one point is already predefined and the other point will be made using database coordinates. </p> <p>The problem is that, even if the database coordinates are floated through the parseFloat function, google maps identifies the values...
1
1,227
Laravel 5.1 gives 'undefined index: http_host ' when run 'php artisan serve'
<p>I learned <code>laravel</code> using <code>version 5.4</code> for 6 months. i installed latest xampp then. But now i got to work on a project built on <code>laravel 5.1</code>. But when i want to run the app, it gives me the error (undefined index: http_host)! How can i find where the error comes from? How can i sol...
1
1,279
Get Attributes of a Hidden Element
<p>I have a table I am trying to test. Inside one of the columns is yes/no radio buttons which when the page is rendered is hidden underneath an image so that there is a check-mark or an X when yes or no is selected. </p> <p>The attribute for the radio button when yes is selected <code>checked="true"</code>. </p> <p>...
1
1,154
Updating to Angular 4 from 2. "Unmet Peer Dependencies" for @Angular/core and @Angular/http
<p>I'm trying to update from Angular 2.3 to Angular 4.0 and following the instructions here:</p> <p><a href="http://webcache.googleusercontent.com/search?q=cache:Xd-ocIKZ0BkJ:angularjs.blogspot.com/2017/03/angular-400-now-available.html+&amp;cd=1&amp;hl=en&amp;ct=clnk&amp;gl=us" rel="nofollow noreferrer">http://webcac...
1
1,794
Apply onmouseover on each node - GOjs library - swimlane
<p>I've done the <a href="https://stackoverflow.com/questions/22676411/add-css-or-style-to-each-node-in-swimlane-gojs-library">first part</a>, adding colors on each node. The next step would be how to add onmouseover on each node then highlight/apply style on the subgraph (including the links/lines connecting it) belon...
1
8,377
Thread is freezing an activity on Android Application
<p>I'm trying to use a thread on my application to delay that thread without freezing the activity. The problem is that the activity is getting freezed even if i have the Thread.sleep() on the thread. What i want to do is a game like Simon says, i want to hightlight a button for 2 seconds without freezing the activity,...
1
2,303
PTHREAD_CANCEL_ASYNCHRONOUS Cancels the whole process
<p>In a C program, I am using <code>PTHREAD_CANCEL_ASYNCHRONOUS</code> to cancel the thread immediately, as soon as the pthread_cancel is fired from the parent thread. But it is causing the whole process to get crash with <strong>Segmentation Fault</strong>. The job of child thread is to get some data from a database s...
1
2,462
IndentationError: unexpected unindent
<p>Started coding not too long ago, around a month or so. I'm currently coding a bot for Discord and everything was working fine until I got this error message when trying to run the bot after adding in new commands to it:</p> <pre><code>Traceback (most recent call last): File "C:\Users\Jeriel\Desktop\JerryBot\run.p...
1
1,904
DialogFragment showing AlertDialog with Adapter does not survive orientation change
<p>I have hit a wall on this one. My DialogFragment works well with all other dialogs I have except for the one that uses a customer Adapter. When changing orientation the second time I get a <code>java.lang.IllegalStateException: Fragment NewAlertDialog{447bc528} not attached to Activity</code> This is using the API 4...
1
1,302
AttributeError: module 'pyparsing' has no attribute 'downcaseTokens' rasa
<p>I am facing a problem working with rasa, i can't run or train or do anything because below error.</p> <p>Traceback (most recent call last): File &quot;c:\users\dell\anaconda3\envs\rasanew\lib\runpy.py&quot;, line 193, in <em>run_module_as_main &quot;<strong>main</strong>&quot;, mod_spec) File &quot;c:\users\dell\ana...
1
1,127
Bullet not going towards target
<p>Not sure why, I've done this sort of this a bunch of times, but this is giving me some issues. Making a project for Game AI, I have a whole bunch of stuff already done, now just making some turrets that if the player is in a certain range it will fire, which I have already. The turret fires the bullet and then for s...
1
1,118
Working with boolean values in an SQLite database
<p>I read that SQLite databases support a <code>boolean</code> value. Here's my query to create the table:</p> <pre><code>private static final String CREATE_TABLE_PROMEMORIE_RSI = "CREATE TABLE IF NOT EXIXSTS " + promemorieRSI.PROMEMORIE_RSI_TABLE + " (" + promemorieRSI.ID + " integer primary k...
1
1,142
Tensorflow: AttributeError: 'NoneType' object has no attribute 'original_name_scope'
<p>I am trying to run some python tensorflow code on a debian 9.5 stretch system on google cloud. I am Using tensorflow GPU version of this (the latest version) with the approriate CODA and cuDNN software installed. Here is my code:</p> <pre><code> import tensorflow as tf mnist = tf.keras.datasets.mnist (x_train,...
1
1,910
how to use custom custom classloader in springboot
<p><strong>How to load beans using custom classloader in spring boot</strong></p> <p>i need to encrypted the spring boot project.</p> <p>at first i try using <strong>proguard</strong>, but fail because spring use lots of Annotations and it has <em>DI</em> .</p> <p>then i try using <strong>custom classloader</strong>...
1
1,470
Only Fan-out (and forget) in Durable Functions
<p>I have an existing Function App with 2 Functions and a storage queue. F1 is triggered by a message in a service bus topic. For each msg received, F1 calculates some sub-tasks (T1,T2,...) which have to be executed with varying amount of delay. Ex - T1 to be fired after 3 mins, T2 after 5min etc. F1 posts messages to ...
1
2,230
JDBC Connection using different files
<p>First of all sorry for the name of the title, but i dont know how to put another one since english is not my native language.</p> <p>I have the following method to connect to a database:</p> <pre><code>import java.sql.DriverManager; import java.sql.Connection; import java.sql.SQLException; public class PgConnect ...
1
1,398
Onsen ui navigation with parameters
<p>I am using onsen ui with typescript and angularJS with an ons-sliding-menu: </p> <pre><code> &lt;ons-sliding-menu menu-page="menu.html" main-page="link/to/some/page.html" side="left" var="menu" type="reveal" max-slide-distance="260px" swipable="true"&gt; &lt;/ons-sliding-menu&gt; &lt;on...
1
1,125
MySql query selecting top highest student scores including a must subject score
<p>What I am trying to archive here, is to select only the subjects a student is performing the best at, including a mandatory subject (<code>mustSubjectId</code>) and output the results depending on the grade range total.<br> The higher the <code>grade</code> the lower the point <code>add sum(marks)</code> as points. ...
1
1,325
active_admin - display a list of items that belongs to another item
<p>I am trying to display somehow the <code>line items</code> for the <code>order</code> in the active_admin <code>order show page</code>, no luck..</p> <p>here are the relations between models:</p> <p><strong>order.rb</strong></p> <pre><code>class Order &lt; ActiveRecord::Base has_many :line_items, :dependent =&g...
1
1,058
Chunking bytes (not strings) in Python 2 and 3
<p>This is turning out to be trickier than I expected. I have a byte string:</p> <pre><code>data = b'abcdefghijklmnopqrstuvwxyz' </code></pre> <p>I want to read this data in chunks of <em>n</em> bytes. Under Python 2, this is trivial using a minor modification to the <code>grouper</code> recipe from the <code>itert...
1
1,236
ASP MVC jquery function not working in partial view but working in main view
<p>I have a main view with search criteria. Main view contains a partial view with an <code>html</code> table. The search results are loaded via <code>ajax</code>. </p> <p>Now i am trying to implement <code>edit</code>, <code>create</code> and <code>delete</code> via <code>bootstrap modal</code>. So in the <code>parti...
1
3,782
Getting "OSError: Unable to open file Permission denied " when trying to open trained model using keras in python
<p>After following through some video tutorials, I have successfully trained a machine learning model using python 3.6, tensorflow and keras. But when I'm trying to open my trained model, it throws an error saying</p> <blockquote> <p>OSError: Unable to open file (unable to open file: name = 'logs/Cats-vs-dog-cnn-64x...
1
1,170
Indexing columns across multiple tables in PostgreSQL
<p>I'm trying to optimize the following join query:</p> <p>A notification is a record that says whether a user has read some activity. One notification points to one activity but many users can be notified about an activity. The activity record has some columns such as the workspace the activity is in and the type of ...
1
3,000
Kusto/KQL: summarize by time bucket AND count(string) column
<p>I have a table of http responses including timestamp, service name and the http response code I want to query using KQL/Kusto.</p> <p>My goal is to have a table that tells me &quot;How many http responses of a certain type (2xx, 4xx etc) did a particular service have within the last 5 minutes over time&quot;</p> <p>...
1
1,028
JSF 2 basic @RequestScoped CRUD
<p>i have these simple pages:</p> <p>list.xhtml</p> <pre><code>&lt;h:form id="form"&gt; &lt;h:dataTable value="#{testBean.model}" var="elem"&gt; &lt;h:column&gt; &lt;f:facet name="header"&gt;code&lt;/f:facet&gt; #{elem.code} &lt;/h:column&gt; &lt;h:column&gt; ...
1
3,314
Read excel files with apache spark
<p><em>(new to apache spark)</em></p> <p>I tried to create a small Scala Spark app which read excel files and insert data into database, but I have some errors which are occured due of different library versions (I think).</p> <pre><code>Scala v2.12 Spark v3.0 Spark-Excel v0.13.1 </code></pre> <p>Maven configuration ...
1
1,867
Mustache Dynamically set variable
<p>I need help in using a javascript variable set dynamically as my mustache template variable. Here is the problem. My JSON looks like this</p> <pre><code>jsonData = { "recipemodules" : { "enchiladas" : [ { "title" : "Chicken Enchiladas", "thumbnailurl" : "http:www.google.com/image...
1
1,518
Android install apk programmatically error - Package Parse error
<p>I create an Edittext at my page, to allow user to update the apps by downloading the apk and install. I am using loojp library to handle the Asynctask.</p> <p>My code at activity:</p> <pre><code>f0textupdate.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View v...
1
2,743
Django, templates, for loops, and cycles
<p>(tl;dr at the bottom)</p> <p>Let me try to explain what I'm trying to accomplish: I have a two dimensional array, and I would like to display its contents a certain way. I want "rows", and each row can display no more than three "objects", for lack of a better word. So I want to iterate over the array and create my...
1
1,140
How to work out "Error in tbl_vars(y) : argument "y" is missing, with no default" in Shiny?
<p>I really need some useful help.</p> <p>I've wrote code, but it doesn't work. However, nearly same example is working perfectly.</p> <p>Here is what I got:</p> <pre><code> Warning: Error in tbl_vars: argument "y" is missing, with no default Stack trace (innermost first): 45: tbl_vars 44:...
1
1,895
event.getAction() never use MotionEvent.ACTION_UP
<p>i have a problem with MotionEvent in the OnTouchListener. The <code>ACTION_DOWN</code> works perfectly, but it never use ACTION_UP I really don't know where is my problem, so if someone can help me with it, that would be really great, thank you. </p> <pre><code>public class MainActivity extends Activity { View....
1
1,227
Trying to understand optional, list and named arguments in Python
<p>I'm a beginner at Python, trying to understand function arguments and their types and orders.</p> <p>I tried to experiment a little with the different kinds of argument and here's my experiment</p> <pre><code>def main(): test_a(2, 33, 44) test_b(2, 33) test_c(2) ## test_d(2,,44) **Produces Invalid ...
1
1,248
Rails Devise routing error - "No route matches" (controller=>"devise/sessions")
<p><strong>Edit 2: Looks like a quick temp fix for me was to add a forward slash "/" in front of the controller name in my link_to_unless_current and current_page methods from my view. e.g.</strong> </p> <pre><code>&lt;% active = current_page?(:controller =&gt; '/sites', :action =&gt; action) ? 'active' : '' %&gt; ...
1
2,623