Search Results

Search found 1237 results on 50 pages for 'sam halicke'.

Page 36/50 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • Jboss failover testing

    - by Sam
    Hi All, I have a peculiar situation here. I have installed JBoss 5.1.0 as a service in Wintel box. The service will restart itself if the JBoss instance fails. However I could not find a way to test this scenario. I killed the JVM that was running the JBoss, but it did not restart the service. I need to make the JBoss service end abnormally so that I can ensure it is restarts again. In a nutsehll, I need a way to make JBoss end abnormally. Please help.

    Read the article

  • How to set cookies via PHP in the middle of a document?

    - by Sam
    Hi all, how can I set cookies in the middle of a document, without incurring a 'headers already sent' error? What I'm trying to do is make a log out script (the log in cookie setting works...so odd. Is it because it's enclosed in an if statement?) however I've already echoed the page title and some other stuff at the top of the page, before I've made this logout happen. Thanks!

    Read the article

  • Converting ObjC Blocks to C# Lambas

    - by Sam
    I need some help converting an Objective-C block to C#. Here is the source ObjC: NSDate* addYear = [_calendar dateByAddingComponents:((^{ NSDateComponents* components = [NSDateComponents new]; components.month = 12; return components; })()) toDate:now options:0]; Now I tried the following in C#: NSDate date = _calendar.DateByAddingComponents((() => { NSDateComponents components = new NSDateComponents(); components.Month = 12; return components; })(), now, NSCalendarOptions.None); To which I get the following compiler error: Expression denotes a 'anonymous method' where a 'method group' was expected. Removing the parentheses around the lambda yields Cannot convert 'lambda expression' to non-delegate type 'MonoTouch.Foundation.NSDateComponents'. What is the correct C# syntax? I need to retain the closures as there are a lot more in the code base that I am porting.

    Read the article

  • Get Windows mobile sound level, especially silent mode

    - by Sam
    In Windows Mobile (5,6) you can have different sound volume settings. The volume itself is easy, but how do I differ between the two silent settings? There is one volume setting "vibration only" and one "no sound, no vibration at all". Since my program is using vibration, I'd like to know if windows mobile is set to "no vibration at all", so I don't annoy the user when he wants his phone to be absolutely silent.

    Read the article

  • Ruby on Rails: one-to-one mapping. Just semantics or really a different structure.

    - by Sam
    So I'm creating a plugin for Ruby on Rails to make implemented addresses including country, state, city, and zip_code for countries that can follow that paradigm a lot easier but that's beside the point expect for how the address model is associated. So starting with my address model. class Address < ActiveRecord::Base has_one :country has_one :state has_one :city has_one :zip_code end What's the difference between saying belongs_to and has_one Seems to be the same thing because both only require one model to declare ownership and foreign_key And it also seems that both are logical to say. an address belongs to an account and an account has one address Is this only semantics or is there are real difference

    Read the article

  • Incorrect syntax near the keyword 'select' while execuing query

    - by sam
    I am getting Incorrect syntax near the keyword 'select' after executing the following code. declare @c int SELECT @c = COUNT(*) FROM (select id, max(date_stored) from table B INNER JOIN table P ON B.id = P.id where id = 3) select @c I want to select total no of records having max stored dates in database. Can any one plz tell what I am doing wrong

    Read the article

  • Passing variables from SQL proceedure to PHP

    - by Sam Corbet
    I am trying to create an sql proceedure that will return the results back to the php page. I want to be able to call the procedure as follows from the php call procedure_name($var1) which will run this script: -- --------------------------------------------------------------------------------- -- pUIGetCliStmtGenFlag -- -- This procedure returns the status of the Trading Period: -- -- --------------------------------------------------------------------------------- drop procedure if exists pUIGetCliStmtGenFlag; delimiter // create procedure pUIGetCliStmtGenFlag( IN pTradingPeriodMonth DATE ) MODIFIES SQL DATA COMMENT 'Checks if the TP has been closed' begin SELECT trading_period_month, dt_end, amt_traded_system_ccy FROM ca_trading_period WHERE trading_period_month=$var1 -- If amt_traded_system_ccy is NULL give the TP an open status otherwise mark as closed IF amt_traded_system_ccy is NULL $tpstatus='open' ELSE $tpstatus='closed' end; // delimiter ; I then want to be able to use $tpstatus in the rest of the php script. I know this is simple but this is completely new to me and I cant find the correct method

    Read the article

  • Horizontal scrolling in a wx.RichTextCtrl

    - by Sam
    I have a RichTextCtrl created as follows: self.userlist = wx.richtext.RichTextCtrl(self, style=wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL) It all works fine, except for the wx.HSCROLL style. If I change the RichTextCtrl to a regular TextCtrl, it correctly horizontal scrolls on long lines, rather than wrapping, but on the RichTextCtrl it wraps regardless. Is there an easy way to make it scroll horizontally? (I do, unfortunately, need the RichTextCtrl's featureset for this object.)

    Read the article

  • How to print arguments passed to configure script?

    - by Sam
    Hi, I'm trying to print arguments passed to a ./configure script. Calling 'echo' on $BASH_ARGV will just print the last set of arguments. For example if I run: ./configure --enable-foo --enable-bar echo $BASH_ARGV will print only "--enable-bar" How do I print all the arguments? Thanks!

    Read the article

  • How to query MYSQL when clicked?

    - by Sam
    Hello, I have a while statement, echoing my whole database that match a WHERE parameter. How can I make it so when I click on something (anything for the moment), it updates that specific row. Here's my code. while($request = mysql_fetch_array( $request_db )) { echo "<tr><td style=\"width:33%;padding:1px;\">"; echo $request['SongName']; echo "</td><td style=\"width:33%;\">"; echo $request['Artist']; echo "</td><td style=\"width:33%;\">"; echo $request['DedicatedTo']; echo "</td><td style=\"width:33%;\">"; echo "UPDATE A ROW's 'Hasplayed' value to '1'."; echo "</td></tr>"; } echo "</table>"; Thanks!

    Read the article

  • Why doesn't my Perl script start under FastCGI?

    - by Sam
    I am getting this error in error_log one of my Perl CGI application. I am pretty sure I haven't changed my script at all and all of a sudden i have started getting this error. This is what I see in error_log: [Wed Jul 8 15:18:20 2009] [warn] FastCGI: server "/local/web/test/cgi-bin/test.pl" (pid 17033) terminated by calling exit with status '255' [Wed Jul 8 15:18:20 2009] [warn] FastCGI: server "/local/web/test/cgi-bin/test.pl" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds (The snippet was edited for clarity) Also, the AddHandler line for FastCGI exists in the config file. Can any tell me the possible reasons for this error? There is nothing recorded in Apache logs.

    Read the article

  • Identifying idle state on a windows machine

    - by SaM
    I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn't mean the system has been idle for 10 minutes - scans, downloads, movies - lots of reasons. So how can we identify whether the system is truly idle or not? Does anyone know what Window's definition of "idle" is? Must be a combination of thresholds - like less than 5% cpu util, less than 3% disk util etc. - along with the user input parameter...anyone knows the exact definition?

    Read the article

  • An easy way to replace fread()'s with reading from a byte array?

    - by Sam Washburn
    I have a piece of code that needs to be run from a restricted environment that doesn't allow stdio (Flash's Alchemy compiler). The code uses standard fopen/fread functions and I need to convert it to read from a char* array. Any ideas on how to best approach this? Does a wrapper exist or some library that would help? Thanks! EDIT: I should also mention that it's reading in structs. Like this: fread(&myStruct, 1, sizeof(myStruct), f);

    Read the article

  • Best way to version control a WCF application with Git?

    - by Sam
    Suppose I have the following projects. The format is [ProjectName] : [ProjectDependency1, ProjectDependency2, etc.] // Service CoolLibrary WcfApp.Core WcfApp.Contracts WcfApp.Services : CoolLibrary, WcfApp.Core, WcfApp.Contracts // Clients CustomerX.App : WcfApp.Contracts CustomerY.App : WcfApp.Contracts CustomerZ.App : WcfApp.Contracts (On a side note, WcfApp.Contracts should not depend on WcfApp.Core, right? Else CustomerX.App would also depend on and thus be exposed to the service domain model?) (CoolLibrary is shared with other applications, so I can't just put it inside of WcfApp.Services.) All of this code is in-house. I was thinking of having 6 repositories for this. The format is [repository folder name] : [Projects included in repository.] 1. CoolLibrary.git : CoolLibrary 2. WcfApp.Contracts.git : WcfApp.Contracts 3. WcfApp.git : WcfApp.Core, WcfApp.Services 4. CustomerX.App.git : CustomerX.App 5. CustomerY.App.git : CustomerY.App 6. CustomerZ.App.git : CustomerZ.App How should I manage my project dependencies? I see three options: I could use binaries which I have to manually copy to each dependent repository. This would be easiest at the start, but my repositories would be a little bloated, and it'd become more tedious as I add more client apps for customers. I could import dependent code as submodules. This is what I will probably end up doing, although I keep reading on the web that submodules are a hassle. I also read that I can use something called the subtree merge strategy, but I am not sure how it is different from just cloning the repo into a subdirectory and adding the subdirectory to .gitignore. Is the difference that the subtree is recorded in the master repository, so (for example) cloning it from a different location will also pull the subtree? I know I asked a lot of questions in this post, but the most important two questions I have are: 1. Am I using the right number and layout of repositories? Should I use less or more? 2. Which of the three dependency management strategies would you recommend? Is there another strategy I haven't considered?

    Read the article

  • How to know the Geometry coordinates for google Maps

    - by Sam
    I found a sample script on Google Code about : Google Maps Javascript API V3 Overlays - http://code.google.com/apis/maps/documentation/javascript/overlays.html#OverlaysOverview And I want to apply this code to other countries (France, spain...) but I don't know where/how to find the Geometry code like in this script (see commented line) Here is the code: var australia = new google.maps.LatLng(-25, 133); map = new google.maps.Map(document.getElementById('map_canvas'), { center: australia, zoom: 4, mapTypeId: google.maps.MapTypeId.ROADMAP }); layer = new google.maps.FusionTablesLayer({ query: { select: 'geometry', from: '815230' // This one }, styles: [{ polygonOptions: { fillColor: "#00FF00", fillOpacity: 0.3 } }, { where: "birds > 300", polygonOptions: { fillColor: "#0000FF" } }, { where: "population > 5", polygonOptions: { fillOpacity: 1.0 } }] }); layer.setMap(map); P.S. I tried to change the google.maps.LatLng(-25, 133) to France Lat&Long but this is used only to center the map on that position. Thank you for your help

    Read the article

  • 1 bug to kill... Letting PHP Generate The Canonical.

    - by Sam
    Hi folks, for building a clean canonical url, that always returns 1 base URL, im stuck in following case: <?php # every page $extensions = $_SERVER['REQUEST_URI']; # path like: /en/home.ast?ln=ja $qsIndex = strpos($extensions, '?'); # removes the ?ln=de part $pageclean = $qsIndex !== FALSE ? substr($extensions, 0, $qsIndex) : $extensions; $canonical = "http://website.com" . $pageclean; # basic canonical url ?> <html><head><link rel="canonical" href="<?=$canonical?>"></head> when URL : http://website.com/de/home.ext?ln=de canonical: http://website.com/de/home.ext BUT I want to remove the file extension aswell, whether its .php, .ext .inc or whatever two or three char extension .[xx] or .[xxx] so the base url becomes: http://website.com/en/home Aaah much nicer! but How do i achieve that in current code? Any hints are much appreciated +! (other advices for proper canonical usage in this multi-lingual environment are welcome as well)

    Read the article

  • Regex - Format with tabs and alphabetical

    - by Sam
    Is it possible to use regex to turn this <site-ui:header title="error" backURL="javascript:history.go(-1);" /> into this <site-ui:header backURL="javascript:history.go(-1);" title="error" /> Basically, my goal is to format this xml so that the fields are in alphabetical order (e.g. backURL comes before title), and each field should be tabbed two spaces. If this can be done, any pointers would be really helpful! Even more helpful is an exact regex for vim.

    Read the article

  • Rails: updating an association

    - by Sam
    I have a Reservation model which belongs_to a Sharedorder and so a Sharedorder has_many reservations. Give you a little background. I sharedorder has many reservations and each reservation can have an amount. A sharedorder has three status: 1) reserved, 2) confirmed, 3) and purchased. Here is my problem. When a reservation gets added to a sharedorder or an existing reservation's amount is updated I need this to affect the associated sharedoder because the status listed latter should only change when 100% of the reservations have been placed and so on. Here are the things I have tried: . class Reservation < ActiveRecord::Base before_save :sharedorder_reserved_status def sharedorder_reserved_status if self.sharedorder.reserved_percent(reservations_to_be_added) >= 100 && !self.sharedorder.reserved self.sharedorder.update_attribute(:reserved, true) self.sharedorder.update_attribute(:reserved_at, Time.now) end end def reservations_to_be_added if self.new_record? self.amount elsif self.amount_changed? self.amount - self.amount_was else 0 end end end And then in the Sharedorder model: class Sharedorder < ActiveRecord::Base def reserved_percent(amount_change) (((reserved_sum + amount_change).to_f / self.product.twenty_hq_size.to_f)*100).to_i end def reserved_sum if !@reserved_sum reserved_sum = 0 reserved_reservations.collect {|x| reserved_sum += x.amount } reserved_sum else @reserved_sum end end def reserved_reservations @reserved_reservations ||= Reservation.find(:all, :conditions => ['canceled = ? AND sharedorder_id = ?', false, self.id ]) end end I have also tried :touch => true on the reservation model to update the sharedorder put for some reason it doesn't seem to include the latest reservation being added or being updated. So what I'm trying to do is update the status of the sharedorder if a certain percent is reached and I have to send the additional amounts the the sharedorder for it to know to include additional reservations or updates on existing ones. How should I do this?

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >