Search Results

Search found 1528 results on 62 pages for 'rahul ravi kumar shah'.

Page 18/62 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Find IP address in iphone

    - by Ruchir Shah
    Hi, I want to find IP address in an application. I am able to find it. But, problem is, it works fins in iphone os 2.0 or so. But, in iphone os 3.0 it is giving me a warning: warning: no '+currentHost' method found warning: (Messages without a matching method signature) I am using this code, and it works fine with os version 2.0. -(NSString*)getAddress { char iphone_ip[255]; strcpy(iphone_ip,"127.0.0.1"); // if everything fails NSHost* myhost = [NSHost currentHost]; if (myhost) { NSString *ad = [myhost address]; if (ad) strcpy(iphone_ip,[ad cStringUsingEncoding: NSISOLatin1StringEncoding]); } return [NSString stringWithFormat:@"%s",iphone_ip]; } How to find IP address in iphone os 3.0 or greater os version? Thanks in advance.

    Read the article

  • how to specify set of files to be copied in lib while creating war

    - by Jigar Shah
    This is my build target <target name="build-war" depends="build-java"> <war destfile="${dist.dir}/${std.war.file}" webxml="${resources.dir}/WEB-INF/web.xml"> <fileset dir="${jsp.dir}" /> <lib dir="${lib.dir}"/> <classes dir="${build.classes.dir}" /> </war> </target> Here for <lib> can i specify some how a fileset / pattern set ? Basically i want to copy different jar from different places. (Not in one directlry) And That fileset or patternset i want to be defined in another build file which actually imports this build file. <lib refid="${patternset.id}"/>

    Read the article

  • Need to devise a number crunching algorithm

    - by Ravi Gupta
    I stumbled upon this question: 7 power 7 is 823543. Which higher power of 7 ends with 823543 ? How should I go about it ? The one I came up with is very slow, it keeps on multiplying by 7 and checks last 6 digits of the result for a match. I tried with Lou's code: int x=1; for (int i=3;i<=100000000;i=i+4){ x=(x*7)%1000000; System.out.println("i="+ i+" x= "+x); if (x==823543){ System.out.println("Ans "+i);} } And CPU sounds like a pressure cooker but couldn't get the answer :(

    Read the article

  • Help making userscript work in chrome

    - by Vishal Shah
    I've written a userscript for Gmail Pimp.my.Gmail & i'd like it to be compatible with Google Chrome too. Now i have tried a couple of things, to the best of my Javascript knowledge (which is very weak) & have been successful up-to a certain extent, though im not sure if it's the right way. Here's what i tried, to make it work in Chrome: The very first thing i found is that contentWindow.document doesn't work in chrome, so i tried contentDocument, which works. BUT i noticed one thing, checking the console messages in Firefox and Chrome, i saw that the script gets executed multiple times in Firefox whereas in Chrome it just executes once! So i had to abandon the window.addEventListener('load', init, false); line and replace it with window.setTimeout(init, 5000); and i'm not sure if this is a good idea. The other thing i tried is keeping the window.addEventListener('load', init, false); line and using window.setTimeout(init, 1000); inside init() in case the canvasframe is not found. So please do lemme know what would be the best way to make this script cross-browser compatible. Oh and im all ears for making this script better/efficient code wise (which is sure there is)

    Read the article

  • DynaCache invalidation in clustered environment

    - by Ravi
    We are using Horizontal cluster in our PROD with WAS 6.1 as the Application server. We have enabled dynacache service for some of the JSP fragments using SHARED-PUSH in cachespec.xml file. Now we want to do cache invalidation programmatically..ie. whenever something changes in DB related to cache the cache should get invalidated. so can you please let me know what steps are involved in it to achieve this? any configuration settings at server side or any development changes.

    Read the article

  • Defining an implementation independent version of the global object in JavaScript

    - by Aadit M Shah
    I'm trying to define the global object in JavaScript in a single line as follows: var global = this.global || this; The above statement is in the global scope. Hence in browsers the this pointer is an alias for the window object. Assuming that it's the first line of JavaScript to be executed in the context of the current web page, the value of global will always be the same as that of the this pointer or the window object. In CommonJS implementations, such as RingoJS and node.js the this pointer points to the current ModuleScope. However, we can access the global object through the property global defined on the ModuleScope. Hence we can access it via the this.global property. Hence this code snippet works in all browsers and in at least RingoJS and node.js, but I have not tested other CommomJS implementations. Thus I would like to know if this code will not yield correct results when run on any other CommonJS implementation, and if so how I may fix it. Eventually, I intend to use it in a lambda expression for my implementation independent JavaScript framework as follows (idea from jQuery): (function (global) { // javascript framework })(this.global || this);

    Read the article

  • iphone sqlite3_column_text issue

    - by Ruchir Shah
    I have a column in sqlite3 table. Column has values like 1 ½” 1 ¾” 2 ½” etc. Column has VARCHAR datatype. I am using this code. pref_HoseDiameter = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 2)]; Now, when I am fetching these values from database, I am getting pref_HoseDiameter string values like this: 1 1/2" 1 3/4" 2 1/2" How to fetch those values as they are in database or how to convert them that look like database values. Help would be appreciated. Thanks in advance.

    Read the article

  • Close smartpart view

    - by Ravi
    I am developing windows Forms application, for this i am using SmartClient. Here i click workspace close('X') event at the time i want to display messageBox based on user input (OK/Cancel) i have to decide pane has to be close or not.

    Read the article

  • Is there a Scheduler/Calendar JS Widget library?

    - by Ravi Chhabra
    I am looking for some JavaScript based component to be used as a course scheduler which would be a cross between Google Calendar and the login time. I do not know if the right term for this is Course Scheduler but I shall describe this in more detail here. Course Scheduler The widget would be used to enter date and times of a course, as an example if I run a programming course 3 days a week on Mon, Tue and Wed every 7:00 am to 9:00am, 2 hours every day from 1st September to 30th November. I could answer various questions and the course data would be displayed in the calendar. It would also allow for non pattern based timings where each week is different from the other week etc. Question So would I end up creating something from scratch? Would it be sensible to use Google Calendar API for this? I did a Google search for some widgets, but I believe I need better keywords, as I could not find anything close to what I am looking for. Any tips? Commercial libraries would also work for me. Thanks.

    Read the article

  • addEventListener gone after appending innerHTML

    - by Vishal Shah
    Okay, so i have the following html added to a site using javascript/greasemonkey. (just sample) *a id='abc'*HEllo*/a* *a id='xyz'*Hello*/a* (excuse me, i've had to replace the '<' '' with * since hyperlinks for new users aren't allowed!) and i've also added a click event listener for the elements. All works fine up to this point, the click event gets fired when i click the element. But... i have another function in the script, which upon a certain condition, modifies that html, ie it appends it, so it looks like: *a id='abc'*HEllo*/a* *a id='xyz'*Hello*/a* *a id='123'*Hello*/a* but when this is done, it breaks the listeners i added for the first two elements... nothing happens when i click them. if i comment out the call to the function which does the appending, it all starts working again! help please...

    Read the article

  • Crystal Report Portuguese language support

    - by Ravi Gupta
    Hi I am using Crystal Reports 10 with IIS Server. I wish to display some of the reports in Portuguese language. How can I configure Crystal Reports to display data in Portuguese ? I guess I will need to download a language pack for this but will it allow word-by-word conversion from English to Portuguese ? Grammatically correct sentences are not currently my concern. Any inputs will be greatly appreciated.

    Read the article

  • Adding Class instance as a new Row in DataGridView (c#)

    - by Amit Shah
    Hi All, I have a class say [Serializable] public class Answer { [DisplayName("ID")] public string ID { get; set; } [DisplayName("Value")] public string Value { get; set; } } and I have a datagridview with bounded columns to the above class. instances of this class Answer are created dynamically as and when required. How do I update datagridview when each and every instance of class is created. is it possible to do something of this sort. dataGridView.Rows.Add(classInstance); Thanks in Advance, Amit

    Read the article

  • Setting up a non-emacs Common Lisp Dev Env for web application development?

    - by Ravi S
    I am trying to set up a Common Lisp Dev Env for web application development on my Ubuntu 10.04 LTS 64-bit box and I can't find a single decent guide that is targeted at noobs. The closest I came is with Peter Seibel's Lisp in a box but I detest Emacs with a passion and it seems to have older versions of SBCL and CLISP (which are my preferred CL implementations). I do not want to use any of the commercial implementations. I am looking for a simple setup to write some very basic CRUD apps involving possibly hunchentoot, some framework like weblocks,CL-WHO, CL-SQl, sqlite or some datastores from the nosql family like mongo and couch.. Assuming, I go with either SBCL or CLISP on Linux, what is the best tool to manage packages and libraries? ASDF? I am looking for simplicity and consistency and I don't expect to use a ton of libs...

    Read the article

  • Continuous Deployment with a C#/ASP.NET website?

    - by Amber Shah
    I have a website in C#/ASP.NET that is currently in development. When we are in production, I would like to do releases frequently over the course of the day, as we fix bugs and add features (like this: http://toni.org/2010/05/19/in-praise-of-continuous-deployment-the-wordpress-com-story/). If you upload a new version of the site or even change a single file, it kicks out the users that are currently logged in and makes them start over any forms and such. Is there a secret to being able to do deployments without interfering with users for .NET sites?

    Read the article

  • Login time out when calling opening a new window from modal popup (ASP.NET)

    - by Harsh Shah
    I have a weird problem. I have a window, on a button click I open a modal popup (using ModelPopupExtender), that let's you select a few criteria and then click a submit button. On click of submit button, I open a new window (using window.open()) that shows the status of what happened to your submitted request. However, every time this status window is opened, it goes to the login page. I am thinking the modal popup can't pass the authentication cookie to the newly opened window, but I'm not sure. Here's my web.config portion:

    Read the article

  • visual studio 2008 linker error

    - by ravi
    In visual studio 2008, I have created a static dll called test_static.dll. I am trying to call this from one application. I have included this dll in source files folder and the header file related to it in headers folder. When i am running the application I am getting following liking error. Please give me a solution. error LNK2019: unresolved external symbol "struct morph_output * __cdecl morpho_data(struct morph_input *)" (?morpho_data@@YAPAUmorph_output@@PAUmorph_input@@@Z) referenced in function _wmain 1D:\test_app\Debug\test_app.exe : fatal error LNK1120: 1 unresolved externals 1Build log was saved at "file://d:\test_app\test_app\Debug\BuildLog.htm" Here test_app is application that is using static dll. and morpho_data is the dll function which is taking input as structure and returning another structure.

    Read the article

  • Parse a text file into multiple text file

    - by Vijay Kumar Singh
    I want to get multiple file by parsing a input file Through Java. The Input file contains many fasta format of thousands of protein sequence and I want to generate raw format(i.e., without any comma semicolon and without any extra symbol like "", "[", "]" etc) of each protein sequence. A fasta sequence starts form "" symbol followed by description of protein and then sequence of protein. For example ? lcl|NC_000001.10_cdsid_XP_003403591.1 [gene=LOC100652771] [protein=hypothetical protein LOC100652771] [protein_id=XP_003403591.1] [location=join(12190..12227,12595..12721,13403..13639)] MSESINFSHNLGQLLSPPRCVVMPGMPFPSIRSPELQKTTADLDHTLVSVPSVAESLHHPEITFLTAFCL PSFTRSRPLPDRQLHHCLALCPSFALPAGDGVCHGPGLQGSCYKGETQESVESRVLPGPRHRH Like above formate the input file contains 1000s of protein sequence. I have to generate thousands of raw file containing only individual protein sequence without any special symbol or gaps. I have developed the code for it in Java but out put is : Cannot open a file followed by cannot find file. Please help me to solve my problem. Regards Vijay Kumar Garg Varanasi Bharat (India) The code is /*Java code to convert FASTA format to a raw format*/ import java.io.*; import java.util.*; import java.util.regex.*; import java.io.FileInputStream; // java package for using regular expression public class Arrayren { public static void main(String args[]) throws IOException { String a[]=new String[1000]; String b[][] =new String[1000][1000]; /*open the id file*/ try { File f = new File ("input.txt"); //opening the text document containing genbank ids FileInputStream fis = new FileInputStream("input.txt"); //Reading the file contents through inputstream BufferedInputStream bis = new BufferedInputStream(fis); // Writing the contents to a buffered stream DataInputStream dis = new DataInputStream(bis); //Method for reading Java Standard data types String inputline; String line; String separator = System.getProperty("line.separator"); // reads a line till next line operator is found int i=0; while ((inputline=dis.readLine()) != null) { i++; a[i]=inputline; a[i]=a[i].replaceAll(separator,""); //replaces unwanted patterns like /n with space a[i]=a[i].trim(); // trims out if any space is available a[i]=a[i]+".txt"; //takes the file name into an array try // to handle run time error /*take the sequence in to an array*/ { BufferedReader in = new BufferedReader (new FileReader(a[i])); String inline = null; int j=0; while((inline=in.readLine()) != null) { j++; b[i][j]=inline; Pattern q=Pattern.compile(">"); //Compiling the regular expression Matcher n=q.matcher(inline); //creates the matcher for the above pattern if(n.find()) { /*appending the comment line*/ b[i][j]=b[i][j].replaceAll(">gi",""); //identify the pattern and replace it with a space b[i][j]=b[i][j].replaceAll("[a-zA-Z]",""); b[i][j]=b[i][j].replaceAll("|",""); b[i][j]=b[i][j].replaceAll("\\d{1,15}",""); b[i][j]=b[i][j].replaceAll(".",""); b[i][j]=b[i][j].replaceAll("_",""); b[i][j]=b[i][j].replaceAll("\\(",""); b[i][j]=b[i][j].replaceAll("\\)",""); } /*printing the sequence in to a text file*/ b[i][j]=b[i][j].replaceAll(separator,""); b[i][j]=b[i][j].trim(); // trims out if any space is available File create = new File(inputline+"R.txt"); try { if(!create.exists()) { create.createNewFile(); // creates a new file } else { System.out.println("file already exists"); } } catch(IOException e) // to catch the exception and print the error if cannot open a file { System.err.println("cannot create a file"); } BufferedWriter outt = new BufferedWriter(new FileWriter(inputline+"R.txt", true)); outt.write(b[i][j]); // printing the contents to a text file outt.close(); // closing the text file System.out.println(b[i][j]); } } catch(Exception e) { System.out.println("cannot open a file"); } } } catch(Exception ex) // catch the exception and prints the error if cannot find file { System.out.println("cannot find file "); } } } If you provide me correct it will be much easier to understand.

    Read the article

  • Stored procedure using cursor in mySql.

    - by RAVI
    I wrote a stored procedure using cursor in mysql but that procedure is taking 10 second to fetch the result while that result set have only 450 records so, I want to know that why that proedure is taking that much time to fetch tha record. procedure as below: DELIMITER // DROP PROCEDURE IF EXISTS curdemo123// CREATE PROCEDURE curdemo123(IN Branchcode int,IN vYear int,IN vMonth int) BEGIN DECLARE EndOfData,tempamount INT DEFAULT 0; DECLARE tempagent_code,tempplantype,tempsaledate CHAR(12); DECLARE tempspot_rate DOUBLE; DECLARE var1,totalrow INT DEFAULT 1; DECLARE cur1 CURSOR FOR select SQL_CALC_FOUND_ROWS ad.agentCode,ad.planType,ad.amount,ad.date from adplan_detailstbl ad where ad.branchCode=Branchcode and (ad.date between '2009-12-1' and '2009-12-31')order by ad.NUM_ID asc; DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET EndOfData = 1; DROP TEMPORARY TABLE IF EXISTS temptable; CREATE TEMPORARY TABLE temptable (agent_code varchar(15), plan_type char(12),sale double,spot_rate double default '0.0', dATE DATE); OPEN cur1; SET totalrow=FOUND_ROWS(); while var1 <= totalrow DO fetch cur1 into tempagent_code,tempplantype,tempamount,tempsaledate; IF((tempplantype='Unit Plan' OR tempplantype='MIP') OR tempplantype='STUP') then select spotRate into tempspot_rate from spot_amount where ((monthCode=vMonth and year=vYear) and ((agentCode=tempagent_code and branchCode=Branchcode) and (planType=tempplantype))); INSERT INTO temptable VALUES(tempagent_code,tempplantype,tempamount,tempspot_rate,tempsaledate); else INSERT INTO temptable(agent_code,plan_type,sale,dATE) VALUES(tempagent_code,tempplantype,tempamount,tempsaledate); END IF; SET var1=var1+1; END WHILE; CLOSE cur1; select * from temptable; DROP TABLE temptable; END // DELIMITER ;

    Read the article

  • CDATA xml parsing extra greater than problem

    - by Ruchir Shah
    Hi, I am creating an xml using php and parsing that xml in iphone application code. In description field there is some html tags and text. I am using following line to convert this html tags in to xml tag using CDATA. $response .= '<desc><![CDATA['.trim($feed['fulltext']).']]></desc>'; Now, here my $feed['fulltext'] value is like this <span class="ABC">...text...</span> In xml I am getting following response, <desc><![CDATA[><span class"ABC">...text...</span>]]></desc> You can see here, I am getting an extra greater-than symbol just before the value of $feed['fulltext'] starts. (like this: ...text...) Any solution or suggestion for this? Thanks in advance. Cheers.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >