Search Results

Search found 2650 results on 106 pages for 'pm 77 1'.

Page 95/106 | < Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >

  • Perl Lingua giving weird error on install

    - by user299306
    I am trying to install perl Lingua onto a unix system (ubuntu, latest version). Of course I am root. when I go into the package to install using 'perl Makefile.pl' I get this dumb error: [root@csisl27 Lingua-Lid-0.01]# perl Makefile.PL /opt/ls//lib does not exist at Makefile.PL line 48. I have tried playing with the path on line 48, nothing changes, here is what line 48-50 looks like: Line 48: die "$BASE/lib does not exist" unless -d "$BASE/lib"; Line 49: die "$BASE/include does not exist" unless -d "$BASE/include"; Line 50: die "lid.h is missing in $BASE/include" unless -e "$BASE/includ/lid.h"; The variable $BASE is declared as this: $BASE = "/opt/ls/" if ($^O eq "linux" or $^O eq "solaris"); $BASE = "/usr/local/" if ($^O eq "freebsd"); $BASE = $ENV{LID_BASE_DIR} if (defined $ENV{LID_BASE_DIR}); Now the perl program I am trying to write simply look like this (just my base): #!/usr/bin/perl use Lingua::LinkParser; use strict; print "Hello world!\n"; When I run this trying to use Lingua, here is my error: [root@csisl27 assign4]# ./perl_parser_1.pl Can't locate Lingua/LinkParser.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl .) at ./perl_parser_1.pl line 3. BEGIN failed--compilation aborted at ./perl_parser_1.pl line 3. Tried insalling this from cpan, still doesn't properly work.

    Read the article

  • «HTTP::Message content must be bytes» error when trying to post

    - by ZyX
    I have the following code: ... sub setImage { my $self=shift; my $filename=shift; unless(-r $filename) { warn "File $filename not found"; return; } my $imgn=shift; my $operation=&URI::Escape::uri_escape_utf8( (shift) ? "???????! (Delete)" : "?????????! (Store)"); my $FH=&::File::open($filename, 0, 0); my $image; # &utf8::downgrade($image); sysread($FH, $image, 102400, 0); close $FH; my $imginfo=eval{&Image::Info::image_info(\$image)}; if($@ or $imginfo->{"error"}) { warn "Invalid image: ".($@ || $imginfo->{"error"}); return undef; } my $fields=[ DIR => $self->url("fl"), OPERATION => $operation, FILE_NAME => ".photo$imgn", # FILE => [$filename], FILE => [undef, "image.".$imginfo->{"file_ext"}, # Content_Type => $imginfo->{"file_media_type"}, # Content_Type => 'application/octet-stream', Content => $image, ], ]; my $response=&ZLR::UA::post( &ZLR::UA::absURL("/cgi-bin/file_manager")."", $fields, Content_Type => "form-data", ); print $response->decoded_content; } ... When I try to use function setImage it fails with error HTTP::Message content must be bytes at /usr/lib64/perl5/vendor_perl/5.8.8/HTTP/Request/Common.pm line 91. Worse that I can't reproduce this error without using all of my code and upgrading libwww-perl does nothing. What can cause it?

    Read the article

  • Internal and External Bug-Tracking Setup

    - by devdude
    Most of you certainly use some kind of bugtracker. Maybe internally only, once a customer files a bug via email or phone you add a new ticket by yourself. Sometimes weekly project meetings can be great source of new tickets coming preferably in flavors of excel sheets that the PM on the other side of the table loves to maintain and chase after you. The more advanced (and transparent) version: Allow the customer to file (and see the progress of) his bugs directly into you bugtracker. Systems like JIRA allow you to use profiles to have certain access rights, etc. But now the question: The bug raised by a user not necessary translates into 1 bug in a specific module/method/EJB/class. The version of the (your) web application he uses does not translate into the version of the class that is causing the error. How you maintain the internal part of the ticket with all the nasty techy details and the same time the make-the-user-feel-good ticket (need more info, accepted, in progress,..) ? Creating 2 tickets for internal and external ? Link them ? Any smart recipes to share ?

    Read the article

  • C# Windows Service

    - by Goober
    Scenario I've created a windows service, but whenever I start it, it stops immediately. The service was concieved from a console application that used to subscribe to an event and watch processes on a server. If anything happened to process (i.e. It was killed), then the event would trigger the process to be restarted. The reason I'm telling you this is because the original code used to look like this: Original Console App Code: static void Main(string[] args) { StartProcess sp = new StartProcess(); //Note the readline that means the application sits here waiting for an event! Console.ReadLine(); } Now that this code has been turned into a Windows Service, it is essentially EXACTLY THE SAME. However, the service does not sit there waiting, even with the readline, it just ends..... New Windows Service Code: protected override void OnStart(string[] args) { ProcessMonitor pm = new ProcessMonitor(); Console.ReadLine(); } Thoughts Since the functionality is entirely encapsulated within this single class (It quite literally starts, sets up some events and waits) - How can I get the service to actually sit there and just wait? It seems to be ignoring the readline. However this works perfectly as a console application, it is just far more convenient to have it as a service.

    Read the article

  • Create 2 connection pools using c3p0 in Jetty

    - by Mike
    Hello, I'm trying to set up a maven web project that runs Jetty. In this project, I need 2 JNDIs... my plan is to configure 2 connection pools using c3p0 in Jetty. So, I created WEB-INF/jetty-env.xml, and I have the following:- <Configure class="org.mortbay.jetty.webapp.WebAppContext"> <New id="ds1" class="org.mortbay.jetty.plus.naming.Resource"> <Arg>jdbc/ds1</Arg> <Arg> <New class="com.mchange.v2.c3p0.ComboPooledDataSource"> // ... JTDS to SQL Server - omitted for brevity </New> </Arg> </New> <New id="ds2" class="org.mortbay.jetty.plus.naming.Resource"> <Arg>jdbc/ds2</Arg> <Arg> <New class="com.mchange.v2.c3p0.ComboPooledDataSource"> // ... JTDS to Sybase - omitted for brevity </New> </Arg> </New> </Configure> When I run jetty, I get this exception:- May 14, 2010 1:16:56 PM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> ... ... ... Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0" java.lang.LinkageError: net.sourceforge.jtds.jdbc.DefaultProperties at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:258) It seems to me that I can't create 2 connection pools using c3p0. If I remove either one of the connection pool, it worked. What am I doing wrong? How do I create 2 connection pools in Jetty? Thanks much.

    Read the article

  • Experience migrating legacy Cobol/PL1 to Java

    - by MadMurf
    ORIGINAL Q: I'm wondering if anyone has had experience of migrating a large Cobol/PL1 codebase to Java? How automated was the process and how maintainable was the output? How did the move from transactional to OO work out? Any lessons learned along the way or resources/white papers that may be of benefit would be appreciated. EDIT 7/7: Certainly the NACA approach is interesting, the ability to continue making your BAU changes to the COBOL code right up to the point of releasing the JAVA version has merit for any organization. The argument for procedural Java in the same layout as the COBOL to give the coders a sense of comfort while familiarizing with the Java language is a valid argument for a large organisation with a large code base. As @Didier points out the $3mil annual saving gives scope for generous padding on any BAU changes going forward to refactor the code on an ongoing basis. As he puts it if you care about your people you find a way to keep them happy while gradually challenging them. The problem as I see it with the suggestion from @duffymo to Best to try and really understand the problem at its roots and re-express it as an object-oriented system is that if you have any BAU changes ongoing then during the LONG project lifetime of coding your new OO system you end up coding & testing changes on the double. That is a major benefit of the NACA approach. I've had some experience of migrating Client-Server applications to a web implementation and this was one of the major issues we encountered, constantly shifting requirements due to BAU changes. It made PM & scheduling a real challenge. Thanks to @hhafez who's experience is nicely put as "similar but slightly different" and has had a reasonably satisfactory experience of an automatic code migration from Ada to Java. Thanks @Didier for contributing, I'm still studying your approach and if I have any Q's I'll drop you a line.

    Read the article

  • How to manage a One-To-One and a One-To-Many of same type as unidirectional mapping?

    - by user1652438
    I'm trying to implement a model for private messages between two or more users. That means I've got two Entities: User PrivateMessage The User model shouldn't be edited, so I'm trying to set up an unidirectional relationship: @Entity (name = "User") @Table (name = "user") public class User implements Serializable { @Id String username; String password; // something like this ... } The PrivateMessage Model addresses multiple receivers and has exactly one sender. So I need something like this: @Entity (name = "PrivateMessage") @Table (name = "privateMessage") @XmlRootElement @XmlType (propOrder = {"id", "sender", "receivers", "title", "text", "date", "read"}) public class PrivateMessage implements Serializable { private static final long serialVersionUID = -9126766942868177246L; @Id @GeneratedValue private Long id; @NotNull private String title; @NotNull private String text; @NotNull @Temporal(TemporalType.TIMESTAMP) private Date date; @NotNull private boolean read; @NotNull @ElementCollection(fetch = FetchType.EAGER, targetClass = User.class) private Set<User> receivers; @NotNull @OneToOne private User sender; // and so on } The according 'privateMessage' table won't be generated and just the relationship between the PM and the many receivers is satisfied. I'm confused about this. Everytime I try to set a 'mappedBy' attribute, my IDE marks it as an error. It seems to be a problem that the User-entity isn't aware of the private message which maps it. What am I doing wrong here? I've solved some situation similar to this one, but none of those solutions will work here. Thanks in advance!

    Read the article

  • Alternatives to storing Moose object using Apache::Session with CODE references

    - by Hartmut Behrens
    I have a Moose class that i would like to store using Apache::Session::File. However, Apache::Session::File by default will not store it and instead i get the error message: (in cleanup) Can't store CODE items at blib\lib\Storable.pm (autosplit into blib\lib\auto\Storable\_freeze.al)... This problem can be circumvented by setting $Storable::Deparse = 1; $Storable::Eval = 1; in order to allow CODE references to be serialized. The offending method in the Moose class is listed below, which retrieves a column from a mysql database: sub _build_cell_generic { my ($self,$col) = @_; my $sth = $self->call_dbh('prepare','select '.$col.' from '.$self->TABLE.' where CI = ? and LAC = ? and IMPORTDATE = ?'); $sth->execute($self->CI,$self->LAC,$self->IMPORTDATE); my $val = $sth->fetchrow_array; $sth->finish; return defined $val ? $val : undef; } So presumably the dbh object (isa DBIx::Connector) contains CODE references. Is there a better alternative in order to allow serialization of this Moose class than setting $Storable::Deparse and $Storable::Eval ?

    Read the article

  • How to configure for multiple gettext domains with babel, pylons, setuptools

    - by ICanHaveSpam
    While trying to internationalize my pylons web and mobile application, 'myapp', Im finding that I would like to keep separate gettext pot files for separate domains. There will be common msgid values for both web and mobile users and there will also be unique msgid values that are only translated for web or mobile users. Im expecting localized msgstrs for mobile users will be different (more terse) than the localized msgstrs for normal web users. The environment is like: the same myapp/controllers will be used for both mobile and web requests. mobile users will have their pages rendered from myapp/templates/mobile normal web users will have their pages rendered from myapp/templates/web What happens by default: I end up with myapp/i18n/myapp.pot and myapp/i18n/*/LC_MESSAGES/myapp.[pm]o files that contain msgid values from controllers and both sets of templates. What Im looking for: to set the gettext domain for the user's session when I decide which templates will render their responses. myapp's msgids from controllers and web template extract into myapp/i18n/web.pot myapp's msgids from controllers and mobile templates extract into myapp/i18n/mobile.pot babel's init_catalog, update_catalog, and compile_catalog runs deal with these separate domains and create separate po and mo localization files. Where Im lost: configuring myapp's setup.cfg and setup.py to deal with separate gettext domains so that I can direct extracted msgid values into a particular pot file based on the path of the python and template files.

    Read the article

  • How do I use a dependency on a Perl module installed in a non-standard location?

    - by Kinopiko
    I need to install two Perl modules on a web host. Let's call them A::B and X::Y. X::Y depends on A::B (needs A::B to run). Both of them use Module::Install. I have successfully installed A::B into a non-system location using perl Makefile.PL PREFIX=/non/system/location make; make test; make install Now I want to install X::Y, so I try the same thing perl Makefile.PL PREFIX=/non/system/location The output is $ perl Makefile.PL PREFIX=/non/system/location/ Cannot determine perl version info from lib/X/Y.pm *** Module::AutoInstall version 1.03 *** Checking for Perl dependencies... [Core Features] - Test::More ...loaded. (0.94) - ExtUtils::MakeMaker ...loaded. (6.54 >= 6.11) - File::ShareDir ...loaded. (1.00) - A::B ...missing. ==> Auto-install the 1 mandatory module(s) from CPAN? [y] It can't seem to find A::B in the system, although it is installed, and when it tries to auto-install the module from CPAN, it tries to write it into the system directory (ignoring PREFIX). I have tried using variables like PERL_LIB and LIB on the command line, after PREFIX=..., but nothing I have done seems to work. I can do make and make install successfully, but I can't do make test because of this problem. Any suggestions? I found some advice at http://servers.digitaldaze.com/extensions/perl/modules.html to use an environment variable PERL5LIB, but this also doesn't seem to work: export PERL5LIB=/non/system/location/lib/perl5/ didn't solve the problem.

    Read the article

  • Query by datetime in JDOQL / Java / GAE

    - by Jan Kuboschek
    I'm working on a GAE app. I want to query datastore and retrieve all records between startDate and endDate. Each record has a datetime field. I'm using a query similar to this (the below code is something I quickly grabbed - I'm not near my developer machine.): Query query = pm.newQuery(Employee.class); query.setFilter("lastName == lastNameParam"); query.setOrdering("hireDate desc"); query.declareParameters("String lastNameParam"); try { List results = (List) query.execute("Smith"); if (results.iterator().hasNext()) { for (Employee e : results) { // ... } } else { // ... no results ... } } finally { query.closeAll(); } How do I have to format the date to form a correctly working query? How is the datetime stamp stored in datastore? As timestamp? Fully formatted? I can't find ANY information on this. Please help.

    Read the article

  • DDMS plugin not loading GPX files

    - by Craig
    I am unable to load a GPX file in the DDMS eclipse plugin. When specifying a GPX file, no points are added to the emulator control list. I have tried adding KML files as well, generated in Google earth. Is there a way to get these files to work? The content of the file is listed below: <?xml version="1.0" encoding="UTF-8"?> <gpx version="1.0" creator="RunKeeper - http://www.runkeeper.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/0" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd"> <trk> <name>Running 11/30/09 3:37 pm11/30/09 3:37 pm</name> <time>2009-11-30T15:37:08Z</time> <trkseg> <trkpt lat="41.811406000" lon="-72.521427000"> <ele>37.000000</ele> <time>2009-11-30T15:37:08Z</time> </trkpt> <trkpt lat="41.811030000" lon="-72.522882000"> <ele>38.000000</ele> <time>2009-11-30T15:37:10Z</time> </trkpt>

    Read the article

  • Advice on coding Perl to work like PHP

    - by user272273
    I am first and foremost a perl coder, but like many, also code in PHP for client work, especially web apps. I am finding that I am duplicating a lot of my projects in the two languages, but using different paradigms (e.g. for handling cgi input and session data) or functions. What I would like to do is start to code my Perl in a way which is structured more like PHP, so that I a) am keeping one paradigm in my head b) can more quickly port over scripts from one to the other Specifically, I am asking if people could advise how you might do the following in perl? 1) Reproduce the functionality of $_SESSION, $_GET etc. e.g. by wrapping up the param() method of CGI.pm, a session library? 2) Templating library that is similar to PHP I am used to mixing my code and HTML in the PHP convention. e.g. i <h1>HTML Code here</h1> <? print "Hello World\b"; ?> Can anybody advise on which perl templating engine (and possibly configuration) will allow me to code similarly? 3) PHP function library Anybody know of a library for perl which reproduces a lot of the php inbuilt functions?

    Read the article

  • Why isn't module_filters filtering Mail::IspMailGate in CPAN::Mini?

    - by user304122
    Edited - Ummm - now have a module in schwigon giving same problem !! I am on a corporate PC that forces mcshield on everything that moves. I get blocked when trying to mirror on ... authors/id/J/JV/JV/EekBoek-2.00.01.tar.gz ... updated authors/id/J/JV/JV/CHECKSUMS ... updated Could not stat tmpfile '/cygdrive/t/cpan_mirror/authors/id/J/JW/JWIED/Mail-IspMailGate-1.1013.tar.gz-4712': No such file or directory at /usr/lib/perl5/site_perl/5.10/LWP/UserAgent.pm line 851. authors/id/J/JW/JWIED/Mail-IspMailGate-1.1013.tar.gz At this point, I get the Virus scanner mcshield sticking its Awr in. To maintain my mirror I execute:- #!/usr/bin/perl CPAN::Mini->update_mirror( remote => "http://mirror.eunet.fi/CPAN", local => "/cygdrive/t/cpan_mirror/", trace => 1, errors => 1, module_filters => [ qr/kjkjhkjhkjkj/i, qr/clamav/i, qr/ispmailgate/i, qr/IspMailGate/, qr/Mail-IspMailGate/, qr/mail-ispmailgate/i, ], path_filters => [ qr/ZZYYZZ/, #qr/WIED/, #qr/RJBS/, ] ); It skips OK if I enable the path_filter WIED. Just cannot get it to skip the module failing module to complete other WIED modules. Any ideas?

    Read the article

  • Why is "rake tests" running an empty suite when I use shoulda?

    - by ryeguy
    So here is my test suite: class ReleaseTest < ActiveSupport::TestCase should_not_allow_values_for :title, '', 'blah', 'blah blah' should_allow_values_for :title, 'blah - bleh', 'blah blah - bleh bleh' def test_something assert true end end Shoulda's macros generate 5 tests, and then I have test_something below (just to see if that would matter), totalling 6 tests. They all pass as you can see below, but then it runs a 0-test suite. This happens even if I completely empty out ReleaseTest. This problem only exists if I have config.gem 'shoulda' in my environment.rb. If I explicitly do require 'shoulda' at the top of my tests, everything works fine. What would be causing this? /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /var/lib/gems/1.9.1/bin/rake test Testing started at 6:58 PM ... (in /home/rlepidi/projects/rails/testproject) /usr/bin/ruby1.9.1 -I"lib:test" "/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/release_test.rb" Loaded suite /var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader Started ...... Finished in 0.029335778 seconds. 6 tests, 6 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed /usr/bin/ruby1.9.1 -I"lib:test" "/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" /usr/bin/ruby1.9.1 -I"lib:test" "/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" Loaded suite /var/lib/gems/1.9.1/bin/rake Started Finished in 0.000106717 seconds. 0 tests, 0 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 0% passed Empty test suite.

    Read the article

  • Why isn't module_filters filetering Mail::IspMailGate in CPAN::Mini?

    - by user304122
    Edited - Ummm - now have a module in schwigon giving same problem !! I am on a corporate PC that forces mcshield on everything that moves. I get blocked when trying to mirror on ... authors/id/J/JV/JV/EekBoek-2.00.01.tar.gz ... updated authors/id/J/JV/JV/CHECKSUMS ... updated Could not stat tmpfile '/cygdrive/t/cpan_mirror/authors/id/J/JW/JWIED/Mail-IspMailGate-1.1013.tar.gz-4712': No such file or directory at /usr/lib/perl5/site_perl/5.10/LWP/UserAgent.pm line 851. authors/id/J/JW/JWIED/Mail-IspMailGate-1.1013.tar.gz At this point, I get the Virus scanner mcshield sticking its Awr in. To maintain my mirror I execute:- #!/usr/bin/perl CPAN::Mini->update_mirror( remote => "http://mirror.eunet.fi/CPAN", local => "/cygdrive/t/cpan_mirror/", trace => 1, errors => 1, module_filters => [ qr/kjkjhkjhkjkj/i, qr/clamav/i, qr/ispmailgate/i, qr/IspMailGate/, qr/Mail-IspMailGate/, qr/mail-ispmailgate/i, ], path_filters => [ qr/ZZYYZZ/, #qr/WIED/, #qr/RJBS/, ] ); It skips OK if I enable the path_filter WIED. Just cannot get it to skip the module failing module to complete other WIED modules. Any ideas?

    Read the article

  • Perl - MySQL connection problem in windows

    - by dexter
    I have two folders php and perl they contain index.php and index.pl respectivly in index.pl my perl code looks like: #!/usr/bin/perl use Mysql; print "Content-type: text/html\n\n"; print "<h2>PERL-mySQL Connect</h2>"; print "page info"; $host = "localhost"; $database = "cdcol"; $user = "root"; $password = ""; $db = Mysql->connect($host, $database, $user, $password); $db->selectdb($database); when i run above code (ie type: http://localhost:88/perl/ in browser) following error comes Error message: Can't locate Mysql.pm in @INC (@INC contains: C:/xampp/perl/site/lib/ C:/xampp/perl/lib C:/xampp/perl/site/lib C:/xampp/apache) at C:/xampp/htdocs/perl/index.pl line 2. BEGIN failed--compilation aborted at C:/xampp/htdocs/perl/index.pl line 2. while this works: in browser http://localhost:88/php/ where index.php has: <?php $con = mysql_connect("localhost","root",""); if($con) { if(mysql_select_db("cdcol", $con)) { $sql="SELECT Id From products"; if(mysql_query($sql)) { $result = mysql_query($sql); if ($result)............

    Read the article

  • How can I track down "Template process failed: undef error" in Perl's Template Toolkit?

    - by swisstony
    I've moved a Perl CGI app from one web host to another. Everything's running fine except for Template Tookit which is giving the following error: "Template process failed: undef error - This shouldn't happen at /usr/lib/perl5/5.8.8/CGI/Carp.pm line 314." The templates are working fine on the other web host. I've set the DEBUG_ALL flag when creating the template object, but it doesn't provide any additional info about errors just loads of debug output. I can't post the template source as there's lots of client specific stuff in it. I've written a simple test template and that works okay. Just wondering if anyone had seen this error before or has any ideas on the quickest way to find a fix for it. EDIT: Here's a snippet of the code that loads and processes the template. my $vars = {}; $vars->{page_url} = $page_url; $vars->{info} = $info; $vars->{is_valid} = 0; $vars->{invalid_input} = 0; $vars->{is_warnings} = 0; $vars->{is_invalid_price} = 0; $vars->{output_from_proc} = $proc_output; ... my $file = 'clientTemplate.html'; #create ref to hash use Template::Constants qw( :debug ); my $template = Template->new( { DEBUG => DEBUG_SERVICE | DEBUG_CONTEXT | DEBUG_PROVIDER | DEBUG_PLUGINS | DEBUG_FILTERS | DEBUG_PARSER | DEBUG_DIRS, EVAL_PERL => 1, INCLUDE_PATH => [ '/home/perlstuff/templates', ], } ); $template->process( $file, $vars ) || die "Template process failed: ", $template->error(), "\n";

    Read the article

  • OutOfMemory during paging

    - by Tony
    Hi I am using ObjectDataSource, ListView, CustomPaging If the total number of rows is too big, I got OutOfMemory exception, it seems that it caused by some array, I don't get it, because total number of rows should never make any array to be filled with elements, the page size do!! This is the logger. ****EXCEPTION # 3 : 4/30/2010 9:43:07 PM System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. --- System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.Web.UI.WebControls.ListView.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.WebControls.ListView.get_Controls() at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Page.LoadAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.default_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\flickrdemo\15752207\c63ea96c\App_Web__8yxn9sb.0.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Read the article

  • Adding time zone hours difference to time

    - by Hwang
    I know there's a much better and correct way to do it, but i need a temporarily solutions. I need to add in extra hours to the time, and the day will change automatically too. How should I change the code below? package { public class getTime { private var today:Date=new Date(); private var hour:uint=today.getHours(); private var minute:uint=today.getMinutes(); private var month:uint=today.getMonth(); private var monthArray:Array=new Array('January','February','March','April','May','June','July','August','September','October','November','December'); private var time:String = getUSClockTime(today.getHours(), today.getMinutes()); public var dateNtime:String=(time+", " +today.getDate()+" "+monthArray[month]+" "+today.getFullYear());; public function getTime() { } private function getUSClockTime(hrs:uint, mins:uint):String { var modifier:String="PM"; var minLabel:String=doubleDigitFormat(mins); if (hrs>12) { hrs=hrs-12; } else if (hrs == 0) { modifier="AM"; hrs=12; } else if (hrs < 12) { modifier="AM"; } return (doubleDigitFormat(hrs) + ":" + minLabel + " " + modifier); } private function doubleDigitFormat(num):String { if (num<10) { return ("0" + num); } return num; } } }

    Read the article

  • Iphone: TabView + TableView

    - by OneTrickPonySoft
    I think I'm missing something simple, but I can't figure out exactly what it is. I'm trying to set up an App with a UITabViewController, and one of the Tabs will have a UITableView and UISearchBar (but no Navigation Controller). I set up the UITabViewController with all the tabs in interface builder, and the views are in their own xib files. The xib file for the tab with the UITableView is set up and connected as follows. Stuff in the browser: File's owner (Class is my custom class that is a child of UITableViewController) view - View View (class UIView, reference view - File's owner) contains: UITableView (if i try and set references to the data source / delegate, the app breaks) UISearchBar (unconfigured at the moment) This setup displays all the items and doesn't lock up, but I can't assign a DataSource without it crashing when i try and load the tab with the UITableView. What should I do to get data into this table, either in IB or code? My ideas are as follows: Implement custom UITableView class, hook up to table view in IB or to custom tableviewcontroller in Xcode. Pound head or laptop against the wall until it works. Update: Here's the error the simulator pushes to the console when I connect the Tableview's data source and delegate to File Owner (who's class is my custom tableviewcontroller). 2/14/09 6:59:12 PM TabBarWillbeRight[33172] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x523760'

    Read the article

  • Are there scenarios where the ViewModel needs to invoke methods on the View w.r.t. MVVM in WPF?

    - by Gishu
    As per the pattern, the ViewModel exposes Properties(with change notification) and Commands (to notify the VM of user actions) that the View binds to. The only communication that flows from the VM to the View is the property change notifications (so that the View can refresh itself with updated data). In MVP or PresentationModel form of the pattern (if I'm not mistaken), the View implements a plain vanilla interface (consisting of methods, properties and/or events). With MVVM, it feels methods on the IView have been outlawed (along with IView itself). One scenario I could think of was to set the focus to a certain control in the View. (When the user does ActionX, the focus should immediately be set to FieldY). In MVP, I'd write this as IView.ActivateField(NameConstant), which the presenter or PM would invoke. In MVVM, this seems to be a fringe case that needs a workaround / little bit of code-behind. The VM implements an ActiveField Property, which it sets to NameConstant. The view picks up the change notification event and in a code-behind event handler, activates the Name control. Is the above just an exception to the norm? Or are there other such scenarios, where the VM needs to invoke a method on the View ?

    Read the article

  • How do I find the module dependencies of my Perl script?

    - by zoul
    I want another developer to run a Perl script I have written. The script uses many CPAN modules that have to be installed before the script can be run. Is it possible to make the script (or the perl binary) to dump a list of all the missing modules? Perl prints out the missing modules’ names when I attempt to run the script, but this is verbose and does not list all the missing modules at once. I’d like to do something like: $ cpan -i `said-script --list-deps` Or even: $ list-deps said-script > required-modules # on my machine $ cpan -i `cat required-modules` # on his machine Is there a simple way to do it? This is not a show stopper, but I would like to make the other developer’s life easier. (The required modules are sprinkled across several files, so that it’s not easy for me to make the list by hand without missing anything. I know about PAR, but it seems a bit too complicated for what I want.) Update: Thanks, Manni, that will do. I did not know about %INC, I only knew about @INC. I settled with something like this: print join("\n", map { s|/|::|g; s|\.pm$||; $_ } keys %INC); Which prints out: Moose::Meta::TypeConstraint::Registry Moose::Meta::Role::Application::ToClass Class::C3 List::Util Imager::Color … Looks like this will work.

    Read the article

  • Crazy TableView (Or more likely me being just a jerk) ;-)

    - by Miky Mike
    Hi guy, I'm going crazy with all that objective C. I went to bed at 1.30 pm today, spending the night on my app but I love it... Well that's not the point anyway... My question is .... I have a table view which evaluates a statement when it displays its data : it goes like this : - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"CustomCell"; cell = ((MainCell *)[self.tableView dequeueReusableCellWithIdentifier:CellIdentifier]); if (cell == nil) { [[NSBundle mainBundle] loadNibNamed:@"MainCell" owner:self options:nil]; } Entry *entry = [fetchedResultsController objectAtIndexPath:indexPath]; cell.topLabel.text = [@"* " stringByAppendingString: entry.entryname]; cell.bottomLabel.text = entry.textbody; if ([entry.active boolValue] == YES) { cell.cellImageView.image = [UIImage imageNamed:@"check.png"]; } else { cell.cellImageView.image = nil; cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton; } return cell; } The problem is that the first time it displays the data, the conditions are met when I scroll down the tableview but when I scroll up, sometimes, I get my "check.png" image and the accessory as well, which is not possible normally. Am I going crazy or is it the tableview ? Could you help me with that please, I can't figure out why it doesn't work... :-(( Thanks a lot in advance. Mike

    Read the article

  • How to generate a key for a group entity?

    - by user246114
    Hi, I'm trying to make a group entity. Something like: class User { } class UserColor { } ... Key key = new KeyFactory.Builder( User.class.getSimpleName(), username). .addChild(UserColor.class.getSimpleName(), ???).getKey(); I know the unique username up-front to use for the key of the User object. But I just want app engine to generate a random unique value for the key value of the UserColor instance. I think this is described here, but I don't understand their wording: http://code.google.com/appengine/docs/java/datastore/transactions.html To create an object with a system-generated numeric ID and an entity group parent, you must use an entity group parent key field (such as customerKey, above). Assign the key of the parent to the parent key field, then leave the object's key field set to null. When the object is saved, the datastore populates the key field with the complete key, including the entity group parent. and this is their example: @Persistent @Extension(vendorName="datanucleus", key="gae.parent-pk", value="true") private Key customerKey; but I don't understand - should UserColor look like this then?: class UserColor { @Persistent @Extension(vendorName="datanucleus", key="gae.parent-pk", value="true") private Key mKeyParent; @Primary private Key mKey; // leave null } ... Key keyParent = new KeyFactory.Builder( User.class.getSimpleName(), username); UserColor uc = new UserColor(); uc.setKeyParent(keyParent); pm.makePersistent(uc); // now generated for me automatically? is that correct? Using this method, I should be able to use a User and a UserColor object in a transaction together, right? Thanks

    Read the article

< Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >