QA Official

machine learning: Colorization using Optimization

https://qaofficial.com/post/2019/04/21/70672-machine-learning-colorization-using-optimization.html 2019-04-21
Today, we introduce an article by Siggraph 2004: Colorization using Optimization, which uses the optimization method to color gray images. Here, we use the very classical Poisson equation and the linear optimization of sparse matrices.In a nutshell, it is to color a gray-scale image first, and then fill other areas without color with an optimized method.These processes are all carried out in YUV color space. Given a Y-channel image, we hope to restore the U and V channels of the image based on certain prior knowledge.

10g Perform Database Import and Export with sys User

https://qaofficial.com/post/2019/04/20/68433-10g-perform-database-import-and-export-with-sys-user.html 2019-04-20
Error Phenomena: [[email protected] data]$ exp "sys/[email protected] as sysdba" file=/data/sys.dmp log=/data/sys.log full=y; LRM-00108: invalid positional parameter value 'as' EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help EXP-00000: Export terminated unsuccessfully Reason: This may be a BUG in Oracle10g, just follow the following two methods: Solution: first method: [ Oracle @ wwldata ] $ exp \ " sys/Oracle assysdba \" file=/data/sys.dmp log=/data/sys.log full=y; Export: Release 10.2.0.1.0 - Production on Wed May 2 19:20:12 2012

AJAX Extension -POST Passes Parameters and Jumps Pages

https://qaofficial.com/post/2019/04/20/68528-ajax-extension-post-passes-parameters-and-jumps-pages.html 2019-04-20
直接上扩展的代码$.extend({ StandardPost:function(url,args){ var form = $("<form method='post'></form>"), input; form.attr({"action":url}); $.each(args,function(key,value){ input = $("<input type='hidden'>"); input.attr({"name":key}); input.val(value); form.append(input); }); form.submit(); } }); simple call $.StandardPost('url/path/req',{arg0:'arg0',arg1:'arg1'});

Emgu encountered a problem and could not load DLL

https://qaofficial.com/post/2019/04/20/68246-emgu-encountered-a-problem-and-could-not-load-dll.html 2019-04-20
opencv was used for human face posture detection some time ago, but C# has always been used in previous programming, so the efficiency of C++and opencv really gives me a headache.So in April, I resolutely turned to Emgu.   Emgu can be called simply by adding a DLL reference, without the tedious configuration in c++ projects.  But when I used HaarCascade class, I pointed out an error like this: probably it meant that I couldn't find cvextern.

JAVAEE What Are You Doing After Joining the Job

https://qaofficial.com/post/2019/04/20/68350-javaee-what-are-you-doing-after-joining-the-job.html 2019-04-20
A: Database table design is a difficult point.Many things are designed by graduate students and undergraduates of Peking University in Tsinghua, but many fields are problematic and lack of fields is a common occurrence.We have to complete this aspect according to the actual development situation. Complex SQL statements, business logic associated with 5 or 6 tables, multilevel data dictionary, international dictionary and numbered table are a large part of the workload.

One-class SVM

https://qaofficial.com/post/2019/04/20/68361-one-class-svm.html 2019-04-20
After reading an article these days, when the sample is extremely unbalanced, we can use a classification, that is to say, the result is because of it or not because of it. As for who it is, we don't care.On the question of dichotomy, we get either a or b.At present, I am doing abnormal event detection. For abnormal events, it is an event with a small sample size. For

Python Implements Batch Processing

https://qaofficial.com/post/2019/04/20/68512-python-implements-batch-processing.html 2019-04-20
Recently, a project needs to deal with a lot of text, which is scattered in many different folders. If you copy one by one, it is not only slow but also easy to make mistakes. Besides, it is such a meaningless thing. Python is much simpler to handle and will not cause problems. 1. First, use os.walk to traverse the folder. 2, meet the conditions of the file to copy, copy to the specified directory, at this time can use a variety of methods.

php Select Sort

https://qaofficial.com/post/2019/04/20/69785-php-select-sort.html 2019-04-20
select sort selectionsortIts working principle is to select the smallest (or largest) element from the data elements to be sorted each time and store it at the beginning of the sequence until all the data elements to be sorted are sorted out.Selection sorting is an unstable sorting method (for example, the sequence [5,5,3] exchanges the first [5] with [3] the first time, causing the first 5 to move behind the second 5).

python for Face Recognition.For your review only

https://qaofficial.com/post/2019/04/20/68262-python-for-face-recognition.for-your-review-only.html 2019-04-20
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import numpy as np import cv2 as cv import sklearn.preprocessing as sp fd = cv.CascadeClassifier('face.xml') def search_faces(directory): directory = os.path.normpath(directory) if not os.path.isdir(directory): raise IOError("The directory '" + directory + "' doesn't exist!") faces = {} for curdir, subdirs, files in os.walk(directory): for jpeg in (file for file in files if file.endswith('.jpg')): path = os.path.join(curdir, jpeg)

python from sys import argv

https://qaofficial.com/post/2019/04/20/68406-python-from-sys-import-argv.html 2019-04-20
If you want to pass parameters to python scripts, you need the support of command line parameters, so you can save every time you change scripts. usage is: python xx.py xxx  from sys import argv print(argv[0]) print(argv[1])python ./argvTest.py 1 2 output:./argvetest.py 1 argv [ 1 ] represents the first parameter, 0 is the script file name path if __name__ == "__main__": if len(sys.argv) != 2: print ("Usage: python recognizer.