title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
what is the cause of SMTP.MAIL: the Operation has timed out?
<p>I am creating an intranet web-based application that will send notifications to its users depending on the Admin's choice. </p> <p><strong>I developed the Mailing page correctly and it work fine with 15 or 20 users. Now, I have more than 200 users, so when I run this page I got the following error and I don't know ...
0
2,649
error in sqlite "DROP TABLE IF EXISTS" android
<p>so i have a problem in my DBAdapter class its just crushes when i try to open the database: from the LogCat i guess the problem is in the onUpgrade function:</p> <pre><code> public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { Log.w("SingleDBAdapter", "Upgrading database from version...
0
1,428
What is the difference between [[0 for _ in range(10)] for _ in range(10)] and [0 for _ in range(10)] * 10?
<pre><code>&gt;&gt;&gt; CM = [[0 for _ in range(10)]] * 10 &gt;&gt;&gt; CM [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, ...
0
1,155
Kubernetes AutoScaler Not Scaling, HPA shows target <unknown>
<p>I'm pretty new to kubernetes, not so much with docker.</p> <p>I've been working through the example but I am stuck with the autoscaler, (which doesn't seem to scale).</p> <p>I am working through the example here <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#step-on...
0
2,443
method to write in log files in a shell script
<p>I'm developing a couple of shell scripts and want to add an easy logging method. But till now the the function created only print the first log line. I have a terrible headache cause I cannot understand where is the problem</p> <p>The logging functions is so easy to develop and to understand:</p> <pre><code>LOG_FI...
0
1,549
CLOB value in out/return from plsql (invalid LOB locator specified: ORA-22275)
<p>I've got stored plsql procedure, that takes big text from file</p> <pre><code>create or replace procedure dbst_load_a_file( p_file_name in varchar2, l_clob out clob ) as l_bfile bfile; dst_offset number := 1 ; src_offset number := 1 ; lang_ctx number := DBMS_LOB.DEFAULT...
0
1,471
css display table cell requires percentage width
<p>I've been put in a position where I need to use the display:table-cell command for div elements.</p> <p>However I've discovered that the "cells" will only work correctly if a percentage is added to the width.</p> <p>In this fiddle <a href="http://jsfiddle.net/NvTdw/" rel="noreferrer">http://jsfiddle.net/NvTdw/</a>...
0
1,520
Spring Boot Application failed to start with classpath: []
<p>I generated a Spring Boot application with <a href="http://www.jhipster.tech/" rel="noreferrer">jHipster</a>, added some code from my previous project (non-jhipster project) and tried to run it using IDEA. First I got an error message similar to <a href="https://intellij-support.jetbrains.com/hc/en-us/community/post...
0
1,667
`Building wheel for opencv-python (PEP 517) ... -` runs forever
<p>When I run</p> <pre><code>!pip install imgaug==0.4.0 </code></pre> <p>the following is the output</p> <pre><code>Collecting imgaug==0.4.0 Using cached https://files.pythonhosted.org/packages/66/b1/af3142c4a85cba6da9f4ebb5ff4e21e2616309552caca5e8acefe9840622/imgaug-0.4.0-py2.py3-none-any.whl Requirement already sat...
0
1,688
How to get items row id of repeater when user clicks rows linkbutton control
<p>I have a repeater, nested with Html table rows:</p> <pre><code>&lt;asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound"&gt; &lt;HeaderTemplate&gt; &lt;table id="grid"&gt; &lt;thead&gt; &lt;tr&gt; ...
0
1,165
How to send file through socket in c#
<p>I have server and client console apps which communicate fine as well as sending some string. Here is the code...</p> <p>Server</p> <pre><code>public static void Main() { try { IPAddress ipAd = IPAddress.Parse("127.0.0.1"); /* Initializes the Listener */ Tcp...
0
1,242
Combining a while loop with Task.Run() in C#
<p>I'm pretty new to multithread applications in C# and I'm trying to edit my code below so that it runs on multiple threads. Right now it operates synchronously and it takes up very little cpu power. I need it to run much faster on multiple threads. My thought was starting a task for each core and then when a task fin...
0
1,760
Show form based on radio button select
<p>I have the following html which has two forms with form <code>id=cardpayment</code> for first form and form <code>id="intenetpayment"</code> for the second.</p> <p>Also I have 3 radio buttons named "Debit card","Credit Card","Internet Banking".</p> <p>All I want to do is,when I select the radio button Debitcard or...
0
5,334
Unknown data type "JSONB" when running tests in play slick with H2 Database
<p>I have evolution problem <strong>Unknown data type: "JSONB"</strong> when running tests in playframework using </p> <ul> <li>playframework v2.6.6 for scala</li> <li>play-slick v3.0.2</li> <li>play-slick-evolutions v3.0.2</li> <li>postgresql - 42.0.0</li> <li>h2database - 1.4.194</li> </ul> <p>My H2DbConnector loo...
0
1,102
Java java.util.ConcurrentModificationException error
<p>please can anybody help me solve this problem last so many days I could not able to solve this error. I tried using synchronized method and other ways but did not work so please help me</p> <h3>Error</h3> <pre><code>java.util.ConcurrentModificationException at java.util.AbstractList$Itr.checkForComodification(Unk...
0
1,802
How to preserve form fields in django after unsuccessful submit?
<p>Code from views.py:</p> <pre><code>def feedback(request): if request.method == "POST": form = CommentForm(request.POST) if form.is_valid(): form.save() else: print("form.errors:", form.errors) else: form = CommentForm() articles = Comment.objects.a...
0
1,210
How to create a substitution keyword cipher
<p>I am trying to develop a substitution cipher that uses a keyword to create a new cipher alphabet. I am new to Java (as I'm sure you will be able to tell!) and I am finding it hard to wrap my head around the code for what I need to do. </p> <p>My understanding is as follows:</p> <p>If for example, the keyword is <...
0
1,330
How to add a timeout to a function in Python
<p>Many attempts have been made in the past to add timeout functionality in Python such that when a specified time limit expired, waiting code could move on. Unfortunately, previous recipes either allowed the running function to continue running and consuming resources or else killed the function using a platform-speci...
0
1,687
how to fix: 'MongoError: authentication fail' @MongoDB Atlas
<p>I am connecting to MongoDB Atlas and getting authentication fail error.</p> <p>that is my connection string:</p> <pre><code>mongodb://user:&lt;password&gt;@mongo-cluster-shard-00-00-ixqtu.mongodb.net:27017,mongo-cluster-shard-00-01-ixqtu.mongodb.net:27017,mongo-cluster-shard-00-02-ixqtu.mongodb.net:27017/test?ssl=...
0
1,148
The correct way to declare, alloc, load, and dealloc an NSMutableArray
<p>I declare my array in my *.h file:</p> <pre> @interface aViewController: UIViewController { NSMutableArray *anArray; // You will need to later change this many times. } @end </pre> <p>I alloc memory for it my *.m file:</p> <pre> -(void) viewDidLoad { anArray = [[NSMutableArray alloc] init]; } </pre> <p>...
0
1,760
How to fix "Too many arguments"-error
<p>im working on this point of sale system in vb and im stuck on an error</p> <blockquote> <p>Error 2 Too many arguments to 'Public Overridable Overloads Function Insert(ItemName As String, BuyPrice As Integer?, SellPrice As Integer?) As Integer'.</p> </blockquote> <p>how can i clear it?</p> <p>the double st...
0
2,801
Programmatically log a user in to asp.net membership and roles?
<p>I'm working on an Asp.Net 4.0 web application which is using the Membership and Roles features of Asp.Net.</p> <p>In the application, there will be three roles which have access to the login page and one role which doesn't.</p> <p>The way it is supposed to work is as follows.</p> <p>Back end user (in one of the t...
0
1,564
Enable SOAP on Plesk
<p>This question has been asked before but none of the solutions work for me. I was mainly following this one - <a href="https://stackoverflow.com/questions/11014431/enable-soap-on-php">enable SOAP on PHP</a> to no avail. I have a php script which is giving the following error:</p> <pre><code>Error message: Fatal err...
0
5,382
Undefined Reference to
<p>When I compile my code for a linked list, I get a bunch of undefined reference errors. The code is below. I have been compiling with both of these statements:</p> <pre><code>g++ test.cpp </code></pre> <p>as well as </p> <pre><code>g++ LinearNode.h LinearNode.cpp LinkedList.h LinkedList.cpp test.cpp </code></...
0
2,317
How to use ts-node ESM with node modules?
<p>Note: I am aware that the following question is about an experimental feature. I have created a <a href="https://github.com/TypeStrong/ts-node/discussions/1321" rel="noreferrer">clone on the ts-node discussion forum</a>. However, I believe StackOverflow has a wider exposure and would lead to a solution in less time....
0
1,689
MySQL: How to Combine multiple SELECT queries, using different WHERE criteria on the same table?
<p>I have been trying many different ways to solve this problem from this forum and from many others. I can't seem to find a solution to this problem or any documentation that will give me a straight answer.</p> <p>I wondered if you could have a look at it for me.</p> <p>Thanks</p> <p><strong>THE PROBLEM:</strong></p> ...
0
1,415
how to convert double to string in android
<p>i want to convert string in my constructor into double, i can't change it in my constructor, because in one process, the variable must in double, and other class must be string, can you tell me the way to convert it..? this is my constructor :</p> <pre><code>public class DataItem { String ijiInvest, ijiId; String t...
0
1,067
Qt 5 : Mouse Wheel event behaviour for zooming image
<p>I have a window, in which is a QGraphicsView, which will be displaying an image. I have implemented the wheelEvent(). My images are mostly going to be bigger than the window, so I get scroll bars in the window.</p> <p>What we normally observe when we rotate the wheel while viewing an image in Windows Photo Viewer i...
0
1,978
How to use Key Bindings instead of Key Listeners
<p>I'm using <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/event/KeyListener.html" rel="noreferrer"><code>KeyListener</code></a>s in my code (game or otherwise) as the way for my on-screen objects to react to user key input. Here is my code:</p> <pre><code>public class MyGame extends JFrame { static...
0
1,263
Timer/Stopwatch GUI
<p>I am trying to make a simple java application that counts time, with the ability to stop and start the timer. However, the label won't update, and when I press start, it freezes.</p> <p>Could you help me figure out what the problem is?</p> <pre><code>package random; import javax.swing.JFrame; public class Timer...
0
1,283
Authentication in jQuery Mobile and PhoneGap
<p>I have a web application built with jQuery Mobile and PHP (CodeIgniter framework). Now I'm trying to make a PhoneGap version of it as well, to make it distributable as a standalone app. However, the PHP web app. version uses Ion Auth, a CodeIgniter plugin for authentication. So when you go to a page that requires au...
0
1,924
android scale bitmap to screen dimension
<p>actually I'm trying to create simple app with wallpapers.</p> <p>I'm trying to scale my image to user device screen size. I'm using code like bellow:</p> <pre><code>/* DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); int height = metrics.heightPi...
0
1,571
How to get jasperreport file (.JRXML) exact location to load to the system?
<p>I trying to load jasper report (.jrxml) that i created, i named the report "JREmp1.xml". but i got this error </p> <blockquote> <p>"HTTP Status 500 - Request processing failed; nested exception is net.sf.jasperreports.engine.JRException: java.io.FileNotFoundException: D:\printpdf.metadata.plugins\org.eclips...
0
2,649
Trying to change main activity background color on button click
<p>Here's my main:</p> <pre><code>@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_menu); Button btn = (Button) findViewById(R.id.newgame_button); btn.setOnClickListener(new View.OnClickListener() { ...
0
1,359
Webpack Dev Server (webpack-dev-server) Hot Module Replacement (HMR) Not Working
<p>I have gone through many answers on StackOverflow &amp; on GitHub issues as well but, I am still stuck in Hot Module Replacement in Webpack. I am using <code>npm start</code> to run my server with <code>webpack-dev-server --hot --inline</code>. <strong>I am trying to change code in my React component, but nothing ha...
0
1,232
how to hide templatefield in gridview
<p>I am repeating this question because i am not able to find answer from anywhere.</p> <p>I Have a <code>GridView</code> in .aspx page. I want to hide columns based on aspx.cs <code>BindData()</code> method.</p> <p>I have tried using below code but not able to hide. I am using Asp.net with C#.</p> <p>Below is my <...
0
3,719
MVVM DataGrid SelectedItem binding doesn’t get updated
<p>I’m new to .Net and C# and a little bit confused with bindings. I have application that implements MVVM and displays DataGrid. What I want to implement is when user presses certain key combination then the content of currently selected cell gets copied to the cell in the row below. I have tried binding the SelectedI...
0
1,267
angularjs filter (not working)
<p>The following HTML, Javascript and JSON render correctly, but the filter does not work at all. What are we doing wrong?</p> <pre class="lang-html prettyprint-override"><code>&lt;div data-ng-controller="dashboard_controller"&gt; &lt;h1&gt; Catalogs &lt;input type="text" data-ng-model="catalog_fil...
0
9,986
PostgreSQL error 'Could not connect to server: No such file or directory'
<p>Like some others I am getting this error when I run rake db:migrate in my project or even try most database tasks for my <a href="http://en.wikipedia.org/wiki/Ruby_on_Rails" rel="noreferrer">Ruby on Rails</a> 3.2 applications.</p> <blockquote> <p>PGError (could not connect to server: No such file or directory. Is...
0
1,349
Application context being loaded twice - Spring Boot
<p>I have a fairly simple setup. A maven project with 3 modules : core/webapp/model. I'm using Spring boot to gear up my application. In webapp, i have a simple class WebappConfig as follows:</p> <pre><code>@Configuration @EnableAutoConfiguration @ComponentScan(excludeFilters = @ComponentScan.Filter(Configuration.clas...
0
2,775
Angularjs: Displaying array of objects
<p>For the life of me I cannot extract and print out the data in my array. I've generated JSON in PHP and I've wired up Angularjs to retrieve this data. The Angularjs development tool within Chrome is telling me that I have a variable "user" that is an array of objects (see below) when I run the code. I made user a ...
0
1,129
How can I use another mapping from different class in mapstruct
<p>I would like to mapping a model object to dto model. I already have mapper for one of the object. How can I reuse this mapper in another mapper which is in another class?</p> <p>I have below as model</p> <pre><code> @Getter @AllArgsConstructor @ToString public class History { @JsonProperty(&quo...
0
2,146
Javascript object get code as string
<p>First off, I am sorry if this is a duplicate, but every time I googled for 'object' and 'code' I got tutorial pages.</p> <p>I want to know if there is any easy way to get the code associated with an object. Something like</p> <pre><code>function A(){ this.name = 'Kaiser Sauze'; } a = new A(); console.log(a.displ...
0
1,305
"Unexpected token in JSON at position 0" using JSON.parse in Node with valid JSON
<p>I've been tearing my hair out over this one for hours now.</p> <p>I have a simple Node server that's making a call to an external API to get a (massive, like 4+ MB) bit of JSON. I'm using about as boilerplate a request as you can get, taken straight from the Node docs:</p> <pre><code>const muniURL = `http://api.51...
0
1,174
How to compile C# DLL on the fly, Load, and Use
<p>A) compiling C# EXE's and DLL's on the fly are relatively easy.<br> B) Executing an EXE means that a new application is run. Loading a DLL means that methods and functions can be used in cases that may be shared between applications or projects.<br> <br> Now, the quickest and easiest way to compile your EXE (or with...
0
4,137
java.awt.image.DataBufferByte cannot be cast to java.awt.image.DataBufferInt
<p>I have some errors atm while im coding with JAVA, I have been trying to fix this for along time, also trying to find oterh ppl who have same problem and fixed it but nothing work...</p> <p>Well.. here is the code</p> <pre><code> package ca.vanzeben.game; import java.awt.BorderLayout; import java.awt.Canvas; im...
0
1,680
MyBatis doesn't return all the results from the query
<h1>The Problem</h1> <p>I have a query that returns 17 records. When I use MyBatis with a map that has an <code>&lt;association&gt;</code> it returns 6 records. <em>Note that this doesn't happen with my other maps, I have many other maps with associations that all work fine.</em></p> <p><strong>Query:</strong></p> ...
0
1,233
How to gray out HTML form inputs?
<p>What is the best way to gray out text inputs on an HTML form? I need the inputs to be grayed out when a user checks a check box. Do I have to use JavaScript for this (not very familiar with JavaScript) or can I use PHP (which I am more familiar with)?</p> <p><strong>EDIT:</strong></p> <p>After some reading I hav...
0
1,323
The 'compilation' argument must be an instance of Compilation
<p>Been getting this error when running 'ng build' on my Angular 12.0.2 project</p> <pre><code>./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): TypeError: The 'compilation' argument must be an instance of Compilation at getCompilationHooks (D:\Dev\Git_Merc\mer...
0
11,225
Crash : terminate called after throwing an instance of 'std::system_error' what(): Resource deadlock avoided
<p>I have a simple client /server application the code of which is mentioned below. Please run the server in one shell and the client in another shell in linux. First start the server and then the client. When the server is done with it's work, it crashes with following exception:</p> <p><em>terminate called after t...
0
3,347
Creating a custom Jasypt PropertySource in Springboot
<p>I'm using Spring Boot to create a simple web application which accesses a database. I'm taking advantage of the autoconfiguration functionality for the DataSource by setting up <code>spring.datasource.*</code> properties in <code>application.properties</code>. That all works brilliantly and was very quick - great wo...
0
2,082
How to forcefully set IE's Compatibility Mode off from the server-side?
<p>In a domain-controlled environment I'm finding that the compatibility mode is triggered on certain clients (winXP/Win7, IE8/IE9) even when we are providing a X-UA tags, a !DOCTYPE definition and "IE=Edge" response headers. These clients have the "display intranet sites in compatibility view" checkbox ticked. Which i...
0
1,038
Java - IndexOutOfBoundsException: Index: 1, Size: 0
<pre><code>public static boolean play123(ArrayList&lt;Card&gt;list){ boolean win=false; int round=1; for(int i = 0;i&lt;=list.size();i++){ Deck.handOutNextCard(list); if(list.get(i)==Card.AceClub ||list.get(i)== Card.AceDiamond ||list.get(i)== Card.AceHeart ||list.get(i)== Card.AceSpade...
0
1,025
Conversion failed when converting datetime from character string
<p>I am developing a C# VS 2008 / SQL Server 2005 Express website application. I have tried some of the fixes for this problem but my call stack differs from others. And these fixes did not fix my problem. What steps can I take to troubleshoot this?</p> <p>Here is my error:</p> <pre><code>System.Data.SqlClient.Sql...
0
1,563
how to get row values when checkbox is checked in gridview
<p>before I asked this I did some checking around to make sure that this doesn't turn out to be a duplicate and ways to get the row values from a row that has a checkbox in its template field...but I can't seem to get it working...So far I have tried</p> <pre><code>protected void Page_Load(object sender, EventArgs e) ...
0
1,163
NgIf not updating when variable changes
<p>Right, so i have a header component (navbar) which contains the following template:</p> <pre><code>&lt;ng-template [ngIf] = "authService.isAuthenticated()"&gt; &lt;li&gt; &lt;a routerLink="Landing" class="navbar-brand" (click)="Logout()"&gt;&lt;span class="xvrfont"&gt;Logout&lt;/span&gt;&lt;i class="fa fa-sig...
0
1,556
Login form and Registration form without using database
<p>My Instructor gave me and my classmates some three activities and of those activities is to make a simple login form with a registration form without using database (well its obvious that we need to do this activity before proceeding with database).....</p> <p>Here is the codes: Form1:</p> <pre><code> public pa...
0
1,676
Why do I get an InstantiationException if I try to start a service?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/5027147/android-runtimeexception-unable-to-instantiate-the-service">Android RuntimeException: Unable to instantiate the service</a> </p> </blockquote> <p>I have been trying to fix the following problem all day ...
0
2,864
Which permissions are required for Flashlight?
<p>I've used <code>&lt;uses-permission android:name="android.permission.FLASHLIGHT" /&gt;</code> but my app keeps crashing. I'm making a Torch app. Here's my Manifest code:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="c...
0
1,269
java.util.zip.ZipException: error in opening zip file
<p>i am geting this strange exception below:</p> <pre><code>INFO: Deploying web application archive ZangV3Spring.war 10-Sep-2010 08:46:38 org.apache.catalina.startup.ContextConfig init SEVERE: Exception fixing docBase for context [/ZangV3Spring] java.util.zip.ZipException: error in opening zip file at java.util.z...
0
2,794
Angularjs simple datepicker using controller as not $scope
<p>I am trying to use the angular-ui bootstrap for dateranges.</p> <p><a href="http://angular-ui.github.io/bootstrap/#/datepicker" rel="nofollow">http://angular-ui.github.io/bootstrap/#/datepicker</a> </p> <p>The link contains some good examples. However I want to use <code>controller as</code> syntax and not the sc...
0
1,242
How to fix 'getter "documents" was called on null.' in flutter
<p>I am using flutter and firebase to create a mobile app. I have 2 collections on my firestore and i wanna read all documents in a the collection "posts". However, when I do that, an error saying the getter "documents" was called on null.</p> <pre><code> Widget getContent(BuildContext context) { return Strea...
0
1,390
LDAP Authentication using Java
<p>I need to do LDAP Authentication for an application.</p> <p>I tried the following program:</p> <pre><code>import java.util.Hashtable; import javax.naming.Context; import javax.naming.NamingException; import javax.naming.ldap.InitialLdapContext; import javax.naming.ldap.LdapContext; public class LdapCo...
0
1,878
Spring Boot: java.sql.SQLException: Access denied for user
<p>While trying to connect to MySQL database using Spring Boot, I am getting the following stacktrace:</p> <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpa...
0
5,423
TypeError: Dimension value must be integer or None or have an __index__ method, got TensorShape([None, 1])
<p>I am trying to convert a bot tutorial I found that uses tflearn to use keras. Right now the output should be data for the models prediction. However, I get the error:</p> <p>TypeError: Dimension value must be integer or None or have an __index__ method, got TensorShape([None, 1])</p> <p>my code:</p> <pre><code>wi...
0
1,313
2-column TableLayout with 50% exactly for each column
<p>This one puzzles me since my first steps with Android. I can't make both columns in a 2-column TableLayout exact 50% each.</p> <p>Here's an example:</p> <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="fill_p...
0
1,684
Vuejs nested slots: how to pass slot to grandchild
<p>I use different vuetify components, for example <a href="https://vuetifyjs.com/en/components/menus" rel="noreferrer">v-menu</a>. It has a template like this:</p> <pre><code>&lt;v-menu&gt; &lt;a slot="activator"&gt;menu&lt;/a&gt; &lt;v-list&gt; &lt;v-list-tile&gt;Menu Entry 1&lt;/v-list-tile&gt; &lt;v-li...
0
1,198
Laravel & Docker: The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied
<p>This is my folder structure:</p> <pre><code>+-- root-app-dir | +-- docker | | +-- Dockerfile | | +-- nginx.conf | +-- src // this is where the Laravel app lives | +-- docker-compose.yml </code></pre> <p>This is my <code>docker-compose.yml</code></p> <pre><code>version: '2' services: app: buil...
0
1,061
How to support ES7 in ESLint
<p>I have a project setup with WebPack to use ESLint and I'm wanting to use ES7 for the inline bind operator <code>::</code>. Currently I'm getting the parse errors shown below</p> <pre><code>/Users/ryanvice/Documents/Code/pluralsight-redux-starter/src/components/project/ProjectsPage.js (1/0) ✖ 7:27 Parsing error:...
0
1,263
Dynamically resizing a container containing a Handsontable
<p>This is the HTML I got:</p> <pre><code>&lt;div class="preview-content"&gt; &lt;h1 class="preview-content-header"&gt;Vorschau - Notiz1.txt &lt;img src="icons/cross.png" /&gt;&lt;/h2&gt; &lt;div&gt; &lt;h2&gt;Notiz1.txt&lt;/h2&gt; &lt;p&gt;Lorem ipsum dolor sit amet, consetetur sadipscing elitr, s...
0
2,165
Google Maps API Multiple Markers with Infowindows
<p>I am trying to add multiple markers each with its own infowindow that comes up when clicked on. I am having trouble with getting the infowindows coming up, when I try it either shows up only one marker without an infowindow. </p> <p>Thanks, let me know if you need some more information</p> <pre><code>&lt;meta name...
0
1,026
SQL returns less results when using UNION?
<p>I have a SQL Server stored procedure that doesn't give me all the results when I add in the union and the second half. The first half will give me all 6 results, using the union, I only get 5. </p> <p>There are 3 patients with their own [chart number], each have 2 items that should be displayed. if the [CPTCode] i...
0
1,396
W/IInputConnectionWrapper(1066): showStatusIcon on inactive InputConnection
<p>Here is my class:</p> <pre><code>public class Insert extends Activity { EditText name,surname,age; Button insert; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.insert); StrictMode.ThreadPoli...
0
1,185
MS SQL Server and JDBC: closed connection
<p>Im getting </p> <blockquote> <p><strong>I/O Error: DB server closed connection.</strong></p> </blockquote> <p>while connecting to MS SQL server 2008 from java code .</p> <hr> <p>SQL server is in mixed mode and its in local machine.My connection string is <strong>jTDS</strong> </p> <blockquote> <p><strong>jd...
0
1,498
Android: Java code output "NaN"
<p>So here I have this first time app I'm working on. When I run this code in the emulator for some reason I get a "NaN" output. The program essentially is meant to find the lowest price out of several choices (of quantity and price combined). I can't figure out what I'm doing wrong. Any advice?</p> <p>(Note: The NaN ...
0
1,959
Chrome driver exception NoSuchMethodError
<p>I am trying to write test case, using ChromeDriver but while trying to initialise ChromeDriver instance getting exception as, </p> <pre><code>java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V at org.openqa.sel...
0
1,111
Adding space between columns of a TableLayout
<p>I have a TableLayout where I add dynamically TableRows. In each TableRow, I add a Button.</p> <p>I just would like to add some space between my columns (which are my buttons) but I can't figure out how... I've tried to change all the possible margins but it doesn't work :( So maybe I made a mistake in my code where...
0
1,297
Change Matplotlib's default font
<p>I'm trying to change matplotlib's default font to Helvetica Neue. On my Mac with EPD/Canopy everything worked fine some time ago. </p> <p>Trying to do the same on ubuntu now and it's not working. </p> <p>This is what I did:</p> <ol> <li><p>Installed Helvetica Neue </p> <pre><code>$ fc-match 'Helvetica Neue':Ligh...
0
1,026
Height of ListView fills the whole screen, although set as wrap_content
<p>i have this ListView inside a LinearLayout:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" &gt; &lt;TextVie...
0
1,867
ubuntu - mysql start and restart issue on ubuntu 16.04 server
<p>i installed mysql 5.7 but then found out I need mysql 5.6 so i deleted all mysql related packages with </p> <pre><code>apt-get remove --purge mysql* </code></pre> <p>so it gotten removed. then i issued:</p> <pre><code>apt-get install mysql-server-5.6 mysql-client-5.6 </code></pre> <p>so the mentioned packages go...
0
1,719
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory()
<p>I am using IntelliJ and am able to build and run my Gradle project via the GUI by pressing the play button, and yet running this command from the terminal </p> <pre><code>./gradlew --stacktrace deploy </code></pre> <p>produces this console output, and the build fails:</p> <pre><code>FAILURE: Build failed with an ...
0
4,230
Including .NET installer in WiX Bundle not detecting if already installed
<p>I'm on WiX 3.7, and I can't get the simple &lt;PackageGroupRef Id="NetFx40Web"/> bundle element to work, as it doesn't bring across the Net FX installer package, or embed it in the setup.exe. I've resorted to creating my own package for this in my <code>Bundle.wxs</code> file, but I am still having trouble. It seems...
0
2,800
Data source rejected establishment of connection, message from server: "Too many connections"
<p>I am trying to make connections to my database using connection pooling library: <a href="http://www.snaq.net/java/DBPool/" rel="noreferrer">DBPool</a>. Here's my source code. <br></p> <h3>DBUtils.java</h3> <pre><code>package DB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLExcept...
0
3,874
Chooser with camera intent and image picker intent
<p>I have created a chooser for either picking an image from file or for making a picture.</p> <p>The code I use works fine on a Nexus 5, however when I try it on a Samsung S5, the chooser does not display the camera icons.</p> <pre><code>public Intent makePhotoIntent(String title, Context ctx, String uniqueImageId){...
0
1,393
What exactly is join() in Boost::thread? (C++)
<p>In Java, I would do something like:</p> <pre><code>Thread t = new MyThread(); t.start(); </code></pre> <p>I start thread by calling start() method. So later I can do something like:</p> <pre><code>for (int i = 0; i &lt; limit; ++i) { Thread t = new MyThread(); t.start(); } </code></pre> <p>To create a gr...
0
1,043
Angularjs: transclude directive template
<p>How to use transclusion in the below case. The intention is to use markup in the html (partials) file, than defining it in template (within the directive).</p> <p>I found a great tree directive here. (<a href="https://groups.google.com/forum/#!msg/angular/vswXTes_FtM/kfT_CufjLjgJ">source</a>) Original: <a href="htt...
0
1,053
undefined reference with shared library using cmake
<p>I have looked a lot of placed to find this answer, but I have not been able to find anything that pertains to my situation. It seems so easy, which is why this is so frustrating.</p> <p>I am building a project with CMAKE. I am generating two shared libraries. One includes the other. I am also generating an exec...
0
2,472
android imageButton onClick method not calling
<p>EDIT: Posting full code (except XML as it a bunch of ridiculous table formatting!) Please ignore the code that doesn't pertain to my question! I am just getting functionality right now. I'll clean it up later.</p> <p>First app and first question. I've researched here a while and usually find my answer but I have a b...
0
1,462
ASP.NET with OpenIdAuthentication: redirect to url if not authorized
<p>I am attempting to write an ASP.NET application that uses a hybrid authentication scheme. A user can either have his username and password hash stored in the UserStore, or he can authenticate via Azure Active Directory.</p> <p>I have created the login form pictured. It has the standard <code>UserName</code> and <co...
0
1,119
ASP.NET MVC4 FormCollection.GetValues not returning correct values
<p>I'm building a mobile webiste using ASP.NET MVC4. One of the pages in my solution contains a table where all the rows in the table can be edited and saved in one batch. To do this I am using FormCollection in the Action in the Controller. This works as expected for most of the fields, exept one: item.IsPercent. This...
0
1,671
Failed to marshal EJB parameters --- IllegalArgumentException: Can not set org.apache.commons.collections.FastHashMap field
<p>I'm getting the below error while trying to save a search results using the Remote interface for <code>SearchFacade.java</code></p> <pre><code>"Failed to marshal EJB parameters" </code></pre> <blockquote> <p>Can not set org.apache.commons.collections.FastHashMap field org.apache.commons.validator.Field.hMsgs t...
0
3,605
How to download the files in magento
<p>I uploaded some files for each customer in magento....</p> <p>Then i listed the customers details with the uploaded file name ..</p> <p>I need to download the file using magento code </p> <p>This is the code:</p> <pre><code>public function downloadAction() { $entityid = $this-&gt;getRequest()-&gt;getPara...
0
1,189
MySQL Server shuts down frequently and won't start again now
<p><strong>OS:</strong> Ubuntu 16.04.1 LTS xenial</p> <p>I installed MySQL on my server on AWS and it was working fine, but after we started getting much traffic on-site, it started failing frequently. To fix it, I usually restart the service or server which works but for only a few minutes/hours and then it fails aga...
0
1,225
How do I create and sign certificates with Python's pyOpenSSL?
<p>I would like to use python to create a CA certificate, and client certificates that I sign with it. I will be using these with OpenVPN. After several days of research, and trial and error, this is what I've come up with:</p> <pre><code>#!/usr/bin/env python import os import sys import random from OpenSSL import cr...
0
1,184
Flutter - Trouble launching app for debug on macOS
<p>I've recently tried to migrate code from <code>main.dart</code> to the beginning of <code>home_page.dart</code> so as to steam line my application. Since doing this, my app now won't compile, I suspect as it doesn't know where to launch the application.</p> <p>This is the error I'm receiving, <code>Set the 'program...
0
8,055
Simple tutorial example (lambda expression) doesn't run
<p>Finally decided to start a bit of experimentation on the new features of jdk8, namely the <a href="http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html" rel="nofollow">lambda expressions following the tutorial</a>. For convenience, I stripped-down the example, see SSCCE below. </p> <p>Typing ou...
0
1,108
MatPlotLib, datetimes, and TypeError: ufunc 'isfinite' not supported for the input types…
<p>Here is a tiny piece of code that produces a filled in region between two lines of a graph:</p> <pre><code>import matplotlib.pyplot as plt import numpy as np x = np.arange(0.0, 2, 0.01) y1 = np.sin(2 * np.pi * x) y2 = 1.2 * np.sin(4 * np.pi * x) fig, ax1 = plt.subplots(1, 1, sharex=True) # Test support for maske...
0
1,333
Hibernate Exception - could not resolve property:
<p>I am trying to retrieve an object and its children. The request comes up with an exception.</p> <p>Models - The staff class is a self reference class where the checker with a checker_id is also a staff. And also both the staff and checker has a one to many relationship with the module model.</p> <pre><code> publ...
0
3,201
free() invalid pointer
<p>I'm getting the familiar free(): invalid pointer error. In trying to debug, I ended up commenting out each free() in my code, one by one, <em>until there were none left</em> and I'm still getting this runtime error. Has anyone else run into a similar issue?</p> <p>By the way - it's difficult for me to debug this us...
0
1,650
Unable to npm install Angular-cli after proxy configuration
<p>I am trying to download Angular in Windows 10 using npm install. As I am on corporate proxy, I configured the proxy to username:password@server:port</p> <p>However, I am facing this issue when running</p> <p><code>npm ERR! code E407 npm ERR! 407 Proxy Authorization Required: @angular/cli@latest</code></p> <p>The ...
0
1,143