Daily Archives

Articles indexed Wednesday May 28 2014

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

  • return to middle click copy and paste ubuntu 13.10

    - by user206999
    Recent update to 13.10 left the middle mouse button turning sound on and off!! How do I get back to being able to copy and paste? Select the text then paste with the middle Wheel mouse button. This is a feature I used to use a lot and I find extremely quick and useful. I know I can use ctrl c, ctrl v, and right click select copy, select paste but this is clunky compared to just being able to click the middle wheel button. Is there a settings menu option to gain correct operation of the middle wheel button?

    Read the article

  • How to keep specific old kernel on my next kernel upgrade?

    - by tvrtko
    I just updated my Ubuntu 14.04 and got a new kernel. This new kernel is not working properly for me so I booted the previous version. Let's call this good old working version "3.13.0-24.47". Now, I want to keep this "3.13.0-24.47" version until I decide to delete it manually. I want to be able to upgrade my kernel each time there is a new version in hope of getting the one which works again. Until then, I want to use the "3.13.0-24.47". I'm afraid that next update will delete my "3.13.0-24.47" version because there are only two kernel versions available at a given time on my system (/boot).

    Read the article

  • Lubuntu 14.04 graphics problem on portege r100

    - by user286069
    first of all I have to say that I am not an expert. I have installed Lubuntu 14.04 on my Portege R100. The problem is that the graphics session does not start. Actually I can do all but only by command line. I try to start Xsession but nothing happens. Actually by typing startx the system stop to works. I read several threads on this topic but I did not find such kind of problem. There is something similar about portege r100 concerning lowgraphics mode but the porblem I have seems to be different because graphics session does not start. Can anyone help me ? Thank you Best

    Read the article

  • Software Center not Opening at all Error

    - by Newbie
    When I open software from menu, it says "cannot open software database. Please reinstall the software-center package. When I write software-center on terminal, such error comes: 2014-05-28 09:11:20,584 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None' 2014-05-28 09:11:20,593 - softwarecenter.ui.gtk3.app - ERROR - xapian open failed Traceback (most recent call last): File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 302, in __init__ if self.db.schema_version() != DB_SCHEMA_VERSION: File "/usr/share/software-center/softwarecenter/db/database.py", line 289, in schema_version return self.xapiandb.get_metadata("db-schema-version") File "/usr/share/software-center/softwarecenter/db/database.py", line 177, in xapiandb self._db_per_thread[thread_name] = self._get_new_xapiandb() File "/usr/share/software-center/softwarecenter/db/database.py", line 190, in _get_new_xapiandb xapiandb = xapian.Database(self._db_pathname) File "/usr/lib/python2.7/dist-packages/xapian/__init__.py", line 3667, in __init__ _xapian.Database_swiginit(self,_xapian.new_Database(*args)) DatabaseCorruptError: /var/cache/software-center/xapian/iamchert: Chert version file should be 28 bytes, actually 0 Now, when I write command sudo apt-get remove software-center dpkg: error: corrupt info database format file '/var/lib/dpkg/info/format' E: Sub-process /usr/bin/dpkg returned an error code (2) I had ubuntu before but it kind of got corrupted. Now, I have freshly reinstalled it and even at start, software center is not opening and this error comes. I hope you have a solution. Thanks.

    Read the article

  • Problem running Qreator on Xubuntu-14.04

    - by Seyed Mohammad
    I installed Qreator using apt-get on Xubuntu-14.04: $ sudo apt-get install qreator But the application fails to start! When I try to run it via Terminal, the following error messages are printed and the program aborts: $ qreator ** (qreator:3859): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-Gh2FPHrMr2: Connection refused No handlers could be found for logger "qreator_lib" Traceback (most recent call last): File "/usr/bin/qreator", line 47, in <module> qreator.main() File "/usr/lib/python2.7/dist-packages/qreator/__init__.py", line 63, in main window = QreatorWindow.QreatorWindow() File "/usr/lib/python2.7/dist-packages/qreator_lib/Window.py", line 48, in __new__ new_object.finish_initializing(builder) File "/usr/lib/python2.7/dist-packages/qreator/QreatorWindow.py", line 79, in finish_initializing self.init_qr_types() File "/usr/lib/python2.7/dist-packages/qreator/QreatorWindow.py", line 135, in init_qr_types self.qr_types = [d(self.update_qr_code) for d in QRCodeType.dataformats] File "/usr/lib/python2.7/dist-packages/qreator/qrcodes/QRCodeType.py", line 71, in __init__ self.create_widget() # pylint: disable=E1101 File "/usr/lib/python2.7/dist-packages/qreator/qrcodes/QRCodeLocation.py", line 29, in create_widget self.widget = QRCodeLocationGtk(self.qr_code_update_func) File "/usr/lib/python2.7/dist-packages/qreator/qrcodes/QRCodeLocationGtk.py", line 49, in __init__ latitude, longitude = get_current_location() File "/usr/lib/python2.7/dist-packages/qreator/qrcodes/QRCodeLocationGtk.py", line 109, in get_current_location '/org/freedesktop/Geoclue/Providers/Hostip') File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object follow_name_owner_changes=follow_name_owner_changes) File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__ self._named_service = conn.activate_name_owner(bus_name) File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner self.start_service_by_name(bus_name) File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name 'su', (bus_name, flags))) File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Geoclue.Providers.Hostip was not provided by any .service files How can I fix this ?

    Read the article

  • bluez 5.19 PS4 controller

    - by Athanase
    I currently have a problem when pairing my computer with a PS4 remote. On my Ubuntu 14.04 I removed everything related with bluez and bluetooth, and I built and installed bluez 5.19. Here are some useful command outputs: jean@system ~ hcitool hcitool - HCI Tool ver 5.19 jean@system ~ hcitool dev Devices: hci0 00:15:83:4C:0C:BB jean@system ~ bluetoothctl [bluetooth]# version Version 5.19 jean@system ~ bluetoothctl [NEW] Controller 00:15:83:4C:0C:BB BlueZ [default] jean@system ~ lsusb Bus 003 Device 012: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode) So here is what happens. When I try to hard pair the controller with the computer, by holding the share and ps button for a while, everything works as expected and the pairing is done properly. After a hard pairing if I try the pairing by pressing the ps button only, nothings happen. In order to go it, I first power up the bluetooth dongle: jean@system ~ sudo hciconfig hciX up and then I run the bluetooh deamon bluetoothd: jean@system /usr/libexec/bluetooth ~ ./bluetoothd -d -n bluetoothd[11270]: Bluetooth daemon 5.19 bluetoothd[11270]: src/main.c:parse_config() parsing main.conf bluetoothd[11270]: src/main.c:parse_config() discovto=0 bluetoothd[11270]: src/main.c:parse_config() pairto=0 bluetoothd[11270]: src/main.c:parse_config() auto_to=60 bluetoothd[11270]: src/main.c:parse_config() name=%h-%d bluetoothd[11270]: src/main.c:parse_config() class=0x000100 bluetoothd[11270]: src/main.c:parse_config() Key file does not have key 'DeviceID' bluetoothd[11270]: src/gatt.c:gatt_init() Starting GATT server bluetoothd[11270]: src/adapter.c:adapter_init() sending read version command bluetoothd[11270]: Starting SDP server bluetoothd[11270]: src/sdpd-service.c:register_device_id() Adding device id record for 0002:1d6b:0246:0513 ... bluetoothd[11270]: src/adapter.c:adapter_service_insert() /org/bluez/hci0 bluetoothd[11270]: src/adapter.c:add_uuid() sending add uuid command for index 0 bluetoothd[11270]: profiles/audio/a2dp.c:a2dp_sink_server_probe() path /org/bluez/hci0 bluetoothd[11270]: profiles/audio/a2dp.c:a2dp_source_server_probe() path /org/bluez/hci0 bluetoothd[11270]: src/adapter.c:btd_adapter_unblock_address() hci0 00:00:00:00:00:00 bluetoothd[11270]: src/adapter.c:get_ltk_info() A4:15:66:C1:0D:2A bluetoothd[11270]: src/device.c:device_create_from_storage() address A4:15:66:C1:0D:2A bluetoothd[11270]: src/device.c:device_new() address A4:15:66:C1:0D:2A bluetoothd[11270]: src/device.c:device_new() Creating device /org/bluez/hci0/dev_A4_15_66_C1_0D_2A bluetoothd[11270]: src/device.c:device_set_bonded() bluetoothd[11270]: src/adapter.c:get_ltk_info() A4:15:66:88:5E:9A bluetoothd[11270]: src/device.c:device_create_from_storage() address A4:15:66:88:5E:9A bluetoothd[11270]: src/device.c:device_new() address A4:15:66:88:5E:9A bluetoothd[11270]: src/device.c:device_new() Creating device /org/bluez/hci0/dev_A4_15_66_88_5E_9A bluetoothd[11270]: src/device.c:device_set_bonded() bluetoothd[11270]: src/adapter.c:load_link_keys() hci0 keys 2 debug_keys 0 bluetoothd[11270]: src/adapter.c:load_ltks() hci0 keys 0 bluetoothd[11270]: src/adapter.c:load_connections() sending get connections command for index 0 bluetoothd[11270]: src/adapter.c:adapter_service_insert() /org/bluez/hci0 bluetoothd[11270]: src/adapter.c:add_uuid() sending add uuid command for index 0 bluetoothd[11270]: src/adapter.c:set_did() hci0 source 2 vendor 1d6b product 246 version 513 bluetoothd[11270]: src/adapter.c:adapter_register() Adapter /org/bluez/hci0 registered bluetoothd[11270]: src/adapter.c:set_dev_class() sending set device class command for index 0 bluetoothd[11270]: src/adapter.c:set_name() sending set local name command for index 0 bluetoothd[11270]: src/adapter.c:set_mode() sending set mode command for index 0 bluetoothd[11270]: src/adapter.c:set_mode() sending set mode command for index 0 bluetoothd[11270]: src/adapter.c:adapter_start() adapter /org/bluez/hci0 has been enabled bluetoothd[11270]: src/adapter.c:trigger_passive_scanning() bluetoothd[11270]: plugins/hostname.c:property_changed() static hostname: system bluetoothd[11270]: plugins/hostname.c:property_changed() pretty hostname: bluetoothd[11270]: plugins/hostname.c:update_name() name: system bluetoothd[11270]: src/adapter.c:adapter_set_name() name: system bluetoothd[11270]: plugins/hostname.c:property_changed() chassis: desktop bluetoothd[11270]: plugins/hostname.c:update_class() major: 0x01 minor: 0x01 bluetoothd[11270]: src/adapter.c:load_link_keys_complete() link keys loaded for hci0 bluetoothd[11270]: src/adapter.c:load_ltks_complete() LTKs loaded for hci0 bluetoothd[11270]: src/adapter.c:get_connections_complete() Connection count: 0 And then I press the ps button of the PS4 controller bluetoothd[11270]: src/adapter.c:connected_callback() hci0 device A4:15:66:C1:0D:2A connected eir_len 5 bluetoothd[11270]: profiles/input/server.c:connect_event_cb() Incoming connection from A4:15:66:C1:0D:2A on PSM 17 bluetoothd[11270]: profiles/input/device.c:input_device_set_channel() idev (nil) psm 17 bluetoothd[11270]: Refusing input device connect: No such file or directory (2) bluetoothd[11270]: profiles/input/server.c:confirm_event_cb() bluetoothd[11270]: Refusing connection from A4:15:66:C1:0D:2A: unknown device bluetoothd[11270]: src/adapter.c:dev_disconnected() Device A4:15:66:C1:0D:2A disconnected, reason 3 bluetoothd[11270]: src/adapter.c:adapter_remove_connection() bluetoothd[11270]: plugins/policy.c:disconnect_cb() reason 3 bluetoothd[11270]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr A4:15:66:C1:0D:2A type 0 status 0xe bluetoothd[11270]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e bluetoothd[11270]: src/device.c:device_bonding_failed() status 14 bluetoothd[11270]: src/adapter.c:resume_discovery() So I don't know what is happening here and a bit of help would be appreciated.

    Read the article

  • How do I fix the configuration for monitors?

    - by user1409190
    I'm new to Ubuntu and I've been using it for about 2 weeks now and I have the following problem: I installed the NVidia driver version 331.38. Then I restarted the computer and after I logged-in a dialog popped up with the following error message: Could not apply the stored configuration for monitors - Error on line 1 char 1 : Document must begin will an element (e.g <book>) Any suggestions on how to proceed?

    Read the article

  • Parse git log by modified files

    - by MrUser
    I have been told to make git messages for each modified file all one line so I can use grep to find all changes to that file. For instance: $git commit -a modified: path/to/file.cpp/.h - 1) change1 , 2) change2, etc...... $git log | grep path/to/file.cpp/.h modified: path/to/file.cpp/.h - 1) change1 , 2) change2, etc...... modified: path/to/file.cpp/.h - 1) change1 , 2) change2, etc...... modified: path/to/file.cpp/.h - 1) change1 , 2) change2, etc...... That's great, but then the actual line is harder to read because it either runs off the screen or wraps and wraps and wraps. If I want to make messages like this: $git commit -a modified: path/to/file.cpp/.h 1) change1 2) change2 etc...... is there a good way to then use grep or cut or some other tool to get a readout like $git log | grep path/to/file.cpp/.h modified: path/to/file.cpp/.h 1) change1 2) change2 etc...... modified: path/to/file.cpp/.h 1) change1 2) change2 etc...... modified: path/to/file.cpp/.h 1) change1 2) change2 etc......

    Read the article

  • SSH access failure from Ubuntu 12.04 LTS VM

    - by begueradj
    I installed 2 VMs on VirtualBox. VM 1: Windows XP with FreeSSHd and PuTTY installed.IP address: 10.0.0.2 VM 2: Ubuntu 12.04 LTS Server Edition with OpenSSH installed.IP address: 10.0.0.3 From VM 1, I run PuTTY with the IP address of VM 2 (10.0.0.3) and port number 22. I get prompted to input the username and password of VM 2 and everything works fine.From VM 2, I run on the terminal (Ubuntu): ssh [email protected] , I get prompted to enter the password of VM 1. I do so, but it says my password is invalid (while it is the correct one). I even deactived the Firewall on VM 1, but still the problem is here: my password is not accepted from VM 2. Is this due to some settings maybe I must do on VM 1 (Windows XP) so as I can access it with SSH ? Maybe it has something to do with the Firewall of Windows XP ?Important information: ping 10.0.0.2 from VM 1 and ping 10.0.0.3 from VM 2 are working successfully.

    Read the article

  • Installing a new hardware enablement (HWE) stack in 64 bit Ubuntu

    - by Alexey
    I'd like to install 13.10 (Saucy) hardware enablement (HWE) stack to my Ubuntu 12.04 (64-bit) because I need a newer Linux kernel. This wiki page explains what "hardware enablement stacks" are. Among other things it says: Only the -generic x86 kernel flavor ... will be supported... Also, this answer says: ...This is only recommended for x86 hardware installations... Is x86 here synonymous to 32-bit/i386 architecture (but not 64-bit/AMD64), or is it i386/AMD64 (but not ARM)? Can I install this "hardware enablement stack" in a 64-bit/AMD64 Ubuntu? Will it be supported with future updates?

    Read the article

  • No boot loader found - dual booting Windows 8 with Ubuntu 14.04

    - by Sriram
    I have been trying in vain to dual boot my computer with Windows 8 Pro (pre-installed) and Ubuntu 14.04 64-bit. I have been able to successfully install Ubuntu 14.04, but the option to start Ubuntu does not appear on startup. This is after having taken all steps as mentioned in Installing Ubuntu on a Pre-Installed Windows 8 (64-bit) System (UEFI Supported). I even tried the boot repair option and ended up with this error log. My questions are: How do I solve for No boot loaders found in /dev/...? Are there any other recommendations that will help me solve this? Other points that may be important: Booting into Ubuntu from a live USB shows all Ubuntu partitions on the hard drive.

    Read the article

  • Ubuntu doesn't "see" external USB Hard Disk

    - by Mina Michael
    It's NTFS. It's USB2. I'm using Ubuntu 13.04. It works perfectly fine on Windows (which excludes cable and hardware problems). I have two Ubuntu computers and it's not detected on either. It's about 500 GB. Edits: Following the first link, I input sudo lsusb in a terminal; before and after connecting the HDD. The difference was Bus 001 Device 012: ID 14cd:6116 Super Top M6116 SATA Bridge. There it is! ("sata bridge" used to appear in a windows notification when I plugged in the HDD in!). ...This means that Ubuntu detects it but is it not mounting it? I tried this: sudo mount /dev/sdb1 /mnt But gives this: mount: special device /dev/sdb1 does not exist I also tried: sudo mount /dev/sdc1 /mnt but it stays with no output forever. I left it in background for about 30 min.s. sudo fdisk -l gives out this: Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xa42d04a3 Device Boot Start End Blocks Id System /dev/sda1 63 80324 40131 de Dell Utility /dev/sda2 * 80325 102481919 51200797+ 7 HPFS/NTFS/exFAT /dev/sda3 263874558 312580095 24352769 5 Extended /dev/sda4 102481920 263872511 80695296 7 HPFS/NTFS/exFAT /dev/sda5 263874560 310505471 23315456 83 Linux /dev/sda6 310507520 312580095 1036288 82 Linux swap / Solaris Partition table entries are not in disk order Disk /dev/sdc: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x5822aaea Device Boot Start End Blocks Id System /dev/sdc1 2048 976769023 488383488 7 HPFS/NTFS/exFAT The part below "Partition table entries are not in disk order" takes about 5 minutes to appear. The outputs of ls /dev/ | grep sd before and after connecting the HDD: before: sda sda1 sda2 sda3 sda4 sda5 sda6 ,after: sda sda1 sda2 sda3 sda4 sda5 sda6 sdd sdd1 The second output has the lines sdd and sdd1 different from the first one. IT SHOWED THE FILES!! The command sudo mount /dev/sdd1 /mnt worked after I typed in sudo fdisk -l!!! Thanks a million!! :) :)

    Read the article

  • Informing Googlebot for deprecated pages

    - by trante
    I publish timetables in my website. For example last year I published Number 2 bus Summer 2013 timetable. I has pretty good ranking on Google SERPs for number 2 bus timetable But this year I added a new page with the name "Number 2 bus Summer 2014 timetable". When users search number 2 bus timetable in Google, they find 2013 timetable in first page of SERPs. But I want them to find 2014 timetable. Thy can reach 2014 page with the keywords number 2 bus timetable 2014. But most of the users doesn't write year name. So what's the proper way to say Googlebot that 2013 page is deprecated and newer version is 2014 page ? I created a link from 2013 page to 2013 page and added a deprecation alert for visitors. But I still see 2013 timetable in first page of Google SERPs. Of course it is possible to 301 redirect, 2013 page to 2014 page. But I want users to reach old pages to compare the differences between years. (As you would guess I have many pages like this.) Edit: Why I don't put timetables on same page and show different years' timetables with sorting. Because my old pages has good pagerank scores or SERPs. Removing these old page will remove them.

    Read the article

  • Massive 404 attack with non existent URLs. How to prevent this?

    - by tattvamasi
    The problem is a whole load of 404 errors, as reported by Google Webmaster Tools, with pages and queries that have never been there. One of them is viewtopic.php, and I've also noticed a scary number of attempts to check if the site is a WordPress site (wp_admin) and for the cPanel login. I block TRACE already, and the server is equipped with some defense against scanning/hacking. However, this doesn't seem to stop. The referrer is, according to Google Webmaster, totally.me. I have looked for a solution to stop this, because it isn't certainly good for the poor real actual users, let alone the SEO concerns. I am using the Perishable Press mini black list (found here), a standard referrer blocker (for porn, herbal, casino sites), and even some software to protect the site (XSS blocking, SQL injection, etc). The server is using other measures as well, so one would assume that the site is safe (hopefully), but it isn't ending. Does anybody else have the same problem, or am I the only one seeing this? Is it what I think, i.e., some sort of attack? Is there a way to fix it, or better, prevent this useless resource waste? EDIT I've never used the question to thank for the answers, and hope this can be done. Thank you all for your insightful replies, which helped me to find my way out of this. I have followed everyone's suggestions and implemented the following: a honeypot a script that listens to suspect urls in the 404 page and sends me an email with user agent/ip, while returning a standard 404 header a script that rewards legitimate users, in the same 404 custom page, in case they end up clicking on one of those urls. In less than 24 hours I have been able to isolate some suspect IPs, all listed in Spamhaus. All the IPs logged so far belong to spam VPS hosting companies. Thank you all again, I would have accepted all answers if I could.

    Read the article

  • Change players state and controls in-game

    - by Samurai Fox
    I'm using Unity 3D Let's say the player is an ice cube. You control it like a normal player. On press of a button, ice transforms (with animation) into water. You control it completely different than the ice cube. Another great example would be: Player is human being and has normal FPS controls. On press of a button human transforms into birds and now has completely different controls. Now, my question is, what would be easier and better: make one object with animation transition and to stay in that state of anim. until button is pressed again make two object: ice and water. Ice has an animation of turning into water. So replace ice (with animation) with water object And if anyone knows this one too: how to switch between 2 different types of player controls.

    Read the article

  • How should an object that uses composition set its composed components?

    - by Casey
    After struggling with various problems and reading up on component-based systems and reading Bob Nystrom's excellent book "Game Programming Patterns" and in particular the chapter on Components I determined that this is a horrible idea: //Class intended to be inherited by all objects. Engine uses Objects exclusively. class Object : public IUpdatable, public IDrawable { public: Object(); Object(const Object& other); Object& operator=(const Object& rhs); virtual ~Object() =0; virtual void SetBody(const RigidBodyDef& body); virtual const RigidBody* GetBody() const; virtual RigidBody* GetBody(); //Inherited from IUpdatable virtual void Update(double deltaTime); //Inherited from IDrawable virtual void Draw(BITMAP* dest); protected: private: }; I'm attempting to refactor it into a more manageable system. Mr. Nystrom uses the constructor to set the individual components; CHANGING these components at run-time is impossible. It's intended to be derived and be used in derivative classes or factory methods where their constructors do not change at run-time. i.e. his Bjorne object is just a call to a factory method with a specific call to the GameObject constructor. Is this a good idea? Should the object have a default constructor and setters to facilitate run-time changes or no default constructor without setters and instead use a factory method? Given: class Object { public: //...See below for constructor implementation concerns. Object(const Object& other); Object& operator=(const Object& rhs); virtual ~Object() =0; //See below for Setter concerns IUpdatable* GetUpdater(); IDrawable* GetRenderer(); protected: IUpdatable* _updater; IDrawable* _renderer; private: }; Should the components be read-only and passed in to the constructor via: class Object { public: //No default constructor. Object(IUpdatable* updater, IDrawable* renderer); //...remainder is same as above... }; or Should a default constructor be provided and then the components can be set at run-time? class Object { public: Object(); //... SetUpdater(IUpdater* updater); SetRenderer(IDrawable* renderer); //...remainder is same as above... }; or both? class Object { public: Object(); Object(IUpdater* updater, IDrawable* renderer); //... SetUpdater(IUpdater* updater); SetRenderer(IDrawable* renderer); //...remainder is same as above... };

    Read the article

  • I'm new on Angularjs and i have this error ReferenceError: _ is not defined at h.$scope.setSelectedClient?

    - by user3381078
    Here is my controller.js . var animateApp = angular.module('animateApp'); animateApp.controller('portofolioController', ['$scope', function ($scope) { $scope.selectedCategory = []; $scope.categoryList = [{ id: 1, name: 'webdesign' }, { id: 2, name: 'webdevelop' }, { id: 3, name: 'logo' }]; $scope.clients = [{ name: '1', designation: 'descriere', category: { id: 1, name: 'webdesign' } }, { name: '2', designation: 'descriere', category: { id: 2, name: 'wendevelop' } }, { name: '3', designation: 'descriere', category: { id: 3, name: 'logo' } }, { name: '4', designation: 'descriere', category: { id: 4, name: 'webdesign' } }, { name: '5', designation: 'descriere', category: { id: 5, name: 'webdevelop' } }]; $scope.setSelectedClient = function () { var id = this.category.id; if (_.contains($scope.selectedCategory, id)) { $scope.selectedCategory = _.without($scope.selectedCategory, id); } else { $scope.selectedCategory.push(id); } return false; }; }]); And this is in my html file, is a button and when it pressed, the list i have is sort by category. I have a filter in filter.js who show just the fields in this category. <li data-ng-repeat="category in categoryList"> <a data-ng-click="setSelectedClient()" class="btn">{{category.name}}</a></li> I'm receving an error when i click on click on button. I'm looking posts like that but i can't find anything. ReferenceError: _ is not defined at h.$scope.setSelectedClient (http://localhost/Portofolio2/js/controllers.js:60:13)

    Read the article

  • vtk glyphs 3D, indenpently color and rotation

    - by user3684219
    I try to display thanks to vtk (python wrapper) several glyphs in a scene with each their own colour and rotation. Unfortunately, just the rotation (using vtkTensorGlyph) is taken in consideration by vtk. Reversely, just color is taken in consideration when I use a vtkGlyph3D. Here is a ready to use piece of code with a vtkTensorGlyph. Each cube should have a random color but there all will be in the same color. I read and read again the doc of vtk but I found no solution. Thanks in advance for any idea #!/usr/bin/env python # -*- coding: utf-8 -*- import vtk import scipy.linalg as sc import random as ra import numpy as np import itertools points = vtk.vtk.vtkPoints() # where to locate each glyph in the scene tensors = vtk.vtkDoubleArray() # rotation for each glyph tensors.SetNumberOfComponents(9) colors = vtk.vtkUnsignedCharArray() # should be the color for each glyph colors.SetNumberOfComponents(3) # let's make 10 cubes in the scene for i in range(0, 50, 5): points.InsertNextPoint(i, i, i) # position of a glyph colors.InsertNextTuple3(ra.randint(0, 255), ra.randint(0, 255), ra.randint(0, 255) ) # pick random color rot = list(itertools.chain(*np.reshape(sc.orth(np.random.rand(3, 3)).transpose(), (1, 9)).tolist())) # random rotation matrix (row major) tensors.InsertNextTuple9(*rot) polydata = vtk.vtkPolyData() # create the polydatas polydata.SetPoints(points) polydata.GetPointData().SetTensors(tensors) polydata.GetPointData().SetScalars(colors) cubeSource = vtk.vtkCubeSource() cubeSource.Update() glyphTensor = vtk.vtkTensorGlyph() glyphTensor.SetColorModeToScalars() # is it really work ? try: glyphTensor.SetInput(polydata) except AttributeError: glyphTensor.SetInputData(polydata) glyphTensor.SetSourceConnection(cubeSource.GetOutputPort()) glyphTensor.ColorGlyphsOn() # should not color all cubes independently ? glyphTensor.ThreeGlyphsOff() glyphTensor.ExtractEigenvaluesOff() glyphTensor.Update() # next is usual vtk code mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(glyphTensor.GetOutputPort()) actor = vtk.vtkActor() actor.SetMapper(mapper) ren = vtk.vtkRenderer() ren.SetBackground(0.2, 0.5, 0.3) ren.AddActor(actor) renwin = vtk.vtkRenderWindow() renwin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera()) iren.SetRenderWindow(renwin) renwin.Render() iren.Initialize() renwin.Render() iren.Start()

    Read the article

  • Adding items to dictionary if condition is true, else dont - python

    - by CodeTalk
    I'm trying to take an existing process: if self.path_object is not None: dictpath = {} for path in self.path_object: self.params = path.pathval.split("?")[0] self.params = path.pathval.split("&", 2) if path.pathval.contains(self.params): out = list(map(lambda v: v.split("=")[0] +"=" + str(self.fuzz_vectors), self.params)) else: pass dictpath[path] = out print dictpath I added the sub-if/else block in, but it is failing, stating: AttributeError: 'unicode' object has no attribute 'contains' on the if block . How can I fix it? I'm simply trying to do: if the path.pathval has either ? or & in it: add to dictionary else: pass #forget about it. Thanks!

    Read the article

  • Having an issue wit mouseup event

    - by user3680715
    Hello everyone I have this code working fine but I want the script to stop on the mouse up event. Here is an example of what I have now. How can I stop the script on mouse up event so that it looks like it only shows the coordinates when dragging over the image. Thank you! http://jsfiddle.net/Hc7x4/20/ $(document).ready(function () { $("#map-catcher").mousedown(function (e) { $("#map-catcher").mousemove(function (e) { $("#coord").text("x:"+e.offsetX+", y:"+e.offsetY); return; }); $("#map-catcher").mouseup(function (e) { return; }); }); });

    Read the article

  • How to preserve sibling element position when one sibling is absolutely positioned?

    - by Casey
    In the snippet below, the child div is normally positioned until it is :hovered , when it becomes absolutely positioned. The reasoning behind this markup is to simulate a popup style in a limited environment where I can't use a <select> (among other limitations). When child is hovered, the sibling elements jump around, which is expected, as the contents of the block have changed. But how can I preserve their positioning? That is, what CSS can I add to prevent the siblings from jumping around when child is hovered. Javascript is also not allowed, so please no answers using JS. HTML: <div class="container"> <div class="child"> <span class="d4"></span> <label><input type="radio" name="radio" value="1"/>One</label> <label><input type="radio" name="radio" value="2"/>Two</label> </div> <input type="text" name="sibling"/> <button name="sibling2">Button</button> </div> CSS: .container, .child, button { display:inline-block; } .child { vertical-align: middle; width: 35px; height: 35px; } .child:hover { background: gray; position:absolute; width: 100px; height: auto; } .child:hover > .d4 { display: none; } .child label { display:none; } .child:hover label { display: inline-block; } .d4 { background-position: -411px -1px; width: 35px; height: 35px; background-image: url("https://i.imgur.com/zkgyBOi.png"); background-repeat: no-repeat; color: transparent; display: inline-block; } Here's a fiddle: http://jsfiddle.net/cpctZ/1/

    Read the article

  • Makefile; mirroring a growing tree through a process

    - by Martineau
    I would like to periodically mirror a growing tree, say, from $in to $out, doing a process in between (saving the only file header). As; #!/bin/bash in=./segd out=./db for f in `find $in -name "*.segd"`;do # Deduct output (dir + name) d=`dirname $f|perl -pe 's!'$in'!'$out'!'` n=`basename $f|perl -pe 's!$!_hdr!'` if [ ! -e $d/$n ]; then [ ! -d $d ] && mkdir -p $d; printf "From %s now build %s\n" $f "$d/$n" # Do something, whathever. For example e.g; dd if=$f bs=32 count=1 conv=swab 2>/dev/null|od -x > $d/$n fi done That is about fair. However; to be more robust, for a better synchronization (say if a source file did change or whatever), I would like to use a Makefile, as in; HDR := $(patsubst ./segd/%.segd,./db/%.segd_hdr,$(wildcard ./segd/*.segd)) all: ${HDR} db/%.segd_hdr: ./segd/%.segd echo "Doing" dd if=$< bs=32 count=1 conv=swab 2>/dev/null|od -x > $@ My problem; I cannot code this Makefile to "dive" more deeply within the source ./segd tree. How can we do it and is there a way ? Many thanks for your kind recommendations. PS: The idea will be to later rsync the (smaller) destination tree over a sat connection.

    Read the article

  • Access ASP.NET control using javascript

    - by user3036965
    I have a basic javascript function like this which works as I am able to dynamically change the textbox in a javascript method at runtime. function MyTst(pVal2) { var x = document.getElementById('<%=myImage.ClientID%>'); x.src = "/images/write.gif"; } In the above code I need to be generic. So replace '<%=myImage.ClientID%' with the input param to my method which in this instance is called pVal2 and contains the asp.net server control image id. Can anyone advise on an approach to do this. I've tried lots of things and just cant seem to get it working. Thanks for any advice.

    Read the article

  • Automatically save CSS changes made to existing styles in Chrome dev tools?

    - by styke
    I've already mapped the necessary files to the local resource - however, while that does allow me to save any changes made to a file in the Sources panel, I was wondering if it's possible to automatically save changes to CSS made in the Elements panel. Otherwise at the moment, any changes made to the style in the Elements panel seem to exist only there. I remember at some point there used to be a little indicator of the file and line number next to a class/id etc. in the Styles tab of the Elements panel - surely it can't be that hard to simply 'update' any changes to that style rule considering Chrome knows exactly where it's coming from (in the case that it's a stylesheet and not an inline style?). It would be a great relief to my workflow. The answers to this similar question are obsolete.

    Read the article

  • Interval arithmetic to correctly deal with end of month - Oracle SQL

    - by user2003974
    I need a function which will do interval arithmetic, dealing "correctly" with the different number of days in a month. For my version of "correctly" - see below! First try select to_date('31-May-2014') + interval '1' months from dual This returns an error, because there is no 31st June. I understand that this behaviour is expected due to the ANSI standard. Second try select add_months(to_date('31-May-2014'),1) from dual This correctly (in my use case) returns 30th June 2014, which is great. BUT select add_months(to_date('28-Feb-2014'),1) from dual returns 31st March 2014, when I want 28th March 2014. Background This has to do with legal deadlines. The deadlines are expressed in law as a number of months (say, 3) from a base date. If the base date is last day of the month and three months later the month is longer, then the deadline does NOT extend to the end of the longer month (as per the add_months function). However, if the base date is last day of the month and three months later the month is shorter, then the deadline expires on the last day of the shorter month. Question Is there a function that does what I need? I have intervals (year to month) stored in a table, so preferably the function would look like: add_interval_correctly(basedate DATE, intervaltoadd INTERVAL YEAR TO MONTH)

    Read the article

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