Search Results

Search found 533 results on 22 pages for 'anthony gatlin'.

Page 12/22 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Silverlight 4 Data Binding with anonymous types.

    - by Anthony
    Does anyone know if you can use data binding with anonymous types in Silverlight 4? I know you can't in previous versions of silverlight, you can only databind to public class properties and anonymous type properties are internal. Just wondering if anyone has tried it in silverlight 4? Thanks in advanced

    Read the article

  • PHP Scope Resolution Operator Question

    - by anthony
    I'm having trouble with the MyClass::function(); style of calling methods and can't figure out why. Here's an example (I'm using Kohana framework btw): class Test_Core { public $var1 = "lots of testing"; public function output() { $print_out = $this->var1; echo $print_out; } } I try to use the following to call it, but it returns $var1 as undefined: Test::output() However, this works fine: $test = new Test(); $test->output(); I generally use this style of calling objects as opposed to the "new Class" style, but I can't figure out why it doesn't want to work.

    Read the article

  • OSX: Why is GetProcessInformation() causing a segfault?

    - by anthony
    Here's my C method to get the pid of the Finder process. GetProcessInformation() is causing a segfault. Why? Here's the function: static OSStatus GetFinderPID(pid_t *pid) { ProcessSerialNumber psn = {kNoProcess, kNoProcess}; ProcessInfoRec info; OSStatus status = noErr; info.processInfoLength = sizeof(ProcessInfoRec); info.processName = nil; while (!status) { status = GetNextProcess(&psn); if (!status) { status = GetProcessInformation(&psn, &info); } if (!status && info.processType == 'FNDR' && info.processSignature == 'MACS') { return GetProcessPID(&psn, pid); } } return status; } Here's the backtrace: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000032aaaba7 0x00007fffffe00623 in __bzero () (gdb) bt #0 0x00007fffffe00623 in __bzero () #1 0x00007fff833adaed in CreateFSRef () #2 0x00007fff833ab53b in FSPathMakeRefInternal () #3 0x00007fff852fc32d in _CFGetFSRefFromURL () #4 0x00007fff852fbfe0 in CFURLGetFSRef () #5 0x00007fff85dd273f in GetProcessInformation () #6 0x0000000100000bef in GetFinderPID [inlined] () at /path/to/main.c:21

    Read the article

  • Java book for programmer with intermediate experience

    - by Anthony Forloney
    I am well aware of this previous question here and have heard great things about those books. I actually bought two of them, Effective Java and Java in a Nutshell as an early Christmas present. I am looking for a good Java book, or books, to further continue my understanding of Java from a recent college graduate point of view. I have learned Java in college and would consider it to be the language I am most comfortable with. Can anyone recommend a good "intermediate" Java book for a situation like mine? This question should be community, I just don't know how to migrate it. I apologize for any inconvenience. Thank you in advance.

    Read the article

  • C# dictionary uniqueness for sibling classes using IEquatable<T>

    - by anthony
    I would like to store insances of two classes in a dictionary structure and use IEquatable to determine uniqueness of these instances. Both of these classes share an (abstract) base class. Consider the following classes: abstract class Foo { ... } class SubFoo1 : Foo { ... } class SubFoo2 : Foo { ... } The dictionary will be delcared: Dictionary<Foo, Bar> Which classes should be declared as IEquatable? And what should the generic type T be for those declarations? Is this even possible?

    Read the article

  • WinForms binding

    - by Anthony
    I have some controls bound to a BindingSource control. I want to do a calculation when the value changes in one control and set the result on another control. Do i update the textbox the property is bound to or do i update the underlying entity which would update the control anyway(i hope)? When i change textbox A...textbox B is updated with the new calculated result..this works fine...but i have noticed that when i Leave textbox A..textbox B reverts back to its original value...what is going on here!

    Read the article

  • Problem retrieving Hostaddress from Win32_TCPIPPrinterPort

    - by Anthony
    I'm running into an odd issue retrieving printer port addresses. When I get all the entries in Win32_TCPIPPrinterPort, the HostAddress field (which should have the IP address) is usually blank/null, only the port name has a value. To make it a bit stranger, if a particular port is not in use by any printer, THEN the HostAddress will have the the proper value. The C# code is simple, and results in something like this; IP_192.168.1.100, printerportxyz, richTextBox1.Clear(); ManagementObjectSearcher portSearcher = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_TCPIPPrinterPort"); foreach (ManagementObject port in portSearcher.Get()) { richTextBox1.AppendText( String.Format("Name: {0} HostAddress: {1}", port["Name"], port["HostAddress"]) ); } I also tried the same thing in WSH/VBS, and saw the same behavior.

    Read the article

  • Downloading a Directory Tree with FTPLIB

    - by Anthony Lemmer
    I'd like to download a directory and all of its contents to the local HD. Here's the code I have thus far (crashes if there's a sub-directory, else grabs all the files): import ftplib import configparser import os def runBackups(): #Load INI filename = 'connections.ini' config = configparser.SafeConfigParser() config.read(filename) connections = config.sections() i = 0 while i < len(connections): #Load Settings uri = config.get(connections[i], "uri") username = config.get(connections[i], "username") password = config.get(connections[i], "password") backupPath = config.get(connections[i], "backuppath") archiveTo = config.get(connections[i], "archiveto") #Start Back-ups ftp = ftplib.FTP(uri) ftp.login(username, password) ftp.set_debuglevel(2) ftp.cwd(backupPath) files = ftp.nlst() for filename in files: ftp.retrbinary('RETR %s' % filename, open(os.path.join(archiveTo, filename), 'wb').write) ftp.quit() i += 1 print() print("Back-ups complete.") print()

    Read the article

  • killBackgroundProcesses does not work on SETTINGS?

    - by Anthony
    I want to kill the background process of SETTINGS by using killBackgroundProcesses. But it does not work without any errors? I use API(8) level 2.2 and having KILL_BACKGROUND_PROCESSES permission in manifest. ActivityManager activityManager = (ActivityManager)getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE); activityManager.killBackgroundProcesses("com.android.settings"); "com.android.settings" is checked by getPackageName of getRunningTasks in ActivityManager.

    Read the article

  • how to verify browser IP for server-side web service

    - by Anthony
    I have a web service that needs to be able to verify the end-user's IP that called the server-script that is requesting the web service. Simple layout: Person A goes to Webpage B. Webpage B calls Web Service C to get some info on Person A. Web Service C won't give Webpage B the requested information without confirmation that the request originated from Person A's IP and not someone who has stolen Person A's session. I'm thinking that for a browser-based solution, the original site (Webpage B) can open an iframe that goes to the Web Service's authentication page. A key of some kind is passed to the browser which will some how indicate both the user's IP and Web Page B's IP, so that the Web Service can confirm that no one has nabbed anything. I have two challenges, but I'll stick to the more immediate one first: I'm not sure if my browser-based plan really makes sense. If someone steals the session cookie, how is the Web Service going to know? Would this cookie be held be Web Page B and thus be harder to steal? Is it a sound assumption that a cookie or key held by the server only and not the browser is safe? Also, would the web service, based on the iframe initial connection, be expecting the server/user-ip combo? What I mean is, does the session key provided via the iframe get stored by the web service and the Web Site B shows it has a match? Or is the session key more generic, meaning the web service is passed the key by Website B and the Web Service verifies that this is a valid session key based on what a valid session key should look like?

    Read the article

  • Native (non-jqueryui) way to set prompt() input field inline.

    - by Anthony
    I might just be using the wrong keywords on Google, but what I have in mind is: -------------------------------- | What is your mailbox? | | | | [ ]@mail.example.org | | | | [OK] [Cancel] | -------------------------------- The idea being that the input field is followed right behind by the mail server name, to help avoid instances where: If I don't make it follow right behind, the user puts in the whole thing, If I default it to "[email protected]" they delete the server name. In either case, it's not too big a deal, as I will know that if the returned value does have the server, to remove it and if doesn't, I know what server it belongs to, but I think this visual aid will be a better user experience and lower the amount of validation worries I tend to get.

    Read the article

  • Handling changes in an interface shared across multiple solutions?

    - by Anthony Mastrean
    Our "main" solution is the development code: shared libraries, services, UI projects, etc. The other solution is an integration and automated tests solution. It references several of the development projects. The reason it is separate is to avoid interference with the development solution's unit test VSMDI file. And to allow us to play with different execution methods (other test runners, like Gallio or StoryTeller) without interfering with the development solution. Recently, an interface changed in the development solution, one of our test mocks implemented that interface. But, it was not updated because there was no warning at compile time because it was in another solution. This broke our CI build. Does anyone have a similar setup? How do you handle these issues, do you follow a strict procedure or is there some kind of technical answer?

    Read the article

  • Why is my iPhone SDK 3.2 iPad code showing a white screen?

    - by Anthony Glyadchenko
    I'm trying to get a UISplitViewController working with an iPad app. I have the table view controller linked up under the Master pane and a plain UIView under the Detail view. I also have [window addSubview:splitView.view]; in my code. For some reason I just get a white screen even though the table view controller code is properly coded and linked under my nib. Any help would be great! Thanks! Here's where you can find the code: http://drop.io/s28bu4t/asset/mydevice-hd-zip

    Read the article

  • Compiler issues on VC++ 2008 Express, Seemingly correct code throws errors.

    - by Anthony Clever
    Hi there, I've been trying to get back into coding for a while, so I figured I'd start with some simple SDL, now, without the file i/o, this compiles fine, but when I throw in the stdio code, it starts throwing errors. This I'm not sure about, I don't see any problem with the code itself, however, like I said, I might as well be a newbie, and figured I'd come here to get someone with a little more experience with this type of thing to look at it. I guess my question boils down to: "Why doesn't this compile under Microsoft's Visual C++ 2008 Express?" I've attached the error log at the bottom of the code snippet. Thanks in advance for any help. #include "SDL/SDL.h" #include "stdio.h" int main(int argc, char *argv[]) { FILE *stderr; FILE *stdout; stderr = fopen("stderr", "wb"); stdout = fopen("stdout", "wb"); SDL_Init(SDL_INIT_EVERYTHING); fprintf(stdout, "SDL INITIALIZED SUCCESSFULLY\n"); SDL_Quit(); fprintf(stderr, "SDL QUIT.\n"); fclose(stderr); fclose(stdout); return 0; } /* 1>------ Build started: Project: opengl_crap, Configuration: Debug Win32 ------ 1>Compiling... 1>main.cpp 1>c:\documents and settings\owner\my documents\visual studio 2008\projects\opengl_crap\opengl_crap\main.cpp(6) : error C2090: function returns array 1>c:\documents and settings\owner\my documents\visual studio 2008\projects\opengl_crap\opengl_crap\main.cpp(6) : error C2528: '__iob_func' : pointer to reference is illegal 1>c:\documents and settings\owner\my documents\visual studio 2008\projects\opengl_crap\opengl_crap\main.cpp(6) : error C2556: 'FILE ***__iob_func(void)' : overloaded function differs only by return type from 'FILE *__iob_func(void)' 1> c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(132) : see declaration of '__iob_func' 1>c:\documents and settings\owner\my documents\visual studio 2008\projects\opengl_crap\opengl_crap\main.cpp(7) : error C2090: function returns array 1>c:\documents and settings\owner\my documents\visual studio 2008\projects\opengl_crap\opengl_crap\main.cpp(7) : error C2528: '__iob_func' : pointer to reference is illegal 1>c:\documents and settings\owner\my documents\visual studio 2008\projects\opengl_crap\opengl_crap\main.cpp(9) : error C2440: '=' : cannot convert from 'FILE *' to 'FILE ***' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\documents and settings\owner\my documents\visual studio 2008\projects\opengl_crap\opengl_crap\main.cpp(10) : error C2440: '=' : cannot convert from 'FILE *' to 'FILE ***' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\documents and settings\owner\my documents\visual studio 2008\projects\opengl_crap\opengl_crap\main.cpp(13) : error C2664: 'fprintf' : cannot convert parameter 1 from 'FILE ***' to 'FILE *' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\documents and settings\owner\my documents\visual studio 2008\projects\opengl_crap\opengl_crap\main.cpp(15) : error C2664: 'fprintf' : cannot convert parameter 1 from 'FILE ***' to 'FILE *' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\documents and settings\owner\my documents\visual studio 2008\projects\opengl_crap\opengl_crap\main.cpp(17) : error C2664: 'fclose' : cannot convert parameter 1 from 'FILE ***' to 'FILE *' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\documents and settings\owner\my documents\visual studio 2008\projects\opengl_crap\opengl_crap\main.cpp(18) : error C2664: 'fclose' : cannot convert parameter 1 from 'FILE ***' to 'FILE *' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>Build log was saved at "file://c:\Documents and Settings\Owner\My Documents\Visual Studio 2008\Projects\opengl_crap\opengl_crap\Debug\BuildLog.htm" 1>opengl_crap - 11 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== */

    Read the article

  • Reflow PDFs for an iPhone screen (iPhone SDK)

    - by Anthony Glyadchenko
    I'm currently making an iPhone app that has PDF viewing a crucial part of its functionality. However many of the PDFs aren't iPhone friendly and require zooming and panning to read them. Is there anything I can do to make them better whether with the PDF itself or programmatically? (I'm currently using a UIWebView PDF viewer by the way.)

    Read the article

  • LINQ to Objects .Distinct() not pulling distinct objects

    - by Anthony Potts
    I have two ways that I am doing a fuzzy search for a customer. One is by an abbreviated name and the other is by the customers full name. When I take these two and then union them together (which I have read several places should remove distinct values) I get duplicates. Thinking that all I need to do is then call the .Distinct() method on this I also still get Duplicates. Do I need to implement some compare functionality in my customer object? My code: Dim shortNameMatch As List(Of ICustomer) = CustomerLibrary.GetCustomersByShortName(term) Dim custNameMatch As List(Of ICustomer) = CustomerLibrary.GetCustomersByCustName(term) Dim allMatch = (From a In (From s In shortNameMatch Select s).Union(From c In custNameMatch Select c) Select a).Distinct()

    Read the article

  • What are your thoughts on a possible Developer's Television Network?

    - by Anthony Forloney
    I am a huge fan of informational television shows. Anytime I can learn something new by watching a television show, I am all for it. I wondered about how the community felt about a Developer Network for developers. What are the added advantages and disadvantages of having such a TV network? As an added bonus, what type of television shows should be aired on the network? Make up some fun and interesting television shows and elaborate. Also, for each television show, who could be a potential host? Jon Skeet for a C# television show? Phil Haack for an ASP.NET television show? I am looking forward to some interesting responses.

    Read the article

  • faster way to change xml to array(grails to flex)

    - by Anthony Umpad
    I have a large xml passed from grails to flex. When flex receives the xml, it converts the xml into an associative array object. Given the large xml file, it takes too long to complete the loop, is there any way in flex to make conversion faster? Below is my sample code. <xml> <car> <model>Vios</model> <type>Sedan</type> <color>Blue</color> </car> <car> <model>Camry</model> <type>Luxury</type> <color>Black</color> </car> </xml> *converted to the flex associative array below.* [Vios].type = Sedan .color = Blue [Camry].type = Luxury .color = Black *Below is a code I used in flex to convert the xml to the associative array object* var tempXML=xml.children() var tempArray:Array= new Array() for(var i:int=0;i<tempXML.length();i++) { tempArray[tempXML[i].@model]= new Object(); tempArray[tempXML[i].@model].color = tempXML[i][email protected](); tempArray[tempXML[i].@model].type = tempXML[i][email protected](); }

    Read the article

  • Storing Arbitrary Contact Information in Ruby on Rails

    - by Anthony Chivetta
    Hi, I am currently working on a Ruby on Rails app which will function in some ways like a site-specific social networking site. As part of this, each user on the site will have a profile where they can fill in their contact information (phone numbers, addresses, email addresses, employer, etc.). A simple solution to modeling this would be to have a database column per piece of information I allow users to enter. However, this seems arbitrary and limited. Further, to support allowing users to enter as many phone numbers as they would like requires the addition of another database table and joins. It seems to me that a better solution would be to serialize all the contact information entered by a user into a single field in their row. Since I will never be conditioning a SQL query on this information, such a solution wouldn't be any less efficient. Ideally, I would like to use a vCard as my serialization format. vCards are the standard solution to storing contact information across the web, and reusing tested solutions is a Good Thing. Alternative serialization formats would include simply marshaling a ruby hash, or YAML. Regardless of serialization format, supporting the reading and updating of this information in a rails-like way seems to be a major implementation challenge. So, here's the question: Has anyone seen this approach used in a rails application? Are there any rails plugins or gems that make such a system easy to implement? Ideally what I would like is an acts_as_vcard to add to my model object that would handle editing the vcard for me and saving it back to the database.

    Read the article

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