Daily Archives

Articles indexed Wednesday November 21 2012

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

  • How to create computed column in SQL Server 2008 R2 [closed]

    - by Smartboy
    I have a SQL Server 2008 R2 database. This database has two tables called Pictures and PictureUse. Picture table has the following columns: Id (int) PictureName (nvarchar(max)) CreateDate (datetime ) PictureUse table has the following columns : Id (int) Pictureid (int) CreateDate (datetime ) How to create a computed column in the Picture table which tells me that how many times this picture has been clicked?

    Read the article

  • Requiring multithreading/concurrency for implementation of scripting language

    - by Ricky Stewart
    Here's the deal: I'm looking at designing my own scripting/interpreted language for fun. I'm only in the planning stages right now; I want to make sure I have a very strong hold on exactly how I will implement everything before I start coding. What I'm currently struggling with is concurrency. It seems to me like an easy way to avoid the unpredictable performance that comes with garbage collection would be to put the garbage collector in its own thread, and have it run concurrently with the interpreter itself. (To be clear, I don't plan to allow the scripts to be multithreaded themselves; I would simply put a garbage collector to work in a different thread than the interpreter.) This doesn't seem to be a common strategy for many popular scripting languages, probably for portability reasons; I would probably write the interpreter in the UNIX/POSIX threading framework initially and then port it to other platforms (Windows, etc.) if need be. Does anyone have any thoughts in this issue? Would whatever gains I receive by exploiting concurrency be nullified by the portability issues that will inevitably arise? (On that note, am I really correct in my assumption that I would experience great performance gains with a concurrent garbage collector?) Should I move forward with this strategy or step away from it?

    Read the article

  • MVC: Why put the business logic in the model? What happens when I've multiple types of storage?

    - by Steffen Winkler
    I always thought that the business logic has to be in the controller and that the controller, since it is the 'middle' part, stays static and that the model/view have to be capsuled via interfaces, that way you could change the business logic without affecting anything else, program multiple Models (one for each database/type of storage) and a dozens of views (for different platforms for example). Now I read in this question that you should always put the business logic into the model and that the controller is deeply connected with the view. To me, that doesn't really make sense and implies that each time I want to have the means of supporting another database/type of storage I've to rewrite my whole model including the business logic. And if I want another view, I've to rewrite both the view and the controller. May someone explain why that is or if I went wrong somewhere? Currently, that whole thing doesn't really make sense to me.

    Read the article

  • Should Scala IDE Worksheets be part of your open git repository?

    - by JacobusR
    Those familiar with Scala IDE will know about the great testing environment offered by the Scala Worksheet. You can scribble and scratch, much like in the REPL, but with all the goodness added by the IDE as a whole (refactoring, saving, error checking, etc). When you create a worksheet, it is created with the .sc extension, and also creates a artifact under a hidden directory called .worksheet. This is all fine and dandy, but should one include these in your public .git repositories? People who does not use Scala IDE (or older versions) may find these files confusing. On the other hand, making some of your experiments public to developers who are using Scala IDE, may give them a quick start into experimenting and learning the project.

    Read the article

  • Does The College Matter?

    - by Jonathon
    Does it matter all that much about what college you go to, to get a degree in computer programming/computer science? I didn't do all that well in high school, I actually barely graduated with a general High School Diploma. So getting into a decent college could be difficult. Companies won't deny you just because you got your degree at a college they have never heard of or a community college will they?

    Read the article

  • PHP MVC error handling, view display and user permissions

    - by cen
    I am building a moderation panel from scratch in a MVC approach and a lot of questions cropped up during development. I would like to hear from others how they handle these situations. Error handling Should you handle an error inside the class method or should the method return something anyway and you handle the error in controller? What about PDO exceptions, how to handle them? For example, let's say we have a method that returns true if the user exists in a table and false if he does not exist. What do you return in the catch statement? You can't just return false because then the controller assumes that everything is alright while the truth is that something must be seriously broken. Displaying the error from the method completely breaks the whole design. Maybe a page redirect inside the method? The proper way to show a view The controller right now looks something like this: include('view/header.php'); if ($_GET['m']=='something') include('view/something.php'); elseif ($_GET['m']=='somethingelse') include('view/somethingelse.php'); include('view/foter.php'); Each view also checks if it was included from the index page to prevent it being accessed directly. There is a view file for each different document body. Is this way of including different views ok or is there a more proper way? Managing user rights Each user has his own rights, what he can see and what he can do. Which part of the system should verify that user has the permission to see the view, controller or view itself? Right now I do permission checks directly in the view because each view can contain several forms that require different permissions and I would need to make a seperate file for each of them if it was put in the controller. I also have to re-check for the permissions everytime a form is submitted because form data can be easily forged. The truth is, all this permission checking and validating the inputs just turns the controller into a huge if/then/else cluster. I feel like 90% of the time I am doing error checks/permissions/validations and very little of the actual logic. Is this normal even for popular frameworks?

    Read the article

  • Design practice for securing data inside Azure SQL

    - by Sid
    Update: I'm looking for a specific design practice as we try to build-our-own database encryption. Azure SQL doesn't support many of the encryption features found in SQL Server (Table and Column encryption). We need to store some sensitive information that needs to be encrypted and we've rolled our own using AesCryptoServiceProvider to encrypt/decrypt data to/from the database. This solves the immediate issue (no cleartext in db) but poses other problems like Key rotation (we have to roll our own code for this, walking through the db converting old cipher text into new cipher text) metadata mapping of which tables and which columns are encrypted. This is simple when it's just couple of columns (send an email to all devs/document) but that quickly gets out of hand ... So, what is the best practice for doing application level encryption into a database that doesn't support encryption? In particular, what is a good design to solve the above two bullet points? If you had specific schema additions would love it if you could give details ("Have a NVARCHAR(max) column to store the cipher metadata as JSON" or a SQL script/commands). If someone would like to recommend a library, I'd be happy to stay away from "DIY" too. Before going too deep - I assume there isn't any way I can add encryption support to Azure by creating a stored procedure, right?

    Read the article

  • access localhost from other PC

    - by user109694
    I'm fresher for ubuntu 12.04.., I just created a simple program called login.php and i would like to run this prog from anther PC that not in my LAN. I had localhost in my system., I'm using apache2.0 and php5. My program is located at var/www/login.php When ever i'm trying to open it from others PC(not in my network) using IP it shoes OOPS., What can i do to open my page from another PC using IP address.

    Read the article

  • Error installation of Ubuntu 12.04 LTS

    - by garu
    Attempting a new installation of Ubuntu 12.04 LTS on what was a dual boot Windows 7 and Ubuntu 12.04 LTS laptop ( Sony intel i3 core 64 bit with 500GB HDD). I followed the following procedure Install Ubuntu • has at least 4.4 GB available, is connected to the internet, download updates while installing and install this third-party are all ticked this time • I chose the Erase disk and install Ubuntu option ( since I want to have only Ubuntu 12.04 LTS operating system in my disk) Now shows The entire disk will be used • 501GB free disk I clicked the install now button. All data copied to the hard drive ( it was copied OK), askes for location, keyboared layout, and who are you. Started to install the Ubuntu 12.04 operating system. After some minutes, I got a report Installation failed, the installer encountered an unrecoverable error. A desktop session will now be run so that you may investigate the problem or try installing again. So, Please give me simple advice on how to proceed. Thank you

    Read the article

  • What is the logic behind Ubuntu's messy installation process?

    - by Swaahaa
    Before you get into the conclusion that I want to " DISCUSS " this question, I would like stop you with whole respect and state that- I want A Clear Cut Answer for this question. Ubuntu is such an awesome Operating System. Why do the user dread with fear before installing each and every application. I mean why not a platform in Ubuntu which JUST INSTALLS ANYTHING. I am happy when after a lot of SUDOS, TERMINALS and this and that I INSTALL something. But what is the logic behind such a mess.

    Read the article

  • atftp pcre pattern

    - by CE-SA
    I've a question about the package named 'atftp'. I've got the atftp daemon finally working. Previously I was using tftp-hpa with a custom rule that replaces filenames with capitals into non-capital filenames and replaces the backslashes into forward slashes so that WinPE will boot fine. But in atftp I can't find rules or replacements like that. I'm searching for long, but cannot find or write the right pcre-pattern. Could you help me with this?

    Read the article

  • using x11 forwarding with ssh and vnc?

    - by simona
    I am working on a remote cluster via ssh with the -X option, because I need to visualize data and graphs, over a vpn protocol. Sometime due to the instability of the internet connection I lose my session. They told me I could use vnc in order to not lose my current session, so that if the internet connection drops I can reconnect and continue with my previously open session. What I do is to log in the remote cluster 'remote.cluster' and type vncserver :1 then I open another terminal on my system and I type ssh -C -NL 5901:remote.cluster:5901 [email protected] & Then I start vinagre on my system and I connect using ssh protocol. The problem is that I do not have x11 forwarding and I cannot open windows. If I try to connect using the vnc protocol with vinagre it doesn't connect, because I get something as connection timeout. What should I do?

    Read the article

  • Selective bandwidth shaping

    - by the_candyman
    I was searching something for bandwidth shaping. I found trickled and wondershaper which works on the total bandwidth. I would like to know if there exists a selective bandwidth shaping. I mean, I run 2 application which uses internet. I would like to limit the bandwidth of one of these 2 in real time (just like a sound equalizer). For example, I'm downloading something. Meanwhile, someone calls me on skype. So I want to slow the downloading to have more band in my video calling. Is this possible?

    Read the article

  • how to access samba shares via nat?

    - by HSM
    I have setup a virtual machine in Virtual Box and installed a Samba Server. I changed the guest operating system's NIC from Bridged to NAT for a reason that I can't remember. I then added a additional NIC in "host only adapter" mode. The Windows host OS now can access the Ubuntu 10.10 virtual server via the Host Only NIC. However, I can not access the Samba server running on the Ubuntu guest OS. I am not sure what to do now. How can I get the widows Host OS to access the Guest OS' samba server.

    Read the article

  • Installing pgAdmin III for postgreSQL 9.2

    - by Mikey
    I have a windows server that runs postgresql 9.2. I want to hit it using pgAdmin III from my Ubuntu Linux 12.10 workstation box. I installed pgAdmin III from synaptic and also tried direct download from postgreSQL site using software installer. Regardlesss, I can get only get pgAdmin III for postgresql 9.1. When I run pgAdmin III and point to my server I get an error message telling me that the database is 9.2 and my pgAdmin III is for 9.1, isn't compatible with 9.2. I can access the server itself fine OK from the Ubuntu box - I have Python programs that hit the database with no problems - but I need pgAdmin III for 9.2 running under Ununtu Linux 12.10. Is it available? Where do I get it?

    Read the article

  • Software center is broken and can not be repaired or reinstalled

    - by Michal
    When I open the software center, I am told that I can not use it, for it is broken, and needs to be repaired. First I try to do this automatically, as I was offered. I enter a root password, and then the installation fails. installArchives() failed: reconfiguring packages... reconfiguring packages... reconfiguring packages... reconfiguring packages... (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 275048 files and directories currently installed.) Unpacking wine1.4-i386 (from .../wine1.4-i386_1.4-0ubuntu4.1_i386.deb) ... dpkg: error processing /var/cache/apt/archives/wine1.4-i386_1.4-0ubuntu4.1_i386.deb (--unpack): trying to overwrite '/usr/bin/wine', which is also in package wine1.5 1.5.5-0ubuntu1~ppa1~oneiric1+pulse17 No apport report written because MaxReports is reached already dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/wine1.4-i386_1.4-0ubuntu4.1_i386.deb Error in function: dpkg: dependency problems prevent configuration of wine1.4-common: wine1.4-common depends on wine1.4 (= 1.4-0ubuntu4.1); however: Package wine1.4 is not installed. dpkg: error processing wine1.4-common (--configure): dependency problems - leaving unconfigured What should I do now? First of all, I've tried reinstalling the center, but it failed due to the same 1.4 dependency as is laid out here. I've googled for help and although I don't understand linux at all, I've tried some suggestions: I've tried editing the dpkg status in /var/lib/dpkg/status which failed because the file could not be found. I've tried purging wine/* but that had unresolved dependencies as well. It's a giant mess.

    Read the article

  • Hash Sum mismatch on python-keyring

    - by Gearoid Murphy
    I came in to my workstation this morning to find an apt error notification relating to a hash sum mismatch on the python keyring password storage mechanism, given the sensitive nature of this package, this gives me some cause for concern. Has anyone else seen this error?, how can I ensure that my system has not been compromised? Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/main/p/python-keyring/python-keyring_0.9.2-0ubuntu0.12.04.2_all.deb Hash Sum mismatch Xubuntu 11.04 AMD64

    Read the article

  • Limitation of high level languages? [closed]

    - by user1705796
    My question may look bit philosophical and nonsense! But I need to know kind of instructions those are not well suitable in high level languages even in c? Or rarely use in the development of software? Like read/write content of CPU registers may useful in debugging programs. And access to cache memory required when developing OS (maybe I am wrong at this point). Is this kind of instruction available languages like Java, Python, C? I also have a second question: And Why all high level languages not having same uniform syntax; at-least same standard library interface name? In python there is and. Or operator is almost same as && and ||. I think Python is developed after C but space indentation is compulsory in Python. Why Python does not use brackets {}. I already know this question going to be highly down-voted.

    Read the article

  • Can windows XP be better than any Ubuntu (and Linux) distro for an old PC?

    - by Robert Vila
    The old laptop is a Toshiba 1800-100: CPU: Intel Celeron 800h Ram 128 MB (works ok) HDD: 15GB (works ok) Graphics adapter: Integrated 64-bit AGP graphics accelerator, BitBIT, 3D graphic acceleration, 8 MB Video RAM Only WindowsXP is installed, and works ok: it can be used, but it is slow (and hateful). I thought that I could improve performance (and its look) easily, since it is an old PC (drivers and everything known for years...) by installing a light Linux distro. So, I decided to install a light or customized Ubuntu distro, or Ubuntu/Debian derivative, but haven't been successful with any; not even booting LiveCDs: not even AntiX, not even Puppy. Lubuntu wiki says that it won't work because the last to releases need more ram (and some blogs say much more cpu -even core duo for new Lubuntu!-), let alone Xubuntu. The problems I have faced are: 1.There are thousands of pages talking about the same 10/15 lightweight distros, and saying more or less the same things, but NONE talks about a simple thing as to how should the RAM/swap-partition proportion be for this kind of installations. NONE! 2.Loading the LiveCD I have tried several different boot options (don't understand much about this and there's ALWAYS a line of explanation missing) and never receive error messages. Booting just stops at different stages but often seems to stop just when the X server is going to start. I am able to boot to command line. 3.I ignore whether the problem is ram size or a problem with the graphics driver (which surprises me because it is a well known brand and line of computers). So I don't know if doing a partition with a swap partition would help booting the LiveCD. 4.I would like to try the graphical interface with the LiveCD before installing. If doing the swap partition for this purpose would help. How can I do the partition? I tried to use Boot Rescue CD, but it advises me against continuing forward. I would appreciate any ideas as regards these questions. Thank you

    Read the article

  • 'cannot find -lboost_iostreams' while trying to install Deluge 1.3.3

    - by Muhammad
    While trying to install deluge 1.3.3 (I need this specific version) I get an error. I install all the needed packages through sudo apt-get install g++ make python-all-dev python-all python-dbus \ python-gtk2 python-notify librsvg2-common python-xdg python-support \ subversion libboost-dev libboost-python-dev \ libboost-thread-dev libboost-date-time-dev libboost-filesystem-dev \ libssl-dev zlib1g-dev python-setuptools \ python-mako python-twisted-web python-chardet python-simplejson I then build it $ python setup.py build and $ sudo python setup.py install then I get a long list at the end of which there is the error /usr/bin/ld: cannot find -lboost_iostreams collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Can you help me out with this?

    Read the article

  • How can I unmount a s3fs mount as a normal user?

    - by coteyr
    I use S3 a ton. I have over 40 or so buckets floating around between clients. I like the fact that I can list them in /etc/fstab and that they just work. For reference here is one of the buckets. coteyrnet /mnt/S3/coteyrnet fuse.s3fs _netdev,use_cache=/tmp,use_rrs=1,allow_other,noauto,users 0 0 It mounts fine, but I am having one heck of a time unmounting it. The first problem is: umount: /mnt/S3/coteyrnet mount disagrees with the fstab The relevant part of mtab is: s3fs /mnt/S3/coteyrnet fuse.s3fs rw,noexec,nosuid,nodev,allow_other,user=coteyr 0 0 In addition to that, if I sudo umount /mnt/S3/coteyrnet I always get umount: /mnt/S3/coteyrnet: device is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) lsof | grep coteyrnet never returns anything of value, nor does fuser. My goal is to get user unmounting working. The inability to mount via sudo has been resolved. By using the "use_cache" setting the files were actually open, but not under the mount point. This is a caveat to that option. The mount point files are closed but the files were not yet transferred to S3. By waiting "a while" and trying again, sudo can unmount.

    Read the article

  • Configuring Network without Default Gateway

    - by Homayoon
    I'm trying to connect my desktop and laptop using an ethernet connection. I usually configure network from the command line but this time I decided to give Network Manager a try, so I went to Network Connections, and selected manual IP configuration. At first I left the default gateway field blank, since I don't need a default gateway. Turned out network manager doesn't let me save the connection unless I enter that field, but entering a phony gateway messes up with my Internet connection. Anyway to do this setup?

    Read the article

  • How to get numpad out of "mouse emulation" mode?

    - by Jonik
    My numeric keypad has somehow got into a "mouse emulation" mode where the number keys just move the mouse pointer around (2 = down; 8 = up, 6 = right, etc). Anyone know how to make it work normally again? None of the other numpad keys work either (I first noticed the whole thing when Ctrl + ÷ (numpad division sign) no longer produced "line comment" in IntelliJ IDEA). Toggling num lock doesn't affect this (though the indicator LED works as usual). I'm using GNOME on Lucid Lynx (10.4).

    Read the article

  • How to measure the conversion rate of your Amazon affiliate program?

    - by user359650
    I plan on selling products through the Amazon affiliate program. What I know I can track is: -what products people view on my website (default Google Analytics pageview behaviour). -what affiliate links people click on my website (with GA _trackEvent). What am I missing is: -what products people end up buying after clicking on the affiliate links. Does the Amazon affiliate program offers you any mechanism for linking a purchase with some data from your website? I noticed that I was able to add custom parameters and values to my affiliate links and the link checker was still happy with them, if Amazon gave the links that initiated an order then I would be able to cross reference the orders using custom parameters...

    Read the article

  • 302 Redirect Issue for Joomla 2.5.7 version site

    - by DDD
    For my site i am using Joomla 2.5.7 version and FB comments tools for the articles in the site. i am getting the 302 redirect problem for the FB comments for the Articles to which i post. I have checked the url's here http://www.webconfs.com/http-header-check.php and got the following result with 302 redirect. for http://www.fijoo.com HTTP/1.1 302 Moved Temporarily = Date = Wed, 21 Nov 2012 09:46:39 GMT Server = Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.6 Perl/v5.10.1 X-Powered-By = PHP/5.3.16 Set-Cookie = =en-GB; expires=Wed, 21-Nov-2012 10:46:40 GMT LOCATION = / Content-Length = 0 Connection = close Content-Type = text/html How to overcome this anyone please help.

    Read the article

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