Search Results

Search found 362 results on 15 pages for 'ankur sharma'.

Page 9/15 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • I need a simple Example of JNA which can map char * of c dll.

    - by Vikas Sharma
    I have one dll of cpp and i need to call its function which returns char*. Im using String in native Declaration but getting out put like ???? or some crap thing. I just want to knw that do i have to decode the String.i have already set my system property like System.setProperty("jna.encoding","UTF-8"); Im in big mess. Hope to get Some Positive replies from u guys. Thanks in Advance.. Cheers...!

    Read the article

  • Easiest way to pass a javascript array or its values to a servlet using jQuery's ajax() function

    - by Ankur
    I have a Javascript array. I want to pass it's data to a servlet using the ajax() method of jQuery. What is the easiest way to do this. The index values i.e. the i in array[i] are not in order, they are numbers that have meaning themselves, hence I cannot simply loop through and create a GET queryString, or so I believe. Maybe I should be converting the JavaScript array to a JSON Object and sending that to the server ?? I am stumped on this one.

    Read the article

  • URI scheme is not "file"

    - by Ankur
    I get the exception: "URI scheme is not file" The url I am playing with is ... and it very much is a file http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/domefisheye/ladybug/fish4.jpg What I am doing is trying to get the name of a file and then save that file (from another server) onto my computer/server from within a servlet. I have a String called "url", from thereon here is my code: url = Streams.asString(stream); //gets the URL from a form on a webpage System.out.println("This is the URL: "+url); URI fileUri = new URI(url); File fileFromUri = new File(fileUri); onlyFile = fileFromUri.getName(); URL fileUrl = new URL(url); InputStream imageStream = fileUrl.openStream(); String fileLoc2 = getServletContext().getRealPath("pics/"+onlyFile); File newFolder = new File(getServletContext().getRealPath("pics")); if(!newFolder.exists()){ newFolder.mkdir(); } IOUtils.copy(imageStream, new FileOutputStream("pics/"+onlyFile)); } The line causing the error is this one: File fileFromUri = new File(fileUri); I have added the rest of the code so you can see what I am trying to do.

    Read the article

  • insert multiple elements in string in python

    - by Anurag Sharma
    I have to build a string like this { name: "john", url: "www.dkd.com", email: "[email protected]" } where john, www.dkd.com and [email protected] are to be supplied by variables I tried to do the following s1 = "{'name:' {0},'url:' {1},'emailid:' {2}}" s1.format("john","www.dkd.com","[email protected]") I am getting the following error Traceback (most recent call last): File "<stdin>", line 1, in <module> KeyError: "'name" Dont able to understand what I am doing wrong

    Read the article

  • blitting issue when blitting to wxGCDC from a wxMemoryDC

    - by mukul sharma
    Hi All, I have loaded a wxBitmap (with transparency .png) in memoryDC now when i am blitting the data from the memoryDc to GCDC that time in transparent part its giving the black color. But if remove the GCDC and use normal ClientDC for display purpose there is no such problem happening, but i cannot remove the wxGCDC because this is only support the transparency in color drawing. Any solution or workaround really helpful. Thanks in advanced

    Read the article

  • display HTML content from database with formatting in it

    - by Gaurav Sharma
    Hi all, I have used wmd-editor in my cakephp v1.3 application. The config which I have written is as follows: wmd_options = { output: "HTML", lineLength: 40, buttons: "bold italic | link blockquote code image | ol ul heading hr", autostart: true }; When I submit the form the HTML in the wmd enabled textarea is saved in the database with htmlentities() done to the text then I am displaying it with html_entity_decode() method. but the text is displayed as it is including the HTML coding like this <p><strong>hello dear friends</strong></p>\n\n<pre><code>I want to make sure that everything that you type is visible clearly.\nadasfafas\n</code></pre>\n\n<blockquote>\n <p>sadgsagasdgxcbxcbxc</p>\n</blockquote>\n\n<p><em>sadfgsgasdsgasgs</em></p>\n\n<p><b><a href="http://kumu.in">this is the link</a></b></p> Please help me solve this problem Thanks

    Read the article

  • Ember multiple property changes but want to trigger single event

    - by Ankur Agarwal
    I have a ArrayController for date picker with properties to and from. Now when user selects a new date range from the UI both to and from value changes. So a function which observers on to and from is trigger twice for a single change in date range. I want to trigger the function only one every date range change. Any suggestions how to do that with ember app = Ember.Application.create(); app.Time = Ember.ArrayController.create({ to: null, from: null, rootElement: "#time", debug1: function() { this.set('to', 1); this.set('from', 2); }, debug2: function() { this.setProperties( { 'to': 3, 'from': 4 }); }, debug3: function() { this.beginPropertyChanges(); this.set('to', 5); this.set('from', 6); this.endPropertyChanges(); }, search: function() { alert('called'); }.observes('to', 'from') }); View in JS Fiddle

    Read the article

  • cahoots - zend framework application is not running

    - by Gaurav Sharma
    hello everyone, I downloaded cahoots from sourceforge.net. It is a zend framework application. Very nicely done and I must say that it should be a nice tutorial for everyone who is struggling to learn Zend framework. But my problem is that even after reading the instructions this application is still not running. The application just doesn't run at all giving an error message. I have tried my best. no success :( Also I wanted to execute the application as "http://localhost/cahoots" but it runs by this URL "http://localhost/cahoots/public". why is it so.? I am using XAMPP v 1.7.1 with mod-rewrite enabled. Please guide me through the process. Any good tutorials on zend framework with zend tool would be appreciable. I want to learn this framework. Thanks

    Read the article

  • Intersect in mysql

    - by Ankur Jariwala
    Hello everyone I need to implement following query in mysql (select * from emovis_reporting where (id=3 and cut_name= '?????' and cut_name='??') ) intersect ( select * from emovis_reporting where (id=3) and ( cut_name='?????' or cut_name='??') ) I know that intersect is not in m Mysql. So I need alternate way. Please guide me....

    Read the article

  • Selecting an element based on class and id in jquery - similar to an SQL query

    - by Ankur
    I want to select an element based on it's class and id, I have seen many similar questions on SO. Most of the users ask why would you ever want to do this - which is not very helpful, trust me, this is the simplest way of solving my UI problem, and it's a very unique and intereting UI related to making generic triple stores easily browsable. At the moment the jQUery looks like this: $(document).ready( function() { $(".predicates").hide(); $(".objects").hide(); $("#subject").click( function() { $("#predId, .predicates").toggle(); // this line } ); $("#predId").click( function() { $("#objId, .objects").toggle(); } ); }); The line I am really interested in is this $("#predId, .predicates").toggle(); how do I get the select to ensure that both #predId and .predicates are true, at the moment it seems that only one or the other has to be true. Is there something like an && operator?

    Read the article

  • A strategy to troubleshoot/ fix application crashes in Windows?

    - by Manav Sharma
    All, Over a period of time I have observed that fixing issues related to application crash is a discipline in itself. Some people have this nice way of attacking such problems. Ranging from Viewing the 'Event Viewer' to running Static/ Dynamic memory analysis tools to some of their 'personal favorites', these people have developed this art. Can we share articles/ links/ personal approaches that we use to understand/ troubleshoot/ fix such issues? Thanks

    Read the article

  • javascript .push() doesn't seem to work

    - by Ankur
    I am trying to use .push to put items into a javascript array. I have created a simplified piece of code. When I click the button with id clickButton, I am expecting to get a series of alerts with numbers, but I get nothing. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Sempedia | Making computers think about data the way we do</title> <link href="css/styles.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery.js"></script> <script> $(document).ready( function() { var myArray = new Array(); //declare the array for(var i=0;i<=10;i++){ // create a loop myArray.push(i); // add an item to array } $("#clickButton").live('click',function() { //register the button being clicked for(var j=0;j<=10;j++){ //for loop alert(myArray[j]); //alert one item in the array } }); }); </script> </head> <body> <input type="button" value="click me" id="clickButton" /> </body> </html>

    Read the article

  • how to check the read write status of storing media in python

    - by mukul sharma
    Hi All, How can i check the read/ write permission of the file storing media? ie assume i have to write some file inside a directory and that directory may be available on read only media like (cd or dvd)or etc. So how can i check that storing media ( cd, hard disk) having a read only or read write both permission. I am using windows xp os. Thanks.

    Read the article

  • How to stop an application in C# ?

    - by Praveen Sharma
    Hi All, I have an application and from this application I have to start another process by shutting down the current application and after the completion of the process again start the application. The flow is as follows, suppose I have an application app.exe, and another application another.exe, so i have to do following: 1) Start app.exe 2) Stop/shutdown app.exe and start another.exe from app.exe 3) When another.exe completes, stop/shutdown another.exe and start app.exe from another.exe Anyone please provide me some clue of how to do it ? Thanks in advance for any help...

    Read the article

  • Checking for Error during execution of a procedure in oracle

    - by Sumit Sharma
    create or replace procedure proc_advertisement(CustomerID in Number, NewspaperID in number, StaffID in Number, OrderDate in date, PublishDate in date, Type in varchar, Status in varchar, Units in number) is begin insert into PMS.Advertisement(CustomerID, NewspaperID, StaffID, OrderDate, PublishDate, Type, Status, Units) values(CustomerID,NewspaperID, StaffID, OrderDate, PublishDate, Type, Status, Units); dbms_output.put_line('Advertisement Order Placed Successfully'); end; How to check for if any error has occurred during the execution of the procedure and if any error has occurred then I wish to display an error message.

    Read the article

  • Form Validation using javascript in joomla...

    - by Ankur
    I want to use form validation. I have used javascript for this and I have downloaded the com_php0.1alpha-J15.tar component for writing php code but the blank entries are goes to the database. Please guide me... sample code is here... <script language="javascript" type="text/javascript"> function Validation() { if(document.getElementById("name").value=="") { document.getElementById("nameerr").innerHTML="Enter Name"; document.getElementById("name").style.backgroundColor = "yellow"; } else { document.getElementById("nameerr").innerHTML=""; document.getElementById("name").style.backgroundColor = "White"; } if(document.getElementById("email").value=="") { document.getElementById("emailerr").innerHTML="Enter Email"; document.getElementById("email").style.backgroundColor = "yellow"; } else { document.getElementById("emailerr").innerHTML=""; document.getElementById("email").style.backgroundColor = "White"; } if(document.getElementById("phone").value=="") { document.getElementById("phoneerr").innerHTML="Enter Contact No"; document.getElementById("phone").style.backgroundColor = "yellow"; } else { document.getElementById("phoneerr").innerHTML=""; document.getElementById("phone").style.backgroundColor = "White"; } if(document.getElementById("society").value=="") { document.getElementById("societyerr").innerHTML="Enter Society"; document.getElementById("society").style.backgroundColor = "yellow"; } else { document.getElementById("societyerr").innerHTML=""; document.getElementById("society").style.backgroundColor = "White"; } if(document.getElementById("occupation").value=="") { document.getElementById("occupationerr").innerHTML="Enter Occupation"; document.getElementById("occupation").style.backgroundColor = "yellow"; } else { document.getElementById("occupationerr").innerHTML=""; document.getElementById("occupation").style.backgroundColor = "White"; } if(document.getElementById("feedback").value=="") { document.getElementById("feedbackerr").innerHTML="Enter Feedback"; document.getElementById("feedback").style.backgroundColor = "yellow"; } else { document.getElementById("feedbackerr").innerHTML=""; document.getElementById("feedback").style.backgroundColor = "White"; } if(document.getElementById("name").value=="" || document.getElementById("email").value=="" || document.getElementById("phone").value=="" || document.getElementById("society").value=="" || document.getElementById("occupation").value=="" || document.getElementById("feedback").value=="") return false; else return true; } </script> <?php if(isset($_POST['submit'])) { $conn = mysql_connect('localhost','root',''); mysql_select_db('society_f',$conn); $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $society = $_POST['society']; $occupation = $_POST['occupation']; $feedback = $_POST['feedback']; $qry = "insert into feedback values(null". ",'" . $name . "','" . $email . "','" . $phone . "','" . $society . "','" . $occupation . "','" . $feedback . "')" ; $res = mysql_query($qry); if(!$res) { echo "Could not run a query" . mysql_error(); exit(); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> .td{ background-color:#FFFFFF; color:#000066; width:100px; } .text{ border:1px solid #0033FF; color:#000000; } </style> </head> <body> <form id="form1" method="post"> <input type="hidden" name="check" value="post"/> <table border="0" align="center" cellpadding="2" cellspacing="2"> <tr> <td colspan="3" style="text-align:center;"><span style="font-size:24px;color:#000066;">Feedback Form</span></td> </tr> <tr> <td class="td">Name</td> <td><input type="text" id="name" name="name" class="text" ></td> <td style="font-style:italic;color:#FF0000;" id="nameerr"></td> </tr> <tr> <td class="td">E-mail</td> <td><input type="text" id="Email" name="Email" class="text"></td> <td style="font-style:italic;color:#FF0000;" id="emailerr"></td> </tr> <tr> <td class="td">Contact No</td> <td><input type="text" id="Phone" name="Phone" maxlength="15" class="text"></td> <td style="font-style:italic;color:#FF0000;" id="Phoneerr"></td> </tr> <tr> <td class="td">Your Society</td> <td><input type="text" id="society" name="society" class="text"></td> <td style="font-style:italic;color:#FF0000;" id="societyerr"></td> </tr> <tr> <td class="td">Occupation</td> <td><input type="text" id="occupation" name="occupation" class="text"></td> <td style="font-style:italic;color:#FF0000;" id="occupationerr"></td> </tr> <tr> <td class="td">Feedback</td> <td><textarea name="feedback" id="feedback" class="text"></textarea></td> <td style="font-style:italic;color:#FF0000;" id="feedbackerr"></td> </tr> <tr> <td colspan="3" style="text-align:center;"> <input type="submit" value="Submit" id="submit" onClick="Validation();" /> <input type="reset" value="Reset" onClick="Resetme();" /> </td> </tr> </table> </form> </body> </html>

    Read the article

  • Is it safe to change the 'Security.salt' line to a more lengthy string {64 hex key}

    - by Gaurav Sharma
    Hi everyone, I have changed the Configure::write('Security.salt', '############'); value in the file config/core.php file to a '256-bit hex key'. Is it safe or a good practice to change these lines for every different installation of cakephp application or shall I revert back to the original ? I also changed the Configure::write('Security.cipherSeed','7927237598237592759727'); to a different one of more length. Please throw some light on this. Thanks

    Read the article

  • joomla component error

    - by ankur
    I have installed a joomla component and its working quite good but i am facing the problem that whenever i am trying to send mail by using the component iam always getting the message "Could not instantiate mail function." Please help me in getting the solution to the problem

    Read the article

  • reply to a comment via email and directly post it on the website commenting system

    - by Gaurav Sharma
    Hello Everybody, I have developed a website using PHP and MYSQL. The website has a commenting system through which registered users of the website can post comments on the feedback posted by different users. When a comment is posted for a feedback an email is sent to the user who posted that feedback notifying him of new comments on his feedback. Now what I want is that a feedback owner should be able to post a new comment in response to that comment by simply replying to the email that has been sent by the website. I hope I was able to explain my query properly. If it needs any improvement in explanation, I would be glad to know and make changes accordingly Thanks

    Read the article

  • Mimic an HTTPRequest and HTTPResponse object in Java

    - by Ankur
    How do I mimic an HTTPServletRequest and HTTPServletResponse object. The reason is I want to test the behaviour of some servlets. I know JUnit probably provides this functionality but I don't know how to use it (I will learn soon) and need to do this reasonably quickly. HTTPServletRequest and HTTPServletResponse are both interfaces so they can't be instantiated. There is a HttpServletRequestWrapper which implements HttpServletRequest but it doesn't seem to have any setParameter() type methods and HttpServletResponse doesn't seem to have any implementing classes at all. How can I test my code by passing a suitable HttpServletRequest object and then checking that the received HttpServletResponse object matches what I expect?

    Read the article

  • Error appearing in application after updating cakePHP library files from 1.3.0 to 1.3.1

    - by Gaurav Sharma
    Hi everyone, I have just updated my cakephp library to latest version 1.3.1. Before this I was running v1.3.0 with no errors. After running the application I am given this error message. unserialize() [function.unserialize]: Error at offset 0 of 2574 bytes [CORE\cake\libs\cache\file.php, line 176] I updated the libraries simply by replacing the existing cake files with the new ones downloaded from the net. Is it the correct way of updating applications. I did'nt made any customizations to the core library of cakePHP. What is the problem ? Please help. Thanks

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15  | Next Page >