title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
PHP Array cURL foreach | <p>I have again a problem, I want to use in ShoutCast2 the API and have an array a problem.</p>
<pre><code>$sc_host = 'IP';
$sc_port = 'PORT';
$sc_user = 'USER';
$sc_pass = 'PASSWORD';
mt_srand((double) microtime() * 1000000);
$seq = mt_rand(1, 100);
$post = 'op=listevents&seq=' . $seq;
$ch = curl_init($sc_host... | 2 | 1,197 |
When i m Send Ajax Request in my web Application then controller side it give me script in request parameter in laravel | <p>When I'm sending this ajax request: </p>
<pre class="lang-js prettyprint-override"><code> $.ajax({
url: "{{URL::to('admin/repcasetracker/getdiscount')}}",
data: {
serialnumber: serialnumberdata,
},
success: function (data) {
console.log(data);
}
});
</code></pre>
<p>Controller:</p>
<pre ... | 2 | 5,892 |
showing database value with an image using JSP | <p>I have created a simple site that reads a database table and displays it in a html table in the browser.
I have a button that allows for the table to be altered, saved & then automatically forwarded to the homepage with the updated table.
I also have a select button with which the user can select that particular... | 2 | 1,853 |
JSP - Get score from a jsp quiz application | <p>Hi I'm creating a quiz application in jsp and am using different jsp pages for every question. I'd like to keep a score after each question is answered. My problem is that I'm picking random answers from a database, within which lies the correct answer too. Since I can't guess which letter the correct answer will ap... | 2 | 2,771 |
Using Components from Another Module on a Angular/JHipster Application | <p>I'm trying to use a <code>component</code> from another <code>module</code> on an <strong>Angular 5</strong> application generated by <strong>jhipster</strong>. </p>
<p>When a <code>module</code> that contains the <code>component</code> that I want to use is imported the <code>route</code> of the <code>module</code... | 2 | 4,974 |
Posting an image with on facebook using flex | <p>I trying to post an image along with the link on facebook.I am able to login get the user details but I am not able to post the image and the link.Following is the code I used</p>
<pre><code><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
... | 2 | 1,643 |
Unable to write to plist file | <p>I've found several questions here on the site with people who have a similar problem, but I'm still not able to resolve mine. Here's the thing:</p>
<p>I'm making an iOS app that contains two plist files. When the user opens the app for the first time, the application takes care of moving these two files to the Docu... | 2 | 1,038 |
OSGi: javax.annotation conflict: Java SE vs Java EE | <p>In a Java SE OSGi (Apache Felix) environment, I'm trying to integrate CDI using PAX CDI and Weld 2.2.6.Final.</p>
<p>I'm currently getting the following error:</p>
<pre><code>ERROR: Bundle org.jboss.weld.osgi-bundle [45] Error starting file:///someDir/org/jboss/weld/weld-osgi-bundle/2.2.6.Final/weld-osgi-bundle-2.2.... | 2 | 1,286 |
Invalid single-table inheritance type: | <p>I'm getting this error and I don't know what to do. It says </p>
<pre><code>Invalid single-table inheritance type: 1 is not a subclass of Game
</code></pre>
<p>It says that this error is occuring at the 9 in games_controller.rb. </p>
<p>i.e.</p>
<pre><code> @game = current_user.created_games.build(game_params)... | 2 | 1,780 |
Problem accessing updated variables within OnTouch | <p>I have an OnTouch and a setOnTouchListener that updates varibles which contain screen coord info. The problem is it doesnt seem to ever update them. On line 78, RGB.setText(test); it never changes from 0.0. If i were to move that line and the line above it into the onTouch it updates. any idea what is wrong? Thank y... | 2 | 1,456 |
Python socket tcp communication with subprocess on ROS | <p>I tried to send/receive a large video capture image by tcp python socket on ROS-melodic.
I need to use subprocess because ROS-melodic is running on python2 but I need python3 libraries.</p>
<p>I have a Server and a Client.</p>
<ul>
<li><p>Client : It is a ROS node that sending the received video capture image(its ... | 2 | 1,252 |
How to rotate figure in D3? | <p>The task is to rotate figure with d3, PowerPoint-like way:</p>
<p><a href="https://i.stack.imgur.com/TUYGZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TUYGZ.png" alt="enter image description here"></a></p>
<p>Got <a href="http://embed.plnkr.co/fXT0kZcRwJTPb7wQVHpg/" rel="nofollow noreferrer"... | 2 | 2,488 |
FusedLocationProviderClient getLocationAvailability needs a delay to give a correct result | <p>I'm trying to get last location checking first if GPS is enabled, I ask user to go to settings to enable it if it's not, and when I go back from settings to my app, after enabling GPS location, and I check if GPS is available, I get it's not enabled, after a delay (1-2 seconds) I get it is.</p>
<p>Why there is tha... | 2 | 1,135 |
When 0xFF is in char array, it gets read as integer along with next char | <p>I am using C on MS-DOS, specifically Turbo C, and I encountered something strange with my numbers being read here. I have a function called writeBitmap that in essence takes a struct with a path, x and y size, and then offset for a sprite sheet, as well as an array that defines each image using this.</p>
<p>The pro... | 2 | 1,150 |
MongoDB group subobjects with same id and get average of values | <p>I have documents like this:</p>
<pre><code>{
"_id" : ObjectId("588e505fcdefc41e84c184cb"),
"Id" : 58614891,
"modifyDate" : 1485567717000,
"data" : [
{
"id" : 99,
"stats" : {
"totalDepth" :... | 2 | 2,262 |
How to automatically show select for crop on image | <p>I was wondering how can I make imgareaselect select automactically once photo file is selected? so that the user knows that they can crop on what to use in a photo so far I have:</p>
<p>What I'm trying to achieve is when I select an image file I'm trying to make imgareaselect select a part of the photo automaticall... | 2 | 1,314 |
Delphi: how to trim a excel range | <p>Although I am a great fan of stackoverflow and I found several good solutions, this is my first question.
I am writing a Delphitool (D6... old but still working!) for making it easier to administrate our students at school.</p>
<p>Delphi reads some (even older...) Visual Foxpro Dbase tables and collects the needed ... | 2 | 1,379 |
How to setup IBM DB2 9.7 to work with Entity Framework 6 and Visual Studio 2015? | <p>I'm using Visual Studio 2015 to develop an ASP.NET MVC application on a Windows 7, 64-bit machine and I want to connect to an IBM DB2 9.7 database using Entity Framework 6 (Code-First). </p>
<p><strong>Background</strong></p>
<p>I've found a number of articles online that indicate that the <code>IBM Data Server Dr... | 2 | 2,465 |
Issues with Disqus Single-sign on, no connection made | <p>i am trying to implement disqus single sign on, but i cannot seem to make a connection, i set up a test page:</p>
<pre><code><?php
define('DISQUS_SECRET_KEY', 'mykey');
define('DISQUS_PUBLIC_KEY', 'myotherkey');
$data = array(
"username" => "Disqus Test",
"url" => "http://disqus.com",
"id" =&g... | 2 | 1,068 |
Conditionally tick the checkbox in modal dialog in Angular | <p>I have a bootstrap modal dialog which contains some checkboxes. Each checkbox represents a category from the database and I need to tick the checkbox only if the user is interested on that category. </p>
<p>following is my html for the modal</p>
<pre><code><div *ngIf="_user" id="categoryModal" class="modal fade... | 2 | 1,197 |
My Unit Test case fails with Assertion Error | <p>Setup: spring-boot 1.4.3.RELEASE
Java 1.8</p>
<p>I've written three test cases against my BluecostRestController.java (code below). The tests for the following URLs worked fine:
GET /bluecost/sscdata
GET /bluecost/sscdata/sergio</p>
<p>Now I'm trying to write a test case for the POST /bluecost/sscdata/ and I am ... | 2 | 3,208 |
How to combine a list with a number sequence in r? | <p>I am doing my PhD research on the online forums dedicated to WW2. I have a question which seems very basic to me, but I just can't wrap my head around it.</p>
<p>There's a list of links where the links only differ by author_ids. Like this:</p>
<pre><code>[1] "http://forum.axishistory.com/search.php?st=0&sk=t&a... | 2 | 1,605 |
OpenGL: Some clarification on using multiple textures or texture units | <p>I need to use two textures in my shader, one in the vertex shader, another in the fragment shader. In both cases they are referenced in the shaders like <code>uniform sampler2D tex1;</code> or <code>uniform sampler2D tex2;</code> However I'm not really sure on how to use the related GL calls properly.</p>
<h2>Initi... | 2 | 1,083 |
Data Toggle on Link not Opening Modal | <p>I have been struggling for the last several days with Modals for a project at work. The trigger is a link (with a glyphicon to let the user know it's a table) and I am trying to use data toggle on the link to open a modal containing a table. I can't figure out why it's not working.</p>
<p>The Trigger:</p>
<pre cla... | 2 | 1,864 |
MVC, Browser return error: Website redirected you too many times When I browse a file on a specific restricted folder by web.config file | <p>I want restrict access of anonymous users to Music folder (in the root of my website). Then I put this code in <strong>web.config</strong> file <strong>in the <code>Music</code> folder</strong>:</p>
<pre><code><?xml version="1.0"?>
<configuration>
<system.web>
<authorizatio... | 2 | 1,591 |
C++ design: Given a list of scores of students, get the frequence of scores in order | <p>I have a C++ interview question: </p>
<p>Given a list of scores of students, get the frequence of scores in order.
[use c++ container map]</p>
<p>My idea: put the list of scores into a map with score as key and frequency as value. Before add a key, search it. If a key is new, add it and set its freq as 1. If not, ... | 2 | 1,379 |
No newlines in stacktrace when run from command line? | <p>When i run my application from the command line (standard windows 7) the stacktraces put in my log file don't have newlines. </p>
<p>(hmm, i wanted to paste an example, but when i copy the stacktrace from my log in notepad and paste it in my browser, the newlines suddenly appear)</p>
<p>I also tried opening log wi... | 2 | 1,528 |
Google Maps polyline array from mySQL | <p>I'm using the guide on the api pages (<a href="https://developers.google.com/maps/articles/phpsqlajax_v3" rel="nofollow">https://developers.google.com/maps/articles/phpsqlajax_v3</a>) to read in markers from a mySQL db via an XML file. </p>
<p>I'm unsure how to get the polyline path from the xml file, if possible. ... | 2 | 2,057 |
How to enable/disable an attached behavior using a boolean property in the ViewModel | <p>The title says what I am attempting to do. Here is what I have:</p>
<p>I am using <a href="http://www.codeproject.com/Articles/404827/Rubberband-Behavior-for-WPF-ListBox" rel="nofollow">this</a> CodeProject contribution to attach a RubberBand behavior to a ListBox, so that I can drag-select using the mouse. I was a... | 2 | 4,349 |
Confusing encoding exception in NSTextStorage | <p>I have an NSDocument subclass for a simple text editor (using Lion's new document based app template, with few customisations), and I'm encountering a strange bug loading the file content into the text storage.</p>
<p>Here's my code:</p>
<pre><code>- (void)loadTextContentIntoStorage
{
if (!self.textStorage || !t... | 2 | 3,051 |
Relative Layout problem | <p>I implemented a system to have imagebuttons equal to the number of drawables (restaurant logos) so I filter the images starting with prefix "rest". Its ok up to here. Then I create a GridWiev and put the buttons to it and the root layout is a RelativeLayout. However it does not show any imagebuttons after compilatio... | 2 | 2,729 |
Keeping extra script tags in compiled svelte code | <p>I am currently having a svelte program that gets compiled to the corresponding, js and css files, which I am using in a separate html template string. That is getting used as part of an application's webview - it basically gets put into a iframe at the end inside that application.</p>
<pre class="lang-html prettypri... | 2 | 1,365 |
AngularJS ng-change on select with custom directive | <p>In my application I have a custom directive with select tag.</p>
<pre><code><div class="row pv10" ng-if="item.visible">
<div class="col-xs-4 text-danger"><span ng-if="item.label_visible"> {{item.label}}</span></div>
<div class="col-... | 2 | 1,226 |
DirectX: The best way to get RGB data from ID3D11Texture2D with DXGI_FORMAT_NV12 format? | <p>I'm using DirectX to draw videos. After decoding by Intel Media SDK. And then I draw it by the following Intel's Code:</p>
<pre><code>mfxStatus CD3D11Device::RenderFrame(mfxFrameSurface1 * pSrf, mfxFrameAllocator * pAlloc)
{
HRESULT hres = S_OK;
mfxStatus sts;
sts = CreateVideoProcessor(pSrf);
MSDK... | 2 | 2,771 |
Enable disable custom right click menu | <p><a href="http://jsfiddle.net/CmJ9z/" rel="nofollow">http://jsfiddle.net/CmJ9z/</a></p>
<p>I have a checkbox that if it's checked I want a custom right click menu, but if it's not to have the default browser's context menu. However as soon as it's unchecked the custom menu still pops up and once checked again it sho... | 2 | 1,585 |
Getting Primary key values (auto number ) VB | <p>I have a database on <code>Access</code> and I want to insert into 2 tables </p>
<ul>
<li><strong>ReportReq</strong> </li>
<li><strong>req_sysino</strong></li>
</ul>
<p>I want to get the last value of primary key (auto numbered) and insert it into <strong>req_sysino</strong>
, I am stuck with this code and I dont ... | 2 | 1,061 |
div breaks out of its container | <p>I believe there is a simple answer to this question but I have an issue where my content div container doesn't extend far enough for me to scroll through my textbox div.</p>
<p>It seems like there is an additional 200-300 px below the content div that is preventing me from seeing everything in the textbox div, even... | 2 | 1,032 |
Inserting image to SAP HANA Table using XSJS | <p>I know this is a known issue but I'm having difficulty on fixing my problem. It seems that I don't receive anything from my UI5 Application when I sent an image via FileUploader to my server. I am new to HCP and this is my first time handling XSJS file. I hope you can help me.</p>
<h2>UI5.controller.js</h2>
<pre><... | 2 | 2,925 |
Reactjs: TypeError: Cannot read property 'results' of undefined | <p>I'm fetching data from a Rest API, which returns me an Object with an Array of results. When I try mapping through it, it gives me the following error: </p>
<blockquote>
<p>TypeError: Cannot read property 'results' of undefined</p>
</blockquote>
<pre><code>function Teste() {
let results;
fetch('https://p... | 2 | 1,567 |
Virtuemart add to cart, price details etc not appearing | <p>I have Joomla virtuemart site and I accidently uninstalled Virtuemart but luckly I had a backup so I overwritten most of the files to the server again with some MySQL data into the databases but I can't seem to get the price and add to cart etc details showing up in the product detail page.</p>
<p>Is there a reason... | 2 | 1,932 |
Redux action call returns undefined then defined | <p>currently working on a react redux project.</p>
<p>I was able to call my action fetchProjects() to handle an axios get request to the server.</p>
<p>Problem with my code is that it console logs as undefined before populating my state with my list of projects.</p>
<p>My goal is to render my list of projects on the... | 2 | 1,364 |
HTML5 webcam capture display picture | <p>So, I have this HTML5 chatting script which requires users to input their name and email to start chatting. The script grabs the users display picture from gavatar. I'm trying to change that to make it take a webcam snapshot from the users computer and set that as a display picture.</p>
<p>I've seen a few examples ... | 2 | 7,887 |
How to make a query using columns of a JoinTable in Rest Webservice with netbeans | <p>How I can to do this query:
<code>@NamedQuery(name = "Scuser.findFriends", query = "SELECT s FROM Scuser s, friends f WHERE f.firstid = :iduser and s.iduser = f.secondid")</code></p>
<p>in this class:</p>
<pre><code>@Entity
@Table(name = "scuser")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Scuser.findAll... | 2 | 1,513 |
logback.xml in classpath getting executed along with logging.config Environment argument spring boot | <p>I have a spring boot project(version 1.3.6) and i have added logback.xml to the project. On creating an executable jar, the logback.xml is getting included in the jar and also working as expected. As the development is done on a windows system, so <strong>logback.xml in classpath</strong> adds the logs to file at pa... | 2 | 1,265 |
Getting the Error - java.lang.ClassCastException: org.openqa.selenium.chrome.ChromeDriver cannot be cast to com.initialization.DriverInitialization | <p>I am trying to automate a web application for multiple browser testing. I am trying to integrate some spring features but finding a bit of dificulties. Here is my code :</p>
<p>On DriverInitialize.java :</p>
<pre><code>package com.initialization;
import org.openqa.selenium.WebDriver;
public class DriverInitializ... | 2 | 1,741 |
Makefile for Gtk+ and cuda | <p>I'm trying to develop a packet analyzer with CUDA support for pattern matching. I'm using GTK+ for GUI creation but I am not able to compile the GUI file together with the cuda files. How to write makefile for this case?</p>
<p>The project is having two parts: 1. Analyzer 2. GUI<br>
Analyzer consists of many .c,.h ... | 2 | 2,852 |
angular loading a json file on a form | <p>I've started recently working with angular and node.js. I'm trying to populate the content of a json file on some html forms depending on the option selected on a drop down list. I managed to do that but the problem is as soon as I change the content of the form manually, if I want to load the value that it was befo... | 2 | 2,063 |
merge sort/recursion in python | <p>I understand how merge sort work but however when I try to implement in python, I think I am still a little confused about how things are really working out on stack. I have a function called merge_sorted_list which is used for merging two sorted list and a function called merge_sort1 and merge_sort2, which are acco... | 2 | 1,449 |
How to add custom evaluation metrics in Tensorflow Object Detection API? | <p>I would like to have my custom list of metrics when evaluating an instance segmentation model in Tensorflow's Object Detection API, which can be summarized as follows;</p>
<ul>
<li>Precision values for IOUs of 0.5-0.95 with increments of 0.05</li>
<li>Recall values for IOUs of 0.5-0.95 with increments of 0.05</li>... | 2 | 1,096 |
Odoo from old apie to new api and error TypeError: unhashable type: 'list' | <p>I was trying to use functions from old api to new api:</p>
<pre><code>@api.multi
def search(self, *args, **kwargs):
offset = kwargs.get("offset", 0)
limit = kwargs.get("limit", None)
order = kwargs.get("order", 'complete_name')
context = kwargs.get("context", None)
count = kwargs.get("count", Fa... | 2 | 1,503 |
Spring Integration Java DSL flow Splitter/Aggregator delete file after processing all lines | <p>Using Spring Integration Java DSL, I have constructed a flow where I'm processing files synchronously with a <code>FileSplitter</code>. I've been able to use the <code>setDeleteFiles</code> flag on a <code>AbstractFilePayloadTransformer</code> to delete the file after converting each line in <code>File</code> to a ... | 2 | 1,067 |
how to read data from json url in java? | <p>I came across the following tutorial:
<a href="http://www.mkyong.com/java/how-to-convert-java-object-to-from-json-jackson/" rel="nofollow">http://www.mkyong.com/java/how-to-convert-java-object-to-from-json-jackson/</a></p>
<p>But this tutorial shows how to convert json to a Java object , when the json file is store... | 2 | 1,499 |
Spring with hibernate dont flush the session after exception error | <p>I am using Spring transaction management with Hibernate. My service layer methods are transactional. This error is occurring when am testing a use case when user is trying to create a company with an already existing ID. Here is my controller:</p>
<pre><code>@RequestMapping(value = "/CreateCompany", method = Reques... | 2 | 1,667 |
How do you extract the directory from a path including wildcards? | <p>Given paths like this:</p>
<pre><code>C:\Temp\SomeDirectory\*.xml
</code></pre>
<p>I'd like to be able to distinguish the <code>*.xml</code> from <code>C:\Temp\SomeDirectory</code></p>
<p>However, I do not want a path to a directory that does not have a trailing slash to return its parent directory.</p>
<p>This ... | 2 | 1,085 |
React: Unable to access the parent component's function which is passed as prop to child component | <p>I have a TodoList component which is a child of the App component. I wish to change the state of the App component's todos list. I am attempting to pass a toggleComplete function from the TodoList component to the Todo component so at onClick event it would fire and work its way up to the App component so I could up... | 2 | 1,135 |
What is a valid way to track ReadAsStreamAsync download speed rate | <p>I'm learning C# 5 async / await on some real-world example - save a file from web with displaying download speed rate.</p>
<p>There is a method that I'm worried is wrong, especially with a download speed calculation.</p>
<pre><code>public async Task DownloadAsyncDemo(Uri requestUri, IProgress<string> progres... | 2 | 2,027 |
How can I keep track of sent and received messages in an android messaging app? | <p>I'm new to Android development (but not to Java) and I'm writing my own Android messaging app that hopefully should take the place of the default SMS app. My question is - how does the default SMS app keep track of sent and received messages and how might I accomplish the same task? Specifically, I can't figure out ... | 2 | 1,244 |
maven aspectj weaving NullPointerException | <p>I have a Spring MVC application made with MyEclipse, which contains generated sources as well as my own sources, plus aspects that I defined on the generated classes. Everything compiled fine in MyEclipse, but I want now to switch to Maven in order to use a continuous integration server.</p>
<p>I have been fiddling... | 2 | 3,899 |
not enough master nodes discovered during pinging - Elasticsearch cluster self signed certificate | <p>I used SearchGuard to encrypt nodes in ElasticSearch cluster following <a href="https://gryzli.info/2018/12/01/elasticsearchelk-stack-security-howto/" rel="nofollow noreferrer">this guide</a></p>
<p>Master:</p>
<pre><code>cluster.name: client1
searchguard.enterprise_modules_enabled: false
node.name: ekl.test.com... | 2 | 1,591 |
How to deal deck of Cards to players? | <p>I have been trying to create a basic card game(experiment) using java. After shuffling the deck of cards, I need to pass 6 shuffled cards to each player based on number of players which took participated in the game. (Max 6 players)</p>
<p>By using setHand() method in "Player" class, I was able to dislay 6 cards bu... | 2 | 1,844 |
How to get Text from Textbox created during runtime | <p>I have created WinForm App in which user can set how many textboxes he want (Range 1-99)
I am using this code to create Textboxes during runtime</p>
<pre><code> for (int i = 0; i < Calculation.Num; i++)
{
TextBox txtRun = new TextBox();
txtRun.Name = "txtBox" + i;
txtRun.Location = new S... | 2 | 2,293 |
Binding two tables in model - ASP.NET MVC Razor | <p>I am facing problem when binding model with two tables in one class. Form is not binding values to model when posting it to controller.</p>
<p>Model:</p>
<pre><code>public class BasicProfileModel {
public BasicProfileModel() {
this.user = new User();
this.basicProfile = new BasicProfile();
... | 2 | 1,149 |
C++11 DirectX Math: XMVECTORF32 as base structure initialization | <p>I'm writing another game engine in C++11/VC11 which presently uses DirectX/Direct3D11 as rendering backend. In order to hide DirectX types from the public interface (and a possible later implementation of an OpenGL backend), I'm rolling a linear algebra library on my own, which - however - still uses DirectX Math in... | 2 | 1,140 |
Jplayer Playlist Will Not Work in Android or iOS | <p>My implementation of Jplayer appears to be working everywhere but on mobile and tablet, basically Android and iOS. When opened on Android, the playlist play buttons are disabled and the song links are not clickable.</p>
<p>This is my script:</p>
<pre><code>$(document).ready(function () {
var myPlaylist = new jPla... | 2 | 3,246 |
SQL query to get min, max rows | <p>I have following sample data, I want to get min and max time of every consecutive status.</p>
<pre><code>cat subcat status logtime
fruits apple 0 30-10-2017 06:00
fruits apple 0 30-10-2017 06:03
fruits apple 0 30-10-2017 06:06
fruits apple 0 30-10-2017 06:09
fruits apple 0 30-10-2017 ... | 2 | 2,333 |
Jetty Websocket servlet InstantiationException problems | <p>I'm having problems to make the <a href="http://www.eclipse.org/jetty/documentation/current/jetty-websocket-server-api.html" rel="nofollow">websocket example of jetty</a> work</p>
<pre><code>public class App {
public static void main(String[] args) {
Server server = new Server(8080);
Servlet... | 2 | 2,045 |
JAXRS client - Deserialization Issue with Pojo | <p>Helo Everyone. I am new to jersey and Jackson and finding it really difficult to deserialize a JSOn response from my REST service on client side. I am pretty sure that I am still not grasping the Object mapper and JSON provider APIs that well. Any help or guidance is appreciated in advance. Here is my source code.</... | 2 | 2,535 |
Graphql codegen configuration does not load documents with Glob Expression | <p>My API is written with TypeScript/Apollo and I am able to run queries/mutations on http://localhost:4000/graphql.
My front-end is with Next.js and Apollo client. I use GraphQL Codegenerator to generate the client-side code I need.</p>
<p>I am using:</p>
<pre><code>"@graphql-codegen/cli": "1.20.1"... | 2 | 1,197 |
Set Item Permissions | <p><strong>Folders work:</strong></p>
<p>I now know how to set the permissions of a folder in a library:</p>
<pre><code>public void ChangeItemPermissions()
{
_SharePoint.ClientContext _ClientContext = new _SharePoint.ClientContext("https://sharepoint.oshirowanen.com/sites/oshirodev/");
_ClientContext.Credenti... | 2 | 1,545 |
Bootstrap Dropdown button width issue | <p>I am using a sidebar to have a list of URL links or buttons if you will but I also need some dropdown buttons/lists in there as well.</p>
<p>I am having an issue of having it look consistently alike and also fill the width of the container also as front end isn't my strongest suite am struggling to get it to look h... | 2 | 3,662 |
ValueError: Field 'id' expected a number but got 'select' | <blockquote>
<p><strong><em>When I run the "python manage.py migrate" command Error is occuring:</em></strong></p>
</blockquote>
<p>Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions, travello
Running migrations:
Applying travello.0005_auto_20200313_1046...Traceback (mos... | 2 | 2,454 |
gsoap : how to solve namespace error when referencing a group | <p>I have two xsd files "hardware.xsd" and "GPU.xsd", both with different target namespaces, and both elementFormDefault qualified.</p>
<p>xmlns:hardware="urn:hardware" and xmlns:gpu="urn:gpu".</p>
<p><strong>hardware.xsd</strong></p>
<pre><code><xsd:complexType name="ComputerSettings">
<xsd:sequence>... | 2 | 1,428 |
Send NSEvent to background app | <p>I need to send the key combo ^⌘C to a background app with the bundle identifier <code>com.company.app</code>. The key combo should then activate a menu item in that application.</p>
<p>Unfortunately, I have no clue how to do that. Some research pointed me to the NSEvent and CGEvent API using <code>CGEventPostToPSN(... | 2 | 1,050 |
libgps for extract data from the gpsd daemon | <p>I wanted to use libgps to interface with gpsd daemon. That's why I've implemented a little testing application in order to extract a value from a specific satellite.</p>
<p>The documentation on its HOWTO page tells us that </p>
<blockquote>
<p>The tricky part is interpreting what you get from the blocking read.
... | 2 | 2,595 |
How to get Crash Point in Java code | <p>My application has <code>android-support-v4.jar</code> in <strong>/libs</strong> only. I do not use other library.</p>
<p>My application is crashing with SIGNAL 11 error. I want to use <strong>addr2line</strong> utility of android-ndk. <strong>Can we find the function and line number of java file using this tool?</... | 2 | 1,253 |
Collapsible rows in AngularJS ng-Grid | <p>I want ng-Grid to have collapsible rows. </p>
<p>My javascript :-</p>
<pre><code>var app = angular.module('myApp', ['ngGrid']);
app.controller('MyCtrl', function($scope) {
$scope.myData = [{name: "aaa", age: 50, designation: "TR", quotes: "some text"},
{name: "aaa", age: 43, designation: "PR", quo... | 2 | 1,208 |
Cycle finding algorithm | <p>I need do find a cycle beginning and ending at given point. It is not guaranteed that it exists.
I use <code>bool[,] points</code> to indicate which point can be in cycle. Poins can be only on grid. <code>points</code> indicates if given point on grid can be in cycle.
I need to find this cycle using as minimum numbe... | 2 | 2,042 |
Ionic app crashes on startup on android device/emulator | <p>I was building my Ionic app many times without any problem, last weekend, I changed one line in css and re-built the app, then it crashed, I removed the line I added on css and re-built, still same issue.</p>
<p>Here is my <code>ionic info</code> output</p>
<pre><code>cli packages: (/usr/local/lib/node_modules)
@... | 2 | 2,096 |
SharePoint designer errors out with missing required parameters for custom activity | <p>I am making a custom Activity for SharePoint 2010. When I drop the activity in the SharePoint Designer and supply values for the parameters, I get a mysterious validation error that simply says:</p>
<blockquote>
<p>This action has required parameters that are missing.</p>
</blockquote>
<p>Here's the source code ... | 2 | 4,275 |
Feature extraction from the training data | <p>I have a training data like below which have all the information under a single column. The data set has above 300000 data.</p>
<pre><code>id features label
1 name=John Matthew;age=25;1.=Post Graduate;2.=Football Player; 1
2 name=Mark... | 2 | 1,263 |
error while loading shared libraries: libFoundation.so: cannot open shared object file: No such file or directory | <p>I'm on a new installed Ubuntu 18.04 machine, installed clang and llvm via apt-get and installed/downloaded Swift from swift.org<br>
<em>test.swift</em> file:</p>
<pre><code>import Foundation
let s: String = ":)"
let d: Date = Date()
print("Hello Foundation! \(s) - \(d)")
</code></pre>
<p>If i run</p>
<pre><co... | 2 | 3,435 |
How to display Extra Fields from Joomla K2 | <p>I have this bit of code I am using to get the information from the k2_items table in the database, but all I get for the extra_fields is a JSON string and not the human readable id/values I need to print.</p>
<p>Here is the code I'm using to display the database information, and the attempted code to pull the extra... | 2 | 2,042 |
How to pass data from GraphQL when in a React Component | <p>I have a Billboard component which is imported on my home page like so :</p>
<pre><code><Billboard id="successful_network_ebook_billboard"/>
</code></pre>
<p>The content of the component is :</p>
<pre><code>import React, {Component} from "react";
import T from 'i18n-react'
import Link from "../components/Lo... | 2 | 1,228 |
Running NPM Build from Flask | <p>I have a React front end that I would like to serve on the same origin as my python backend API. I'm trying to use Flask for this, but I'm running into an issue with Flask not finding my static files.</p>
<p>My front end build is generated with <code>npm run build</code> in <code>saas_frontend</code></p>
<p>Here i... | 2 | 1,064 |
java.lang.NoSuchMethodError: when spark-submit on yarn cluster | <p>I have a spark application running correctly in local mode. when i run spark-submit on yarn cluster, I obtain the following error:</p>
<pre><code>18/07/26 18:12:38 ERROR ApplicationMaster: User class threw exception: java.lang.NoSuchMethodError: org.apache.http.impl.client.HttpClientBuilder.setSSLContext(Ljavax/net... | 2 | 1,714 |
Reading from raw_data.txt and writing to a results.txt file with processing in Python | <p>This is my first post. I have a function that asks for the number of students. Then, for each student, first three lines contain the following information: Student ID, name, and number of courses taken that semester. Now, for each course, the course number, credit hour, and the percentage of scores earned by the stu... | 2 | 1,065 |
Render a list of links in my Component MVC Sitecore | <p>I am having some difficulties in understanding how to display links in a Sitecore EXM email component.</p>
<p>I am using Sitecore MVC Controller Rendering. I am essentially trying to duplicate the Main Section component that comes as default with the Sitecore EXM platform.</p>
<p>So to start with I have a controll... | 2 | 2,264 |
Error installing apache-airflow on windows 10 anaconda | <p>I'm trying to install apache-airflow[all_dbs] package on my anaconda env (python 3.6) but I keep getting the same error when it tries to install psutil. I already tried reinstalling 2015 and 2017 microsoft build tools but it didn't fix the problem. </p>
<p>This is the message that I'm getting when trying to insta... | 2 | 2,535 |
Angular 4 - Unit testing using Jasmine - Button click code showing error | <p>I am new to Jasmine. Writing code in Angular 4. I want to test a button. I wrote following code in my spec file. This is the functionality of multi file upload. And on selection of file(s), we are allowing user to upload files.</p>
<pre><code>import {
async,
ComponentFixture,
TestBed
} from '@angular/co... | 2 | 1,240 |
Mozilla gets strange value in WebForm_DoPostBackWithOptions JavaScript function | <ol>
<li>Where does the variable <code>options.eventTarget</code> come from?</li>
<li>How can I fix this function for Mozilla if it's generated by ASP.NET code?</li>
<li>What is this JavaScript function used for?</li>
</ol>
<p>Mozilla Firefox gets this value for <code>options.eventTarget</code> at the end of this func... | 2 | 1,584 |
GRADLE tasks run configuration | <p>I have a project that consists of two parts: Spring Boot and React.
In my Spring Boot <code>build.gradle</code> config I specified what actions should be performed in order to build and run the application.</p>
<p>Here is how it looks like:</p>
<pre><code>plugins {
id 'org.springframework.boot' version '2.2.5.RE... | 2 | 1,211 |
Android check video stream ended | <p>i've got this simple video stream player:</p>
<pre><code> if (play) {
myVideoView.stopPlayback();
myVideoView.clearFocus();
myVideoView = null;
button5.setText("Start");
play = false;
} else {
/... | 2 | 1,793 |
WCF returns Bad Request on jquery ajax call | <p>I have a WCF Service with one GET and one POST method. The GET works well.</p>
<p>The frontend is a simple HTML page which uses jquery ajax calls to GET and POST methods of the WCF.</p>
<p>The problem is that i get a Bad Request response. I have read all of the relative posts and i think that everything is in orde... | 2 | 2,576 |
SWFUpload image upload fails on PHP with 'Partial File Uploaded' | <p>Okay, so this is a tough one, I've spent hours looking for a solution/problem. I'm using SWFUpload to upload images without reloading the page (with a fancy progressbar too), this works fine when I'm on localhost (Wamp server), but it goes nuts when I try to do so on my real linux server (which is the only possible ... | 2 | 2,089 |
Wordpress extracting wp_usermeta | <p>I'm writing a script that will extract wp_usermeta in a readable layout.</p>
<p>I've got sql like below:</p>
<pre><code>select distinct(user_id), meta_value as suburb from wp_usermeta where meta_key = 'suburb' order by user_id
</code></pre>
<p>Now is there a way we can include all other fields aswell using sql qu... | 2 | 1,050 |
Ember get not getting certain attribute | <p>When running the following from the <code>UserController</code> on Google Chrome, with <code>ember-couchdb-kit-0.9</code>, Ember Data <code>v1.0.0-beta.3-56-g8367aa5</code>, Ember <code>v1.0.0</code>, and <a href="https://github.com/roundscope/ember-couchdb-kit" rel="nofollow">this couchdb adapter</a>:</p>
<pre><co... | 2 | 1,767 |
Importing coroutines-common causes error "Cannot inline bytecode build with JVM target 1.8 into...". Even with explicitly specified jvmTarget | <p>I'm trying to import kotlin coroutines in my spring project. </p>
<p>I have the following lines in my <code>build.gradle</code> file:</p>
<pre><code>compileKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = '1.8'
}
}
compileTestKotlin {
kotlinOptions {
... | 2 | 1,684 |
Automatic resizing of rectangles in a Pane using Java FX-8 | <p>I am trying to create a grid of rectangles that will be contained inside a pane using JavaFX. I want these rectangles to be automatically resized to occupy the space available based on the size of the Pane, with a small gap between the rectangles.</p>
<p>The code I am using right now is this, the createVisual funct... | 2 | 2,435 |
Targetting Windows XP from Visual Studio 2012 | <p>Good day everyone,</p>
<p>I recently upgraded to Visual Studio 2012 and I'm loving the improved C++11 support and the dark theme. However, I'm trying to write a program that runs on Windows XP and higher, and I'm running into some strange issue.</p>
<p>The first time I tried to run my program on a XP virtual machi... | 2 | 3,730 |
putting two divs next to each other (labels making some troubles) | <p>I am trying to put 2 divs next to each other but the labels are messing things up..
also I was having trouble to put the INPUT in the same line with the label.</p>
<p>this is my HTML code:</p>
<pre><code><div class="edit_settings">
<div class="edit_iphone_settings">
... | 2 | 1,234 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.