title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
How to save uploaded file name in table using Laravel 5.1
<p>I need help in saving uploaded file name in database table using laravel 5.1.</p> <p>My Controller code for saving Image details</p> <pre><code>public function store(Request $request) { if($request-&gt;hasFile('img_filename')) { $destinationPath="offerimages"; $file = $request-&gt;file('img_fil...
1
1,046
Cannot find global type 'IterableIterator' with Typescript 1.7.5
<p>I installed NPM version of Typescript 1.7.5 and angular2 beta. While building the project in Visual Studio 2015 Update 1, I get this errors:</p> <pre><code>1&gt;VSTSC : error TS2318: Build: Cannot find global type 'Iterable'. 1&gt;VSTSC : error TS2318: Build: Cannot find global type 'IterableIterator'. 1&gt;VSTSC :...
1
2,752
jqGrid: Get parent row id in custom validation function of subgrid
<p>Can any one suggest me how can I get parent row id in the custom validation function of sub grid?</p> <p>This is a my code</p> <pre><code> subGrid: true, subGridRowExpanded: function (subgrid_id, row_id) { var subgrid_table_id; subgrid_table_...
1
1,846
Tomcat, User Session Storage with JDBCStore, Immediate Session Timeout
<p>I am attempting to store user session data in a database. I have followed a few articles and the Tomcat documentation on how to do this. </p> <p>I am now using Tomcat7 and PostgreSQL and can confirm the INSERTS are working but theres still a problem. Tomcat is inserting the user session into the database and then i...
1
1,878
AngularJS select list with optgroups with selected item with combined label
<p>I need to make grouped list with good value and label. Label should be combined by label + value. Also one item should be selected.</p> <p>My code</p> <pre><code>&lt;div ng-controller="MyCtrl"&gt; &lt;select ng-model="selectedVal" ng-options="v.label as v.number group by v.group for v in list"&gt; &lt;/s...
1
1,071
Cassandra CQL3 slice query issue - How to slice
<p>I have a table created using <code>CQL3</code> with:</p> <pre><code>create table compositetest(m_id ascii,i_id int,l_id ascii,body ascii, PRIMARY KEY(m_id,i_id,l_id)); </code></pre> <p>Inserted some random data:</p> <pre><code>cqlsh:testkeyspace1&gt; insert into compositetest(m_id,i_id,l_id,body) VALUES ('m1',1...
1
1,464
Spring security null pointer exception
<p>I'm trying to map the users in my database to the Spring Security users, but without much luck. My UserServiceImpl is as follows (the autowiring normally works fine when I'm calling it through a servlet, but throws a null pointer when used in Spring Security...</p> <pre><code>@Service("userService") @Transactional...
1
3,329
Android Login and Registration with PHP, MySQL and SQLite forced to close
<p><strong>Source of app code</strong> : <a href="http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/" rel="nofollow">http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/</a></p> <p>I run the apps on my samsung s2 and android 2.2 emulat...
1
3,962
Creating a thread inside the class in C++
<p>I am a beginner in threading with C++. Tried to create a thread t1 inside the class, but I want it not to be initialized. For this I did:</p> <p>In the class variable, <code>thread *t1</code> as if were to declare the class variable without initializing it.</p> <p>Then from the constructor, I did:</p> <pre><code>t1 ...
1
2,516
PyInstaller-built Windows EXE fails with multiprocessing.pool
<p>I'm using Python's multiprocessing.Pool library to create multiple processes in the following way: </p> <pre><code>def parallel_function(f): def easy_parallize(f, sequence): """ assumes f takes sequence as input, easy w/ Python's scope """ pool = Pool(processes=8) # depends on available cores ...
1
1,115
First time implementing telerik RadUpload control
<p>I am implementing telerik RadUpload in my asp.net web application.I added corresponding the handler and module entries in web.config.</p> <pre><code>&lt;add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" /&gt; &lt;add name="RadUploadModule" ...
1
1,479
LDAP connection leak in this code
<p>Could someone explain me why this piece of code randomly "leaks" LDAP connections? I can see the amount of established TCP/IP connections rising by time and at some stage this starts causing problems. I tried fiddling with the com.sun.jndi.ldap.connect environment properties (enabling pooling, disabling it and such)...
1
2,214
Displaying a web page as a pdf with click of a button
<p>I have a new requirement to have a button in my web page, and upon clicking, it displays the web page as a PDF. On researching I found that <code>iTextSharp</code> is used for such purpose. But I have many <code>Telerik</code> and ASP controls in my web page too. Can I get that also in the PDF using <code>iTextSharp...
1
1,188
Can't load .so file stored in a library (aar) from an application project
<h1>0. Problem</h1> <p>I've create an Android library (aar) which contains some so files.</p> <p>After successfully loaded the aar file in my Android application project, I try to load the so files (from the aar classes) but failed with a <code>java.lang.UnsatisfiedLinkError</code>.</p> <p>I think the Android applicati...
1
5,329
Incoming number is null after ending the call in android PIE 9
<p>I have been working on this problem since weeks. I am making an app which picks the incoming number and shows it in a dialog box after the call is ended. Everything is working fine below android PIE 9.0. The number is always null in android PIE. I have given all permissions including <code>READ_CALL_LOGS</code> but ...
1
3,239
Django rest: AJAX Post is not working, 400 response
<p>I am newbie to DRF and Ajax, my serializer code</p> <pre><code>class CartItem(models.Model): cart_id = models.CharField('Cart ID', max_length=50) shop = models.ForeignKey(Shop) date_added = models.DateTimeField('Added on', auto_now_add=True) quantity = models.IntegerField('Quantity', default=1) ...
1
1,946
Sequelize create object with association not working
<p>I am trying to create a record (Location) with an association (Weather) (insert with foreign key) and every which way I try I end up with a NULL value in the foreign key field <strong>weatherId</strong>.</p> <p>I have seen examples in the help with creating both the primary and secondary entities at the same time, ...
1
2,094
jquery trigger('click') works only once
<p>I'm trying to customize a jQuery lightbox plugin called <a href="http://sachinchoolur.github.io/lightGallery/" rel="nofollow">LightGallery</a> to achieve the following result:</p> <p>1- Make the script fetch all images from a folder, using index increment as an image path;</p> <p>2- Make the Lightbox open after cl...
1
1,824
How can I dynamically add layouts and views to an Android XML layout file?
<p>I am creating an app that needs to dynamically generate an XML file. The layout starts essentially empty (other than a linear layout), then I loop through a JSON array and create the XML code shown below for EACH element in the array (the only thing different for each element in the array is the ids for the views). ...
1
1,162
Screen blinks when I run my app
<p>I just upgraded my Nexus S to 4.0.3 (different story)</p> <p>Anyway, my app started to blink on a screen. I unchecked all those developer options but still. It doesn't do it always. But sometime when I turn screen it starts blinking (between black and normal). </p> <p>Or it can blink when I just run app - on my Lo...
1
1,215
Arguement passed to constructor must be an instance of interface, instance of decorator given
<p>I am having an issue trying to debug my code, as far as I can see looking at the various bits of code, it all links up correctly, but there must be something obvious I am missing here.</p> <p>I am sorry about the amount of code I've pasted in to the question here, but unfortunately there are a lot of files in play ...
1
2,263
Shared Memory, write to file
<p>I have TXT file in shard memory. The code is at the end. I've been attempting to get it out of the memory and write to a file in the C:\ drive.</p> <p>But i get a error:</p> <pre><code> Type 'SharedMemSaveToFile.SharedMemSaver+Data' cannot be marshaled as an unmanaged structure; no meaningful size or offset ca...
1
1,380
Not able to resolve "Numeric Value '-' is not recognized" error in Snowflake SQL Query
<p>I'm working on converting the sql query below over to Snowflake, and got the error &quot;Numeric Value '-' is not recognized&quot; but it did not have a line number. I assume it's in reference to the various &quot;-1&quot; instances throughout the query but there's no line referenced so it's unclear what's causing t...
1
5,689
The getter 'length' was called on null when building a TabBar
<p>I'm getting the following error when first loading the TabBar from my Flutter application:</p> <pre><code>flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ flutter: The following NoSuchMethodError was thrown building TabBar(dependencies: [_InheritedTheme, ...
1
1,755
Import records from CSV file into SQL Server 2008 R2 using VB .Net 2010
<p>I need to import records from a comma delimited CSV file into an existing table in SQL Server R2 database using Visual Basic .Net 2010. Existing records in the table are to be deleted prior to import. I have been able to create an in-memory temporary DataTable and populate the records from CSV file using TextFieldPa...
1
1,559
gnuplot "stats" command unexpected min & "out of range" results
<p>I’m trying to develop a histogram script. The plot itself seems correct, but I have some problems or questions:</p> <ol> <li>I don’t understand why the “stats” output says my data file has “out of range” points. What does that mean?</li> <li>The “stats” minimum value doesn’t look correct, either. From the data file...
1
1,032
Bootstrap - Reducing spacing between form-controls like textbox and label
<p>I'm developing the a .NET(C#) MVC web-application. I have the following bootstrap drop-down menu.</p> <p>I'm trying to achieve the following two things :</p> <ul> <li><p>1) <strong>I'm trying to reduce the spacing between a label and it's respective text-box</strong>. I tried using "col-xs-1 col-form-label" instea...
1
3,068
React native - z-index in dropdown doesnt work
<p>I am trying to create a basic dropdown in React Native.</p> <p>I have created a dropdown component:</p> <pre><code>//Dropdown import React, { useState } from &quot;react&quot;; import { StyleSheet, Text, View, TouchableOpacity, Platform, } from &quot;react-native&quot;; import { Feather } from &quot;@expo/...
1
1,702
How to delete records in BigQuery based on values in an array?
<p>In Google BigQuery, I would like to delete a subset of records, based on the value of a specific column. It's a query that I need to run repeatedly and that I would like to run automatically.</p> <p>The problem is that this specific column is of the form <em>STRUCT&lt;column_1 ARRAY (STRING), column_2 ARRAY (STRING)...
1
1,032
Trouble linking printf and scanf in Assembly (x86-64) and C file on Mac OSX
<p>I wrote a program in Assembly (x86-64) and called it from a C file wrapper to use both the printf and scanf functions. However when I try to link it I get the following errors:</p> <pre><code>$ nasm -f macho64 -l Parallelograms.lis -o assembly.o Parallelograms.asm $ gcc -c -Wall -m64 -o main.o ParallelogramDriver.c...
1
3,374
Dynamic dropdown list react axios get request
<p>Inside of my main <code>App.js componentDidMount()</code> lifecycle phase I have an axios get request to a rest service. </p> <p>EDIT: Included full <code>UserForm.js</code></p> <pre><code>class App extends Component { // default state object constructor() { super(); this.state = { schemas: [...
1
1,159
Maven plugin cannot be resolved
<p>I've searched this problem as the title says but still don't know what I should do. I am trying to build an executable jar file, but one of the plugins <code>maven-assembly-plugin</code> cannot be resolved.</p> <p>I've tried the <a href="https://maven.apache.org/plugins/maven-assembly-plugin/usage.html" rel="nofollo...
1
2,484
Xamarin UISwipeGestureRecognizer Renderer
<p>In Xamarin.Forms I want to be able to swipe left and right to navigate a list of pictures. At the moment I just want to be able to fire an event each time a swipe is detected.</p> <p>child class to be used in the renderer:</p> <pre><code>public class LRMasterDetailPage : ContentView { } </code></pre> <p>I have a ...
1
1,150
Ghostscript font conversion issue
<p>All,</p> <p>I'm having an issue with a font in a pdf. In the original, it shows a solid line, but if I copy it, I get this <code>ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ</code> on the clipboard. </p> <p>That indicates to me it is some special font being used, which would be fine. The problem is that I use this pdf as input to ghostsc...
1
1,321
GCC error: command 'gcc-4.0' failed with exit status 1
<p>I am trying to install Fabric into a Virtualenv / Django 1.3.1 / OS X Lion with Xcode 4.2. This error seems to be <a href="https://stackoverflow.com/questions/6906385/mac-osx-lion-virtualenv-pil-install-gcc-error">fairly prevalent</a> but I can't seem to find an answer when you are running Python 2.7 &amp; Xcode 4.2...
1
1,044
Error rendering react-bootstrap components
<p>I have recently migrated from using twitter-bootstrap in react classes to using react-bootstrap. I wanted to test out react-bootstrap Navbar. My code is as:</p> <pre><code>import React from 'react'; import { Link } from 'react-router'; import Radium from 'radium'; import Grid from 'bootstrap-grid-react'; import * a...
1
1,248
Raphael JS PieChart selecting sections
<p>I have used the JS library Raphael to create a pie chart. I am wanting to assign each sector some text so that I can display the text in the middle of the circle when you hover over a specific section. So first I need to select a specific section of the circle and assign it as a variable and add text to it. Can a...
1
1,953
Metal View (MTKView) Drawing Size Issue
<p>Here I have a MTKView and running a simple CIFilter live on camera feed. This works fine.</p> <h2>Issue</h2> <p>On older devices' selfie camera's, such as iPhone 5, iPad Air, the feed gets drawn on a smaller area. <strong>UPDATE</strong>: Found out that CMSampleBuffer fed to MTKView is smaller in size when this ...
1
2,054
Renaming App in Xcode 6
<p>I have an app that I need to rename so the code can be reused with only slight changes and I am having difficulties.</p> <p>I followed this link and it seemed to cover it but when I tried build it I received a linking error which also follows:</p> <p>Link to resource:</p> <p><a href="http://matthewfecher.com/app-...
1
1,330
Why is documentFragment no faster than repeated DOM access?
<p>I was always under the impression that rather than touching the DOM repeatedly, for performance reasons, we should use a <code>documentFragment</code> to append multiple elements to, and then append the fragment into the document once, rather than just repeatedly appending new elements one-by-one into the DOM.</p> ...
1
1,140
Ajax Redirect on new page and after display success message
<p>I am working with ajax and php. I want to display message on another page after user successfully added using Ajax. I have tried so much. It's working when first display "Success" message on popup and afrer redirect on another page. But i want to first redirect on another page and after display message.</p> <p><str...
1
1,351
Error occurred while unscheduling jobs
<p>When i shutdown JBOSS server <code>(ctrl+C)</code> results in the following exception</p> <pre><code>12:39:50,020 ERROR [com.kony.sync.console.job.scheduler.ConsoleJobScheduler] (ServerService Thread Pool -- 20) Error occurred while unscheduling jobs for application ID:PaaSJobs: org.qu artz.JobPersistenceException:...
1
1,941
How to write update query in laravel 5.2
<p>I am fetching data from the table to one form using laravel 5.2 for editing or updating existing data. But when i click on update button its not updating. Can anyone please help me to find out the mistake that i did in my code . My edit form is add.blade.php given below</p> <pre><code> @extends('app') @section('...
1
2,953
ColdFusion Query of Queries 100 x Slower than the Database Call Itself (with relatively low record counts)
<p>We have an analytics chart which first queries the database log table to pull all relevant from an optimized query only selecting what is needed along with grabbing relevant start and end ID's since this table has millions of records. Once that initial query is pulled, we have used ColdFusion's query of queries to ...
1
1,142
ActivityRecognitionClient requestActivityUpdates() method doesn't trigger given PendingIntent when phone state is stand by
<p>I coded an application to record user's location periodically (in the background). I used ActivityRecognitionClient. When activity is received it is compared to previous activity state and is recorded (or not) according to evaluation.</p> <p>It's working as intended as long as my phone is awake. (log messages appea...
1
4,165
Document count aggregation via query in Elasticsearch (like facet.query in solr)
<p>I have a main query and i need the number of matches for a couple of sub-queries. In solr words I need a <a href="https://cwiki.apache.org/confluence/display/solr/Faceting#Faceting-Thefacet.queryParameter" rel="nofollow">facet.query</a>. What I am missing is a simple <code>doc_count</code> aggregation like the <a hr...
1
1,400
Bootstrap Carousel to have different URL for each slide
<p>My bootstrap carousel is located here: <code>testdomain.org/about.html</code> and when the slide changes, the URL in the address bar remains the same. I want the URL to auto change when the slides change to something like this:</p> <pre><code>https://testdomain.org/about.html#slide1 https://testdomain.org/about.htm...
1
1,205
different mutex for push and pop
<p>I have a class called 'subscribedQueue'. This class receives its data via its subscribed publishers (plural) calling its push method.</p> <p>In another thread, this class's pop method is called to receive that data. Thus in a sense this class is a kind of buffer between multiple publishers and their subscribers. Fo...
1
1,233
how to read this text from file
<p>how to read the text below?</p> <blockquote> <p>‰€ˆ‡‰�#îõ‘þüŠ ê‘¯õù ‚†ƒ� -#�ª÷‘þü “‘ ª“îù )øþ¦ùý ¤ª—ùý î‘õ•þø—¤(#•¢þ¢� ø¤÷¢ù ꑯõù îõ‘þü#^a—ú¤�ö^b•¦øû÷¢ð‘ö ¤�ù ¢�÷©^cˆˆƒ�#‚€� «.: õ¬ø¤Š ›¢øñ#…�…ˆí/Š…/ …€�…Š}TK{^aˆˆƒ�#†/„€€#}BF{#ª“îùû‘ý î‘õ•þø—¤ý#ª“îùû‘ý î‘õ•þø—¤ý -- �¥õøöû‘#^c</p> </blockquote> <p>I...
1
2,020
Python logging override dictConfig level
<p>I am using the following dictConfig for a logger. However, I am unable to modify the logging level at runtime.</p> <p><em>#contents of log_config.json</em></p> <pre><code>{ "version": 1, "disable_existing_loggers": false, "formatters": { "simple": { "format": "%(asctime)s - %(name)-...
1
1,160
How To Configure MySQL DataSource In Tomcat 7 using hibernate and spring?
<p>this is my problem: Im trying to configure my data source in context.xml tom cat's field, as follow:</p> <pre><code>//C:\apache-tomcat-7.0.42\conf\context.xml &lt;Context&gt; &lt;!-- Default set of monitored resources --&gt; &lt;WatchedResource&gt;WEB-INF/web.xml&lt;/WatchedResource&gt; &lt;Resource name="jd...
1
1,908
BroadcastReceiver not firing on notification action click
<p>I am trying to create a simple notification with a button (action) defined to it. I have managed to display it properly and create a PendingIntent for my action. I have also created a BroadcastReceiver which is supposed to be called when my action is clicked. But it's onReceive() method does not get called. I have n...
1
1,459
Angular 11 tsconfig Path Aliases not Recognized
<p>I am working with Angular 11 and trying to use short imports like <code>import {smthg} from '@common'</code> instead of <code>import {smthg} from '../../../common'</code></p> <p>But I always get errors in IDEA: <code>TS2307: Cannot find module '@common' or its corresponding type declarations.</code></p> <p>And same ...
1
1,685
Spring MongoRepository, where to catch the exception?
<p>I have a Spring project, and a MongoRepository. The MongoRepository is an Interface that extends MongoRepository, just like JPA.</p> <p>If I try to build my project with <code>mvn clean install</code> it runs Spring once. Spring tries to connect to MongoDB which is not running on my Jenkins server. </p> <blockquot...
1
1,094
WAV file to byte array
<p>I am currently using Naudio to record the user's voice and convert it to a byte array so that i can apply FFT onto it and convert it to a double array and then to a spectrogram. Im currently stuck at converting the WAV file to byte array.Thanks.</p> <pre><code> private void mic_Click(object sender, EventArgs e) ...
1
1,337
How do I use log4j with Maven and executable jar file?
<p>I'm trying to get log4j working in a simple application but I'm getting the message: </p> <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger </code></pre> <p>I execute the application with the command: </p> <pre><code>java -jar lunchtracker-1.0-SNAPSHOT.jar </code></pre...
1
1,201
CollectionView Xamarin not showing
<p>I have a ListView and a CollectionView (Xam 4 pre-8 ). I added the ListView is to prove items show. The binding appears correctly and I have added Xam 4 to all of the projects. CollectionView does not appear. Why?</p> <p>AppDelegate:</p> <pre><code> public override bool FinishedLaunching(UIApplication app, ...
1
1,421
raise TemplateDoesNotExist(template_name, chain=chain)
<pre><code>Traceback (most recent call last): .... raise TemplateDoesNotExist(template_name, chain=chain) django.template.exceptions.TemplateDoesNotExist: None </code></pre> <p>Django project.</p> <p>settings.py</p> <pre><code>TEMPLATES = [ { ... 'DIRS': [ os.path.join(BASE_DIR, 'templates')],}, ...] </code...
1
1,471
Jest cannot find module
<p>Hi I am trying to use Jest, but it keeps giving an error of cannot find module. I am not sure if this has to do with the paths of the files. All the files below are located out of my src folder. I have my file set up below.</p> <p>jest.config.js file:</p> <pre><code>module.exports = { &quot;collectCoverage&quot;...
1
3,037
Datatable column width issue after "refresh" row data
<p>I'm currently using datatable to produce table below:</p> <p><a href="https://i.stack.imgur.com/N795U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N795U.png" alt="enter image description here"></a></p> <p>I'm happy with the result as the width of each column is calculated automatically, resul...
1
1,706
How to crop and resize JavaFX Image?
<p>I'm trying to display very large images on JavaFX canvas. Resolution of a single image is 11980x8365. Each image has a corresponding world file and I can use it to position images correctly. My canvas size is 800x600. Sometimes I need to write whole image on the canvas, and sometimes just a part of it.</p> <p>Here ...
1
2,782
xUnit tests fails when executed by Azure DevOps
<p>I'm creating a very simple test project to experiment with various Azure DevOps CI/DI features. This project contains a solution with an ASP.NET Core website project, and an xUnit unit tests project. The unit tests runs correctly on my local machine (tested with the visual studio runner and with <code>dotnet test</c...
1
1,894
Using XSL to sort XML data then output an XML file to be read by Classic ASP
<p>Hopefully this will be a simple fix. I'm completely new to XSL but I've managed to get a little script that sorts my data by date. I now want to use ASP to limit this data to all entries within a month (this works by using a DateDiff() function). When I go to load in the XSL scripts output it says that my XML is mal...
1
2,161
Want to show value of variable in alert box
<p>I want to show the value of the variable in Alert box so please give me suggestion for that. Here is my code.</p> <pre><code>public partial class WebForm1 : System.Web.UI.Page { int sum3; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ...
1
1,056
avconv with subprocess
<p>It's seems like I never really manage to wrap my head around subprocess. This commandline works in bash</p> <pre><code>avconv -i "concat:/tmp/BABAR_AND_THE_A-011A-hts-a-v1-cc3651d01841d748_Layer6/6148_Period1/segment0.ts|/tmp/BABAR_AND_THE_A-011A-hts-a-v1-cc3651d01841d748_Layer6/6148_Period1/segment1.ts" -vcodec co...
1
7,622
How to update MapboxGL.ShapeSource dynamically?
<p>Using <a href="https://github.com/react-native-mapbox-gl/maps" rel="noreferrer">react-native-mapbox-gl/maps</a>, when a <code>SymbolLayer</code> is dynamically added to a <code>ShapeSource</code>, it seems it is not shown, or the <code>ShapeSource</code> is not updated.</p> <p>Here is the example to reproduce : bas...
1
1,916
Cvc-complex-type.2.4.a: Invalid Content Was Found Starting With Element ' '
<p>I have a XML file that is not valid respect to XSD but I can not understand what is the issue! It seems that XML is correct but It is not valid</p> <p><code>Cvc-complex-type.2.4.a: Invalid Content Was Found Starting With Element 'decodifica_impianto'. One Of '{decodifica_impianto}' Is Expected., Line '3', Column '24...
1
3,266
Multi page report with QTextDocument
<p>I am generating html report with <code>QTextDocument</code>, my problem it comes when it should print each table on its own page, but it doesn't. I tried to use <code>QPainter</code> along with <code>QTextDocument::drawContents()</code> but this makes it show only the first page. Another attempt was to insert a <cod...
1
3,022
Remove contents of custom properties in Word 2010 with Open XML SDK 2.0 or Linq
<p>I'm trying to remove sensitive information from word-files before they are sent from our system. Below is an example of the custom properties in a file that is going to be sent. I would like to remove the contents of filePath and templateFilePath.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="y...
1
1,570
jpa custom connection pool
<p>I've successfully integrated hibernate in my web app. I was happy with my <code>persistence.xml</code> configuration</p> <pre><code>&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"&gt; &lt;persistence-unit name="PU"&gt; &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&l...
1
1,629
Wordpress AJAX load page content
<p>I'm trying to get wordpress to load my other pages through AJAX, first i thought i wouldn't append other pages HTML but it seems as if the page doesn't know how to find the page ID. </p> <p><strong>My jQuery file ajax-pagination.js</strong></p> <pre><code>(function($) { function find_page_number( element ) { e...
1
1,305
PHP input GET vars sanitizing
<p>For my application, written in PHP 5+, I have a <code>common.php</code> which is included from all other pages. Within that I have an <code>include sanitize.php</code> which aims to sanitise any input vars used in the URL. So, targetting <code>$_GET[]</code> values.</p> <p>This is just to have one place where I can...
1
1,146
Create Issuer for cert-manager for Rancher 2.x launched with docker-compose
<p>I am testing Rancher 2 as a Kubernetes interface. Rancher 2 is launched with docker-compose, using image rancher/rancher:latest.</p> <p>Everything is Ok for clusters, nodes, pods. Then I try to secure some load balancers with certificates. Do do so, I install cert-manager from the catalog/helm.</p> <p><a href="htt...
1
1,683
LINQ related error "Unable to create a constant value of type 'System.Object'. Only primitive types or enumeration types are supported in this context
<p>I have some code that is selecting some values from my database. I have a IQueryable of requests, that contains a ICollection of rooms.</p> <p>I want to get a <code>List&lt;ICollection&lt;rooms&gt;&gt;</code>. I have tried the following and i recieve the above error. </p> <p>Any ideas??</p> <pre><code>public Acti...
1
1,401
how to make a 'div' element drag on iphone
<p>this is my code,for some reason , i can't use any javascript lib ,like ;jquery:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%;"&gt; &lt;head&gt; &lt;m...
1
1,076
How to forcefully unmount a component in react native?
<p>I'm using <a href="https://reactnavigation.org/" rel="nofollow noreferrer"><strong><code>reactnavigation</code></strong></a> stackNavigtor as the root structure.</p> <p>When my app loads, it initially mounts a component based on intialRouteName - which is good so far. However, when I open my slideMenu and navigate ...
1
1,427
CakePHP Multiple Entry Fields w/ saveAll() HABTM multiple records Insert not saving
<p>I've found some very helpful tutorials and posts on StackOverflow about this topic, but I am completely stuck on one point.</p> <p>Everything below IS working <strong>with the exception of my HABTM Zip data</strong>. </p> <p>Here is my code:</p> <pre><code>&lt;?php for ($i = 1; $i &lt;= 3; $i++) { // 3 fields at ...
1
1,299
Are C# static class private fields thread safe?
<p>I have a C# static class accessed from multiple threads. Two questions:</p> <ol> <li>Are my private static fields thread safe when the field is initialized on declaration?</li> <li>Should I lock when creating private static fields from within static constructor?</li> </ol> <p>Usage of static class from different ...
1
1,177
Testing with jest+enzyme, mock functions is called twice for no reason
<p>I'm trying to learn Jest and Enzyme but I'm having a problem I can't find a solution to, this is my test.. it's not very good I know but I'm learning:</p> <pre><code>import * as apiMock from '../api'; const fakePostId = '1'; const fakePersona = 'Fake'; jest.mock('../api', () =&gt; { return { fetchAllC...
1
1,224
Modeling a very big data set (1.8 Million rows x 270 Columns) in R
<p>I am working on a <em>Windows 8</em> OS with a <em>RAM of 8 GB</em> . I have a data.frame of <strong>1.8 million rows x 270 columns</strong> on which I have to perform a glm. (logit/any other classification)</p> <p>I've tried using ff and bigglm packages for handling the data.</p> <p>But I am still facing a proble...
1
1,484
Spring 4.0 form validation issue using AJAX
<p>I am facing problem when i am doing server side form validation using jQuery and spring 4. Every time "result" (object of BindingResult) is coming with zero error result.</p> <p>Below I am proving my code for better understanding. my jsp code is</p> <pre><code> &lt;div class="registerForm"&gt; ...
1
2,938
PHP: Merge PDFs without composer?
<p>I am trying to merge PDF documents with PHP and have searched a lot and tried several solutions. What seems to be the most common is using the <strong>FPDI</strong> library and then a small class like <a href="https://github.com/clegginabox/pdf-merger" rel="nofollow noreferrer">PDF-Merger</a>.</p> <p><strong>But th...
1
1,578
Generate SQL scripts from Azure SQL Database
<p>When I tried to Generate scripts in <code>SQL Server Management Studio 2012</code> from my <code>Azure</code> database. I received following error:</p> <blockquote> <p>Microsoft.SqlServer.Management.SqlScriptPublish.SqlScriptPublishException: An error occurred while scripting the objects. ---> Microsoft.SqlSe...
1
1,271
Why nextLine is being skipped when using do while loop
<p>I have to write a program for my class that takes user input for homework,labs,tests,etc,puts them in a string, and there is a separate class that splits them in separate "double"numbers and contains a writeToFile method to write the student's grade into a file. </p> <p>I keep getting a problem though.. When I ask ...
1
1,228
C++ error expected primary-expression before '(' token
<p>I am trying to create a program that takes N random nodes from user input and creates a random integer that is put into a binary tree and then copied into a priority queue. The integer becomes the key for each node and another integer counts the frequency of the key. I run into issues when I copy into the priority q...
1
1,920
Getting "Syntax error in INSERT INTO" for Append Query in VBA (Access 2002)
<p>I am getting a "Syntax error in INSERT INTO" when I try to run an append query.</p> <p>I'm making a database to make it easier on production operators; capturing some of the data by hand-held scanners.</p> <p>I've been looking around to see if anybody has had a problem like this. I've seen some that were close, b...
1
1,547
SOLR Out Of Memory Error when reading/indexing a large index
<p>I'm running into a OOM error with Solr, when indexing large amounts of data. I know the general advice would be to split the index into shards, but actually this is already the case. I'm indexing shards, and further splitting is at this point not an option. I want to understand what is happening and why am I gettin...
1
3,195
.NET Application Configuration to store email contact information
<p>I have a simple application that sends out status emails to some of our internal users.</p> <p>I use a simple application configuration file (App.config) to store email address and name information, about the intended users. Since the appSettings section only seem to support simple key/value pairs, it currently look...
1
1,039
Row count in dynamically generated table using JQuery
<p>I've a table with header and footer and a default row already created. When I add more rows dynamically I don't get the exact row count. It always returns the correct row count if I add them before.</p> <p>Below is the code I've written -</p> <pre><code> &lt;table id="empTable" class="table table-responsive tab...
1
2,181
Using EL 2.2 in an application deployed on Oracle Weblogic 10.3.6 isn't working?
<p>I'm running <code>Weblogic 10.3.6</code> and trying to build a new dynamic web application (in eclipse) that supports <code>JSF 2.2.8</code> and <code>EL 2.2</code> and <code>JDK 1.7 U45</code>, but unfortunately <code>EL 2.2</code> is throwing an exception. <br/></p> <p><strong>The <code>weblogic.xml</code></stron...
1
2,740
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'description' cannot be null (SQL: insert into) in laravel
<p>i'm trying to add a new comment into my 'posts' column on my database, however I am getting this error [QueryException","message":"SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'description' cannot be null.</p> <p>although I filled the description fields in the form!!!</p> <pre><code>ajax: $('#f...
1
1,361
Change background color on hover on a NSMenuItem with custom NSView
<p><strong>Here is the thing:</strong> </p> <p>I have created a custom <code>NSMenuItem</code> with a custom <code>NSView</code> in it.</p> <p>Everything works fine except that I can't get the <code>NSMenuItem</code> to get highlighted (= change the background color on mouseover).</p> <p>I'm trying to do it inside ...
1
1,704
how do i pass an object in ClaimsIdentity Asp.NetCore
<p>how do I pass and Object in a JWT claim in Asp.NetCore WebApi e.g lets say I want to pass an object of Gender with an ID and Name.</p> <pre><code> private IActionResult GenerateJwtToken(string email, ApplicationUser user) { var tokenHandler = new JwtSecurityTokenHandler(); va...
1
1,481
Centering CSS top navigation menu - SharePoint subsites
<p>I've searched high and low for the answer to the question but nothing seems to be working so hoping someone here can help me out.</p> <p>I am trying to center my top navigation menu for my SharePoint site but not having any luck. I have tried specifying a width, margin:0 auto and text-align=center with various othe...
1
2,106
Using Webpack in an MVC 5 Angular 2 application
<p>I created a very basic MVC 5 Angular 2 app which works fine if I use SystemJS. However, I wanted to be able to bundle my code so I could add it to my BundleConfig file and decided to look into Webpack. I've got it to a point where I can generate the bundles and save them to disk (using webpack --watch) but when I in...
1
2,060
How to make entire page redirect to login after session expires in mvc?
<p>I have this attribute overridden and decorated it on each controller which does its job perfectly on all normal views: </p> <pre><code>public class MyAuthorize : AuthorizeAttribute { protected override bool AuthorizeCore(HttpContextBase httpContext) { var authroized = base.AuthorizeCore(httpContext)...
1
1,433
Detecting incoming call and opening a service in background on top of the dialer app
<p>After detecting the incoming call, I am opening a messenger like chat icon on incoming call. But I am facing two issues : <br>1.The incoming call is not detected when my application is closed (not running even in background). <br>2.When my phone is locked, the chat icon does not appear. The chat icon hides behind th...
1
6,454
NGINX configuration resolver not working for local host
<p>I have deployed my project(angular) on nginx its running on port 4210. I am using AWS ec2 instance. when I am trying to run my project on browser its giving me 500 internal server error.Can you please tell me where I am going wrong this is my first time.Thank You in advance</p> <p><code>nginx -t</code> is giving su...
1
1,458
Redirect back with input not working in laravel 5.5
<p>I've used redirect back with input many times previously. But in this project I'm unable to do so. This is my <strong>controller</strong> method that handles the form request:</p> <pre><code>public function verifyMobileCode( Request $request) { $userId = Auth::user()-&gt;id; if( Auth::user()-&gt;ver...
1
2,611
Kafka inaccessible once inside Kubernetes/Minikube
<p>I need to run Kafka in a local Kubernetes instance (using Minikube) and to have the resulting Kafka service accessible to client applications (publishers and subscribers) outside the Minikube VM.</p> <p>I have everything up and running in Minikube but I suppose that I have made a configuration mistake since I canno...
1
8,742