Search Results

Search found 808 results on 33 pages for 'greg mcnulty'.

Page 22/33 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • quartz.net - Can I not add a callback delegate method to JobExecutionContext?

    - by Greg
    Hi, BACKGROUND - I have a synchroisation function within my MainForm class. It gets called manually when the user pushes the SYNC button. I want to also call this synchroisation function when the scheduler triggers too, so effectively want SchedulerJob:IJob.Execute() method to be able to call it. QUESTION - How do I access the MainForm.Sychronization() method from within the SchedulerJob:IJob.Execute() method? I tried creating a delegate for this method in the MainForm class and getting it added via jobDetail.JobDataMap. However when I try I'm not sure that JobDataMap has a method to pull out a Delegate type??? private void Schedule(MainForm.SyncDelegate _syncNow) { var jobDetail = new JobDetail("MainJob", null, typeof(SchedulerJob)); jobDetail.JobDataMap["CallbackMethod"] = _syncNow; // Trigger Setup var trigger = new CronTrigger("MainTrigger"); string expression = GetCronExpression(); trigger.CronExpressionString = expression; trigger.StartTimeUtc = DateTime.Now.ToUniversalTime(); // Schedule Job & Trigger _scheduler.ScheduleJob(jobDetail, trigger); } public class SchedulerJob : IJob { public SchedulerJob() { } public void Execute(JobExecutionContext context) { JobDataMap dataMap = context.JobDetail.JobDataMap; MainForm.SyncDelegate CallbackFunction = dataMap.getDelegate["CallbackMethod"]; **// THIS METHOD DOESN'T EXIST - getDelegate()** CallbackFunction(); } } thanks

    Read the article

  • Unmodifiable NavigableSet/NavigableMap in Java?

    - by Greg Mattes
    java.util.Collections has several unmodifiable methods that provide unmodifiable collection views by wrapping collections in decorators that prohibit mutation operations. Java 6 added support for java.util.NavigableSet and java.util.NavigableMap. I'd like to be able to have unmodifiable NavigableSets and NavigableMaps, but java.util.Collections#unmodifiableSortedSet(SortedSet) and java.util.Collections#unmodifiableSortedMap(SortedMap) are not sufficient because they do not support the operations that are particular to NavigableSet and NavigableMap. Are there de-facto implementations for unmodifiableNavigableSet and unmodifiableNavigableMap?

    Read the article

  • Best Practice For Referencing an External Module In a Java Project

    - by Greg Harman
    I have a Java project that expects external modules to be registered with it. These modules: Implement a particular interface in the main project Are packaged into a uni-jar (along with any dependencies) Contain some human-readable meta-information (like the module name). My main project needs to be able to load at runtime (e.g. using its own classloader) any of these external modules. My question is: what's the best way of registering these modules with the main project (I'd prefer to keep this vanilla Java, and not use any third-party frameworks/libraries for this isolated issue)? My current solution is to keep a single .properties file in the main project with key=name, value=classhuman-readable-name (or coordinate two .properties files in order to avoid the delimiter parsing). At runtime, the main project loads in the .properties file and uses any entries it finds to drive the classloader. This feels hokey to me. Is there a better way to this?

    Read the article

  • Fast word count function in Vim

    - by Greg Sexton
    I am trying to display a live word count in the vim statusline. I do this by setting my status line in my .vimrc and inserting a function into it. The idea of this function is to return the number of words in the current buffer. This number is then displayed on the status line. This should work nicely as the statusline is updated at just about every possible opportunity so the count will always remain 'live'. The problem is that the function I have currently defined is slow and so vim is obviously sluggish when it is used for all but the smallest files; due to this function being executed so frequently. In summary, does anyone have a clever trick for producing a function that is blazingly fast at calculating the number of words in the current buffer and returning the result?

    Read the article

  • a4j:commandButton causes full page reload on IE7

    - by Greg Charles
    Our process allows users to activate their account, and then configure e-mail preferences. We're using the tag: <a4j:commandButton id="activate" action="#{controller.agreeAction}" image="/img/ok.png" styleClass="activate-button" reRender="mainContent, sideBar" oncomplete="showEmailDialog();" /> This works fine on Firefox, but on IE, the showEmaiDialog() fires off to display the new dialog, and then the full page reloads, which instantly hides it again. I put in numerous alert() calls to make sure of what was happening. I see the e-mail dialog until I clear the final alert box in in the showEmailDialog() script, and then I see the alerts that I put into jQuery(document).ready(). Why does IE do a full page reload instead of just refreshing the requested sections?

    Read the article

  • What does int argc, char *argv[] mean?

    - by Greg Treleaven
    In many C++ IDE's and compilers, when it generates the main function for you, it looks like this: int main(int argc, char *argv[]) When I code C++ without an IDE, just with a command line compiler, I type: int main() without any parameters. What does this mean, and is it vital to my program?

    Read the article

  • Accessing the buffered request body in HttpWebRequest?

    - by Greg Beech
    By default HttpWebRequest has AllowWriteStreamBuffering set to true, which means that all data written to the request stream is buffered inside the object. I'd like to access this buffer of data after it has been written, but can't seem to find any way to do so. I'm happy for it to fail if AllowWriteStreamBuffering is false. Is there any way to do this, or is it not exposed anywhere?

    Read the article

  • How can a ListBoxItem property be set in Silverlight at runtime?

    - by sympatric greg
    Given this XAML, I need to resize the userControl in response to user input. How can I set a new width for ListBoxItem (or perhaps the StackPanel)? <ScrollViewer x:Name="ScrollViewer" Margin="0" BorderBrush="Transparent" Width="165" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden"> <ListBox x:Name="AttributeListBox" ItemsSource="{Binding Attributes}" BorderBrush="Red" Width="160" Foreground="AntiqueWhite" Background="Transparent" IsEnabled="False" HorizontalAlignment="Stretch"> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> <Setter Property="HorizontalAlignment" Value="Stretch"/> <Setter Property="Width" Value="150"/> <Setter Property="Margin" Value="0,-2,0,0"/> <Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="Template" Value="{StaticResource ListBoxItemSansFocus}" /> </Style> </ListBox.ItemContainerStyle> <ListBox.ItemTemplate> <DataTemplate> <StackPanel x:Name="ListBoxItemStackPanel" HorizontalAlignment="Stretch" Orientation="Vertical" > <TextBlock FontSize="10" Text="{Binding Key}" Foreground="White" FontWeight="Bold" HorizontalAlignment="Stretch" Margin="2,0,0,0" TextWrapping="Wrap"/> <TextBlock FontSize="10" Text="{Binding Value}" Foreground="White" Margin="6,-2,0,0" TextWrapping="Wrap"/> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </ScrollViewer>

    Read the article

  • default value support for Entity Framework object construction to avoid having to set this column pa

    - by Greg
    Hi, In entity framework is there a way to have a default value for a column such that Linq to Entity won't require this parameter when constructing a new object? For example I've marked on column in the EF designer with a default value (I typed in "All" as it was a string). But if I try to construct a new record and not specify this parameter I still get a FOREIGN KEY constraint exception. The INSERT statement conflicted with the FOREIGN KEY constraint "FK_FunctionalityTypeInterfaceRelationship"

    Read the article

  • SSIS 2005 - How to Import a Fixed Width Flat File?

    - by Greg
    I have a flat file that looks something like this: junk I don't care about \n \n columns names\n val1 val2 val3\n val1 val2 val3\n columns names \n val1 val2 val3\n I only care the lines with values. These value lines are all fixed width format and have the same line length. The other junk lines and column names can have any line width. When I try the flat file fixed width option or the ragged right option the preview looks all wrong. Any ideas what the easiest way to get this into SSIS is?

    Read the article

  • Table names, and loop to describe

    - by Greg
    Working in Oracle 10g. Easy way to list all tables names (select table_name from dba_tables where owner = 'me') But now that I have the table names, is there an easy way to loop through them and do a 'describe' on each one in sequence?

    Read the article

  • Does VS2010 does not install SQL Server during installation

    - by Greg
    Hi, Just confirming -does VS2010 does not install SQL Server during installation? I'm assuming no. This being the case I therefore need to download a copy of SQL Express 2005 or something to develop against on my windows XP home PC? Is this correct? Or would the Dev edition of SQL Server 2005 run/install on Windows XP Home? thanks

    Read the article

  • Timer Service in ejb 3.1 - schedule calling timeout problem

    - by Greg
    Hi Guys, I have created simple example with @Singleton, @Schedule and @Timeout annotations to try if they would solve my problem. The scenario is this: EJB calls 'check' function every 5 secconds, and if certain conditions are met it will create single action timer that would invoke some long running process in asynchronous fashion. (it's sort of queue implementation type of thing). It then continues to check, but as long as long running process is there it won't start another one. Below is the code I came up with, but this solution does not work, because it looks like asynchronous call I'm making is in fact blocking my @Schedule method. @Singleton @Startup public class GenerationQueue { private Logger logger = Logger.getLogger(GenerationQueue.class.getName()); private List<String> queue = new ArrayList<String>(); private boolean available = true; @Resource TimerService timerService; @Schedule(persistent=true, minute="*", second="*/5", hour="*") public void checkQueueState() { logger.log(Level.INFO,"Queue state check: "+available+" size: "+queue.size()+", "+new Date()); if (available) { timerService.createSingleActionTimer(new Date(), new TimerConfig(null, false)); } } @Timeout private void generateReport(Timer timer) { logger.info("!!--timeout invoked here "+new Date()); available = false; try { Thread.sleep(1000*60*2); // something that lasts for a bit } catch (Exception e) {} available = true; logger.info("New report generation complete"); } What am I missing here or should I try different aproach? Any ideas most welcome :) Testing with Glassfish 3.0.1 latest build - forgot to mention

    Read the article

  • Is it possible to share session state between asp.net aspx page making a call to an asp.net webservi

    - by Greg Balajewicz
    My Situation: I have 1 asp.net application with both aspx pages AND webservices I make calls (using ajax) to the webservice from an aspx page - all within the same asp.net application! Here is my problem/question Is there any way to share the session state? I.e. - the aspx page has a sessionID and the state is being maintained. When the call to the webservice is made, is there a way to automatically send the seesionID to the webservice and then be able to access the same session state from the webservice? -- That would greatly simplify my work! :) Many thanks for your ideas!!

    Read the article

  • ASP.NET UpdateProgress template does not disapper when panel in UpdatePanel has display set to none

    - by Greg Balajewicz
    I am using very simple code where I have a update panel with some panels inside and a submit button. On submit, i hide one of the panels using this code: panel.Style.Add("display", "none"); I am also using a UpdateProgress which works great in all but this case. When i set the display to none using this code, the UpdateProgress template does not disappear! remove the line, all is well .... No idea why...

    Read the article

  • Which source control paradigm and solution to embed in a custom editor application?

    - by Greg Harman
    I am building an application that manages a number of custom objects, which may be edited concurrently by multiple users (using different instances of the application). These objects have an underlying serialized representation, and my plan is to persist them (through my application UI) in an external source control system. Of course this implies that my application can check the current version of an object for updates, a merging interface for each object, etc. My question is what source control paradigm(s) and specific solution(s) to support and why. The way I (perhaps naively) see the source control world is three general paradigms: Single-repository, locked access (MS SourceSafe) Single-repository, concurrent access (CVS/SVN) Distributed (Mercurial, Git) I haven't heard of anyone using #1 for quite a number of years, so I am planning to disregard this case altogether (unless I get a compelling argument otherwise). However, I'm at a loss as to whether to support #2 or #3, and which specific implementations. I'm concerned that the use paradigms are subtly different enough that I can't adequately capture basic operations in a single UI. The last bit of information I should convey is that this application is intended to be deployed in a commercial setting, where a source control system may already be in use. I would prefer not to support more than one solution unless it's really a deal-breaker, so wide adoption in a corporate setting is a plus.

    Read the article

  • IOC - Should util classes with static helper methods be wired up with IOC?

    - by Greg
    Hi, Just trying to still get my head around IOC principles. Q1: Static Methods - Should util classes with static helper methods be wired up with IOC? For example if I have a HttpUtils class with a number of static methods, should I be trying to pass it to other business logic classes via IOC? Follow on questions for this might be: Q2: Singletons - What about things like logging where you may typically get access to it via a Logger.getInstance() type call. Would you normally leave this as is, and NOT use IOC for injecting the logger into business classes that need it? Q3: Static Classes - I haven't really used this concept, but are there any guidelines for how you'd typically handle this if you were moving to an IOC based approach. Thanks in advance.

    Read the article

  • What's happened to my directory on GitHub?

    - by Greg K
    I added a new subdir within my git respository: git add feeds Then commited this and pushed it up to GitHub but it seems as though I've commited a symlink / shortcut but not the actual directory and files within. See here: http://github.com/G4EGK/RSS-Reader Any idea what 'feeds' is? I'd like to remove that and correctly add my files. I tried the following but git status said nothing had changed: git rm feeds git add feeds/\*.php To remove feeds do I run the following? git filter-branch --tree-filter 'rm -f feeds' HEAD

    Read the article

  • ASP.net page gets error on import statement, but I do have the reference in place?

    - by Greg
    Hi, Any ideas why I am getting the below error in my MVC2 project, even through in the project itself I definitely have a reference to "system.Web.Entity"? Compiler Error Message: CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) Source Error: Line 1: <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<List<Node>>" %> Line 2: <%@ Import Namespace="TopologyDAL" %> Line 3: <%@ Import Namespace="System.Data.Entity" %> thanks

    Read the article

  • Upload and parse csv file with "universal newline" in python on Google App Engine

    - by greg
    Hi, I'm uploading a csv/tsv file from a form in GAE, and I try to parse the file with python csv module. Like describe here, uploaded files in GAE are strings. So I treat my uploaded string a file-like object : file = self.request.get('catalog') catalog = csv.reader(StringIO.StringIO(file),dialect=csv.excel_tab) But new lines in my files are not necessarily '\n' (thanks to excel..), and it generated an error : Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode? Does anyone know how to use StringIO.StringIO to treat strings like files open in universal-newline?

    Read the article

  • Extending a jquery plugins event callback

    - by Greg J
    I'm extending the functionality of a jquery plugin (foo) with another jquery plugin (bar). Essentially, the first plugin specifies an onReady(): var foo = $.foo({ onReady: function() { alert('foo'); }}); Foo is sent to bar as a parameter to bar: var bar = $.bar(foo); I want bar to be able to hook into foo's onReady event: (function($) { $.extend({ bar: function(foo) { var foo = foo; // How to do alert('bar') when foo.onready is called? } }); })(jQuery); I can override foo's onready event: foo.onready = function() { alert('bar'); } But I don't want to override it, I want to extend it so that I'll see both alerts when foo is ready. Thanks in advance!

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >