Could anyone please help me out in retrieving the number of audio devices using "waveInGetNumDevs" ? I cannot make out how to do it ? Thanx :)

Member Avatar
Member Avatar
+0 forum 5

#include <stdio.h> #include <conio.h> #include <stdlib.h> #include <process.h> #include <string.h> #include <math.h> int count = 0; typedef struct bitmap24 { unsigned char header[54]; unsigned char* pixels; }BMP; void readBMP (char* filename) { int i; FILE* f = fopen(filename, "rb"); FILE* f1 = fopen("save.bmp", "wb"); FILE* pixelVals = fopen("vals.dat", "w"); unsigned char bmppad[3] = {0, 0, 0}; if (!f) { printf("Could not read file!\n"); exit(0); } unsigned char info[54]; fread(info, sizeof(unsigned char), 54, f); int width = *(int*)&info[18]; int height = *(int*)&info[22]; unsigned char *img = NULL; if (img) free(img); img = (unsigned char*)malloc(3*width*height); memset(img, 0, sizeof(img)); fwrite(info, sizeof(unsigned char), 54, …

Member Avatar
Member Avatar
+0 forum 1

Are the crawled URLs stored in the database then they are traversed in BFS/DFS manner .... or is it something else ? Please Help!

Member Avatar
Member Avatar
+0 forum 1

When C++ source is compiled the errors are shown in this format `cPlusPlusSource.cpp:row_number:column_number: error: Error description text` What should the regular expression for this be ? Please help!

Member Avatar
Member Avatar
+0 forum 9

<!DOCTYPE html> <html> <head> <script type="text/javascript"> function ShowFile(sFilePath){ var oFileSystem = new ActiveXObject("Scripting.FileSystemObject"); frmEditHTML.tarHTMLText.value = oFileSystem.OpenTextFile(sFilePath.value).ReadAll(); } function SaveAfterEditing(sFilePath){ var oFileSystem = new ActiveXObject("Scripting.FileSystemObject"); var oFile = oFileSystem.CreateTextFile(frmEditHTML.filPath.value,1); oFile.WriteLine(sFilePath.value); oFile.Close(); } </script> </head> <body> <form name="frmEditHTML"> Select the HTML File you want to Edit <input type=file name="filPath" onchange="ShowFile(this)"> <textarea name="tarHTMLText" cols=60 rows=20></textarea> <input type="button" value="Save" name="cmdSave" onclick="SaveAfterEditing(this.form['tarHTMLText'])"> </form> </body> </html> This code helps to browse a file on a system an than loads its contents to the textarea and lets us to save the changes to that same file. This code works only in Internet Explorer or in IE Tab …

Member Avatar
Member Avatar
+0 forum 3

I sent a C++ code snippet from textarea to another page using php. Evenything got printed but the as the header file was <iostream>, it did not get printed. Any piece of text that is enclosed by <> is not printed. What should I do ? Please help!

Member Avatar
Member Avatar
+0 forum 1

I want a button which when clicked opens a windows explorer window then the content of the file that I choose should get copied to the text area on that page... I have extensively searched but could not find anything ...

Member Avatar
Member Avatar
+0 forum 2

How can I extract the main classname of a java file ? I am doing this in php! I will read the whole java program as a string! Please help! <any_type/public/private/static> class **MainClass** { //Could be anything over here! public static void main(String[] args) { System.out.println("Hello World!"); } }

Member Avatar
Member Avatar
+0 forum 2

<?php include 'simple_html_dom.php'; function get_url_contents($url){ $crl = curl_init(); $timeout = 5; curl_setopt ($crl, CURLOPT_URL,$url); curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout); $ret = curl_exec($crl); curl_close($crl); return $ret; } $url = 'http://rural.nic.in'; $outhtml = get_url_contents($url); $html= str_get_html($outhtml); foreach($html->find('li')as $item) { echo $item."<br>"; } //print_r($outhtml); ?> I wish to print only the URLs listed under the tabs separately, which is in the middle of the page. I tried to use "li" in `foreach($html->find('li')as $item)` but I did not get the desired result! Please help! Thanks!

Member Avatar
Member Avatar
+0 forum 1

<?php include_once('simple_html_dom.php'); function get_url_contents($url){ $crl = curl_init(); $timeout = 5; curl_setopt ($crl, CURLOPT_URL,$url); curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout); $ret = curl_exec($crl); curl_close($crl); return $ret; } $url = 'http://books.rediff.com/categories'; $outhtml = get_url_contents($url); $html= str_get_html($outhtml); $urlarray = array(); foreach($html->find('a') as $link) { $findme = 'http://'; if (strpos($link->href, 'http://') === 0) { array_push($urlarray, $link->href); } } print_r($urlarray); ?> This is simple web crawler, where I have extracted all the urls on the page. I cannot understand how will I apply BFS/DFS in this crawler ??? Please help!

Member Avatar
Member Avatar
+0 forum 1

There is a list urls like "http://books.rediff.com/categories/travel/general/2288" I wish to find out whether they start from "http:/" or are relative urls starting from "/", if true store them in an array ! ... if (strpos($html->href, 'http://') <= 0) { array_push($urlarray, $link->href); } ... This does not work .... How should I do it ?? Please help!

Member Avatar
Member Avatar
+0 forum 5

<?php include_once('simple_html_dom.php'); function get_url_contents($url){ $crl = curl_init(); $timeout = 5; curl_setopt ($crl, CURLOPT_URL,$url); curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout); $ret = curl_exec($crl); curl_close($crl); return $ret; } $url = 'http://books.rediff.com/categories/fiction-genres/2180204'; $outhtml = get_url_contents($url); $html= str_get_html($outhtml); foreach($html->find('a') as $link) { echo "<a href =".$link->href.">".$link->href."</a><br>"; } ?> This gives all the links present on the given URL. I wish to remove all the duplicate entries as well as those Javascript links that I get after crawling like "javascript:doSearch('MT'); javascript:window,history.go(-1);" ... Please help! Thanks ...

Member Avatar
Member Avatar
+0 forum 11

I need to run Mingw4.6 on my Dev C++ which already has mingw32 3.6 installed! Does this version of mingw allow us to use 'C++11' ??? Please help!

Member Avatar
Member Avatar
+0 forum 13

if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) { $video_id = $match[1];.... How do I get all the youtube video links ona page as well as their IDs? Please help!

Member Avatar
Member Avatar
+0 forum 1

Suppose I want retrieve values froma table that are greater than 10, should I first store all the values in a list and then check condition of ">10" using any language or should I just just retrieve all values directly from databse using query : `Select id from table where id > 10;` Which is the better way ? Please help! Thanks!

Member Avatar
Member Avatar
+0 forum 3

A way to measure internet speed through javascript is given here ... [Click Here](http://jsfiddle.net/yahavbr/tEFpC/2/) for it, it uses a big image to download and then divides the time taken by the size of the image ....! Is it possible to measure the speed using a video streaming website like Youtube ? i.e. if I enter the video link, after a specified time of bufferring, I get to know the approx internet speed ? Please help!

Member Avatar
Member Avatar
+0 forum 1

Glassfish server 3.1 does not work in Netbeans that is why I thought of using WebLogic. Could anyone give link to good tutorial on how to use weblogic in netbeans ?? Can Enterprise Java Beans modules run on weblogic ?? Please help!

Member Avatar
+0 forum 0

I want to display the first or any frame of a youtube video directly as I click on its url. Can I also get the dimensions of that particular frame ? How should I do it ? Is 'ffmpeg' an option, but I have seen that it is used with videos that are already downloaded in the system rather than on a website ? Please help!

Member Avatar
Member Avatar
+0 forum 11

I checked a few websites related to this topic but I could not find anything to start with ? http://ditio.net/2008/08/06/detect-connection-speed-with-javascript/ http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/ Using any of these is not giving the right result !! What should I do ? Please help!

Member Avatar
Member Avatar
+1 forum 2

I need to extract pitch, dynamics (loudness or softness), tone color, and duration of an audio file. This is regarding some research work I am doing. How should I start ? Provide me with some links if possible! Is C++ a good option for this? Or should I try some other language .... Please Help!

Member Avatar
Member Avatar
+0 forum 1

[CODE] import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.lang.NullPointerException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; /** * * @author Animesh Pandey */ public class anilet extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); Connection conn = null; String username = null; String userpass = null; String strQuery = null; Statement st = null; ResultSet rs = null; HttpSession session = request.getSession(true); try { out.println("I am here!1"); //gets printed [B][U][I]Class.forName("com.mysql.jdbc.Driver");[/I][/U][/B] conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/usermaster","root",""); out.println("I am here!2"); // Does not ger printed …

Member Avatar
Member Avatar
+1 forum 7

public static void main(String[] args) { Set<Point> points = new HashSet<Point>(); points.add(); --- how to add point of "Point" type cureAlgor(0.01, 3,points); } Point is a pre-defined class. I want to know what to wrtie in points.add(). Please help!

Member Avatar
Member Avatar
+0 forum 1

<?php error_reporting(E_ALL ^ E_NOTICE); set_time_limit(0); $hd = mysql_connect("localhost", "root", "") or die ("Unable to connect"); mysql_select_db ("movie", $hd) or die ("Unable to select database"); $res0 = mysql_query("SELECT * FROM users", $hd) or die ("Unable to run query"); $count_users = mysql_num_rows($res0); $res1 = mysql_query("SELECT * FROM movies", $hd) or die ("Unable to run query"); $count_movies = mysql_num_rows($res1); $movieid_array = array(); for ($i = 1; $i <= $count_users; $i++) { $res = mysql_query("SELECT movieid FROM ratings WHERE userid = $i", $hd) or die ("Unable to run query"); $mid = array(); while ($row = mysql_fetch_assoc($res)) { $data = $row["movieid"]; array_push($mid, $data); //echo "$data …

Member Avatar
Member Avatar
+0 forum 1

I have installed oracle10g but I cannot find any java sample programs for data mining! I could not find any download link on the internet! Please help!

Member Avatar
+0 forum 0

<?php include('./phplot.php'); $graph =& new PHPlot(); $example_data = array( array('a',3), array('b',5), array('c',7), array('d',8), array('e',2), array('f',6), array('g',7) ); $graph->SetDataValues($example_data); $graph->DrawGraph(); ?> When ever I run this program I get an error ! `The image "http://localhost/test.php" cannot be displayed because it contains errors.` I also have GD library enabled! What is the error ? Please help!

Member Avatar
Member Avatar
+0 forum 3

I have a database of 1000K values. How can I use PHP to parse that database in less time ? I am using a foreach loop fr comparison but it takes 15 minutes to parse all data! Should change be done in PHP or SQL ? Please help !

Member Avatar
Member Avatar
+0 forum 1

I am trying to implement ROCK algorithm in JAVA. It is used to cluster categorical data. I have like N statements that are to be clustered. This is a good example of this algorithm: faculty.ksu.edu.sa/ykhlef/mscThesis/clustering-P1.ppt I have coded till number of links for each cluster. But I cannot understand how to store these clusters ? Each cluster will be associated with a Goodness measure. How can I store the cluster as well as the measure together ? Please help!

Member Avatar
Member Avatar
+0 forum 3

import java.sql.*; import java.util.ArrayList; import java.util.Iterator; /** * * @author Animesh Pandey */ public class dbConnect{ jaccardIndex ji; public float calcJaccard(String s1, String s2) throws Exception { ji = new jaccardIndex(); float sim = ji.Jaccard(s1, s2); System.out.println("calcJaccard"); return sim; } @SuppressWarnings("static-access") public int getLength(String s) throws Exception { ji = new jaccardIndex(); return ji.countElements(ji.getUniqueTokens(s, " ")); } //squareMatrix sm; float [][] square (float [][] adjMat) { int size = adjMat.length; //System.out.println(size); float [][] squaredMat = new float [size][size]; for(int i = 0; i < size; i++) { for(int j = 0; j < size; j++) { for(int k = 0; …

Member Avatar
Member Avatar
+0 forum 1

I want to extract unique elements from a string. import java.util.HashSet; import java.util.Iterator; import java.util.Set; import java.util.StringTokenizer; /** * * @author Animesh Pandey */ public class Main { /** * @param args the command line arguments */ public static Set getUniqueTokens(String str, String separator) { StringTokenizer tokenizer = new StringTokenizer(str, separator); Set tokens = new HashSet(); while (tokenizer.hasMoreTokens()) { tokens.add(tokenizer.nextToken()); } return tokens; } public static void main(String[] args) { String s1 = "The Map interface maps unique keys to value means it associate value to unique keys which you use to retrieve value at a later date interface maps …

Member Avatar
Member Avatar
+0 forum 6

What should be the regular expression for thid code ??? `<span style="text-align:justify;">Stepping out of the Shadows:M6 Once touched... Marisa Somerville has changed. Now a confi dent, groomed, successful businesswoman, in some ways she's nothing like the scared wife of an abusive husband that Rafe Peveril survived a plane crash with six years ago.<A HREF="">` Between <span> and <A HREF> there is a string ! Please help!

Member Avatar
Member Avatar
+0 forum 30

The End.