I'm interest in learning how to use jquery comet to create real-time multi-user note taking like etherpad used to offer.
Can anyone offer any tips/tutorials/plug-ins... to point me in the right direction?
Thanks
Hi everyone
Currently developing a multi-lingual website, Users can access the front page using url with format below:
http://mydomain.com/en/
http://mydomain.com/fr/
Problem is here. URL without last "/" (http://mydomain.com/fr) caused page not found problem
Here is the rule
RewriteRule ^/?([^./]+)/(.*)$ $2?lang=$1 [L,QSA]
Can anybody help ?
Thanks in advance
The question: How do I generate navigation, allowing for applying different classes to different sub-items, from a multi-dimensional array?
Here is how I was doing it before I had any need for multi-level navigation:
Home
Pics
About
and was generated by calling nav():
function nav(){
$links = array(
"Home" => "home.php",
"Pics" => "pics.php",
"About" => "about.php"
);
$base = basename($_SERVER['PHP_SELF']);
foreach($nav as $k => $v){
echo buildLinks($k, $v, $base);
}
}
Here is buildLinks():
function buildLinks($name, $page, $selected){
if($selected == $page){
$theLink = "<li class=\"selected\"><a href=\"$page\">$name</a></li>\n";
} else {
$thelink = "<li><a href=\"$page\">$name</a></li>\n";
}
return $thelink;
}
My question, again:
how would I achieve the following nav (and notice that the visible sub navigation elements are only present when on that specific page):
Home
something1
something2
Pics
About
and...
Home
Pics
people
places
About
What I've tried
From looking at it it would seem that some iterator in the SPL would be a good fit for this but I'm not sure how to approach this. I have played around with RecursiveIteratorIterator but I'm not sure how to apply a different style to only the sub menu items and also how to only show these items if you are on the correct page.
I built this array to test with but don't know how to work with the submenu1 items individually:
$nav = array(
array(
"Home" => "home.php",
"submenu1" => array(
"something1"=>"something1.php",
"something2" => "something2.php")
),
array("Pics" => "pics.php"),
array("About" => "about.php")
);
The following will print out the lot in order but how do I apply, say a class name to the submenu1 items or only show them when the person is on, say, the "Home" page?
$iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($nav));
foreach($iterator as $key=>$value) {
echo $key.' -- '.$value.'<br />';
}
I have to populate a multi checkbox in a form from data taken from an XML file from a post function with jquery?
<input type="checkbox" name="mercato[]" id="mkt_0" value="A">A<input type="checkbox" name="mercato[]" id="mkt_1" value="B">B
Thanks in advance.
ciao
h
hi,
I want to insert some data into a table
(id PK autoincrement, val)
with use multi insert
INSERT INTO tab (val) VALUES (1), (2), (3)
Is it possible to obtain a table of last inserted ids?
I'm asking becouse I'm not sure if all will in this form: (n, n+1, n+2).
I use mysql inodb.
I'm learning to use the PHP interactive shell, but I'm having trouble with multi-line code.
Using backslashes like in the UNIX shells doesn't seem to work. What am I doing wrong ?
php > function test(){\
php { echo "test";\
php { }\
php > test();
PHP Parse error: syntax error, unexpected T_ECHO, expecting T_STRING in php shell code on line 2
Hello,
old problem now getting new. Anyone has a good idea for storing currency values in a sharepoint list? Problem is - there is a currency field, but it is not multi-currency enabled.
I could obviously store the value in two fields (currency lookup from a list, value in second field), but I take it as wondering whether there is a more viable approach that.
Hi,
Can anyone tell me how to display all the selected value of my multi value parameter in SSRS report. When giving parameter.value option it gives error.
Thanks in advance.
Suni
I need to store multi-dimensional data consisting of numbers in a manner thats easy to work with. I'm capturing data in real time, and once processed I would destroy and GC older data. This data structure must be fast so it won't hit my overall app performance. The faster the better.
What are my choices in terms of platform supported data structures? I'm using VS 2010. and .NET 4.
If I have a relation (SQL) that does not fit in memory and I want to sort the relation using TPMMS (Two-pass multi-way merge sort method). How would I divide the table in sub tables (and how many) that can fit in memory and than merge them?
Let's say I am using C#.
I have a multi-dimensional array:
a=[[2,3,4],[1,3,4],[1,2],[1,2,3,4]]
i've to compare all the 4 sub-arrays and get common elements.Next,take 3 subarrays at a time and get common elements.then take 2 sub arrays at a time and get common elements, in RUBY.
I have a base class that declares a grouping of objects. That grouping can be an array, List, Collection, that's up to me.
The derived classes of this base class are the ones that actually set the values of this multi-element field. What is the best way to expose this field to the derived classes?
Hi, all.
I read django.contrib.sessions.backend.file today, in the save method of SessionStore there is something as the following that's used to achieve multi-threaded saving integrity:
output_file_fd, output_file_name = tempfile.mkstemp(dir=dir,
prefix=prefix + '_out_')
renamed = False
try:
try:
os.write(output_file_fd, self.encode(session_data))
finally:
os.close(output_file_fd)
os.rename(output_file_name, session_file_name)
renamed = True
finally:
if not renamed:
os.unlink(output_file_name)
I don't quite understand how this solve the integrity problem.
I am converting a PHP MySQL web application written for English language into a Multi-Language site. Do you know any vulnerabilities that affect web applications in another language? Or perhaps vulnerabilities that could be introduced in the conversion of code base to support multiple languages. (If you know any vulnerabilities of this type in another programming language I'll give you a +1)
Hello,
I'm not able to understand the following multi-dimensional code. Could someone please clarify me?
int[][] myJaggedArr = new int [][]
{
new int[] {1,3,5,7,9},
new int[] {0,2,4,6},
new int[] {11,22}
};
May I know how it is different from the following code?
int[][] myArr = new int [][] {
{1,3,5,7,9},
{0,2,4,6},
{11,22} };
Basically I've created a list that subtotals according to the group.
I then created a multi-value parameter that allows the user to choose which group is shown in the report.
How can I get the grand total to reflect the parameter since its currently outside of the list?
Say I have two NSTimers in my iPhone app: timer1 and timer2. timer1 calls function1 30 times per second and timer2 calls function2 30 times per second. Assume these two functions are reading and updating the same integer variables. Are there any "multi-threading" issues here? If not how does iPhone OS handle the execution of the two functions (in general)?
I am using Maven 2.0.9 to build a multi module project. I have defined the assembly plugin in my parent pom. I can get my assemblies built using
mvn install assembly:assembly
This command runs the tests twice, once during install phase and another during assembly. I tried assembly:single but it throws an error. Any help to get my assemblies built without running the tests twice is much appreciated.
Hi,
I am trying to create a DataTable with a multi row header. I'll exemplify here:
| 2008 | 2009 |
---------------------------------------------------------
| price | qty. | price | qty |
---------------------------------------------------------
| 93993 | 34434 | 34244 | 3434 |
.....
The years headers can be fixed as I don't want to do sorting by that.
Is there a way to do that in Google Visualizations?
Is there a simple way of making the static content of an .aspx page multi-lingual? Resource files are nice for controls but it's quite hard and annoying to write big chunks of html in them. Any easier ways?
Hi guys
How can i display multi-image in UITableView like image below:
http://c.upanh.com/upload/6/172/LN0.10355393_1_1.jpg
Please give me some code.
Thank you