title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Example of form validation cakephp | <p>anybody please give an example of validation form in cakephp, because i have cakephp 2.3.3 and cant' validate forms, doesnt recognize my model Usuario</p>
<p><strong>model usuario</strong>
<pre><code> public function beforeSave($options = array()) {
if (isset($this->data[$this->alias]['passwo... | 1 | 3,018 |
What is the advantage of using DataSourceUpdateMode.OnPropertyChanged for databinding winform c# | <p>first see my code</p>
<pre><code>public class Car : INotifyPropertyChanged
{
private string _make;
private string _model;
private int _year;
public event PropertyChangedEventHandler PropertyChanged;
public Car(string make, string model, int year)
{
_... | 1 | 1,366 |
How do I create/render a UIImage from a 3D transformed UIImageView? | <p>After applying a 3d transform to an UIImageView.layer, I need to save the resulting "view" as a new UIImage... Seemed like a simple task at first :-) but no luck so far, and searching hasn't turned up any clues :-( so I'm hoping someone will be kind enough to point me in the right direction.</p>
<p>A very simple i... | 1 | 1,032 |
JQuery DataTables Server-Side Processing Not Rendering | <p>I am trying to implement DataTables using server-sided processing.</p>
<p>As far as I can tell, what I have is correct.. however when I load the page, all I see is <code>"No matching records found"</code>.</p>
<p>I am using DataTables 1.10.9.</p>
<p>My table is set up like this:</p>
<pre><code><table id="res... | 1 | 2,651 |
In asp.net core, why is await context.ChallengeAsync() not working as expected? | <p>I have two questions, both of which refer to the code below:</p>
<ol>
<li><p>Why is authenticateResult.Succeeded false after I call authenticateResult = await context.AuthenticateAsync();?</p></li>
<li><p>Why do I need to call "return" from my custom middleware InvokeAsync method for this to work properly?</p></li>... | 1 | 3,321 |
How to make JHipster 'hot reload' classes | <p>I'm using default generated jhipster application and I'm wondering how to make it 'hot reload' using spring-boot-devtools. </p>
<p>That's how I tried to start this application in 2 different ways:
<a href="http://prntscr.com/a4dhmu" rel="nofollow">http://prntscr.com/a4dhmu</a> or <a href="http://prntscr.com/a4di2c"... | 1 | 1,719 |
android onClick event not firing | <p>I really need a help on this point because its the only thing not working in my app.
I have a listview managed by an adapter that is extending BaseAdapter.</p>
<p>In the getview function im using the convertView to set up a OnClickListener.
This OnClickListener work well when I am touching the screen but if I use t... | 1 | 1,413 |
Getting values from textbox - Android WebView and JavascriptInterface issue | <p>I'm trying to get simple values from two text boxes from my website on click of a button present there.</p>
<p>I followed this - <a href="https://developer.android.com/guide/webapps/webview.html#BindingJavaScript" rel="nofollow noreferrer">https://developer.android.com/guide/webapps/webview.html#BindingJavaScript</... | 1 | 1,463 |
Java Glassfish - How to consume SSL web service? | <p>I used netbeans to create and deploy an SSL ejb hello world web service on Glassfish server and then tried (unsuccessfully) to consume that service from a java application.</p>
<p>Any help would be highly appreciated. Below is more detail about what I did.</p>
<hr>
<ol>
<li>I created a hello world (ejb) web servi... | 1 | 4,124 |
Verilog 4x16 Decoder outputs wrong data | <p>I have implemented a 4x16 Decoder using Verilog along with it's test. For each case the decoder should output a 16-bit digit with only one of the bits high. I can't manage to get all the desired outputs when I run the program. Here is the code for the Decoder and test, and the output at the console:</p>
<p>4x16 Dec... | 1 | 1,358 |
run shiny server as non-root | <p>I installed shiny server in a virtual machine (ubuntu server 14.04.4 in VirtualBox)</p>
<pre><code>shiny-server --version
Shiny Server v1.4.2.786
Node.js v0.10.40
</code></pre>
<p>All in all the server runs nicely and starts apps as intended. </p>
<p>The only thing I'm missing and failing to achieve is that shi... | 1 | 1,471 |
Pytorch: multi-target error with CrossEntropyLoss | <p>So I was training a Conv. Neural Network. Following are the essential details:</p>
<ul>
<li>original label dim = torch.Size([64, 1])</li>
<li>output from the net dim = torch.Size([64, 2])</li>
<li>loss type = nn.CrossEntropyLoss()</li>
<li>error = RuntimeError: multi-target not supported at /pytorch/aten/src/THCUN... | 1 | 1,766 |
Trouble getting POCO HTTPSClientSession to send a request - certificate verify failed | <p>I'm trying to use the POCO libraries to write a program that makes an HTTPS request to a server. For testing purposes, I'm connecting to a server which has a self-signed certificate, and I want to allow the client to connect anyway. To allow that to happen, I've attempted to install an <code>InvalidCertificateHandl... | 1 | 1,259 |
How to use $_SERVER['PHP_SELF']? | <p>Hi I made this very simple registration page I have 3 files: welcome.php, registration_form.php, and register.php</p>
<p>This is my code for welcome.php</p>
<pre><code><html>
<body>
<h1>WELCOME!</h1>
<form action="login.php" method="POST">
<p>Username: <input type="text" n... | 1 | 1,883 |
Python threading: interpreter shutdown exception | <p>I'm writing an emulator for a vintage computer system in Python, and I'm having some trouble with an exception thrown when trying to "restart" the emulator core thread after coming out of a halt condition. The "run processor" method, part of a larger class looks something like this:</p>
<pre><code>def run_processo... | 1 | 1,226 |
Ag-grid infinite model pagination server-side | <p>I'm attempting to use ag-grid with server side pagination. I updated the code sample from the ag-grid website ( below ). I retrieve the columnDefs in the ngOnInit method but alas neither the columnHeaders appear nor the rowdata. I can debug into the GetRows function and see that the rows are coming back. The total n... | 1 | 2,896 |
How to handle multiple possible response types with Retrofit2, Gson and Rx | <p>The API i have to use sucks, and always returns HTTP 200. But sometimes there is proper response:</p>
<pre class="lang-json prettyprint-override"><code>[{"blah": "blah"}, {"blah": "blah"}]
</code></pre>
<p>and sometimes, there is error:</p>
<pre class="lang-json prettyprint-override"><code>{"error": "Something we... | 1 | 1,194 |
How to attach multiple files to the Email | <p>How to attach multiple files to the send Email .</p>
<p>I use the following method to send Email .</p>
<pre><code> public static void sendMail(string to, string from, string password, string subject, string body, int dep_code)
{
MailMessage mail = new MailMessage();
SmtpCl... | 1 | 1,444 |
How can I change try catch exception to WebDriverWait | <p>I am trying to login and search records based on date selected from a calendar. I have used try catch exception after each step. I need to replace try catch with WebDriverWait. But the problem is that I have fields on the page which are getting identified by id or XPath. So I am not getting a way out how to implemen... | 1 | 1,470 |
Task.Yield() in library needs ConfigureWait(false) | <p>It's <a href="https://msdn.microsoft.com/en-us/magazine/jj991977.aspx" rel="noreferrer">recommended that one use <code>ConfigureAwait(false)</code> whenever when you can</a>, especially in libraries because it can help avoid deadlocks and improve performance.</p>
<p>I have written a library that makes heavy use of ... | 1 | 2,036 |
How to Draw straignt Line between two Points? | <p>I am trying to achieve that one point called <code>first</code> in my code to join second point <code>second</code> using finger movement from <code>first</code> point to <code>second</code> , <em>Line should be straight no matter what</em> , and if <code>first</code> point didn't reach <code>second</code> point , l... | 1 | 1,263 |
Nativescript gradle build fails with "resource xml/network_security_config not found" | <p>I have an existing Nativescript angular app that I have been able to run on my Android emulator without any problems. The other day I updated the tns-android version from 4.1.3 to 5.0.0 using the following command:</p>
<pre><code>tns platform update android
</code></pre>
<p>I then tried running the emulator again ... | 1 | 2,905 |
PHP PDO: Call to a member function fetch() on boolean | <p>So I'm currently trying to do a PDO SELECT Request, but when executing and fetching the extracted data, this error shows up:</p>
<pre><code>1 - Fatal error: Uncaught Error: Call to a member function fetch() on boolean in C:\wamp64\www\NewKali\includes\user.inc.php on line 53
2 - Error: Call to a member function... | 1 | 1,063 |
Wordpress Meta Query with 3 Conditions | <p>I am working on a custom wordpress theme and have a pretty good grip on php & MySQL but less so on wordpress API so I'm wondering if one of you lovely people can help me out. Essentially I have this query:</p>
<pre><code>$args = array(
'post_type' => 'any',
'orderby' => 'post_date',
... | 1 | 1,198 |
Illegal base64url character: ' ' when getting claims/decode from token Java JWT Spring Boot | <p>When I get some claims from a JWT Token to validate user authentication I get the following error:</p>
<pre><code>Illegal base64url character: ' '
</code></pre>
<p>Creating a JWT goes completely fine but "decoding" seems to have some issues...
I also tried a base64url decoder to decode the token before get... | 1 | 4,390 |
Unable to run systemd inside docker which is being run inside jenkins | <p><strong>I'm trying to get Jenkins to run Docker that runs SystemD</strong>.</p>
<p>So far <strong>I've been able to run systemd inside docker locally without Jenkins</strong>. Here are the steps to run it locally without jenkins:</p>
<pre><code># pull unop/fedora-systemd and create and run the container for it
sud... | 1 | 1,294 |
Apache POI Focus on a particular cell in generated excel file | <p>Hi I am using apache poi to generate excel files. I am using XSSFWorkbook format. I am trying to make focus on the first cell of the generated excel file.</p>
<p>I have tried the following code snippet.</p>
<pre><code> try {
Sheet sheet = workbook.getSheetAt(0);
workbook.setA... | 1 | 1,093 |
Content-Length mismatch, received 376567 bytes out of the expected 1478361 | <p>I have recently created fresh Laravel project using composer. The Laravel version is 7.15.</p>
<p>Now when I am trying to install composer laravel/ui package, following error occures</p>
<pre><code>Content-Length mismatch, received 376567 bytes out of the expected 1478361
https://repo.packagist.org could not be full... | 1 | 2,190 |
Custom adapter's getview throws NullPointerException when variables are not null | <p>I am trying to set custom adapter to display messages to user using demo chat application on list view , but receiving errors in getView method of my custom list adapter .</p>
<ul>
<li>I did double check on my steps and debugging to find out if holder is
not null . But holder is not null as you can see in my debugg... | 1 | 5,231 |
Keras callback AttributeError: 'ModelCheckpoint' object has no attribute '_implements_train_batch_hooks' | <p>I'm using Keras (with TensorFlow back-end) to implement a neural network and want to only save the model that minimises loss on the validation set during training. To do this, I instantiated a ModelCheckpoint and pass it when calling the fit method of the model. However, when I do this I get the following error: "<c... | 1 | 1,119 |
returning a 2D array (in C# and in C++) | <p>I am coding a function that will return a 2D array. This leds me to think about the implications of this in C# (with garbage collection) and in C++(no GC)</p>
<p>(Why in both-you may ask: I am now writing it on a windows platform with C# but in some months I will implement my algorithms on an embedded device using ... | 1 | 1,274 |
AWS Cloudwatch can not publish to SNS Topic with SSE | <p>I have a Route53 health check, which submits its metrics into Cloudwatch, and finally Cloudwatch specifies thresholds and should send alerts through SNS.</p>
<p>However, I would like my SNS Topic to be encrypted. When I turn on SNS Topic encryption using the <code>alias/aws/sns</code> key I receive these messages i... | 1 | 1,472 |
How to set delay on mouseover for this menu? | <p>I have drop down menu, and I want to add delay on mouseout. So when you hover over the menu, it ll display drop down, but when you move mouse from the menu, I want to there be some delay.</p>
<p>I have searched all day for this, and didnt found anything, expect hoverIntent plugin which i dont know to use.</p>
<p>H... | 1 | 1,486 |
Cannot use explicitly typed lambda | <p>I have this code:</p>
<pre><code>std::function<std::string&(std::string&)> change_str = [](std::string& str){
return (str = "Hello world!");
};
std::string s;
std::cout << change_str(s) << std::endl;
</code></pre>
<p>It does not compile, and say:</p>
<pre><code>main.cpp:8:47: e... | 1 | 1,097 |
How to make a pulse animation on a svg path? | <p>I'm able to make the pulse animation on the heart but on the second icon it's sliding, I don't understand why. </p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><svg&... | 1 | 1,268 |
Spring MVC: Sharing context between JAR and WAR in EAR | <p>Our project is having MDB and WEB in an EAR and need to share the application context. </p>
<p><strong>web.xml</strong></p>
<pre><code><context-param>
<param-name>locatorFactorySelector</param-name>
<!-- This file is in the root of the EJB JAR file -->
<param-value>clas... | 1 | 3,972 |
GROUP BY Month, Display Month Name in SELECT List | <p>I am trying to group by month to separate my result set into monthly breakdowns, but I want to display the month name instead of the month number.</p>
<pre><code>SELECT
DATEPART(MONTH, R.received_date) AS [Month],
--DATENAME( MONTH, DATEPART( MONTH, R.received_date)) AS [Month] ,
o.name AS [CountyName... | 1 | 1,029 |
entirely removed <system.serviceModel> yet still receive multiple http endpoints error | <p>I am getting this error:
This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or spec... | 1 | 1,232 |
How to expand the expansion panel in mat-table by a button click? | <p>I was following this <a href="https://stackblitz.com/angular/vjjyayoqjno?file=src%2Fapp%2Ftable-expandable-rows-example.ts" rel="nofollow noreferrer">Mat Expansion table</a> to create a expansion panel for each row. I've disabled the row click to expand the panel by <code>(click)="$event.stopPropagation()"</code> in... | 1 | 1,506 |
How can I show a Progress dialog between two activities? | <p>I have a problem. I need to go from one activity to another. My second activity has a big xml layout, with a lot of elements (I'm speaking about four hundred aprox.), then it takes a few seconds (too much) to show this second Activity.</p>
<p>How can I show a Progress dialog between two activities?</p>
<p>I'm try... | 1 | 1,804 |
How to Give Multiple permissions at once in Runtime android M at my code | <p>I want to grant multiple permissions at once..... This is my code.. this is just sample I want to Give Multiple permissions at once..</p>
<pre><code>public class MainActivity extends Activity {
public static final int R_PERM = 123;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(sav... | 1 | 1,157 |
JSON Web Tokens Not Decodable on jwt.io: "JWT payload is not a valid JSON object" | <p>Using the below code, I am able to build a decoded JSON Web Token (<code>decodedToken</code>). When I paste it into the debugger on <a href="https://jwt.io" rel="nofollow noreferrer">https://jwt.io</a>, the header and payload are correctly shown on the right. But when I paste the encoded token (<code>encodedToken<... | 1 | 1,981 |
Why is the vertical scroll getting stuck in mobile view? | <p>The webpage, when in mobile view, is getting stuck when I attempt to scroll vertically. In <code>@media screen and (max-width: 952px) {}</code> I have <code>overflow-x: hidden;</code>, <code>width: 100%;</code>, and <code>position: absolute;</code> set in order to prevent horizontal scrolling because the mobile nav ... | 1 | 7,680 |
Flatten a PHP Array one level based on key | <p>I currently have an array that's outputting as follows:</p>
<pre><code>Array
(
[events_response] => Array
(
[total_events] => 3
[0] => Array
(
[events_list] => Array
(
[0] => Array
(
[event] => Array
... | 1 | 5,353 |
Angular 4 - Push Array to Data Model in Another File | <p>I'm trying to make a simple app that allows you to add a server and name it and choose the type. Right now I have it working by using an array within the app component, however, while attempting to create a "server.model" file that outlines a server element and also creates the array to push the content onto, I cann... | 1 | 1,960 |
Google App script - update row according to criteria (based on condition) | <p>I'm trying to automate a task that is below -</p>
<ol>
<li><a href="https://docs.google.com/spreadsheets/d/1AcYFOhs6XQHwhrToRaUau56I0XISEocGWmfqufH-acc/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1AcYFOhs6XQHwhrToRaUau56I0XISEocGWmfqufH-acc/edit?usp=sharing</a> (From here)</li... | 1 | 1,141 |
CORS in Ajax-requests against an MVC controller with IdentityServer3-authorization | <p>I'm currently working on site that uses various Ajax-requests to save, load and autocomplete data. It is build using C#, MVC and JQuery. All actions on the MVC controllers require the users to be authorized, and we use IdentityServer3 for authentication. It was installed using NuGet, and the current version is 2.3.0... | 1 | 3,037 |
Unable to read image with FileReader (see Update 2) | <p>I am trying read a image file selected by a <code>input[type=file]</code> field with this javascript code:</p>
<pre><code> var reader = new FileReader();
var blob;
reader.onloadend = function (e) {
blob = e.target.result;
}
reader.readAsDataURL(this.files[0]);
</code></pre>
<p>... | 1 | 1,166 |
constexpr, static_assert, and inlining | <p>I previously asked about <a href="https://stackoverflow.com/questions/8936549/constexpr-overloading">function overloading based on whether the arguments are <code>constexpr</code></a>. I'm trying to work around the disappointing answer to that question to make a smarter assert function. This is roughly what I am try... | 1 | 1,434 |
Laravel 8 file upload validation fails with any rule | <p>I want to validate a file upload but with literally any validation rule, I get "The (name of input) failed to upload." I've seen this issue in a few places but none of the solutions worked for me.</p>
<p>I'm using Laravel 8.0, php 8.0.2, and nginx/1.18.0 on ubuntu.</p>
<p>Controller:</p>
<pre><code>public ... | 1 | 2,094 |
Routing in ionic with nested tabs does not work | <p>Hello i am new to both ionic and angular js. I just started the framework yesterday but i am really stuck in the process below.
I am trying to create a nested tab views inside another view. However it's not working.
so this is the listing part my menu view for tabs:</p>
<pre><code> <ion-item class="item-icon... | 1 | 1,122 |
An entity object cannot be referenced by multiple instances of IEntityChangeTracker even though I detached it | <p>I'm using EF. I save entities into cache.</p>
<p>I detach each entity before putting into cache, </p>
<p>and attaching it to a new objectContext after getting from cache.</p>
<p>I'm using <code>using</code> statement at a high point (in my BL class, upon every request)</p>
<p>Yet I get this error:</p>
<pre><cod... | 1 | 1,149 |
C++ processes and pipes | <p>I working my way through a C++ and Operating Systems book and I've come upon an assignment that requires creation, writing, and reading from pipes. However my program stalls on reading from the second pipe. My program is to accept input and parse out a space delimited string into tokens and classifying those tokens ... | 1 | 2,731 |
Predefined text directly posted on facebook wall | <p>i am using facebook android sdk provided for facebook i m using their examples-simple provided by them and its working very finely , now on login in fb show a form from fb to post on wall on button click .
but I want to set text directly from code and on button click it directly post the text set by me on fb without... | 1 | 4,202 |
Drawing on a paintbox - How to keep up with mouse movements without delay? | <p>I decided to have a little go myself at making a map editor for a simple RPG game. The map will allow drawing tiles at 32x32 into the map, nothing too fancy, but to give an idea:</p>
<p><img src="https://i.stack.imgur.com/9QzVb.png" alt="enter image description here"></p>
<p>I am using Lazarus again but this appli... | 1 | 6,215 |
How to use DRF serializers with Graphene | <p>I am following <a href="http://docs.graphene-python.org/projects/django/en/latest/tutorial-plain/" rel="noreferrer">this tutorial</a> for using <strong>Graphene</strong> with <strong>Django</strong>, and everything was going smooth, until I reached the <a href="https://docs.graphene-python.org/projects/django/en/lat... | 1 | 2,061 |
understanding priority arrays in linux kernel | <p>I am trying to understand how scheduler of Linux kernel works </p>
<p>As given on this link</p>
<p><a href="http://books.google.co.in/books?id=NXVkcCjPblcC&lpg=PP1&pg=PA47#v=onepage&q&f=false" rel="nofollow">http://books.google.co.in/books?id=NXVkcCjPblcC&lpg=PP1&pg=PA47#v=onepage&q&... | 1 | 2,144 |
java.rmi.ConnectException: Connection refused to host: 192.168.0.55 | <p>I am quite a beginner with NetBeans and Java, so I'm pretty sure my questions are very basic but trying to find the solution for 2 weeks I am totally stuck</p>
<p>This is the problem:</p>
<p>I want to implement a RMI Server Client application
So first step was trying with NetBeans to have one work from the net</p>... | 1 | 1,730 |
ERROR: Command errored out with exit status 1: python in window | <p>I had tried to pip install numpy but there had a problems:</p>
<pre><code>ERROR: Command errored out with exit status 1:
command: 'c:\users\admin\appdata\local\programs\python\python39\python.exe' 'c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_met... | 1 | 3,742 |
Android Studio - Proguard 'keep' rules being ignored? | <p>I have recently migrated my Android project from Eclipse to Android Studio.</p>
<p>The debug version of the app created by Android Studio runs fine on a device, but the release version crashes on startup. </p>
<p>Here is my app's <code>build.gradle</code> file:</p>
<pre><code>apply plugin: 'com.android.applicatio... | 1 | 4,797 |
Send files using sockets in Delphi 2010 | <p>Hi I am sending a file via tsocket, I'm editing the first code to not use opendilalog but I want to use a string with the path of the file to send, the problem is that the second code that eh OpenDialog edited for not using shoot me an error saying the file to send is being used by another process.</p>
<p>The first... | 1 | 3,340 |
Using IF statement in simple java program to apply discount | <p>I have been using a search tool to look for an answer but I am now stuck after being able to fix several of my previous problems. I was able to compare and make adjustments but now I don't understand what is wrong with my program.</p>
<p>I am in my first year learning computer programming starting with Java. I have... | 1 | 2,371 |
.net Core - HTTPS with AWS Load Balancer and Elastic Beanstalk doesn't work | <p>I have a website that runs HTTPS correctly in my local environment. When I upload it to AWS it just times out or redirects forever.</p>
<p>My setup in AWS is an Elastic Beanstalk application, an RDS database running MS SQL, I added a Load Balancer to forward the HTTPS requests, and I have a SSL certificate properly... | 1 | 1,042 |
ElasticSearch exception when creating embedded node | <p>I am trying to create an embedded node for integration tests but for some reason i am getting some exceptions while creating the node itself that some classes are missing, </p>
<p>I am using maven and the only import i have that related to ES is this </p>
<pre><code> <dependency>
<groupId>or... | 1 | 1,046 |
java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: Customer is not mapped [from Customer] | <blockquote>
<p>org.springframework.web.util.NestedServletException: Request
processing failed; nested exception is
java.lang.IllegalArgumentException:
org.hibernate.hql.internal.ast.QuerySyntaxException: Customer is not
mapped [from Customer]</p>
</blockquote>
<p>while everything is fine why it is showing t... | 1 | 2,746 |
Classify or cut dataframe by list of class range and summarize it with ddply | <p>I have question about ddply and subset.</p>
<p>I have dataframe df like this : </p>
<pre><code>df <- read.table(textConnection(
" id v_idn v_seed v_time v_pop v_rank v_perco
1 15 125648 0 150 1 15
2 17 125648 0 120 2 5
3 18 125648 0 100 3 ... | 1 | 2,330 |
Failed to install 'cordova-plugin-wkwebview-engine':CordovaError: could not find -Info.plist file, or config.xml file | <p>I'm getting some weird error while trying to add cordova wkwebview plugin in my existing application.</p>
<p><strong>Error: if i try to update ios cordova platform</strong></p>
<blockquote>
<p>/////////////////
admins-mbp:WKWebView admin$ cordova platform update ios
Updating ios project...
Error: Uncaught,... | 1 | 1,065 |
CAKEPHP Group by problem in paginate | <p>CAKEPHP Group by problem in paginate..</p>
<p>This is my table structure</p>
<pre><code> Friends Table
`id` int(11) NOT NULL AUTO_INCREMENT,
`user1_id` int(11) NOT NULL DEFAULT '0',--> UserFrom
`user2_id` int(11) NOT NULL DEFAULT '0',---> UserTo
</code></pre>
<p>I need to get all the unique records of... | 1 | 1,481 |
PHPMailer sends duplicate emails | <p><strong>PROBLEM:</strong> I'm receiving three duplicate emails for each user who signs up with their email address. My guest list is being overrun by duplicate emails, and I don't know what's wrong with my code. </p>
<blockquote>
<p><strong>Probable Cause</strong>: I have 3 signup forms, so I think somehow when I... | 1 | 1,764 |
Should I use Material for Angular or Material for AngularJS? | <p><a href="https://github.com/angular" rel="noreferrer">Angular's GitHub</a> page shows two pinned repositories relating to Material Design:</p>
<ol>
<li><a href="https://github.com/angular/material2" rel="noreferrer">angular/material2</a></li>
<li><a href="https://github.com/angular/material" rel="noreferrer">angula... | 1 | 1,041 |
How to fix the java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver for an Excel File? | <p>So, I was given a task to access the Test Data from MS Excel file as a Database in Java by using the TestNG framework and I am getting this exception. Here's how I saved the Excel file and other Java classes.</p>
<p><a href="https://i.stack.imgur.com/M2WLL.png" rel="nofollow noreferrer"><img src="https://i.stack.im... | 1 | 4,812 |
Cannot use table 'Accounts' for entity type 'User' since it is being used for entity type 'Address' | <p>I am losing my mind right now. I am trying to model my database model with navigation properties that exist on both child and parent identities. Meaning, the parent has a nav property pointing to the child and the child has a nav property pointing to the parent.</p>
<p>Here is my Model:</p>
<pre><code>public class... | 1 | 1,043 |
Remove backslashes from response entity Json in Java | <p>I am testing my Rest controller and when i print the results in java they seem to be okay but on swagger or postman it return slashes. How do i remove these.</p>
<p>In Java i print the object with a log and the result is as below:</p>
<p>ReturnObject`</p>
<pre><code>{
create=Create{
create={
"Apartmen... | 1 | 1,457 |
Code gets stuck at wakelock,while registering to GCM? | <p>It does not get registration id from GCM server the app does not give any error,this is my logcat.</p>
<pre><code> 07-13 16:43:39.920: I/** pushAndroidActivity **(5310): inside oncreate()
07-13 16:43:39.920: I/** pushAndroidActivity **(5310): started registration
07-13 16:43:39.920: D/GCMRegistrar(5310): reset... | 1 | 1,186 |
How to connect to MySQL database using jdbc and tomcat | <p>I am working on a dynamic web project for class. I am trying to pull data from a MYSQL database so that I can read it and use it on my web application. When I try and connect, I get this error: </p>
<pre><code> com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last pac... | 1 | 3,830 |
Save data into Store from Form Submit success ExtJS | <p>I have a Form (Ext.form.FormPanel) which is basically a login panel with two fields like user_name and password, and a button which does form submit. Now i am able to submit data to my php service which also returns data and i am able to see the data in the action.result (this is actually a UserVO which has fields l... | 1 | 1,214 |
Plotting each column of a dataframe as one line using ggplot | <p>The whole dataset describes a module (or cluster if you prefer).</p>
<p>In order to reproduce the example, the dataset is available at:
<a href="https://www.dropbox.com/s/y1905suwnlib510/example_dataset.txt?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/y1905suwnlib510/example_dataset.txt?dl=0</a></p>
<... | 1 | 1,112 |
PhpMyAdmin Error 500 PHP-GETTEXT | <p>I updated my server today and actually when i'm going to mywebsite.com/<strong>phpmyadmin</strong>/ => I got an <strong>error 500</strong></p>
<p>Error.log:</p>
<pre><code>PHP Warning: require_once(): open_basedir restriction in effect. File(/usr/share/php/php-php-gettext/gettext.inc) is not within the allowed pa... | 1 | 1,049 |
Red Black Tree AttributeError on NoneType | <p>My problem stems from trying to insert the last node (red one) in these two scenarios:</p>
<p><img src="https://i.stack.imgur.com/01uG9.png" alt="enter image description here"></p>
<p><img src="https://i.stack.imgur.com/G2MYw.png" alt="enter image description here"></p>
<p>This is the traceback message I get:</p>... | 1 | 2,272 |
Variable lengths differ help, lm regression and weights, variables have the same number of rows | <p>I'm trying to run a weighted squares regression, after creating my weights and trying to add it to my regression function I receive the following error:</p>
<blockquote>
<p>Error in model.frame.default(formula = CO2_pc_cmice1 ~ GDP_pc_cmice1_C + :<br />
variable lengths differ (found for '(weights)')</p>
</blockq... | 1 | 1,260 |
UnicodeDecodeError: 'ascii' codec can't encode character u'\u2019' | <p>I keep getting the below error and can't seem to get <code>.encode('ascii', errors='ignore')</code> to work. </p>
<pre><code>eqs = soup.find_all('div', {'style': 'margin:7px 5px 0px;vertical-align:top;text-align:center;display:inline-block;line-height:normal;width:120px;'})
for equipment in eqs:
if '#b0c3d9' i... | 1 | 1,215 |
how to send email using Persits.MailSender | <p>i want to send email using Persits.MailSender object. i found one solution and i include this code this solution works and Object created:</p>
<pre><code><%
posted = request.form ("submit")
if posted = "Submit" then
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'' Customize the following 5 li... | 1 | 1,100 |
problem with primefaces library (jsf) | <p>i am new to primeface.</p>
<p>i have tried to test an example of primefaces about tag as in its documentation, </p>
<p>this is my jsf page code:</p>
<pre><code><%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://primefaces.prime.com.tr/ui" prefix="p"%>
<... | 1 | 1,264 |
Selenium RC sending blank screenshots through (winxp/winserver) | <p>I'm trying to set up my virtual (xen) win xp instances, a dedicated windows server, and a dedicated windows xp desktop pc for web app UI testing, using selenium-rc and the selenium PHP API from pear (the php script running the tests sits on its app server, on the same local network as the remote-controlled windowses... | 1 | 1,124 |
PHP logging out | <p>I am doing the Lynda.com learning PHP 2 videos and have run into a problem, in that the instructor seems to have neglected to tell us one of the steps he does in the video. I have uploaded the relevant video here <a href="http://www.youtube.com/watch?v=fFKgAa7RAjo" rel="nofollow">http://www.youtube.com/watch?v=fFKgA... | 1 | 3,714 |
Unable to connect Kibana to Elasticsearch | <p>I've installed ES 7.5 and Kibana 7.5 on RHEL7, but after starting Kibana and checking the UI, I'm seeing the error, "Kibana server is not ready yet." </p>
<p>Checking the Kibana log, I see that it is not properly connecting to ES. Any help is appreciated!</p>
<p>Here is the output of <em>journalctl --unit kibana</... | 1 | 5,163 |
How to show D3 chart using Bootstrap modal popup when click on button and download it as image format | <p>I want to show d3 chart using bootstrap modal popup and download it as image format. </p>
<p>I have tried using bootstrap modal but do not know how to use javascript function which is having D3 chart inside bootstrap modal-body and how to download d3 chart as image format </p>
<p><strong>Sample code</strong></p>... | 1 | 1,600 |
Java 8 Base64 JWT token into JSON | <p>So, I have done some research on this on the Net and here on StackOverflow, and I have tried many, multiple suggestions that I have found. The problem is that I am logging into one of our Oauth2 services which is working well. I get an Oath2 JWT token. I know this is Base64 encoded, and I can drop the token int... | 1 | 1,778 |
Schema Registry + SSL | <p>This is the error that I get when I run the command:
bin/schema-registry-start etc/schema-registry/schema-registry.properties</p>
<pre><code>[2019-08-14 18:44:30,596] INFO Logging initialized @2427ms to org.eclipse.jetty.util.log.Slf4jLog (org.eclipse.jetty.util.log:193)
[2019-08-14 18:44:32,759] INFO Initializing ... | 1 | 2,346 |
Dynamic width for twitter bootstrap dropdown menu? | <p>I am working on a new layout for my ASP.Net site and am taking advantage of the twitter bootstrap but can not get the dropdown menu working 100%. I have a menu labled "Media" and when you click on the submenu pops down like it should but the width of the submenu does not expand it's width dynamicly to fit all the te... | 1 | 2,207 |
Conditionally rendering a row in a <h:datatable> | <p>I'm trying to change an existing data table (written by a previous developer) so that you see the whole table if logged in as sysadmin but only see your own details if logged in as someone else.</p>
<p>I've tried doing this by adding a <code>rendered</code> tag to each value in the table. This has let me see that m... | 1 | 1,185 |
Cannot read property 'split' of undefined | <p>I have the following code running on my local server.</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="https://jspm.io/system@0.16.js"></script>
<script src="https://code.angularjs.org/2.0.0-alpha.19/angular2.dev.js"&g... | 1 | 2,583 |
Getting the calling variable name of a parameter | <p>In relation to the question <a href="https://stackoverflow.com/questions/15205457/get-the-name-of-parameters-from-a-calling-method">Get the name of parameters from a calling method</a> and <a href="https://stackoverflow.com/questions/72121/finding-the-variable-name-passed-to-a-function-in-c-sharp">Finding the Variab... | 1 | 2,015 |
Sending my first message on the slack API | <p>I registered my first app, and it looks like this:
<a href="https://i.stack.imgur.com/0Vblw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0Vblw.png" alt="enter image description here"></a></p>
<p>All of the fields are populated below the screen shot.</p>
<p>Now, I have some basic python code u... | 1 | 1,355 |
Parsing Dictionary Response in AWS Lambda | <p>I'm attempting to create an AWS Lambda function that consumes CloudTrail events via an S3 trigger. This function will alert on the deletion of CloudWatch logs. The events: </p>
<blockquote>
<p>'eventSource': 'logs.amazonaws.com'</p>
</blockquote>
<p>and</p>
<blockquote>
<p>'eventName': 'DeleteLogStream'</p>... | 1 | 1,388 |
Set origin to top-left corner of screen in OpenGL ES 2 | <p>I'm developing an Android app with OpenGL ES 2.0. It consists of a 2D HUD overlaid on a 3D scene. Everything is fine with the 3D part, but I cannot figure out <strong>how to position the origin at the top-left corner of the screen</strong> (with the y-axis pointing down) when drawing in 2D. Right now I have the orig... | 1 | 1,156 |
How to create a Progress Bar when image is loading from a Server using Spring Mvc | <p>I'm trying to insert an Progress Bar (it doesn't need to show how much of the file is downloaded until the moment, it just need to show that the page is waiting for the load) in my JSP file while an file is loaded. I've seen this site to create and .git which would be my progress bar. </p>
<p><a href="http://preloa... | 1 | 1,120 |
How to instantiate a WebSocketAdapter instance for Jetty websockets | <p>I followed the example to create a websocket server:</p>
<pre><code> Server server = new Server();
ServerConnector connector = new ServerConnector(server);
connector.setPort(port);
server.addConnector(connector);
ServletContextHandler servletContextHandler = new ServletContextHandler(server, "/"... | 1 | 1,632 |
Deployment exception while creating a webservice on Java, using Axis2 | <p>i wrote a program in java that consumes a webservice, now i'm trying to put it into another webservice using eclipse, Axis 2 and Tomcat7.</p>
<p>The original program runs perfectly, so i think it should work in a webservice, although i'm not sure (i'm new to webservices). I'm getting this deployment exception:</p>
... | 1 | 1,999 |
Powershell 4.0 and Excel 2013 | Bug | Work-a-round | <p>I am having troubles working with the new Powershell (4.0) and Excel 2013.
I know this is (or was) a common bug and I tried to work around it. But I failed. I can open an Excel-file and work on it without any problems. But it seems, that I can't close or save the workbook.</p>
<p>Additional information: I am in Eur... | 1 | 1,041 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.