Search Results

Search found 147 results on 6 pages for 'benny wong'.

Page 5/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • With Maven, how would I prevent Maven from filtering certain properties but allowing others?

    - by Benny
    The problem is that I'm trying to build a project that has in its resources a build.xml file. Basically, I package my project as a jar with Maven2, and then use ant installer to install my project. There is a property in the build.xml file that I need to filter called build.date, but there are other properties that I don't want to filter, like ${basedir}, because it's used by the ant installer but gets replaced by Maven's basedir variable. So, I need to somehow tell Maven to filter ${build.date}, but not ${basedir}. I tried creating a properties file as a filter with "basedir=${basedir}" as one of the properties, but I get the following error: Resolving expression: '${basedir}': Detected the following recursive expression cycle: [basedir] Any suggestions would be much appreciated. Thanks, B.J.

    Read the article

  • What's the order of execution in property setters when using IDataErrorInfo?

    - by Benny Jobigan
    Situation: Many times with WPF, we use INotifyPropertyChanged and IDataErrorInfo to enable binding and validation on our data objects. I've got a lot of properties that look like this: public SomeObject SomeData { get { return _SomeData; } set { _SomeData = value; OnPropertyChanged("SomeData"); } } Of course, I have an appropriate overridden IDataErrorInfo.this[] in my class to do validation. Question: In a binding situation, when does the validation code get executed? When is the property set? When is the setter code executed? What if the validation fails? For example: User enters new data. Binding writes data to property. Property set method is executed. Binding checks this[] for validation. If the data is invalid, the binding sets the property back to the old value. Property set method is executed again. This is important if you are adding "hooks" into the set method, like: public string PathToFile { get { return _PathToFile; } set { if (_PathToFile != value && // prevent unnecessary actions OnPathToFileChanging(value)) // allow subclasses to do something or stop the setter { _PathToFile = value; OnPathToFileChanged(); // allow subclasses to do something afterwards OnPropertyChanged("PathToFile"); } } }

    Read the article

  • Convert Office Documents without Office

    - by Benny
    We are in need of converting all MS Office documents to PDF, TIF, or any similar image format with no loss in formatting (these are official documents that cannot have tampering). Is there any way to do this without installing Office on the machine that would do this? Ideally, this would go on a server and run multi-threaded without the overhead of Office Automation. Thanks in advance!

    Read the article

  • How would MVVM be for games?

    - by Benny Jobigan
    Particularly for 2d games, and particularly silverlight/wpf games. If you think about it, you can divide a game object into its view (the graphic on the screen) and a view-model/model (the state, ai, and other data for the object). In silverlight, it seems common to make each object a user control, putting the model and view into a single object. I suppose the advantage of this is simplicity. But, perhaps it's less clean or has some disadvantages in terms of the underlying "game engine". What are your thoughts on this matter? What are some advantages and disadvantages of using the MVVM pattern for game development? How about performance? All thoughts are welcome.

    Read the article

  • drag-drop and data binding in MVVM

    - by Benny
    My ViewModel: class ViewModel { public string FileName {get;set;} } and in my View I bind a label's content to ViewModel's FileName. now When I do drag-drop a file to my View, How can I update the label's Content property, so that the ViewMode's FileName also get updated via binding? Directly set the label's Content property won't work, it just simply clear the binding.

    Read the article

  • Asterisk TDM Out Channel Not Recording

    - by Benny
    I am trying to use the monitor command to record a TDM extension, but only the in chnnnel is being recorded. The out channel is 44 bytes and obviously no audio within. However, when monitoring a SIP or IAX phone, no problems exist. Is there some configuration I'm missing for distinguishing between TDM and SIP/IAX for recording? Thanks in advance!

    Read the article

  • Help me understand Dispose() implementation code from MSDN

    - by Benny
    the following code is from MSDN: Idisposable pattern protected virtual void Dispose(bool disposing) { // If you need thread safety, use a lock around these // operations, as well as in your methods that use the resource. if (!_disposed) { if (disposing) { if (_resource != null) _resource.Dispose(); Console.WriteLine("Object disposed."); } // Indicate that the instance has been disposed. _resource = null; _disposed = true; } } why the following statement: _resource = null; _disposed = true; are not enclosed by if (disposing) statement block? for me i would probably write like this: if (disposing) { if (_resource != null) { _resource.Dispose(); _resource = null; _disposed = true; } Console.WriteLine("Object disposed."); } anything wrong with my version?

    Read the article

  • With Maven2, how would I zip a directory in my resources?

    - by Benny
    I'm trying to upgrade my project from using Maven 1 to Maven 2, but I'm having a problem with one of the goals. I have the following Maven 1 goal in my maven.xml file: <goal name="jar:init"> <ant:delete file="${basedir}/src/installpack.zip"/> <ant:zip destfile="${basedir}/src/installpack.zip" basedir="${basedir}/src/installpack" /> <copy todir="${destination.location}"> <fileset dir="${source.location}"> <exclude name="installpack/**"/> </fileset> </copy> </goal> I'm unable to find a way to do this in Maven2, however. Right now, the installpack directory is in the resources directory of my standard Maven2 directory structure, which works well since it just gets copied over. I need it to be zipped though. I found this page on creating ant plugins: http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html. It looks like I could create my own ant plugin to do what I need. I was just wondering if there was a way to do it using only Maven2. Any suggestions would be much appreciated. Thanks, B.J.

    Read the article

  • help me understand the method Validator.TryValidateObject()

    - by Benny
    this is the method definition: public static bool TryValidateObject( Object instance, ValidationContext validationContext, ICollection<ValidationResult> validationResults, bool validateAllProperties ) what i am confused is the validateAllProperties parameter, I understand when it is true-validate all properties. What about when it is false, not validate all properties, but which property will be validated?

    Read the article

  • With Maven2, how would I specify a custom directory to which a dependency should be copied?

    - by Benny
    Basically, I have a multi-module project consisting of 5 different modules. One of the modules is kind of the parent module to the other 4, meaning the other 4 need to be built before the 5th, so you could say that each of the 4 modules is a dependency of the 5th. Thus, I've made dependency entries for each of the modules in the 5th module's pom.xml. However, when I build the project, I don't want those 4 dependencies copied to the "lib" directory of the 5th module. I'd like to specify the directory into which each of them should be placed explicitly. Is there any way to do this with Maven2? Thanks for your help, B.J.

    Read the article

  • Fetching content from Website on another Server

    - by benny
    Hi everyone. What i basically want to do is to get content from a website and load it into a div of another website. This should be no problem so far. The problem is, that the content that should be fetched is located on a different server and i have no source access to it. I'd prefer a solution using JavaScript of jQuery. Can i use a .htacces redirect to fetch the content from a remote server with client-side (js) techniques? I will also go with other solutions though. Thanks a lot in advance!

    Read the article

  • Ant: Create directory containing file if it doesn't already exist?

    - by Benny
    Basically, I get a path like "C:\test\subfolder1\subfolder2\subfolder3\myfile.txt", but it's possible that subfolders 1-3 don't exist already, which means I'd get an exception if I try to write to the file. Is there a way to create the directory structure the target file is in, either by using some task that creates the structure when it outputs to the file and then deleting the file, or by parsing the directory part of the path and using the mkdir task first? Any help is appreciated. Thanks, B.J.

    Read the article

  • Help me understand the code snippet in c#

    - by Benny
    I am reading this blog: Pipes and filters pattern I am confused by this code snippet: public class Pipeline<T> { private readonly List<IOperation<T>> operations = new List<IOperation<T>>(); public Pipeline<T> Register(IOperation<T> operation) { operations.Add(operation); return this; } public void Execute() { IEnumerable<T> current = new List<T>(); foreach (IOperation<T> operation in operations) { current = operation.Execute(current); } IEnumerator<T> enumerator = current.GetEnumerator(); while (enumerator.MoveNext()); } } what is the purpose of this statement: while (enumerator.MoveNext());? seems this code is a noop.

    Read the article

  • where should this check logic go?

    - by Benny
    I have a function that draw a string on graphics: private void DrawSmallImage(Graphics g) { if (this.SmallImage == null) return; var smallPicHeight = this.Height / 5; var x = this.ClientSize.Width - smallPicHeight; var y = this.ClientSize.Height - smallPicHeight; g.DrawImage(this.SmallImage, x, y, smallPicHeight, smallPicHeight); } the check if (this.SmallImage == null) return; should be in the function DrawSmallImage or should be in the caller? which is better?

    Read the article

  • how to implement a message pump in Non-UI thread in .net?

    - by Benny
    how to implement a message pump in non-ui thread? what i want is that the message can be an object or a command, say an Action/Func, etc. do i have to use separate queue for different type of message? say one queue for object, one queue for Action/Function? Given that the type of messages vary, how to implement it?

    Read the article

  • Communication framework recommendation

    - by Benny
    I have two applications, and one is keeping sending live images to the other and it need to be long-running. WCF - is it suitable? TCP/IP directly? Service bus, NServiceBus? Is there any better alternative for this communication?

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >