User Profile

Collapse

Profile Sidebar

Collapse
Beginner1
Beginner1
Last Activity: Oct 21 '08, 11:51 AM
Joined: Feb 9 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Beginner1
    started a topic If values are same in array?
    in C

    If values are same in array?

    Hello,

    Can anybody help me to write a nice code to find out if all values in array (vector or map) are the same.

    int x[5] = {'1', '2, '3', '1', '2'}

    int y[3] = {'1', '1, '1'} or int y[3] = {'3', '3', '3'}

    I need to write a function which will return true if all values are identical in given array (case with X[5]) and false otherwise (case with Y[3]);

    bool isSameValue(int...
    See more | Go to post

  • Beginner1
    replied to How to separate data in Session variable
    in PHP
    Hi,

    Thanks for reply!!

    I have one server on which I keep both versions, so if the same user from the same computer opens the test version all production settings are shown in the test one. That's why I want to separate them somehow.

    My customers want to keep their settings available (kept in $_SESSION) for about a week, so I have the following line in my code.

    ini_set('sessio n.gc_maxlifetim e',...
    See more | Go to post

    Leave a comment:


  • Beginner1
    started a topic How to separate data in Session variable
    in PHP

    How to separate data in Session variable

    Hi All,

    If someone logs in my system I set up a few Session variables such as user type (admin, user, etc.) and a few other privileges and settings.
    Code:
    session_start ();
    
    $_SESSION['id'] = $row['user_id'];  
    ...
    ...
    On one server I keep the production version and the test one.

    My problem is if I open both versions in different tabs of the same browser...
    See more | Go to post

  • Beginner1
    started a topic The error message is lost
    in PHP

    The error message is lost

    Hi all,

    I have a strange problem, can anyone help me to understand what's going on??

    The php code returns me an empty page (even when I call "View source" I get empty page ).

    I've put "echo" at the begging of my code and only after that got an error message as the second row (fist was my echo).

    Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to...
    See more | Go to post

  • Beginner1
    started a topic Default value for functrion argument

    Default value for functrion argument

    Hi,

    Is it possible to give a default value to a function argument:

    I am trying to do something like this:

    function my_func(arg1,ar g2="")
    {
    }


    Is it possible to do this in javascript???

    Thanks in advance
    See more | Go to post

  • Beginner1
    replied to Return Array from PHP
    in PHP
    Thank you very much for your replies!!! They really helped me!
    See more | Go to post

    Leave a comment:


  • Beginner1
    started a topic Return Array from PHP
    in PHP

    Return Array from PHP

    Hi all,

    Could anyone help me about returning the array from a function in PHP? What is the right way to do it in PHP?
    I've tried by reference and also returned as a local variable. Both works but is they good for big arrays??? Is they safe??


    However, my current knowledge prompts me (from C++) that returning a pointer or a reference might be dangerous (this variable can go out of scope).

    ...
    See more | Go to post

  • Beginner1
    started a topic Designed package installation
    in PHP

    Designed package installation

    Hi,

    I hope this is the right place to ask my question.

    I need to write the install mechanism for both Unix and Windows for my on-line shopping system. (like make,make install).

    Can you suggest me any link or Documentation or just give an advise how to organize the installation mechanism.

    The Gnu Build System is OK for but I think it is too hard for my system, I need only the mechanism to...
    See more | Go to post

  • Beginner1
    started a topic LayerX in IE???

    LayerX in IE???

    Hi,

    I have the following code, which run popup widow. In Mozilla this work OK, I have problems in IE. The popup window appears on the top of my window not near my mouse cursor.

    I think I don't use event.offsetX or event.offsetY correctly....



    Code:
    var tooltip = document.createElement('div'); 
    	    	 
    document.getElementById("mydiv").appendChild(tooltip);
    ...
    See more | Go to post

  • Beginner1
    started a topic Events in enclosed tags

    Events in enclosed tags

    Hi,

    I have an popup menu on mouesover and mouseout for table <td> tag. It was working OK while I didn't add a link in this <td>. Now I have problems.

    It seems that event is sent for both for td and link.

    <code>
    <td onmouseover=pop up("Some text"); onmouseout=exit ();>
    <a>MY LINK</a>
    </td>

    When my mouse is over <td>...
    See more | Go to post

  • Beginner1
    replied to Empty table whith css style
    You were right :) There was "display : none", I didn't notice that.

    Thanks a lot!
    See more | Go to post

    Leave a comment:


  • Beginner1
    started a topic Empty table whith css style

    Empty table whith css style

    Hi,

    I got an empty table when trying to give any style to <tr> tag form css file.
    I've the put the <link> in my page.

    <link rel=\"styleshee t\" href=\"file.css \">

    and tying to do this:

    <table>
    <tr class=class_nam e>
    <td>some thext

    without class=class_nam e everything works OK. Even more in my project...
    See more | Go to post

  • Beginner1
    replied to Passing an array by get method
    in PHP
    Thank you very much!!!!
    See more | Go to post

    Leave a comment:


  • Beginner1
    replied to Passing an array by get method
    in PHP
    Thank you for your replies!

    When I was writhing my question I knew nothing about this target. Now with your help I know too much and can't make the right decision:)

    Can you help me to choose the most suitable and correct way in this case:

    I have an array with integer values, its length could be about 2000 elements. Actually I need it in the next page as a string (joined with comma).

    My...
    See more | Go to post

    Leave a comment:


  • Beginner1
    replied to Passing an array by get method
    in PHP
    I could pass it by using the serialize() function.
    See more | Go to post

    Leave a comment:


  • Beginner1
    started a topic Passing an array by get method
    in PHP

    Passing an array by get method

    Hi,
    I need to pass an array by link:

    <a href=somfile.ph p?array=$my_arr ay>

    I've tried to make it string (with join) but it doesn't work for big arrays (max size for string parameters is ~255 characters).

    Is there a way to pass a big array and get it in $GET variable?

    Thanks
    See more | Go to post
No activity results to display
Show More
Working...