Search Results

Search found 4316 results on 173 pages for 'mark fisher'.

Page 13/173 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Dependency Injection Introduction

    - by MarkPearl
    I recently was going over a great book called “Dependency Injection in .Net” by Mark Seeman. So far I have really enjoyed the book and would recommend anyone looking to get into DI to give it a read. Today I thought I would blog about the first example Mark gives in his book to illustrate some of the benefits that DI provides. The ones he lists are Late binding Extensibility Parallel Development Maintainability Testability To illustrate some of these benefits he gives a HelloWorld example using DI that illustrates some of the basic principles. It goes something like this… class Program { static void Main(string[] args) { var writer = new ConsoleMessageWriter(); var salutation = new Salutation(writer); salutation.Exclaim(); Console.ReadLine(); } } public interface IMessageWriter { void Write(string message); } public class ConsoleMessageWriter : IMessageWriter { public void Write(string message) { Console.WriteLine(message); } } public class Salutation { private readonly IMessageWriter _writer; public Salutation(IMessageWriter writer) { _writer = writer; } public void Exclaim() { _writer.Write("Hello World"); } }   If you had asked me a few years ago if I had thought this was a good approach to solving the HelloWorld problem I would have resounded “No”. How could the above be better than the following…. class Program { static void Main(string[] args) { Console.WriteLine("Hello World"); Console.ReadLine(); } }  Today, my mind-set has changed because of the pain of past programs. So often we can look at a small snippet of code and make judgements when we need to keep in mind that we will most probably be implementing these patterns in projects with hundreds of thousands of lines of code and in projects that we have tests that we don’t want to break and that’s where the first solution outshines the latter. Let’s see if the first example achieves some of the outcomes that were listed as benefits of DI. Could I test the first solution easily? Yes… We could write something like the following using NUnit and RhinoMocks… [TestFixture] public class SalutationTests { [Test] public void ExclaimWillWriteCorrectMessageToMessageWriter() { var writerMock = MockRepository.GenerateMock<IMessageWriter>(); var sut = new Salutation(writerMock); sut.Exclaim(); writerMock.AssertWasCalled(x => x.Write("Hello World")); } }   This would test the existing code fine. Let’s say we then wanted to extend the original solution so that we had a secure message writer. We could write a class like the following… public class SecureMessageWriter : IMessageWriter { private readonly IMessageWriter _writer; private readonly string _secretPassword; public SecureMessageWriter(IMessageWriter writer, string secretPassword) { _writer = writer; _secretPassword = secretPassword; } public void Write(string message) { if (_secretPassword == "Mark") { _writer.Write(message); } else { _writer.Write("Unauthenticated"); } } }   And then extend our implementation of the program as follows… class Program { static void Main(string[] args) { var writer = new SecureMessageWriter(new ConsoleMessageWriter(), "Mark"); var salutation = new Salutation(writer); salutation.Exclaim(); Console.ReadLine(); } }   Our application has now been successfully extended and yet we did very little code change. In addition, our existing tests did not break and we would just need add tests for the extended functionality. Would this approach allow parallel development? Well, I am in two camps on parallel development but with some planning ahead of time it would allow for it as you would simply need to decide on the interface signature and could then have teams develop different sections programming to that interface. So,this was really just a quick intro to some of the basic concepts of DI that Mark introduces very successfully in his book. I am hoping to blog about this further as I continue through the book to list some of the more complex implementations of containers.

    Read the article

  • Codeigniter benchmarking, where are these ms coming from?

    - by ropstah
    I'm in the process of benchmarking my website. class Home extends Controller { function Home() { parent::Controller(); $this->benchmark->mark('Constructor_start'); $this->output->enable_profiler(TRUE); $this->load->library ('MasterPage'); $this->benchmark->mark('Constructor_end'); } function index() { $this->benchmark->mark('Index_start'); $this->masterpage->setMasterPage('master/home'); $this->masterpage->addContent('home/index', 'page'); $this->masterpage->show(); $this->benchmark->mark('Index_start'); } } These are the results: Loading Time Base Classes: 0.0076 Constructor: 0.0007 Index: 0.0440 Controller Execution Time ( Home/ Index ): 0.4467 Total Execution Time: 0.4545` I understand the following: Loading Time Base Classes (0.0076) Constructor (0.0007) Index (0.0440) But where is the rest of the time coming from?

    Read the article

  • how to add annotation to map in xcode

    - by somu
    hai to all... i am trying to mark some places on map from xcode(iphone app) but now i can mark the only 1 place at a time ..i want to mark the so many places at a time with titles for them could any one help me its urgent thanks

    Read the article

  • C# Printing Properties

    - by Mark
    I have a class like this with a bunch of properties: class ClassName { string Name {get; set;} int Age {get; set;} DateTime BirthDate {get; set;} } I would like to print the name of the property and it's value using the value's ToString() method and the Property's name like this: ClassName cn = new ClassName() {Name = "Mark", Age = 428, BirthData = DateTime.Now} cn.MethodToPrint(); // Output // Name = Mark, Age = 428, BirthDate = 12/30/2010 09:20:23 PM Reflection is perfectly okay, in fact I think it is probably required. I'd also be neat if it could somehow work on any class through some sort of inheritance. I'm using 4.0 if that matters.

    Read the article

  • LevelToVisibilityConverter in silverligt 4

    - by prince23
    <UserControl x:Class="SLGridImage.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"> <UserControl.Resources> <local:LevelToVisibilityConverter x:Key="LevelToVisibility" /> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <sdk:DataGrid x:Name="dgMarks" CanUserResizeColumns="False" SelectionMode="Single" AutoGenerateColumns="False" VerticalAlignment="Top" ItemsSource="{Binding MarkCollection}" IsReadOnly="True" Margin="13,44,0,0" RowDetailsVisibilityMode="Collapsed" Height="391" HorizontalAlignment="Left" Width="965" VerticalScrollBarVisibility="Visible" > <sdk:DataGrid.Columns> <sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button x:Name="myButton" Click="myButton_Click"> <StackPanel Orientation="Horizontal"> <Image Margin="2, 2, 2, 2" x:Name="imgMarks" Stretch="Fill" Width="12" Height="12" Source="Images/test.png" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="{Binding Level, Converter={StaticResource LevelToVisibility}}" /> <TextBlock Text="{Binding Level}" TextWrapping="NoWrap" ></TextBlock> </StackPanel> </Button> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn Header="Name" > <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate > <Border> <TextBlock Text="{Binding Name}" /> </Border> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn Header="Marks" Width="80"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Border> <TextBlock Text="{Binding Marks}" /> </Border> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> </sdk:DataGrid.Columns> </sdk:DataGrid> </Grid> </UserControl> in .cs using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; using System.Collections.ObjectModel; using System.ComponentModel; namespace SLGridImage { public partial class MainPage : UserControl { private MarksViewModel model = new MarksViewModel(); public MainPage() { InitializeComponent(); this.DataContext = model; } private void myButton_Click(object sender, RoutedEventArgs e) { } } public class MarksViewModel : INotifyPropertyChanged { public MarksViewModel() { markCollection.Add(new Mark() { Name = "ABC", Marks = 23, Level = 0 }); markCollection.Add(new Mark() { Name = "XYZ", Marks = 67, Level = 1 }); markCollection.Add(new Mark() { Name = "YU", Marks = 56, Level = 0 }); markCollection.Add(new Mark() { Name = "AAA", Marks = 89, Level = 1 }); } private ObservableCollection<Mark> markCollection = new ObservableCollection<Mark>(); public ObservableCollection<Mark> MarkCollection { get { return this.markCollection; } set { this.markCollection = value; OnPropertyChanged("MarkCollection"); } } public event PropertyChangedEventHandler PropertyChanged; public void OnPropertyChanged(string propName) { if (PropertyChanged != null) this.PropertyChanged(this, new PropertyChangedEventArgs(propName)); } } public class Mark { public string Name { get; set; } public int Marks { get; set; } public int Level { get; set; } } public class LevelToVisibilityConverter : System.Windows.Data.IValueConverter { #region IValueConverter Members public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { Visibility isVisible = Visibility.Collapsed; if ((value == null)) return isVisible; int condition = (int)value; isVisible = condition == 1 ? Visibility.Visible : Visibility.Collapsed; return isVisible; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } #endregion } } when i run getting error The type 'local:LevelToVisibilityConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. what i am i missing here looking forward for an solution thank you

    Read the article

  • JavaScript function binding (this keyword) is lost after assignment

    - by Ding
    this is one of most mystery feature in JavaScript, after assigning the object method to other variable, the binding (this keyword) is lost var john = { name: 'John', greet: function(person) { alert("Hi " + person + ", my name is " + this.name); } }; john.greet("Mark"); // Hi Mark, my name is John var fx = john.greet; fx("Mark"); // Hi Mark, my name is my question is: 1) what is happening behind the assignment? var fx = john.greet; is this copy by value or copy by reference? fx and john.greet point to two diferent function, right? 2) since fx is a global method, the scope chain contains only global object. what is the value of this property in Variable object?

    Read the article

  • Inserting newlines into a GtkTextView widget (GTK+ programming)

    - by Mark Roberts
    I've got a button which when clicked copies and appends the text from a GtkEntry widget into a GtkTextView widget. (This code is a modified version of an example found in the "The Text View Widget" chapter of Foundations of GTK+ Development.) I'm looking to insert a newline character before the text which gets copied and appended, such that each line of text will be on its own line in the GtkTextView widget. How would I do this? I'm brand new to GTK+. Here's the code sample: #include <gtk/gtk.h> typedef struct { GtkWidget *entry, *textview; } Widgets; static void insert_text (GtkButton*, Widgets*); int main (int argc, char *argv[]) { GtkWidget *window, *scrolled_win, *hbox, *vbox, *insert; Widgets *w = g_slice_new (Widgets); gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), "Text Iterators"); gtk_container_set_border_width (GTK_CONTAINER (window), 10); gtk_widget_set_size_request (window, -1, 200); w->textview = gtk_text_view_new (); w->entry = gtk_entry_new (); insert = gtk_button_new_with_label ("Insert Text"); g_signal_connect (G_OBJECT (insert), "clicked", G_CALLBACK (insert_text), (gpointer) w); scrolled_win = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (scrolled_win), w->textview); hbox = gtk_hbox_new (FALSE, 5); gtk_box_pack_start_defaults (GTK_BOX (hbox), w->entry); gtk_box_pack_start_defaults (GTK_BOX (hbox), insert); vbox = gtk_vbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0); gtk_container_add (GTK_CONTAINER (window), vbox); gtk_widget_show_all (window); gtk_main(); return 0; } /* Insert the text from the GtkEntry into the GtkTextView. */ static void insert_text (GtkButton *button, Widgets *w) { GtkTextBuffer *buffer; GtkTextMark *mark; GtkTextIter iter; const gchar *text; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (w->textview)); text = gtk_entry_get_text (GTK_ENTRY (w->entry)); mark = gtk_text_buffer_get_insert (buffer); gtk_text_buffer_get_iter_at_mark (buffer, &iter, mark); gtk_text_buffer_insert (buffer, &iter, text, -1); } You can compile this command (assuming the file is named file.c): gcc file.c -o file `pkg-config --cflags --libs gtk+-2.0` Thanks everybody!

    Read the article

  • UIPickerView crashing when switching segemented control

    - by Mattog1456
    Hello, I have four NSDictionaries that I would like to use to populate a pickerview depending on a segemented control. With the code I have, the first segmented control/pickerview works fine but when I switch to the second segment the picker view only loads part of the second dictionary, that is it loads the same number of rows as it counted in the first dictionary. When I change the segmented control to the third or fourth segment it simply crashes with a sigabrt error indicating that it cannot index item43 when only 27 exist. This I suspect stems from a UItextfield population based on the upickerview row and object. I think the problem is with the way I have the data source and delegate set up. #pragma mark - #pragma mark UIPickerViewDelegate - (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { if ([wine selectedSegmentIndex] == 0) { return [robskeys objectAtIndex:row]; } if ([wine selectedSegmentIndex] == 1) { return [esabskeys objectAtIndex:row]; } if ([wine selectedSegmentIndex] == 2) { return [lebskeys objectAtIndex:row]; } else if ([wine selectedSegmentIndex] == 3) { return [sbskeys objectAtIndex:row]; } return @"Unknown title"; } #pragma mark - #pragma mark UIPickerViewDataSource - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { return 1; } - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { if ([wine selectedSegmentIndex] == 0) { return robskeys.count; } if ([wine selectedSegmentIndex] == 1) { return esabskeys.count; } if ([wine selectedSegmentIndex] == 2) { return lebskeys.count; } else if ([wine selectedSegmentIndex] == 3) { return sbskeys.count; } return 1; } #pragma mark - Any help would be much appreciated Thank you

    Read the article

  • Oracle's Primavera P6 Analytics Now Available!

    - by mark.kromer
    Oracle's Primavera product team has announced this week that general availability of our first Oracle BI (OBI) based analytical product with pre-built business intelligence dashboards, reports and KPIs built in. P6 Analytics uses OBI's drill-down capabilities, summarizations, hierarchies and other BI features to provide knowledge to your business users to make the best decisions on portfolios, projects, schedules & resources with deep insights. Without needing to launch into the P6 tool, your executives, PMO, project sponsors, etc. can view up to date project performance information as well as historic trends of project performance. Using web-based portal technology, P6 Analytics makes it easy to manage by exception and then drill down to quickly identify root cause analysis of problem projects. At the same time, a brand new version of the P6 Reporting Database R2 was just announded and is also now available. This updated reporting database provides you with 4 star schemas with spread data and includes P6 activity, project and resource codes. You can use the data warehouse and ETL functions of the P6 Reporting Database R2 with your own reporting tools or build dashboards that utilize the hierarchies & drill down to the day-level on scheduled activities using Busines Objects, Cognos, Microsoft, etc. Both of these products can be downloaded from E-Delivery under the Primavera applications section in the P6 EPPM v7.0 media pack. I put some examples below of the resource utilization, earned value, landing page and portfolio analysis dashboards that come out of the box with P6 Analytics to give you these deep insights into your projects & portfolios on day 1 of using the tool. Please send an email to Karl or me if you have any questions or would like more information. Oracle Technology Network and the Oracle.com marketing sites are currently being refreshed with further details of these exciting new releases of the Primavera BI and data warehouse products. Lastly, scroll below for some screenshots of the new P6 Analytics R1 product using OBIEE! Thanks, Mark Kromer

    Read the article

  • links for 2010-03-11

    - by Bob Rhubart
    Andy Mulholland: (Information Technology) + (Business Technology) ÷ Clouds = Infostructure "Internal information technology with its dedicated users, applications, licenses, client-server, data-centric and close coupled integration architecture cannot support externally oriented business technology where almost every condition is different. Internet connectivity and the emergence of people centric services in the web 2.0 world has led business and user expectations to shift dramatically and give rise to the expectation of a new and completely different working environment, based in the cloud, or more correctly, clouds." -- Andy Mulholland, CTO Blog, Capgemini (tags: enterprisearchitecture cloud web2.0 entarch) @myfear: Getting started with (GSW #2): GlassFish v3 "If the application server/container of your choice is a Java EE compliant one, you are on the right track. This list is not too long these days, if you look for Java EE 6 compliant servers. The most prominent and well-known is also the Java EE 6 reference implementation (RI): The Oracle GlassFish v3." -- Oracle ACE Markus "@myfear" Eisele (tags: oracle otn oracleace glassfish java) @oraclenerd: The"Database is a Bucket" Mentality "Could it be that everyone out there believes that the sole purpose of a database is to store data? That it can't do anything else?" -- Chet "@oraclenerd" Justice (tags: otn oracle database dba) The Encyclopedia of SOA "SOA is an anagram for OSA, which means female bear in spanish. It is a well-known fact in the spanish-speaking world that female bears are able to model business processes and optimize reusable IT assets better than any other hibernating animal." -- One of the surprisingly funny nuggets of wisdom available in the Encyclopedia of SOA. (tags: architecture chucknorris humor soa software technology webservices) Marina Fisher: Book Review - Web 2.0 Fundamentals Marina Fisher reviews WEB 2.0 FUNDAMENTALS by Oswald Campesato and Kevin Nilson. (tags: sun web2.0 bookreview socialnetworking)

    Read the article

  • Client-side code and UPK

    - by [email protected]
    There is a long running discussion in UPK Development regarding the use of any client side code as part of the end-user playback. By this I mean anything which requires an install including ActiveX controls, browser helper objects, stand-alone applications, things that run in the task bar, etc. We all have grown to love zero-footprint applications over the past ten years, but there are some things which are not technically feasible using HTML alone. One example of this is the functionality provided by our SmartHelp in-application support component. This allows the user to launch context sensitive help without making modifications to the target application. (If you are unfamiliar with SmartHelp, more information can be found in the "In-Application Support Guide" in the UPK manual directory) We always try to implement everything we can using only HTML but there are many features which have been requested over the years that would require some client-side code in order to work. When these come up for discussion, there is always a spirited debate about the acceptability of a client side solution. I thought it would be interesting to ask for feedback from a wider audience. What do you think about client-side components? Would your organization consider them? Do you already deploy SmartHelp? Is there a large hurdle to clear for these to be worth the deployment costs? Let us know. Mark Overton, VP Development for UPK

    Read the article

  • My first animation - Using SDL.NET C#

    - by Mark
    Hi all! I'm trying to animate a player object in my 2D grid when the user clicks somewhere in the screen. I got the following 4 variables: oX (Current player position X) oY (Current player position Y) dX (Destination X) dY (Destination Y) How can I make sure the player moves in a straight line to the new XY coordinates. The way I'm doing it now is really awfull and causes the player to first move along x axis, and finally in y axis. Can someone give me some guidance with the involved math cause I'm really not sure on how to accomplish this. Thank you for your time. Kind regards, Mark Update: It's working now but whats the right way to check if the current positions are equal to the target position? private static void MovePlayer(double x2, double y2, int duration) { double hX = x2 - m_PlayerPosition.X; double hY = y2 - m_PlayerPosition.Y; double Length = Math.Sqrt(Math.Pow(hX, 2) + Math.Pow(hY, 2)); hX = hX / Length; hY = hY / Length; while (m_PlayerPosition.X != Convert.ToInt32(x2) || m_PlayerPosition.Y != Convert.ToInt32(y2)) { m_PlayerPosition.X += Convert.ToInt32(hX * 1); m_PlayerPosition.Y += Convert.ToInt32(hY * 1); UpdatePlayerLocation(); } }

    Read the article

  • An Oracle Event for Your Facility & Equipment Maintenance Staff

    - by Mark Rosenberg
    The 7th Annual Oracle Maintenance Summit will occur February 4 – 6, 2013 at the Hyatt Regency San Francisco. This year, the Maintenance Summit will be one of the major pillars of a larger Oracle Value Chain Summit. What makes this event different from the other events hosted by Oracle and the PeopleSoft Community’s various user groups is that it is specifically meant to provide a venue for the facility and equipment maintenance community to talk about all things related to maintenance.  Maintenance Planners, Maintenance Schedulers, Vice Presidents and Directors of Physical Plant, Operations Managers, Craft Supervisors, IT management, and IT analysts typically attend this event and find it to be a very valuable experience. The Maintenance pillar will provide the same atmosphere and opportunity to hear from PeopleSoft Maintenance Management customers, Oracle Product Strategy, and partners, as in past years.  For more information, you can access the registration website for the Value Chain Summit. For existing PeopleSoft Maintenance Management customers…if you are interested in participating in the PeopleSoft Maintenance Management Focus Group in which Oracle discusses product roadmap topics with the community of customers who have licensed the PeopleSoft Maintenance Management application, please contact [email protected], [email protected], or Mark[email protected]. The Focus Group will meet on February 7th, and attendance is by invitation only.We look forward to seeing you in San Francisco! P.S.  The Early Bird registration fee is $195. Register before December 31 to take advantage of this introductory low price, as the registration fee will go up to $295 after that date.

    Read the article

  • What do YOU want to see in a SharePoint jQuery Session?

    - by Mark Rackley
    Hey party people. So, as you have probably realized by now, I’ve been using quite a bit of jQuery with SharePoint. It’s pretty amazing what you can actually accomplish with a little stubbornness and some guidance from the gurus. Well, it looks like I’ll be putting together a SharePoint jQuery session that I will be presenting at a few conferences. This is such a big and broad topic I could speak on it for hours! So, I need YOUR assistance to help me narrow down what I’ll be focusing on. Some ideas I have are: How to even get started; how to set up SharePoint to work with jQuery What third party libraries exist out there that integrate well with SharePoint How to interact with default SharePoint forms and jQuery (cascading dropdowns, disabling fields, etc..) What is SPServices and how can you use it When should you NOT use jQuery What do YOU want to see though? This session is for YOU guys, not for me. Please take a moment to leave a comment below and let me know what you would like to see and learn. Thanks, and I look forward to seeing you in my sessions!! Mark

    Read the article

  • Quantifying the Value Derived from Your PeopleSoft Implementation

    - by Mark Rosenberg
    As product strategists, we often receive the question, "What's the value of implementing your PeopleSoft software?" Prospective customers and existing customers alike are compelled to justify the cost of new tools, business process changes, and the business impact associated with adopting the new tools. In response to this question, we have been working with many of our customers and implementation partners during the past year to obtain metrics that demonstrate the value obtained from an investment in PeopleSoft applications. The great news is that as a result of our quest to identify value achieved, many of our customers began to monitor their businesses differently and more aggressively than in the past, and a number of them informed us that they have some great achievements to share. For this month, I'll start by pointing out that we have collaborated with one of our implementation partners, Huron Consulting Group, Inc., to articulate the levers for extracting value from implementing the PeopleSoft Grants solution. Typically, education and research institutions, healthcare organizations, and non-profit organizations are the types of enterprises that seek to facilitate and automate research administration business processes with the PeopleSoft Grants solution. If you are interested in understanding the ways in which you can look for value from an implementation, please consider registering for the webcast scheduled for Friday, December 14th at 1pm Central Time in which you'll get to see and hear from our team, Huron Consulting, and one of our leading customers. In the months ahead, we'll plan to post more information about the value customers have measured and reported to us from their implementations and upgrades. If you have a great story about return on investment and want to share it, please contact either [email protected]  or Mark[email protected]. We'd love to hear from you.

    Read the article

  • clojure.algo.monad strange m-plus behaviour with parser-m - why is second m-plus evaluated?

    - by Mark Fisher
    I'm getting unexpected behaviour in some monads I'm writing. I've created a parser-m monad with (def parser-m (state-t maybe-m)) which is pretty much the example given everywhere (here, here and here) I'm using m-plus to act a kind of fall-through query mechanism, in my case, it first reads values from a cache (database), if that returns nil, the next method is to read from "live" (a REST call). However, the second value in the m-plus list is always called, even though its value is disgarded (if the cache hit was good) and the final return is that of the first monadic function. Here's a cutdown version of the issue i'm seeing, and some solutions I found, but I don't know why. My questions are: Is this expected behaviour or a bug in m-plus? i.e. will the 2nd method in a m-plus list always be evaluated if the first item returns a value? Minor in comparison to the above, but if i remove the call _ (fetch-state) from checker, when i evaluate that method, it prints out the messages for the functions the m-plus is calling (when i don't think it should). Is this also a bug? Here's a cut-down version of the code in question highlighting the problem. It simply checks key/value pairs passed in are same as the initial state values, and updates the state to mark what it actually ran. (ns monods.monad-test (:require [clojure.algo.monads :refer :all])) (def parser-m (state-t maybe-m)) (defn check-k-v [k v] (println "calling with k,v:" k v) (domonad parser-m [kv (fetch-val k) _ (do (println "k v kv (= kv v)" k v kv (= kv v)) (m-result 0)) :when (= kv v) _ (do (println "passed") (m-result 0)) _ (update-val :ran #(conj % (str "[" k " = " v "]"))) ] [k v])) (defn filler [] (println "filler called") (domonad parser-m [_ (fetch-state) _ (do (println "filling") (m-result 0)) :when nil] nil)) (def checker (domonad parser-m [_ (fetch-state) result (m-plus ;; (filler) ;; intitially commented out deliberately (check-k-v :a 1) (check-k-v :b 2) (check-k-v :c 3))] result)) (checker {:a 1 :b 2 :c 3 :ran []}) When I run this as is, the output is: > (checker {:a 1 :b 2 :c 3 :ran []}) calling with k,v: :a 1 calling with k,v: :b 2 calling with k,v: :c 3 k v kv (= kv v) :a 1 1 true passed k v kv (= kv v) :b 2 2 true passed [[:a 1] {:a 1, :b 2, :c 3, :ran ["[:a = 1]"]}] I don't expect the line k v kv (= kv v) :b 2 2 true to show at all. The first function to m-plus (as seen in the final output) is what is returned from it. Now, I've found if I pass a filler into m-plus that does nothing (i.e. uncomment the (filler) line) then the output is correct, the :b value isn't evaluated. If I don't have the filler method, and make the first method test fail (i.e. change it to (check-k-v :a 2) then again everything is good, I don't get a call to check :c, only a and b are tested. From my understanding of what the state-t maybe-m transformation is giving me, then the m-plus function should look like: (defn m-plus [left right] (fn [state] (if-let [result (left state)] result (right state)))) which would mean that right isn't called unless left returns nil/false. I'd be interested to know if my understanding is correct or not, and why I have to put the filler method in to stop the extra evaluation (whose effects I don't want to happen). Apologies for the long winded post!

    Read the article

  • Oracle’s Vision for the Social-Enabled Enterprise

    - by Richard Lefebvre
    2 years ago, Social was a nice to have. Now it’s a must-have’- Mark Hurd .Do you agree? Check out  the on demand version of the Oracle’s Vision for the Social-Enabled Enterprise Exclusive Webcast in a 30' video HERE  Smart companies are developing social media strategies to engage customers, gain brand insights, and transform employee collaboration and recruitment. Join Oracle President Mark Hurd and senior Oracle executives to learn more about Oracle's vision for the social-enabled enterprise

    Read the article

  • Oracle Magazine - Deriving and Sharing Business Intelligence Metadata

    - by David Allan
    There is a new Oracle Magazine article titled 'Deriving and Sharing Business Intelligence Metadata' from Oracle ACE director Mark Rittman in the July/August 2010 issue that illustrates the business definitions derived and shared across OWB 11gR2 and OBIEE: http://www.oracle.com/technology/oramag/oracle/10-jul/o40bi.html Thanks to Mark for the time producing this. As for OWB would be have been useful to have had the reverse engineering capabilities from OBIEE, interesting to have had code template based support for deployment of such business definitions and powerful to use these objects (logical folders etc.) in the mapping itself.

    Read the article

  • Book Review: Fast Track to MDX

    - by Greg Low
    Another book that I re-read while travelling last week was Fast Track to MDX . I still think that it's the best book that I've seen for introducing the core concepts of MDX. SolidQ colleague Mark Whitehorn, along with Mosha Pasumansky and Robert Zare do an amazing job of building MDX knowledge throughout the book. I had dinner with Mark in London a few years back and I was pestering him to update this book. The biggest limitation of the book is that it was written for SQL Server 2000 Analysis Services,...(read more)

    Read the article

  • Load Plan article in Oracle Magazine

    - by David Allan
    Timely article in Oracle Magazine on ODI Load Plans from Mark Rittman in the current issue, worth having a quick read of the article and play with the sample which is included if you get the time. Thanks to Mark for investing the time and energy providing such useful information to the community.http://www.oracle.com/technetwork/issue-archive/2012/12-sep/o52bi-1735905.htmlMark goes over the main benefits of the load plan in the article. Interested to hear any creative use cases or comments in general.

    Read the article

  • Canonical et Nokia pourraient travailler en collaboration sur Qt, il pourrait devenir le framework de référence pour Ubuntu

    Canonical et Nokia pourraient travailler en collaboration sur Qt Sur les quelques derniers mois, des contacts ont eu lieu entre les développeurs de Qt et Canonical ainsi qu'avec les participants au projet Ubuntu. Mark Zimmerman, CTO de Canonical, disait sur son blog, en octobre : Citation: Envoyé par Mark Zimmerman, CTO de Canonical I have been thinking about Qt recently. We want to make it fast, easy and painless to devel...

    Read the article

  • Getting Started With Knockout.js

    - by Pawan_Mishra
    Client side template binding in web applications is getting popular with every passing day. More and more libraries are coming up with enhanced support for client side binding. jQuery templates is one very popular mechanism for client side template bindings. The idea with client side template binding is simple. Define the html mark-up with appropriate place holder for data. User template engines like jQuery template to bind the data(JSON formatted data) with the previously defined mark-up.In this...(read more)

    Read the article

  • Black Screen After Sleep (Win 8)

    - by Mark
    I have an SSD only, Intel HD Graphics only, Ultrabook running on Windows 8 64-bit and after I turn it back on, after a long sleep of a few hours, the screen remains black even though the power is on (the fan and keyboard backlight are on). I have to force a shut down and switch it back on to use it normally again. Hibernation and hybrid-sleep are turned off. It comes out of sleep of less than an hour just fine. Any advise? Mark

    Read the article

  • Upgrade from Vista 32 to Vista 64

    - by Lance Fisher
    I just ordered a laptop, and it came with Vista Home Premium 32. I want Vista Home Premium 64 on it. I'm planning a reinstall. Does anyone know if my product key for Vista 32 will also work for Vista 64 for an OEM copy? As far as I know, I just need to get the 64 bit media. Is this correct? Thanks. Update The laptop is a Dell XPS M1330, and its hardware is supported. Dell would even sell it with 64 bit. However, it was significantly more expensive for lower specs, and I couldn't get it in red.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >