Search Results

Search found 3022 results on 121 pages for 'loose typing'.

Page 35/121 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • Is there a clean separation of my layers with this attempt at Domain Driven Design in XAML and C#

    - by Buddy James
    I'm working on an application. I'm using a mixture of TDD and DDD. I'm working hard to separate the layers of my application and that is where my question comes in. My solution is laid out as follows Solution MyApp.Domain (WinRT class library) Entity (Folder) Interfaces(Folder) IPost.cs (Interface) BlogPosts.cs(Implementation of IPost) Service (Folder) Interfaces(Folder) IDataService.cs (Interface) BlogDataService.cs (Implementation of IDataService) MyApp.Presentation(Windows 8 XAML + C# application) ViewModels(Folder) BlogViewModel.cs App.xaml MainPage.xaml (Contains a property of BlogViewModel MyApp.Tests (WinRT Unit testing project used for my TDD) So I'm planning to use my ViewModel with the XAML UI I'm writing a test and define my interfaces in my system and I have the following code thus far. [TestMethod] public void Get_Zero_Blog_Posts_From_Presentation_Layer_Returns_Empty_Collection() { IBlogViewModel viewModel = _container.Resolve<IBlogViewModel>(); viewModel.LoadBlogPosts(0); Assert.AreEqual(0, viewModel.BlogPosts.Count, "There should be 0 blog posts."); } viewModel.BlogPosts is an ObservableCollection<IPost> Now.. my first thought is that I'd like the LoadBlogPosts method on the ViewModel to call a static method on the BlogPost entity. My problem is I feel like I need to inject the IDataService into the Entity object so that it promotes loose coupling. Here are the two options that I'm struggling with: Not use a static method and use a member method on the BlogPost entity. Have the BlogPost take an IDataService in the constructor and use dependency injection to resolve the BlogPost instance and the IDataService implementation. Don't use the entity to call the IDataService. Put the IDataService in the constructor of the ViewModel and use my container to resolve the IDataService when the viewmodel is instantiated. So with option one the layers will look like this ViewModel(Presentation layer) - Entity (Domain layer) - IDataService (Service Layer) or ViewModel(Presentation layer) - IDataService (Service Layer)

    Read the article

  • CSS naming guildlines with elements with multiple classes

    - by ryanzec
    Its seems like there are 2 ways someone can handle naming classes for elements that are designed to have multiple classes. One way would be: <span class="btn btn-success"></span> This is something that twitter bootstrap uses. Another possibility I would think would be: <span class="btn success"></span> It seems like the zurb foundation uses this method. Now the benefits of the first that I can see is that there less chance of outside css interfering with styling as the class name btn-success would not be as common as the class name success. The benefit of the second as I can see is that there is less typing and potential better style reuse. Are there any other benefits/disadvantages of either option and is one of them more popular than the other?

    Read the article

  • How do create an encrypted system with multiple Linux distributions?

    - by niels
    A few weeks ago I created a completely encrypted system on a notebook and must say I like the idea. It's a little bit annoying to enter the password on every boot, but it's nice to know even if I loose the computer I don't give my data to other people. With the alternate-cd it's easy to do. Now I have to setup a new system where I want to combine the new idea with my usual usage strategy. There I have more partitions: 3 system, Home, Different Data-Partitions for vm-data, photo-data and mp3-data. The background is that I prefer not to update a system. I prefer to install the new version parallel to the old system. So I can easily test it. Obviously the Data-Partitions are used for both systems. My questions is, how can I easily combine both my strategy and the crypto-approach? Or is it impossible. The way to do the crypted stuff by hand is in my eyes to complicated.

    Read the article

  • Why did ctrl-f stop working in LibreOffice?

    - by amandabee
    I've basically settled into Unity, but one constant that is kind of giving me agita is that in LibreOffice Calc (and Writer) ctrl-f does nothing. I can go to edit > find ... and the edit menu even suggests ctrl-f as a keyboard shortcut, but actually typing it doesn't do anything. ctrl-alt-f works fine. The only thing that doesn't work is ctrl-f. I had a really hard time getting settled with Unity (mostly trying to get my old Gnome-do and Compiz settings back) so I spent a lot of time monkeying with the Compiz Settings Manager. But I can't figure out where I would have unset/ overrode this. Plus, it isn't like ctrl-f does something unexpected. It just does nothing.

    Read the article

  • How To Backup Of MySQL Database Using PhpMyAdmin

    - by Jyoti
    It is very important to do backup of your MySql database, you will probably realize it when it is too late. A lot of web applications use MySql for storing the content. This can be blogs, and a lot of other things. When you have all your content as html files on your web server it is very easy to keep them safe from crashes, you just have a copy of them on your own PC and then upload them again after the web server is restored after the crash. All the content in the MySql database must also be backed up. If you have spent a lot of time making the content and it is only stored in the Mysql server, you will feel very bad if it gets lost for ever. Backing it up once every month or so makes sure you never loose too much of your work in case of a server crash, and it will make you sleep better at night. It is easy and fast, so there is no reason for not doing it. Step 1: Log into phpMyAdmin on your server. Step2: You can select the database that you would like to backup from the drop-down menu called Database. Step 3: A new page will be loaded in phpMyAdmin showing the selected database. In order to proceed with the backup click on the Export tab. Step 4: The options that you should select apart from the default ones are Save as file which will save the file locally to your computer in an .sql format and Add DROP TABLE which will add the drop table functionality if the table already exists in the database backup as shown below. Step 5: Click on the Go button to start the export/backup procedure for your database. A download window will pop up prompting for the exact place where you would like to save the file on your local computer. It is possible that the download starts automatically. This depends on your browser’s settings.

    Read the article

  • Micromax 3G mobile internet modem not being detected

    - by arjith
    I have Micromax 3G modem, and i inserted it in the USB port, but it is not being detected by Ubuntu 12.04, that i'm using from a Live USB. I tried creating a mobile internet connection, however, eventhough i created it, there is no option to connect. I had previously used 11.10 Ubuntu, and it had automatically detected the datastick modem and asked me to create a connection. On typing lsusb in the terminal it gives the following: **Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 003: ID 03f0:5307 Hewlett-Packard Bus 001 Device 008: ID 1c9e:9605 OMEGA TECHNOLOGY Bus 001 Device 006: ID 5986:0364 Acer, Inc tried to insert the modem before boot, with negative results **

    Read the article

  • How to change system time or force a time sync

    - by cpury
    My laptop is probably running out of CMOS battery, I know I have to fix it soon, but until then, this very annoying issue keeps me from using it. Scenario: My system clock is reset to 15/12/08 11:00 AM every time I turn on my computer. This has all sorts of side-effects, one of the more annoying being that I can't log into my gmail. At first I just waited for a time sync to happen, as I have that activated and all. It never happened. I googled and didn't find any way of enforcing a time sync, which I found very strange. Is there really none? Setting the time and date by hand is also a problem. For my 12.10 installation, the time & date settings are bugged. I remember it being for my last, older installation as well, though. Of course the easiest way should be to just manually edit the date and time fields by entering a new date. This is possible in theory, but the changes are reverted as soon as the text boxes loose focus. The other way to do it is to click the +-buttons for a long, long time. The first time I did that, the changes weren't stored either. I found out that afterwards I have to switch from manual to internet-sync mode and wait ~5 seconds until the in the top left corner of my system the new time is shown, or otherwise it won't have effect. So a nice solution would be one of the following: Setting the time/date by hand, maybe via terminal, so I can just enter the right values. Or, a command that would enforce an immediate time sync, that I can run after booting. I know I have to change the batteries soon, but this is seriously keeping me from working...

    Read the article

  • Why is my ipad's wireless so flakey?

    - by Mark
    I'm the proud owner of a new IPad here in the UK. All is good, except for the wifi, which is a bit flakey. It connects fine to my Draytek router which is set for WPA/WPA2 and 56g only, displaying full signal strength. Then, after a few minutes, it goes down to minimum strength... And sometimes it goes back up again. A few times, it seems to loose connection completely, and needs to be turned off and on again. I've looked at the Apple support site, and have tried their recommendations (which are not really very relevant), but still nothing. I've tried setting the router to wpa2 only, and setting long-preamble. Right now, I guess I want to know if it's a hardware problem with my device and should be returned, or if it's a problem with all ipads which will be resolved. Guess I could take it back to the Mac genius bar, but I find those guys so incredibly pretentious and, frankly, rather useless, that i'd rather wait until I've exercised other options!

    Read the article

  • Filtering columns in SQL Server replication - how?

    - by truthseeker
    Hi, I need to replicate some data from two tables in one database to another databases. I used snapshot replication. The issue is that I would like to replicate only some selected columns and the others should stay with untouched data. I don't want to loose their data. The sours of those columns is other system. So I need to replicate only data from my columns. Do anybody know how to achieve this?

    Read the article

  • How to refactor an OO program into a functional one?

    - by Asik
    I'm having difficulty finding resources on how to write programs in a functional style. The most advanced topic I could find discussed online was using structural typing to cut down on class hierarchies; most just deal with how to use map/fold/reduce/etc to replace imperative loops. What I would really like to find is an in-depth discussion of an OOP implementation of a non-trivial program, its limitations, and how to refactor it in a functional style. Not just an algorithm or a data structure, but something with several different roles and aspects - a video game perhaps. By the way I did read Real-World Functional Programming by Tomas Petricek, but I'm left wanting more.

    Read the article

  • Programming language features that help to catch bugs early

    - by Christian Neumanns
    Do you know any programming language features that help to detect bugs early in the software development process - ideally at compile-time or else as early as possible at run-time? Examples of well-known and effective bug-reducing features are: Static typing and generic types: type incompatibility errors are detected by the compiler Design by Contract (TM), also called Contract Programming: invalid values are quickly detected at runtime (through preconditions, postconditions and class invariants) Unit testing I ask this question in the context of improving an object-oriented programming language (called Obix) which has been designed from the ground up to 'make it easy to quickly write reliable code'. Besides the features mentioned above this language also incorporates other Fail-fast features such as: Objects are immutable by default Void (null) values are not allowed by default The aim is to add more Fail-fast concepts to the language. If you know other features which help to write less error-prone code then please let us know. Thank you.

    Read the article

  • My computer stops seeing the other computers on my network

    - by dan
    I'm running Ubuntu 11.04. Sometimes my computer stops seeing the names of the other computers on my network. So I can no longer log into another computer by typing the hosting name e.g. ssh [email protected] I can still log in using the local network IP address. How can I get the first way to work again without rebooting? I know this problem is local to the computer. The other computers on my network can still see one another. But they can no longer see the computer I'm working on, not even by local ip address.

    Read the article

  • Adding operation in middle of complex sequence diagram in visio 2003

    - by James
    I am using Microsoft Visio 2003 to define static classes with operations/methods and a sequence diagrams referring to these classes. The sequence diagram is almost done, but i realized that i missed one operation in middle of the diagram. When i try to move rest of the sequences down by selecting it as a block, all the operations in the block loose link with static diagrams. ( Methods which were referred to static classes as fun(), became fun, which means that now they no longer refer to static diagrams and any future changes would not be reflected in dynamic sequence diagrams automatically.) The sequence diagrams have grown to A3 size paper and i have many of such diagrams which needs correction. Manually moving the operations one by one would involve lots of effort. Could someone kindly suggest a way to overcome this problem?

    Read the article

  • Kubuntu login problem

    - by Balázs Mária Németh
    I have a problem when trying to login to my Kubuntu 10.10. The login screen shows up, then I type my password, a blank screen is shown with my desktop background picture and then throws me back on the login screen. if I choose to login from console, I can do that, and by typing startx I can log in just fine but in the end I cannot shutdown the computer from the k menu nor will my settings remembered for the next time I log back. I have my home directory mounted from a different partition but I tried to create a new user account and I could log in without any kind of problem. The home directory is not encrypted, at least not to my knowledge. Some log files: Xorg.0.log dmesg.out kdm.log xsession.errors

    Read the article

  • How to make unity unresponsive in Unity session in precise?

    - by Anwar Shah
    Recently I wanted to test the a keyboard shortcut, which is supposed to kill X server (hence very useful when you have a crash). That shortcut is not dependent on any particular window manager (like lxde, unity, kwin etc). So, it must work, even when you have unresponsive window manager (as opposed to Alt+Ctrl+Backspace which kills the session, and bring you a login screen). That's why I interested to make my WM (unity) unresponsive. Is past, it was very easy. Opening a terminal, typing unity --replace and then force close the terminal, was the simplest procedure. But unfortunately, This is not true in Ubuntu 12.04, (they make it very robust) Because whenever I kill the terminal, Unity automagically restart itself. I also tried compiz --replace but wasn't successful. My question is: How can I make Unity unresponsive while I am in Unity session, so that window manager does not recognize any keyboard shortcut.

    Read the article

  • Disable plugin in Firefox (acroread)

    - by cboettig
    I installed acroread from the repositories, and it has decided it should be the default plugin in Firefox, such that when I click on a pdf, it opens in a Firefox window. Unfortunately, it does not display (at least when in dual head mode). This should be simple, but I cannot disable the plugin. Under Firefox Edit - Preferences- Applications - pdf is set to "always ask" so I don't know why it uses acroread in the first place. Under Tools - Manage Content Plugins I see acroread is selected for pdf content. I have the option in the dropdown to search for a new plugin, but not to simply download the file. Typing about:config into the Firefox toolbar gives me a list of configuration options, but does not mention plugin.disable or acroread anywhere. How do I disable the plugin? I have Firefox 11.0 on Ubuntu 11.10

    Read the article

  • Touchpad not working on HP DV4 notebook

    - by Blaze
    the touchpad doesn't respond at all. i had to use an external usb mouse even to install ubuntu. I dont know the name of the manufacturer too. i am a newbie to ubuntu. i checked many related answers but they didnt help some are: sudo rmmod psmouse sudo modprobe psmouse proto=imps i used deconf editor_ in that it shows that touchpad is enabled but nothing haapens. i tried changing the setting 'disable while typing' that didn't work either. please help me. i really want to use ubuntu as i find it really good but without touchpad it would be pointless. literally.

    Read the article

  • How can I solve display glitches and poor performance with ATI fglrx driver on my ThinkPad X100e?

    - by rewbs
    I noticed that video performance on my Thinkpad X100e was very poor compared to Windows 7, so I installed the ATI fglrx proprietary drivers by using the "Additional Drivers" dialogue box. The system has an ATI Radeon Mobility HD 3200 chip. The result of installing the drivers is pretty devastatingly negative, with symptoms such as skewed content in windows, browser tabs and text boxes failing to refresh when their content changes. In fact, please excuse typos in this post, because I can't really see what I am typing. :) I also notice that HD video playback performance is no better - perhaps even worse - than prior to installing the drivers. Example of what I see: Here's the output of fglrxinfo: display: :0.0 screen: 0 OpenGL vendor string: ATI Technologies Inc. OpenGL renderer string: ATI Radeon HD 3200 Graphics OpenGL version string: 3.3.10237 Compatibility Profile Context Output of lspci | grep -i vga: 01:05.0 VGA compatible controller: ATI Technologies Inc RS780M/RS780MN [Radeon HD 3200 Graphics] I'm on Ubuntu 10.10 with kernel 2.6.35-22-generic-pae. What can I try? Many thanks, -R

    Read the article

  • A weekend with the Samsung Galaxy Tab

    - by Richard Mitchell
    This weekend I took one of the Samsung Galaxy Tabs we have lying around the office here home to see how I got on with it as I've been thinking of buying one. Initial impressions The look and feel of the Tab is quite nice. It's a lot smaller than an iPad but that is no bad thing as I imagine they are targeted at different markets. The Tab fits into my inside coat pocket nicely and doesn't feel like it's weighing me down too much. Connecting up the Tab to the network at work was fine, typing in...(read more)

    Read the article

  • Linux software raid robustness for raid1 vs other raid levels

    - by Waxhead
    I have a raid5 running and now also a raid1 that I set up yesterday. Since raid5 calculates parity it should be able to catch silent data corruption on one disk. However for raid1 the disks are just mirrors. The more I think about it I figure that raid1 is actually quite risky. Sure it will save me from a disk failure but i might not be as good when it comes to protecting the data on disk (who is actually more important for me). How does Linux software raid actually store raid1 type data on disk? How does it know what spindle is giving corrupt data (if the disk(subsystem) is not reporting any errors) If raid1 really is not giving me data protection but rather disk protection is there some tricks I can do with mdadm to create a two disk "raid5 like" setup? e.g. loose capacity but still keep redundancy also for data!?

    Read the article

  • Custom Configuration Section Handlers

    Most .NET developers who need to store something in configuration tend to use appSettings for this purpose, in my experience.  More recently, the framework itself has helped things by adding the <connectionStrings /> section so at least these are in their own section and not adding to the appSettings clutter that pollutes most apps.  I recommend avoiding appSettings for several reasons.  In addition to those listed there, I would add that strong typing and validation are additional reasons to go the custom configuration section route. For my ASP.NET Tips and Tricks talk, I use the following example, which is a simple DemoSettings class that includes two fields.  The first is an integer representing how many attendees there are present for the talk, and the second is the title of the talk.  The setup in web.config is as follows: <configSections> <section name="DemoSettings" type="ASPNETTipsAndTricks.Code.DemoSettings" /> </configSections>   <DemoSettings sessionAttendees="100" title="ASP.NET Tips and Tricks DevConnections Spring 2010" /> Referencing the values in code is strongly typed and straightforward.  Here I have a page that exposes two properties which internally get their values from the configuration section handler: public partial class CustomConfig1 : System.Web.UI.Page { public string SessionTitle { get { return DemoSettings.Settings.Title; } } public int SessionAttendees { get { return DemoSettings.Settings.SessionAttendees; } } } Note that the settings are only read from the config file once after that they are cached so there is no need to be concerned about excessive file access. Now weve seen how to set it up on the config file and how to refer to the settings in code.  All that remains is to see the file itself: public class DemoSettings : ConfigurationSection { private static DemoSettings settings = ConfigurationManager.GetSection("DemoSettings") as DemoSettings; public static DemoSettings Settings{ get { return settings;} }   [ConfigurationProperty("sessionAttendees" , DefaultValue = 200 , IsRequired = false)] [IntegerValidator(MinValue = 1 , MaxValue = 10000)] public int SessionAttendees { get { return (int)this["sessionAttendees"]; } set { this["sessionAttendees"] = value; } }   [ConfigurationProperty("title" , IsRequired = true)] [StringValidator(InvalidCharacters = "~!@#$%^&*()[]{}/;\"|\\")] public string Title { get { return (string)this["title"]; } set { this["title"] = value; }   } } The class is pretty straightforward, but there are some important components to note.  First, it must inherit from System.Configuration.ConfigurationSection.  Next, as a convention I like to have a static settings member that is responsible for pulling out the section when the class is first referenced, and further to expose this collection via a static readonly property, Settings.  Note that the types of both of these are the type of my class, DemoSettings. The properties of the class, SessionAttendees and Title, should map to the attributes of the config element in the XML file.  The [ConfigurationProperty] attribute allows you to map the attribute name to the property name (thus using both XML standard naming conventions and C# naming conventions).  In addition, you can specify a default value to use if nothing is specified in the config file, and whether or not the setting must be provided (IsRequired).  If it is required, then it doesnt make sense to include a default value. Beyond defaults and required, you can specify more advanced validation rules for the configuration values using additional C# attributes, such as [IntegerValidator] and [StringValidator].  Using these, you can declaratively specify that your configuration values be in a given range, or omit certain forbidden characters, for instance.  Of course you can write your own custom validation attributes, and there are others specified in System.Configuration. Individual sections can also be loaded from separate files, using syntax like this: <DemoSettings configSource="demosettings.config" /> Summary Using a custom configuration section handler is not hard.  If your application or component requires configuration, I recommend creating a custom configuration handler dedicated to your app or component.  Doing so will reduce the clutter in appSettings, will provide you with strong typing and validation, and will make it much easier for other developers or system administrators to locate and understand the various configuration values that are necessary for a given application. Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Add Reference with Search

    - by Daniel Cazzulino
    If you have been using VS2010 for any significant amount of time, you surely came across the awkward, slow and hard to use Add Reference dialog. Despite some (apparent) improvements over the VS2008 behavior, in its current form it's even LESS usable than before. A brief non-exhaustive summary of the typical grief with this dialog is: Scrolling a list of *hundreds* of entries? (300+ typically) No partial matching when typing: yes, you can type in the list to get to the desired entry, but the matching is performed in an exact manner, from the beginning of the assembly name. So, to get to the (say) "Microsoft.VisualStudio.Settings" assembly, you actually have to type the first two segments in their entirety before starting to type "Settings"....Read full article

    Read the article

  • Maximized Office 2007 gets cut off on multi-monitor setup with different resolutions

    - by Adam M-W
    I've got an external monitor plugged into my laptop that I like to use for typing up documents, but I've noticed that when Word is maximized it gets cut off at where the primary monitor's bounds are. Is this a bug in Wine (i'm using version 1.3.32), or with my Window Manager (metacity with compositing enabled, version 2.34.1), with my graphics drivers (nouveau) or something else? I know that I can fix it by unmaximizing (it doesn't get cut off and I can resize to the entirety of the second monitor), but it keeps on maximizing itself as it (rightly so) knows that it should be taking up the entire screen. I don't really want to use the "Emulate a virtual desktop feature", I would prefer to find the source of this issue.

    Read the article

  • adjust resolution on Ubuntu Server 10.04?

    - by Mike Grace
    Installed Ubuntu Server 10.04 on an old laptop and I noticed that the system is trying to show the CLI below my screen. This means that if I run a script or a program with a bunch of output, once it is done, I have to press return several times to bring the output to the point where I can actually see it on the screen. I also have to clear the screen to be able to see what I am typing at the current command prompt. The laptop is an EliteGroup 536S with a native screen resolution of 1024 x 768 How can I adjust the resolution for Ubuntu Server 10.04? What file do I need to edit if editing a file is the solution? I've seen posts on how to change the resolution on the desktop version of Ubuntu but not the server version.

    Read the article

  • Need Japanese IME with Dvorak keyboard with 13.10

    - by user916792
    I recently did a fresh install of 13.10 and enabled Japanese language support. In the past this seemed to work seamlessly with my other keyboard settings when I set up my Dvorak keyboard. But this time when I toggle the IME on it uses the standard QWERTY layout. Typing English uses the Dvorak layout as I expect. This just worked for me in the past to the point where I stopped paying attention to what the underlying IME is and I don't recall any special steps other then choosing my keyboard layout and enabling Japanese. Any help would be appreciated!

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >