Daily Archives

Articles indexed Friday November 30 2012

Page 10/15 | < Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How properly perform passing operation result to View

    - by atomAltera
    I'm developing web site on self made MVC engine. I have actionController that handles operations like register, login, post submit and etc. actionController receives operation name and parameters. Of course it mast handle errors such user with same nick already exists or password is to short about which action handler have to notify user. The question is which is the best way to organize errors, such that View could easily get localized user notification message. I see two ways First one: define error constants like ERR_NICK_BUSY = '1' ERR_NICK_INVALID = '2' ... and localization map local[ERR_NICK_BUSY] = 'User with the same nick already registered' local[ERR_NICK_INVALID ] = 'Nick, you entered is invalid' ... And second one: define abstract constants like ERR_FIELD_BUSY = '1' ERR_FIELD_INVALID = '2' ... and pass them with field name. In this case localization looks like local['nick_'+ERR_FIELD_BUSY] = 'User with the same nick already registered' ... I don't like both this methods. Can you advise something else?

    Read the article

  • self referencing tables, good or bad?

    - by NimChimpsky
    Representing geographical locations within an application, the design of the underlying data model suggests two clear options (or maybe more?). One table with a self referencing parent_id column uk - london (london parent id = UK id) or two tables, with a one to many relationship using a foreign key. My preference is for one self-refercing table as it easily allows to extend into as many sub regions as required. IN general do people veer away from self referencing tables, or are they A-OK ?

    Read the article

  • Want to use h264 in my commercial program. What steps should i take?

    - by Jason123
    Want to use h264 in my commercial program. What steps should I take? Here is what I see that needs to be done. I need to buy a license from VideoLan (x264licensing.com) to use the library to encode video into h264 format and I need to buy a license from the MpegLAGroup to use the h264 video encoding in general in my commercial product. Am I right in thinking that? How much do these cost? I don't see selling much since my target is very niche (video game screen capturing).

    Read the article

  • Logic or Algorithm to solve this problem [closed]

    - by jade
    I have two lists. List1 {a,b,c,d,e} and List2 {f,g,h,i,j} The relation between the two list is as follows a->g,a->h,h->c,h->d,d->i,d->j Now I have these two lists displayed. Based on the relation above on selecting element a from List1, List2 shows g,h. On selecting h from List2, in List1 c,d are shown in List1. On selecting d from List1 it shows i,j in List2. How to trace back to initial state by deselecting the elements in reverse order in which they have been selected?

    Read the article

  • Using which technique does facebook and pininterest show images?

    - by manish
    If anybody has ever noticed that when you open a image in Facebook something like this happens:- suppose you are at your homepage on Facebook:- the URL is https://www.facebook.com/ now if you open a image it gets opened in new modal like window and URL changes to:- https://www.facebook.com/photo.php?fbid=10151125374887397&set=a.338008237396.161268.36922302396&type=1&theater As far as I know in any common case a modal overlay would have kept the url in the address bar the same , My question is how does facebook / pintrest achieve this behaviour of not re-loading the whole page but still achieving the change in the address bar. Is there any jquery or javascript plugin for this?

    Read the article

  • How to handle notifications to several partial views of the same model?

    - by Seki
    I am working on refactoring an old simulation of a Turing machine. The application uses a class that contains the state and the logic of program execution, and several panels to display the tape representation and show the state, messages, and the GUI controls (start, stop, program listing, ...). I would like to refactor it using the MVC architecture that was not used originaly: the Frame is the only way to get access to the different panels and there is also a strong coupling between the "engine" class and the GUI updates in the way of frame.displayPanel.state.setText("halted"); or frame.outputPanel.messages.append("some thing"); It looks to me that I should put the state related code into an observable model class and make the different panels observers. My problem is that the java Observable class only provides a global notification to the Observers, while I would prefer not to refresh every Observers everytime, but only when the part that specificaly observe has changed. I am thinking of implementing myself several vectors of listeners (for the state / position, for the output messages, ...) but I feel like reinventing the wheel. I though also about adding some flags that the observers could check like isNewMessageAvailable(), hasTapeMoved(), etc but it sounds also approximative design. BTW, is it ok to keep the fetch / execute loop into the model or should I move it in another place? We can think in a theorical ideal way as I am completely revamping this small application.

    Read the article

  • Is testable code actually more stable? [closed]

    - by Xodarap
    A google scholar search turns up numerous papers on testability, including models for computing testability, recommendations for how ones code can be more testable, etc. They all come with the assertion that more testable code is more stable, however I can't find any studies which actually demonstrate this. I tried looking for studies evaluating the effect of testable code vs. quality, however the closest I can find is Improving the Testability of Object Oriented Systems, which discusses the relationship between design flaws and testability. Is testable code is actually more stable? And why, or why not? Please back up your answers with references or evidence to back up your claim.

    Read the article

  • How do I resolve "No JSON object could be decoded" on mythbuntu live CD?

    - by Neil
    I have been running a MythTV frontend on my laptop for some time against a MythTV backend installed in Linux Mint 12 on another computer, and everything works fine. Now, I'm trying out the Mythbuntu Live CD (12.04.1 32-bit) on the laptop, to turn it into a dedicated front end. It's connecting to the network just fine, and I can see my server. When I click on the frontend icon on the desktop, it asks me for the security code, which I've verified against mythtv-setup on the server. However, when I test that code, it shows the error message "No JSON object could be decoded". I've looked in the control center to see if there's something else I should be setting up. The message above implies to me that it can't find the server, but I can find no place in the control center to tell it where to find my myth backend, which I find a little odd. Does the live CD not work against a backend server on another machine?

    Read the article

  • Where did my free space go?

    - by Ari B. Friedman
    I have a storage drive (2TB) and an OS drive (90GB SSD). I've run out of space on the OS drive: /$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sdb1 72G 72G 0 100% / udev 5.9G 12K 5.9G 1% /dev tmpfs 2.4G 1.2M 2.4G 1% /run none 5.0M 0 5.0M 0% /run/lock none 5.9G 428K 5.9G 1% /run/shm /dev/sda1 1.9T 639G 1.2T 37% /media/StorageDrive So be it. But when I attempt to figure out where the space has gone, I cannot find it anything remotely approaching the capacity of the drive: /$ sudo du -h -d 1 du: cannot access `./media/StorageDrive/home/ari/.gvfs': Permission denied 675G ./media 2.3G ./var 0 ./proc 7.0M ./tmp 27M ./boot 4.0K ./lib64 12K ./dev 44M ./home 16K ./lost+found 8.0M ./sbin 223M ./lib 4.0K ./selinux 1.4M ./run 140K ./root 8.8M ./bin 4.0K ./mnt 38M ./etc 8.0K ./srv 4.8G ./usr 65M ./opt 0 ./sys 682G . Note the difference between the total (682G) and the mounted drives in /media (675G) is only about 9G. How are 72G being used? Where is this dark matter hiding?

    Read the article

  • Ubuntu stops using Nvidia driver after kernel upgrade

    - by Daniel
    Just updated and restarted, Ubuntu's doesn't display correctly. After restart, the desktop now looks like this. I've temporarily switched to the Nouveau driver. The update history reveals the kernel was updated, amongst many things; and the following were installed: linux-image-3.5.0-19-generic (3.5.0-19.30) linux-image-extra-3.5.0-19-generic (3.5.0-19.30) I've encountered this type of problem quite recently, so I decided to reapply the same steps, to solve the problem, as follows: sudo apt-get install linux-headers-3.5.0-19 sudo apt-get install linux-headers-3.5.0-19-generic sudo depmod -a sudo modprobe nvidia sudo /etc/init.d/*dm restart When installing linux-headers-3.5.0-19-generic, I get an error, message from terminal as follows: Setting up linux-headers-3.5.0-19-generic (3.5.0-19.30) ... Examining /etc/kernel/header_postinst.d. run-parts: executing /etc/kernel/header_postinst.d/dkms 3.5.0-19-generic /boot/vmlinuz-3.5.0-19-generic Error! Problems with depmod detected. Automatically uninstalling this module. DKMS: Install Failed (depmod problems). Module rolled back to built state. However, I ignored the above error and continued the steps with sudo depmod -a, installed nvidia-current, then did sudo modprobe nvidia, which yielded the following error: FATAL: Error inserting nvidia_current (/lib/modules/3.5.0-19-generic/updates/dkms/nvidia_current.ko): No such device Upon restart, the Nvidia driver now works! BTW, do those error messages imply I broke something? Just curious, cause I don't want to get happy I've fixed it, then it stops working later on. The system is Dell XPS-L702X, with NVIDIA GeForce GT 555M, and 17" screen.

    Read the article

  • Using apt-get from Canada

    - by Advant Edge
    I am using Ubuntu Server 12.04 LTS, and until yesterday, everything was quite peachy. I have installed several packages (MySQL, apache2) and to my knowledge have those configured correctly. Upon configuration of phpMyAdmin, I found that I was missing the directory path /etc/phpmyadmin, which got me thinking about the install. I am new to Ubuntu, so I guess I missed the message telling me that I did not download phpMyAdmin successfully. Anyway, trying to use apt-get yesterday/today results in "Failed to fetch..." messages, even if just to run sudo apt-get update. Some notable details: ···no GUI, command line only (sudo apt-get gksu fails, go figure) ···can ping 4.2.2.2, so I know the internet is out there (somewhere) ···this is a dedicated computer, using Samba to share files with Windows, which does work ···attempted to edit my /sources.list file, for various American/Canadian mirror, to no effect ···ensured I have correct DNS settings in /etc/networks/interfaces I'm not sure where along the way it happened, but I seem to have lost connections to repositories... :) Any advice (including GO BACK TO WINDOWS) is appreciated.

    Read the article

  • I Can not install skype on Ubuntu 12.10

    - by Arsalan
    Need help, I cant install skype on this Ubunto 12.10 version, need your help. this is the error. Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: skype : Depends: skype-bin but it is not installable E: Unable to correct problems, you have held broken packages. SO?

    Read the article

  • Why has wireless disappeared after my 12.10 upgrade?

    - by Shay Guy
    I just upgraded to 12.10 on my Lenovo B570 laptop. NetworkManager isn't displaying a submenu for wireless connections at all, even though I downloaded the update through the wireless connection. This displeases me. Stuff I've tried includes: $ sudo modprobe wl FATAL: Module wl not found. $ sudo lspci -nn | grep "BCM" 02:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller [14e4:4727] (rev 01) $ rfkill list all 0: ideapad_wlan: Wireless LAN Soft blocked: no Hard blocked: no ETA: linux-headers-generic is already the newest version, and what I get when reinstalling bcmwl-kernel-source includes the following, near the end. DKMS: install completed. ERROR: Module b43 does not exist in /proc/modules ERROR: Module b43legacy does not exist in /proc/modules ERROR: Module ssb does not exist in /proc/modules ERROR: Module bcm43xx does not exist in /proc/modules ERROR: Module brcm80211 does not exist in /proc/modules ERROR: Module brcmfmac does not exist in /proc/modules ERROR: Module brcmsmac does not exist in /proc/modules ERROR: Module bcma does not exist in /proc/modules FATAL: Module wl not found.

    Read the article

  • Adding IP address to OpenVZ VPS (OpenVZ Web Panel)

    - by andy
    I apologise if I sound at all dumb. This is my first dedicated server having used a VPS for over a year and I'm trying to setup a VPS on this new server. I purchased a subnet from my hosting provider that I believe allows me 6 usable IP addresses: 177.xx.xxx.201 - 177.xx.xxx.206 The subnet address looks like this: 177.xx.xxx.200/29. I've gone on my server and added them like it said on a wiki like so: ip addr add 177.**.***.201/29 dev eth0 I done that for all six and now when I go to them in the browser they point to my server. The problem is, I'm using OpenVZ web panel to create VMs (http://code.google.com/p/ovz-web-panel/) so I created a VM and assigned one of those IPs to it. However when SSHing to that IP it SSH's to the dedicated server and not the VM. Am I missing something?

    Read the article

  • Is it possible to have my desktop loaded before login?

    - by Dims
    I am connecting to the system with Putty (this is Windows SSH client) then running some service in interactive personal mode. For example this is a script to run freeswitch: dims@nebulla:~$ cat freeswitch.sh #!/bin/sh cd ~/bin/freeswitch/bin gnome-terminal -e ./freeswitch & I.e. it is installed in user directory. Also DISPLAY is set to :0 The problem is that I can't use this script until login once. Script responds with dims@nebulla:~$ ./freeswitch.sh dims@nebulla:~$ No protocol specified Failed to parse arguments: Cannot open display: After login, I can do "Switch user" and see login screen but script will be able to run since desktop exists. My question is: is it possible to "preload" my desktop, so that initial situation was as if I loogged in and the went to switch user?

    Read the article

  • Broken package after update: linux-headers, error brokencount >0

    - by escozul
    Ubuntu 12.04. After an update, I get a red warning icon in the system tray, warning about an error: broken count 0 Opening Update manager, I see that the broken package is linux-headers-3.2.0-33-generic-pae (new install) Specificaly I have my ubuntu on an AspireOne with 8gb internal storage. I tried apt-get clean as suggested in another question on this site, and tried reinstalling the package in Synaptic. I have tried to reboot but to no avail. I have also tried apt-get install --fix-broken and I get the following: sudo apt-get install --fix-broken [sudo] password for elina: Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: linux-headers-3.2.0-33-generic-pae The following NEW packages will be installed: linux-headers-3.2.0-33-generic-pae 0 upgraded, 1 newly installed, 0 to remove and 38 not upgraded. 1 not fully installed or removed. Need to get 0 B/977 kB of archives. After this operation 11,3 MB of additional disk space will be used. Do you want to continue [Y/n]; y (Reading database ... 437051 files and directories currently installed.) Unpacking linux-headers-3.2.0-33-generic-pae (from .../linux-headers-3.2.0-33-generic-pae_3.2.0-33.52_i386.deb) ... dpkg: error processing /var/cache/apt/archives/linux-headers-3.2.0-33-generic-pae_3.2.0-33.52_i386.deb (--unpack): unable to create `/usr/src/linux-headers-3.2.0-33-generic-pae/include/config/usb/gspca/sonixb.h.dpkg-new' (while processing `./usr/src/linux-headers-3.2.0-33-generic-pae/include/config/usb/gspca/sonixb.h'): No space left on device No apport report written because the error message indicates a disk full error dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/linux-headers-3.2.0-33-generic-pae_3.2.0-33.52_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1) I've tried all suggestions I could find: sudo apt-get clean sudo apt-get autoclean sudo apt-get autoremove sudo apt-get update sudo apt-get upgrade sudo apt-get -f install sudo apt-get install --fix-broken Then I saw that on the error there was a mention about free space. So I did a df -h and the result was: Filesystem Size Used Avail Use% Mounted on /dev/sda1 7,0G 5,5G 1,1G 84% / udev 235M 4,0K 235M 1% /dev tmpfs 97M 816K 96M 1% /run none 5,0M 0 5,0M 0% /run/lock none 242M 352K 242M 1% /run/shm I see that on my root folder I have 1.1Gb free. The broken package is linux-headers-3.2.0-33-generic-pae_3.2.0-33.52_i386.deb which only takes up 11.3Mb on my hard drive. I'm soooo lost. I really hope there is something I'm missing here. I don't want to go about reformatting this bucket. It's really not worth the time. Any help for fixing this would be hot.

    Read the article

  • How can I set up a regex to rename files automatically for Atftp?

    - 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

  • How to fix a Broadcom 43224 (rev. 01) in ubuntu 12.10, running on a macbook pro 6,2?

    - by Eduardo Bezerra
    I've googled for 3 days so far, with no success, so I'll be straightforward: How do you get it to work? this is the output for lspci -v: 03:00.0 Network controller: Broadcom Corporation BCM43224 802.11a/b/g/n (rev 01) Subsystem: Apple Inc. Device 0093 Flags: bus master, fast devsel, latency 0, IRQ 17 Memory at c1b00000 (64-bit, non-prefetchable) [size=16K] Capabilities: <access denied> Kernel driver in use: bcma-pci-bridge Kernel modules: bcma for uname -a: Linux fury 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux I've tried with bcmwl-kernel-source, firmware-b43-installer and now I'm out of ideas. Can someone help me? This is driving me insane! EDIT: for lspci -nn | grep 0280: 03:00.0 Network controller [0280]: Broadcom Corporation BCM43224 802.11a/b/g/n [14e4:4353] (rev 01) I can see the networks available, but when I try to connect, it gets stuck in a loop: tries to connect, fails, tries again, fails again and so on... EDIT 2: After a long break from this problem, I've just run a few tests again and found out that, although my macbuntu still fails to connect to my home wi-fi network, it works just fine at my university... Does that help in anyway? My home network is managed by a dual-band (2.4Ghz and 5Ghz) 802.11n cisco e4200 wi-fi router.

    Read the article

  • Remote reboot over ssh does not restart

    - by Finn Årup Nielsen
    I would like to remotely reboot my Ubuntu 12.04 LTS server via ssh. I do sudo reboot and I loose connection and the server connection does not reappear. It does not ping. When I go the the physical computer with a screen attached I see a black screen and hear that the server is still on. I do a hard power off (press power on button for a few seconds) and the server halts. After I press power on the server boots with no problem. As far as I remember the remote reboot has previously worked on that server. I wonder if sudo reboot & will help? I suppose I could also try sudo shutdown -r and see if that does any difference. I have listed an excerpt of /etc/log/syslog below. The last thing it records is the stopping of the logging. Oct 24 10:14:49 servername kernel: [1354427.594709] init: cron main process (1060) killed by TERM signal Oct 24 10:14:49 servername kernel: [1354427.594908] init: irqbalance main process (1080) killed by TERM signal Oct 24 10:14:49 servername kernel: [1354427.595299] init: tty1 main process (1424) killed by TERM signal Oct 24 10:14:49 servername kernel: [1354427.637747] init: plymouth-upstart-bridge main process (20873) terminated with status 1 Oct 24 10:14:49 servername kernel: Kernel logging (proc) stopped. Oct 24 10:14:49 servername rsyslogd: [origin software="rsyslogd" swVersion="5.8.6" x-pid="876" x-info="http://www.rsyslog.com"] exiting on signal 15. Oct 24 10:25:34 servername kernel: imklog 5.8.6, log source = /proc/kmsg started. Oct 24 10:25:34 servername rsyslogd: [origin software="rsyslogd" swVersion="5.8.6" x-pid="862" x-info="http://www.rsyslog.com"] start

    Read the article

  • How to recover from GNOME 3.2 freeze?

    - by Vivek
    I have Ubuntu 11.10 installed and am using GNOME 3.2. I am left with no other option than to restart gdm or to reboot the system, when GNOME freezes. GNOME freezes at times when resuming from suspend and every time I search in the dashboard, inspite of having GNOME 3.2 compatible theme installed. Is there any option to restart shell from tty? Or is there any other solution to recover from the freeze?

    Read the article

  • A record not resolving

    - by user1561108
    I have a hosted domain at siteground. On this domain & host I have a subdomain with a wordpress install. I wish to move this blog to another host (hostgator), while keeping the domain with siteground. To do this I created a hosting account at hostgator, got it's ip address and set the A record in siteground's cpanel accordingly: subdomain.example.com 14400 A (ip of hostgator account) Going by this online traceroute tool the records appear to have been updated (over 4 hours ago now) as it now resolves to a theplanet.com server location which hostgator use yet the subdomain is still not resolving from a web browser. The account at hostgator has been setup and is navigable via ip address/~accountname. What's going wrong here? I should add the relevant DNS record at hostgator side looks like this: subdomain.example.com 86400 IN SOA ns483.websitewelcome.com. subdomain.example.com 86400 IN NS ns1.siteground145.com. subdomain.example.com 86400 IN NS ns2.siteground145.com. subdomain.example.com 14400 IN A 74.54.176.3 I'm not sure if the hostgator record should be classed as the SOA record but I don't know enough about it to be sure. Is this the source of the problem?

    Read the article

  • Bug? Flash of white when changing orientation on iOS Safari [migrated]

    - by Baumr
    What causes the flash of white to the right of a responsive design when changing orientation from portrait to landscape on iOS? Try it on iOS6 Safari: Websites like this don't do it: http://html5boilerplate.com But this one does: http://www.initializr.com Something to do with re-processing (CPU lag) to fit a wider screen? It doesn't happen in Chrome for iOS6... Update: I just removed all img and from my testing site, but it still happens. This seems to happen with a lot of different websites out there. Is it a bug with their code, or a Safari for iOS bug? Others are completely immune to it...

    Read the article

  • RewriteRule for URL Subdirectory Root

    - by JYerdon
    Have not found this in my searches on SE. I need this scenario to work: • User visits someurl.com/news/folder or someurl.com/news/somefolder/, they get redirected to someurl.com/somefolder. • If the user visits JUST someurl.com/news or /news/, they are allowed through to visit /news. Here is my current rule: RewriteRule ^news/(.*) /$1 [NC,R=301,L] How do I make it allow the second bullet point? First seems to work with no issues. Thanks all! POST UPDATE I have got the code RewriteCond %{REQUEST_URI} ^news RewriteRule ^/news news/ [NC,L] RewriteCond %{REQUEST_URI} ^/news/(.)$ RewriteRule ^news/(.) /$1 [NC,R=301,L] BUT - it doesn't allow me to go to the URL something.com/news/ Any thoughts?

    Read the article

  • I've changed my URL schema. How do I tell Google to index the new schema and forget the old one?

    - by growse
    I had a site where the urls were constructed like this /index.php/Topic /index.php/AnotherTopic These were indexed in google, and search results returned that pointed to these. However, I've recently replatformed that site, and reconfigured it so the above urls would be: /index.php?title=Topic /index.php?title=AnotherTopic The original urls are returning 404s. The site is linking to the correct URL schema internally, but Google is retaining the original schema in its search results. I've updated and resubmitted the sitemap which only contains the new schema. Also, Google's webmasters tool is going slightly bananas at the fact there's now a spike in 404 errors in its crawl results. What would be the best approach to get Google to 'forget' about the old schema, and instead index the new schema? Should I try blocking /index.php/ in robots.txt? Should I be returning 301 codes instead of 404 for the original urls?

    Read the article

  • How frequently Googlebot fetch sitemaps? Is it depending on page rank?

    - by JITHIN JOSE
    How much frequently google fetches sitemaps? I am now working with a high traffic website normally have 30 new posts per minute.But currently it provides sitemaps which links to new 100 posts(3 minutes). Is this method is enough ?. Is Bots fetch sitemaps every 3 minutes?. Did need to change sitemaps to list all 5M posts(indexed sitemaps)?. How this change will effect on traffic and page rank. Is google bot remove urls that previously listed on sitemap but not now?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >