Search Results

Search found 1202 results on 49 pages for 'prashant sp'.

Page 13/49 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • ibatis throwing NullPointerException

    - by Prashant P
    i am trying to test ibatis with DB. I get NullPointerException. Below are the class and ibatis bean config, <select id="getByWorkplaceId" parameterClass="java.lang.Integer" resultMap="result"> select * from WorkDetails where workplaceCode=#workplaceCode# </select> <select id="getWorkplace" resultClass="com.ibatis.text.WorkDetails"> select * from WorkDetails </select> POJO public class WorkplaceDetail implements Serializable { private static final long serialVersionUID = -6760386803958725272L; private int code; private String plant; private String compRegNum; private String numOfEmps; private String typeIndst; private String typeProd; private String note1; private String note2; private String note3; private String note4; private String note5; } DAOimplementation public class WorkplaceDetailImpl implements WorkplaceDetailsDAO { private SqlMapClient sqlMapClient; public void setSqlMapClient(SqlMapClient sqlMapClient) { this.sqlMapClient = sqlMapClient; } @Override public WorkplaceDetail getWorkplaceDetail(int code) { WorkplaceDetail workplaceDetail=new WorkplaceDetail(); try{ **workplaceDetail= (WorkplaceDetail) this.sqlMapClient.queryForObject("workplaceDetail.getByWorkplaceId", code);** }catch (SQLException sqlex){ sqlex.printStackTrace(); } return workplaceDetail; } TestCode public class TestDAO { public static void main(String args[]) throws Exception{ WorkplaceDetail wd = new WorkplaceDetail(126, "Hoonkee", "1234", "22", "Service", "Tele", "hsgd","hsgd","hsgd","hsgd","hsgd"); WorkplaceDetailImpl impl= new WorkplaceDetailImpl(); **impl.getWorkplaceDetail(wd.getCode());** impl.saveOrUpdateWorkplaceDetails(wd); System.out.println("dhsd"+impl); } } I want to select and insert. I have marked as ** ** as a point of exception in above code Exception in thread "main" java.lang.NullPointerException at com.ibatis.text.WorkplaceDetailImpl.getWorkplaceDetail(WorkplaceDetailImpl.java:19) at com.ibatis.text.TestDAO.main(TestDAO.java:11)

    Read the article

  • Sending URL as a parameter using javascript

    - by Prashant Singh
    I have to send a name and a link from client side to the server. I thought of using AJAX called by Javascript to do this. This is what I mean. I wished to make an ajax request to a file called abc.php with parameters :- 1. http://thumbs2.ebaystatic.com/m/m7dFgOtLUUUSpktHRspjhXw/140.jpg 2. Apple iPod touch, 3rd generation, 32GB To begin with, I encoded the URL and tried to send it. But the server says status Forbidden Any solution to this ? UPDATE :: It end up calling to http://abc.com/addToWishlist.php?rand=506075547542422&image=http://thumbs1.ebaystatic.com/m/mO64jQrMqam2jde9aKiXC9A/140.jpg&prod=Flat%20USB%20Data%20Sync%20Charging%20Charger%20Cable%20Apple%20iPhone%204G%204S%20iPod%20Touch%20Nano Javascript Code :: function addToWishlist(num) { var myurl = "addToWishlist.php"; var myurl1 = myurl; myRand = parseInt(Math.random()*999999999999999); var rand = "?rand="+myRand ; var modurl = myurl1+ rand + "&image=" + encodeURI(storeArray[num][1]) + "&prod=" + encodeURI(storeArray[num][0]); httpq2.open("GET", modurl, true); httpq2.onreadystatechange = useHttpResponseq2; httpq2.send(null); } function useHttpResponseq2() { if (httpq2.readyState == 4) { if(httpq2.status == 200) { var mytext = httpq2.responseText; document.getElementById('wish' + num).innerHTML = "Added to your wishlist."; } } } Server Code <?php include('/home/ankit/public_html/connect_db.php'); $image = $_GET['image']; $prod = $_GET['prod']; $id = $_GET['id']; echo $prod; echo $image; ?> As I mentioned, its pretty basics More Updates : On trying to send a POST request via AJAX to the server, it says :- Refused to set unsafe header "Content-length" Refused to set unsafe header "Connection"

    Read the article

  • Does jQuery or JavaScript have the concept of classes and objects?

    - by Prashant
    I found the following code somewhere, but I am not understanding the code properly. ArticleVote.submitVote('no');return false; Is ArticleVote a class and submitVote() a function of that class? Or what does the above code mean? And is there any concept of classes and objects in jQuery or in traditional JavaScript? How to create them? Please share some reference links or code.

    Read the article

  • Asp .net drop down width

    - by Prashant
    I have a drop down. I want the drop down to be of 200 px width but when some one clicks on the drop down button,(the contents which come below the drop down )should be of a greater width(say 300 px or self adjusting width based on text). Is that possible ?

    Read the article

  • How to make use of c++ xpcom component from javascript xpcom component.

    - by Prashant
    I have developed a xpcom component using c++. I have GetHWND() method in my component. I have also developed another xpcom component using javascript. I want to make use of GetHWND function in javascript xpcom component. I am using following code to do so. netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); var myComponent = Components.classes['@dougt/WebLock'].createInstance(Components.interfaces.IWebLock); myComponent = myComponent.QueryInterface(Components.interfaces.IWebLock); var res = myComponent.GetHWND(mainWindow.content.document); But it is giving error as "ReferenceError: netscape is not defined". I did google search but did not find the solution to it. I am using Mozilla Firefox and I want it to get worked for the same. Please help me to come out of this problem. Thanks in advance.

    Read the article

  • User control javascript

    - by Prashant
    Hi, I have a generic user control which will be used twice in a page. There is a javascript asscoiated with it which also needs to be added. How can I add this to a page since the javascript will be added multiple times.

    Read the article

  • PHP: How to access array values returned by a static function?

    - by Prashant
    I am running following code, getAccount() is a static function, $ac_info = AccountClass::getAccount($ac_code); print_r($ac_info); and getting following output AccountClass Object ( [account_code] => [email protected] [username] => XYZ [email] => [first_name] => [last_name] => [company_name] => [id] => [email protected] [balance_in_cents] => 0 [created_at] => 1271333048 [state] => active ) But I want to access the value of "account_code" shown above, how to access it, and AccountClass Object what is this, this is array or what? I am not getting it properly. Please explain what is AccountClass Object and how to access value of properties account_code, first_name inside this array. Thanks

    Read the article

  • How to check null objects in jQuery

    - by Prashant
    I am using jQuery, I want to check existence of an element in my page. I have done following code, but its not working? if ($("#btext" + i) != null){ //alert($("#btext" + i).text()); $("#btext" + i).text("Branch " + i); } Please tell me what will be the right code? Thanks

    Read the article

  • Sql server 2008 query

    - by Prashant
    I am trying to implement versioning of data I have two tables Client and Address. I have to display in the UI, the various updates in the order in which they were made but with the correct client version so, Client Table Address Table ---------- ---------- Client Version Modified Date Address Version ModifiedDate CV1 T1 AV1 T2 CV2 T4 AV2 T3 CV3 T5 My result should be CV1 AV1 (first version) CV1 AV2 (as AV1 was updated at T3) CV2 AV2 (as Client got updated to CV2 at T4) CV3 AV2 (As client has got updated at T5)

    Read the article

  • VS2010 throws exception while opening project

    - by Prashant
    When I try opening a project I get an exception saying Web application is configured to use IIS. Error : The Web Application Project EntityServices is configured to use IIS. To access local IIS Web sites, you must install the following IIS components: IIS 6 Metabase and IIS 6 Configuration Compatibility In addition, you must run Visual Studio in the context of an administrator account. NOTE - I have already installed IIS 7. My box is a x64 bit Windows 7 box.

    Read the article

  • Strange behavior of MySQL UPDATE query in PHP?

    - by Prashant
    When I am executing following query then its not updating views column by 1 instead sometimes its updating it by 2 or 3. Say currently views count is 24 then after executing this query it becomes 26 or sometimes its 27. $views = $views + 1; $_SQL = ''; $_SQL = 'UPDATE videos SET views = '.$views.' WHERE VideoId= "'.$videoid.'";'; @mysql_query($_SQL); I am not getting why this is happening, am I missing something or the query is executing 2 times automatically? Please help me to figure out the issue. Thanks

    Read the article

  • Uninstall components

    - by prashant
    I am building the .msi which contains 3 features. feature1 feature2 feature3 While installing the product, the user has the choice to install feature1, f2, f3 or f1, f2 as per user requirement. He can install successfully. I am facing problem while deinstalling. My .msi file deinstalls all the installed components (ie f1,f2,f3). Here I want to provide UI to user where he can select the component(s) which he wants to uninstall. Can you pelase help me how to achieve the same?

    Read the article

  • open Fancybox in tabs

    - by Prashant
    Hello all. I am using PHP + jQuery + Fancybox in my project. I have multiple tabs that get created dynamically. I have got a star icon on every tab header and on clicking them I want to open a fancybox. My tabs are basically ul-li with following dynamic code. $("#tabs").append("<li class='current'><a class='tab' id='tab_" + tabCnt + "<a href='#loginBox_div' class='login_link'> <img src='star.png' style='cursor:pointer'/> </a>" + "<a href='javascript:void(0);' class='remove'>x</a></li>"); in my index file : $(document).ready(function() { $("a.login_link").fancybox({ 'titlePosition' : 'inside', 'transitionIn' : 'none', 'transitionOut' : 'none' }); }); The problem is that when I click on star icon of first tab, the loginBox_div (fancybox) opens properly. But when my second tab is created and when I click on its star icon, the fancybox is not opening although the class is applied in second and successive tabs. No javascript errors too. Please show me the way. Thank you.

    Read the article

  • Apache gettext windows does not work/translate

    - by Prashant Kandathil
    I am new to gettext. Here is my setup: /Apache 2.2 PHP 5.3.6 Windows 7/ I have following code in the Apache/htdocs/test/index.php <?php $language = 'de_DE'; $translatefile = 'messages'; setlocale(LC_ALL, $language); putenv("LANG=".$language); bindtextdomain($translatefile, 'C:/locale'); textdomain($translatefile); echo gettext("Hello World!"); ?> I used PoEdit to generate the necessary translations under locale/de_DE/LC_MESSAGES/messsages.po & messages.mo The charset I used was UTF-8 When I visit http://localhost/test, the result is Hello World! when it should be Hall Welt! As a test, I opened command prompt and navigated to the test folder. Then I typed in php index.php The result that appeared in the console was Hall Welt! I am not sure why it is not working with Apache.

    Read the article

  • JQuery: Floating share box like Mashable?

    - by Prashant
    I am looking for a jQuery plugin which can serve me the floating share box functionality just like mashable implement in their new design: http://mashable.com/2010/03/12/flickr-co-founders-startup-hunch-raises-10-million/. On the page above in the left side mashable has sharing options which stays on the screen when you scroll the page. I want to implement same kind of functionality in my application, using a jQuery plugin.

    Read the article

  • java.lang.UnsatisfiedLinkError

    - by Prashant
    HI ALL, I got an error java.lang.UnsatisfiedLinkError, I am not getting wat the problem is. public static void main(String[] args) { try { System.loadLibrary("pfcasyncmt"); }catch(){ } } ERROR- xception in thread "main" java.lang.UnsatisfiedLinkError: no pfcasyncmt in java.library.path

    Read the article

  • I am looking for a System level activity logging application for Symbian

    - by Prashant
    Is there any free application available for logging all the activity ( both user initiated and system initiated ) on Symbian along with state of various resource variables on device (like Memory , I/O, Media player etc ). I want to use it to examine if there is any dependency /conflict /resource constraint when multiple Application are running . Any pointer in this direction will be greatly appreciated .

    Read the article

  • How to put focus on an element in jQuery?

    - by Prashant
    Hi, I have done the following code in JavaScript to put focus on the particular element (branch1 is a element), document.location.href="#branch1"; But as I am also using jQuery in my web app, so I want to do the above code in jQuery. I have tried but don't know why its not working, $("#branch1").focus(); The above jquery (focus()) code is not working for div, whereas If i am trying the same code with textbox, then its working, Please tell me, how can I put focus on a div elemnt using jQuery? Thanks!

    Read the article

  • VLC ActivX plugin not playing video in update IE9

    - by Prashant Mehta
    I am using vlc ActiveX plugin on web browser IE9 to play video live streaming. Its work perfect in IE8 but when I update browser from IE8 to IE9 than it not playing video file or live straming. here is my code. <object type="application/x-vlc-plugin" id="vlc" width="517" height="388" classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"> <param name="MRL" id="mrlVideo" value="" /> <param name="volume" value="50" /> <param name="autoplay" value="True" /> <param name="loop" value="false" /> <param name="fullscreen" value="false" /> <param name="wmode" value="transparent" /> <param name="toolbar" value="true" /> <param name="windowless" value="true" /> </object> and in javascript I am using these var vlc = document.getElementById("vlc"); var options = new Array(":rtsp-tcp"); var urlVideofile = "hppt://IP:portnumber/" var id = vlc.playlist.add(urlVideofile, null, options); vlc.playlist.playItem(id); Here is attach image that showing what exactly error is coming Any help is greatly appreciated Thanks.

    Read the article

  • Not able to insert data in the database from a form in php

    - by Prashant Baid
    I am not able to insert data into my data, i dont know what the problem is. Here is the code: mysql_select_db("mitestore", $con); */ if ((isset($_POST['product_name'])) && (strlen(trim($_POST['product_name'])) 0)) { $product_name = stripslashes(strip_tags($_POST['product_name'])); $sql="INSERT INTO sell (product_name) VALUE ('$_POST[product_name]')"; } else {$product_name = 'Please enter the product name.';} if ((isset($_POST[''])) && (strlen(trim($_POST['how_old'])) 0)) { $how_old = stripslashes(strip_tags($_POST['how_old'])); $sql="INSERT INTO sell (how_old) VALUE ('$_POST[how_old]')"; } else {$how_old = 'Please enter how old your product is';} if ((isset($_POST['which_block'])) && (strlen(trim($_POST['which_block'])) 0)) { $which_block = stripslashes(strip_tags($_POST['which_block'])); $sql="INSERT INTO sell (which_block) VALUE ('$_POST[which_block]')"; } else {$which_block = 'Please enter which block are you from';} if ((isset($_POST['room_no'])) && (strlen(trim($_POST['room_no'])) 0)) { $room_no = stripslashes(strip_tags($_POST['room_no'])); $sql="INSERT INTO sell (room_no) VALUE ('$_POST[room_no]')"; } else {$room_no = 'Please enter the room no:';} if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Success!"; mysql_close($con) ? Initially i had this code and it worked for me. mysql_select_db("database", $con); $sql="INSERT INTO sell ( product_name, how_old , selling_price, negotiable, which_block, room_no) VALUES ('$_POST[product_name]','$_POST[how_old]','$_POST[selling_price]','$_POST[negotiable]','$_POST[which_block]','$_POST[room_no]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Your product is added."; mysql_close($con) ? But i don't know how to validate each field individually.

    Read the article

  • How to get select radiobutton value using its name in jQuery?

    - by Prashant
    I am having 4 radiobuttons in my web page like below: <label for="theme-grey"><input type="radio" id="theme-grey" name="theme" value="grey" />Grey</label> <label for="theme-grey"><input type="radio" id="theme-grey" name="theme" value="pink" />Pink</label> <label for="theme-grey"><input type="radio" id="theme-grey" name="theme" value="green" />Green</label> Now in jQuery I want to get the value of selected radiobutton on click of any radiobutton out of above three. In jQuery we have id (#) and class (.) selectors but what if I want to put event on radiobutotn using thier names? as below? $("<radiobutton name attribute>").click(function(){}); Please tell me how to solve this problem. Thanks

    Read the article

  • Problem with mod_rewrite rules in .htaccess file

    - by Prashant
    This is my .htaccess file but it is not working. Not any URL is redirected. Help me. RewriteEngine on RewriteRule ^home index.php RewriteRule ^contactus index.php?file=c-contactus RewriteRule ^course_registration index.php?file=c-course_registration RewriteRule ^ncplhpage index.php?file=c-ncplhpage RewriteRule ^scplhpage index.php?file=c-scplhpage RewriteRule ^corporatetra index.php?file=c-corporatetra

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >