title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How to make an existing navbar with position fixed? | <p>I made the following nav bar for the website of a client. But just at the end Client told me to make this navbar fixed on top, Obviously it will take a lot of time and effort to build a navbar from scratch just to make it fixed on top. Is there any way I can make my existing navbar fixed on top by modifying CSS?</p>... | 2 | 1,534 |
One time setup no suitable constructor was found | <p>I am trying to unit test a class I have written which overrides the Authorization attribute. I am getting below error on this class. below is the code for the class.</p>
<pre><code>namespace MyApplicationTests.Unit.Attribute
{
[TestFixture]
public class CustomAuthorizeAttributeTests : AuthorizeCreditNote
... | 2 | 1,535 |
Grab array item from Xenforo user information Array | <p>I have a home page + xenforo forums.
I want to dispaly users information on homepage if hes logged in.</p>
<p>I found this great code:</p>
<pre><code><?php
define('XF_ROOT', 'forums/'); // set this (absolute path)!
define('TIMENOW', time());
define('SESSION_BYPASS', false); // if true: logged in user info and s... | 2 | 1,538 |
Multi-select dropdown with Many to many relation | <p>In my laravel project I created three tables as <strong>employees</strong>, <strong>teams</strong> and <strong>employee_teams</strong>. There is many to many relationship in "employee_teams" tables, with the foreign keys of <code>employee_id</code> and <code>team_id</code>.</p>
<p>"employee_teams" table DB structu... | 2 | 1,112 |
How to improve performance of single-page application? | <p><strong>Introduction</strong><br>
I have a (mostly) single-page <a href="http://domiy.com" rel="noreferrer">application</a> built with BackboneJS and a Rails backend.</p>
<p>Because most of the interaction happens on one page of the webapp, when the user first visits the page I basically have to pull a ton of infor... | 2 | 1,189 |
Android project won't work when compiled by Android Studio 4.0.1 | <p>This is a long story and I'm going try to provide as much details as I can.</p>
<p>I have been using android studio 3.x.x to built my apps over several months, until recently it started to offer me an update to the newest stable 4.0.1.</p>
<p>I updated and it was hassle free as it was supposed to be, all plugins up... | 2 | 1,192 |
Rancher , Kubernetes and StorageOS : Persistent Storage, volume mount issue? | <p>I need help with an issue. I have installed storagesos cluster on top of kubernetes. I am able to create volumes. But when I create PVC and mount them to my K8 pod the pod is stuck in container creating state. From what I could gather from logs is :</p>
<ul>
<li>The volume dir/folder which is mapped from volume to ... | 2 | 6,183 |
Angular2 + Openlayers3: Test fails when map renders. Writing tests impossible? | <p>I have create an Angular2 app (+Webpack). I added a component which shows an Openlayers3 map.It also adds a few markers and a polygon. I am reasonable happy with the functionality, but writing a test for it nearly proves impossible.</p>
<p>This is the test source code: ( I have not added any expect statements yet. ... | 2 | 4,480 |
ValueError Mixing apples and oranges: my.model() < False - Odoo v8 | <p>I have this wizard button, which saves fields as records on a table:</p>
<pre><code>@api.multi
def save_data(self, vals):
vals = {
self.name : 'name',
self.date_production : 'date_production',
self.type_prod : 'type_prod',
self.product_id : 'product_id',
self.qty_availabl... | 2 | 2,273 |
Indexing a txt file in Lucene | <p>I want to create a small search angine for tweets. I have a txt file with 20000 tweets. The file format is like:</p>
<blockquote>
<p>TommyFrench1<br/> 851<br/> 85170333395811123<br/> Lurgan, Moira,
Armagh. Derry<br/> This week we are double delight on first
goalscorers on the four Champions League matches in ... | 2 | 1,397 |
Datepicker keeps showing invalid when empty in Angular | <p>I have two radio options, under one radio there is a datepicker. The thing is once I click on the radio button with datepicker inside (I am replacing my current plan) and switch to another radio button (Plan option 2), the datepicker is still invalid and resulted my abcForm invalid. </p>
<p>step2.component.html</p>... | 2 | 2,186 |
Make angular ui-bootstrap datepicker the only way to add date to input | <p>I would like to disable key input and force the user to use the datepicker to add date to the input but I don't know how to do this.
In the current solution the user can select date but also type or erase the value directly in the input. I would like to disable the input, so the user can't type or erase anything, b... | 2 | 1,188 |
Can't get data from Dark Sky API | <p>I try to get information about the weather hourly from the Dark Sky API, but the code stops working at the if let data = hourly["data"] as? [String : AnyObject] line (checked with printing stuff after every line). I want to know what is wrong with my code. I think it could be something with the "data" let, but I don... | 2 | 1,337 |
Redis cluster on Docker Compose with network_mode host - Unable to connect to redis-cluster | <p>I set up a <strong>Redis</strong> cluster with 6 nodes as follows. From the <a href="https://redis.io/topics/cluster-tutorial" rel="nofollow noreferrer">redis-cluster documentation</a>, <code>network_mode</code> <code>host</code> must be used.</p>
<pre class="lang-yaml prettyprint-override"><code>version: "3.9&... | 2 | 1,790 |
How to apply persist data when clicking from Vuetify Data Table? | <p>Our application shows several thousand users in a Vuetify data able. We can search and sort to find users. Then, we can click on a user's name to open their profile.</p>
<p>The problem is that when we click "back" in the browser, the search/sort/pagination from the table is gone and we have to start over. It's real... | 2 | 1,099 |
How to add headers into fragment so whenever I click on header I can get another fragment? | <p>This is the simplest code which is provided to us when we use SettingActivity</p>
<pre><code> package com.example.amit.ak505;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.media.Ringtone;
im... | 2 | 4,233 |
I can not do my work Event - JSF - exception say Property 'sorteiaBotao' not found on type BotaoBean | <p>This is my code: botoes.xhtml</p>
<pre><code><?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelet... | 2 | 1,132 |
Swift - 1 screen to another screen | <p>I have set you my UI for both screens and I don't want to do the connect the screens in main.storyboard. I want to click a button and it will take to that screen, I will do the fade animations and stuff like that later. I just need to know how to go to one screen to the next screen when I press a button. I can give... | 2 | 1,117 |
User::where(user->id==$profile->id); get profile that is equal to user in controller | <p>If you set relation ships between the <code>User.php return $this->belongsTo('App\User');</code> and <code>Profile.php return $this->hasOne('App\Profile', 'user_id', 'id');</code> how can u get a corresponding user to the profile when you only get the Profile variables. <code>public function update(Request $re... | 2 | 1,300 |
Image in CSS grid won't resize to the max. size | <p>I am trying to create an HTML modal and I wanted to create the base HTML and the CSS in an external file first.</p>
<p>The final output should look this:</p>
<p><a href="https://i.stack.imgur.com/ph5D5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ph5D5.png" alt="Design Mock"></a>
Design Mock
... | 2 | 5,774 |
remove_if on a map trying to pass a const as a non-const - why? | <p>Here's a bit of code which is supposed to filter out the elements of a map which satisfy a predicate, into a new map (MCVE-fied):</p>
<pre><code>#include <algorithm>
#include <unordered_map>
#include <iostream>
using namespace std;
int main() {
unordered_map<string, int> m = { { "hello... | 2 | 1,137 |
TinyXml append to xml file | <p>I have been working on a project for a few months now and my main issue i am having right now is appending to an xml file. I can create the files no problem. But i want to be able to add more data. Basically use it like a small database.</p>
<p>The code included is only a small part of the whole program but i belie... | 2 | 1,036 |
Trying to create a one user program that is password protected | <p>I am working on creating a C# application that will allow the one and only user to create an account with user name and password. So only this user can access it. As it sits now I have it connected to a local SQL database with a table for login information. I have a form where the user can create an account. It ... | 2 | 1,519 |
Asp.net mvc 5 with closedxml. not able to export to excel. getting virus detection message | <p>I am trying to export data to excel using closedxml api but getting virus detected error on export</p>
<p>My code is below</p>
<pre><code>[HttpGet]
public ActionResult ExportToExcelNew()
{
string sheetName = "Report";
var userClaims = DbAccessWebApiHandler.GetUserClaimAccess... | 2 | 2,200 |
Bukkit Using Multiple Classes | <p>I'm trying to learn Java & Bukkit at the same time ( I have learnt some basic Java previously a few months back and made a simple text game).</p>
<p>I know what I'm doing when I'm using 1 class but, as you may know, everything became messy so I'm re-coding everything but attempting to make it a lot cleaner but ... | 2 | 1,143 |
Cannot assign "...'": "..." must be a "User" instance | <p>models.py for assistance</p>
<pre><code>class AssistanceQuest (models.Model):
Customer = models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.CASCADE,blank=True,null=False)
Status = models.BooleanField(default=False,null=False,blank=False)
Date_request = models.DateTimeField(auto_now_add... | 2 | 1,321 |
Axios PUT request -React | <p>I want to send a put request to modify the command part of my JSON file. Here is my JSON;</p>
<pre><code>{
"users": [
{
"hostname": "xxx.xxx.xxx.xx",
"password": "password1",
"command": "command1",
"id": 1
... | 2 | 1,066 |
No module named flask, despite having it installed | <p>New to flask and python here. I've written a simple python app, but when i run <code>python app.py</code>, I get <code>ImportError: No module named flask</code>. </p>
<p>app.py:</p>
<pre><code>from flask import Flask
app = Flask(__name__)
def hello():
return "Hello World!"
if __name__ == "__main__":
app.... | 2 | 1,056 |
Android webview not loading URL for second time | <p>I have dynamic URL that I load into a webview. I have used a WebChromeClient to handle java script events as I need to redirect the user depending on the events from the javascript in onJsAlert(). The webpage is loading for the first time. When I go back and load the same url, its loading. But, when I complete the a... | 2 | 1,299 |
GML and GeoJSON vector layer can not display in Firefox and Chrome | <p>I have following codes. It works perfectly in IE (GML and GeoJSON vector layer was loaded), but not in Firefox and Chrome without any errors noticed. Please help me to fix this problem.</p>
<p>Here is the code with GML vector layer (I just used built-in layer in Geoserver, so you can download and test it without an... | 2 | 2,095 |
How to remove white space gap between body content and footer? | <p>After researching this topic a bit, I've found that this is a fairly common question to ask, but a solution varies depending on the theme. I contact my theme's developers, but have not received a response.</p>
<p>I've looked through my theme's CSS and haven't been able to find how or where to get rid of this white ... | 2 | 2,341 |
Pyinstaller with encryption results in TypeError cannot be passed to C code | <p>I want to compile an exe with encryption (to prevent "casual" decompiling).</p>
<p>I am able to compile with Pyinstaller v2.1 in one exe file using a spec file, when I don't use encryption.</p>
<p>But, when I add the following line to the .spec file to introduce encryption (pycryptodome ):</p>
<pre><code>block_ci... | 2 | 1,721 |
D3js: upgrading v3 to v5 | <p>I'm starting to code in D3 javascript and I really don't know so much. I found a very nice example in Internet of a bar chart updating with dropdown and start to study and make one or two modifications. This example is in version 3 of D3 and I wanted to make it works on version 5. Could someone give me any tips on w... | 2 | 3,644 |
SonarQube doesn't add JavaScript coverage | <p>We have a multi module maven project that has Java and JavaScript sub projects.
For SonarQube analysis we have added configuration to JavaScript module.</p>
<pre><code><sonar.sources>src</sonar.sources>
<sonar.exclusions>src/test/**/*, src/**/resources/simple/**/*</sonar.exclusions>
<sona... | 2 | 1,282 |
Post C# MultipartFormContent application/octet-stream Winform HttpClient | <p>I am trying to post one or more files from my local machine to an API with <code>HttpClient</code>, <code>MultipartFormContent</code> and ContentType: <code>"application/octet-stream"</code> but when i do postSync and call an API from a local Winform application, the result of the task (<code>var response = task.Re... | 2 | 1,300 |
Reusable remote modal Rails | <p>I am trying to create a reusable remote modal. The idea is to create a model container and render content with <code>yield</code> into it and render content when needed.</p>
<p>Note: all <code>HTML</code> code will be written in <code>HAML</code>. I am using <a href="https://github.com/vicentereig/bootstrap-modal-r... | 2 | 1,745 |
How to group items inside custom control combobox? | <p>I've been trying to group the items of my custom control combobox using xaml and I'm a little stuck. I've been reading around and found the following code that produces the results I want, but I'd like to move all the code into the GroupedImageComboBox control.</p>
<pre><code><StackPanel>
<StackPa... | 2 | 3,991 |
document.addEventListener 'copy'.. working, but element.addEventListener 'copy' .. does not work | <p>I am using PrimeFaces 7.0 and want to enable a Java Script eventListener for the "copy" event, as described here:</p>
<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/copy_event" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Web/API/Element/copy_event</a></p>
<p>When I atta... | 2 | 5,857 |
Grouping elements based on a preceding-sibling processing-instruction | <p>I am trying to use a key to group <code><p></code> elements based on whether they have a specific processing-instruction as a first preceding sibling, but I am having no luck. </p>
<p>For the following example input, I would like each <code><p></code> that has a first preceding-sibling processing-instru... | 2 | 1,440 |
AsyncTask, doInBackground never runs in android | <p>When i try to start my doinbackground to wait for an incoming message it never really run thru it just skips over it</p>
<pre><code>public class Incomingdata extends AsyncTask<Void,Void,Void>
{
Socket s ;
String input;
public Incomingdata(Socket socket)
{
super();
this.s =... | 2 | 1,902 |
Who (and how) create an instance of AppWidgetProvider? | <p>upd2. The problem has gone after a sort of black magic routine (uninstall, clean Eclipse project, reboot Android device, rebuild, install, run). It is not solved, it has gone. Could anyone please explain what has happened?</p>
<p>upd. Seems, no Java code running at all in my Android widget project modeled after Hel... | 2 | 1,901 |
Radiobutton display problems with PDFBox | <p>I used the code from the answer from this question to create my radiobuttons:
<a href="https://stackoverflow.com/questions/34867139/how-to-create-a-radio-button-group-with-pdfbox-2-0">How to Create a Radio Button Group with PDFBox 2.0</a></p>
<p>After I created my PDF and tried to read the (programatically) selecte... | 2 | 2,114 |
Python: Reducing the RAM usage in a large file read-store-operate-write program | <p>I have a python program here that converts a DIMACS cnf format file to PLA format. I am reading the CNF clauses from a file and storing them in a list and then running operations on the list elements.
The Program works fine for smaller file with upto 15,000 lines (clauses) but the system runs out of memory when I tr... | 2 | 1,762 |
Get Image file tag values with Ajax (jquery version) and show the result as the real-time previewer | <p>I believed it is possible for me to simplify me previous project Click <a href="https://stackoverflow.com/questions/18145838/get-ajax-variable-from-the-php-foreach-loops">here</a>!
to build an upload previewer so the editor can use it to see what he puts before upload to the server. (just a simple previewer without ... | 2 | 1,874 |
Select option filtering in Thymeleaf | <p>I have one to many relationship, one EmployeeDTO has many RedeemAccountDTO. I have a web page with a full list of RedeemAccountDTO objects. I want to filter those object records with select options where I have a list of employeeDTO objects. I've implemented back-end part, but I have a hard time with Thymeleaf. Firs... | 2 | 11,995 |
Error on adding Signature using Spring WS Security | <p>I am having an issue on using the Spring WS-Security on my application. Goal is to include a Signature, UsernameToken and Encrypt on my XML SOAP request. But I got this errors:</p>
<pre><code> 12/01/16 14:41:41 - [main] ERROR org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor - Could not secure ... | 2 | 3,311 |
PHP PDO: SQL query not returning expected result | <p>I have a function (see bottom) in PHP, which queries a MySQL database.
When I use the following values:</p>
<ul>
<li>$map => 1,</li>
<li>$limit => 10, </li>
<li>$from => 0, </li>
<li>$to => CURRENT_TIMESTAMP</li>
</ul>
<p>With the SQL statement:</p>
<pre><code>SELECT user,
scoreVal AS score,
UNIX_T... | 2 | 1,494 |
Calculating Confidence Intervals for two datasets | <p>Quite the number of questions I've made today.</p>
<p>I'd like to calculate the <strong>Confidence Interval</strong> (99% level, not 95) <strong>for the mean value of variable age</strong> of two dataframes, <code>infert_control</code> and <code>infert_patient</code> where:</p>
<pre><code>infert_control = subset(i... | 2 | 1,556 |
cordova-plugin-crop error on cropping 404 | <p>I am using Ionic 2 and <a href="https://github.com/jeduan/cordova-plugin-crop" rel="nofollow noreferrer">cordova-plugin-crop</a> to crop an image.</p>
<p>If I <strong>take a photo</strong> (<code>pictureSourceType === navigator.camera.PictureSourceType.CAMERA</code>), the cropping works fine, but if I <strong>pick ... | 2 | 1,033 |
GDAX/Coinbase API Level3 orderbook - skipping messages | <p>I'm using the GDAX API <a href="https://docs.gdax.com/#the-code-classprettyprintfullcode-channel" rel="nofollow noreferrer">Websocket Stream</a> to try and create a copy of the full LEVEL3 orderbook. </p>
<p>I've got a very simple implementation using WebSocketSharp and Im basically doing something like this.</p>
... | 2 | 1,389 |
How to create a proxy for HTMLELement | <h1>Question</h1>
<p>How to create a proxy for browser native DOM object?</p>
<hr>
<h2>Background</h2>
<p>I want to intercept the settings for the element style. So I create a proxy for the DOM object. However, it causes error when I use some function like <code>getComputedStyle()</code>.</p>
<pre class="lang-js p... | 2 | 1,087 |
create multiple excels with multiple sheet using ExcelLibrary in C# | <p><a href="https://i.stack.imgur.com/iyu44.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iyu44.png" alt="enter image description here"></a></p>
<p>I want to export the data in multiple sheets with multiple excel files. As you can see in my image I want to generate sheets as <code>ID</code> change... | 2 | 1,191 |
These errors are preventing my nodejs app from loading | <p>I am getting these errors while rendering the page.
My project is based on NodeJs + React.</p>
<p>I'm using these version.
react version : ^16.5
react-dome : ^16.5
@material-ui/core : ^4.9.1
@material-ui/icons : ^4.9.1"</p>
<p>First error:</p>
<pre><code>Tooltip.js:479 Uncaught TypeError: Cannot read property '... | 2 | 1,611 |
WPF MVVM Chart change axes | <p>I'm new to WPF and MVVM. I'm struggling to determine the best way to change the view of a chart. That is, initially a chart might have the axes: X - ID, Y - Length, and then after the user changes the view (either via lisbox, radiobutton, etc) the chart would display the information: X - Length, Y - ID, and after a ... | 2 | 1,808 |
Sparklyr split string (to string) | <p>Trying to split a string in sparklyr then use it for joins/filtering</p>
<p>I tried the suggested approach of tokenizing the string then separating it to new columns. Here is a reproducible example (note that I have to translate my NA that turns into a string "NA" after copy_to to actual NA, is there a way not havi... | 2 | 3,704 |
Adding a specific quantity of the product to the cart in django | <p>I have a problem because I have no idea how to implement 'adding a specific amount of product to cart'.
Currently, after pressing the 'Add to cart' button, a single quantity of product is added. </p>
<p>I don't know how to relate to this in the view and the template.</p>
<p>I would like it to take the value given ... | 2 | 1,150 |
NOT NULL constraint failed: snippets_choice.post_id | <p>am trying to use the POST method here but it is throwing me an error. </p>
<p>this is Models.py:</p>
<pre><code>from django.db import models
class Post(models.Model):
post_text=models.CharField(max_length=200)
def __str__(self):
return self.post_text
class Choice(models.Model):
post=models.F... | 2 | 1,131 |
How do I make items in the ListBox as headers of GridView | <p>I have a <code>ListBox</code>, on_button click, I want all the items in the <code>ListBox</code> to be displayed as headers in the <code>GridView</code>.
Here is the code that i have tried :</p>
<pre><code>protected void DONE4_Click(object sender, EventArgs e)
{
Panel7.Visible = true;
DataTable... | 2 | 1,332 |
No parameterless constructor defined for this object | <p>I am getting the following error on the index page:</p>
<p>==
No parameterless constructor defined for this object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.</p... | 2 | 2,586 |
Spring - migrate from DAO-Service architecture to JPA | <p>I have web MVC written using Spring. I used separate dao and service classes.</p>
<p>My old code:</p>
<pre><code>@Repository
public class RoleDaoImpl implements RoleDao {
...
}
@Service
@Transactional
public class RoleManagerImpl implements RoleManager {
...
}
@Controller
public class HomeController {
@Autow... | 2 | 1,507 |
Python - Calling popen with many arguments | <p>I'm attempting to call popen with a list of arguments.</p>
<pre><code> execString = "java -jar {} {} {} {} {} {}".format(os.path.join(config.java_root,
config.java_jar),
self.canvasSize,
... | 2 | 1,039 |
SML : Count the number of '\n' in a String | <p>I'm quite new in Standard ML and I have a question that will probably be obvious to someone who knows how to code in this language.</p>
<p>I've got an original function as follow : </p>
<pre><code>fun getBlocked w =
case BlockingMgr.listBlockedSuccessors w
of nil => ""
| ws =>
concat (
... | 2 | 1,772 |
How to Trigger a Function when Returning to an HTML5 Page ? (javascript) | <p>I'm going <strong>back and forth between two html pages</strong> - in my example Page1 and Page 2. <strong>When I move back from page 2</strong> to page 1, I <strong>want</strong> to <strong>trigger</strong> a <strong>rebuild-my-html</strong> type <strong>function</strong> - similar to the way that 'onload' is trigg... | 2 | 2,215 |
How to avoid Edeliver deployment error: "vm.args: No such file or directory"? | <h2>Context</h2>
<p>We are trying to use <code>edeliver</code> to deploy a "Hot Upgrade" of a Phoenix Web Application to a remote Virtual Machine instance. </p>
<p>Our aim is to build an "upgrade" version of the app each time so that the app can be "hot" upgraded in production without any down-time.</p>
<p>We have s... | 2 | 1,356 |
Prohibit collision of a movable QGraphicsItem with other items | <p><strong>Final Edit</strong></p>
<p>I figured out the issue and posted a solution as an answer below. If you have stumbled here from google looking for a decent way to move QGraphicsItems / QGraphicsObjects via the <code>ItemIsMovable</code> flag while avoiding collision with other nodes, I included a working <code>... | 2 | 2,225 |
Flutter/Firestore - Streambuilder and Firestore with realtime listener | <p>I'm trying to set up a Firestore stream inside a stream builder like how they showed in their doc but when I update a doc or delete one it doesn't get reflected on the screen. The logs gets updated but not the actual screen.</p>
<p>Code:</p>
<pre><code>// Chats API file
Stream<List<Message>> messagesSt... | 2 | 1,420 |
Real-time data transfer from Python to MATLAB | <p>I am using python to read data from a USB input device. I would like to know if there is a way this could be exchanged with the model in MATLAB real-time. How I do it now is to save the data read in a .mat file and then let the model read it from there, which is not very intuitive.The code I use for this is as below... | 2 | 1,080 |
MXNET - Invalid type '<type 'numpy.ndarray'>' for data, should be NDArray, numpy.ndarray, | <p>I am having trouble with basic IO with <code>mxnet</code>. I am attempting to use <code>mxnet.io.NDArrayIter</code> to read in-memory datasets for training in mxnet. I have the below code (condensed for brevity) which preprocesses the code and attempt to iterate through it (heavily based on the <a href="https://m... | 2 | 1,315 |
Flex special characters not embedding | <p>I am using the following code to embed Arial into my application:</p>
<pre><code>[Embed(source='../assets/fonts/Arial.ttf',fontFamily='CustomFont',fontWeight='regular',
unicodeRange='U+0020-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+0080-U+00FF,U+0100-U+017F,U+0400-U+04FF,U+0370-U+03FF... | 2 | 1,179 |
Laravel return value of a specific column in a relationship | <p>I am extremely new to Laravel. You could help me with a small problem:
I can not return in a collection, only the value of a specific column in a relation defined in the model. I will explain:</p>
<p>I have 2 tables:</p>
<p>1 - Tomos</p>
<p>2 - Documents</p>
<p><strong>Migrations:</strong></p>
<p>1- Tomos</p>
... | 2 | 1,713 |
RSA encryption on xcode | <p>I'm trying to encrypt a piece of text with RSA using a public key.</p>
<p>This is the code so far:</p>
<pre><code>//EncViewController.h
#import <UIKit/UIKit.h>
@interface EncViewController : UIViewController
{
SecKeyRef publicKey;
NSData *publicTag;
}
- (void)encryptWithPublicKey:(uint8_t *)pla... | 2 | 5,194 |
HTTP Status 500 - Unable to compile class for JSP: for using jsp mongodb | <p>i am new to jsp and Mongodb I have to search data from mongodb based on my input in search field using jsp</p>
<p>here is my code </p>
<p>NewFIle.jsp</p>
<pre><code><%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML... | 2 | 4,341 |
Error inflating class com.google.ar.sceneform.ArSceneView | <p>I have an error this is my Logcat</p>
<pre><code>2020-07-26 12:14:50.756 30507-30507/com.tuto.myapplication E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.tuto.myapplication, PID: 30507
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tuto.myapplication/com.tuto.myapplication.MainActivity... | 2 | 6,238 |
Android Compound View: cannot make child view match parent | <p>I have created a custom view (compound view) that is inherited from FrameLayout and contains several child views in it:</p>
<p>MediaComponentView.java:</p>
<pre><code>final public class MediaComponentView extends FrameLayout {
private int ratio = 1;
private ImageView imageView;
private CircularProgres... | 2 | 1,960 |
GWT 2.4 DataGrid - Header not aligned with Data, When Horizontal Scroll Bar shows up | <p>The table header is not aligned with the data when the horizontal bar shows up.</p>
<p>If there's no scrolling then the header is aligned correctly.</p>
<p>Tested with GWT2.4 on</p>
<p>IE8 Windows7 and IE7 WinXP</p>
<p>With Chrome it works.</p>
<p>Is there a work around?
Am I doing something wrong?</p>
<pre><c... | 2 | 1,965 |
Selenium not finding element by link text | <p>I try using
driver.find_element_by_partial_link_text('2019')
but I get an error saying it was unable to find the element. I also tried using find_element_by_link_text('') and using the whole line but it wont work.
Ideas?</p>
<pre><code>driver.find_element_by_partial_link_text('2019').click()
</code></pre>
<p>... | 2 | 1,839 |
androidx.recyclerview.widget.RecyclerView$LayoutParams cannot be cast to androidx.constraintlayout.widget.ConstraintLayout$LayoutParams | <p>I have an Activity which xml layout contains Constraint layout and Linearlayout, RecyclerView as it's child layouts.</p>
<p>I have a button tied to an onCLick listener on the adapter, every time a click is performed. The application crashes and logs this error.</p>
<pre><code>2019-09-11 09:52:19.713 22060-22060/co... | 2 | 9,906 |
angular2 how to unit test pipe needing mock service | <p>I'm trying to write a unit test for a Pipe that takes in an object as a parameter. This object is created from a mock service. </p>
<p>Is it possible to use a mock service when unit testing a pipe? Do I have to include the component that uses the pipe in the test?</p>
<p><strong>PIPE</strong> - this pipe basically... | 2 | 1,391 |
codeigniter CRUD operations with search and user defined per_page | <p>I'm designing a page which will have a facility to search and display result into a table with pagination and user has given a freedom to chose number of rows to be displayed per page.</p>
<p>Controller contain following function:</p>
<p><strong>settings_admin.php</strong></p>
<pre><code> function view_company... | 2 | 2,667 |
Change background color of an anchor tag when clicked, which is inside listview, asp.net | <p>I have a master page in which i have a listview which contains anchor tags.</p>
<p><strong>The problem is that I want to set the BackgroundColor only of the clicked anchor tag. The others should be default</strong></p>
<p>I am populating the data from database for the anchor tags.</p>
<p><strong>MasterPage.aspx</... | 2 | 4,261 |
Solr slave replication server won't start | <p>Hey guys, I have 2 Solr servers set-up, the master is identical to the slave except for the 4 lines of XML that make it a master.</p>
<p>The slave however errors when you try to start it, I have the following set-up to make it a slave:</p>
<pre><code><requestHandler name="/replication" class="solr.ReplicationHa... | 2 | 2,716 |
React get value from key:value array | <p>Beginner question. I know this is a simple question but I haven't been able to get this to work. I'm passing an object which holds an array of k:v pairs to a component. Eventually this props will contain multiple k:v pairs, but for now I'm just passing the one.</p>
<pre><code>[{goal: 20000}]
</code></pre>
<p>In the ... | 2 | 1,572 |
Update Values in Excel Named Ranges using Microsoft Graph API | <p>I have an Excel file loaded into Office 365 that is accessible via the Microsoft Graph API with many named ranges, some are individual values, some are blocks of cells.</p>
<p>I can successfully update individual values using the API, but when I try to update multiple cells at the same time, I run into problems.</p... | 2 | 1,569 |
Flask, Nginx, Gunicorn Stack Launching Selenium instance | <p>I have a user who I have added to the <code>www-data</code> group. I have a service setup to run an API that launches a Selenium instance. I am able to launch the code as my user, but the web app fails to launch. I originally had problems with Xvfb but after adding the path to the environment of the service file it ... | 2 | 1,962 |
Grouping by Quarters with Mondrian / MDX: Behavior of Sum and Count vs Avg | <p>I'm trying to aggregate (Sum and Average) over groups of quarters, but I'm getting different results depending on which method I use. I'd like to understand why.</p>
<p>The following basic query illustrates my data (Pentaho SteelWheels sample):</p>
<pre><code>SELECT {Measures.Sales, Measures.Quantity} ON COLUMNS
... | 2 | 1,791 |
React router always renders first route in nested component | <p>In the component rendered by react-router i have another routes. However, from these nested routes always only first route is rendered regardless actual path.
I read about update blocking and tried to wrap components into withRouter() but it didnt help.</p>
<p>I read about update blocking and tried to wrap componen... | 2 | 1,028 |
Unique contraint violation on OneToMany relationship | <p>I have a <code>City</code> entity and a <code>Person</code> entity. I want to setup a <code>OneToMany</code> relationship from Person to City indicating which cities a person has lived in. Its a uni-directional OneToMany relationship from Person.</p>
<p>My City class looks like this</p>
<pre><code>@Entity
public c... | 2 | 1,044 |
Get bluetooth data from a scale device | <p>i am using this plugin : <a href="https://github.com/don/cordova-plugin-ble-central" rel="nofollow noreferrer">https://github.com/don/cordova-plugin-ble-central</a></p>
<p>i can scan bluetooth devices, my scale is detected and i can connect to it
but i can't get any data from the device.</p>
<p>what is the process... | 2 | 1,646 |
null pointer Exception in ViewRoot.draw(boolean) in android | <p>here is my code
getting null pointer Exception in ViewRoot.draw(boolean) in android</p>
<p>the logcatView </p>
<pre><code>Travellog [Android Application]
DalvikVM[localhost:8616]
Thread [<1> main] (Suspended (exception NullPointerException))
ViewRoot.draw(boolean) line: 1546
Vi... | 2 | 2,994 |
minimizing non-convex function with Nelder-Mead | <p>I am using <code>scipy.optimize.minimize</code>, with the default method ('Neldear-Mead').
The function I try to minimize is not strictly convex. It stays at the same value on some significant areas.</p>
<p>The issue that I have is that the steps taken by the algorithm are too small. For example my starting point h... | 2 | 3,094 |
Pager Sliding Tab Strip with Buttons and Edit Text for appropriate tab | <p>I referred this <a href="https://github.com/Ashkan-Sarlak/pager-sliding-tab-strip-edited" rel="nofollow">Pager Sliding Tab Strip</a>.I am getting the output as it is.</p>
<p>But my only problem is I didn't know how to add the button for categories tab,Textview for Home tab,Edittext for Top Paid tab.</p>
<p>There I... | 2 | 1,910 |
How to speed up the 'Adding visible gpu devices' process in tensorflow with a 30 series card? | <p>I get stuck with that for ~2 minute every time I run the code. Many people on the Internet said that it would only take a long time in the first run, but that's not my case. Although it doesn't make anything go wrong, it's pretty annoying. When I'm stuck, the system is under pretty low usage, including the CPU, syst... | 2 | 5,122 |
Holding a pointer to a C function inside a Fortran derived type | <p>I have a Fortran DLL which is called from a C program, and one of my procedures needs periodically to call a callback function which is supplied by the C program. I currently have it working well in its 'simple' form, but I'd like to be able to store my callback pointer inside a derived type, so that it can be passe... | 2 | 1,963 |
Code Igniter CRUD app: thumbnail image doesn't upload. Receive database error because NULL | <p>Making a form that will accept a bunch of textual data and an image upload.</p>
<p>Keep getting this error when adding new item to both tables:</p>
<blockquote>
<p>Error Number: 1048</p>
<p>Column 'id_path' cannot be null</p>
<p>INSERT INTO <code>thumbnails</code> (<code>id_path</code>, <code>id_data_r... | 2 | 5,397 |
Undefined method `contacts_path' in Rails with Spree | <p>I'm trying to add a contact form to my spree-based site. Here's the error I have currently:</p>
<pre><code>Showing /Users/louisstephancruz/loosecanon/app/views/spree/contacts/new.html.erb where line #7 raised:
undefined method `contacts_path' for #<#<Class:0x007fe8a4703de0>:0x007fe8a4702670>
</code... | 2 | 1,664 |
socket hang up when doing several http requests inside my flow | <p>I'm having an issue in Node-red when in my flow I have several http requests to another services in my node-red. As far as I can see the error always comes when I do the second call to the same domain (i.e.: localhost, although it could be with another domain)</p>
<p>As summary: I have 2 different flows:</p>
<ul>
... | 2 | 7,824 |
understanding request per second on apache bench | <p>I am trying to understand the performance benefit gained by gevent, and wanted to measure this quantitatively. Based on <a href="https://stackoverflow.com/questions/333664/simple-long-polling-example-code">this SO answer</a> I created a simple django app that has a sleep for 3 seconds in a simple view. </p>
<p>When... | 2 | 2,661 |
backbone.js this.[method] is not a function | <p>I'm having an issue with a helper function inside my Backbon.js View. When it's run, it dies with the following error message about the first line of the "addCalc" function:</p>
<blockquote>
<p>TypeError: this.getCalcValue is not a function</p>
</blockquote>
<p>It's really puzzling because in the "initialize" f... | 2 | 1,521 |
Chronologically sorting date time (YYYY-MM-DD) series with precision down to the level of day | <p>I have a pandas datetime series column (in string format) that I would like to have chronologically-sorted. Since the original series are already converted to the YYYY-MM-DD timestamp format like the following:</p>
<pre><code>0 1993-03-25
1 1985-06-18
2 1971-07-08
3 1975-09-27
4 2000-02-06
5 ... | 2 | 1,089 |
Windows singly linked list (_SINGLE_LIST_ENTRY) | <p>I'm just doing some debugging on a Windows 7 crash dump, and I've come across a singly-linked list that I'm not able to fully understand.</p>
<p>Here's the output from WinDBG:</p>
<pre><code>dt _GENERAL_LOOKASIDE_POOL fffff80002a14800 -b
....
0x000 SingleListHead: _SINGLE_LIST_ENTRY
+0x000 Next: 0x000000000022... | 2 | 2,401 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.