Daily Archives

Articles indexed Thursday June 12 2014

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

  • Ways to organize interface and implementation in C++

    - by Felix Dombek
    I've seen that there are several different paradigms in C++ concerning what goes into the header file and what to the cpp file. AFAIK, most people, especially those from a C background, do: foo.h class foo { private: int mem; int bar(); public: foo(); foo(const foo&); foo& operator=(foo); ~foo(); } foo.cpp #include foo.h foo::bar() { return mem; } foo::foo() { mem = 42; } foo::foo(const foo& f) { mem = f.mem; } foo::operator=(foo f) { mem = f.mem; } foo::~foo() {} int main(int argc, char *argv[]) { foo f; } However, my lecturers usually teach C++ to beginners like this: foo.h class foo { private: int mem; int bar() { return mem; } public: foo() { mem = 42; } foo(const foo& f) { mem = f.mem; } foo& operator=(foo f) { mem = f.mem; } ~foo() {} } foo.cpp #include foo.h int main(int argc, char* argv[]) { foo f; } // other global helper functions, DLL exports, and whatnot Originally coming from Java, I have also always stuck to this second way for several reasons, such as that I only have to change something in one place if the interface or method names change, that I like the different indentation of things in classes when I look at their implementation, and that I find names more readable as foo compared to foo::foo. I want to collect pro's and con's for either way. Maybe there are even still other ways? One disadvantage of my way is of course the need for occasional forward declarations.

    Read the article

  • Steam on 64-bit 14.04: need some help, missing a few 32-bit libs

    - by YellowShark
    Steam says I'm missing the following libs, I'm hoping someone can help me get things in better shape: xyz@abc:~$ STEAM_RUNTIME=0 steam Running Steam on ubuntu 14.04 64-bit STEAM_RUNTIME is disabled by the user Error: You are missing the following 32-bit libraries, and Steam may not run: libpangoft2-1.0.so.0 libpango-1.0.so.0 libgtk-x11-2.0.so.0 libgdk_pixbuf-2.0.so.0 Installing breakpad exception handler for appid(steam)/version(1401381906_client) Installing breakpad exception handler for appid(steam)/version(1401381906_client) [2014-06-11 20:45:39] Startup - updater built May 29 2014 09:19:23 [2014-06-11 20:45:39] Verifying installation... [2014-06-11 20:45:39] Verification complete [2014-06-11 20:45:42] Shutdown I tried installing the following i386 packages: libpango-1.0-0:i386, libpangoft2-1.0-0:i386, and libgdk-pixbuf2.0-0:i386, and symlinking the .so files (from usr/lib/i386whatever../) into the ~/.local/share/Steam/ubuntu12_32/ folder, but wasn't able to find the right match for the gtk-x11 lib, and ultimately would up with a different, but still non-working situation. So I've back-tracked to this point, and have removed those i386 packages for now. It's worth noting thatSteam runs if I don't use STEAM_RUNTIME=0. Also, Steam seemed to "recognize" the i386 version of the libpango & libpangoft2 libs after I symlinked them into place, during the course of my troubleshooting; when I would rerun STEAM_RUNTIME=0 steam, it wouldn't list those two items as missing anymore. Instead though, I had a bunch of gtk-related issues, something about overlay-scrollbar not available, as well as warnings that it can't find the murrine engine... a whole bunch of stuff that sounded like I'd gone too far down the wrong path. Anyhow, any help sorting this out would be appreciated, and thanks!

    Read the article

  • MAAS and Openstack Network

    - by user281985
    Trying to figure out the best way for openstack and MASS networks to co-exist. Assuming MAAS used 10.0.0.0/24 for provisioning of various openstack nodes, once openstack, with quantum, is deployed should 10.0.0.0 be used as management network, external network, both or discarded? Reason for the question being that I ran a deployment where openstack used 10.0.0.0 as its management network, MAAS dhcp and dns were active; however, I could only access VMs through namespace and was not able to utilize MAAS's dhcp to assign floating IP. (VMs network was through an internal bridge 10.10.10.10, and external bridge was using the same interface as MAAS.) Any thoughts or ideas are appreciated.

    Read the article

  • alx driver not working properly

    - by user292768
    My alx driver seems to be working fine for everything except apt-get. I can navigate to web pages, the ping command works just fine, but whenever I try to do apt-get update or apt-get install it hangs on trying to connect to whatever archive it's trying to pull info from. There's no error message, nothing to imply that it can't connect, it just hangs there and does nothing at all. I've tried re installing alx, upgrading/downgrading my linux kernel, downloading source and building alx from scratch, etc etc but nothing works. Does anybody else have this problem/know how to fix it?

    Read the article

  • Wireless problems with Broadcom BCM4313 with windows7 (duplicate)

    - by user292394
    I have wireless connection problem can't connect my wireless adress lspci -vvnn | grep 14e4 03:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01) iwconfig eth0 no wireless extensions. lo no wireless extensions. wlan0 IEEE 802.11abg ESSID:off/any Mode:Managed Access Point: Not-Associated Retry long limit:7 RTS thr:off Fragment thr:off Power Management:off rfkill list all 0: hci0: Bluetooth Soft blocked: no Hard blocked: no 1: phy0: Wireless LAN Soft blocked: no Hard blocked: no 2: brcmwl-0: Wireless LAN Soft blocked: no Hard blocked: no lsmod Module Size Used by bnep 19624 2 rfcomm 69160 8 ip6t_REJECT 12939 1 xt_hl 12521 6 ip6t_rt 13537 3 nf_conntrack_ipv6 18894 8 nf_defrag_ipv6 34768 1 nf_conntrack_ipv6 ipt_REJECT 12541 1 xt_LOG 17717 10 xt_limit 12711 13 xt_tcpudp 12884 18 xt_addrtype 12635 4 nf_conntrack_ipv4 15012 8 nf_defrag_ipv4 12758 1 nf_conntrack_ipv4 xt_conntrack 12760 16 ip6table_filter 12815 1 ip6_tables 27025 1 ip6table_filter nf_conntrack_netbios_ns 12665 0 nf_conntrack_broadcast 12589 1 nf_conntrack_netbios_ns nf_nat_ftp 12770 0 nf_nat 21798 1 nf_nat_ftp nf_conntrack_ftp 18638 1 nf_nat_ftp nf_conntrack 96976 8 nf_nat_ftp,nf_conntrack_netbios_ns,nf_nat,xt_conntrack,nf_conntrack_broadcast,nf_conntrack_ftp,nf_conntrack_ipv4,nf_conntrack_ipv6 iptable_filter 12810 1 ip_tables 27239 1 iptable_filter vx_tables 34059 13 ip6table_filter,xt_hl,ip_tables,xt_tcpudp,xt_limit,xt_conntrack,xt_LOG,iptable_filter,ip6t_rt,ipt_REJECT,ip6_tables,xt_addrtype,ip6t_REJECT uvcvideo 80885 0 videobuf2_vmalloc 13216 1 uvcvideo videobuf2_memops 13362 1 videobuf2_vmalloc snd_hda_codec_hdmi 46207 1 videobuf2_core 40664 1 uvcvideo videodev 134688 2 uvcvideo,videobuf2_core snd_hda_codec_conexant 57441 1 snd_hda_intel 52355 8 snd_hda_codec 192906 3 snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_hda_intel snd_hwdep 13602 1 snd_hda_codec snd_pcm 102099 4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel snd_page_alloc 18710 2 snd_pcm,snd_hda_intel snd_seq_midi 13324 0 dm_multipath 22873 0 snd_seq_midi_event 14899 1 snd_seq_midi scsi_dh 14882 1 dm_multipath lib80211_crypt_tkip 17619 0 snd_rawmidi 30144 1 snd_seq_midi intel_powerclamp 14705 0 coretemp 13435 0 kvm_intel 143060 0 kvm 451511 1 kvm_intel joydev 17381 0 serio_raw 13462 0 snd_seq 61560 2 snd_seq_midi_event,snd_seq_midi intel_ips 18664 0 wl 4207846 0 snd_seq_device 14497 3 snd_seq,snd_rawmidi,snd_seq_midi btusb 32412 0 bluetooth 395423 22 bnep,btusb,rfcomm snd_timer 29482 2 snd_pcm,snd_seq snd 69238 26 snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device,snd_seq_midi lib80211 14381 2 wl,lib80211_crypt_tkip toshiba_bluetooth 12852 0 cfg80211 484040 1 wl lpc_ich 21080 0 fglrx 8085343 190 soundcore 12680 1 snd toshiba_acpi 22901 0 sparse_keymap 13948 1 toshiba_acpi wmi 19177 1 toshiba_acpi amd_iommu_v2 19054 1 fglrx video 19476 0 mei_me 18627 0 mei 82276 1 mei_me mac_hid 13205 0 parport_pc 32701 0 ppdev 17671 0 lp 17759 0 parport 42348 3 lp,ppdev,parport_pc hid_generic 12548 0 usbhid 52570 0 hid 106148 2 hid_generic,usbhid psmouse 102222 0 ahci 25819 3 libahci 32168 1 ahci atl1c 46086 0 dm_mirror 22135 0 dm_region_hash 20862 1 dm_mirror dm_log 18411 2 dm_region_hash,dm_mirror Can someone give any ideas on how I can fix my wireless

    Read the article

  • Will Ubuntu Live CD move MFT to resize NTFS volumes?

    - by irwazr
    I have a feeling some will consider this a duplicate, but please hear me out. I've been reading tons of questions and threads around this but have never really found an answer for this specifically. I want to shrink my NTFS partition to make room for a Ubuntu install, so I can dual boot them. However when shrinking the NTFS volume in Windows disk management, it will only go so far as the MFT is sitting near the end of the volume. I've read plenty of posts about why it does this, and how difficult/dangerous it is to move the MFT etc. I've also read that Perfect Disk can apparently do it under it's trial period, but I remain cautious to try this method. I was wondering however if the disk partitioning utility included in the Ubuntu install wizard handles the moving of the MFT when dragging the partition boundaries. It all seems too simple that you simply tell it the new size you want it to be. Would it tell me if it couldn't resize by the amount you requested if the MFT was an issue, or move it for you if it were able. I'm concerned it might corrupt the MFT and the volume, even though I doubt the install wizard would be so daft. So what exactly is the deal with the partition resizing tool in the Ubuntu install wizard? Will it safely resize my NTFS volume despite the location of my MFT? Thanks in advance.

    Read the article

  • Getting ADB to run

    - by gh0st_h4wk
    I've recently installed ubuntu and I need Android SDK (and subsequently, adb) in order to develop my apps to college. The fact is that, no matter what I do, I can't get adb to work. Exporting its place to the PATH didn't worked. I only get "file or directory not found" error while this are the contents of the PATH variable: renan@RocketQueen:~$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/renan/adt/sdk/tools:/home/renan/adt/sdk/platform-tools I don't want to install android-tools-adb/fastboot because they're outdate when compared to SDK Manager ones. What do I need to do in order for it to work from anywhere when called from terminal?

    Read the article

  • Kingston SD reader not working for USB3

    - by user1146334
    I have a Kingston 4-in-1 Multimedia reader. When my PC was formatted with Win7 it worked fine. I decided to change to Ubuntu 14.04 and now it doesn't work. If I plug it into one of the USB2 ports it works fine, but whenever I plug it into one of the USB3 ports, it thinks about it for a minute and then dies. Here's the output of dmesg when it dies [110262.148656] usb 4-1: new SuperSpeed USB device number 3 using xhci_hcd [110262.170330] usb 4-1: Parent hub missing LPM exit latency info. Power management will be impacted. [110262.266379] usb 4-1: New USB device found, idVendor=11b0, idProduct=6348 [110262.266386] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [110262.266390] usb 4-1: Product: USB3.0 Media Reader [110262.266394] usb 4-1: Manufacturer: Kingston [110262.266398] usb 4-1: SerialNumber: 08735314400198 [110262.272929] usb-storage 4-1:1.0: USB Mass Storage device detected [110262.273239] scsi15 : usb-storage 4-1:1.0 [110263.290056] scsi 15:0:0:0: Direct-Access FCR-HS3 -0 1.00 PQ: 0 ANSI: 4 [110263.306622] scsi 15:0:0:1: Direct-Access FCR-HS3 -1 1.00 PQ: 0 ANSI: 4 [110263.323292] scsi 15:0:0:2: Direct-Access FCR-HS3 -2 1.00 PQ: 0 ANSI: 4 [110263.339858] scsi 15:0:0:3: Direct-Access FCR-HS3 -3 1.00 PQ: 0 ANSI: 4 [110263.340332] sd 15:0:0:0: Attached scsi generic sg3 type 0 [110263.340706] sd 15:0:0:1: Attached scsi generic sg4 type 0 [110263.340850] sd 15:0:0:2: Attached scsi generic sg5 type 0 [110263.340975] sd 15:0:0:3: Attached scsi generic sg6 type 0 [110264.651847] sd 15:0:0:1: [sde] 31116288 512-byte logical blocks: (15.9 GB/14.8 GiB) [110264.667049] sd 15:0:0:1: [sde] Write Protect is off [110264.667055] sd 15:0:0:1: [sde] Mode Sense: 2f 00 00 00 [110264.682767] sd 15:0:0:1: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [110264.694975] sd 15:0:0:2: [sdf] Attached SCSI removable disk [110264.697933] sd 15:0:0:3: [sdg] Attached SCSI removable disk [110264.729918] sd 15:0:0:0: [sdd] Attached SCSI removable disk [110264.754189] sde: sde1 [110264.760114] sd 15:0:0:1: [sde] Attached SCSI removable disk [110275.377368] usb 4-1: reset SuperSpeed USB device number 3 using xhci_hcd [110275.398453] usb 4-1: Parent hub missing LPM exit latency info. Power management will be impacted. [110275.436592] xhci_hcd 0000:05:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff8802e4fb9980 [110275.436600] xhci_hcd 0000:05:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff8802e4fb99c0 [110277.263444] usb 4-1: USB disconnect, device number 3

    Read the article

  • Terminal exits program before able to accept Hashcat EULA

    - by Fluffaduff
    I'm trying to play around with hashcat,just using the examples included with the program, but before the command can run it requires me to accept the EULA. Instead of me being able to enter 'YES', the terminal appears to end the process immediately. Whenever I try to accept the EULA I get the expected 'YES: Command not found.' I don't think I'm using the command wrong, but I also don't know whats happening. http://i.imgur.com/ClloeK6.png

    Read the article

  • Virtual host is not working in Ubuntu 14 VPS using XAMPP 1.8.3

    - by viral4ever
    I am using XAMPP as server in ubuntu 14.04 VPS of digitalocean. I tried to setup virtual hosts. But it is not working and I am getting 403 error of access denied. I changed files too. My files with changes are /opt/lampp/etc/httpd.conf # # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See <URL:http://httpd.apache.org/docs/trunk/> for detailed information. # In particular, see # <URL:http://httpd.apache.org/docs/trunk/mod/directives.html> # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so 'log/access_log' # with ServerRoot set to '/www' will be interpreted by the # server as '/www/log/access_log', where as '/log/access_log' will be # interpreted as '/log/access_log'. # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point # ServerRoot at a non-local disk, be sure to specify a local disk on the # Mutex directive, if file-based mutexes are used. If you wish to share the # same ServerRoot for multiple httpd daemons, you will need to change at # least PidFile. # ServerRoot "/opt/lampp" # # Mutex: Allows you to set the mutex mechanism and mutex file directory # for individual mutexes, or change the global defaults # # Uncomment and change the directory if mutexes are file-based and the default # mutex file directory is not on a local disk or is not appropriate for some # other reason. # # Mutex default:logs # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 80 # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # LoadModule authn_file_module modules/mod_authn_file.so LoadModule authn_dbm_module modules/mod_authn_dbm.so LoadModule authn_anon_module modules/mod_authn_anon.so LoadModule authn_dbd_module modules/mod_authn_dbd.so LoadModule authn_socache_module modules/mod_authn_socache.so LoadModule authn_core_module modules/mod_authn_core.so LoadModule authz_host_module modules/mod_authz_host.so LoadModule authz_groupfile_module modules/mod_authz_groupfile.so LoadModule authz_user_module modules/mod_authz_user.so LoadModule authz_dbm_module modules/mod_authz_dbm.so LoadModule authz_owner_module modules/mod_authz_owner.so LoadModule authz_dbd_module modules/mod_authz_dbd.so LoadModule authz_core_module modules/mod_authz_core.so LoadModule authnz_ldap_module modules/mod_authnz_ldap.so LoadModule access_compat_module modules/mod_access_compat.so LoadModule auth_basic_module modules/mod_auth_basic.so LoadModule auth_form_module modules/mod_auth_form.so LoadModule auth_digest_module modules/mod_auth_digest.so LoadModule allowmethods_module modules/mod_allowmethods.so LoadModule file_cache_module modules/mod_file_cache.so LoadModule cache_module modules/mod_cache.so LoadModule cache_disk_module modules/mod_cache_disk.so LoadModule socache_shmcb_module modules/mod_socache_shmcb.so LoadModule socache_dbm_module modules/mod_socache_dbm.so LoadModule socache_memcache_module modules/mod_socache_memcache.so LoadModule dbd_module modules/mod_dbd.so LoadModule bucketeer_module modules/mod_bucketeer.so LoadModule dumpio_module modules/mod_dumpio.so LoadModule echo_module modules/mod_echo.so LoadModule case_filter_module modules/mod_case_filter.so LoadModule case_filter_in_module modules/mod_case_filter_in.so LoadModule buffer_module modules/mod_buffer.so LoadModule ratelimit_module modules/mod_ratelimit.so LoadModule reqtimeout_module modules/mod_reqtimeout.so LoadModule ext_filter_module modules/mod_ext_filter.so LoadModule request_module modules/mod_request.so LoadModule include_module modules/mod_include.so LoadModule filter_module modules/mod_filter.so LoadModule substitute_module modules/mod_substitute.so LoadModule sed_module modules/mod_sed.so LoadModule charset_lite_module modules/mod_charset_lite.so LoadModule deflate_module modules/mod_deflate.so LoadModule mime_module modules/mod_mime.so LoadModule ldap_module modules/mod_ldap.so LoadModule log_config_module modules/mod_log_config.so LoadModule log_debug_module modules/mod_log_debug.so LoadModule logio_module modules/mod_logio.so LoadModule env_module modules/mod_env.so LoadModule mime_magic_module modules/mod_mime_magic.so LoadModule cern_meta_module modules/mod_cern_meta.so LoadModule expires_module modules/mod_expires.so LoadModule headers_module modules/mod_headers.so LoadModule usertrack_module modules/mod_usertrack.so LoadModule unique_id_module modules/mod_unique_id.so LoadModule setenvif_module modules/mod_setenvif.so LoadModule version_module modules/mod_version.so LoadModule remoteip_module modules/mod_remoteip.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule proxy_ftp_module modules/mod_proxy_ftp.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so LoadModule proxy_scgi_module modules/mod_proxy_scgi.so LoadModule proxy_ajp_module modules/mod_proxy_ajp.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so LoadModule proxy_express_module modules/mod_proxy_express.so LoadModule session_module modules/mod_session.so LoadModule session_cookie_module modules/mod_session_cookie.so LoadModule session_dbd_module modules/mod_session_dbd.so LoadModule slotmem_shm_module modules/mod_slotmem_shm.so LoadModule ssl_module modules/mod_ssl.so LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so LoadModule unixd_module modules/mod_unixd.so LoadModule dav_module modules/mod_dav.so LoadModule status_module modules/mod_status.so LoadModule autoindex_module modules/mod_autoindex.so LoadModule info_module modules/mod_info.so LoadModule suexec_module modules/mod_suexec.so LoadModule cgi_module modules/mod_cgi.so LoadModule cgid_module modules/mod_cgid.so LoadModule dav_fs_module modules/mod_dav_fs.so LoadModule vhost_alias_module modules/mod_vhost_alias.so LoadModule negotiation_module modules/mod_negotiation.so LoadModule dir_module modules/mod_dir.so LoadModule actions_module modules/mod_actions.so LoadModule speling_module modules/mod_speling.so LoadModule userdir_module modules/mod_userdir.so LoadModule alias_module modules/mod_alias.so LoadModule rewrite_module modules/mod_rewrite.so <IfDefine JUSTTOMAKEAPXSHAPPY> LoadModule php4_module modules/libphp4.so LoadModule php5_module modules/libphp5.so </IfDefine> <IfModule unixd_module> # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # User root Group www </IfModule> # 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # <VirtualHost> definition. These values also provide defaults for # any <VirtualHost> containers you may define later in the file. # # All of these directives may appear inside <VirtualHost> containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. [email protected] # ServerAdmin [email protected] # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn't have a registered DNS name, enter its IP address here. # #ServerName www.example.com:@@Port@@ # XAMPP ServerName localhost # # Deny access to the entirety of your server's filesystem. You must # explicitly permit access to web content directories in other # <Directory> blocks below. # <Directory /> AllowOverride none Require all denied </Directory> # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/opt/lampp/htdocs" <Directory "/opt/lampp/htdocs"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/trunk/mod/core.html#options # for more information. # #Options Indexes FollowSymLinks # XAMPP Options Indexes FollowSymLinks ExecCGI Includes # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # #AllowOverride None # since XAMPP 1.4: AllowOverride All # # Controls who can get stuff from this server. # Require all granted </Directory> # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # <IfModule dir_module> #DirectoryIndex index.html # XAMPP DirectoryIndex index.html index.html.var index.php index.php3 index.php4 </IfModule> # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # <Files ".ht*"> Require all denied </Files> # # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a <VirtualHost> # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a <VirtualHost> # container, that host's errors will be logged there and not here. # ErrorLog "logs/error_log" # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn <IfModule log_config_module> # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common <IfModule logio_module> # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule> # # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a <VirtualHost> # container, they will be logged here. Contrariwise, if you *do* # define per-<VirtualHost> access logfiles, transactions will be # logged therein and *not* in this file. # CustomLog "logs/access_log" common # # If you prefer a logfile with access, agent, and referer information # (Combined Logfile Format) you can use the following directive. # #CustomLog "logs/access_log" combined </IfModule> <IfModule alias_module> # # Redirect: Allows you to tell clients about documents that used to # exist in your server's namespace, but do not anymore. The client # will make a new request for the document at its new location. # Example: # Redirect permanent /foo http://www.example.com/bar # # Alias: Maps web paths into filesystem paths and is used to # access content that does not live under the DocumentRoot. # Example: # Alias /webpath /full/filesystem/path # # If you include a trailing / on /webpath then the server will # require it to be present in the URL. You will also likely # need to provide a <Directory> section to allow access to # the filesystem path. # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # ScriptAlias /cgi-bin/ "/opt/lampp/cgi-bin/" </IfModule> <IfModule cgid_module> # # ScriptSock: On threaded servers, designate the path to the UNIX # socket used to communicate with the CGI daemon of mod_cgid. # #Scriptsock logs/cgisock </IfModule> # # "/opt/lampp/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # <Directory "/opt/lampp/cgi-bin"> AllowOverride None Options None Require all granted </Directory> <IfModule mime_module> # # TypesConfig points to the file containing the list of mappings from # filename extension to MIME-type. # TypesConfig etc/mime.types # # AddType allows you to add to or override the MIME configuration # file specified in TypesConfig for specific file types. # #AddType application/x-gzip .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi # XAMPP, since LAMPP 0.9.8: AddHandler cgi-script .cgi .pl # For type maps (negotiated resources): #AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # # XAMPP AddType text/html .shtml AddOutputFilter INCLUDES .shtml </IfModule> # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # #MIMEMagicFile etc/magic # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # # # MaxRanges: Maximum number of Ranges in a request before # returning the entire resource, or one of the special # values 'default', 'none' or 'unlimited'. # Default setting is to accept 200 Ranges. #MaxRanges unlimited # # EnableMMAP and EnableSendfile: On systems that support it, # memory-mapping or the sendfile syscall may be used to deliver # files. This usually improves server performance, but must # be turned off when serving from networked-mounted # filesystems or if support for these functions is otherwise # broken on your system. # Defaults: EnableMMAP On, EnableSendfile Off # EnableMMAP off EnableSendfile off # Supplemental configuration # # The configuration files in the etc/extra/ directory can be # included to add extra features or to modify the default configuration of # the server, or you may simply copy their contents here and change as # necessary. # Server-pool management (MPM specific) #Include etc/extra/httpd-mpm.conf # Multi-language error messages Include etc/extra/httpd-multilang-errordoc.conf # Fancy directory listings Include etc/extra/httpd-autoindex.conf # Language settings #Include etc/extra/httpd-languages.conf # User home directories #Include etc/extra/httpd-userdir.conf # Real-time info on requests and configuration #Include etc/extra/httpd-info.conf # Virtual hosts Include etc/extra/httpd-vhosts.conf # Local access to the Apache HTTP Server Manual #Include etc/extra/httpd-manual.conf # Distributed authoring and versioning (WebDAV) #Include etc/extra/httpd-dav.conf # Various default settings Include etc/extra/httpd-default.conf # Configure mod_proxy_html to understand HTML4/XHTML1 <IfModule proxy_html_module> Include etc/extra/proxy-html.conf </IfModule> # Secure (SSL/TLS) connections <IfModule ssl_module> # XAMPP <IfDefine SSL> Include etc/extra/httpd-ssl.conf </IfDefine> </IfModule> # # Note: The following must must be present to support # starting without SSL on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> # XAMPP Include etc/extra/httpd-xampp.conf Include "/opt/lampp/apache2/conf/httpd.conf" I used command shown in this example. I used below lines to change and add group Add group "groupadd www" Add user to group "usermod -aG www root" Change htdocs group "chgrp -R www /opt/lampp/htdocs" Change sitedir group "chgrp -R www /opt/lampp/htdocs/mysite" Change htdocs chmod "chmod 2775 /opt/lampp/htdocs" Change sitedir chmod "chmod 2775 /opt/lampp/htdocs/mysite" And then I changed my vhosts.conf file # Virtual Hosts # # Required modules: mod_log_config # If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # <URL:http://httpd.apache.org/docs/2.4/vhosts/> # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any <VirtualHost> block. # <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/opt/lampp/docs/dummy-host.example.com" ServerName dummy-host.example.com ServerAlias www.dummy-host.example.com ErrorLog "logs/dummy-host.example.com-error_log" CustomLog "logs/dummy-host.example.com-access_log" common </VirtualHost> <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/opt/lampp/docs/dummy-host2.example.com" ServerName dummy-host2.example.com ErrorLog "logs/dummy-host2.example.com-error_log" CustomLog "logs/dummy-host2.example.com-access_log" common </VirtualHost> NameVirtualHost * <VirtualHost *> ServerAdmin [email protected] DocumentRoot "/opt/lampp/htdocs/mysite" ServerName mysite.com ServerAlias mysite.com ErrorLog "/opt/lampp/htdocs/mysite/errorlogs" CustomLog "/opt/lampp/htdocs/mysite/customlog" common <Directory "/opt/lampp/htdocs/mysite"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order Allow,Deny Allow from all Require all granted </Directory> </VirtualHost> but still its not working and I am getting 403 error on my ip and domain however I can access phpmyadmin. If anyone can help me, please help me.

    Read the article

  • Admin user runs slower than the guest account

    - by Mykid
    My user is the Admin, it runs fine, not bugs or anything, I used Ubuntu Tweak for a few things like logging options and the sidebar and Unity Tweak for hotcornes and minimize window and that's about it. My second user (for my mother) is faster. I don't know how or why. Let me know what I need to enter on the terminal to give you more info, if you think it's normal also let me know. I have a Compaq Presario CQ56, Ubuntu 14.04 64bit dual boot with Windows 7 Premium, 3GB of ram DDR3, Celeron(R) Dual-Core CPU T3500 @ 2.10GHz × 2.

    Read the article

  • Folder Permissions for new partition - can't move files

    - by user292743
    I'm using Ubuntu 14.04. I used the install CD to repartition my HD by resizing /dev/sda1 and creating /dev/sda3 as a Primary Partition. I named it "Media". When I reboot from HD, when I try to move files from the home directory to the new partition, I get an error message "Error while copying. The folder “TV” cannot be copied because you do not have permissions to create it in the destination." The new partition shows up in Gparted as locked, with mount point /media/ian/Media and Label Media. I want to move my media files from the boot partition to a separate partition. Any advice?

    Read the article

  • Where can I get fresh new Wine DLLs?

    - by SuperScript
    I was acting careless today and I accidentally deleted one of the .dlls in my Ubuntu Wine installation, ~/.wine/drive_c/windows/system32/ole32.dll to be exact, and need a new fresh copy of only this one .dll. I know that reinstalling will fix it, but I have installed quite a few programs and do not want to have to do such a drastic thing just to fix this one problem. So, I'm wondering if there is somewhere that I can download this original .dll as it came with my original Wine installation. I have found the SourceForge repository, but it only has .h and .c files and I do not know how to build them into a .dll. Can anyone give me a link to download, or instructions to build my missing .dlls?

    Read the article

  • Why doesn't `cd` work in a shell script?

    - by alex
    what is wrong with this easy script? I just want to write an script which change my directory: A. I put below commands on the file witch its name is pathABC on the /home/alex directory, #!/bin/sh cd /home/alex/Documents/A/B/C echo HelloWorld B. also I did chmod +x pathABC , On the terminal when I am on the /home/alex directory, I run ./pathABC . But the output is just HelloWorld and the current directory remains with no change. I mean my directory remains as /home/alex and not go to the /home/alex/Documents/A/B/C. So where is wrong?

    Read the article

  • New laptop, Windows 8.1, attempting dual install. Ubuntu installer doesn't 'see' existing OS

    - by Flaminica
    Though I've used Ubuntu for a few years, I'm new to installation. Previously I had help and now I'm doing it alone (moved across the world). Windows 8.1 came preinstalled on my new laptop (Toshiba Satellite C70-A-17C - Core i5, 8 GB RAM, 750 GB HDD). I have already followed a few steps I found online to prepare for a dual install (with Ubuntu 14.04). I backed up Windows, created a bootable Ubuntu USB and DVD (just in case one didn't work), turned off fast boot and secure boot, and shrunk C:/. The new unallocated drive portion is 292.97 GB. After shrinking C:/, I restarted Windows a couple of times to make sure everything was working fine (it is). I then attempted to install with the Ubuntu live USB. However, the Ubuntu installer doesn't see that Windows 8.1 is already installed. I don't understand, and don't want to mess with Ubuntu partitioning when I don't know where the partitions will be created. My concern is that, if I go further with the installation process, Windows might be overwritten or compromised in some way. I then tried to reboot using the Ubuntu live DVD, thinking I might get a different result. However, I can't figure out how to make the laptop boot from the CD drive. I went into the BIOS and found no option there, either. Any help is very appreciated! EDIT: Looks like I can't link directly to each photo. Here is my album of screenshots: http://imgur.com/a/zChCo Here you can see that there's no option to boot from CD drive, only USB. Everything looks okay so far. I don't understand this. Ubuntu has not yet been installed. Unmounting partitions? (I chose 'no'.) Even though the laptop came pre-installed with Windows 8.1, the Ubuntu USB installer can't see it. I chose 'something else'. I need to pick and format partitions. I scrolled down and took a second shot to include all information. Completely lost and cancelled installation.

    Read the article

  • kubuntu - what's the best smplayer configuration for best quality in hd movies (mkv)

    - by Frank
    I have ubuntu x64 13.04 with kde 4.11 and smplayer v0.8.6 and the last mplayer version from ppa. I have ATI video card HD6870 MSI with fglrx driver v13.4. My kde settings are: Composition mode: Opengl 3.1 graphic system qt: Raster scaling mode: precise Vsync: auto So what's the best configuration for quality over performace in smplayer according to my system specs? For example what do I have to set for the following options? enable postprocessing by default and postprocessing quality output driver Deinterlacing method software equalizer direct rendering double buffering draw video using slices threads for decoding (MPEG-1/2 and H.264 only loop filter use CoreAVC Thanks

    Read the article

  • Does Fetch as Googlebot still support their ajax-crawling proposal?

    - by Gunchars
    I spent half a day implementing the server side html generation for modal pages based on their proposal (link), but it seems like the Fetch as Googlebot functionality in Webmaster tools completely ignores the URL fragment. I've verified that the _escaped_fragment_ functionality is working on my server (example), but when I submit a URL like /#!/recipes, the Googlebot just fetches /. There aren't any recent confirmations that it's working and, honestly, it wouldn't surprise me if they just silently dropped the functionality without even editing the docs.

    Read the article

  • Which is better for search engines, repeated phrases or different phrases with the same meaning?

    - by George Botros
    When I'm designing an ads website I have two options: Let the advertiser to choose from some predefined lists to create the new ad. For Example: product list ( T-Shirt, Shorts, Suit, .....) Color list ( Black, Red, .....) Let the advertiser to write his own descriptive content for the product For Example "Amazing suit with a good price" I like the first Scenario but which is better for search engine optimization [SEO], repeated phrases or different phrases with the same meaning? Note : assuming each page will contain one or more ads

    Read the article

  • Best URL for cars related website? [duplicate]

    - by Claudio ??is Mulas
    This question already has an answer here: What is the best stucture of SEO friendly URL? 3 answers If this was your website, what will be the URLs for each car on sale? http://www.autoscout24.eu/Details.aspx?id=247572735&asrc=ha I'm working on a car dealership website. What should be the best URL? Consider also that the company can have more models of the same car. I'm not asking for a url scheme, there are a lot of similar questions. My question is: in a car dealership website what is the best url for a car? What are by you the best variables I've to put on the url. Brand, model, year, location, color, miles/km, etc. This website, that url, this particulary case: what will you choose for urls? (even not in the following list) audi_q5_2009.html audi_q5_2009_used.html audi_q5_2009_used.html audi_q5_2009_used_in_alcobendas.html audi_q5_2009_used/247572735.html

    Read the article

  • How does one redirect from one wordpress page to another via htaccess?

    - by jchwebdev
    I tried making the following change to my wordpress site to permanently redirect a common link to a new page. I could've -sworn- that this used to work. But it simply does not (at least in WP 3.9). I have had to resort to using a Redirect Plug-In. I'm wondering -why- it doesn't work and if there is a technique which -will- work. I'd prefer to continue to use .htaccess for simplicity. Below is the .htaccess file: # MY CHANGES Redirect 301 http://mysite.com/gigs http://mysite.com/booking/ # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> Again, it works by using a redirect plug-in inside WP, but there must be a way to force the 'redirection' to occur -before- the URL is passed to the WP engine, right? How is the done?

    Read the article

  • Redirect Google crawler to different robots.txt via .htaccess

    - by user3474818
    I have googled for the answer all day and still couldn't find an answer. I have a virtual subdomain www.static.example.com which is a mirror site of www.example.com. It means I have just one root folder for subdomain and domain aswell. I want to redirect crawlers to different robots.txt file - robots_static.txt when they see .static in url in which I will forbid indexing via /disallow command. I want to do this because I have duplicated content in Google search results. Subdomain is showing the exact same content as the main domain. Does anyone know how could I achieve that crawlers sees robots_static.txt instead of robots.txt? What I have managed to find so far is this: RewriteCond %{HTTP_HOST} ^www.static.*$ [NC] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*robots\.txt.*\ HTTP/ [NC] RewriteRule ^robots\.txt /robots_static.txt [NC,L] but when I check in webmaster tools, it still sees robots.txt as my robots file instead of robots_static.txt, so it crawls and index everything twice. What did I do wrong? Thanks EDIT: This is my .htaccess file ## # @package Joomla # @copyright Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved. # @license GNU General Public License version 2 or later; see LICENSE.txt ## ## # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE! # # The line just below this section: 'Options +FollowSymLinks' may cause problems # with some server configurations. It is required for use of mod_rewrite, but may already # be set by your server administrator in a way that dissallows changing it in # your .htaccess file. If using it causes your server to error out, comment it out (add # to # beginning of line), reload your site in your browser and test your sef url's. If they work, # it has been set by your server administrator and you do not need it set here. ## ## Can be commented out if causes errors, see notes above. Options +FollowSymLinks ## Mod_rewrite in use. RewriteEngine On RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^www.static.*$ [NC] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*robots\.txt.*\ HTTP/ [NC] RewriteRule ^robots\.txt /robots_static.txt [NC,L] ## Begin - Rewrite rules to block out some common exploits. # If you experience problems on your site block out the operations listed below # This attempts to block the most common type of exploit `attempts` to Joomla! # # Block out any script trying to base64_encode data within the URL. RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR] # Block out any script that includes a <script> tag in URL. RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR] # Block out any script trying to set a PHP GLOBALS variable via URL. RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] # Block out any script trying to modify a _REQUEST variable via URL. RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) # Return 403 Forbidden header and show the content of the root homepage RewriteRule .* index.php [F] # ## End - Rewrite rules to block out some common exploits. ## Begin - Custom redirects # # If you need to redirect some pages, or set a canonical non-www to # www redirect (or vice versa), place that code here. Ensure those # redirects use the correct RewriteRule syntax and the [R=301,L] flags. # ## End - Custom redirects ## # Uncomment following line if your webserver's URL # is not directly related to physical file paths. # Update Your Joomla! Directory (just / for root). ## # RewriteBase / RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] RewriteCond %{THE_REQUEST} !/system/.* RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,L] RewriteCond %{THE_REQUEST} ^GET ## Begin - Joomla! core SEF Section. # RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # # If the requested path and file is not /index.php and the request # has not already been internally rewritten to the index.php script RewriteCond %{REQUEST_URI} !^/index\.php # and the request is for something within the component folder, # or for the site root, or for an extensionless URL, or the # requested URL ends with one of the listed extensions RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC] # and the requested path and file doesn't directly match a physical file RewriteCond %{REQUEST_FILENAME} !-f # and the requested path and file doesn't directly match a physical folder RewriteCond %{REQUEST_FILENAME} !-d # internally rewrite the request to the index.php script RewriteRule .* index.php [L] # ## End - Joomla! core SEF Section. <FilesMatch "\.(ico|pdf|flv|jpg|ttf|jpg|jpeg|png|gif|js|css|swf)$"> Header set Expires "Wed, 15 Apr 2020 20:00:00 GMT" Header set Cache-Control "public" </FilesMatch> <ifModule mod_headers.c> Header set Connection keep-alive </ifModule> ########## Begin - Remove Etags # FileETag none # ########## End - Remove Etags

    Read the article

  • Make objects slide across the screen in random positions

    - by user3475907
    I want to make an object appear randomly at the right hand side of the screen and then slide across the screen and disapear at the left hand side. I am working with libgdx. I have this bit of code but it makes items fall from the top down. Please help. public EntityManager(int amount, OrthoCamera camera) { player = new Player(new Vector2(15, 230), new Vector2(0, 0), this, camera); for (int i = 0; i < amount; i++) { float x = MathUtils.random(0, MainGame.HEIGHT - TextureManager.ENEMY.getHeight()); float y = MathUtils.random(MainGame.WIDTH, MainGame.WIDTH * 10); float speed = MathUtils.random(2, 10); addEntity(new Enemy(new Vector2(x, y), new Vector2(-0, -speed))); }

    Read the article

  • Cycling through ItemStacks whlie supplying data... LOST [on hold]

    - by user3251606
    Ok so i am working on a plugin for my server that will open and inventory and when closed it will pass items to this class... object of this class is to cycle through the inventory and use a cfg file to define items and prices and then grab that info in a for loop and add it all up... heres what i have thus far... public void sell(Player p, Inventory inv) { ListIterator<ItemStack> it = inv.iterator(); double total = 0; for (ItemStack is : inv) { is = it.next(); if (is.getType() != null) { String type = is.getType().toString(); //short dur = is.getDurability(); String check = ChestSell.plugin.getConfig().getString(type); p.sendMessage("Item Type: " + type); if (check != null) { int amou = is.getAmount(); double value = ChestSell.plugin.getConfig().getDouble(type + ".price"); double tv = amou * value; p.sendMessage("Items in chest: Type " + type + " Ammount: " + amou + " Value: $" + tv); } //TODO Add return Items } } p.sendMessage("You got paid $" + total + " for your items!"); inv.clear(); }

    Read the article

  • Efficiency of iterators and alternatives? [migrated]

    - by user48037
    I have the following code for my game tiles: std::vector<GameObject_Tile*>::iterator it; for(int y = 0; y < GAME_TILES_Y; y++) { for(int x = 0; x < GAME_TILES_X; x++) { for (it = gameTiles[x][y].tiles.begin() ; it != gameTiles[x][y].tiles.end(); ++it) {}}} tiles is: struct Game_Tile { // More specific object types will be added here eventually vector<GameObject_Tile*> tiles; }; My problem is that if I change the vector to just be a single GameObject_Tile* instead and remove the iterator line in the loop I go from about 200fps to 450fps. Some context: The vector/pointer only contains one object in both scenarios. I will eventually need to store multiple, but for testing I just set it to a single pointer. The loop goes through 2,300 objects each frame and draws them. I would like to point out that if I remove the Draw (not seen int he example) method, I gain about 30 frames in both scenarios, the issue is the iteration. So I am wondering why having this as a vector being looped through by an iterator (to get at a single object) is costing me over 200 frames when compared to it being a single pointer? The 200+ frames faster code is: std::vector<GameObject_Tile*>::iterator it; for(int y = 0; y < GAME_TILES_Y; y++) { for(int x = 0; x < GAME_TILES_X; x++) { //gameTiles[x][y].tiles is used as a pointer here instead of using *it }} tiles is: struct Game_Tile { // More specific object types will be added here eventually GameObject_Tile* tiles; };

    Read the article

  • I am thinking about developing a game, but i am single developer? [on hold]

    - by Jake Doe
    Since very little i wanted to create a game, my place where my rules apply, where i am not limited. Now that i am capable of doing. I am asking myself should i start ? I have already the idea i have choosen the engine, only coding and artwork is required. The engine i have choose cost is quite high(50k), i can try throught a kickstarter campaign or indiegogo. But shouid I ? Please give me your opinion. Thank you :)

    Read the article

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