title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Material-UI - TypeScript - Autocomplete with getOptionLabel and renderOption | <p>I am trying to display <code>member</code> and <code>company</code> using MUI <code>Autocomplete</code>.</p>
<p>I have <code>suggestion</code> array to show as <code>options</code></p>
<pre><code>[
{
"__typename": "Member",
"id": "ckwa91sfy0sd241b4l8rekas9jx&qu... | 2 | 2,592 |
Cannot be cast to java.util.List error while doing caching | <p>I am doing a simple caching in my springboot application. Here I am trying to perform findall,delete and update operations with JPA. At the same time I am trying to update my cache also after performing each operations.</p>
<p>This is my entity</p>
<pre><code>@Entity
@Table(name = "cars")
public class Cars impleme... | 2 | 1,482 |
Angular 2 router can't navigate to other route | <p>I have a project with angular 2. This project has a login service to authenticate user. This is my <code>loginService.ts</code> : </p>
<pre><code>import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { GlobalVariableService } from '../service/globalVariableService';
i... | 2 | 2,137 |
Remove item from populateViewHolder in firebaseRecyclerAdapter | <p>I am trying to remove item from firebaseRecyelerAdapter in populateViewHolder method. I am using <strong>item.setVisibility(view.GONE)</strong> but that again shows value when come back in that fragment.
here is my code:</p>
<pre><code>public class ChatsFragment extends Fragment {
private RecyclerView mConvList;
... | 2 | 3,292 |
WPF Add Button To Bottom Of Treeview | <p>this is probably going to seem like a daft question but please bear with me as I am very new to WPF, UI is sadly not my main area of skills and so I'm struggling to get my head around the concepts of WPF.</p>
<p>I have a user control which contains a dock panel which then contains a tree view, the tree view is bein... | 2 | 1,522 |
How can I access hashes within an array? | <p>I'm trying to use Nokogiri to grab some data from an XML file, then save it into the database.</p>
<p>The code I'm using is:</p>
<pre><code>def self.import_from_feed(feed)
doc = Nokogiri::XML(open(feed))
@products = doc.xpath('/merchantProductFeed/merchant/prod').map do |i|
{
'name' => i.xpath('text... | 2 | 1,167 |
wpf DataTrigger values not updating | <p>I am trying to make a simple Unity Standalone build launcher (for an arcade cabinet) - the setup is super-simple - joystick up and down highlights a game (in this case changing the fill colour of a rectangle and button1 lauches the correct game.
I foolishly thought I could do this simply in wpf, but have stumbled a... | 2 | 2,021 |
Debugging low memory crash (threads related?) | <p>I'm trying to debug a mysterious crash of my Android application that seems to occur in the low memory conditions. The sources of the app in question are available from <a href="https://bitbucket.org/stativ/chmupocasi" rel="nofollow">https://bitbucket.org/stativ/chmupocasi</a>. The application's package is <code>cz.... | 2 | 1,376 |
update UI from AsyncTask | <p>I created a custom <code>TextView</code> to show and images on it. I have to download the images and then show them on the <code>textview</code>. So I thought that I can do my job with a <code>AsyncTask</code> class. On the <code>doInBackground</code> I download and save the image on the Internal storage (for offlin... | 2 | 2,854 |
Django Makemigrations returns ModuleNotFoundError: with module name suffixed by 'django' | <p>I've been following the Python Crash Course 2e tutorial. I encountered a problem with makemigrations function from Django chapter(18). I created first app using startapp, and then tried to call makemigrations. It returns ModuleNotFoundError but it gives an app name suffixed by 'django'.
What I did was:</p>
<pre><co... | 2 | 1,496 |
Routing request to matching pages using guice servlets | <p>I am developing inherited jsp/java ee application and I would like to introduce Guice IoC container to my application. However, I found some obstacles. I can't translate web.xml entries into guice registrations if there are more then one routing to single servlet using different urls. Problem is with init-parameters... | 2 | 3,123 |
evaluating a postfix expression eg | <p>i am trying to evaluating a postfix expression, i can do it for characters, but tried to do it this time with numbers and not just single digits. here is my code, </p>
<pre><code>package test;
import java.util.Stack;
public class EvaluatePostfix {
public static int solution(String postfix){
Stack<Integer... | 2 | 1,058 |
Pip six.add_metaclass error | <p>A few days ago I started getting the following error when using pip (1,2 or 3) to install. </p>
<p>*</p>
<pre><code>Traceback (most recent call last): File "/home/c4pta1n/.local/bin/pip", line 7, in <module>
from pip._internal import main File "/home/c4pta1n/.local/lib/python2.7/site-packages/pip/_in... | 2 | 1,647 |
Error 400 invalid value in google apps group settings api | <p>I am trying to call a url with put request and the url is </p>
<blockquote>
<p>PUT <a href="https://www.googleapis.com/groups/v1/groups/groupUniqueId" rel="nofollow noreferrer">https://www.googleapis.com/groups/v1/groups/groupUniqueId</a> but
getting error response as { "error": { "errors": [ { "domain":
"glo... | 2 | 1,624 |
Highlight Points in Scatterplot w/ ggplot2 | <p>I need to create a qq plot of -log10 p-values in <code>ggplot2</code> where a subset of 137 points ("targets") are highlighted in gold using a colorblind-friendly palette I'm using called <code>cbbPalette</code>. I <em>cannot</em> do this in an alternate package because I eventually need to combine multiple qq plot... | 2 | 1,078 |
Scrapy POST Request with __VIEWSTATE not working javascript WebForm_PostBack | <p>Trying to do a simple Scrapy python script that will scrape data from a site that uses the web form likes this: </p>
<p><code>onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ctl00$ctl00$ContentPlaceHolderDefault$DivMainCPH$ctl01$NRANearYouControl_2$imgbtn_Locate&quo... | 2 | 1,404 |
Access violation reading location using GTest without any complicated testing | <p>I got stucked for a week on a problem that I cannot solve by my own.</p>
<p>DESCRIPTION:
My boss decided to implement C++ objects in C language, because he likes GTesting method (that cant use 90% of it's possibilities, because C doesn't containt objects).
I did it like wise people did in this website : <a href="ht... | 2 | 1,253 |
AttributeError: 'tuple' object has no attribute 'price' | <p>As a homework I have got to do a Linked List with Nodes as its objects while nodes would carry the <code>Car class</code> as their data. Not sure if I'm doing this right, but my friends tried to help me and this is what I have:</p>
<pre><code>class Car:
def __init__(self, identification = None, name = None, bran... | 2 | 1,219 |
angular ng-idle not working, unknown provider | <p>in my index.html, I include the file as</p>
<pre><code><script src="vendor/angular-idle.js"></script>
</code></pre>
<p>and in app.js</p>
<pre><code>angular.module('app', [ uirouter,
routing,
angularResource,
localStorage,
... | 2 | 1,114 |
fixed header table deform when resizing window | <p>this fixed-header table deforms column when resizing window horizontally. Is there way to stop that?</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<style>
table {
width: 100%;
table-layout: fixed;
border-collapse: collapse;
}
tab... | 2 | 1,234 |
Next button should get next record | <pre><code>package com.ctis.abc_final;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.... | 2 | 1,910 |
arrayAdapter = infinite loop? (cf: code) | <p>So i have 2 questions about this ArrayAdapter :<br>
1. the third parameter <code>List<RSSItem> list</code> in the constructor is automatically analysed in <code>getView</code>, and <code>position</code> will iterate through each item in this <code>list</code> ? (so the only important thing to do is call <code>... | 2 | 1,773 |
ng-dirty is not working as expected | <p>I am having tough time in understanding why my element shows <code>ng-dirty</code> after updating the model.</p>
<p>I have a collection of bridges which need to be rendered on UI. On each tab click, I am changing the index and rendering the data.</p>
<ol>
<li><p>If my first tab data has changed and moved to secon... | 2 | 1,393 |
I'm lost with trying to write tests to my Flask application | <p>So I've tried writing some tests for my Flask application for a couple of days but I can't get it to run. The tests pass but it gets stuck on PASSED.</p>
<p>I've cloned cookiecutter-flask (<a href="https://github.com/sloria/cookiecutter-flask" rel="nofollow">cookiecutter-flask</a>) and it runs webtest together with... | 2 | 1,087 |
Understanding Bomb Lab Phase 5 (two integer input) | <p>I am currently stuck on bomb lab phase 5. My phase 5 is different from most other phase 5's I've found online, as it is the input of two integers. Here is the assembly code:</p>
<pre><code> 0x0000555555555536 <+0>: sub $0x18,%rsp
0x000055555555553a <+4>: mov %fs:0x28,%rax
0x0000555... | 2 | 1,937 |
Exception in thread "main" java.lang.UnsatisfiedLinkError : A dynamic link library (DLL) initialization routine failed | <p>This is a very interesting problem. I get the mentioned exception after the <em>native</em> code prints some of it's statements. The exception thrown is :</p>
<pre><code>hookThreadHandle is not NULL
hookThreadHandle is not NULL
Exception in thread "main" java.lang.UnsatisfiedLinkError: W:\elita\jnitesters\
workspa... | 2 | 1,347 |
Reading currency Symbol as string in Java | <p>I actually need to import a <strong>csv</strong> file for currency in my <em>pgAdmin</em> database. My file is as follows;</p>
<p><a href="https://i.stack.imgur.com/sMsCe.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sMsCe.jpg" alt="enter image description here"></a></p>
<p>My code is as follo... | 2 | 1,703 |
JQuery AutoComplete TextBox from database using AJAX PageMethods in ASP.Net is not Working in Internet Explorer | <p>I need to make the AutoComplete TextBox from database using AJAX and I have tried this.</p>
<p>Html code...</p>
<pre><code><script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.10.0.min.js" type="text/javascript"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.9.2/jquery-ui.m... | 2 | 1,668 |
WPF List inside List Binding | <p>I am using nested ListBox for databinding,
This is my ListBox</p>
<pre><code><ListBox x:Name="lst1" ItemsSource="{Binding ListDS}" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Disabled" >
<ListBox.ItemTemplate>
<DataTemplate>
&... | 2 | 1,156 |
Artifactory Configuration in Jenkins Pipeline Job | <p>I am trying to configure the Artifactory in Jenkins Pipeline Job. I am referring to JFROG documentation for the same which mentions 3 ways to instantiate artifactory object:</p>
<pre><code>def server = Artifactory.server 'my-server-id'
def server = Artifactory.newServer url: 'artifactory-url', username: 'username',... | 2 | 3,523 |
OpenGL Z-Index Problem? | <p>I am drawing a cube with LWJGL library for Java, and it draws fine, but when I rotate the cube, it seems like the front side will draw on top of the back side when it should be cut off. Here is the code:</p>
<p>Init code:</p>
<pre><code>GL11.glViewport(0, 0, width, height);
GL11.glMatrixMode(GL11.GL_PROJECTION);... | 2 | 1,851 |
Coldfusion CFHTTP handshake_failure | <p>I am trying to send a SOAP request by CFHTTP with a client certificate. My test requests in SOAP UI are successful but when I try to send requests by CFHTTP I get the following error:</p>
<pre><code>I/O Exception: Received fatal alert: handshake_failure
</code></pre>
<p>My CFHTTP tag is like this:</p>
<pre><code>... | 2 | 2,086 |
Julia - the way of kings (generator performance) | <p>I had some python code which I tried to port to Julia to learn this lovely language. I used generators in python. After porting it seems to me (at this moment) that Julia is really slow in this area! </p>
<p>I made part of my code simplified to this exercise:</p>
<p>Think 4x4 chess board. Find every N-moves long p... | 2 | 1,823 |
Android AudioManager, after mute can NOT unmute it | <p>I build a simple video player in my App.</p>
<p>I only want to play the audio via the headset not speakers.</p>
<p>so, I do the following </p>
<p><strong>onCreate</strong></p>
<pre><code>AudioManager audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
</code></pre>
<p>....</p>
<pre><code>@SuppressW... | 2 | 1,359 |
Django-rest-auth - Angular - 500 internal error | <p>More or less, i am in the early stages developing an app that use Django Rest Framework and Angular.
I decided to use <a href="https://django-rest-auth.readthedocs.org/en/latest/" rel="nofollow">django-rest-auth</a> to manage all my user integration with my app. </p>
<p>As I am new in Angular, i don't want to use... | 2 | 1,376 |
Javascript not passing variable to PHP with HTML form | <p>I have contact form, that uses Javascript and PHP.</p>
<p>My problem is that the javascript does not pass its variables to the PHP script. I have discovered the following:</p>
<p>The variables does get set in the javascript, as it passes the variable check inside the javascript and by using alerts showing the vari... | 2 | 2,240 |
"Cannot Convert Lambda Expression to Delegate type" Error in RavenDB query | <p>I have a RavenDb document that looks like this:</p>
<pre><code>{
"ParentId": null,
"Order": 10,
"Url": "/sandbox",
"Rows":
[
{
"InstanceId": "2771a0d7-7f3f-4854-a3ba-27f25f88a45e",
"CSSClass": null,
"Columns":
[
{
"InstanceId": "b91495f5-b770-4da7-8073-ad3bd... | 2 | 1,250 |
c# WebService Compression | <p>I have an application that uses WebServices to send database records (as an array) to the client, yet even when sending only 1000 records it seems to be really slow.</p>
<p>The server is running on an IIS 7 and the client is a WPF application. Basically, how do I speed this up. Do I have to write a custom compressi... | 2 | 1,505 |
Hashing fields for Facebook Conversion API in C# | <p>I have successfully called Facebook Conversion API in C# using hardcoded sample data. Code below:</p>
<pre><code> HttpClient httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer",<MyToken>);
Int64 unitTimeStamp ... | 2 | 1,155 |
xcode iOS App Crashes after the renaming of view controller | <p><a href="https://i.stack.imgur.com/uuqyg.png" rel="nofollow noreferrer">Outlets</a> <a href="https://i.stack.imgur.com/8xHid.png" rel="nofollow noreferrer">Crash at Entry</a> Crash Image Screenshot</p>
<p><img src="https://i.stack.imgur.com/YudnR.png" alt="Crash Image Screenshot[1]"> </p>
<p>I am getting an crash... | 2 | 2,882 |
python error could not convert string to float | <p>We are getting this below error while migrating the data from slack channel to a file, when we execute the script for fetching the data for one day, it executing perfectly.</p>
<p>But when we execute the script for 2 months data, it gives 10 days data in separate file but getting throwing an error on particular dat... | 2 | 3,538 |
Spring boot with thymeleaf _csrf failing to initialize | <p>I am trying to setup a basic auth page with Spring (spring-boot).
When I disable CSRF protection the login works fine, but I get HTTP 405 for POST /login after authentication has complete. From my research it looks like that was because of CSRF was not enabled. I removed from my config <code>htto.csrf().disable()</c... | 2 | 2,115 |
Array "tree" creation from db table | <p>My php function </p>
<pre><code>function generateMenu($parent, $level, $menu, $utype) {
global $db;
$tree = array();
$stmt = $db->prepare("select id, parent, name FROM navigation WHERE menu=? AND user_type=?") or die($db->error);
$stmt->bind_param("ii", $menu, $utype) or die($stmt->error... | 2 | 1,212 |
Missing cookie in http response in android app | <p>I'm trying to make a request to server using apache <strong>HttpClient</strong> from android app and I'm getting response without headers <strong>Set-Cookies</strong>.
I've tried to do same thing on desktop application and it worked, I've received all headers.
What am I doing wrong? Help me, please to fix this probl... | 2 | 1,707 |
Can I load custom jsm modules in bootstrap.js of a restartless add-on? | <p>I'm trying to load a custom module in a restartless add-on, using the following:</p>
<p><strong>chrome/content/modules/Test.jsm</strong>:</p>
<pre><code>var EXPORTED_SYMBOLS = [ 'Test' ];
let Test = {};
</code></pre>
<p><strong>chrome.manifest</strong>:</p>
<pre><code>content test chrome/content/
</code></pr... | 2 | 1,136 |
jqGrid - cant select rows - Cannot call method 'indexOf' of undefined | <p>Thanks to Oleg, my jqGrid now looks like this, and works fine. (my problem after the code)</p>
<pre><code>var columnModel = [{ name: 'ID', index: 'ID', sortable: true, summaryType:'count', summaryTpl:'<b>{0} Item(s)</b>' },
{ name: 'FirstName', index: 'FirstName', sortable: true},
{ name: 'LastName', in... | 2 | 1,500 |
Can someone give proper explanation for ref vs controlled input and use case for state variable in react? | <p>I went through the docs of react, about controlled and uncontrolled components. I have created a simple use case where I want to enforce the user to enter only uppercase values in the input field.</p>
<p>In the first case I have used 'ref' with 'onChange' to achieve this and a global object's property to capture th... | 2 | 1,529 |
Hiding exceptions and printing decent message | <p>I have wrote a webservice in asp.net which just insert values into table via store procedure. Webservice is accessed via an android app. My service should just return TRUE (in case of insertion) or FALSE(in case of failed insertion) but it could also raise errors (exceptions) which looks weird and ordinary user cann... | 2 | 1,292 |
BIRT Report Unable to run | <p>I'm completely new to BIRT, but I'm trying to integrate it into some testing software. I downloaded the all-in-one package from eclipse for BIRT reporting (Windows 7, 64 bit). I've just started on my first report and I can't get the preview tab to display anything nor the web viewer. The only content on my report is... | 2 | 2,051 |
Is this a valid jquery callback function call? | <p>I executing a function like this,</p>
<pre><code><script type="text/javascript">
$(document).ready(function() {
getEntities("Clients/GetClients", 0, formatClientsResult);
var maxvalues = $("#HfId").val();
$(".pager").pagination(maxvalues, {
callback: getEntities("... | 2 | 9,143 |
Converting TFRecords and tf.Examples to commonly used data types | <p>I am learning to create TensorFlow Extended pipelines and find them greatly useful.
However, I have yet to figure out how to debug and test (tabular) data passing through these pipelines. I am aware TensorFlow uses TFRecords/tf.Examples, which are protobufs.</p>
<p>These able humanly readable by using a <code>TFReco... | 2 | 1,043 |
visitnum for unscheduled visits | <p>I am having the following data set: I am trying to assign the visit number for planned and unplanned visits according to the available date.If the date is different then I would like to increment the unplanned visit number (i.e:101.1,101.2). But if the date is same for unplanned visits then I would like to keep the ... | 2 | 1,160 |
Magento newsletter ajax request returns null | <p>I am trying to send a newsletter subscription request to Magento, but It returns null and nothing happens.</p>
<p>I've searched around and found very different URLs to post the request. And also grabbed the code from the file from base template.</p>
<p>In fact, maybe I am not sending the correct parameters or what... | 2 | 1,079 |
Call / Test Sorting Methods in Main Class | <p>For reference I am programming <code>Java</code> in <code>BlueJ</code>.</p>
<p>I am fairly new to the language and I am having trouble with sorting.</p>
<p>I am trying to call / test all of the 5 sorting methods in the main class. </p>
<p>I figured out how to call / test Quicksort:</p>
<pre><code>Sorting.quickSo... | 2 | 4,446 |
When importing Numpy from Flask in Virtualenv Numpy gives multiarray import error | <p>I'am trying to import numpy at flask <code>__init__.py</code> but it gives this error :</p>
<pre><code>Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under ve... | 2 | 1,920 |
How do you change android app theme colors with default phone settings? | <p>I'm new to android styles and themes, and I've looked at a a lot of different posts that don't seem to fix the problem I'm facing.</p>
<p>The solutions I've tried all seem to look almost identical to <a href="https://www.geeksforgeeks.org/how-to-create-a-dark-mode-for-a-custom-android-app-in-kotlin/" rel="nofollow n... | 2 | 1,784 |
PeekMessage triggers WndProc callback | <p>Yesterday I encountered the weirdest problem I have ever seen.
I wrote a module that should get a notification on USB plugs.
To do so, I created a dummy window and registered it to device change notifications using some interface's <code>GUID</code>.</p>
<p>The strange error occurs when <code>PeekMessage</code> is ... | 2 | 1,491 |
DirectX11 DXGI Capture Screen when in full screen | <p>I'm currently trying to develop a personal project where I will light up LEDs according to what's happening on the screen of my computer.</p>
<p>I've tried several solutions to capture my screen, and DirectX11 with DXGI is the fastest way I found to have a good FPS Rate.</p>
<p>My only issue is the following: When... | 2 | 2,034 |
Correct way to write/read data over a fifo | <p>I've created, as an homework, a big project which simulate a mailbox server (only through process on the same computer, so through fifo, it's a homework)</p>
<p>I can't post the project because is big (there are a lot of files), but I can say that sometimes I lost some data or it doesn't preserve it's integrity.</p... | 2 | 1,170 |
Want to login using email and mobile in codeigniter | <p>Controller:</p>
<pre><code>public function index(){
$this->load->helper(array('form', 'url','common'));
$this->load->library(array('form_validation','session'));
$data=array(
'header' => $this->load->view('frontend/assets/header', '', TRUE),
'footer' => $this... | 2 | 2,266 |
Using Spring Data JPA - how to save ONLY UNIQUE items in child entity while saving parent entity and using CascadeType=PERSIST | <p>I am preparing simple Spring app. I have 2 entities :
Book.class (parent) and Author.class (child): with @OneToMany from Author view and @ManyToOne(cascade=CascadeType.PERSIST) from Book view relations. While saving new Book - also Author is being saved and added to DB( mySql)- which is what I want. But I cannot und... | 2 | 1,101 |
$elemmatch not working in MongoDB | <p>I am trying to filter mongo data by using the below query in mongodb version 2.6.1 but getting error.</p>
<p>MongoDB version 2.4.6 (Working):</p>
<pre class="lang-js prettyprint-override"><code>> db.BC_1839.find({data: {$elemMatch:{$where : "this.First_name.toLowerCase().indexOf('kim') ==0"}}});
</code></pre>... | 2 | 1,267 |
Remove carriage return from form before writing to csv | <p>I have a php form that sends the results to an email and also writes to a csv file on the server that I download to use in openoffice calc.</p>
<p>The mailing works fine, and so does the writing except one aspect:
when people use the "enter" key (carriage return, right?) the new line is seen as another cell in open... | 2 | 1,778 |
Rails console issues using JRuby: no prompt character, no tab completion, broken arrow keys, etc | <p>I'm having various issues with my Rails console under JRuby, including</p>
<ul>
<li>No prompt character</li>
<li><kbd>Tab</kbd> completion not working (literal tab gets inserted)</li>
<li>Up/down arrows not browsing history (<code>^[[A</code> or <code>^[[B</code> gets inserted, respectively)</li>
<li>Left/right arr... | 2 | 1,086 |
The style on this component requires your app theme to be Theme.AppCompat | <p>I am trying to use this library <a href="https://github.com/jaiselrahman/FilePicker" rel="nofollow noreferrer">https://github.com/jaiselrahman/FilePicker</a>. When i start the activity using the following code i get an exception.</p>
<pre><code>Intent intent = new Intent(getApplicationContext(), FilePickerActivity... | 2 | 3,233 |
Java, creating two identical zip files if content are the same | <p>I have this, which works fine for zipping and unzipping: </p>
<pre><code> public static final String SLASH = "/";
public static void zip(int level, File zipfile, File... files) throws IOException {
try (FileOutputStream fo = new FileOutputStream(zipfile); ZipOutputStream zo = new ZipOutputStream(... | 2 | 1,449 |
Why am I unable to correctly retrieve and use a QTableWidgetItem? | <p>I looked up the documentation for creating QTableWidgetItems, and it says that I need to use the <code>item()</code> method.
"Returns the item for the given row and column if one has been set; otherwise returns 0."
Here is how I used it:</p>
<p><code>self.table.item(item.row(),1)</code></p>
<p>There definitely is... | 2 | 3,969 |
How to use "group by" with a polymorphic relationship in Laravel? | <p>I have the following relationship:</p>
<pre><code>return $this->morphedByMany('App\Models\Movie', 'listable', 'cnt_lists', 'list_id')->withPivot('id', 'order', 'updated_at')->where('movies.has_poster', true)->orderBy('order', 'desc')->withTimestamps();
</code></pre>
<p>That relationship produces thi... | 2 | 1,242 |
Using tweet search with Twitter+OAuth on iPhone | <p>Originally I needed the ability to use the search API with twitter. I did this using Matt Gemmell's great <a href="http://mattgemmell.com/2008/02/22/mgtwitterengine-twitter-from-cocoa" rel="nofollow">MGTwitterEngine</a>. That code was very very simple and looked something like this:</p>
<pre><code>- (void)viewDidLo... | 2 | 1,121 |
Unpacking hex-encoded floats | <p>I'm trying to translate the following Python code into C++:</p>
<pre><code>import struct
import binascii
inputstring = ("0000003F" "0000803F" "AD10753F" "00000080")
num_vals = 4
for i in range(num_vals):
rawhex = inputstring[i*8:(i*8)+8]
# <f for little endian float
val = struct.unpack("<f", b... | 2 | 1,391 |
apply custom styles to anchor tag inside div from code behind | <p>here i want to apply custom styles to anchor tag inside div from code behind.
here is my code.here am applying several styles. font family is applying but font color and font size is not applying</p>
<pre><code><div id="sidenav" style="height:600px" runat="server">
<ul id="abcd" runat="server" ... | 2 | 1,225 |
Creating configurations in Symfony | <p>For a few hours now I've been struggling to do the most simple thing you can imagine and it just won't work. I've read tons of stackoverflow questions, read the complete Symfony documentation on configuration files and with every article or other piece of information I read, it gets harder and harder to understand.<... | 2 | 1,125 |
ExecJS runtime error | <p>I have installed nodejs on ubuntu 12.04 server and I want to know why I have problems when compiling assets, when I go to the console <code>rails c</code> I run this</p>
<pre><code>ExecJS::Runtimes.best_available=> #<ExecJS::ExternalRuntime:0x0000000118cc88
@binary="nodejs",
@command=["nodejs", "node"],
@depr... | 2 | 2,955 |
error creating bean - JpetStore example | <p>Please help me resolve this</p>
<p>I am constantly getting this error
Error creating bean with name 'sqlMapClient' defined in ServletContext resource</p>
<p>Thanks </p>
<pre>
31 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
140 [main] INFO org.spr... | 2 | 2,177 |
JavaFx with Maven: doesn't find the mainClass | <p>I have a multi modules maven project and I have a problem with javaFx (I used the plugin zenJava).</p>
<p>When I want to build the jar, I have this error:
Failed to execute goal com.zenjava:javafx-maven-plugin:8.8.3:build-jar (default-cli) on project XXXX: The parameters 'mainClass' for goal com.zenjava:javafx-mave... | 2 | 2,131 |
java.lang.StackOverflowError in spring controller | <p>TreesController.java
This is my controller Methodenter code here</p>
<pre><code> package com.reveal.web.controller;
import java.util.List;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springfr... | 2 | 2,302 |
Application of the result set's fetch size kills the program | <p>This is a very interesting question for me, and I hope that you will help me solve it. I am making a query to select all rows from an Oracle DB table. There is used the oracle jdbc driver. To avoid connection timeout, queries are performed using rownum in increments of 100 rows. Everything would be fine, but the pro... | 2 | 2,130 |
set html content to TinyMCE editor content in ASP.NET MVC | <p>I have following controller method </p>
<pre><code> public ActionResult tinymce_editor()
{
return View();
}
</code></pre>
<p>Then I want to load some html content to TinyMCE editor content</p>
<p>this is the html content I want to load </p>
<pre><code><div>
<img src='http://localho... | 2 | 1,585 |
Serialize all properties in a class as attributes instead of elements | <p>I'm using XmlSerializer to serialize some classes to a XML File. Suppose I have this class: </p>
<pre><code>public class ClassToSerialize
{
public string PropertyA { get; set; }
public string PropertyB { get; set; }
public string PropertyC { get; set; }
}
</code></pre>
<p>if I serialize this class as i... | 2 | 1,118 |
OPA/Rego execute function for each element of an array | <p>I am new at OPA/Rego and I am trying to write a policy to check if an Azure Network Security Group contains all the rules that I define on an array</p>
<pre><code>package sample
default compliant = false
toSet(arr) = {x | x := arr[_]}
checkProperty(rule, index, propertySingular, propertyPlural) = true
{
object.g... | 2 | 1,877 |
What does this Windows 2008 Debug output mean | <p>I have a Windows 2008 R2 Virtual production machine, with VMWare tools installed. I have installed my .NET 4 windows service on the machine which does 10 to 20 HttpWebRequests every minute. I was looking at DebugView, and I see the following log. Once that kind of log shows up in debugview, my app stops working. It'... | 2 | 2,350 |
Password Hashing - Why salt 60,000 times | <p>I'm working for a Fortune 100 company and I'm thrown into being tasked with security moving from SHA1 to SHA-2 . This is not my area of expertise, but as I study cryptography I am questioning the outdated information etc...</p>
<ol>
<li><p>SHA-2 is obviously needed over SHA-1 but when the security team KNOWS that... | 2 | 1,601 |
creating checkbox with Dynamic forms in Angular 8 | <p>Hi I am building a dynamic form in Angular 8. So far everything is working fine, but I have trouble implementing a checkbox control. The checkbox control shows up, and I try to see if it is checked or not.</p>
<p>If it is set to true, in meta.json file, and I click it on the webpage, then the value becomes "true". ... | 2 | 4,258 |
SMTP: An error occurred while sending the message | <p>I have Gmail working in my iOS app via OAuth and IMAP/SMTP. If I use another account though the SMTP won't work. I've tried with a email account on a custom domain (through Host Gator) and with an outlook.com account. IMAP works fine, it's just sending that fails. I have checked connection logger and get the followi... | 2 | 2,059 |
How to ASP.NET Core 1.0.1 API HTTPS with Kestrel | <p>we want to implement an ASP.NET Core API (1.0.1) on an IIS Webserver (as proxy) which is runing on a Kestrel server.
Clients running agains the API should do this with an Certificate ussied by our company CA.
The user than should be authenticated by "Active Directory Client Certificate Authentication".</p>
<p>We ar... | 2 | 2,291 |
How to close this activity? | <p>I created my lockscreen application that trigerred by a SMS.. i have ListenSMS class that always listen for incoming SMS. Here's the code :</p>
<pre><code>for (SmsMessage message : messages) {
String tempMessage[] = message.getDisplayMessageBody().toString().split(" ");
//checking command dan password ... | 2 | 1,370 |
Event handler not firing anymore | <p>I have been at work this afternoon trying to use a backgroundworker to read from an pretty large xml File Located in my assembly. It has worked pretty well up till the point I decided to rename the backgroundworker's objectname. After I built my solution, it told me it was a success. After running my program and tes... | 2 | 2,416 |
Integrity constraint violation: 1048 Column 'cd_id' cannot be null in laravel | <p>SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'cd_id' cannot be null (SQL: insert into <code>commvendordata</code> (<code>new_date</code>, <code>cd_id</code>, <code>cn_id</code>, <code>unit_id</code>, <code>vender1</code>, <code>vender2</code>, <code>vender3</code>, <code>vender4</code>) values (07/17... | 2 | 3,191 |
Android Asynctask Socket Connection | <p>I have been working on a program that sends and receives a string via socket connection to a server. I have used Asynctask to open the connection and send the appropriate commands but no matter what nothing happens! I know the command sending to the server is definitely correct and the server information is correct ... | 2 | 1,613 |
slow opening an opened activity with FLAG_ACTIVITY_SINGLE_TOP | <p>I'm trying to use a floating widget that pops up when onPause is invoked and relaunch the activity when clicked , I used FLAG_ACTIVITY_SINGLE_TOP so it will not start a new activity , but it takes a lot of time to show the activity if it was already opened.</p>
<pre><code>package com.example.myapplication;
public ... | 2 | 1,935 |
Typescript - type safe deep omit, or: how to list legal object paths | <p>Alright, this is a long and very specific one. Would greatly appreciate any input.</p>
<p>I've written a recursive <code>Omit</code> type, which takes a type <code>T</code> and a tuple of strings (a 'path'), and indexes into <code>T</code>, removing the last item on the path and returning that type. </p>
<p>I've a... | 2 | 1,904 |
Lifetime parameter for `Self` in trait signature | <p>Consider this simple protocol implementation:</p>
<pre><code>#[derive(PartialEq, Debug)]
enum Req<'a> {
InputData(&'a [u8]),
Stop,
}
impl<'a> Req<'a> {
fn decode(packet: &'a [u8]) -> Result<Req<'a>, String> {
match packet.first() {
Some(&... | 2 | 2,246 |
Tomcat 8.5 - Error 403 Forbidden or empty params on POST request | <p>My web application consists of a html page which submits data to a java servlet that generates a pdf file from it.
On local testing and the test server everything worked fine, but since I use the production server, which is mapped to a registered subdomain together with a certificate and use of https, I got error <c... | 2 | 1,615 |
ConnectAsync() never finishes in C# Visual Studio | <p><strong>TLDR:</strong> Creating a UWP app for Raspberry Pi 3 Model B running Windows 10 IoT and <code>StreamSockets.ConnectAsync()</code> (RFCOMM) sometimes finishes and sometimes it takes an extraordinarily long time to fail ("No more data is available. (Exception from HRESULT: 0x80070103)") or just never finishes.... | 2 | 3,663 |
How to display a value in a PyQt text field using matplotlib's object picking function? | <p>I am using PyQt 4 for a basic GUI and matplotlib for a plot from which I want to read the coordinates of the plotted data points. Based on <a href="http://matplotlib.org/users/event_handling.html" rel="nofollow">these examples</a> (simple picking example), I have the simple problem that I cannot display the coordina... | 2 | 1,100 |
Vue unshift only repeats the last item | <p>My problem is same as this issue:</p>
<p><a href="https://laracasts.com/discuss/channels/vue/vue-unshift-only-repeats-the-last-item" rel="noreferrer">https://laracasts.com/discuss/channels/vue/vue-unshift-only-repeats-the-last-item</a></p>
<p>I have an array like this:</p>
<pre><code>remate: {id:1, lotes: [{id:1,... | 2 | 1,231 |
Javascript not running on Facebook iframe | <p>I have a django project which is intended for a facebook application. In the project, the invite friends module runs fine in localhost!</p>
<p><img src="https://i.stack.imgur.com/OUHr5.png" alt="Runs fine on localhost"></p>
<p>But while it is loaded in facebook application, the javascript responsible for displayin... | 2 | 1,764 |
Getting SSL handshake error while Enabling SSL in KAFKA | <p>I’m getting SSL handshake failed when I start producer to push data, did below settings:</p>
<pre><code>1. Followed steps as per
https://docs.confluent.io/2.0.0/kafka/ssl.html to create keystore
2. Started zookeeper with default settings
3. Made below changes in kafka server properties:
a. listeners=SSL... | 2 | 1,237 |
Calling 'created' method inside Jest tests on Vue.js | <p>I'm testing my <code>Activity.vue</code> component on Vue.js with Jest.</p>
<p>My <code>Activity.vue</code> component calls the <code>initializeTable()</code> method inside <code>created()</code> in order to initialize my <code>tableRows</code> property.</p>
<p>The problem is, when I run my tests, Jest does not ca... | 2 | 1,073 |
Configuration error: found multiple declarations of @BootstrapWith for test class for @WebMvcTest and @DataJpaTest | <p>I have an entitie <code>PetBE</code> and I want to write an end to end test where a request updates the database.</p>
<pre><code>@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "pets")
public class PetBE {
@Id
private long id;
@NonNull
private String name;
}
</code... | 2 | 3,069 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.