title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
AndEngine TXMLLoader null pointer exception
<p>I am trying to load a tmx file in andengine. I have copied the example from AndEngine examples and created a new tmx file which i am loading. But I am getting NullPointerException on line tmxLoader.loadFromAsset("tmx/test.tmx"); . the test.tmx file just contain a single tile. It is giving the following error log:</p...
2
1,387
RESideMenu and Navigation
<p>I'm using this for a side menu in my app: <a href="https://github.com/romaonthego/RESideMenu" rel="nofollow">https://github.com/romaonthego/RESideMenu</a></p> <p>I'm having some issues to implement it in my own way. The samples work fine, but I have problem to make it work over my app navigation.</p> <p>I would li...
2
1,246
ToList() taking to long when converting an IEnumerable with multiple objects
<p>I have the following classes:</p> <pre><code>public class CountryVM { #region Properties public int CountryID { get; set; } public string Code { get; set; } public string Name { get; set; } #endregion #region Constructors /// &lt;summary&gt; /// C...
2
1,297
Ruby 2.1.0 on existing Heroku application
<p>I got very weird problem with setting Ruby version to 2.1.0 on extisting Heroku app. When trying to deploy, got this error:</p> <pre><code> ! Invalid RUBY_VERSION specified: ruby-2.1.0 ! Valid versions: ruby-2.0.0, ruby-1.9.3, ruby-1.9.2, ruby-1.8.7, ruby-1.9.3-jruby-1.7.0, ruby-1.8.7-jruby-1.7.0, ruby-1.9...
2
2,139
How to create Custom User Model in Wagtail 1.8 by writing a new admin.ModelAdmin?
<p>In a Wagtail 1.8 project, I am trying to create a custom user model, which does use no username, but only an email. I want to be able to define extra variables like <code>is_training</code> and show it in the edit form in the admin area under <code>admin/users/edit</code>. </p> <p>Now I already have the EmailUser (...
2
1,849
Retrieve product custom field values in checkout custom fields
<p>I have a form in a single product page where user insert his informations (name, phone, country ,age ...) what I need to do is to display this information in billing details . </p> <p>So, what I did is I added 2 fields to my form in single product , here is the code : </p> <pre><code>&lt;div class="col-md-6"&gt; ...
2
1,519
Add markers from an arraylist of latlng
<pre><code>public class Viewmap extends FragmentActivity implements LocationListener,OnMarkerClickListener { // Progress Dialog private ProgressDialog pDialog; // Creating JSON Parser object JSONParser jParser = new JSONParser(); ArrayList&lt;LatLng&gt; Points; // url t...
2
3,923
How to autostart an Apache Spark cluster using Supervisord?
<p>Starting an Apache Spark cluster is usually done through the spark-submit shell scripts provided by the code base. However, the problem is that every time the cluster shuts down and starts again, you need to execute those shell scripts to start the spark cluster.</p> <p><a href="http://supervisord.org/" rel="nofoll...
2
1,215
Finding the Starting Address of an array
<p>I've been working on the bufbomb lab from CSAPPS and I've gotten stuck on one of the phases.</p> <p>I won't get into the gore-y details of the project since I just need a nudge in the right direction. I'm having a hard time finding the starting address of the array called "buf" in the given assembly.</p> <p>We're ...
2
2,233
sort QTableWidgetItem numerically
<p>i am trying to create a table using python and pyqt4. </p> <p>at the moment it will sort the items like this</p> <pre><code>100, 10, 1, 2 </code></pre> <p>etc..</p> <p>it needs to be sorted as such:</p> <pre><code>1,2,10,100 </code></pre> <p>etc</p> <p>i am currently using </p> <pre><code>self.table.setSort...
2
2,217
Call JSON on Spinner OnItemSelected and display data into another Spinner
<p>I am making an android app in which I am using two spinners. In first spinner I am displaying data from JSON which I've done successfully. Now by clicking an item of first spinner I need to display data from another JSON service into second spinner.</p> <p><strong>First Service (I am displaying <code>city_name</cod...
2
2,452
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: no parameters were bound
<p>I get this error when I run the code below:</p> <blockquote> <p>Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: no parameters were bound'</p> </blockquote> <pre><code>&lt;?php include_once("class.user.php"); include('dbconfig.php'); if(isset($_REQUEST["su...
2
1,083
Github ssh-agent cannot push
<p>I want to Push changes via SSH to my git repo.</p> <pre><code>git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. </code></pre> <p>I have my ssh-agent up and running. I have my key loaded via <cod...
2
1,836
how to create a powershell remote session from inside a Java program?
<p>I have the following code to connect to a remote machine and execute commands.It is working if I create a new session for each Invoke-Command call to the remote machine. I don't want to create a new session each time I use Invoke-Command as that will not scale for thousands of commands on hundreds of machines concur...
2
1,322
Choose/Take a Photo from AlertDialog in Android
<p>In my app there is a popup activity where the user can edit his info. I am using <a href="http://www.devexchanges.info/2016/05/android-basic-training-course-working.html" rel="nofollow noreferrer">this</a> tutorial to display a photo from gallery/camera. I have a bunch of xml files, one for every alert dialog.</p> ...
2
4,289
Installing psyco for python on Snow Leopard
<p>I'm having some trouble installing psyco on my Macbook pro running Snow Leopard with python 2.6.1.</p> <p>I've been trying to force python to run in 32-bit mode using the command</p> <pre><code>defaults write com.apple.versioner.python Prefer-32-Bit -bool yes </code></pre> <p>Further, I have tried the Macport py2...
2
3,883
What is the correct way to make Maven find the parent POM of my project?
<p>I have a Maven project which is a part of a large scale enterprise system. I have not developed this project, but I have developed a small framework, which I am supposed to test, integrated with it. Upon copying, building and installing the project, it compiled, and I was able to launch it. However, after trying to ...
2
13,178
Can't load view.jsp using Spring MVC
<p>I'm new in Spring MVC and try to make an exercise, like in the example. I have index.jsp and view.jsp. Index.jsp is loaded well, but when I try load view.jsp, it teturns empty field and logger doesnt show me any mistake. I use IntellijIDEA. Below all classes and files, let me know, if i have to give other info. Than...
2
2,183
How to setup Identity Server 3 for IOS client using Authorization Code flow
<p>Lately I've bee playing around with Thinktecture's Identity Server 3 and more specifically clients and flows. Now I want to see how the communication happens between <strong>native IOS application</strong> and <strong>Identity Server 3</strong> using <strong>Authorization Code flow</strong>.</p> <p>What I've done so...
2
2,050
fails to build an (newly created) ejected expo project
<p>I am trying to add react-native-firebase to a newly created expo project, I ejected the app successfully, but when I try to add the library the project fails to build and I get the following error</p> <pre><code>ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exac...
2
4,975
Cannot resolve symbol List<LatLng> google maps API
<p>I am trying to create an application which would calculate everything I need for my route, using google API.</p> <p>I was following very nice guides here on StackOverflow, but now I encountered problem that nobody seemed to have.</p> <pre><code>List&lt;LatLng&gt; cannot be resolved as symbol </code></pre> <p><str...
2
1,811
Serializer is_valid() is returning true though fields are empty
<p>I Tried and run the code with function-based view and it was working perfectly then I tried to switch to modelViewSet.</p> <p>Here is my code for Serializers :</p> <p>UserSerializer</p> <pre><code>class UserSerializer(serializers.ModelSerializer): class Meta: model = get_user_model() username ...
2
1,070
How to fix the error: resource android:style/TextAppearance.Material not found?
<p>i've tried to build the project, but every time i try to, the same error appears, </p> <pre><code>Output: error: resource android:style/TextAppearance.Material not found. error: resource android:style/TextAppearance.Material.Body1 not found. error: resource android:style/TextAppearance.Material.Body2 not found. </...
2
2,897
Castle Windsor Typed Factory, binding multiple generic constraints?
<p>Note: Before I begin please note this worked perfectly before the definition of ICommandHandler was changed to include multiple generic constraints, with one constraint it works fine.</p> <p>However, I do not seem to be getting multiple constraints passed into the "arguments" array of the selector. Am I missing som...
2
1,300
Increment date based on the time value automatically in SQL
<p>I have a client data which has the candidate id, a start date which will have only the date in varchar format and a time value associated to that date in varchar format in a seperate column.</p> <p>To give a brief explanation about the data a candidate will come to study center at any time point in a day for exampl...
2
1,214
MikePenz FastAdapter usage
<p>I am trying to implement the fastadapter. I just copied the sample code and tried to get it working. When I try it out it does not show anything in my recycler view. With debugging I found out that bindView() ist not getting called.</p> <p>My SampleItem.jave</p> <pre><code>public class SimpleItem extends AbstractI...
2
1,396
I want Popup to close, how do I do it?
<p>When I press the <code>AddAction</code> button from the <code>Addaction</code> component, I want the popup to close. ?</p> <p>in fact, if I reach the <code>onCloseAddActionModal</code> method in my component which is popup from AddAction component, my problem will be solved.</p> <p>AddAction Component: </p> <pre>...
2
2,120
Enumerations and User Input
<p>I was wondering if enumeration is commonly used with user input. I'm doing an exercise in which in my Book class I have to create an enum Genre with different genre enumerators such as fiction, non, fiction etc. </p> <p>When the user uses the program, he/she is asked for certain information about the book being sto...
2
2,015
Impersonation Issue on IIS7 - Entity Framework Trusted_Connection ASP.NET
<p>I'm developing an ASP.NET Application that connects to a Database (on another machine). When I try to connect from my machine there are no problem, when I deploy it on the destination environment, EF returns an exception:</p> <pre><code>The underlying provider failed on Open.System.Data.SqlClient.SqlException (0x80...
2
1,028
Edited dataset do not update the database and return a concurrency violation error (C#)
<p>I am synchronizing data from different tables (about 20 tables) from Sybase database which I access through ODBC and a SQL Server (my main database for this project).</p> <p>When I launch the function to sync the data (only one way for the moment from Sybase to SQLServer), nothing happen and i get a concurrency vio...
2
1,513
kubernetes dones't reach internal registry
<p>I've deployed an docker registry inside my kubernetes:</p> <pre><code>$ kubectl get service NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE registry-docker-registry ClusterIP 10.43.39.81 &lt;none&gt; 443/TCP 162m </code></pre> <p>I'm able to pull images from my machi...
2
1,272
checkbox label enabled disabled knockoutjs
<p>I have html form which is using knockout to manipulate enable/disable mode for controls. </p> <p>I have textbox control and checkbox control which are manipulated by a button, if the button is clicked then they can be edited, otherwise they are disabled.</p> <p>The problem is happening with the checkbox controls b...
2
1,202
How to redirect a ASP.NET Core MVC partial view after file download
<p>I have an asp.net core MVC partial view called ExportPagePartial that allows user to export a page from the system and downloads it. In the HttpGet controller action I show the partial view (as a Modal pop-up) to get user input.</p> <p><strong>Modal Popup</strong></p> <pre><code>&lt;a class="dropdown-item" asp-act...
2
1,053
How can I detect UIWebview loads an url that needs authentication or not in iOS
<p>I'm making an iOS application that allows 2 users interact with each other. When first user navigates to a URL on his app using UIWebView, I will send this url to the second user. The second user receive this link and use UIWebView to load it.</p> <p>Everything works well until one person goes into a private zone. ...
2
1,713
make text view for every item in Arraylist
<p>I'm making application that send a String Array list to another activity and in the another activity it takes all the items and make text view for every item but i don't know how to do it.</p> <p>this is my first activity code:</p> <pre><code>package com.TOF.versus; import android.content.Intent; import android.su...
2
1,606
How to delete pending pods in kubernetes?
<p>I have two pending pods which I cannot delete by any means. Could you help? OS: Cent OS 7.8 Docker: 1.13.1 kubenetes: &quot;v1.20.1&quot;</p> <pre><code>[root@master-node ~]# k get pods --all-namespaces (note: k = kubectl alias) NAMESPACE NAME READY STATUS ...
2
1,617
Generating a Hexagonal Lattice Using Spatstat
<p>I'm analyzing the growth pattern of certain particles, and want to compare the point pattern with that of a perfectly hexagonal lattice with the same intensity (same number of points per unit of area). I've written a function that does this, but it has an inherent error and I'm not sure from where it originates. E...
2
1,699
How to work around lack of NUL terminator in strings returned from mmap()?
<p>When mmap()ing a text file, like so</p> <pre><code>int fd = open("file.txt", O_RDWR); fstat(fd, &amp;sb) char *text = mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0); </code></pre> <p>the file contents are mapped into memory directly, and <code>text</code> it will not contain a NUL-terminator so operating on it...
2
1,069
Eureka Client Registration Failed in Docker compose: Failing to register as client - but eureka server & client is individually up & running
<p>I have a spring boot application for <strong>Eureka Server</strong>:</p> <p><strong>application.yml (Eureka Server)</strong></p> <pre><code>server: port: 8761 spring: application: name: eureka eureka: client: register-with-eureka: false fetch-registry: false </code></pre> <p>I have a eureka clien...
2
2,471
ADO EF Code First Bi-Directional Many-To-Many Self Reference Challenge
<p>I've been kicking the tyres on ADO EF Code First and have come up with the following issue:</p> <p>My model quite simply represents a family tree. It consists of a Person Class with a few scalar properties FirstName etc and a collection of Person representing Parents and another collection of Person representing...
2
1,103
undefined error with calling ble_gatts_count_cfg function
<p>I am programing my esp32 to be able to advertise my custom services/characteristics. I am failry new to esp idf and I am struggling to program bluetooth using nimBLE. during building,there is no error thrown but while monitoring, i receive the following error from the function in main:</p> <pre><code>I (391) heap_in...
2
5,030
R How can I fix DataExplorer error during PCA: "Item 2 has no length"
<p>I have a data set <code>df</code> with 102 variables: 16 int, 80 factors, 8 logi. There are no NA values.</p> <p>I've used DataExplorer before without issue, but when I ran it on this data set ...</p> <pre><code>library(DataExplorer) create_report(df) </code></pre> <p>... it chugged along fine, outputting its pro...
2
3,459
What code is executed as part of the XAML design time? In Visual Studio and Blend
<p>As some background, I'm playing around with a Windows Store App and Windows Phone 8 application sharing a single ViewModel (PCL).</p> <p>I'm using MVVMLight and NInject / Common Service Locator to instantiate view models and services. Which is great and gives me really nice loose coupling that is fantastic to test ...
2
2,224
How to call notifydatasetchanged in PagerAdapter?
<p>I have one listview which each item contains one ViewPager. And every time I scroll my ViewPage I got error said that PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged!</p> <p>I tried to set notifyDataSetChanged in my list adapter and pager adapter too, but it doesn't wor...
2
3,351
Create raw XML request using PHP SoapClient
<p>I am trying to create raw XML request with SoapVar. Here is my code</p> <pre><code>#- Loading the WSDL document $wsdl = &quot;https://ota2-p1.ihotelier.com/OTA_Seamless/services/DailyRateService?wsdl&quot;; $client = new SoapClient($wsdl,array('trace' =&gt; true, 'exceptions' =&gt; true)); #- Creating the XML d...
2
2,273
The 'req.body' on Express.js v^4.17.1 returns 'undefined' from post requests
<p>I've been trying to get something to send to my shoutbox_endpoint, but on the Express.JS Backend where the endpoint is it returns <code>req.body</code> as <code>undefined</code></p> <h2>Post Request</h2> <pre class="lang-js prettyprint-override"><code>const headers = { &quot;SMN-Auth-JWT&quot;: &quot; REDACTED &...
2
1,132
AWS Lambda not executing node.js MySQL queries
<p>The company I work for is currently trying to migrate some of our existing codebase over to AWS Lambda. We are running node.js 4.3 (highest version offered for lambda) and we are executing inside a VPC to connect to an RDS database. The Lambda function is connecting to the database just fine, however a simple select...
2
1,041
Getting a fetch error using redux toolkit and RTK-Query
<p>I am using RTK-Query, and Redux-toolkit for this app, and I created an api-slice with createApi, as per the docs.</p> <p>When I run a request to the backend, I get a <code>&quot;FETCH_ERROR&quot;</code>; however, when I run the same request using Axios, I get the data correctly from the backend, which leads me to be...
2
1,262
Generating random groups of colored blocks using Javascript
<p>I'm new to both html and Javascript coding, and only recently learning to work with them through w3schools.com tutorials. </p> <p>Right now, I'm trying produce the following effect on a webpage:</p> <p>There're 9 square blocks on the page (set using tags). I'm looking to use Javascript or jquery coding to make it...
2
2,132
Interop word dynamic table creation
<p>I need to export Dataset Tables to Word. I have tried a solution using Interop Word. Here I'm facing a problem,</p> <p>I need to Place the tables in the word document with a series of space, my problem I cant able to create a new table each table on the Dataset.</p> <p>Here is my code,</p> <pre><code> private ...
2
1,055
How to Set/Create a Key Value for AES Secret Key on Network Luna HSM?
<p>When attempting to create a secret key; I'm told that it's not possible to create your own key values and they must be generated/unwrapped onto the HSM. In case this isn't true I've attached both attempts/methods in case I'm missing something. Any help would be greatly appreciated! </p> <p><strong>Environment:</str...
2
4,216
Issue when writing to file in spark
<p>I'm working on spark in local mode with the following options</p> <pre><code>spark-shell --driver-memory 21G --executor-memory 10G --num-executors 4 --driver-java-options "-Dspark.executor.memory=10G" --executor-cores 8 </code></pre> <p>It is a four node cluster of 32G RAM each.</p> <p>I computed column similari...
2
2,615
Fatal Exception: java.lang.NoClassDefFoundError
<p>I have ViewDebug issue in some devices with Android OS 4.4.4. I use vector icon in my app. From fatal exeption description I don`t understand why it happened.</p> <p>Crash:</p> <pre><code>Fatal Exception: java.lang.NoClassDefFoundError: android/graphics/drawable/Icon at java.lang.Class.getDeclaredMethods(Class....
2
1,201
C++ jump to other method execution
<p>In my C++ JNI-Agent project i am implementing a function which would be given a variable number of parameters and would pass the execution to the other function:</p> <pre><code>// address of theOriginalFunction public static void* originalfunc; void* interceptor(JNIEnv *env, jclass clazz, ...){ // add 4 to th...
2
2,935
Duplicate Data rows in LazyDataModel primefaces
<p>I have a problem with The lazyDataModel in Primefaces. If i have 1 result to show, one row is shown with the good one. If i have 2 result to show, two row are shown but the two row are the same. If i have 3 result to show, three row are shown but the three are the same. ...</p> <p>Have you an idea ? Why it doesn't ...
2
1,558
Xfce Compiz doesn't start on first login
<p>I installed Xfce4, Compiz and lxdm on my desktop computer running openSUSE 12.1. To start Compiz as the default WM I edited <em>~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml</em> and set</p> <pre><code>&lt;property name="Client0_Command" type="array"&gt; &lt;value type="string" value="compiz"/&gt...
2
1,153
VS 2015: The breakpoint will not currently be hit. No symbols have been loaded for this document
<h2>The problem</h2> <p>I have a C++ (*.cpp) file, which is part of a static library project that I can't put an active breakpoint. When I do, it gives me the notification seen in the title of this post. <strong><em>I can put breakpoints in any other C++ file in that same project and it will be hit during debugging</e...
2
1,652
poll() socket programming tcp linux multiple connections issue
<p>I'm new to socket programming, but I have followed ibm example at <a href="https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzab6/poll.htm" rel="nofollow">https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzab6/poll.htm</a> and changed some code to make it better but when I connect to the server via t...
2
3,910
How to make a circular view pager in android?
<p><a href="https://i.stack.imgur.com/ENl3F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ENl3F.png" alt="enter image description here"></a> How to jump from the zeroth index of viewpager to the last index of the view pager? That is how to make the view pager circular? I want jump to last index if ...
2
2,609
Glide with Map marker (Size issue)
<p>I am crazy to use Glide for image loading.<br> Tonight i was suffering with one issue i cant solve after west hours of my life. :P</p> <p>so what i was try.</p> <pre><code>Glide .with(activity) .load(databeen.getModelimage()) //URL From Serverside ...
2
1,513
Pass touch event down through Views and ViewGroup
<p>I have a FrameLayout wiht a ScrollView and a LinearLayout inside. Both ScrollView and LinearLayout have the same dimensions, so they are overlaid and the LinearLayout covers and hides the ScrollView. The ScrollView has TextView and a Button inside itself.</p> <p>This is the situation:</p> <pre><code>+FrameLayout ...
2
1,988
DynamicProxyFactory error with received data size
<p>I use a dynamicproxyfactory in order to call any webservice by a wsdl string path. Unfortunalty, when a webservice answers a lot of data, an exception is raised :</p> <blockquote> <p>System.ServiceModel.CommunicationException: Le quota de taille maximale autorisée pour les messages entrants (65536) a été dé...
2
1,811
Access derived class member variable in virtual function
<pre><code>class Car { class BaseState { explicit BaseState(Car* vehicle) : mVehicle(vehicle) {} virtual void run() = 0; Car* mVehicle; } class State1 : public BaseState { explicit State1(Car* vehicle) : BaseState(vehicle) {} virtual void run() { // use data of...
2
1,844
May context path change on every request?
<p>I am developing a web application and something really strange happens. I run my JEE application on my local tomcat and all goes well. When I deploy my application online (on Heroku or Openshift, both), the context path changes on every request. For example, if I click on a link the app does everything correctly sho...
2
1,789
Rails Export multiple tables to csv
<p>Hi I have a simple rails application that has two models Equipment_Types &amp; Tasks</p> <p>Each equipment type has many tasks. When I export to csv file I would like to export the name of the equipment type, the task name and the associated schedule. Basically every thing that is displayed on equipment_type/show.h...
2
3,660
Query Mongo for multiple key value pair combinations in array field
<p>I am trying to query for Mongo documents based on 1 many key value pairs over a large collection of documents.</p> <p>I am storing the values in an array called descriptors. I cannot figure out to write the query to consistently return results.</p> <p>Basically I am trying to write the following SQL query in Mongo...
2
1,428
Flexbox Nav Dropdown Not Under Container
<p>I am trying to use a flexbox nav menu with dropdowns for some menus. For some reason, on hover, the dropdown lists are showing up to the right of the container I am hovering on. I would like for them to show below, like a normal nav menu. </p> <p>Here is a codepen: <a href="http://codepen.io/anon/pen/XbmaBY" rel="n...
2
2,253
Persisting with AngularJS and JPA
<p>I'm trying to develop an application using Google Guice, JPA (EclipseLink) and AngularJS. Basically in this application I have some Employees and more than one Salary for each of them.</p> <pre><code>public class Employee implements Serializable { @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name="ID_...
2
1,109
Tensorflow Keras implementation of multi-instance learning problem
<p>I'm trying to implement a multi-instance learning model with TensorFlow Keras API. Suppose the input tensor shape is <code>(None, 18, 10, 300)</code>, and I need to perform multi-instance learning with <code>submodel</code> along <code>axis=1</code>. Thus, the input to <code>submodel</code> should be <code>(None, 10...
2
1,347
Vue Form Validation Errors
<p>Im trying to create a form with validation using vue but Im currently encountering errors not defined errors but its currently defined.</p> <p>HTML</p> <pre><code>&lt;form class="add-comment custom-form" @submit="checkForm" action="/something" method="post" novalidate="true" id="booknow"&gt; &lt;fieldset&gt; ...
2
1,104
Send post request to another server using ajax (cross-domain) and use jsp code as a proxy
<p>I need to get json data from the company server. The interface they give to me is to send a post request with the proper params. And then I will get json data.</p> <p>I use ajax to send a post request to local server and use jsp to send the post to the company server. and I put the .html and .jsp in the same file n...
2
1,367
modelling a customer class in java for a database application
<p>I'm working on a java swing application which handles Customer management for a shop. I'm trying to build it based on the mvc pattern, but actually i'm somewhat unexperienced in it. </p> <p>Basically, theres a View with some Textfields for Customer Creation and of course the class called Customer. If the form is su...
2
3,529
Displaying an array from xml resources in ListView not working
<p>I have an array in my resources that I want to display in a <code>ListView</code> but I'm failing miserably so maybe someone can tell what I'm doing wrong and what should I do to accomplish this. Here is the code I' using:</p> <p>In my XML resource:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;r...
2
2,376
Is there any way to get the values of a row from sap.ui.table.Table
<p>I know that sap.ui.table.Table lets you uses MultiToggle selectionMode. This adds a column with check boxes. Is there any way to use that check box to select a row and get that row value in my controller. I define my table control in a xml viw not in my controller. Using this setup would it be possible to retrieve a...
2
4,768
Monkey patching sockets library to use a specifc network interface
<p>I have been trying to make requests to a website using the <code>requests</code> library but using different network interfaces. Following are a list of answers that I have tried to use but did not work.</p> <p>This <a href="https://stackoverflow.com/questions/48996494/send-http-request-through-specific-network-int...
2
1,273
JQuery show hide multiple DIVs from menu and menu within DIV
<p>I'm new to JQuery. I'm trying to show and hide multiple divs. I have a menu showing A,B,C. When I click A, the div A1 appears. Div A1 has a menu within it showing 1, 2, 3 and so on. When I click 2 in this menu, A1 disappears and A2 appears. When I click B, the currently visible div disappears and B1 appears. B1 has ...
2
1,609
Building a Python C extension on Windows
<p>I'm trying to build a small Python module in C. It's just a single .C file that includes a single header file and links a single static library.</p> <p>On Linux everything works as expected, but one of our team members uses Windows, so I'd like to build this module for Windows as well.</p> <p>I'm using Windows 10 ...
2
1,644
Email harvester in Python: How to improve performance?
<p>I have found a program called "Best Email Extractor" <a href="http://www.emailextractor.net/" rel="nofollow">http://www.emailextractor.net/</a>. The website says it is written in Python. I tried to write a similar program. The above program extracts about 300 - 1000 emails per minute. My program extracts about 30-10...
2
1,711
Pyspark JDBC Hana database dataframe.show error
<p>I able to connect to Hana database in spark by using python JDBC dataframe and able to get dataframe.printSchema() output but if i try to do action like dataframe.show() throwing error like connection is not serializable how do we make connection serializable in pyspark below is the code used </p> <pre><code>from...
2
2,946
Generate a Save File dialog in browser using blob content as the file
<p>I want to export an HTML canvas as an image on click of a button. My approach so far is to wrap the button in an anchor and onclick, send a request to my API to generate the save as dialog by setting the <code>content-disposition</code> to <code>attachment</code> for the response. Honestly I don't really need nor wa...
2
1,596
Uncaught TypeError: Cannot read property 'label' of undefined Morris.js
<p>I have a bar chart and a date picker Bootstrap<br> My bar chart works perfectly, it loads the data when selecting a day. But in developer tool i'm having these annoying errors:</p> <p>Uncaught Type Error: Cannot read property 'label' of undefined Morris 1590 Uncaught Type Error: Cannot read property 'length' of un...
2
1,189
403 forbidden expressjs backend
<pre><code>GET http://localhost:5000/booksIdea/show 403 (Forbidden) </code></pre> <p>i check the token in the website <a href="https://jwt.io/" rel="nofollow noreferrer">https://jwt.io/</a> i got invalid signature so i guess why the problem came from but i ignore how to fix it i searched abt this error and this is wha...
2
1,948
Python Pandas concatenate two multi index dataframe into one with another level of multi index
<p>I am dealing with Multi Index again. This time, I am concating two dataframes with same types Multi-indexed index and columns. However, the values are different, and there will be come index.level(0) values are different. I want to concate two dataframe into one. Please take a look at below example.</p> <pre><code>...
2
1,235
GWT LazyPanel with UiBinder
<p>I've worked through the <a href="https://developers.google.com/web-toolkit/doc/latest/DevGuideUiBinder#Lazy" rel="nofollow">Tutorial on using the UiBinder</a> and tried to utilize the LazyPanel as mentioned in the last section of the tutorial.</p> <p>To me it seems as if the tutorial implied that simply wrapping up...
2
1,783
Custom UserNameSecurityTokenHandler.ValidateToken is not getting called. How do I get the token handler registered and called?
<p>Based on the MSDN documentation I have created a custom UserNameSecurityTokenHandler and put in the CanValidateToken override and ValidateToken override. I thought I had configured the WCF web service to use the custom handler but the ValdiateToken never gets called. Here is the custom token handler:</p> <pre><co...
2
1,858
Spring Cache - Generate custom cached result
<p>I'm using Spring Boot and EhCache to develop a calendar application.</p> <p>Some users can request concerts for a specific week, others - for entire month. All responses are being cached with time to live 300 seconds to decrease the response time.</p> <p>Input parameters for cached methods are <code>startDate</cod...
2
1,128
JavaScript - And Creating and using Java Objects
<p>I am creating a web app that requires the use of a Java Object from either a jar or class file. How do I bridge my Java class and JavaScript? (I am fairly new to JavaScript and Web Development in general).</p> <p>(Most of the search results I am getting for this topic are from people who don't realize that Java and...
2
1,417
Silverlight can't talk to RIA service
<p>I've followed the tutorial here: <a href="http://www.silverlight.net/learn/tutorials/sqldatagrid-cs/" rel="nofollow noreferrer">http://www.silverlight.net/learn/tutorials/sqldatagrid-cs/</a></p> <hr> <p><strong>ANSWER</strong>: When I ran this thing in the debugger, it was starting it up on port 16048. Meanwhile, ...
2
1,209
ValueError: Variable Embedding already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined
<p>Based on this github link <a href="https://github.com/brightmart/text_classification/tree/master/a03_TextRNN" rel="nofollow noreferrer">https://github.com/brightmart/text_classification/tree/master/a03_TextRNN</a> While I run <strong>train a03_TextRNN</strong> with <strong>google_news_wor22vec.bin</strong> and a <st...
2
1,277
Start timer after button click
<p>I want to start timer after clicking on Button and poll for every 3 secs.</p> <p>I am using following code.</p> <pre><code>private EditText url; private Button submit; private TextView error; String some_URL; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setConte...
2
2,151
jQuery mouseenter + mouseleave + click to change separate class / styling of 3 <li>
<p>I have a set of 3 <code>&lt;li&gt;</code> that I need to change the class of each on <strong>mouseenter</strong>, <strong>mouseleave</strong> and <strong>click</strong>.</p> <p>So far everything is working except when I click, the 3rd <code>&lt;li&gt;</code> doesn't stay in the <strong>mouseenter</strong> state. It...
2
1,291
Injecting components into a POJO using OSGi
<p>I'm new to OSGi and I'm interested in retrofitting some of my jars as OSGi bundles. However I do not want to introduce additional dependencies to any osgi-specific libraries.</p> <p>As such annotations are out of the question as are programmatic calls to bundle contexts and what not.</p> <p>I have found a near mat...
2
1,162
Skipping some records from ng-repeat and showing dots
<p>I developed pagination for list, and I stuck in one thing, I used ng-repeat for page counts, But when results are more say 1000, it is showing 1 2 3 4 till 100, it doesn't look good to display all page counts at once. So I Wanted to display page counts to 9, i.e. if it is first page, page counts will look like</p> ...
2
1,684
Using OneSignal.registerForPushNotifications, then approve not registering
<p>I am user OneSignal in combination with React-Native to setup the push notifications. In my app, users need to be logged in, in order receive push notifications (or to give permission).</p> <p>The issue that I am having, is that when the user logs in, they get my custom popup, asking if they would like to receive m...
2
1,886
Sinatra rack middleware hijacks '/' root url
<p>I'm trying to use a Sinatra app as middleware in my Rails app.</p> <p>I've tested a basic Sinatra app in the <code>/lib</code> folder of the Rails app, <code>use</code>d the middleware and set a route. That worked fine.</p> <p>What I want to be able to do is extract the Sinatra app and include it as a gem. That wa...
2
1,043
angular form.io builder how to customize list of components and list of attribute per component
<p>I am using form.io and angular 10.</p> <p>I was able to create a demo project of form.io in the angular cli .</p> <p>I was also able to create a <strong>custom component</strong> as well and set my own editForm for the component.</p> <pre><code>import { Injector } from '@angular/core'; import { FormioCustomComponen...
2
3,031
solution to bjarne stroustrup chapter 7 drill 7 sqrt() function plus a inquiry about error for sqrt() func
<p>I thought I would post this, because it's relatively tricky for a relative noob and I didn't see any specific posts about this drill.</p> <p>Also, when I enter: 'sqrt x);' I get the proper error message, but when I enter: 'sqrtx);' I get error: 'get: undefined name sqrtx' apparently the program thinks it is a decl...
2
4,039
access to elements inside a reactive function
<p>If I put some element is reactive function which I need them further down the code How could I recall them, Example :</p> <pre><code> library(shiny) library(data.table) library(formattable) library(tables) ui &lt;- fluidPage( fileInput(inputId = "File",label = "Upload file...",accept=c("zip","text"))...
2
1,207
cloud functions responds with 500, but firebase logs empty
<p>so one of my cloud functions suddenly crashes on (to my current understanding) <strong>random</strong> occasions.</p> <p>The function is used as a postback-URL (<strong>POST</strong>!) for an API that we receive Data from. The service offering the API logs Errors that show that the Cloud Function responds with:</p...
2
2,253
How can I determine the type of lightuserdata?
<p>I'm adding Lua Scripting to my game engine (C++) using the Lua C API.</p> <p>I'm pushing my objects using <code>lua_pushlightuserdata(lua_State *L, void *p)</code> and when I want to get the objects I use <code>lua_touserdata(lua_State *L, int idx)</code>, but I don't know what object I'm getting using <code>lua_t...
2
1,099