Search Results

Search found 141 results on 6 pages for 'wim'.

Page 3/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Oracle Virtual Desktop Client with USB smart card reader

    - by wim.coekaerts
    I have my Sun Ray thin client at home which I use religiously, I use a Sun Ray 3i at work as my main desktop and just always take my smart card home and happily continue with the hot desking feature. We released a software version of the Sun Ray client called Oracle Virtual Desktop Client (OVDC). There is a version for Windows, Linux and Mac OS X. I have a minimac at home and I installed OVDC on it, which of course works great but since I like to re-connect to my session that I use at work, I wanted to try out the external usb smart card reader feature. I ordered a cute, low cost device online and tried it out. As expected, it worked out of the box without -any- configuration. I took the device, plugged it into my minimac, started OVDC, plugged in my smartcard and I got the password screen (screensaver) to get into my sun ray session on my server at work. Nothing new here, this is a feature that's been in the product but I had never tried it before and it works out of the box and is super easy and I just felt like sharing :-) Here are a few pictures : (1) login screen (2) smart cardreader without card (3) password screen (4) smart card reader with card

    Read the article

  • How to save terminal history manually?

    - by wim
    It's my understanding that the history file is updated when the terminal exits. But sometimes my computer crashes out, and the terminal doesn't exit cleanly, and then I lose those commands from my history which is annoying. How can I make it flush immediately, so that the entries still go there even if my computer has a meltdown? At the moment I'm using this workaround, but I feel there should be a better way. I'm using gnome-terminal on Ubuntu 12.10.

    Read the article

  • Which parallel pattern to use?

    - by Wim Van Houts
    I need to write a server application that fetches mails from different mail servers/mailboxes and then needs to process/analyze these mails. Traditionally, I would do this multi-threaded, launching a thread for fetching mails (or maybe one per mailbox) and then process the mails. We are moving more and more to servers where we have 8+ cores, so I would like to make use of these cores as much as possible (and not use 1 at 100% and leave the seven others untouched). So conceptually, as an example, it would be nice that I could write the application in such a way that two cores are "continuously" fetching emails and four cores are "continuously" processing/analyzing the emails (since processing and analyzing mails is more CPU intensive than fetching mails). This seems like a good concept, but after studying some parallel patterns, I'm not really sure how this is best implemented. None of the patterns really fit. I'm working in VS2012, native C++, but I guess from a design point of view this does not really matter and just some pointers on how to organize this would be great!

    Read the article

  • I can't get grub menu to show up during boot

    - by wim
    After trying (and failing) to install better ATI drivers in 11.10, I've somehow lost my grub menu at boot time. The screen does change to the familiar purple colour, but instead of a list of boot options it's just blank solid colour, and then disappears quickly and boots into the default entry normally. How can I get the bootloader back? I've tried sudo update-grub and also various different combinations of resolutions and colour depths in startupmanager application with no success (640x480, 1024x768, 1600x1200, 16 bits, 8 bits, 10 second delay, 7 second delay, 2 second delay...) edit: I have already tried holding down Shift during bootup and it does not seem to change the behaviour. I get the message "GRUB Loading" in the terminal, but then the place where the grub menu normally appears I get a solid blank magenta screen for a while. Here are the contents of /etc/default/grub # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: # info -f grub -n 'Simple configuration' GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=" vga=798 splash" # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"

    Read the article

  • How can I disable the purple bootloader splash at boot?

    - by wim
    This question has been answered before, but neither of the methods in the accepted answer worked for me on 11.10. First I tried editing in /etc/default/grub, and then running sudo update-grub. But after that I still got a blank, plain, purple screen while the kernel is loading. The screen has no boot options, and it obscures those dmesg that I want to see going in the terminal. Next I tried removing the plymouth-theme-*, but that just broke my gnome-shell theme looks, and the purple screen still remains. I have also tried configuring it with startupmanager package, but nothing seems to get rid of that darned purple splash. here are the contents of my /etc/default/grub file: # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: # info -f grub -n 'Simple configuration' GRUB_DEFAULT="0" GRUB_HIDDEN_TIMEOUT="0" GRUB_HIDDEN_TIMEOUT_QUIET="true" GRUB_TIMEOUT="0" GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`" #GRUB_CMDLINE_LINUX_DEFAULT="" GRUB_CMDLINE_LINUX_DEFAULT="" GRUB_CMDLINE_LINUX="" # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" # Uncomment to disable graphical terminal (grub-pc only) # GRUB_TERMINAL="console" # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE="640x480" # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID="true" # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1" GRUB_DISABLE_OS_PROBER="true"

    Read the article

  • Print Screen key doesn't work if a drop-down menu is active

    - by wim
    On 11.10, I don't get a screengrab when pressing the Print Screen button on my keyboard if I have activated a drop down menu. For example, in nautilus, I can click the File menu and press the print screen button, nothing happens. Deactivating the drop down menu and all other things being equal, it works. Is that normal? Often when using this thing I'm actually needing to show some of those menu options. Currently I use the workaround to grab after a delay of a few seconds, but I'm used to the print screen button working no matter what's in focus and would prefer it that way.

    Read the article

  • Play music from computer on phone, over WiFi?

    - by wim
    Wasn't sure whether to ask on here on on android.stackexchange.com ... but I want to play music which is on my desktop machine through my phone. The music is coming from ext4 partition which I am happy to share on the LAN. It should use WiFi not bluetooth (because I hope to use the bluetooth interface for other things, simultaneously). Is it possible and what do I need to setup on the desktop (on Ubuntu 12.04) and/or my phone (galaxy nexus)? edit: Just to clarify, I want the music to be playing from the phone, not through the desktop's speakers.

    Read the article

  • WIM2VHD failing with "Cannot derive Volume GUID from mount point."

    - by Jacob
    I'm trying to use WIM2VHD according to the instructions on Scott Hanselman's blog post to create a Sysprepped VHD image to boot from. I've installed the WAIK, and I have my Windows 7 sources mounted as a virtual drive. When I try to run WIM2VHD like this: cscript WIM2VHD.wsf /wim:F:\sources\install.wim /sku:Ultimate /vhd:E:\WindowsSeven.vhd /size:30721 I get the following log: Log for WIM2VHD 6.1.7600.0 on 11/2/2009 at 10:51:18.16 Copyright (C) Microsoft Corporation. All rights reserved. MACHINE INFO: Build=7600 Platform=x86fre OS=Windows 7 Ultimate ServicePack= Version=6.1 BuildLab=win7_rtm BuildDate=090713-1255 Language=en-ZA INFO: Looking for IMAGEX.EXE... INFO: Looking for BCDBOOT.EXE... INFO: Looking for BCDEDIT.EXE... INFO: Looking for REG.EXE... INFO: Looking for DISKPART.EXE... INFO: Session key is E01E1ED7-C197-4814-BDE4-43B73E14FCC4 INFO: Inspecting the WIM... INFO: Configuring and formatting the VHD... ******************************************************************************* Error: 0: Cannot derive Volume GUID from mount point. ******************************************************************************* INFO: Unmounting the VHD due to error... WARNING: In order to help resolve the issue, temporary files have not been deleted. They are in: C:\Users\Jacob\AppData\Local\Temp\WIM2VHD.WSF\E01E1ED7-C197-4814-BDE4-43B73E14FCC4 *emphasized text*Summary: Errors: 1, Warnings: 1, Successes: 0 INFO: Done. Any ideas?

    Read the article

  • Using dropbox / symbolic link combo successfully

    - by wim
    In the past I have kept some files on dropbox by copying them into my ~/Dropbox folder on Ubuntu. I don't want to move the original files into Dropbox synch folder or muck around with my directory structure. Then I have found I was using dropbox more and more, and wasting a lot of space this way by duplication of data. I use a small SSD locally for OS, any other data is kept on mounted shares from my NAS. I found I could successfully get files up to the cloud by using symbolic links like: ln -s /some/mounted/share/dir ~/Dropbox/dir And dropbox would carry on and sync those files remotely whilst only using up the space of the symbolic link locally. This worked well for me for a few weeks, until I turned on my laptop one day and saw '421 files have been removed from your dropbox' notification. They were still there in the original mounted share, but the symbolic links I'd made were completely gone for some reason. What did I do wrong? It is possible the share could have become unmounted, but I didn't expect this would cause all my files to be deleted from the cloud could it? How can I 'share' files on my dropbox in this way without the danger of the originals being modified from remotely?

    Read the article

  • SCCM deploy from VMware XP image

    - by HannesFostie
    We recently set up the latest version of SCCM and I managed to capture a .wim image from a virtual machine (build and capture task sequence). I want to use this .wim file to deploy winXP to different hardware, and therefor need to add device drivers to the task sequence. I created a driver package per laptop type, and deployed for the first time. However, I am getting a BSOD (0x00007B) which leads me to believe theres a problem with the storage drivers. After adjusting the task sequence to try and point to the mass storage drivers (which are applied at F6, I suppose) I do not get a list of compatible drivers (the list is empty). I looked around, and found some issues regarding hdc class drivers that are not recognized as mass storage drivers. The workaround suggested changing the INF file to make the driver a SCSIAdapter class driver, and importing these again, but to no avail. The list remains empty. Any help is much appreciated

    Read the article

  • Lenovo Windows 8 EFI restore from image

    - by anderhil
    First time here. I have bought e530 with windows 8 and the first hour of work with it i have a problem. I have ssd with windows 7 which i want to use with my new e530. I have made a sysprep of win 7 and installed ssd to the e530. The HDD which was inside e530 i want to use as second hdd instead of my DVD Drive. I connected this HDD through usb-to-sata adapter to copy some files from ssd to the hdd. Unfortunately it didn't see the file system on the HDD (but first time i have booted to it and first boot into Windows 8) I've made some mistakes and i corrupt the filesystem on the hdd. I tried bunch of tricks to recover the GPT, but it didn't work. I have managed to recover the Lenovo_Recovery partition to my ssd using recovery tools. And now I'm stuck, with this new things to me - EFI, GPT, etc i don't how this stuff works, and i have been trying to understand this for hours - but nothing seems to work. I want to restore the Windows 8 to the hdd, so it is there alive. What i have done so far: Formated the HDD I took the PBRALL file from the Lenovo_Recovery " convert gpt create partition Primary size=1000 ID=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC gpt attributes=0x8000000000000001 assign letter=W format quick LABEL=WINRE_DRV create partition efi size=260 assign letter=s format quick fs=fat32 LABEL=SYSTEM_DRV create par msr size=128 create partition primary noerr assign letter=t format quick LABEL=Windows8_OS shrink desired=12197 create partition Primary ID=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC gpt attributes=0x8000000000000001 assign letter=q format quick LABEL=Lenovo_Recovery " it recreated the partitions copied contents of SDRIVE.zip to SYSTEM_DRV partition copied contents of WDRIVE.zip to WINRE_DRV partition Copied restored Lenovo_Recovery back to Lenovo_Recovery partition So now I have 3 system partitions: SYSTE_DRV BOOT boot.sdi EFI BOOT bootx64.efi LenovoBT.efi Lenovo ... Microsoft ... WINRE_DRV\Recovery\WindowsRE\winre.wim Lenovo_Recovery (whic contains install.wim and bunch of other things) So i put back the HDD inside the laptop and tried to boot - but nothing works. It just doesn't boot to anything - no errors - nothing at all. When I choose this HDD manually for boot - just black screen blinks and that's all - it returns back to the devices boot menu. SYSTEM_DRV is EFI partition, so I don't understand why it doesn't boot, it has files needed inside. Can anybody tell me what should be done to make it boot to recovery console or smth like that? How to restore the Windows 8 from the Lenovo_Recovery install.wim image? As I understand I have all the files where they should be, but why it doesn't work? How to troubleshoot such things? Also, if somebody has good link where EFI booting process is explained in details that would be great. Cause i still don't understand how it knows what partition to boot?

    Read the article

  • Oracle Linux Forum

    - by rickramsey
    This forum includes live chat so you can tell Wim, Lenz, and the gang what you really think. Linux Forum - Tuesday March 27 Since Oracle recently made Release 2 of its Unbreakable Enterprise Kernel available (see Lenz's blog), we're following up with an online forum with Oracle's Linux executives and engineers. Topics will be: 9:30 - 9:45 am PT Oracle's Linux Strategy Edward Screven, Oracle's Chief Corporate Architect and Wim Coekaerts, Senior VP of Linux and Virtualization Engineering, will explain Oracle's Linux strategy, the benefits of Oracle Linux, Oracle's role in the Linux community, and the Oracle Linux roadmap. 9:45 - 10:00 am PT Why Progressive Insurance Chose Oracle Linux John Dome, Lead Systems Engineer at Progressive Insurance, outlines why they selected Oracle Linux with the Unbreakable Enterprise Kernel to reduce cost and increase the performance of database applications. 10:00 - 11:00 am PT What's New in Oracle Linux Oracle engineers walk you through new features in Oracle Linux, including zero-downtime updates with Ksplice, Btrfs and OCFS2, DTrace for Linux, Linux Containers, vSwitch and T-Mem. 11:00 am - 12:00 pm PT Get More Value from your Linux Vendor Why Oracle Linux delivers more value than Red Hat Enterprise Linux, including better support at lower cost, best practices for deployments, extreme performance for cloud deployments and engineered systems, and more. Date: Tuesday, March 27, 2012 Time: 9:30 AM PT / 12:30 PM ET Duration: 2.5 hours Register here. - Rick

    Read the article

  • The Oracle Linux Advantage

    - by Monica Kumar
    It has been a while since we've summed up the Oracle Linux advantage over other Linux products. Wim Coekaerts' new blog entries prompted me to write this article. Here are some highlights. Best enterprise Linux - Since launching UEK almost 18 months ago, Oracle Linux has leap-frogged the competition in terms of the latest innovations, better performance, reliability, and scalability. Complete enterprise Linux solution: Not only do we offer an enterprise Linux OS but it comes with management and HA tools that are integrated and included for free. In addition, we offer the entire "apps to disk" solution for Linux if a customer wants a single source. Comprehensive testing with enterprise workloads: Within Oracle, 1000s of servers run incredible amount of QA on Oracle Linux amounting to100,000 hours everyday. This helps in making Oracle Linux even better for running enterprise workloads. Free binaries and errata: Oracle Linux is free to download including patches and updates. Highest quality enterprise support: Available 24/7 in 145 countries, Oracle has been offering affordable Linux support since 2006. The support team is a large group of dedicated professionals globally that are trained to support serious mission critical environments; not only do they know their products, they also understand the inter-dependencies with database, apps, storage, etc. Best practices to accelerate database and apps deployment: With pre-installed, pre-configured Oracle VM Templates, we offer virtual machine images of Oracle's enterprise software so you can easily deploy them on Oracle Linux. In addition, Oracle Validated Configurations offer documented tips for configuring Linux systems to run Oracle database. We take the guesswork out and help you get to market faster. More information on all of the above is available on the Oracle Linux Home Page. Wim Coekaerts did a great job of detailing these advantages in two recent blog posts he published last week. Blog article: Oracle Linux components http://bit.ly/JufeCD Blog article: More Oracle Linux options: http://bit.ly/LhY0fU These are must reads!

    Read the article

  • It's an Oracle Linux Wrap: Oracle Openworld 2012

    - by Zeynep Koch
    Are you still recovering from an amazing Oracle OpenWorld experience? 50,000 attendees had access to thousands of sessions, demos, hands-on-labs, networking opportunities, music concerts, and loads of fun. For the Oracle Linux team, this was a week full of many insightful sessions and customer interactions. In case you were unable to attend Oracle OpenWorld or missed some of content presented, here's a compilation of key session presentations, keynotes, and videos.Go to the Oracle OpenWorld content catalog and access all the session presentations. Oracle Openworld Keynote by Edward Screven Oracle's commitment to Open Source by Edward Screven Oracle Linux Interview with Wim Coekaerts Making the most of mainline kernel by Wim Coekaerts Why DTrace and Ksplice have made Oracle Linux 6 popular by W.Coekaerts How partnership between Oracle Linux and Oracle Partners benefits Sysadmins by Michele Resta Hugepages=Huge Performance on Oracle Linux by Greg Marsden Benefits of Kpslice in your Linux Environment by Tim Hill Oracle Linux, Ksplice and MySQL by Lenz Grimmer We also hosted a successful Oracle Linux Pavilion with 11 of our key partners - Beyond Trust, Centrify, Data Intensity, Fujitsu, HP, LSI, Mellanox, Micro Focus, NetApp, QLogic and Teleran showcased their solutions for Oracle Linux and Oracle VM. Here are some videos from the Oracle Linux Pavilion. Centrify covers Oracle Linux solution they offer at Oracle Linux PavilionMellanox talk about their solution at Oracle Linux Pavilion Eric Pan covers Micro Focus products at Oracle Linux Pavilion There's also collection of the keynotes and executive sessions as on-demand videos posted  here . We hope you find this information useful and look forward to seeing at Oracle OpenWorld 2013! ORACLE LINUX TEAM

    Read the article

  • DON'T MISS THE ORACLE LINUX GENERAL SESSION @ORACLE OPENWORLD

    - by Zeynep Koch
    We have had great sessions today at Openworld but tomorrow will be even better. The session that you should not miss is : Tuesday, Oct 2nd : General Session: Oracle Linux Strategy and Roadmap   10:15am, Moscone South #103   Wim Coekaerts, Sr.VP, Oracle Linux and Virtualization Engineering will talk about what Oracle Linux strategy and what is coming in the next 12 months. This is one session you should not miss and people are already registering. Stop by to hear Wim and ask questions about Linux development Top Technical Tips for Automatic and Secure Oracle Linux Deployments,  11:45am, Moscone South # 270 In this session, you will hear about deployment best practices and tips from Lenz Grimmer from Oracle and two Linux customers, Martin Breslin from SEI and Ed Bailey from Transunion talk about their experiences and insights Why Switch to Oracle Linux?, 3:30pm, Moscone South #270 In this session you will learn why Oracle Linux is best for your enterprise. There will be an Oracle speaker and Mike Radomski from SUNY talk about why they chose Oracle Linux. Please also visit the Oracle Linux Pavilion. If you stop by in one of our Partners booth you can be in the drawing for this beautiful, plush penguin. See you all tomorrow.

    Read the article

  • links for 2011-01-03

    - by Bob Rhubart
    Using Solaris zfs + iscsi targets with Oracle VM (Wim Coekaerts Blog) "I was playing with my Oracle VM setup and needed some shared storage that was block based. I did not have a storage array available but I did have a Solaris box, that I use for Oracle VDI, available." - Wim Coekaerts (tags: oracle otn solaris oraclevm virtualization) DanT's GridBlog: Oracle Grid Engine: Changes for a Bright Future at Oracle "Today, we are entering a new chapter in Oracle Grid Engine’s life. Oracle has been working with key members of the open source community to pass on the torch for maintaining the open source code base to the Open Grid Scheduler project hosted on SourceForge." - Dan Templeton (tags: oracle gridengine) Oracle Fusion Middleware Security: How do I secure my services? "I've been up early for a couple of days talking to a customer about how they should secure their services,' says Chris Johnson. "I'm going to tell you what I told them." (tags: oracle fusionmiddleware security) OldSpice your Innovation - Dangers of Status Quo E2.0 | Enterprise 2.0 Blogs "If organizations only leverage E2.0 technologies in a 'me too' fashion, they are essentially using a bucket to bail water from a leaking ship." - John Brunswick (tags: oracle enteprise2.0) The Aquarium: GlassFish in 2011 - What to expect A look into the Glassfish crystal ball... (tags: oracle glassfish) Andrejus Baranovskis's Blog: Fusion Middleware 11g Security - Retrieve Security Groups from ADF 11g Oracle ACE Director Andrejus Baranovskis shows you what to do when you need to access security information directly from an ADF 11g application. (tags: oracle otn fusionmiddleware security adf) @eelzinga: Book review : Oracle SOA Suite 11g R1 Developer's Guide "What I really liked in this book...was the compare/description of the Oracle Service Bus. The authors did a great job on describing functionality of components existing in the SOA Suite and how to model them in your own process." - Oracle ACE Eric ElZinga (tags: oracle oracleace soa bookreview soasuite)

    Read the article

  • How are views constructed in Josh Smith's MVVM sample?

    - by Wim Coenen
    Being new to both WPF and MVVM, I'm studying Josh Smith's article on the MVVM pattern and the accompanying sample code. I can see that the application is started in app.xaml.cs by constructing a MainWindow object, wiring it to a MainWindowViewModel object and then showing the main window. So far so good. However, I can't find any code which instantiates the AllCustomersView or CustomerView classes. Using "find all references" on the constructors of those views comes up with nothing. What am I missing here?

    Read the article

  • When does the .NET runtime hold a reference count > 1 for COM objects?

    - by Wim Coenen
    Until recently, I believed that the .NET runtime only increases the reference count of COM objects by 1 when creating a runtime-callable wrapper, and that only one such runtime-callable wrapper is created for any given COM object. If I'm not mistaken, the above implies that Marshal.FinalReleaseComObject and Marshal.ReleaseComObject do the same thing in practice. However, today I was writing some tests to verify that COM objects are properly released by my code. I do this by invoking the supposedly released object and checking for the expected InvalidComObjectException. It turns out that there are cases where the exception is thrown after a FinalReleaseComObject, but not after a ReleaseComObject. Does this mean that the .NET 2.0 runtime can hold more than one reference to a COM object? If so, when does it do this?

    Read the article

  • DTGridView losing content while scrolling

    - by Wim Haanstra
    I am using DTGridView from the DTKit by Daniel Tull. I implemented it in a very simple ViewController and the test I am doing is to place a button in the last row of the grid, which should add another row to the grid (and therefor moving the button to a row beneath it). The problem is, when I click the button a couple of times and then start scrolling, the grid seems to lose its content. As I am not completly sure this is a bug in the grid, but more in my code, I hope you guys can help me out and track down the bug. First I have my header file, which is quite simple, because this is a test: #import <UIKit/UIKit.h> #import "DTGridView.h" @interface TestController : UIViewController <DTGridViewDelegate, DTGridViewDataSource> { DTGridView* thumbGrid; } @end I declare a DTGridView, which will be my grid, where I want to put content in. Now, my code file: #import "TestController.h" @implementation TestController int rows = 1; - (NSInteger)numberOfRowsInGridView:(DTGridView *)gridView { return rows; } - (NSInteger)numberOfColumnsInGridView:(DTGridView *)gridView forRowWithIndex:(NSInteger)index { if (index == rows - 1) return 1; else return 3; } - (CGFloat)gridView:(DTGridView *)gridView heightForRow:(NSInteger)rowIndex { return 57.0f; } - (CGFloat)gridView:(DTGridView *)gridView widthForCellAtRow:(NSInteger)rowIndex column:(NSInteger)columnIndex { if (rowIndex == rows - 1) return 320.0f; else return 106.6f; } - (DTGridViewCell *)gridView:(DTGridView *)gridView viewForRow:(NSInteger)rowIndex column:(NSInteger)columnIndex { DTGridViewCell *view = [[gridView dequeueReusableCellWithIdentifier:@"thumbcell"] retain]; if (!view) view = [[DTGridViewCell alloc] initWithReuseIdentifier:@"thumbcell"]; if (rowIndex == rows - 1) { UIButton* btnLoadMoreItem = [[UIButton alloc] initWithFrame:CGRectMake(10, 0, 301, 57)]; [btnLoadMoreItem setTitle:[NSString stringWithFormat:@"Button %d", rowIndex] forState:UIControlStateNormal]; [btnLoadMoreItem.titleLabel setFont:[UIFont boldSystemFontOfSize:20]]; [btnLoadMoreItem setBackgroundImage:[[UIImage imageNamed:@"big-green-button.png"] stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0] forState:UIControlStateNormal]; [btnLoadMoreItem addTarget:self action:@selector(selectLoadMoreItems:) forControlEvents:UIControlEventTouchUpInside]; [view addSubview:btnLoadMoreItem]; [btnLoadMoreItem release]; } else { UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(10,0,100,57)]; label.text = [NSString stringWithFormat:@"%d x %d", rowIndex, columnIndex]; [view addSubview:label]; [label release]; } return [view autorelease]; } - (void) selectLoadMoreItems:(id) sender { rows++; [thumbGrid setNeedsDisplay]; } - (void)viewDidLoad { [super viewDidLoad]; thumbGrid = [[DTGridView alloc] initWithFrame:CGRectMake(0,0, 320, 320)]; thumbGrid.dataSource = self; thumbGrid.gridDelegate = self; [self.view addSubview:thumbGrid]; } - (void)viewDidUnload { [super viewDidUnload]; } - (void)dealloc { [super dealloc]; } @end I implement all the methods for the DataSource, which seem to work. The grid is filled with as many rows as my int 'rows' ( +1 ) has. The last row does NOT contain 3 columns, but just one. That cell contains a button which (when pressed) adds 1 to the 'rows' integer. The problem starts, when it starts reusing cells (I am guessing) and content start disappearing. When I scroll back up, the UILabels I am putting in the cells are gone. Is there some bug, code error, mistake, dumb-ass-move I am missing here? Hope anyone can help.

    Read the article

  • How to combine designable components with dependency injection

    - by Wim Coenen
    When creating a designable .NET component, you are required to provide a default constructor. From the IComponent documentation: To be a component, a class must implement the IComponent interface and provide a basic constructor that requires no parameters or a single parameter of type IContainer. This makes it impossible to do dependency injection via constructor arguments. (Extra constructors could be provided, but the designer would ignore them.) Some alternatives we're considering: Service Locator Don't use dependency injection, instead use the service locator pattern to acquire dependencies. This seems to be what IComponent.Site.GetService is for. I guess we could create a reusable ISite implementation (ConfigurableServiceLocator?) which can be configured with the necessary dependencies. But how does this work in a designer context? Dependency Injection via properties Inject dependencies via properties. Provide default instances if they are necessary to show the component in a designer. Document which properties need to be injected. Inject dependencies with an Initialize method This is much like injection via properties but it keeps the list of dependencies that need to be injected in one place. This way the list of required dependencies is documented implicitly, and the compiler will assists you with errors when the list changes. Any idea what the best practice is here? How do you do it? edit: I have removed "(e.g. a WinForms UserControl)" since I intended the question to be about components in general. Components are all about inversion of control (see section 8.3.1 of the UMLv2 specification) so I don't think that "you shouldn't inject any services" is a good answer. edit 2: It took some playing with WPF and the MVVM pattern to finally "get" Mark's answer. I see now that visual controls are indeed a special case. As for using non-visual components on designer surfaces, I think the .NET component model is fundamentally incompatible with dependency injection. It appears to be designed around the service locator pattern instead. Maybe this will start to change with the infrastructure that was added in .NET 4.0 in the System.ComponentModel.Composition namespace.

    Read the article

  • DTGridView losting content while scrolling

    - by Wim Haanstra
    I am using DTGridView from the DTKit by Daniel Tull. I implemented it in a very simple ViewController and the test I am doing is to place a button in the last row of the grid, which should add another row to the grid (and therefor moving the button to a row beneath it). The problem is, when I click the button a couple of times and then start scrolling, the grid seems to lose its content. As I am not completly sure this is a bug in the grid, but more in my code, I hope you guys can help me out and track down the bug. First I have my header file, which is quite simple, because this is a test: #import <UIKit/UIKit.h> #import "DTGridView.h" @interface TestController : UIViewController <DTGridViewDelegate, DTGridViewDataSource> { DTGridView* thumbGrid; } @end I declare a DTGridView, which will be my grid, where I want to put content in. Now, my code file: #import "TestController.h" @implementation TestController int rows = 1; - (NSInteger)numberOfRowsInGridView:(DTGridView *)gridView { return rows; } - (NSInteger)numberOfColumnsInGridView:(DTGridView *)gridView forRowWithIndex:(NSInteger)index { if (index == rows - 1) return 1; else return 3; } - (CGFloat)gridView:(DTGridView *)gridView heightForRow:(NSInteger)rowIndex { return 57.0f; } - (CGFloat)gridView:(DTGridView *)gridView widthForCellAtRow:(NSInteger)rowIndex column:(NSInteger)columnIndex { if (rowIndex == rows - 1) return 320.0f; else return 106.6f; } - (DTGridViewCell *)gridView:(DTGridView *)gridView viewForRow:(NSInteger)rowIndex column:(NSInteger)columnIndex { DTGridViewCell *view = [[gridView dequeueReusableCellWithIdentifier:@"thumbcell"] retain]; if (!view) view = [[DTGridViewCell alloc] initWithReuseIdentifier:@"thumbcell"]; if (rowIndex == rows - 1) { UIButton* btnLoadMoreItem = [[UIButton alloc] initWithFrame:CGRectMake(10, 0, 301, 57)]; [btnLoadMoreItem setTitle:[NSString stringWithFormat:@"Button %d", rowIndex] forState:UIControlStateNormal]; [btnLoadMoreItem.titleLabel setFont:[UIFont boldSystemFontOfSize:20]]; [btnLoadMoreItem setBackgroundImage:[[UIImage imageNamed:@"big-green-button.png"] stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0] forState:UIControlStateNormal]; [btnLoadMoreItem addTarget:self action:@selector(selectLoadMoreItems:) forControlEvents:UIControlEventTouchUpInside]; [view addSubview:btnLoadMoreItem]; [btnLoadMoreItem release]; } else { UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(10,0,100,57)]; label.text = [NSString stringWithFormat:@"%d x %d", rowIndex, columnIndex]; [view addSubview:label]; [label release]; } return [view autorelease]; } - (void) selectLoadMoreItems:(id) sender { rows++; [thumbGrid setNeedsDisplay]; } - (void)viewDidLoad { [super viewDidLoad]; thumbGrid = [[DTGridView alloc] initWithFrame:CGRectMake(0,0, 320, 320)]; thumbGrid.dataSource = self; thumbGrid.gridDelegate = self; [self.view addSubview:thumbGrid]; } - (void)viewDidUnload { [super viewDidUnload]; } - (void)dealloc { [super dealloc]; } @end I implement all the methods for the DataSource, which seem to work. The grid is filled with as many rows as my int 'rows' ( +1 ) has. The last row does NOT contain 3 columns, but just one. That cell contains a button which (when pressed) adds 1 to the 'rows' integer. The problem starts, when it starts reusing cells (I am guessing) and content start disappearing. When I scroll back up, the UILabels I am putting in the cells are gone. Is there some bug, code error, mistake, dumb-ass-move I am missing here? Hope anyone can help.

    Read the article

  • What does the C# compiler mean when it prints "an explicit conversion exists"?

    - by Wim Coenen
    If I make an empty test class: public class Foo { } And I try to compile code with this statement: Foo foo = "test"; Then I get this error as expected: Cannot implicitly convert type 'string' to 'ConsoleApplication1.Foo' However, if I change the declaration of Foo from class to interface, the error changes to this (emphasis mine): Cannot implicitly convert type 'string' to 'ConsoleApplication1.Foo'. An explicit conversion exists (are you missing a cast?) What is this "explicit conversion" which is supposed to exist?

    Read the article

  • Need a better way to execute console commands from python and log the results

    - by Wim Coenen
    I have a python script which needs to execute several command line utilities. The stdout output is sometimes used for further processing. In all cases, I want to log the results and raise an exception if an error is detected. I use the following function to achieve this: def execute(cmd, logsink): logsink.log("executing: %s\n" % cmd) popen_obj = subprocess.Popen(\ cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdout, stderr) = popen_obj.communicate() returncode = popen_obj.returncode if (returncode <> 0): logsink.log(" RETURN CODE: %s\n" % str(returncode)) if (len(stdout.strip()) > 0): logsink.log(" STDOUT:\n%s\n" % stdout) if (len(stderr.strip()) > 0): logsink.log(" STDERR:\n%s\n" % stderr) if (returncode <> 0): raise Exception, "execute failed with error output:\n%s" % stderr return stdout "logsink" can be any python object with a log method. I typically use this to forward the logging data to a specific file, or echo it to the console, or both, or something else... This works pretty good, except for three problems where I need more fine-grained control than the communicate() method provides: stdout and stderr output can be interleaved on the console, but the above function logs them separately. This can complicate the interpretation of the log. How do I log stdout and stderr lines interleaved, in the same order as they were output? The above function will only log the command output once the command has completed. This complicates diagnosis of issues when commands get stuck in an infinite loop or take a very long time for some other reason. How do I get the log in real-time, while the command is still executing? If the logs are large, it can get hard to interpret which command generated which output. Is there a way to prefix each line with something (e.g. the first word of the cmd string followed by :).

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >