Search Results

Search found 3516 results on 141 pages for 'chris hopkins'.

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

  • loading data from file into 2d array

    - by Chris
    I am just starting with perl and would like some help with arrays please. I am reading lines from a data file and splitting the line into fields: open (INFILE, $infile); do { my $linedata = <INFILE>; my @data= split ',',$linedata; .... } until eof; I then want to store the individual field values (in @data) in and array so that the array looks like the input data file ie, the first "row" of the array contains the first line of data from INFILE etc. Each line of data from the infile contains 4 values, x,y,z and w and once the data are all in the array, I have to pass the array into another program which reads the x,y,z,w and displays the w value on a screen at the point determined by the x,y,z value. I can not pas the data to the other program on a row-by-row basis as the program expects the data to in a 2d matrtix format. Any help greatly appreciated. Chris

    Read the article

  • ::LookupAccountSid API Extremely Slow When Targetting x64 Platform (Windows 7)

    - by Chris
    During our application startup, we are making a call to ::LookupAccountSid(). When I build targetting the x86 architecture, this call is nearly instantaneous. However, when I target x64 (debug or release), the call generally takes over 40s to complete. Since this is occurring during application startup, the result is fairly unpleasant as it will appear to the user that the application is not launching. I am running Windows 7 Professional 64-bit on a Dell Studio XPS 16 (Intel Core i7 Q 720). Our application is a native Windows application written in C++. My compiler options (CCOPTS) and linker options (LINKOPTS) are as follows: CCOPTS = "/nologo /Gz /W3 /EHs /c /DWIN32 /D_MBCS /Ob1 /vmg /vmv /Zi /MD /DNDEBUG /DDV_BUILD_DLL /DIV_BUILD_DLL /DDVASSERT_EXCEPTION /Zc:wchar_t-" LINKOPTS = "/manifest:no /nologo /machine:X64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /DEBUG /subsystem:windows /DLL" Any help would be greatly appreciated :D Thanks, --Chris

    Read the article

  • How to make Spring accept non-void setters?

    - by Chris
    Hi, I have an API which I am turning into an internal DSL. As such, most methods in my PoJos return a reference to this so that I can chain methods together declaratively as such (syntactic sugar). myComponent .setID("MyId") .setProperty("One","1") .setProperty("Two","2") .setAssociation(anotherComponent) .execute(); My API does not depend on Spring but I wish to make it 'Spring-Friendly' by being PoJo friendly with zero argument constructors, getters and setters. The problem is that Spring seems to not detect my setter methods when I have a non-void return type. The return type of this is very convenient when chaining together my commands so I don't want to destroy my programmatic API just be to compatible with Spring injection. Is there a setting in Spring to allow me to use non-void setters? Chris

    Read the article

  • ASP.NET - Display Message While Page Is Loading

    - by Chris
    I have a page that performs a long-running task (10 to 15 seconds) in the page_load method. I have client-side javascript code that will display a decent "page loading" animated gif to the user. I am able to invoke the JavaScript method from the code-behind, to display the "page loading" animated gif, however, the long-running task is hanging up the UI such that the animated gif doesn't actually display until after the long-running task is complete, which is the exact opposite of what I want. To test this out, in my page_load method I make a call to the JavaScript method to display the animated gif. Then, I use Thread.Sleep(10000). What happens is that the animated gif doesn't display until after Thread.Sleep is complete. Obviously I am doing something incorrect. Any advice would be appreciated. Thanks. Chris

    Read the article

  • What to name an array of flags?

    - by Chris
    I have a project where lots of the objects hold state by maintaining simple boolean flags. There are lots of these, so I maintain them within a uint32_t and use bit masking. There are now so many flags to keep track of, I've created an abstraction for them (just a class wrapping the uint32_t) with set(), clear(), etc. My question: What's a nice accurate, concise name for this class? What name could I give this class so that you'd have a reasonable idea what it was [for] knowing the name only? Some ideas I had: FlagBank FlagArray etc Any ideas? Thanks in advance! Cheers, -Chris

    Read the article

  • Android - When to use Service

    - by Chris
    This question is related to my previous question: http://stackoverflow.com/questions/2786720/android-service-ping-url So I have an Android app that on the click of a button, opens up a web page. Now, in the background I want to call another http url for gathering stats. My question is does this have to be a service? I know a service is for background tasks that run for an indefinite period of time, while the user is busy doing something else. In my case, all I really need is to get the URL in the background, not show it to the user, instead show the web page to the user. Can I just not write code to get contents of the http url and fire up the activity that displays the web page? Coz all I want is to get the url in the background and be done with it. Or does this have to be done using the Service class? I am confused. Thanks Chris

    Read the article

  • Node.js mongoose: how to use the .in and .sort methods of a query?

    - by Chris
    Hi there, I'm trying to wrap my head around mongoose, but I'm having a hard time finding any kind of documentation for some of the more advanced query options, specifically the .in and .sort methods. What's the syntax for sorting, for example, a Person by age? db.model("Person").find().sort(???).all(function(people) { }); Then, let's say I want to find a Movie based on a genre, where a Movie can have many genres (in this case, an array of strings). Presumably, I'd use the .in function to accomplish that, but I'm not sure what the syntax would be. Or perhaps I don't have to use the .in method at all...? Either way, I'm lost. db.model("Movie").find().in(???).all(function(movies) { }); Anyone have any ideas? Or even better, a link to some comprehensive documentation? Thanks! Chris

    Read the article

  • http/html/ajax: show result before site is completely processed

    - by chris
    hi! I am looking for a way to show in a webapp in front of a task a wait-message and after it hide the message. The task is running a longer time. I dont know if it is possible at all. The problem is, so far I can see, that the site will be returned to the users browser AFTER the task is completed because the task is part of the site as a inline code replaces by the webserver interpreter (no matter if php, perl or whatever). The only solution I can imagine is to parallel the task with threads or processes and requery the state with ajax in the website. Any idea to do it less complex? Thanks for help! regards chris

    Read the article

  • Purchase music from iTunes store without leaving app?

    - by chris.o.
    Hi all, Is anyone aware of a standard way of allowing a user to purchase music from the app store without leaving the app? For instance, if a band has an album for sale on iTunes and then releases an iPhone game featuring the band members, is there a "standard way" to allow the user to buy songs without leaving the app? From what I can tell, there is not and, given that in the example above, the album is not content specifically for the app, it would not qualify for In-App purchase. Any suggestions? Thanks, Chris

    Read the article

  • Open GL ES 2.0 co-ordinate systems

    - by Chris
    Hi, I want to use Open GL ES 2.0 for a new game, but I have two questions. Q: The first is how do I set up perspective views in Open GL ES 2.0 - do I need to include Open GL ES 1.0 and use glOrtho, or is there a new way? Q: I want to use the 4th quadrant of a Cartesian co-ordinate system for my game and not use -0.5 to +0.5 for values on screen, how once the first question is answered can I achieve this? Other resources: http://iphonedevelopment.blogspot.com/2009/04/opengl-es-from-ground-up-part-3.html Thanks Chris

    Read the article

  • NoSql Crash Course/Tutorial

    - by Chris Thompson
    Hi all, I've seen NoSQL pop up quite a bit on SO and I have a solid understanding of why you would use it (from here, Wikipedia, etc). This could be due to the lack of concrete and uniform definition of what it is (more of a paradigm than concrete implementation), but I'm struggling to wrap my head around how I would go about designing a system that would use it or how I would implement it in my system. I'm really stuck in a relational-db mindset thinking of things in terms of tables and joins... At any rate, does anybody know of a crash course/tutorial on a system that would use it (kind of a "hello world" for a NoSQL-based system) or a tutorial that takes an existing "Hello World" app based on SQL and converts it to NoSQL (not necessarily in code, but just a high-level explanation). I see this having one solid answer, but if you guys feel like it should be community wiki, I'll be happy to change it. Thanks! Chris

    Read the article

  • Resources check

    - by Chris
    hey I am frequently uploading my XCode iPhone projects to an svn repository to be build on another machine. My problem is that when I add resources to my project sometimes I forget to add the resource as relative to the project. I know one answer is to be more careful (not easy when your tired!) but if there was a way to run a script to check my resource paths are relative when I build and warn me if they are not it would be a great time saver for me. How would I go about doing this? Thanks Chris

    Read the article

  • JDT: How to retrieve the correct IJavaElement to a corresponding RefactoringDescriptor?

    - by Chris
    I implement the IRefactoringExecutionListener interface in an Eclipse plug-in to get notified when the user refactors his code, so I can update a visual editor displaying corresponding UML Boxes accordingly. Now I have a RefactoringDescriptor and cannot manage to map it's information (project name as String, new name as String and resource path as IPath) to my model. My model is basically a Hashmap in which fully qualified names (String) of types are mapped instances of IJavaElement, or more precisely: IType. How can I "convert" between the two representations so I can update my model? Regards, Chris

    Read the article

  • Android - Video Restart or Resume

    - by Chris
    Hi everyone, I am writing a simple android application with a class that extends activity, that plays a video from a url on the web. There is a button on top that on click takes the user to a web page. What I want to do is when the user is browsing the web page, if he hits the back button, I want him to come back to the main activity and restart the video. Is there a way to do this? Also, is there a way the video can be resumed from where it left off? Thank you. Chris

    Read the article

  • .Net C#: support differnt Office versions

    - by Chris
    We created an application that uses Office 2007 (Excel 2007) to read in data from an Excel worksheet. However. I noticed that when I want to deploy the application on a system with Office 2003 installed, it crashes because other PIA's (and other dll's) need to be referenced for this version of office. Do I need to compile different versions of my application to be able to support different versions of Office or is there a more ellegant solution for this problem? I use Visual Studio 2010 (C#) and the .Net 4.0 platform. Many thanks Chris

    Read the article

  • Integration (math) in C++

    - by Chris Thompson
    Hi all, I'm looking for a library to find the integral of a given set of random data (rather than a function) in C++ (or C, but preferably C++). There is another question asking about integration in C but the answers discuss more how to integrate a function (I think...). I understand that this can be done simply by calculating the area under the line segment between each pair of points from start to finish, but I'd rather not reinvent the wheel if this has already been done. I apologize in advance if this is a duplicate; I searched pretty extensively to no avail. My math isn't as strong as I'd like it so it's entirely possible I'm using the wrong terminology. Thanks in advance for any help! Chris

    Read the article

  • Java URLConnection Timeout

    - by Chris
    I am trying to parse an XML file from an HTTP URL. I want to configure a timeout of 15 seconds if the XML fetch takes longer than that, I want to report a timeout. For some reason, the setConnectTimeout and setReadTimeout do not work. Here's the code: URL url = new URL("http://www.myurl.com/sample.xml"); URLConnection urlConn = url.openConnection(); urlConn.setConnectTimeout(15000); urlConn.setReadTimeout(15000); urlConn.setAllowUserInteraction(false); urlConn.setDoOutput(true); InputStream inStream = urlConn.getInputStream(); InputSource input = new InputSource(inStream); And I am catching the SocketTimeoutException. Thanks Chris

    Read the article

  • C#/ASP.NET MVC 4 Instantiate Object Derived From Interface In Factory Method

    - by Chris
    Currently have a Factory class that features a GetSelector function, which returns a concrete implementation of ISelector. I have several different classes that implement ISelector and based on a setting I would like to receive the appropriate ISelector back. public interface ISelector { string GetValue(string Params); } public class XmlSelector : ISelector { public string GetValue(string Params) { // open XML file and get value } } public static class SelectorFactory { public static ISelector GetSelector() { return new XmlSelector(); // Needs changing to look at settings } } My question is what is the best way to store the setting? I am aware of using AppSettings etc. but I'm not sure whether I want to have to store strings in the web.config and perform a switch on it - just seems to be really tightly coupled in that if a new implementation of ISelector is made, then the Factory would need to be changed. Is there any way of perhaps storing an assembly name and instantiating based on that? Thanks, Chris

    Read the article

  • PHP, include with parameters

    - by chris
    hi! I have a PHP-file which will be called from a form. So it gets parameters over $_GET. Now I need the exact same functionality of this file, but not in such a form-call. I will include it in normal code with fixed parameters (which normally come from the form). So my file can work with the form AND without it. I know only the way with include and setting the $_GET in front of it. But I am not sure this is the most elegant way (I dont like the idea of setting things like $_GET). any other ways of doing this? br, chris

    Read the article

  • Jquery - Move Div around

    - by Chris
    Hi there guys, I am using Jquery Drag and drop to move divs across a page and this works perfectly. however what i would like is on each one of the div containers is to have a close button which when clicks removes the div from where it is and places it in a pre-defined div at the bottom like a widget gallery. How would this be accomplished? - below is my html.. thanks Chris <div class='column' id='leftcolumn'></div> <div class='column' id='rightcolumn'> <div class='dragbox'> <span class='close'>Close</span> Content In here </div> </div> <div class='column' id='widgetgallery></div>

    Read the article

  • Is there a graphics/game engine that supports PC & Mac?

    - by Chris Masterton
    Is their a graphics that runs on both Mac & PC? I've seen Unity and thats a possibility, I'm wondering if there are any other choices. Ideally I want to port the same C++ game code to both PC & Mac platforms, but let the underlying game/graphics engine take advantage of the appropriate hardware. edit: I'm looking on the level of Torque, Gamebryo & Unreal. A commercial solution is perfectly acceptable. Thanks, Chris

    Read the article

  • Silverlight Cream for February 10, 2011 -- #1045

    - by Dave Campbell
    In this Issue: Mark Monster, Jaime Rodriguez, Mark Hopkins, WindowsPhoneGeek, David Anson, Jesse Liberty, Jeremy Likness, Martin Krüger(-2-), Beth Massi, Joost van Schaik, Laurent Bugnion, and Arik Poznanski. Above the Fold: Silverlight: "Parsing the Visual Tree with LINQ" Jeremy Likness WP7: "Silverlight-ready PNG encoder implementation shows one way to use .NET IEnumerables effectively" David Anson Lightswitch: "How to Send Automated Appointments from a LightSwitch Application" Beth Massi Shoutouts: Be sure to visit SilverlightShow... check out their top hits last week: SilverlightShow for Jan 31- Feb 06, 2011 Jaime Rodriguez has a post up that all the WP7 folks will be interested in: FAQ about copy paste functionality in upcoming release From SilverlightCream.com: Make use of WCF FaultContracts in Silverlight clients Mark Monster takes a shot at answering “The remote server returned an error: NotFound” while connecting to a WCF Service problem we all see. Communication between HTML in WebBrowser and Silverlight app Jaime Rodriguez responds to questions he received about communication between HTML and SIlverlight with this post about the bi-directional communication between the control and HTML. WP7 - Real Apps, Real Code Mark Hopkins has a post up about some WP7 starter kits that you can get all the source for and actually download the app from the Marketplace first to see if it interests you! WP7 AboutPrompt in depth WindowsPhoneGeek has this cool post up about the AboutPrompt from the Coding4Fun toolkit in detail... great diagrams showing where all the elements are and code examples with images. Silverlight-ready PNG encoder implementation shows one way to use .NET IEnumerables effectively David Anson describes why he took it upon himself to write his own png encoder for Silverlight... and we all thank him for doing so and providing us with the code! Navigation 101–Cancelling Navigation Jesse Liberty's latest WP7 From Scratch episode is up (number 32), and he's talking about Navigation and how to cancel it if you need to. Parsing the Visual Tree with LINQ Jeremy Likness demonstrates using LINQ to rat out information in the visual tree of your XAML. To Quote Jeremy: "you can easily check for intersections between elements and find any type of element no matter how deep within the tree it is". SpriteAnimationBehavior Martin Krüger has a couple more fun things in the Expression Gallery that I haven't discussed. First up is a behavior that animates up to 999 images and lets you control the FramesPerSecond... great demo on the ExpressionGallery to play with. Second alternative: Storyboard should not start before the Silverlight application is loaded Martin Krüger's latest is a way to programmatically wait for the Loaded event so that you know you can let your animations fly. How to Send Automated Appointments from a LightSwitch Application Beth Massi's latest Lightswitch post follows up her Outlook automation one with sending appointments using the standard iCalendar format... all the code included of course. The case for the Bindable Application Bar for Windows Phone 7 Joost van Schaik posts about a bindable Application Bar for your WP7 apps... grab the code and don't leave home without it :) MVVM Light V4 preview (BL0014) release notes Laurent Bugnion posted an update to MVVMLight to Codeplex a couple days ago. This is an early preview of what he plans on having in version 4, so check out the post for what's new and fun. Search Digg on Windows Phone 7 Arik Poznanski followed up his RSS post from last week with this one on searching Digg on WP7... and he's discussing and providing a utility class for doing it. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • How to merge two single column csv files with linux commands

    - by user1328191
    I was wondering how to merge two single column csv files into one file where the resulting file will contain two columns. file1.csv    first_name    chris    ben    jerry file2.csv    last_name    smith    white    perry result.csv    first_name,last_name    chris,smith    ben,white    jerry,perry Thanks

    Read the article

  • Outlook 2007 Does Not Accept Login Credentials, OWA Webmail Does. Troubleshooting Advice?

    - by Chris
    I am trying to connect Outlook 2007 to Exchange (Hosted Exchange from Rackspace). Soon, I will need to roll this out for our entire office. With the Exchange account added to Outlook, Outlook starts up and asks for the user's username and password. Unfortunately, it doesn't like the password I use for it. I can confirm this username (email address) and password combo works by using Outlook WebMail, and another user (in another network/office) confirmed the Exchange account does work within his Outlook client. In my network/office, I can confirm that an Outlook 2007 client (under Windows 7) can connect to the Hosted Exchange server from Rackspace. However, I have not been able to get Outlook 2007 (under Windows XP SP3) to connect to the very same Exchange server Outlook 2007 (under Windows 7) can connect to. Outlook continuously prompts me for the username and password and does not accept the correct combination. Now, regarding the Outlook client that cannot connect/login to Exchange: The user has full admin rights on the workstation We do not run a domain controller/LDAP The firewall on the workstation has been disabled Real time file scanning in Microsoft Security Essentials has been disabled There are no virus scanning applications that would interface with Outlook or an email server. The Exchange account is setup to run on a newly created Outlook profile The network firewall does not log any blocked attempts A packet capture at the router reveals communication between the workstation and the Exchange server or proxy (though, this is SSL encrypted, so I don't know what the computers are saying) I have applied a fix (Added DWORD value of 0 for DefConnectOpts under HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\RPC) that was recommended to make RPC function when the workstation does not have a default gateway set. Workstation is configured as DHCP. This fix did nothing, and it may be worth noting the RPC subkey was not present until I added it. RPC service is running on the workstation The program is not running under any compatibility mode. Side note: Outlook 2007 installs with compatibility mode for XP enabled by default in windows 7. Outlook 2007 will not even try to connect to exchange if this compatibility mode is checked. In windows xp, I tried checking compatibility mode for windows 2000, and was unable to connect to exchange as well. Here is the specific configuration I've used in a blank outlook profile: Microsoft Exchange Server: ##MASKED##-MBX-C18.mex07a.mlsrvr.com Username: (Full Email Address: [email protected]) Password: ##MASKED## Outlook Anywhere: Connect to Microsoft Exchange using HTTP Exchange Proxy Settings: Proxy Server: mex07a.emailsrvr.com Check "Connect using SSL only" Under "Only connect to proxy servers...", enter: msstd:mex07a.emailsrvr.com Check "On fast networks, connect using HTTP first, then connect using TCP/IP" Check "On slow networks, connect using HTTP first, then connect using TCP/IP" Proxy authentication settings: Basic Authentication Notes: mex07a.mlsrvr.com and mex07a.emailsrvr.com may look incorrect at first glance, but this is not a typo - these instructions were handed down from rackspace and are confirmed to be working, just not on this workstation. I have tried to use the RpcPing utility but must have been using it wrong. I got as far as "Bad Interface Descriptor". It would seem to me getting Outlook and Exchange to work together would be a breeze, especially since everything is done over port 80 with web services. Unfortunately, the user is stuck with WebMail access only, because Outlook won't accept the Exchange credentials. Do you have any ideas of other things I could try to debug this issue further? Any and all help is greatly appreciated. Thank you! -Chris

    Read the article

  • Tuple conversion to a string

    - by David542
    I have the following list: [('Steve Buscemi', 'Mr. Pink'), ('Chris Penn', 'Nice Guy Eddie'), ...] I need to convert it to a string in the following format: "(Steve Buscemi, Mr. Pink), (Chris Penn, Nice Guy Eddit), ..." I tried doing str = ', '.join(item for item in items) but run into the following error: TypeError: sequence item 0: expected string, tuple found How would I do the above formatting?

    Read the article

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