title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Missing column name during ActiveAdmin query
<p>Rails 3.1, Ruby 1.9.2, using a SQL Server 2008 database through the activerecord-sqlserver-adapter gem. I'm working with a legacy database, so this was not voluntary. </p> <p>I'm running into an odd problem with ActiveAdmin. I've not used ActiveAdmin before, and added it after watching a Railscast. Followed the...
2
1,202
Dependency Error jekyll-figure
<p>When I run bundle exec jekyll serve I get following error message</p> <pre><code>Dependency Error: Yikes! It looks like you don't have jekyll-figure or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot loa...
2
1,951
Compiler Additional Options computed in a custom Target
<p>I have a msbuild custom Target and a Task computing a Value. The Task will output the Value as Property. This Property I would like to uses as Additional Option to the Compiler call.</p> <p>But the Property is empty when used as Additional Option.</p> <p>My <strong>*.targets</strong> File looks like this:</p> <p...
2
1,222
Selecting a TableViewCell provides nil for indexPathForSelectedRow()?.row in Swift
<p>I have been trying to integrate a Pinboard bookmarks view (by parsing an RSS Feed and displaying it in a TableView) in my browser app, and I'm encountering a few issues, the main one is that selecting a cell always returns nil and causes a crash.</p> <p>I followed <a href="http://rshankar.com/blogreader-app-in-swif...
2
1,526
ValueError: {''message': 'The method eth_sendTransaction does not exist/is not available'}
<p>I found an error: <br/> <br/> ValueError: {'code': -32601, 'message': 'The method eth_sendTransaction does not exist/is not available'}</p> <p>while I'm deploying a solidity smart contract in infura.io (ropsten test network). But when I tried on ganache, the contract deployed successfully on ganache testRPC. This ...
2
1,212
Keras - Predict on model after learning sentiment data throws errors
<p>My problem is in getting results through predict method in keras using tensorflow backend. But first a small introduction.</p> <p>I am using </p> <ul> <li>Python 2.7.12</li> <li>Keras==1.2.1</li> <li>numpy==1.12.0</li> <li>tensorflow==0.12.1</li> </ul> <p>I created a convolutional neural network like in these doc...
2
1,248
Multiple Loops in WordPress. Second loop not resetting
<p>I've created a custom post type with custom fields inside Wordpress. I created a new page template that runs through a loop and that works great. I'm trying to add a similar loop to the home page's sidebar but it doesn't work correctly.</p> <p>First, the working code on my own page template.</p> <pre><code>&lt;h...
2
2,000
When exactly does the OnItemUpdated event fire specifically in a FormView in ASP.NET?
<p>I can't for the life of me figure out when OnItemUpdated gets fired. I've been messing around in ASP.NET trying to learn it, so some of the things you see in this code might be purposely done the hard way (so I can better understand whats going on behind the scenes)</p> <p>Basically, I have a GridView that is the m...
2
2,047
Optimizing Pyspark Performance to Match Pandas / Dask?
<p>I have weekly timeseries data and am trying to use Pyspark SQL to calculate, for several columns, the weekly sum of the trailing 8 weeks. I have tried using Pyspark window functions; specifically: </p> <pre><code>sum(df[valueCol]).over(partitionBy(df[idCol]).orderBy(df[timeCol]).rangeBetween(-7, 0)) </code></pre>...
2
5,069
Timeout in Firebase Functions
<p>I am testing a set of Cloud Functions locally and have emulators for Database, Firestore, Hosting, PubSub and Functions setup as required. I am trying to do the following:</p> <ol> <li>In the <code>functions/index.js</code> file, I am importing modules that are used as HTTP trigger for different endpoints.</li> <li...
2
1,315
Converting canvas to image does not include images on the canvas
<p>I want to convert a canvas to a png image and put it on a page. My problem is that if I have an image on my canvas, it does not get converted. This is my HTML:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;meta charset='UTF-8'&gt; &lt;link rel="stylesheet" type="text/css" href="./assets/css/gene...
2
1,687
how do you chart multiple variables as line chart using highcharts
<p>I need to put multiple variables as a line chart to highcharts. Since the number of variables are very high, I need to be able to grab the data and chart it dynamically. </p> <p>I have multiple of servers that I need to put the cpu utilization of all of the servers in one chart with different lines. My Data would l...
2
1,405
How do I find what persistence.xml is active
<p>I have inherited a maven based project that was created with Netbeans 7.4. I have configured a local Glassfish 3.1.2.2 in the servers tab, set up JDBC connection pools and resources and can debug the project correctly. However, I created 2 more tables in one of the connected databases, and let Netbeans generate 2 ne...
2
2,221
How do I send Excel data (multiple individual ranges) seperated by carriage returns to an Outlook mail body
<p>I'm trying to send certain sections of an excel file into an Outlook mail body.</p> <p>I need the formatting of the data, as I am working with data inside tables and with different cell fill colours and font colours, so it can't be stored in a string AFAIK.</p> <p>I need carriage returns to separate the tables bei...
2
1,526
How can I join multiple tables with same primary key to one table with one row per key?
<h2 id="what-i-have">What I have</h2> <p>I have multiple tables with a primary key <code>key</code> and a value. Each key might be present in all tables or only in a subset of tables.</p> <p>Here are example tables:</p> <p>Tab1:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-al...
2
1,709
How to encrypt plain text to md5 / sha1 in django?
<p>i want to create an application that admin can make user with a new messages that encrypted into database. I have the core function and all can work properly. But, i still can't encrypt the message from text to md5/sha1. I have read and try <a href="https://stackoverflow.com/questions/4012616/python-md5-password-val...
2
1,975
Using FnMut() closures in a static function
<p><strong>Background:</strong> I'm trying to avoid the use of <code>Mutex</code>/<code>RefCell</code>/<code>Option</code> dance in an interrupt handler for an embedded system. I do not want to use the heap (and I don't think it should be necessary -- but feel free to show me wrong). I can't use <code>std</code>. I've ...
2
1,864
Facebook JS SDK does not set cookie
<p>I'm trying to implement Facebook authentication in our web app, with server side processing of the Facebook cookie. We use the JavaScript SDK to perform our login and set the cookie.</p> <p>Somehow, however, the Facebook SDK does not appear to set our fbsr_APPID cookie (or any cookie whatsoever). This is the Coffee...
2
1,161
SOAP: PHP WebService and .Net
<p>I have to connect with PHP WebService via SOAP from a .Net (C#, WPF) application. I added reference to this service, some proxies were generated.</p> <p>When I invoked some function:</p> <pre><code>var client = new someAPIPortTypeClient(); XmlNode[] response = client.status(arg1, arg2); </code></pre> <p>I got...
2
1,812
Modifying a DataTable
<h2>Situation:</h2> <p>Hello! I am trying to populate a WPF toolkit DataGrid with a MS Access database.</p> <p>Here is what I have right now (it works):</p> <pre><code>//Load the datagrid with the database private void LoadDataGrid(string filename, string path) { string databaseConn = "Provider=Micro...
2
1,029
got Error on start "unsupported address family"
<p>Than you for reading this</p> <p>when I run from source, I got "unsupported address family" Error, because method "_get_wildcard_address" returned a value of "::"</p> <p>in tensorboard source code, I modified program.py, print some vars</p> <p>program.py</p> <pre><code> def _get_wildcard_address(self, port):...
2
1,452
Apply Prestashop Cart to custom Hook
<p>First let me explain myself. I'm new to Prestashop Development, I've a background using Wordpress. The thing is, I'm trying to hook 'blockcart.php' to my custom hook 'HOOK_SHOPPINGBAG'. I have tried a lot and after a couple of hours I have decided to just ask the question here. </p> <p>First I have created the Hook...
2
1,148
How to add Bootstrap 4 JS to use Modal with VueJS
<p>I installed in my project bootstrap-vue from <a href="https://bootstrap-vue.js.org" rel="nofollow noreferrer">https://bootstrap-vue.js.org</a> , because I use VueJS in the project. I'm new to vuejs so I don't know to much so far. I tried to add a bootstrap modal but didn't work. I knew that the bootstrap js is mi...
2
1,275
PyODBC SQL type error when reading query in Pandas
<p>Looking for some help with a specific error when I write out from a <code>pyodbc</code> connection. How do I fix the error:</p> <blockquote> <p>ODBC SQL type -360 is not yet supported. column-index=1 type=-360', 'HY106' error from PYODBC</p> </blockquote> <p>Here is my code:</p> <pre><code>import pyodbc import ...
2
2,430
Breeze/Angular: TypeError: Converting circular structure to JSON
<p>First off, I'm new to breeze/angular...after reading some blogs and watching some pluralsight videos, I (like everybody else I guess) was so excited, but after a few weeks of trying, I started hating it because I'm running from one problem to the other. Is this technology still too early to learn and use? </p> <p>H...
2
1,759
Invalid conversion from 'char*' to 'char [-fpermissive]
<p>I'm new to C..so, please bear with me.. I want to call function printReceipt(char, char, char) in function calculatePrice(char), but it said that there's an error for invalid conversion from char to char at the function call for printReceipt. Can anyone please help me?</p> <pre><code>double calculatePrice(char cust...
2
1,317
Custom React Component Library not loading CSS when installed as dependency in another react project
<p>I am trying to create a custom react component library using rollup, css-modules and tailwind css. The problem is when I try to install it into another react project the css from the style sheet is not loaded.</p> <p>Folder structure is as below</p> <pre><code>src ┣ SimpleAlert ┃ ┣ SimpleAlert.js ┃ ┣ SimpleAlert....
2
4,717
android get radio stream data
<p>I am trying to get what song is on with this code:</p> <pre><code>import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; public...
2
2,183
RuntimeValueProviderError when creating a google cloud dataflow template with Apache Beam python
<p>I can't stage a cloud dataflow template with python 3.7. It fails on the one parametrized argument with <code>apache_beam.error.RuntimeValueProviderError: RuntimeValueProvider(option: input, type: str, default_value: 'gs://dataflow-samples/shakespeare/kinglear.txt') not accessible</code> </p> <p>Staging the templat...
2
1,876
Icon not showing up in PopupMenuButton in Flutter
<p>I'm trying to create a PopupMenu in Flutter that comes down below the icon. However, the icon is not showing up. I am using the code suggested in this issue: <a href="https://stackoverflow.com/questions/54712976/is-it-possible-to-use-a-dropdownbutton-within-an-iconbutton-in-flutter">Is it possible to use a DropDownB...
2
2,380
How to avoid OOM to load large images from android resource
<p>I have developed 20+ android apps, apps have a tutorial activity that are composed of large image slide (ex; 4 images in the size of 750 x 1334) and would be shown to users at the first launch.</p> <p>I cannot reduce the sizes anymore, because of image quality.</p> <p>My code snippet is following;</p> <pre><code>...
2
1,066
How can I show my last 3 posts with Django Python
<p>I try to show my last 3 posts with Django but my three posts doesn't appear on my page. There is my code. I have no error or anything when I load the page and my other posts apper on my page. And please be kind it's the first time I use Python and Django =)</p> <h2>models.py</h2> <pre><code>from django.db import m...
2
1,507
How to properly create pagination with knockout.js component?
<p>I'm working on building a component for a current and future projects that handles pagination on a knockout component level. I've based the idea on the accepted answer from <a href="https://stackoverflow.com/a/17670390/7314155">here</a>. Also reference the Knockout component page <a href="http://knockoutjs.com/docu...
2
1,430
Razor Pages models return null for model properties that are classes
<p>In my Razor project I have two classes as follows:</p> <pre><code>namespace reftest.Models { public class Details { public int Id { get; set; } public int Age { get; set; } public int IQ { get; set; } } public class Person { public int Id { get; set; } pu...
2
1,326
comparing two contours using matchshapes
<p>I am trying to compare two contours using matchshapes() function in opencv.<br> These are the two images I am trying to compare.<br> <img src="https://i.stack.imgur.com/QWSEm.jpg" alt="http://s4.postimg.org/aiahof9v1/image.jpg"> <img src="https://i.stack.imgur.com/pGUdM.jpg" alt="http://s11.postimg.org/za2euph43/ima...
2
2,035
Target native dom element <input>...</input> with styled-components
<p>I am having trouble getting my styled component to make a change to an <code>&lt;input /&gt;</code> wrapped in a React component. In Dev Tools I can see the style I am trying to override here: </p> <pre><code>.ui.input input {...} </code></pre> <p>I think the wrapping component needs to pass <code>className</code>...
2
1,141
Why does pip (using --find-links) still collect some dependencies from the internet despite a wheel existing for it in multi-stage docker build?
<p>I have a multi-stage Dockerfile where I build wheels for my project's dependencies in a <code>python</code> image, then copy the wheels over to an alpine image and do a <code>pip install -r ./wheels/requirements.txt --find-links ./wheels</code>. </p> <p>It seems to install from most wheels, except certain deps lik...
2
1,198
React Native application; Error starting packager: Error: EPERM: operation not permitted
<p>WINDOWS 10 I've been trying to find the solution for this all day and haven't found a suitable answer. I am attempting to create a react native project. Earlier today, I was able to get past the point of creating the app, and then I got stuck trying to sync up my android device using Expo. While tinkering with my ne...
2
1,782
REPLACE INTO with SELECT condition
<p>I have table: </p> <pre><code>mysql&gt; desc dialog; +-----------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------+------------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI ...
2
1,754
@Html.Action and Controllers with same name
<p>While creating a Plugin for a MVC site, I'm facing an issue about controller resolution.</p> <p>Here are all the routes that concern the current context :</p> <pre><code>routes.MapRoute("Route1", "Admin/Product/{action}/{id}", new { controller = "Product", action = "Index", area = "Admin", id = UrlParamete...
2
2,127
Syntax error, unexpected '{' when using the Facebook PHP-SDK
<p>I'm trying to get my team's Flash project on Facebook, but I cannot get any of the PHP-SDK examples to work. I've followed several examples, such as this new one on github (<a href="https://github.com/facebook/php-sdk/blob/master/examples/example.php" rel="nofollow">here</a>). However, I keep getting a parse error...
2
1,712
Creating an array is giving me java.lang.ArrayIndexOutOfBoundsException
<p>I'm new to java, and I'm currently programming a pacman as a class project. The game is played on an array[8][8]; I've got to read a .txt file that includes walls, ghosts and their position in the array, and show them there. I've used Scanner, StringTokenizer and nextInt. When I compile the file, it doesn't give any...
2
1,231
Forming a Multi input LSTM in Keras
<p>I am trying to predict neutron widths from resonance energies, using a Neural Network (I'm quite new to Keras/NNs in general so apologies in advance).</p> <p>There is said to be a link between resonance energies and neutron widths, and the similiarities between energy increasing monotonically this can be modelled s...
2
1,433
HAL_Delay() crashes STM
<p>I'm trying to upload code to an STM32F103RET6 MCU and have a simple setup by now (see image below). I have attached a LED to pin PA1 as a GPIO OUTPUT and an external oscillator at 16 MHz. The other three pins are connected to the JTAG connector that goes to the STLINK v2. <a href="https://i.stack.imgur.com/ld9IK.png...
2
1,606
How can I render interactive plots into static html to be sent and rendered in an email
<p>When I use interactive charts from <a href="https://plot.ly/r/" rel="nofollow noreferrer">plotly</a> or tables from <a href="https://rstudio.github.io/DT/" rel="nofollow noreferrer">datatables</a> and I use <a href="http://rmarkdown.rstudio.com/" rel="nofollow noreferrer">rmarkdown</a> <code>rmarkdown:::render</code...
2
1,624
Rendering smallest possible image size with MVC3 vs Webforms Library
<p>I am in the process of moving a webforms app to MVC3. Ironically enough, everything is cool beans except one thing - images are served from a handler, specifically the <a href="http://aspnet.codeplex.com/releases/view/16449" rel="nofollow">Microsoft Generated Image Handler</a>. It works really well - on average a ...
2
1,394
RestSharp How to deal with different JSON response formats for same query
<p>I've been fighting with this for a while and I think is time to ask for some help.</p> <p>I'm using <strong>RestSharp</strong> to connect to my local <strong>PHP REST API</strong>. The format I'm returning the api results is as follows (JSON):</p> <pre><code>{ "estado": "login_correcto", "content": { "id": 1, ...
2
1,150
iOnic app - use $http.delete to delete object from local JSON file
<p>I'm trying to build my first hybrid-app by using iOnic. iOnic makes use of AngularJS. But both are totally new for me :)</p> <p>So far I'm pretty happy with the results I made because I can find a lot of stuff if I'm stuck, but now I'm lost.</p> <p>I'm trying to delete a favorite object I have saved in a local JSO...
2
1,459
Flutter error: The getter 'length' was called on null
<p>So, Heres the code of my student list..I am using sqlflite database to store student collection.. but when i run this.. this shows error in my futurebuilder method . I am getting my error in the snapshot.data.lenght line where the error shows that length should not be null thats why i tried some conditions but still...
2
3,451
Showing loading indicator only on initial load in graphql Query
<p>I have graphql Query as follows:</p> <pre><code>&lt;Query query={GET_COMPANY_ADDRESSES} variables={{companyId: session.company.id}} notifyOnNetworkStatusChange={true} fetchPolicy={'cache-and-network'}&gt; {({loading, error, refetch, data}) =&gt; { if (loading) return &lt;LoadingIndicator/&gt;; i...
2
1,081
PayloadTooLargeError: request entity too large when upload image
<p>I am trying to upload/and save an image in base64 format to my mongo database. If I use a very very small image it works, but I try to use an image of 161 kb, I have this error:</p> <blockquote> <p>PayloadTooLargeError: request entity too large </p> </blockquote> <p>So I try to convert my image with Json but I ...
2
1,740
Sequelize - How to pull records with 1 associated record and order by associated record attribute
<p>I have a Convos table, which has many Messages.</p> <p>What I want: pull all convos and last message. Order the convos by <code>last_message.created_at</code></p> <pre><code>models.Convos.findAll({ include: [ { model: models.Messages, as: "last_message", order: [ [ '...
2
2,882
OpenLayers 3 dynamic styling
<p>I need to be able to style features on a map after they have rendered per the users selection.</p> <p>Currently I am adding styles like this...</p> <pre><code>style: function (feature, resolution) { var text = resolution * 100000 &lt; 10 ? response.text : ''; ...
2
1,475
How to calculate how many days between "check-in date" and "check-out date"?
<p>I'm trying to figure out how to calculate the amount of days between the user's input of the check-in date and the check-out date. I need to take that number and multiple it by the room choice they selected to get the grand total cost for their stay and display it somewhere on the screen.</p> <p>I'm not entirely su...
2
2,723
Botan AES-256, 32 bit InitialVector
<p>I currently have some code that works correctly with the LibTomCrypt libraries, but not with Botan (I am trying to convert it over to Botan).</p> <p>My (working) LibTomCrypt code:</p> <pre><code> // read the initial vector unsigned char iv[0x20]; fseek(inputFile, 0x20, SEEK_SET); fread(iv, 0x20, 1, ...
2
1,136
Bokeh heatmap usage
<p>I have an array of certain events with time stamp and want to create a heatmap:</p> <ul> <li>x axis should represent the date, f.e. '2016-02-03',</li> <li>y axis should represent the hour of occurrence, f.e. 13 (if 13:32),</li> <li>the color should depend on the count of occurred event.</li> </ul> <p>My data (as p...
2
3,119
OnClick change JavaScript file
<p>I have an index.html file with two buttons as:</p> <pre><code>&lt;a class="btn btn-primary" href="pages/page1.html" target="_blank"&gt;Load init-a.js file&lt;/a&gt; &lt;a class="btn btn-primary" href="pages/page1.html" target="_blank"&gt;Load init-b.js file&lt;/a&gt; </code></pre> <p>If I click on <strong>button ...
2
2,042
How to empty out Listbox in PySimpleGUI
<p>I am brand new with PySimpleGUI but it's turning out to be really easy as advertised. After just a couple of hours I already have a halfway-working application.</p> <p>I'm using a Listbox to display several rows of items read in from a disk file. When I click my <em>Show Connections</em> button it reads the file and...
2
1,281
Edit Model data using ModelForm: ModelForm validation error
<p>I am working on my first django app. I am building an app that allows the user to rate beer. I want my user to be able to edit an entry they've already created. I take them to a ModelForm, and ask for their entry. When the POST method is called, my data is invalid. Here is my model.py:</p> <pre><code>from django.db...
2
1,233
VS2017 Installation failure; unable to report through Installer or the Microsoft Development Community
<p>I have a Visual Studio 2017 Installer error that I haven't been able to fix using any of the suggestions I have seen before. Additionally I have not been able to report my errors through the appropriate channels.</p> <p><strong>My System</strong></p> <p>Windows 7 Professional SP1, latest Windows Updates. I have VS...
2
2,275
cannot be resolved to a variable error in Eclipse, using enum variable in another class
<p>I am using Eclipse Oxygen and I got this error " Ruka cannot be resolved to a variable "in my program, which is made of three classes and I cannot undersand where is my mistake, this variable "Ruka" is defined as an enum method in another class as </p> <pre><code>" public enum Ruka { LEVA, PRAVA; } ...
2
1,833
How Can I add active class using mouse hover in menu item with jquery?
<p>I used This code but Its only work on click event but I want to set it in hover and click both, hover option just will be for hover and when hover out it will remove that active class.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pr...
2
2,922
Symfony2: how to call templating service in a formHandler?
<p>I'm trying to do a contact form with Symfony 2 (version 2.4.1). My form is without an entity because it doesn't have to store informations in a database (just to send mails). I have a problem to call the templating render (or maybe renderView?) method for the mail template in the form handler class : </p> <pre><cod...
2
1,727
android layouts - using ImageView
<p>I want to create the following layout - <a href="http://postimg.org/image/56e9y0hrj/" rel="nofollow">http://postimg.org/image/56e9y0hrj/</a></p> <p>But when I use the Relative layout and write the following code, I get something like this. <a href="http://postimg.org/image/4gm0r15k1/" rel="nofollow">http://postim...
2
2,146
WPF XAML Animation property path not working
<p>I'm trying to animate the content of a metro styled button. My problem is that the content of the button does not change color. The foreground color does not change.</p> <p>Here's my button's style:</p> <pre><code> &lt;Style x:Key="MetroButtonStyle" TargetType="Button"&gt; &lt;Setter Property="MinWid...
2
3,799
javax.naming.NameNotFoundException: admin.sessionbeans.AdminSessionBeanRemote#admin.sessionbeans.AdminSessionBeanRemote not found
<p>I'm trying to create an enterprise application in the following environment (the one with Java EE, EJB and WAR modules). I'm following <a href="http://netbeans.org/kb/docs/javaee/entappclient.html" rel="nofollow">these</a> instructions (which are not about a web application though, I couldn't locate any article abou...
2
5,811
ValueError: timestamp out of range for platform localtime()/gmtime() function
<p>I have a class assignment to write a python program to download end-of-day data last 25 years the major global stock market indices from Yahoo Finance:</p> <ul> <li>Dow Jones Index (USA)</li> <li>S&amp;P 500 (USA)</li> <li>NASDAQ (USA)</li> <li>DAX (Germany)</li> <li>FTSE (UK)</li> <li>HANGSENG (Hong Kong)</li> <li...
2
2,246
Future get() returns null
<p>I am creating a login dialog that verifies the user name and password are correct when connecting to my msql database. I run the connection code in a background thread which returns a Boolean value indicating success or failure. When I run the code, the call to future <code>get()</code> returns a null value causing ...
2
6,194
c++ calendar program format, display, offset
<p>I am writing a program in c++ that will print a calendar for the entire year. The program will ask the user what year they want to enter so it may determine if it is a leap year. It will then ask the user to ask what day would they want they January 1<sup>st</sup> to start counting from. It should then cout every si...
2
3,224
How to adjust table or content in CSS when printing?
<p>so I have this huge data table and I want to fit them all when I print it in a <code>legal</code> size paper. Right now all I have is the size of the paper but the content does not fit to it</p> <p>Here is my <code>CSS</code> codes:</p> <pre><code>@page { size: legal; } @page :left { margin: 0.5cm; } @page :...
2
2,071
JSON TO CSV Conversion Notice: Array to string conversion in
<p>I am Trying to Convert JSON Data to CSV but it says that <strong>"Notice: Array to string conversion in D:\xampp\htdocs\api.pharmarack.com\Model\ConverterModel.php on line 427"</strong></p> <p><strong>MyJSON:</strong></p> <pre><code>[ { "FirmId": "1", "OrderNo": "RP89", "PartyCode": "70...
2
1,910
Select all body except one element
<p>I'm trying to select all the body's elements in jQuery except "this", or the one being hovered on. I'm trying to get the body to go to a certain opacity, but "this" to maintain its opacity. This is my code:</p> <pre><code>$(".content img").mouseenter(function() { $(this).animate({ opacity: "1", }); ...
2
1,729
Class DatabaseSeeder does not exist... Seeder not working in laravel
<p>I would like to put some data in table so I would like to use DatabaseSeeder but when I try : php artisan db:seed this error occur: </p> <pre><code>ReflectionException : Class DatabaseSeeder does not exist at /home/bruno/projetconcert/vendor/laravel/framework/src/Illuminate/Container/Container.php:767 763| ...
2
1,325
Rails: ERROR EOFError: bad content body while POSTING
<p>I'm getting an following error while trying to <code>POST</code> to an API (locally). The request results in a <code>500</code>; the body says <code>bad content body</code>, and the terminal reads like this</p> <pre><code>[2015-08-20 12:12:38] ERROR EOFError: bad content body /Users/akdemia15/.rvm/gems/ruby...
2
1,948
Android RecyclerView shows multiple items at same position
<p>I am having a number of weird things happen in my RecyclerView class that I believe are all connected. First, here is my implementation:</p> <p><strong>onCreateViewHolder</strong></p> <pre><code>@Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { LayoutInflater inflat...
2
1,341
How to validate contact form required fields and display the error message accordingly
<p>I'm new to PHP. I tried creating a contact form using HTML and PHP. This contact form when submitted will send a mail to receiver.<br> <strong>Below is the code the code for the contact form in HTML :</strong> </p> <pre><code> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org...
2
3,864
Get previous row updated value using LAG Without using Recursive CTE
<p>How to use <strong>LAG</strong> function to get the updated previous row value (without using <strong>Recursive CTE</strong>). Please check the screenshot for sample output</p> <p><a href="https://i.stack.imgur.com/DLreL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DLreL.png" alt="enter image ...
2
1,184
Attempted import error: 'ApiGet' is not exported from './apiFetcher' when compile react-native to react-native-web
<p>I am building react native app and it run successfully on both Android and iOS. I want to convert react-native app to web app. I try followed tutorial: <a href="https://medium.com/@jonnykalambay/your-first-hybrid-app-in-15-minutes-react-native-on-the-web-2cc2646051e" rel="nofollow noreferrer">https://medium.com/@jo...
2
1,955
Java Connection String - Embedding pentaho Report Engine in Java Aplication
<p>I'm having difficulty connecting to a db2 database in my java application. I have found some examples online but have been unable to apply them successfully being new to java. My attempt is below. Basically my program simply extracts data from the database within the datafactory method then produces an html repor...
2
2,228
VS Code - Openfolders and edit files through SSH tunnel
<p>I typically use VS Code's Remote-SSH extension to connect to an AWS instance where I do my work. There's a nice section of their documentation about how to do that <a href="https://code.visualstudio.com/docs/remote/ssh-tutorial" rel="nofollow noreferrer">here</a>. I hate just using the terminal alone because I like ...
2
2,226
MongoDB scans entire index when using $all and $elemMatch
<p>I have a collection of user documents, where each user can have an arbitrary set of properties. Each user is associated to an app document. Here is an example user:</p> <pre><code>{ "appId": "XXXXXXX", "properties": [ { "name": "age", "value": 30 }, { "name": "gender", "value": "female" }, ...
2
1,617
how to parse html file in iphone
<p>i dont know how to work on it guide me on this i have to fetch html file which is im my resource folder example.html in application i don’t know how to parsh this all file in iphone some one help me how can i parse this static html file in iphone please explane some one to me </p> <pre><code>&lt;!DOCTYPE html...
2
15,147
AJAX - select field population with multiple values
<p>I have a form where the user can select ONE specific problem from a list of 100 problems. Once the <code>&lt;Select id="problem"&gt;</code> field is updated, the below MySQL query is launched via AJAX.</p> <pre><code>if(isset($_POST['action']) &amp;&amp; ($_POST['action']=='problem_lookup')) { if(isset($_POST[...
2
1,553
How to use ZMQ when Server on IP other than the client
<p>I learned how to use <strong><code>ZeroMQ</code></strong> on a <code>localhost</code>, but I failed to do it on a remote IP.</p> <p><strong><code>Q1:</code></strong> Do I need a broker?<br>If so,<br><strong><code>Q2:</code></strong> which broker and how to do it.?</p> <hr> <p>Update:</p> <p>OK. I'm using the <co...
2
1,248
How do you make code refresh itself at regular intervals in JavaFX?
<p>I am trying to create a clock program and I am new to javaFX programming, my code reads as follows:</p> <pre><code>package clock; import java.util.Calendar; import javafx.animation.KeyFrame; import javafx.animation.KeyValue; import javafx.animation.Timeline; import javafx.application.Application; import javafx.sce...
2
1,637
Odoo: some modules could not be started
<p>I get the following warning in my browser console from web.assets_common.js. This only occurs when I'm not logged in so it seems like it's trying to load dependencies that shouldn't be loaded. </p> <p>This warning also came out of nowhere as I didn't have it before, but now all of the sudden I do. I'm running Odoo ...
2
2,090
How to improve cmuSphinx's accuracy?
<p>I want to use pocketShpinx to do some speech-to-text word. I have install sphinxbase and pocketSphinx. And download the acoustic model/langauge model/dictionary. Then I test the <a href="http://cmusphinx.sourceforge.net/wiki/tutorialpocketsphinx" rel="nofollow">example code</a> just like follows:</p> <pre><code>#in...
2
2,425
Simple encryption algorithm for homework. not getting decryption working properly
<p>This is a homework question that I can't get my head around at all</p> <p>Its a very simple encryption algorithm. You start with a string of characters as your alphabet:</p> <p><code>ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!, .</code></p> <p>Then ask the user to enter there own string that will act as a <code>map</co...
2
2,304
Qt C++ simple SMTP Client
<p>I'm new to Qt. I found some example of simple SMTP server. It sends my email message, but program crashes after sending.</p> <p>Please, see error message and ouput: </p> <p><a href="https://i.stack.imgur.com/Tt7bT.png" rel="nofollow noreferrer">screenshot</a></p> <p>I'm not allowed to publish photo, please help ...
2
4,127
500 Internal Server error on App deployment to live server
<p>My ASP.Net web app has a simple ajax file upload on one of the pages which works fine on my local host machine when testing, however when I publish this to a website I get a 500 Internal Server error. Below is the output on the console on Google chrome:</p> <pre><code>POST http://switchclothing.andrewmwest.co.uk/St...
2
3,720
Using PreloadJS and SoundJS in React app to preload sounds
<p>I’m trying to use PreloadJS and SoundJS in a React app to preload all sounds and then play from the preloaded cache.</p> <p>I can't figure out how to create the LoadQueue and load the sounds in one component (top level: <code>App.jsx</code> ), and play them in a different component (child of <code>App.jsx</code>: <...
2
1,156
Laravel route method call works for closure function but not for Conroller@method
<p>what is the difference between:</p> <pre class="lang-php prettyprint-override"><code>Route::post('insert/{slug}/{page_number}/{person_type_id}/{user_id}', function($slug) { return Response::json( [ 'success' =&gt; false, 'slug' =&gt; $slug ]); }); </code></pre> <p>and this:</p> <pre cl...
2
2,986
Simple collision detection in cocos2d box2d..nothing happens on collision
<p>I'm trying to figure out how to do this, I have a sprite called 'player' and sprites called 'rock' I'm trying to detect collision between both sprites..... but nothing happens on collision!</p> <p>heres what i have done:</p> <pre><code>-(void)addRock { rock = [CCSprite spriteWithFile:@"rock.png" ...
2
1,647
ASP.NET MVC how to get no validation on form for model
<p>I have a registration form and a login form for users. I want validation on the Registration form obviously, but I do not want it on the login form. I've noticed it validates things with JS on the login form. I.E it doesn't even try to submit the form until the user types in a password of length over 5 (I.E what I s...
2
1,094
Saving predicted tensor to image in TensorFlow - Graph finalized
<p>I was able to train a model in TensorFlow with my own data. Input and Output of the model are images. I now tryed to get the output of the predictions and save it to an png image file to see whats going on. Unfortunately i am getting an error when running the following function i created to test with predictions. My...
2
1,355
Parse.com runtime crash - android
<p>i am getting a lot of reports from users about my app crashing. The constant error appears to be associated with my parse.com initialisation, however, i have set it up as outlined in the parse tutorial. </p> <p>here is the Stack Trace:</p> <pre><code>java.lang.RuntimeException: Unable to start receiver com.parse.P...
2
1,357
how to confirm quit application in fragment ? when user press back key
<p>i am creating an applicaiton with different fragments. I want to add code to listener for back key event and confirm with user if he wants to exit the app or not.. </p> <pre><code>public class FastivalesFragment extends Fragment { public FastivalesFragment(){ } CustomAdapter adapter; List&lt;EventCla...
2
2,244
NoClassDefFoundError: com.urbanairship.AirshipConfigOptions (Android Push Development)
<p>I'm trying to run a <a href="https://docs.urbanairship.com/display/DOCS/Getting+Started:+Android:+C2DM+Push" rel="nofollow noreferrer">sample project for doing Android Push notifications with Urban Airship</a>. My program can't seem to find this <code>AirshipConfigOptions</code> class. The project builds fine, only ...
2
1,752
check if checkbox is checked using jQuery then add a class to the closest td
<p>i'm using ASP.NET ,i have a gridview with a checkbox element , i want to check if checkbox is checked add a class to the clossest td that can change the background-color to black </p> <p>i use this but it does not work : </p> <p>Js ((Purpose of Tasting)) :</p> <pre><code> $(document).ready(function () { $...
2
4,374
Can't load my css when using spring security and thymeleaf
<p>I am not able to load my css file while using spring security and thymeleaf.</p> <p>Whenever i use rel="stylesheet" it gives me Strict MIME enable error.</p> <p>My css file is in resources/static folder </p> <p>My html file is resources/template.</p> <p>HTML HEAD:</p> <pre><code>&lt;head&gt; &lt;meta charset="u...
2
1,146