Search Results

Search found 5101 results on 205 pages for 'expression trees'.

Page 84/205 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • Regular-Expressions.info Thoroughly Updated

    - by Jan Goyvaerts
    RegexBuddy 4 was released earlier this month. This is a major upgrade that significantly improves RegexBuddy’s ability to emulate the features and deficiencies of the latest versions of all the popular regex flavors as well as many past versions of these flavors. Along with that, the Regular-Expressions.info website has been thoroughly updated with new content. Both the tutorial and reference sections have been significantly expanded to cover all the features of the latest regular expression flavors. There are also new tutorial and reference subsections that explain the syntax used by replacement strings when searching and replacing with regular expressions. I’m also reviving this blog. In the coming weeks you can expect blog post that highlight the new topics on the Regular-Expressions.info website. Later on I’ll blog about more intricate regex-related issues that RegexBuddy 4 emulates but that the website doesn’t talk about or only mentions in passing. RegexBuddy 4.0.0 is aware of 574 different aspects (syntactic and behavioral differences) of 94 regular expression flavors. These numbers are surely to grow with future 4.x.x releases. While RegexBuddy juggles it all with ease, that’s far too much detail to cover in a tutorial or reference that any person would want to read. So the tutorial and reference cover the important features and behaviors, while the blog will serve the corner cases as tidbits. Subscribe to the Regex Guru RSS Feed if you don’t want to miss any articles.

    Read the article

  • #TechEd 2010

    - by T
    It has been another fantastic year for TechEd North America.  I always love my time here.  First, I have to give a huge thank you to Ineta for giving me the opportunity to work the Ineta booth and BOF’s (birds of a feather).   I can not even begin to list how many fantastic leaders in the .Net space and Developers from all over I have met through Ineta at this event.  It has been truly amazing and great fun!! New Orlean’s has been awesome.  The night life is hoppin’.  In addition to enjoying a few (too many??) of the local hurricanes in New Orleans, I have hung out with some of the coolest people  Deepesh Mohnani, David Poll, Viresh, Alan Stephens, Shawn Wildermuth, Greg Leonardo, Doug Seven, Chris Willams, David Carley and some of our southcentral hero’s Jeffery Palermo, Todd Anglin, Shawn Weisfeld, Randy Walker, The midnight DBA’s, Zeeshan Hirani, Dennis Bottjer just to name a few. A big thanks to Microsoft and everyone that has helped to put TechEd together.  I have loved hanging out with people from the Silverlight and Expression Teams and have learned a ton.  I am ramped up and ready to take all that knowledge back to my co-workers and my community. I can not wait to see you all again next year in Atlanta!!! Here are video links to some of my fav sessions: Using MVVM Design Pattern with VS 2010 XAML Designer – Rockford Lhotka Effective RIA: Tips and Tricks for Building Effective Rich Internet Applications – Deepesh Mohani Taking Microsoft Silverlight 4 Applications Beyond the Browser – David Poll Jump into Silvelright! and become immediately effective – Tim Huckaby Prototyping Rich Microsoft Silverlight 4 Applications with MS Expression Blend + SketchFlow – David Carley Tales from the Trenches: Building a Real-World Microsoft Silvelright Line-of-Business Application – Dan Wahlin

    Read the article

  • Why binding is not a native feature in most of the languages?

    - by Gulshan
    IMHO binding a variable to another variable or an expression is a very common scenario in mathematics. In fact, in the beginning, many students think the assignment operator(=) is some kind of binding. But in most of the languages, binding is not supported as a native feature. In some languages like C#, binding is supported in some cases with some conditions fulfilled. But IMHO implementing this as a native feature was as simple as changing the following code- int a,b,sum; sum := a + b; a = 10; b = 20; a++; to this- int a,b,sum; a = 10; sum = a + b; b = 20; sum = a + b; a++; sum = a + b; Meaning placing the binding instruction as assignments after every instruction changing values of any of the variable contained in the expression at right side. After this, trimming redundant instructions (or optimization in assembly after compilation) will do. So, why it is not supported natively in most of the languages. Specially in the C-family of languages? Update: From different opinions, I think I should define this proposed "binding" more precisely- This is one way binding. Only sum is bound to a+b, not the vice versa. The scope of the binding is local. Once the binding is established, it cannot be changed. Meaning, once sum is bound to a+b, sum will always be a+b. Hope the idea is clearer now. Update 2: I just wanted this P# feature. Hope it will be there in future.

    Read the article

  • Silverlight Center And Scale Behavior

    - by Jacek Ciereszko
    If you are interested in my last post about "How to center and scale Silverlight applications using ViewBox control", I just published behavior that you can use instead of making changes in code. How it works? 1. Download behavior (http://gallery.expression.microsoft.com/en-us/CenterAndScale ) 2. Add dll to your application <UserControl .....     xmlns:interaction="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"            xmlns:behavior="clr-namespace:CenterAncScaleBehavior;assembly=CenterAncScaleBehavior"  .... >     <interaction:Interaction.Behaviors>         <behavior:CenterAncScaleBehavior />     </interaction:Interaction.Behaviors>     <Grid > ... </Grid> </UserControl> 3. DONE! Your application is ready!   Watch movie to see how it works (66 seconds): See examples Application without "Center And Scale Behavior":  http://bit.ly/cVinEC Application with "Center And Scale Behavior":  http://bit.ly/ba8UsI   Source code and dlls http://gallery.expression.microsoft.com/en-us/CenterAndScale   Cheers! Jacek Ciereszko

    Read the article

  • I finished my #TechEd 2010, may I have another??

    - by T
    It has been another fantastic year for TechEd North America.  I always love my time here.  First, I have to give a huge thank you to Ineta for giving me the opportunity to work the Ineta booth and BOF’s (birds of a feather).   I can not even begin to list how many fantastic leaders in the .Net space and Developers from all over I have met through Ineta at this event.  It has been truly amazing and great fun!! New Orlean’s has been awesome.  The night life is hoppin’.  In addition to enjoying a few (too many??) of the local hurricanes in New Orleans, I have hung out with some of the coolest people  Deepesh Mohnani, David Poll, Viresh, Alan Stephens, Shawn Wildermuth, Greg Leonardo, Doug Seven, Chris Willams, David Carley and some of our southcentral hero’s Jeffery Palermo, Todd Anglin, Shawn Weisfeld, Randy Walker, The midnight DBA’s, Zeeshan Hirani, Dennis Bottjer just to name a few. A big thanks to Microsoft and everyone that has helped to put TechEd together.  I have loved hanging out with people from the Silverlight and Expression Teams and have learned a ton.  I am ramped up and ready to take all that knowledge back to my co-workers and my community. I can not wait to see you all again next year in Atlanta!!! Here are video links to some of my fav sessions: Using MVVM Design Pattern with VS 2010 XAML Designer – Rockford Lhotka Effective RIA: Tips and Tricks for Building Effective Rich Internet Applications – Deepesh Mohani Taking Microsoft Silverlight 4 Applications Beyond the Browser – David Poll Jump into Silvelright! and become immediately effective – Tim Huckaby Prototyping Rich Microsoft Silverlight 4 Applications with MS Expression Blend + SketchFlow – David Carley Tales from the Trenches: Building a Real-World Microsoft Silvelright Line-of-Business Application – Dan Wahlin

    Read the article

  • Bash script using eyeD3 to remove extra tags from mp3 files

    - by jaguare22
    I found what looks like the perfect script for this but getting errors. Hoping someone can see problem. I am running 12.04 Server. Error is - awk: line 0: regular expression compile failed (missing '(') ): awk: line 0: regular expression compile failed (missing '(') ) The following tags have been found in the mp3s: These tags are to be stripped: Here is a the script obtained from savvyadmin !/bin/bash Script name: strip-tags.sh Original Author: Ian of DarkStarShout Blog Site: http://darkstarshout.blogspot.com/ Options slightly modified to liking of SavvyAdmin.com oktags="TALB APIC TCON TPE1 TPE2 TPE3 TIT2 TRCK TYER TCOM TPOS" indexfile=mktemp Determine tags present: find . -iname "*.mp3" -exec eyeD3 --no-color -v {} \; $indexfile tagspresent=sort -u $indexfile | awk -F\): '/^<.*$/ {print $1}' \ | uniq | awk -F\)\> '{print $1}' | awk -F\( '{print $(NF)}' \ | awk 'BEGIN {ORS=" "} {print $0}' rm $indexfile Determine tags to strip: tostrip=echo -n $tagspresent $oktags $oktags \ | awk 'BEGIN {RS=" "; ORS="\n"} {print $0}' | sort | uniq -u \ | awk 'BEGIN {ORS=" "} {print $0}' Confirm action: echo echo The following tags have been found in the mp3s: echo $tagspresent echo These tags are to be stripped: echo $tostrip echo echo -n Press enter to confirm, or Ctrl+C to cancel... read dummy Strip 'em stripstring=echo $tostrip \ | awk 'BEGIN {FS="\n"; RS=" "} {print "--set-text-frame=" $1 ": "}' First pass copies any v1.x tags to v2.3 and strips unwanted tag data. Second pass removes v1.x tags, since I don't like to use them. Without --no-tagging-time-frame, a new unwanted tag is added. :-) find . -iname "*.mp3" \ -exec eyeD3 --to-v2.3 --no-tagging-time-frame $stripstring {} \; \ -exec eyeD3 --remove-v1 --no-tagging-time-frame {} \; echo "Script complete!"

    Read the article

  • What do you think of this iterator syntax?

    - by ChaosPandion
    I've been working on an ECMAScript dialect for quite some time now and have reached a point where I am comfortable adding new language features. I would love to hear some thoughts and suggestions on the syntax. Example iterator Numbers { yield 1; yield 2; yield 3; if (true) { yield break; } yield continue iterator { yield 4; yield 5; yield 6; }; } Syntax IteratorDeclaration:     iterator  Identifier  {  IteratorBody  } IteratorExpression:     iterator  Identifieropt  {  IteratorBody  } IteratorBody:     IteratorStatementsopt IteratorStatements:     IteratorStatement IteratorStatementsopt IteratorStatement:     Statement but not one of BreakStatement ContinueStatement ReturnStatement     YieldStatement     YieldBreakStatement     YieldContinueStatement YieldStatement:     yield  Expression  ; YieldBreakStatement:     yield  break  ; YieldContinueStatement:     yield  continue  Expression  ;

    Read the article

  • What&rsquo;s new in MVVM Light V3

    - by Laurent Bugnion
    V3 of the MVVM Light Toolkit was released during MIX10, after quite a long alpha stage. This post lists the new features in MVVM Light V3. Compatibility MVVM Light Toolkit V3 can be installed for the following tools and framework versions: Visual Studio 2008 SP1, Expression Blend 3 Windows Presentation Foundation 3.5 SP1 Silverlight 3 Visual Studio 2010 RC, Expression Blend 4 beta Windows Presentation Foundation 3.5 SP1 Windows Presentation Foundation 4 RC Silverlight 3 Silverlight 4 RC For more information about installing the MVVM Light Toolkit V3, please visit this page. For cleaning up existing installation, see this page. New in V3 RTM The following features have been added after V3 alpha3: Project template for the Windows Phone 7 series (Silverlight) This new template allows you to create a new MVVM Light application in Visual Studio 2010 RC and to run it in the Windows Phone 7 series emulator. This template uses the Silverlight 3 version of the MVVM Light Toolkit V3. At this time, only the essentials features of the GalaSoft.MvvmLight.dll assembly are supported on the phone. New in V3 alpha3 The following features have been added after V3 alpha2: New logo An awesome logo has been designed for MVVM Light by Philippe Schutz. DispatcherHelper class (in GalaSoft.MvvmLight.Extras.dll) This class is useful when you work on multi-threaded WPF or Silverlight applications. Initializing: The DispatcherHelper class must be initialized in the UI thread. For example, you can initialize the class in a Silverlight application’s Application_Startup event handler, or in the WPF application’s static App constructor (in App.xaml). // Initializing in Silverlight (in App.xaml) private void Application_Startup( object sender, StartupEventArgs e) { RootVisual = new MainPage(); DispatcherHelper.Initialize(); } // Initializing in WPF (in App.xaml) static App() { DispatcherHelper.Initialize(); } Verifying if a property exists The ViewModelBase.RaisePropertyChanged method now checks if a given property name exists on the ViewModel class, and throws an exception if that property cannot be found. This is useful to detect typos in a property name, for example during a refactoring. Note that the check is only done in DEBUG mode. Replacing IDisposable with ICleanup The IDisposable implementation in the ViewModelBase class has been marked obsolete. Instead, the ICleanup interface (and its Cleanup method) has been added. Implementing IDisposable in a ViewModel is still possible, but must be done explicitly. IDisposable in ViewModelBase was a bad practice, because it supposes that the ViewModel is garbage collected after Dispose is called. instead, the Cleanup method does not have such expectation. The ViewModelLocator class (created when an MVVM Light project template is used in Visual Studio or Expression Blend) exposes a static Cleanup method, which should in turn call each ViewModel’s Cleanup method. The ViewModel is free to override the Cleanup method if local cleanup must be performed. Passing EventArgs to command with EventToCommand The EventToCommand class is used to bind any event to an ICommand (typically on the ViewModel). In this case, it can be useful to pass the event’s EventArgs parameter to the command in the ViewModel. For example, for the MouseEnter event, you can pass the MouseEventArgs to a RelayCommand<MouseEventArgs> as shown in the next listings. Note: Bringing UI specific classes (such as EventArgs) into the ViewModel reduces the testability of the ViewModel, and thus should be used with care. Setting EventToCommand and PassEventArgsToCommand: <Grid x:Name="LayoutRoot"> <i:Interaction.Triggers> <i:EventTrigger EventName="MouseEnter"> <cmd:EventToCommand Command="{Binding MyCommand}" PassEventArgsToCommand="True" /> </i:EventTrigger> </i:Interaction.Triggers> </Grid> Getting the EventArgs in the command public RelayCommand<MouseEventArgs> MyCommand { get; private set; } public MainViewModel() { MyCommand = new RelayCommand<MouseEventArgs>(e => { // e is of type MouseEventArgs }); } Changes to templates Various changes have been made to project templates and item templates to make them more compatible with Silverlight 4 and to improve their visibility in Visual Studio and Expression Blend. Bug corrections When a message is sent through the Messenger class using the method Messenger.Default.Send<T>(T message, object token), and the token is a simple value (for example int), the message was not sent correctly. This bug is now corrected. New in V3 The following features have been added after V2. Sending messages with callback Certain classes have been added to the GalaSoft.MvvmLight.Messaging namespace, allowing sending a message and getting a callback from the recipient. These classes are: NotificationMessageWithCallback: Base class for messages with callback. NotificationMessageAction: A class with string notification, and a parameterless callback. NotificationMessageAction<T>: A class with string notification, and a callback with a parameter of type T. To send a message with callback, use the following code: var message = new NotificationMessageAction<bool>( "Hello world", callbackMessage => { // This is the callback code if (callbackMessage) { // ... } }); Messenger.Default.Send(message); To register and receive a message with callback, use the following code: Messenger.Default.Register<NotificationMessageAction<bool>>( this, message => { // Do something // Execute the callback message.Execute(true); }); Messenger.Default can be overriden The Messenger.Default property can also be replaced, for example for unit testing purposes, by using the Messenger.OverrideDefault method. All the public methods of the Messenger class have been made virtual, and can be overridden in the test messenger class. Sending messages to interfaces In V2, it was possible to deliver messages targeted to instances of a given class. in V3 it is still possible, but in addition you can deliver a message to instances that implement a certain interface. The message will not be delivered to other recipients. Use the overload Messenger.Default.Send<TMessage, TTarget>(TMessage message) where TTarget is, in fact, an interface (for example IDisposable). Of course the recipient must register to receive the type of message TMessage. Sending messages with a token Messages can now be sent through the Messenger with a token. To send a message with token, use the method overload Send<TMessage>(TMessage message, object token). To receive a message with token, use the methods Register<TMessage>(object recipient, object token, Action<TMessage> action) or Register<TMessage>(object recipient, object token, bool receiveDerivedMessagesToo, Action<TMessage> action) The token can be a simple value (int, string, etc…) or an instance of a class. The message is not delivered to recipients who registered with a different token, or with no token at all. Renaming CommandMessage to NotificationMessage To avoid confusion with ICommand and RelayCommand, the CommandMessage class has been renamed to NotificationMessage. This message class can be used to deliver a notification (of type string) to a recipient. ViewModelBase constructor with IMessenger The ViewModelBase class now accepts an IMessenger parameter. If this constructor is used instead of the default empty constructor, the IMessenger passed as parameter will be used to broadcast a PropertyChangedMessage when the method RaisePropertyChanged<T>(string propertyName, T oldValue, T newValue, bool broadcast) is used. In the default ViewModelBase constructor is used, the Messenger.Default instance will be used instead. EventToCommand behavior The EventToCommand behavior has been added in V3. It can be used to bind any event of any FrameworkElement to any ICommand (for example a RelayCommand located in the ViewModel). More information about the EventToCommand behavior can be found here and here. Updated the project templates to remove the sample application The project template has been updated to remove the sample application that was created every time that a new MVVM Light application was created in Visual Studio or Blend. This makes the creation of a new application easier, because you don’t need to remove code before you can start writing code. Bug corrections Some bugs that were in Version 2 have been corrected: In some occasions, an exception could be thrown when a recipient was registered for a message at the same time as a message was received. New names for DLLs If you upgrade an existing installation, you will need to change the reference to the DLLs in C:\Program Files\Laurent Bugnion (GalaSoft)\Mvvm Light Toolkit\Binaries. The assemblies have been moved, and the versions for Silverlight 4 and for WPF4 have been renamed, to avoid some confusion. It is now easier to make sure that you are using the correct DLL. WPF3.5SP1, Silverlight 3 When using the DLLs, make sure that you use the correct versions. WPF4, Silverlight 4 When using the DLLs, make sure that you use the correct versions.   Laurent Bugnion (GalaSoft) Subscribe | Twitter | Facebook | Flickr | LinkedIn

    Read the article

  • Multiline Replacement With Visual Studio

    - by Alois Kraus
    I had to remove some file headers in a bigger project which were all of the form #region File Header /*[ Compilation unit ----------------------------------------------------------       Name            : Class1.cs       Language        : C#     Creation Date   :      Description     : -----------------------------------------------------------------------------*/ /*] END */ #endregion I know that would be a cool thing to write a simple C# program use a recursive file search, read all lines skip the first n lines and write the files back to disc. But I wanted to test things first before I ruin my source files with one little typo. There comes the Visual Studio Search and Replace in Files dialog into the game. I can test my regular expression to do a multiline match with the Find button before actually breaking anything. And if something goes wrong I have the Undo button.   There is a nice blog post from Paulo Morgado online who deals with Multiline Regular expressions. The Visual Studio Regular expressions are non standard so you have to adapt your usual Regex know how to the other patterns. The pattern I cam finally up with is \#region File Header:b*(.*\n)@\#endregion The Regular expression can be read as \#region File Header Match “#region File Header” \# Escapes the # character since it is a quantifier. :b* After this none or more spaces or tabs can follow (:b stands for space or tab) (.*\n)@ Match anything across lines in a non greedy way (the @ character makes it non greedy) to prevent matching too much until the #endregion somewhere in our source file. \#endregion Match everything until “#endregion” is found I had always knew that Visual Studio can do it but I never bothered to learn the non standard Regex syntax. This is powerful and it is inside Visual Studio since 2005!

    Read the article

  • Groovy Debugging

    - by Vijay Allen Raj
    Groovy Debugging - An Overview:ADF BC developers may express snippets of business logic (like the following) as embedded groovy expressions: default / calculated attribute valuesvalidation rules / conditionserror message tokensLOV input values (VO) This approach has the advantages that: Groovy has a compact, EL-like syntax for expressing simple logicADF has extended this syntax to provide useful built-insembedded Groovy expressions are customizableGroovy debugging support helps improve maintainability of business logic expressed in Groovy.Following is an example how groovy debugging works.Example:This example shows how a script expression validator can be created and the groovy script debugged. It shows Step over, breakpoint functionalities as well as syntax coloring.Let us create a ADFBC application based on Emp and Dept tables, and add a script expression validator based on the script:  if (Sal >= 5000){ //If EmpSal is greater than a property value set on the custom //properties on the root AM //raise a custom exception else raise a custom warning if (Sal >= source.DBTransaction.rootApplicationModule.propertiesMap.salHigh) { adf.error.raise("ExcGreaterThanApplicationLimit"); } else { adf.error.warn("WarnGreaterThan5000"); } } else if (EmpSal <= 1000) { adf.error.raise("ExcTooLow"); }return true;In the Emp.xml Flat editor, place breakpoints at various locations as shown below:Right click the appmodule and click Debug. Enter a value greater than 5000 and click next. You can see the debugging work as shown below:  The code can be also be stepped over and debugged.

    Read the article

  • Yet Another Way To Create An Object

    - by Ricardo Peres
    After I wrote this post, I come up with yet another way to create an object... Here it is: Stopwatch watch = new Stopwatch(); ConstructorInfo ci = typeof(StringBuilder).GetConstructor(new Type[0]); NewExpression expr = Expression.New(ci); Func<StringBuilder> func = Expression.Lambda(typeof(Func<StringBuilder>), expr).Compile() as Func<StringBuilder>; watch.Start(); for (Int32 i = 0; i < 100; ++i) { StringBuilder builder = func(); } Int64 time4 = watch.ElapsedTicks; watch.Reset(); I know of only one other way, which is by using CodeDOM. If you know of any other ways to create an object, let me know! SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/2.0.320/scripts/clipboard.swf'; SyntaxHighlighter.brushes.CSharp.aliases = ['c#', 'c-sharp', 'csharp']; SyntaxHighlighter.all();

    Read the article

  • How or why would this mechanic (not) work to bring game balance to a singleplayer RPG? [closed]

    - by 0xFFF1
    Mechanic details The player, the monsters, and the merchants act as three separate parties. The player needs to beat up monsters for exp points and resources to sell and to buy potions from merchants to continue to fight. The monsters need healing and reviving to survive (also bought from merchants) and the merchants need potion ingredients from the player and the monsters to make potions to sell. These potions are only able to be processed in such bulk by merchants thus their potions would be cheaper than making them yourself. Only the monsters can farm ingredients in bulk. Only the player is or has to be overly aggressive (in bulk). Monsters can farm and produce "Level up candies" that do the work of exp. they are eaten right away after they are made and are never stockpiled or held for fear of the player and merchants who want to sell to the player. The monsters will defend themselves. Reviving is very expensive. The merchants can be found either with a concerned expression or a grinning expression based on how much profit they are making compared to their morale standing. The economies of each monster town and merchant city are distinct but interconnected. Magic Swords are worth a lot. So what I need to know is what concerns would there be to design a game around this mechanic and/or design this mechanic around a developing game. which would fare better? Is game balance an issue here? (how strong the monsters get or how quickly they die off based on the player's input into the system), Or is game balance solely in the hands of the player? (he decides if he overkills monsters or get underleveled.) What do I need to think about to make sure it isn't too easy or too hard to swing the amount/strength of monsters compared to the player and the amount of profit the merchants get vs the player. Would indicating how out of whack things are getting in game help with this?

    Read the article

  • Microsoft and innovation: IIF() method

    This Saturday I was watching a couple of eLearning videos from TrainSignal (thanks to the subscription I have with Pluralsight) on Querying Microsoft SQL Server 2012 (exam 70-461). 'Innovation' by Microsoft I kept myself busy learning 'new' things about Microsoft SQL Server 2012 and some best practices. It was incredible 'innovative' to see that there is an additional logic function called IIF() available now: Returns one of two values depending on the value of a logical expression. IIF(lExpression, eExpression1, eExpression2) Ups, my bad... That's actually taken from the syntax page of Visual FoxPro 9.0 SP 2. And tada, at least seven (7+) years later, there's the recent IIF() Transact-SQL version of that function: Returns one of two values, depending on whether the Boolean expression evaluates to true or false in SQL Server 2012. IIF ( boolean_expression, true_value, false_value ) Now, that's what I call innovation! But we all know what happened to Visual FoxPro... It has been reincarnated in form of Visual Studio LightSwitch (and SQL Server). Enough ranting... Happy coding!

    Read the article

  • Code &amp; Slides &ndash; SDE &ndash; What&rsquo;s new in Silverlight 4

    - by Timmy Kokke
    Last Tuesday the Software Developers Network – SDN organized another SDE. I’ve had the opportunity to present a session about Silverlight 4. I talked about lots of new features in Silverlight 4 and Expression Blend 4, focused on the Out-Of-Browser features.     The slides of my presentation can be downloaded here.   In my presentation I demonstrated a couple of features from my new pet project “SilverAmp”. This project is based on the legendary WinAmp, but made entirely in Silverlight. I use it to try out many new Silverlight 4 features. It’s not finished yet, but useful already. It runs outside the browser with elevated trust. It reads your local MyMusic folder and uses the TagLib library to read the ID3 tags of the mp3s it finds. SilverAmp is using MEF for extensibility. It uses a custom Window Chrome, designed in Expression Design. And it shows a notification window when a new song starts to play.   In the future it is going to get song information from Last.FM, will be able to show YouTube videos inside itself and it will tweet about what you are playing. The project will be fully documented to function as a reference implementation for the new Silverlight 4 features.   You can download the source on  http://SilverAmp.codeplex.com   Below are two screenshot of SilverAmp.                     If you have any questions, comments,  issues or feature requests let me know.

    Read the article

  • Using position function for accessing particular node when using While Activity in SOA 11.1.1.5

    - by AJ
    Hi If you are using while activity in SOA Suite 11.1.1.5 and within loop you have a requirement to access repeating node of XML. You might need to use below XPATH expression for accessing the node. Here is the XML that I am using for this example <?xml version='1.0' encoding='UTF-8'?> David DemoJob 1 2012-04-15 40000 0 10 Steve TestJob 1 2012-04-15 40000 0 10 Here you can notice that Emp node is repeating i.e. EmpCollection node will contain multiple employees. Now in loop one of assign activity you need to access a particular node for e.g. For first time loop runs you want to access first node and second time second node and so on. You need to make use of postion() function like bpws:getVariableData('Receive1_Read_InputVariable','body','/ns4:EmpCollection/ns4:Emp[position()=$loopCounter]/ns4:job') Please Note: Here loopCounter is a variable that we have created of type xsd:int and prior to loop we have initialized a value of 1. Loop will run depending on the number of Emp nodes present at runtime. For that in while Activity you can use below XPATH expression ora:countNodes('Receive1_Read_InputVariable','body','/ns4:EmpCollection/ns4:Emp')=bpws:getVariableData('loopCounter') Do let me know in case of any issues or concern. Cheers AJ

    Read the article

  • Oracle Identity Manager ADF Customization

    - by Arda Eralp
    This blog entry includes an example about customization Oracle Identity Manager (OIM) Self Service screen. Before customization all users that can be logged in OIM Self Service can see "Administration" tab on left menu. On this example we create "Managers" role and only users that have managers role can see "Administration" tab. Step 1: Create "Manager" role  Step 2: Create Sandbox  Step 3: Customize ADF Select "Customize" on the top menu Select "Source" instead of "Design" on top  Select "Administration" tab with blue rectangle and edit component Edit "visible" with expression builder #{oimcontext.currentUser.roles['Manager'] != null} Apply Step 4: Apply to All and Publish sandbox Notes:  This table objects can use for expression. Objects Description #{oimcontext.currentUser['ATTRIBUTE_NAME']} #{oimcontext.currentUser['UDF_NAME']} #{oimcontext.currentUser.roles} #{oimcontext.currentUser.roles['SYSTEM ADMINISTRATORS'] != null} Boolean #{oimcontext.currentUser.adminRoles['OrclOIMSystemAdministrator'] != null} Boolean

    Read the article

  • Can higher-order functions in FP be interpreted as some kind of dependency injection?

    - by Giorgio
    According to this article, in object-oriented programming / design dependency injection involves a dependent consumer, a declaration of a component's dependencies, defined as interface contracts, an injector that creates instances of classes that implement a given dependency interface on request. Let us now consider a higher-order function in a functional programming language, e.g. the Haskell function filter :: (a -> Bool) -> [a] -> [a] from Data.List. This function transforms a list into another list and, in order to perform its job, it uses (consumes) an external predicate function that must be provided by its caller, e.g. the expression filter (\x -> (mod x 2) == 0) [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] selects all even numbers from the input list. But isn't this construction very similar to the pattern illustrated above, where the filter function is the dependent consumer, the signature (a -> Bool) of the function argument is the interface contract, the expression that uses the higher-order is the injector that, in this particular case, injects the implementation (\x -> (mod x 2) == 0) of the contract. More in general, can one relate higher-order functions and their usage pattern in functional programming to the dependency injection pattern in object-oriented languages? Or in the inverse direction, can dependency injection be compared to using some kind of higher-order function?

    Read the article

  • Using visitor pattern with large object hierarchy

    - by T. Fabre
    Context I've been using with a hierarchy of objects (an expression tree) a "pseudo" visitor pattern (pseudo, as in it does not use double dispatch) : public interface MyInterface { void Accept(SomeClass operationClass); } public class MyImpl : MyInterface { public void Accept(SomeClass operationClass) { operationClass.DoSomething(); operationClass.DoSomethingElse(); // ... and so on ... } } This design was, however questionnable, pretty comfortable since the number of implementations of MyInterface is significant (~50 or more) and I didn't need to add extra operations. Each implementation is unique (it's a different expression or operator), and some are composites (ie, operator nodes that will contain other operator/leaf nodes). Traversal is currently performed by calling the Accept operation on the root node of the tree, which in turns calls Accept on each of its child nodes, which in turn... and so on... But the time has come where I need to add a new operation, such as pretty printing : public class MyImpl : MyInterface { // Property does not come from MyInterface public string SomeProperty { get; set; } public void Accept(SomeClass operationClass) { operationClass.DoSomething(); operationClass.DoSomethingElse(); // ... and so on ... } public void Accept(SomePrettyPrinter printer) { printer.PrettyPrint(this.SomeProperty); } } I basically see two options : Keep the same design, adding a new method for my operation to each derived class, at the expense of maintainibility (not an option, IMHO) Use the "true" Visitor pattern, at the expense of extensibility (not an option, as I expect to have more implementations coming along the way...), with about 50+ overloads of the Visit method, each one matching a specific implementation ? Question Would you recommand using the Visitor pattern ? Is there any other pattern that could help solve this issue ?

    Read the article

  • How to Edit aspx, Cshtml and other kind of files live on FTP server ?

    - by Anirudha
    Originally posted on: http://geekswithblogs.net/anirugu/archive/2013/06/27/how-to-edit-aspx-cshtml-and-other-kind-of-files.aspxMany time we just want to make a small changes on site and we don’t want to download the whole project again. In this post I will show you some good way to do it.   People who have Expression Web 4 can do it. I tried it and it’s work good with aspx file. If you have site in asp.net and use aspx engine then this is a good option. Well, Expression Web is free (previously paid software). A another good option is Komodo Edit. You can use komodo edit and few plugin to make FTP editing work for you. The problem in these 2 apps are they don’t have syntax highlight and support for CSHTML file which are introduced with MVC 3. For this I suggest you to go with webmatrix. You can use Webmatrix to edit cshtml file online. Remember that Webmatrix don’t support Compiling of MVC project. You need Visual Web developer Express at-least to compile your project. if you are in hurry try  https://c9.io/ put your FTP settings and you just got your hands ready to make changes on live site. If you have anything else in your mind share it here.

    Read the article

  • freeFTPd and scp/sshfs

    - by singpolyma
    When I connect to freeFTPd using the CLI 'sftp' client from my Ubuntu system, it works find. Unfortunately, that client sucks at downloading whole directory trees. So I tried to use scp and I get "exec request failed on channel 0" So I tried sshfs. I can browse the directory structure, but it lists the files and says they do not exist. The freeFTPd server logs have no useful information.

    Read the article

  • Looking for old version of JBuilder

    - by mtgrares
    I'm looking for any of these versions:JBuilder 3-9. The reason for this is because my computer is old (256 MB, 800 Mhz cpu) but I still like to program. (Yes, I should upgrade my computer but greenbacks don't grow on trees.) And to prove that I really do program, I have an open source project where you play the trading card game Magic: The Gathering against the computer, http://code.google.com/p/cardforge The latest version was downloaded 1,862 times. Thanks for your time, mtgrares

    Read the article

  • Explode all folders

    - by sam
    Ive got a folder with about a hundred sub folders and again each ones of those has between 10 and 20 sub folders, so all in all a pretty large folder tree. Is there a simple way i can explode or export all of the files in the tree to a new folder which will just be one folder contain the files (no folders, no trees). Im running OSX 10.8, although ive also got Parallels so if there is a windows solution i could just run that as its not something i need to do everyday.

    Read the article

  • Looking for old version of JBuilder

    - by mtgrares
    I'm looking for any of these versions:JBuilder 3-9. The reason for this is because my computer is old (256 MB, 800 Mhz cpu) but I still like to program. (Yes, I should upgrade my computer but greenbacks don't grow on trees.) And to prove that I really do program, I have an open source project where you play the trading card game Magic: The Gathering against the computer, http://code.google.com/p/cardforge The latest version was downloaded 1,862 times.

    Read the article

  • Mass Checksumming tool for Windows?

    - by Daniel Magliola
    Hi, I'm looking for a command line tool for windows that will go over a directory tree (recursively) and output a list of all the files in there, and a checksum for each file (can be CRC, MD5, whatever). Esentially, what I want is to compare 2 big directory trees in 2 machines. I'm planning to take the outputs of running this tool in both, and diffing them to make sure they're identical. I appreciate any ideas.

    Read the article

  • How do i return integers from a string ?

    - by kannan.ambadi
    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Suppose you are passing a string(for e.g.: “My name has 1 K, 2 A and 3 N”)  which may contain integers, letters or special characters. I want to retrieve only numbers from the input string. We can implement it in many ways such as splitting the string into an array or by using TryParse method. I would like to share another idea, that’s by using Regular expressions. All you have to do is, create an instance of Regular Expression with a specified pattern for integer. Regular expression class defines a method called Split, which splits the specified input string based on the pattern provided during object initialization.     We can write the code as given below:   public static int[] SplitIdSeqenceValues(object combinedArgs)         {             var _argsSeperator = new Regex(@"\D+", RegexOptions.Compiled);               string[] splitedIntegers = _argsSeperator.Split(combinedArgs.ToString());               var args = new int[splitedIntegers.Length];               for (int i = 0; i < splitedIntegers.Length; i++)                 args[i] = MakeSafe.ToSafeInt32(splitedIntegers[i]);                           return args;         }    It would be better, if we set to RegexOptions.Compiled so that the regular expression will have performance boost by faster compilation.   Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Happy Programming  :))   

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >