Search Results

Search found 369 results on 15 pages for 'assertion'.

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

  • how to re-use a sprite in cocos2d-x

    - by zinking
    some times it takes time to create the sprite structures in the scene, I might need to setup structures inside this sprite to meet requirement, thus I would hope to reuse such structures with the game again and again. I tried that, remove the child from parent, detach it from parent , clean parent with the sprite. but when I try to add the sprite to another scene, it's just wont pass the assertion that the sprite already have parent did I miss some step ? add an example: I have a sprite A which involves of quite a few steps to construct, so I used it in scene A layer A, and then I want to use it in scene A layer B, scene B layer A1 etc..... generally speaking I don't want to reconstruct the sprte again.

    Read the article

  • How do you convert many files from .xlsx to .xls ?

    - by David Oneill
    What is a way to convert a batch of .xlsx files to .xls format? I would prefer it to be a command-line solution, but anything is better than opening each manually, and manually saving in the new format. ~~Edit~~ So is there a way to get around that error? errored: Leaking python objects bridged to UNO for reason pyuno runtime is not initialized, (the pyuno.bootstrap needs to be called before using any uno classes) python: tpp.c:63: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= __sched_fifo_min_prio && new_prio <= __sched_fifo_max_prio)' failed. Aborted

    Read the article

  • Nautilus will not launch after update to 12.10

    - by dereksalerno
    I updated to Ubuntu 12.10 today from 12.04 using the graphical update tool. Everything seemed to be fine until I went to open Nautilus, and it would not open. Bizarrely, I am able to open a file that I happen to have on my desktop, but when I click on the launcher, it never opens. When I enter 'nautilus' in the terminal, I get this: (nautilus:8557): Gdk-CRITICAL **: gdk_x11_display_get_xdisplay: assertion `GDK_IS_DISPLAY (display)' failed zsh: segmentation fault (core dumped) nautilus I am not a total novice with ubuntu or linux, but all I can tell is that there is some problem with X. Can someone please point me in the right direction as far as fixing this? I really don't want to have to do a fresh install. Thank you very much.

    Read the article

  • How can I restore a corrupted Shotwell db?

    - by Yann Dìnendal
    While I was importing photos from a SD card in Shotwell, my laptop has crashed (shutdown because of over-heating). Now, I can no longer launch Shotwell: $ shotwell ** ERROR:x86_64-linux-gnu/db/VersionTable.c:104:version_table_construct: assertion failed: (res == SQLITE_OK) If I move the .db file ~/.shotwell/data/photo.db elsewhere so it is no longer present (but backed-up), shotwell will launch, but will rebuild its library, which will be empty. I can re-import the folders shotwell creates, but I lose nearly all meta-data (most importantly the "folders", or events, and their main picture) Is there a way to repair/rebuild/restore photo.db? How can I see what's inside? how bad it's damaged? Or is there another way to get back my events and imports?

    Read the article

  • How to convincing Programmers that 'being in the zone' [coding] isn't always beneficial for the project?

    - by hawkeye
    In this book review: http://books.slashdot.org/story/11/06/13/1251216/Book-Review-The-Clean-Coder?utm_source=slashdot&utm_medium=twitter Chapter 4 talks about the coding process itself. One of the hardest statements the book makes here is to stay out of "the zone" when coding. Bob asserts that you lose parts of the big picture when you go down to that level. While I may struggle with that assertion, I do agree with his next statement that debugging time is expensive, so you should avoid having to do debugger-driven development whenever possible. He finishes the chapter with examples of pacing yourself (walking away, taking a shower) and how to deal with being late on your projects (remembering that hope is not a plan, and being clear about the impact of overtime) along with a reminder that it is good to both give and receive help, whether it be small questions or mentoring others. they talk about how 'being in the zone' - can actually be detrimental to the project. How do you convince your team members that this is the case?

    Read the article

  • Wireless not working on Dell XPS 17 after installing 12.04

    - by user60622
    I (linux newbie) have a Dell XPS 17 and tried to install Ubuntu 12.04. After installation all WLAN accesspoints near are detected. But I can not connect (but I am able to connect with other computers as well as with Dell XPS 17 under windows). Outputs: iwconfig lo no wireless extensions. wlan0 IEEE 802.11bg ESSID:"LerchenPoint" Mode:Managed Frequency:2.412 GHz Access Point: 58:6D:8F:A0:2D:58 Bit Rate=1 Mb/s Tx-Power=14 dBm Retry long limit:7 RTS thr:off Fragment thr:off Power Management:off Link Quality=70/70 Signal level=-37 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:19 Missed beacon:0 eth0 no wireless extensions. sudo lshw -class network *-network description: Wireless interface product: Centrino Wireless-N 1000 vendor: Intel Corporation physical id: 0 bus info: pci@0000:04:00.0 logical name: wlan0 version: 00 serial: 00:26:c7:99:98:28 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=iwlwifi driverversion=3.2.0-24-generic firmware=39.31.5.1 build 35138 latency=0 link=no multicast=yes wireless=IEEE 802.11bg resources: irq:50 memory:f0400000-f0401fff *-network description: Ethernet interface product: RTL8111/8168B PCI Express Gigabit Ethernet controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:0a:00.0 logical name: eth0 version: 06 serial: f0:4d:a2:56:e3:94 size: 1Gbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8168e-2.fw ip=192.168.0.123 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s resources: irq:47 ioport:6000(size=256) memory:f0a04000-f0a04fff memory:f0a00000-f0a03fff dmesg | grep iwl [ 10.157531] iwlwifi 0000:04:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 [ 10.157561] iwlwifi 0000:04:00.0: setting latency timer to 64 [ 10.157598] iwlwifi 0000:04:00.0: pci_resource_len = 0x00002000 [ 10.157599] iwlwifi 0000:04:00.0: pci_resource_base = ffffc90011090000 [ 10.157601] iwlwifi 0000:04:00.0: HW Revision ID = 0x0 [ 10.157731] iwlwifi 0000:04:00.0: irq 50 for MSI/MSI-X [ 10.157834] iwlwifi 0000:04:00.0: Detected Intel(R) Centrino(R) Wireless-N 1000 BGN, REV=0x6C [ 10.157976] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S [ 10.179772] iwlwifi 0000:04:00.0: device EEPROM VER=0x15d, CALIB=0x6 [ 10.179775] iwlwifi 0000:04:00.0: Device SKU: 0X50 [ 10.179777] iwlwifi 0000:04:00.0: Valid Tx ant: 0X1, Valid Rx ant: 0X3 [ 10.179796] iwlwifi 0000:04:00.0: Tunable channels: 13 802.11bg, 0 802.11a channels [ 10.574728] iwlwifi 0000:04:00.0: loaded firmware version 39.31.5.1 build 35138 [ 10.726409] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs' [ 19.714132] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S [ 19.777862] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S [ 2251.603089] iwlwifi 0000:04:00.0: PCI INT A disabled [ 2266.578350] iwlwifi 0000:04:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 [ 2266.578399] iwlwifi 0000:04:00.0: setting latency timer to 64 [ 2266.578435] iwlwifi 0000:04:00.0: pci_resource_len = 0x00002000 [ 2266.578437] iwlwifi 0000:04:00.0: pci_resource_base = ffffc90011090000 [ 2266.578439] iwlwifi 0000:04:00.0: HW Revision ID = 0x0 [ 2266.578704] iwlwifi 0000:04:00.0: irq 50 for MSI/MSI-X [ 2266.578808] iwlwifi 0000:04:00.0: Detected Intel(R) Centrino(R) Wireless-N 1000 BGN, REV=0x6C [ 2266.578916] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S [ 2266.600709] iwlwifi 0000:04:00.0: device EEPROM VER=0x15d, CALIB=0x6 [ 2266.600712] iwlwifi 0000:04:00.0: Device SKU: 0X50 [ 2266.600713] iwlwifi 0000:04:00.0: Valid Tx ant: 0X1, Valid Rx ant: 0X3 [ 2266.600727] iwlwifi 0000:04:00.0: Tunable channels: 13 802.11bg, 0 802.11a channels [ 2266.605978] iwlwifi 0000:04:00.0: loaded firmware version 39.31.5.1 build 35138 [ 2266.606331] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs' [ 2266.614179] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S [ 2266.681541] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S Solutions I tried: rfkill list all 0: dell-wifi: Wireless LAN Soft blocked: no Hard blocked: no 2: phy0: Wireless LAN Soft blocked: no Hard blocked: no echo "options iwlwifi 11n_disable=1" | sudo tee /etc/modprobe.d/iwlwifi.conf options iwlwifi 11n_disable=1 sudo modprobe -rfv iwlwifi WARNING: All config files need .conf: /etc/modprobe.d/blacklist, it will be ignored in a future release. rmmod /lib/modules/3.2.0-24-generic/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko rmmod /lib/modules/3.2.0-24-generic/kernel/net/mac80211/mac80211.ko rmmod /lib/modules/3.2.0-24-generic/kernel/net/wireless/cfg80211.ko sudo modprobe iwlwifi WARNING: All config files need .conf: /etc/modprobe.d/blacklist, it will be ignored in a future release. replacing iwlwifi-1000-5.ucode (current driver) against iwlwifi-1000-3.ucode sudo jockey-gtk: (jockey-gtk:2493): Gtk-CRITICAL **: gtk_icon_set_render_icon_pixbuf: assertion icon_set != NULL' failed (jockey-gtk:2493): Gtk-CRITICAL **: gtk_icon_set_render_icon_pixbuf: assertion icon_set != NULL' failed nothing is listet in "Additional drivers" (german: "Zusätzliche Treiber"). gksudo gedit /etc/modprobe.d/blacklist.conf add "blacklist acer_wmi" Any help would be appreciated very much. Thanks!!

    Read the article

  • Facing problem with "gtk.RESPONSE_OK" in the simple-player quickly tutorial

    - by sumit_gt
    I am fairly new to both quickly and Python. I am facing several problems while learning to use quickly from the following tutorial on the Ubuntu developers site: http://developer.ubuntu.com/resources/app-developer-cookbook/multimedia/creating-a-simple-media-player/ The following error I'm unable to understand: Traceback (most recent call last): File "/home/sumit/Sumit/simple-player/simple_player/SimplePlayerWindow.py", line 36, in on_openbutton_clicked if response==gtk.RESPONSE_OK: NameError: global name 'gtk' is not defined I realize that I am supposed to import something, so I tried to add import gtk which it didn't work and it gave the following error: from gtk import _gtk /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed from gtk import _gtk I have followed every step of the tutorials so far. But there is no mention of any other imports other that "prompts" and "os". Please help. Contribution of Agmenor, facing the same problem: I also tried to replace the text if response == gtk.RESPONSE_OK: by if response == Gtk.RESPONSE_OK: (notice the capital G). This gives another error: AttributeError: 'gi.repository.Gtk' object has no attribute 'RESPONSE_OK'

    Read the article

  • Is it OK to have multiple asserts in a single unit test?

    - by Restuta
    I think that there are some cases when multiple assertions are needed (e.g. Guard Assertion), but in general I try to avoid this. What is your opinion? Please provide a real word examples when multiple asserts are really needed. Thanks! Edit In the comment to this great post Roy Osherove pointed to the OAPT project that is designed to run each assert in a single test. This is written on projects home page: Proper unit tests should fail for exactly one reason, that’s why you should be using one assert per unit test. And also Roy wrote in comments: My guideline is usually that you test one logical CONCEPT per test. you can have multiple asserts on the same object. they will usually be the same concept being tested.

    Read the article

  • gtk glade need help

    - by shiv garg
    I am using glade to make an user interface. i have successfully generated the glade file Now i have to include this file in my C code. I am using following code: #include <stdlib.h> #include<gtk/gtk.h> int main (int argc, char *argv[]) { GtkWidget *builder,*window,*button; gtk_init (&argc, &argv); builder=gtk_builder_new(); gtk_builder_add_from_file(builder,"shiv.glade",NULL); window=GTK_WIDGET (gtk_builder_get_object(builder,"window1")) ; button=GTK_WIDGET (gtk_builder_get_object(builder,"button1")); g_object_unref(G_OBJECT(builder)); gtk_widget_show(button); gtk_widget_show(window); gtk_main (); return 0; } My UI is a simple window having a button without any callback function. I am getting following errors on execution GTK-CRITICAL **: IA__gtk_widget_show assertion 'GTK_IS_WIDGET(widget)' failed

    Read the article

  • gkSudo fails with critical error

    - by Chud37
    I am trying to run gkSudo. This is my second day as a linux user. Yesterday I could do gksudo gedit and input my root password fine. Today, when i run that, the GUI comes up and ask's for my password, however then the program fails to run and all I get is: (gksudo:3262): GLib-CRITICAL **: g_str_has_prefix: assertion `str != NULL' failed I cannot sudo, I cannot su, i can't do anything. I am trying to add myself to the sudoers file but i can't even view it without being root. What can I do?

    Read the article

  • Unable to boot either Ubuntu or Windows after kernel panic

    - by Josh Taylor
    Hi, Today I have been unable to boot into my Ubuntu (10.10) or Windows (7) partition. Ubuntu kernel panics on boot with the error: init: hash.c:296: Assertion failed in nih_hash_search: hash != NULL I can boot into a LiveUSB environment, and from there can access all my files on my 3 partitions (1 ext4, 2 NTFS). I have also ran fsck on the ext4 partition and ntfsfix on the 2 NTFS partitions, both not finding any errors at all. And Grub is intact and have also tried a reinstall of it. So at the moment I'm currently stuck using a LiveUSB, and would like to see if there are any other options other than reinstalling. Thanks. Update I've now ran chkdsk using my Windows recovery disk, and it found errors and fixed them, but I am still unable to boot into either Windows or Ubuntu Update #2 I've decided to just re-install Ubuntu and start again as I didn't really want to spend any more time looking around whilst I need this computer for work. Thanks for all your help though.

    Read the article

  • Installation of Office 2007

    - by Edwin Otwori
    The installation process was successful but i get error messages when opening any application. The instructions i followed were from here.How do i go about it. I am using Ubuntu 10.04. The error message i get is Unhandled exception: assertion failed in 32-bit code (0x6b02b832). Register dump: CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b EIP:6b02b832 ESP:0033e6e4 EBP:0033e6f0 EFLAGS:00200202( - -- I - - - ) EAX:00000000 EBX:00000f0b ECX:00000f0b EDX:00000006 ESI:6828ba9e EDI:682aeff4 Stack dump: 0x0033e6e4: 68184651 682aeff4 0033e810 0033e818 0x0033e6f4: 68187a82 00000006 0033e790 00000000 0x0033e704: 0001ee00 682b0450 00000090 682b03c0 0x0033e714: 682aeff4 682b03c0 0000008a 0033e738 0x0033e724: 681c9a9d 0033e800 682aeff4 682aeff4 0x0033e734: 0000008b 0033e800 681b9da8 7db7b0d8 Backtrace: =>0 0x6b02b832 GLIBC_2+0x832() in ld-linux.so.2 (0x0033e6f0) 1 0x68187a82 abort+0x181() in libc.so.6 (0x0033e818) 2 0x6817d718 __assert_fail+0xf7() in libc.so.6 (0x0033e860) 3 0x712fec66 in riched20 (+0xec65) (0x0033e930) 4 0x71310688 in riched20 (+0x20687) (0x0033e9e0) 5 0x7130bee1 in riched20 (+0x1bee0) (0x0033eaa0) 6 0x7130c21c in riched20 (+0x1c21b) (0x0033ead0) 7 0x6d3b9a9a WINPROC_wrapper+0x19() in user32 (0x0033eb00)

    Read the article

  • Thunderbird cant open due to GLiB Error

    - by Elli
    i recently updated Lubuntu to 13.10 and now after some days Thunderbird stopped working. It just won't open. When i try to open it with the terminal i get the following text: user@user-rechner:~$ thunderbird (process:6231): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed (thunderbird:6231): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::sm-connect after class was initialised (thunderbird:6231): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised (thunderbird:6231): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::display after class was initialised (thunderbird:6231): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised GNOME-Tastaturkürzel-Verzeichnis »/home/user/.gnome2/accels« konnte nicht angelegt werden: Keine Berechtigung (Translation: gnome shortcut-directory could not be created - no permission) Now i reinstalled it once, deleted this .thunderbird folder in my home directory and it still won't work. I hope someone can help me. Thanks.

    Read the article

  • can't install software--can I fix missing dpkg?

    - by user125272
    New software can't be installed, because there is a problem with the software currently installed. Do you want to repair now? hit Repair Package operation failed The installation or removal of a software package failed. Details => installArchives()failed:Could not exec dpkg! Error in function (synaptic:12725): GLib-CRITICAL **: g_child_watch_add_full: assertion 'pid > 0' failed Could not exec dpkg! E: Sub-process /usr/bin/dpkg returned an error code (100) A package failed to install. Trying to recover: sh: 1: dpkg: not found

    Read the article

  • Single responsibility principle - am I overusing it?

    - by Tarun
    For reference - http://en.wikipedia.org/wiki/Single_responsibility_principle I have a test scenario where in one module of application is responsible for creating ledger entries. There are three basic tasks which could be carried out - View existing ledger entries in table format. Create new ledger entry using create button. Click on a ledger entry in the table (mentioned in first pointer) and view its details in next page. You could nullify a ledger entry in this page. (There are couple more operation/validations in each page but fore sake of brevity I will limit it to these) So I decided to create three different classes - LedgerLandingPage CreateNewLedgerEntryPage ViewLedgerEntryPage These classes offer the services which could be carried out in those pages and Selenium tests use these classes to bring application to a state where I could make certain assertion. When I was having it reviewed with on of my colleague then he was over whelmed and asked me to make one single class for all. Though I yet feel my design is much clean I am doubtful if I am overusing Single Responsibility principle

    Read the article

  • Record and display Kinect audio and video via avconv

    - by ThomasH
    I'm trying to record audio and video from a Kinect using avconv but I seem to have trouble specifying the right options. avconv -f video4linux2 -video_size 640x480 -c:v h264 -c:a ac3 -i /dev/video1 test.mp4 results in: avconv: /build/buildd/libav-extra-0.8.3ubuntu0.12.04.1/libav/libavutil/mathematics.c:79: av_rescale_rnd: Assertion `c > 0' failed. Aborted (core dumped) Cheese is perfectly happy recording the audio and video from the Kinect, so it's not a setup issue. For added fun, I also need to display the video at the same time.

    Read the article

  • Using .add() on the same widget more than once

    - by Dillon Gilmore
    I asked this question on Reddit and was directed here. http://www.reddit.com/r/Ubuntu/comments/vhadl/quickly_dynamic_ui/ Unfortunately I am having the same issue and the problems seems that you can only use .add() on a widget once. So here is my code, self.ui.labels = [] for titles in entries: label = Gtk.Label() self.ui.labels.append(label) self.ui.viewport1.add(self.ui.labels[-1]) self.ui.paned1.show_all() Now, for fun I decided "What would happen if I just manually did..." self.ui.viewport1.add(Gtk.Label()) self.ui.viewport1.add(Gtk.Button()) self.ui.viewport1.add(Gtk.Entry()) For my first code snippet I get this error, Gtk-CRITICAL **: gtk_viewport_add: assertion gtk_bin_get_child (bin) == NULL' failed The error happens an unknown amount of times because the list entries can vary in length, but for my second code snippet it happens exactly twice. This means that when I viewport1.add() it works the first time, but all adds after that receive the error above. So my question, is there a way in python to use .add() on the same widget more than once?

    Read the article

  • how to fix error when authenticating in U1

    - by Yann
    Like other users, when authenticating in U1 I get this error: Method "CreateItem" with signature "a{sv}(oayay)b" on interface "org.freedesktop.Secret.Collection" doesn't exist. And in /var/log/auth.log: gnome-keyring-daemon[4793]: egg_symkey_generate_simple: assertion `iterations >= 1' failed gnome-keyring-daemon[4793]: couldn't prepare to write out keyring: /home/yann/.gnome2/keyrings/login_1.keyring So I tried to move "login.keyring". I typed no password for the security when logging into U1, accepted non secured way to save passwords. And a message told me the operation successfully completed (in French). But, sync did not work. And u1sdtool --status returned this: State: AUTH_FAILED connection: With User With Network description: auth failed is_connected: False is_error: True is_online: False queues: WORKING I'm sorry U1 doesn't work anymore; it was really useful to me. Can you help me ? Ubuntu 11.10

    Read the article

  • Moving between sites using SAML

    - by System Down
    I'm tasked with developing an SSO system, and was guided towards using the SAML spec. After some research I think understand the interaction between a Service Provider and an ID Provider and how a user's identity is confirmed. But what happens when I redirect the user to another Service Provider? How do I ascertain the user's identity there? Do I send his SAML assertion tokens along with the redirect request? Or does the second Service Provider need to contact the ID Provider all over again?

    Read the article

  • Hangs on Splash Screen after login (auto-login), how can I fix this?

    - by Davious
    Computer: Toshiba Terca A4 OS: Ubuntu Desktop 10.10 After installing 10.10, the splash screen hangs and the mouse pointer appears. Anyone know what I can do to fix this? ~/.xsession-errors has (nautilus:3190): GConf-CRITICAL **: gconf_value_free: assertion `value != NULL' failed btw, Safe-mode works: I do a Ctrl-Alt-F1 into a command prompt session and run ps aux | grep slave then sudo kill [id of gdm-simple-slave] That killed the session and allowed me to login in safe-mode. Safe-mode works. Then I open a terminal and run ps aux | grep nm- sudo kill -9 [id of nm-applet] nm-applet --sm-disable & to get my internet connection up.

    Read the article

  • Dash empy and blank Software Center

    - by fra_casula
    I've Ubuntu 12.10.1 LTS x62 fresh of installation... My dash is empty, search doesn't work and applications list is empty. If I run the Ubuntu Software Center it freeze in a blank screen. I tried with: restart reinstall of unity packages deleting ~/.local/share/zeitgeist folder other tricks found in the other askubuntu answers UPDATE: From ~/.xsession-errors I/O warning : failed to load external entity "/home/francesco/.compiz/session/10699c9c27649d05db134910329935534100000027470033" Initializing session options...done (compiz:2813): GConf-CRITICAL **: gconf_client_add_dir: assertion `gconf_valid_key (dirname, NULL)' failed ** (zeitgeist-datahub:3070): WARNING **: zeitgeist-datahub.vala:227: Unable to get name "org.gnome.zeitgeist.datahub" on the bus! EDIT: Deleting .cache folder solves the Ubuntu Software Center blank screen issue, thanks to jokerdino!!

    Read the article

  • Checking collision of bullets and Asteroids

    - by Moaz ELdeen
    I'm trying to detect collision between two list of bullets and asteroids. The code works fine, but when the bullet intersects with an asteroid, and that bullet passes through another asteroid, the code gives an assertion, and it says about it can't increment the iterator. I'm sure there is a small bug in that code, but I can't find it. for (list<Bullet>::iterator itr_bullet = ship.m_Bullets.begin(); itr_bullet!=ship.m_Bullets.end();) { for (list<Asteroid>::iterator itr_astroid = asteroids.begin(); itr_astroid!=asteroids.end(); itr_astroid++) { if(checkCollision(itr_bullet->getCenter(),itr_astroid->getCenter(), itr_bullet->getRadius(), itr_astroid->getRadius())) { itr_astroid = asteroids.erase(itr_astroid); } } itr_bullet++; }

    Read the article

  • Have I mistakenly assumed that my routines are loosely coupled?

    - by Tarun
    My Selenium test structures goes as - Data Object class - public class RegistrationData { String firstName = "test first name"; String lastName = "test last name"; // Getter Setter Here } Page Object class which carries out operations on a Web Page - public class RegistrationPage { private RegistrationData regData; public void setRegistrationData(RegistrationData regData) { this.regData = regData(); public NewAccountPage fillRegForm() { enterFirstName("FirstNameTextBoxLocator", regData.getFirstName); enterLastName("LastNameTextBoxLocator", regData.getLastName); // Some more fields are filled here return NewAccountPage(); } } And test class uses them as - public class TestRegistration extends SelTestCase { @Test public void testRegNewUser() { RegistrationData regData = new RegistrationData(); RegistrationPage regPage = New RegistrationPage(); regPage.setRegistrationData(regData) regPage.fillRegForm(); // Some assertion here } } Now since fillRegForm method does not take any argument, Can I assume that it is an example of loose coupling despite I need to set RegistrationData in RegistrationPage before being able to use fillRegForm method.

    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

  • WebDriver with firefox-x11 on Mac

    - by binil
    I am trying to run a headless test for a web application using WebDriver on Mac OS X 10.6.3. My plan is to run firefox-x11 with Xvfb, but WebDriver is unable to launch firefox-x11. My code is: System.setProperty("webdriver.firefox.bin", "/opt/local/bin/firefox-x11-devel-standalone"); WebDriver browser = new FirefoxDriver(); try { browser.get("http://google.com"); } finally { browser.close(); } but this fails with: org.openqa.selenium.WebDriverException: Unable to start firefox cleanly. Exit value: 1 Ran from: [/opt/local/bin/firefox-x11-devel-standalone, --verbose, -silent] System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.6.3', java.version: '1.6.0_17' Driver info: driver.version: firefox at org.openqa.selenium.firefox.FirefoxBinary.copeWithTheStrangenessOfTheMac(FirefoxBinary.java:200) at org.openqa.selenium.firefox.FirefoxBinary.startProfile(FirefoxBinary.java:83) at org.openqa.selenium.firefox.FirefoxBinary.clean(FirefoxBinary.java:264) at org.openqa.selenium.firefox.FirefoxLauncher.startProfile(FirefoxLauncher.java:66) at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.<init>(NewProfileExtensionConnection.java:45) at org.openqa.selenium.firefox.internal.ExtensionConnectionFactory.connectTo(ExtensionConnectionFactory.java:44) When I manually launch /opt/local/bin/firefox-x11-devel-standalone from the terminal, it seems to work fine despite some harmless errors shown. So, I tried to patch the org.openqa.selenium.firefox.FirefoxBinary.copeWithTheStrangenessOfTheMac(ProcessBuilder) method to ignore the errors and exit value of 1. Now it proceeds further, but fails with: Caused by: org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/opt/local/bin/firefox-x11-devel-standalone) on port 7055; process output follows: Xlib: extension "RANDR" missing on display "/tmp/launch-tElCRZ/org.x:0". Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! (firefox-bin:88837): Gtk-CRITICAL **: gtk_widget_has_screen: assertion `GTK_IS_WIDGET (widget)' failed ?Xlib: extension "RANDR" missing on display "/tmp/launch-tElCRZ/org.x:0". Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! (firefox-bin:88877): Gtk-CRITICAL **: gtk_widget_has_screen: assertion `GTK_IS_WIDGET (widget)' failed ? System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.6.3', java.version: '1.6.0_17' Driver info: driver.version: firefox at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.connectToBrowser(NewProfileExtensionConnection.java:60) at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.<init>(NewProfileExtensionConnection.java:49) at org.openqa.selenium.firefox.internal.ExtensionConnectionFactory.connectTo(ExtensionConnectionFactory.java:44) ... 4 more Caused by: org.openqa.selenium.firefox.NotConnectedException: Failed to start up socket within 45000 at org.openqa.selenium.firefox.internal.AbstractExtensionConnection.connectToBrowser(AbstractExtensionConnection.java:143) at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.connectToBrowser(NewProfileExtensionConnection.java:58) ... 6 more Has anyone got WebDriver to work with firefox-x11? This post seems to suggest that one person had got it working, but it does not contain much details.

    Read the article

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