Search Results

Search found 201 results on 9 pages for 'ankur kaushik'.

Page 4/9 | < Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >

  • How to specify java script files required by an angular app

    - by Vishal Kaushik
    I'm looking for a way to specify required js files by an angular app. So that, we don't need to include an array of tag for all the files which may be required by some ng-app. The main idea behind this requirement is - we might not need to load all the resources on the browser at once. Which ever ng-app gets loaded onto the screen, will fetch its dependencies on its own from the server. Is there any existing way within angularJS to achieve this goal..?

    Read the article

  • any faster alternative??

    - by kaushik
    have file data of format 3.343445 1 3.54564 1 4.345535 1 2.453454 1 and so on upto 1000 lines and i have number given such as a=2.44443 for the given file i need to find the row number of the numbers in file which is most close to the given number "a" how can i do this i am presently doing by loading whole file into list and comparing each element and finding the closest one any other better faster method?

    Read the article

  • wav file manupalation

    - by kaushik
    I want get the details of the wave such as its frames into a array of integers. Using fname.getframes we can ge the properties of the frame and save in list or anything for writing into another wav or anything,but fname.getframes gives information not in integers some thing like a "/xt/x4/0w' etc.. But i want them in integer so that would be helpful for manupation and smoothening join of 2 wav files

    Read the article

  • using python,How to cut the wav file between certain time ranges??

    - by kaushik
    How to cut the wav file between certain time ranges from multiple wav files and paste the segments together in a single wav file in continous time ?? For this i thou of a way,to store the contents of the wav file in array form and cut the segments required from the array copy thm in another file and convert it back into wav formant. but i hav no idea how to code it in python as i am a beginner in it.. plz help...any alternative methods which serve the purpose are also welcome.. Quick reply,xpected plzz.. Thanks in advance..

    Read the article

  • Websphre portal does not startup

    - by Kaushik
    When I try to start up a websphere portal server, it hangs at the line : Server WebSphere_Portal open for e-business and although it means that the server started up successfully, it is not...because in the progress bar, i stll see 'Starting.....' I have tried deleting the wstemp and temp directories but beyond that I am not sure what I can do to debug the problem. The server with the same profile starts up great from another workspace, but when I come to this workspace, it just hangs at Server WebSphere_Portal open for e-business I am using RAD 7 and portal 6.1

    Read the article

  • Uploading Files to AWS S3 from an Android App

    - by Abhishek Kaushik
    Edited 7th June,14 My Android app needs to have a feature where clients can upload their files. I want AWS S3 as my storage. Moreover i dont want to use SECRET_KEY and ACCESS_KEY_ID on client side. What is the the best way to do this. Can someone provide the working code too ? I read that i can request to AWS for a signed URL and then make client directly upload to that URL. How to achieve this ?

    Read the article

  • problem with f.readline()?

    - by kaushik
    I am reading one line at a time from a file, but at the end of each line it adds a '\n'. example: line is: 094 234 hii but my input is: 094 234 hii\n I want to read line by linem but I don't need to keep the newlines... My goal is to read a list from every line: I need ['094','234','hii'], not ['094','234','hii\n'] Any advice?

    Read the article

  • How to write to Tomcat log files

    - by Ankur
    What is the easiest way to print out something in a Tomcat Log file. I was under the impression that System.out.println() would print to one of the log files. I just want to print out the value of a string, so the simplest solution would be best. If there is no simple/trivial solution I guess I will use Log4J

    Read the article

  • Create a JSON Array using Java

    - by Ankur
    Hi I want to create a JSON array. I have tried using: JSONArray jArray = new JSONArray(); while(itr.hasNext()){ int objId = itr.next(); jArray.put(objId, odao.getObjectName(objId)); } results = jArray.toString(); Note: odao.getObjectName(objId) retrieves a name based on the "object Id" which is called objId However I get a very funny looking array like [null,null,null,"SomeValue",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"AnotherValue",null,null,null,null,null,null,null,null,null,null,"SomethingElse","AnotherOne","LastOne"] With only "LastOne" being displayed when I retrieve it using jQuery. The Array SHould look like {["3":"SomeValue"],["40":"AnotherValue"],["23":"SomethingElse"],["9":"AnotherOne"],["1":"LastOne"]} The numbers aren't showing up at all for some reason in the array that I am getting

    Read the article

  • How to use jQuery .each() - I get a value, but it's the wrong one

    - by Ankur
    I am returning a JSON object (as a String) through a servlet. The JSON object looks like this: {"3":"Martin Luther","30":"Boris Becker","32":"Joseph Goebels","19":"Leonardo Da Vinci","31":"Adolf Hitler"} My jQuery looks like this (the submission of data is correct because I get a proper looking result from the servlet): $.ajax( { type : "GET", url : "MyServlet", data : queryString + "count=" + variables, success : function(resultObj) { $.each(resultObj, function(key, value) { $("#resultCount").html(key+", "+value); }); } }); However when I try to print the results, that is the variables key and value, I get a number for the key but not a number from the JSONObject and an empty string instead of the value. Essentially the question is about how to "extract" the information from a JSON object.

    Read the article

  • org.apache.jasper.JasperException .... Unterminated &lt;%@ page tag

    - by Ankur
    I get org.apache.jasper.JasperException: /index.jsp(2,1) Unterminated <%@ page tag The page tags look like this: <%@ page import="java.util.*" %> <%@ page import="au.edu.uwa.peb.autoextractor.model.ScanResultItem"; %> This seems to indicate to me that a < does not have a corresponding tag ... is this so ... my IDE does not highlight any errors so how can I find this unterminated tag. Is there a JSP validation tool that I can use, perhaps online? The stack trace looks like this: org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:132) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:520) org.apache.jasper.compiler.Parser.parseTagFileDirectives(Parser.java:1784) org.apache.jasper.compiler.Parser.parse(Parser.java:127) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255) org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:120) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:165) org.apache.jasper.compiler.Compiler.compile(Compiler.java:332) org.apache.jasper.compiler.Compiler.compile(Compiler.java:312) org.apache.jasper.compiler.Compiler.compile(Compiler.java:299) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    Read the article

  • How to "escape" a whole String - an SQL query

    - by Ankur
    When I add a relative path to an SQL query as a String all the \ get removed. I am trying to add the String ("pics\\"+onlyFile) and as you can see I have escaped the \ character so I don't understand why it is being removed. onlyFile is a variable containing a file name. The value of the "src" variable (the one I am discussing) just before the SQL statement is correct, hence it is something happening when it is added to the SQL query.

    Read the article

  • Are variable length arrays possible with Javascript

    - by Ankur
    I want to make a variable length array in Javascript. Is this possible. A quick google search for "Javascript variable length array" doesn't seem to yield anything, which would be surprising if it were possible to do this. Should I instead have a String that I keep appending to with a separator character instead, or is there a better way to get a varible length array-like variable.

    Read the article

  • Algorithms for finding a numerical record in a list of ordered numbers

    - by Ankur
    I have a list of incomplete ordered numbers. I want to find a particular number with as few steps as possible. Are there any improvements on this algorithm, I assume you can count the set size without difficulty - it will be stored and updated every time a new item is added. Your object is to get your cursor over the value x The first number (smallest) is s, and the last number (greatest) is g. Take the midpoint m1 of the set: calculate is x < m1, If yes then s <= x < m1 If no then m1 < x <= g If m1 = x then you're done. Keep repeating till you find x. Basically dividing the set into two parts with each iteration till you hit x. The purpose is to retrieve a numerical id from a very large table to then find the associated other records. I would imagine this is the most trivial kind of indexing available, are there improvements?

    Read the article

  • Deliver files from a web server from outside the web app

    - by Ankur
    Is there anyway to serve a file from a web server through the web, that is not within the web application. I am using Tomcat and a Java servlets based application. I don't want to put the files within the webapp because they are several 100GB and I will have to replace them every time I update the WAR if I put them inside it.

    Read the article

  • MySQL "ERROR 1005 (HY000): Can't create table 'foo.#sql-12c_4' (errno: 150)"

    - by Ankur Banerjee
    Hi, I was working on creating some tables in database foo, but every time I end up with errno 150 regarding the foreign key. Firstly, here's my code for creating tables: CREATE TABLE Clients ( client_id CHAR(10) NOT NULL , client_name CHAR(50) NOT NULL , provisional_license_num CHAR(50) NOT NULL , client_address CHAR(50) NULL , client_city CHAR(50) NULL , client_county CHAR(50) NULL , client_zip CHAR(10) NULL , client_phone INT NULL , client_email CHAR(255) NULL , client_dob DATETIME NULL , test_attempts INT NULL ); CREATE TABLE Applications ( application_id CHAR(10) NOT NULL , office_id INT NOT NULL , client_id CHAR(10) NOT NULL , instructor_id CHAR(10) NOT NULL , car_id CHAR(10) NOT NULL , application_date DATETIME NULL ); CREATE TABLE Instructors ( instructor_id CHAR(10) NOT NULL , office_id INT NOT NULL , instructor_name CHAR(50) NOT NULL , instructor_address CHAR(50) NULL , instructor_city CHAR(50) NULL , instructor_county CHAR(50) NULL , instructor_zip CHAR(10) NULL , instructor_phone INT NULL , instructor_email CHAR(255) NULL , instructor_dob DATETIME NULL , lessons_given INT NULL ); CREATE TABLE Cars ( car_id CHAR(10) NOT NULL , office_id INT NOT NULL , engine_serial_num CHAR(10) NULL , registration_num CHAR(10) NULL , car_make CHAR(50) NULL , car_model CHAR(50) NULL ); CREATE TABLE Offices ( office_id INT NOT NULL , office_address CHAR(50) NULL , office_city CHAR(50) NULL , office_County CHAR(50) NULL , office_zip CHAR(10) NULL , office_phone INT NULL , office_email CHAR(255) NULL ); CREATE TABLE Lessons ( lesson_num INT NOT NULL , client_id CHAR(10) NOT NULL , date DATETIME NOT NULL , time DATETIME NOT NULL , milegage_used DECIMAL(5, 2) NULL , progress CHAR(50) NULL ); CREATE TABLE DrivingTests ( test_num INT NOT NULL , client_id CHAR(10) NOT NULL , test_date DATETIME NOT NULL , seat_num INT NOT NULL , score INT NULL , test_notes CHAR(255) NULL ); ALTER TABLE Clients ADD PRIMARY KEY (client_id); ALTER TABLE Applications ADD PRIMARY KEY (application_id); ALTER TABLE Instructors ADD PRIMARY KEY (instructor_id); ALTER TABLE Offices ADD PRIMARY KEY (office_id); ALTER TABLE Lessons ADD PRIMARY KEY (lesson_num); ALTER TABLE DrivingTests ADD PRIMARY KEY (test_num); ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Offices FOREIGN KEY (office_id) REFERENCES Offices (office_id); ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Clients FOREIGN KEY (client_id) REFERENCES Clients (client_id); ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Instructors FOREIGN KEY (instructor_id) REFERENCES Instructors (instructor_id); ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Cars FOREIGN KEY (car_id) REFERENCES Cars (car_id); ALTER TABLE Lessons ADD CONSTRAINT FK_Lessons_Clients FOREIGN KEY (client_id) REFERENCES Clients (client_id); ALTER TABLE Cars ADD CONSTRAINT FK_Cars_Offices FOREIGN KEY (office_id) REFERENCES Offices (office_id); ALTER TABLE Clients ADD CONSTRAINT FK_DrivingTests_Clients FOREIGN KEY (client_id) REFERENCES Clients (client_id); These are the errors that I get: mysql> ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Cars FOREIGN KEY (car_id) REFERENCES Cars (car_id); ERROR 1005 (HY000): Can't create table 'foo.#sql-12c_4' (errno: 150) I ran SHOW ENGINE INNODB STATUS which gives a more detailed error description: ------------------------ LATEST FOREIGN KEY ERROR ------------------------ 100509 20:59:49 Error in foreign key constraint of table practice9/#sql-12c_4: FOREIGN KEY (car_id) REFERENCES Cars (car_id): Cannot find an index in the referenced table where the referenced columns appear as the first columns, or column types in the table and the referenced table do not match for constraint. Note that the internal storage type of ENUM and SET changed in tables created with >= InnoDB-4.1.12, and such columns in old tables cannot be referenced by such columns in new tables. See http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html for correct foreign key definition. ------------ I searched around on StackOverflow and elsewhere online - came across a helpful blog post here with pointers on how to resolve this error - but I can't figure out what's going wrong. Any help would be appreciated!

    Read the article

  • Convert scientific notation to decimal notation

    - by Ankur
    There is a similar question on SO which suggests using NumberFormat which is what I have done. I am using the parse() method of NumberFormat. public static void main(String[] args) throws ParseException{ DecToTime dtt = new DecToTime(); dtt.decToTime("1.930000000000E+02"); } public void decToTime(String angle) throws ParseException{ DecimalFormat dform = new DecimalFormat(); //ParsePosition pp = new ParsePosition(13); Number angleAsNumber = dform.parse(angle); System.out.println(angleAsNumber); } The result I get is 1.93 I didn't really expect this to work because 1.930000000000E+02 is a pretty unusual looking number, do I have to do some string parsing first to remove the zeros? Or is there a quick and elegant way?

    Read the article

  • Javascript function call causes error

    - by Ankur
    I am trying to call a function "makeQuery" and it's not working, FireBug is telling me: missing ; before statement [Break on this error] makeQuery(this.id){\n I don't quite understand where it wants me to put the ";" $(".predicate").click(function () { makeQuery(this.id){ alert(this.id); } }); function makeQuery(value){ queryString = queryString+"val="+value+"&"; variables = variables+1; alert(queryString); alert(variables); }

    Read the article

  • Getting the executed output of an aspx page after a short delay

    - by Ankur
    Hi all, I have an aspx page which has some javascript code like <script> setTimeout("document.write('" + place.address + "');",1); </script> As it is clear from the code it will going to write something on the page after a very short delay of 1 ms. I have created an another page to get the page executed by some query string and get its output. The problem is I can not avoid the delay as simply writing document.write(place.address); will not print anything as it takes a little time to get values so if i set it in setTimeout for delayed output of 1 ms it always return me a value If I request the output from another page using System.Net.WebClient wc = new System.Net.WebClient(); System.IO.StreamReader sr = new System.IO.StreamReader(wc.OpenRead("http://localhost:4859/Default.aspx?lat=" + lat + "&lng=" + lng)); string strData = sr.ReadToEnd(); I get the source code of the document instead of the desired output can anyone help me out for either avoiding that delay or else delayed the client request ouput so that i get a desired value not the source code The js on default.aspx is <script type="text/javascript"> var geocoder; var address; function initialize() { geocoder = new GClientGeocoder(); var qs=new Querystring(); if(qs.get("lat") && qs.get("lng")) { geocoder.getLocations(new GLatLng(qs.get("lat"),qs.get("lng")),showAddress); } else { document.write("Invalid Access Or Not valid lat long is provided."); } } function getAddress(overlay, latlng) { if (latlng != null) { address = latlng; geocoder.getLocations(latlng, showAddress); } } function showAddress(r) { place = r.Placemark[0]; setTimeout("document.write('" + place.address + "');",1); //document.write(place.address); } </script> and the code on requestClient.aspx is as System.Net.WebClient wc = new System.Net.WebClient(); System.IO.StreamReader sr = new System.IO.StreamReader(wc.OpenRead("http://localhost:4859/Default.aspx?lat=" + lat + "&lng=" + lng)); string strData = sr.ReadToEnd();

    Read the article

  • Does form with enctype="multipart/form-data" cause problems accessing a hidden field

    - by Ankur
    I have created a hidden form element <form name="UploadImage" enctype="multipart/form-data" method="post" action="UploadImage"> <label> </label> <input name="imgUploadObjId" id="imgUploadObjId" value="52" type="hidden"> //rest of the form here </form> And I am trying to get the value with this line in a servlet (as I have done before): int objId = Integer.parseInt(request.getParameter("imgUploadObjId")); But I get this (line 33 is the line above): java.lang.NumberFormatException: null java.lang.Integer.parseInt(Unknown Source) java.lang.Integer.parseInt(Unknown Source) web.objects.UploadImage.doPost(UploadImage.java:33) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) Is there something different about a form with enctype="multipart/form-data"? Or can you see some other error.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >