title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
How can I center image in Bootstrap 4, with fixed-top navbar, and without vertical scrolling?
<p>I'd like to achieve the following result: <a href="https://i.stack.imgur.com/i6X0j.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i6X0j.jpg" alt="ideal layout"></a></p> <p>Requirements:</p> <ol> <li>Image should be responsive</li> <li>Fixed-top navbar has to stay</li> <li>No vertical scrolling<...
2
2,968
Spans, buttons, and IE7 float bugs
<p>I am trying to create a button which is capable of resizing itself depending on the size of the text within it. The button is defined by the HTML text below. The whole button is defined as a <code>&lt;span&gt;</code>, and has three constituent components: the left curved portion of the button, the center body of the...
2
1,135
showcurrentlocation and compass controls not appearing on Google map
<p>The showcurrentlocaion and compass controls are not appearing on the google map fragment. However, they were showing before I added the navigation drawer and toolbar to the project, but afterwards they are not showing. Could this be because the toolbar is right on top of the map and hiding those controls? By the wa...
2
5,142
When a marker lies behind open infobox - Event mouseover with InfoBox plugin Google Maps API v3
<p>I'm having trouble with v3 of the Google Maps API and using the InfoBox plugin specifically with respect to this usability issue use case:</p> <p>Since my map requires a custom infobox to be opened upon hovering the mouse over each respective marker, when the map has 2 markers on it that are close in proximity, eve...
2
1,969
Customize LinkedIn Sign in button
<p>How can I customize the LinkedIn sign in button? The default LinkedIn button is small. I have tried the codes in <a href="https://stackoverflow.com/questions/18463713/customizing-linkedin-login-button">here</a>, but I couldn't get it to work.</p> <p><strong>My code:</strong></p> <pre><code>&lt;script type="text/ja...
2
1,043
Google Trends API npm quota exceeded
<p>I am using Google Trends API to get historical trends data. I am reading keywords from a CSV file and firing google trends query. Here is the code</p> <pre><code>var googleTrends = require('google-trends-api'); var fs = require('fs') fs.readFile('merged.csv', 'utf8', function (err,data) { if (err) { ...
2
1,115
What's the best way to subset a spark dataframe (in sparklyr) based on the column data type
<p>I'm converting a bunch of columns into dummy variables. I want to remove the original categorical variable from the dataframe. I'm struggling to figure out how to do it in sparklyr. It's straightforward in dplyr, but the dplyr functionality isn't working in sparklyr.</p> <p>For example:</p> <p>First create a spark...
2
1,357
gunicorn daemon (active: failed) / curl(56) Recv Failure: Connection reset by peer
<p>First thing, I am not sure if this is better here or on ask ubuntu (ubuntu did not have a 'gunicorn' tag so I think i'm in the right place). If it is not appropriate here just drop it in the comments and I'll close it.</p> <p>I am following a digitalocean tutorial on deployment(<a href="https://www.digitalocean.com...
2
1,523
How to calculate the amazon signature for HTTP call
<p>I want to integrate the new service from Amazon Elastic Transcoder. Since my application is running on python 2.4 can't use boto.</p> <p>So I am writing direct http call. The problem I have is that it tells me this when I do post requests, but works for get request:</p> <blockquote> <p>The request signature we c...
2
3,017
Using Javascript to scan JSON data from youtube API
<p>I am trying my hand at searching youtube with the youtube API via Javascript, and as per the google docs on the matter: </p> <pre><code>&lt;div id="agenda"&gt;&lt;/div&gt; &lt;script&gt; function listEvents(root) { var feed = root.feed; var entries = feed.entry || []; var html = ['&lt;ul&gt;']; ...
2
4,556
android listview item's border
<p>good day. today i was encounted this next problem: i have listview:</p> <pre><code> &lt;ListView tools:listitem="@layout/list_view_item" android:listSelector="@android:color/transparent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_wei...
2
1,395
Puma won't start through capistrano
<p>Puma fails all the time when trying to install with capistrano but when i try the same command capistrano uses in the current directory puma starts successfully.</p> <pre><code>bundle exec puma -C /home/deploy/apps/petfriend/shared/puma.rb --daemon </code></pre> <p>Here is a trace below</p> <pre><code> bundle exe...
2
2,108
Symfony - user gets logged out even on a name change
<p>I am facing a really weird situation a user with <code>ROLE_ADMIN</code> gets logged out as soon as I change the name and even if i dont change anything and press save button it gets logged out. if i change the user's role directly in database to <code>ROLE_USER</code> the same code works fine and user is not logged...
2
5,378
Postgres: Why is the performance so bad on subselects with Offset/Limit
<p>Can you please help me understand the reason for the performance drop between these statements?</p> <p>For me it seems like in case of D &amp; E he is first joining the address to all subscribers and at the end applies Offset &amp; Limit. Why on earth would he do that?</p> <p>Am I missing something about how Subse...
2
3,065
Pass data frame through Tkinter classes
<p>I am using Python 2.7 and Tkinter. I am almost new to Object Oriented programs. I have a long program with many Tkinter windows and at some point I ask the user to load an Excel file that I read with Pandas, and want to permanently use and update that value (of a <em>data</em> variable). The way that I am doing it n...
2
1,726
Open/Close Menu Icon Toggle
<p>I am trying to figure out a way I can have a toggle for my menu icon at the top of my web app. Basically a user can click the menu icon and it opens up an off-canvas panel and the menu icon turns to an close(x) icon giving the user a choice to close the panel. So far I have got the panels to open the way I want them...
2
2,440
MySQL shutdown unexpectedly in XAMPP
<p>XAMPP's control panel displays error as </p> <blockquote> <p>Error: MySQL shutdown unexpectedly.<br> 14:09:43 [mysql] This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method.</p> </blockquote> <p>Text in <code>mysql_error.log</code> is</p> <...
2
1,910
Trouble playing mp3s after id3 image edit
<p>Due to hardware restrictions, the software we produce tries to ensure that any audio file it imports into it's library (ready to be copied onto the hardware) is an acceptable bit rate.</p> <p>Recently we've started using FFmpeg to convert a number of different audio types to mp3 to allow them to be imported and use...
2
2,025
How can I make fontawesome work in a Vue project in production builds?
<p>I am building a small project with Vue, typescript, vuetify and icons from fontawesome5. But I am coming across a weird challenge that I cant overcome. In dev mode, all the icons are showing fine from font awesome, but when I build for production, the icons show as square boxes. So far, all my components, custom vue...
2
2,102
Got NullPointerException, when I using SparkStreaming to consume the Kafka's messages
<p>I'm working some code to Kafka and SparkStreaming, when I put them on Yarn-Cluster, it reported <code>NullPointerException</code>.</p> <p>But it works well on my computer (Stand-alone mode) </p> <p>So what's wrong with it ? </p> <p>//Here are the code</p> <pre><code>import java.util.Properties import org.apache...
2
2,489
how to move and zoom image view with in screen boundaries in android
<p>hi i need to zoom and move my image using below code its working well.but here i have some issues.1 when i gave src as background to image view that time its working,if i gave background using setbackgroundresource() means my imageview zoom and move actions not working. 2.for imageview if gave background fillpare...
2
2,134
Customizing authentication exceptions spring oauth
<p>I'm using <strong>jersey</strong> as a RESTFul webserver. (jersey-server 1.8) with spring (3.2.0.RELEASE) and hibernate. My endpoints are protected using spring-security (3.1.3.RELEASE) with 2 legged oAuth 1.0a (spring-security-oauth 1.0.0.M4 )</p> <p>Everything works as expected and the securing works. Inside my C...
2
1,929
Aligned memory allocation
<p>I have the following assignment:</p> <blockquote> <p>Write a function in C that allocates block of memory and returns a pointer to the start of the memory under these conditions:</p> <ol> <li>All addresses in the block are divisible by 32</li> <li>Allocated at least the number of the bytes required</li> ...
2
1,341
JavaScript, DOM blur/focus, dropdowns
<p>I am building a rich text/wysiwyg editor component in HTML and JavaScript. I have an unordered list of toolbar items which contains an image input element for a colour picker. The colour picker is an overlay which is displayed on the click event of the input element.</p> <p>The problem:</p> <p>I want the colour pi...
2
2,336
Webpage to not delete form data after refresh
<p>I have a form on a website that requires two text inputs and two radio inputs <em>(one radio input currently not working because I can't figure out how to get them both to print instead of one overwriting the other)</em>. Upon hitting submit, the information posts underneath the form. I am trying to make it so that ...
2
2,906
Spark XML Tags are missing when null values are coming
<p>Below is the dataframe I have. </p> <pre> +-------+----+----------+ | city|year|saleAmount| +-------+----+----------+ |Toronto|2017| 50.0| |Toronto|null| 50.0| |Sanjose|2017| 200.0| |Sanjose|null| 200.0| | Plano|2015| 50.0| | Plano|2016| 50.0| | Plano|null| 100.0| |Newyork|2016...
2
1,744
how to use my own trained model with facenet implemented in tensorflow?
<p>I train the model with the shell command:</p> <pre><code>python src/facenet_train.py \ --batch_size 15 \ --gpu_memory_fraction 0.25 \ --models_base_dir trained_model_2017_05_15_10_24 \ --pretrained_model trained_model_2017_05_15_10_24/20170515-121856/model-20170515-121856...
2
2,255
Jaxb annotations to deserialize json data using Jackons
<p>I do have a simple json data and my pojo is annotated with jaxb annotations. I wanted to deserialize it WITHOUT using json annotations. </p> <p>(It's must, please do NOT suggest to use both annotations on pojo). </p> <p>Jackson confirms (that's what I understood) that it's possible through <a href="http://wiki.fas...
2
1,225
VB.Net Dynamic chart creation. Layout help needed
<p>First off all, English is not! my first/native language.</p> <p>For my internship @ this company I'm trying to collect some data. There are like 200 PC's in the network. All HP SFF PCs. All the pcs will be overwritten with a company disk image containing software and policies. They also get an bios update. But as t...
2
1,814
SQL - Combine 4 columns into one new column as a single JSON object
<p>Edit: FYI. So my PrimaryImage is actually an int and is used as a foreign key to my Images table. I just wanted to explain that so it is clear why I set it to <code>on f.PrimaryImage = i.Id</code>. For some reason all my rows are getting populated with every i.Id, i.EntityId, i.ImageTypeId, &amp; i.ImageUrl instead ...
2
1,432
Could not load assembly 'Microsoft.Dnx.Runtime.Abstractions'
<p>I have done an upgrade of an <code>Asp.Net Core</code> application from <code>beta 7</code> to <code>RC1</code> by following the steps outlined in these two guidelines:</p> <p><a href="http://wildermuth.com/2015/10/20/Upgrading_from_ASP_NET_5_Beta_7_to_Beta_8" rel="nofollow noreferrer">Beta 7 to Beta 8</a></p> <p>...
2
8,978
Phalcon / REST to existing project
<p>I developing a phalcon web application which has the following directory structure:</p> <pre><code> /app/ /cache/ ... /config/ config.php loader.php services.php /controllers/ contorllerBase.php ... /models/ ...
2
2,327
Fatal Python error: could not acquire lock for <_io.BufferedWriter name='<stdout>'> at interpreter shutdown, possibly due to daemon threads
<p>Thanks for your reply! This is the main.py code I have run: every time I run the code, it will give out the same problem at the last epoch. For example, if I set the epoch=50, before epoch=49, it run without any problem. However, It go wrong when epoch=50.<a href="https://i.stack.imgur.com/FK5ZR.png" rel="nofollow n...
2
1,658
Use addKeyListener in a class to listen keys from another class?
<p>I am trying to have a thread to listen to keys - which is a different class to where the <code>JPanel</code> is created. Below is the class where the <code>JPanel</code> is.</p> <pre><code>public class Game extends JPanel { public static final int WIDTH = 600, HEIGHT = 650; private static ...
2
1,173
OpenGL - Making a point light that follows the camera
<p>I'm currently creating a 3D scene, and I was wondering what would be the best way to go about creating a point light that follows the camera. So far my code is as follows:</p> <p>Vertex shader:</p> <pre><code>// Materials uniform vec3 materialAmbient; uniform vec3 materialDiffuse; uniform vec3 materialSpecular; un...
2
2,523
JQuery selector not working on Angular ng-include
<p>I was testing ng-include in an angular application with JQuery, and I could not fire an event from JQuery on HTML content loaded from <strong>ng-include</strong>.</p> <p>In this example, the page has two panels with two click events, the painel1 that is on index.html page and the painel2 that is on contentPanel.htm...
2
1,124
Benchmarking Newtonsoft.Json deserialization: from stream and from string
<p>I'm interested in performance (speed, memory usage) comparison of two approaches how to deserialize HTTP response JSON payload using <a href="https://www.newtonsoft.com/json" rel="noreferrer">Newtonsoft.Json</a>.</p> <p>I'm aware of <a href="https://www.newtonsoft.com/json/help/html/Performance.htm" rel="noreferrer...
2
1,900
SQLite EXC_BAD_ACCESS
<p>I am getting the EXC_BAD_ACCESS error right after sqlite3_prepare. Any ideas would be greatly appreciated? Note that I am looping through the database with 4 sql statements.The first iteration always works fine and the second iteration throws the error.</p> <p>Update: The first SQL statement works because it is ret...
2
1,616
CodeIgniter Pagination Order By Date Results Are Ordered Wrong And Displaying Same Results
<p>I'm not sure what I'm doing wrong here. I've looked all over, but can't find what I'm looking for. I'm trying to order my results by date. I'm not sure if it would help to know that the dates are not in order in the table though. I'm getting similar results on each page instead of loading the next set of records...
2
1,259
Django adds square brackets and quotes to charfield input
<p>recently I encountered a rather weird problem with my Django forms. I am currently working on my todo list project. Everything works fine, except that whenever I add a new task, its title seems to be saved in database with additional square brackets and quotes around it. It looks like one-element list, but it is a s...
2
2,137
Android: Youtube API using API Level 11 (or higher)
<p>I'm developing an Android app and I want to search for the first result in youtube to a given query.</p> <p>Firstly, I started to use the following URL:</p> <pre><code>"http://gdata.youtube.com/feeds/api/videos?q="+ query + "&amp;max-results=1" </code></pre> <p>It works good for Android API level 10 (or less) but...
2
1,976
Restkit property mapping Failed Transformation error
<p>this is what my sample code looks like:</p> <pre><code>{ "name": "Ahmad Mansour", "subjects": [ { "parent_subject_name": "Arabic", "subject_name": "Shafahi", "exams": [ { "score": "30.00", "exam_name": "Sa3i ...
2
1,862
Populate data from an array into an html table
<p></p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang="en"&gt;&lt;head&gt;&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt; &lt;link href="css/bo...
2
3,652
warning C4013: 'sleep' undefined; assuming extern returning int
<p>My Goal is to get outputs from Dining Philosophers C Program. I am using Visual Studio 2013 on Windows 7 to compile and execute C programs. Got errors stating that pthread.h, semaphore.h were not available. Downloaded the same for windows build and included in the project.</p> <p>Now I get the following 8 errors<...
2
1,301
Resizable container views containing view controllers
<p>I want to be able have several UIViewControllers on the screen at once, arranged as panes, as per the diagram below. With the ability to:</p> <ul> <li>add additional panes while the program is running. </li> <li>drag the bars between the panes to resize them</li> </ul> <p>I was thinking of using container views (...
2
1,501
window.location.replace not working Laravel ajax
<p>i am a beginner of laravel. i made the custom login form using laravel Ajax.when enter the username and password and click sign in button it is successfully visit to test.blade.php page but page displayed 404 Not Found what tried so far i attached below.</p> <p><strong>test.blade.php</strong></p> <pre><code>&lt;div ...
2
3,607
Table-valued parameter insert performing poorly
<p>I have a TVP+SP insert strategy implemented as i need to insert big amounts of rows (probably concurrently) while being able to get some info in return like <code>Id</code> and stuff. Initially I'm using EF code first approach to generate the DB structure. My entities:</p> <p>FacilityGroup</p> <pre><code>public cl...
2
5,145
C# Windows Forms, Combobox MouseClick event getting fired multiple times
<p>I have a windows form with many controls. A tiny part of it is logging in to an SQL server and fetching the list of database names and assigning the collection to a combobox.</p> <pre><code> private void InitializeComponent() { //... //... this.ServerTB = new System.Windows.Forms.Tex...
2
1,529
JAXB and StAX: trouble processing "javax/xml/XMLConstants.class"
<p>I'm using <code>stax-api</code> and <code>jaxb-api</code> in one project. There's a problem with the class <code>javax.xml.XMLConstants</code>. I guess that's because both dependencies include this class. Am I right? Or is there another problem? Can I fix that without enabling multiDex (which doesn't work either btw...
2
1,228
Firebase Android: How to cancel download?
<p>How can I cancel my downloading task from Firebase?</p> <p>I want to cancel the download whenever I click somewhere off the <code>ProgressDialog</code>.</p> <p>Here is the part where my Download Activity <code>ExamesActivity.java</code> is. It looks like:</p> <pre><code>//Download the File on Button(Download) cli...
2
1,818
Single Table Inheritance Errors - ActiveRecord::SubclassNotFound
<p>My intent is to implement STI with two types: Staff and Clinician. My previous implementation was using roles with enums, and after doing my best to follow answers to similar questions, take out all references in tests etc. to enum roles and replace with references to types , I am getting many versions of the follow...
2
2,308
Swift 4.2 // Argument passed to call that takes no arguments
<p>I wrote code (you can find it below), but it partly doesn't work. I want to create an app, where I can push the button <code>pushMicButton</code> and when the button is pressed just tell some words and SpeechKit or something like this will recognise it and add the word, system have recognised, to a recognizedLabel....
2
1,330
Unable to read excel if cell/column has drop down list enabled for Selenium webdriver TestNG
<p>I am using following function to read data from excel for selenium webdriver test. As the data sheet have hundrend of rows to be executed, it needs dropdowns to select values for specific cell which makes it easier for user to fill the data in data sheet. I have used Data validation List to enable dropdown for cell ...
2
1,794
Mac OS X : boost interprocess semaphore timed_wait : Abnormal CPU consumption
<p>After porting a code segment from Windows to Mac OS X, I found it to consume a whole CPU core while running; the responsible call for the CPU consumption is boost::interprocess::interprocess_semaphore::timed_wait.</p> <p>Here follows the code portion which reproduces this behaviour.</p> <pre><code>#include &lt;boo...
2
1,682
filling up a table empty rows with a border css
<p>So I have a designated area for a table, and sometimes the table doesn't get filled up completely to the bottom of that area after reading from database. For the empty spaces I want to have a border around it connecting to the table, so it looks like the table is all the way to the bottom but the remaining space wil...
2
1,679
Write data from Arduino to server using PHP
<p>I asked a related question a few days ago and now tried to achieve my goal using a different method, but it didnt work either. I cant get my head around why, so if you have any idea what I could have missed, please leave a comment :)</p> <p>In my current setup, the Arduino (with an Ethernet Shield 2) tries to start...
2
1,140
Performance issues with UPDATE in AFTER UPDATE Trigger
<p>I have a small performance issue with one of my database triggers in my MS-SQL Server 2014 database.</p> <pre><code>CREATE TRIGGER [dbo].[TRG_T_TPM_Vehicle_Update] ON [dbo].[T_TPM_Vehicle] AFTER UPDATE AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET ...
2
1,434
Ktor response streaming
<p>I am trying to call a twitter endpoint that gives you a constant streams of json results back to the client</p> <p><a href="https://documenter.getpostman.com/view/9956214/T1LMiT5U#977c147d-0462-4553-adfa-d7a1fe59c3ec" rel="nofollow noreferrer">https://documenter.getpostman.com/view/9956214/T1LMiT5U#977c147d-0462-455...
2
1,120
pyQt5 AttributeError: 'bool' object has no attribute 'txtCustCode'
<p>Using QT Designer to design the code. Then using the <code>pyuic5 -x productentryscreen.ui &gt; productentryscreen3.py</code> command to generate python code. i am using buttons and textboxes. when a button is pressed i want to display value entered in the QlineEdit box. But i am getting the error " AttributeError:...
2
2,737
angular reset value for mat-slider within mat-table
<p>I have a list of sliders rendered in a Mat table, and a final slider is displaying the total. I need to reset the value to 0 if it is moved and the total is greater than 100. It works perfectly fine if I release the mouse within the slider element, but if I release the mouse little bit outside the element, value is ...
2
1,640
explicit instantiation of parameterized template methods
<p>I've two different template classes, one of them using as parameter an object of the another template class. i'm getting an error message: collect2: ld returned 1 exit status make: <em>*</em> [main] Error 1</p> <p>I'm working with explicit instantiation of templates and I found some related posts but they...
2
1,356
how to select multiple images using FileUpload conrol in framework 4.0 in asp.net c#
<p>I am trying to upload more than one image using <code>FileUpload</code> control but not able to do it</p> <p>i tried:</p> <pre><code>&lt;asp:FileUpload ID="fuImage" AllowMultiple="true" runat="server"/&gt; </code></pre> <p>and this also :</p> <pre><code>&lt;asp:FileUpload ID="fuImage" multiple="multiple" runat="...
2
1,293
Typescript: calling setTimeout using react-timeout fails
<p>I am attempting to use <a href="https://www.npmjs.com/package/react-timeout" rel="nofollow noreferrer">react-timeout</a> in my application, which I am writing in TypeScript. I am following <a href="https://www.npmjs.com/package/react-timeout#es6-classes---the-light-switch" rel="nofollow noreferrer">the "Light Switch...
2
1,272
jQuery slider's handle doesn't slide
<p>I'm trying to setup a simple slider with custom design but the handle of slider doesn't work. I think I missed something easy cuz I'm pretty sleepy. I'd glad if you can take a look at the sample code;</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" conte...
2
1,280
perform operations on excel data sheet using java
<p>there are four columns in excel sheet</p> <ol> <li>I need to perform operations on three columns and display the result on the fourth one.</li> <li><a href="https://i.stack.imgur.com/xBE2h.png" rel="nofollow noreferrer">Image with data in excel</a></li> <li>If I perform B9-D9 then the result is equal to C9.</li> <l...
2
1,267
issue to get multiple checkbox array values Codeigniter
<p>Facing issue to get multiple checkbox array values in Codeignite</p> <pre><code>&lt;div class="form-actions"&gt; &lt;form action="candidates/posted" name="posted" method="post"&gt; &lt;button class="btn btn-primary" type="submit" value="submit" name="submit"&gt;Action&lt;/button&gt; &lt;/div&gt; &lt;tab...
2
1,168
Passing complex data with RadioButton to Controller in MVC5
<p>I can't pass complex class from Radio Button to Controller. Is it possible, how I am doing it ? I just want to send a object using radio button. The problem is, I receive error null reference.</p> <pre><code>public class Model1 { public int ID { get; set; } public string Name { get; set; } public List&l...
2
1,050
Kubernetes MySQL pod stuck with CrashLoopBackOff
<p>I'm trying to follow <a href="https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/" rel="nofollow noreferrer">this guide</a> to set up a MySQL instance to connect to. The Kubernetes cluster is run on Minikube.</p> <p>From the guide, I have this to set up my persistent volume:</...
2
1,684
Python 2.7: Adding new items to Tkinter listbox without adding existing values
<p>I am writing a simple bulk file utility. I have two listboxes in the GUI. Listbox1 contains a list of files that exist in whichever directory the user selects. The user can then add selected items in listbox1, to listbox2. Currently this allows duplicate items to be added. I would like to figure out how to check if ...
2
1,093
Can't access server socket with android app
<p>I want to see the exact headers my android app is sending while making a web request so I thought I'd simply create a simple server app in java on my local machine and have my android app make a call to it. Then simply dump the request to the console so I could see what the app is sending. However when I tried to co...
2
1,382
How to clear UIButton background image State?
<pre><code>-(void) btnAction:(id) sender { NSString *str =((UIButton*)sender).titleLabel.text; NSLog(@"%@",str); NSLog(@"%@",[dictionary objectForKey:@"option3"]); correctAns=[dictionary objectForKey:@"answer"]; if(str==[dictionary objectForKey:@"option1"]) { selectedAns=@"1"; if (...
2
3,364
How to Detect collision in Swift, Sprite kit
<p>I was programming this simple space game in Swift until I encountered the problem of detecting collisions. After looking around forums, tutorials, etc, I tried to implement collisions by declaring bitmasks like so:</p> <p>object 1</p> <pre><code> enemy?.physicsBody = SKPhysicsBody(circleOfRadius: ((enemy?.size....
2
1,414
Allowing more than three items in jCarousel
<p>I have the same problem as the following question:</p> <p><a href="https://stackoverflow.com/questions/7122426/setting-number-of-visible-images-in-jcarousel">Setting number of visible images in jCarousel</a></p> <p>The answer seems to be in the CSS file, but the website that has basically been dropped on me does n...
2
8,368
Android hide and show components
<p>I am making a sqlite android application which is to list some data , show graphs , visit a web site by starting default browser(not in application by using webview) , send emails by using a form . I will have a couple of forms . So what I was thinking is that instead of using several activities and xml layouts I pu...
2
1,462
Flutter: Access SharedPreferences Provider / ChangeNotifier in a Stream Class
<p>I've looked around in StackoverFlow and was not able to find myself a solution to this. Scenario: I have a Flutter SharedPreferences Provider with ChangeNotifier Class, that will get updated with the current Logged In User info.</p> <p>Simplified content:</p> <pre><code>class SharedPreferences { final String userI...
2
1,437
cudaMemCpy2D getting crashed
<p>I am trying to implement Sauvola Binarization in cuda.For this I have read the image in a 2d array in host and allocating memory for 2D array in device using pitch.After allocating the memory I am trying to copy the host 2D array to Device 2d Array using cudaMemcpy2D,it compiles fine but it crashes here on runtime.I...
2
3,043
Issue with parsing JSON file with GSON on Android
<p>I am trying to parse a JSON file for an Android application. I manage to view the file content on the LogCat, but I always get an error then. LogCat tells me that it expect a string but was BEGIN_ARRAY.</p> <p>The main activity class:</p> <pre><code>.../** Called when the activity is first created. * @return */ ...
2
7,950
Spring behind the scenes logging
<p>I use <code>log4j2</code> and I can't get logging from spring. when I write my own <code>logger.debug(...);</code> it works but it's the same as <code>System.out.println(...);</code>. </p> <p>I want to know what happened behind the scenes in spring. show the created bean or debuggig error like 400 ... </p> <p>I t...
2
2,629
PHP/HTML - Read table row where radio button is active after form submit
<p>I am trying to create a webpage where a table lists a bunch of meals for a whole month. I want to be able to use a <strong>radio button</strong> at the <strong>beginning of each row</strong> ( 1 row - one day ) to select which meal will be the next one. The reasoning behind this is that I have another webpage which ...
2
4,773
Google map is not showing all pharmacies using Google API?
<p>I am creating a map app to display all pharmacies and hospitals nearby. It is not displaying all pharmacies and hospitals. Please help? I have tried to lower the radius and I have also tried adding nearbysearch to my PLACES_SEARCH_URL. This is using Android Google Maps API V2 and Google Places API. Here is my code:...
2
8,419
BroadcastReceiver - Can't start Activity from closed or in-background app
<p>I'm trying to launch an activity from a closed app, using the AlarmManager and a BroadcastReceiver. The "received" debug message is shown even when the app is closed or in background, which means that the AlarmManager is working like I want it to. But the CameraActivity is only launched when the app is active. Anyon...
2
1,309
Knockout component given incorrect binding context in Internet Explorer 11
<p>I have a bug that I have tested in Internet Explorer and Chrome and this only happens in Internet Explorer.</p> <p>I am using <code>Knockout-3.3.0</code> and <code>Knockout Validation</code>.</p> <p>I have a knockout component that uses a custom element similar to the below:</p> <pre><code>&lt;div&gt; ... ...
2
1,247
Import data into SQL Server from an Azure Excel blob file
<p>I have an MVC web application that allows user to upload an Excel files to Azure cloud storage, and then the application uses that Azure-stored Excel blob file to import data into SQL Server.</p> <p>I follow the sites <a href="http://www.codeproject.com/Tips/752981/Import-Data-from-Excel-File-to-Database-Table-in-...
2
1,267
SingleChildScrollView is not scrolling with Stack Widget Flutter
<p>Here when I type inside text fields Keyboard covers the Login button. So I need to scroll down to the Login button when typing. I tried wrapping LayoutBuilder with SingleChildScrollView and tried using Positioned widget inside Stack but nothing solved my issue. And I set physics to AlwaysScrollableScrollPhysics() in...
2
3,284
VS code slow for a specific project
<p>I've been using VS coed for some years now and I loved the experience so far, but one of my most recent projects is suddenly slowdowns the VS code drastically, I couldn't figure out why yet. And amazingly other projects do not give me this headache at the moment, with VS code. So I suspect there's something with the...
2
2,438
How can I place a button control group within a field container?
<p>I have a control group of buttons that looks like this:</p> <pre><code>&lt;div data-role="fieldcontain"&gt; &lt;label&gt;Ahead&lt;/label&gt; &lt;div data-role="controlgroup" data-type="horizontal"&gt; &lt;a href="#" data-role="button"&gt;Hour&lt;/a&gt; &lt;a href="#" data-role="button"&gt;Day&lt;/a&gt; ...
2
1,493
net::ERR_ADDRESS_UNREACHABLE at {URL}
<p><strong>i am using puppeteer v1.19.0 in nodejs , is error unreachable after build and run in docker, is js file <br /></strong></p> <pre><code>await puppeteer.launch({ executablePath: '/usr/bin/chromium-browser', args: ['--no-sandbox', '--disable-setuid-sandbox', '--headless'], }).then(async (b...
2
1,950
Parsed JSON in multiple columns
<p>I'm working on some API info collecting and I've written a program that reads the domains and looks up the API info and after it finds the info it puts the whole JSON text it made into a column in Microsoft SQL server table.</p> <p>This is how one of the JSON output looks:</p> <pre><code> { "id": "3e3562a7-b1...
2
1,847
Scrapy AttributeError: 'SoundseasySpider' object has no attribute 'crawler'
<p>I am trying to scrape some date from the webpage <a href="http://soundseasy.com.au" rel="nofollow noreferrer">soundseasy.com.au</a>, but sometimes I get the error:</p> <pre><code>AttributeError: 'SoundseasySpider' object has no attribute 'crawler' </code></pre> <p>Here is my code, which use selenium web driver(sel...
2
1,538
How can I integrate Opencv into a Tkinter window
<p>I'm trying to put face recogniton code that uses opencv to the left hand side of a tkinter window. By doing this I wish to leave the right hand side of the window free so I can output text. e.g. when a face is detected the program will display "Name: Present" I am new to both Tkinter and OpenCV andI can't seem to fi...
2
2,547
Can't inject DAO in Junit test with Spring
<p>I'm trying to use HSQL in-memory database with my Junit tests. I have an entity model:</p> <pre><code>package com.project.model.db; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="users") public class User ...
2
1,276
Form submit 400 required string parameter is not present
<p>I'm trying to simple POST data from my form to my spring controller and I always getting the error message:</p> <blockquote> <p>the server responded with a status of 400 (Required String parameter 'profileId' is not present)</p> </blockquote> <p>my Form within my uiBinder:</p> <pre><code>&lt;g:FormPanel ui:fi...
2
1,408
django.db.utils.IntegrityError: Problem installing fixture
<p>I'm attempting to create a fixture from my development database data and storing it my test database. This data happens to be only one model. I ran the <code>dumpdata</code> command as such:</p> <p><code>python manage.py dumpdata minerals.mineral --all --indent=4 --output=minerals/test_minerals/fixtures/test_miner...
2
1,236
How do I use the Google Civic Information API to retrieve members of Congress for a given location?
<p>I've tried using the civicinfo.representatives.representativeInfoByAddress endpoint in the API explorer (<a href="https://developers.google.com/apis-explorer/?hl=en_US#p/civicinfo/v2/civicinfo.representatives.representativeInfoByAddress" rel="nofollow noreferrer">https://developers.google.com/apis-explorer/?hl=en_US...
2
4,836
How to save the order of a drag and drop item to the database in Rails?
<p>I am using <a href="https://github.com/McPants/jquery.shapeshift" rel="nofollow">Jquery Shapeshift</a> for drag and drop on some lists that i have.</p> <p>I have a javascript array containing the list_id and it's position. That array is sent to my controller each time i move a list. So all i need to do is take that...
2
2,193
ImportError: No module named zlib; tox
<p>I am trying to run tox tests as python 2.6. I just installed 2.6 and am now getting past the "Interpreter error: no python 2.6" style error, but tox is now crashing at zlib. Zlib is on my machine however. My tox issue looks like:</p> <pre><code>$ tox -e py26 GLOB sdist-make: /home/cchilders/work_projects/webapi/set...
2
3,483
Undefined reference to cv::Exception::Exception - Compiling opencv
<p>I'm trying to create a haar classifier following this tutorial: <a href="http://coding-robin.de/2013/07/22/train-your-own-opencv-haar-classifier.html" rel="nofollow">http://coding-robin.de/2013/07/22/train-your-own-opencv-haar-classifier.html</a></p> <p>I'm at the part where you compile opencv C++ files, with merge...
2
2,322
How to write a variable from jsp to html div after downloading file
<p>I am trying to build a very simple application. There will be a password field. If an user enters wrong password, then a message will be shown "Password incorrect.". If the password is correct, then I have to do two tasks: </p> <ol> <li><p>A file will be downloaded (suppose a.txt). The file resides in WEB-INF folde...
2
2,203
Problem autoFocus Autocomplete Material UI
<p>I am not able to <code>focus</code> on the first element of my form which is an Autocomplete component of the Material UI.</p> <p>When opening the modal, the focus is on the 'unit' element, as shown in the image below: <a href="https://i.stack.imgur.com/GnJeh.png" rel="nofollow noreferrer">It dont's work</a></p> <p>...
2
4,379
interstitial error android unable to pause activity
<p>I have one issue with interstitial ads . I am getting error unable to pause activity when I am trying to handle <code>onAdClosed()</code> method</p> <p>Here I am using fragments </p> <p>Here I am posting my logcat output </p> <pre><code>03-18 19:28:50.169: E/AndroidRuntime(26349): FATAL EXCEPTION: main 03-18 19:...
2
1,930