Search Results

Search found 2970 results on 119 pages for 'implicit typing'.

Page 40/119 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Why the R# Method Group Refactoring is Evil

    - by Liam McLennan
    The refactoring I’m talking about is recommended by resharper when it sees a lambda that consists entirely of a method call that is passed the object that is the parameter to the lambda. Here is an example: public class IWishIWasAScriptingLanguage { public void SoIWouldntNeedAllThisJunk() { (new List<int> {1, 2, 3, 4}).Select(n => IsEven(n)); } private bool IsEven(int number) { return number%2 == 0; } } When resharper gets to n => IsEven(n) it underlines the lambda with a green squiggly telling me that the code can be replaced with a method group. If I apply the refactoring the code becomes: public class IWishIWasAScriptingLanguage { public void SoIWouldntNeedAllThisJunk() { (new List<int> {1, 2, 3, 4}).Select(IsEven); } private bool IsEven(int number) { return number%2 == 0; } } The method group syntax implies that the lambda’s parameter is the same as the IsEven method’s parameter. So a readable, explicit syntax has been replaced with an obfuscated, implicit syntax. That is why the method group refactoring is evil.

    Read the article

  • MVVM - how to make creating viewmodels at runtime less painfull

    - by Mr Happy
    I apologize for the long question, it reads a bit as a rant, but I promise it's not! I've summarized my question(s) below In the MVC world, things are straightforward. The Model has state, the View shows the Model, and the Controller does stuff to/with the Model (basically), a controller has no state. To do stuff the Controller has some dependencies on web services, repository, the lot. When you instantiate a controller you care about supplying those dependencies, nothing else. When you execute an action (method on Controller), you use those dependencies to retrieve or update the Model or calling some other domain service. If there's any context, say like some user wants to see the details of a particular item, you pass the Id of that item as parameter to the Action. Nowhere in the Controller is there any reference to any state. So far so good. Enter MVVM. I love WPF, I love data binding. I love frameworks that make data binding to ViewModels even easier (using Caliburn Micro a.t.m.). I feel things are less straightforward in this world though. Let's do the exercise again: the Model has state, the View shows the ViewModel, and the ViewModel does stuff to/with the Model (basically), a ViewModel does have state! (to clarify; maybe it delegates all the properties to one or more Models, but that means it must have a reference to the model one way or another, which is state in itself) To do stuff the ViewModel has some dependencies on web services, repository, the lot. When you instantiate a ViewModel you care about supplying those dependencies, but also the state. And this, ladies and gentlemen, annoys me to no end. Whenever you need to instantiate a ProductDetailsViewModel from the ProductSearchViewModel (from which you called the ProductSearchWebService which in turn returned IEnumerable<ProductDTO>, everybody still with me?), you can do one of these things: call new ProductDetailsViewModel(productDTO, _shoppingCartWebService /* dependcy */);, this is bad, imagine 3 more dependencies, this means the ProductSearchViewModel needs to take on those dependencies as well. Also changing the constructor is painfull. call _myInjectedProductDetailsViewModelFactory.Create().Initialize(productDTO);, the factory is just a Func, they are easily generated by most IoC frameworks. I think this is bad because Init methods are a leaky abstraction. You also can't use the readonly keyword for fields that are set in the Init method. I'm sure there are a few more reasons. call _myInjectedProductDetailsViewModelAbstractFactory.Create(productDTO); So... this is the pattern (abstract factory) that is usually recommended for this type of problem. I though it was genious since it satisfies my craving for static typing, until I actually started using it. The amount of boilerplate code is I think too much (you know, apart from the ridiculous variable names I get use). For each ViewModel that needs runtime parameters you'll get two extra files (factory interface and implementation), and you need to type the non-runtime dependencies like 4 extra times. And each time the dependencies change, you get to change it in the factory as well. It feels like I don't even use an DI container anymore. (I think Castle Windsor has some kind of solution for this [with it's own drawbacks, correct me if I'm wrong]). do something with anonymous types or dictionary. I like my static typing. So, yeah. Mixing state and behavior in this way creates a problem which don't exist at all in MVC. And I feel like there currently isn't a really adequate solution for this problem. Now I'd like to observe some things: People actually use MVVM. So they either don't care about all of the above, or they have some brilliant other solution. I haven't found an indepth example of MVVM with WPF. For example, the NDDD-sample project immensely helped me understand some DDD concepts. I'd really like it if someone could point me in the direction of something similar for MVVM/WPF. Maybe I'm doing MVVM all wrong and I should turn my design upside down. Maybe I shouldn't have this problem at all. Well I know other people have asked the same question so I think I'm not the only one. To summarize Am I correct to conclude that having the ViewModel being an integration point for both state and behavior is the reason for some difficulties with the MVVM pattern as a whole? Is using the abstract factory pattern the only/best way to instantiate a ViewModel in a statically typed way? Is there something like an in depth reference implementation available? Is having a lot of ViewModels with both state/behavior a design smell?

    Read the article

  • High contrast theme Firefox problem

    - by user87239
    I am using the high contrast inverse theme in 12.04 as I am visually impaired. This generally works great but causes a problem in Firefox as entered text e.g into a Google search is white. As the text background is also white you cannot see what you are typing. I have read through a good thirty websites with similar issues but thus far nothing works. I have tried all the settings in Firefox like un-checking "Use System Defaults" as well as manually telling Firefox what colours to use and these setting have absolutely no effect on anything.

    Read the article

  • HTG Explains: Why Does Photo Paper Improve Print Quality?

    - by Eric Z Goodnight
    So you’ve shelled out the money for a fancy inkjet photo printer, only you’re not impressed with the images you’re getting out of your standard office paper. Have you ever wondered why that photo paper works so much better? Surely, paper is paper, right? What can be so special about it? In this article, we’ll explore the differences between regular typing paper, why these differences are good for printing, and how to take advantage of them for superior photographic printing Latest Features How-To Geek ETC The 50 Best Registry Hacks that Make Windows Better The How-To Geek Holiday Gift Guide (Geeky Stuff We Like) LCD? LED? Plasma? The How-To Geek Guide to HDTV Technology The How-To Geek Guide to Learning Photoshop, Part 8: Filters Improve Digital Photography by Calibrating Your Monitor Our Favorite Tech: What We’re Thankful For at How-To Geek Settle into Orbit with the Voyage Theme for Chrome and Iron Awesome Safari Compass Icons Set Escape from the Exploding Planet Wallpaper Move Your Tumblr Blog to WordPress Pytask is an Easy to Use To-Do List Manager for Your Ubuntu System Snowy Christmas House Personas Theme for Firefox

    Read the article

  • StreamInsight Now Available Through Microsoft Update

    - by Roman Schindlauer
    We are pleased to announce that StreamInsight v1.1 is now available for automatic download and install via Microsoft Update globally. In order to enable agile deployment of StreamInsight solutions, you have asked of us a steady cadence of releases with incremental, but highly impactful features and product improvements. Following our StreamInsight 1.0 launch in Spring 2010, we offered StreamInsight 1.1 in Fall 2010 with implicit compatibility and an upgraded setup to support side by side installs. With this setup, your applications will automatically point to the latest runtime, but you still have the choice to point your application back to a 1.0 runtime if you choose to do so. As the next step, in order to enable timely delivery of our releases to you, we are pleased to announce the support for automatic download and install of StreamInsight 1.1 release via Microsoft Update starting this week. If you have a computer: that is subscribed to Microsoft Update (different from Windows Update) has StreamInsight 1.0 installed, and does not yet have StreamInsight 1.1 installed, Microsoft Update will automatically download and install the corresponding StreamInsight 1.1 update side by side with your existing StreamInsight 1.0 installation – across all supported 32-bit and 64-bit Windows operating systems, across 11 supported languages, and across StreamInsight client and server SKUs. This is also supported in WSUS environments, if all your updates are managed from a corporate server (please talk to the WSUS administrator in your enterprise). As an example, if you have SI Client 1.0 DEU and SI Server 1.0 ENU installed on the same computer, Microsoft Update will selectively download and side-by-side install just the SI Client 1.1 DEU and SI Server 1.1 ENU releases. Going forward, Microsoft Update will be our preferred mode of delivery – in addition to support for our download sites, and media based distribution where appropriate. Regards, The StreamInsight Team

    Read the article

  • Programming languages similar to ActionScript 3 / EcmaScript based

    - by Juanlu001
    I almost learned programming and OOP basic concepts with ActionScript 3 on the Flash Platform years ago. Some time has passed since then; I'm not a professional programmer, but I have written code in PHP, Fortran, and now Python. But, lately, I have missed ActionScript 3 OOP implementation, static typing and, I confess, curly braces. As Flash platform is slowly dying nowadays, I'm looking for an Open Sourced programming language similar to ActionScript 3. I've read about Java, which is the most similar one I found, but actually is the only one it doesn't interest me (I started to hate it after bad experiences with web applets). Any ideas? Edit: Added EcmaScript to the title and the tags; I think that is what I am looking for.

    Read the article

  • dead keys not working in java app

    - by jippie
    The Arduino IDE is based on a java application called processing. While typing text into processing, it refuses to accept any of the characters under dead keys like " ' ^. As a work around I: Open another window (usually my browser or mail client); I type the character I need; Select and copy the character onto my clip board; Copy the character into processing. What do I have to do to make processing accept characters under dead keys? Disabling dead keys is not an option.

    Read the article

  • adding executable file to path and launching from terminal directly

    - by ubunnttuu
    i just downloaded sublime text for my ubuntu, and its working fine. i have the executable file in my ~/sublime folder. now i would like to invoke this app from the terminal by just typing sublime. i suppose that is possible, pls let me know how. also, since this application did not need any configure/make/install (i just had to extract it and then use the exec file to run the app), i cannot add this to my gnome launcher fav apps panel. how can i put the app shortcut there, so that when i do a top-left and then type sublime, the results will show the applicaion and then i can click on it and invoke the app from there? thanks!

    Read the article

  • Changing internal home network ip address for connected devices

    - by oshirowanen
    I have a few computers at home. For each of the computers, I can see the internal home network ip address on any given device by typing in ifconfig in the terminal. If the device is connected to the home network via ethernet connection or via the built-in wireless connections in laptops, the internal ip address for each of the devices seems to be 192.168.0.X. However, when I connect one of the devices using an external usb modem wireless adapter, which connects to the home network through wireless, when I check the ip address via ifconfig, for some reason it gets assigned 192.168.42.X instead. Why are the ethernet and build in wireless connections getting 192.168.0.X, but the external usb wireless adapter gets 192.168.42.X? Most importantly, is it possible to force it to get an internal ip address of 192.168.0.X?

    Read the article

  • ClearTrace Shows Execution History

    - by Bill Graziano
    The latest release of ClearTrace (Build 38) now shows the execution history of a particular statement. You’ll need to save the trace files to a trace group instead of just using the default.  That’s as easy as typing something into the trace group name when you upload the trace.  I usually put the server name in this field. Build 38 also re-enables support for statement level events.  If your trace includes RPC:StmtCompleted or SQL:StmtCompleted events those will be processed and save.  In the results tab you can choose to view statement level or batch level events.  Please note that saving statement level events in a trace can generate HUGE trace files very quickly.

    Read the article

  • After executing a command in the terminal, I sometimes can't execute another

    - by jreed121
    First off sorry for the noob question, I'm sure it's been asked before but I have no idea how to phrase it eloquently... Sometimes when I open/run/execute (unsure of proper term) an application (?lol) from the terminal like geany ie: geany filename.php or maybe run a node.js script: node server.js The command will execute fine, but I'm then left without the ability to execute any other commands unless I open another terminal. my root@pcname:~$ is gone and when I try typing in something else and hitting Enter it just breaks to the next line. I've noticed that sometimes I can hit CTRL+D and it'll give me my prompt back (sorry is prompt even the right name for it?) So could someone please explain why this is happening and how I can get back to the prompt without opening another terminal. Thanks, and sorry again for my noobery.

    Read the article

  • Is it good to buy multiple domains for competitive reasons?

    - by lowestofthekeys
    I am attempting to convince the higher ups at my company that spending $55 to renew one domain for a year is bad when they end up having 3-4 domains names for one website. They're reasoning for doing so is to keep these domains names out of the hands of the competition. For example, the company name is Pie Consulting & Engineering. They want to buy up pieforensicconsulting.com to keep it out of the hands of a competitor (we also do forensic engineering). Could a competitor use that domain in any kind of diabolical way? I mean I figure if someone is typing in pieforensiconsulting into the url field, they know what they're looking for and if it redirects to another company, they're not just going to stay on the site.

    Read the article

  • Ubuntu cant load sound cart

    - by Reza Marefaty
    I have installed Ubuntu 12 and i cant see any volume controller on it and so no audio player can detect any sound card and nothing shown in system setting - sound - output tab. but i can see my hard ware by typing this command : aplay -l Return : List of PLAYBACK Hardware Devices ** card 0: Intel [HDA Intel], device 0: HDA Generic [HDA Generic] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: U0x4d90x20 [USB Device 0x4d9:0x20], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 How can i activate sound ? Edit : This info may helep for the solution : sudo lspci | grep Audio 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01) 04:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Cedar HDMI Audio [Radeon HD 5400/6300 Series]

    Read the article

  • Command line options style - POSIX or what?

    - by maaartinus
    Somewhere I saw a rant against java/javac allegedly using a mix of Windows and Unix style like java -classpath ... -ea ... Something IMHO, it is no mix, it's just like find works as well, isn't it? AFAIK, according to POSIX, the syntax should be like java --classpath ... --ea ... Something and -abcdef would mean specifying 6 short options at once. I wonder which version leads in general to less typing and less errors. I'm writing a small utility in Java and in no case I'm going to use Windows style /a /b since I'm interested primarily in Unix. What style should I choose?

    Read the article

  • after i typed in my username then it just quit the window and do nothing

    - by Bosco S. Chan
    I have a vaio VGN-FJ270P/B laptop which originally installed a windows xp professional in it. Last week, i had enough about the speed of windows and bought a brand new fresh SSD [M5S 128GB] and 2 new RAMS [1GB x2]. And i used my desktop to install a LiveUSB and downloaded the latest ubuntu and installed it [Universal USB Installer + Ubuntu 12.04.1]. All seems find through partition and typing my username and password. just after i typed in my password, i pressed continue and then it pop-up the window about choosing the profile picture for my account and it immediately disappear and went doing nothing. What's happening with it? any help would be appreciate...! Thanks!! Bosco

    Read the article

  • 12.04 64 bit: Keybord not responding for about 20 seconds at startup/beginning of session

    - by Danilo
    I am running Ubuntu 12.04 64bit. When I get at the login screen and try to type the password for my user, I cannot type anything for about 20 seconds. After that, the keyboard starts responding and everything works fine. Mouse is responding normally as well as all buttons of the login interface (time/calendar, session selection (Unity/Unity 2D), etc.). What could be the reason for this behavior? How can I solve this temporary freeze of the keyboard so that I can type my password immediately without having to wait each time? Thanks for your time. EDIT: I tried auto login, but the problem is still there: the Desktop loads but even there, if I try to type something in the dash or anywhere else, I must wait about 20 seconds before I can actually start typing. Can the issue be related to some keyboard modules that get loaded little bit "too late"?

    Read the article

  • Creating a level editor event system

    - by Vaughan Hilts
    I'm designing a level editor for game, and I'm trying to create sort of an 'event' system so I can chain together things. If anyone has used RPG Maker, I'm trying to do similar to their system. Right now, I have an 'EventTemplate' class and a bunch of sub-classed 'EventNodes' which basically just contain properties of their data. Orginally, the IAction and IExecute interface performed logic but it was moved into a DLL to share between the two projects. Question: How can I abstract logic from data in this case? Is my model wrong? Isn't cast typing expensive to parse these actions all the time? Should I write a 'Processor' class to execute these all? But then these actions that can do all sorts of things need to interact with all sorts of sub-systems.

    Read the article

  • What algorithm(s) can be used to achieve reasonably good next word prediction?

    - by yati sagade
    What is a good way of implementing "next-word prediction"? For example, the user types "I am" and the system suggests "a" and "not" (or possibly others) as the next word. I am aware of a method that uses Markov Chains and some training text(obviously) to more or less achieve this. But I read somewhere that this method is very restrictive and applies to very simple cases. I understand basics of neural networks and genetic algorithms(though have never used them in a serious project) and maybe they could be of some help. I wonder if there are any algorithms that, given appropriate training text(e.g., newspaper articles, and the user's own typing) can come up with reasonably appropriate suggestions for the next word. If not (links to)algorithms, general high-level methods to attack this problem are welcome.

    Read the article

  • Calling COM from Intel Fortran?

    - by user57460
    I'm trying to get COM working from my Fortran application. I do a "COMINITIALIZE" followed by a "COMCreateObjectByProgID". Both of these appear to be successful and return a status of zero. However, when I try to use the COM object, I get "Unhandled exception at 0x00000000 in FortranProg01.exe: 0xC0000005: Access violation." I realize that this error can mean almost anything, but has anyone got some suggestions of common problems with COM that produce this problem? Here are some more details. My program code: program FortranProg01 use myolepg implicit none integer*4 comInitStatus integer:: comCreateStatus INTEGER(INT_PTR_KIND()) $OBJECT INTEGER(4) funcResult REAL(8) pkgVersion call COMINITIALIZE(comInitStatus) print *, comInitStatus call COMCreateObjectByProgID('MyOlePg.MyOlePkg', $OBJECT, comCreateStatus) print *, comCreateStatus funcResult = IMyOlePkg_GetPackageVersion($OBJECT, pkgVersion) print *, funcResult call COMUNINITIALIZE() end program FortranProg01 The wizard-generated interface code: INTERFACE !property PackageVersion INTEGER(4) FUNCTION IMyOlePkg_GetPackageVersion($OBJECT, pVal) INTEGER(INT_PTR_KIND()), INTENT(IN) :: $OBJECT ! Object Pointer !DEC$ ATTRIBUTES VALUE :: $OBJECT REAL(8), INTENT(OUT) :: pVal !DEC$ ATTRIBUTES REFERENCE :: pVal !DEC$ ATTRIBUTES STDCALL :: IMyOlePkg_GetPackageVersion END FUNCTION IMyOlePkg_GetPackageVersion END INTERFACE Any help would be much appreciated! Thanks! Brad.

    Read the article

  • iwconfig usage for WEP access point?

    - by johan elmander
    I would like to use my wifi doggle in my pc (ubuntu 12.04). I am able to connect to my access point through the GUI. I would like to do the same in the terminal. My access point uses WEP. So I typed the following commands iwconfig wlan0 mode managed key 6d6f6e6579 iwconfig wlan0 essid "AccessPoint" dhclient wlan0 after typing dhclient wlan0 it waits like 1-2 min then outputs nothing and cannot connect to the Access Point. iwconfig output: wlan0 IEEE 802.11bgn ESSID:"AccessPoint" Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm Retry long timit:7 RTS thr=2347 B Fragment thr:off Encryption key:6D6F-6E65-79 Power Management:off I would appreciate any suggestion

    Read the article

  • In launcher, disable the music suggestion section

    - by Nicolas Raoul
    Everytime I want to launch an office program, I begin typing "of" in the launcher, and... pictures of lightly-clothed ladies show up. Not the end of the world, but because I do this a lot in front of customers and bosses, it is often embarrassing. I have already disabled Zeitgeist and "recently used". Banshee does not have any Zeitgeist item in Edit > Preferences > Extensions. Is there a way to disable this "Music" section in the launcher suggestions? Or maybe I just must stop playing dance music via Banshee...

    Read the article

  • How can I install canon pixma ip100 driver for Ubuntu 12.04LTS 64bit?

    - by kina
    I tried installing the driver by typing the following commands in the terminal: sudo add-apt-repository ppa:michael-gruz/canon - the result was the following: You are about to add the following PPA to your system: More info: https://launchpad.net/~michael-gruz/+archive/canon Press [ENTER] to continue or ctrl-c to cancel adding it Then I typed: sudo apt-get update - the result was the following: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.HDuHmOSJ0l --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv 84E550CD36EC35430A66AC5A03396E1C3F7B4A1D gpg: requesting key 3F7B4A1D from hkp server keyserver.ubuntu.com gpg: key 3F7B4A1D: "Launchpad Misakovi" not changed gpg: Total number processed: 1 gpg: unchanged: 1 I typed the next command: sudo apt-get install cnijfilter-ip100series The return response was: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package cnijfilter-ip100series Does anyone know the solution? Kina

    Read the article

  • Eclipse not launching

    - by user274959
    I have installed Ubuntu 14.04, I have installed Eclipse using Ubuntu Software Center. But Eclipse is not opening, when I click it is not opening or showing any error message it is very silent. Output for java -version: java version "1.7.0_55" Java(TM) SE Runtime Environment (build 1.7.0_55-b13) Java HotSpot(TM) Server VM (build 24.55-b03, mixed mode) uname -a: Linux Lenovo-IdeaPad-Z510 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:08:14 UTC 2014 i686 i686 i686 GNU/Linux When I give Eclipse in terminal I am getting The program 'eclipse' is currently not installed. You can install it by typing: sudo apt-get install eclipse-platform And when I give sudo apt-get install eclipse-platform Reading package lists... Done Building dependency tree Reading state information... Done eclipse-platform is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

    Read the article

  • Gnome shell crashing in 11.10 with 'purple haze' effect

    - by Andy
    I've just got Gnome with 11.10 up and running with my netbook and liked it so much I thought I'd get my parents old machine sorted with Ubuntu too. Unity works fine but when I try to switch to Gnome shell, I get problems. On login, the wallpaper appears as normal but then the colour bleeds out from the centre, leaving traces of it around the edge in a purple haze (yes, I do like Jimi Hendrix but I'm not making this up). When I go to applications, typing then pressing enter in the search field dumps me out so there's nothing but File / Edit / View etc in top left; starting a program seems to work but then there's only a white screen and no program window. Gnome classic works fine, from the limited use I've given it. I'm using an Asus desktop with ABIT motherboard, 2.6ghz with 1gb RAM; I've checked drivers and it says I'm up to date, Nvidia graphics. Anyone any ideas?

    Read the article

  • How can I delay dropbox from starting, but not disable it?

    - by jgbelacqua
    When I log into my user account on Ubuntu 10.10, there is a unsatisfying delay before my system becomes usable. Even launching a terminal, I have to wait a few seconds before the bash prompt appears. During this start-up period, the top process seems to be dropbox. I'm not sure what it's doing exactly (functionality is still fine as far as I can see), but I do know it really doesn't need to be doing it while I'm waiting for desktop to appear. (This is the standard Ubuntu with Gnome desktop, by the way.) What I would like to do is to be able to have a static or even dependency-based delay for dropbox to start. It would be nice if it waited for, e.g., 10 minutes, or for my browser tabs to load and a typing pause. Then it could churn away on file status or cache-chewing, and I would be happy. Is there a way to do this? Thanks!

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >