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...
User Profile
Collapse
-
If values are same in array?
-
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',... -
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.
On one server I keep the production version and the test one.Code:session_start (); $_SESSION['id'] = $row['user_id']; ... ...
My problem is if I open both versions in different tabs of the same browser... -
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... -
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 -
Thank you very much for your replies!!! They really helped me!Leave a comment:
-
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).
... -
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... -
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); -
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>... -
You were right :) There was "display : none", I didn't notice that.
Thanks a lot!Leave a comment:
-
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... -
-
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...Leave a comment:
-
-
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
No activity results to display
Show More
Leave a comment: