Search Results

Search found 81 results on 4 pages for 'gerald ferreira'.

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

  • ArchBeat Link-o-Rama for October 29, 2013

    - by OTN ArchBeat
    Exceptions Handling and Notifications in ODI | Christophe Dupupet Oracle Fusion Middleware A-Team director Christophe Dupupet reviews the techniques that are available in Oracle Data Integrator to guarantee that the appropriate individuals are notified in the event that ODI processes are impacted by network outages or other mishaps. Tech Article: SOA in Real Life: Mobile Solutions The latest article in the Industrial SOA series looks at mobile computing and how companies are developing SOA to go. Oracle Coherence, Split-Brain and Recovery Protocols In Detail | Ricardo Ferreira Ricardo Ferreira's article "provides a high level conceptual overview of Split-Brain scenarios in distributed systems," focusins on a "specific example of cluster communication failure and recovery in Oracle Coherence." WebLogic & FMW Provisioning update | Edwin Biemond "Provisioning was a hot topic on Oracle Openworld 2013," says Oracle ACE Edwin Biemond. His latest blog post discusses what is now possible with WebLogic and Fusion Middleware, and looks at what might be possible in the future. Reusing and Extending ADF BC Entities from Common Model | Andrejus Baranovskis Oracle ACE Director Andrejus Baranovskis' post is about "ADF architecture and better application structuring with EO reuse from a common model." Andrejus describes "how to implement additional requirements to common model in extended ADF BC Entities." Thought for the Day "I work hard, I work late, I have nothing on my conscience. When I go to bed, I sleep." — Ellen Johnson Sirleaf, 24th and current President of Liberia (Born 29 October 1938) Source: brainyquote.com

    Read the article

  • Nvidia System Tools compatible with GTX 560 Ti?

    - by Paula Ferreira
    I want to download and use Nvidia System Tools with ESA suport. But on the "Supported Products" tab my GTX 560 Ti isn't listed. The product was last released on April last year, but it shows support for both the GTX 570 and 580 as well as the GTX 4x family. All sister cards of the GTX 560. Has anyone successfuly ran this nvidia product with the GTX 560 Ti? Why wasn't this card included on the list of supported products?

    Read the article

  • How can I force a Word plugin to be re-enabled after being automatically disabled?

    - by Gerald
    I have been developing a plugin for MS Word (2007) and recently it was causing some crashes on exit and I guess Word automatically disabled it. I went into Word Options under COM Add-ins and checked the box to re-enable it, but when I click okay and then open Word again it's still shown as disabled. I tried looking for something in the registry for this but I wasn't able to find anything. Is there some file or registry key that contains the enabled/disabled status of plugins?

    Read the article

  • Write access from a Windows client via a ZFS SMB, to a file created on the host in OpenIndiana

    - by Gerald Kaszuba
    I've got an OpenIndiana server running ZFS that is shared using a nobody user and group. I don't fully understand Solaris ACL permissions, but I do know Linux style permissions. The client is Windows 8 and the server is OpenIndiana is oi_148. I'm failing to work out how to make write permission work correctly for the Windows client. It is able to make new files, but can not modify files created by the shell in OpenIndiana. When a file ("local file") is created locally as the user nobody in bash, and another file ("smb file") created remotely via SMB (as nobody also), they are quite different in permissions: # ls -V -rw-r--r-- 1 nobody nobody 0 Dec 2 12:24 local file owner@:rw-p--aARWcCos:-------:allow group@:r-----a-R-c--s:-------:allow everyone@:r-----a-R-c--s:-------:allow -rwx------+ 1 nobody nobody 0 Dec 2 12:24 smb file user:nobody:rwxpdDaARWcCos:-------:allow group:2147483648:rwxpdDaARWcCos:-------:allow In bash, I'm able to write to smb file, but vice versa, the Windows client is not able to write to local file. This is confusing to me because it appears that it should allow the SMB client to write to local file, because nobody is the owner and it has a w in the ACL. The sharesmb setting is is fairly boring, although I'm hoping there can something to set in here similar to a umask: sharesmb name=shared,guestok=true How can I make these two work together and have a symmetrical permission system, where both SMB and the local user produce the same permissions? Is there some sort of ACL that can set at the root of the file system to allow all files to be created in a similar manner?

    Read the article

  • OS X home, end, page up, page down movement keys and cursor focus

    - by Gerald Kaszuba
    When using the home, end, page up and page down movement keys in a text editor, the cursor stays in the same spot, even though the window has moved elsewhere. I know that you can use the option modifier to move the cursor along, but is there a way to move the cursor where your window has moved to (without using the mouse)? Another alternative would be to make these movement keys always behave as if the option modifier key is already pressed. Is this possible?

    Read the article

  • Two large, linked Excel files take 30 minutes to save, except in VMWare environment

    - by Gerald L
    I support some tax consultants who love to use Excel when they should probably be using Access. Anyway, they have created two Excel files, A and B. File B has cells linked to file A. File A is 27 MB and file B is 16 MB. One worksheet has roughly 1 million rows and there is another worksheet doing a whole bunch of SUMIF on the 1 million rows. Not the best idea, but whatever. Both Excel files open and recalculate within a reasonable amount of time (1-2 minutes). For a files that large, this is acceptable. Here is the problem: Once you change a cell, and save the file B, it takes a solid 30 minutes to save the file, and the processors are going full speed. I've tried this on 6 different machines, all running Windows XP SP3 with Office 2007 SP2 and all patches. The specs vary from one machine with 512 MB or RAM to a machine with 4 GB of RAM and quad processors. Same result every time. Here is the clincher: If I do this same save operation on a VMWare virtual machine, the file gets saved in 1 minute. I've tried this with my ESX servers at the office, my Mac Fusion at home, and VMWare workstation at the office. It does not matter how much RAM the virtual machine has... it saves in about 1 minute every time. Does anybody have any idea why this is happening and how to fix?

    Read the article

  • What is the best software to capture full-screen 3h programming session in Windows?

    - by Hugo S Ferreira
    Hi, I'm planning a laboratorial experiment to assess behavior of groups when programming using some tools under study. For that, I'll need to capture their entire screen to disk. Mostly, what will be displayed is code, so I'm not to worried with image quality. However, it's paramount that the team is not able to stop the recording by accident, and the tool should be rebust enough to hold at least 3h of video. If possible, it would be nice for researchers in other rooms to "watch" the video as it is recording. Actually, this last requirement reminded me that I could use a VNC recording software, and install a VNC client in each laboratory computer. Anyway, what is your experience with this? Which software do you recommend? Thanks.

    Read the article

  • Dumping a Linux console scrollback buffer?

    - by Gerald Combs
    We would like to save the output of a program run on a Linux console which spans many lines. Unfortunately it wasn't logged or run under screen, or any other way that lets us easily capture the output. The best method we've been able to come up with so far is: Log into the machine via a separate SSH session In the console session, page to the top of the buffer Repeat: In the SSH session, run "cat /dev/vcs >> screendump.txt" In the console session, page down one screen Dump the final screen in the SSH session Is there a better way? It seems like if the VC memory were contiguous and you knew where it was you could use dd to pull the console text directly out of kernel memory and into a file.

    Read the article

  • vSphere ESX 5.5 hosts cannot connect to NFS Server

    - by Gerald
    Summary: My problem is I cannot use the QNAP NFS Server as an NFS datastore from my ESX hosts despite the hosts being able to ping it. I'm utilising a vDS with LACP uplinks for all my network traffic (including NFS) and a subnet for each vmkernel adapter. Setup: I'm evaluating vSphere and I've got two vSphere ESX 5.5 hosts (node1 and node2) and each one has 4x NICs. I've teamed them all up using LACP/802.3ad with my switch and then created a distributed switch between the two hosts with each host's LAG as the uplink. All my networking is going through the distributed switch, ideally, I want to take advantage of DRS and the redundancy. I have a domain controller VM ("Central") and vCenter VM ("vCenter") running on node1 (using node1's local datastore) with both hosts attached to the vCenter instance. Both hosts are in a vCenter datacenter and a cluster with HA and DRS currently disabled. I have a QNAP TS-669 Pro (Version 4.0.3) (TS-x69 series is on VMware Storage HCL) which I want to use as the NFS server for my NFS datastore, it has 2x NICs teamed together using 802.3ad with my switch. vmkernel.log: The error from the host's vmkernel.log is not very useful: NFS: 157: Command: (mount) Server: (10.1.2.100) IP: (10.1.2.100) Path: (/VM) Label (datastoreNAS) Options: (None) cpu9:67402)StorageApdHandler: 698: APD Handle 509bc29f-13556457 Created with lock[StorageApd0x411121] cpu10:67402)StorageApdHandler: 745: Freeing APD Handle [509bc29f-13556457] cpu10:67402)StorageApdHandler: 808: APD Handle freed! cpu10:67402)NFS: 168: NFS mount 10.1.2.100:/VM failed: Unable to connect to NFS server. Network Setup: Here is my distributed switch setup (JPG). Here are my networks. 10.1.1.0/24 VM Management (VLAN 11) 10.1.2.0/24 Storage Network (NFS, VLAN 12) 10.1.3.0/24 VM vMotion (VLAN 13) 10.1.4.0/24 VM Fault Tolerance (VLAN 14) 10.2.0.0/24 VM's Network (VLAN 20) vSphere addresses 10.1.1.1 node1 Management 10.1.1.2 node2 Management 10.1.2.1 node1 vmkernel (For NFS) 10.1.2.2 node2 vmkernel (For NFS) etc. Other addresses 10.1.2.100 QNAP TS-669 (NFS Server) 10.2.0.1 Domain Controller (VM on node1) 10.2.0.2 vCenter (VM on node1) I'm using a Cisco SRW2024P Layer-2 switch (Jumboframes enabled) with the following setup: LACP LAG1 for node1 (Ports 1 through 4) setup as VLAN trunk for VLANs 11-14,20 LACP LAG2 for my router (Ports 5 through 8) setup as VLAN trunk for VLANs 11-14,20 LACP LAG3 for node2 (Ports 9 through 12) setup as VLAN trunk for VLANs 11-14,20 LACP LAG4 for the QNAP (Ports 23 and 24) setup to accept untagged traffic into VLAN 12 Each subnet is routable to another, although, connections to the NFS server from vmk1 shouldn't need it. All other traffic (vSphere Web Client, RDP etc.) goes through this setup fine. I tested the QNAP NFS server beforehand using ESX host VMs atop of a VMware Workstation setup with a dedicated physical NIC and it had no problems. The ACL on the NFS Server share is permissive and allows all subnet ranges full access to the share. I can ping the QNAP from node1 vmk1, the adapter that should be used to NFS: ~ # vmkping -I vmk1 10.1.2.100 PING 10.1.2.100 (10.1.2.100): 56 data bytes 64 bytes from 10.1.2.100: icmp_seq=0 ttl=64 time=0.371 ms 64 bytes from 10.1.2.100: icmp_seq=1 ttl=64 time=0.161 ms 64 bytes from 10.1.2.100: icmp_seq=2 ttl=64 time=0.241 ms Netcat does not throw an error: ~ # nc -z 10.1.2.100 2049 Connection to 10.1.2.100 2049 port [tcp/nfs] succeeded! The routing table of node1: ~ # esxcfg-route -l VMkernel Routes: Network Netmask Gateway Interface 10.1.1.0 255.255.255.0 Local Subnet vmk0 10.1.2.0 255.255.255.0 Local Subnet vmk1 10.1.3.0 255.255.255.0 Local Subnet vmk2 10.1.4.0 255.255.255.0 Local Subnet vmk3 default 0.0.0.0 10.1.1.254 vmk0 VM Kernel NIC info ~ # esxcfg-vmknic -l Interface Port Group/DVPort IP Family IP Address Netmask Broadcast MAC Address MTU TSO MSS Enabled Type vmk0 133 IPv4 10.1.1.1 255.255.255.0 10.1.1.255 00:50:56:66:8e:5f 1500 65535 true STATIC vmk0 133 IPv6 fe80::250:56ff:fe66:8e5f 64 00:50:56:66:8e:5f 1500 65535 true STATIC, PREFERRED vmk1 164 IPv4 10.1.2.1 255.255.255.0 10.1.2.255 00:50:56:68:f5:1f 1500 65535 true STATIC vmk1 164 IPv6 fe80::250:56ff:fe68:f51f 64 00:50:56:68:f5:1f 1500 65535 true STATIC, PREFERRED vmk2 196 IPv4 10.1.3.1 255.255.255.0 10.1.3.255 00:50:56:66:18:95 1500 65535 true STATIC vmk2 196 IPv6 fe80::250:56ff:fe66:1895 64 00:50:56:66:18:95 1500 65535 true STATIC, PREFERRED vmk3 228 IPv4 10.1.4.1 255.255.255.0 10.1.4.255 00:50:56:72:e6:ca 1500 65535 true STATIC vmk3 228 IPv6 fe80::250:56ff:fe72:e6ca 64 00:50:56:72:e6:ca 1500 65535 true STATIC, PREFERRED Things I've tried/checked: I'm not using DNS names to connect to the NFS server. Checked MTU. Set to 9000 for vmk1, dvSwitch and Cisco switch and QNAP. Moved QNAP onto VLAN 11 (VM Management, vmk0) and gave it an appropriate address, still had same issue. Changed back afterwards of course. Tried initiating the connection of NAS datastore from vSphere Client (Connected to vCenter or directly to host), vSphere Web Client and the host's ESX Shell. All resulted in the same problem. Tried a path name of "VM", "/VM" and "/share/VM" despite not even having a connection to server. I plugged in a linux system (10.1.2.123) into a switch port configured for VLAN 12 and tried mounting the NFS share 10.1.2.100:/VM, it worked successfully and I had read-write access to it I tried disabling the firewall on the ESX host esxcli network firewall set --enabled false I'm out of ideas on what to try next. The things I'm doing differently from my VMware Workstation setup is the use of LACP with a physical switch and a virtual distributed switch between the two hosts. I'm guessing the vDS is probably the source of my troubles but I don't know how to fix this problem without eliminating it.

    Read the article

  • Control Panel as menu includes a blank item

    - by Matthew Ferreira
    When viewed as a menu attached to the Start Menu in Windows 7 Ultimate x64, the Control Panel contains a blank item. It looks like this: This item cannot be deleted or removed. I also cannot create a shortcut to it. No error message is displayed, instead simply nothing happens. I've tried using Shell Object Editor (using Run as Administrator) to find out if there is an errant entry on the Control Panel, but many entries (almost two dozen) are blank. There are several valid entries as well. I've looked through the registry and through C:\Windows, \system32, and \SysWOW64 but have had no success. I looked at this question, but I am not using Windows XP and thus have no option to use Tweak UI's Rebuild Icons function. Please note that this is no empty entry in the Control Panel when opened normally, only when attached to the Start Menu as a menu. I have compared the list of entries on the attached menu to the normal Control Panel and other than the blank entry, they are exactly the same. Nothing is missing from one or the other. I've also compared the menu and the normal view to reference images and lists of Control Panel items and have found no irregularities. Is anyone familiar with this problem or know of a solution? I've performed virus and malware scans and found nothing. I've used CCleaner with no change. Nothing with Shell Object Editor. Nothing with Registry Editor. Certainly someone here knows how to fix this. My only guess is the many blank entries visible in Shell Object Editor, but I am reluctant to delete that many items without further analysis and guidance. I appreciate your time and consideration.

    Read the article

  • Backing NTFS hard drive to a Linux distro

    - by Ricardo Ferreira
    Hey all, I want to move to Linux (Ubuntu more specifically) and also bought a new hard drive. What I'm not really sure about is if I put my old hard drive on an external case, then install Ubuntu on the new one and configure, etc... Can I easily access my old one (which is now an external hard drive)? Will I have no problems accessing my partitions? Thanks in advance.

    Read the article

  • Control Panel as menu includes a blank item

    - by Matthew Ferreira
    When viewed as a menu attached to the Start Menu in Windows 7 Ultimate x64, the Control Panel contains a blank item. It looks like this: This item cannot be deleted or removed. I also cannot create a shortcut to it. No error message is displayed, instead simply nothing happens. I've tried using Shell Object Editor (using Run as Administrator) to find out if there is an errant entry on the Control Panel, but many entries (almost two dozen) are blank. There are several valid entries as well. I've looked through the registry and through C:\Windows, \system32, and \SysWOW64 but have had no success. I looked at this question, but I am not using Windows XP and thus have no option to use Tweak UI's Rebuild Icons function. Please note that this is no empty entry in the Control Panel when opened normally, only when attached to the Start Menu as a menu. I have compared the list of entries on the attached menu to the normal Control Panel and other than the blank entry, they are exactly the same. Nothing is missing from one or the other. I've also compared the menu and the normal view to reference images and lists of Control Panel items and have found no irregularities. Is anyone familiar with this problem or know of a solution? I've performed virus and malware scans and found nothing. I've used CCleaner with no change. Nothing with Shell Object Editor. Nothing with Registry Editor. Certainly someone here knows how to fix this. My only guess is the many blank entries visible in Shell Object Editor, but I am reluctant to delete that many items without further analysis and guidance. I appreciate your time and consideration.

    Read the article

  • Determining Azure SQL Database requirements

    - by Gerald
    I'm looking into moving an SQL Server database project to the cloud using Azure SQL Database. I'm just wondering what metrics I can use from SQL Server to help determine what my needs will be on Azure. The size of the database is around 150GB, so I understand what my needs are in terms of storage, I'm just not sure what metrics I can use to translate my database usage to the DTU benchmark metrics that the various service tiers on Azure SQL use.

    Read the article

  • ArchBeat Link-o-Rama for 2012-06-22

    - by Bob Rhubart
    Guide to integration architecture | Stephanie Mann "The landscape of integration architecture is shifting as service-oriented and cloud-based architecture take the fore," says Stephanie Mann. "To ensure success, enterprise architects and developers are turning to lighter-weight infrastructure to support more complex integration projects." FY13 Oracle PartnerNetwork Kickoff - Tues June 26, 2012 Join us for a one-hour live online event hosted by the Oracle PartnerNetwork team as we kickoff FY13. Other dates/times for EMEA/LAD/JAPAN/APAC. Click the link for details. Why should you choose Oracle WebLogic 12c instead of JBoss EAP 6? | Ricardo Ferreira Okay, you would expect an Oracle guy to make this argument. But Ferreira takes a very deep, very detailed technical dive into the issue. So hear the man out, will ya? Hibernate4 and Coherence | Rene van Wijk According to Oracle ACE Rene van Wijk, "there are two ways to integrate Hibernate and Coherence." In this post he illustrates one of them. Simple Made Easy | Rich Hickey Rich Hickey discusses simplicity, why it is important, how to achieve it in design and how to recognize its absence in the tools, language constructs and libraries in this presentation from QCon London 2012. Starting a cluster | Mark Nelson Fusion Middleware A-Team blogger Mark Nelson looks at Oracle SOA Suite, Oracle BPM, and Oracle Coherence, three products that are " commonly clustered, and which have somewhat different requirements." Why building SaaS well means giving up your servers | GigaOM The biggest benefit to PaaS, reports GigaOM's Derrick Harris, "might be a better product because the company is able to focus on building the app rather than managing servers." Personas - what, why & how | Mascha van Oosterhout "To be able to create a successful, user-friendly website or application," says Mascha van Oosterhout, "every decision you take, whether you are part of the marketing team, the design team or the development team, should be based on what you know about the user." Thought for the Day "Machines take me by surprise with great frequency." — Alan Turing(June 23, 1912 - June 7, 1954) Source: Brainy Quote

    Read the article

  • How to conditionally exclude features from "FeaturesDlg" in WiX 3.0 from a managed Custom Action (DT

    - by Gerald
    I am trying to put together an installer using WiX 3.0 and I'm unsure about one thing. I would like to use the FeaturesDlg dialog to allow the users to select features to install, but I need to be able to conditionally exclude some features from the list based on some input previously received, preferably from a managed Custom Action. I see that if I set the "Display" attribute of a Feature to "hidden" in the .wxs file that it does what I want, but I can't figure out a way to change that attribute at runtime. Any pointers would be great.

    Read the article

  • ABC PDF - create 256 color images

    - by Gerald Ferreira
    I am using ABCpdf7 to create pdf documents on the fly - Here is something that I do not understand. When I create the pdf document from a url - the images in the pdf document seems to be 256 colors. Does anyone know how I can set ABCpdf to create full color images. If I spesify the image url - the image gets created at full color - but then I cannot crab a page in one go

    Read the article

  • What can cause throughput to become really slow when an ISAPI filter implements SF_NOTIFY_SEND_RAW_D

    - by Gerald
    I have an ISAPI filter for IIS6 that I've been developing for a while, but I just noticed something disturbing. Anytime I have the filter installed and I download a file, the file download becomes really slow. From a remote machine I'm getting ~120kb per second without the filter installed, and ~45kb per second with the filter installed. This seems to be related to the SF_NOTIFY_SEND_RAW_DATA callback. Whenever I register for this callback, I get the slow downloads, when I don't register for it, everything is fine. Even if I make my HttpFilterProc function just return immediately, like this: DWORD WINAPI HttpFilterProc( PHTTP_FILTER_CONTEXT pfc, DWORD notificationType, LPVOID pvNotification ) { return SF_STATUS_REQ_NEXT_NOTIFICATION; } I've also tried returning SF_STATUS_REQ_HANDLED_NOTIFICATION with the same result. Is it possible that I have some build setting on my DLL that is causing a slow execution of the callback function, or is this just the way it's going to be with ISAPI?

    Read the article

  • What are interesting ideas for experimenting with Artificial Neural Networks?

    - by Gerald Kaszuba
    I'm after a list of possible neural network implementations that one can do to learn how to use it. What other possibilities are there? Here's the list so far: Games tic-tac-toe Connect 4 Chess Go Visual recognition Character recognition (typefaces, letters, numbers, etc) Facial recognition Audio recognition Language detection Male vs female Word recognition Language detection (natural, programming)

    Read the article

  • Problem with the scrollbar of a UIWebView

    - by Paulo Ferreira
    Hi there! Im using a UIWebView to access a website, when i rotate the phone (landscape) the UIWebView is properly resized and the scrollbar are on the right place (on the right edge...) but when i acess any of input fields to fill the information required and exit it the UIWebView scrollbar jumps to the middle of screen (looks like it get back to 320, the width of the screen on portrait). Some useful info, this program was created using IB, have lots of outlets, im thinking about in do (redo) everything programmatically cause i was not the author of the first version... If anyone have seen this before plz let me know.. Thanks in advance!

    Read the article

  • IE7 - visited links revert to unvisted after page refresh

    - by Gerald
    Hello, A number of our users have just upgraded from IE6 to IE7. the upgreaded users are reporting an issue with visited links reverting to their unvisited color after a page refresh. This only happens to links that are using javascript instead of a hard coded URL: <script lang="JavaScript"> <!-- function LoadGoogle() { var LoadGoogle = window.open('http://www.google.com'); } --> </script> <a href="javascript:LoadGoogle()">Google using javascript</a> <a href="#" OnClick="javascript:LoadGoogle()">Google using javascript OnClick</a> The above links will revert back to the unvisited color whenever the page is refreshed. It doesn't matter if the page is refreshed because of a post back, manually hitting the refresh or f5 button, or from an auto-refresh function. Please note, the above code is an over simplification of what is actually happening, but I believe it illustrates the issue well enough. This is causing a problem for our users because we are providing them with a list of items that are all opened into new windows via javascript when they are clicked; and refresh the parent page when the users are finished with them. Each time the parent page is refreshed all of these links revert back to their unvisited color, so our users are losing track of which items they've worked on. I've been digging around and it looks like this is intended behavior. IE7 doesn't register these links with the browsers history. Does anyone know a work around that will allow us to keep these javascript links in the visited state without having to do a major overhaul of the apps code? Thank you.

    Read the article

  • What is the best software to capture full-screen 3h programming session in Windows?

    - by Hugo S Ferreira
    Hi, I'm planning a laboratorial experiment to assess behavior of groups when programming using some tools under study. For that, I'll need to capture their entire screen to disk. Mostly, what will be displayed is code, so I'm not to worried with image quality. However, it's paramount that the team is not able to stop the recording by accident, and the tool should be rebust enough to hold at least 3h of video. If possible, it would be nice for researchers in other rooms to "watch" the video as it is recording. Actually, this last requirement reminded me that I could use a VNC recording software, and install a VNC client in each laboratory computer. Anyway, what is your experience with this? Which software do you recommend? Thanks.

    Read the article

  • Regex to match last space character

    - by Gerald Ferreira
    Hi There I need some help I am looking for a regex that would match the last space character in a string. I am using Javascript and Classic ASP If there is someone that could maybe point me in the right direction I have a long string of text which I trim to 100 characters. I would like to remove the last character to avoid a spelling mistake if the trim cuts a word due to the 100 characters limit regex.replace(/[ ]$.*?/ig, ''); Anybody with ideas? Thanks

    Read the article

  • Convert a List of Options to an Option of List using Scalaz

    - by Rafael de F. Ferreira
    The following function transforms a list of Option[T] into a list of Some[T], in the case where all members are Some's, or None, in the case where there is at least one None member. I guess the code is clearer that this explanation: def lo2ol[T](lo: List[Option[T]]): Option[List[T]] = { lo.foldRight[Option[List[T]]](Some(Nil)){(o, ol) => (o, ol) match { case (Some(x), Some(xs)) => Some(x :: xs); case _ => None : Option[List[T]]; }}} I remember seeing somewhere a similar example, but using Scalaz to simplify the code. How would it look like?

    Read the article

  • Using LINQ in generic collections

    - by Hugo S Ferreira
    Hi, Please consider the following snippet from an implementation of the Interpreter pattern: public override object Execute(Interpreter interpreter, object ctx) { var list = ctx as IEnumerable<string>; return (list != null) ? list.FirstOrDefault() : null; } What about if I want to use the same function for integers? public override object Execute(Interpreter interpreter, object ctx) { var list = ctx as IEnumerable<string>; if (list != null) return list.FirstOrDefault(); var list = ctx as IEnumerable<int>; return (list != null) ? list.FirstOrDefault() : null; } What I wanted was something like: public override object Execute(Interpreter interpreter, object ctx) { var list = ctx as IEnumerable; return (list != null) ? list.FirstOrDefault() : null; } But Linq doesn't act on IEnumerables. Instead, to get to this solution, I would be forced to write something like: public override object Execute(Interpreter interpreter, object ctx) { var list = ctx as IEnumerable; if (list != null) foreach(var i in list) { yield return i; return; } return null; } Or use a generic method: public override T Execute<T>(Interpreter interpreter, object ctx) { var list = ctx as IEnumerable<T>; return (list != null) ? list.FirstOrDefault() : null; } Which would break the Interpreter pattern (as it was implemented in this system). Covariance would also fail (at least in C#3), though would it work, it would be the exact behavior I wanted: public override object Execute(Interpreter interpreter, object ctx) { var list = ctx as IEnumerable<object>; return (list != null) ? list.FirstOrDefault() : null; } So, my question is: what's the best way to achieve the intended behavior? Thanks :-)

    Read the article

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