Daily Archives

Articles indexed Monday March 14 2011

Page 6/12 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to connect Ethernet on Ubuntu (with auto-detection)

    - by user12285
    It's been well over six months but I have the same router SmartAX MT880d with Ethernet, and the exact same problem : no internet, even though I can successfully reach the modem settings page by entering 192.168.1.1 in Firefox. I'm a total beginner with Ubuntu. My internet works great in Windows but does not work in Ubuntu. Sorry if I don't use the right (technical) terminology to explain my issue. English is not my mother tongue. For 2 weeks, I've been doing reading on the web and forums and the ubuntuguide.org to name a few, but to no avail. Now I see no other solution but to ask for help. My problem is that I can't find a way to put the right digits in the right place because I don't know what numbers I need to put in what files. E.g.: do I need to use DHCP? or a static IP address? No clue whatsoever. I'm concerned that I might put figures in the wrong spaces. For example, is the modem/router's IP exactly 192.168.1.1 for Huawei Smart AXMT880d modem? Is the subnet 255.255.255.0? Gateway 192.168.1.1? I'm confused as I can also see a different IP starting with 155131*** (is it an account number?) on my contract with Huawei (a Chinese ISP). Apart from calling 911, what other numbers do I need to put in and where? How do I check that all the numbers have been entered correctly in every appropriate space before trying to connect the Internet?

    Read the article

  • Package manager borked with gforge

    - by Leif Andersen
    I've been having a problem with the package manager. I seemed to have installed gforge, partially, but it keeps giving me errors whenever I install something. (Note that the thing I'm trying to install actually does get installed, but there is always an error returned). Here it is: Creating /etc/gforge/httpd.conf Creating /etc/gforge/httpd.secrets Creating /etc/gforge/local.inc Creating other includes invoke-rc.d: unknown initscript, /etc/init.d/postgresql-8.4 not found. dpkg: error processing gforge-db-postgresql (--configure): subprocess installed post-installation script returned error exit status 100 Errors were encountered while processing: gforge-db-postgresql E: Sub-process /usr/bin/dpkg returned an error code (1) When I try to remove it with: sudo apt-get purge gforge-common I get this: Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: gforge-common* gforge-db-postgresql* 0 upgraded, 0 newly installed, 2 to remove and 9 not upgraded. 1 not fully installed or removed. After this operation, 5,853kB disk space will be freed. Do you want to continue [Y/n]? (Reading database ... 717305 files and directories currently installed.) Removing gforge-db-postgresql ... Replacing config file /etc/postgresql/8.4/main/pg_hba.conf with new version invoke-rc.d: unknown initscript, /etc/init.d/postgresql-8.4 not found. dpkg: error processing gforge-db-postgresql (--purge): subprocess installed pre-removal script returned error exit status 100 Removing gforge-common ... Purging configuration files for gforge-common ... Processing triggers for man-db ... Errors were encountered while processing: gforge-db-postgresql E: Sub-process /usr/bin/dpkg returned an error code (1) And it complains until I do a: sudo apt-get install -f At which point gforge is re-installed. I'm out of ideas, does anyone else have any other ideas with what might be wrong, and more importantly, how I can fix it? Thank you.

    Read the article

  • Trying to install ubuntu netbook 10.10 but it hangs on the "who are you" screen

    - by Jonathan
    I have an acer aspire one ZG8 netbook, and I have wanted to put ubuntu on it for some time. But it won't install. It has wiped windows from my hard drive already, so I cant go back to the horrible 7 starter edition that came with this netbook. Would really love a way to fix this, but right now I am using the the "Try ubuntu" aspect just so I have use of the Internet. No idea if I will be able to download an older version and try again from here or what to do... Any help would be great.

    Read the article

  • Eye-Infinity across 3 displays with a Radeon 6800

    - by Peter G Mac.
    So I purchased a computer recently and have been trying to customise the display. Radeon HD 6800 series Ubuntu 10.10. I have three 22inch 1080P lcd monitors that are mounted together. Everything is working smooth. How do I get the 'big-desktop' display where I have one enormous display across all monitors? Linux - ATI Catalyst Control Center 11.2 does not give me an option to 'group' my profiles like the pictures on their site show with Windows. I have been searching all over for help. Much Obliged, -Peter

    Read the article

  • Strange spam posts not making sense

    - by Paaland
    I'm running a web site with a forum where one small part is open for posting from unregistered users. The site uses captcha, but still some spam posts get through every day. Here is the thing. All of the messages follow the same pattern, but all also come from different IP's. That makes me thing this is some sort of automated scripted "attack" from a botnet of some sorts. The strange thing is that all the messages start with six random characters and contains a couple of links. The words have no meaning and the domains in the links does not even exist. Why would anyone use time and resources spreading these things? Below you can see two of these messages: A5Zfs6 exrzvrbspntz, [url=http://nktqoqllnuab.com/]nktqoqllnuab[/url], [link=http://wtrenldadvsy.com/]wtrenldadvsy[/link], [http://rnlrqfgdvdot.com/] O2oLpL nqeffxhryfdk, [url=http://jutyurbpfxow.com/]jutyurbpfxow[/url], [link=http://jpcdtmdalpow.com/]jpcdtmdalpow[/link], [http://qopqwqxwjdjx.com/] Since all the messages come from different IP's I can't see blocking those will help much. For now I'm considering just dropping all messages following this pattern since it's quite easy to match with a regexp. Have anyone else seen these kinds of messages or know the point of posting them?

    Read the article

  • How to enable customers to use their own domain for sites hosted by me

    - by Scott
    I am thinking of running a self-site builder. But was wondering how would I allow customers to use their own domains that they already own. Is that even possible? Let's say my site is www.bestsitebuildingwebsite.com and each customer has urls like this www.bestsitebuildingwebsite.com/frances www.bestsitebuildingwebsite.com/eden www.bestsitebuildingwebsite.com/john And a customer has a domain called widgets.com Is it actually possible domain widgets.com to go to my site somehow and have HASHES on the URL still work (my site makes use of hashes for AJAX queries). And their site still have good SEO with Google? Thanks Scott

    Read the article

  • share distribution question

    - by facebook-100000781341887
    Hi, I just developed a facebook game(mifia like), but the graphic I make is not good, because it is reference with some existing photo, trace with AI, and coloring it. Therefore, I invite my friend to join me, he is a graphic designer, own a company with his friend (I know both of them), for the share, I expect at least 70% for me, and at most 30% for them (both of them want to join). Therefore, they give me a counter offer, 60% for me and 40% for them, of course, I feel their counter offer is unacceptable because they only build the image in part time, and all the other work just like coding, webhosting...etc, is what I do in full time. Why they said they worth 40% is that they will make a good graphic, they can provide a advertise channel(on local magazine), etc... Actually, I don't think the game need advertisement on local magazine because the game is not target for local... Please give me some comments on this issue(is the share fair? what is the importance of the image of the game, is it worth more than 30%), or can anyone share the experience on this. Thanks in advance.

    Read the article

  • XNA - Moving Background Calculations

    - by Jesse Emond
    Hi, My question is relatively hard to explain(for me, at least), so I'll go one step at a time and just tell me in the comments if it's not clear enough. So I'm making a "Defend Your Castle" type 2D game, where two players own a castle and create units that will move horizontally to try to destroy the opponent's base. Here's a screenshot of the game: The distance between both castles is much bigger in a real game though, bigger than the screen's width actually. Because the distance is bigger than the screen's width, I had to implement a simple 2D camera: Camera2D, which only holds a Location Vector2 (and I always make sure this camera is within the field area). Then, I just move all the game elements(castles, units, health bars) by that location, so that if a unit is at (5, 0), and the camera's location is (5, 0), then the unit's position will be moved by 5 units to the left, making it (0, 0) on the screen. At first, I simply used a static background with mountains and clouds(yeah, those are supposed to be mountains and clouds). Obviously, this looked awful: when you moved the camera, the background would stay immobile. Instead, I'd like to make a moving background, kind of a "scrolling" one. But rather than making a background with the same width as the distance between the castles, I'd like to make one that is a little bit smaller(but still bigger than the screen's width). I thought this would create an effect of "distance" with the background(but it might just look awful, too). Here's the background I'm testing with: I tried different ways, but none of them seems to work. I tried this: float backgroundFieldRatio = BackgroundTexture.Width / fieldWidth;//find the ratio between the background and the field. float backgroundPositionX = -cam.Location.X * backgroundFieldRatio;//move the background to the left When I run this with fieldWith = 1600, BackgroundTexture.Width = 1500 and while looking at the rightmost area, the background is offset to the left by a too big amount, and we can see the black clear color in the back, as you can see here: I hope I explained properly what I'm trying to achieve. Thank you for your time. Note: I didn't know what to look for on Google, so I thought I'd ask here.

    Read the article

  • XNA - Am I screwing up the LoadContent for Texture2D?

    - by Bombcode
    I've read forum threads and questions and I done just about everything. I need to know what am I screwing up here. Here's the code in the constructor. Content.RootDirectory = "GameStateContent"; //Content.RootDirectory = "Content"; And this is in the LoadContent method menu = this.Content.Load<Texture2D>("mainmenu"); And here's the image screen shot of the folder structure. http://i.imgur.com/HnndE.png Any helps on this? Thanks.

    Read the article

  • seeing the console's output in visual studio 2010?

    - by AnH
    Hi Quick question please, its the first time am using visual studio, I usually program in netbeans (java), anyways am writing a simple C# program with some outputs (Console.WriteLine("...");), problem each time i run it I cannot see the program's output in the output window. The "program output" tag is already checked and I already redirected all outputs to the intermediate window but to no avail? any ideas? thanx =)

    Read the article

  • addAttributeToFilter and OR condition in Magento's Collection

    - by ÉricP
    Hi, I'd like to select products depending on several criteria from different attribute. I know how to user $collection->addAttributeToFilter('someattribute', array('like' => '%')); But I'd like to use several attribute for OR condition. Like: $collection->addAttributeToFilter('someattribute', array('like' => 'value'));` OR $collection->addAttributeToFilter('otherattribute', array('like' => 'value'));` To get products which either 'someattribute' OR 'otherattribute' set to 'value' Is it possible?

    Read the article

  • Usage of IcmpSendEcho2 with an asynchronous callback

    - by Ben Voigt
    I've been reading the MSDN documentation for IcmpSendEcho2 and it raises more questions than it answers. I'm familiar with asynchronous callbacks from other Win32 APIs such as ReadFileEx... I provide a buffer which I guarantee will be reserved for the driver's use until the operation completes with any result other than IO_PENDING, I get my callback in case of either success or failure (and call GetCompletionStatus to find out which). Timeouts are my responsibility and I can call CancelIo to abort processing, but the buffer is still reserved until the driver cancels the operation and calls my completion routine with a status of CANCELLED. And there's an OVERLAPPED structure which uniquely identifies the request through all of this. IcmpSendEcho2 doesn't use an OVERLAPPED context structure for asynchronous requests. And the documentation is unclear excessively minimalist about what happens if the ping times out or fails (failure would be lack of a network connection, a missing ARP entry for local peers, ICMP destination unreachable response from an intervening router for remote peers, etc). Does anyone know whether the callback occurs on timeout and/or failure? And especially, if no response comes, can I reuse the buffer for another call to IcmpSendEcho2 or is it forever reserved in case a reply comes in late? I'm wanting to use this function from a Win32 service, which means I have to get the error-handling cases right and I can't just leak buffers (or if the API does leak buffers, I have to use a helper process so I have a way to abandon requests). There's also an ugly incompatibility in the way the callback is made. It looks like the first parameter is consistent between the two signatures, so I should be able to use the newer PIO_APC_ROUTINE as long as I only use the second parameter if an OS version check returns Vista or newer? Although MSDN says "don't do a Windows version check", it seems like I need to, because the set of versions with the new argument aren't the same as the set of versions where the function exists in iphlpapi.dll. Pointers to additional documentation or working code which uses this function and an APC would be much appreciated. Please also let me know if this is completely the wrong approach -- i.e. if either using raw sockets or some combination of IcmpCreateFile+WriteFileEx+ReadFileEx would be more robust.

    Read the article

  • Android dictionary application

    - by mawia
    Hi, I wanted to develop an application on top of a dictionary i.e. an application that uses dictionary as a part of it.Is their any dictionary application available in the market for this purpose?Application which come under GPL is preferable.Also those which uses local database instead of using network connection is preferable. If not,is there any dictionary database available in the market on the top of which a dictionary application can be developed which can then be used for said purpose? Hope I am clear. Thanks in advance.

    Read the article

  • Xsl mime type problem

    - by savruk
    Hi, I have a busybox with lighttpd running on as http server. My problem is while firefox and opera can get the page with applied xsl, Arora(webkit) can not. Here is the script I use to get it work: <html> <head> <script> function loadXMLDoc(dname) { if (window.XMLHttpRequest) { xhttp=new XMLHttpRequest(); } else { xhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xhttp.open("GET",dname,false); xhttp.send(""); return xhttp.responseXML; } function querySt(ji) { hu = window.location.search.substring(1); gy = hu.split("&"); for (i=0;i<gy.length;i++) { ft = gy[i].split("="); if (ft[0] == ji) { return ft[1]; } } } function displayResult() { xml=loadXMLDoc("sample.xml"); alert(xml)//Gives [object Document] $scan=querySt("scan"); $sub = querySt("sub"); xsl=loadXMLDoc("sample.xsl"); alert(xsl)//Gives Null // code for IE if (window.ActiveXObject) { ex=xml.transformNode(xsl); document.getElementById("example").innerHTML=ex; } // code for Mozilla, Firefox, Opera, etc. else if (document.implementation && document.implementation.createDocument) { xsltProcessor=new XSLTProcessor(); xsltProcessor.importStylesheet(xsl); xsltProcessor.setParameter(null,"scan",$scan) if($sub != ""){ xsltProcessor.setParameter(null,"sub",$sub) } resultDocument = xsltProcessor.transformToFragment(xml,document); document.getElementById("example").appendChild(resultDocument); } } </script> </head> <body onload="displayResult()"> <div id="example" ></div> </body> </html> I tried to see if it load xsl well and put an alert(xsl) but it gives null. Other browser can get xml and xsl files perfectly. What can be the problem? Thanks P.S: It runs well on my local server with all browser.

    Read the article

  • need to count the frequency of each terms inside a document

    - by Wai Loon II
    hi, i need to calculate the frequency of all the terms inside a document. How can i do that ? i do not ask for codes. I am just asking for guidance. Actually i am doing some similarity calculation between a document and query. I have calculated the term frequency for the query. But i do not know how to calculate the tern frequency for EACH words inside a document. Can anyone guide me ? Thank you for your attention.

    Read the article

  • making my player sprite land on top of my platform sprite

    - by Stone
    Hi, in my XNA game(im fairly new to XNA by the way) i would like to have my player sprite land on top of a platform. i have a player sprite class that inherits from my regular sprite class, and the regular sprite class for basic non playable sprite stuff such as boxes, background stuff, and platforms. However, i am unsure how to implement a way to make my player sprite land on a platform. My player Sprite can jump and move around, but i dont know where and how to check to see if it is on top of my platform sprite. My player sprites jump method is here private void Jump() { if (mCurrentState != State.Jumping) { mCurrentState = State.Jumping; mStartingPosition = Position; mDirection.Y = MOVE_UP; mSpeed = new Vector2(jumpSpeed, jumpSpeed); } } mStartingPosition is player sprites starting position of the jump, and Position is the player sprites current position. I would think that my code for checking to see whether my player sprite is on top of my platform sprite. I am unsure how to reference my platform sprite inside of the playersprite class and inside of the jump method. i think it should be something like this //platformSprite.CollisonBox would be the rectangle around the platform, but im not //sure how to check to see if player.Position is touching any point //on platformSprite.CollisionBox if(player.Position == platformSprite.CollisionBox) { player.mDirection = 0; } Again im pretty new to programming and XNA, and some of this logic i dont quite understand so any help on any of it would be greatly appreciated:D Thanks

    Read the article

  • Sending string to wcf service using jquery ajax. why can i only send strings of numbers?

    - by Robodude
    Hi Guys, For some reason, I'm only able to pass strings containing numbers to my web service when using jquery ajax. This hasn't been an issue so far because I was always just passing IDs to my wcf service. But I'm trying to do something more complex now but I can't figure it out. In my interface: [OperationContract] [WebInvoke(ResponseFormat = WebMessageFormat.Json)] DataTableOutput GetDataTableOutput(string json); My webservice: public DataTableOutput GetDataTableOutput(string json) { DataTableOutput x = new DataTableOutput(); x.iTotalDisplayRecords = 9; x.iTotalRecords = 50; x.sColumns = "1"; x.sEcho = "1"; x.aaData = null; return x; } Javascript/Jquery: var x = "1"; $.ajax({ type: "POST", async: false, url: "Services/Service1.svc/GetDataTableOutput", contentType: "application/json; charset=utf-8", data: x, dataType: "json", success: function (msg) { }, error: function (XMLHttpRequest, textStatus, errorThrown) { //alert(XMLHttpRequest.status); //alert(XMLHttpRequest.responseText); } }); The above code WORKS perfectly. But when I change x to "t" or even to "{'test':'test'}" I get a Error 400 Bad Request error in Firebug. Thanks, John EDIT: Making some progress! data: JSON.stringify("{'test':'test'}"), Sends the string to my function! EDIT2: var jsonAOData = JSON.stringify(aoData); $.ajax({ type: "POST", async: false, url: sSource, contentType: "application/json; charset=utf-8", data: "{'Input':" + jsonAOData + "}", dataType: "json", success: function (msg) { }, error: function (XMLHttpRequest, textStatus, errorThrown) { //alert(XMLHttpRequest.status); //alert(XMLHttpRequest.responseText); } }); EDIT3: I modified the code block I put in EDIT2 up above. Swapping the " and ' did the trick! $.ajax({ type: "POST", async: false, url: sSource, contentType: "application/json; charset=utf-8", data: '{"Input":' + jsonAOData + '}', dataType: "json", success: function (msg) { }, error: function (XMLHttpRequest, textStatus, errorThrown) { //alert(XMLHttpRequest.status); //alert(XMLHttpRequest.responseText); } }); However, I have a new problem: public DataTableOutput GetDataTableOutput(DataTableInputOverview Input) { The input here is completely null. The values I passed from jsonAOData didn't get assigned to the DataTableInputOverview Input variable. :(

    Read the article

  • What's the expectation for silverlight 2's lifespan?

    - by dwidel
    Way back when I built an internal site for a customer using silverlight 2. They've been happy with it and I've barely had to touch it. Is the expectation that this site will always work? What I'm afraid of is suddenly getting a call years from now that the users installed silverlight X and now it's broken and I'm going to have to convert it immediately past Y versions of Silverlight to get the site back up, and I don't even do Silverlight anymore. I already went through this once when it went from 2 beta to 2 release and and scrambling to fix all the breaking changes and get the site back up. It wasn't as big a deal then as we were in beta anyway. I could upgrade now but it would be really tough to go back to the customer and ask for money to do an upgrade when they are happy now and will see no noticeable benefit from staying current. Additionally there are some third party controls that would have to be licensed again. So I guess what I'm asking is there a known end of life? Or do we just play it by ear?

    Read the article

  • Design Code Outside of an IDE (C#)?

    - by ryanzec
    Does anyone design code outside of an IDE? I think that code design is great and all but the only place I find myself actually design code (besides in my head) is in the IDE itself. I generally think about it a little before hand but when I go to type it out, it is always in the IDE; no UML or anything like that. Now I think having UML of your code is really good because you are able to see a lot more of the code on one screen however the issue I have is that once I type it in UML, I then have to type the actual code and that is just a big duplicate for me. For those who work with C# and design code outside of Visual Studio (or at least outside Visual Studio's text editor), what tools do you use? Do those tools allow you to convert your design to actual skeleton code? It is also possible to convert code to the design (when you update the code and need an updated UML diagram or whatnot)?

    Read the article

  • Recursive templates: compilation error under g++

    - by Johannes
    Hi, I am trying to use templates recursively to define (at compile-time) a d-tuple of doubles. The code below compiles fine with Visual Studio 2010, but g++ fails and complains that it "cannot call constructor 'point<1::point' directly". Could anyone please shed some light on what is going on here? Many thanks, Jo #include <iostream> #include <utility> using namespace std; template <const int N> class point { private: pair<double, point<N-1> > coordPointPair; public: point() { coordPointPair.first = 0; coordPointPair.second.point<N-1>::point(); } }; template<> class point<1> { private: double coord; public: point() { coord= 0; } }; int main() { point<5> myPoint; return 0; }

    Read the article

  • django sphinx automodule -- basics

    - by haras.pl
    Hi, I have a projects with several large apps and where settings and apps files are split. directory structure goes something like that: project_name __init__.py apps __init__.py app1 app2 3rdparty __init__.py lib1 lib2 settings __init__.py installed_apps.py path.py templates.py locale.py ... urls.py every app is like that __init__.py admin __init__.py file1.py file2.py models __init__.py model1.py model2.py tests __init__.py test1.py test2.py views __init__.py view1.py view2.py urls.py how to use a sphinx to autogenerate documentation for that? I want something like that for each in settings module or INSTALLED_APPS (not starting with django.* or 3rdparty.*) give me a auto documentation output based on docstring and autogen documentation and run tests before git commit btw. I tried doing .rst files by hand with .. automodule:: module_name :members: but is sucks for such a big project, and it does not works for settings Is there an autogen method or something? I am not tied to sphinx, is there a better solution for my problem?

    Read the article

  • Drupal 6 Redirect automatically when selecting deepest item from a hierarchycal tree

    - by liutis
    Drupal 6, Redirect automatically when selecting deepest item from a hierarchycal tree, like: Tree Parent .|Child 1 ....|_Child 1.1 .|_Child 2 Redirect action must occour only on the last items: Child 1.1 and Child 2 Destination of creat different content types, will be defined in js array. But how to send hierarchical select value to, destination add content type? Maybe like redirect_url?tid_value=value123. I have to save all taxonomy path, but it would be enouth to get deepest one tid value. Should i use multipage approuch here? Any solusion?

    Read the article

  • How to write PIL image filter for plain pgm format?

    - by Juha
    How can I write a filter for python imaging library for pgm plain ascii format (P2). Problem here is that basic PIL filter assumes constant number of bytes per pixel. My goal is to open feep.pgm with Image.open(). See http://netpbm.sourceforge.net/doc/pgm.html or below. Alternative solution is that I find other well documented ascii grayscale format that is supported by PIL and all major graphics programs. Any suggestions? br, Juha feep.pgm: P2 # feep.pgm 24 7 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 3 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 15 15 15 0 0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 15 0 0 3 3 3 0 0 0 7 7 7 0 0 0 11 11 11 0 0 0 15 15 15 15 0 0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 0 0 0 3 0 0 0 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 edit: Thanks for the answer, I works... but I need a solution that uses Image.open(). Most of python programs out there use PIL for graphics manipulation (google: python image open). Thus, I need to be able to register a filter to PIL. Then, I can use any software that uses PIL. I now think mostly scipy, pylab, etc. dependent programs.

    Read the article

  • Developing ASP.Net User Control to be imported to SharePoint MOSS 2007

    - by Don Kirkham
    Apologies if this has been answered, but I could not find a similar question: I am developing a webpart for MOSS 2007. I am using WSPBuilder to built a visual webpart (ascx) and everything works fine, but the development/debug cycle is just painfully slow, so I'd like to know if it is possible (without being too painful) to develop the user control faster using an .Net Web Application project with all of the nice F5 debugging, then import the final product into my SharePoint visual webpart. The user control interacts with a LOB system (SQL) and does not reference the SharePoint API at all. (The reason I am building this as a webpart is because I don't need another web app to run this one page, so putting it into a webpart on a new webpart page on my existing site is the best solution IMO.) I would obviously need to import (reference?) my data access classes into my "temp" web app, but think that would not be too much trouble. I realize this will be extra effort to get this set up, but am thinking the payoff will be reduced development time of the actual user control using a little web application vs having to use the compile/build WSP/deploy WSP/reset ISS/test/make a change/repeat cycle that MOSS requires. (I guess SP2010/VS2010 has spoiled me with the native SharePoint tools available.)

    Read the article

  • Why "Not an ARRAY reference" error?

    - by Sandra Schlichting
    I have this script #!/usr/bin/perl use strict; use warnings; use yy; my $data = [ ["aax", "ert", "ddd"], ["asx", "eer", "kkk"], ["xkk", "fff", "lll"], ["xxj", "vtt", "lle"], ]; use Test::More tests => 4; is(yy::type1_to_type2(\$data, 'aax'), 'ert'); is(yy::type1_to_type3(\$data, 'asx'), 'kkk'); is(yy::type2_to_type3(\$data, 'fff'), 'lll'); is(yy::type3_to_type1(\$data, 'lle'), 'xxj'); which uses this module package yy; sub typeX_to_typeY { my ($x, $y, $data, $str) = @_; foreach (@$data) { if ($_->[$x - 1] eq $str) { return $_->[$y - 1]; } } return; } sub type1_to_type2 { typeX_to_typeY(1, 2, @_) } sub type1_to_type3 { typeX_to_typeY(1, 3, @_) } sub type2_to_type1 { typeX_to_typeY(2, 1, @_) } sub type2_to_type3 { typeX_to_typeY(2, 3, @_) } sub type3_to_type1 { typeX_to_typeY(3, 1, @_) } sub type3_to_type2 { typeX_to_typeY(3, 2, @_) } 1; and gives this error Not an ARRAY reference at yy.pm line 6. # Looks like your test died before it could output anything. The line it complains about is foreach (@$data) { Isn't this the way to pass an array reference? What am I doing wrong?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12  | Next Page >