Search Results

Search found 1366 results on 55 pages for 'complexity'.

Page 33/55 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • CLI design and implementation?

    - by Majid
    I am developing a time management tool for my personal use. I prefer using keyboard over mouse, and on the interface have a general purpose text box which will act like a command line. I have just started thinking about what commands I need, what to use for the command names, how to pass in switches and parameters, and so forth. I wonder if some of you have come across a good read along these lines; something that describes the choices you have for designing a cli, and how those affect the complexity of the interpreter, and extendability of the commands. It makes no difference if the descriptions are language-specific or in general terms. However, my implementation will be with javascript. Thank you.

    Read the article

  • How to test reliability of my own (small) embedded operating system ?

    - by TridenT
    I've written a small operating system for embedded project running on small to medium target. I added some automated unit test with a high test code coverage (95%), but the scope is only the static part. I got some code metrics as complexity and readability. I'm testing my code with a rule checker with MiSRA support, and of course fixed all warnings. I'm testing the code with a static analyzer and again fixed all warnings. What can I do now to test - and improve - the reliability of my OS ? How about the dynamic part ?

    Read the article

  • How do I temporarily change the require path in Ruby ($:)?

    - by John Feminella
    I'm doing some trickery with a bunch of Rake tasks for a complex project, gradually refactoring away some of the complexity in chunks at a time. This has exposed the bizarre web of dependencies left behind by the previous project maintainer. What I'd like to be able to do is to add a specific path in the project to require's list of paths to be searched, aka $:. However, I only want that path to be searched in the context of one particular method. Right now I'm doing something like this: def foo() # Look up old paths, add new special path. paths = $: $: << special_path # Do work ... bar() baz() quux() # Reset. $:.clear $: << paths end def bar() require '...' # If called from within foo(), will also search special_path. ... end This is clearly a monstrous hack. Is there a better way?

    Read the article

  • Visual Studio Unit Testing of Windows Forms

    - by GWLlosa
    We're working on a project here in Visual Studio 2008. We're using the built-in testing suite provided with it (the Microsoft.VisualStudio.TestTools.UnitTesting namespace). It turns out, that much to our chagrin, a great deal of complexity (and therefore errors) have wound up coded into our UI layer. While our unit tests do a decent job of covering our business layer, our UI layer is a constant source of irritation. We'd ideally like to unit-test that, as well. Does anyone know of a good "Microsoft-compatible" way of doing that in visual studio? Will it introduce some sort of conflict to 'mix' unit testing frameworks like nUnitForms with the Microsoft stuff? Are there any obvious bear traps I should be aware of with unit-testing forms?

    Read the article

  • Is *not* using the asp.net membership provider a bad idea?

    - by EJB
    Is it generally a really bad idea to not use the built-in asp.net membership provider? I've always rolled my own for my asp.net apps (public facing), and really have not had any problems in doing so. It works, and seems to avoid a layer of complexity. My needs are pretty basic: once setup, the user must use email address and password to login, if they forget it, it will be emailed back to them (a new one). After setup there is little that needs to be done to each user account, but I do need to store several extra fields with each user (full name, telephone and a few other fields etc). The number of users that required login credentials are small (usually just the administrator and a few backups), and everyone else uses the site unauthenticated. What are the big advantages that I might be missing out on by skipping the asp.net membership provider functionality?

    Read the article

  • Get a value from hashtable by a part of its key

    - by htf
    Hi. Say I have a Hashtable<String, Object> with such keys and values: apple => 1 orange => 2 mossberg => 3 I can use the standard get method to get 1 by "apple", but what I want is getting the same value (or a list of values) by a part of the key, for example "ppl". Of course it may yield several results, in this case I want to be able to process each key-value pair. So basically similar to the LIKE '%ppl%' SQL statement, but I don't want to use a (in-memory) database just because I don't want to add unnecessary complexity. What would you recommend?

    Read the article

  • Low overhead Java Web Services container?

    - by trojanfoe
    I want to provide a Java-based Web Service, but I don't require the features of a full-blown J2EE Application Server. I would like it to start as quickly as possible, though that's not a hard requirement. The Web Service will handle multiple connections and require access to an Oracle database so it will at least require a thread pool and database connection pool. I may want to put a JSP interface onto it later to provide an internal maintainence interface. I have looked at Jetty with an Apache CXF stack, but it looks like I'll have to do a fair amount configuration before even coding the web service - Will it be worth it? Will it even work? Should I forget about the complexity and simply go with JBoss/Weblogic/etc and put up with the bloat and extra start-up time?

    Read the article

  • multi-dimensional ArrayList

    - by wishi
    Hi! Just a very small question... I seem to run into too much complexity here: I have to realize an index-structure like {42, someString}. I tried: Object entry[][] = new Object[1][1]; ArrayList<Object> my_list = new ArrayList<Object>(); However that looks really strange. Isn't there a better much simpler solution to just store some Integer and a String? I need to perfrom search for the Strings and return the Integer... so I thought Collections and ArrayLists are good friends in the Java API.

    Read the article

  • Explain this O(n log n) algorithm for the Cat/Egg Throwing Problem

    - by ripper234
    This problem (How many cats you need to throw out of a building in order to determine the maximal floor where such a cat will survive. Quite cruel, actually), has an accepted answer with O(n^3) complexity. The problem is equivalent to this Google Code Jam, which should be solvable for N=2000000000. It seems that the O(n^3) solution is not good enough to solve it. From looking in the solutions page, jdmetz's solution (#2) seems to be O(n log n). I don't quite understand the algorithm. Can someone explain it? Edit

    Read the article

  • One-way flight trip problem.

    - by psihodelia
    You are going on a one-way indirect flight trip that includes billions transfers. You are not stopping twice in the same airport. You have 1 ticket for each part of your trip. Each ticket contains src and dst airport. All the tickets you have are randomly sorted. You forgot the original departure airport (very first src) and your destination (last dst). Design an algorithm to reconstruct your trip with minimum big-O complexity.

    Read the article

  • Could someone give me their two cents on this optimization strategy

    - by jimstandard
    Background: I am writing a matching script in python that will match records of a transaction in one database to names of customers in another database. The complexity is that names are not unique and can be represented multiple different ways from transaction to transaction. Rather than doing multiple queries on the database (which is pretty slow) would it be faster to get all of the records where the last name (which in this case we will say never changes) is "Smith" and then have all of those records loaded into memory as you go though each looking for matches for a specific "John Smith" using various data points. Would this be faster, is it feasible in python, and if so does anyone have any recommendations for how to do it?

    Read the article

  • 0/1 Knapsack with irrational weights

    - by user356106
    Consider the 0/1 knapsack problem. The standard Dynamic Programming algorithm applies only when the capacity as well as the weights to fill the knapsack with are integers/ rational numbers. What do you do when the capacity/weights are irrational? The issue is that we can't memoize like we do for integer weights because we may need potentially infinite decimal places for irrational weights - leading to an infinitely large number of columns for the Dynamic Programming Table . Is there any standard method for solving this? Any comments on the complexity of this problem? Any heuristics? What about associated recurrences like (for example): f(x)=1, for x< sqrt(2) f(x)=f(x-sqrt(2))+sqrt(3)

    Read the article

  • Algorithm Question.. Linked List..

    - by AGeek
    Hi, Scenario is as follows:- I want to reverse the direction of the singly linked list, In other words, after the reversal all pointers should now point backwards.. Well the algorithm should take linear time. The solution that i have thought of using another datastructure A Stack.. With the help of which the singly linked list would be easily reversed, with all pointers pointing backwards.. But i am in doubt, that whether the following implementation yeild linear time complexity.. Please comment on this.. And if any other efficient algorithm is in place, then please discuss.. Thanks.

    Read the article

  • iphone app photo upload to server from app threads

    - by user290380
    I have an app that needs to upload a least 5 photos to a server using API call available with the server. For that I am planning to use threads which will take care of photo upload and the main process can go on with the navigation of views etc. What I cant decide is whether it is OK to spawn five separate threads in iphone or use a single thread that will do the upload. In the later cases obviously it will become quite slow. Basically an HTTP POST request will be made to the server with the NSMutableURLRequest object using NSCOnnection. More threads mean more complexity and sync issues, but I can try to write code as neat as possible if it means better performance than a single thread which is simple but is a real stopper if performance is considered. Anybody with any experience in this kinda app. ??

    Read the article

  • Get/save parameters to an expected JMock method call?

    - by Tayeb
    Hi, I want to test an "Adapter" object that when it receives an xml message, it digest it to a Message object, puts message ID + CorrelationID both with timestamps and forwards it to a Client object.=20 A message can be correlated to a previous one (e.g. m2.correlationID =3D m1.ID). I mock the Client, and check that Adapter successfully calls "client.forwardMessage(m)" twice with first message with null correlationID, and a second with a not-null correlationID. However, I would like to precisely test that the correlationIDs are set correctly, by grabing the IDs (e.g. m1.ID). But I couldn't find anyway to do so. There is a jira about adding the feature, but no one commented and it is unassigned. Is this really unimplemented? I read about the alternative of redesigning the Adapter to use an IdGenerator object, which I can stub, but I think there will be too many objects.=20 Don't you think it adds unnecessary complexity to split objects to a so fine granularity? Thanks, and I appreciate any comments :-) Tayeb

    Read the article

  • Given a number N, find the number of ways to write it as a sum of two or more consecutive integers

    - by hilal
    Here is the problem (Given a number N, find the number of ways to write it as a sum of two or more consecutive integers) and example 15 = 7+8, 1+2+3+4+5, 4+5+6 I solved with math like that : a + (a + 1) + (a + 2) + (a + 3) + ... + (a + k) = N (k + 1)*a + (1 + 2 + 3 + ... + k) = N (k + 1)a + k(k+1)/2 = N (k + 1)*(2*a + k)/2 = N Then check that if N divisible by (k+1) and (2*a+k) then I can find answer in O(N) time Here is my question how can you solve this by dynamic-programming ? and what is the complexity (O) ? P.S : excuse me, if it is a duplicate question. I searched but I can find

    Read the article

  • Inserting asyncronously into Oracle, any benefits?

    - by Karl Trumstedt
    I am using ODP.NET for loading data into Oracle. I am bulking inserts into groups of a 1000 rows each call. Is there any performance benefits in calling my load method asynchronously? So say I want to insert 10000 rows, instead of making 10 calls synchronously I make 10 calls asynchronously. My database is using ASSM right now but otherwise plenty of freelists are used of course. The database server has several cores as well. My initial tests seem to point to a performance increase, but maybe there is something I cannot see? Potential deadlock or contention issues? Of course, there is added complexity in handling transactions and such doing my load this way.

    Read the article

  • Port a Rails App from Windows to Mac

    - by Ryan Max
    Hello I've been a Rails developer on Windows for quite some time now, but I recently completed my biggest project yet (it's quite extensive, took me over a year to build) but I am having trouble deploying it. The combination of it's size, complexity and a windows environment is making it needlessly complex to deploy. I am thinking about getting an old mac mini and using it just for rails development. Is there any way I can port my app to this mac, without having to start over? I can't find any resources on the internets about this.

    Read the article

  • Recursive Functions for Beginners?

    - by cam
    I'm looking for a few recursive function examples, preferably ones that show increase in complexity. I understand basic recursive functions, but I'm having trouble implementing them in my code. I've never used them in my code before, and I know it doesn't always call for it, but I'd like to try. Is there a good resource with examples, and maybe challenges of some sort? Or even some simple math problems (Project Euler-style?) that I could use recursion on? For examples, I prefer C#, but anything works.

    Read the article

  • finding the total number of distinct shortest paths between 2 nodes in undirected weighted graph in linear time?

    - by logan
    I was wondering, that if there is a weighted graph G(V,E), and I need to find a single shortest path between any two vertices S and T in it then I could have used the Dijkstras algorithm. but I am not sure how this can be done when we need to find all the distinct shortest paths from S to T. Is it solvable on O(n) time? I had one more question like if we assume that the weights of the edges in the graph can assume values only in certain range lets say 1 <=w(e)<=2 will this effect the time complexity?

    Read the article

  • ASP NET forms Authorization: how to reduce duration?

    - by eddo
    I've got a web page which is implementing cookie based ASPNET Forms Authentication. Once the user has logged in the page, he can edit some information using a form which is created using a partialview and returned to him as a dialog for editing. The action linked to the partial view is decorated as follows: [HttpGet] [OutputCache(Duration = 0, VaryByParam = "None")] [Authorize(Roles = "test")] public ActionResult changeTripInfo(int tripID, bool ovride=false) { ... } The problem i am experiencing is the latency between the request and the time when the dialog is shown to the user: time ranges between 800 and 1100 ms which is not justified by the complexity of the form. Investigating with Glimpse turns out that the time to process the AuthorizeAttribute (see snip) sums up to at least 650 ms which is troubling me. Looking at the Sql server log, the call which checks the user roles takes, as expected, virtually nothing (duration 0). How can I reduce this time? Am I missing some optimization?

    Read the article

  • What kind of work benifits from OpenCL

    - by Daniel
    Hey All First of all: I am well aware that OpenCL does not magically make everything faster I am well aware that OpenCL has limitations So now to my question, i am used to do different scientific calculations using programming. Some of the things i work with is pretty intense in regards to the complexity and number of calculations. SO i was wondering, maybe i could speed things up bu using OpenCL. So, what i would love to hear from you all is answers to some of the following [bonus for links]: *What kind of calculations/algorithms/general problems is suitable for OpenCL *What is the general guidelines for determining if some particular code would benefit by migration to OpenCL? Regards

    Read the article

  • Non-trivial desktop apps that use Ruby?

    - by Mark A. Nicolosi
    I'm about to start a project developing a Ruby desktop application. I expect to to be fairly big and I want to learn techniques for dividing code among modules and other techniques for managing complexity. Most large apps I've looked at are Rails apps, but these aren't very helpful, because most of the work is done by Rails itself. What source code would you recommend I take a look at? I'm not interested in libraries or Rails apps, because I get how they do things. CLI apps are OK, but I'm mostly interested in GUI apps (I'm using Gtk+, but I can learn just as much from apps using other GUI toolkits).

    Read the article

  • How much faster are register based architectures than stack architectures?

    - by drozzy
    Studying compilers course, I am left wondering why use registers at all. It is often the case that the caller or callee must save the register value and then restore it. In a way they always end up using the stack anyway. Is creating additional complexity by using registers really worth it? Excuse my ignorance. Update: Please, I know that registers are faster than RAM and other types of cache. My main concern is that one has to "save" the value that is in the register and the "restore" it to. In both cases we are accessing some kind of cache. Would it not be better to use cache in the first place?

    Read the article

  • Sorting array of 1000 distinct integers in the range [1, 5000], accessing each element at most once

    - by Cronydevil
    Suppose you have an array of 1000 integers. The integers are in random order, but you know each of the integers is between 1 and 5000 (inclusive). In addition, each number appears only once in the array. Assume that you can access each element of the array only once. Describe an algorithm to sort it. How i can sorting? If you used auxiliary storage in your algorithm, can you find an algorithm that remains O(n) space complexity?

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >