title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
standard_init_linux.go:178: exec user process caused "exec format error"
<p>docker started throwing this error:</p> <blockquote> <p>standard_init_linux.go:178: exec user process caused "exec format error"</p> </blockquote> <p>whenever I run a specific docker container with CMD or ENTRYPOINT, with no regard to any changes to the file other then removing CMD or ENTRYPOINT. here is the doc...
0
1,605
how to use an android timer
<p>having a problem trying to understand how to use a timer in android. I have an activity that sets up a timerTask in my onCreate method. I call the task on a button click and all it is supposed to do is append a textview. The problem is that I am getting a NullPointerException at <code>timer.schedule(task, TIMER_DEL...
0
1,068
Testing against Java EE 6 API
<p>I write an addition to JAX-RS and included the Java EE 6 API as a Maven dependency. </p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;javax&lt;/groupId&gt; &lt;artifactId&gt;javaee-api&lt;/artifactId&gt; &lt;version&gt;6.0&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; </cod...
0
1,268
How is column width determined in browser?
<p>How is the actual width of columns in table determined? The code below looks (in Chrome) like this:</p> <p><img src="https://i.stack.imgur.com/D8zYg.png" alt="rendered table"></p> <p>My problem is that adding any more characters to the cell with "ddd..." the free space is not used, but the content of other cells ...
0
1,256
Jquery Mobile: Forcing refresh of content
<p>I have a big problem: I have a <code>listview</code> and each item links to page <code>#concorsi</code>. When I click on a link the URL become <code>#concorsi?numero=1</code> because I'm fetching the form number 1 from a JSON.</p> <p>When I click the first time it's all OK. Each input is visualized with jQuery Mobi...
0
2,300
screen capturing using html2canvas
<p>I am calling <code>screenView()</code> from another class. I am able to call it but I am not getting <code>strDataURI</code>. What am I doing wrong?</p> <pre><code> function screenView(){ var image; var date = new Date(); var message, timeoutTimer, ...
0
1,958
How do I remove all null and empty string values from an object?
<p>Can you please tell me how to remove all null and empty string values from an object? I am getting an error while deleting the key.</p> <p>This is what I have so far, but it doesn't work properly:</p> <pre><code>$.each(sjonObj, function(key, value) { if(value == &quot;&quot; || value == null) { delete sj...
0
2,023
Firestore + cloud functions: How to read from another document
<p>I'm trying to write a Google cloud function that reads from another document. (Other document = not the document that triggered the cloud function.)</p> <p>It's a bit of a treasure hunt to figure out how to do such a simple thing.</p> <ol> <li><p>The cloud functions documentation seems to suggest to look at the ad...
0
1,084
Hibernate Entity proxy initialization
<p>I'm having a problem with a Hibernate entity that does not get initialised.<br/> It seems that it's still returning a not initialised proxy...</p> <p>If I take a look at my debug info I would expect my entity to be initialised.<br/> But it looks like the following:</p> <pre><code>entity = {SomeEntity_$$_jvst47c_1...
0
1,219
Angular 2 component directive not working
<p>I am a beginner in angular 2 and I want to make my first app working. I am using TypeScript. I have the <strong>app.component.ts</strong> in which I have made a directive to another compoent called <strong>todos.component</strong> but I am getting the following error at compile time:</p> <pre><code>[0] app/app.comp...
0
1,085
TypeScript 2: custom typings for untyped npm module
<p>After trying suggestions posted in <a href="https://stackoverflow.com/questions/37641960/typescript-how-to-define-custom-typings-for-installed-npm-package">other places</a>, I find myself unable to get a typescript project running that uses an untyped NPM module. Below is a minimal example and the steps that I tried...
0
1,277
JUnit ~ Assert that list contains objects with the same values in any order
<p>My use case is that I am writing a document parser (for ReqIF documents) and want to compare that the parsed object contains the expected elements. For this, I want to write a JUnit Test.</p> <p>Effectively, what I am looking for is an assertion method that compares two lists of objects with values and passes when ...
0
1,404
Aforge.net Camera Capture & Save image to directory
<p>everyone. I have been stuck here dealing with this bugs for days, but I still couldn't figure it out. My guess: I think my code has some problem as I did not dispose the object properly after using it, (I'm not very familiar with these concepts of releasing resources, threading) . I got these code by taking referen...
0
1,421
How to get table cells evenly spaced?
<p>I'm trying to create a page with a number of static html tables on them. </p> <p>What do I need to do to get them to display each column the same size as each other column in the table?</p> <p>The HTML is as follows:</p> <pre><code>&lt;span class="Emphasis"&gt;Interest rates&lt;/span&gt;&lt;br /&gt; &lt;table cel...
0
1,738
Flutter: How to jump to last page dynamically created on a PageView
<p>I have a pageView displaying a list of pages.</p> <p>Application provides a + button to add a new page at the end of the collection.</p> <p>I need the pageView to automatically jump to the last page once this new page has been successfully created.</p> <p>If I try to redisplay the view providing a provider with i...
0
1,542
how to check whether an element already exists in the array
<p>i am sending value from one page to another,i want to store the values which i hav sent,&amp; then want to compare the value which i am sending with the one which i hav already sent,i.e the saved value.while storing the values into an arrayin persistent object,&amp; then comparing the value with another array,i face...
0
2,478
MySQL pivot row into dynamic number of columns
<p>Lets say I have three different MySQL tables:</p> <p><strong>Table <code>products</code>:</strong> </p> <pre><code>id | name 1 Product A 2 Product B </code></pre> <p><strong>Table <code>partners</code>:</strong> </p> <pre><code>id | name 1 Partner A 2 Partner B </code></pre> <p><strong>Table <code>s...
0
1,026
Qt 4.8, Visual Studio 2013 compiling error
<p>Am folowing this <a href="http://menatronics.blogspot.fr/2012/12/compiling-qt-for-visual-studio-2012.html" rel="noreferrer">tutorial</a> to compile Qt 4.8 with visual Studio 2013 but after running nmake i get:</p> <pre><code>C:\Qt\4.8.5.src\src\3rdparty\javascriptcore\JavaScriptCore\wtf/MathExtras.h(103) : error C2...
0
3,213
Chromedriver: cannot execute binary file
<p>I am getting started with Nighwatch for web testing, and trying to do that with Chrome.</p> <p>However, when I start the test, it immediately crashes with the following error:</p> <p><code>17:56:35.218 INFO - Executing: [new session: Capabilities [{acceptSslCerts=true, name=Sandbox, browserName=chrome, javascriptE...
0
1,076
Is there a way to reset the scale of the viewport dynamically to 1.0
<p>Im working on a a mobile online-store And got stuck while implementing the product zoom function</p> <p>After clicking an Image "user-scalable" is allowed and maximum-scale is set to 10.0 When the user zooms in on the product with a pinch gesture, everything works fine. But after closing the zoomed Image the scale...
0
1,355
What is difference between getSupportFragmentManager() and getChildFragmentManager()?
<p>My class inherits Fragment and that's why it can't use getSupportFragmentManager(). I am using getChildFragmentManager and it is showing me Error - IllegalArguementException: No view found for id... error.</p> <p>Any guidance would be appreciated.</p> <p>Code for calling AttachmentsListFragment is</p> <pre><code...
0
1,487
How to reuse threads in .NET 3.5
<p>I have a subroutine that processes large blocks of information. In order to make use of the entire CPU, it divides the work up into separate threads. After all threads have completed, it finishes. I read that creating and destroying threads uses lots of overhead, so I tried using the threadpool, but that actually...
0
1,112
DataTables hidden row details example - the table header is misplaced (test case attached)
<p>I'm trying to create a table where more details can be seen when the plus-image is clicked - similar to the <a href="http://www.datatables.net/release-datatables/examples/api/row_details.html" rel="nofollow noreferrer">DataTables hidden row details example</a></p> <p>Unfortunately there is a warning being printed a...
0
5,342
ParseException; must be caught (Try/Catch) (Java)
<p>I am writing an appointment program and am getting the following errors:</p> <pre><code>AppointmentNew.java:68: unreported exception java.text.ParseException; must be caught or declared to be thrown Date lowDate = sdf.parse(stdin.nextLine()); ^ AppointmentNew.java:70: unrepor...
0
1,679
PostgreSQL connection limit exceeded for non-superusers
<p>I am using a spring application and I am getting following exception as:</p> <pre><code>Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection. </code></pre> <p>When I am manually trying to connect to the database using DBVisualize...
0
1,152
How to get all extra values from intent
<p>Here is my code</p> <pre><code> Log.i("sdfgsdf", time.toGMTString()); String SENT = "SMS_SENT"; Intent y= new Intent(SENT); y.putExtra("number", phoneNumber); y.putExtra("time", time.toString()); String DELIVERED = "SMS_DELIVERED"; int FLAG_UPDATE_CURRENT =(0x08...
0
2,756
Socket File "/var/pgsql_socket/.s.PGSQL.5432" Missing In Mountain Lion (OS X Server)
<p>I just upgraded my MacMini Server from Lion Server to Mountain Lion using OS X Server. I am having the same problem with PostgreSQL that I did last year when I first installed Lion Server.</p> <p>When I try to do any kind of PostgreSQL terminal command I get the following notorious error message that many have gott...
0
1,357
Unable to tag SCM when I using maven release plugin
<p>when I using maven release plugin,I encountered some questions,the most one is tag scm failed,the error is : svn: “svn://192.168.5.222/show/test-show/trunk/show” does not in the revision 0 .</p> <pre><code>at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) at org.apache.maven.lifecyc...
0
1,101
How to decode a base64 encoded certificate
<p>Below is my requirement:</p> <ol> <li>Program will have an XML file as input with 3 tags: <code>OrgContent</code>, <code>Signature</code> and <code>Certificate</code>. All these data are Base64 encoded. Note: Program is using BC jars</li> <li>Program needs to decode them and verify the data for its authenticity usin...
0
1,691
Android studio getSlotFromBufferLocked: unknown buffer error
<p>I want to make a simple login and register app, so the user can create an account. (name, username, password) I use WAMP and a MYSQL database where I store the accounts.</p> <p>When I fill in the user info on the registration form and click register I get the following error:</p> <pre><code>09-14 09:30:39.864 2...
0
2,532
Error C2593: 'operator =' is ambiguous For string template
<p>I keep getting this error for part of my template, for this is working fine. I would love to handle this error myself but I don't even know what this means. Maybe my operator overload syntax is incorrect? But even without my operator loading method I still get the same error</p> <pre><code>node.h(12): error C2593...
0
2,916
uwsgi python3 plugin doesn't work
<p>i compiled uwsgi with make and it's successfully done,and now i decide to run my django1.5 site with python3.3 . i've checked for the doc (<a href="http://projects.unbit.it/uwsgi/wiki/Guide4Packagers" rel="noreferrer">http://projects.unbit.it/uwsgi/wiki/Guide4Packagers</a>) and set up python3.3 development headers t...
0
1,372
Creating Registry Keys with Powershell
<p>I am trying to check if a key-structure exists in the registry using powershell. If the structure does not exist, I need to create it and then I need to create the keys in the ending folder. If I run the snippets individually to create the keys, they create just fine. But running the block itself (ensuring manually ...
0
1,073
using CSS to center FLOATED input elements wrapped in a DIV
<p>There's no shortage of questions and answers about centering but I've not been able to get it to work given my specific circumstances, which involve floating.</p> <p>I want to center a container DIV that contains three floated input elements (split-button, text, checkbox), so that when my page is resized wider, the...
0
1,083
Sort latitude and longitude coordinates into clockwise ordered quadrilateral
<p><strong>Problem</strong></p> <p>Users can provide up to four latitude and longitude coordinates, in any order. They do so with Google Maps. Using Google's <code>Polygon</code> API (v3), the coordinates they select should highlight the selected area between the four coordinates.</p> <p><strong>Question</strong></p>...
0
1,278
Error TS2440 (TS) Import declaration conflicts with local declaration of 'PluginConfig'
<p>I am trying to run my application in Visual studio 2017 and I keep getting the error:</p> <pre><code> "Error TS2440 (TS) Import declaration conflicts with local declaration of 'PluginConfig'" </code></pre> <p>I tried downgrading my typescript, but the error is not going away. Below is my package.json file:</p> <...
0
1,270
Nullpointer Exception in webdriver, driver is null
<p>I am a newbie in selenium java and trying to run test case by calling methods from another class in a framework. Methods are defined in a different class. The issue is that for first instance, the driver is found (Firefox driver) but when a method from another class is called, the driver is null. </p> <pre><code>Be...
0
2,041
How to connect the Bluetooth device by click the item of listview in Android?
<p>I am developing an application where I have to connect to Bluetooth device on Android 4.3.</p> <p>I can scan the bluetooth device, but it can not connect the bluetooth device.</p> <p>I have already add the permission in Manifest of the following:</p> <pre><code>&lt;uses-permission android:name="android.permission...
0
3,812
Error on execution -version `Qt_5' not found required by
<p>On execution of eiskaltdc++ on ubuntu 15.10 ,I get the following error:</p> <pre><code>eiskaltdcpp-qt: /usr/lib/x86_64-linux-gnu/libQt5Multimedia.so.5: version `Qt_5' not found (required by eiskaltdcpp-qt) eiskaltdcpp-qt: /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5: version `Qt_5' not found (required by eiskaltdcpp-q...
0
4,419
Can't use 'defined(@array)' warning in converting .obj to .h
<p>I'm trying to convert my .obj file to a .h header file, but i'm getting "Can't use 'defined(@array)' (Maybe you should just omit the defined()?)" warning and no .h files has created. </p> <p>I've tried replacing <code>@center</code> to <code>$center</code> or omintting <code>defined()</code> but it creates .exe fi...
0
5,548
How to correctly check if user is authenticated in Angular4?
<p>I am currently developing an Angular 4 application.</p> <p>The application uses Auth0 for authentication whose syntax is quite similar to those of other authentication services.</p> <p>The code for authentication looks as follows:</p> <p>// auth.services.ts</p> <pre><code>@Injectable() export class Auth { publ...
0
1,736
Mocha + TypeScript: Cannot use import statement outside a module
<p>I was watching <a href="https://www.youtube.com/watch?v=I4BZQr-5mBY" rel="noreferrer">this video</a> in order to learn how to add some simple tests to my Express routes but I am getting all kind of errors while executing a test. The error is:</p> <blockquote> <p>import * as chai from 'chai';</p> <p>^^^^^^</p...
0
1,046
Stateless component React router
<p>I am new to React and Redux, I am actually creating a code of myself but I got stuck with a router kind of thing inside stateless component.</p> <p>So, Actually I need to route to a component by using this.props.history.push('/somepath'). This is not happening inside a stateless component.</p> <p>My Stateless comp...
0
1,578
Extjs scrollbar doesn't appear
<p>I have a problem like in this topic: <a href="https://stackoverflow.com/questions/18232448/extjs-how-to-make-the-scrollbar-appear">Extjs how to make the scrollbar appear?</a>, but too many things are confusing for me. </p> <p>I need to show a scrollbar as soon as the form is wider than the containing container. Wh...
0
2,210
How to generate classes from wsdl using Maven and wsimport?
<p>When I attempt to run "mvn generate-sources" this is my output : </p> <pre><code>SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [INFO] Scanning for proje...
0
1,404
how to send an HTML email with an inline attached image with PHP
<p>I have a PHP script which sends an HTML email with an attached image. It works beauifully, however, I can't get the attachment to display in an <code>&lt;img&gt;</code> tag in the email body. The attached file is called <code>postcard.png</code> and the original filename on the server is <code>4e60348f83f2f.png</cod...
0
1,425
AssertionError in django
<p>I've been pulling my hair out on this one and it seems like there is a really simple solution for it but I'm too blind to see it. I've upgraded from Django 1.4.3 to Django 1.6 and ever since then I get an assertion error while trying to get DateTimeField to work.</p> <p>Here's my model</p> <pre><code>class Article...
0
2,516
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/apache/bin/apachectl)
<p>First of all, sorry for the long title, I never expected this error, so I don't know how to describe it.</p> <p>I'm getting this error:</p> <pre><code>Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/apache/bin/apachectl) is not within the allowed path(s): (/home/:...
0
5,037
Convert JSON to XML using PHP
<p>My Task is to convert the JSON data in to XML. Right now, My array_to_xml function converts the data from the array into:</p> <blockquote> <p><code>&lt;0&gt;Maserati&lt;/0&gt;&lt;1&gt;BMW&lt;/1&gt;&lt;2&gt;Mercedes/2&gt;&lt;3&gt;Ford&lt;/3&gt;&lt;4&gt;Chrysler&lt;/4&gt;&lt;5&gt;Acura&lt;/5&gt;&lt;6&gt;Honda&lt;/6...
0
1,654
Move containing elements up and down with jquery
<p>Thanks for any help you can provide! Currently, I use a ui-sortable code to allow users to move items up and down in order. Now, I want to give each of these items a set of "up" and "down" buttons that allow users to move items up and down with a click. I've tried reworking theses posts, but I seem to be missing som...
0
1,628
Implementing Pipes in a C shell (Unix)
<p>Basically I have created a shell using standard POSIX commands, I want to be able to Implement Piping as well. Right now it handles commands correctly, and can do background processing with &amp;. But I need to be able to pipe using | and >> as well. For example something like this: cat file1 file2 >> file3 cat file...
0
1,223
Using AsyncTask
<p>Apologies if this is a simple question but I am very new to this and still learning.</p> <p>I have an app and when my users click the button to login after entering their details, it is crashing with android.os.NetworkOnMainThreadException I have discovered this is because I am performing a network operation on the...
0
1,291
Maven Settings for multiple repositories
<p>I have the following in settings.xml</p> <pre class="lang-xml prettyprint-override"><code>&lt;mirrors&gt; &lt;mirror&gt; &lt;id&gt;paid-jars&lt;/id&gt; &lt;name&gt;jars with license&lt;/name&gt; &lt;url&gt;http://url:8081/nexus/content/repositories/paidjars/&lt;/url&gt; ...
0
1,529
Partition by date range PostgreSQL scans all partitions
<p>I have a table partitioned per month (timestamp column). </p> <p>when querying the data, explain shows that all partitions are being queried when I'm constructing a date with date functions, whereas when I use hard coded dates only the targeted partitions are being scanned.</p> <p>So when querying like this:</p> ...
0
2,582
Jest - Map through an Array of Items and test their Values
<p>I have a simple Utility Function. It takes an Enum, and Transform's it to an Array of Objects shaped as <code>{label: string, value:string}</code>.</p> <p>Here is the Function as well as the Interface it uses:</p> <pre><code>export interface ISelectOption { value: string; label: string; selected?: boolean; }...
0
1,063
Symfony2: There is no extension able to load the configuration for
<p>I am building an extension to load config files from all installed bundles.</p> <p>my Extension looks like this:</p> <pre><code>namespace Acme\MenuBundle\DependencyInjection; // use ... use Acme\MenuBundle\DependencyInjection\Configuration; class AcmeMenuExtension extends Extension { public function load(array ...
0
1,121
DataTables: search all columns when server-side
<p>I'm using <a href="https://github.com/IgnitedDatatables/Ignited-Datatables/wiki" rel="nofollow">IgnitedDatatables</a> (CodeIgniter library) for <a href="http://datatables.net" rel="nofollow">DataTables</a>. The table gets generated without problems but if I search/filter it can only filter one column at a time. If I...
0
1,048
Angular 6: Send click event in child to parent
<p><strong>EDIT: It still don't work and not throw any errors. I edited the code and added partial code from parent.component.ts</strong></p> <p>I have parent component of a side nav-bar and child component which is nested in parent component's body and contains iframe. I want that when there's a click event on the if...
0
2,032
How to close a server port after we are done using it?
<p>Note: I found a similar question here:</p> <p><a href="https://stackoverflow.com/questions/6147481/how-to-close-port-after-using-server-sockets">How to close port after using server sockets</a></p> <p>But did not find any satisfactory answer there.</p> <p>Here is my code for the client program:</p> <pre><code>pa...
0
1,252
Error :Could not load file or assembly 'DocumentFormat.OpenXml,
<p>I'm getting this error is VS2015</p> <blockquote> <p>Additional information: Could not load file or assembly 'DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly ref...
0
1,858
TypeError: Assignment to constant variable
<p>Please help me solve the error. I have attached my index.js code routes.js code and db.js code and the error description. I've been trying hard to solve the error.</p> <blockquote> <p>index.js</p> </blockquote> <pre><code>const express = require('express'); const app = express(); const routes = require('./routes'); ...
0
2,825
Is it possible to group a set of html elements so that they move together?
<p>When the browser size is changed/on different sized devices, I need a set of html elements that are all semantically related to remain together and move in a block. That is, if one of the elements move to the next "row" due to their not being enough width to contain the whole grouping, ALL of it should move down.</p...
0
1,793
Jetpack navigation: Title and back/up arrow in the action bar?
<p>I have installed the latest canary version of Android Studio, and followed this (<a href="https://developer.android.com/topic/libraries/architecture/navigation/navigation-implementing" rel="noreferrer">https://developer.android.com/topic/libraries/architecture/navigation/navigation-implementing</a>) instruction to i...
0
1,635
Convert from an infix expression to postfix (C++) using Stacks
<p>My lecturer gave me an assignment to create a program to convert and infix expression to postfix using Stacks. I've made the stack classes and some functions to read the infix expression. </p> <p>But this one function, called <code>convertToPostfix(char * const inFix, char * const postFix)</code> which is responsib...
0
3,738
error: overloaded 'operator<<' must be a binary operator (has 3 parameters)
<p>I know there are plenty of questions like these, but I couldn't find a solution that worked for me. </p> <p>I am trying to make simple fraction calculator than can add or subtract any number of functions and write the answer as a reduced fraction. </p> <p><em>Example: input= 3/2 + 4/ 8 , output = 2</em></p> <p>I ...
0
2,036
How do I set android:layout_columnWeight="1" programmatically to an element in an android support v7 Gridlayout
<p>I'm trying to build a GirdLayout programmatically with 2 columns and I want these columns to have equal width set at half the width of the screen. </p> <p>I figured out you can do this since API 21 or with the support v7 GirdLayout view. I see examples that uses android:layout_columnWeight="1" to do this. But I can...
0
1,056
How to hide <span> value under class
<p>How can I hide span value under .fa .fa-search class <a href="http://prntscr.com/fr3vvk" rel="nofollow noreferrer">http://prntscr.com/fr3vvk</a></p> <pre><code>&lt;div role="tabpanel" class="tab-pane fade in active" id="stm_all_listing_tab"&gt; &lt;form action="" method="GET"&gt; ...
0
3,148
Mockito cannot create Spy of @Autowired Spring-Data Repository
<p>I am trying to overlay my whole test environment with Mockito.spy functionality so whenever I want i can stub a method but all other calls go to default functionality. This worked very well with the Service layer but I have problems with the Repository layer.</p> <p>My setup is as follows:</p> <p>Mockito - 2.15.0 ...
0
1,147
ListView items are not clickable. why?
<p>I have a <code>ListView</code> that uses a customized adapter, but I can't click on the ListView Item ..</p> <p>Activity for list view ..</p> <pre><code>package com.adhamenaya.projects; import java.util.ArrayList; import android.app.Activity; import android.content.Context; import android.os.AsyncTask; import an...
0
2,423
read/write an object to file
<p>here is the code : my mission is to serialize an my object(Person) , save it in a file in android(privately), read the file later,(i will get a byte array), and deserialize the byta array. </p> <pre><code> public void setup() { byte[] data = SerializationUtils.serialize(f); Writ...
0
1,674
Copying from asset folder to SD card
<p>I am not sure what is wrong with this code? It creates a file in SD card but with 0 byte.. Can one of you look into it and tell me whats wrong with this?</p> <p>Here i am trying to copy a file from asset folder which is codes.db to sd card.. </p> <pre><code> AssetManager assetManager = getResources().getAssets(...
0
1,737
MYSQL 5.7 Percona XtraDBCluster - Cant start MYSQL - Digital Ocean Box
<p>I rebooted a digital ocean box and now I can't start mysql. When I run start command i get : </p> <pre><code>Redirecting to /bin/systemctl restart mysql.service Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. </c...
0
2,780
Android: How to run asynctask from different class file?
<p>When I use my code in one class file, it runs perfectly:</p> <pre><code>package com.example.downloadfile; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; import android.app.Activity; import android.app.Dialog; import android...
0
3,308
RecyclerView with Fragments
<p>I am trying to use the new <code>RecyclerView</code> widget inside a <code>Fragment</code> but I am getting this error: </p> <blockquote> <p>Unable to start activity ComponentInfo{com.example.myapplication/com.example.myapplication.MyActivity}: java.lang.NullPointerException: Attempt to invoke interface metho...
0
1,198
java.lang.OutOfMemoryError BitmapFactory.nativeDecodeAsset()
<p>Hi i am creating an app about traffic signs. traffic signs are in .png format. some of them I am showing in horizontalscrollview. But when try to open activities , I get this error from android market error reports. here is my error report:</p> <pre><code>&lt;java.lang.RuntimeException: Unable to start activity Com...
0
1,161
How to fix ambiguous mapping methods
<p>I'm doing an experiment with jHipster.</p> <p>I have created two entities A and B backed by DTO (mapstruct). There is a many-to-many relationship between them. They both also have a many-to-one relationship with the user.</p> <p>Up until creating the last relationship, everything works fine. After creating the las...
0
1,082
Django Rest Framework ImageField
<p>I can not save the image in this ImageField.</p> <p><strong>when sending data back:</strong></p> <pre><code>{ "image": ["No file was submitted. Check the encoding type on the form."] } </code></pre> <p><strong>model.py</strong></p> <pre class="lang-py prettyprint-override"><code>class MyPhoto(models.Model): ...
0
1,288
Angular 2 - Unexpected Module declared by AppModule
<p>I am new to angular and trying to separate my modules in Angular2 app having the following directory structure.</p> <p>I have my module and other components declared in the AppModule, but I am getting an error in browser console that <code>Unexpected HomeModule declared by AppModule</code></p> <pre><code>app --aut...
0
1,089
Node.js mysql error cannot read property of undefined?
<p>I have a program that inserts SMDR data into a database as it comes in.</p> <p>Here is my code:</p> <pre><code>var net = require('net'), mysql = require('mysql'), PORT = 1752, HOST = '192.168.10.2', pool = mysql.createPool({ host: 'localhost', port: 3307, user: 'root', ...
0
1,509
Making a button do something on Arduino TFT touchscreen
<p>so I have an Arduino MEGA2560 and a TFT shield touchscreen. I used one of the examples to make 2 buttons to display on screen, by just using <code>drawRect()</code>. But how do I make these 2 boxes do something when I press them? I know the coordinates for these 2 boxes, so how do I make them "sense" the touch and t...
0
1,333
Passing screenProps to a tab navigator
<p><strong>Background</strong></p> <p>I have a root component that controls the views of 2 components. I am conditionally rendering these components. </p> <p>I am passing <code>screenProps</code> to these 2 components so I can expose a <code>function</code> from the root components. </p> <p>When component 1 is rende...
0
1,082
Add Header and Footer for PDF using iTextsharp
<p>How can I add header and footer for each page in the pdf.</p> <p>Headed will contain just a text Footer will contain a text and pagination for pdf (Page : 1 of 4)</p> <p>How is this possible ? I tried to add the below line, but header does not show up in pdf.</p> <pre><code>document.AddHeader("Header", "Header Te...
0
1,070
How to convert the Long value to String using sql
<p>I am doing a long to string conversion using java in following way.</p> <pre><code>Long longValue = 367L; String str = Long.toString(longValue, 36).toUpperCase(); </code></pre> <p>this is returning me as value A7. how can achieve this in doing oracle sql.</p> <p>UPDATED:</p> <p>Hi, I have analyzed how java code ...
0
1,498
JPA 1.0 error: The name is not a recognized entity or identifier. Known entity names: []
<p>I am getting following exception while I try to execute simple JPA 1.0 code. What may be the cause?</p> <pre><code>5453 DevPQRWDPBSSPersist WARN [P=351601:O=0:CT] openjpa.Enhance - This configuration disallows runtime optimization, but the following listed types were not enhanced at build time or at class load ...
0
1,796
query with join across multiple databases-syntax error
<p>I have 2 databases namely db1,db2. I need a query that fetch the data from these dbs(db1,db2) which have inturn 2 tables(concessions,invoicing) each.</p> <p>In db1.concessions => concession is primary key. db1.invoicing => [Concession Number] is primary key</p> <p>similarly in db2.concessions => concession is...
0
1,149
Distance between two locations in javascript
<p>Can some one help me what went wrong on this code snippet ? My ultimate aim to find distance two locations using googles javascript API . I have used geocomplete jquery function for address autocomplete. On click of search nothing is happening.Im just a beginner please help </p> <pre><code>&lt;!DOCTYPE html&gt; &lt...
0
2,186
Unable to resume activity
<p>I am novice and trying to allow my <code>ListView</code> to refresh after my SQLite DB is updated. I am not receiving a compiling error after I revised my <code>onResume()</code> method. I am using a <code>SimpleCursorAdapter</code> to requery but it's not working. The error received was from logcat and is below. Pl...
0
4,962
java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat 7.0\logs\localhost_access_log.2012-07-12.txt (Access is denied)
<p>I'm trying to test my servlet by running it on Tomcat. However, I get the above error (sometimes this error occurs, but earlier the servlet was running fine). A few facts:</p> <ol> <li><p>I've looked thoroughly at the explanations given by <a href="https://stackoverflow.com/questions/10207033/http-status-404-descri...
0
2,678
Sonar setup with MySql
<p>Iam trying to change the sonar Qube 5.5 default database to Mysql.But it is still connecting to default H2 DB.</p> <p>Configuration as below.</p> <p>I have run the below scripts in Mysql DB</p> <pre><code># Create SonarQube database and user. # # Command: mysql -u root -p &lt; create_database.sql # CREATE DA...
0
3,482
Priority queue with Pointers and Comparator C++
<p>I just started to learn C++, Half of the time I don't know what am I doing, spend hours and hours searching on Google and blindly put codes inside my project, this might be a basic question, but I just can't seems to get it right.</p> <p><strong>This is the requirement</strong> of my assignment, I need to have thes...
0
1,118
Ripple effect on top of Image - Android
<p>I've been experimenting with the ripple animation in my latest side project. I'm having some trouble finding an "elegant" solution to using it in certain situations for touch events. Namely with images, especially in list, grid, and recycle views. The animation almost always seems to animate behind the view, not the...
0
2,231
Why DBSCAN clustering returns single cluster on Movie lens data set?
<h2>The Scenario:</h2> <p>I'm performing Clustering over Movie Lens Dataset, where I have this Dataset in 2 formats:</p> <p><strong>OLD FORMAT:</strong></p> <pre><code>uid iid rat 941 1 5 941 7 4 941 15 4 941 117 5 941 124 5 941 147 4 941 181 5 941 222 2 941 257 4 941 258 4 941 273 3 941 294 4 </code></pre> <p...
0
2,102
Bootstrap table - dynamic button in row
<p>I am using <em>bootstrap v3</em>. I try to get the effect as in the picture. I want a button, what to display <code>"Item Name"</code> in <code>popup</code>. But my button is not displayed.</p> <p>The problem is that this nature of my table is a dynamic (form <code>JSON</code>) - which makes things difficult. </p> ...
0
1,278
Using CardView and RecyclerView in my layout files throws an exception
<p>So I've been taking a shot at the Material Design of Android Preview L. I imported both the <code>CardView</code> and the <code>RecyclerView</code> libraries.</p> <p>I use the Android Studio preview version 0.8.0. Have the latest SDK packages installed.</p> <p>Once I use them in my layout files though, the preview...
0
3,078
Android ScrollView can host only one direct child
<p>I have a onclick listener from the gallery that should clear all the rows inside the tableview, then add row/rows to a tableview inside a scrollview. The fragment should change on every button click.</p> <p>However I am getting: java.lang.IllegalStateException: ScrollView can host only one direct child.</p> <p><s...
0
2,506
Associating string representations with an Enum that uses integer values?
<p>I'm trying to create an enum that has integer values, but which can also return a display-friendly string for each value. I was thinking that I could just define a dict mapping values to strings and then implement <code>__str__</code> and a static constructor with a string argument, but there's a problem with that.....
0
1,106
What's so special about file descriptor 3 on linux?
<p>I'm working on a server application that's going to work on Linux and Mac OS X. It goes like this:</p> <ul> <li>start main application</li> <li>fork of the controller process</li> <li>call lock_down() in the controller process</li> <li>terminate main application</li> <li>the controller process then forks again, cre...
0
1,128
How to use JQuery in TWIG (symfony2)
<p>I am currently trying to use JQuery in TWIG. My website was created using Symfony2. I currently have a table in TWIG (it works - see below), for which I would like to make use of JQuery in order to make my table columns sortable.</p> <pre><code>&lt;table&gt;&lt;tr&gt;&lt;th&gt;cat&lt;/th&gt; &lt;th&gt;dog&lt;/th&gt...
0
1,107
How do I use "flex-flow: column wrap"?
<h1>Short version</h1> <p>When using <code>flex-flow: column wrap</code> and <code>display: inline-flex</code>, it doesn't shrinkwrap like <code>inline-block</code>:</p> <p><a href="https://i.stack.imgur.com/Es3ch.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/Es3ch.gif" alt="enter image description here">...
0
2,566
"Failed to load resource: the server responded with a status of 404 (Not Found)" + "Origin … is not allowed by Access-Control-Allow-Origin."
<p>I'm creating a react app with 'create-react-app', express, cors and mysql in which a user should enter some details in a form which then will be sent to a db. All the existing entries should be shown on the web app. I tried that locally and everything worked well. The database has been populated and a request has sh...
0
3,099