Search Results

Search found 312 results on 13 pages for 'benjamin roux'.

Page 1/13 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Utilisez WCF Data Services 1.5 avec Silverlight, par Benjamin Roux

    Citation: Cet article vous présentera comment utiliser Silverlight et WCF Data Services 1.5. Premièrement, pourquoi utiliser Data Services 1.5 ? Tout simplement parce que l'intégration avec Silverlight est grandement améliorée (INotifyPropertyChanged et ObservableCollection, Two-way binding.). c'est par ici N'hésitez pas à laisser vos commentaires ici même

    Read the article

  • Developing Essbase Applications de Cameron Lackpour, critique par Sébastien Roux

    Bonjour La rédaction de DVP a lu pour vous l'ouvrage suivant: Developing Essbase Applications - Advanced Techniques for Finance and IT Professionals de Dave Anderson, Joe Aultman, John Booth, Gary Crisci, Natalie Delemar, Dave Farnsworth, Michael Nader, Dan Pressman, Rob Salzmann, Tim Tow, Jake Turrell et Angela Wilcox, sous la direction de Cameron Lackpour paru aux Editions Auerbach Publications [IMG]http://images-eu.amazon.com/images/P/1466553308.01.LZZZZZZZ.jpg[/IMG] L'avez-vous lu ? Comptez-vous le lire bientô...

    Read the article

  • AVG Rescue CD : détecter des virus sans recourir à votre OS, Par Poinsot Benjamin

    Bonjour, je partage avec vous aujourd'hui mon dernier article en date, à savoir AVG Rescue CD : détecter des virus sans recourir à votre OS. Vous pouvez le consulter à cette adresse : http://bpoinsot.developpez.com/tutor...avg-rescue-cd/. Synopsis : Citation: AVG Rescue CD offre la possibilité de réaliser un scan antivirus de votre ordinateur depuis une distribution Linux de type LiveCD. Ainsi, vous profitez de la...

    Read the article

  • WCF RIA Services : une approche pragmatique, par Benjamin Devuyst

    Bonjour, J'ai terminé un tutoriel abordant l'utilisation de Wcf Ria Services à travers Silverlight. Ce tutoriel a pour but de décrire les étapes à suivre pour mettre en place RIA, mais en tenant compte de l'expérience acquise au cours de ces derniers mois (réalisation de projets qui utilisent RIA). Il aborde donc la technologie et expose les solutions mises en place pour faciliter les phases de développement (gestion des erreurs, conflits, classe partielle pour définir le "DomainService", etc.). Il s'agit, en quelque sorte, d'ébauches de "bonnes conduites" (en toute modestie) qui ont facilité le développement des logiciels. Le tutoriel est disponible ici :

    Read the article

  • Windows Server 2008 administration et exploitation, de Philippe Freddi, critique par Benjamin Poinsot

    Bonjour, j'ai lu pour vous l'ouvrage Windows Server 2008 - Administration et exploitation de Philippe FREDDI. [IMG]http://images-eu.amazon.com/images/P/2746059371.08.LZZZZZZZ.jpg[/IMG] Citation: Ce livre sur Windows Server 2008 s´adresse à un public d´informaticiens désireux de monter en compétences sur l'administration quotidienne de ce système d'exploitation. Chaque chapitre débute par une introduction sur le sujet puis propose une approche pas à pas pour sa maîtrise. Dès le début du livre l´auteur invit...

    Read the article

  • How can MySQL be in GDAL's dependencies when it's already installed?

    - by Julien Fouilhé
    I'm trying to install GDAL on my CentOS 64 bits server to be able to make some GIS operations. I tried a simple: # yum install gdal First, the GDAL version is 1.4 (the last released one is 1.9) Then, I see in the dependencies list mysql. But I have mysql already installed, from another repository (remi), with a newer version than the one suggested by yum... Is it a problem of architecture (yum suggests i386)? I risked a yes, but still impossible to install it! Here's the error I have. Transaction Check Error: package mysql-5.5.28-1.el5.remi.x86_64 (which is newer than mysql-5.0.95-1.el5_7.1.i386) is already installed Then, I tried to install it from sources with last version available (1.9.2). I downloaded the GDAL tar.gz, extracted the files and installed it like following: # tar -xzf gdal-1.9.2.tar.gz # ./configure --with-static-proj4=/usr/local/lib --with-threads --with-libtiff=internal --with-geotiff=internal --with-jpeg=internal --with-gif=internal --with-png=internal --with-libz=internal # make # make install But during the make, I have some strange errors displaying, about RegisterOGRMySQL, that I can't understand: chmod a+x gdal-config /bin/sh /home/benjamin/gdal-1.9.2/libtool --mode=link g++ gdalinfo.lo /home/benjamin/gdal-1.9.2/libgdal.la -o gdalinfo libtool: link: g++ .libs/gdalinfo.o -o .libs/gdalinfo /home/benjamin/gdal-1.9.2/.libs/libgdal.so -L/usr/local/lib/lib -L/usr/kerberos/lib64 -lproj -lsqlite3 /usr/lib64/libexpat.so -lpthread -lrt -lcurl -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/lib64 /home/benjamin/gdal-1.9.2/.libs/libgdal.so: undefined reference to `RegisterOGRMySQL' collect2: ld returned 1 exit status make[1]: *** [gdalinfo] Error 1 make[1]: Leaving directory `/home/benjamin/gdal-1.9.2/apps' make: *** [apps-target] Error 2 Has anyone a solution? Thanks a lot!

    Read the article

  • Why can't I set boolean columns with update?

    - by Benjamin Oakes
    I'm making a user administration page. For the system I'm creating, users need to be approved. Sometimes, there will be many users to approve, so I'd like to make that easy. I'm storing this as a boolean column called approved. I remembered the Edit Multiple Individually Railscast and thought it would be a great fit. However, I'm running into problems which I traced back to ActiveRecord::Base#update. update works fine in this example: >> User.all.map(&:username) => ["ben", "fred"] >> h = {"1"=>{'username'=>'benjamin'}, "2"=>{"username"=>'frederick'}} => {"1"=>{"username"=>"benjamin"}, "2"=>{"username"=>"frederick"}} >> User.update(h.keys, h.values) => ... >> User.all.map(&:username) => ["benjamin", "frederick"] But not this one: >> User.all.map(&:approved) => [true, nil] >> h = {"1"=>{'approved'=>'1'}, "2"=>{'approved'=>'1'}} >> User.update(h.keys, h.values) => ... >> User.all.map(&:approved) => [true, nil] Chaging from '1' to true didn't make a difference when I tested. What am I doing wrong?

    Read the article

  • Editor's Notebook - Social Aura: Insights from the Oracle Social Media Summit

    - by user462779
    Panelists talk social marketing at the Oracle Social Media Summit On November 14, I traveled to Las Vegas for the first-ever Oracle Social Media Summit. The two day event featured an impressive collection of social media luminaries including: David Kirkpatrick (founder and CEO of Techonomy Media and author of The Facebook Effect), John Yi (Head of Marketing Partnerships, Facebook), Matt Dickman (EVP of Social Business Innovation, Weber Shandwick), and Lyndsay Iorio (Social Media & Communications Manager, NBC Sports Group) among others. It was also a great opportunity to talk shop with some of our new Vitrue and Involver colleagues who have been returning great social media results even before their companies were acquired by Oracle. I was live tweeting the event from @OracleProfit which was great for those who wanted to follow along with the proceedings from the comfort of their office or blackjack table. But I've also found over the years that live tweeting an event is a handy way to take notes: I can sift back through my record of what people said or thoughts I had at the time and organize the Twitter messages into some kind of summary account of the proceedings. I've had nearly a month to reflect on the presentations and conversations at the event and a few key topics have emerged: David Kirkpatrick's comment during the opening presentation really set the stage for the conversations that followed. Especially if you are a marketer or publisher, the idea that you are in a one-way broadcast relationship with your audience is a thing of the past. "Rising above the noise" does not mean reaching for a megaphone, ALL CAPS, or exclamation marks. Hype will not motivate social media denizens to do anything but unfollow and tune you out. But knowing your audience, creating quality content and/or offers for them, treating them with respect, and making an authentic effort to please them: that's what I believe is now necessary. And Kirkpatrick's comment early in the day really made the point. Later in the day, our friends @Vitrue demonstrated this point by elaborating on a comment by Facebook's John Yi. If a social strategy is comprised of nothing more than cutting/pasting the same message into different social media properties, you're missing the opportunity to have an actual conversation. That's not shouting at your audience, but it does feel like an empty gesture. Walter Benjamin, perplexed by auraless Twitter messages Not to get too far afield, but 20th century cultural critic Walter Benjamin has a concept that is useful for understanding the dynamics of the empty social media gesture: Aura. In his work The Work of Art in the Age of Mechanical Reproduction, Benjamin struggled to understand the difference he percieved between the value of a hand-made art object (a painting, wood cutting, sculpture, etc.) and a photograph. For Benjamin, aura is similar to the "soul" of an artwork--the intangible essence that is created when an artist picks up a tool and puts creative energy and effort into a work. I'll defer to Wikipedia: "He argues that the "sphere of authenticity is outside the technical" so that the original artwork is independent of the copy, yet through the act of reproduction something is taken from the original by changing its context. He also introduces the idea of the "aura" of a work and its absence in a reproduction." So make sure you put aura into your social interactions. Don't just mechanically reproduce them. Keeping aura in your interactions requires the intervention of an actual human being. That's why @NoahHorton's comment about content curation struck me as incredibly important. Maybe it's just my own prejudice, being in the content curation business myself. And it's not to totally discount machine-aided content management systems, content recommendation engines, and other tech-driven tools for building an exceptional content experience. It's just that without that human interaction--that editor who reviews the analytics and responds to user feedback--interactions over social media feel a bit empty. It is SOCIAL media, right? (We'll leave the conversation about social machines for another day). At the end of the day, experimentation is key. Just like trying to find that right joke to tell at the beginning of your presentation or that good opening like at a cocktail party, social media messages and interactions can take some trial and error. Don't be afraid to try things, tinker with incomplete ideas, abandon things that don't work, and engage in the conversation. And make sure your heart is in it, otherwise your audience can tell. And finally:

    Read the article

  • [Silverlight] Suggestion – Move INotifyCollectionChanged from System.Windows.dll to System.dll

    - by Benjamin Roux
    I just submitted a suggestion on Microsoft Connect to move the INotifyCollectionChanged from System.Windows.dll to System.dll. You can review it here: https://connect.microsoft.com/VisualStudio/feedback/details/560184/move-inotifycollectionchanged-from-system-windows-dll-to-system-dll Here’s the reason why I suggest that. Actually I wanted to take advantages of the new feature of Silverlight/Visual Studio 2010 for sharing assemblies (see http://blogs.msdn.com/clrteam/archive/2009/12/01/sharing-silverlight-assemblies-with-net-apps.aspx). Everything went fine until I try to share a custom collection (with custom business logic) implementing INotifyCollectionChanged. This modification has been made in the .NET Framework 4 (see https://connect.microsoft.com/VisualStudio/feedback/details/488607/move-inotifycollectionchanged-to-system-dll) so maybe it could be done in Silverlight too. If you think this is justifiable you can vote for it.

    Read the article

  • [Windows 8] Update TextBox’s binding on TextChanged

    - by Benjamin Roux
    Since UpdateSourceTrigger is not available in WinRT we cannot update the text’s binding of a TextBox at will (or at least not easily) especially when using MVVM (I surely don’t want to write behind-code to do that in each of my apps !). Since this kind of demand is frequent (for example to disable of button if the TextBox is empty) I decided to create some attached properties to to simulate this missing behavior. namespace Indeed.Controls { public static class TextBoxEx { public static string GetRealTimeText(TextBox obj) { return (string)obj.GetValue(RealTimeTextProperty); } public static void SetRealTimeText(TextBox obj, string value) { obj.SetValue(RealTimeTextProperty, value); } public static readonly DependencyProperty RealTimeTextProperty = DependencyProperty.RegisterAttached("RealTimeText", typeof(string), typeof(TextBoxEx), null); public static bool GetIsAutoUpdate(TextBox obj) { return (bool)obj.GetValue(IsAutoUpdateProperty); } public static void SetIsAutoUpdate(TextBox obj, bool value) { obj.SetValue(IsAutoUpdateProperty, value); } public static readonly DependencyProperty IsAutoUpdateProperty = DependencyProperty.RegisterAttached("IsAutoUpdate", typeof(bool), typeof(TextBoxEx), new PropertyMetadata(false, OnIsAutoUpdateChanged)); private static void OnIsAutoUpdateChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { var value = (bool)e.NewValue; var textbox = (TextBox)sender; if (value) { Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>( o => textbox.TextChanged += o, o => textbox.TextChanged -= o) .Do(_ => textbox.SetValue(TextBoxEx.RealTimeTextProperty, textbox.Text)) .Subscribe(); } } } } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } The code is composed of two attached properties. The first one “RealTimeText” reflects the text in real time (updated after each TextChanged event). The second one is only used to enable the functionality. To subscribe to the TextChanged event I used Reactive Extensions (Rx-Metro package in Nuget). If you’re not familiar with this framework just replace the code with a simple: textbox.TextChanged += textbox.SetValue(TextBoxEx.RealTimeTextProperty, textbox.Text); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } To use these attached properties, it’s fairly simple <TextBox Text="{Binding Path=MyProperty, Mode=TwoWay}" ic:TextBoxEx.IsAutoUpdate="True" ic:TextBoxEx.RealTimeText="{Binding Path=MyProperty, Mode=TwoWay}" /> .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Just make sure to create a binding (in TwoWay) for both Text and RealTimeText. Hope this helps !

    Read the article

  • [WP7] How to decompile WP7 assemblies

    - by Benjamin Roux
    The other day I wanted to check the source code of the ScrollViewer of WP7. I started Reflector (profit while its still free) and I opened the System.Windows.dll assembly located at C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone. When Reflector did the job I was surprised to see that all the methods/properties were empty ! After some investigations, I found out that these assemblys are used by Visual Studio for the Intelisense (among others) and so, for develoment. The thing is I still couldn’t check the ScrollViewer’s source code. Finally after new investigations, I discovered a link on the XDA forum which provide the WP7 emulator dump. I downloaded it and decompiled the GAC_System.Windows_v2_0_5_0_cneutral_1.dll assembly located this time at /SYS/SILVERLIGHT. Et voila, the ScrollViewer’s source code is available. Hope this helps.

    Read the article

  • [Windows 8] Application bar buttons symbols

    - by Benjamin Roux
    During the development of my current Windows 8 application, I wanted to add custom application bar buttons with symbols that were not available in the StandardStyle.xaml file created with the template project. First I tried to Bing some new symbols and I found this blog post by Tim Heuer with the list of all symbols available (supposedly) but the one I wanted was not there (a heart). In this blog post I’m going the show you how to retrieve all the symbols available without creating a custom path. First you have to start the “Character map” tool and select “Segoe UI Symbol” then go at the end of the grid to see all the symbols available. When you want one just select it and copy it’s code inside the content of your Button. In my case I wanted a heart and its code is “E0A5”, so my button (or style in this case) became <Style x:Key="LoveAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}"> <Setter Property="AutomationProperties.AutomationId" Value="LoveAppBarButtonStyle"/> <Setter Property="AutomationProperties.Name" Value="Love"/> <Setter Property="Content" Value="&#xE0A5;"/> </Style> .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Et voila. Hope this will help you (there is A LOT of symbols")!

    Read the article

  • [Windows 8] Application bar popup button

    - by Benjamin Roux
    Here is a small control to create an application bar button which will display a content in a popup when the button is clicked. Visually it gives this So how to create this? First you have to use the AppBarPopupButton control below.   namespace Indeed.Controls { public class AppBarPopupButton : Button { public FrameworkElement PopupContent { get { return (FrameworkElement)GetValue(PopupContentProperty); } set { SetValue(PopupContentProperty, value); } } public static readonly DependencyProperty PopupContentProperty = DependencyProperty.Register("PopupContent", typeof(FrameworkElement), typeof(AppBarPopupButton), new PropertyMetadata(null, (o, e) => (o as AppBarPopupButton).CreatePopup())); private Popup popup; private SerialDisposable sizeChanged = new SerialDisposable(); protected override void OnTapped(Windows.UI.Xaml.Input.TappedRoutedEventArgs e) { base.OnTapped(e); if (popup != null) { var transform = this.TransformToVisual(Window.Current.Content); var offset = transform.TransformPoint(default(Point)); sizeChanged.Disposable = PopupContent.ObserveSizeChanged().Do(_ => popup.VerticalOffset = offset.Y - (PopupContent.ActualHeight + 20)).Subscribe(); popup.HorizontalOffset = offset.X + 24; popup.DataContext = this.DataContext; popup.IsOpen = true; } } private void CreatePopup() { popup = new Popup { IsLightDismissEnabled = true }; popup.Closed += (o, e) => this.GetParentOfType<AppBar>().IsOpen = false; popup.ChildTransitions = new Windows.UI.Xaml.Media.Animation.TransitionCollection(); popup.ChildTransitions.Add(new Windows.UI.Xaml.Media.Animation.PopupThemeTransition()); var container = new Grid(); container.Children.Add(PopupContent); popup.Child = container; } } } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } The ObserveSizeChanged method is just an extension method which observe the SizeChanged event (using Reactive Extensions - Rx-Metro package in Nuget). If you’re not familiar with Rx, you can replace this line (and the SerialDisposable stuff) by a simple subscription to the SizeChanged event (using +=) but don’t forget to unsubscribe to it ! public static IObservable<Unit> ObserveSizeChanged(this FrameworkElement element) { return Observable.FromEventPattern<SizeChangedEventHandler, SizeChangedEventArgs>( o => element.SizeChanged += o, o => element.SizeChanged -= o) .Select(_ => Unit.Default); } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } The GetParentOfType extension method just retrieve the first parent of type (it’s a common extension method that every Windows 8 developer should have created !). You can of course tweak to control (for example if you want to center the content to the button or anything else) to fit your needs. How to use this control? It’s very simple, in an AppBar control just add it and define the PopupContent property. <ic:AppBarPopupButton Style="{StaticResource RefreshAppBarButtonStyle}" HorizontalAlignment="Left"> <ic:AppBarPopupButton.PopupContent> <Grid> [...] </Grid> </ic:AppBarPopupButton.PopupContent> </ic:AppBarPopupButton> .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } When the button is clicked the popup is displayed. When the popup is closed, the app bar is closed too. I hope this will help you !

    Read the article

  • Should a developer create test cases and then run through test cases

    - by Eben Roux
    I work for a company where the development manager expects a developer to create test cases before writing any code. These test cases have to then be maintained by the developers. Every-so-often a developer will be expected to run through the test cases. From this you should be able to gather that the company in question is rather small and there are no testers. Coming from a Software Architect position and having to write / execute test cases wearing my 'tester' hat is somewhat of a shock to the system. I do it anyway but it does seem to be a rather expensive exercise :) EDIT: I seem to need to elaborate here: I am not talking about unit-testing, TDD, etc. :) I am talking about that bit of testing a tester does. Once I have developed a system (with my unit tests / tdd / etc.) the software goes through a testing phase. Should a developer be that tester and developer those test cases? I think the misunderstanding may stem from the fact that developers, typically, are not involved with this type of testing and, therefore, assumed I am referring to that testing we do do: unit testing. But alas, no. I hope that clears it up.

    Read the article

  • [Silverlight] How to watermark a WriteableBitmap with a text

    - by Benjamin Roux
    Hello, In my current project, I needed to watermark a WriteableBitmap with a text. As I couldn’t find anything I decided to create a small extension method to do so. public static class WriteableBitmapEx { /// <summary> /// Creates a watermark on the specified image /// </summary> /// <param name="input">The image to create the watermark from</param> /// <param name="watermark">The text to watermark</param> /// <param name="color">The color - default is White</param> /// <param name="fontSize">The font size - default is 50</param> /// <param name="opacity">The opacity - default is 0.25</param> /// <param name="hasDropShadow">Specifies if a drop shadow effect must be added - default is true</param> /// <returns>The watermarked image</returns> public static WriteableBitmap Watermark(this WriteableBitmap input, string watermark, Color color = default(Color), double fontSize = 50, double opacity = 0.25, bool hasDropShadow = true) { var watermarked = GetTextBitmap(watermark, fontSize, color == default(Color) ? Colors.White : color, opacity, hasDropShadow); var width = watermarked.PixelWidth; var height = watermarked.PixelHeight; var result = input.Clone(); var position = new Rect(input.PixelWidth - width - 20 /* right margin */, input.PixelHeight - height, width, height); result.Blit(position, watermarked, new Rect(0, 0, width, height)); return result; } /// <summary> /// Creates a WriteableBitmap from a text /// </summary> /// <param name="text"></param> /// <param name="fontSize"></param> /// <param name="color"></param> /// <param name="opacity"></param> /// <param name="hasDropShadow"></param> /// <returns></returns> private static WriteableBitmap GetTextBitmap(string text, double fontSize, Color color, double opacity, bool hasDropShadow) { TextBlock txt = new TextBlock(); txt.Text = text; txt.FontSize = fontSize; txt.Foreground = new SolidColorBrush(color); txt.Opacity = opacity; if (hasDropShadow) txt.Effect = new DropShadowEffect(); WriteableBitmap bitmap = new WriteableBitmap((int)txt.ActualWidth, (int)txt.ActualHeight); bitmap.Render(txt, null); bitmap.Invalidate(); return bitmap; } } For this code to run, you need the WritableBitmapEx library. As you can see, it’s quite simple. You just need to call the Watermark method and pass it the text you want to add in your image. You can also pass optional parameters like the color, the opacity, the fontsize or if you want a drop shadow effect. I could have specify other parameters like the position or the the font family but you can change the code if you need to. Here’s what it can give Hope this helps.

    Read the article

  • How to import .m3u playlist

    - by Charl le Roux
    I exported my my iTunes playlists to .m3u files before I got rid of Win7 completely. Now I would like to import the playlists into Rhythmbox, but can't. My playlists contain windows filenames (e.g. D:\music....) instead of linux filenames (e.g. /mnt/music....). The music is still stored on the exact same disk and folder as it was under windows. I need a script to convert the file names, can anyone help?

    Read the article

  • [Windows 8] Please implement the PlayTo feature in your media apps

    - by Benjamin Roux
    One of the greatest feature in Windows 8 apps is the ability to stream the video/photos/music you’re playing to any DLNA capable device in your network. Meaning that if you’re watching a movie on Netflix on your brand new Surface tablet in your garden, you can continue to watch it without interruption on your TV if you decide to go back inside ! Isn’t that awesome? The best thing is that it takes very few lines to implement that in an app and it’s very easy. You just have to subscribe to one event and feed the EventArgs with the stream you want to display. You can either stream a video/music from a MediaElement/MediaPlayer (see PlayerFramework on CodePlex) or from a simple Image control. Code’s better than text so I invite you to go the sample code of the PlayTo feature on the msdn (it features code for JS, C# and C++). So if you’re developing an app capable of playing video, music or just display some photos, please implement the PlayTo, it will bring a plus to your app.

    Read the article

  • How do i create a .desktop file for a .jar file?

    - by Masterkraft0r
    My problem is, that i do want to create a .desktop file for Technic Launcher, which is an alternative launcher for Minecraft. It comes in the form of an .jar file and i want to create a menu entry for it. How would i write such a .desktop file? My attempt was the following: [Desktop Entry] Type=Application Name=Technic Launcher Comment=Minecraft Launcher for Technic Pack, Tekkit, Hack/Mine and Yogbox Exec=/home/benjamin/Applications/Minecraft/TechnicLauchner/technic-launcher-latest.jar Icon=/home/benjamin/Applications/Minecraft/TechnicLauchner/icon.png Terminal=false Categories=Game;ActionGame;AdventureGame;RolePlaying; This didn't work, hence my question. What did i do wrong? Is it even possible to point to a .jar file?

    Read the article

  • [Windows 8] An application bar toggle button

    - by Benjamin Roux
    To stay in the application bar stuff, here’s another useful control which enable to create an application bar button that can be toggled between two different contents/styles/commands (used to create a favorite/unfavorite or a play/pause button for example). namespace Indeed.Controls { public class AppBarToggleButton : Button { public bool IsChecked { get { return (bool)GetValue(IsCheckedProperty); } set { SetValue(IsCheckedProperty, value); } } public static readonly DependencyProperty IsCheckedProperty = DependencyProperty.Register("IsChecked", typeof(bool), typeof(AppBarToggleButton), new PropertyMetadata(false, (o, e) => (o as AppBarToggleButton).IsCheckedChanged())); public string CheckedContent { get { return (string)GetValue(CheckedContentProperty); } set { SetValue(CheckedContentProperty, value); } } public static readonly DependencyProperty CheckedContentProperty = DependencyProperty.Register("CheckedContent", typeof(string), typeof(AppBarToggleButton), null); public ICommand CheckedCommand { get { return (ICommand)GetValue(CheckedCommandProperty); } set { SetValue(CheckedCommandProperty, value); } } public static readonly DependencyProperty CheckedCommandProperty = DependencyProperty.Register("CheckedCommand", typeof(ICommand), typeof(AppBarToggleButton), null); public Style CheckedStyle { get { return (Style)GetValue(CheckedStyleProperty); } set { SetValue(CheckedStyleProperty, value); } } public static readonly DependencyProperty CheckedStyleProperty = DependencyProperty.Register("CheckedStyle", typeof(Style), typeof(AppBarToggleButton), null); public bool AutoToggle { get { return (bool)GetValue(AutoToggleProperty); } set { SetValue(AutoToggleProperty, value); } } public static readonly DependencyProperty AutoToggleProperty = DependencyProperty.Register("AutoToggle", typeof(bool), typeof(AppBarToggleButton), null); private object content; private ICommand command; private Style style; private void IsCheckedChanged() { if (IsChecked) { // backup the current content and command content = Content; command = Command; style = Style; if (CheckedStyle == null) Content = CheckedContent; else Style = CheckedStyle; Command = CheckedCommand; } else { if (CheckedStyle == null) Content = content; else Style = style; Command = command; } } protected override void OnTapped(Windows.UI.Xaml.Input.TappedRoutedEventArgs e) { base.OnTapped(e); if (AutoToggle) IsChecked = !IsChecked; } } } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } To use it, it’s very simple. <ic:AppBarToggleButton Style="{StaticResource PlayAppBarButtonStyle}" CheckedStyle="{StaticResource PauseAppBarButtonStyle}" Command="{Binding Path=PlayCommand}" CheckedCommand="{Binding Path=PauseCommand}" IsChecked="{Binding Path=IsPlaying}" /> .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } When the IsPlaying property (in my ViewModel) is true the button becomes a Pause button, when it’s false it becomes a Play button. Warning: Just make sure that the IsChecked property is set in last in your control !! If you don’t use style you can alternatively use Content and CheckedContent. Furthermore you can set the AutoToggle to true if you don’t want to control is IsChecked property through binding. With this control and the AppBarPopupButton, you can now create awesome application bar for your apps ! Stay tuned for more awesome Windows 8 tricks !

    Read the article

  • [Silverlight] How to choose the webcam resolution

    - by Benjamin Roux
    Hello, Today I’m gonna show you how to choose the webcam resolution when using Silverlight. By default most of them are in 640x480 which can be sometimes insufficient. VideoCaptureDevice source = devices.SelectedItem as VideoCaptureDevice; source.DesiredFormat = new VideoFormat(PixelFormatType.Unknown, 4096, 4096, 30); The magic thing with this line, is that the camera will choose the best resolution available (and not absolutely 4096x4096). You can also get all the supported formats using the SupportedFormats property. Hope this help.

    Read the article

  • Firefox : abandon du développement de la version 64 bits pour Windows, trop buggée pour Mozilla

    Firefox : abandon du développement de la version 64 bits Sous Windows, trop buggée pour Mozilla Un des responsables de la Fondation Mozilla en charge de « l'engineering » - Benjamin Smedberg - vient d'appeler à mettre fin au développement de la version 64 bits de Firefox pour Windows. La raison ? Cette déclinaison serait une « source continue d'incompréhension et de frustration » pour les utilisateurs et la communauté. Incompréhension parce que les extensions ne sont que rarement compatibles avec cette version. Frustration, parce que le navigateur serait truffé de bugs inextricables et non corrigés (ce qui, d'après Benjamin Smedberg, ferait que ses utilisateu...

    Read the article

  • Silverlight Cream for December 13, 2010 -- #1010

    - by Dave Campbell
    In this Issue: Rénald Nollet, Benjamin Gavin, Dennis Doomen, Tim Greenfield, Mike Taulty, Jeff Blankenburg, Michael Crump, Laurent Duveau, Dragos Manolescu, KeyboardP, Yochay Kiriaty. Above the Fold: Silverlight: "Silverlight RIA Services and Basic, Anonymous Authentication" Benjamin Gavin WP7: "lving Circular Navigation in Windows Phone Silverlight Applications" Yochay Kiriaty SQL Azure: "SQL Azure Database Manager – Part 1 : How to connect to your SQL Azure DB" Rénald Nollet Shoutouts: Yochay Kiriaty has a post up on the Windows Phone Devloper Blog about open source (MSPL) projects helping WP7 devs: Windows Phone Recipes – Helping the Community Jesse Liberty's latest Yet Another Podcast is up and thie time it's Joe Stagner: Yet Another Podcast #18 – Joe Stagner Josh Schwartzberg sent me this link to what is apparently his yearly web-only rock Christmas album: MetalXmas... done in Silverlight and RIA Services From SilverlightCream.com: SQL Azure Database Manager – Part 1 : How to connect to your SQL Azure DB Rénald Nollet posted Part 1 of a series on a SQL Azure database manager all in Silverlight... has a live demo running, some description, and is making us wait for the next part! Silverlight RIA Services and Basic, Anonymous Authentication Benjamin Gavin has a quick post up resolving a basic RIA Services problem that I bet a lot of folks are looking for the answer on... like 500 series errors... cool little find he ferreted out... A night of Silverlight, WPF, unit testing and Caliburn Micro Dennis Doomen in concert with his employer gave a couple talks at the local DotNED user group, and covered literally a cornucopia of topics... slides, and example code for both talks... lotsa material here... Tim Greenfield on PuzzleTouch WP7 Application Tim Greenfield is the latest WP7 app developer to be interviewed by the SilverlightShow crew... lots of interesting comments and insight from Tim. Rebuilding the PDC 2010 Silverlight Application (Part 4) Mike Taulty has part 4 of his PDC 2010 Silverlight app construction project up and is taking the app into Blend, and the considerations that brought to the table. What I Learned In WP7 – Issue #2 Jeff Blankenburg continues his "What I Learned" series with this discussion about fonts, the Non-Linear Navigation service I mention below, and possible WP7 jobs. Part 3 of 4 : Tips/Tricks for Silverlight Developers Michael Crump has Part 3 of his Tips/Tricks up today. Lots of goodies this time: underlining in a TextBlock, getting browser info, startup params, VisualTreeHelper, and child windows. My Windows Phone 7 presentation in Montreal Laurent Duveau gave a WP7 presentation in Montreal as part of the Microsoft Windows Phone 7 Developer's Briefing, and has posted his materials and slide deck WP7 Code: Mocking Event Streams with IEnumerable Dragos Manolescu has a very cool post up on using IEnumerable to Mock event streams by leveraging the IObservable/IEnumerable duality, and uses the 2D bubble app that you can run and test in the emulator without needing an accelerometer Transparent Wallpapers – Video Tutorial KeyboardP has had so many queries about his Transparent wallpaper for WP7 that he produced a video tutorial for it... Solving Circular Navigation in Windows Phone Silverlight Applications Yochay Kiriaty discusses the first recipe they are releasing ... see the shoutout above, a Nonlinear Navigation Service ... to help with apps that have loops in navigation. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • rails, mysql charsets & encoding: binary

    - by Benjamin Vetter
    Hi, i've a rails app that runs using utf-8. It uses a mysql database, all tables with mysql's default charset and collation (i.e. latin1). Therefore the latin1 tables contain utf-8 data. Sure, that's not nice, but i'm not really interested in it. Everything works fine, because the connection encoding is latin1 as well and therefore mysql does not convert between charsets. Only one problem: i need a utf-8 fulltext index for one table: mysql> show create table autocompletephrases; ... AUTO_INCREMENT=310095 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci But: I don't want to convert between charsets in my rails app. Therefore I would like to know if i could just set config/database.yml production: adapter: mysql >>>> encoding: binary ... which just calls SET NAMES 'binary' when connecting to mySQL. It looks like it works for my case, because i guess it forces mysql to -not- convert between charsets (mySQL docs). Does anyone knows about problems about doing this? Any side-effects? Or do you have any other suggestions? But i'd like to avoid converting my whole database to utf-8. Many Thanks! Benjamin

    Read the article

  • Automated Deployment of Windows Application

    - by Phillip Roux
    Our development team are looking to automate our application deployment on to multiple servers. We need to control multiple windows servers at once (Stopping Database server & Web Server). We have a ASP.NET project, database upgrade scripts, reports and various Windows services that potentially need to be updated during deployment. Currently we use Jenkins as our CI server to run our unit tests. If something goes wrong in the deployment process, we would like the ability to roll back. What tools are recommended to automate our deployment process?

    Read the article

  • Implications and benefits of removing NT AUTHORITY\SYSTEM from sysadmin role?

    - by Cade Roux
    Disclaimer: I am not a DBA. I am a database developer. A DBA just sent a report to our data stewards and is planning to remove the NT AUTHORITY\SYSTEM account from the sysadmin role on a bunch of servers. (The probably violate some audit report they received). I see a MSKB article that says not to do this. From what I can tell reading a variety of disparate information on the web, a bunch of special services/operations (Volume Copy, Full Text Indexing, MOM, Windows Update) use this account even when the SQL Server and Agent service etc are all running under dedicated accounts.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >