Search Results

Search found 874 results on 35 pages for 'simulate'.

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

  • A Simulator for a non-deterministic Push-Down Automaton

    - by shake
    Well, i need to make simulator for non-deterministic Push-Down Automaton. Everything is okey, i know i need to do recursion or something similar. But i do not know how to make that function which would simulate automaton. I got everything else under control, automaton generator, stack ... I am doing it in java, so this is maybe only issue that man can bump on, and i did it. So if anyone have done something similar, i could use advices. This is my current organisation of code: C lasses: class transit: list -contains non deterministic transitions state input sign stack sign class generator it generate automaton from file clas NPA public boolean start() - this function i am having trouble with Of course problem of separate stacks, and input for every branch. I tried to solve it with collection of objects NPA and try to start every object, but it doesn work :((..

    Read the article

  • VB .NET Shared Function if called multiple times simultaneously

    - by Mehdi Anis
    Consider I have a shared function:- Public Shared Function CalculateAreaFromRadius(ByVal radius As Double) As Double ' square the radius... Dim radiusSquared As Double radiusSquared = radius * radius ' multiply it by pi... Dim result As Double result = radiusSquared * Math.PI 'Wait a bit, for the sake of testing and 'simulate another call will be made b4 earlier one ended or such for i as Integer = 0 to integer.Max Next ' return the result... Return result End Function My Questions: If I have two or more threads in the same vb .net app and each of them calls the shared function at the same time with different RADIUS, will they each get their own AREA? I want to know for each call to the function if it is using same local variables or each call creates new instances of local variables? Will the answers to above questions be same If I have multiple (2+) single threaded apps and they all call the function at the same time with different RADIUS value? I will appreciate your reponse. Thank you.

    Read the article

  • Publish failed in Web Application Project (MVC)

    - by Stuck
    I usually use the "Publish" feature in VS 2008 to get the correct files and so on that I can publish to my website. But from time to time publish fails without any good error message at all. I know that it can be a couple of different reasons but I am starting to grow really tired with this now. Can anyone teach me how to build the website from the command line? As I said it is a MVC project. Can I use the aspnet_compiler for this? What parameters should I use to simulate the same behavior as a "Publish"?

    Read the article

  • C++ Memory Allocation & Linked List Implementation

    - by pws5068
    I'm writing software to simulate the "first-fit" memory allocation schema. Basically, I allocate a large X megabyte chunk of memory and subdivide it into blocks when chunks are requested according to the schema. I'm using a linked list called "node" as a header for each block of memory (so that we can find the next block without tediously looping through every address value. head_ptr = (char*) malloc(total_size + sizeof(node)); if(head_ptr == NULL) return -1; // Malloc Error .. :-( node* head_node = new node; // Build block header head_node->next = NULL; head_node->previous = NULL; // Header points to next block (which doesn't exist yet) memset(head_ptr,head_node, sizeof(node)); ` But this last line returns: error: invalid conversion from 'node*' to 'int' I understand why this is invalid.. but how can I place my node into the pointer location of my newly allocated memory?

    Read the article

  • 2d parabolic projectile

    - by ndg
    I'm looking to create a basic Javascript implementation of a projectile that follows a parabolic arc (or something close to one) to arrive at a specific point. I'm not particularly well versed when it comes to complex mathematics and have spent days reading material on the problem. Unfortunately, seeing mathematical solutions is fairly useless to me. I'm ideally looking for pseudo code (or even existing example code) to try to get my head around it. Everything I find seems to only offer partial solutions to the problem. In practical terms, I'm looking to simulate the flight of an arrow from one location (the location of the bow) to another. It strikes me there are two distinct problems here: determining the position of interception between the projectile and a (moving) target, and then calculating the trajectory of the projectile. Any help would be greatly appreciated.

    Read the article

  • is there such a thing as xsl:fo reporting or xsl:fo simulation?

    - by topmulch
    Hi, I am trying to determine if MY xsl:fo generated PDF file will exceed one page or not, without actually generating the output. We use Apache-FOP 0.95 on our server, and the XML data is being generated using a PHP DOMDocument class before being passed onto an XSL-FO template. My question: Are there PHP libraries out there that can simulate xsl:fo output and send me reports that I can use in my application? Alternatively, is there a way for the Apache FOP itself (or sibling Java app) that sends reports without actually generating a file? I have been reading the FOP documentation, and aside from some things I can not fully understand, I have not been able to find a way to do that from within FOP. Any advice is much appreciated.

    Read the article

  • How can I calculate the sum of all positive integers less than n? [closed]

    - by Adrian Godong
    I have the following function: f(n) = f(n - 1) + (n - 1) f(0) = 0 n >= 0 I have n declared on column A, and need the result of f(n) on column B. I'm trying to find the Excel formula equivalent for this function. Sample Result: A | B --+-- 0 | 0 or: A | B --+-- 1 | 0 or: A | B --+-- 4 | 6 but never: A | B --+-- 0 | 0 1 | 0 2 | 1 ... The biggest problem is, I can't simulate the value of f(n - 1). So referencing the previous row like the above example is invalid. I'm almost sure the answer is trivial, I just can't find it.

    Read the article

  • Python json memory bloat

    - by Anoop
    import json import time from itertools import count def keygen(size): for i in count(1): s = str(i) yield '0' * (size - len(s)) + str(s) def jsontest(num): keys = keygen(20) kvjson = json.dumps(dict((keys.next(), '0' * 200) for i in range(num))) kvpairs = json.loads(kvjson) del kvpairs # Not required. Just to check if it makes any difference print 'load completed' jsontest(500000) while 1: time.sleep(1) Linux top indicates that the python process holds ~450Mb of RAM after completion of 'jsontest' function. If the call to 'json.loads' is omitted then this issue is not observed. A gc.collect after this function execution does releases the memory. Looks like the memory is not held in any caches or python's internal memory allocator as explicit call to gc.collect is releasing memory. Is this happening because the threshold for garbage collection (700, 10, 10) was never reached ? I did put some code after jsontest to simulate threshold. But it didn't help.

    Read the article

  • Hebbian learning

    - by Bane
    I have asked another question on Hebbian learning before, and I guess I got a good answer which I accepted, but, the problem is that I now realize that I've mistaken about Hebbian learning completely, and that I'm a bit confused. So, could you please explain how it can be useful, and what for? Because the way Wikipedia and some other pages describe it - it doesn't make sense! Why would we want to keep increasing the weight between the input and the output neuron if the fire together? What kind of problems can it be used to solve, because when I simulate it in my head, it certainly can't do the basic AND, OR, and other operations (say you initialize the weights at zero, the output neurons never fire, and the weights are never increased!)

    Read the article

  • Programmatically login to a website and redirect the user to the logged in page?

    - by Santhosh
    Hi, Right now, I have all the employees of my company login to an external website using the company id, username and a password. We are trying to integrate it into an intranet portal which should provide seamless access to this website without requiring the user to enter these credentials. Is there any way of doing this programmatically (.NET C#)? Very similar to screenscraping, Can I simulate the appropriate POST action and then redirect the user to the logged in page? Any help is appreciated. Thanks.

    Read the article

  • How to do concurrent modification testing for grails application

    - by werner5471
    I'd like to run tests that simulate users modifying certain data at the same time for a grails application. Are there any plug-ins / tools / mechanisms I can use to do this efficiently? They don't have to be grails specific. It should be possible to fire multiple actions in parallel. I'd prefer to run the tests on functional level (so far I'm using Selenium for other tests) to see the results from the user perspective. Of course this can be done in addition to integration testing if you'd recommend to run concurrent modification tests on integration level as well.

    Read the article

  • How do I compile variadic templates conditionally?

    - by FredOverflow
    Is there a macro that tells me whether or not my compiler supports variadic templates? #ifdef VARIADIC_TEMPLATES_AVAILABLE template<typename... Args> void coolstuff(Args&&... args); #else ??? #endif If they are not supported, I guess I would simulate them with a bunch of overloads. Any better ideas? Maybe there are preprocessor libraries that can ease the job?

    Read the article

  • BDD-testing using a UI driver (e.g. Selenium for a web-application)

    - by jonathanconway
    Can BDD (Behavior Driven Design) tests be implemented using a UI driver? For example, given a web application, instead of: Writing tests for the back-end, and then more tests in Javascript for the front-end Should I: Write the tests as Selenium macros, which simulate mouse-clicks, etc in the actual browser? The advantages I see in doing it this way are: The tests are written in one language, rather than several They're focussed on the UI, which gets developers thinking outside-in They run in the real execution environment (the browser), which allows us to Test different browsers Test different servers Get insight into real-world performance Thoughts?

    Read the article

  • Is it possible to show the download progress of a flash file?

    - by Ólafur Waage
    I know how to setup a preloader and I have that working. But when I debug the flash application and simulate a download, it has a blank background until a few seconds have passed. I know it is "downloading" the swf file and I'm wondering if I can show a progress bar for that, or do I need to have the swf file as small as possible and pre load everything needed and have all assets as a separate file I fetch? I found something with ProgressEvent.PROGRESS but this only loads after the flash file is finished downloading.

    Read the article

  • producing a typewriter-like effect

    - by Tony Ennis
    Android newb here. Please use small words :-) I'd like to simulate typewriter output on my Android. The output being displayed is generated by a game and is somewhat freeform. The effect I want to see individual characters appear at a rate of about 6 characters a second. When a 'carriage return' is seen, I'd like to insert a delay then resume typing on the left. What are some suggestions on views? Would the view of choice for this be a TextView? Even that seems like overkill for this read-only coarsely scrolling output. I saw something on this thread about an AsyncTask. That looks useful. Perhaps my game will write to some manner of buffer, and a subclass of AsyncTask will pull characters out every .15 seconds or so, add them to the TextView, then invalidate() the TextView? Sound like a plan?

    Read the article

  • what practical proofs are there about the Turing completeness of neural nets? what nns can execute c

    - by Albert
    I'm interested in the computational power of neural nets. It is generally accepted that recurrent neural nets are Turing complete. Now I was searching for some papers which proofs this. What I found so far: Turing computability with neural nets, Hava T. Siegelmann and Eduardo D. Sontag, 1991 I think this is only interesting from a theoretical point of view because it needs to have the neuron activity of infinite exactness (to encode the state somehow as a rational number). S. Franklin and M. Garzon, Neural computability This needs an unbounded number of neurons and also doesn't really seem to be that much practical. (Note that another question of mine tries to point out this kind of problem between such theoretical results and the practice.) I'm searching mostly for some neural net which really can execute some code which I can also simulate and test in practice. Of course, in practice, they would have some kind of limited memory. Does anyone know something like this?

    Read the article

  • How to force delete cookies even if one window is still open?

    - by medopal
    Apparently in IE8, there is this option 'Preserve Favorites website data', even if I uncheck it the browser will still keep the cookies until the last window is closed. Problem scenario. say I logged in to somesite.com, then without out logging out, I closed the window, but there was still another IE8 window open. In this case IE8 will keep the cookies of this site. So If I opened the site again (same window or another) the site won't ask for login info. The client wants the web application to be logged off as soon as the user closes the browser. Can I force delete the cookies IE8 is saving? or maybe I can stop the user from closing the window until I simulate a click on logout button?

    Read the article

  • Embedded MongoDB when running integration tests

    - by seanhodges
    My question is a variation of this one. Since my Java Web-app project requires a lot of read filters/queries and interfaces with tools like GridFS, I'm struggling to think of a sensible way to simulate MongoDB in the way the above solution suggests. Therefore, I'm considering running an embedded instance of MongoDB alongside my integration tests. I'd like it to start up automatically (either for each test or the whole suite), flush the database for every test, and shut down at the end. These tests might be run on development machines as well as the CI server, so my solution will also need to be portable. Can anyone with more knowledge on MongoDB help me get idea of the feasibility of this approach, and/or perhaps suggest any reading material that might help me get started? I'm also open to other suggestions people might have on how I could approach this problem...

    Read the article

  • How can i handle mouse double click event on textbox?

    - by Kar Cheng
    Hello, I want to open one child window on mouse double click of textbox. I know the only event available in Silverlight is MouseLeftButtonDown and you have to simulate double click. However it still doesn't work when i click in the middle of the textbox. It only works when i double click on the border of the textbox. Anybody has any ideas of how can i do this? If any 3rd party library is available then also it's fine. Thanks in advance:)

    Read the article

  • Submit jQuery UI dialog on <Enter>

    - by CMB
    I have a jQuery UI dialog box with a form. I would like to simulate a click on one of the dialog's buttons so you don't have to use the mouse or tab over to it. In other words, I want it to act like a regular GUI dialog box where simulates hitting the "OK" button. I assume this might be a simple option with the dialog, but I can't find it in the jQuery UI documentation. I could bind each form input with keyup() but didn't know if there was a simpler/cleaner way. Thanks.

    Read the article

  • POST and multiple submit buttons on form (iphone)

    - by Jonathan
    NSString *reqURL = [NSString stringWithFormat:@"%@/login",SERVER_URL]; NSMutableURLRequest *req = [[NSMutableURLRequest alloc]initWithURL:[NSURL URLWithString:reqURL]]; [req setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"content-type"]; NSData *myRequestData = [NSData dataWithBytes:[@"username=whatever&password=whatever" UTF8String] length: [@"username=whatever&password=whatever" length]]; [req setHTTPMethod: @"POST"]; [req setHTTPBody: myRequestData]; NSData *returnData = [NSURLConnection sendSynchronousRequest:req returningResponse: nil error: nil]; NSString *html = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; I got this code from another question I asked. But what happens if there is more than one submit button. I really have no idea how to ask this question. An example of such situation is on the logout page for this site. There are no fields to enter data into, but there are 2 submit buttons. How can I "simulate clicking" on one of those buttons using code like the above (so not using a UIWebView)

    Read the article

  • Is this safe on a production server?

    - by Camran
    I have a database application (or search engine) which is called Solr. I connect to it via port 8983. I do this from php code, so I add and remove records from it via php. On my server I have a firewall. I have set this firewall to only allow connections to and from this port (8983) from the ip adress of my own server. In other words, only allow servers IP to access this port. Is that safe? Or am I thinking all wrong here? Will others be able to "simulate" my ip adress and act as the server? This is because otherwise others may add/remove records as they want from their own ip adresses... Thanks

    Read the article

  • Reliably converting C preprocessor macros to python code

    - by manual-manuel
    Hi, I have a bunch of C macros the operation of which I need to simulate in python. I saw some pointers to pygccxml or ctypeslib etc. Are these the ways to go ? Or is there something out there that is better ? The C macros if and when they change, I would like the python implementation to be auto generated rather than having to make manual modifications. Hence the question. <my_c_header.h> /* #defines type 1 */ #ifdef OS #define NUM_FLAGS (uint16_t)(3) #define NUM_BITS (uint16_t)(8) #else #define NUM_FLAGS (uint16_t)(6) #define NUM_BITS (uint16_t)(16) #endif #define MAKE_SUB_FLAGS (uint16_t)((1<<NUMFLAGS) -1) #define MAKE_TOTAL_FLAGS(x) (uint16_t)((x & MAKE_SUB_FLAGS) >> NUM_BITS) /* #defines type 2 */ #ifdef OS #DO_SOMETHING(X) os_specifc_process(x) #else #DO_SOMETHING(x) #endif /* #defines type 3 */ enum { CASE0, CASE1, CASE2 } #define MY_CASE_0 ((uint16_t)CASE0) #define MY_CASE_1 ((uint16_t)CASE1) #define MY_CASE_2 ((uint16_t)CASE2) #define /*End of file <my_c_header.h> */ Thanks M

    Read the article

  • Silverlight unit testing (using NUnit)

    - by 1gn1ter
    I'm using NUnit for testing back-end. Unit tests are being executed while building (I'm using TeamCity for continuous building). Now I hove to test front-end (Silverlight 4.0). Because the tests are being executed while building, I have to simulate browser (TypeMock - is not free, isn't it?) could I use NUnit.Mocks somehow?. How to use NUnit for Silverlight testing? I've found WHITE framework could it help? Any other advises about software/frameworks to use for Silverlight unit testing?

    Read the article

  • Fusion charts free on Ruby on Rails

    - by Kiran
    Hi i am using Fusion charts free with Rail 2.3.5 I tried to simulate the single_array example provided in the documentation but instead of graph it is showing me the following message The method used is setDataXML.The XML is #Creates xml with values for sales data of products #along with their names. #The values required for building the xml is obtained as parameter arr_data #It expects an array in which each element is #itself an array with first element as label and second element as value xml = Builder::XmlMarkup.new xml.graph(:caption='Sales by Product', :numberPrefix='$', :formatNumberScale='0',:decimalPrecision='0') do for item in arr_data xml.set(:name=item[0], :value=item[1],:color=''+get_FC_color) end end Anybody seen this message before ? i am using Firefox with flash player 9

    Read the article

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