Audio fingerprinting in javascript - javascript

I am trying to compare audio files at client side, I will not upload them on to the server, hence I want to get the fingerprint of the file even before uploading it to the server.
Do we have a library which can be hosted on our website
If No, Is it possible to do one , I am planning to
I have a song read from local system , I want to get its audio fingerprint so that I can compare with other audio file either on the server side or client side . I can send it to the server and get it done by methods already available in java or c# , but thats too much load to the bandwidth. So I wish to get the audio fingerprint at the client side itself using javascript .

I'm not exactly sure what you mean by "fingerprint" but if you just want to get metadata information you can check out this library: https://github.com/aadsm/JavaScript-ID3-Reader

I would recommend echoprint as it seems to be what your looking for.

Related

Can I create a directory in client PC?

I have multiple questions
Can we create a directory in client machine ?
Can we check the running browser's default download path?
My requirement is that the user will download a BLOB data from my DB that time I want to create a folder in client machine and use that folder to save the blob data.
Can this be done using javascript,jquery,ajax,php,angularjs ?
You can't create a folder in client PC using JS.(don't even bother looking with HTML and CSS)
The best way you could accomplish something as you describe is to give a .zip to your client, so while extracting it, it creates his own container (the folder). But you must be sure that the people who intend using your web application knows how a .zip works.
Using PHP you can't do anything in the client PC. PHP is a server side programming language. So, it is running only in the server. When you make any request to the server then only PHP performs. In the browser end or client side only HTML, CSS and JS works.

Is it Possible to Connect Arduino through the EthernetShield to Read a Text File?

I'm new to Arduino and am trying to connect it to the internet using an EthernetShield. Before I buy the EthernetShield, I want to make sure I will be able to execute the necessary steps with it. Is it possible to use Javascript to write to a text file stored on the server (containing binary data), connect to said server/file address with Arduino, and then use Text Finder (Arduino's) to read the file's binary data and perform the necessary commands? If so, what are the steps (if it diverges from this basic outline)?
It seems fairly straight forward, but through my own research, I am unsure if text files can be written and stored in that fashion, and if the Arduino can read this file type. I'm also aware that the conventional way entails PHP and mySQL, both of which I am fairly unfamiliar with.
Thanks!
Arduino can read text file. I suggest you use XMl or json instead of text file.
I am sharing a link of code for my final year btech project "Controlling devices using internet".
(ofcourse this can be done easily by using arduino+ethernet as server but the problem with this is you need port forward the router in order to access server from outside the local network Port forwarding is little risk as per security aspects.)
I used apache server (for testing I installed in my laptop, later I used hosting sites) and Arduino+Ethernet Shield as client. Arduino sends HTTP request to server for XML file after getting, it parses the XMl and control the devices. I used PHP for creating UI and updating XML file....
I hope this may be useful
https://drive.google.com/folderview?id=0BxWdBbr_6RYkSXVwcGxOa3pxTDA&usp=sharing

connecting access 2007 db using js in html5 page

I am developing an web page (html5) for my graduation project. In the web page the user would provide "body type" and based on the input various garments's images would be pulled from database and displayed on the page.
I am not a technical student so failing in my database connection efforts.
I have index.html page, a .mdb db (ms access 2007) and using js to connect to the .mdb. I also installed the "Microsoft Access Database Engine 2010 Redistributable". Then too failing.
Kindly mention what I am missing.
HTML pages are mostly accessed via a Server (IIS, Apache,..) and the data work is done by the server, on the server (AKA ServerSide programming)
So first consider if your project is intended to be accessed this way or only locally / standalone to your very computer.
If you only want a local page, there might be a solution here : http://accessdb.sourceforge.net/
But I bet it only works on IE through ActiveX
Read this : Read and write to an access database using Javascript
Also : why MSaccess ? If you really try to manipulate data locally using JS, try SQLite, there should be many library for JS like this one : https://github.com/lovasoa/sql.js
or why not... the HTML5 webstorage objects, that could be pushed far
http://www.w3schools.com/html/html5_webstorage.asp
I think you have got it all wrong! The short answer is you can not. And that is because your design is wrong. You can not* directly connect form html5 / javascript to a database.
Back to the basics.
You will need server side scripting to read the database content and expose them to the client (javascript) or to embed directly the result to html5 (while server is building the page).
You need to take a look to the following technologies
java / Jsp
c# / aspx
Those will help you to read the db file on the server side. Then as I said you will need to find a way to expose that information to your web page. As a side note, those are not the only server side scripting technologies, but are the one (IMHO) the can read an access file.
So look into that direction you will find a lot of resources to help you.
*The truth is that you can, but this can be considered an 'advance' issue.

Uploading files on web from client without revealing API key

I'm trying to upload a file from a web application to an external source (such as scribd) for example. to upload the file I need to send the API key as well. however if i send the API key from the client it will be revealed to users who search for it on the client side.
How could I upload from client using an API key that I don't want to reveal to users? It seems redundant to upload it to my server and then to the external source.
As redundant as it may be to pass through your server, it's the only way. You can't use the key client-side and hide it from the client, and if you don't use HTTPS it can easily be intercepted too. As a side note, I don't know about Scribd but usually stealing API keys is not very useful, so you may just live with the "risk".
Edit:
apparently Scribd offers a way to provide encrypted requests so that your API key can't be deduced by them (you have to generate these remotely and send them to the client of course). See http://www.scribd.com/developers/api?method_name=Signing

With JavaScript is it possible to Read/Write from/to a file on the server

I have a series of JSON Objects I want to save locally on my server. I am attempting to avoid any server-side script like PHP as required per demand of whats being built. I know its a security risk, but that in this case is not a particular worry. So that said is it possible to actually write to a file and or get its contents via javascript with or without the help of a lib such as jquery?
I should mention I am attempting to avoid ActiveX as I know this is an IE only feature and the software we are developing is planned to be Cross Browser supported
So that said is it possible to actually write to a file and or get its contents via javascript with or without the help of a lib such as jquery?
Nope. You will need something running on server side that can receive your JavaScript input and write it to the server.
Internet Explorer's proprietary file writing functionality is for writing local (client-side) files only.
You can read a file using ajax, but without a server side language you cannot write a file to the server.
https://developer.mozilla.org/en/ajax
No. Javascript runs on the client. You need server-side code to access the server's file system.
Client-side JavaScript can only send data to a server, there's no way for it to tell the server what to do with the data.
To save data to a file or db on a server, you'll require a server-side script of some sort (could be server-side JS with Node.js). If all you need is persistent data, you could store some JSON strings in localStorage or in cookies as needed. They wouldn't be shareable that way though.
Yes, you can use AJAX requests in JavaScript without using jQuery. However, jQuery will save you an ungodly amount of time and cross-browser testing.
But, as others have already said, you can't write server files without server code.

Categories

Resources