title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
How do I edit the style of bootstrap navigation bar?
<p>I am trying to edit the style of my bootstrap navigation bar. However, I am unable to edit color and remove borders, for example. I would like to just change the color to white and the border color to white as well I have included the code below. Can anyone tell me what I am doing wrong?</p> <p><div class="snippet"...
0
2,558
How to use static linking with OpenSSL in C/C++
<p>I wrote simple apps with Openssl in C and C++. I compile them like this:</p> <pre><code>gcc openssltest.c -o openssltest -lcrypto g++ openssltest.cpp -o openssltest -lcrypto </code></pre> <p>And its all ok but only, when you have Openssl installed.</p> <p>I would like to compile it that I can run them on OS where...
0
2,579
Fixed header table with horizontal scrollbar and vertical scrollbar on
<p>I have been trying to figure out this problem i have with html/css sticky header + scrollbars. We are creating a program that requires scrollbars to show up once the containersize reaches a certain point(depending on resolution of the user). </p> <p>I am forcing a min-width on the second column in the table, so the...
0
11,278
Using setup.py to install python project as a systemd service
<p>I have a python project and I want to be able to install it using something like <code>python setup.py install</code> so that the installation automatically creates a systemd service.</p> <p>I'm having some trouble, most probably setting the paths or imports correctly.</p> <blockquote> <p>My environment:</p> ...
0
2,865
group by and filter highest value in data frame in scala
<p>I have some data like this:</p> <pre><code>a,timestamp,list,rid,sbid,avgvalue 1,1011,1001,4,4,1.20 2,1000,819,2,3,2.40 1,1011,107,1,3,5.40 1,1021,819,1,1,2.10 </code></pre> <p>In the data above I want to find which stamp has the highest tag value (avg. value) based on the tag. Like this.</p> <p>For time stamp 101...
0
1,244
Spring REST service not consuming JSON
<p>I am having some difficulty using Spring's built-in JSON consumption using Jackson with REST web services. If I define the following:</p> <pre><code>... @RequestMapping(value="/stub") public void doSomething(@RequestBody User user) { System.err.println("In method"); ... } </code></pre> <p>... it never reac...
0
1,701
Debug Perl Segmentation Fault
<p>I'm using <a href="https://github.com/WormBase/AcePerl" rel="noreferrer">AcePerl</a> to download data from the wormbase.org database. When I download certain database objects I get (after a certain number of objects) a segmentation fault. This behaviour is reproducible.</p> <p>I had a look at the core dump and <cod...
0
1,294
MockMVC in junit tests - checking result for List<Object> and Map<Enum, Object>
<p>I have problems with mockMVC and test written with that. My tests fails. I have two tests methods:</p> <pre><code>@Test public void getPersonsForApiConsumerTest() throws Exception { mockMvc.perform(get(getUri("/consumers/1/persons"))) .andExpect(status().isOk()) .andExpect(jsonPath("$", ...
0
3,911
Datatable hide and show rows based on a button click event
<p>So I have this datatable that is generated by php dynamically once. But once it's loaded, I don't want to reload the whole table since there's only a small javascript if statement that I am doing. When you press the button, I compare a data attribute that is on my tr. If it doesn't fit, I'd like to hide them, else, ...
0
1,515
Apache Catalina Error:- "SEVERE: Error listenerStart"
<p>I am getting the following error when i tried to start a java spring software that runs under apache:-</p> <pre><code>Sep 24, 2012 12:08:20 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Sep 24, 2012 12:08:20 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/jw] star...
0
2,468
C creating a matrix using pointers and then copying elements from the matrix
<p>Im trying to use a function to copy a row of a matrix and return a pointer to that row, then print that row, but my get_row() function is failing, any help would be most appreciated, random data is a specified piece of the program, i will then have to get a column, transpose and sub matrix the same way, but i hope i...
0
1,226
Convert Vision boundingBox from VNFaceObservation to rect to draw on image
<p>I am trying to use <code>VNDetectFaceRectanglesRequest</code> from the new <code>Vision</code> API to detect faces on images. Then, I draw a red rectangle on each detected face. </p> <p>But I'm having an issue converting the <code>boundingBox</code> from <code>VNFaceObservation</code> into a <code>CGRect</code>. It...
0
1,096
Maven Error reading assemblies: No assembly descriptors found
<p>Following <a href="http://www.openimaj.org/tutorial/getting-started-with-openimaj-using-maven.html" rel="noreferrer"><strong>this Guide</strong></a> I ran the command</p> <pre><code>mvn assembly:assembly </code></pre> <p>and got the <code>Build Failure</code> of </p> <pre><code>Error reading assemblies: No assemb...
0
2,150
Jquery bind on 'ajax:success', 'ajax:error' or 'ajax:complete' not executed even though form is submitted
<p>In my Jquery <strong>bind</strong> method , <code>'ajax:success', 'ajax:error' or 'ajax:complete'</code> callbacks are not being excuted. The form is being submitted through Ajax and the data is inserted to the database successfully but those callbacks function are not being invoked at all (its simply supposed to sh...
0
1,684
Error "Program type already present: android.support.design.widget.CoordinatorLayout$Behavior" when adding new libraries
<p>I am getting this error when I am trying to add new libraries to my project and then run my app:</p> <blockquote> <p>Program type already present: android.support.design.widget.CoordinatorLayout$Behavior </p> </blockquote> <p>Following are the libraries I am trying to add</p> <ol> <li><code>implementation 'com....
0
7,145
Yii - how to retrieve model data into a layout page?
<p>I wish to list some Categories name on my layout main.php page. Since the layout doesn't have any associated controller or model, I wish to create a static method like this on Category model:</p> <pre><code>public static function getHeaderModels() { // get all models here return $models; } </code></pre> <p>a...
0
1,036
Sync local and remote folders using rsync from php script without typing password
<p>How can I sync local and remote folders using rsync from inside a php script without beeing prompted to type a password?</p> <p>I have already set up a public key to automate the login on remote server for my user.</p> <p>So this is running without any problem from cli:</p> <pre><code>rsync -r -a -v -e "ssh -l us...
0
1,028
How can I get the Discovery Client working when using spring-cloud together with netflix Eureka?
<p>I'm trying to make a basic project using spring cloud with the netflix addons such as Hystrix, Eureka and Ribbon to learn how this works. The project I'm trying to make is a simple message server that will keep messages. And a message-client that will just ask the server for a message, and I want to use the auto dis...
0
1,459
using ggsave and arrangeGrob after updating gridExtra to 2.0.0
<p>since I read a lot similar question on stackoverflow so far, I couldn't find a good solution without updating ggplot2 to the development version.</p> <p>My problem, I have several scripts which use <code>arrangeGrob</code> to create combined graph out of individual graphs. I save them into a variable and <code>prin...
0
1,620
The remote server returned an error: (400) Bad Request - uploading less 2MB file size?
<p>The file succeed to upload when it is 2KB or lower in size. The main reason why I use streaming is to be able to upload file up to at least 1 GB. But when I try to upload file with less 1MB size, I get bad request. It is my first time to deal with downloading and uploading process, so I can't easily find the cause o...
0
2,744
javascript getElementsByClassName change value of text fields
<p>I'm trying to make the values of all the text fields with a certain class name update each other, I mean, if you have 2 text fields with class="a", and I type something in one text field, the other one will update with what I typed. This is my code:</p> <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &...
0
2,470
ORA-06511: PL/SQL Cursor already open
<p>Anyone have any ideas as to why the system is telling me that <code>PAR_CUR</code> is already open? Everything was working fine until I added the outer most cursor (<code>dup_cur</code>) and now I'm getting this error. Thanks for any help you might have. The data is below as well.</p> <p>Error report:</p> <pre><co...
0
3,623
The process cannot access the file because it is being used by another process using streamwriter
<p>I have 2 programs: a C# GUI application and a C# windows service accessing the same text file;</p> <pre><code>a) the C# GUI application will write/append to the text file b) the windows service will copy the file to a network location every 20 mins. </code></pre> <p>When the action happened concurrently, I got err...
0
1,248
MySQL update taking(too) long time
<p>After some expected growth on our service all of the sudden some updates are taking extremely long time, these used to be pretty fast until the table reached about 2MM records, now they take about 40-60 seconds each.</p> <pre><code>update table1 set field1=field1+1 where id=2229230; Query OK, 0 rows affected (42.31...
0
1,364
Googletest C++ unit testing linking error
<p>I'm a beginner C++ programmer. I'm trying Google Test in Visual Studio 2012 and have problem starting a demo source code I got from internet.</p> <pre><code>int CompareChar(char* ch1, char* ch2) { if (ch1 == NULL || ch2 == NULL) return 88; return strcmp(ch1, ch2); } TEST(CompareCharTest, InputChar) { // E...
0
1,835
Convert Rest API JSON Response into C# object
<p>I have a code REST API response which is json, and parsing to JObject and pulling a value from it. But i am getting the error when parsing to JObject. </p> <p>Error: "Unexpected character encountered while parsing value: S. Path '', line 0, position 0."</p> <p>Is there any other way to convert Json string to C# ob...
0
1,317
Filter cards in Bootstrap 4 with jQuery
<p>I am attempting to create a page that is populated by many cards, using bootstrap 4's new card component. </p> <p>I want to create a search bar, that when searched, filters out cards whose titles don't match the search query. </p> <p>Here is a plunker of what I have in mind. <a href="https://embed.plnkr.co/2oZIRIb...
0
2,098
Installing pstricks in windows with MikTex
<p>I've been trying to get pstricks to work but to no avail. I am using Miktex, and I downloaded the package from it packages manager. But when I try to build it, it always fails:</p> <pre><code>This is XeTeX, Version 3.1415926-2.2-0.9995.1 (MiKTeX 2.8) entering extended mode (C:\xxxx\Desktop\untitled-6.tex LaTeX2e &l...
0
1,400
Customize Navbar Collapse button
<p>How can i change the color of the collapse button there? and the white lines like the divider. here is the picture. Can someone help me? im new to css,bootstrap and html so please help me. or give me some ideas.</p> <p><a href="https://i.stack.imgur.com/IMLWY.png" rel="nofollow noreferrer"><img src="https://i.stack...
0
1,309
Angular Material Table: Sorting not working
<p>In my Angular app (using Angular Material) I have several tables.</p> <p>The strange thing is that, in one case, sorting works, while, in another case, it doesn't.</p> <p>Here is the table that works:</p> <pre><code>&lt;table mat-table [dataSource]="dataSource" matSort&gt; &lt;ng-container matColumnDef="id"&gt...
0
1,399
Pass ArrayList from fragment to another fragment(extends ListFragment) using bundle, seListAdapter runtime error
<p>I have tried using Static variable for the ArrayList but in the ListFragment class, while debugging it's value is null.</p> <p>I think the ListFragment gets created before initialising the ArrayList, thats why it's null, but not sure.</p> <p>Suggest if i can use any other way to send the inflated ArrayList from Fr...
0
8,176
ReactJS Pass key with an onClick function
<p>I have an image gallery where I loop trough image objects and I want to pass the <code>i</code> to my onClick function. This is my image gallery code:</p> <pre><code>&lt;div className="gallery clearfix"&gt; { block.gallery.map((item, i) =&gt; ( i &lt; 1 ? &lt;div className="gallery-image" key={i} onClick...
0
1,069
Dynamic Population of JQGrid colModel and data
<p>I am trying to create the grid dynamically. My objective is to create a sort of dynamic front end to show some of the database tables. So I need to add / remove columns dynamically. I need to change the datatypes of the columns dynamically.</p> <p>I used the script provided as answer in <a href="https://stackoverfl...
0
1,887
Android Exception: Did you forget to call 'public void setup (LocalActivityManager activityGroup)'
<p>MyCode:</p> <pre><code>public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final TabHost tabHost = (TabHost) findViewById(R.id.tabhost); // LocalActivityM...
0
1,917
Tornado server throws error Stream is closed
<p>I'm trying to implement a very basic chat/echo web page.</p> <p>When the client visits /notify:8000 a simple site loads, on the client side a request is initiated to establish a listener, on the back-end the cloud count is updated and sent to all existing clients. </p> <p>Whenever the user enters something in a te...
0
3,561
NestJS TypeORM InjectRepository Cannot read property 'prototype' of undefined
<p>Trying to unit test. Got following error:</p> <blockquote> <p>TypeError: Cannot read property 'prototype' of undefined</p> <p>export class UserService {</p> <p>constructor(@InjectRepository(User) private readonly userRepository: Repository &lt; User>) { } </p> </blockquote> <p><strong>spec.ts:</stron...
0
1,497
django.db.utils.OperationalError: could not connect to server: No such file or directory
<p>my setting of database in settings.py is below</p> <pre><code>DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'dbname', 'USER': 'postgres', 'PASSWORD': 'postgres', 'HOST': '', 'PORT':'8081', } } </code></pre> <p>but when...
0
2,057
mongoose - remove element in array using $pull
<p>I have a node object that looks like this:</p> <pre><code>{ "_id":"58b336e105ac8eec70aef159", "name":"my node", "ip":"192.168.1.1", "__v":0, "configuration":{ "links":[ { "linkName":"athena_fw_listen_tcp_5555", "_id":"58b336e105ac8eec70aef15d", "loc...
0
1,051
Spring Autowire error expected at least 1 bean which qualifies as autowire candidate for this dependency
<p>I am trying to Autowire beans in this project but keep getting error </p> <blockquote> <p>expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)"</p> </blockquote> <p>Java:</p> <pre><code...
0
8,817
Google Sign-In requestIdToken returns null
<p>I forked <a href="https://github.com/googlesamples/google-services" rel="noreferrer">this</a> google sample project and ran the android signin.</p> <p>I set up the options in the google developers console and got a client id, but when running the project the id token comes up null. </p> <p>The complete code is <a...
0
3,696
Android ScrollView fillViewport not working
<p>I have a simple layout with a name on the top, and a button which I want to be at the bottom of the screen, or beyond that in case I add more items.</p> <p>So I am using a ScrollView with a LinearLayout as follows:</p> <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools...
0
1,074
How to Debug native code using ndk-gdb
<p>This is what I am getting after running <code>ndk-gdb</code> according to many tutorials when it links to you to <code>(gdb)</code> server you have to type <code>continue</code> but what after that how to debug the code there after. In my case it displays <code>Continuing</code> and remain like this. WHat i have to...
0
2,069
Get the table cells value row by row with jquery
<p>I have a table like this</p> <pre><code>&lt;table class="wp-list-table widefat fixed posts"&gt; &lt;tbody id="c_b"&gt; &lt;tr&gt; &lt;td&gt;&lt;b&gt;Title&lt;/b&gt;&lt;/td&gt; &lt;td&gt;&lt;b&gt;Upcharge&lt;/b&gt;&lt;/td&gt; &lt;td&gt;&lt;b&gt;Profit Percentage&lt;/b&gt;&lt;/td&g...
0
1,473
mapper_parsing_exception in Elasticsearch 6.5.4
<p>I'm currently running an integration of: Debezium MySQL connector source(v0.9.0F), Kafka connect(confluent platform v5.1.2) and ES(v6.5.4) on sink side. Source connector is successfully able to parse tables in MySQL(checked in kafka logs), but below error occurs(with certain tables &amp; specified columns) on sink...
0
1,838
Javascript JSON.parse responseText "Unexpected end of input"
<p>I keep getting "Uncaught SyntaxError: Unexpected end of input " in the browser console when running this JSON.parse. I tried shortening the $element to just $entry but still no success: </p> <pre><code>function getFileList() { var elements; var foo = document.getElementById("filelist"); var xhr =...
0
1,177
How to move a map under a marker?
<p>Suppose that we have a centered marker on the map, when we move the map with our fingers we can see that marker would no longer displayed when you got out of bounds of the area. So how can we make a marker that would remain always on the center of the map although we move the map anywhere? There is an app named UBER...
0
2,718
Get JSON value from key value array with Angular
<p>Hi I am new to angular and just trying to learn how to do a few things. I have got stuck in trying to display the following data. Using the Batarang plugin for chrome i can see my restful webservice returning the following json which is wrapped into my model.</p> <pre><code> { course: { country: T...
0
1,334
Memory error using openpyxl and large data excels
<p>I have written a script which has to read lot of excel files from a folder (around 10,000). This script loads the excel file (some of them has more than 2,000 rows) and reads one column to count the number of rows (checking stuff). If the number of rows is not equal to a given number, it writes the warning in a log....
0
2,134
mysql_upgrade failed - innodb tables doesn't exist?
<p>I am upgrading my mysql-5.5 docker container database to mysql-5.6 docker container. I was able to fix all other problems. Finally my server is running with 5.6. But when i run mysql_upgrade i am getting the following error.</p> <p>ERROR:</p> <pre><code>root@17aa74cbc5e2# mysql_upgrade -uroot -password ...
0
2,271
Routes and window.location - Laravel
<p>I have a search field with the same name and id inside my categories page and inside my products page.The autocomplete suggestions seems to work fine , however once I click on search suggestion inside my search field it converts my search string to integer which is my products id .Afterwards its redirecting me to "...
0
1,392
Logcat won't display Log.d messages
<p>I'm developing an Android application and I would like to have some way to print debug statements as my code runs. Fortunately for me, Logcat was able to print out Log.d messages when I run my application on an Android 2.3.3 (API 10) emulator.</p> <p>However, when I tested the same exact application on a physical d...
0
1,521
How to pass multiple values from the form to a controller using Spring MVC?
<p>I am working with Spring MVC pattern and I am trying to make a JSP file which is like this as of now - </p> <p>In the form, I have four rows, first row is just for labelling and other three rows I need to put my data in the text box. For example- for DC1, I will insert <code>numServers</code> value in the textbox, ...
0
1,359
Plugin org.springframework.boot:spring-boot-maven-plugin:1.3.0.BUILD-SNAPSHOT or one of its dependencies could not be resolved
<p>I am getting below error:</p> <p>Plugin org.springframework.boot:spring-boot-maven-plugin:1.3.0.BUILD-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.springframework.boot:spring-boot-maven-plugin:jar:1.3.0.BUILD-SNAPSHOT</p> <p>My pom.xml file is:</p> <p><div class="snippet"...
0
7,365
Could not load file or assembly 'Oracle.DataAccess'. no other solutions found
<p>Simply this problem while trying to run my code. Any help please?</p> <blockquote> <p>Server Error in '/' Application.</p> <p>Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.</p> <p>Description: An unhandl...
0
11,076
Angular 2 get current route in guard
<p>I have an AccessGuard class in my project which its work is to determine if user can access to the route or not. I used the <code>router.url</code> to get the current route but the url returns the route before navigation to the new route like I'm in the users route and I click on the candidates route so the url retu...
0
1,102
Type '{}' is not assignable to type 'ReactNode'
<p>I got this error, but only in Vercel, not locally, why?</p> <pre><code>error: 'FontAwesomeIcon' cannot be used as a JSX component. </code></pre> <pre><code>./components/Services/ServiceContainer.tsx:25:6 12:01:54.967 Type error: 'FontAwesomeIcon' cannot be used as a JSX component. 12:01:54.967 Its element ty...
0
1,484
I get error 0x8badf00d in iPhone app, and is not the usual suspect
<p>I have a random crash in my app in launching.</p> <p>I'm pretty sure is not the launching time (as explained in <a href="https://stackoverflow.com/questions/773442/what-does-8badf00d-mean/779387">What does 8badf00d mean?</a>) because the app launch fast.</p> <p>The worst is that the crash log can't be simbolicate ...
0
1,186
Avro Schema format Exception - "record" is not a defined name
<p>I'm trying to use this avro shcema</p> <pre><code>{ "namespace": "nothing", "name": "myAvroSchema", "type": "record", "fields": [ { "name": "checkInCustomerReference", "type": "string" }, { "name": "customerContacts", "type": "record", "fields": [ { ...
0
1,139
How to find cluster sizes in 2D numpy array?
<p>My problem is the following,</p> <p>I have a 2D numpy array filled with 0 an 1, with an absorbing boundary condition (all the outer elements are 0) , for example: </p> <pre><code>[[0 0 0 0 0 0 0 0 0 0] [0 0 1 0 0 0 0 0 0 0] [0 0 1 0 1 0 0 0 1 0] [0 0 0 0 0 0 1 0 1 0] [0 0 0 0 0 0 1 0 0 0] [0 0 0 0 1 0 1 0 0 0...
0
1,111
Adding JSON items to an HTML list using JQuery
<p>I am adding items from a JSON file using JQuery to an HTML page dynamically.</p> <p>HTML:</p> <pre><code>&lt;div id='cssmenu'&gt; &lt;ul id='options'&gt; &lt;li class='active'&gt;&lt;a href='#'&gt;&lt;span&gt;Home&lt;/span&gt;&lt;/a&gt; &lt;ul id='home'&gt;&lt;/ul&gt;&lt;/li&gt; &lt...
0
1,593
What is the correct JBoss EAP 6.0.1 cipher-suite configuration for mitigation of Logjam / weakdh.org?
<p>Because of the attention that logjam and the website <a href="https://weakdh.org/" rel="nofollow">https://weakdh.org/</a> (Logjam: How Diffie-Hellman Fails in Practice) has received in recent days, I decided to harden the SSL configuration on my JBoss EAP 6.0.1 system as described here:</p> <p>13.2.5. SSL Connector...
0
3,285
No for InjectionToken Config in Angular Application after upgrading to webpack 4
<p>I recently upgraded from Webpack 2 to 4. Webpack compiles, and most of the application works fine. It seems to of broken part of the application. I receive the error </p> <pre><code>NullInjectorError: No provider for InjectionToken config! </code></pre> <p>My module.ts file is as follows </p> <p><div class="snipp...
0
5,198
How to add Bing Maps v8 to Angular 2.0?
<p>I want to add Bing Map V8 control to my Anguar 2.0 project. I want to know what I need to do to add Bing Map V8 into Angular 2.0 project. I have attached my implementation. The component I created couldn't be loaded. How do I reference Microsoft.Maps.Map?</p> <p>Here is an example of the bing map v8. Everything wo...
0
1,293
How to import SVG into Next.js component?
<p>I am trying to import an SVG image from file into a Next.js component.</p> <p>In the assets folder I have google.svg (icon):</p> <pre><code>&lt;svg className=&quot;svgIcon-use&quot; width=&quot;25&quot; height=&quot;37&quot; viewBox=&quot;0 0 25 25&quot;&gt; &lt;g fill=&quot;none&quot; fillRule=&quot;evenodd&quo...
0
1,462
My PreferenceActivity does not show up, even though it is in my manifest file
<p>So I am modifying the Cube live wallpaper example. I have a class that extends PreferenceActivity, and I added the Activity in my manifest file. I keep getting ActivityNotFoundExceptions.</p> <p>Here is my preference class : </p> <pre><code>package com.p.t.wallpapers.mywallpaper; import com.p.t.wallpapers.mywal...
0
6,586
React-native: Super expression must either be null or a function, not undefined
<p>I have seen similar questions asked but I can't seem to indentify the problem. I am using react native v 0.27 I have changed all my require methods into imports.</p> <p>Here's the error I receive:</p> <p><a href="https://i.stack.imgur.com/IzwNV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/IzwNV.png" a...
0
1,086
Build error while compiling create-react-app
<p>I am new to Reactjs and am started learning it. I have been trying to start a basic hello world program but its failing at compilation level. Created a start up hello-word program with create-react-app hello-world it gave me a nice folder structure with bunch of files. And Here you can see the compilation error</p>...
0
3,417
Error received when using TCP: "The message could not be dispatched..."
<p>I am new to creating WCF services. I have created a WCF web service in VS2008 that is running on IIS 7. When I use http the service works perfectly. When I configure the service for TCP and run I get the following error message.</p> <blockquote> <p>There was a communication problem. The message could not be dis...
0
2,789
YouTube Player API: How to get duration of a loaded/cued video without playing it?
<p>I'm not able to get the correct video duration/length (in seconds) of a loaded/cued video via the getDuration() method of the YouTube Player API; the same method, however, returns a valid value once the video starts playing! Wondering how YouTube is able to show the valid duration of a loaded/cued video.</p> <p>Whe...
0
1,355
Codeigniter Upload File not working
<pre><code>function submit_article() { $this-&gt;load-&gt;helper(array('form', 'url')); $this-&gt;load-&gt;library('form_validation'); $this-&gt;form_validation-&gt;set_error_delimiters('&lt;p style="color:red"&gt;', '&lt;br/&gt;&lt;/p&gt;'); $my_rules = array( array( 'field' =&gt; ...
0
1,146
R time series modeling on weekly data using ts() object
<p>I am trying to do time series modeling and forecasting using R based on weekly data like below:</p> <pre><code>biz week Amount Count 2006-12-27 973710.7 816570 2007-01-03 4503493.2 3223259 2007-01-10 2593355.9 1659136 2007-01-17 2897670.9 2127792 2007-01-24 3590427.5 2919482 2007-01...
0
1,185
IdentityServer4 - sub claim is missing
<p>I've got an IdentityServer4 instance that I'm trying to get running in a Docker container behind an nginx proxy. I've based it on the AspNet identity sample from the Git repo, but after a user successfully registers a new account I get "An error occurred" from IdentityServer and the logs show</p> <p><code>[07:46:39...
0
2,338
Pass multiple parameters to event handlers in React
<p>So im trying to make react work with ES6 syntax. In ES5 I had setInitialState without a constructor which worked with the function binding syntax. I have a list of prices which is arbitrary and I want the state to change when the input element is changed. But the right price has to be changed.</p> <p>I'm not even q...
0
1,135
ImportError: No module named 'resource_rc'
<p>I made a simple program with PyQt GUI, and compiled '.ui' file.</p> <pre><code># Form implementation generated from reading ui file 'main.ui' # # Created by: PyQt5 UI code generator 5.6 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object):...
0
4,795
ROS: Can't find package configuration files
<p>EDIT: Okay so I decided to try something random, I have rospy also dictated as a required component. I removed all of the OpenCV stuff from my cmakelists file, and now it just spit out the same error regarding rospy..and same deal with std_msgs. I first started out with ROS on this computer I am using with the ROS t...
0
3,299
Python 3.7, Failed building wheel for MySql-Python
<p>I am new to python and I am trying django framework that involves some MySql and ran into this error when try to do <code>pip install mysqlclient</code> and down the lines of cmd messages I got this.</p> <pre><code> Failed building wheel for mysqlclient Running setup.py clean for mysqlclient Failed to build mys...
0
1,789
Checkbox values do not bind into object when false?
<p>I used <strong>ModelAttribute</strong> to bind object in Spring web application.</p> <p>Once I notice that, <strong>in case an object has an boolean value A is true, its value will not be updated if we uncheck A's checkbox</strong>.</p> <p>For example, I have a Lesson object which has the attribute "active" = true...
0
1,040
Problems with JAXB XML parsing
<p>I’m working on a project in which I will use JAXB to parse an XML file containing the following weather station information: Name, station ID, latitude/longitude, and url. Right now I intend to test everything by printing a weather station by name only. I have debugged my code but when I try to run: I get the follow...
0
2,237
What is the best way to manage multithreading in JavaFX 8?
<p>I'm trying to find an efficient way to influence the shape and the content of the JavaFX GUI elements, such as simple <code>Pane</code>, with use of multithreading. Let's say I have a simple <code>Pane</code>, on which I display filled <code>Circle</code>s at the given itervals of time, and I want to have the posibi...
0
1,911
Custom Validator on reactive form for password and confirm password matching getting undefined parameters into Angular 4
<p>I'm trying to implement a custom validator to check if the password and password confirm are equal. The problem is that the validator is getting undefined password and confirmedPassword parameters. How do I make this work. The function works cause if I change the condition to === instead of !== it throws the error c...
0
2,289
How to get value from a TextBox
<p>I change my question because it probably was not understood. Also sorry for my English...</p> <p>Dynamically create TextBoxes which put them in array.</p> <p>A piece of my code:</p> <pre><code>public partial class NewArticleForm : System.Web.UI.Page { private Label[] lblName; private TextBox[] txtName; ...
0
1,118
Encoding scheme used for cookies
<p><a href="https://www.rfc-editor.org/rfc/rfc6265#section-6.1" rel="nofollow noreferrer">RFC 6265 Sec 6.1</a> specifies allowing atleast 4096 bytes per cookie.</p> <p>Now in order to know the number of <strong>characters</strong> allowed per cookie, I need to know the character encoding being used for cookies, as the ...
0
1,595
Unable to insert New Line in a string of the vuetify dialog
<p>I attempted to insert a new line in the string which is the Vuetify dialog text by using \n in the string. But it does not work. </p> <p>Here is the code for the function that calls Vuetify dialog</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snipp...
0
1,230
Phonegap/Cordova App breaks in Jelly Bean - Access-Control-Allow-Origin and setAllowUniversalAccessFromFileURLs
<p>I've been developing* with Cordova (aka Phonegap) for Android for well over a year now and am trying to make my apps available to run in Jelly Bean, but I am getting the following error:</p> <pre><code>XMLHttpRequest cannot load http://127.0.0.1:40582/[somerandomstring]. Origin null is not allowed by Access-Control...
0
1,136
MyBatis: ClassCastException: java.lang.Integer cannot be cast to java.lang.Boolean
<p>I'm getting this exception in MyBatis while trying to execute the update statement(UpdateUser):</p> <pre><code>java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Boolean at $Proxy6.updateUser(Unknown Source) at com.nortal.pirs.persistence.dbmybatis.UserDaoMyBatisImpl.updateUser(UserDaoMyBat...
0
2,639
How to get the current project name in C# code?
<p>I want to send an email to myself when an exception is thrown. Using StackFrame object, I am able to get File Name, Class Name and even class method that throw the Exception, but I also need to know the project name as many of my ASP.NET project has the same file name, class name and method. </p> <p>This is my code...
0
1,345
Android Studios RuntimeException: Unexpected exception in dex writer thread
<p>I have been getting this strange error the whole of today - anyone know what is going wrong here?</p> <p>As far as I know, I have been using the multidex library correctly (the below is from the app.gradle file):</p> <pre><code>defaultConfig { applicationId "com.example.simon" minSdkVersion 14 targetSd...
0
3,077
Spring-SAML : Incoming SAML message is invalid
<p>I am facing an issue while integrating my app with SAML.</p> <p>The following is my error:</p> <pre><code>org.springframework.security.saml.SAMLProcessingFilter.attemptAuthentication: Incoming SAML message is invalid org.opensaml.common.SAMLException: Endpoint with message binding urn:oasis:names:tc:SAML:2.0:bind...
0
5,525
Spring & Hibernate: non transactional service methods
<p>I want my read methods not to use a transaction since this is just not needed at all, I only mark my create/update methods with @Transactional. But how do I do this? I have a pretty basic configuration of Spring with etc... </p> <p><strong>SessionFactory</strong> is injected in my DAO, and in each method I call se...
0
2,642
Leftside multilevel menu with Ionic, angularjs, bootstrap 3 didnt work properly
<p>i need this <img src="https://i.stack.imgur.com/6CGaR.png" alt="enter image description here"></p> <p>this is the controller code:</p> <pre><code>$scope.sideNavMenu = { title: "User Manual", subMenu: [ { title: "Title one", link: "index/titleone.html", icon:"fa fa-caret-down", ...
0
1,102
Kafka Error connecting to node ubuntukafka:9092 (id: 0 rack: null) (org.apache.kafka.clients.NetworkClient) java.net.UnknownHostException:
<p>I have two servers on VirtualBox guests each ubuntu. I can SSH from my main machine to both, and between the two so they all have the natnetwork.</p> <p>I ran on one server kafka as described here:</p> <p><a href="https://kafka.apache.org/quickstart" rel="noreferrer">https://kafka.apache.org/quickstart</a></p> <...
0
1,104
jquery hide/show not working in IE
<p>I have a set of radio buttons and a div. When the page loads, I do not want the div visible, and when button 1-3 is selected, I want the div to show. When button 4 or 5 is selected, I don't want the div to show.</p> <p>I currently have it working in all browser with the exception of IE (surprise). I can't seem t...
0
1,064
Zebra Printer C# code to print barcode label
<p>This is my *.prn file:</p> <pre> I8,A,001 Q0001,0 q831 rN S5 D10 ZT JF O R20,0 f100 N B775,188,2,1,2,6,160,B,"SM00020000" X0,199,1,0,200 P1 </pre> <p><code>SM00020000</code> being the barcode.</p> <pre><code>string s = "I8,A,001\n\n\nQ0001,0\nq831\nrN\nS5\nD10\nZT\nJF\nO\nR20,0\nf100\nN\nB775,188,2,1,2,6,160,B,\"...
0
1,105
How are bearer tokens stored server-side in Web API 2?
<p>I am setting up bearer token authentication in Web API 2, and I don't understand how (or where) the bearer token is being stored server-side. Here is the relevant code:</p> <p><strong>Startup:</strong></p> <pre><code>public partial class Startup { public static OAuthAuthorizationServerOptions OAuthOptions { ge...
0
1,508
'System.Web.WebPages.Html.HtmlHelper' does not contain a definition for 'ActionLink
<p><strong>Firstly - I have scoured SO</strong> and found many questions asking the same thing, though simply adding <code>&lt;add namespace="System.Web.Mvc.Html" /&gt;</code> in my web.config didn't cure the issue...</p> <p>Ok, so I have started a new project, based on the template Angular SPA - link is here:</p> <p...
0
2,958
Setting hidden input value in Javascript, then accessing it in codebehind
<p>I have been trying to set the value of a hidden input by using Javascript and then access the value from within my C# codebehind. When I run the code that is copied below, the value that is assigned to assignedIDs is "", which I assume is the default value for a hidden input. If I manually set the value in the html ...
0
1,787
Not able to plot graph: matplotlib is needed for plotting
<p>I am able to generate *.dat file:</p> <pre><code>vikas@server:~/memory_profiler-0.36$ ./mprof run --python test_sl.py vikas@server:~/memory_profiler-0.36$ ls *.dat mprofile_20151001035123.dat </code></pre> <p>But when I am trying to plot graph then it is saying "matplotlib is needed for plotting"</p> <pre><code>...
0
4,715
How do I configure when cobertura tests run in maven-cobertura-plugin?
<p>In order to fine-tune which tests are run at which times and in which environments, we have several executions set up for the maven-surefire-plugin. We set the default configuration to skip all tests, then enable them for the executions we want. This by itself works well for us.</p> <pre class="lang-xml prettyprin...
0
1,337
GUI multiple frames switch
<p>I am writing a program for a black jack game. It is an assignment we are not to use gui's but I am doing it for extra credit I have created two frames ant they are working. On the second frame I want to be able to switch back to the first when a button is pressed. How do I do this?</p> <p><strong>first window.........
0
1,098
PUT and Delete Request in Django rest framework
<p>I am new to Django, I was wondering How to code PUT request and Delete method in my Django REST API Project.</p> <p>I have tried to follow with many tutorials, but none working with my kind of code.</p> <p>The code I tried looks like this</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="...
0
1,974