Search Results

Search found 47 results on 2 pages for 'sef'.

Page 1/2 | 1 2  | Next Page >

  • how to generate sef urls manually without clicking the links in joomla site

    - by raghu-pandiri
    we have sh404 sef component installed in my site.when we click any of the link on my site a sef url willl automatically generate and insert in to the databese.but i want to generate all the available sef urls for my site with out clicking all the links.how can i generate is there any way to ping all normal urls generated by me. how can i generate sef urls manually for my site content.

    Read the article

  • SEF URL Problem in Joomla1.5

    - by Emrul Hasan
    My joomla site url is: http://www.cessnatrader.com. I am using SEF URL for this site. The SEF URL is not working in the main menu(in top). But it is working fine for other places(other links, footer menu). I don't know what the problem is. I did all the things for enabling SEF URL in joomla. But it is not working in one place(main menu). What should I do? Note: I am using "Mosets tree" component in this site.

    Read the article

  • sef service map generation problem for sobi2 component

    - by raghu-pandiri
    Hi, We are using sef service map component and installed SEF SM SOBI2 Integrator for Joomla 1.5.x but if i enable the intigrator service map not getting generated giving a blank page.if i disable the intigrator it is generating properly for other content on the site.we have 35k + items in sobi2.is it not support for that much of records or what?

    Read the article

  • In Joomla In htaccess REQUEST_URI is always returning index.php instead of SEF URL

    - by Saumil
    I have installed joomsef version 3.9.9 with the Joomla 1.5.25. Now I want to set https for some of the section of my site(e.g URI starts with /events/) while wanting rest of all urls on http.I am setting rules in .htaccess file but not getting output as expected. I am checking REQUEST_URI of the SEF urls but always getting index.php as URI. Here is my htaccess code. ########## Begin - Custom redirects # # If you need to redirect some pages, or set a canonical non-www to # www redirect (or vice versa), place that code here. Ensure those # redirects use the correct RewriteRule syntax and the [R=301,L] flags. # ########## End - Custom redirects # Uncomment following line if your webserver's URL # is not directly related to physical file paths. # Update Your Joomla! Directory (just / for root) # RewriteBase / ########## Begin - Joomla! core SEF Section # RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # # If the requested path and file is not /index.php and the request # has not already been internally rewritten to the index.php script RewriteCond %{REQUEST_URI} !^/index\.php # and the request is for root, or for an extensionless URL, or the # requested URL ends with one of the listed extensions RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC] # and the requested path and file doesn't directly match a physical file RewriteCond %{REQUEST_FILENAME} !-f # and the requested path and file doesn't directly match a physical folder RewriteCond %{REQUEST_FILENAME} !-d # internally rewrite the request to the index.php script RewriteRule .* index.php [L] # ########## End - Joomla! core SEF Section # Here is my code e.g site url is http://mydomain.com/events RewriteCond %{REQUEST_URI} ^/(events)$ RewriteCond %{HTTPS} !ON RewriteRule (.*) https://%{REQUEST_HOST}%{REQUEST_URI}/$1 [L,R=301] I am not getting why REQUEST_URI is reffering index.php even though my url in address bar is like this http://mydomain.com/events . I am using JOOMSEF(Joomla extension for SEF URLS).If I am removing other rules from the htaccess file then joomla stops working. I am not getting a way to handle this as I am not expert.Please let me know if someone has passed through same situation and have solution or suggest some work around. Thanks

    Read the article

  • Generating Component SEF URLs in Joomla

    - by Jarrod
    I have a custom Joomla component and a router for building my SEF URL's for use within the site, and everything is usually shiny - internally, all of my links look and act fantastic. I recently route a controller action that sends a list of links through email, and I've noticed that my URLs are coming out.... funky - hopefully someone can tell me why. Usually, my router generates an internal link that looks like this: http://localhost/Registry/calendar/265889635/Some-Long-Boring-Event However, when I send an email and preparing the same URL through the same router I get: http://localhost/Registry/Registry/component/calendar/569555803/Some-Long-Boring-Event Has anybody run into this issue before?

    Read the article

  • Get the SEF URLs for articles in joomla

    - by DMin
    Hi, I use no-editor in joomla with SEF urls enabled. With no SEF enabled its easy to know the URL by just getting the ID of the article something like : Article 1 would be : http://www.abc.com/j15/index.php?option=com_content&view=article&id=1&Itemid=1 Now if I have SEF switched on I would get urls that look like: http://www.abc.com/j15/the-content.html Is there a way inside joomla where I can findout what the SEF URL for a particular page is? Currently I add these articles to a menu, then from the front-end I get the SEF URL and then use it. I know the process is a little dumb but I want to find-out if there is a better way inside joomla where you can get the SEF URL(using no-editor). Thanks! :)

    Read the article

  • joomla SEF shows differrent links in Homepage than inner pages !!

    - by user200297
    I'm enabling Joomla SEF , and get the following results when I link to an article from a homepage (frontpage) article: anywebsite.com/component/content/article/26/141-Z1-Z2-Z3-Z4 but when linking from other articles I get the result I want which is : anywebsite.com/Categor/141-Z1-Z2-Z3-Z4 and the link is both equal which is : index.php?option=com_content&view=article&id=141:Z1-Z2-Z3-Z4&catid=26 any idea?! Edit: Does manually linking with this SEF link is a good idea , instead of waiting for joomla to convert it .. ? atleast as a last resort?

    Read the article

  • Custom redirect using Joomla Artio SEF

    - by Krishna Priya
    Hi, I am using joomla Artio SEF for my website. I am using a form for new customer. So it uses index.php?form=newcustomer&Itemid=1 url as "joomla15/new-customer" as sef url. Now I need to add error message like index.php?form=newcustomer&Itemid=1&msg=".$msg after submitting this form. In this case it is not displaying as sef and showing "index.php?form=newcustomer&Itemid=1&msg=New Customer Received". I cld not use custom redirect also,becoz msg are dynamically generated. How cld i fix this issue? Anyone please help me. Thanks, Krishna

    Read the article

  • [Disallow: /index.php] seems to block /my-beautiful-sef-url-123

    - by Jaroslav Záruba
    Hello I have robots.txt that looks like this: User-agent: * Disallow: /system/ Disallow: /admin/ Disallow: /index.php The obvious goal has been to prevent all the ugly URLs from being indexed, as they all begin with "/index.php". But for some reason all URLs like /my-beautiful-sef-url-123 are listed under Crawl errors in Google Webmaster Tools with "URL restricted by robots.txt". (When I test such URL it yields Allowed for both Googlebot and Googlebot-Mobile.) Can anyone help please?

    Read the article

  • Sef-packed training kit practice tests

    - by Costa
    Hi I have a book called .Net framework 2.0 application development foundation, self-packed training kit by Tony Northup and Shawn wildermuth. the book CD contains practice tests, Can I rely on this CD to take the exam, or it will be just like the book itself, a wast of money? someone rely on it and success? I am not talking about memorizing or cheating the exam I am talking about studying and practice it. Also When I visit MS website they did not determine the number of questions, type of questions, or the time, someone have this info? Thanks

    Read the article

  • User friendly urls in joomla1.5

    - by Aruna
    Hi , I am working Joomla 1.5 . I am unaware of how to set user-friendly Urls to the site in Joomla1.5. Give suggestions for keeping User-Friendly urls ... I have changed the configuration for SEO as yes to apache mod_rewrite and Search engine friendly Urls .It changes the url as http://localhost/joomla/Joomla_1.5.7/publicationsform but it shows me a 404 error and it works only when i put http://localhost/joomla/Joomla_1.5.7/index.php/publicationsform how to resolve this . Also even when i put http://localhost/joomla/Joomla_1.5.7/index.php/publicationsform my css is not getting added..

    Read the article

  • How can I make clean search urls?

    - by newbie
    If I have search that has a lot of different options, then url becomes very long and looks very bad. Is there anyway to make urls look better? Using POST to make search would keep urls clean, but people couldn't share search urls.

    Read the article

  • SH404SEF URLs in Joomla 1.5

    - by Tao Bellamine
    I have two modules to play with urls, the global configuration module and the sh404sef module. The global config is set to "Sef urls: YES" and "mod rewrite enabled: YES" and the sh404sef is set "url optimization: NO". My problem is, even with "Sef urls" set in the global config, my urls still don't seem to be that "user friendly" so I turn on the "Url optimization" using the sh404sef module, and I get better descriptive urls. However, the problem I inherit from doing this is that my dynamically populated chronoforms get messed up (only the chrono forms, other forms are fine); These forms are now showing up at the homepage instead of their own reserved page. Here's an example: Old form "GOOD" url: http://www.mycraftwork.com/index.php?option=com_content&view=article&id=94 New optimized "BAD" URL: http://www.mycraftwork.com/handthrown-pottery/alladin-teapot/index.php?option=com_content&view=article&id=94 Any help would be GREATLY appreciated! I can even turn the sh404sef on and off if some people are interested in seeing the issue LIVE. Thanks!! Tao Bellamine

    Read the article

  • Mod Rewrite Help - Pseudo-Subdirectories

    - by Gimpyfuzznut
    I am dealing with a frustrating problem with Joomla that is going to require some url trickery. The idea is straight-forward but after reading a bunch of guides for mod-rewrite, I still can't seem to get it work. Let's say my site is www.mysite.com. Joomla is already performing some rewriting for SEF urls so I have links like www.mysite.com/home and www.mysite.com/news and so on. I want to be able to have (4) pseudo-subdirectories like www.mysite.com/mode1/ and www.mysite.com/mode2/ and so on. These subdirectories should work as if the subdirectory isn't there, ie both www.mysite.com/mode1/home and www.mysite.com/mode2/home should pull up the same www.mysite.com/home. It should point any www.mysite.com/mode1/anypagehere to www.mysite.com/anypagehere. The reason I am asking for this is because I will be reading the url for mode1, mode2, etc, to modify the template page. There will be a landing page that will direct people to /mode1/ and /mode2/ etc and the template will change based on that. Note, that I don't want to actually pass a parameter to the url accessible by a GET or whatever because Joomla removes it (perhaps because of my current mod_rewrite settings). I've pasted the current .htaccess file. RewriteBase /joomla ##########Rewrite rules to block out some common exploits RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR] # Block out any script trying to base64_encode crap to send via URL RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR] # Block out any script that includes a <script> tag in URL RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] # Block out any script trying to set a PHP GLOBALS variable via URL RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] # Block out any script trying to modify a _REQUEST variable via URL RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) # Send all blocked request to homepage with 403 Forbidden error! RewriteRule ^(.*)$ index.php [F,L] ########## Begin - Joomla! core SEF Section RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/index.php RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC] RewriteRule (.*) index.php #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] ########## End - Joomla! core SEF Section

    Read the article

  • edited and reversed changes on .htaccess - site starts redirecting to .comindex.php/

    - by Aurigae
    Site is a Joomla 2.5 site. I wanted to add a non www to www redirect to the htaccess file, did so, then the redirection went mad, reversed but still the site redirects. When i click view site in admin panel, i get linked to http://domain.comindex.php/ The website is http://www.domain.com Visiting the website URL works without www, but once you click on projects it acts mad too. Projects is managed with joomshopping extension. EDIT: the redirect also happens when rewrite is deactivated in admin panel. ## # @package Joomla # @copyright Copyright (C) 2005 - 2012 Open Source Matters. All rights reserved. # @license GNU General Public License version 2 or later; see LICENSE.txt ## ## # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE! # # The line just below this section: 'Options +FollowSymLinks' may cause problems # with some server configurations. It is required for use of mod_rewrite, but may already # be set by your server administrator in a way that dissallows changing it in # your .htaccess file. If using it causes your server to error out, comment it out (add # to # beginning of line), reload your site in your browser and test your sef url's. If they work, # it has been set by your server administrator and you do not need it set here. ## ## Can be commented out if causes errors, see notes above. Options +FollowSymLinks ## Mod_rewrite in use. RewriteEngine On ## Begin - Rewrite rules to block out some common exploits. # If you experience problems on your site block out the operations listed below # This attempts to block the most common type of exploit `attempts` to Joomla! # # Block out any script trying to base64_encode data within the URL. RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR] # Block out any script that includes a <script> tag in URL. RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR] # Block out any script trying to set a PHP GLOBALS variable via URL. RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] # Block out any script trying to modify a _REQUEST variable via URL. RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) # Return 403 Forbidden header and show the content of the root homepage RewriteRule .* index.php [F] # ## End - Rewrite rules to block out some common exploits. ## Begin - Custom redirects # # If you need to redirect some pages, or set a canonical non-www to # www redirect (or vice versa), place that code here. Ensure those # redirects use the correct RewriteRule syntax and the [R=301,L] flags. # ## End - Custom redirects ## # Uncomment following line if your webserver's URL # is not directly related to physical file paths. # Update Your Joomla! Directory (just / for root). ## # RewriteBase / ## Begin - Joomla! core SEF Section. # RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # # If the requested path and file is not /index.php and the request # has not already been internally rewritten to the index.php script RewriteCond %{REQUEST_URI} !^/index\.php # and the request is for something within the component folder, # or for the site root, or for an extensionless URL, or the # requested URL ends with one of the listed extensions RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC] # and the requested path and file doesn't directly match a physical file RewriteCond %{REQUEST_FILENAME} !-f # and the requested path and file doesn't directly match a physical folder RewriteCond %{REQUEST_FILENAME} !-d # internally rewrite the request to the index.php script RewriteRule .* index.php [L] # ## End - Joomla! core SEF Section. Redirect 301 /index.html /index.php Redirect 301 /services /project Redirect 301 /projects/projects.html /project Redirect 301 /projects/project1.html /project Redirect 301 /projects/project2.html /project Redirect 301 /projects /project Redirect 301 /keypersonnel.html /about-agrin/keystaff Redirect 301 /cooperation.htm /about-agrin/intcoop Redirect 301 /member.html /about-agrin/memberships Redirect 301 /contact.html /contacts Redirect 301 /hr.htm /jobs Redirect 301 /index.php/404 /index.php

    Read the article

  • C# Taking a element off each time (stack)

    - by Sef
    Greetings, Have a question considering a program that stimulates a stack.(not using any build in stack features or any such) stack2= 1 2 3 4 5 //single dimension array of 5 elements By calling up a method "pop" the stack should look like the following: Basically taking a element off each time the stack is being "called" up again. stack2= 1 2 3 4 0 stack2= 1 2 3 0 0 stack2= 1 2 0 0 0 stack2= 1 0 0 0 0 stack2= 0 0 0 0 0 - for (int i = 1; i <= 6; i++) { number= TryPop(s2); //use number ShowStack(s2, "s2"); } Basically I already have code that fills my array with values (trough a push method). The pop method should basically take the last value and place it on 0. Then calls up the next stack and place the following on 0 (like shown above in stack2). The current pop method that keeps track of the top index (0 elements = 0 top, 1 element = 1 top etc..). Already includes a underflow warning if this goes on 0 or below (which is correct). public int Pop() { if(top <= 0) { throw new Exception("Stack underflow..."); } else { for (int j = tabel.Length - 1; j >= 0; j--) { //...Really not sure what to do here. } } return number; }/*Pop*/ Since in the other class I already have a loop (for loop shown above) that simulates 6 times the s2 stack. (first stack: 1 2 3 4 0, second stack 1 2 3 0 0 and so on.) How exactly do I take a element off each time? Either I have the entire display on 0 or the 0 in the wrong places / out of index errors. Thanks in advance!

    Read the article

  • Windows Form color changing

    - by Sef
    Hello, So i am attempting to make a MasterMind program as sort of exercise. Field of 40 picture boxes (line of 4, 10 rows) 6 buttons (red, green, orange, yellow, blue, purple) When i press one of these buttons (lets assume the red one) then a picture box turns red. My question is how do i iterate trough all these picture boxes? I can get it to work but only if i write : And this is offcourse no way to write this, would take me countless of lines that contain basicly the same. private void picRood_Click(object sender, EventArgs e) { UpdateDisplay(); pb1.BackColor = System.Drawing.Color.Red; } Press the red button - first picture box turns red Press the blue button - second picture box turns blue Press the orange button - third picture box turns orange And so on... Ive had a previous similar program that simulates a traffic light, there i could assign a value to each color (red 0, orange 1, green 2). Is something similar needed or how exactly do i adress all those picture boxes and make them correspond to the proper button. Best Regards.

    Read the article

  • C# StringBuilder related question

    - by Sef
    Hello, I have written a program for a stack. For this i needed a StringBuilder to be able to show me what was in the stack else i would get the class name instead of the actual values inside. My question is there any other way except for a StringBuilder for such kind of problem? Also in what other kind of cases does this kind of problem happen? Also the way i have written the StringBuilder felt very awkward when i needed several things on 1 line. public override string ToString() { StringBuilder builder = new StringBuilder(); foreach (int value in tabel) { builder.Append(value); builder.Append(" "); } if (tabel.Length == tabel.Length) // this is a bit messy, since I couldn't append after the rest above { builder.Append("(top:"); builder.Append(top); builder.Append(")"); } return builder.ToString(); }/*ToString*/ Regards.

    Read the article

  • (C#) Tree sort, seeking some information.

    - by Sef
    Hello i am currently written a summary of all different kinds of sorting algorithems and their description/function/advantages & disadvantages. Although i have found everything i seek exept for tree sort. I can barely find anything at all about this subject. Some small description & algoritme / short&small program would be very much appreciated. Cheers.

    Read the article

  • C# How to calculate first 10 numbers out a bill number of 12?

    - by Sef
    Hello, Lets assume i have a bill number that has 12 numbers: 823 45678912 My question is how exactly do i do calculations with the first 10 numbers? To verify if a given in billnumber is correct i have to perform the following calculation: (first 10 numbers) % 97 = result And if the result of the calculation is the same as the last 2 numbers of my bill number, then it is verified. Thanks in advance.

    Read the article

  • FreqTable with random values(#C)

    - by Sef
    Hello, I would like to make a frequency table with random numbers. So i have created a array that generates 11 random values between 0 and 9999. public void FillArrayRandom(int[] T) { Random Rndint = new Random(); for (int i=0; i < T.Length; i++) { T[i] = Rndint.Next(0, 9999); } }/*FillArrayRandom*/ The result i want is something alike this:(bar height up to 21) So this will be a constant. * * * * * * (the highest value will have the largest row/bar) * * * * 0 1 2 3 .....(index value's) 931 6669 10 8899 .... (up to 11 random values) My question is how do i exactly caculate the frequency between those 11 random values? The bars should have a relative relation with each other depending on there frequency. I would only like to use 1 single array in my program (for the generated values). F = (F * 21?) / ...? Really no clue how to obtain the proper results. If a frequency is =21 write * If a frequency is =20 write * If a frequency is =19 write * etc... Regards.

    Read the article

  • StringBuilder related question

    - by Sef
    I have written a program for a stack. (http://stackoverflow.com/questions/2617367?tab=votes#tab-top) For this i needed a StringBuilder to be able to show me what was in the stack else i would get the class name instead of the actual values inside. My question is there any other way except for a StringBuilder for such kind of problem? Also in what other kind of cases does this kind of problem happen? Also the way i have written the StringBuilder felt very awkward when i needed several things on 1 line. public override string ToString() { StringBuilder builder = new StringBuilder(); foreach (int value in tabel) { builder.Append(value); builder.Append(" "); } if (tabel.Length == tabel.Length) // this is a bit messy, since I couldn't append after the rest above { builder.Append("(top:"); builder.Append(top); builder.Append(")"); } return builder.ToString(); }/*ToString*/

    Read the article

  • PHP Form checkbox question

    - by Sef
    Hello, I have a form that takes the following inputs: Name: IBM Surface(in m^2): 9 Floor: (Checkbox1) Phone: (Checkbox2) Network: (Checkbox3) Button to send to a next php page. All those values above are represented in a table when i press the submit button. The first two (name and surname) are properly displayed in the table. The problem is with the checkboxes. If i select the first checkbox the value in the table should be presented with 1. If its not selected the value in the table should be empty. echo "<td>$Name</td>"; // works properly echo "<td>$Surface</td>"; // works properly echo "<td>....no idea for the checkboxes</td>; Some part of my php code with the variables: <?php if (!empty($_POST)) { $standnaam = $_POST["name"]; $oppervlakte = $_POST["surface"]; $verdieping = $_POST["floor"]; $telefoon = $_POST["telefoon"]; $netwerk = $_POST["netwerk"]; if (is_numeric($surface)) { $_SESSION["name"]=$name; $_SESSION["surface"]=$surface; header("Location:ExpoOverzicht.php"); } else { echo "<h1>Wrong input, Pleasee fill in again</h1>"; } if(!empty($floor) && ($phone) && ($network)) { $_SESSION["floor"]=$floor; $_SESSION["phone"]=$phone; $_SESSION["network"]=$network; header("Location:ExpoOverzicht.php"); } } ?> Second page with table: <?php $name= $_SESSION["name"]; $surface= $_SESSION["surface"]; $floor= $_SESSION["floor"]; $phone= $_SESSION["phone"]; $network= $_SESSION["network"]; echo "<table class=\"tableExpo\">"; echo "<th>name</th>"; echo "<th>surface</th>"; echo "<th>floor</th>"; echo "<th>phone</th>"; echo "<th>network</th>"; echo "<th>total price</th>"; for($i=0; $i <= $_SESSION["name"]; $i++) { echo "<tr>"; echo "<td>$name</td>"; // gives right output echo "<td>$surface</td>"; // gives right output echo "<td>...</td>"; //wrong output (ment for checkbox 1) echo "<td>...</td>"; //wrong output (ment for checkbox 2) echo "<td>...</td>"; //wrong output (ment for checkbox 3) echo "<td>....</td>"; echo "</tr>;"; } echo "</table>"; <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" id="form1"> <h1>Vul de gegevens in</h1> <table> <tr> <td>Name:</td> <td><input type="text" name="name" size="18"/></td> </tr> <tr> <td>Surface(in m^2):</td> <td><input type="text" name="surface" size="6"/></td> </tr> <tr> <td>Floor:</td> <td><input type="checkbox" name="floor" value="floor"/></td> </tr> <tr> <td>Phone:</td> <td><input type="checkbox" name="phone" value="phone"/></td> </tr> <tr> <td>Network:</td> <td><input type="checkbox" name="network" value="network"/></td> </tr> <tr> <td><input type="submit" name="verzenden" value="Verzenden"/></td> </tr> </table> There might be a few spelling mistakes since i had to translate it. Best regards.

    Read the article

  • Dynamic Array Java program converted to C#

    - by Sef
    Hello, The folowing program was orignally in java. But i still get 1 error with the program in C#. (the eror is listed in comment in the 2nd block of code). using System; using System.Collections.Generic; using System.Linq; using System.Text; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DynArray { public class DynArrayTester { static void Main(string[] args) { DynArray da = new DynArray(5); for (int i = 1; i <= 7; i++) { da.setData(i, i); //da.put(0, 0); //da.put(6, 6); } Console.WriteLine(da); } }/*DynArrayTester*/ } using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DynArray { public class DynArray { //toestand private int[] data; //gedrag public DynArray(int size) { data = new int[size]; } public int getData(int index) { return data[index - 1]; } private void expand(int size) { int[] tmp = data; data = new int[size]; for (int i = 0; i < tmp.Length; i++) { data[i] = tmp[i]; } }/*expand*/ public void setData(int index, int data) { if (0 < index) { if (index > this.data.length) // ***error, does not contain definition for "lenght" and no exetension method "lenght"*** expand(index); this.data[index - 1] = data; } } public override string ToString() { StringBuilder buf = new StringBuilder(); for (int i = 0; i < data.Length; i++) { buf.Append("[" + i + "]"); buf.Append(data[i]); buf.Append('\n'); } return buf.ToString(); } }/*DynArray*/ }

    Read the article

1 2  | Next Page >