Search Results

Search found 679 results on 28 pages for 'ray rodriguez'.

Page 10/28 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Join + IEqualityComparer<T> and HashCode

    - by Jesus Rodriguez
    Im writing my own LINQ reference but Im getting troubles with some of the more complicated operators implementations. There is a Join implementation that takes a IEqualityComparer Im getting just crazy. Im trying to understand it first before I write (obviously) Image this two lists: List<string> initials = new List<string> {"A", "B", "C", "D", "E"}; List<string> words = new List<string> {"Ant", "Crawl", "Pig", "Boat", "Elephant", "Arc"}; Nothing weird here. I want to join both lists by the Initial, something like: Initial=A Word=Ant Initial=A Word=Arc Initial=B Word=Boat ... I need a comparator, I wrote this: public class InitialComparator : IEqualityComparer<string> { public bool Equals(string x, string y) { return x.StartsWith(y); } public int GetHashCode(string obj) { return obj[0].GetHashCode(); } } The Join itself: var blah = initials.Join(words, initial => initial, word => word, (initial, word) => new {Initial = initial, Word = word}, new InitialComparator()); It's the first time Im using HashCodes, after a good session of debugging I see that every word go to the comparator and look at its HashCode, if another word has the same HashCode it calls equals. Since I want to compare just the initial I though that I just need the first letter Hash (Am I wrong?) The thing is that this is not working correctly. Its says that "Ant" and "Arc" are equals, Ok, its comparing every word in the same list or not, But it adds only the last word it finds, in this case Arc, ignoring Ant and Ant is equals to "A" too... If I put "Ant" and "Ant" it add both. In short, What is the way of doing something like that? I know that Im doing something wrong. Thank you.

    Read the article

  • Why does virtual assignment behave differently than other virtual functions of the same signature?

    - by David Rodríguez - dribeas
    While playing with implementing a virtual assignment operator I have ended with a funny behavior. It is not a compiler glitch, since g++ 4.1, 4.3 and VS 2005 share the same behavior. Basically, the virtual operator= behaves differently than any other virtual function with respect to the code that is actually being executed. struct Base { virtual Base& f( Base const & ) { std::cout << "Base::f(Base const &)" << std::endl; return *this; } virtual Base& operator=( Base const & ) { std::cout << "Base::operator=(Base const &)" << std::endl; return *this; } }; struct Derived : public Base { virtual Base& f( Base const & ) { std::cout << "Derived::f(Base const &)" << std::endl; return *this; } virtual Base& operator=( Base const & ) { std::cout << "Derived::operator=( Base const & )" << std::endl; return *this; } }; int main() { Derived a, b; a.f( b ); // [0] outputs: Derived::f(Base const &) (expected result) a = b; // [1] outputs: Base::operator=(Base const &) Base & ba = a; Base & bb = b; ba = bb; // [2] outputs: Derived::operator=(Base const &) Derived & da = a; Derived & db = b; da = db; // [3] outputs: Base::operator=(Base const &) ba = da; // [4] outputs: Derived::operator=(Base const &) da = ba; // [5] outputs: Derived::operator=(Base const &) } The effect is that the virtual operator= has a different behavior than any other virtual function with the same signature ([0] compared to [1]), by calling the Base version of the operator when called through real Derived objects ([1]) or Derived references ([3]) while it does perform as a regular virtual function when called through Base references ([2]), or when either the lvalue or rvalue are Base references and the other a Derived reference ([4],[5]). Is there any sensible explanation to this odd behavior?

    Read the article

  • how to link table to table

    - by Niño Seymour L. Rodriguez
    I am a comsci student and I'm taking up database now. I got a problem in or should I say I dont know how to link table to table. It is not like you'll just use a foreign key and connect it to the primary key. The outcome should be like this: In the table Course there are three fields namely "course_id", "Description" and "subjects". When you click the name field Subject, a table named Subject should appear. Can you help me with this? hope you understnd my grammar, hehe..im not good in english......it will be a big help if you can answer it.........thank you po..............

    Read the article

  • Can the adp2 device be flashed with 2.0?

    - by Rick Rodriguez
    Simple question...can the adp2 that I just bought through the Android Market be flashed with Android 2.0? I can't find anything anywhere. The HTC developer support only has system images for the adp1 and adp2 phones up to 1.6. If it can't I will be sending the phone back for a full refund. Thanks.

    Read the article

  • Event for "end edit" in a text box

    - by eli.rodriguez
    I am using a textbox in winform (c#) and using the text of to make consults in a database. But i need constantly consult the text of the textbox every time that text change. So for these i use the KeyUp. But this event is too slow. Is any event that just fire when the textbox editing has been finished ?. I consider for finish 2 conditions The control lost focus. The control has 200ms without keypress

    Read the article

  • Best canvas for drawing in wxPython?

    - by Pablo Rodriguez
    I have to draw a graph of elements composing a topological model of a physical network. There would be nodes and arches, and the latter could be unidirectional or bidirectional. I would like to capture the clicking events for the nodes and the arches (to select the element and show its properties somewhere), and the dragging events for the nodes (to move them around) and arches (to connect or disconnect elements). I've done some research and I've narrowed the alternatives down to OGL (Object Graphics Library) and FloatCanvas. I would not like to go down to the DrawingContext, but it is not discarded if necessary. Which canvas option would you choose?

    Read the article

  • Request a Windows Phone 7.5 Location

    - by Christopher Cabezudo Rodriguez
    I am trying to track 5 windows phone 7.5 for a experiment and I have try using an app (that I am developing for that experiment) but the app must be active and that's not possible for all readings, I was looking online and I find something similar that Microsoft has done with the find my phone service, https://www.windowsphone.com/en-US/find Anyone knows how can i call that service outside the website or any other way to accomplish this task i need GEO position every 15 min

    Read the article

  • Problems with Twitter on Android App

    - by Dayner Alvarez Rodriguez
    I'm trying to show one public twitter profile in one WebView of my app, is not necessary to login twitter, in the MotoDev Simulator this works fine, but in the physical device don't work, this: "403 fobiden limite exceed rate" error appears, this is the simple code line that I'm using: webView.loadUrl("https://mobile.twitter.com/#!/asambleaecuador"); and works fine into de MotoDev simulator AVD ....can somebody helpme please!!! Thanks

    Read the article

  • How can I programmatically drop a Windows Mobile GPRS Connection?

    - by Rodriguez
    Hello, is there a way to explicitly close a GPRS connection? I'm setting up a connection with ConnectionManager and I've set the cache time to 10 seconds. Anyway after releasing it, the connection is still on, forever, alas I cannot use the registry key "gprs_by_if_device_off". I'm not using C# but plain C++. My idea is to simulate the activity of the windows button "disconnect data connection", but I really cannot understand what it does under the curtain. Thanx.

    Read the article

  • Fail to resolve a name when calling ConnMgrEstablishConnectionSync()

    - by Rodriguez
    Hi Guys, I'm trying to setup a GPRS connection with ConnMgrEstablishConnectionSync(), so far so good, the connection is established and if I try to connect to an IP address, everything works fine. Alas, when I try to resolve a name: ConnMgrEstablishConnectionSync(); ... gethostbyname("www.google.com"); The result is always an error: 0x00002af9 (host not found). Therefor I'm not able to resolve any name, but if I try to open a browser, the browser is able to resolve everything. Am I doing something wrong? Thanx for your help.

    Read the article

  • ifcfg-eth* on CentOS 6.x, but for IPv6 only?

    - by Ray Hoffman
    Could someone kindly provide a skeleton ifcfg-eth0:[X] for creating an alias with a IPv6 address and no IPv4 address? Or, alternatively, what's the IPv6 equivalent of this: in /etc/sysconfig/network-scripts/ifcfg-eth0:1 DEVICE=eth0:1 ONBOOT=yes BOOTPROTO=static IPADDR=42.69.66.66 NETMASK=255.255.255.0 Or does this not even make sense in IPv6 space? I know that I can use, for example: IPV6INIT=yes IPV6ADDR=2600:4200::6900:6666:dead:beef But then do I need to specify that there is no IPv4 address associated with this alias? If so, how? And do I need to also specify the IPV6_DEFAULTGW? Or can it piggyback on the eth0 (unaliased) gateway, which is specifed, like with IPv4 aliases? EDIT: Answered my own question! The easiest way to accomplish this seems to be not to create an alias as with IPV4, but to specify, for example, IPV6ADDR_SECONDARIES=2600:4200::6900:6666:dead:beef on the script for the base interface, e.g. ifcfg-eth0.

    Read the article

  • Looking to use .htaccess to create SEO friendly URLs

    - by Ray
    For SEO purposes, I need someone to modify my .htaccess file. Here's what I need to do: current URL: http://www.abc.com/index.php?page=show_type&ord=1 to new URL: http://www.abc.com/amazing Please note that that if someone types in http://www.abc.com/amazing, they must be served content from the current URL, but the new URL must stay in the address bar. I tried this and it didn't seem to work RewriteEngine On RewriteRule ^/?amazing/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/ /index.php?page=show_type&ord=1

    Read the article

  • Importing csv list of contacts into Exchange 2007 GAL and create Distribution Group

    - by Ken Ray
    Here's the situation: We have a list of about 1,000 contacts (Lawyers in the area our court serves) with name and email address. I've been asked to create an email distribution list that can be used to sent emails to all of the external users on that list. I've seen various articles using the Exchange Management Shell and the Import-csv command piped through a ForEach-Object to a New-MailContact to set up the contacts. However, Exchange Management Shell is rather unhelpful, and it isn't working. What I believe I need to do is: 1) Set up a new distribution group using the Exchange Management Console. Let's say this new distribution group (which appears in the list of Distribution Groups under Recipient Configuration) is called "FloridaBar". 2) Make sure I have a csv file of the information I want to import. 3) Open Exchange Management Shell, and enter the following command: Import-csv C:\filename.csv | ForEach-Object { New-MailContact -Name $."NameColumnName" -ExternalEmailAddress $."EmailAddressColumn" -org FloridaBar Now, creating 1,000+ contacts in active directory - I assume that shouldn't be an issue. Do I have the "-org" parm wrong? Do I need to spell out the complete organization unit name (my.domain.name/Users/FloridaBar)? Is there a better way of doing this? Thanks in advance Ken

    Read the article

  • How to run Event Viewer as another user?

    - by Ray Cheng
    I want to create a shortcut to run Windows Event Viewer as another user, but the following doesn't seem to work. Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Windows\System32>C:\Windows\System32\runas.exe /noprofile /user:domain\username "C:\Windows\system32\eventvwr.msc /s" Enter the password for domain\username: Attempting to start C:\Windows\system32\eventvwr.msc /s as user "dnr\adm_rche490" ... RUNAS ERROR: Unable to run - C:\Windows\system32\eventvwr.msc /s 193: C:\Windows\system32\eventvwr.msc /s is not a valid Win32 application. But if I create the shortcut without the runas part, it works but with the current logon user. What am I doing wrong?

    Read the article

  • Add a small RAID card? Will it help overall stability and performance of my nine hard drives?

    - by Ray
    Hi, Will I get any extra genuine added performance and RAID stability if I insert a basic RAID card into a PCI-E x1 slot? I am considering the Adaptec 1220SA - 2 port SATA , pci-express (1x) , raid 0/1. Ok it only supports two SATA drives. Purpose is to help support the eight internal hard drives (1TB each), a DVD drive and an external e-SATA connected 2TB hard drive - by dealing with two of the internal hard drives. My current configuration of eight internal 1TB Barracuda (7200.12) SATA hard drives, one external 2TB SATA Western Digital Green Drive (e-SATA) and one DVD drive can already be supported by the Intel P55 & JMicron controllers on the ASUS motherboard : the Intel P55 (controls six HDD; configured as three x RAID 1), and the JMicron (controls two HDD as one RAID 1, as well as the DVD drive and the external SATA drive via the motherboard's e-SATA port (controlled by the JMicron)). Bigger picture details : I have an ASUS motherboard designed for the LGA1156 type processor and it includes the Intel P55 Express Chipset and JMicron. I am using the Intel Core i7-870 processor, and have 8GB DDR3 (1333) memory (four x 2GB Corsair DIMMs). Enough overall power. The power supply is more than sufficicient for the system. Corsair AX850. The system will never need the full 850 watts (future : second graphics card). The RAID card would provide hardware RAID 1 for two of the eight intrnal drives. It would either reduce the load on : the Intel P55 firmware RAID support, or replace the JMicron controller's RAID 1 set. I am busy installing the above configuration using Windows 7 Ultimate 64-bit as the OS. The RAID card is a last minute addition to the plan. Is it worth spending the extra R700 - R900 on the Adaptec 1220SA, or equivalent RAID card? I cannot afford to spend yet another R2000 - R3000 on a RAID card that would support many SATA2 hard drives, with a better RAID, example the RAID 5. My Issue & assumption : I am trusting that the Intel P55 chipset can properly handle six drives, configured as three * RAID 1. I am assuming that the JMicron can handle, using its RED SATA ports, one RAID-1 (two HDDs). The DVD drive connects to the JMicron optical SATA port 1 (white port 1). White port 2 is not used. The e-SATA connection is from the JMicron straight to, and through the motherboard - to an on-board (rear panel) e-SATA port. Am I being a little hopeful in only using the on-board Intel P55 and the JMicron? Is it a waste of money to install a RAID card that handles two SATA2 drives? OR Is it wisdom to take the pressure a little off the Intel P55? Obviously I am interested in data security, hence RAID 1, not RAID Zero. RAID 5 would be nice. The CPU, Intel Core i7-870 will provide the clout. Context to nine drives : I am using virtualisation with Windows 7 Ultimate. Bootable VMs. The operating system gets a mirror. Loaded apps gets a mirror. The current design data is kept in another mirror and Another mirror is back-up one and / or VM territory. Then the external 2TB drive (via e-SATA) is the next layer of data security and then finally, I use off-site data security. Thanks.

    Read the article

  • Accessing Virtual Host from outside LAN

    - by Ray
    I'm setting up a web development platform that makes things as easy as possible to write and test all code on my local machine, and sync this with my web server. I setup several virtual hosts so that I can access my projects by typing in "project" instead of "localhost/project" as the URL. I also want to set this up so that I can access my projects from any network. I signed up for a DYNDNS URL that points to my computer's IP address. This worked great from anywhere before I setup the virtual hosts. Now when I try to access my projects by typing in my DYNDNS URL, I get the 403 Forbidden Error message, "You don't have permission to access / on this server." To setup my virtual hosts, I edited two files - hosts in the system32/drivers/etc folder, and httpd-vhosts.conf in the Apache folder of my WAMP installation. In the hosts file, I simply added the server name to associate with 127.0.0.1. I added the following to the http-vhosts.conf file: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot "c:/wamp/www/ladybug" ServerName ladybug ErrorLog "logs/your_own-error.log" CustomLog "logs/your_own-access.log" common </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot "c:/wamp/www" ServerName localhost ErrorLog "logs/localhost-error.log" CustomLog "logs/localhost-access.log" common </VirtualHost> Any idea why I can't access my projects from typing in my DYNDNS URL? Also, is it possible to setup virtual hosts so that when I type in http://projects from a random computer outside of my network, I access url.dyndns.info/projects (a.k.a. my WAMP projects on my home computer)? Help is much appreciated, thanks!

    Read the article

  • Excluding files from web logs

    - by Ray
    I originally tried this question on StackOverflow, but it was suggested that serverfault was a better choice. So, here it is... Looking through my web logs, I see a lot of entries that don't interest me. Some of them are commonly used images, css files, and scripts, which I can easily exclude by un-checking the 'log visits' check box in IIS for the folder properties. I would also like to exclude log entries for certain common requests which are not in their own folders. Mostly, 'favicon.ico'. 'scriptresource.axd', and 'webresource.axd'. These (especially scriptresource.axd) make up almost a third of a typical log file on my site. So, the question is, how do I tell IIS not to log these requests? And is there any reason that this is a bad idea? The purpose of doing this is to reduce the log file size and the amount of work the server has to do, to make the log file more manageable when I need to dig in to them for troubleshooting, and for my own curiosity. I realize that log file parsers can skip the junk, but I am interested in reducing the raw files, before parsing.

    Read the article

  • Spring-mvc project can't select from a particular mysql table

    - by Dan Ray
    I'm building a Spring-mvc project (using JPA and Hibernate for DB access) that is running just great locally, on my dev box, with a local MySQL database. Now I'm trying to put a snapshot up on a staging server for my client to play with, and I'm having trouble. Tomcat (after some wrestling) deploys my war file without complaint, and I can get some response from the application over the browser. When I hit my main page, which is behind Spring Security authentication, it redirects me to the login page, which works perfectly. I have Security configured to query the database for user details, and that works fine. In fact, a change to a password in the database is reflected in the behavior of the login form, so I'm confident it IS reaching the database and querying the user table. Once authenticated, we go to the first "real" page of the app, and I get a "data access failure" error. The server's console log gets this line (redacted): ERROR org.hibernate.util.JDBCExceptionReporter - SELECT command denied to user 'myDbUser'@'localhost' for table 'asset' However, if I go to MySQL from the shell using exactly the same creds, I have no problem at all selecting from the asset table: [development@tomcat01stg]$ mysql -u myDbUser -pmyDbPwd dbName ... mysql> \s -------------- mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using readline 5.1 Connection id: 199 Current database: dbName Current user: myDbUser@localhost ... UNIX socket: /var/lib/mysql/mysql.sock -------------- mysql> select count(*) from asset; +----------+ | count(*) | +----------+ | 19 | +----------+ 1 row in set (0.00 sec) I've broken down my MySQL access settings, cleaned out the user and re-run the grant commands, set up a version of the user from 'localhost' and another from '%', making sure to flush permissions.... Nothing is changing the behavior of this thing. What gives?

    Read the article

  • sox mix nested scripts on amazon ec2 rhel linux

    - by Ray
    I'm trying to use "sox" to mix some audio files. The command works great on my Mac terminal sox -m audio.wav "| sox upload.wav -p trim 2 1 pad 6" final.wav This mixes (not concatenate) audio.wav and a section of upload.wav from the 2nd second to the 3rd second and adds 6 seconds of padding in the front, and outputs to final.wav Now the problem is, the SAME EXACT command does NOT work my Amazon EC2 RHEL box. (sox is installed correctly). I get the following error sox soxio: Can't open input file `| sox upload.wav -p trim 2 2 pad 6': No such file or directory For some reason RedHat doesn't like the double quotes. Even though it is documented to be used this way. Thanks for your help!

    Read the article

  • iPhone always assigned wrong ip

    - by Ashley Ray
    for some reason most of the time my iPhone connects to the home network the ip address seems wrongly assigned as it 'loses connection' even even with strong reception. If I change the ip address to a static from 168.2.10 to 168.2.15 works fine until it appears to renew back to the prior. I am using a power-plug extender from the modem to router. Then have a laptop Printer playstation tv and another iPhone that always connect fine. The modem also has a crappy wireless which I haven't connected any devices to. I'm sure the forum will have a simple answer!

    Read the article

  • Seeking a solution to automatically copy files from the cd-rom disk to the USB drive once it's connected.

    - by Ray Nathan
    I plan to distribute a free CD that automatically copies files to a connected usb device. This process will be done on the computers of the users that obtain the cd. The CD will contain an autorun.ini file that will instruct the computer to copy a set of files located on the cd..to a specific directory on the connected usb device. The usb drive letter is not the same on all the systems, therefore...Windows XP should automatically know the drive letter of the usb device before the copy operation begins. What would be the best way of creating a short batch file or script that I can place on the CD to execute this process? Also, please note that it is NOT feasible or recommended to include a batch file on the USB devices to sync this operation due to the explanation at the beginning of this paragraph. :) Thank You All

    Read the article

  • HTTP 401 error in Windows Authentication disappears after swapping Providers

    - by Ray Cheng
    The IIS 7 on Windows 2008 R2 is acting really weird. We deploy our web apps as web sites with appcmd.exe. After they are deployed, if I browse to them, I'll get HTTP 401 errors. The web sites are only have Windows Authentication enabled and the providers are Negotiate and NTLM in such order. But if I swap the providers, the HTTP 401 error goes away. Even if I swap it back, the errors are still gone. So the order of the providers doesn't seem to matter, what matters is the swapping. It must have triggered something. Even if we delete the web site and application pool and reinstall the web sites, the errors are still gone. So far, we can't reproduce it easily since it happens randomly. Has anyone experienced this? How do I go about to troubleshoot it?

    Read the article

  • Outlook Registry Key Damaged; Tried "Fix It" and lost everything

    - by Ray
    My outlook 2007 (on Windows 7 64 bit) worked fine for two weeks. I then installed a printer/scanner/copier and the Outlook Window wouldn't open. I went to Microsoft's website and found a page that said my registry key was damaged. The page had a link to a Fix It program. I ran the program and it looks like all my Outlook data was wiped out. Can I get the data back? For future reference, how should I protect myself if the key goes bad again? Do you think I should unistall Outlook and re-install?

    Read the article

  • OWA 2003 404 error only for calender

    - by ray
    We have a exchange 2003 published through isa 2006 , for every user this is working fine except one who receives a 404 error every time they try and view details of the calender, I have cloned their account which work's fine. How do I troubleshoot or resolve this?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >