I work with a fair number of data sets that have many records -- often in the millions of records. It seems to me that not all of these records are equally useful for building an effective model of the data, e.g., because there are duplicates in the data set. These data sets could be much easier and faster to analyze if they were reduced to a better set of records. What preprocessing methods are there for reducing data set size (e.g., removing records) without losing information for machine learning problems? I know one simple transformation is to summarize duplicate records and weight them ac
First up: I'm not looking for a way to fix the dreaded tablespace exists InnoDB error found here, rather I'm looking for a way to prevent it! Over the past few weeks we've had a table dissapear from our database at random, with no way to re-create it (because it gives a tablespace exists error). We've narrowed it down to the following table: CREATE TABLE product_localised ( id INT (10) UNSIGNED NOT NULL AUTO_INCREMENT, product_id INT (10) UNSIGNED NOT NULL, language_id INT (10) UNSIGNED NOT NULL, slug VARCHAR (255) COLLATE utf8_unicode_ci NOT NULL, title TEXT COLLATE utf8_unicode_ci, descripti
I've seen a lot of threads and discussions about that but I'm not getting to fix the issue. This is my post from some days ago. One of the purposes of typings is to avoid the use of <reference> tags, right? But if I don't use it, Visual Studio complains: Visual Studio stops complaining once I reference browser.d.ts. Here is my tsconfig: { "compilerOptions": { "noImplicitAny": false, "noEmitOnError": true, "removeComments": false, "sourceMap": true, "target": "es5" }, "files": [ ], "exclude": [ "node_modules", "wwwroot" ] } I also tried removing the "files" property from the tsconfig as suggest
on OSX, when I run top sometimes I see some different colors, namely black text.... What does it mean? What bash setting do I need to change to make these a different color? black is too hard to read with my setup.
In React Native I use fetch to perform network requests, however fetch is not an explicitly required module, so it is seemingly impossible to mock in Jest. Even trying to call a method which uses fetch in a test will result in: ReferenceError: fetch is not defined Is there a way to test such API requests in react native with Jest?
I am using Spotfire to build a line graph. The data set consists of the following fields: Requirement Project Name Period Score Project Spend Req 1 Project 1 3/1/2016 2 750000 Req 2 Project 1 3/1/2016 3 750000 Req 3 Project 1 3/1/2016 2 750000 Req 4 Project 1 3/1/2016 2 750000 Req 1 Project 1 6/1/2016 2 750000 Req 2 Project 1 6/1/2016 3 750000 Req 3 Project 3 6/1/2016 2 500000 Req 4 Project 3 6/1/2016 2 500000 In the line chart, I have Period on X axis and I need SUM(Project Spend) by Project on Y axis. For example: for 3/1/2016 on X axis, the value on Y should be 750000 as only one project is
I have two activities. MainActivity.java and HomeActivity.java. I am trying to create a ListView in HomeActivity.java just with "One", "Two", "Three", and "Four" as the List items but the ListView is not showing up at all. HomeActivity.java: public class HomeActivity extends AppCompatActivity { String personName; String email; String rfid; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); populateListView(); Bundle extras
I'm trying to return an array but got 'null pointer exception'. I suppose it's because my method returns an array with elements that are null. How to properly return an empty array? In main class main method: public class Test{ public static void main(String[] args){ int s = 0; Project arr[] = new Project[3]; for(int i = 0; i!=3; i++){ Project var = Project.getProject(arr, "Programming"); if (var == null){ var = new Project(); var.setName("Programming"); arr[s]= var; s=s+1; } } } } Method in separate class: static Project getProject(Project[] a, String n) { for (int i = 0; i != a.length; i++)
I've had a search around, and found some solutions which should work, but for some reason just aren't working for me. Here is the sample CSV i'm working with: "Org. Code","Hubspot Ref","Company Name","Contact First Name","Contact Last Name","Job Title","Address","City","Phone","Email","Last Update" "2h34h234h","12345678","A Random Company","John","Smith","Developer","300 PARK AVE SOUTH, 4TH FL","NEW YORK","+123456789","[email protected]","10/03/2016 12:00" I'm trying to parse it with this snippet of code: with open(os.path.basename(theCSV),"r") as f: reader = csv.reader(f) data = list(read
I am trying to train a haar cascade using opencv_traincascade executable in opencv 3.1.0. For the moment I want to do this using only one positive even though the result is inconsistent, in order to be sure that I am passing the right parameters to opencv_createsamples and opencv_traincascade. bg.txt content: negatives/img_04436_c1.pgm negatives/img_04437_c1.pgm Negatives resolution: width: 1176 height: 640 Positives resolution: width: 40 height: 70 I am using the following command parameters: For opencv_createsamples: ./opencv_createsamples -img img_04569_c1.pgm -vec samples -bg bg.txt -maxxa
I am working in python + Appium to automate an Android App. I have created 7 scripts and imported all the scripts in a single script named Main_module_testing.py. Now I want to generate an HTML Report for my test. In which it automatically creates Pass/Fail result. I have tried HTMLTestRunner.py, but its throwing so many error related to IOString, Unicode, decode etc. Can anyone please tell how to fix it or generate an automatic HTML test report?
I'm using ora2pg migration tool for migrate table schema and data from ORACLE database to Postgres Database. Using the following query, I can export the entire schema and data from the ORACLE database and Import the data into Postgres Database. To export database schema: ./export_schema.sh To export data: ora2pg -t COPY -o data.sql -b ./data -c ./config/ora2pg.conf Import the exported data using this: ./import_all.sh -d MyDB -o postgres(Owner) -U User But I've no idea, how to migrate a particular table schema and data using this. Anybody knows about it, answer.It helps me a lot. Thanks in advi
I want to run my ionic project in android device.So I ran following commands Ionic add ionic-platform-web-client ionic plugin add phonegap-plugin push ionic io init ionic platform add android All the above commands were successfully executed.When I tried to run following command: ionic run android It gives me error: 'ANDROID_HOME' environment variable is set to non-existent path. Try update it manually to point to valid SDK directory. You may not have the required environment or OS to run this project. How do i fix it now?
As we all know, some CSS properties can have multiple values simultaneously. A good example is CSS3's box-shadow. However, sometimes it may be desirable for a class or ID to add to these values. For example, if I have an element with an inset box-shadow value, I may want to add an outer glow to the box with an .active class. Unfortunately, this overwrites the previous value. Is it possible to inherit a value and simultaneously add to it? Below is a non-working example of what I am hoping can be accomplished. Notice how the end-result does not glow. div { background-color: #09F; border-radius:
I am searching for a faster way to blur an image than to use the GaussianBlur. The solution I am looking for can be a command line solution, but I prefer code in perl notation. Actually, we use the Perl image magick API to blur images: # $image is our Perl object holding a imagemagick perl image # level is a natural number between 1 and 10 $image->GaussianBlur('x' . $level); This works fine, but with the level height the amount of time it consumes seems to grow exponentially. Question: How can I improve the time used for the bluring operation? Is there another faster approach to blur images?
I am searching for a faster way to blur an image than to use the GaussianBlur. The solution I am looking for can be a command line solution, but I prefer code in perl notation. Actually, we use the Perl image magick API to blur images: # $image is our Perl object holding a imagemagick perl image # level is a natural number between 1 and 10 $image->GaussianBlur('x' . $level); This works fine, but with the level height the amount of time it consumes seems to grow exponentially. Question: How can I improve the time used for the bluring operation? Is there another faster approach to blur images?
I have a C# application that exports an Excel file. When I run it from Visual Studio, it is working fine. However, when I schedule it to run from SQL Server Agent, it failed with the following error: Unhandled Exception: System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space. To make more memory available, close workbooks or programs you no longer need. To free disk space, delete files you no longer need from the disk you are saving to. I have searched many links, and the
Github recently announced the addition of pull request templates. This is an awesome feature that has been heavily requested in the community for some time. These templates are added by including a special file named PULL_REQUEST_TEMPLATE.md to the root of the project or within the .github directory. I have multiple projects for which I would like to use the same template. What is the best way to keep these templates in sync across projects? (Git submodules are the only thing I can think of, but that seems pretty heavy-handed and complexity-prone for such a simple use case).
I am new to HDL and just wanted to confirm whether these lines of code are written in VHDL or Verilog: DE0_SOPC DE0_SOPC_inst( // 1) global signals: .clk(CLOCK_50), .pll_cpu(), .pll_sdram(DRAM_CLK), .reset_n(system_reset_n)); This code is in a file with a .v extension.
How can i push to specific branch in remote with GIT gui. I can't seem to find an option for it. Let say i want to push to a specific branch name 'branchOne'. How could it be done? I am pushing to gitlab.
I have been trying to find a solution for some weeks now, and I have read all the threads related to this topic, so I hope someone can help me out with this. I want to use a wave file as input, apply a Fourier transform to it, and take these values to compare them to another file and get the difference. The challenge I've been working on for so long is to get that Fourier transform to work. Instead of giving me reasonable results, I only get NaN values. I have the following code: public FFTPerformer(float[] soundvalues) { buffer = new System.Numerics.Complex[4096]; try { for (int i = 0; i < 40
I'm trying to arrange a series of elements in a different layout for "mobile" screens vs large screens. Basically, on mobile screens I want a title to span the entire width at the top, centered. Underneath is an image and a group of icons to the right in the same row. On larger screens I want the title to be adjacent to the image in the same column, but above the icons (see image for desired results). By playing with the flexbox rules and the order property, I can achieve 2/3 of this effect. The way I have it written, I can get the title next to the image, but the icon group is always undernea
I can easily create a VPN connection through the PowerShell command Add-VpnConnection, however it doesn't seem able to specify any credentials (there is no option to specify username/password). As a workaround I tried to use -RememberCredential option in Add-VpnConnection and to pass the credentials by forcing a connection through rasdial command, yet even though the connection succeeds Windows doesn't save the credentials :( Add-VpnConnection -Name xxxxx ... rasdial xxxxx user password rasdial xxxxx /disconnect Is it possible some way ?
I'm using the Medoo database Framework. The following query returns a PDO object. $datas=$database->query(' SELECT lethal_servers.LETHAL_ServerName AS "lethal_servers LETHAL_ServerName", lethal_servers.LETHAL_ServerID AS "lethal_servers LETHAL_ServerID", lethal_servers.LETHAL_ServerPort AS "lethal_servers LETHAL_ServerPort", lethal_user.LETHAL_UserName AS "lethal_user LETHAL_UserName" FROM ( ( lethal_servers AS lethal_servers INNER JOIN lethal_server_user AS lethal_server_user ON (lethal_server_user.LETHAL_ServerID = lethal_servers.LETHAL_ServerID ) ) INNER JOIN lethal_user AS lethal_user ON (
I'm using the Medoo database Framework. The following query returns a PDO object. $datas=$database->query(' SELECT lethal_servers.LETHAL_ServerName AS "lethal_servers LETHAL_ServerName", lethal_servers.LETHAL_ServerID AS "lethal_servers LETHAL_ServerID", lethal_servers.LETHAL_ServerPort AS "lethal_servers LETHAL_ServerPort", lethal_user.LETHAL_UserName AS "lethal_user LETHAL_UserName" FROM ( ( lethal_servers AS lethal_servers INNER JOIN lethal_server_user AS lethal_server_user ON (lethal_server_user.LETHAL_ServerID = lethal_servers.LETHAL_ServerID ) ) INNER JOIN lethal_user AS lethal_user ON (
People, the company where I work has some MySQL databases on AWS (Amazon RDS). We are making a POC with BigQuery and what I am researching now is how to replicate the bases to BigQuery (the existing registers and the new ones in the future). My doubts are: How to replicate the MySQL tables and rows to BigQuery. Is there any tool to do that (I am reading about Amazon Database Migration Service)? Should I replicate to Google Cloud SQL and than export to BigQuery? How to replicate the future registers? Is possible to create a job inside MySQL to send the new registers after a predefined number? F
I came across this looking at the source for some physics animations in JavaScript found here on github where he's written this if (this._position < 0) this._position /= 3; A quick Google yielded nothing, anyone know?
I have seen very many questions asking how to detect if a device is mobile or not. Generally, they fall into 3 categories: Check the screen size/viewport Check the User Agent Use a library, such as Modernizr to work around browser capabilities. After implementing what I could, I still run across a situation which I have never seen asked or addressed; On many mobile browsers, there is a "Request desktop site" (Chrome) "Desktop Mode" (Dolphin) or "Desktop View" (HTC Sense). I have chosen strategy #1 above, which works unless the page is viewed in desktop mode. Implementing #2 has drawbacks (spoo
I want to make a multiple where query with AND and OR. Suppose my array is: array (size=8) 0 => array (size=2) 'timeline.type' => string 'videos' (length=6) 'timeline.sourceId' => string '7' (length=1) 1 => array (size=2) 'timeline.type' => string 'loadshedding' (length=12) 'timeline.sourceId' => string '5' (length=1) 2 => array (size=2) 'timeline.type' => string 'news' (length=4) 'timeline.sourceId' => string '3' (length=1) 3 => array (size=2) 'timeline.type' => string 'news' (length=4) 'timeline.sourceId' => string '5' (length=1) The above array could be dynamic. I want to make active record