title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How can I make a bar of color go across the screen with text on it? | <p>This is my code for my website project. When I execute it, the light blue color bar goes centers on the text, but instead of going horizontally, It goes vertically. I really want it to go horizontal, kind of like a YouTube banner.</p>
<p>This is what it currently looks like: <a href="https://gyazo.com/bec50dc13260d... | 2 | 1,744 |
MQTT messages persists after unsubscription and is recieved on subscribing again | <p>My app uses paho mqtt library on android to subscribe to a list of topics. On logging into the app subscription is made and on Logout unsubscribes topics. QoS is set to 1 at subscription. </p>
<p>Once I login the next time I get all the mqtt messages that were published by the broker after I had unsubscribed.</p>
... | 2 | 1,780 |
Java - Code skips an input | <p>I was tasked with creating a small application for college, and have created a simple booking system.
I'm having an issue in that when the program runs, for no reason i can fathom it's executing the print part of a method but then jumping to the next method without executing the in.next() part of the original metho... | 2 | 2,832 |
JSF - Problem with @ViewScope | <p>I have a page that load (in a panelGroup) two different page, due to the login status (logged, not logged). This is the main switch :</p>
<p><code>template.xhtml</code> P.S. selector.page is "homepage" as default</p>
<pre><code><h:panelGroup layout="block" styleClass="contenitore">
<h:panelGroup layou... | 2 | 1,571 |
C# Frequency Retrieval | <p>What I need to do is calculate the frequency of the microphone input. I'm using <code>IWaveProvider</code> for this and its implemented <code>Read()</code>. The buffer always has a size of 8820 elements and something seems to be going wrong with the conversion from byte array to float array as well (the <code>FloatB... | 2 | 1,234 |
Swift 3 - Got an empty NetService.addresses array after exploring bonjour | <p>I'm pretty new in Swift 3.</p>
<p>I want to get the ip of my NetServices which I explored with bonjour to show them to the user, not to connect with the device. So far I can search for devices with bonjour and get them listed in a listView with this great access code:</p>
<p><a href="https://github.com/ecnepsnai/B... | 2 | 1,167 |
TypeError: connect() argument 4 must be str, not WindowsPath . /*The Error that i m getting in my simple login django project*/ | <pre><code>System check identified no issues (0 silenced).
You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
February 17, 2021 - 19:52:27
Django version 3.1.6, using settin... | 2 | 1,709 |
Why do I get "405: Method Not Allowed" when I send a POST request with Perl's REST::Client, but not with Perl's LWP::UserAgent or Python? | <p>When I send a POST request with Perl's <a href="https://metacpan.org/pod/REST::Client" rel="nofollow"><code>REST::Client</code></a>, I get the following response:</p>
<pre class="lang-none prettyprint-override"><code>405: Method Not Allowed
</code></pre>
<p>However, when I send a POST request to the same URL with ... | 2 | 1,240 |
Draw Circle onTouch on a Canvas Image Bitmap | <p>I am displaying an image using <code>Canvas</code> and <code>Bitmap</code>. Now I want to draw a Circle where I touch the <code>ImageView</code>. How can this be achieved?</p>
<p>Instead of <code>tempCanvas.drawCircle(50,100, 60, myPaint);</code>, I want something on the lines of
<code>tempCanvas.drawCircle(event... | 2 | 1,153 |
Calendar agent - error: sql cached statement NSSQLiteStatement | <p>So after spending quite a lot of time trying to fix my iCalendar app
from the Spinning beach ball lag every time I make a new event or edit an event,
I found this error in the console application:</p>
<pre><code>"error: sql cached statement NSSQLiteStatement <0x7f8eef4c0fd0> on entity 'Group' with sql text 'S... | 2 | 1,240 |
Display php nested array results continuously in two column table | <p>I have a nested array grouping three other arrays: $online, $busy and $offline, in order to display results in this exactly order.</p>
<pre><code>$conteudo = array($online, $ocupado, $offline);
</code></pre>
<p>The desired result would be a table in two columns to display results in continuous flow like this:</p>
... | 2 | 3,049 |
removeView (view) not working in subclass of ViewGroup | <p>I have a <code>MyLinearLayout</code> subclass extends <code>ViewGroup</code> which make <code>View</code>s inside it auto-wrap.</p>
<pre><code>public class MyLinearLayout extends ViewGroup {
private final int cellHeight = 70;
public MyLinearLayout (Context context, AttributeSet attrs) {
super (con... | 2 | 2,206 |
Spring MVC annotation config problem | <p>I'm trying to improve my spring mvc configuration so as to not require a new config file for every servlet I add, but I'm running into problems. I've tried using <a href="http://blog.springsource.com/2009/12/21/mvc-simplifications-in-spring-3-0/" rel="nofollow noreferrer">this tutorial</a> as a starting point, but I... | 2 | 2,244 |
Selecting the minimum of two distinct values | <p>I'm working on a sql selection where I need to get all the smallest records for an ID. My problem is that, while I thought my code was working, it would often return incorrect values for other columns, evidently because of my failure to use having to support my aggregate min function. Here is my code.</p>
<pre><cod... | 2 | 1,847 |
Parsing XML in JavaScript using RegExp and exec - it usually works, but in a few cases it doesn't - any idea why? | <p>I am parsing some XML in server-side JavaScript. The XML is returned by a call to another server. I'm using a modified version of a solution I found at <a href="https://stackoverflow.com/questions/4341421/with-regex-how-do-i-match-between-an-xml-tag-multiple-times">With regex how do i match between an XML tag multip... | 2 | 2,376 |
Java - How to initialize parameters for an object? | <p>I have been struggling with this issue for weeks and still cannot get what I need. My CalculatingRocketFlightProfile class holds the <strong>constructor with the parameters</strong> (totalImpulse, averageImpulse etc...) and the methods which calculates the outputs. My MAIN class has an object which inherits my keybo... | 2 | 1,406 |
How to find the difference of two maps? | <p>I'm trying to implement a similar function to set_intersection and set_difference but instead using maps as my date type for an assignment. I'm able to find the intersection, but my output for the difference function is not what I should expecet and I cannot figure out why. The two functions I'm using are as follows... | 2 | 1,080 |
Android Geolocation working in emulator but not working in phone | <p>I made a simple app with geolocation that displays current location of the user in text views, like latitude, longitude and with <strong>Geocoder</strong> cityname countryname postal-code, etc. </p>
<p>Everything works perfectly in the emulator but for some reason the location doesn't get retrieved in my mobile. </... | 2 | 2,676 |
Symfony 2 join not working doctrine and MySQL | <p><strong>Note:</strong> this post was solved using <a href="https://stackoverflow.com/questions/23369285/symfony-2-join-not-working-doctrine">this</a> method, the problem was in one of my entities, so any thing I tried that would in normal conditions work, was bad functioning because of that. I do not know how to mar... | 2 | 3,102 |
Why I get html/text content type instead of json? | <p>When I upload image into Google Cloud Storage I got this </p>
<pre><code> HTTP/1.1 200 OK
X-GUploader-UploadID AEnB2UrQyfCePM_5kYDFy1sJchgXCTkmRH8sU4S8NrWa-KzVoovFtD5iz8CIAUjegqBfBTK8ACiid0XazBRKqpZRvmUE03JNQg
X-AppEngine-Estimated-CPM-US-Dollars $0.000000
X-AppEngine-Resource-Usage ms=130 cpu_ms=38
Date ... | 2 | 1,411 |
I need help mixing C++ code and Objective-C code | <p>I am writing a device driver for a Blackmagic Design AV device in XCode, and I'm having trouble including BMD's SyncController class from their abbreviated sample code (below) into my purely Objective-C project.</p>
<p>Their DecklinkAPI.h file is rich in C++ code, so when I try include this header file as-is in a a... | 2 | 1,300 |
Check If a user has already purchased a product in SwiftyStoreKit | <p>I implemented in-app Purchases and I am using SwiftyStoreKit.
Everything works fine but want to check if the user has already purchased the product. I want when the user goes in the inappropriate page to show a button. If its bought then to shows "Open" if not "theprice". I can't quite understand how I can achieve t... | 2 | 1,976 |
How can I count the number of comparisons? (Hash Table) | <p>OK, so I am working from the book "Data Structures and other objects using C++ 4th Ed". I am making a hash table that accepts the keys and hashes them into the correct spots using open addressing to resolve collisions. The code below is what I currently have.</p>
<p>The Header File</p>
<pre><code>#ifndef TABLE1_H... | 2 | 2,015 |
System.NullReferenceException: 'Object reference not set to an instance of an object.' - In .NET Core 3.1 | <p>I am making a BookEvent app using ASP.NET Core 3.1 MVC. I am facing this error <code>System.NullReferenceException: 'Object reference not set to an instance of an object.' Microsoft.AspNetCore.Mvc.Razor.RazorPage<TModel>.Model.get returned null.</code></p>
<p>How can I fix it?</p>
<p>I am trying to display all... | 2 | 1,224 |
Simple TextBox Text Binding Fails WPF | <p>We are converting an app from Silverlight to WPF. It's a fairly complex app, but the code sharing is about 95% +. The XAML is pretty much all the same except for XML namespace definitions etc. About 90% of the app now works but there are a few glaring issues that are puzzling me. One is this binding issue. </p>
<p>... | 2 | 1,050 |
unable to retrieve data from sqlite database | <p>In this app I want that as I click on button the data from my database display on List View and by using OnItemClick() it should show another activity But Unfortunately my application is is being stopped as I click on Button Plzz tell me where m I getting wrong Here is my activity class `</p>
<pre><code>public cl... | 2 | 2,233 |
Android Fragment with ViewPagers oncreateView Called in Wrong Fragment | <p>I have a main activity which shows 3 fragments inside View Pagers with tabs.</p>
<p><strong>mainActivity.java</strong></p>
<pre><code>public class mainActivity extends AppCompatActivity {
globalVariableActivity variable = new globalVariableActivity();
private APIService mAPIService;
private TextView mResponseTv;... | 2 | 4,744 |
iPhone app crash: UIKit | <p><strong>Update 29th October 2015</strong>: Might have possibly found the cause of this. I'm creating a gradient layer according to <a href="https://stackoverflow.com/a/23074591/4027036">this StackOverflow post</a> - it works perfectly fine for me and everyone else I've tested with, but might other people have proble... | 2 | 2,498 |
Unable to create conf file using Jinja - Expected Variables for Nginx | <p>I am learning to use Jinja today to template a config file that I manually created and tested for Nginx. So far the template works as expected and it pulls the dynamic variables as expected. However, I have one line in my conf that needs to be on two separate lines and for some reason, it puts the two host on the sa... | 2 | 1,339 |
C# & ASP.NET - Anyone create a library to talk to EdgeCast CDN via FTP? | <p>For one of my projects we utilize a Content Delivery Network (<a href="http://www.edgecast.com/verticals/cdn.htm?gclid=CN3UptGU0ZwCFQhV2godxXdgJw" rel="nofollow noreferrer">EdgeCast</a>) and I was wondering if anyone knew of an existing (open source) library for C# that we could leverage? In a nutshell, I am invest... | 2 | 5,395 |
How to bind a value to a textbox using *ngFor local variable in angular2 | <p>I am trying to execute some sample code in Angular2.
I have a button called ADD. While clicking on the ADD button one new table row will be added with a set of controls like textbox, select etc.
Once I filled these details, then, if I again click on the ADD button a new row will be added but previously filled detail... | 2 | 1,721 |
How to extract text from <Strong> tag? | <p>I am using Protractor with Jasmine for e2e testing my application. I have to validate whether the message thrown by the application is correct or not. The message box is visible only for 10 sec.
I tried using the ID but it didn't work.
Error Message: "No element found using locator: By(css selector, *[id="Message1"]... | 2 | 2,538 |
Ruby on Rails Guide: undefined method `fields_for' for nil:NilClass | <p>I am going working through the Rails Guides (<a href="http://guides.rubyonrails.org/getting_started.html),and" rel="nofollow">http://guides.rubyonrails.org/getting_started.html),and</a> am stuck at item 11 "Building a Multi Model Form".</p>
<p>This part of the excercise explains about including form fields for one ... | 2 | 1,567 |
Trouble Passing Variables to PHP Script on Image Upload | <p>I have a script that successfully uploads an image to my server via PHP. THe upload part works, but I am also trying to pass variables to the PHP script that is uploading the image.</p>
<p>I am pretty confident that my PHP code is just fine, I just dont know whats going wrong with the Objective-C. I also notice tha... | 2 | 1,271 |
String comparisons in selenium using xpath fails even though both strings are exactly same | <p>I am using key word driven and data driven framework.
Expected string is coming from excel sheet and Actual from webpage
even though both variable print exactly same strings still the Test script fails.
It does "PASS" for strings with no space like "<strong>Resign</strong>" but "FAIL" for string with space like "<s... | 2 | 1,044 |
Dynamic jqGrid displaying no data | <p>I am making jQuery UI dialogs open with jqGrids (local data at the moment) in them. That part works but when I try to call my grid building function and attach it to a dynamically made <code>DIV</code>, I only get the shell of the <code>jqGrid</code> with the table headings but no data. Any ideas? Here's the parre... | 2 | 3,246 |
Simple RequireJS, AngularJS, Electron App, Dependencies not Executing | <p>I am writing my first Electron/Angular/RequireJS single page desktop app. I started with the <a href="https://github.com/szwacz/electron-boilerplate" rel="nofollow noreferrer">electron-boilerplate</a> and it works great. However, I need to add AngularJs to the equation--the boiler plate already uses RequireJS. I'... | 2 | 2,384 |
Adding multiple records to a relations table with symfony | <p>I have setup 3 tables in symfony:</p>
<p>A flipbook table, A Skills table, and a relations table, to connect each skill id with each flipbook id. </p>
<p>WHen I built the model, symfony constructed everything correctly, and by default gave a drop-down menu for the skills, which had all skills from the skills table... | 2 | 1,894 |
Report duplicates in array of structures using qsort? | <p>What I'm trying to accomplish:</p>
<p>I am making 3000 requests and capturing 8 bytes of that request. I stick the response in:</p>
<pre><code>struct negs
{
int neg_num;
char neg_key[9];
};
</code></pre>
<p>where <code>neg_num == i</code> (the request number)
and
<code>memcpy(nego[neg_count].neg_key, re... | 2 | 1,298 |
How to change color of tab selected in tablayout | <p>How do I change the color of the selected tab? I would like to each tab to have its own color attribute. So tab 1 selected would be Red. Tab 2 selected would be Blue. Tab 3 selected is Yellow. When not selected they go back to the tab original color.</p>
<p>Currently, I am using a selector to change the background ... | 2 | 1,092 |
Flutter FutureBuilder, Future.wait with Geolocator Future and another future not fetching data | <p>It is already a week since I started struggling with the problem so I am totally at a loss.
In my code - please see below - I need to resolve two futures to build the page. One - from Geolocator package to get user location for the map, the other is a list of jobs /activities available for the user in the location. ... | 2 | 1,746 |
Swift 2 Json utf8 string character error | <p>I have working <code>Json</code> file and app, but i have text <code>encoding</code> problem.</p>
<p>My <code>Json</code> file output example</p>
<pre><code>{"status":"SUCCESS","data":[{"id":"21","title":"I&#039;m working on project","description":"Lorem ipsum dolor sit er elit lamet, consectetaur cilliim adip... | 2 | 2,943 |
how to solve the promethesus blackbox_exporter 401 error | <p>I want to use "fail_if_body_not_matches_regexp" in blackbox_exporter to detect whether a string is returned in an HTTP interface (this interface is a url of type GET), but the result of blackbox_exporter page is always 401. by the way, I can normally access this interface through the browser and get the results</p>
... | 2 | 1,378 |
url encoding c# mismatch encoding | <p>I have a large url that I am encoding using System.Web.HttpUtility.UrlEncode. When I encode it its not encoding it like the working example I have. I am not sure what the problem is, maybe different character type or something, I put an example of what suppose to be created and what actually being created. thanks fo... | 2 | 1,949 |
Vue 3 Composition API exported functions parameter dosnt update | <p>I just tryed to transform my Component into a Composition API component and realised that the parameter for the exported function dosn't get updated.</p>
<p>this is my Component:</p>
<pre><code>export default {
name: "ListItem",
components: {
ListItemButton,
InputSwitch
... | 2 | 1,535 |
Parsing JSON data in PHP file using Javascript | <p>I have seen some other posts in Stackoverflow which were related. Tried that code but it did not work out for me. </p>
<p>actually i have a database with 2 images of an actress in my MYSQL database. I am generating JSON data using PHP and it works fine. </p>
<p><a href="http://chipap.com/apps/nazriya_nazim/test1.p... | 2 | 1,281 |
php table break page with no rows on next page | <p>I am having a php table which contains information about billing of certain numbers. After generating this table I export it in pdf using mpdf.
If the table has a certain number of rows it breaks the page in a weird way, leading the headers repeat on the next page with no rows.
Here is the format of the table:</p>
<... | 2 | 3,304 |
how to synchronize process using mutex with multithreading in c | <p>HI I am writing a program which write the string in file, process 1 will write a small letters in file and process 2 write a capital letters in same file. i implemented a program using threading, process 1 must run first, after that run the process 2 . program as follows. </p>
<pre><code>/******************
* He... | 2 | 2,119 |
show only one value from ajax return array | <p>How can I display only one thing from the array. Now it shows the whole array but I only want to show the reason from the array. because the rest is't really important. I have added index.php to show what I do there. I would like that it only showed the reason from data.</p>
<p><em>test.js</em></p>
<pre><code>$(do... | 2 | 1,384 |
Android: firing/starting alarm tone on my AlarmReciever getRingtone() returns null | <p>i have this code that fires a toast message on alarm set by a timepicker, i want to fire/start also, aside from the toast message, a alarm tone together with it.</p>
<p><strong>this is my code on my reciever:</strong> </p>
<pre><code> public void onReceive(Context context, Intent intent) {
long time = ... | 2 | 2,052 |
How to use @JsonProperty annotation with array containing elements of different format | <p>I'm using an API that uses in requests & responses json array in a SpringBoot App with elements of various format and I'm struggling to dynamically get the right class to be used for serialisation/deserialisation of elements of such array.</p>
<p>Here is a simplified description of the json:</p>
<pre><code>{
... | 2 | 1,208 |
Undefined variable of $error but already defined $error in php | <p>I get an error saying </p>
<blockquote>
<p>Notice: Undefined variable: error in C:\xampp\htdocs\songdb\edit.php
on line 158</p>
</blockquote>
<p>I have already tried putting <code>isset()</code> in the <code>$error</code> in the but it still doesn't work. </p>
<p>edited:
I already remove != in just use isset... | 2 | 3,410 |
terraform var output to pick from a map element in list of maps | <p>I have an output like this:</p>
<pre><code>output "esxi_gw_ip" {
value = "${packet_device.esxi.network}"
}
</code></pre>
<p>and the result is this:</p>
<pre><code> "outputs": {
"esxi_gw_ip": {
"sensitive": false,
"type": "list",
"... | 2 | 1,106 |
Menu not showing correctly once called from iframe | <p>I am having a problem in displaying a iframe on a page.</p>
<p>I have a top frame that displays a logo along the top (which is fine)
I have a menu down the left side of the page. (which I am having a problem with)
I have a frame to the right of the menu that will display my page.</p>
<p>My index.htm page is loadin... | 2 | 6,188 |
Erlang - Importing GPG Public Key | <p>I'm trying to do some public-key-related things in Erlang, and they require me to track public keys. According to <a href="http://www.erlang.org/doc/apps/public_key/using_public_key.html#id61611" rel="nofollow">this page</a>, I should be able to import PEM format keys by using <code>file:read_file/1</code> and <code... | 2 | 2,774 |
Set background image to text too? | <p>I am trying to write on the sand, and was able to simulate a sand effect. However, this makes the text look so fake in contrast with the sand (when you write in the sand on a beach, you usually use a stick, so the background of the text is actually the sand). So is there a way to add a background image to the text t... | 2 | 1,936 |
How to read the contact data as returned by the Google People API using PHP | <p>I am new to the google API and would like to use the People API for obtaining all the contacts of a user.
It works, I can authenticate the user and I call the People API as follows:</p>
<pre><code>$contacts = $peopleService->people_connections->listPeopleConnections('people/me');
foreach ($contacts as $con... | 2 | 3,791 |
Scrapy not scraping entire site | <p>I am having an issue where my CrawlSpider is not crawling the entire site. I am trying to crawl a news site; it collects about 5900 items and then quits with reason "finished" but there are large gaps of dates in the scraped items. I am not using any custom middleware or settings. Thanks for any help!</p>
<p>My spi... | 2 | 1,096 |
Excel - why two equal integers have non-zero difference? | <p>I have <code>=2*10^15</code> in one cell which evaluates to <code>2,000,000,000,000,000</code> and I have <code>=2+2*10^15</code> in another cell which also evaluates to <code>2,000,000,000,000,000</code>, which is fine since the precision is only 15 digits. But when I then subtract one from another, I get back <cod... | 2 | 1,042 |
Create a self hosted WCF Service inside a Windows Form | <p>If I use this code for self Host a WCF service in a Console application it works. I run the host app and then from another app (which I call the client app,) I can add the service reference from visual studio > solution explorer > ADD SERVICE REFERENCE > <a href="http://10.131.131.14:8080/sendKioskMessage" rel="nofo... | 2 | 2,308 |
Android (Java) file upload to PHP servar fails with Android 4.03 | <p>We have, with good result, used a script for a game of ours that connects to a php-file in order to upload files to a remote server. When we upgrade to Android 4.03 the script suddenly fails to connect to the server and we have no clue why. It works very well with Android 2.3.4 and older.</p>
<pre><code>public stat... | 2 | 1,945 |
UniversalTelegramBot doesn't work with ESP32 but it doesn't show an error. I think it's a libraries version compatibility issue,could someone help me? | <p>I'm developing a program in Arduino Ide (v. 1.8.13) which takes brightness values and send them to ESP32 Web Server. Also, I want to add the posibility of seeing the data via Telegram. At the moment I just want to send '/start' to the Telegram bot and Arduino program answer with a welcome message. However, the bot d... | 2 | 2,988 |
Spring: get input button id | <p>I have this html template in thymeleaf.</p>
<pre><code><table id="listAllAccountantTable" th:cellspacing="0" class="table table-striped table-bordered" style="width:100%;">
<thead>
<tr>
<th>No. </th>
<th>Registered Date</th>
<th>Status</th>
... | 2 | 1,164 |
Bootstrap 4 and Angular 1.6.9 - page looks like css not applied | <p>Started a new project (copied from an existing) using angularjs 1.6.9. The previous project used bootstrap v 3.3.7. When I ran the npm install, it installed bootstrap 4.0.0. It has a dependency on JQuery and Tether, no big deal. It wouldn't npm install JQuery, but was able to get past that (turned off anti-virus/int... | 2 | 1,999 |
Authentication issues w/ MiFare Ultralight C | <p>I am trying to authenticate w/ an NXP MiFare Ultralight C. My NFC tag reader is an Android phone (Samsung Galaxy Express) but I'm doing all of the crypto on a Windows 7 machine using C# and the functions in the System.Security.Cryptography namespace.</p>
<p>I <strong>DO</strong> have full datasheets (under NDA) on... | 2 | 1,770 |
MVC 5 ASP.NET Entity Framework Collect Form Data through Range Input | <p>So I am creating a survey monkey, a Survey Has 4 categories, and each category has 5 questions, the HomeController Index passes on the 20 questions from the Questions entity and each Questions must have a Range Slider with values from one to 5, the form values must be collected into a method in the controller, then ... | 2 | 8,198 |
iPhone - handleOpenURL Custom-URL-scheme plugin - not redirecting back to the application | <p>I have an app written with AngularJS 1.5.3, Cordova, and Ionic v1.</p>
<p>I'm using these 2 plugins to implement some SSO (Single-Sign-On) functionality.</p>
<p><a href="https://github.com/EddyVerbruggen/Custom-URL-scheme" rel="nofollow noreferrer">https://github.com/EddyVerbruggen/Custom-URL-scheme</a></p>
<p><a hr... | 2 | 3,871 |
Need assistance with Ionic 3 form group, cannot read property get of undefined | <p>I just made a register form, i used to use Form-Group in Angular 5, but with Ionic 3 i get the following errors:</p>
<p>1- Cannot read property 'get' of undefined.</p>
<p>2- ERROR Error: Uncaught (in promise): Error: formGroup expects a FormGroup
instance. Please pass one in.</p>
<pre><code> Example:
<div... | 2 | 1,272 |
How to retrieve data from a many-to-many relationship in hibernate? | <p>I have four tables as shown in the below diagram.</p>
<p><a href="https://i.stack.imgur.com/HhrvR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HhrvR.png" alt="enter image description here"></a></p>
<p>The relationship between restaurant and category is many-to-many. For that a new table named... | 2 | 2,411 |
Clover Code Coverage: Instrumenting Unit Tests | <p>I'm using Clover for code coverage and I have the following setup in my pom.xml file.</p>
<pre><code><plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>4.0.3</version>
... | 2 | 1,347 |
EnumSet serialization | <p>I've just lost a couple of hours debugging my app, and I believe I've stumbled upon a (another one o_O) Java bug... sniff... I hope it is not, because this would be sad :(</p>
<p>I'm doing the following: </p>
<ol>
<li>Creating an EnumSet <code>mask</code> with some flags</li>
<li>Serializing it (with <code>ObjectO... | 2 | 2,363 |
RabbitMqBundle connection not enstablished | <p>I installed <a href="https://github.com/videlalvaro/RabbitMqBundle" rel="nofollow">https://github.com/videlalvaro/RabbitMqBundle</a> in my sf2 project, with this configuration:</p>
<pre><code>old_sound_rabbit_mq:
connections:
default:
host: 'localhost'
port: 5672
user: 'guest... | 2 | 1,541 |
With Tkinter, how to position a dialog box at initiation OR how to auto-resize a window after geometry is set? | <p><strong>Disclaimer:</strong> In all likelihood this could very well be an XY problem, I'd appreciate if you would point me to the correct direction.</p>
<p><strong>Goal:</strong> I have a file that I'd like tkinter to read and then create widgets dynamically based on the file contents. <strong>I want the window to... | 2 | 1,849 |
How to determine local static variable in non-member function using dwarf | <p>Im trying to use dwarf to compare two c++ files, but I am running into issues when I get to local variables in non-member functions. Consider the following code - </p>
<pre><code>int f(){
[static] int j=0;
return j;
}
</code></pre>
<p>If I compile it <em>without</em> the <code>static</code> modifier I get ... | 2 | 1,492 |
python 2.7 installing packages using pip on windows returns SSL error | <p>The environment is python 2.7.15 on a Windows 7 PC (Win7 must be used due to user requirements). When attempting to install packages such as plotly and scipy, the below error is returned. </p>
<pre><code> Certificate did not match expected hostname: files.pythonhosted.org. Certifica
te: {'crlDistributionPoi... | 2 | 1,543 |
Overlay a bootstrap 4 transparent navbar over an image using flexbox | <p>I need to place a transparent bootstrap 4 navbar over a full screen image utilising flexbox. I need to be able to expand a carousel container (swiper.js) to fill the view port.</p>
<p>I have managed to expand the carousel container to fill the view port but the navbar does not appear transparently over it. To view ... | 2 | 1,166 |
I want to make a listview within a column take up all available space | <p>I am making a settings page and the layout is a container with a set height and then under it a listview however this listview needs a set height; so it works when I wrap it in a container and give it a height however it doesn't work if I wrap it in a expanded. </p>
<p>I have tried many things like putting it in a ... | 2 | 1,133 |
Xamarin Forms Activity Indicator not showing | <p>I'm developing a Xamarin Forms application. I want to show an ActivityIndicator while getting data & binding it to a ListView control from web API. In my code, ActivityIndicator doesn't show at all. I'm using Visual Studio 2017 with Xamarin 4.10. </p>
<p>Following is my code.</p>
<p><strong>Code Behind</strong... | 2 | 1,179 |
Black background instead of transparent on PNG images when processing them | <p>I'm having a script that is detecting weather it's a png image or jpeg, and also "removing" whitespace around images. </p>
<p>But I get a black background on all .png images. Why is that?</p>
<pre><code>//load the image
$logo = $json['Logotype'];
$image_type = getimagesize($logo);
if($image_type['mime']=='image... | 2 | 1,155 |
WebStorm : debugging typescript | <p><strong>Issue updated. Please check the edit</strong></p>
<p>I want to use the debugger included in Webstorm to run my project. I'm
using Angular2 and TypeScript. I need to place breakpoints into my typescript files.</p>
<p>Basically, my <code>index.html</code> just imports some .js files and starts my
app by call... | 2 | 1,078 |
Sorting multidimensional array without sort method? | <p>I was tasked with creating a 2D array (10-by-10), filling it with random numbers (from 10 to 99), and other tasks. I am, however, having difficulty sorting each row of this array in ascending order without using the array sort() method. </p>
<p>My sorting method does not sort. Instead, it prints out values diagonal... | 2 | 2,072 |
parse value is save in edittext field android | <p>Here i have to parse the value from pervious activity to next activity successfully...now i wish to need that value is save in my edittext field...how can i develop this..</p>
<p>In my code have to orderid value is parsed from previous activity and displayed in this activity.here the orderid value is save in my edi... | 2 | 2,248 |
Deploy on JBoss 7 with maven successful, but web-app not running | <p>I created a web app with maven for JBoss 7. During the maven tasks, a war gets created. This is my pom.xml</p>
<pre><code><?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="ht... | 2 | 1,905 |
How use provider in onGenerateRoute? | <p>How can i use my UserProvider in onGenerateRoute?
I want to check if user is logger using UserProvider.isLogged(), but when i trying to get Userprovider i must to pass context with i dont have in Router.</p>
<p>I already trying to change generateRoute to non-static and pass context by constructor to Router but it t... | 2 | 1,348 |
Django - fetch data from database to appear in dropdown list | <p>I have a calendar which is suppose to be connected to the current admins-association. When admin picks a date in the calendar by clicking on the mini-calender-plus-icon in the right-top corner:</p>
<p><a href="https://gyazo.com/a74a980a1676a5d961efb3a782f15ddb" rel="nofollow noreferrer">https://gyazo.com/a74a980a16... | 2 | 4,156 |
Angular filtering array of object if certain property is false? | <p><a href="https://i.stack.imgur.com/7SXPZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7SXPZ.png" alt="enter image description here"></a>
so i have an array of object i am ng-repeating and works beautifully, but i want to list the array of objects that have a property value of 'true' . i feel l... | 2 | 2,609 |
How to quit QApplication gracefully on logout? | <p>I have an application with notification area icon, so the main window may ignore close event. I am trying to save preferences and history on application quit. I also want to handle logout when the application is running. While the application is cross-platform, it is most convenient/useful in GNU/Linux, so Windows l... | 2 | 2,559 |
python string to function: globals() vs sys.module vs dictionary | <p>I want to know what is the best way to map the string to a function.
so far I know I can use:</p>
<ol>
<li>globals()[func_string]</li>
<li>sys.modules[__name__]</li>
<li>funcs_dictionary["func_string" : func]</li>
</ol>
<p>Here is the code:</p>
<pre><code> >>> def foo(arg):
... print "I'm foo:... | 2 | 1,186 |
MongoDB + Spring Data Converters with embedded objects | <p>I have a write converter as </p>
<pre><code>public class CarConverter implements Converter<Car, DBObject> {
@Override
public final DBObject convert(final Car car) {
DBObject dbo = new BasicDBObject();
dbo.put("_id", car.getId());
// below line produces error
dbo.put("wheels", car.getWheels())... | 2 | 1,215 |
Angular infinite digest loop with ui-router | <p>The problem I was initially trying to solve was to redirect a user to the login page if they are not logged in and vice versa.</p>
<p>I did this with the following code</p>
<pre><code>.run(function($rootScope, $http, AppService, $state) {
$rootScope.$on('application:refreshtoken', function(rootScope, token) {
... | 2 | 2,822 |
File export in jquery datatables using dropdown change event | <p>I developed a functionality for file export using <code>JQuery Datatable Collections</code>. When I click on a button e.g PDF (see image below), it exports Datatable as PDF file.</p>
<p><a href="https://i.stack.imgur.com/v052U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v052U.png" alt="enter ... | 2 | 1,231 |
Is it normal that my function onNewToken is never called? | <p>I followed the firebase procedure in order to implement my firebase notification with cloud messaging but it is not working</p>
<p>My log in the onNewToken() function is never called </p>
<p>I have the version 19.0.1 for com.google.firebase:firebase-messaging:19.0.1 and 17.0.1 for com.google.firebase:firebase-core... | 2 | 1,410 |
Why can't I access the context's methods or properties | <p>I am trying to use React's context api to manage a global state. When I try to invoke contextual methods or access contextual proprties, I get errors saying "this.context.setUser function does not exist" or "undefined".</p>
<p>I have however been able to hard code values into the state of the context and retreive ... | 2 | 1,125 |
@ComponentScan and @Autowired fail to inject from a specific package | <p>I am aware of the many similar questions about this issue on SO, however, non of them solved my problem. I have a Spring REST project and I am using Spring Tool Suite (STS) 3.5.1 RELEASE.</p>
<p>The application class:</p>
<pre><code>package com.example.rest;
@ComponentScan({"com.example.repositories", "com.exampl... | 2 | 1,614 |
React-Admin is populating my <List> with same element | <p><a href="https://codesandbox.io/s/kind-lovelace-225lk?fontsize=14&hidenavigation=1&theme=dark" rel="nofollow noreferrer">codesandbox.io</a></p>
<p>I'm trying to create a nice admin dashboard with <code>react-admin</code>.<br/>As using <code>spring</code> in my backend and this is how am sending data to <cod... | 2 | 1,049 |
cleaning up after using a SwingWorker | <p>NB This is not about terminating a worker thread. It's about the aftermath of a normal termination.</p>
<p>I'm calling <code>execute</code> in the EDT, so this spawns a "worker thread".<br>
I'm calling <code>worker.get()</code> in a <code>Callable</code> which I submit to an <code>ExecutorService</code>, specifica... | 2 | 1,177 |
Big Number Implementation in c++ | <p>I am trying to implement Big Number in c++ with strings.
First I am doing operator overloading for '+' operator, addition for digit length > 3 is coming correct but for less than 3 is giving garbage value after result. I am not understanding why this is happening.
Here is my code.</p>
<pre><code>#include<iostrea... | 2 | 2,914 |
Select records from table with inner join and where condition | <p>This is the first time I use the JOIN method and I don't get very well.
I have got this tables(<code>$SupportUserTable</code> and <code>$SupportUserPerDepaTable</code>):</p>
<pre><code>CREATE TABLE IF NOT EXISTS `razorphyn_support_user_departments` (
`id` BIGINT(11) UNSIGNED NOT NULL AUTO_INCR... | 2 | 1,214 |
Issue with Row Editing Plugin in Extjs | <p>I have a fully working liveSearchGridPanel in ExtJs. Error occurs when I edit any row. What Happens is that if the the updated row has to be resorted like in my case when I change the age of user (I am sorting on basis of age) row goes up or down in the grid, but the previous record remain there as well until I refr... | 2 | 1,271 |
Plot a 4 column data as dot plot in R | <p>I have a matrix in R like following</p>
<pre><code> H520KOR1 H520KOR2 H5202GyPHR1 H5202GyPHR2
ILMN_1702609 5.916239 6.068699 4.910235 4.983025
ILMN_1762631 5.490704 5.454779 4.573977 4.628981
ILMN_2193175 5.730220 5.726268 6.222486 6.273563
ILMN_3310451 4.955594 5.007212 4.423170 ... | 2 | 1,081 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.