Search Results

Search found 267 results on 11 pages for 'kapil sharma'.

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

  • Youbikey Integration with php

    - by kapil
    Hi , I am finding a problem during the youbi key integration: $apiKey = $youbekeyvalue; //this value is coming from my form. $message = 'id=1234&otp='.$key.'';//key has been i am saving in the database for a particular user. $signature = hash_hmac('sha1', $message, $apiKey, TRUE); $signature = base64_encode($signature); $url = 'http://api.yubico.com/wsapi/verify?'.$message.'&h='.$signature.''; // $url becomes http://api.yubico.com/wsapi/verify?id=1&otp=ddkwn3kdlsh3kglskeh3kld&h=ODK20DHD92LSHGKJLSL3KSL $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $result = curl_exec($ch); print_r($result); curl_close($ch); $statusstring = stristr($result,"status="); $finalresponse = explode("=",$statusstring); if($finalresponse[1]=="OK") return 1; else return 0; Every time i am using this code it is giving me the response the bad signature. Can anyone please help me out to give me the working you bi key code where i can get the status ok.

    Read the article

  • how to send JSON data with server error response code 500

    - by kapil.israni
    I wanted to know if theres a way to send a JSON data along with HTTP response code 500. Basically I want my rest client to know that there is some error on the backend and along with it send a JSON error data structure like this. {"error" : [ {"code": "1001", "desc": "Some error description"}, {"code": "1002", "desc": "Some other error description"} ] } This is using the following java stack = Java 6/JAX-RS/Jersey/Tomcat If not, then is there a way to send a custom response code along with JSON data. Basically looking from JAX-RS API it looks that you can only send JSON data along with 200 OK?? Any thoughts?? I am guessing RESTEasy would be the same, right??

    Read the article

  • Checking contents of Uploaded file

    - by kapil
    Hi all, I am using ASP.NEt MVC . I want to upload .zip files for which I am using html input file upload control on my view. I want only .zip files to be uploaded. I want to check that my .zip contains only two files - both having extensions .txt and one of them having name "start". Can anyone please suggest me about how to check this? How can we assure that the uploaded .zip is really a zipped folder and not any other file having just .zip extension. can we use HttpPostedFileBase.ContentType? thanks in advance, kaps

    Read the article

  • psqlODBC won't load after installing MS SQL ODBC driver on RHEL 6

    - by Kapil Vyas
    I had the PostgreSQL drivers working on my RHEL 6. But after I installed Microsoft® SQL Server® ODBC Driver 1.0 for Linux I can no longer connect to PosgreSQL data sources. I can connect to SQL Server data sources fine. When I had this same issue a week ago I uninstalled MS SQL Server ODBC driver from Linux and it fixed the issue. I had to copy the psqlodbcw.so files from another machine to replenish the files. I don't want to do the same this time. I want both drivers to work on Linux. This time around the setup files got deleted: /usr/lib64/libodbcpsqlS.so. Replenishing it did not fix the issue. I kept getting the following error in spite of the file being present with rwx permisions: [root@localhost lib64]# isql -v STUDENT dsname pwd12345 [01000][unixODBC][Driver Manager]Can't open lib '/usr/lib64/psqlodbc.so' : file not found [ISQL]ERROR: Could not SQLConnect [root@localhost lib64]# Here is a printout of the file permissions: [root@localhost lib64]# ls -al p*.so lrwxrwxrwx. 1 root root 12 Dec 7 09:15 psqlodbc.so -> psqlodbcw.so -rwxr-xr-x. 1 root root 519496 Dec 7 09:35 psqlodbcw.so and my odbcinst.ini file looks as follows: [PostgreSQL] Description=ODBC for PostgreSQL Driver=/usr/lib/psqlodbc.so Driver64=/usr/lib64/psqlodbc.so Setup=/usr/lib/libodbcpsqlS.so Setup64=/usr/lib64/libodbcpsqlS.so FileUsage=1 UsageCount=4 I also referred to this link: http://mailman.unixodbc.org/pipermail/unixodbc-support/2010-September.txt

    Read the article

  • Path to background in servlet

    - by kapil chhattani
    //the below line is the element of my HTML form which renders the image sent by the servlet written further below. <img style="margin-left:91px; margin-top:-6px;" class="image" src="http://www.abcd.com/captchaServlet"> I generate a captcha code using the following code in java. public class captchaServlet extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { int width = 150; int height = 50; int charsToPrint = 6; String elegibleChars = "ABCDEFGHJKLMPQRSTUVWXYabcdefhjkmnpqrstuvwxy1234567890"; char[] chars = elegibleChars.toCharArray(); StringBuffer finalString = new StringBuffer(); for ( int i = 0; i < charsToPrint; i++ ) { double randomValue = Math.random(); int randomIndex = (int) Math.round(randomValue * (chars.length - 1)); char characterToShow = chars[randomIndex]; finalString.append(characterToShow); } System.out.println(finalString); BufferedImage bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); Graphics2D g2d = bufferedImage.createGraphics(); Font font = new Font("Georgia", Font.BOLD, 18); g2d.setFont(font); RenderingHints rh = new RenderingHints( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); rh.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); g2d.setRenderingHints(rh); GradientPaint gp = new GradientPaint(0, 0, Color.BLUE, 0, height/2, Color.black, true); g2d.setPaint(gp); g2d.fillRect(0, 0, width, height); g2d.setColor(new Color(255, 255, 0)); Random r = new Random(); int index = Math.abs(r.nextInt()) % 5; char[] data=new String(finalString).toCharArray(); String captcha = String.copyValueOf(data); int x = 0; int y = 0; for (int i=0; i<data.length; i++) { x += 10 + (Math.abs(r.nextInt()) % 15); y = 20 + Math.abs(r.nextInt()) % 20; g2d.drawChars(data, i, 1, x, y); } g2d.dispose(); response.setContentType("image/png"); OutputStream os = response.getOutputStream(); ImageIO.write(bufferedImage, "png", os); os.close(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } } But in the above code background is also generated using the setPaint menthod I am guessing. I want the background to be some image from my local machine whoz URL i should be able to mention like URL url=this.getClass().getResource("Desktop/images.jpg"); BufferedImage bufferedImage = ImageIO.read(url); I am just writing the above two lines for making the reader understand better what the issue is. Dont want to use the exact same commands. All I want is the the background of the captcha code generated should be an image of my choice.

    Read the article

  • aapt.exe has stopped working and R.java cannot be resolved after adding Google Play Services library to an existing project

    - by Kapil Kapri
    I'm trying to add new google-play-services_lib in my old project, due to which R.jave file is removed from the project. Also, as soon as i remove google-play-services_lib, i get my R.java file back. minimum sdk version is 11. I'm referring to following link: https://developer.android.com/google/play-services/setup.html I am following these steps to add library as a project == Right-click on My project - Properties In Android-Library section click Add select recently added project - Ok then aapt.exe has stopped working and R.jave file is removed from the project

    Read the article

  • DKIM- Filter No Signature Data

    - by Vineet Sharma
    I have installed DKIM-Filter on Postfix after reading this tutorial http://www.unibia.com/unibianet/systems-networking/how-setup-domainkeys-identified-mail-dkim-postfix-and-ubuntu-server My email now has a DKIM signature but still it is landing in the SPAM folder. Here is the header Received-SPF: neutral (google.com: 69.164.193.167 is neither permitted nor denied by best guess record for domain of [email protected]) client-ip=69.164.193.167; Authentication-Results: mx.google.com; spf=neutral (google.com: 69.164.193.167 is neither permitted nor denied by best guess record for domain of [email protected]) [email protected]; dkim=hardfail (test mode) [email protected] Received: from promote.a2labs.in (localhost [127.0.0.1]) by promote.a2labs.in (Postfix) with ESMTPA id 34858530E8 for <[email protected]>; Mon, 28 Feb 2011 12:23:07 +0530 (IST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=a2labs.in; s=mail; t=1298875987; bh=bo+H1VYPIHMja2u7i1lnzr4k/j4Pe8iSf79bVw94XpI=; h=To:Subject:Message-ID:Date:From:Reply-To:MIME-Version: Content-Type:Content-Transfer-Encoding; b=nhTdlnUwo0iUJ92ycQzKSRjw 5Pfya0DJcJrAc8Mr2hIv8OLpgzBCzdOMWTGqR5nuUmAzgCGYBhYAM2XZwVxo9JG/iz7 oYKysmNQnskFx0TRyW3UOkDWcfHcPnCL6Y7fGzZWinmsyjsg47k+mKZg/e8jqlwTAMO PYKkt5pBz7SM0= Also my mail.err file shows Feb 28 12:17:03 ivineet dkim-filter[32181]: 1F788530E1: no signature data Feb 28 12:18:02 ivineet dkim-filter[32181]: 432BA530E2: no signature data How to fix it

    Read the article

  • Blue screen of death while installing any Adobe Air application

    - by Gaurav Sharma
    Whenever I try to install an Air application I get a Blue Screen and then my system restarts. I cannot even take a screenshot of it. This happens with every air application I try to install. I also searched for the same on Adobe forums and found the same problem being faced by someone else. His problem was resolved by uninstalling a software named "Folder Lock". I searched my hard disk for this software and found one, so I deleted that software (shift+delete) and removed all it's traces from registry too but that still doesn't solved the problem. I also tried disabling the antivirus software and then install the air application but this also didn't helped. Here is the screenshot of the BSOD. I was able to install air applications earlier, but now I can't. Anybody having same sort of problem. One colleague of mine is also having the same problem. Please help me out. My system's config is as follows: Windows XP Home sp3 Flash Builder 4, with SDK 4.1, 3.5 installed in it. Adobe Air v 2.5 1.5 GB RAM 1.66 MHz processor Thanks

    Read the article

  • Make My Own Made Java Based Text editor as default Text Editor in Windows

    - by Rohan Sharma
    I have Made a Text Editor in Java and i want to make it default text editor ,That is like in windows we have notepad as default text whose icon shows on all text files and double clicking those file(s) opens the file(s) in notepad window.. I Want to achieve same Task of Making my texte editor as default one...but only right clicking a text file and selecting my text editor as default app for opening text files do not servers the purpose,Because my text editor will not accept the file input that way,its made to accept the file input only by FileChooser...so Is There any library in java to achieve that task Of Accepting The File Input That way???

    Read the article

  • Need deleted data back from Pen Drive, Please help

    - by Manav Sharma
    All, I am using a Pendrive to transfer files from one system to another. I think I deleted some files from the Pendrive that I now need back. Also, there are chances that I might have overwritten the memory where the deleted data might have existed. Is there any software to do something about that? I understand that logically whatever is overwritten in memory cannot to fetched back. But still I need to trust the advances in the technology. Any help is appreciated. Thanks

    Read the article

  • How do I configure Ruby On Rails on windows XP with APACHE and MYSQL

    - by Gaurav Sharma
    Hello Everyone, It has been quite some time I am struggling to get Ruby On Rails working on my System which is having Windows XP operating system. I am trying to configure ROR to use apache and mysql so that I do not have to install additional servers to run ruby on rails. I also tried InstantRails but faced same problems. I went through the tutorial mentioned in getting rails to wrok on a windows machine running xampp and did all the steps which were necessary. All went fine (installing rails, running the ruby, gem and rails command from command prompt) but when I tried to run my application by typing localhost:3000/say/hello nothing happened and I was redirected to the google page for searching to this keyword. Please help me Thanks

    Read the article

  • web (html) gui building software

    - by Gaurav Sharma
    Hello everyone, I am in need of a software (preferablly free/open source) which facilitates fast and easy creation of html form and controls with proper styling. Similar to MachForms. This utility saves me a lot of time but there is one limitation of using it. The source code remains with the server only. Help me find a capable solution. Thanks

    Read the article

  • DKIM- Filter No Signature Data

    - by Vineet Sharma
    I have installed DKIM-Filter on Postfix after reading this tutorial http://www.unibia.com/unibianet/systems-networking/how-setup-domainkeys-identified-mail-dkim-postfix-and-ubuntu-server My email now has a DKIM signature but still it is landing in the SPAM folder. Here is the header Received-SPF: neutral (google.com: 69.164.193.167 is neither permitted nor denied by best guess record for domain of [email protected]) client-ip=69.164.193.167; Authentication-Results: mx.google.com; spf=neutral (google.com: 69.164.193.167 is neither permitted nor denied by best guess record for domain of [email protected]) [email protected]; dkim=hardfail (test mode) [email protected] Received: from promote.a2labs.in (localhost [127.0.0.1]) by promote.a2labs.in (Postfix) with ESMTPA id 34858530E8 for <[email protected]>; Mon, 28 Feb 2011 12:23:07 +0530 (IST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=a2labs.in; s=mail; t=1298875987; bh=bo+H1VYPIHMja2u7i1lnzr4k/j4Pe8iSf79bVw94XpI=; h=To:Subject:Message-ID:Date:From:Reply-To:MIME-Version: Content-Type:Content-Transfer-Encoding; b=nhTdlnUwo0iUJ92ycQzKSRjw 5Pfya0DJcJrAc8Mr2hIv8OLpgzBCzdOMWTGqR5nuUmAzgCGYBhYAM2XZwVxo9JG/iz7 oYKysmNQnskFx0TRyW3UOkDWcfHcPnCL6Y7fGzZWinmsyjsg47k+mKZg/e8jqlwTAMO PYKkt5pBz7SM0= Also my mail.err file shows Feb 28 12:17:03 ivineet dkim-filter[32181]: 1F788530E1: no signature data Feb 28 12:18:02 ivineet dkim-filter[32181]: 432BA530E2: no signature data How to fix it

    Read the article

  • Thunderbird-3 keeps on downloading already downloaded messages again?

    - by Vivek Sharma
    I am using Thunderbird for my gmail account, with IMAP settings. All my folders are synchronized. A very strange behavior, after all my mails are downloaded, TB3 starts downloading email again. At times saying "downloading x out of y messages" where x y (like now downloading 19 out of 11 messages). Had the same problem in TB3 for windows so, replaced TB with Outlook-07, issue resolved. But on linux, I dont like the evolution's interface, so i have no choice but to stick to TB. Any suggestions how to TB not eat my bandwidth.

    Read the article

  • What is the default mount point on Linux systems (all)?

    - by Vijay Sharma
    My question is very basic in nature. Is the mount point for external media (like USB) always /media? Because in a Debian system, if I plug in any USB device that goes to the /media folder. So is it the case with all the other Linux flavors like Fedora, Ubuntu, etc. If a USB device is automatically mounted will it always go to the /media directory?

    Read the article

  • Windows shutting down, CPU maxing out in Windows-7 32-bit? [closed]

    - by Vivek Sharma
    I have no idea, what is happening to my laptop. For last 5-6 times it has automatically shutdown while running, without doing anything serious. And I even do get the message during boot which says - Start windows normal - Start in safe mode It just boots up normal. Few days ago, my screen blinked and it the PC shutdown immediately. After that I was not able to get it started. I got it repaired, the guy said he has replaced the display chip (nVidia-nvs-140), but i seriously doubt that. Now it started working, but would shutdown every 20 mins or so. I have a dual boot, ubuntu-11.10 works just fine. Virus scan on windows shows nothing. I am pasting my perfmon output. My CPU for reason is maxing out to 100% continously, for windows internal processes. Please have a look at the attached file. Strangly now for last 2 hours it is working fine, but i am just writing emails and reading excels. ThinkPad T61 | t9300 | 3gb | nVidia 140 nvs-quadro (latest driver 296.10) What do you suggest?

    Read the article

  • attach two hdds to a computer having 500W smps

    - by Gaurav Sharma
    I have a desktop system installed with a 250 GB hdd (seagate sata II) this system is having a power supply of 500W (not sure if it is 650W but not more than that) the power supply is a local brand. Will it be safe to attach a second 250 GB sata II hdd on the same system. Safe in the sense that the system may not fall short of power at any time. My system's config is as follows Core2Duo processor Mercury cabinet having an additional fan (small one) sata dvd writer 52X windows xp sp 2 ASUS motherboard (intel G965 express chipset) If the above specified power supply is not sufficient for above configuration of system then please suggest the appropriate power supply (including watts)

    Read the article

  • startup failed due to previous errors

    - by dileep sharma
    this is the error im getting now [QUOTE]12-jun-2012 12:22:45 org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive ZangV3Spring.war 12-jun-2012 12:22:49 org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart 12-jun-2012 12:22:49 org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/ZangV3Spring] startup failed due to previous errors plz solved this problem

    Read the article

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