2018-10-22         Susan

How can I group text questions that are similar to each other?

I have a dataset of 200k questions, and I would like to group them together by similarity/duplicates.How can I use NLP/machine learning to group these questions with similar intents together?Given a question and a list of questions, how can I find the question or questions that are similar or duplicates?Are there any services that can do this? Generally, you'd want to convert the questions into a abstract numerical format (such as a single high-dimensional vector, or 'bags of words/vectors'), from which it is then possible to calculate numerical pairwise similarities bet...

 machine-learning                     1 answers                     42 view
 2018-10-22         Susan

Converting Windows path to Unix path in a makefile

This question is related to Convert Cygwin path to Windows path in a makefile but it is not the same.I need to convert a Windows path like:C:\src\bininto a Unix path like:/c/src/binInside a makefile, I can use the following code to convert such paths:slashedpath = $(subst \\,\/,$(windowspath))unixpath = $(shell cygpath -u $(slashedpath))Q: How to perform the same conversion in a makefile that is being processed by GNU Make, when the cygpath function is not available ?P.S.What if $(windowspath) contains multiple paths? How to convert them all ? The makefile:windowspath=...

 makefile                     1 answers                     70 view
 2018-10-22         Susan

VSTS, create build definition gets AllowScriptsAuthAccess error

long time listener, first time caller!I've spent two days searching for an answer to this so hopefully someone here may be able to help.I've set up a personal/free VSTS instance and created a project.One of the first tasks I want to do is setup the build pipeline, so create a new pipeline, define the agent pool as VS2017, connect to my Github repo etc, all of which is fine.Next I try to add an Agent Job, again choosing VS2017 as the agent. With no other options chosen, if I try to save the build definition I get the following error message (and cannot save it);The AllowScr...

 oauth                     4 answers                     63 view
 2018-10-22         Susan

Python range() and zip() object type

I understand how functions like range() and zip() can be used in a for loop. However I expected range() to output a list - much like seq in the unix shell. If I run the following code:a=range(10)print(a)The output is range(10), suggesting it's not a list but a different type of object. zip() has a similar behaviour when printed, outputting something like<zip object at "hexadecimal number">So my question is what are they, what advantages are there to making them this, and how can I get their output to lists without looping over them? You must be using Python 3. In ...

 python                     3 answers                     75 view
 2018-10-22         Susan

Distinguishing the day change and splitting the next day and time in next day in java

I have to find the time duration one spend's in a day. I need to give the day asked and the time of entry and exit one spends? I have a table like this.#StartTime# # EndTime# # Day # 2018-07-16 23:00:00 2018-07-17 01:30:00 2018-07-162018-07-17 03:00:00 2018-07-17 04:30:00 2018-07-172018-07-17 13:00:00 2018-07-17 14:30:00 2018-07-172018-07-17 20:00:00 2018-07-17 21:30:00 2018-07-172018-07-17 22:00:00 2018-07-18 01:30:00 2018-07-18I need to calculate the exact time he spends in a day asked. For Example, o...

 java                     1 answers                     65 view
 2018-10-22         Susan

CLI CORS Proxy not changing origin, still get 403 on API reqs?

Yes, I've found a ton of stuff similar but still not resolved for my instance. I would like to avoid killing the browser side security and instead let the proxy do its job but I fear I'm missing some inane detail in the setup and I'm no CORS expert by any means.So, what I get...a 403;Failed to load http://localhost:10000/some/rest/endpoint: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access.Wherein localhost:10000 is my a...

 angular                     2 answers                     88 view
 2018-10-22         Susan

How can I process a binary file of fixed length records with no line breaks in between?

I have a text file that's composed of fixed length records but all in one line with no line breaks in between. What's the best way to process it in Perl? Thanks! First, let's open the file, and make sure it's in bin mode:open my $fh, '<', 'file.name' or die "Cannot open file.name: $!";binmode $fh;Now, set input record separator to reference to length of your records (let's assume 120 bytes per record):local $/ = \120;Now, let's read the records:while (my $record = <$fh>) {And now if you want to get data out of it, you have to write some unpack thing: my @eleme...

 perl                     3 answers                     22 view
 2018-10-22         Susan

How can I do a accent insensitive search in Postgres 8.3.x with a DB in utf-8?

Tried select to_ascii('capo','LATIN1'), to_ascii('çapo','LATIN1') and the results are different.... Look here.CREATE FUNCTION to_ascii(bytea, name)RETURNS text STRICT AS 'to_ascii_encname' LANGUAGE internal;and then just use it like this:SELECT to_ascii(convert_to('Übermeier', 'latin1'), 'latin1'); [XXX]

 postgresql                     1 answers                     44 view
 2018-10-22         Susan

SQL not Equal to & Equal to Operator Use

I need to select those macs which are in state 5 and not in state 4 from below table.I used this query,select mac from tableabc where state=5 and state !=4;but its same result aswhere state=5 use not inselect mac from tableabcwhere state=5and mac not in ( select mac from tableabc where state=4) [XXX]One method uses conditional aggregation:select macfrom tableabcwhere state in (4, 5)having min(state) = 5;If the values of state are not "ordered", then you can add and min(state) = max(state). [XXX]The cleanest way is to use not exists here:SELECT Mac FROM TableABC AS ...

 mysql                     5 answers                     42 view
 2018-10-22         Susan

SQL Query List Those that are higher than average

I have 2 tables in the following format:employee (employeeID, EmployeeName, DepartmentID)departments (DepartmentID, DeptName)How many employees there are who work in each of the departments that have more employees than the average number of employees in a department. im looking to the results in the following format:Dept Name | Num of Empengineering | 10science | 15 since an employee can be in only one department, the average number of employees is just the total # of employees over the total number of departments. So how about:SELECT dept.name, COUNT(emp.id) A...

 sql                     2 answers                     6 view
 2018-10-22         Susan

How can I import and export data from SQL Server 2005 to XML format?

I am very confused about how SQL Server 2005 supports importing and exporting of XML files. I was thinking that BCP was the way to go. However after reading all of the documentation it seems like there is no way to just take a regular table and export it in XML format. The reason that I am asking is that I am working with a client that will be sending me data updates in XML format. We both have the same database with identical structures. He has sent me example XML files. I was assuming that there would be some very simple way to import the data files but I can't figu...

 sql-server                     4 answers                     19 view
 2018-10-22         Susan

The system is running in low-graphics mode

Im trying to repurpose a Cryptocoin mining rig for AI research.The operating system is Ubuntu 16.04 LTS.In order to utilize the graphics cards I need to install Nvidia drivers and Cuda. However, whenever I restart the box I always get the following error: The system is running in low-graphics mode My question is, how can I tell Ubuntu to not use these drivers? I need them installed, but they are only used by nvidia-docker. Here is a link that should help you on ask Ubuntu. https://askubuntu.com/questions/335285/how-to-change-proprietary-video-driver-using-the-command-l...

 ubuntu                     1 answers                     99 view
 2018-10-22         Susan

Azure - uploading files to blob storage via shared hosting

Im struggling to find an answer to this. I have a website that is deployed in a shared hosting environment. I want to allow people to upload files to my azure blob storage account.I have this working locally, using the storage emulator, however when I publish the site I get a Security Exception.Is this actually possible under a shared hosting envrionment ?Cheers A bit more detail would help, in understanding how these uploads are taking place. That said, I'll make the assumption that people are uploading directly to Blob Storage, and not through your Website (or Web Serv...

 upload                     1 answers                     23 view
 2018-10-22         Susan

Google Drive android Completion listener

I am working with the Google Drive api for android. I am able to upload file using CreateFileActivityOptions Builder. Is there a way to listen to the completion of file upload when using this class.MetadataChangeSet changeSet = new MetadataChangeSet.Builder() .setTitle(file.getName()) .setMimeType("audio/mp3") .setStarred(false) .build();CreateFileActivityOptions createOptions = new CreateFileActivityOptions.Builder() .setInitialDriveContents(contents) .setInitialMetadata(changeSet) .build();return driveClient...

 google-drive-android-api                     1 answers                     7 view
 2018-10-22         Susan

How to retrieve and display images dynamically in a JSP?

I'm working on an E-commerce project, using Java Servlets and JSPs. However, I got stuck when it came to retrieving product's images from the database to the web page. my data access layer returns product object that contains an array of buffered images. the problem is that I cannot display these images in img tag. NOTE: I've tested the data access layer and it works properly. Here is the code of product.jsp, where product information should by displayed: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page impor...

 java                     1 answers                     76 view
 2018-10-22         Susan

How can i add multiple HTML files to WebKit View?

IntroductionI'm designing a historical application.I want to add multiple HTML files into WebKit View. I don't have any idea how to do this.ExampleWhen I click to "Button 1" webkit loads "file1.html". I didn't write anything about code I am quite confused. Any help would be appreciated. Well, there is a lot of ways to do it but I'm gonna give an example for easiest one. Just create a method for loading .html file and invoke or call it under action button.For example : import UIKitimport WebKitclass ExampleController: UIViewController {@IBOutlet weak var myButton: UIButto...

 ios                     1 answers                     25 view

Page 1 of 147  |  Show More Pages:  Top Prev Next Last