Search Results

Search found 38 results on 2 pages for 'pistacchio'.

Page 1/2 | 1 2  | Next Page >

  • Perl cgi @INC different in shell and in http request

    - by pistacchio
    Hi to all, I have the follwing, simplest per cgi script: use strict; use warnings; use CGI(); use CGI::Carp qw(fatalsToBrowser); use Template; print CGI::header(); foreach(@INC) { print "$_\n"; } When called (http://[..]/cgi-bin/p.cgi) I am given the following error: Can't locate Template.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /home/pistacchio/webapps/htdocs/cgi-bin/p.cgi line 8. BEGIN failed--compilation aborted at /home/pistacchio/webapps/htdocs/cgi-bin/p.cgi line 8. I made sure that Template is installed and indeed when running this program from shell it works (loads Template) and outputs: Content-Type: text/html; charset=ISO-8859-1 /home/pistacchio/lib/perl5 /home/pistacchio/lib/perl5/lib/i386-linux-thread-multi /home/pistacchio/lib/perl5/lib /home/pistacchio/lib/perl5/lib/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 Template is installed in /home/pistacchio/lib/perl5/lib/i386-linux-thread-multi [pistacchio@web118 i386-linux-thread-multi]$ pwd /home/pistacchio/lib/perl5/lib/i386-linux-thread-multi [pistacchio@web118 i386-linux-thread-multi]$ ls auto perllocal.pod Template Template.pm This directory is correctly listed in env and, as previously posted, in @INC. In @INC it is shown twice, so I even tried to pop it out before calling use Template, but without result. From env: [pistacchio@web118 i386-linux-thread-multi]$ env [..] PERL5LIB=/home/pistacchio/lib/perl5:/home/pistacchio/lib/perl5/lib:/home/pistacchio/lib/perl5/lib/i386-linux-thread-multi [..] Removing use Template gets rid of the problem. Can anybody help?

    Read the article

  • How do I set Perl's @INC for a CGI script?

    - by pistacchio
    I have the follwing, simplest Perl CGI script: use strict; use warnings; use CGI(); use CGI::Carp qw(fatalsToBrowser); use Template; print CGI::header(); foreach(@INC) { print "$_\n"; } When called (http://[..]/cgi-bin/p.cgi) I am given the following error: Can't locate Template.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /home/pistacchio/webapps/htdocs/cgi-bin/p.cgi line 8. BEGIN failed--compilation aborted at /home/pistacchio/webapps/htdocs/cgi-bin/p.cgi line 8. I made sure that Template is installed and indeed when running this program from shell it works (loads Template) and outputs: Content-Type: text/html; charset=ISO-8859-1 /home/pistacchio/lib/perl5 /home/pistacchio/lib/perl5/lib/i386-linux-thread-multi /home/pistacchio/lib/perl5/lib /home/pistacchio/lib/perl5/lib/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 Template is installed in /home/pistacchio/lib/perl5/lib/i386-linux-thread-multi [pistacchio@web118 i386-linux-thread-multi]$ pwd /home/pistacchio/lib/perl5/lib/i386-linux-thread-multi [pistacchio@web118 i386-linux-thread-multi]$ ls auto perllocal.pod Template Template.pm This directory is correctly listed in env and, as previously posted, in @INC. In @INC it is shown twice, so I even tried to pop it out before calling use Template, but without result. From env: [pistacchio@web118 i386-linux-thread-multi]$ env [..] PERL5LIB=/home/pistacchio/lib/perl5:/home/pistacchio/lib/perl5/lib:/home/pistacchio/lib/perl5/lib/i386-linux-thread-multi [..] Removing use Template gets rid of the problem.

    Read the article

  • Home computer as ssh bridge

    - by pistacchio
    Hi at work, due to our network configuration, i cannot ssh external servers. We are on a Windows environment. I need to ssh a server of mine, but i can only exit from our LAN via port 88. How could I use my home MacOs box to accept an http connection from my home computer and route it via ssh to the server i need to' connect to? Thanks.

    Read the article

  • Easy management of multiple connections

    - by pistacchio
    Hi, on a Windows 7 machine I need to switch back and forth two connections: the LAN connection (that works behind a proxy) and a wireless connection via a USB modem. This requires every time to activate / deactivate two connections in the manager and switch on / off the LAN settings. I don't think there is some way to keep two connections alive and specify which one to use based on the program, but my question is: is there a simple little utility that makes switching the connection one-click easy and fast? Thanks

    Read the article

  • Multiple servers vs 1 big server performace

    - by pistacchio
    Hi to all! My team of developers has suggested a server structure for an upcoming project we are developing. Our structure is "logical", meaning that the various logical components of the application (it is a distributed one) relies on different servers. Some components are more critical than others and will be subjected to more load. Our proposal was to have 1 server per component but the hardware guys suggested to replace the various machines with a single, bigger one with virtual servers. They're gonna use Blade Servers. Now, I'm not an expert at all, but my question to the guys was: so if we need, for example, 3 2GHz CPU / 2GB RAM machines and you give me 1 machine with 3 2GHz CPUs and 6 GB of RAM it is the same? They told me it is. Is this accurate? What are the advantages or disadvantages of both the solutions? What are the generally accepted best practices? Could you point out some URL reference dealing with the problem? Thank you in advance! EDIT: Some more info. The (internet / intranet) application is already layered. We have some servers on the DMZ that will expose pages to the internet and the databases are on their own machines. What we want to split (and they want to join) are some webservers that mainly expose webservices. One is a DAL that communicates with the database layer, one is our Single Sign On / User Profile application that gets called once per page and one is a clone of what seen on the Internet to be used on our lan.

    Read the article

  • Sharepoint DateTimeControl: set it to null

    - by pistacchio
    Hi, how can I set the selected value of a Sharepoint DateTimeControl to null? When you first load it into a page, there's no value selected (even if the returned value is not properly null but one can check it with IsDateEmpty). How can i programmatically set it back to the initial, empty value? Thanks

    Read the article

  • C#: Pass a user-defined type to a Oracle stored procedure

    - by pistacchio
    With reference to http://stackoverflow.com/questions/980324/oracle-variable-number-of-parameters-to-a-stored-procedure I have s stored procedure to insert multiple Users into a User table. The table is defined like: CREATE TABLE "USER" ( "Name" VARCHAR2(50), "Surname" VARCHAR2(50), "Dt_Birth" DATE, ) The stored procedure to insert multiple Users is: type userType is record ( name varchar2(100), ... ); type userList is table of userType index by binary_integer; procedure array_insert (p_userList in userList) is begin forall i in p_userList.first..p_userList.last insert into users (username) values (p_userList(i) ); end array_insert; How can I call the stored procedure from C# passing a userList of userType? Thanks

    Read the article

  • DataSet.GetXml not returning null results

    - by pistacchio
    Hi, whenever I convert a DatSet into an XML with DataSet.GetXml, any null value is ignored, so, where i expect this: <value1>a</value1> <value2></value2> <value3>c</value3> I get this instead: <value1>a</value1> <value3>c</value3> Any quick and dirty way to handle this? Thanks EDIT: I think a solution would be using WriteXml. Could anyone provide me with a sample of using it WITHOUT writing to a file but getting a string just like GetXml does? Thanks

    Read the article

  • SPGridView current item in Sharepoint

    - by pistacchio
    Hi, I'm making a custom webpart. I takes some items from a list and display them with a SPGridView. I bound the fields like this: // Grab data from a SP List into dvwTickets SPGridView grdMyTickets = new SPGridView(); grdMyTickets.DataSource = dvwTickets; [..] BoundField colTicketTypology = new BoundField(); colTicketTypology.DataField = "ID"; colTicketTypology.HeaderText = ticketList.Fields.GetFieldByInternalName("ID").Title; grdMyTickets.Columns.Add(colTicketTypology); [..] This works. Now, what a grid does behind the scene when binding data to it is cycling through the binded data. How can I access the "Current Item" to make operations on each item while binding? Thanks

    Read the article

  • Crossdomain TinyMCE

    - by pistacchio
    Hi, folling this discussion and this link, I learnt that by adding document.domain = 'mydomain.com'; to the tinyMCE initializer file and tiny_mce_popup.js i can overcome the cross domain problem. I haven't tested it on a proper production server, but in my dev environment the base domain is localhost:8000 and my static files (also tinyMCE ones) are on localhost:88. Adding document.domain = 'localhost:8000'; or document.domain = 'localhost:88'; doesn't solve the problem as I get the following error: Uncaught Error: SECURITY_ERR: DOM Exception 18 Any help? Thanks

    Read the article

  • Django select max id

    - by pistacchio
    Hi, given a standard model (called Image) with an autoset 'id', how do I get the max id? So far I've tried: max_id = Image.objects.all().aggregate(Max('id')) but I get a 'id__max' Key error. Trying max_id = Image.objects.order_by('id')[0].id gives a 'argument 2 to map() must support iteration' exception Any help?

    Read the article

  • Online PHP/HTML/JS/CSS editor

    - by pistacchio
    Hi to all, is there any free php code that, once installed, allows you to browse and edit files (with html, javascript, php and css highlight) on the server where it's installed? The aim is to code online, browser based. I've tried http://phpanywhere.net/ that can make this possible, but it is buggy and moreover it requires an external (ftp) access to your server that is quite different (and less secure) that working directly on the server. Thanks in advance

    Read the article

  • VisualStudio: no debug output

    - by pistacchio
    Hi, I'm trying to debug a C# application. The method: System.Diagnostics.Debug.WriteLine("something"); should do the work, but in the Output window (set to "debug" and with all the options activated) I can't see a single line I'm trying to write. Any idea? Thanks EDIT: I'm using VS2008

    Read the article

  • Silverlight webservice

    - by pistacchio
    Hi, Can webservices be accessed by Silverlight 3? On VisualStudio, a Silverlight project doesn't allow me to add a "web reference" but only a "web service reference" that is for WCF and not "normal" webservices. Any help? Thanks

    Read the article

  • Automatic database schema generation and migration with Perl

    - by pistacchio
    In Ror or Django or web2py you can "describe" a database (as a set of classes that remaps to tables) and the framework (having being provided with a connection string to the desired database) generates the tables, fields, relations and in the case of RoR and web2py it also keeps it up-to-date (eg, removing a class drops the table, adding a property to the class triggers an "alter table add" etc). Is there any Perl module that does the same? Eg, it takes the YAML/XML/JSON description of a database as input and modifies/generates the database schema accordingly?

    Read the article

  • Dynamically loading css stylesheet doesn't work on IE

    - by pistacchio
    Hi, I dynamically load a css stylesheet (with a little help from jQuery) like this: var head = document.getElementsByTagName('head')[0]; $(document.createElement('link')) .attr({ type: 'text/css', href: '../../mz/mz.css', rel: 'stylesheet' }) .appendTo(head); This works fine in Firefox and Google Chrome, but not in IE. Any help? Thanks

    Read the article

  • Django: tinyMCE and cross site javascript

    - by pistacchio
    Hi, follow this question, I was able to set some textareas in my admin page as richtext inputs. The most voted answer suggests to follow an example and is what i did. Also, it talks about a problem concerning "blank pages". I'm having the same problem and I'm not able to solve it. I have my media files served by a different server, so MEDIA_URL points to a different host with a different port. To simulate this in my dev environment, I also serve media files from a different port. Debugging the failing javascript, Chrome yelds: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/admin/blog/post/add/ from frame with URL http://localhost:88/s3mangerie/js/tiny_mce/themes/advanced/image.htm. Domains, protocols and ports must match. How to solve this problem? Thanks

    Read the article

  • Django model fields getter / setter

    - by pistacchio
    Hi, is there something like getters and setters for django model's fields? For example, I have a text field in which i need to make a string replace before it get saved (in the admin panel, for both insert and update operations) and make another, different replace each time it is read. Those string replace are dynamic and need to be done at the moment of saving and reading. As I'm using python 2.5, I cannot use python 2.6 getters / setters. Any help?

    Read the article

  • Automatic database generation / migration with perl

    - by pistacchio
    Hi, In Ror or Django or web2py you can "describe" a database (as a set of classes that remaps to tables) and the framework (having being provided with a connection string to the desired database) generates the tables, fields, relations and in the case of RoR and web2py it also keeps it up-to-date (eg, removing a class drops the table, adding a property to the class triggers an "alter table add" etc). Is there any perl module that does the same? Eg, it takes the YAML / XML / JSON description of a database as input and modifies / generates the database accordingly? Thanks in advance.

    Read the article

  • Why can't I simply copy installed Perl modules to other machines?

    - by pistacchio
    Being very new to Perl but not to dynamic languages, I'm a bit surprised at how not straight forward the manage of modules is. Sure, cpan X does theoretically work, but I'm working on the same project from three different machines and OSs (at work, at home, testing in an external environment). At work (Windows 7) I have problem using cpan because of our firewall that makes ftp unusable At home (Mac OS X) it does work In the external environment (Linux CentOs) it worked after hours because I don't have root access and I had to configure cpan to operate as a non-root user I've tried on another server where I have an access. If the previous external environment is a VPS and so I have a shell access, this other one is a cheap shared hosting where I have no way to install new modules other than the ones pre-installed At the moment I still can't install Template under Windows. I've seen that as an alternative I could compile it and I've also tried ActiveState's PPM but the module is not existent there. Now, my perplexity is about Perl being a dynamic language. I've had all these kind of problems while working, for example, with C where I had to compile all the libraries for all the platform, but I thought that with Perl the approach would have been very similar to Python's or PHP's where in 90% of the cases copying the module in a directory and importing it simply works. So, my question: if Perl's modules are written in Perl, why the copy/paste approach will not work? If some (or some part) of the modules have to be compiled, how to see in CPAN if a module is Perl-only or it relies upon compiled libraries? Isn't there a way to download the module (tar, zip...) and use cpan to deploy it? This would solve my problem under Windows.

    Read the article

  • Validation library PHP / Javascript

    - by pistacchio
    Hi, could someone recommend a PHP form validation library (that works independently outside of any php framework) that apart from doing all sort of basic validation (is empty, vs regex, is email, is alphanumeric and so on) can produce javascript code (ideally to work with jquery) to validate the very same form with the very same rules client-side and hence define validation rules in a single place and have a form validated both server and client side? Thanks.

    Read the article

  • Redirect from Attribute

    - by pistacchio
    How can I create an attribute for an ASP.NET page that redirects to another page? [MyAttribute()] public partial class Default : System.Web.UI.Page { protected override void OnLoad(EventArgs e) { base.OnLoad(e); } } [AttributeUsage(AttributeTargets.All)] public class MyAttribute: Attribute { public MyAttribute() { if (// something) { // I need to redirect to some page here } } }

    Read the article

1 2  | Next Page >