title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
How to fix Error: Not implemented: navigation (except hash changes)
<p>I am implementing unit test for a file that contain <code>window.location.href</code> and I need to check it.</p> <p>My jest version is <code>22.0.4</code>. Everything is fine when I run my test on node version >=10</p> <p>But I get this error when I run it on <code>v8.9.3</code></p> <pre><code>console.error node...
0
1,054
Relative Path with Docker-Compose Shared Volumes
<p>It seems <a href="https://stackoverflow.com/questions/42961256/relative-path-not-working-with-named-volumes-in-the-docker-compose-yml">this question has already been asked by another poster</a>, but there was no answer. I have more information on the matter, so I'm re-asking the same question - but with much additi...
0
1,449
gcsfuse Input/Output error
<p>I'm getting an Input/Output error when I try and create a directory or file in a google cloud storage bucket mounted on a linux (Ubuntu 15.10) directory.</p> <p>Steps I have done:</p> <ul> <li>Created a user named transfer</li> <li>Created a <code>/mnt/backups</code> directory and ran <code>chown -R transfer /mnt/...
0
1,145
Run JSF project on Apache Tomcat
<p>How can lunch JSP project on Tomcat? I copy <code>WebContent</code> folder to <code>webapp</code> folder of Apache but it can't find my jsp page, but if I change jsp to jsf (index.jsf) works fine. How can I solve this problem?</p> <p>web.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app ...
0
1,979
Espresso testing NestedScrollView - "Error performing 'scroll to' on view 'with id:"
<p>I need to scroll down through my NestedScrollView in order to test my xml file with Espresso, but I get the error message: "Error performing 'scroll to' on view 'with id:"</p> <p>Several other posts that seem to have a similar problem.</p> <p>I have followed instructions from this: <a href="https://stackoverflow.c...
0
10,283
Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 35
<p>I freshly started with gson and i am trying to parse a JSON string which starts as an object and always get the same error JSON </p> <pre><code>{ "code": 200, "data": { "messages": [ { "emailSender": "dsfd@mail.ru", "countryCode": null, "emailSenderReply": null, "r...
0
1,477
Sending ArrayList from Android to PHP script using JSON
<p><strong>What is the Scenario</strong></p> <p>I want to send multiple ArrayList (usally 5) from android to the server and want to insert it into mysql database. </p> <p><strong>What I Have Done Successfully</strong></p> <p>I have Successfully send single value and Multiple Values from Android to PHP script using ...
0
3,101
$.each(someData.split(',') => returns concatenated string, instead of array of items
<p>I'm using asp.net mvc - ajax with jQuery... I've a model type named "<strong>Books</strong>" that contains a property "<strong>TableOfContents</strong>" this property contains data in the following format:</p> <pre><code>TableOfContents = "1,2,4,6,9,17,28"; </code></pre> <p>Json action method, that reuturn Book ob...
0
1,248
How Do I Call A Function In A ViewModel Knockout
<p>I have a model called customer:</p> <pre><code>function customer(id, name, age, comments) { var self = this; self.Id = id; self.Name = name; self.Age = age, self.Comments = comments; self.addCustomer = function () { $.ajax({ url: "/api/customer/", type: ...
0
1,062
Why is Teamcity not able to pull down git submodule
<p>I have a git project that has a submodule. This submodule is used in two repositories that are both being built on a Teamcity server. Teamcity is able to build the first project but the the second project has the following error (details have been qouted out to protect the guilty)</p> <blockquote> <p>Error coll...
0
4,885
Java / Hibernate: Could not resolve property with nested object criterias
<p>I'm having problems with a Hibernate criteria. I'm trying to make a Criteria where I look at the id of a member object of the class the query returns.</p> <p>For example: </p> <pre><code>Criteria crit = session.createCriteria(Enquiry.class); crit.add(Expression.eq("lecture.admin.id", userId));` </code></pre> <p>...
0
1,217
groupby and calculate mean but keeping all columns
<p>I would like to calculate the mean of the numeric columns using groupby but maintaining all columns. An example of a dataframe from 7 columns is here:</p> <pre> tracking_id gene_id gene_short_name tss_id locus FPKM-1 FPKM-2 ENSMUSG00000025902 ENSMUSG00000025902 Sox17 Tss1231 1:4490927-4496413 0.611985 ...
0
1,355
How to fill out fields in one form for multiple objects in Thymeleaf?
<p>I have a following models (without getters and setters for readability): </p> <pre><code> @Entity public class Recipe extends BaseEntity { private String name; private String description; private Category category; @OneToMany(mappedBy = "recipe", cascade = CascadeType.ALL) private List&lt;Ingredient&gt...
0
9,081
WebSocket connection failed. Error during WebSocket handshake - socketjs
<p><strong>Details:</strong></p> <p>I have been trying to configure my react project to work with <code>hot loader</code> so that I can actively develop without having to restart the server. I am getting a continuous error message each time websocket tries to connect:</p> <p><code>WebSocket connection to 'ws://192.1...
0
2,062
scroll up to the soft keyboard
<p>I have a long form and when the soft keyboard appear I can't see the bottom editTexts</p> <p>This is my xml</p> <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;RelativeLayout android:layout_wid...
0
6,793
Deploying AEM with maven (Error)
<p>I am trying to deploy AEM with maven, so I follow <a href="http://dev.day.com/docs/en/cq/current/developing/developmenttools/developing-with-maven.html" rel="nofollow">this tutorial</a>. When I run the command <strong>mvn clear package</strong>, I get the following error:</p> <pre><code>C:\workspace\myproject\app&g...
0
3,403
Spring Boot JDBC Template SQL Log
<p>I am trying log SQL queries with params for Spring Boot JDBC but it is not printing the details in log.I am using Spring Boot 1.5.8 version.Please help me to solve this.</p> <p><strong>application.properties:</strong></p> <pre><code>spring.datasource.url=url spring.datasource.username=user spring.datasource.passw...
0
1,061
Using an RSA Public Key to decrypt a string that was encrypted using RSA Private Key
<p>I know the main answer I am likely to get is why the hell would you want to do that?! </p> <p>Unfortunately despite my protests I have to do it, even though I know it makes little sense.</p> <p>I have functions written in .Net to decrypt using a private key, encrypt using a public key. I also RSA sign and verify a...
0
3,793
setNavigationItemSelectedListener Not Working
<p>My <code>NavigationView</code> <code>onClick</code> event is not working.</p> <p>Here are the code snippets I tried one by one, but nothing worked:</p> <ol> <li>Implementing <code>NavigationView.OnNavigationItemSelectedListener</code> using <code>OnClick()</code> Method</li> <li><p>Setting <code>NavigationItemSele...
0
3,004
SonarQube: Error: Could not create the Java Virtual Machine
<p>I'm new to SonarQube, When i run &quot;C:\sonarqube-8.5.1.38104\bin\windows-x86-64\StartSonar.bat&quot;, i receives below error,</p> <p>--&gt; Wrapper Started as Console</p> <pre><code>Launching a JVM... Picked up _JAVA_OPTIONS: -Xmx1024M Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org Copyright 1999-200...
0
1,649
Go and Gin: Passing around struct for database context?
<p>I've just started trying out Go, and I'm looking to re-implement an API server written in node with it.</p> <p>I've hit a hurdle with trying to use dependency injection to pass around a database context as a gin middleware. So far I've set it up as this:</p> <p>main.go:</p> <pre><code>package main import ( ...
0
1,650
Move components in java swing
<p>I made a swing application in which i have a grid layout on a Panel, now i have 8 custom buttons on that panel, and two button on left and right for the navigation.</p> <p>Now my problem is that when i clicked on that navigation buttons i want to move the button in the sliding fashion, for that purpose i set each b...
0
1,352
How to display error message of jquery dropzone
<p>I use dropzone with CI, i don't know how to display error message and custom message when upload false, this is my script</p> <pre><code>Dropzone.autoDiscover = false; try { var myDropzone = new Dropzone("#adminform" , { paramName: "filename", // The name that will be used to tr...
0
1,044
cookiecutter command not found after installing with pip
<p>I want to use cookiecutter to start a django project but for some reason cookiecutter cannot be found. </p> <p>What I did was:</p> <pre><code>pip install cookiecutter </code></pre> <p>After that:</p> <pre><code>cookiecutter https://github.com/pydanny/cookiecutter-django </code></pre> <p>Then I get the error mes...
0
1,131
oracle.net.ns.NetException: Socket read timed out
<p>I have this error after executing my batch :</p> <pre><code>2015-11-06 15:45:32,179 [SchemaValidator ] ERROR | could not get database metadata java.sql.SQLRecoverableException: Erreur d'E/S: Socket read timed out at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:419) at or...
0
5,150
"Procedure or function has too many arguments specified" error when running insert query from ASP page
<p>I am trying to use an ASP detailsview to pass variables to an MSSQL stored procedure that then inserts values into multiple tables. The stored procedure works perfectly when I run it in SQL Management Studio. I have all of the stored procedure's variables set as parameters, yet I am still getting an error (below) wh...
0
3,314
Auto-Complete in textbox using data from a SQL Server database
<p>I am trying to get my textbox to auto-complete when a user types in it to write a query. This would be similar to how SQL Server Management Studio does it and gives the option as you type to arrow down or click on a table name or column name. Here is the following code I have.</p> <pre><code>public void loadData() ...
0
1,068
How to properly implement Busy Indicator from WPF Extended Toolkit
<p>Ok, I have been struggling with this issue for quite some time and have read article after article trying to get an idea on the issue. I am trying to implement the Busy Indicator and am only partially successful. I have a Shell view that I have wrapped with the BusyIndicator like so:</p> <pre><code>&lt;Window x:Cla...
0
2,332
Wpf - Animate height from bottom up
<p>I am trying to create something similar in style to Skypes notifications but am having some problems with the animation.</p> <p>I would like the entire window to appear with a border at the top and bottom and then for the content in the middle to grow "pushing" the borders with it. I have managed to create somethin...
0
1,077
Open infoWindow of specific marker from outside Google Maps (V3)
<p>I can't seem to get my head around this problem:</p> <p>I've got a map with (a lot of) markers (companies) that come from a generated XML file. Below the map, I want to show a (non-JavaScript-generated) list of all the companies that are displayed on the map. When I would click a company in the list, the map would ...
0
1,838
How to set the width of a DialogFragment in percentage?
<p>I have a <code>DialogFragment</code> with an xml layout and I need it to be, let's say 75% as wide as the screen. When I look for answers I always find the common <code>weight</code>-solution, which does not help me, as my fragment overlays the current activity as shown below and does not take the full screen's size...
0
1,084
System Center Virtual Machine Manager Service Unable to start
<p>I have install Virtual Machine Manager on windows server 2012 R2 . it installed sucessfuly but the SCVMM service can't be started please check the following log for and the error </p> <p>when i try to start SCVMM service its endup with the following error </p> <p>" The System Center Virtual Machine Manager Servic...
0
1,066
Convert char* to jstring in JNI, when char* is passed using va_arg
<p>Is it necessary to convert char* to jbyteArray, then call java String's contructor to generate a jstring? How else can it be done? Please help. </p> <pre><code>static int testhandler(void *arg, ...) { int i; struct callback *cb = (struct callback *)arg; JNIEnv *env = cb-&gt;env; char *sig = cb-&...
0
1,351
Match and replace
<p>I have a long string and <strong>within</strong> that string I have the following text:</p> <pre><code>"formatter": "SomeInformationHere" </code></pre> <p>I need to find the above text within the long string and remove the double quote marks around <strong>SomeInformationHere</strong> so the result looks like the ...
0
2,807
How to insert multiple rows in laravel 5?
<p>I want to insert an array with an id : create.blade :</p> <pre><code>{{ Form::open(array('route' =&gt; 'Charge.store','method'=&gt;'POST')) }} &lt;select id="disabledSelect" class="form-control" name="Facture_id"&gt; &lt;option value="{{ $Facture-&gt;id }}" &gt;{{ $Facture-&gt;Num }}&lt;/option...
0
1,586
Seven Segment Display with Verilog
<p>everyone!</p> <p>I'm working on my final project here and I find myself getting lost. essentially what I am trying to do is use my Basys board as an 8 bit signed number converter. So there are the eight switches which I pull as inputs to make a signed number such as 10111110. I then want to take that number and con...
0
1,229
How to fix jquery datatables from overflowing outside parent div in Internet Explorer?
<p>I am using datatables and my html table is sitting inside of a parent div. I originally had this issue where the table was overflowing outside the parent div like this:</p> <p><a href="https://i.stack.imgur.com/S03TK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/S03TK.png" alt="enter image description ...
0
1,367
Mat-table Sorting Demo not Working
<p>I am trying to get the <code>mat-table</code> sorting to work locally, and while I can get the data to show up as expected, clicking on the header row does not do the sorting as it does on online examples (nothing happens at all). I am trying to get this demo working locally: <a href="https://material.angular.io/com...
0
3,122
AndroidRuntime: FATAL EXCEPTION: androidmapsapi-ZoomTableManager
<p>My app that uses Google Maps SDK (v2) just started crashing with this exception:</p> <pre class="lang-none prettyprint-override"><code>Process: com.currentlocation.android, PID: 7328 java.lang.ArrayIndexOutOfBoundsException: length=1; index=12 at com.google.maps.api.android.lib6.gmm6.vector.ct.&lt;init&...
0
2,461
SharedPreferences Null pointer exception
<p>I am trying to save an integer that will store how many times a user has tapped on an ImageView using the SharedPreferences interface. However, when I run the app it gives me null pointer exception on the line where I am declaring the sharedPreferences like this:</p> <pre><code>SharedPreferences mSharedPreferences ...
0
1,687
JQGrid - Cannot call ASP.NET WebMethod but can with Ajax
<p>I am new to jqGrid and I have found it difficult to follow the documentation <a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3ajqgriddocs" rel="nofollow">jqGrid Documentation</a></p> <p>I cannot figure out how to call a WebMethod when setting up the JQGrid. I have been successful in making an Ajax call ...
0
2,250
jqGrid Radio Button select single row
<p>I have JqGrid with RadioButton per each row like this.</p> <pre><code> ... { name: 'select', label: 'select', width: 50, formatter:radio} </code></pre> <p>and function for radio formatter: </p> <pre><code>function radio(value, options, rowObject){ var radioHtml = '&lt;input type="radio" value=' + value + ' n...
0
1,135
FedEx 556 - No valid services available. when there should be
<p>Hi I'm trying to use the wsdl api to get shipping cost calculated for my website. I'm using opencart and this module (http://www.opencart.com/index.php?route=extension/extension/info&amp;extension_id=2055&amp;filter_search=fedex&amp;sort=e.date_modified&amp;order=DESC). On checkout I'm getting this error:</p> <pre>...
0
2,764
How to bind SLF4J with Log4J?
<p>I am trying to setup a project with slf4j + log4j, but the damn thing just doesn't work... I keep getting exception: </p> <pre><code>Failed to instantiate SLF4J LoggerFactory Reported exception: java.lang.NoClassDefFoundError: org/apache/log4j/Level at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129) at org.slf...
0
1,998
org.hibernate.MappingException: Unknown entity:
<p>I really want to understand what is going on with my code.</p> <p>I have a standalone application which uses spring and Hibernate as JPA and I am trying to run the test using a single main Class</p> <p>My main class</p> <pre><code>package edu.acct.tsegay.common; import edu.acct.tsegay.model.User; import edu.acct...
0
3,175
Eclipse: Error starting static Resources java.lang.IllegalArgumentException
<p>I have a project called myproject2 in my Eclipse IDE. I have a Tomcat application server and I can add there the resource myproject2 (it is a Spring MVC project).</p> <p>Now I closed the myproject2 in Eclipse, removed myproject2 from the Tomcat resources and do a fresh Subversion checkout with projectname: myprojec...
0
2,552
How do you add text wrapping to a cell using OpenXml when creating excel files?
<p>How do you set the format of a text cell to wrap when generating .xlsx files with OpenXml? Here is the code I have currently:</p> <pre><code>public void Excel() { var viewModel = new RequirementIndexData(); viewModel.Requirements = db.Requirement; MemoryStream ms = new MemoryStream(); ...
0
2,019
Java. Error during artifact deployment Tomcat 8
<p>I'm deploying a Spring web-application on Tomcat 8, IntelliJ IDEA 14. However, the deployment fails with the following error log:</p> <pre><code>""C:\Program Files (x86)\apache-tomcat-8.0.22\bin\catalina.bat" run [2015-05-20 08:19:25,312] Artifact bookmanager:war exploded: Server is not connected. Deploy is not ava...
0
4,745
How to test the method that reads the data from the excel file in java?
<p><a href="https://i.stack.imgur.com/3vgd1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3vgd1.png" alt="enter image description here"></a> The above picture shows the excel file containing the Facebook data.</p> <p>The class <code>FacebookDataExtraction</code> reads the data from the Excel file ...
0
1,556
colorbox (which uses live) not rebinding after jQuery ajax call
<p>I have a list of elements that I am loading via ajax (using jQuery's .load()). Each of these elements has an (edit) link next to it that lightboxes (using colorbox) a little edit form. When the lightbox is closed I use the onClosed callback to reload the ajax list to show and changes made during the edit.</p> <p>Th...
0
1,473
Performing a "Group By" query in XPath XSL
<p>Given the following XML:</p> <pre><code>&lt;results name="queryResults"&gt; &lt;int name="intfield1:[* TO 10]"&gt;11&lt;/int&gt; &lt;int name="intfield2:[10 TO 20]"&gt;9&lt;/int&gt; &lt;int name="intfield1:[10 TO 20]"&gt;12&lt;/int&gt; &lt;/results&gt; </code></pre> <p>I would like to produce this XML:</p...
0
1,043
How to force users to update app from play store in Flutter using in_app_update
<p>I want the users of my app to always have the latest version. If they don't have the latest version, it should download the latest version from play store first as shown in the image. </p> <p><a href="https://i.stack.imgur.com/Oe0nY.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Oe0nY.jpg" alt="Forced U...
0
1,093
Apache Camel throws java.lang.NoSuchMethodError: org.apache.camel.util.ObjectHelper.notNull
<p>I have a groovy script that I'm trying to get going; it's job is to read one message queue, and then re-queue the messages into a new set of MQs we are putting live.</p> <p>Here's the code:</p> <pre><code>@Grab(group='org.apache.camel', module='camel-core', version='2.11.0') @Grab(group='org.apache.activemq', modu...
0
4,621
How to send a POST with a JSON in a WebRequest() call using MQL4?
<p>I would like to send a <strong><code>POST</code></strong> from <code>MQL4</code>-script, using a JSON-format to a Node-server.</p> <p>I've tried the <strong><code>webRequest()</code></strong> standard function in <code>MQL4</code>, based on the following documentation, but it did NOT success.</p> <blockquote> <p...
0
2,979
What's causing these ParseError exceptions when reading off an AWS SQS queue in my Storm cluster
<p>I'm using Storm 0.8.1 to read incoming messages off an Amazon SQS queue and am getting consistent exceptions when doing so:</p> <pre><code>2013-12-02 02:21:38 executor [ERROR] java.lang.RuntimeException: com.amazonaws.AmazonClientException: Unable to unmarshall response (ParseError at [row,col]:[1,1] Message: JAXP...
0
1,074
Adding scroll bar to dynamic ul li
<p>I searched through many posts and forum as i thought this might be a basic stuff but didnot find it so asking here,All i am trying to do is add scroll bar if the height is more than certain limit lets say if menu items are more than 3.</p> <p>I have created a jsfiddle <a href="http://jsfiddle.net/euSWB/" rel="noref...
0
1,119
Passing input parameters to controller method via Html.ActionLink
<p>When the user clicks on an <code>Html.ActionLink</code>, I need to call a controller method that will download a <code>csv</code> report for the user. I also need to pass this controller the values from two input boxes that will denote a start and end date range they're looking for. </p> <p>Currently I can assign t...
0
1,688
firebase_messaging onBackgroundMessage local_notifications
<p>I'm trying to <strong>stop default notification</strong> from firebase_message when app is closed or on background.</p> <p>I want to show a custom Notification when app is closed or on background using local_notifications plugin, which works as expected, the problem resides when message is sent, app shows the same n...
0
1,820
Initializer 'init(_:)' requires that 'Decimal' conform to 'BinaryInteger'
<p>I'm trying to make a compound interest calculator app and I'm getting this error when I return the formula of compound interest -> Initializer 'init(_:)' requires that 'Decimal' conform to 'BinaryInteger' </p> <p>The error appear when I implement the compound interest formula: return balance * pow((1 + rate / 100),...
0
1,509
Reading JavaScript variables using Selenium WebDriver
<p>I'm using Selenium WebDriver (Java) and TestNG to do some testing on a website I created. In this website, I also have JavaScript and in some of the functions, it returns values and also outputs values to the browser console through <code>console.log()</code>.</p> <p><strong>I was wondering if there is an easy way ...
0
1,611
Android camera intent FileUriExposedException for SDK >= 24
<p>I use this code to get a picture from camera and put it on imageview:</p> <pre><code> private void openCamera() { mMediaUri =getOutputMediaFileUri(MEDIA_TYPE_IMAGE); Intent photoIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); photoIntent.putExtra(MediaStore.EXTRA_OUTPUT, mMediaUri); startAct...
0
2,736
Router.use() requires middleware function but got a Object
<p>After I have added a route to my express handler, I am getting an error (see below):</p> <pre><code>/app/node_modules/express/lib/router/index.js:458 2017-01-03T15:53:48.842543+00:00 app[web.1]: throw new TypeError('Router.use() requires middleware function but got a ' + gettype(fn)); 2017-01-03T15:53:48.8425...
0
1,365
Magento : Fatal error: Class 'Mage_Giftcards_Helper_Data' not found in ...../app/Mage.php on line 546
<p>I have installed one module extension which throws an fatal error "Fatal error: Class 'Mage_Giftcards_Helper_Data' not found in ..../app/Mage.php on line 546" in admin.</p> <p>I have reffered this link <a href="https://stackoverflow.com/a/9191286/2919940">https://stackoverflow.com/a/9191286/2919940</a> and this lin...
0
12,658
A postgresql query won't finish
<p>on postgresl 9.0 we have a sql query:</p> <pre><code>SELECT count(*) FROM lane WHERE not exists (SELECT 1 FROM id_map WHERE id_map.new_id=lane.lane_id and id_map.column_name='lane_id' and id_map.table_name='lane') and lane.lane_id is not null; </code></pre> <p>that usually takes somewhat aro...
0
1,041
debugging ld, "Inconsistency detected by ld.so"
<p>I am trying to use a widget library called <a href="https://github.com/AlloSphere-Research-Group/GLV">GLV</a> for an application I am developing. I am running Linux Mint 17. I installed all the libraries and I have succeeded in building the GLV library, but when I try to running one of samples that was built I get t...
0
15,661
Spring 3.1 configuration: environment not injected
<p>I am using the following for the spring 3.1 configuration: </p> <pre><code>@Configuration @EnableTransactionManagement public class DataConfig { @Inject private Environment env; @Inject private DataSource dataSource; // @Bean public SpringLiquibase liquibase() { SpringLiquibase b = ...
0
2,880
How do I pass variables in django through the url?
<p>I am trying to pass a few variables but I am having some trouble and specifically have 3 questions. How do I encode the url string to take into account the special characters in the string? What is the correct regex I should use given the strings? And how do I decode the urls that have been encoded?</p> <h1>view</h1...
0
1,331
Using MVC3's AntiForgeryToken in HTTP GET to avoid Javascript CSRF vulnerability
<p><a href="http://haacked.com/archive/2009/06/25/json-hijacking.aspx">In regards to this Haacked blog</a>, I'm hesitant to implement the proposed anti-JSON GET hijacking solutions since </p> <ol> <li><p>The recommended solutions to mitigating JSON hijacking involve non-REST-full JSON POSTs to GET data </p></li> <li><...
0
1,419
How can I test binary file uploading with django-rest-framework's test client?
<p>I have a Django application with a view that accepts a file to be uploaded. Using the Django REST framework I'm subclassing APIView and implementing the post() method like this:</p> <pre><code>class FileUpload(APIView): permission_classes = (IsAuthenticated,) def post(self, request, *args, **kwargs): ...
0
1,183
show pop up when is mouse over image control
<p>I would like show pop up when is mouse over the image control. So I create control template, it look like this:</p> <pre><code> &lt;ControlTemplate x:Key="AvatarImageTemplate" TargetType="{x:Type Image}"&gt; &lt;Grid&gt; &lt;Grid.ColumnDefinitions&gt; &lt;Colu...
0
3,974
Segmentation fault when using strlen
<p>I've been working on this for past two days but can't seem to figure out the problem. </p> <p>I'm reading from a file and saving it into the char array as a string but when I try using <code>strlen()</code> on the string, it crashes with a segmentation fault.</p> <p>Here is what I'm doing. </p> <pre><code>char re...
0
1,174
DNNClassifier: 'DataFrame' object has no attribute 'dtype'
<p>I am trying to run a tensorflow DNNClassifier model with some data, that I read from a csv. Even though I converted the datatype of each column to float32, I keeo getting the 'DataFrame' object has no attribute 'dtype' Error. I would really appreciate if you could help me.</p> <p>Dataformat: 27 columns, 23 input, ...
0
2,178
"ViewPostImeInputStage processPointer 0" in log when item in RecyclerView is tapped?
<p>In my app I am creating, I have a list of items. When a user taps on one of these items, a new window is supposed to open, displaying the information inside the item that the user tapped on. Here is my java code for that-</p> <p><strong>NoteListFragment.java</strong></p> <pre><code>public class NoteListFragment ex...
0
2,081
Doctrine2 One-To-Many, Self-referencing relationship
<p>In my 'Topic' entity, I have a One-To-Many, Self-referencing relationship <code>$parent:$children</code>.</p> <pre><code>class Topic { /** @ORM\Id * @Column(type="integer") * @ORM\GeneratedValue(strategy="IDENTITY") */ private $id; /** @Column(length=40, unique=true) */ private $name; ...
0
1,395
How do I keep two git repositories in sync?
<p>Here is the scenario. I have two machines, "desktop" and "laptop".</p> <p>On desktop I do:</p> <pre><code>mkdir git_test cd git_test git init dd if=/dev/urandom of=test.img bs=1k count=1000 git add test.img git commit -m "Added first image" </code></pre> <p>Then on laptop I do:</p> <pre><code>git clone [USER]@de...
0
1,104
Error in ggplot.data.frame : Mapping should be created with aes or aes_string
<p>I am having a trouble while extracting the path from a <code>ggplot</code> and am stuck with an error. </p> <p>The image given below explains the result I am looking for: (Done in image editor for explaining purpose)</p> <p><a href="https://i.stack.imgur.com/3bc1g.png" rel="noreferrer"><img src="https://i.stack.im...
0
1,165
Why is <INPUT> wider than I told it to be?
<p>Given a <code>&lt;select&gt;</code> and an <code>&lt;input&gt;</code> element, both specified to be <strong>200px</strong> wide:</p> <pre><code>&lt;!doctype html&gt; &lt;body&gt; &lt;select style="width: 200px"&gt;&lt;/select&gt;&lt;br/&gt; &lt;input style="width: 200px" type="text"&gt; &lt;/body&gt; &lt;html&gt; ...
0
1,305
MongoDB aggregate with conditional sums
<p>I have to do a special mongoDB query.</p> <p>I have a collection with documents like these:</p> <pre><code>{ "_id" : ObjectId("53c7fd86d624b06abc76e8f6"), "works" : [ { "code" : "A001", "name" : "Cambiar bombilla", "orderId" : "53c7fd86d624b06abc76e8f6", ...
0
2,073
Gem dependency error in rails 2.3.4
<p>HI, i am working in Rails .. my gem list is</p> <pre><code>*** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.4, 3.0.3, 2.3.11, 2.3.10, 2.3.8, 2.3.4, 2.3.2) actionpack (3.0.4, 3.0.3, 2.3.11, 2.3.10, 2.3.8, 2.3.4, 2.3.2) activemodel (3.0.4, 3.0.3) activerecord (3.0.4, 3.0.3, 2.3.11, 2.3.10, 2.3.8, 2.3.4) ...
0
2,938
django south fresh install --> error: unknown command 'schemamigration'
<h1>short story</h1> <p>I run <code>./manage.py schemamigration junk_app --initial</code> on a completely fresh django project right after freshly installing South ( <a href="http://south.aeracode.org/" rel="noreferrer">http://south.aeracode.org/</a> ), and I get the following error:</p> <pre><code>Unknown command: '...
0
1,687
Why am I getting "Failed to load ApplicationContext" Spring, jUnit with JavaConfig
<p>Why am I getting "Failed to load ApplicationContext" Spring, jUnit with JavaConfig</p> <p>Here is my test class:</p> <pre><code>@RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = HelloWorldConfig.class) public class TestApp { @Test public void testBean() { ApplicationContext...
0
2,693
Matplotlib error, [Errno 2] No such file or directory: 'latex': 'latex'?
<p>When I try running the very simple code snippet from www.matplotlib.org, </p> <pre><code>from matplotlib import rc rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) ## for Palatino and other serif fonts use: #rc('font',**{'family':'serif','serif':['Palatino']}) rc('text', usetex=True) import numpy as...
0
2,291
Make two floating tables the same height
<p>I have two floating tables with differing numbers of rows (see <a href="https://jsfiddle.net/cu02qqx7/" rel="nofollow noreferrer">JSFiddle</a>).</p> <p>I want the two tables to have the <strong>same height</strong> without setting the height explicitly to, e.g., 400px. I tried putting them in a div container with ...
0
1,418
Which spring view resolver plays nice with angularjs?
<p>I'm writing a webapp using angularjs and spring mvc as a REST service provider and as a partial view provider(I'm also using angular-ui-router so that I can have multiple nested partials). I currently don't have any use for template languages since I plan on doing everything in angular, however every single view res...
0
1,313
How to mock out AWS properly for this unit test?
<p>I want to write a Spring app that listens for SQS messages and then downloads a file from S3. I have all that working, but I am running into problems writing unit tests for areas of the code that aren't involved in AWS. I want to mock out all the AWS for the test, but I keep getting this error and I haven't found ...
0
3,481
General Routing to Active Admin - Rails 3.1
<p>I'm currently trying to use Active Admin Gem with an existing Rails 3.1 app already configured with devise. This app uses a after_sign_in_path_for method declared in application controller.</p> <p>I followed the steps explained there <a href="https://github.com/gregbell/active_admin" rel="nofollow">https://github.c...
0
3,015
NodeJs Error - Failed to load gRPC binary module because it was not installed for the current system Expected directory?
<p>I am running my NodeJs App and i am getting an error. </p> <pre><code>sudo /usr/local/bin/node app.js Error: Failed to load gRPC binary module because it was not installed for the current system Expected directory: node-v57-linux-x64-glibc Found: [node-v59-linux-x64-glibc] This problem can often be fix...
0
1,156
Fix dropdown auto open in tailwind ui navbar component with vue.js
<p>I use <a href="https://tailwindui.com/preview#component-70a9bdf83ef2c8568c5cddf6c39c2331" rel="noreferrer">navbar component</a> from tailwind ui. It's looks like something like this:</p> <pre><code>&lt;!-- Profile dropdown --&gt; &lt;div class=&quot;ml-3 relative&quot;&gt; &lt;div&gt; &lt;button class=&q...
0
1,322
ag-grid CellRenderer - how to render when other row data (props.data) changes?
<p>I would like to have a cell rendered a certain way based on other data that is available in the <code>props.data</code> object that is tied to the row. But I can't figure out how to get the cell to re-render when that other data changes.</p> <p>I have a pretty simple data structure I'm trying to display in ag-grid...
0
1,486
BottomNavigationView - How to avoid recreation of Fragments and reuse them
<p>I would like to make a bottom navigation bar in my project. Every view has it's own fragment. The problem is that every time i click on the button to change the view for example from recents to favorites it creates new fragment with completely new states(e.g. scroll position, text changed whatever my fragment contai...
0
2,224
Spring Rest Template usage causes EOFException
<p>I'm receiving <code>java.io.EOFException</code>'s when using Spring REST template on Android.</p> <p>The stacktrace cause reads like this:</p> <pre><code>Caused by: java.io.EOFException at libcore.io.Streams.readAsciiLine(Streams.java:203) at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560) at ...
0
2,485
Creating a sparse matrix using linked lists in C
<p>I have an assignment which is to create two sparse matrices (A and B) and then adding them up into a third sparse matrix (C). I have already done it with vectors (receiving two sparse vectors and adding them into a third) so I decided it would be easier to use a series of vectors to represent a matrix. In the future...
0
2,490
Android speech Recognition App Without Pop Up
<p>I'm currently looking into getting a career with JAVA and have decided to start by building an app. I have this code right here that I am using to trigger Speech Recognition. </p> <pre><code>public class MainActivity extends Activity implements OnClickListener{ private static final int VR_REQUEST = 999; private Li...
0
3,251
Uncaught TypeError: Cannot read property addEventListener of null
<p>Im working on an assignment for my javascript class, and I keep getting the error </p> <p>fetch_page.js:109 Uncaught TypeError: Cannot read property 'addEventListener' of null at addEventListeners (fetch_page.js:109) at fetch_page.js:121</p> <p>I'll be honost, I don't understand javascript for crap, but I'...
0
2,141
retrieving image from database
<p>I'm working on my project which displays a list of employee. here, the information and picture of the employee will be shown. my project can now show the list of employees in the listbox and when I double click on an employee, his/her profile will be shown on a textbox. my problem is that i can't make their pictures...
0
1,197
Error in dplyr group_by function, object not found
<p>I am asking this question because, as someone new to R, I am curious to why a piece of code I wrote works fine, and then the same line of code produces an error the next time it is run.</p> <p>Here is an example of a table I am working with.</p> <p>Dput: </p> <pre><code>structure(list(a5species = structure(c(4L, ...
0
3,365
How do I allow HTML tags to be submitted in a textbox in asp.net?
<p>First, I want to let everyone know that I am using an aspx engine not a Razor engine.</p> <p>I have a table within a form. One of my textbox contains html tags like</p> <pre class="lang-html prettyprint-override"><code>&lt;/br&gt;Phone: &lt;/br&gt; 814-888-9999 &lt;/br&gt; Email: &lt;/br&gt; aaa@gmail.com. </code>...
0
1,660
Failed to start rabbitmq-management plugin on Windows
<p>I'm a beginner on RabbitMQ and i'm having some problems to enable management plugin. The rabbitmq server is up and running, but when i try to enable the plugin, i get this in the windows command prompt:</p> <pre><code>C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.1.5\sbin&gt;rabbitmq-plugi ns.bat enable ...
0
2,111
program using class point class circle java
<p>Create class Point which has two private members: int x and int y, representing point's coordinates. Class Point has two constructors:</p> <ol> <li>Point() that assigns zeros to variables x and y, and</li> <li>Point(int x, int y) that assigns values x and y to variables this.x and this.y, respectively.</li> </ol> ...
0
1,704
TypeORM select all rows but limit 25
<p><code>CandidateEntity</code></p> <pre><code>@Entity({ name: 'users' }) export class CandidateEntity { @PrimaryGeneratedColumn() public id: number; @OneToOne(() =&gt; CandidateEmployeeInfoEntity, employeeInfo =&gt; employeeInfo.candidate) public employeeInfo: CandidateEmployeeInfoEntity; } </code></...
0
3,245