Search Results

Search found 2310 results on 93 pages for 'solaris containers'.

Page 71/93 | < Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >

  • Reflection in unit tests for checking code coverage

    - by Gary
    Here's the scenario. I have VO (Value Objects) or DTO objects that are just containers for data. When I take those and split them apart for saving into a DB that (for lots of reasons) doesn't map to the VO's elegantly, I want to test to see if each field is successfully being created in the database and successfully read back in to rebuild the VO. Is there a way I can test that my tests cover every field in the VO? I had an idea about using reflection to iterate through the fields of the VO's as part of the solution, but maybe you guys have solved the problem before? I want this test to fail when I add fields in the VO, and don't remember to add checks for it in my tests.

    Read the article

  • Banshee gapless playback does not work when playing mp3s

    - by ComputerGuy505
    Even though I have gapless playback enabled in Banshee's settings menu, there is a very short pause between songs. This might be due to the fact that my hard drive's partitions seem wierd. fdisk -l produces this output: Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x4a73c3cb Device Boot Start End Blocks Id System /dev/sda1 * 2048 409599 203776 7 HPFS/NTFS/exFAT /dev/sda2 409600 724153740 361872070+ 7 HPFS/NTFS/exFAT /dev/sda3 1456826368 1465145343 4159488 c W95 FAT32 (LBA) /dev/sda4 724154366 1456826367 366336001 5 Extended Partition 4 does not start on physical sector boundary. /dev/sda5 1440159744 1456826367 8333312 82 Linux swap / Solaris /dev/sda6 724154368 1440159743 358002688 83 Linux Partition table entries are not in disk order Playing mp3's from /dev/sda2 or /dev/sda6 produces this problem. I don't seem to have gapless playback on Rhythmbox or Clementine either, if those media players are supposed to have it. I'm not sure what other info to provide. This is just annoying to me. Thanks for any help.

    Read the article

  • Unsure about TRIM enabled on my SSD

    - by user84750
    I have a SSD OCZ Vertex4 installed on my laptop. I'm running Ubuntu 12.04 LTS. I have enable TRIM by adding "discard" to my fstab file. (also added option noatime). I rebooted my Ubuntu and followed These instructions here to test TRIM. The end results of my tempfile was all ffff's, when it should have read all zero's, which is telling me TRIM is not really working or enabled correctly. Did I miss something? Also, will it be a problem if only my /home directory is encrypted. AND if you ask why I have swap on my SSD, it's because I let Ubuntu set up my partition. When I have my SSD, I just wanted to install Ubuntu as fast as possible. =) I've done testing to see at which point it will start to use swap and it took a lot of applications open to finally use swap. I currently have 4 GB of memory. I might shrink this to like 512 MB or 1 GB the most. Here's some info about my file system setup. sudo hdparm -I /dev/sda1 | grep "TRIM supported" Data Set Management TRIM supported (limit 16 blocks) sudo fdisk -l /dev/sda Device Boot Start End Blocks Id System /dev/sda1 * 2048 242016255 121007104 83 Linux /dev/sda2 242018302 250068991 4025345 5 Extended /dev/sda5 242018304 250068991 4025344 82 Linux swap / Solaris ls /dev/mapper control cryptswap1

    Read the article

  • Choosing a design pattern for a class that might change it's internal attributes

    - by the_drow
    I have a class that holds arbitrary state and it's defined like this: class AbstractFoo { }; template <class StatePolicy> class Foo : public StatePolicy, public AbstractFoo { }; The state policy contains only protected attributes that represent the state. The state might be the same for multiple behaviors and they can be replaced at runtime. All Foo objects have the same interface to abstract the state itself and to enable storing Foo objects in containers. I would like to find the least verbose and the most maintainable way to express this.

    Read the article

  • [C++] Is it possible to use threads to speed up file reading ?

    - by Mister Mystère
    Hi there, I want to read a file as fast as possible (40k lines) [Edit : the rest is obsolete]. Edit: Andres Jaan Tack suggested a solution based on one thread per file, and I want to be sure I got this (thus this is the fastest way) : One thread per entry file reads it whole and stocks its content in a container associated (- as many containers as there are entry files) One thread calculates the linear combination of every cell read by the input threads, and stocks the results in the exit container (associated to the output file). One thread writes by block (every 4kB of data, so about 10 lines) the content of the output container. Should I deduce that I must not use m-mapped files (because the program's on standby waiting for the data) ? Thanks aforehand. Sincerely, Mister mystère.

    Read the article

  • Migrating a Core Data Store from iCloud to local

    - by schmok
    I'm currently struggling with Core Data iCloud migration. I want to move a store from an iCloud ubiquity container (.nosync) to a local URL. Problem is whenever I call something like this: NSPersistentStore *newStore = [self.persistentStoreCoordinator migratePersistentStore: currentiCloudStore toURL: localURL options: nil withType: NSSQLiteStoreType error: &error]; I get this error: -[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:](1055): CoreData: Ubiquity: Error: A persistent store which has been previously added to a coordinator using the iCloud integration options must always be added to the coordinator with the options present in the options dictionary. If you wish to use the store without iCloud, migrate the data from the iCloud store file to a new store file in local storage. file://localhost/Users/sch/Library/Containers/bla/Data/Documents/tmp.sqlite. This will be a fatal error in a future release Anyone ever seen this error? Maybe I'm just missing the right migration options?

    Read the article

  • You've been working on a platform for as long as you remember. Not anymore. How does it feel?

    - by Shinnok
    How does it feel to work on a platform for as long as you remember, you've been encouraged to innovate, to improve and give all in day and night for that platform, be it either an operating system, a hardware architecture or a software framework/library and then be forced to switch bases because that platform has been abandoned over the night? It has happened before, many times, for eg. to SGI/IRIX and more recently to SUN/Open Solaris and now Nokia/Symbian. Have you been part of such a shift? If so then please share the story and describe your feelings at that time and if it is the case, how did you manage the situation? Reorientation? Giving up on the field and turned to other things you've been constantly putting aside like family? Many did so(for eg. people at Netscape). You may not think of it being such a big deal, but it is, after you've been working 10 to 20+ years on a platform/technology and then be faced to switch your expertise and mindset, the feeling tends to become really strong and some people really give up this crazy field and start enojoying a normal life. Would love to hear your stories.

    Read the article

  • Partition does not start on physical sector boundary?

    - by jasmines
    I've one HD on my laptop, with two partitions (one ext3 with Ubuntu 12.04 installed and one swap). fdisk is giving me a Partition 1 does not start on physical sector boundary warning. What is the cause and do I need to fix it? If so, how? This is sudo fdisk -l: Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 testine, 63 settori/tracce, 91201 cilindri, totale 1465149168 settori Unità = settori di 1 * 512 = 512 byte Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Identificativo disco: 0x5a25087f Dispositivo Boot Start End Blocks Id System /dev/sda1 * 63 1448577023 724288480+ 83 Linux Partition 1 does not start on physical sector boundary. /dev/sda2 1448577024 1465147391 8285184 82 Linux swap / Solaris This is sudo lshw related result: *-disk description: ATA Disk product: WDC WD7500BPKT-0 vendor: Western Digital physical id: 0 bus info: scsi@0:0.0.0 logical name: /dev/sda version: 01.0 serial: WD-WX21CC1T0847 size: 698GiB (750GB) capabilities: partitioned partitioned:dos configuration: ansiversion=5 signature=5a25087f *-volume:0 description: EXT3 volume vendor: Linux physical id: 1 bus info: scsi@0:0.0.0,1 logical name: /dev/sda1 logical name: / version: 1.0 serial: cc5c562a-bc59-4a37-b589-805b27b2cbd7 size: 690GiB capacity: 690GiB capabilities: primary bootable journaled extended_attributes large_files recover ext3 ext2 initialized configuration: created=2010-02-27 09:18:28 filesystem=ext3 modified=2012-06-23 18:33:59 mount.fstype=ext3 mount.options=rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered mounted=2012-06-28 00:20:47 state=mounted *-volume:1 description: Linux swap volume physical id: 2 bus info: scsi@0:0.0.0,2 logical name: /dev/sda2 version: 1 serial: 16a7fee0-be9e-4e34-9dc3-28f4eeb61bf6 size: 8091MiB capacity: 8091MiB capabilities: primary nofs swap initialized configuration: filesystem=swap pagesize=4096 These are related /etc/fstab lines: UUID=cc5c562a-bc59-4a37-b589-805b27b2cbd7 / ext3 errors=remount-ro,user_xattr 0 1 UUID=16a7fee0-be9e-4e34-9dc3-28f4eeb61bf6 none swap sw 0 0

    Read the article

  • SQL Azure server as unit of billing

    - by vtortola
    Hi, One of the azure training kit presentation says: Each account has zero or more logical servers Provisioned via a common portal Establishes a billing instrument Each logical server has one or more databases Contains metadata about database & usage Unit of authentication, geo-location, billing, reporting Generated DNS-based name Each database has standard SQL objects Users, Tables, Views, Indices, etc Unit of consistency So now I'm lost :D. Were not the databases themselves the units of billing? I mean, I thought that servers were just like logical containers and you were charged per number and size of databases. How servers are billed? Thanks.

    Read the article

  • jQuery Dialog open hides background content in IE7

    - by JoshReedSchramm
    Hey all, I'm working on an application where the page layout is essentially a bunch of absolutely positioned containers. There is a header, sidebar and content area. The content area has its own header and footer which are fixed on the screen. The main part of the content area scrolls but nothing else does. So, we are using jQuery dialog for popup boxes and in IE7 with this new layout when i open a dialog the rest of my content in the background vanishes. I'm left with the page header and the footer of the content area and that's it. In Firefox and believe it or not IE6 it works fine. We are using ie7.js in ie6 though to make things not suck. Anyone have any clue why opening a dialog in jquery would screw up absolute positioning and make stuff vanish?

    Read the article

  • Can a user be a member of multiple Organization Units (OU) in Active Directory ?

    - by Stormshadow
    Can a user be a member of multiple Organization Units (OU) in Active Directory ? Also, is there a standard format mentioned by Microsoft on how an OU should be created and what its attributes are ? I found this in Wikipedia "However, Organizational Units are just an abstraction for the administrator, and do not function as true containers; the underlying domain operates as if objects were all created in a simple flat-file structure, without any OUs. It is not possible for example to create two user accounts with an identical username in two separate OUs, such as "fred.staff-ou.domain" and "fred.student-ou.domain"."

    Read the article

  • How To Figure Out Your PC’s Host Name From the Command Prompt

    - by The Geek
    If you’re doing any work with networking, you probably need to know the name of your computer. Rather than diving into Control Panel, there’s a really simple way to do this from the command prompt. Note: If you haven’t already, be sure to read our complete guide to networking Windows 7 with XP and Vista. To see the hostname… all you have to do is type hostname at the command prompt. Go figure, eh? The same thing works in Linux or OS X, though you can see that most of the time the hostname is part of the prompt anyway. Note: you can also change the hostname by simply typing “hostname <newhostname>”. Of course, the easiest way to see your computer name in Windows is to just hit the Win+Break key combination, which will pop up the System pane from Control Panel.   If you want to change it instead, you can always change your computer name easily through Control Panel. Similar Articles Productive Geek Tips MySql: Give Root User Logon Permission From Any HostUse "Command Prompt Here" in Windows VistaKeyboard Ninja: Scrolling the Windows Command Prompt With Only the KeyboardVerify the Integrity of Windows Vista System FilesFind Path of Application Running on Solaris, Ubuntu, Suse or Redhat Linux TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Home Networks – How do they look like & the problems they cause Check Your IMAP Mail Offline In Thunderbird Follow Finder Finds You Twitter Users To Follow Combine MP3 Files Easily QuicklyCode Provides Cheatsheets & Other Programming Stuff Download Free MP3s from Amazon

    Read the article

  • Win7 no longer available after installing 12.04

    - by Michael
    I have installed Ubuntu 12.04 but my Windows 7 partition seems to have been lost. It is in sda2. Can anyone help me how to get this Windows 7 partition back without having to reinstall Windows 7? Disk /dev/sda: 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: 0xd45cd45c Device Boot Start End Blocks Id System /dev/sda1 2048 61433855 30715904 83 Linux /dev/sda2 * 61433856 122873855 30720000 7 HPFS/NTFS/exFAT /dev/sda3 122873856 976769023 426947584 7 HPFS/NTFS/exFAT Disk /dev/sdb: 203.9 GB, 203928109056 bytes 255 heads, 63 sectors/track, 24792 cylinders, total 398297088 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: 0x03ee03ee Device Boot Start End Blocks Id System /dev/sdb1 * 63 20482874 10241406 c W95 FAT32 (LBA) /dev/sdb2 20482875 40965749 10241437+ 1c Hidden W95 FAT32 (LBA) /dev/sdb3 40965750 398283479 178658865 f W95 Ext'd (LBA) /dev/sdb5 40965813 76694309 17864248+ 7 HPFS/NTFS/exFAT /dev/sdb6 76694373 108856439 16081033+ 7 HPFS/NTFS/exFAT /dev/sdb7 108856503 398283479 144713488+ 7 HPFS/NTFS/exFAT Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes 240 heads, 63 sectors/track, 129201 cylinders, total 1953525168 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: 0x00000001 Device Boot Start End Blocks Id System /dev/sdc1 * 63 20480543 10240240+ 82 Linux swap / Solaris /dev/sdc2 20480605 1953519119 966519257+ f W95 Ext'd (LBA) /dev/sdc5 20480607 1953519119 966519256+ 7 HPFS/NTFS/exFAT

    Read the article

  • asp:Validator in invisible elements + invisible targets

    - by Richard Neil Ilagan
    Somewhat straightforward: will asp:Validators still perform validation when they're in invisible containers? How about if their ControlToValidate target is invisible? For example: <asp:Panel id="myPanel" runat="server" visible="false"> <asp:Textbox id="myTextbox" runat="server" /> <asp:RequiredFieldValidator id="myRfv" runat="server" controltovalidate="myTextbox" /> </asp:Panel> Above is a Validator in an invisible Panel. Would myRfv still perform validation? How about if myTextbox is invisible instead? I'm asking this because I have very specialized Validators in my ASPX, wherein I also have Panels which are hidden/shown dynamically. While I'm all for disabling the validators themselves, I'm just curious whether they'll automatically disable anyway. Thanks guys! :D

    Read the article

  • SD Card only mounted after a reboot

    - by evothur
    Hi everyone. I have a Kingston 2GB MicroSD and I plug it in via an inconix MicroSD Adapter to the internal card reader of my Samsung N210 Netbook with Ubuntu 10.10, but it doesn't show up. Only if I reboot the system when the card's plugged in it shows up. Why does it need a reboot for mounting? sudo fdisk -l gives the output below. But I can only see the drive when I reboot the computer while the card's plugged. Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x9a5a7990 Device Boot Start End Blocks Id System /dev/sda1 1 1959 15728640 27 Unknown Partition 1 does not end on cylinder boundary. /dev/sda2 * 1959 1972 102400 7 HPFS/NTFS /dev/sda3 1972 18992 136718750 83 Linux /dev/sda4 18992 19458 3738625 5 Extended /dev/sda5 18992 19458 3738624 82 Linux swap / Solaris Disk /dev/sdb: 1973 MB, 1973420032 bytes 60 heads, 59 sectors/track, 1088 cylinders Units = cylinders of 3540 * 512 = 1812480 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 1 1089 1927100+ 6 FAT16

    Read the article

  • Are Windows partitions gone?

    - by Gigili
    I had Windows 7 on my laptop (factory setting), because of some performance issues, I decided to use recovery options to restore it to its factory condition but I don't know what has happened or what I have done that the whole operating system was gone after playing around with recovery options from the boot menu. I couldn't find Windows, so I installed Ubuntu 11.04 on my laptop. Last time I had Ubuntu on it, it was not really compatible with laptop's configuration and I had a bit of problems trying to do normal tasks I used to do on Windows. Now I want to make sure that Windows and its drivers are gone so that I can try to install a newer version of Ubuntu or Windows. I tried the command sudo fdisk -l And the result shown was: myaccount@myaccount-VPCS116FG:~$ sudo fdisk -l [sudo] password for myaccount: Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00025b5f Device Boot Start End Blocks Id System /dev/sda1 * 1 38409 308515840 83 Linux /dev/sda2 38409 38914 4052993 5 Extended /dev/sda5 38409 38914 4052992 82 Linux swap / Solaris Disk /dev/dm-0: 4150 MB, 4150263808 bytes 255 heads, 63 sectors/track, 504 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xa668cfe8 Disk /dev/dm-0 doesn't contain a valid partition table Is it gone? If not, what command should I try to have access to Windows partitions? Thank you.

    Read the article

  • Exit stage right...

    - by Peter Korn
    I joined Sun Microsystems in December of 1996, not quite 17 years ago. Over the course of those years, it has been my great pleasure and honor to work with a many talented folks, on a many incredible projects - first at Sun, and then at Oracle. In those nearly 17 years, we made quite a few platforms and products accessible - including Java, GNOME, Solaris, and Linux. We pioneered many of the accessibility techniques that are now used throughout the industry, including accessibility API techniques which first appeared in the Java and GNOME accessibility APIs; and screen access techniques like the API-based switch access of the GNOME Onscreen Keyboard. Our work was recognized as groundbreaking by many in the industry, both through awards for the innovations we had delivered (such as those we received from the American Foundation for the Blind), and awards of money to develop new innovations (the two European Commission accessibility grants we received). Our knowledge and expertise contributed to the first Section 508 accessibility standard, and provided significantly to the upcoming refresh of that standard, to the European Mandate 376 accessibility standard, and to a number of web accessibility standards. After 17 years of helping Sun and Oracle accomplish great things, it is time to start a new chapter... Today is my last day at Oracle. It is not, however, my last day in the field of accessibility. Next week I will begin working with another group of great people, and I am very much looking forward to the great things I will help contribute to in the future. Starting tomorrow, please follow me on my new, still under constriction, Wordpress blog: http://peterkorn.wordpress.com/.

    Read the article

  • Casting a container of shared_ptr

    - by Jamie Cook
    Hi all, I have a method void foo(list<shared_ptr<Base>>& myList); Which I'm trying to call with a two different types of lists, one of DerivedClass1 and one of DerivedClass2 list<shared_ptr<DerivedClass1>> myList1; foo(myList1); list<shared_ptr<DerivedClass2>> myList2; foo(myList2); However this obviously generates a compiler error error: a reference of type "std::list<boost::shared_ptr<Base>, std::allocator<boost::shared_ptr<Base>>> &" (not const-qualified) cannot be initialized with a value of type "std::list<boost::shared_ptr<DerivedClass1>, std::allocator<boost::shared_ptr<DerivedClass1>>>" Is there any easy way to cast a container of shared_ptr? Of alternate containers that can accomplish this?

    Read the article

  • Patching this Code to apply dynamic (iPhone) background position

    - by Brian
    I posted a question previously that got off topic, I'm reposting with better code that I have VERIFIED is compatible with iPhone (it works with mine anyway!) I just want to apply background-position coordinates to the body element and call the script conditionally for iPhone, iPod, & iPad. Here's my conditional call for those devices: var deviceAgent = navigator.userAgent.toLowerCase(); var agentID = deviceAgent.match(/(iphone|ipod|ipad)/); if (agentID) { // do something } else { //do this } Now, I've found this excellent script that sets the "top: x" dynamically on the basis of scroll position. Everyone has told me (and ALL of the tutorials and Google search results as well) that it's impossible to set scroll position dynamically for iPhone because of the viewport issue. HOWEVER, they are wrong because if you scroll to the bottom of the page and view this javascript demo on iPhone, you can scroll and the <div style="background-position: fixed; top: x (variable)"></div> div DOES stay centered on iPhone. I really hope this question helps alot of people, I thought it was impossible, but it's NOT... I just need help stitching it together! The original code (you can test it on iPhone yourself) is here: http://stevenbenner.com/2010/04/calculate-page-size-and-view-port-position-in-javascript/ So I just need help getting the following code to apply the dynamic "background-position: 0 x" to the BODY tag where x is centered and relative to the viewport position. Also, needs to be nested inside the above code that is conditional for iPhone and similar devices. // Page Size and View Port Dimension Tools // http://stevenbenner.com/2010/04/calculate-page-size-and-view-port-position-in-javascript/ if (!sb_windowTools) { var sb_windowTools = new Object(); }; sb_windowTools = { scrollBarPadding: 17, // padding to assume for scroll bars // EXAMPLE METHODS // center an element in the viewport centerElementOnScreen: function(element) { var pageDimensions = this.updateDimensions(); element.style.top = ((this.pageDimensions.verticalOffset() + this.pageDimensions.windowHeight() / 2) - (this.scrollBarPadding + element.offsetHeight / 2)) + 'px'; element.style.left = ((this.pageDimensions.windowWidth() / 2) - (this.scrollBarPadding + element.offsetWidth / 2)) + 'px'; element.style.position = 'absolute'; }, // INFORMATION GETTERS // load the page size, view port position and vertical scroll offset updateDimensions: function() { this.updatePageSize(); this.updateWindowSize(); this.updateScrollOffset(); }, // load page size information updatePageSize: function() { // document dimensions var viewportWidth, viewportHeight; if (window.innerHeight && window.scrollMaxY) { viewportWidth = document.body.scrollWidth; viewportHeight = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight) { // all but explorer mac viewportWidth = document.body.scrollWidth; viewportHeight = document.body.scrollHeight; } else { // explorer mac...would also work in explorer 6 strict, mozilla and safari viewportWidth = document.body.offsetWidth; viewportHeight = document.body.offsetHeight; }; this.pageSize = { viewportWidth: viewportWidth, viewportHeight: viewportHeight }; }, // load window size information updateWindowSize: function() { // view port dimensions var windowWidth, windowHeight; if (self.innerHeight) { // all except explorer windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // explorer 6 strict mode windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { // other explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; }; this.windowSize = { windowWidth: windowWidth, windowHeight: windowHeight }; }, // load scroll offset information updateScrollOffset: function() { // viewport vertical scroll offset var horizontalOffset, verticalOffset; if (self.pageYOffset) { horizontalOffset = self.pageXOffset; verticalOffset = self.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict horizontalOffset = document.documentElement.scrollLeft; verticalOffset = document.documentElement.scrollTop; } else if (document.body) { // all other Explorers horizontalOffset = document.body.scrollLeft; verticalOffset = document.body.scrollTop; }; this.scrollOffset = { horizontalOffset: horizontalOffset, verticalOffset: verticalOffset }; }, // INFORMATION CONTAINERS // raw data containers pageSize: {}, windowSize: {}, scrollOffset: {}, // combined dimensions object with bounding logic pageDimensions: { pageWidth: function() { return sb_windowTools.pageSize.viewportWidth > sb_windowTools.windowSize.windowWidth ? sb_windowTools.pageSize.viewportWidth : sb_windowTools.windowSize.windowWidth; }, pageHeight: function() { return sb_windowTools.pageSize.viewportHeight > sb_windowTools.windowSize.windowHeight ? sb_windowTools.pageSize.viewportHeight : sb_windowTools.windowSize.windowHeight; }, windowWidth: function() { return sb_windowTools.windowSize.windowWidth; }, windowHeight: function() { return sb_windowTools.windowSize.windowHeight; }, horizontalOffset: function() { return sb_windowTools.scrollOffset.horizontalOffset; }, verticalOffset: function() { return sb_windowTools.scrollOffset.verticalOffset; } } };

    Read the article

  • How prevent anyone from stealing my shared_ptr?

    - by Kyle
    So, I use boost::shared_ptr for all the various reference-counting benefits it provides -- reference counting for starters, obviously, but also the ability to copy, assign, and therefore store in STL Containers. The problem is, if I pass it to just one "malicious" function or object, the object can save the ptr and then I'll never be able to de-allocate it without the foreign function or object nicely relinquishing its ownership. Ultimately, I try to keep object ownership explicit. I accomplish this by having the owner keep the only shared_ptr to the object, and "guest" objects only store weak_ptrs to the object. I really don't want the "shared" part of shared_ptr, but I'm required to use shared_ptr in order to make weak_ptrs. I want to use scoped_ptr, but it's extremely limited since you can't copy it. You can't store it in a container, you can't lend out weak_ptrs from it, and you can't transfer ownership to a new manager. What's the solution?

    Read the article

  • Find the 5th element with a specified class in a list and add another class in jQuery

    - by Répás
    I'd like to addClass "green" to the 5th li.hr in every ul containers in my site. $("ul li.hr").each(function() { if ($(this).length = 5) { $(this).addClass("green"); } }); PS: if its possible with CSS only, tell me how please. Note that the ul has mixed elements, like: <li class="a">foo</li> <li class="b">foo</li> <li class="hr">foo</li> <li class="c">foo</li> <li class="a">foo</li> <li class="hr">foo</li> I need the 5th li.hr.

    Read the article

  • Dual Boot Windows 8 and Ubuntu

    - by Nick
    My laptop has two hard drives, one 320GB HDD and a 30GB SSD. I installed Windows 8 on the HDD and Ubuntu on the SSD. However, after I installed Ubuntu, Windows 8 did not appear on the boot list. I tried boot-repair, but this didn't help.Here is the output of my fdisk -l: Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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: 0x6cd9314a Device Boot Start End Blocks Id System /dev/sda1 * 2048 625139711 312568832 7 HPFS/NTFS/exFAT Disk /dev/sdb: 30.0 GB, 30016659456 bytes 255 heads, 63 sectors/track, 3649 cylinders, total 58626288 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: 0x6cd93132 Device Boot Start End Blocks Id System /dev/sdb1 * 2048 207126 102539+ 83 Linux /dev/sdb2 208894 58626047 29208577 5 Extended /dev/sdb5 208896 4112383 1951744 82 Linux swap / Solaris /dev/sdb6 4114432 58626047 27255808 83 Linux Disk /dev/mmcblk0: 3965 MB, 3965190144 bytes 49 heads, 48 sectors/track, 3292 cylinders, total 7744512 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: 0x0009c694 Device Boot Start End Blocks Id System /dev/mmcblk0p1 * 8192 7744511 3868160 b W95 FAT32 I also tried sudo grub-update, but that also did nothing.

    Read the article

  • What are some Servlet Container pros and cons for a Solr installation?

    - by danieltalsky
    The SolrInstall wiki page lists seven different server / Servlet Containers compatible with Solr: Tomcat Jetty Resin JBoss WebSphere Weblogic Glassfish I'm sure that "best" is subjective, so I'll just say my criteria are: easiest to set up, best for search performance with a smallish, infrequently-updated dataset, and with the fewest number of gotchas. Jetty and Tomcat both have apt-get solr packages, so they're clearly the frontrunners for some. Jetty is used in the demo install, but there's some notes that Jetty has some difficulties handling Unicode in some cases. Tomcat is a common choice but my understanding is that it's not as lightweight and has a lot of features not needed by Solr. Is it worth considering any of the others? Are there some important pro's and cons I should be aware of?

    Read the article

  • How to mount drive in /media/userName/ like nautilus do using udisks

    - by Bsienn
    As of my current installation of Ubuntu 13.10 Unity, when i click on a drive in nautilus it get mounted in /media/username/mountedDrive i read that nautilus use udisks to do that. Basically i want to auto mount my drive using udisks in start up using this method But problem is, it mounts the drive in /media/mountedDrive, but i want it the way nautilus do in /media/username/mounteDrive I want NTFS Data drive to be auto mounted at /media/bsienn/ bsienn@bsienn-desktop:~$ blkid /dev/sda1: LABEL="System Reserved" UUID="8230744030743D6B" TYPE="ntfs" /dev/sda2: LABEL="Windows 7" UUID="60100EA5100E81F0" TYPE="ntfs" /dev/sda3: LABEL="Data" UUID="882C04092C03F14C" TYPE="ntfs" /dev/sda5: UUID="8768800f-59e1-41a2-9092-c0a8cb60dabf" TYPE="swap" /dev/sda6: LABEL="Ubuntu Drive" UUID="13ea474a-fb27-4c91-bae7-c45690f88954" TYPE="ext4" /dev/sda7: UUID="69c22e73-9f64-4b48-b854-7b121642cd5d" TYPE="ext4" bsienn@bsienn-desktop:~$ sudo fdisk -l Disk /dev/sda: 160.0 GB, 160000000000 bytes 255 heads, 63 sectors/track, 19452 cylinders, total 312500000 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: 0x8d528d52 Device Boot Start End Blocks Id System /dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT /dev/sda2 206848 117730069 58761611 7 HPFS/NTFS/exFAT /dev/sda3 158690072 312494116 76902022+ 7 HPFS/NTFS/exFAT /dev/sda4 117731326 158689279 20478977 5 Extended /dev/sda5 137263104 141260799 1998848 82 Linux swap / Solaris /dev/sda6 141262848 158689279 8713216 83 Linux /dev/sda7 117731328 137263103 9765888 83 Linux Partition table entries are not in disk order bsienn@bsienn-desktop:~$ cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda7 during installation UUID=69c22e73-9f64-4b48-b854-7b121642cd5d / ext4 errors=remount-ro 0 1 # swap was on /dev/sda5 during installation UUID=8768800f-59e1-41a2-9092-c0a8cb60dabf none swap sw 0 0 Desired effect: Picture link

    Read the article

  • Reducing template bloat with inheritance

    - by benoitj
    Does anyone have experience reducing template code bloat using inheritance? i hesitate rewriting our containers this way: class vectorBase { public: int size(); void clear(); int m_size; void *m_rawData; //.... }; template< typename T > class vector : public vectorBase { void push_back( const T& ); //... }; I should keep maximum performance while reducing compile time I'm also wondering why stl implementations do not uses this approach Thanks for your feedbacks

    Read the article

< Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >