Daily Archives

Articles indexed Saturday May 22 2010

Page 7/81 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How do I make an NSView move to the front of all NSViews

    - by Dhanaraj
    Hi, I have a super view, which has 2 subviews. These subviews are overlapped. Whenever i choose a view from a menu, corresponding view should become the front view. i.e., it should be the font most subview. acceptsFirswtResponder, resigns all work fine. But the mouse down events are sent to the topmost sub view which was set. Regards, Dhana

    Read the article

  • incorrect password when computer is locked

    - by cyntaxx
    Hi there, I have running a Windows XP SP3 Machine and I can't login after I have locked my Workstation. I changed my password and installed last Updates from Microsoft last Friday. When Windows comes up, there is no problem to login. But after I locked it, it tells me that my password is wrong. I pushed the client again into the domain, but doesn't help. Thanks, cyntaxx

    Read the article

  • Password Recovery

    - by Terry
    Currently we use Offline NT Password & Registry Editor for machines we do not have admin passwords for. It is a really nice tool but has some flaws. Is there something better/more modern?

    Read the article

  • Is there a better way to write this .htaccess directive?

    - by Bill H
    I want all css, javascript, and image file requests, that are named like this "filename.12345.css" to be re-routed to "filename.css". The ".12345" part will always be numbers and the length can be anywhere from 11 - 15 characters. This directive seems to work OK but I want to make sure there is no error in my logic. RewriteRule ^(.+)\.(.+)\.(js|css|jpg|gif|png)$ $1.$3 Any help would be greatly

    Read the article

  • problem with application after moving from local to hosting server

    - by marcin_koss
    I have an application developed with CodeIgniter that works perfectly on my local server. After uploading it to the hosting server I've run into few issues that I can't figure out. I removed the index.php from URL by changing $config['index_page'] = "" in config.php file and adding rewriterule in .htaccess file. Everything worked fine on a local server. On hosting server the webstie wouldn't load until I reverted those changes to defaults. Now the strangest thing. I test the website and all pages load fine except of one. When I point to that page the browser responds with "Connection closed by remote server" (That's from Opera, other browser gave similar response). After closing the browser when I try to load the website again, now it won't even load any page showing me CodeIgniter's styled error "404 Page Not Found" What he heck?

    Read the article

  • are margin and padding most disbalanced thing among all browser?

    - by metal-gear-solid
    While some people use this reset. * { margin: 0; padding: 0; } Is every element has default margin and padding in each browser default stylesheet( but differently)? While eric meyer collected some most used selectors and given this to all { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; } Are those elements has different type of font sizes? different baseline, different background, outline and border? if we keep besides cons of universal selector. is this * { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; } better than this * { margin: 0; padding: 0; }

    Read the article

  • Create variables for unknown amount of arguments?

    - by user347600
    Working on an rsync script and the portion below is in a for loop. What I want to achieve is assign a variable to every arguement after 3. Just confused if I need to create another loop for that or not: #1: name name=$1 #2: ip ip=$2 #3: user user=$3 #4+: folder exlusion #any lines higher than 3 will be created as exlcude folders ex[ARG_NUMBER]=

    Read the article

  • Unit testing UDP socket handling code

    - by JustJeff
    Are there any 'good' ways to cause a thread waiting on a recvfrom() call to become unblocked and return with an error? The motivation for this is to write unit tests for a system which includes a unit that reads UDP datagrams. One of the branches handles errors on the recvfrom call itself. The code isn't required to distinguish between different types of errors, it just has to set a flag. I've thought of closing the socket from another thread, or do a shutdown on it, to cause recvfrom to return with an error, but this seems a bit heavy handed. I've seen mention elsewhere that sending an over-sized packet would do it, and so set up an experiment where a 16K buffer was sent to a recvfrom waiting for just 4K, but that didn't result in an error. The recvfrom just return 4096, to indicate it had gotten that many bytes.

    Read the article

  • LDAP over SSL/TLS working for everything but login on Ubuntu

    - by Oliver Nelson
    I have gotten OpenLDAP with SSL working on a test box with a signed certificate. I can use an LDAP tool on a Windows box to view the LDAP over SSL (port 636). But when I run dpkg-reconfigure ldap-auth-config to setup my local login to use ldaps, my login under a username in the directory doesn't work. If I change the config to use just plain ldap (port 389) it works just fine (I can login under a username in the directory). When its setup for ldaps I get Auth.log shows: Sep 5 13:48:27 boromir sshd[13453]: pam_ldap: ldap_simple_bind Can't contact LDAP server Sep 5 13:48:27 boromir sshd[13453]: pam_ldap: reconnecting to LDAP server... Sep 5 13:48:27 boromir sshd[13453]: pam_ldap: ldap_simple_bind Can't contact LDAP server I will provide whatever are needed. I'm not sure what else to include. Thanx for any insights... OLIVER

    Read the article

  • Un SDK permet de développer des applications iPhone sous Windows, utiliserez-vous cet outil ?

    Mise à jour du 21.05.2010 par Katleen Un SDK permet de développer des applications iPhone sous Windows, utiliserez-vous cet outil ? Zimusoft vient de sortir un SDK pour iPhone qui émule un programme iPhone sur Windows. En effet, le SDK officiel d'Apple n'est compatible qu'avec les produits de la firme ; et force de plus les développeurs à utiliser le langage Objective-C (une variante de C++ connue d'une poignée de programmeurs seulement). Zimusoft indique qu'environ 80% des développeurs ne programment que sur Windows et qu'ils ne savent pas utiliser Objective-C. Voilà pourquoi il propose DragonFireSDK, qui offre un simulateur d'iPhone sur l'écran de l'ordinateur pour aider ses utilisat...

    Read the article

  • merging javascript arrays for json

    - by Nat
    I serially collect information from forms into arrays like so: list = {"name" : "John", "email" : "[email protected]", "country" : "Canada", "color" : "blue"}; identifier = "first_round"; list = {"name" : "Harry", "email" : "[email protected]", "country" : "Germany"}; identifier = "second_round"; I want to combine them into something (I may have braces where I need brackets) like: list_all = { "first_round" : {"name" : "John", "email" : "[email protected]", "country" : "Canada", "color" : "blue"} , "second_round" : {"name" : "Harry", "email" : "[email protected]", "country" : "Germany"} }; so I can access them like: alert(list_all.first_round.name) -> John (Note: the name-values ("name", "email", "color") in the two list-arrays are not quite the same, the number of items in each list-array is limited but not known in advance; I need to serially add only one array to the previous structure each round and there may be any number of rounds, i.e. "third-round" : {...}, "fourth-round" : {...} and so on.) Ultimately, I'd like it to be well-parsed for JSON. I use the jquery library, if that helps.

    Read the article

  • Should I use a global var or call the function every time? C++

    - by extintor
    Im using: bool GetOS(LPTSTR pszOS) { OSVERSIONINFOEX osve; BOOL bOsVersionInfoEx; ZeroMemory(&osve, sizeof(OSVERSIONINFOEX)); osve.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); if( !(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osve)) ) return false; TCHAR buf[80]; StringCchPrintf( buf, 80, TEXT("%u.%u.%u.%u"), osve.dwPlatformId, osve.dwMajorVersion, osve.dwMinorVersion, osve.dwBuildNumber); StringCchCat(pszOS, BUFSIZE, buf); return true; } to get the windows version, and I am planning to use pszOS every a few minutes, Should I use pszOS as a global var or call GetOS() every time? What's the best option from a performance point of view.

    Read the article

  • Accessory view in UITableView: view doesn't update

    - by Kamchatka
    I'm trying to add checkmarks to items when the user select rows in a table view. However, the view is not refreshed and the checkmarks do no show up: - (void)tableView:(UITableView *)tv didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell* oldCell = [self tableView:tv cellForRowAtIndexPath:[NSIndexPath indexPathForRow:selectedIndex inSection:0]]; oldCell.accessoryType = UITableViewCellAccessoryNone; if (indexPath.section == 0) { selectedIndex = indexPath.row; } UITableViewCell* newCell = [self tableView:tv cellForRowAtIndexPath:indexPath]; newCell.accessoryType = UITableViewCellAccessoryCheckmark; [tv deselectRowAtIndexPath:indexPath animated:NO]; } What could be a reason for that?

    Read the article

  • How to implement a custom cell renderer for ScrollTable in GWT

    - by tronda
    I've used the ScrollTable widget for GWT and I have a need for a custom cell renderer so I can isolate this code from the rest of the app. I would like to use generics if possible to get it type safe. This cell renderer will take a long as a value and do some calculation before displaying the result. Anyone having a good example on how to implement such a custom renderer?

    Read the article

  • Unix Sockets in Go

    - by marketer
    I'm trying to make a simple echo client and server that uses Unix sockets. In this example, the server can receive data from the client, but it can't send the data back. If I use tcp connections instead, it works great: Server package main import "net" import "fmt" func echoServer(c net.Conn) { for { buf := make([]byte, 512) nr, err := c.Read(buf) if err != nil { return } data := buf[0:nr] fmt.Printf("Received: %v", string(data)) _, err = c.Write(data) if err != nil { panic("Write: " + err.String()) } } } func main() { l, err := net.Listen("unix", "/tmp/echo.sock") if err != nil { println("listen error", err.String()) return } for { fd, err := l.Accept() if err != nil { println("accept error", err.String()) return } go echoServer(fd) } } Client package main import "net" import "time" func main() { c,err := net.Dial("unix","", "/tmp/echo.sock") if err != nil { panic(err.String()) } for { _,err := c.Write([]byte("hi\n")) if err != nil { println(err.String()) } time.Sleep(1e9) } }

    Read the article

  • MVVM && IOC && Sub-ViewModels

    - by Lee Treveil
    I have a ViewModel, it takes two parameters in the constructor that are of the same type: public class CustomerComparerViewModel { public CustomerComparerViewModel(CustomerViewModel customerViewModel1, CustomerViewModel customerViewModel2) { } } public class CustomerViewModel { public string FirstName { get; set; } public string LastName { get; set; } } If I wasn't using IOC I could just new up the viewmodel and pass the sub-viewmodels in. I could package the two viewmodels into one class and pass that into the constructor but if I had another viewmodel that only needed one CustomerViewModel I would need to pass in something that the viewmodel does not need. How do I go about dealing with this using IOC? I'm using Ninject btw. Thanks

    Read the article

  • Retrieve position of a google maps v3 marker to Qt in a desktop app with QtWebKit

    - by nelas
    I'm building a Qt app with Python where you can point and click at a (google) map and get the coordinates of the location. The map is shown through a QWebView loading a simple HTML page and the user can create markers by clicking. Screenshot of the widget after clicking on the map: However, I'm having trouble to retrieve the just-clicked location coordinates back to Qt (so that I can use them as variables -- and, for example, show them in the QLineEdits on the topleft corner above, as current location of the marker). This is the relevant part of the HTML file: <script type="text/javascript"> var map; function initialize() { var local = new google.maps.LatLng(-23.4,-40.3); var myOptions = { zoom: 5, center: local, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); google.maps.event.addListener(map, 'rightclick', function(event) { placeMarker(event.latLng); }); } function placeMarker(location) { var clickedLocation = new google.maps.LatLng(location); var marker = new google.maps.Marker({ position: location, map: map }); map.setCenter(location); } function dummyTxt() { return 'This works.'; } </script> I've been trying with evaluateJavaScript, but was not able to retrieve the coordinates. I tried to created a function to access the position with marker.getPosition(), but with no luck. The dummy below works though.. newplace = QWebView.page().mainFrame().evaluateJavaScript(QString('dummyTxt()')) >>> print newplace.toString() This works. Any suggestions on how to get the coordinates back to Qt?

    Read the article

  • Using a FormattedText object, how do I find out how much of my text was actually displayed?

    - by Robert
    If I have code like this: FormattedText text = new FormattedText(sTheBook, System.Globalization.CultureInfo.CurrentUICulture, System.Windows.FlowDirection.LeftToRight, new Typeface("Times New Roman"), 13, Brushes.Black); text.MaxTextWidth = 300; text.MaxTextHeight = 600; text.TextAlignment = TextAlignment.Justify; dc.DrawText(text, new Point(10, 0)); ...then, if it is long, only some of the text that I passed in (via sTheBook) will be displayed on the screen. I need to know how much was displayed so I can display the rest later! I can easily measure an amount of text, but it seems silly to do a search by rendering and re-rendering my text over and over until I find the piece that fits exactly. Thanks!

    Read the article

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