Search Results

Search found 83 results on 4 pages for 'rohan agrawal'.

Page 3/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Whats the minimum iOS version which supports OpenGL ES2.0 ?

    - by Shireesh Agrawal
    Hi, I am not sure if the question even makes sense. I am writing an iPhone game which uses Opengl ES 2.0. I know that OpenGL ES 2.0 is supported on 3gs and higher. Is there a minimum requirement for iOS version too, like the device needs to have iOS 3.1.3 or higher? Or does it solely depend on the hardware? Thanks! -shireesh p.s. I tried to search on the net but havent found much, perhaps I am not using the right keywords

    Read the article

  • Javascript Split: without losing character

    - by Rohan
    I want to split certain text using JavaSscript. The text looks like: 9:30 pm The user did action A. 10:30 pm Welcome, user John Doe. 11:30 am Messaged user John Doe Now, I want to split the string into events. i.e.: 9:30 pm The user did action A. would be one event. I'm using RegEx for this: var split = journals.split(/\d*\d:/); Thing is, the first two characters are getting lost. The split appears like this: 30 pm The user did action A. How do I split so that the split maintains the first two/three characters (ie 9: or 10:) etc? Thanks!

    Read the article

  • Logic for rate approximation

    - by Rohan
    I am looking for some logic to solve the below problem. There are n transaction amounts : T1,T2,T3.. Tn. Commission for these transactions are calculated using a rate table provided as below. if amount between 0 and A1 - rate is r1 if amount between A1 and A2 - rate is r2 if amount between A2 and A1 - rate is r3 ... ... if amount greater than An - rate is r4 So if T1 < A1 then rate table returns r1 else if r1 < T1 < r2;it returns r2. So,lets says the rate table results for T1,T2 and T3 are r1,r2 and r3 respectively. Commission C = T1 * r1 + T2 * r2 + T3 * r3 e.g; if rate table is defined(rates are in %) 0 - 2500 - 1 2501 - 5000 - 2 5001 - 10000 - 4 10000 or more- 6 If T1 = 6000,T2 = 3000, T3 = 2000, then C= 6000 * 0.04 + 3000* 0.02 + 2000 * 0.01 = 320 Now my problem is whether we can approximate the commission amount if instead of individual values of T1,T2 and T3 we are provided with T1+T2+T3 (T) In the above example if T (11000) is applied to the rate tablewe would get 6% and which would result in a commision of 600. Is there a way to approximate the commission value given T instead of individual values of T1,T2,T3?

    Read the article

  • Problems debugging using Cygwin gdb in Eclipse CDT(Helios)

    - by Rohan
    I am trying to debug an application using Eclipse CDT and cygwin gdb and I am facing a problem if my code calls Sleep(), it looks like whenever a sleep is encountered in the code the debugger seems to go in an infinite loop(I meant it never terminates or hit a breakpoint after sleep). On pressing pause the code is stuck on one of the thread on sigint::interrupt. Even my debugger console windows throw these error in the console output: [New thread 5968.0x1f98] Error: dll starting at 0x774a0000 not found. Error: dll starting at 0x775c0000 not found. [New thread 5968.0x19e8] Any idea what are these errors about? It would be helpful if someone can help me out here as I am new to eclipse and I am used to using VS so it has made be lazy to be honest and expect things to work out of box. Here are more details if required Windows 7 x64 bit. Eclipse 3.6 Helios with CDT plug-in compiled from the CVS head. Cygwin latest from website, I think it is 1.71

    Read the article

  • Grails Domain.get() returns null for mongo's ObjectId

    - by Shashank Agrawal
    I'm using grails 2.3.5 with mongodb 3.0.1 and no hibernate installed. I've a domain class which uses mongo's ObjectId. import org.bson.types.ObjectId class Category { ObjectId id String name } And has a record in mongo database: { "_id": ObjectId("53f6c34c33a429240e2ab471"), "name": "art", "version": NumberLong("41") } When I do, Category.get(new ObjectId("53f6c34c33a429240e2ab471")) somewhere in grails app, it returns null but when I do Category.get("53f6c34c33a429240e2ab471") it then actually returns the result. Why, get() method does not process ObjectId type?

    Read the article

  • Sort multidimension array in php by more than two fields

    - by Ankita Agrawal
    I want to sort array by two fields. I mean to say I have an array like :- Array ( [0] => Array ( [name] => abc [url] => http://127.0.0.1/abc/img1.png [count] => 69 [img] => accessoire-sets_1.jpg ) [1] => Array ( [name] => abc2 [url] => http://127.0.0.1/abc/img12.png [count] => 73 [img] => ) [2] => Array ( [name] => abc45 [url] => http://127.0.0.1/abc/img122.png [count] => 15 [img] => tomahawk-kopen_1.png ) [3] => Array ( [name] => zyz [url] => http://127.0.0.1/abc/img22.png [count] => 168 [img] => ) [4] => Array ( [name] => lmn [url] => http://127.0.0.1/abc/img1222.png [count] => 10 [img] => ) [5] => Array ( [name] => qqq [url] => http://127.0.0.1/abc/img1222.png [count] => 70 [img] => ) [6] => Array ( [name] => dsa [url] => http://127.0.0.1/abc/img1112.png [count] => 43 [img] => ) [7] => Array ( [name] => wer [url] => http://127.0.0.1/abc/img172.png [count] => 228 [img] => ) [8] => Array ( [name] => hhh [url] => http://127.0.0.1/abc/img126.png [count] => 36 [img] => ) [9] => Array ( [name] => rrrt [url] => http://127.0.0.1/abc/img12.png [count] => 51 [img] => ) [10] => Array ( [name] => yyy [url] => http://127.0.0.1/abc/img12.png [count] => 22 [img] => ) [11] => Array ( [name] => cxz [url] => http://127.0.0.1/abc/img12.png [count] => 41 [img] => ) [12] => Array ( [name] => tre [url] => http://127.0.0.1/abc/img12.png [count] => 32 [img] => ) [13] => Array ( [name] => fds [url] => http://127.0.0.1/abc/img12.png [count] => 10 [img] => ) ) array WITHOUT images (field "img" )should always be placed underneath array WITH images. After this there will be sorted on the amount of products (field count) in the array. Means I have to show sort array first on the basis of img then count. I am using usort( $childLinkCats, 'sortempty' );` function sortempty( $a, $b ) { return empty( $a['img'] ); } it will show array with image value above the one who contains null value. and to sort through count Im using usort($childLinkCats, "_sortByCount"); function _sortByCount($a, $b) { return strnatcmp($a['count'], $b['count']); } It will short by count But I am facing problem that only 1 working is working at a time, but I have to use both, please help me.

    Read the article

  • Items Created via IB are not being displayed

    - by Rohan
    Hello, This is what i have done so far, Made a Custom view added few objects, as shown below @interface CommUICustomSignInView : CommUICustomView { IBOutlet NSButton *pBtn; IBOutlet NSTextField *pTextField; NSTrackingArea *pTrackingArea; NSCursor *pPonitHandCursor; } Added all IBoutlet correctly, Now thru Interface builder constructed a Window controller interface builder in which added a custom view and provided this class name in the interface builder, I hope i could able to visualize you guys, now whenever i loaded this view, the item whatever i created by IB are not being displayed, Am i doing something wrong, or something missing,

    Read the article

  • url not found in zend framework though working for index page

    - by Rohan Thakare
    i am trying to develop website using zend framework so i had created one index.php file where all my requests goes and c.reated two controller one is IndexController and other is TestController Class IndexController extends Zend_Controller_Action{ public function indexAction(){ echo "Index Index Jamla"; } public function displayAction(){ echo "Index Display Jamla"; } } now when i access the url http://test/ it correctly calls IndexController and its IndexAction function but when i access the url http://test/index/index it displays the message url /index/index was not found on this server same it does when i access http://test/test/index though http://test/ is equivalent to http://test/index/index

    Read the article

  • ftp : get list of files

    - by Rohan
    I am trying to get a list of files on FTP folder. The code was working when I ran it locally, but on deploying it I started receiving html instead of file name ArrayList fName = new ArrayList(); try { StringBuilder result = new StringBuilder(); //create the directory FtpWebRequest requestDir = (FtpWebRequest)FtpWebRequest.Create(new Uri(directory)); requestDir.Method = WebRequestMethods.Ftp.ListDirectory; requestDir.Credentials = new NetworkCredential(FTP_USER_NAME, FTP_PASSWORD); requestDir.UsePassive = true; requestDir.UseBinary = true; requestDir.KeepAlive = false; requestDir.Proxy = null; FtpWebResponse response = (FtpWebResponse)requestDir.GetResponse(); Stream ftpStream = response.GetResponseStream(); StreamReader reader = new StreamReader(ftpStream, Encoding.ASCII); while (!reader.EndOfStream) { fName.Add(reader.ReadLine().ToString()); } response.Close(); ftpStream.Close(); reader.Close();

    Read the article

  • How do I add line-height to a <select> using jQuery?

    - by Rohan
    I have a element <select name="dropdown" id="dropdown"> <option>Option 1</option> <option>Option 2</option> <option>Option 3</option> <option>Option 4</option> </select> Now if I add a CSS line-height property to the dropdown, it doesn't work. How would I use jQuery to style this? I prefer not to use plugins, because this is the only styling I wish to apply.

    Read the article

  • Javascript split with RegEx

    - by Rohan
    Hey again, I just asked a question about Regex, and received a great answer: http://stackoverflow.com/questions/3047201/javascript-split-without-losing-character Now, I have another question. My current Regex looks like this: var split = text.split(/(?=\w*\d*\d:\d\d)/); Basically, I'm trying to split using the timestamps (eg - 9:30 or 10:30, the difference between them is the extra digit in the latter). How do I go about this? Currently, if I have these two: 9:30 pm The user did action A. 10:30 pm Welcome, user John Doe. The splits are : 9:30 pm The user did action A. ---- 1 ---- 0:30 pm Welcome, user John Doe. How do I add an optional check for the first character in the timestamp? Thanks!

    Read the article

  • Getting Undefined index errors when trying to use $_POST

    - by Apoorv Agrawal
    I'm getting the following error messages: Notice: Undefined index: name in C:\xampp\htdocs\ApoorvProject\PostMethod.php on line 7 Notice: Undefined index: email in C:\xampp\htdocs\ApoorvProject\PostMethod.php on line 9 This is what line 7 and line 9 contains: echo $_POST["name"]; echo "<br>"; echo $_POST["email"]; This is the body of my HTML documnent: <form action="PostMethod.php" method="post"> Name: <input type="text" name="name" /> Email: <input type="text" name="email" /> <input type="submit" /> </form> PostMethod.php is the name of my PHP file.

    Read the article

  • How do I add line-heigh to a <select> using jQuery?

    - by Rohan
    I have a element <select name="dropdown" id="dropdown"> <option>Option 1</option> <option>Option 2</option> <option>Option 3</option> <option>Option 4</option> </select> Now if I add a CSS line-height property to the dropdown, it doesn't work. How would I use jQuery to style this? I prefer not to use plugins, because this is the only styling I wish to apply.

    Read the article

  • Using XMLHttpRequest ??

    - by Rohan
    Hey I'd like to know how to use XMLHttpRequest to load the content of a remote URL and have the HTML of the accessed site stored in a JS variable. Say, if I wanted to load and alert() the HTML of http://foo.com/bar.php, how would I do that? Thanks!

    Read the article

  • How to convert a PHP object to a string?

    - by Rohan
    I get this error: Catchable fatal error: Object of class stdClass could not be converted to string So, my question is, how do I convert an object to a string in PHP? I don't want to serialize it though. Just a note: the code I use works in PHP 4, but not in PHP 5 Thanks!

    Read the article

  • PHP arrays & keys - fetching particular ones

    - by Rohan
    Hi Lets say I have an array with a structure like this: $arr= Array( array( "id"=>"a" "type">"apple"), array( "id"=>"b"), array( "id"=>"c"), array( "id"=>"c" "type"=>"banana") ); now I want to have a foreach loop which fetches all the array elements which have a key in them named "type". Something like foreach(all arrays which have type in them as $item) How would I do that? many thanks.

    Read the article

  • Replacing innertext of XML node using PHP DOMDocument

    - by Rohan Kumar
    I want to replace innertext of a XML node my XML file named test.xml is <?xml version="1.0" encoding="utf-8"?> <ads> <loop>no</loop> <item> <description>Description 1</description> </item> <item> <description>Text in item2</description> </item> <item> <description>Let play with this XML</description> </item> </ads> I want to change the value of loop and description tag both, and it should be saved in test.xml like: <?xml version="1.0" encoding="utf-8"?> <ads> <loop>yes</loop> <item> <description>Description Changing Here</description> </item> <item> <description>Changing text in item2</description> </item> <item> <description>We will play later</description> </item> </ads> I tried code in PHP: <? $file = "test.xml"; $fp = fopen($file, "rb") or die("cannot open file"); $str = fread($fp, filesize($file)); $dom=new DOMDocument(); $dom->formatOutput = true; $dom->preserveWhiteSpace = false; $dom->loadXML($str) or die("Error"); //$dom->load("items.xml"); $root=$dom->documentElement; // This can differ (I am not sure, it can be only documentElement or documentElement->firstChild or only firstChild) $loop=$root->getElementsByTagName('loop')->item(0);//->textContent; //echo $loop; if(trim($loop->textContent)=='no') { echo 'ok'; $root->getElementsByTagName('loop')->item(0)->nodeValue ='yes'; } echo "<xmp>NEW:\n". $dom->saveXML() ."</xmp>"; ?> I tried only for loop tag.I don't know how to replace nodevalue in description tag. When I run this page it shows output like: ok NEW: <?xml version="1.0" encoding="utf-8"?> <ads> <loop>yes</loop> <item> <description>Description 1</description> </item> <item> <description>Changing text in item2</description> </item> <item> <description>Let play with this XML</description> </item> </ads> It gives the value yes in browser but don't save it in test.xml any reason?

    Read the article

  • A pointer member variable having different values

    - by Rohan Prabhu
    Ok, to begin with, this is my code: HyperSprite::HyperSprite() { _view = 0; } void HyperSprite::publish(QGraphicsView* view) { _view = view; } void HyperSprite::getKFrame() { if(_view != 0) { qDebug()<<(void*)_view; } } Now, if I call HyperSprite::getKFrame() from within main(), I get the output: 0xbf8ffb84 I have a TCP server, which requires this QGraphicsView* variable. So whenever a new connection is made, HyperSprite::getKFrame() is called. However, whenever I make a connection to my server, this is the output: 0x1e425ff I honestly don't understand this. Shouldn't the value of a member remain same throughout? Why is the pointer value changing? As is obvious, whenever I try to use the _view pointer to access any of its members, a Segmentation Fault occurs. I tried using QSharedPointer, but it also results in the same problem. The data of the QSharedPointer automatically changes. Why is this happening?

    Read the article

  • SF Bay Area Event, November 1st: SPARC 25th Anniversary at Computer History Museum

    - by Larry Wake
    For those of you in the Bay Area, there's going to be what promises to be a very interesting event at the Computer History Museum on Thursday, November 1st at 11 AM: "SPARC at 25: Past, Present and Future". The panel event will feature Sun Microsystems founders Bill Joy and Andy Bechtolsheim, SPARC luminaries such as Anant Agrawal and David Patterson, former Sun VP Bernard Lacroute, plus Oracle executives Mark Hurd, John Fowler and Rick Hetherington. For those of you who can't attend, we expect to have video of the event afterward, but if you can make it in person, this is a unique opportunity to hear from industry pioneers, as well as get insights into future SPARC innovations. Plus, you can see SPARC (and non-SPARC) related exhibits from both the Computer History Museum and the personal collections of some of the panel participants. I hope you can join us; Register today.

    Read the article

  • AIOUG TechDay @ Lovely Professional University, Jalandhar, India

    - by Tori Wieldt
    by guest blogger Jitendra Chittoda, co-leader, Delhi and NCR JUG On 30 August 2013, Lovely Professional University (LPU) Jalandhar organized an All India Oracle User Group (AIOUG) TechDay event on Oracle and Java. This was a full day event with various sessions on J2EE 6, Java Concurrency, NoSQL, MongoDB, Oracle 12c, Oracle ADF etc. It was an overwhelming response from students, auditorium was jam packed with 600+ LPU energetic students of B.Tech and MCA stream. Navein Juneja Sr. Director LPU gave the keynote and introduced the speakers of AIOUG and Delhi & NCR Java User Group (DaNJUG). Mr. Juneja explained about the LPU and its students. He explained how Oracle and Java is most used and accepted technologies in world. Rohit Dhand Additional Dean LPU came on stage and share about how his career started with Oracle databases. He encouraged students to learn these technologies and build their career. Satyendra Kumar vice-president AIOUG thanked LPU and their stuff for organizing such a good technical event and students for their overwhelming response.  He talked about the India Oracle group and its events at various geographical locations all over India. Jitendra Chittoda Co-Leader DaNJUG explained how to make a new Java User Groups (JUG), what are its benefits and how to promote it. He explained how the Indian JUGs are contributing to the different initiatives like Adopt-a-JSR and Adopt-OpenJDK. After the inaugural address event started with two different tracks one for Oracle Database and another for Java and its related technologies. Speakers: Satyendra Kumar Pasalapudi (Co-founder and Vice President of AIOUG) Aman Sharma (Oracle Database Consultant and Instructor) Shekhar Gulati (OpenShift Developer Evangelist at RedHat) Rohan Walia (Oracle ADF Consultant at Oracle) Jitendra Chittoda (Co-leader Delhi & NCR JUG and Senior Developer at ION Trading)

    Read the article

< Previous Page | 1 2 3 4  | Next Page >