Search Results

Search found 77 results on 4 pages for 'captain kidd'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • OutOfMemoryException - out of ideas II

    - by Captain Comic
    Hello, This question is related to my previous question. The storyline: I have an application which consumes a lot of memory if you look at task manager VMSize. I am trying to find out what consumes this amount of memory. You see in the picture below that VM size is 2,46 GB Ok now I am looking at .net performance counters Committed and reserved bytes add up to only 1,2 GB Now lets look at windb sos debugging. Let's run eeheap -gc command The heap size used by GC is only 340 MB. Where is the rest of used memory? I need to discover why WM size in TaskManager is 2.4 GB

    Read the article

  • Why use wmode at all?

    - by Captain Phoenix
    What benefit does using wmode give if you're not needing transparency? I've look through this forum and found posts talking about the different wmode attributes here, but I want to know why I need to use it in the first place and if removing it will break anything else. My application uses wmode="opaque" at the moment but it seems to stop scrolling in Firefox. I use JavaScript focus() to allow the user to type directly into the flash ap. Otherwise I'm using the stock standard Flex Builder 3 HTML template. Edit: The ap uses the whole page, without any additional elements needing to be displayed over the flash part.

    Read the article

  • OutOfMemoryException, large Private Data

    - by Captain Comic
    Hello, In previous series: http://stackoverflow.com/questions/2543648/outofmemoryexception-stack-size-is-huge-large-number-of-threads I have a .net windows service that consumes a lot of memory. The GC heap is not big. Also the stack size is not big. What is big is something called a private data. Also I can see in task manager that my application consumes a lot something that taskmanager calls a handle. My application consumes 2326 handles. I believe that these handles are some windows handles that occupy private data. I can see that this private data is occupied by blocks marked as Thread Environment Block. What is that? Screenshot of my application memory usage by VMMap Screenshot of my application memory usage by Task Manager UPDATE I run ProcessExplorer. I have two instances of my service running at the moment. I can see that they consume a lot of virtual memory for Gen2 GC. This look suspicios. Also total reserved for GC Heap size is the same for two processes.

    Read the article

  • Passing parameters between interrupt handlers on a Cortex-M3 ...

    - by Captain NedD
    I'm building a light kernel for a Cortex-M3. From a high priority interrupt I'd like to invoke some code to run in a lower priority interrupt and pass some parameters along. I don't want to use a queue to post work to the lower priority interrupt. I just have a buffer and size to pass to it. In the proramming manual it says that the SVC interrupt handler is synchronous which presumably means that if you invoke it from an interrupt that's a lower priority than SVC's handler it gets called immediately (the upshot of this being that you can pass parameters to it as though it were a function call (a little like the BIOS calls in MS-DOS)). I'd like to do it the other way: passing parameters from a high priority interrupt to a lower priority one (at the moment I'm doing it by leaving the parameters in a fixed location in memory). What's the best way to do this (if at all possible)? Thanks,

    Read the article

  • DataGridViewColumn.DataPropertyName Property

    - by Captain Comic
    Hi I have a DataGridView control and I want to populate it with data. I use DataSource property // dgvDealAsset is DataGridView private void DealAssetListControl_Load(object sender, EventArgs e) { dgvDealAssets.AutoGenerateColumns = false; dgvDealAssets.DataSource = DealAssetList.Instance.Values.ToList(); } Now problem number one. The class of my collection does not contain only simple types that I can map to columns using DataPropertyName. This is the class that is contained in collection. class MyClass { public String Name; MyOtherClass otherclass; } class MyOtherClass { public String Name; } Now I am binding properties of MyClass to columns col1.DataPropertyName = "Name" // Ok col2.DataPropertyName = "otherclass" // Not OK - I will have empty cell The problem is that I want to display otherclass.Name field. But if I try to write col2.DataPropertyName = "otherclass.Name" I get empty cell. I tried to manually set the column private void DealAssetListControl_Load(object sender, EventArgs e) { dgvDealAssets.AutoGenerateColumns = false; dgvDealAssets.DataSource = DealAssetList.Instance.Values.ToList(); // iterate through rows and set the column manually foreach (DataGridViewRow row in dgvDealAssets.Rows) { row.Cells["Column2"].Value = ((DealAsset)row.DataBoundItem).otherclass.Name; } But this foreach cycle takes about minute to complete (2k elements). How to solve this problem?

    Read the article

  • Get content of a single cell from a DataGrid in Flex 3

    - by Captain Phoenix
    I want to select information in a single cell from my DataGrid in Flex 3. Specifically, I'm displaying three phone numbers per line and the user needs to be able to select one of those numbers, from any row, but not the whole row. While similar to this, I am displaying the DataGrid to the user. The answer for that question was to manipulate the dataProvider, how can I know what cell I've selected in order to do that?

    Read the article

  • WCF configuration file: why do we need clientBaseAddress in Binding section?

    - by Captain Comic
    Hi, There are three sections in WCF configuration for service client: Look at bindings = clientBaseAddress Why do we need to specify callback address? Is this field required? Why .NET is unable to determine the address of client? Does it mean that i can specify callback service that is located on some other machine? <configuration> <system.serviceModel> <client> <endpoint address= </client> <bindings> <wsDualHttpBinding> <binding name= clientBaseAddress= maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" </binding> </wsDualHttpBinding> </bindings> <behaviors> <endpointBehaviors> <behavior name=> </behavior> </endpointBehaviors> </behaviors> </system.serviceModel>

    Read the article

  • Newbie can't get Tomcat to reload Flex/BlazeDS application

    - by Captain Aporam
    I'm an experienced 'old school' programmer, but new to Tomcat and Flex. I've followed the getting started for BlazeDS. I'm making changes to the Flex code using Flex Builder 3, but I just can't get the changes to show up when I refresh the page on my client. Server and client are separate physical machines, I've even re-started the server hardware. One curious thing, even when I re-started the server I didn't have to re-login to the Tomcat manager page - I didn't restart my client, I guess it remembers my session? TIA, getting frustrated - like my flex page is 'write once'.

    Read the article

  • Ajax Enabled WCF Service Javascript issue...

    - by Captain Insano
    I'm a noob working with Ajax-Enabled WCF Services... Right now I have an AJAX service which calls a different WCF service that is using wsHttpBinding. The WCF wsHttpBinding service lives in a different web app on the same IIS6 server. The AJAX javascript proxy is only created when I enable anonymous access on the app hosting the AJAX service. If I remove anonymous access, IE6 bombs with an 'Undefined' error when call the AJAX proxy. In a nut shell, my AJAX service sends a request back to IIS (same domain/app), and while on the server it sends a WCF service request for data on a different app on the same IIS server. The service returning data is setup with Windows authentication, wsHttpBinding, and security mode is set to message. Any ideas? Both apps have are using windows authentication.

    Read the article

  • OutOfMemoryException - out of ideas

    - by Captain Comic
    Hi I have a net Windows service that is constantly throwing OutOfMemoryException. The service has two builds for x86 and x64 Windows. However on x64 it consumes a lot more memory. I have tried profiling it with various memory profilers. But I cannot get a clue what the problem is. The diagnosis - service consumes lot of VMSize. Also I tried to look at performance counters (perfmon.exe). What I can see is that heap size is growing and %GC time is 19%. My application has threads and locking objects, DB connections and WCF interface. See first app in list The link to picture with performance counters view http://s006.radikal.ru/i215/1003/0b/ddb3d6c80809.jpg

    Read the article

  • APACHE2.2/WIN2003(32-bit)/PHP: How do I configure Apache to Run Background PHP Processes on Win 2003

    - by Captain Obvious
    I have a script, testforeground.php, that kicks off a background script, testbackground.php, then returns while the background script continues to run until it's finished. Both the foreground and background scripts write to the output file correctly when I run the foreground script from the command line using php-cgi: C:\>php-cgi testforeground.php The above command starts a php-cgi.exe process, then a php-win.exe process, then closes the php-cgi.exe almost immediately, while the php-win.exe continues until it's finished. The same script runs correctly but does not have permission to write to the output file when I run it from the command line using plain php: C:\>php testforeground.php AND when I run the same script from the browser, instead of php-cgi.exe, a single cmd.exe process opens and closes almost instantly, only the foreground script writes to the output file, and it doesn't appear that the 2nd process starts: http://XXX/testforeground.php Here is the server info: OS: Win 2003 32-bit HTTP: Apache 2.2.11 PHP: 5.2.13 Loaded Modules: core mod_win32 mpm_winnt http_core mod_so mod_actions mod_alias mod_asis mod_auth_basic mod_authn_default mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_include mod_isapi mod_log_config mod_mime mod_negotiation mod_setenvif mod_userdir mod_php5 Here's the foreground script: <?php ini_set("display_errors",1); error_reporting(E_ALL); echo "<pre>loading page</pre>"; function run_background_process() { file_put_contents("0testprocesses.txt","foreground start time = " . time() . "\n"); echo "<pre> foreground start time = " . time() . "</pre>"; $command = "start /B \"{$_SERVER['CMS_PHP_HOMEPATH']}\php-cgi.exe\" {$_SERVER['CMS_HOMEPATH']}/testbackground.php"; $rp = popen($command, 'r'); if(isset($rp)) { pclose($rp); } echo "<pre> foreground end time = " . time() . "</pre>"; file_put_contents("0testprocesses.txt","foreground end time = " . time() . "\n", FILE_APPEND); return true; } echo "<pre>calling run_background_process</pre>"; $output = run_background_process(); echo "<pre>output = $output</pre>"; echo "<pre>end of page</pre>"; ?> And the background script: <?php $start = "background start time = " . time() . "\n"; file_put_contents("0testprocesses.txt",$start, FILE_APPEND); sleep(10); $end = "background end time = " . time() . "\n"; file_put_contents("0testprocesses.txt", $end, FILE_APPEND); ?> I've confirmed that the above scripts work correctly using Apache 2.2.3 on Linux. I'm sure I just need to change some Apache and/or PHP config settings, but I'm not sure which ones. I've been muddling over this for too long already, so any help would be appreciated.

    Read the article

  • Which Cortex-M3 interrupts can I use for general purpose work?

    - by Captain NedD
    I'd have some code that needs to be run as the result of a particular interrupt going off. I don't want to execute it in the context of the interrupt itself but I also don't want it to execute in thread mode. I would like to run it at a priority that's lower than the high level interrupt that precipitated its running but also a priority that higher than thread level (and some other interrupts as well). I think I need to use one of the other interrupt handlers. Which ones are the best to use and what the best way to invoke them? At the moment I'm planning on just using the interrupt handlers for some peripherals that I'm not using and invoking them by setting bits directly through the NVIC but I was hoping there's a better, more official way. Thanks,

    Read the article

  • Accessing the MSP and PSP registers of the Cortex-M3 in C/C++ code using Keil's µVision

    - by Captain NedD
    I need to access the MSP and PSP registers (the main and process stack registers) of the Cortex-M3 processor. I'm writing in C/C++. The µVision and associated compiler doesn't let you do inline assembly for this Thumb-2 only core (and I'm not sure that'd be such a good idea anyway). I need to do this so that I can extract the immediate value of an svc instruction regardless of whether it was executed while in thread or handler mode. Thanks,

    Read the article

  • OutOfMemoryException, stack size is huge, large number of threads

    - by Captain Comic
    Hello, I was profiling my .net windows service. I was trying to discover OutOfMemoryException and discovered that my stack size is huge and is growing because the the number of threads keeps growing. Each thread gets 1024 KB on Windows x64 machine. Thus when my app has 754 threads the stack size would be 772 MB. The problem for me is that i don't know where these thread come from. Initially my app has a very limited number of threads and they keep growing with time. I have two suspicions - either these threads are created by WCF or by database connection. My application uses both WCF and datasets. Also I tried to profile my app in Ants do Trace i can see large number of System.ServiceModel.Channels.ClientReliableDuplexSessionChannel and this number is increasing with time. I can see thousands of these objects created. So what I want to know is who is creating threads (tools to discover, profilers) and if it is WCF who is creating these threads.

    Read the article

  • Graceful DOS Command Error-Handling w/PHP popen()

    - by Captain Obvious
    PHP 5.2.13 on Windows 2003 I am using the DOS Start /B command to launch a background application using the PHP popen() function: popen("start /B {$_SERVER['HOMEPATH']}/{$app}.exe > {$_SERVER['HOMEPATH']}/bg_output.log 2>&1 & echo $!", 'r'); The popen() function launches a cmd.exe process that runs the specified command; however, if the command fails (e.g. the {$app}.exe doesn't exist or is locked in the above example), the cmd.exe process never returns, and PHP hangs indefinitely as a result. Calling the failing DOS command directly using the Command Prompt results in an Error prompt that requires clicking the OK button. I assume this error confirmation requirement is what's preventing the cmd.exe process from returning to PHP both from the Command Prompt (using both CGI and CLI) and the web (using Apache 2.0 handler w/Apache 2.2). Is there a way to configure PHP, Apache, and/or Win 2003 to return the DOS error to the originating call rather than waiting for confirmation?

    Read the article

  • Graceful DOS Command Error-Handling

    - by Captain Obvious
    PHP 5.2.13 on Windows 2003 I am using the DOS Start /B command to launch a background application using the PHP popen() function: popen("start /B {$_SERVER['HOMEPATH']}/{$app}.exe > {$_SERVER['HOMEPATH']}/bg_output.log 2>&1 & echo $!", 'r'); The popen() function launches a cmd.exe process that runs the specified command; however, if the command fails (e.g. the {$app}.exe doesn't exist or is locked in the above example), the cmd.exe process never returns, and PHP hangs indefinitely as a result. Calling the failing DOS command directly using the Command Prompt results in an Error prompt that requires clicking the OK button. I assume this error confirmation requirement is what's preventing the cmd.exe process from returning to PHP both from the Command Prompt (using both CGI and CLI) and the web (using Apache 2.0 handler w/Apache 2.2). Is there a way to write the DOS command or configure the server or cmd.exe app itself to return the DOS error to the originating call rather than waiting for confirmation?

    Read the article

  • Need sorted dictionary designed to find values with keys less or greater than search value

    - by Captain Comic
    Hi I need to have objects sorted by price (decimal) value for fast access. I need to be able to find all objects with price more then A or less than B. I was thinkg about SortedList, but it does not provide a way to find ascending or descending enumerator starting from given key value (say give me all objects with price less than $120). Think of a system that accepts items for sell from users and stores them into that collection. Another users want to find items cheaper than $120. Basically what i need is tree-based collection and functionality to find node that is smaller\greater\equal to provided key. Please advice.

    Read the article

  • Trying to output a list using class

    - by captain morgan
    Am trying to get the moving average of a price..but i keep getting an attribute error in my Moving_Average class. ('Moving_Average' object has no attribute 'days'). Here is what I have: class Moving_Average: def calculation(self, alist:list,days:int): m = self.days prices = alist[1::2] average = [0]* len(prices) signal = ['']* len(prices) for m in range(0,len(prices)-days+1): average[m+2] = sum(prices[m:m+days])/days if prices[m+2] < average[m+2]: signal[m+2]='SELL' elif prices[m+2] > average[m+2] and prices[m+1] < average[m+1]: signal[m+2]='BUY' else: signal[m+2] ='' return average,signal def print_report(symbol:str,strategy:str): print('SYMBOL: ', symbol) print('STRATEGY: ', strategy) print('Date Closing Strategy Signal') def user(): strategy = ''' Which of the following strategy would you like to use? * Simple Moving Average [S] * Directional Indicator[D] Please enter your choice: ''' if signal_strategy in 'Ss': days = input('Please enter the number of days for the average') days = int(days) strategy = 'Simple Moving Average {}-days'.format(str(days)) m = Moving_Average() ma = m.calculation(gg, days) print(ma) gg is an list that contains date and prices. [2013-10-01,60,2013-10-02,60] The output is supposed to look like: Date Price Average Signal 2013-10-01 60.0 2013-10-02 60.0 60.00 BUY

    Read the article

  • paintComponent method is not displaying anything on the panel

    - by Captain Gh0st
    I have been trying to debug this for hours. The program is supposed to be a grapher that graphs coordinates, but i cannot get anything to display not even a random line, but if i put a print statement there it works. It is a problem with the paintComponent Method. When I out print statement before g.drawLine then it prints, but it doesn't draw any lines even if i put a random line with coordinates (1,3), (2,4). import java.awt.*; import java.util.*; import javax.swing.*; public abstract class XYGrapher { abstract public Coordinate xyStart(); abstract public double xRange(); abstract public double yRange(); abstract public Coordinate getPoint(int pointNum); public class Paint extends JPanel { public void paintGraph(Graphics g, int xPixel1, int yPixel1, int xPixel2, int yPixel2) { super.paintComponent(g); g.setColor(Color.black); g.drawLine(xPixel1, yPixel1, xPixel2, yPixel2); } public void paintXAxis(Graphics g, int xPixel, int pixelsWide, int pixelsHigh) { super.paintComponent(g); g.setColor(Color.green); g.drawLine(xPixel, 0, xPixel, pixelsHigh); } public void paintYAxis(Graphics g, int yPixel, int pixelsWide, int pixelsHigh) { super.paintComponent(g); g.setColor(Color.green); g.drawLine(0, yPixel, pixelsWide, yPixel); } } public void drawGraph(int xPixelStart, int yPixelStart, int pixelsWide, int pixelsHigh) { JFrame frame = new JFrame(); Paint panel = new Paint(); panel.setPreferredSize(new Dimension(pixelsWide, pixelsHigh)); panel.setMinimumSize(new Dimension(pixelsWide, pixelsHigh)); panel.setMaximumSize(new Dimension(pixelsWide, pixelsHigh)); frame.setLocation(frame.getToolkit().getScreenSize().width / 2 - pixelsWide / 2, frame.getToolkit().getScreenSize().height / 2 - pixelsHigh / 2); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setResizable(false); frame.add(panel); frame.pack(); frame.setVisible(true); double xRange = xRange(); double yRange = yRange(); Coordinate xyStart = xyStart(); int xPixel = xPixelStart - (int) (xyStart.getX() * (pixelsWide / xRange)); int yPixel = yPixelStart + (int) ((xyStart.getY() + yRange) * (pixelsHigh / yRange)); System.out.println(xPixel + " " + yPixel); if(yPixel > 0 && (yPixel < pixelsHigh)) { System.out.println("y"); panel.paintYAxis(panel.getGraphics(), yPixel, pixelsWide, pixelsHigh); } if(xPixel > 0 && (xPixel < pixelsHigh)) { System.out.println("x"); panel.paintXAxis(panel.getGraphics(), xPixel, pixelsWide, pixelsHigh); } for(int i = 0; i>=0; i++) { Coordinate point1 = getPoint(i); Coordinate point2 = getPoint(i+1); if(point2 == null) { break; } else { if(point1.drawFrom() && point2.drawTo()) { int xPixel1 = (int) (xPixelStart + (point1.getX() - xyStart.getX()) * (pixelsWide / xRange)); int yPixel1 = (int) (yPixelStart + (xyStart.getY() + yRange-point1.getY()) * (pixelsHigh / yRange)); int xPixel2 = (int) (xPixelStart + (point2.getX() - xyStart.getX()) * (pixelsWide / xRange)); int yPixel2 = (int) (yPixelStart + (xyStart.getY() + yRange - point2.getY()) * (pixelsHigh / yRange)); panel.paintGraph(panel.getGraphics(), xPixel1, yPixel1, xPixel2, yPixel2); } } } frame.pack(); } } This is how i am testing it is supposed to be a square, but nothing shows up. public class GrapherTester extends XYGrapher { public Coordinate xyStart() { return new Coordinate(-2,2); } public double xRange() { return 4; } public double yRange() { return 4; } public Coordinate getPoint(int pointNum) { switch(pointNum) { case 0: return new Coordinate(-1,-1); case 1: return new Coordinate(1,-1); case 2: return new Coordinate(1,1); case 3: return new Coordinate(-1,1); case 4: return new Coordinate(-1,-1); } return null; } public static void main(String[] args) { new GrapherTester().drawGraph(100, 100, 500, 500); } } Coordinate class so if any of you want to run and try it out. That is all you would need. public class Coordinate { float x; float y; boolean drawTo; boolean drawFrom; Coordinate(double x, double y) { this.x = (float) x; this.y = (float) y; drawFrom = true; drawTo = true; } Coordinate(double x, double y, boolean drawFrom, boolean drawTo) { this.x = (float) x; this.y = (float) y; this.drawFrom = drawFrom; this.drawTo = drawTo; } public double getX() { return x; } public double getY() { return y; } public boolean drawTo() { return drawTo; } public boolean drawFrom() { return drawFrom; } }

    Read the article

  • How to apply formula to cell based on IF condition in Excel

    - by Captain Comic
    Hi I have an Excel spreadsheed like the one shown below A B 10.02.2007 10 10.03.2007 12 Column A is date and B is price of share Now in another sreadsheet I need to create a new column called return In this column i need to place formula like = ln(B2/B1) but on condition that this formula is only applied date in column A is in range StartDate < currentDate < EndDate. So I want to apply my formula only to specific period say only to 2007 year have new column placed in another spreadsheet starting from given location say A1 Please suggest

    Read the article

  • Class architecture, no friends allowed

    - by Captain Comic
    The question of why there are no friends in C# has been extensively discussed. I have the following design problems. I have a class that has only one public function AddOrder(Order ord). Clients are allowed to call only this function. All other logic must be hidden. Order class is listening to market events and must call other other function of TradingSystem ExecuteOrder, so I have to make it public as well. Doing that I will allow clients of Trading system to call this function and I don't want that. class TradingSystem { // Trading system stores list of orders List<Order> _orders; // this function is made public so that Order can call ir public ExecuteOrder(Order ord) { } // this function is made public for external clients public AddOrder(OrderRequest ordreq) { // create order and pass it this order.OnOrderAdded(this); } } class Order { TradingSystem _ts; public void OnOrderAdded(TradingSystem ts) { _ts = ts; } void OnMarketEvent() { _ts.ExecuteOrder() } }

    Read the article

  • Could not find any resources appropriate for the specified culture or the neutral culture.

    - by Captain Comic
    I have created an assembly and later renamed it. Then i started getting runtime errors when calling toolsMenuName = resourceManager.GetString(resourceName); The resourceName variable is "enTools" at runtime. Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Jfc.TFSAddIn.CommandBar.resources" was correctly embedded or linked into assembly "Jfc.TFSAddIn" at compile time, or that all the satellite assemblies required are loadable and fully signed. The code: string resourceName; ResourceManager resourceManager = new ResourceManager("Jfc.TFSAddIn.CommandBar", Assembly.GetExecutingAssembly()); CultureInfo cultureInfo = new CultureInfo(_applicationObject.LocaleID); if(cultureInfo.TwoLetterISOLanguageName == "zh") { System.Globalization.CultureInfo parentCultureInfo = cultureInfo.Parent; resourceName = String.Concat(parentCultureInfo.Name, "Tools"); } else { resourceName = String.Concat(cultureInfo.TwoLetterISOLanguageName, "Tools"); } // EXCEPTION IS HERE toolsMenuName = resourceManager.GetString(resourceName); I can see the file CommandBar.resx included in the project, i can open it and can see the "enTools" string there.

    Read the article

  • Designing WCF interface: no out or ref parameters

    - by Captain Comic
    I have a WCF service and web client. Web service implements one method SubmitOrders. This method takes a collection of orders. The problem is that service must return an array of results for each order - true or false. Marking WCF paramters as out or ref makes no sense. What would you recommend? [ServiceContact] public bool SubmitOrders(OrdersInfo) [DataContract] public class OrdersInfo { Order[] Orders; }

    Read the article

< Previous Page | 1 2 3 4  | Next Page >