title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Unable to start activity... java.lang.NullPointerException | <p>Having real difficulty finding my error in this code. Been stuck on it for an embarrassingly long time. Any help finding the issue would be a great help.</p>
<p>Here is the class that is throwing the error</p>
<pre><code> package ggow.teamt.mdrs;
import com.google.android.gms.common.ConnectionResult;
i... | 2 | 7,294 |
Concatenating String in JQuery Selector | <p>I'm trying to concatenate a variable into a JQuery selector (which I understand to be fairly straightforward), but I'm running into some interesting behavior. My code is supposed to uncheck certain radio selectors along a y-axis.</p>
<pre><code>for(var i = 1; i < 5; i++) {
$("input[value='"+1+"']").each(fun... | 2 | 1,210 |
Cant assign data to ng2 piechart after receiving it in HTTP response | <p>My HTML markup look as follows where i am using piechart of NG2-Chart library which has dependency on chart.js:</p>
<pre><code><h2>Home</h2>
<div style="display: block">
<canvas baseChart class="chart"
[data]="pieChartData"
[labels]="pieChartLabels"
[char... | 2 | 4,582 |
msg="append failed" err="\"INVALID\" is not a valid start token" | <p>how to push api metrics to the pushgateway or node_exporter?</p>
<p>I have placed following content in prometheus.yml file:</p>
<pre><code>global:
scrape_interval: 1s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['lo... | 2 | 2,150 |
Failed to load resource: Uncaught TypeError: $(...).select2 is not a function | <p>So my MVC application keeps on throwing an Http internal server error with status code 500 when it renders my view. </p>
<p>The error it is throwing is a JQuery "Uncaught TypeError: $(...).select2 is not a function"</p>
<pre><code>Uncaught TypeError: $(...).select2 is not a function
at HTMLDocument.<anonymo... | 2 | 3,461 |
Extract only mp4 links by jsoup | <p>I have aEditText to insert the URL, a button to lunch the HTML parsing and another EditText to show the results,
how to i extract a website source with jsoup only that links ended with .mp4 ? </p>
<p>This is my profile link:
<a href="https://www.instagram.com/p/BEZcgC8/" rel="nofollow">https://www.instagram.com/p/... | 2 | 6,409 |
Laravel CSV import - can I use the request validation? | <p>I am using Laravel 5.6 and have setup a <a href="https://laravel.com/docs/5.6/validation#creating-form-requests" rel="nofollow noreferrer">form request validation</a> for my form which submits a single row, validates it and then adds to the database. This all works fine.</p>
<p>For batch import of multiple rows I h... | 2 | 1,180 |
Exception thrown when using Glimpse and Postal | <p>I'm just starting to use Glimpse with my MVC5 project and have run into an issue when I use Postal to send an email without disabling Glimpse. I've been able to narrow it down to an issue with both packages - it doesn't occur if the Glimpse cookie has not been turned on.</p>
<p>In Fiddler, I checked the difference ... | 2 | 1,583 |
Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Core.IRibbonUI' | <p>Hi I am new to excel addin. i had installed microsoft office 2010 and my addin used to work perfectly. To verify in 2013 i had installed 2013 and was running both version 2010 and 2013. Recently i installed 2013 and now if i open 2010 version my addin loads but gives following error. please help</p>
<p>Error </p>
... | 2 | 1,155 |
Getting a file from my local server and uploading it to a remote server using php | <p>I know there are many posts about this issue however I cannot find one single answer on here that describes EXACTLY what I am trying to do and I have been searching for HOURS...so hopefully you all can help me and steer me in the right direction, the main thing I cannot figure out how to do is get the source file an... | 2 | 1,026 |
Using Jquery tabs isn't working properly | <p>I have 3 different graphs I want to put in tabs and open when selected upon. I used a boostrap elements to make 3 of the graphs. I followed along the Jquery site and used that example and it isn't working how it should. For Example, when I click Tab 1 I want Graph one to appear. I've posted the code below.</p>
<p><... | 2 | 6,326 |
How to decode a base64 string properly in javascript | <p>I tried to convert a base64 string generated from pdf file using <a href="https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL" rel="nofollow noreferrer">FileReader.readAsDataURL()</a> to its original format.<br>In NodeJS I did it like this and it was able generated the pdf to its initial state.... | 2 | 1,435 |
Polymer 1.0 can't access elements within nested <template> element | <p>I am using Polymer 1.0 and I am building a small accordion example. I have data binding to the accordion text fine, I just want to change the icon of the accordion when I click it.</p>
<p>Below is my code</p>
<pre><code><dom-module id="ab-accordion">
<template>
<iron-ajax
a... | 2 | 1,226 |
Configure SMTP Server with Authentication TLS | <p>I am configuring my microservice to send emails when an event occurs (in authentication mode, using TLS), but I have not obtained the desired result.
This is the bean of my context:</p>
<pre><code><bean id="microserviceMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<prop... | 2 | 2,553 |
Printing nested lists - Python | <p>Can someone help me get this print properly?</p>
<pre><code>class Deck(object):
def __init__(self):
self.cards = []
from random import shuffle
shuffle(self.cards)
#views all cards in the deck
def view_deck(self):
for x in self.cards:
print(x.name)
#takes... | 2 | 1,063 |
READING EXTERNAL STORAGE ON ANDROID 4.2 JELLY BEAN | <p>Please Help....</p>
<p>Ive created and App for Android 2.2 that creates a text file and saves to sd card.
In another activity, it reads this file and stores into arrays.
The App worked fine on 2.2, and worked perfectly well on my samsung nexus with 4.1. (ICS)
However i have just updated to jelly bean (4.2) and the ... | 2 | 1,586 |
Referencing the same object in several collections by interface | <p><strong>Warning: this question uses an analogy to RPG as an example.</strong></p>
<p>Let's say I'm making this RPG I've been dreaming of, using C#.
When the player enters battle, there is some kind of battlefield appearing, that holds references to every elements relevant to the battle, like the various opponents a... | 2 | 1,250 |
Facebook iOS SDK, Logout (CloseAndClearTokenInformation) not working? | <p>I've set up the Facebook iOS SDK with my app, and everything works fine. I can login using Facebook, but for some reason when I try and click my "Logout" button (top right, see image below), it doesn't do anything. I'm using a Storyboard to create my app (the login xib opens on top of my existing storyboard), and ev... | 2 | 1,273 |
Flexbox order property not working to order elements? | <p>So I have a header nav that has 3 elements, <code>.nav1, .site-branding (logo), .nav2.</code> I am trying to move the <code>.site-branding</code> (logo) in the center so: </p>
<pre><code>NAV LOGO NAV
</code></pre>
<p><strong>Problem: The flexbox order property is not working when given to the 3 classes. Any ideas?... | 2 | 2,705 |
SQL result as txt.file by php | <p>I have a php file, which transform my sql query in a php output. Everything works fine. But now i need a output as txt.file and my code does not work.</p>
<p>Here the query:</p>
<pre><code><?php
$pdo = new PDO('mysql:host=localhost;dbname=DB', 'USER', 'PW');
$result = ("SELECT o.order_id AS Bestellnummer, o.cu... | 2 | 1,138 |
(need explanation) spout reader documentation | <p>can someone help me with this spout documentation, </p>
<pre><code>use Box\Spout\Reader\Common\Creator\ReaderEntityFactory;
$reader = ReaderEntityFactory::createReaderFromFile('/path/to/file.ext');
$reader->open($filePath);
foreach ($reader->getSheetIterator() as $sheet) {
foreach ($sheet->getRowIte... | 2 | 1,142 |
How to get selected item from AUI autocomplete list | <p>I want to show address in my database to an autocomplete aui input field.Everything seems working fine.But im not able to retrive the address number of the record.How to use the on change event of autocomple-list or how can i access the selected item's json object</p>
<pre><code> @Override
public void serv... | 2 | 1,240 |
Custom WooCommerce Template - Product Variation Main Image Doesn't Change | <p>I am using a custom template for WooCommerce so that we can change the layout of the page. It works great, however the product image isn't changing with the variation of a product. I.e. if they select 'red' the main image doesn't change. Instead, only the thumbnail in position #1 does. I know it's related to the lay... | 2 | 1,925 |
Custom Rule class in Laravel - how to get message working? | <p>Working on an existing project, so keeping the code structure the same as other developers is critical. </p>
<p>I've created a new <code>Rule</code> and added my <code>Validator::extend</code> to the <code>boot()</code>. However I can't get the validation error to display my custom message. Instead is just displays... | 2 | 1,035 |
frbs rule base or in R | <p>I've been trying to use the R Statistical software to build a fuzzy inference system(FIS). Using the R package 'frbs' I've managed to set up the most of components of the FIS following the example in the demo files. Unfortunately I've hit a problem:</p>
<p>I want to modify the Rule base from using 'and' to 'or'. ... | 2 | 3,825 |
treeview item validation | <p>I'm trying to validate items inside a treeview. The main idea is that a user selects an object from the tree and that loads its details which can be edited. That's all working fine as I've got <code>INotifyPropertyChanged</code> hooked up but... my model has validation logic hooked up (<code>IDataErrorInfo</code>) a... | 2 | 2,053 |
should pragma once be on top of every header as default | <p>I'm learning C++ and I have encountered (and fix) what seems to be a very classic problem :</p>
<pre><code>g++ main.cpp A.cpp B.cpp -o out
In file included from B.h:1,
from main.cpp:3:
A.h:1:7: error: redefinition of ‘class A’
1 | class A {
| ^
In file included from main.cpp:2:
</cod... | 2 | 1,189 |
RBAC Issue with user in non-default namespace | <p>I just created a cluster with kubeadm last week, version 1.7.3 on CentOS7. I followed the steps at <a href="https://docs.bitnami.com/kubernetes/how-to/configure-rbac-in-your-kubernetes-cluster/#use-case-1-create-user-with-limited-namespace-access" rel="nofollow noreferrer">Bitnami</a> to create certs and a config fo... | 2 | 1,432 |
Checkbox activates textboxes in asp.net with vb.net | <p>I am creating a page in asp.net with vb.net and I have a check box that I would like to use to activate four text boxes and a drop down list. I have tried using JavaScript to get this working, but it isn't working so far. I have tried just activating one text box at this point. Any suggestions?</p>
<p>Here are m... | 2 | 1,793 |
Typo3 - remove default target in external menu item | <p>I have the below typoscript </p>
<pre><code>lib.nav = HMENU
lib.nav {
wrap = <ul> | </ul>
1 = TMENU
1 {
expAll=1
NO {
|*| <ul><li> | </li></ul> |*| <ul><li> | </li></ul> || <ul><li class="last"> | </li></u... | 2 | 1,590 |
Simplest possible rack app -> permission error | <p>Here's the program(1.rb):</p>
<pre><code>require 'rack'
my_rack = lambda { |env| [200, {}, ["Hello. The time is: #{Time.now}"]] }
handler = Rack::Handler::WEBrick
handler.run(my_rack, :PORT => 12_500)
</code></pre>
<p>Here's the error:</p>
<pre><code>~/ruby_programs$ ruby 1.rb
[2012-12-07 21:49:09] INFO W... | 2 | 1,173 |
JsonConvert.DeserializeObject Error reading object reference '1' | <p>I am trying to deserialize an object in a Web Api from an object posted by angular. I am receiving an error: <strong>Error reading object reference '1'. Path 'Developers[0].DeveloperId', line 20, position 21</strong>
My Json object is (which has been validated as valid JSON):</p>
<pre><code>{
"Id": 0,
"Name": "... | 2 | 1,050 |
Instagram like post screen flutter | <p>I am trying to build a picture and camera screen in a page like the Instagram post screen I tried using storage path which currently only works on android and also returns an error, I want it to work on android and ios so I can easily pick multiple images no cropping or editing needed for the pictures.</p>
<p><img ... | 2 | 2,659 |
420YpCbCr8 to RGB conversation | <p>I try to set texture with <code>CVPixelBuffer</code> that i get from video stream</p>
<pre><code>NSDictionary* videoOutputOptions = @{ (id)kCVPixelBufferPixelFormatTypeKey : [NSNumber numberWithInt:kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange] };
self.videoOutput = [[AVPlayerItemVideoOutput alloc] initWi... | 2 | 2,071 |
Couple newbie questions regarding the openJS grid | <p>i am playing with the openJS grid. Being through all the videos, however still stuck. I am using the latest OpenJS Grid 2.1.5. Couple questions here:</p>
<ol>
<li><p>When i used the basic setup example, with the save and delete set to true, i don't see either one show up in the grid. What am i missing?</p></li>
<li... | 2 | 1,026 |
pentaho can't access by chrome | <h2><strong>1. Symptom</strong></h2>
<p>1.1 <strong>frontend</strong></p>
<p>When I download and configure pentaho on my redhat server, it works on IE, but can't access by chrome with the admin account. you may see the attached pic below, loading all the time
<img src="https://i.stack.imgur.com/yiObT.png" alt="enter ... | 2 | 4,158 |
How to plot 3D hist in python | <p>I have dataset that contains accidents in a region with a year. </p>
<pre><code>> Accident_ID Region Year
> 213 1 2003
> 234 2 2001
> 334 2 2004
> ..
years= [0.0, 1661.0, 1665.0, 1706.0, 1729.0, 1765.0, 1779.0, 1780.0, 1785.0, 1798.0, ... | 2 | 2,671 |
How to normalize a given property using callback or any other method in Symfony 3? | <p>Let's say I have the following response coming from an API call:</p>
<pre><code>[
{
"AgreementNumber": 20266,
"StartDate": "2005-07-01T00:00:00",
"EndDate": "2006-06-30T00:00:00",
"AgreementTypeId": 1,
"CfProgramLevelId": 2,
"TamFlag": 0,
"ParentAgreementNumber": null,
"Distributor... | 2 | 1,322 |
An error occured while checking mobile data state | <p>I want to check the mobile data state on/off in android.
I have written the below code in button clicking code..</p>
<pre><code>@SuppressWarnings("rawtypes")
public void check_mobile_data(View view) { // this is my button clicking event.
Context context = null;
boolean mobileDataEnabled = false; // Assume ... | 2 | 1,420 |
Android Custom ListViewItem Layout | <p>I dont quite get the layout of my List View Item doesnt show like I want it to.
I hope somone would give me some hints since i cannot make it work for quite some time now.
What i want is as follows:</p>
<p><img src="https://i.stack.imgur.com/DOvzD.jpg" alt="enter image description here"> </p>
<p>Here is my approac... | 2 | 1,375 |
Couldn'tmake buildnumber-maven-plugin plugin work | <p>Whatever I do, I am not able to get teh buildNumber in the final name of the project :(
Reequesting Maven experts to please have a look and suggest some solutions.</p>
<p>Here is my pom.xml</p>
<pre><code><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instanc... | 2 | 2,837 |
Ruby on Rails Project With Mysql Database | <p>I am a beginner at ror. I am working on ubuntu.</p>
<p>I can create a new ror project with default database and there is no problem everything is okey.. but i want to create a project which have mysql database.</p>
<p>I use this command:</p>
<pre><code>railse new myproject -d mysql
</code></pre>
<p>then, I set m... | 2 | 2,753 |
Why do I get this "undefined method" error in a Rails model callback, passing the method as a symbol? | <p>I have a class called "Post" that should convert its markdown content to HTML when it is changed or it hasn't been converted yet. I'm trying to use the before_save callback with the <code>if:</code> argument, but I get this error on whatever I pass to the <code>if</code> when I try to run my tests:</p>
<blockquote>... | 2 | 1,338 |
Supplying MudBlazor Autocomplete with content from a service | <p>I have here an example of an <a href="https://mudblazor.com/components/autocomplete" rel="nofollow noreferrer">Autocomplete</a> taken from the MudBlazor component library documentation that offers options as I type from a pre-defined list of possible values:</p>
<pre class="lang-html prettyprint-override"><code><... | 2 | 1,104 |
Loading data into component based on route in react | <p>I just started learning React and I feel I am facing a common problem most beginners will face. I am building a really simple React App at the moment. I am aiming to build a website with a navigation and some dynamic content that changes according to the navigation item that is clicked. However the content has alway... | 2 | 1,759 |
Extension form framework finisher not working | <p>I have created custom finisher to call API and send data to the server. Here is the code for this.</p>
<p><strong>Typoscript:</strong></p>
<pre><code> plugin.tx_form.settings.yamlConfigurations {
200 = EXT:ApiCall/Configuration/Yaml/BaseSetup.yaml
300 = EXT:ApiCall/Configuration/Yaml/FormEngineS... | 2 | 4,949 |
Git repository clone failed.missing CR | <p>Hi anybody can pls suggest any solution over this.i am trying to clone git repository but everytime i am getting the above message.this is the log which i am getting.</p>
<pre><code>org.eclipse.jgit.api.errors.TransportException: missing CR
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
at... | 2 | 1,326 |
APScheduler Look up object error | <p>APScheduler (3.3.1) py2.7</p>
<p>I use this code to do my job When I use Memory as job store it can work well but I have too many job and my Memory in server is limit so I change SQLAlchemyJobStore as job store but I got the Lookup error. How to solve it.</p>
<p>Code:</p>
<pre><code>def script(indicator, strateg... | 2 | 2,692 |
How to capture signalR connection string in Jmeter | <p>I am getting error when script is executed in jmeter, because of signalr connection</p>
<p>I need to pass connectionToken and connectionData in the url as below.</p>
<p>"/Web/signalr/connect?transport=longPolling&clientProtocol=1.5&connectionToken=${connectionToken}&connectionData=${connectionData}"</p... | 2 | 1,376 |
Full Calendar month name | <p>I successfully installed FullCalendar besieds MVC.
And I also show the meetings within my database.</p>
<p>But why is the month name not showing up?</p>
<p>Starting month should be March, but it is not showing. And when you start clicking "Next month" the events of april get shown. But then it should be already ... | 2 | 1,802 |
DEBUG: Crawled (404) <GET > | <p>I'm trying to extract data about the various competitions offered by kaggle.</p>
<p>I have tried fetching the data from the website through the shell as well as through the code but failed. I tried adding HTTPERROR_ALLOWED_CODES = [404] to the setting.py and made ROBOTSTXT_OBEY = False, yet the error did not go awa... | 2 | 1,835 |
Compiling OpenSSL with Dynamic Zlib in Windows | <p>I am trying to create a 32-bit dynamic build of OpenSSL on Windows. I have also built a 32-bit dynamic version of Zlib on Windows. There is not a static version available in my Zlib directories.</p>
<p>Everywhere I've read says that's all that is needed; however, when I compile Zlib does not appear as a dependency... | 2 | 16,586 |
SOAPUI response message | <p>I am trying to call a web service using soap UI, here is the xml for the request:</p>
<pre><code><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:uuid:e657a351-ae8c-42c5-b083-ebe5dcda5c0b">
<soapenv:Header/>
<soapenv:Body>
<urn:GetCustomerAc... | 2 | 1,513 |
ServiceMix / JPA Integration - LocalContainerEntityManagerFactoryBean to type EntityManagerFactory | <p>I'm fairly new to ServiceMix / JPA / Camel / Spring. I'm attempting to use the camel-jpa component as part of my camel route. I'm using the latest release of ServiceMix, which is 4.5.1. This uses camel 2.10.4 and spring 3.0.7.</p>
<p>After updating the OSGi manifest and deploying some additional modules to servi... | 2 | 1,646 |
VueJS: Modify SVG fill style with reactive variables | <p>I have a SVG that looks like:</p>
<pre><code><svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 121">
<defs>
<style>
.cls-1{fill:#fff}.background{fill:#f00}.trim{fill:#0f0}.foreground{fill:#00f}
</style>
<mask id="mask" x="4" y="4... | 2 | 2,538 |
Class Constructor fails throwing Exception on Class Loading | <p>I have a constructor that fails on the first call to <code>new</code> because an Exception of class <code>javax.persistence.NoResultException</code> being catch in one of the Class' methods. </p>
<p><strong>EDIT: It was not a NoResultException, the NoResultException was the message of the Exception. The stackTrace ... | 2 | 2,214 |
iOS Keyboard Extension terminated with "per-process-limit" | <p>I am trying to develop a Keyboard Extension for iOS 8. Apart from various problems I had (which make it obvious that extensions are just an after-thought), after starting to test on an iPhone 6, I found out that the extension is randomly terminated with the crash log having an entry such as this:</p>
<pre><code> Na... | 2 | 1,129 |
WCF Service is showing error after implemented in IIS | <p>In my project I am using Enterprise Library to connect to database. It is working fine when I run the application from Visual Studio directly.</p>
<p>But this is showing error connecting to database when hosted in IIS on same machine. I have added log trace and got the following error</p>
<blockquote>
<p>Resolut... | 2 | 1,387 |
VBA code to combine all worksheets into 1 worksheet except for the first worksheet | <p>I have a well-working code which combines the data for all of the worksheets in a workbook. However, I need to exclude <code>Workbook.Sheets(1)</code> from the code but despite changing the code to start from the second sheet, it is still combining <em>all</em> the worksheets. My code is pasted below. </p>
<p>I inc... | 2 | 1,042 |
How to get page.keyboard.press("[any key]") to dispatch a keypress event with page.keyboard.down("Control") | <h3>Steps to reproduce</h3>
<p><strong>Tell us about your environment:</strong></p>
<ul>
<li>Puppeteer version: v1.19.0</li>
<li>Platform / OS version: Windows 8.1</li>
<li>URLs (if applicable): </li>
<li>Node.js version: 10.16.0</li>
</ul>
<p><strong>What steps will reproduce the problem?</strong></p>
<p>I have th... | 2 | 1,942 |
Done - Spring Security JWT Token_Key | <p>I have a problem with Spring Security / Boot (1.2.5) and JWT.</p>
<p>First of all I have a running Auth-Server which use JWT. I could already test it and enabled the /oauth/token_key resource. </p>
<pre><code># curl -u client_id:client_secret http://localhost:8080/oauth/token_key
{"alg":"SHA256withRSA","value":"--... | 2 | 3,296 |
ImageReader format compatibility for FirebaseVisionImageMetadata (via Camera2 API on Android) | <p>I'd like to use the image byte array from the ImageReader to construct a <code>FirebaseVisionImageMetadata</code> object for barcode scanning (as part of the <a href="https://firebase.google.com/docs/ml-kit/read-barcodes" rel="nofollow noreferrer">ML Kit</a> ). I'm using the Camera2 API and following <a href="https:... | 2 | 1,218 |
Can't get CardLayout/button ActionListeners to Work | <p>I know it's something to do with how I've set it up and the actionlistener not being correctly set to the frame or something but I just can't get my hear around it. If someone could point me in the right direction I'd be much obliged. Sorry for noob question.</p>
<p>Here's what I have:</p>
<pre><code>import java.a... | 2 | 1,810 |
PHP Issue with using a temporary file for cache of content | <p>I have been working on creating a quick twitter widget for myself to re use, just something simple that caches the data from the public api. Since twitter only allows X requests for a certain time period and I have been testing this on a shared host, Its very often that I run out of requests and twitter denies my r... | 2 | 2,623 |
Search bar which highlights text | <p>I want a search bar which searches for the value and highlight that particular value in my web page. I have made a navigation bar in which there is search button with id "btn" and a text box with id "InputVal". I want that my text box value is searched and is highlighted in my webpage (paragraph). </p>
<p>My HTML ... | 2 | 2,893 |
SQL syntax error: "com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax;" | <p>Trying to establish a JDBC connection in an android studio app, and I am getting the following error:</p>
<pre><code>2020-07-06 13:16:55.229 12576-12664/com.example.mmi W/System.err: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to ... | 2 | 1,656 |
Error in Manifest while using GCM for push Notification | <p>I have started working on GCM Notification
after a lot of goggling i checked out code through which i can get registration id from GCM Server so i used </p>
<pre><code>super.onCreate(savedInstanceState);
setContentView(R.layout.main);
GCMRegistrar.checkDevice(this);
GCMRegistrar.checkManifest(this);
final String ... | 2 | 1,275 |
Splitting MNIST data tensorflow | <p>I've been following the tensorflow tutorials. I've imported the MNIST dataset and ran the code for a 2 layer convolutional neural net. It took nearly 45 minutes to train. I want to cut down the training data by discarding some of the data. How do I do that?
Here's the code:</p>
<pre><code>import tensorflow as tf
im... | 2 | 1,133 |
category__not_in in index.php of Woocommerce template not working | <p>I'm new to PHP and WordPress so my question could easily be silly. Although I have found others with similar questions. </p>
<p>On my main page (index.php) I would like to exclude products of a certain category. I found that it should be possible to use category__not_in as a parameter passed to the $args var. but t... | 2 | 1,545 |
Why does laravel image upload show incorrect url in view? | <p>I have a form that uploads an image file to a post, very simply and it uses image intervention </p>
<p><code>"intervention/image": "dev-master"</code></p>
<p>so I can resize it etc but at the moment its a simple post action like so:</p>
<pre><code><?php namespace Boroughcc\Http\Controllers;
use Input;
use Red... | 2 | 1,597 |
DirectX 11 How Do Vertex And Pixel Shaders Work | <p>I am reading the book, "Practical Rendering and Computation with Direct3D 11" and looking at the DirectX 11 Sample:</p>
<p>CPP:
<a href="https://github.com/walbourn/directx-sdk-samples/blob/master/Direct3D11Tutorials/Tutorial02/Tutorial02.cpp" rel="nofollow noreferrer">https://github.com/walbourn/directx-sdk-sample... | 2 | 1,112 |
send JSON Object via POST or AJAX JQuery to PHP | <p>I checked many answers for my question but none of them worked for me.
I created an <code>json</code> object with a <code>script</code> that i found in <code>stackoverflow</code>, and works fine, but when i try to send it to <code>php</code> (i use <strong><em>laravel framework</em></strong>) with <code>$.post</code... | 2 | 2,430 |
Cannot resolve RouterLink tag | <p>Vanilla Vue CLI installation aside from a handful of pre-installed stuff via NPM. </p>
<p>I've read the online docs, I've read the forums but cannot get the Vue router to work. </p>
<p>I've tried a number of different ways of importing the vue router, but the official document has <code>import VueRouter from 'vue-... | 2 | 5,997 |
ASP.NET bundling and minification not producing query string params | <p>I've been using ASP.NET bundling and minification with the nugget package Microsoft.AspNet.Web.Optimization.</p>
<p>I noticed yesterday that the majority of my bundle files no longer have the v query string parameter to the exception of one of them:</p>
<p>/Sgc.Web/bundles/css/JQueryUI</p>
<p>/Sgc.Web/bundles/css... | 2 | 1,544 |
Inner dependency is not being injected (Weld + JavaSE) | <p>I am in the process of refactoring an old module, by adding CDI.</p>
<p>I end with</p>
<pre><code>public interface ApiFactory {
...
}
public class ApiFactorySp
implements ApiFactory {
@Inject
UrlProducer urlProducer; // <-- Does not get injected
...
}
</code></pre>
<p>and</p>
<pre><code>public i... | 2 | 1,392 |
No port 'a' on instance | <p>so I am working on the students labs from the xilinx website. I've been trying to look through many different examples online but I can't seem to find one to help fix my problem. I'm getting the following errors when trying to synthesize my code. I've tried mostly switching to different letters and cases. Even the s... | 2 | 1,357 |
how to get android camera to work in multiple orientations | <p>OK I have this camera code
I want to make it so that it will work in all orientations.
and on android 2.2/2.3.3/3.2</p>
<p>I was thinking something like </p>
<pre><code>if(Build.VERSION.SDK_INT == 8)
do v8 work
else if(Build.VERSION.SDK_INT == 10)
do v10 work
else if(Build.VERSION.SDK_INT == 14)
do v14 work
</code... | 2 | 8,187 |
How to create a zoomable canvas image in Unity for mobile without scaling the main camera? | <p>I have GameObject with Scroll Rect and Rect Mask in my canvas and there is an image in it. I want to zoom in and zoom out of that image. However <strong>I don't want to scale Main Camera</strong> because there will be other objects in the screen that I don't want to zoom. I searched it but all the tutorials are doin... | 2 | 2,717 |
cygwin exception when assigning value to vector of strings | <p>I am having following exception during the course of the run of program:</p>
<pre><code>0 [main] myFunction 5560 cygwin_exception::open_stackdumpfile: Dumping stack trace to myFunction.exe.stackdump
</code></pre>
<p>The contents of stackdump file are as follows:</p>
<pre><code>Stack trace:
Frame Function ... | 2 | 8,428 |
cannot bind values to dynamically created textbox jquery | <p>i'm trying to bind jquery autocomplete result to dynamically created textboxes, i have searched internet and forums but couldn't found any appropriate solution, i'm sharing my code</p>
<p>JQUERY:</p>
<pre><code>function bindAutoComplete(classname) {
$("." + classname).autocomplete({
source: function (r... | 2 | 4,703 |
Injecting ViewModels with an Activity context dependency | <p>I'm using dagger.android and want to inject ViewModels. On the other hand, I have an <code>ApiModule</code> that depends on activity context, </p>
<p>Here is the <code>AppComponent</code></p>
<pre><code>@Singleton
@Component(modules = {
AndroidSupportInjectionModule.class,
AppModule.class,
... | 2 | 2,597 |
Codeigniter can't find relative paths to resources with htaccess | <p>I'm working with codeigniter and I'm stuck with the paths to css/js, removing the index.php and .htaccess. I'm trying to load my resources but I'm always getting errors in my </p>
<p>I have the following structure in my htdocs folder</p>
<pre><code>Course
|
|
Project
|
|
js
css
... | 2 | 1,099 |
How to update tweets using Twitter 4J? | <p>I am using Twitter4J (2.1.0) to try to update tweets. I can't figure out what is wrong with my code.</p>
<p>In particular my problems are:</p>
<p><em><strong>(a) Not all tweets post successfully. I often get the error code of -1. According to a google group <a href="http://groups.google.com/group/twitter4j/brows... | 2 | 1,497 |
Creating regular notification in Blackberry Notification bar | <p>I've read a little on Blackberry push notifications, but I'm not sure if the code provided is what I'm trying to achieve. Basically, I want my application to have a notification popup after a period of time, with an icon and a message, and once they have clicked on that notifcation it takes the user to the relevant ... | 2 | 10,479 |
Connection refused when making curl request inside docker | <p>I have a nginx webserver with docker compose with the following web apps:</p>
<pre><code>example.com
api.example.com
</code></pre>
<p>I can curl both sides from outside, but I need to curl from one web page to the other one.</p>
<pre><code>curl example.com -> host not found
curl nginx -> returns exmaple.com... | 2 | 3,236 |
Django: relation does not exist | <p>I have pulled myproject updates from bitbucket and tried following commands 'python3 manage.py makemigrations', 'python3 manage.py migrate vehicle', 'python3 manage.py migrate'. But I am getting the following error. vehicle app is new and some of its models use foreign keys from other apps which were migrated befor... | 2 | 4,267 |
Finding rows and columns with the maximum number of 1s in a randomly generated binary matrix | <p>The output of this program works fine. But there's one thing I've not been able to implement. In some cases, I don't have a row or column with the highest number of 1s. Sometimes I have 2 or more rows/columns which have the same "HIGHEST" number of ones. But my program only returns 1 row/column. </p>
<p>I want a ca... | 2 | 1,836 |
D3 zoomable sunburst order children | <p>This is my basic version of the sunburst zoomable chart.</p>
<p>As you can see from the picture the data is not in any particular order. I am hoping to be able t o order the children as the circle goes round by the name that of which is attached in the element itself. </p>
<p><a href="https://i.stack.imgur.com/6Ke... | 2 | 3,522 |
Three.js - Extrude face along its normal vector | <p>I want to extrude faces from a THREE.Geometry object, so my approach was to:
- specify the faces to extrude
- extract vertices on the outer edges
- Draw a THREE.Shape with those vertices
- Extrude it using THREE.ExtrudeGeometry (I'm actually using a modified version which is not generating front faces, as I'm clonin... | 2 | 1,561 |
Load More Cell UITableView | <p>I'm trying to add Load More Cell to my tableview. Begin with 5 rows and when I click Load More Cell and add more 5 rows. All work fine without load more cell has image but I don't want it. I tried to fix it but it does not work.</p>
<p>Table begin
<a href="http://i.stack.imgur.com/Ld2ED.png" rel="nofollow">http://... | 2 | 1,162 |
Paste event on TextFormField doesn't work with onChange Flutter | <p>I'd tried for some weeks to put a callback function when i paste some text in a TextFormField to modify/format the text i'd paste.</p>
<p>I used a TextEditingController with the SetState function, change the callback function with a variable on SetState but I should be doing something wrong.</p>
<p>Sometimes it wo... | 2 | 2,338 |
How to disable ReplyTo on Asynchronous "one-way" exchange pattern | <p>About Mule 3.3 CE:</p>
<p>Even though I have an asynchronous "one-way" exchange pattern it replies twice to the caller with "empty" messages before my real response. So I get three responses. The first two are just empty "crap" and then I get my real response back.</p>
<p>Can I disable the first two "empty" respon... | 2 | 1,333 |
How to convert Object to csv file with a multiple sheet in excel/csv file by separating bullet of Object | <p>I need some recommandation to convert below object to csv file by <strong>seperating each bullet to new sheet</strong> in csv/excel file".</p>
<pre><code>var data = {
DeviceA: {
smokeSensor: [
{
'190501': {
'0001': 200,
'0002': 300
},
},
{
'190502'... | 2 | 1,818 |
Ajax request not working in eclipse when running on android emulator or phone | <p>Hello i am new to phonegap and jquery mobile and have a problem when trying to run my application via eclipse emulator and also on my htc phone. </p>
<p>My code works perfectly when i run the application in firefox. The HTML calls a PHP script that runs on tomcat, the php script accesses the mysql and passes back j... | 2 | 2,358 |
Apache OpenMeetings 4.0.4 CSRF attack when using apache2 as proxypass | <p>I've got Apache OpenMeetings 4.0.4 witch Apache/2.2.22 as proxy.</p>
<p>In OM's conf/red5.properties I've got</p>
<pre><code>http.port=8080
</code></pre>
<p>I want to do two things:</p>
<ol>
<li><p>Redirect HTTP (80) -> HTTPS (443)</p></li>
<li><p>Redirect HTTP (8080) to HTTPS (443)</p></li>
</ol>
<p>My /etc/ap... | 2 | 1,161 |
Blogger: Facebook share - issue with image | <p>When I try to share any content of my blogger in facebook or if I just copy the link and paste there something like this happen (see the empty square that is supposed to have an image):</p>
<p><a href="https://i.stack.imgur.com/cQ6My.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cQ6My.png" alt=... | 2 | 1,067 |
How to clear notification on android when clicked | <p>Every time I click on notification the activity pops on screen which I had used to trigger the notification in the status window.</p>
<p>I want to clear the notification when a user clicks on it, but it opens the activity every time.</p>
<p>I tried using flags not only on notification but on PendingIntent and Inte... | 2 | 1,242 |
Stripe.js and Laravel - Token not generated by Javascript or passed to server | <p>Query regarding stripe.js token. :)</p>
<p>I have a basic checkout set up. I'm using Laravel and Stripe.js to process payments. I have followed a guide but seem to be having trouble getting Stripe.js to generate and pass a token to the server.</p>
<p>Laravel Payment Form (validated with Parsley.js):</p>
<pre><cod... | 2 | 5,963 |
Laravel on Windows Server 2008 R2 and IIS7.5 results in 500 Internal server error | <p>I'm trying to set up Laravel on IIS7.5 and I'm stuck for a while now.
I setted up the environment and the URL rewrite. When I place a common index.php with hello world in the public folder, the browser gives me "Hello World".
When I use the laravel index.php I get an 500 Internal Server Error.
Can anyone help me on ... | 2 | 1,065 |
Vue JS use array to filterBy another array? | <p>Yep, it's me again. I'm trying to filter an array based on an array of strings. So while a single string filter is easy with Vue...</p>
<p><code><div v-for="item in items | filterBy 'words' in 'property'"></code></p>
<p>...multiple search strings becomes more complex. There's been several questions about how... | 2 | 1,058 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.