Daily Archives

Articles indexed Tuesday May 27 2014

Page 7/16 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • What is a good way to share internal helpers?

    - by toplel32
    All my projects share the same base library that I have build up over quite some time. It contains utilities and static helper classes to assist them where .NET doesn't exactly offer what I want. Originally all the helpers were written mainly to serve an internal purpose and it has to stay that way, but sometimes they prove very useful to other assemblies. Now making them public in a reliable way is more complicated than most would think, for example all methods that assume nullable types must now contain argument checking while not charging internal utilities with the price of doing so. The price might be negligible, but it is far from right. While refactoring, I have revised this case multiple times and I've come up with the following solutions so far: Have an internal and public class for each helper The internal class contains the actual code while the public class serves as an access point which does argument checking. Cons: The internal class requires a prefix to avoid ambiguity (the best presentation should be reserved for public types) It isn't possible to discriminate methods that don't need argument checking   Have one class that contains both internal and public members (as conventionally implemented in .NET framework). At first, this might sound like the best possible solution, but it has the same first unpleasant con as solution 1. Cons: Internal methods require a prefix to avoid ambiguity   Have an internal class which is implemented by the public class that overrides any members that require argument checking. Cons: Is non-static, atleast one instantiation is required. This doesn't really fit into the helper class idea, since it generally consists of independent fragments of code, it should not require instantiation. Non-static methods are also slower by a negligible degree, which doesn't really justify this option either. There is one general and unavoidable consequence, alot of maintenance is necessary because every internal member will require a public counterpart. A note on solution 1: The first consequence can be avoided by putting both classes in different namespaces, for example you can have the real helper in the root namespace and the public helper in a namespace called "Helpers".

    Read the article

  • Why should I use Bower? [closed]

    - by Wil
    I can fully appreciate the benefits of a package manager like Python PIP, Node npm, or Ruby Gems since they're doing much more than adding files to your applications path. Maybe I'm missing the point, or I'm being obtuse, but here are the negatives I can see: Separate step when building a project Separate dependency to install via another package manager (yo dawg) More clutter in the projects root with bower.json and / or .bowerrc Reliance on the registry being up to date, correct, and available Some imports / references to things like images won't work The positives I can see are these: I don't have to download the dependencies manually Optionally install packages as part of scaffolding based on user prompts or the like I'd really like to know of any benefits I'm unaware of, and I should say I'm not trying to be provocative I genuinely want to know.

    Read the article

  • C# Interview Preparation - References?

    - by Kanini
    This is a specific question relating to C#. However, it can be extrapolated to other languages too. While one is preparing for an interview of a C# Developer (ASP.NET or WinForms or ), what would be the typical reference material that one should look at? Are there any good books/interview question collections that one should look at so that they can be better prepared? This is just to know the different scenarios. For example, I might be writing SQL Stored Procedures and Queries, but I might stumble when asked suddenly Given an Employee Table with the following column(s). EmployeeId, EmployeeName, ManagerId Write a SQL Query which will get me the Name of Employee and Manager Name? NOTE: I am not asking for a Question Bank so that I can learn by rote what the questions are and reproduce them (which, obviously will NOT work!)

    Read the article

  • aticonfig detects all graphics cards, but amdcccle shows the cards as disabled

    - by DevZer0
    I been having the strangest problem since few days ago. I have 3 ATI graphics cards and the aticonfig --list-adapter shows the following output * 0. 01:00.0 AMD Radeon HD 7900 Series 1. 02:00.0 AMD Radeon HD 7900 Series 2. 05:00.0 AMD Radeon HD 7900 Series when i do aticonfig --adapter=all --initial -f it generates the correct X config also. but after rebooting the output only show on primary monitor and when i look in amdcccle it shows the other 2 adapters as disabled. I tried with monitors attached and dummy plugs both but the situation doesn't change. Any idea whats causing this? also right clicking and making the adapter enabled in amdcccle and saving changes causes the X config to only have the adapter section and no screen section. after reboot the situation stays the same.

    Read the article

  • Where does node.js install to?

    - by Ash Scott
    I'm trying to install a script, which is a clone of a game, and uses node.js for it. Now, the documentation says I should copy the node.exe (windows) and put it where the clone is. Now, I can't find the node.exe ubuntu equivalent, I can't even find where it's installed?! Don't really want this hosted on a windows machine due to licensing. Here's a snipet from the doc: Download : Node.js (Install Button) Go where you are install Node.js (For Windows 8 it's C:/Programms/nodejs) Copy node.exe and paste on the clone folder Now I need to do this in ubuntu, however I can't find where node is installed to? Any ideas?

    Read the article

  • Uninstall Ubuntu

    - by Geordie Dave
    So recently I downloaded the most recent ubuntu iso for installation alongside my Windows 8.1. Everything went really smoothly with no errors or hiccups during installation. The only thing is I've decided that I just wanna go back to using Windows 8.1. I haven't a clue how to uninstall ubuntu now. I was going to use the windows installer but there wasn't one available, however fund this latest iso which provided a much improved installer which as I said made things go a lot better. Has anyone any idea how to uninstall it as I tried the DVD I burnt the iso to and all it gives me the option of is reinstalling ubuntu, there is no option to uninstall once I've installed. Any ideas anyone?

    Read the article

  • deb package building

    - by newcode
    While trying to build a package, I gave the following command in terminal: cd Downloads/src/ cd unity-5.10.0/ dpkg-buildpackage -rfakeroot -uc -b Then it gives the output: dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): -D_FORTIFY_SOURCE=2 dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2 dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions -Wl,-z,relro dpkg-buildpackage: source package unity dpkg-buildpackage: source version 5.10.0-0ubuntu6 dpkg-buildpackage: source changed by Didier Roche <[email protected]> dpkg-buildpackage: host architecture i386 dpkg-source --before-build unity-5.10.0 dpkg-checkbuilddeps: Unmet build dependencies: libutouch-grail-dev (>= 1.0.20) libutouch-geis-dev (>= 2.0.10) dpkg-buildpackage: warning: Build dependencies/conflicts unsatisfied; aborting. dpkg-buildpackage: warning: (Use -d flag to override.) Then I tried to install the package using: cd.. sudo dpkg -i *deb And it gives: [sudo] password for harshnarang8: dpkg: error processing *deb (--install): cannot access archive: No such file or directory Errors were encountered while processing: *deb What is exactly causing the problem and how to encounter it?

    Read the article

  • OpenVpn is working but no internet connection

    - by user3636476
    I'm using an OpenVpn connection in Ubuntu, it's working well but when I'm using it, my internet connection is not working. I edited my connections in network manager, I've been to the VPN tab, and edited the VPN configuration. In the IPv4 Settings tab, I clicked in the bottom right button "Routes" and I ticked "Use this connection only for resources on its network". When I'm doing this the internet access is working but the vpn is not any help please?

    Read the article

  • problem in installing binutils

    - by user3667930
    when am trying to install mspgcc on ubuntu 14.04 version am getting an error at "make" during installation of binutils... following are the commands i used.. sir please help me in fixing this error.Thanks in advance.. wget http://ftpmirror.gnu.org/binutils/binutils-2.21.1a.tar.bz2 tar xvfj binutils-2.21.1a.tar.bz2 cd binutils-2.21.1 patch -p1 < ../mspgcc-20120406/msp430-binutils-2.21.1a-20120406.patch cd .. mkdir -p BUILD/binutils cd BUILD/binutils ../../binutils-2.21.1/configure --target=msp430 --program-prefix="msp430-" --with-mpfr-include=/usr/local/include -with-mpfr-lib=/usr/local/lib --with-gmp-include=/usr/local/include -with-gmp-lib=/usr/local/lib --with-mpc-include=/usr/local/include -with-mpc-lib=/usr/local/lib make -j 4 sudo make install cd ../..

    Read the article

  • Samba: map domain group to local one

    - by user285467
    I have a problem with mapping pure domain group to one existing on UNIX system. When I map NT domain account by default samba picks local SID - one that can be acquired via the command; net getlocalsid Instead of SID that comes from domain; net getdomainsid This is the behavior that I do not understand. I can explicitly set the SID to the domain one. E.g.: net groupmap add sid=[DOMAIN SID]-[RID] ntgroup=[DOMAIN group] unixgroup=[UNIX group] type=l However the command getent group | grep 'DOMAIN group indicates this group to be domain one - GID created in accordance to RID backend in use, not the GID of 'UNIX group' as expected. Worth to mention I use the winbind. Strange thing is that I already have such mapping in place for other 'DOMAIN group2' that getent group reports with GID of local UNIX group with all members of the 'DOMAIN group2'. Now the question is how to populate such behavior for other of my groups???

    Read the article

  • send music to upnp device from PC

    - by markrich
    I have a new Arcam AirDAC (http://www.arcam.co.uk/products,rSer...ACs,airDAC.htm) attached to my stereo which has upnp support. I would like to send audio from my 14.04 PC to the box itself and to this end installed Rygel upon my system to help but it hasn't. I have created a new sound device in PulseAudioPreferences and selected it from inidcator-sound-switcher but here I become stuck. The sound is heading to the new sound device as the volume can be seen to go up and down from PulseAudioVolumeControl but no sound comes from the stereo downstairs. The problem, as I see it, is the new device has no idea where to send the music as the Arcam hasn't been chosen from any program. So - I installed BubbleUPNP and Plex. My music has been imported into the later and the former can see both the Arcam as a Renderer and the Plex as the Media Server. Installing the BubbleUPNP program on my Android tablet allowed me to send music and all seemed good UNTIL I started playing AIFF and ALAC music and it all stopped. No suitable decoding device. So that scuppered that route. So here I am and stuck. How can I tell Ubuntu to use the Arcam as a renderer to play music through when the albums are played from Rhytmnbox, Tomahawk, Clementine or other? Clementine would be my preferred client as there is a usable remote control program for the tablet. Can anyone help me fix this or advice another way to do what I would like?

    Read the article

  • User upstart session in different window manager wIndow manager

    - by Joelmob
    I am using Ubuntu 14.04 and i3 as window manager. After I have logged in to i3, upstart won't find my user jobs under ~/.config/upstart/. How can I make upstart find these config files without having to execute something like gnome-session? Thanks. edit, one of the jobs starts redshift, here is the config ~/.config/upstar/redshift.conf: respawn exec redshift -l 59:18 When i try to start this job with initctl start redshift: initctl: Unknown job: redshift

    Read the article

  • Best Graphics card (Setup) for three, high-res monitors attached to desktop

    - by nomrasco
    I have been looking around a little bit, but most of the discussions are about problems with already existing systems (particular graphics card and setup etc.). I would like to ask what would be the best option for me if I want to build powerful desktop with triple monitor setup. I have one Dell UltraSharp U2713HM (27 inches, 2560x1440) and I was thinking about getting two more. Would it be possible to have those three working with ubuntu (kubuntu) on any graphics card out there today? What is the best option if it comes to choosing particular model? Should I use proprietary drivers or some open sourced ones? I am not a gamer. I mostly develop on my machines and running some computational tasks, but I would rather like to spend some more money and have setup where I don't see any lags :) thank You very much in advance! Darek

    Read the article

  • redefine shortcuts for keys being set to default after reboot

    - by MYA
    i am using PHPStorm editor on Ubuntu 14.04. Everything is so smooth that I am loving the experience (especially the workspace experience is amazing) however this bug is giving me headache... some of the editor's short-cuts clash with default Ubuntu keys (Alt + Ctrl + Left,Right,Up or Down arrow keys). I have changed the default keys to (super + Left,Right,Up and Down arrow keys) so they don't collide with my editor but after the reboot, Ubuntu changes are somehow reverting to default. This keeps comming again and again. i am sure there is a way out so therefore need help with that...

    Read the article

  • Triple monitors on hybrid video system GeForce+Intel

    - by v_mil
    I use Lenovo Ideapad Z580A with hybrid video: GeForce+Intel with Ubuntu 12.10 x64 Ukrainian. It has internal display and two outputs: HDMI and VGA. When I connect third display to VGA all displays go black. Pressing alt+backspace and login causes output to two displays: internal and VGA. System Settings - Displays (or monitors - I have Ukrainian interface) shows three displays: two are on, one (DVI) is off. Turning DVI on and pressing apply causes an error: Can not set configuration of controller CRTC 65. BIOS setting is Optimus (two video cards). Driver for GeForce is Nouveau. With best regards. Viktor.

    Read the article

  • Correct drivers for AMD Radeon™ HD 7650M

    - by Hailwood
    So, I have a Sony Vaio sve15118fg running Ubuntu 12.10 which comes with an AMD Radeon™ HD 7650M graphics chip. This was all working fine until some updates (note sure what they were) came through, after installing my laptop now no longer boots properly, specifically: Upon attempting to boot the screen starts flicking violent striped horizontal lines. This can only be corrected via the power button. Attempting to do anything in recovery - bar dropping to a root shell - runs fsck which ends up hanging (although the system still responds there is no HDD activity). This is remedied via Ctrl+Alt+Delete to restart the system. Running fsck manually from the root shell completes successfully. I have attempted numerous things including removing all propriety drivers, Trying the two installed propriety drivers, installing the latest beta driver from AMD. etc. These all yeild various results, such as the same as above, or a gnome-fallback session, or a gnome-shell session with various flickers and graphical artifacts. So, I am wondering, what the heck do I have to do to get this to work?!? I don't really game, especially in ubuntu, so I just want a working system! not fussed about 3d acceleration of whatever...

    Read the article

  • How can I download the source code for linux-image-3.2.0-*-generic?

    - by keepitsimpleengineer
    The directions at Ubuntu Wiki apt-get source linux-image-$(uname -r) and askubuntu question Where can I find the source code for the Ubuntu Kernel? don't work… sudouser@64bitws:~# uname -r 3.2.0-24-generic and sudouser@64bitws:~# apt-get source linux-image-3.2.0-24-generic Reading package lists... Done Building dependency tree Reading state information... Done Picking 'linux' as source package instead of 'linux-image-3.2.0-24-generic' E: Unable to find a source package for linux

    Read the article

  • Any really decent way to get three monitors?

    - by JohnCC
    What satisfactory solutions are there to achieve three monitors on Ubuntu? I know some ATI cards (Eyefinity) can support 3 monitors from a single card, but I don't know how well this is supported under Linux and besides, I've never had much luck with ATI on Linux. The alternative is to try two cards, but there seem to be problems there too. It looks to me like xrandr cannot support 2 GPUs. I believe you'll end up with two separate "Screens" across which you cannot move applications or windows, unless you enable Xinerama which as I understand it disables some acceleration and probably compositing too. I've found so much conflicting information on this online, I'm really confused. Please advise!

    Read the article

  • How can I make NetworkManager ignore my wireless card?

    - by ændrük
    I do not want NetworkManager to list or manipulate my wireless card. Can I hide its interface from NetworkManager somehow? I have tried adding this in /etc/network/interfaces, iface wlan0 inet static address 192.168.1.101 netmask 255.255.255.0 gateway 192.168.1.1 wireless-essid Synaptotagmin pre-up wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf post-down killall -q wpa_supplicant and this in /etc/NetworkManager/nm-system-settings.conf, [main] plugins=ifupdown,keyfile [ifupdown] managed=false [keyfile] unmanaged-devices=/org/freedesktop/Hal/devices/net_00_19_e0_57_86_af but NetworkManager Applet still lists and allows me to connect to wireless networks.

    Read the article

  • index.html in subdirectory will not open

    - by Dušan
    I want to have a website structure like this example.com/ - homepage example.com/solutions/ - this will be the solution parent page example.com/solutions/solution-one - child solution page example.com/solutions/solution-two- child solution page i have setup the example.com/solutions/index.html file so it can be opened as a parent page, but is shows me an error You don't have permission to access /solutions/.html on this server. What is the problem to this, how can i open parent, directory page? I na just using regular html pages, no cms or anything...

    Read the article

  • Redirect root path on root domain to subdomain

    - by maknz
    Say there's a web application that runs on example.com, would there be a penalty for 301 redirecting the root of the domain (example.com/) to subdomain.example.com for purposes of hosting the marketing website for an application? Obviously we would expect subdomain.example.com to be what is ranked in the search engine, not example.com. We would want other paths on example.com like example.com/path/to/resource to index normally, and be unaffected by the 301 on the root path.

    Read the article

  • Images from remote source - is it possible or is really a bad practice?

    - by user1620696
    I'm building a management system for websites and I had an idea related to image galleries that I'm not sure it's a good approach. Since images might need good deals of space depending on how much images a user uploads an so on, I thought on using cloud services like dropbox, mega and google drive to store images and load then when needed. The obvious problem is that for me this seems a useless solution because it would be slow to download the images from the remote source, making the user experience not so good. Is there any way to save images of a image gallery on remote source without getting the user experience bad because of speed? Or this is really not a good practice?

    Read the article

  • Google webmaster showing duplicate meta descriptions for search directory

    - by Mike Flynn
    What is the best way to get rid of this error in Google Webmasters? Do I really need to add "- Page 2" at the end of the descripton? Page Description Kansas basketball tournaments posted by organizations and teams for youth, AAU, and NCAA certified e Pages /youth-basketball-tournaments/kansas /youth-basketball-tournaments/kansas?page=2 /youth-basketball-tournaments/kansas?page=3 /youth-basketball-tournaments/kansas?page=9

    Read the article

  • Why do we use Pythagoras in game physics?

    - by Starkers
    I've recently learned that we use Pythagoras a lot in our physics calculations and I'm afraid I don't really get the point. Here's an example from a book to make sure an object doesn't travel faster than a MAXIMUM_VELOCITY constant in the horizontal plane: MAXIMUM_VELOCITY = <any number>; SQUARED_MAXIMUM_VELOCITY = MAXIMUM_VELOCITY * MAXIMUM_VELOCITY; function animate(){ var squared_horizontal_velocity = (x_velocity * x_velocity) + (z_velocity * z_velocity); if( squared_horizontal_velocity <= SQUARED_MAXIMUM_VELOCITY ){ scalar = squared_horizontal_velocity / SQUARED_MAXIMUM_VELOCITY; x_velocity = x_velocity / scalar; z_velocity = x_velocity / scalar; } } Let's try this with some numbers: An object is attempting to move 5 units in x and 5 units in z. It should only be able to move 5 units horizontally in total! MAXIMUM_VELOCITY = 5; SQUARED_MAXIMUM_VELOCITY = 5 * 5; SQUARED_MAXIMUM_VELOCITY = 25; function animate(){ var x_velocity = 5; var z_velocity = 5; var squared_horizontal_velocity = (x_velocity * x_velocity) + (z_velocity * z_velocity); var squared_horizontal_velocity = 5 * 5 + 5 * 5; var squared_horizontal_velocity = 25 + 25; var squared_horizontal_velocity = 50; // if( squared_horizontal_velocity <= SQUARED_MAXIMUM_VELOCITY ){ if( 50 <= 25 ){ scalar = squared_horizontal_velocity / SQUARED_MAXIMUM_VELOCITY; scalar = 50 / 25; scalar = 2.0; x_velocity = x_velocity / scalar; x_velocity = 5 / 2.0; x_velocity = 2.5; z_velocity = z_velocity / scalar; z_velocity = 5 / 2.0; z_velocity = 2.5; // new_horizontal_velocity = x_velocity + z_velocity // new_horizontal_velocity = 2.5 + 2.5 // new_horizontal_velocity = 5 } } Now this works well, but we can do the same thing without Pythagoras: MAXIMUM_VELOCITY = 5; function animate(){ var x_velocity = 5; var z_velocity = 5; var horizontal_velocity = x_velocity + z_velocity; var horizontal_velocity = 5 + 5; var horizontal_velocity = 10; // if( horizontal_velocity >= MAXIMUM_VELOCITY ){ if( 10 >= 5 ){ scalar = horizontal_velocity / MAXIMUM_VELOCITY; scalar = 10 / 5; scalar = 2.0; x_velocity = x_velocity / scalar; x_velocity = 5 / 2.0; x_velocity = 2.5; z_velocity = z_velocity / scalar; z_velocity = 5 / 2.0; z_velocity = 2.5; // new_horizontal_velocity = x_velocity + z_velocity // new_horizontal_velocity = 2.5 + 2.5 // new_horizontal_velocity = 5 } } Benefits of doing it without Pythagoras: Less lines Within those lines, it's easier to read what's going on ...and it takes less time to compute, as there are less multiplications Seems to me like computers and humans get a better deal without Pythagoras! However, I'm sure I'm wrong as I've seen Pythagoras' theorem in a number of reputable places, so I'd like someone to explain me the benefit of using Pythagoras to a maths newbie. Does this have anything to do with unit vectors? To me a unit vector is when we normalize a vector and turn it into a fraction. We do this by dividing the vector by a larger constant. I'm not sure what constant it is. The total size of the graph? Anyway, because it's a fraction, I take it, a unit vector is basically a graph that can fit inside a 3D grid with the x-axis running from -1 to 1, z-axis running from -1 to 1, and the y-axis running from -1 to 1. That's literally everything I know about unit vectors... not much :P And I fail to see their usefulness. Also, we're not really creating a unit vector in the above examples. Should I be determining the scalar like this: // a mathematical work-around of my own invention. There may be a cleverer way to do this! I've also made up my own terms such as 'divisive_scalar' so don't bother googling var divisive_scalar = (squared_horizontal_velocity / SQUARED_MAXIMUM_VELOCITY); var divisive_scalar = ( 50 / 25 ); var divisive_scalar = 2; var multiplicative_scalar = (divisive_scalar / (2*divisive_scalar)); var multiplicative_scalar = (2 / (2*2)); var multiplicative_scalar = (2 / 4); var multiplicative_scalar = 0.5; x_velocity = x_velocity * multiplicative_scalar x_velocity = 5 * 0.5 x_velocity = 2.5 Again, I can't see why this is better, but it's more "unit-vector-y" because the multiplicative_scalar is a unit_vector? As you can see, I use words such as "unit-vector-y" so I'm really not a maths whiz! Also aware that unit vectors might have nothing to do with Pythagoras so ignore all of this if I'm barking up the wrong tree. I'm a very visual person (3D modeller and concept artist by trade!) and I find diagrams and graphs really, really helpful so as many as humanely possible please!

    Read the article

  • Non-perfect maze generation algorithm

    - by Shylux
    I want to generate a maze with the following properties: The maze is non-perfect. Means it has loops and multiple ways to reach the exit. The maze should be random. The algorithm should output different mazes for different input parameters The maze doesn't have to be braided. Means dead-ends are allowed and appreciated. I just can't find the right resources on google. The closest i found was this description of the different types of algorithms: http://www.astrolog.org/labyrnth/algrithm.htm. All other algorithms were for perfect mazes. Can anyone give me a website where i can look this up or maybe an algorithm directly?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >