Jump to content

s4surbhi2218

Members
  • Posts

    51
  • Joined

  • Last visited

Posts posted by s4surbhi2218

  1. Hey all ,i started using/learning cake two days back need an editor which meets this:

    when i was using core php on netbeans (do not remember the settings i did with this), a click on the called function took me to the place/file where function was actually created, want the same kind of functionalities with cake too plz suggest what settings to change.Which version of netbeans should i use?And what are the relevent changes needed to be done. Thanks

    i download netbeans for windows 7 64 bit free giving jdk error while i have already istalled jdk , i need to work only on cakephp/php not java

  2. Hi  All , i am using  http://astrogrep.sourceforge.net/ and want the following funtionalities:

    1. Must be able to search for complete strings in all files of project (say X) along with line numbers.

    2.Need to display the search results as well.

     

    I am able to pass in the path , string , file extension but by line number i/p field in astro grep UI is coming disabled plus i am just getting the file names as search results i want line numbers to , plz sugget the setttings needed to be done ,

     

     

    Thanks :)

  3. Hey all ,i started using/learning cake two days back need an editor which meets this:

    when i was using core php on netbeans (do not remember the settings i did with this), a click on the called function took me to the place/file where function was actually created, want the same kind of functionalities with cake too plz suggest what settings to change.Which version of netbeans should i use?And what are the relevent changes needed to be done. Thanks

  4. Hey ,

    i am wondering how to interpret an "explain select sql" in mysql

    i found this

    over net but could not understand much can anyone help me .I want to know when we use explain command followed by some output how we interpret that o/p and make indexes?

     

    thanks

  5. Hi All,

    I am facing Delayed page loads due to heavy sqls.

    I am using a temp table and show processlist shows me that delay in page load is due to sending data to

    Insert into tmpTodayOrderPerHour

    (Select coalesce(Count(distinct tblOM.OrderID),'0') as 'NoOforder'

    ,'".$StartTime."' as 'NoOfHour'

    from tblOrderMaster tblOM

    Join tblOrderDetail tblOD ON tblOD.OrderID = tblOM.OrderID

    where tblOD.Quantity > 0 and tblOD.Status!='' and tblOD.Status!='12' and tblOD.Status IS NOT NULL

    and date_format(tblOM.CreatedOn,'%H') >= '".$StartTime."' " .

    " and date_format(tblOM.CreatedOn,'%H') < '".$dateDiff."'".

    "and tblOD.CompanyID='".$this->iCompanyID."' and date_format(tblOM.CreatedOn,'%Y-%m-%d')=curdate()) ;

     

     

    Where my tblOrderMaster has 654078 records

    and tblOrderDeatil has 963808 records.

     

    what i beleive is that prob is not due to temp table but due to heavy data being traversed in the sql select.

    Due to some other optimization i created the following indexes

     

     

    /*Index Information*/

    ---------------------

     

    Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment

    -------------- ---------- ---------------- ------------ ----------- --------- ----------- -------- ------ ------ ---------- ---------

    tblOrderMaster 0 PRIMARY 1 OrderID A 658011 (NULL) (NULL) BTREE

    tblOrderMaster 1 idx_SearchOrder1 1 CustomerID A 131602 (NULL) (NULL) BTREE

    tblOrderMaster 1 idx_Om1 1 OrderID A 658011 (NULL) (NULL) BTREE

    tblOrderMaster 1 idx_Om1 2 CreatedOn A 658011 (NULL) (NULL) YES BTREE

    tblOrderMaster 1 idx_Om2 1 OrderID A 658011 (NULL) (NULL) BTREE

    tblOrderMaster 1 idx_Om2 2 CreatedOn A 658011 (NULL) (NULL) YES BTREE

    tblOrderMaster 1 idx_Om2 3 CompanyID A 658011 (NULL) (NULL) BTREE

     

    /*Index Information*/

    ---------------------

     

    Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment

    -------------- ---------- ------------------------ ------------ ---------------- --------- ----------- -------- ------ ------ ---------- ---------

    tblOrderDetail 0 PRIMARY 1 OrderDetailID A 979589 (NULL) (NULL) BTREE

    tblOrderDetail 1 idx_RecurrenceOrderToday 1 RecurrenceNumber A 18 (NULL) (NULL) YES BTREE

    tblOrderDetail 1 idx_CaptureOrderStat 1 Status A 18 (NULL) (NULL) YES BTREE

    tblOrderDetail 1 idx_tblOrderDetail_Batch 1 Status A 18 (NULL) (NULL) YES BTREE

    tblOrderDetail 1 idx_tblOrderDetail_Batch 2 OrderID A 979589 (NULL) (NULL) BTREE

    tblOrderDetail 1 idx_OrderDetailException 1 OrderID A 979589 (NULL) (NULL) BTREE

    tblOrderDetail 1 idx_OrderDetailException 2 Status A 979589 (NULL) (NULL) YES BTREE

    tblOrderDetail 1 idx_Od1 1 Quantity A 18 (NULL) (NULL) YES BTREE

    tblOrderDetail 1 idx_Od1 2 Status A 18 (NULL) (NULL) YES BTREE

     

     

    Now i have two thoughts

    1. Make new indexes for the select sql , if this is the right direction in which m thinking then what should be my criteria of choosing them?

    i am unable to comprehend Describe

     

    Possible keys for TblOrderDetrail idx_CaptureOrderStat,idx_tblOrderDetail_Batch,idx_OrderDetailException,idx_Od1

     

    possible keys for tblOrderMAster PRIMARY,idx_Om1,idx_Om2

     

    2.the other idea is making views insted of temp table but would it help???

     

     

     

    Please suggest.

  6. XML is used in SOAP which is one of the common web service interaction protocols and WSDL is used to describe the web service - also uses XML.

     

    Are you building a PHP Web service and client or writing it in another language?

     

    PHP Web service

  7. Hi All,

     

    i want to create and consume webservices from scratch , (could be either xml /json) anyone who has worked on them please assist to get good tutorials over the net.

    Also let me know json/xml which one is commonly used?I do not have any specific requirements.

     

    Thanks

  8. Hi am using facebbok login API

    my ini has following settings

    "allow_url_include" is "On";

    "allow_url_fopen" is On too

    i have to do $url = urlencode($url);

    if i do not use urlencode i get

    Warning: file_get_contents() [function.file-get-contents]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?

     

    so after all this i have these warnings

    Warning:file_get_contents("$url") [function.file-get-contents]: failed to open stream: No such file or directory

    and

    Warning: file_get_contents(urlencode($url2)) [function.file-get-contents]: failed to open stream: File name too long

     

    any fixeses for this would be of great help.Thanks.

  9. That's called a Suckerfish menu, and it has everything to do with CSS and nothing to do with PHP.

    Just google for "suckerfish dropdown" and you'll find lots and lots of guides on how to make one. :)

     

    is not it custom js??

  10. If you do not want to load anything but just want a background process you may try this.

    <html>
       <script tye="text/javascrip">
        function fnc_LoadAjax(str)
        {
        var xmlhttp;
    
        if (window.XMLHttpRequest)
    	  {// code for IE7+, Firefox, Chrome, Opera, Safari
    	  xmlhttp=new XMLHttpRequest();
    	  }
        else
    	  {// code for IE6, IE5
    	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    	  }
    
        xmlhttp.open("GET","HitCounter_action.php?q="+str,true);
        xmlhttp.send();
        }
       </script>
       <body>
        <input type="submit" value="AddCounter" onclick="fnc_LoadAjax('12');">
       <body>
    </html>
    

     

     

     

    where HitCounter_action.php has the following code

    <?php
    $Id = '';
    $Id = $_REQUEST['q'];
    $con = mysql_connect("localhost","root","");
    if($con)
    {
       mysql_select_db("test",$con);
       $sql = "select HitCount from tblhitcounter where ID = '".$Id."';";
       $row = mysql_query($sql,$con);
       if(mysql_num_rows($row) > 0)
       {$res = mysql_fetch_array($row);
        $HitCount = $res['HitCount'];
       }
    
       $sql1 = "update tblhitcounter set  HitCount =('".$HitCount."' + '1') where ID = '".$Id ."';";;
       mysql_query($sql1,$con);
    }
    ?>
    

     

    Let me know if this solves your purpose. :)

  11. Here's one way to do it off the top of my head. I set it to 750 milliseconds after you're done typing.

    Demo: http://xaotique.no-ip.org/tmp/32/

     

    HTML

    <input type="text" id="type" />
    <span id="status"></span>

     

    Javascript / jQuery

    // Allow page to load.
    $(document).ready(function()
    {
    // Set our timer global and give a timeout for stop typing.
    var timer, timeout = 750;
    
    // Just clearing anything the user has in the text field on load.
    $("#type").val("");
    
    // Watch for the user to type in the text field.
    $("#type").keyup(function()
    {
    // Clear timer if it's set.
    if (typeof timer != undefined)
    clearTimeout(timer);
    
    // Set status to show we're typing.
    $("#status").html("Typing ...").css("color", "#009900");
    
    // Set status to show we're done typing on a delay.
    timer = setTimeout(function()
    {
    $("#status").html("Stopped").css("color", "#990000");
    }, timeout);
    });
    });

     

    Its pretty!!!!

  12. Hi ,

    m writing a code to add some dynamic values , following is my code which is currently hardcoded

    <!DOCTYPE html>
    <html>
    <head>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
    </script>
    <script>
    $(document).ready(function(){
    $("button").click(function(){
    $.post("Myfile.php",
    {
     name:"Donald Duck",
     city:"Duckburg"
    },
    function(data,status){
     alert("Data: " + data + "\nStatus: " + status);
    });
    });
    });
    </script>
    </head>
    <body>
    <button>Send an HTTP POST request to a page and get the result back</button>
    <input type="text" id="txt1">
    </body>
    </html>
    
    

     

     

    Now i want to send some value in city : entered from the text filed , i used

    city :$('input[type=text]').val() but it did not work :( Please Suggest.

    Thanks!!!

  13. Hi ,

    I am making a program in which text goes when user types similar to facebook status update textbox the grey text goes away when user types

     

    i have used

    [code
    ]<html>
    <head>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
    </script>
    <script>
    $("documnet").ready(
    function(){
    $(document).keypress(function(event) {
    if (event.keyCode != 1 && event.keyCode != 2 && event.keyCode != 3)
    {
    $('input[type=text]').val('');
    // alert('this is not mouse!');
    }
    });
    </script>
    </head>
    <body>
    <input type="text" id="txt" value="Surbhi">
    </body>
    </html>
    [/code]

     

    but the problem is user is only able to type one alphabet in this.

    Any suggestions ???

    Thanks

  14. Please use code tags when you show any code. It makes it much easier to look through.

     

    Without changing a whole lot of your code ..

    Demo: http://xaotique.no-ip.org/tmp/28/

     

    <html>
    <head>
    <script language="javascript">
    window.addEventListener("load", function()
    {
    window.document.frmname.addEventListener("submit", function(e)
    {
    e.preventDefault();
    
    var str= '';
    
    if (document.getElementById('name1'))
    {
    if (document.getElementById('name1').value == '')
    {
    alert('Cannot be left Blank');
    document.getElementById('name1').focus();
    
    return false;
    }
    }
    
    str = "Short1.php";
    document.frmname.action = str;
    document.frmname.submit();
    }, false);
    }, false);
    </script>
    </head>
    <body>
    <form name='frmname' method='post'>
    <input type="text" name="name1" id="name1">
    <input type="text" name="name2" id="name2">
    <input type="text" name="name3" id="name3">
    <input type="submit" value="shorten">
    </form>
    </body>
    </html>

     

    this solved my prob , yes i get your point of using code tags. :)

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.