Search Results

Search found 1162 results on 47 pages for 'nick'.

Page 24/47 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • How to handle a C# console application terminating?

    - by Nick R
    If I have a console application, is there any way I can handle the following: Ctrl-C (I know the answer to this. Using Console.TreatControlCAsInput and Console.CancelKeyPress) Session termination, such as when someone logs off Process exit, such as when someone uses the task manager to close the application. I know that if I was writing a unix application, I would handle various signals to catch the request to close (SIGTERM from memory), but I also know I need to handle these messages pretty quickly and exit before the system does a kill -9 (SIGKILL). But for a C# console application, I'm not sure how to do this.

    Read the article

  • Terminate a python script from another python script

    - by Nick
    I've got a long running python script that I want to be able to end from another python script. Ideally what I'm looking for is some way of setting a process ID to the first script and being able to see if it is running or not via that ID from the second. Additionally, I'd like to be able to terminate that long running process. Any cool shortcuts exist to make this happen?

    Read the article

  • Good Java graph algorithm library?

    - by Nick Fortescue
    Has anyone had good experiences with any Java libraries for Graph algorithms. I've tried JGraph and found it ok, and there are a lot of different ones in google. Are there any that people are actually using successfully in production code or would recommend? To clarify, I'm not looking for a library that produces graphs/charts, I'm looking for one that helps with Graph algorithms, eg minimum spanning tree, Kruskal's algorithm Nodes, Edges, etc. Ideally one with some good algorithms/data structures in a nice Java OO API.

    Read the article

  • Best Static Website Generator

    - by Nick Retallack
    In the age of dynamic websites built with layouts and templates, nobody wants to write plain old repetitive static html anymore. But now that you can outsource dynamic features to services like Disqus, and you could get slashdotted/dugg/reddited at any moment, sometimes a static website is best for scalability. There are quite a few static website generators out there that let you use templates, layouts, alternative markup languages, and other new age stuff. So this question is a bit of a survey. Which do you think is the best, and why? Here are a few examples to start us off: WebGen StaticMatic Static

    Read the article

  • Using .inc files when theming.

    - by Nick Lowman
    Hi there, I noticed in the Zen theme there were various PHP files with the .inc file extension .i.e. template.conditional-styles.inc. I've read/watched quite a few theming tutorials but none of them mentioned these files for theming, only the template.php. Can anyone tell me when, if and how I should be using these files for theming. Many thanks

    Read the article

  • Ideal dev/test/QA environment for development

    - by Nick
    I am working to rebuild my company's dev/test/QA environment. We have 10-15 programmers that are involved in a number of projects. They currently all develop locally on their PCs and use the dev environment for testing. We currently do not have a QA environment, so deployments are frequently a pain because bugs are usually found after something has gone live. Here's what I envision: Doing away with everyone's local admin privileges and making everyone develop on a dev server Create a QA environment that is identical to our production systems. This will allow them to test deployments. Create a new test environment that is more locked down than the dev server so that proper testing can be done. What are your thoughts? What is the best way to set up an environment like this? We develop ASP .NET applications using MS Visual Studio 2008 (if that helps).

    Read the article

  • Stack Overflow on Marshal.PtrToStructure reading wmv files

    - by Nick Udell
    Hi, I'm using a frame grabber class in order to capture and process each frame in a video. The class can be found here: http://www.codeproject.com/KB/graphics/FrameGrabber.aspx I'm having issues with running it, however. When loading the file, it attempts to marshal a video format pointer into a VideoInfoHeader (I'm using DirectShow.Net). The code that does this is as follows: videoInfo = (VideoInfoHeader)Marshal.PtrToStructure(mediaType.formatPtr, typeof(VideoInfoHeader)); When I run this it immediately crashes out of the debugging environment, probably with a stack overflow. When stepping through I can see that the formatPtr always equals 93, though I do not know what to make of this as I am fairly new to marshalling. I have checked that the video runs fine in Windows Media Player. This is essential in finding the dimensions of the video and also the size of the header, which needs to be skipped before the frames can be read. I am running Windows 7 x64. Any help on this would be much appreciated, I must've tried fifteen different frame grabbing techniques.

    Read the article

  • Can I use an NSDecimalNumber anywhere that an NSNumber is expected?

    - by Nick Forge
    NSDecimalNumber is a subclass of NSNumber, and from what I can tell, it implements all of the NSNumber methods as expected for an NSNumber instance. Given that, is it ok to give NSDecimalNumbers to any code that is expecting an NSNumber? The only possible issue might be code that checks that an argument is an instance of NSNumber, but since NSNumber is a class-cluster, code like this would have to check that the instance is a subclass of NSNumber, and NSDecimalNumber instances should pass the same tests.

    Read the article

  • No filenames in pdb program database.

    - by Nick
    I have a .pdb program database from a C++ application compiled in debug on Windows VS2005. I use the DIA SDK to find function names but I can't seem to retrieve the filenames for the symbols. Is there some switch I need to turn on? Does this work?!

    Read the article

  • Datagridview DateTime Format not using System Region settings

    - by Nick
    I've got a datagridview that is hooked up to a bindingsource on my main form. One of the columns and datamembers in the bindingsource is a DateTime object. When the datagridview shows this item it doesn't use Window's default region settings for displaying datetime. The weird thing is, I can access this same DateTime object and print it to a text box, or even pass it off to another form with another datagridview and binding source and it actually shows up properly in that table. So then, why does the datagridview on my main form not use the regional date/time settings when converting the DateTime object to a string? I've checked that there was no special formatting applied to the datagridview and so I'm running out of ideas to check. Do you guys know if there is any super secret way to get a datagridview to follow system regional format rules or not? Also, since I highly doubt that I did something different with this datagridview vs the others in my application, the next potential area for issue could be on application load: Perhaps since this comes up when the application loads, it's not getting the same cultureUI settings as the other datagridviews? Any Help?

    Read the article

  • Using Active Directory and Open ID to authenticate a Play Framework based application.

    - by Nick Jones
    I have an application I am building using the Play Framework. I would like this application to authenticate users using Open ID and Active Directory. Is this possible? Please excuse my ignorance as I am not a J2EE expert but come from a deep knowledge of the .Net framework and some experience writing Java applications. Any guidance would be much appreciated. Thanks in advance.

    Read the article

  • Get Last Friday of Month in Java

    - by Nick Klauer
    I am working on a project where the requirement is to have a date calculated as being the last Friday of a given month. I think I have a solution that only uses standard Java, but I was wondering if anyone knew of anything more concise or efficient. Below is what I tested with for this year: for (int month = 0; month < 13; month++) { GregorianCalendar d = new GregorianCalendar(); d.set(d.MONTH, month); System.out.println("Last Week of Month in " + d.getDisplayName(d.MONTH, Calendar.LONG, Locale.ENGLISH) + ": " + d.getLeastMaximum(d.WEEK_OF_MONTH)); d.set(d.DAY_OF_WEEK, d.FRIDAY); d.set(d.WEEK_OF_MONTH, d.getActualMaximum(d.WEEK_OF_MONTH)); while (d.get(d.MONTH) > month || d.get(d.MONTH) < month) { d.add(d.WEEK_OF_MONTH, -1); } Date dt = d.getTime(); System.out.println("Last Friday of Last Week in " + d.getDisplayName(d.MONTH, Calendar.LONG, Locale.ENGLISH) + ": " + dt.toString()); }

    Read the article

  • Flex Inheriting Logged in User

    - by Nick
    I am trying to secure my Flex application within my Java web application. Currently my Java web application, handles logging and managing user accounts and the like. I was wondering if there is a way to essentially share that user credentials with the Flash movie in a secure mechanism? For instance, if you log in, we want you to be able to save items in the Flex application for that user, only if that user is logged in of course. Any ideas? Any help is greatly appreciated.

    Read the article

  • iPhone link to map directions using string "current location" not lat and lng for saddr

    - by Nick
    I know there are numerous questions about how to construct a sharedApplication link to the maps app specifying the start and end address with coordinates. I've got that working no problem. Has anyone found a way to link with a source address generically specified as "current location". I ask because the scenario I'm working on having Core Location or a UIMapView would only be necessary in order to determine the user location prior to handing off to the map app where the user locating would seem to just happen again. I've tried throwing UTF8'd "Current Location" and "[Current Location]" into the saddr parameter which amusingly starts from Current Montana. I've also tried simply excluding the saddr param. I know this is often tread territory but this particular situation wasn't covered by anything I found searching here or on mapki. Before I add the core location code I just wanted to make sure there wasn't a more limited way to tackle this. Thanks

    Read the article

  • JFrame not working correctly

    - by Nick Gibson
    This is making me very angry, I have worked on this for 2 days, have 2 books open and have looked through them, and STILL can't get this program to run the way I want it run. I'm getting to the point where if this doesn't help, I quit. I want a SIMPLE Frame application. It has a JComboBox centered at the top. Next to it is a text field big enough to show numeric digits such as "$49.99" Below it is a spot for a Text area showing terms of service Below that is the checkbox agreeing to the terms of service Below that is 2 buttons "Accept" and "Decline" I Have worked on this for 2 days, here is the coding: public class Bar extends JFrame implements ActionListener { public Bar(final JFrame frame) { String[] tests = { "A+ Certification", "Network+ Certification", "Security+ Certification", "CIT Full Test Package" }; JButton button = new JButton("Click Meh"); add(new JLabel("Welcome to the CIT Test Program ")); add(new JLabel("Please select which Test Package from the list below.")); frame.setVisible(true); frame.setSize(250,250); JPanel pane1 = new JPanel(new FlowLayout()); JPanel pane2 = new JPanel(new FlowLayout()); JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu("File"); JMenu editMenu = new JMenu("Edit"); JMenu helpMenu = new JMenu("Help"); menuBar.add(fileMenu); menuBar.add(editMenu); menuBar.add(helpMenu); JMenuItem newMenu = new JMenuItem("New (Ctrl+N)"); JMenuItem openMenu = new JMenuItem("Open (Ctrl+O)"); JMenuItem saveMenu = new JMenuItem("Save (Ctrl+S)"); saveMenu.addActionListener(this); JMenuItem exitMenu = new JMenuItem("Exit (Ctrl+W)"); JMenuItem cutMenu = new JMenuItem("Cut (Ctrl+X)"); JMenuItem copyMenu = new JMenuItem("Copy (Ctrl+C)"); JMenuItem pasteMenu = new JMenuItem("Paste (Ctrl+V)"); JMenuItem infoMenu = new JMenuItem("Help (Ctrl+H)"); fileMenu.add(newMenu); fileMenu.add(openMenu); fileMenu.add(saveMenu); fileMenu.add(exitMenu); editMenu.add(cutMenu); editMenu.add(copyMenu); editMenu.add(pasteMenu); helpMenu.add(infoMenu); frame.setJMenuBar(menuBar); JComboBox packageChoice = new JComboBox(tests); frame.add(packageChoice); } public void actionPerformed(ActionEvent e) { Object source = e.getSource(); { } } EDIT: Forgot to add the second program public class JFrameWithPanel { public static void main(String[] args) { JPanel panel = new Bar(new JFrame("CIT Test Program")); } } How do I get this to have everything where I want it and show up? I'm very confused because of this and now barely even get how Frames work.

    Read the article

  • Footer positioning with CSS and 960gs

    - by Nick
    I'm new to doing layouts with CSS (I haven't done any web design for a long long time) and I can't seem to figure out how to get the footer of the page to display at the bottom the way I want. Requirements: -Display at bottom of content if content exceeds vertical size of viewport -Display at bottom of viewport if viewport exceeds vertical size of content. The code that I am using sets the footer at the bottom of the viewport, but if I size the browser to be shorter than the content, it just covers the content. Code: <div style="background-image:url(footer_bg.jpg); background-position:bottom; background-repeat:repeat-x; height:235px; width:100%; bottom:0px; position:absolute;"></div> My main goal is to have a footer with text (ie. company info, contact info) and a background gradient. I'd like the footer background to span the width of the page, but I don't know if I can do that with the 960 gs divs.

    Read the article

  • How to create a css rule for all elements except one class?!

    - by Nick
    Hi, I have created a CSS stylesheet for my project. Is there any way I can create a css rule that applies to all table elements EXCEPT table elements belonging to the class "dojoxGrid"? Something like: .not(dojoxGrid) table{ width:100%; border-top:1px solid #dddddd; border-left:1px solid #dddddd; border-right:1px solid #dddddd; margin:1em auto; border-collapse:collapse; } Thanks in advance!

    Read the article

  • How to get around the event bubble using jQuery's: .live()

    - by Nick
    Hi there. Here is the code in question: $(".navItems>ul>li").live('click', function(){ var selectorID = $(this).attr('id'); $(".infoList").slideUp('fast', function(){ switchTabInfo(selectorID); }); function switchTabInfo(selectorID){ var actionID = selectorID.substring(4); actionID = "#" + actionID; $(actionID).slideDown(); } So in short i have a these .infoList classes with id names tied to back to the nav li id. That lists item's id might be nav_testsHistory for example. With all the content boxes hidden by class name this javascript makes a pleasing slide up, down effect. But the third content box flickers as will the second one after a third box push. It slides up and down a second unnecessary time. If I add an alert like this: $(".navItems>ul>li").live('click', function(){ var selectorID = $(this).attr('id'); $(".infoList").slideUp('fast', function(){ switchTabInfo(selectorID); alert('bubble'); }); The alert fires 3 times?! So my research took to reading about the event bubble. What I cannot find is how to check if it has been fired. I have not tried setting an input val and doing a tf test around the nested slider action. Cause that's crude. More info, all the code above is in a function, which is in an init() function, which is called on document ready. That's the only js file besides jquery 1.3.2. What do you guys think?

    Read the article

  • Auto generate SWF in Flex SDK

    - by Nick
    I'm building my first website with AS3, and I'm using Flash Builder 4 to create/edit my AS classes. I have two .fla files (preloader.fla and portfolio.fla) which I both published as .swc and loaded them into my ActionScript project in FB4 (build path). When I hit debug, FB4 automatically generates a .SWF in bin-debug folder called Preloader.swf, but in my Preloader.as I have new URLRequest("Portfolio.swf"); and this Portfolio.swf isn't being generated by itself. Now the real question; how can I tell FB4 to automatically create both .SWF files for me? Or isn't that possible, any workaround then? Thanks.

    Read the article

  • In Clojure - How do I access keys in a vector of structs

    - by Nick
    I have the following vector of structs: (defstruct #^{:doc "Basic structure for book information."} book :title :authors :price) (def #^{:doc "The top ten Amazon best sellers on 16 Mar 2010."} best-sellers [(struct book "The Big Short" ["Michael Lewis"] 15.09) (struct book "The Help" ["Kathryn Stockett"] 9.50) (struct book "Change Your Prain, Change Your Body" ["Daniel G. Amen M.D."] 14.29) (struct book "Food Rules" ["Michael Pollan"] 5.00) (struct book "Courage and Consequence" ["Karl Rove"] 16.50) (struct book "A Patriot's History of the United States" ["Larry Schweikart","Michael Allen"] 12.00) (struct book "The 48 Laws of Power" ["Robert Greene"] 11.00) (struct book "The Five Thousand Year Leap" ["W. Cleon Skousen","James Michael Pratt","Carlos L Packard","Evan Frederickson"] 10.97) (struct book "Chelsea Chelsea Bang Bang" ["Chelsea Handler"] 14.03) (struct book "The Kind Diet" ["Alicia Silverstone","Neal D. Barnard M.D."] 16.00)]) I would like to sum the prices of all the books in the vector. What I have is the following: (defn get-price "Same as print-book but handling multiple authors on a single book" [ {:keys [title authors price]} ] price) Then I: (reduce + (map get-price best-sellers)) Is there a way of doing this without mapping the "get-price" function over the vector? Or is there an idiomatic way of approaching this problem?

    Read the article

  • Possible to Inspect Innards of Core C# Functionality

    - by Nick Babcock
    I was struck today, with the inclination to compare the innards of Buffer.BlockCopy and Array.CopyTo. I am curious to see if Array.CopyTo called Buffer.BlockCopy behind the scenes. There is no practical purpose behind this, I just want to further my understanding of the C# language and how it is implemented. Don't jump the gun and accuse me of micro-optimization, but you can accuse me of being curious! When I ran ILasm on mscorlib.dll I received this for Array.CopyTo .method public hidebysig newslot virtual final instance void CopyTo(class System.Array 'array', int32 index) cil managed { // Code size 0 (0x0) } // end of method Array::CopyTo and this for Buffer.BlockCopy .method public hidebysig static void BlockCopy(class System.Array src, int32 srcOffset, class System.Array dst, int32 dstOffset, int32 count) cil managed internalcall { .custom instance void System.Security.SecuritySafeCriticalAttribute::.ctor() = ( 01 00 00 00 ) } // end of method Buffer::BlockCopy Which, frankly, baffles me. I've never run ILasm on a dll/exe I didn't create. Does this mean that I won't be able to see how these functions are implemented? Searching around only revealed a stackoverflow question, which Marc Gravell said [Buffer.BlockCopy] is basically a wrapper over a raw mem-copy While insightful, it doesn't answer my question if Array.CopyTo calls Buffer.BlockCopy. I'm specifically interested in if I'm able to see how these two functions are implemented, and if I had future questions about the internals of C#, if it is possible for me to investigate it. Or am I out of luck?

    Read the article

  • android ImageView scaling to fit another View

    - by Nick
    I have a relative layout that comprises a TextView and an ImageView: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:adjustViewBounds="true"/> </RelativeLayout> It looks as follows: What I want to achieve is: It means that I want my ImageView to scale to fit the TextView by height. Can it be done in xml, without java-coding? If I could write something like android:layout_height="match_that_TextView" it would have solved this issue, but it's impossible I guess.

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >