Search Results

Search found 676 results on 28 pages for 'muhammad ali'.

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

  • string Comparison

    - by muhammad-aslam
    I want to compare two user input strings, but not able to do so... #include "stdafx.h" #include "iostream" #include "string" using namespace std; int _tmain(int argc, _TCHAR* argv0[]) { string my_string; string my_string2; cout<<"Enter string"<<endl; cin>>my_string; cout<<"Enter 2nd string"<<endl; cin>>my_string2; cout<<my_string<<" "<<my_string2; strcmp(my_string,my_string2); int result; result= strcmp(my_string,my_string2); cout<<result<<endl; return 0; } This error is appearing. Error 1 error C2664: 'strcmp' : cannot convert parameter 1 from 'std::string' to 'const char *' c:\users\asad\documents\visual studio 2008\projects\string\string\string.cpp 23 String

    Read the article

  • How do I display exception errors thrown by Zend framework

    - by Ali
    Hi guys I'm working with Zend framework and just hate the fact that I seem to encounter hundreds of exception errors like if I try to reference a non existant property of an object my application just dies and crashes. However I have no idea where to see these errors or how to be able to display them on screen. I've set display errors to true and error reporting to E_ALL but when an error is thrown all I see is a blank page rendered only until a bit before where the error apparently occurred or the exception was thrown. Help please my debugging hours are dragging

    Read the article

  • error - convert date to showing in view

    - by Ali
    hi i need convert date to shamsi date i create a method that convert DateTime to shamsi Date. when i passing a date to the method i got this error The best overloaded method match for 'BentaAccounting.Classes.GenralClasses.FarsiDate.MiladiToShamsi(System.DateTime)' has some invalid arguments this is the code i am using the method public static string MiladiToShamsi(DateTime Date) { string Result; PersianCalendar FarsiDate = new PersianCalendar(); Result = FarsiDate.GetYear(Date).ToString() + "/" + (FarsiDate.GetMonth(Date) < 10 ? "0" + FarsiDate.GetMonth(Date).ToString() : FarsiDate.GetMonth(Date).ToString()) + "/" + (FarsiDate.GetDayOfMonth(Date) < 10 ? "0" + FarsiDate.GetDayOfMonth(Date).ToString() : FarsiDate.GetDayOfMonth(Date).ToString()); return Result; } and view <%: Html.Encode(GenralClasses.FarsiDate.MiladiToShamsi(item.OrderDate) )%>

    Read the article

  • What does this code do? Recursive Iterator in php?

    - by Ali
    I'm working on a zend framework based email project and I'm following some code samples online.. I can't understand this line of code which apparently loops through different 'parts' of an email message. I have no idea how it works btw and suspect that theres some error taking place which my parser isn't showing right. foreach (new RecursiveIteratorIterator($mail->getMessage($i)) as $ii=>$part) what does the above foreach loop mean?

    Read the article

  • Need a code snippet for backward paging...

    - by Ali
    Hi guys I'm in a bit on a fix here. I know how easy it is to build simple pagination links for dynamic pages whereby you can navigate between partial sets of records from sql queries. However the situation I have is as below: COnsider that I wish to paginate between records listed in a flat file - I have no problem with the retrieval and even the pagination assuming that the flat file is a csv file with the first field as an id and new reocrds on new lines. However I need to make a pagination system which paginates backwards i.e I want the LAST entry in the file to appear as the first as so forth. Since I don't have the power of sql to help me here I'm kinda stuck - all I have is a fixed sequence which needs to be paginated, also note that the id mentioned as first field is not necessarily numeric so forget about sorting by numerics here. I basically need a way to loop through the file but backwards and paginate it as such. How can I do that - I'm working in php - I just need the code to loop through and paginate i.e how to tell which is the offset and which is the current page etc.

    Read the article

  • Spring Stripes framework problem

    - by ali
    I am new to stripes and am attempting to integrate spring into stripes In the following code : public class ContactFormActionBeanTest { private static MockServletContext mockServletContext; private static MockHttpSession mockSession; @BeforeClass public static void setup() throws Exception { mockServletContext = new MockServletContext("webmail"); Map<String,String> params = new HashMap<String,String>(); params.put("ActionResolver.Packages", "stripesbook.action"); params.put("Extension.Packages", "stripesbook.ext," + "net.sourceforge.stripes.integration.spring"); mockServletContext.addFilter(StripesFilter.class, "StripesFilter", params); mockServletContext.setServlet(DispatcherServlet.class, "DispatcherServlet", null); mockSession = new MockHttpSession(mockServletContext); mockServletContext.addInitParameter("contextConfigLocation", "/WEB-INF/applicationContext-test.xml"); ContextLoaderListener springContextLoader = new ContextLoaderListener(); springContextLoader.contextInitialized( new ServletContextEvent(mockServletContext)); // Load mock user MockRoundtrip trip = new MockRoundtrip(mockServletContext, MockDataLoaderActionBean.class, mockSession); trip.execute(); // Login mock user trip = new MockRoundtrip(mockServletContext, LoginActionBean.class, mockSession); trip.setParameter("username", "freddy"); trip.setParameter("password", "nadia"); trip.execute("login"); } I get null in springContextLoader ContextLoaderListener springContextLoader = new ContextLoaderListener(); and test fails. Am I missing something? I am using eclipse with maven. Also when I try to deploy it for tomcat 6.0 I get following warnings: WARN net.sourceforge.stripes.util.ResolverUtil - Could not examine class 'stripesbook/ext/ContactFormatter.class' due to a java.lang.UnsupportedClassVersionError with message: Bad version number in .class file (unable to load class stripesbook.ext.ContactFormatter) I have checked to be sure that I am compiling with Java 5(set JDK compiler to 1.5) instead of 1.6 (Java 6); but didn't work out for me and still have problems running spring-stripes integrated project.

    Read the article

  • how to disable NumericUpDownExtender after first click?

    - by Ali
    I'm using NumericUpDownExtender inside updatepanel which is inside repeater displays comments on article. I use NumericUpDownExtender as thumbs up/down and I need to disable it after first click so that no one can rate the comment more than once. How can I do that? Thanks in advance for your help!

    Read the article

  • What do I need to use Smart card for windows login (no domain, just regular single local machine)

    - by Muhammad Nour
    I have a reader from ACS "ACR83" and a brand new card from the same place ACO3-32 as a development kit and I need to use both of them to login into my laptop locally I am not a part of domain, I am using Windows xp SP3 what should I do to enable smart card login do I need third party software to do this without domain or should it be a domain environment to be able to do such a thing this is the first time dealing with smart card, so I hope some one will help me Doing this

    Read the article

  • changing trigger event of MVC 2 client validation

    - by Muhammad Adeel Zahid
    Hi Everyone i m developing a website using .NET 3.5 with MVC 2.0. For server side validations i m using ComponentModel.DataAnnotations. these validations are reflected to client side by html helper's method Html.EnableClientValidation(). this scheme works fine for except that it triggers the validation on blur event of each form control whereas i want to have it triggered on form's submit event. any suggestions in this regard are highly appreciated regards

    Read the article

  • add html after a certain div - using prototype? How

    - by Ali
    Hi guys I want to be able to append divs to my page such that they are appended after a div of a certain class and before teh divs that follow it i.e: <div class="header">Header DIV</div> <!-- Want to add using javascript some HTML right here--> <div class="one-basic-div">...</div> <div class="one-basic-div">...</div> <div class="one-basic-div">...</div> <div class="one-basic-div">...</div> Its basically raw html I wish to add - how can I do it.

    Read the article

  • After installing VS 2010 - Generic Host Process For Win32 Services problem starts.

    - by Muhammad Kashif Nadeem
    After installing VS 2010 trial I am getting this error "Generic Host Process For Win32 Services Encountered A Problem and needs to close. When this message pops my computer just stuck and I can not even restart it normally. I have found one fix on net but after that fix I can not access my LAN. This fix change these values in registry. HKLM\SYSTEM\CurrentControlSet\Services\netbt\parameters TransportBindName HKLM\Software\Microsoft\OLE EnableDCOM If I revert these registry changes then I again start getting 'Generic Host Process For Win32 Services' I have uninstall VS 2010 but this problem persist. This problem is not because of any virus. Any help to fix this or I have to re install Windows. Thanks.

    Read the article

  • Display lable character by character using javascript

    - by Muhammad Sajid
    Hi, I am creating Hang a Man using PHP, MySQL & Javascript. Every thing is going perfect, I get a word randomly from DB show it as a label apply it a class where display = none. Now when I click on a Character that character become disable fine which i actually want but the label-character does not show. My code is: <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> <?php include( 'config.php' ); $question = questions(); // Get question. $alpha = alphabats(); // Get alphabets. ?> <script language="javascript"> function clickMe( name ){ var question = '<?php echo $question; ?>'; var questionLen = <?php echo strlen($question); ?>; for ( var i = 0; i < questionLen; i++ ){ if ( question[i] == name ){ var link = document.getElementById( name ); link.style.display = 'none'; var label = document.getElementById( 'questionLabel' + i ); label.style.display = 'none'; } } } </script> <div> <table align="center" style="border:solid 1px"> <tr> <?php for ( $i = 0; $i < 26; $i++ ) { echo "<td><a href='#' id=$alpha[$i] name=$alpha[$i] onclick=clickMe('$alpha[$i]');>". $alpha[$i] ."</a>&nbsp;</td>"; } ?> </tr> </table> <br/> <table align="center" style="border:solid 1px"> <tr> <?php for ( $i = 0; $i < strlen($question); $i++ ) { echo "<td class='question'><label id=questionLabel$i >". $question[$i] ."</label></td>"; } ?> </tr> </table> </div>

    Read the article

  • Website doesn't work during Uploading of crucial files

    - by Ali
    HI guys - I have a problem with maintenance of my php based website. My website is built on the Zend Framework. When I wish to upload a new copy or version online - during the time of upload especially when crucial files like models and controllers ar ebeing uploaded and rewritten - the site won't run understandably. Is there a way to upload a website without having to go through this issue?

    Read the article

  • Show hide DIVs : jQuery

    - by Muhammad Sajid
    Hi, I have two links & I want to show / hide them one at a time, my code is : <!DOCTYPE html> <html> <head> <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript"> // we will add our javascript code here $(document).ready(function() { $(function(){ $('#link').click(function(){ $('#colorDiv').slideToggle('slow'); return false; }); }); }); </script> <meta charset=utf-8 /> <title>JS Bin</title> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <style> #dv { width:100px; height:100px; border:1px solid; } </style> </head> <body> <table cellspacing="2"> <tr><td><a href="#" id="link">Color</a></td><td><a href="#" id="link">Car</a></td></tr> <tr><td><div id="colorDiv">Red</div></td><td><div id="carDiv">PRADO</div></td></tr> </table> </body> </html> by default first div should me shown. hanks.

    Read the article

  • ASP.Net export to excel + File Download dialog action.

    - by Muhammad Umar Siddique
    i m trying to export data from asp.net form to excel using following lines of code Response.ContentType = "application/vnd.ms-excel"; Response.AddHeader("content-disposition", "attachment; filename=Report.xls"); Everything seems to be working fine. Now what I need it to take some action if user clicks the "Cancel" button on File Download dialog. How i can do this ? thanks..

    Read the article

  • Passing object to the constuctor of Entity Class with adding new item from DataForm!

    - by Muhammad Jamal Shaikh
    hi, here is my case , i want to assign roles to my employees. All Roles are need to be sent to the constructor of the employee class when a user clicks + sign on the top of dataform(Silverlight toolkit 2009). if i put a break point on the default constructor , it gets hit. so i just want the dataform to send this collection when ever it creates new employee. thanks Jamal.

    Read the article

  • Fetch all emails in PHP.

    - by Muhammad Sajid
    Hello. I want to fetch all my emails available in different online accounts eg:(gmail, yahoo, hotmail, aol, etc..) using PHP such that if necessary to reply any email then I could reply. How it is possible?

    Read the article

  • Silverlight 3 oob window border

    - by Ali Shafai
    I was wondering if I can customise the look and feel of the OOB window of my SL app? I want it to look different than the standard windows frame (maybe at least change the visible buttons like minimise or maximise...) thanks

    Read the article

  • how to properly display utf encoded characters on my utf-8 encoded page?

    - by Ali
    Hi guys I'm retrieving emails and some of my emails have utf encoded text. However even though my page is encoded as utf 8 - in some places when I try to out put utf text I get funny characters like : =?utf-8?B?Rlc6INqp24zYpyDYotm+INin2LMg2YXYs9qp2LHYp9uB2bkg2qnbjCDZhtmC?= =?utf-8?B?2YQg2qnYsdiz2qnYqtuSINuB24zaug==?= Whereas in other areas of the same page it displays fine. WHats going on?

    Read the article

  • Accessing ItemRenderer in AdvancedDataGrid Flex / AS3?

    - by Muhammad Husnain Ashfaq
    i have XMLList data which is used for advanceddatagird dataprovide(by converting it to hierarchal data ), the advanceddatagrid consist of 2 columns,i want to access the ItemRenderer of 2nd colomn (customized item rendrer) by giving the item. i can get the itemRendrer bu using var Obj:Object = itemToItemRenderer(item); i cant understand that obj is IListItemRendrer, but in 2nd colomn i have used the renderer named "ProcessFLowRendrer"? can you tell me how i can access the rendrer of 2nd column, by item not by index ?

    Read the article

  • Storing User Information in Session with aspNetMembershipProvider

    - by Muhammad Adeel Zahid
    Hi Everyone, i m developing an application in .NET mvc2. i m using aspnetMembershipProvider for User registration and related activities. i need some custom information about user that i stored in a separate table (sysUser for example) and linked it to aspnetUser table through foreign key. after Login i need to fetch user's credentials from sysUser table and push it to the session. For this Account controller's Logon method seemed best to me and i pasted following code in my Logon ActionResult if (!ValidateLogOn(userName, password)) { return View(); } FormsAuth.SignIn(userName, rememberMe); ApplicationRepository _ApplicationRepository = new ApplicationRepository(); MembershipUser aspUser = Membership.GetUser(userName); SessionUser CurrentUser = _ApplicationRepository.GetUserCredentials(aspUser.ProviderUserKey.ToString()); //Session["CurrentUser"] = CurrentUser; if (!String.IsNullOrEmpty(returnUrl)) { return Redirect(returnUrl); } else { return RedirectToAction("Index", "Home"); } The code is working perfectly for me and put my desired information in the session but the thing is that if a user selects Remember me and on his next visit he won't have to Log in and i would not find my desired information in the Session. Can anyone guide me where should i put my code that stores the user information in the session. any Help is Highly appreciated Regards Adeel

    Read the article

  • Jquery draggable persistence either through mysql or saving cookie in the database?

    - by Muhammad Jehanzaib
    I want to know that how can I persist the divs dropped on a draggable. I have been trying since long but stuck at this point. Actually you can see the demo here. I have to save the user designed wedding floor. So whenever user logins next time he/ she is able to see the last design saved. The code is shown below: $(document).ready(function() { $("#droppable").droppable({ accept: '.draggable', drop: function(event, ui) { $(this).append($(ui.draggable).clone()); $("#droppable .draggable").addClass("objects"); $(".objects").removeClass("ui-draggable draggable"); $(".objects").draggable({ containment: 'parent', }); } }); $(".draggable").draggable({ helper: 'clone', tolerance: 'touch', cursor:'move' }); });

    Read the article

  • Using rsync to take backup of folder

    - by Ali
    Hi, I have a server (Linux) with NAS which is mounted as folder "mount" I have website in "public_html" folder. I want to take backup of website in mount folder automatically at certain intervals for e.g. every hour. I read that there is something called "rsync" which is used to make two folders sync. And it doesn't copy all files every time and instead matches if the file has been changed and then only update changed files. How do I use it to make automatic backups? I have root access to server. Thanks

    Read the article

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