title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Changing a JButton text when clicked | <p>I have created a class which extends JDialog, where I have some checkboxes and 3 buttons: accept, cancel, and select all.</p>
<p>When user clicks select all, every checkbox should get checked, and if clicked again, every checkbox should get unchecked. That's working fine, but i also want the text of the button to c... | 0 | 1,240 |
How to run a cron job on a CodeIgniter controller that all the URL does is run a query from an API, update the DB & send emails (from within CI)? | <p>I have a web application that runs a query on an api, gets new information, changes the variables in the database and sends emails if needed (compares old and new variables). </p>
<p>I work with Ubuntu Server, and I tried several variations to run this. </p>
<p>my controller looks like this:</p>
<pre><code>class... | 0 | 6,354 |
how we can add menu item dynamically | <p>hi frnds am creating an application which is a tab application.</p>
<p>in my Home which extends sherlockFragmentActivity, i am inflating menu.xml and includes code for on optionMenuitem click listener. The Fragmentactivity contains tabhost and on each tab it load fragments.
this is my menu.xml</p>
<pre><code><i... | 0 | 1,153 |
javax.mail.MessagingException: Could not connect to SMTP host? | <p>following is my code to send mail:</p>
<pre><code>import java.util.Properties;
import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.Message.RecipientType;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
... | 0 | 1,684 |
Hibernate : No CurrentSessionContext configured | <p>I'm stuck due to some silly mistake somewhere but not able to figure out !</p>
<p><strong>Hibernate 4.2.6</strong></p>
<p>I have referred to this question, asked several times previously, for example <a href="https://stackoverflow.com/questions/761480/hibernate-no-currentsessioncontext-configured">here</a></p>
<p... | 0 | 3,191 |
Visual Studio 2012 IIS Express 8 Fresh Install - Can't Connect | <p>On Visual Studio 2010 + IIS Express 7 I was able to use IIS Express as a server and browse sites.</p>
<p>I've since installed Visual Studio 2012 (on Windows 7 64-bit) with IIS Express 8, and I can't browse a single site on it. In addition, when I look at the log files (\Logs and \TraceLogFiles) I don't even see a s... | 0 | 1,369 |
error C3861: '_T': identifier not found , unable to pass in main function parameters as function parameters | <p>I am following this <a href="http://www.emailarchitect.net/easendmail/kb/vc.aspx?cat=2" rel="noreferrer">guide</a> on using C++ to send emails. I followed the instructions and it works perfectly fine</p>
<p>This is the sample code on how to send emails using the program , I have changed the email address and passwo... | 0 | 1,658 |
unable to decode stream java.io.FileNotFoundException /storage/emulated/0 open failed:ENOENT(No such file or directory | <p>hello i'm trying to save pictures taken on my application, but when i try to access the memory to place the data, an error comes out</p>
<p>unable to decode stream java.io.FileNotFoundException /storage/emulated/0 open failed:ENOENT(No such file or directory)</p>
<p>this is my code.</p>
<pre><code> Cam... | 0 | 2,101 |
Dyld: Library not Loaded Error Mac OS | <p>Hoookay,</p>
<p>So I know I'm about to get a dozen "load the lib dummy" answers to this, but here goes...</p>
<p>junk.framework is exporting some objects of another project (junk.app) so I can use it on a remote.app node on a cluster. I can compile junk.framework (which I realize means nothing anymore with dynami... | 0 | 1,055 |
SAPUI5 routing - Control with ID idAppControl could not be found | <p>first at all, I´m aware that there were similiar asked questions, but none of the answers could solve my problem.</p>
<p>Short look into my code:</p>
<p>My Component.js looks like this</p>
<pre><code>routes: [
{
pattern: "", //home page
name: util.Constan... | 0 | 1,609 |
Shape of placeholder in Tensorflow | <p>I'm using Tensorflow for a short time. Here is my problem :
I load AlexNet weights to do fine tuning on it, so i give batch of size 50.
So i defined :</p>
<pre><code># Graph input
x = tf.placeholder(tf.float32, [50, 227, 227, 3])
y = tf.placeholder(tf.float32, [None, 40])
</code></pre>
<p>I give a batch of 50 ima... | 0 | 1,214 |
openpyxl KeyError Worksheet {0} does not exist | <p>I know you probably have seen this title, but please dont mark as duplicate as my error is different. I am making an excel comparing program with openpyxl and using tkinter to make the UI more friendly. Here is my code:</p>
<pre><code>import openpyxl
from tkinter import *
from tkinter.filedialog import askopenfilen... | 0 | 1,131 |
how to use Architecture Components ViewModel inside RecyclerView Adapter? | <p>I have multiple ViewHolders that work as separated views inside a vertical RecyclerView. I'm practicing with the new Architecture Components ViewModel.</p>
<p>Inside my ViewModel I have a couple of MutableLiveData lists that i want to observe, but how can I call</p>
<pre><code>ViewModelProviders.of((AppCompatActiv... | 0 | 1,627 |
Using a for loop in a Mocha Test | <p>I'm new to mocha, and I wanted to try using a for loop to create test cases. I want to test a function that I've made that takes an input of standard 12 hour time, and outputs it into 24 hour military time. This is what it looks like.</p>
<pre><code>exports.main = function(time) {
var hr = parseInt(time.substr(0,... | 0 | 1,680 |
Spring Boot test class wont inject beans | <p>I am using the following dependencies:</p>
<pre><code>apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'war'
compile("com.caucho:resin-hessian:4.0.23")
compile("mysql:mysql-connector-java")
compile('org.springframework.boot:spring-boot-starter-web... | 0 | 2,058 |
Bus Routes Algorithm | <p>I'm trying to solve the following question:
<a href="https://leetcode.com/problems/bus-routes/" rel="nofollow noreferrer">https://leetcode.com/problems/bus-routes/</a></p>
<blockquote>
<p>We have a list of bus routes. Each <code>routes[i]</code> is a bus route that the i<sup>th</sup> bus repeats forever. For example... | 0 | 2,434 |
The non-abstract class 'InternalSelectableMathState' is missing implementations for these members | <p>/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_math_fork-0.3.3/lib/src/widgets/selectable.dart:407:7: Error: The non-abstract class 'InternalSelectableMathState' is missing implementations for these members:</p>
<ul>
<li>TextSelectionDelegate.copySelection</li>
<li>TextSelectionDelegate.cutSelection</li>... | 0 | 1,153 |
Rails: Can't verify CSRF token authenticity | <p>My Rails app suddenly started giving me the following error:</p>
<pre><code>Can't verify CSRF token authenticity
ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
</code></pre>
<p>I haven't made any changes to the app, so I'm totally flummoxed as to what's causing this issue.... | 0 | 13,289 |
Python Remove element from json if value exists | <p>I have a rather large geojson file which is converted from some National Weather Service data. I've trimmed it down to this sample here:</p>
<pre><code>{
"properties": {
"name": "day1otlk"
},
"type": "FeatureCollection",
"features": [
{
"geometry": {
"type": "Polygon",
"coordin... | 0 | 3,525 |
Asynchronous UITableViewCell Image Loading Using GCD | <p>I'm currently trying to load a UITableView list of Flickr Photo (cs193p iOS Stanford, assignment 5). To avoid UI blocking event, I've deferred the thumbnail download of each cell into a different queue (but do update the UI back in the main queue). This code doesn't asynchronously load the images, though does add a ... | 0 | 1,376 |
xsl:variable xsl:copy-of select | <p>I have the following XML:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<XmlTest>
<Pictures attr="Pic1">Picture 1</Pictures>
<Pictures attr="Pic2">Picture 2</Pictures>
<Pictures attr="Pic3">Picture 3</Pictures>
</XmlTest>
</code></pre>
<p>Wh... | 0 | 1,299 |
How do I fix a repository with one broken revision? | <p>My home server had a hard drive failure.</p>
<p>Once I realized the disk was going, I logged in and did a straight copy of my repository, which contains multiple projects.</p>
<p>However, since the disk was failing, one of the revisions is broken:</p>
<pre><code>$ svnadmin verify master/
[...]
* Verified revision... | 0 | 1,143 |
passing dropdown value to update parameter for ASP.Net Gridview | <p>I have a gridview that, when in edit mode, I use a dropdown to load all provinces, however, when I change the province and click update, my page crashes...I'm not sending the province parameter to the gridview's updateparameters properly...here's my code, someone please help..</p>
<pre><code> <asp:Gri... | 0 | 5,463 |
How to return the SelectList from SelectListItem? | <p>I am Working with DropdownList in mvc4. I need to return a selectlist to bind the dropdown on edit, but I am getting an error <code>"Cannot implicitly convert type 'System.Web.Mvc.SelectList' to 'System.Collections.Generic.List<System.Web.Mvc.SelectList>"</code>. So kindly help me to convert to SelectList <... | 0 | 1,225 |
Google Maps Fragment returning null inside a fragment | <p>So I have an empty fragment that contains a map fragment. Whenever I try to activate the fragment containing the map, my app crashes and returns a null pointer error on this line:</p>
<pre><code>map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))
.getMap();
</code></pre>
<p>Full E... | 0 | 2,194 |
How to set up a Login Dialog in Android? | <p>I was trying to add a login in my edit button. What I want to do is that, when a user selected an item to edit, then hits the edit button a pop-up will show asking for the person's username and password. I tried making a login dialog but I keep on failing.</p>
<p>Here is my code:</p>
<pre><code>public void btn_edi... | 0 | 1,162 |
How to Dynamically set text to TextView? | <p>I want to display the connected ssid and ip address when the activity starts. It contais an image view (for title, because i'm not using the action bar) and 4 text view (ssid label, ssid value, ipaddr label, and ipaddr value)</p>
<p>I've tested the codes for obtaining the ssid and the ipaddr and they worked well. T... | 0 | 1,505 |
How to pass Java textfield to an array list? | <p>Guys, kindly help me how to pass the values of my inputs in my JTextField(ID,LastName,FirstName,Course,Year) into my ArrayList without replacing the existing elements.
At the same i'll be using my ArrayList stored values to append in my JTextArea(summary)</p>
<pre><code>////// PALOS TEXTFIELD
List<Form> myLi... | 0 | 2,442 |
GDB: Print the value of memory address | <p>According to <a href="https://www.ethicalhacker.net/columns/heffner/intro-to-assembly-and-reverse-engineering" rel="nofollow noreferrer">https://www.ethicalhacker.net/columns/heffner/intro-to-assembly-and-reverse-engineering</a></p>
<pre><code>mov 0xffffffb4,0x1
</code></pre>
<blockquote>
<p>moves the number 1 i... | 0 | 1,124 |
JavaFX open a new scene | <p>I want my code to work such that when I click on a Button, a new scene opens, but it doesn't work and I don't know why.</p>
<pre><code>public void start(Stage primaryStage) throws Exception {
window = primaryStage;
Parent root = FXMLLoader.load(getClass().getResource("FXML/LoginScene.fxml"));
scene = n... | 0 | 2,153 |
Editing Word Doc Programmatically C# | <p>C#, Visual Studio 2010, .NET 4.0</p>
<p>I'm trying to edit a word doc template and searching for specific strings and replacing them with values from my C# program. I've tried using Microsoft.Office.Interop.Word and things work really well, if Office 2003 or greater is installed on the environment. Problem is, th... | 0 | 4,632 |
MariaDB: Installing MariaDB: unmet dependencies, mariadb-server-10.0 | <pre><code> ubuntu:~$ sudo apt-get install mariadb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required pa... | 0 | 1,036 |
bad value for type long: - Postgresql, Hibernate, Spring | <p>I wanna store an entity(a String + an image) in PostgresQL using Spring MVC and Hibernate
Here is my table. The image is supposed to be the type of oid.</p>
<pre><code>CREATE TABLE document
(
name character varying(200),
id serial NOT NULL,
content oid, // that should be the image
CONSTRAINT document_pkey... | 0 | 1,147 |
Problem Deserializing with Jackson using JAXB annotations in Spring MVC | <p>I'm having trouble getting Jackson to correctly deserialize json into an object when calling a service (specifically we're using Jackson's ability to use JAXB annotations since we also want the service to use XML). I'm using Spring MVC and I'm using the RestTemplate class to make calls to the service. </p>
<p>Here ... | 0 | 1,994 |
How to dispose managed resource in Dispose() method in C#? | <p>I know Dispose() is intended for unmanaged resource, and the resource should be disposed when it is no longer needed without waiting for the garbage collector to finalize the object. </p>
<p>However, when disposing the object, it suppress finalization of the garbage collector (GC.SuppressFinalize(this); in the cod... | 0 | 1,373 |
Property 'children' is missing in type | <p>I am trying to setup Storybook with Typescript using <a href="https://github.com/babel/babel-loader" rel="noreferrer">babel-loader</a> and <a href="https://github.com/TypeStrong/ts-loader" rel="noreferrer">ts-loader</a>.</p>
<p>Everything works fine except using <code>children</code> in a React component:</p>
<pre... | 0 | 1,344 |
android build error Failed linking resources | <p>I uninstalled a previous version of android and just have install version3.0.1 I created a new application in android studio scratch I have not modified any code but when I try to build the project I get the following errors </p>
<pre><code>Error:resource style/Theme.AppCompat.Light.DarkActionBar (aka com.example.a... | 0 | 1,484 |
Parse a date string into a certain timezone (supporting daylight saving time) | <p>Ok i've been working very hard the last few weeks and i've come across a small problem. I don't think my mind is quite up to the task right now :) so i need some tips/help! it's likely very simple but my head isn't clicking yet.</p>
<p>Users will enter a date and time in AEST. There is also a application set "defau... | 0 | 2,533 |
OkHttp javax.net.ssl.SSLPeerUnverifiedException: Hostname domain.com not verified | <p>I've been trying for days to get this working. I'm trying to connect to my server over <strong>https</strong> with a self signed certificate. I don't think there is any pages or examples that I haven't read by now. </p>
<p>What I have done:</p>
<ol>
<li>Created bks keystore by following this tutorial: <a href="htt... | 0 | 1,309 |
Attempting to use gevent library in Python: "ImportError: cannot import name core" | <p>I'm attempting to use the <a href="http://code.google.com/p/gevent/" rel="nofollow noreferrer">gevent</a> library in a Python app I'm writing. However, both easy_install and installing it manually appears to be failing. Any suggestions?</p>
<pre><code>Python 2.6.2 (r262:71600, Aug 5 2009, 10:31:21)
[GCC 4.1.2 20... | 0 | 3,244 |
IntentService is deprecated, how do I replace it with JobIntentService? | <p>Following <code>FetchAddressIntentService</code> implementation with <code>IntentService</code> (in kotlin): </p>
<pre><code>class FetchAddressIntentService //Constructor of this service
: IntentService(INTENTTAG) {
//Receiver where results are forwarded from this service
protected var resultReceiver: ... | 0 | 1,687 |
autoscroll to bottom of multiline textbox being updated by backgroundworker | <p>I have a background worker control that is set to perform a task, and update a multiline text box on my main UI using a delegate procedure. this is all working perfectly, however once the updating scrolls off the bottom of the text box, the scroll bars appear, but the continuous refreshing causes the text box to sta... | 0 | 1,133 |
Symfony forms - Expected argument of type , "string" given at property path | <p>I get this error message:
Expected argument of type "App\Entity\Artist or null", "string" given at property path "artist".</p>
<p>This is the code of my form in symfony</p>
<pre><code>$builder
->add('date', DateType::class, [
'widget' => 'single_text'
])
->add('artist',... | 0 | 1,352 |
Problems implementing the new GCM Client for Android | <p>I'm trying to implement the new <code>GCM Client</code> on Android following the guidelines from Google (<a href="https://developers.google.com/cloud-messaging/android/client" rel="noreferrer">https://developers.google.com/cloud-messaging/android/client</a>).
I'm receiving slightly different errors for two different... | 0 | 3,904 |
Flask-restful API Authorization. Access current_identity inside decorator | <p>I use flask-restful to create my APIs. I have used <code>flask-jwt</code> for enabling authentication based on <code>JWT</code>. Now I need to do authorization.</p>
<p>I have tried putting my authorization decorator. </p>
<p><strong>test.py (/test api)</strong></p>
<pre><code>from flask_restful import Resource
fr... | 0 | 1,025 |
Android: how evenly space components within RelativeLayout? | <p>I am trying to organize 3 LinearLayouts, such that one is justified to the left, one to the right, and the 3rd is between the two with equal amount of blank space on either side. I think I wrap these in a RelativeLayout to accomplish this. Then set one layout to alignParentLeft and the 2nd layout to alignParentRi... | 0 | 1,736 |
How to set the row names of a data frame passed on with the pipe %>% operator? | <p>I have a data frame which I am <code>dcast</code>ing using the <code>reshape2</code> package, and I would like to remove the first column and have it become the row names of the data frame instead.</p>
<p>Original dataframe, before <code>dcast</code>:</p>
<pre><code>> corner(df)
ID_full gene cpm
1 S36-A1... | 0 | 1,066 |
gsl::not_null<T*> vs. std::reference_wrapper<T> vs. T& | <p><a href="https://github.com/isocpp/CppCoreGuidelines">C++ Core Guidelines</a> has been presented recently (congrats!) and I am concerned about <code>gsl::not_null</code> type. As stated in <a href="https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#-i12-declare-a-pointer-that-must-not-be-nu... | 0 | 1,024 |
DataTable Bootstrap is not working with AngularJs | <p>I'm trying to use DataTable Bootstrap with AngularJs, but DataTable works like there is no data in the table. In the code below, I've got two tables. The first one uses AngularJs and the second is only plain HTML.</p>
<p>What do I need to do to make the first table work like the second?</p>
<p>Thanks, People!</p>
... | 0 | 9,334 |
UseSelector State is Undefined | <p>The page does not render, citing <code>TypeError: state is undefined</code>, tracing back to this line in <strong>SelectForm.js</strong>: <code>const filter = useSelector(state => state.filter);</code>.</p>
<p>I've spent hours trying to figure out what I'm doing wrong. I've tried createSelector but that didn't w... | 0 | 1,093 |
how to get getServletContext() in spring mvc Controller | <p>I need to upload images in my project. How to get the upload path in SpringMVC.
The path is;</p>
<pre><code>/home/cme/project/eclipse/workspace_12_11/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/fileUploadTester/upload
</code></pre>
<p>The following error;</p>
<pre><code>The method getServletCon... | 0 | 1,036 |
Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.0.1:rpm (default-cli) on project inv-project | <p>I am getting the error below while creating an RPM of my Maven Project.</p>
<p>I am able to package the Jar successfully but RPM creation is failing.</p>
<p><strong>Note:</strong> I am trying on Windows 7</p>
<pre><code>[WARNING] operable program or batch file.
[INFO] ---------------------------------------------... | 0 | 2,072 |
squid ssl-bump 3.5.4: error - Error negotiating SSL connection on FD 10: Success (0) | <p>I am trying to install squid 3.5.4 (on docker, running debian 8) and run it in ssl-bump mode.
Compilation:</p>
<pre><code>./configure --prefix=/opt/squid --srcdir=. --disable-maintainer-mode \
--disable-dependency-tracking --disable-silent-rules --enable-inline\
--disable-arch-native --enable-async-io=8 \
--enable-... | 0 | 1,879 |
Parse data from SOAP response in Android | <p>I have the following soap output:</p>
<pre><code>tabResponse
{
tabResult=anyType
{
schema=anyType
{
element=anyType
{complexType=anyType
{
choice=anyType
{
element=anyType
{
complexType=anyType
{
sequence=anyType
{
e... | 0 | 2,543 |
DevExpress export GridView to Excel | <p>I really need help with this.. I can't find any example on the internet
I am using DevExpress GridView I need to send it to excel and I'm getting problems to loop to every cell and column because DevExpress contains different methods then the DataGridView</p>
<p>that's the code that i'm trying to write.. I really A... | 0 | 1,134 |
EL1007E: Property or field 'fieldName' cannot be found on null | <p>Good evenning i no longer have a solution ..Ive been hesitating to ask for help but Im litteraly at a dead end .
Im working on a Spring boot 2.0.5 Spring MVC 5.0.9, ThymeLeaf 3.0.9 project that needs to be delievered in few weeks ..I have encountered a problem for some weeks now ...did my research and tried every po... | 0 | 2,086 |
Pass values of checkBox to controller action in asp.net mvc4 | <p>I want to test if the checkbox is checked or not from my action method. What I need is to pass checkbox value from view to controller.</p>
<p>This is my view:</p>
<pre><code>@using (Html.BeginForm("Index", "Graphe"))
{
<table style="width: 100%;" border="1">
... | 0 | 1,198 |
Codeigniter and charsets | <p>I'm using Codeigniter not for so long but I've some charset problems.. I'm asking around at the CI Forum, but I want to go further, still no global solution: <a href="http://codeigniter.com/forums/viewthread/204409/" rel="nofollow noreferrer">http://codeigniter.com/forums/viewthread/204409/</a></p>
<p>The problem w... | 0 | 1,822 |
Whitelabel Error Page There was an unexpected error (type=Not Found, status=404). /WEB-INF/views/home.jsp | <p>I am following Spring in Action (part 2) and trying to create the Spittr application as the book shows.
<code>(with Spring Tool Suite 7.3.7. and Maven.)</code></p>
<p>The problem is that I am getting the following error:</p>
<blockquote>
<p>Whitelabel Error Page.</p>
<p>This application has no explicit map... | 0 | 2,900 |
Not able to start zookeeper | <p>I am trying to manually start zookeeper. I run </p>
<pre><code># source zkServer.sh start
</code></pre>
<p>It outputs:</p>
<pre><code>JMX enabled by default
Using config: /opt/zookeeper-3.4.6/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
</code></pre>
<p>When I run <code>#jps</code>, it outputs</p>
<pre><c... | 0 | 2,283 |
How to redirect users to a specific url after registration in django registration? | <p>So I am using django-registration app to implement a user registration page for my site. I used Django's backends.simple views which allows the users to immediately login after registration. My question is how do I redirect them to my other app's page located in the same directory as the project. </p>
<p>Here is wh... | 0 | 1,708 |
Angularjs - simple form submit | <p>I am going through learning curve with AngularJs and I am finding that there are virtually no examples that serve real world use.</p>
<p>I am trying to get a clear understanding of how to submit a form with the most standard components and pass it on to a PHP file.. </p>
<p>My <a href="http://jsfiddle.net/bYeZQ/10... | 0 | 1,275 |
Multiple files upload in Codeigniter | <p>I want to upload multiple files using single element. So I try this example. </p>
<p><a href="https://stackoverflow.com/questions/11524356/multiple-files-upload-array-with-codeigniter-2-0">Multiple files upload (Array) with CodeIgniter 2.0</a></p>
<p>This is my form</p>
<pre><code><form enctype="multipart/form... | 0 | 1,817 |
Cannot resolve external dependency com.android.tools.build:gradle because no repositories are defined | <p>I'm having problems while compiling my project, caused by the <code>build.gradle</code> file.</p>
<p>The error message that I have is the following: </p>
<blockquote>
<p>Cannot resolve external dependency com.android.tools.build:gradle because no repositories are defined.</p>
</blockquote>
<p>I don't understand... | 0 | 6,830 |
Javascript onsubmit="" not working | <p>I'm not sure if my error comes from submitting the form to itself via PHP but it is just not hitting my function and submits anyway no matter what is returned. I'm not sure what I'm missing here. This is my form</p>
<pre><code><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/... | 0 | 1,068 |
C++ cout printing slowly | <p>I noticed if I print out a long string(char*) using cout it seems to print 1 character at a time to the screen in Windows 7, Vista, and Linux(using putty) using Visual C++ 2008 on Windows and G++ on Linux. Printf is so much faster I actually switched from cout to printf for most printing in a project of mine. This i... | 0 | 1,109 |
Distinct not working with LINQ to Objects | <pre><code>class Program
{
static void Main(string[] args)
{
List<Book> books = new List<Book>
{
new Book
{
Name="C# in Depth",
Authors = new List<Author>
{
new Author
... | 0 | 1,342 |
How to do group by on a multiindex in pandas? | <p>Below is my dataframe. I made some transformations to create the category column and dropped the original column it was derived from. Now I need to do a group-by to remove the dups e.g. <code>Love</code> and <code>Fashion</code> can be rolled up via a <code>groupby</code> sum.</p>
<pre><code>df.colunms = array([c... | 0 | 2,041 |
overloading *, +, -'operators for vector<double> class | <p>I'm writing a Line class to make numerical methods and I want these operators (*, +, -)
to make my code more readable and easier to understand. </p>
<pre class="lang-cpp prettyprint-override"><code> #include <vector>
using namespace std;
typedef vector<double> Vector;
... | 0 | 1,177 |
How do I identify my server name for server authentication by client in c# | <p>I have recently been trying to make a SSL encrypted Server/Client in C#.</p>
<p>I have followed <a href="http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx" rel="noreferrer">this</a> tutorial on MSDN, however, it required a certificate to be created for the server and client usage using <em>... | 0 | 6,754 |
Mobile number masking in React | <p>Hi need to masked mobile number when user enter the mobile number in input box it should be 021 121 4544 in this format.
means there should be 021{auto space}121{auto space}4544
how can i build in react this functionality?</p>
<pre><code>class NumberCheck extends Component {
state = {
disabled: true,
... | 0 | 1,540 |
Maven deploys to snapshot instead of release | <p>I'm trying to release a project using maven but instead of releasing to the Releases repository it puts it in our Snapshots repo.</p>
<p>My pom looks like:</p>
<pre class="lang-xml prettyprint-override"><code><project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchem... | 0 | 1,618 |
Ajax Post not Working in laravel 5.1 | <p>I am trying to post data using ajax in laravel but it seems to be not working. I have followed following is my code</p>
<p>login.blade.php</p>
<pre><code><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="csrf_token" content="{{ csrf_token() }}" />
<link re... | 0 | 4,006 |
undefined method `map' for nil:NilClass , what causes this? | <p>Hi i am facing this error ,
completely new to rails so cant figure out what is causing it</p>
<p>my newBook.html.erb</p>
<pre><code><html>
<head>
<title> new Book </title>
</head>
<body>
<h1><%= @hello_message %></h1>
<h1&... | 0 | 1,176 |
Android Java UTF-8 HttpClient Problem | <p>I am having weird character encoding issues with a JSON array that is grabbed from a web page. The server is sending back this header: </p>
<p>Content-Type text/javascript; charset=UTF-8</p>
<p>Also I can look at the JSON output in Firefox or any browser and Unicode characters display properly. The response wil... | 0 | 1,240 |
Entity framework code first migration strategy with existing database | <p>I have the following situation and unable to determine correct migration strategy. Help is appreciate.</p>
<ul>
<li>Application creates and uses database as data storage </li>
<li>Application needs to update database on the start up <strong>if needed</strong></li>
<li>using <strong>Nuget Manager console</strong> is... | 0 | 1,072 |
Android opening a file with ACTION_GET_CONTENT results into different Uri's | <p>I am trying to open files by using <code>Intent.ACTION_GET_CONTENT</code>.
<a href="https://i.stack.imgur.com/J3Aoy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/J3Aoy.png" alt="Android file browser"></a></p>
<p>Dependent on the Android version/device brand the file browser opens and I get the followin... | 0 | 1,378 |
Reading .xlsx file using apache poi gives org.apache.poi.POIXMLException on linux machine | <p>I have an application which reads an .xlsx file and displays the content to the user. The application works fine on a windows environment.</p>
<p>I deployed the .war file of this web app on tomcat6 on a ubuntu server. I also copied the .xlsx files on the server.</p>
<p>The path of the files in the code is correct.... | 0 | 1,661 |
Android infinite Scroll List view | <p>I want to implement <code>OnScrollListener</code> to load more data, when scrolled to bottom, dynamically. Following code is giving me NullPointerException, but when I declare </p>
<blockquote>
<pre><code> BusinessListDataAdapter adapter = new BusinessListDataAdapter(this,
this.imgFetcher, this.layoutI... | 0 | 2,664 |
Generic keyboard emulation using Arduino Leonardo | <p>I am trying to use an <a href="http://arduino.cc/en/Main/arduinoBoardLeonardo" rel="nofollow">Arduino Leonardo</a> for keyboard emulation since that is one of its advertised features. I have been playing with the Leonardo and wrote a very simple sketch based off the Blink example.</p>
<pre class="lang-cpp prettypri... | 0 | 5,307 |
Bring task to front on android.intent.action.USER_PRESENT | <p><strong>BACKGROUND</strong><br>
I have a task (i.e. app) with multiple activities. </p>
<p><strong>QUESTION</strong><br>
How do I bring a task to the front w/o re-ordering the activity stack for that task? </p>
<p><strong>USER SCENARIO</strong><br>
When the device boots (i.e. after android.intent.action.BOOT_COMPL... | 0 | 1,206 |
Generic way to set property values with .NET | <p>I have hundreds of properties that need to be set in an object, which is hierarchical by nature and would like a generic way of doing so, is this feasible? One of the driving reasons is for error checking and logging. </p>
<p>In this sample below I am setting ReferenceModelIdentifier to a string</p>
<pre><code> ... | 0 | 1,154 |
Tesseract receipt scanning advice needed | <p>I have struggled off and on again with Tesseract for various OCR projects and I found a use case today which I thought would be a slam dunk for it but after many hours I am still coming away unsatisfied. I wanted to pose the problem here and see if anyone else has advice on how to solve this task.</p>
<p>My wife ... | 0 | 1,271 |
How to write distinct SQL clause in JPA Repository interface | <p>I am trying to use JpaRepository interface to build up a distinct clause. I tried almost all possible combinations of writing findDistinctBy... but failed. In many resources/links problem is solved by using @Query annotation, but due to some limitations i want to use spring data only.</p>
<p>Sample Entity class wit... | 0 | 3,448 |
How to access private variables from another class? | <p>I'm working on a project in OpenGL, and I have it working in its most basic form. Now, I need to make it so that my "get" matrices for rotation and orbit are in my Box.cpp file, my speed variables are private, and that I have set functions for those speed variables.</p>
<p>I need to access those variables in main, ... | 0 | 3,541 |
javax.net.ssl.SSLException: SSL handshake aborted Connection reset by peer while calling webservice Android | <p>I am calling <strong>https webservice</strong> and its works fine before, but now when i am trying to call it its give me following errors.</p>
<p><strong>Log Errors :</strong></p>
<pre><code>12-23 06:28:11.969: W/System.err(3014): javax.net.ssl.SSLException: SSL handshake aborted: ssl=0x1cc160: I/O error during s... | 0 | 2,914 |
How To get Selected Radio Button Value in Mvc | <p>I am trying to create a simple rating system in MVC just for learning. My problem is that I am not able to get the radio button selected value I am trying to pass it to the controller. Any help will be appreciated.</p>
<p>Here is my code:</p>
<pre class="lang-html prettyprint-override"><code>@model WebApplication1... | 0 | 4,404 |
OpenHTMLToPDF: Embed a custom font into PDF created out of HTML | <p>I create a PDF from HTML with Jsoup and <a href="https://github.com/danfickle/openhtmltopdf" rel="nofollow noreferrer">OpenHTMLToPDF</a>. I have to use a different font in my PDF to have non-latin glyphcs covered (see <a href="https://stackoverflow.com/questions/5425251/using-pdfbox-to-write-utf-8-encoded-strings-to... | 0 | 2,911 |
Spring JPA: no transaction is in progress | <p>I'm having problems persisting entities in my Spring application. Just doing <code>em.merge()</code> finishes without errors but does not update the database, and trying <code>em.flush()</code> causes this exception:</p>
<blockquote>
<p>2015-12-19 18:01:40 DEBUG DispatcherServlet:976 - Could not complete
reques... | 0 | 7,214 |
bootstrap form-inline to display fields in one row | <p>I want my sign in form to display the fields in a row next to each other instead of under each other. </p>
<p>header:</p>
<p>Update: this code works now</p>
<pre><code><header class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<div class="container">
<%= link_to "Apo... | 0 | 1,155 |
"py.test" vs "pytest" command | <p>The <code>py.test</code> command is failing in my case, whereas <code>pytest</code> is running totally fine.</p>
<p>I use the pytest-flask plugin:</p>
<pre><code>platform linux -- Python 3.5.2, pytest-3.0.2, py-1.4.31, pluggy-0.3.1
rootdir: /home/sebastian/develop/py/flask-rest-template, inifile:
plugins: flask-0... | 0 | 1,438 |
Where and how to change session user object after signing in? | <p>I have weird problem and I don't know where the problem is. I use <a href="https://next-auth.js.org/" rel="noreferrer">next-auth</a> library to make authentication system in my <code>Next.js</code> app.</p>
<p>Everything is OK - I can sign in by checking if there is account in <code>google firebase</code> with submi... | 0 | 1,765 |
Progress bar with tqdm while iterating over the items in a python dictionary | <p>If I'm trying to get a progress bar while iterating over a dict, how can I do this with tqdm? I'm using Python 2.7.</p>
<p>This works great with lists:</p>
<pre><code>for i in tdqm(l, len(l):
<do stuff>
</code></pre>
<p>But fails over dicts:</p>
<pre><code>for k, v in tqdm(d.items(), len(d)):
<... | 0 | 1,194 |
Yii redirecting to a different view page after login | <p>In my web application I have a page called "MyHome" which should be viewed after a successful login.I have included this page under site folder .But it shows the following error</p>
<pre><code>Error 404
The system is unable to find the requested action "MyHome".
</code></pre>
<p>My code for the actionLogin of ... | 0 | 2,039 |
Type 'object' is not assignable to type 'NgIterable<any> | null | undefined' | <pre class="lang-html prettyprint-override"><code> <!--app component.html-->
<div class="position-relative container">
<div class="row justify-content-center">
<div class="card mt-sm-3 col-md-8">
<div class="card-body">... | 0 | 1,892 |
Zookeeper error connection loss exception | <p>I'm running a SeqWare VM on an amazon EC2 instance I'm trying to use the SeqWare query engine to query data from VCF files. When I first launch the instance and follow the instructions to import data, It works fine, and continues to work until I stop the instance. When I restart it. It won't let me import anything, ... | 0 | 2,325 |
How to properly handle exceptions when working with files in C# | <p>I've read many blogs/articles/book chapters about proper exception handling and still this topic is not clear to me. I will try to illustrate my question with following example. </p>
<p>Consider the class method that has following requirements:</p>
<ol>
<li>receive list of file paths as parameter </li>
<li>read th... | 0 | 1,182 |
Angular2 data binding for custom reusable component | <p>I want to have a template consisting of a label and textbox. This template can be reused at different places in my page. to do that i have created a MyTextComponent. I want to know how to i bind different values to the components input.</p>
<p>for example:</p>
<p><strong>MyTextComponent</strong></p>
<pre class="l... | 0 | 1,154 |
Django: AttributeError: "Object has no attribute" | <p>I'm trying to get a property calculated in one class into another class. And I'm stuck... </p>
<p>In the class "Reward", I need to subtract "deductible" from "pledge_level". In class "Pledge", I need to subtract the "not_taxable" from "amount" to return "decuctible_total". </p>
<p>This works fine when accessing it... | 0 | 1,686 |
How to reset all variables in C++? | <p>My code seems to be functioning without any problems,<br>
but our professor warned us that this task might require<br>
resetting of variables in order to rerun cleanly after first run.</p>
<p>Problem is I have no idea how to reset variables and<br>
I assume it becomes essential with more complex code. Help? </p>
... | 0 | 1,471 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.