Daily Archives

Articles indexed Wednesday May 12 2010

Page 18/121 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • How does tomcat set its executable file as a windows service?

    - by Wing C. Chen
    Firstly, I am not at all familiar with windows batch file programing. Recently I am curious about how tomcat sets itself as a windows service using a batch file. I downloaded the service.bat file from tomcat 6. However, I still don't understand some part of it. I guess this is the line that the batch actually register the exe file to the OS, is it right? Is there any syntax explanation? "%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop And is this used to remove the service? "%EXECUTABLE%" //DS//%SERVICE_NAME% And this is the setting of the parameters? "%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\endorsed" --StartMode jvm --StopMode jvm Thanks.

    Read the article

  • How to load secure S3 images into Flex with temporary URLs

    - by Yarin
    I have some secure images on S3 that I need to load into Flex. I was expecting to be able to do this using signed temporary URLs but can't get it working. I know the URLs I'm generating are correct, because they load fine in my browsers' address bar. Moreover, Flex has no problem loading my images with a non-signed url when they are public, but as soon as I try signing the urls all the images fail, whether public or not. I've tried image.source = signedURL, image.load(signedURL), etc. If I try loading the file with URLLoader/URLStream, it looks like I'm getting the data OK, but I'm not sure how to translate those results to an Image control. Is this just an issue with the Image control not being able to recognize signed urls? Do I have to load the image from a byte array? What would that look like?

    Read the article

  • “Unplugged” Chat with Me this Thursday

    - by ScottGu
    This Thursday (May 13th) I’m going to be doing another online LIDNUG chat session.  The chat will be from 10:00am to 11:30am Pacific Time. You can learn more about it here and join the chat at the appropriate time with this link. I do these chats a few times a year and they tend to be pretty fun.  Attendees can listen to me talk live via LiveMeeting, and can submit any questions they want to me.  I then answer as many of them as I can in the 90 minutes.  We’ll probably talk a lot about the new features in VS 2010, .NET 4, Silverlight 4, Windows Phone 7, ASP.NET 4 and ASP.NET MVC 2 this week. Hope to get a chance to chat with some of you there! Scott

    Read the article

  • apache not displaying php pages, offering them for download instead.

    - by Peter NUnn
    Hi folks, we are trying to setup apache (apache 2 in this case, although apache does the same thing) and html pages display just fine, however, any php pages linked into buttons on the front page are offered for download rather than being displayed. Any ideas what we have missed? Its proving difficult to search on this in google as the terms are so heavily used elsewhere. I know this is a bit general, but we have tried adding types to the to the apache.conf (or httpd.conf for apache1) are having no joy at all. Thanks. Peter.

    Read the article

  • Cannot redeclare class error when generating PHPUnit code coverage report

    - by Cobby
    Starting a project with Zend Framework 1.10 and Doctrine 2 (Beta1). I am using namespaces in my own library code. When generating code coverage reports I get a Fatal Error about Redeclaring a class. To provide more info, I've commented out the xdebug_disable() call in my phpunit executable so you can see the function trace (disabled local variables output because there was too much output). Here's my Terminal output: $ phpunit PHPUnit 3.4.12 by Sebastian Bergmann. ........ Time: 4 seconds, Memory: 16.50Mb OK (8 tests, 14 assertions) Generating code coverage report, this may take a moment.PHP Fatal error: Cannot redeclare class Cob\Application\Resource\HelperBroker in /Users/Cobby/Sites/project/trunk/code/library/Cob/Application/Resource/HelperBroker.php on line 93 PHP Stack trace: PHP 1. {main}() /usr/local/zend/bin/phpunit:0 PHP 2. PHPUnit_TextUI_Command::main() /usr/local/zend/bin/phpunit:54 PHP 3. PHPUnit_TextUI_Command-run() /usr/local/zend/share/pear/PHPUnit/TextUI/Command.php:146 PHP 4. PHPUnit_TextUI_TestRunner-doRun() /usr/local/zend/share/pear/PHPUnit/TextUI/Command.php:213 PHP 5. PHPUnit_Util_Report::render() /usr/local/zend/share/pear/PHPUnit/TextUI/TestRunner.php:478 PHP 6. PHPUnit_Framework_TestResult-getCodeCoverageInformation() /usr/local/zend/share/pear/PHPUnit/Util/Report.php:97 PHP 7. PHPUnit_Util_Filter::getFilteredCodeCoverage() /usr/local/zend/share/pear/PHPUnit/Framework/TestResult.php:623 Fatal error: Cannot redeclare class Cob\Application\Resource\HelperBroker in /Users/Cobby/Sites/project/trunk/code/library/Cob/Application/Resource/HelperBroker.php on line 93 Call Stack: 0.0004 322888 1. {main}() /usr/local/zend/bin/phpunit:0 0.0816 4114628 2. PHPUnit_TextUI_Command::main() /usr/local/zend/bin/phpunit:54 0.0817 4114964 3. PHPUnit_TextUI_Command-run() /usr/local/zend/share/pear/PHPUnit/TextUI/Command.php:146 0.1151 5435528 4. PHPUnit_TextUI_TestRunner-doRun() /usr/local/zend/share/pear/PHPUnit/TextUI/Command.php:213 4.2931 16690760 5. PHPUnit_Util_Report::render() /usr/local/zend/share/pear/PHPUnit/TextUI/TestRunner.php:478 4.2931 16691120 6. PHPUnit_Framework_TestResult-getCodeCoverageInformation() /usr/local/zend/share/pear/PHPUnit/Util/Report.php:97 4.2931 16691148 7. PHPUnit_Util_Filter::getFilteredCodeCoverage() /usr/local/zend/share/pear/PHPUnit/Framework/TestResult.php:623 (I have no idea why it shows the error twice...?) And here is my phpunit.xml: <phpunit bootstrap="./code/tests/application/bootstrap.php" colors="true"> <!-- bootstrap.php changes directory to trunk/code/tests, all paths below are relative to this directory. --> <testsuite name="My Promotions"> <directory>./</directory> </testsuite> <filter> <whitelist> <directory suffix=".php">../application</directory> <directory suffix=".php">../library/Cob</directory> <exclude> <!-- By adding the below line I can remove the error --> <file>../library/Cob/Application/Resource/HelperBroker.php</file> <directory suffix=".phtml">../application</directory> <directory suffix=".php">../application/doctrine</directory> <file>../application/Bootstrap.php</file> <directory suffix=".php">../library/Cob/Tools</directory> </exclude> </whitelist> </filter> <logging> <log type="junit" target="../../build/reports/tests/report.xml" /> <log type="coverage-html" target="../../build/reports/coverage" charset="UTF-8" yui="true" highlight="true" lowUpperBound="50" highLowerBound="80" /> </logging> </phpunit> I have added a tag inside the which seams to hide this problem. I do have another application resource but it doesn't seam to have a problem (the other one is a Doctrine 2 resource). I'm not sure why it is specific to this class, my entire library is autoloaded so their isn't any include/require calls anywhere. I guess it should be noted that HelperBroker is the first file in the filesystem stemming out from library/Cob I am on Snow Leopard with the latest/recent versions of all software (Zend Server, Zend Framework, Doctrine 2 Beta1, Phing, PHPUnit, PEAR).

    Read the article

  • [C++] instantiating bitset using hex character.

    - by bndz
    Hey, I'm trying to figure out how to instantiate a 4 bit bitset based on a hex character. For instance, If I have a character with value 'F', I want to create a bitset of size 4 initialized to 1111 or if it is A, i want to initialize it to 1010. I could use a bunch of if statements like so: fn(char c) { bitset<4 temp; if(c == 'F') temp.set(); //... if(c == '9') { temp.set(1); temp.set(3); } //... } This isn't efficient, is there a way of easily converting the string to a decimal integer and constructing the bitset using the last 4 bits of the int? Thanks for any help.

    Read the article

  • javascript simple question

    - by Michael
    window.addEventListener('unload', function(e) { MyClass.shutdown(); window.removeEventListener('unload', /* how to reference the function itself here? */); }, false); The question in the comment.

    Read the article

  • VEMap Pan triggers VEMap.onclick

    - by Jason
    I'm using the Virtual Earth (or Bing!...) SDK and need to attach an event when someone clicks the map. Unfortunately panning the map also triggers the onclick event. Does anyone know of a work around? function GetMap(){ map = new VEMap('dvMap'); map.LoadMap(new VELatLong(35.576916524038616,-80.9410858154297), 11, 'h',false); mapIsInit = true; map.AttachEvent('onclick', MapClick); } function MapClick(e){ var clickPnt = map.PixelToLatLong(new VEPixel(e.mapX,e.mapY)); Message('Map X: ' + clickPnt.Longitude + '\nMap Y: ' + clickPnt.Latitude + '\nZoom: ' + e.zoomLevel); }

    Read the article

  • Two-pass multi way merge sort?

    - by Nimesh
    If I have a relation (SQL) that does not fit in memory and I want to sort the relation using TPMMS (Two-pass multi-way merge sort method). How would I divide the table in sub tables (and how many) that can fit in memory and than merge them? Let's say I am using C#.

    Read the article

  • jQuery image grid effect

    - by anon
    I have an image sitting on a page that I want to create a grid type overlay (that covers the image with a black fill) which will be partitioned into 50x50 pixels (what ever size, tbh) squares. The squares on the grid will then flip over, one at a time, in random positions revealing the image below it. The only way I can think of accomplishing this would be to create a whole bunch of grid squares and overlay them on the image with jQuery, then flip each image square individually. This, though, would be a pain in the ass. Doing this all dynamically in jQuery is what I'm hoping to accomplish. Any ideas?

    Read the article

  • Receive XML via POST with ASP.NET

    - by Mark Hurd
    I have to set up an XML "web service" that receives a POST where the 'Content-type header will specify “text/xml”.' What is the simplest way to get the XML into an XDocument for access by VB.NET's axis queries? I don't believe the web service is guaranteed to follow any protocol (e.g. SOAP, etc); just specific tags and sub-tags for various requests, and it will use Basic Authentication, so I will have to process the headers. (If it matters: * the live version will use HTTPS, and * the response will also be XML.)

    Read the article

  • How can I speed up Netbeans Task Marker resolution?

    - by Stephen
    I'm trying to quickly navigate and fix problems in code in Netbeans, and it just takes too long. I'll fix a problem, and it will take seconds to re-compile. While this is happening, the marker remains, and all the others that depend on it will too (requiring multiple next-marker key strokes to get to a "new" problem). If I'm doing a fix that changes the number of lines (e.g. organise imports), the markers will navigate to the wrong place, even though the correct text is underlined. Is there a way to speed this up? I presume it's because it's doing a full file compilation via javac to calculate the markers. BUT the information is available in netbeans, because the correct text is underlined, even when the compilation occurs.

    Read the article

  • When will the ValueConverter's Convert method be called in wpf

    - by sudarsanyes
    I have an ObservableCollection bound to a list box and a boolean property bound to a button. I then defined two converters, one that operates on the collection and the other operates on the boolean property. Whenever I modify the boolean property, the converter's Convert method is called, where as the same is not called if I modify the observable collection. What am I missing?? Snippets for your reference, xaml snipet, <Window.Resources> <local:WrapPanelWidthConverter x:Key="WrapPanelWidthConverter" /> <local:StateToColorConverter x:Key="StateToColorConverter" /> </Window.Resources> <StackPanel> <ListBox x:Name="NamesListBox" ItemsSource="{Binding Path=Names}"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <WrapPanel x:Name="ItemWrapPanel" Width="500" Background="Gray"> <WrapPanel.RenderTransform> <TranslateTransform x:Name="WrapPanelTranslatation" X="0" /> </WrapPanel.RenderTransform> <WrapPanel.Triggers> <EventTrigger RoutedEvent="WrapPanel.Loaded"> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetName="WrapPanelTranslatation" Storyboard.TargetProperty="X" To="{Binding Path=Names,Converter={StaticResource WrapPanelWidthConverter}}" From="525" Duration="0:0:2" RepeatBehavior="100" /> </Storyboard> </BeginStoryboard> </EventTrigger> </WrapPanel.Triggers> </WrapPanel> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemTemplate> <DataTemplate> <Grid> <Label Content="{Binding}" Width="50" Background="LightGray" /> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox> <Button Content="{Binding Path=State}" Background="{Binding Path=State, Converter={StaticResource StateToColorConverter}}" Width="100" Height="100" Click="Button_Click" /> </StackPanel> code behind snippet public class WrapPanelWidthConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { ObservableCollection<string> aNames = value as ObservableCollection<string>; return -(aNames.Count * 50); } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } public class StateToColorConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { bool aState = (bool)value; if (aState) return Brushes.Green; else return Brushes.Red; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } }

    Read the article

  • What is good practice in .NET system architecture design concerning multiple models and aggregates

    - by BuzzBubba
    I'm designing a larger enterprise architecture and I'm in a doubt about how to separate the models and design those. There are several points I'd like suggestions for: - models to define - way to define models Currently my idea is to define: Core (domain) model Repositories to get data to that domain model from a database or other store Business logic model that would contain business logic, validation logic and more specific versions of forms of data retrieval methods View models prepared for specifically formated data output that would be parsed by views of different kind (web, silverlight, etc). For the first model I'm puzzled at what to use and how to define the mode. Should this model entities contain collections and in what form? IList, IEnumerable or IQueryable collections? - I'm thinking of immutable collections which IEnumerable is, but I'd like to avoid huge data collections and to offer my Business logic layer access with LINQ expressions so that query trees get executed at Data level and retrieve only really required data for situations like the one when I'm retrieving a very specific subset of elements amongst thousands or hundreds of thousands. What if I have an item with several thousands of bids? I can't just make an IEnumerable collection of those on the model and then retrieve an item list in some Repository method or even Business model method. Should it be IQueryable so that I actually pass my queries to Repository all the way from the Business logic model layer? Should I just avoid collections in my domain model? Should I void only some collections? Should I separate Domain model and BusinessLogic model or integrate those? Data would be dealt trough repositories which would use Domain model classes. Should repositories be used directly using only classes from domain model like data containers? This is an example of what I had in mind: So, my Domain objects would look like (e.g.) public class Item { public string ItemName { get; set; } public int Price { get; set; } public bool Available { get; set; } private IList<Bid> _bids; public IQueryable<Bid> Bids { get { return _bids.AsQueryable(); } private set { _bids = value; } } public AddNewBid(Bid newBid) { _bids.Add(new Bid {.... } } Where Bid would be defined as a normal class. Repositories would be defined as data retrieval factories and used to get data into another (Business logic) model which would again be used to get data to ViewModels which would then be rendered by different consumers. I would define IQueryable interfaces for all aggregating collections to get flexibility and minimize data retrieved from real data store. Or should I make Domain Model "anemic" with pure data store entities and all collections define for business logic model? One of the most important questions is, where to have IQueryable typed collections? - All the way from Repositories to Business model or not at all and expose only solid IList and IEnumerable from Repositories and deal with more specific queries inside Business model, but have more finer grained methods for data retrieval within Repositories. So, what do you think? Have any suggestions?

    Read the article

  • Do you think functional language is good for applications that have a lot of business rules but very

    - by StackUnderflow
    I am convinced that functional programming is an excellent choice when it comes to applications that require a lot of computation (data mining, AI, nlp etc). But is it wise to use functional programming for a typical enterprise application where there are a lot of business rules but not much in terms of computation? Please disregard the fact that there are very few people using functional programming and that it's kind of tough. Thanks

    Read the article

  • Facebook Insights for Page via the API

    - by Wes
    Using the new API, is it possible to get the insights (analytics) data from a page that you are an admin of? I can successfully get the data from an app I own, but its not clear how to do this for a page. If not, is it possible to download the CSV of data from the API?

    Read the article

  • Filezilla connection error

    - by Kumar P
    I have RHEL 5 lan server with squid 2.6 stable proxy settings, Under this have some windows xp desktops Now i installed filezilla ftp client in windows xp, for give services to my client's websites But i can't connect ftp servers throw filezilla , I set generic proxy too. ( HTTP/1.1 USING CONNECT method ) I get error message like this, Status: Connecting to (ftp hostname) through proxy Status: Connecting to hostname:port... Status: Connection with proxy established, performing handshake... Response: Proxy reply: HTTP/1.0 403 Forbidden How can i solve this problem ?

    Read the article

  • Does it make sense to fragment cache static partials

    - by ash34
    Hi, I have my views and layouts split into multiple partials, some of them are static partials i.e, no data from the database being displayed here. Does it make sense to cache these to prevent the erb templating system from generating the html each time or it only makes sense to cache in situations where something needs to be retrieved from the db each time. thanks, ash

    Read the article

  • How to insert/update multiple record into SQLite database in a single query.

    - by TuanCM
    Hi Guy. Is it possible to insert/update multiple record in SQLite database using EGODatabase wrapper. If I'm correct I think we can do it with FMDatabase by wrapping it between [db beginTransaction] and [db commit]. I wonder if we can do the same thing by using EGODatabase. Following is the code sample from FMDatabase project: [db beginTransaction]; i = 0; while (i++ < 20) { [db executeUpdate:@"insert into test (a, b, c, d, e) values (?, ?, ?, ?, ?)" , @"hi again'", // look! I put in a ', and I'm not escaping it! [NSString stringWithFormat:@"number %d", i], [NSNumber numberWithInt:i], [NSDate date], [NSNumber numberWithFloat:2.2f]]; } [db commit];

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >