SVM classifier after eigenfaces feature extraction. i am having an error saying assertation failed. Can anyone help? Putting my sample code below
Vote count: 0 Error seems to be on this line: Ptr<ml::TrainData> tData = ml::TrainData::create(_projections, ml::SampleTypes::ROW_SAMPLE, _labels); From this code: Ptr<ml::SVM> svm = ml::SVM::create(); svm->setType(ml::SVM::C_SVC); svm->setKe el(ml::SVM::LINEAR); svm->setGamma(3); svm->setTermCriter...
Custom intellisense for a Qt-based dev tool
Vote count: -1 This might be a tough one. I am creating some custom tools to my Qt development toolkit. I have a need for somehow, in the way intellisense in Qt Creator and Visual Studio does, to get "metadata" of different available classes that are included in some inspected c++ file. -How could I...
Nginx rewrite SEO friendly URL
Vote count: 0 I have WordPress installed on my root / of example.com and another Web app on /sub-directory/. I have Nginx rewrite rule: location / { try_files $uri $uri/ /index.php?$args; fastcgi_read_timeout 300; } location ~ .php$ { include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/php...
Docker confusion
Vote count: 0 I am very interested in docker and I've read about it but I'm a bit confused with containers. When we pull for instance, the official nginx from docker hub, is it only the application or nginx comes with operating system? It seems to me that all containers come with the operating syste...
Logic to found TAT for activation excluding holidays
Vote count: 0 I want to find out Process time for the activation of requests and want to exclude holidays. Ex: If request date is 11/04/2016 17:00:00 , 12/04/2016 is holiday and the request got closed on 13/04/2016 09:00:00. Then 12/04 should be excluded and TAT should be 07 + 09 hours that is 16 ho...
org.hibernate.LazyInitializationException (Sprin/Hibernate)
Vote count: 0 I have 3 tables in my database - Booking, Restaurant and RestaurantTable. Right now I am trying to create a new booking and one of the steps there is adding a table. But when I try to add this table the following error comes up: org.hibe ate.LazyInitializationException: failed to lazil...
Storing data in record to reduce query redundancy
Vote count: 0 The below example shows redundancy as the database is queried twice for exactly the same thing. Is there anyway I can simplify this? .div1 - towns.each do |town| = town.name - town.residents.where(:age => 14).each do |f| %p= f.name .div2 - towns.each do |town| = town.name - town.reside...
isset and if function in php with or operator
Vote count: 0 I have a php code to check user login status which check if session variables are set or cookies are set. If either of condition is true then it grand permission otherwise redirect to login page. Code looks like this : if(isset($_SESSION["userid"]) || isset($_COOKIE["userid"]) && isset...
Can't boot Ubuntu 15.10 without 'idle=nomwait'
Vote count: -1 I'm using Ubuntu 15.10 on MSI GS40 laptop, which has Intel Skylake processor and Nvidia's dedicated GPU. I couldn't boot to Ubuntu's installation stage without giving GRUB's boot option 'nomodeset' and 'idle=nomwait'. I searched throughout the inte et, found out that I should install ...
Jersey - Register ExceptionMapper for Resource Methods
Vote count: 0 The question Exception Handling/Mapping for a particular class brought me to the question of how to register an ExceptionMapper to a particular resource Method. I've tried to use a DynamicFeature like this: DynamicFeature @Provider public class ExceptionMapperDynamicFeature implements ...
Save and Run with one Keystroke
Vote count: 0 I'm using winPython and Notepad++ and would like to save myself some key strokes by having one key save and also run my code. I have C:UsersRobinDesktopcodingWinPython-32bit-2.7.10.2python-2.7.10python.exe "$(FULL_CURRENT_PATH)" saved onto F6, but when I try to create a macro for CTRL+...
How to fill this textbox?
Vote count: 0 I'm encountering a problem when I am trying to fill in this textbox. It just doesn't works. This is the code of the textbox: <div id="input-field" class="input-field editable" type="text" contenteditable="true" data-ph="Type here to send a message" g_editable="true" role="textbox" styl...
php require minimum 3 words form validation
Vote count: 0 i have this php code for form validation : if(($_FILES['file']['error'] != 0) || $title == '' || $tags == '') { wp_redirect(home_url('/') . '?posterror=1'); exit; } This form redirect you to a page error if you didin't upload a file,put a title or a tag. From this code i want to change...
Laravel routes return 404 after moving to XAMPP
Vote count: 0 I've read some posts about it and found, that the problem is with mod_rewrite. But my configs seems to be ok. My vhosts.conf: <Directory "D:/xampp/htdocs/example/public"> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> <VirtualHost *:80> Doc...
linked JARs work fine in IntelliJ, but not in the command line
Vote count: 0 I'm writing a small Java app that gets launched locally, but spawns EC2 instances. The class that I'm trying to run is Manager, which I wrapped into a JAR using a manifest file that indicates the code's entry point (Manager.main()), and then compiling the "Artifact" with IntelliJ. When...