Search Results

Search found 185 results on 8 pages for 'eli sand'.

Page 5/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • Where would you document standardized complex data that is passed between many objects and methods?

    - by Eli
    Hi All, I often find myself with fairly complex data that represents something that my objects will be working on. For example, in a task-list app, several objects might work with an array of tasks, each of which has attributes, temporal expressions, sub tasks and sub sub tasks, etc. One object will collect data from web forms, standardize it into a format consumable by the class that will save them to the database, another object will pull them from the database, put them in the standard format and pass them to the display object, or the update object, etc. The data itself can become a fairly complex series of arrays and sub arrays, representing a 'task' or list of tasks. For example, the below might be one entry in a task list, in the format that is consumable by the various objects that will work on it. Normally, I just document this in a file somewhere with an example. However, I am thinking about the best way to add it to something like PHPDoc, or another standard doc system. Where would you document your consumable data formats that are for many or all of the objects / methods in your app? Array ( [Meta] => Array ( //etc. ) [Sched] => Array ( [SchedID] => 32 [OwnerID] => 2 [StatusID] => 1 [DateFirstTask] => 2011-02-28 [DateLastTask] => [MarginMonths] => 3 ) [TemporalExpressions] => Array ( [0] => Array ( [type] => dw [TemporalExpID] => 3 [ord] => 2 [day] => 6 [month] => 4 ) [1] => Array ( [type] => dm [TemporalExpID] => 32 [day] => 28 [month] => 2 ) ) [Task] => Array ( [SchedTaskID] => 32 [SchedID] => 32 [OwnerID] => 2 [UserID] => 5 [ClientID] => 9 [Title] => Close Prior Year [Body] => [DueTime] => ) [SubTasks] => Array ( [101] => Array ( [SchedSubTaskID] => 101 [ParentST] => [RootT] => 32 [UserID] => 2 [Title] => Review Profit and Loss by Class [Body] => [DueDiff] => 0 ) [102] => Array ( [SchedSubTaskID] => 102 [ParentST] => [RootT] => 32 [UserID] => 2 [Title] => Review Balance Sheet [Body] => [DueDiff] => 0 ) [103] => Array ( [SchedSubTaskID] => 103 [ParentST] => [RootT] => 32 [UserID] => 2 [Title] => Review Current Year for Prior Year Expenses to Accrue [Body] => Look at Journal Entries that are templates as well. [DueDiff] => 0 ) [104] => Array ( [SchedSubTaskID] => 104 [ParentST] => [RootT] => 32 [UserID] => 2 [Title] => Review Prior Year Membership from 11/1 - 12/31 to Accrue to Current Year [Body] => [DueDiff] => 0 ) [105] => Array ( [SchedSubTaskID] => 105 [ParentST] => [RootT] => 32 [UserID] => 2 [Title] => Enter Vacation Accrual [Body] => [DueDiff] => 0 ) [106] => Array ( [SchedSubTaskID] => 106 [ParentST] => 105 [RootT] => 32 [UserID] => 2 [Title] => Email Peter requesting Vacation Status of Employees at Year End [Body] => We need Employee Name, Rate and Days of Vacation left to use. We also need to know if the employee used any of the prior year's vacation. [DueDiff] => 43 ) [107] => Array ( [SchedSubTaskID] => 107 [ParentST] => [RootT] => 32 [UserID] => 2 [Title] => Grants Receivable at Year End [Body] => [DueDiff] => 0 ) [108] => Array ( [SchedSubTaskID] => 108 [ParentST] => 107 [RootT] => 32 [UserID] => 2 [Title] => Email Peter Requesting if there were and Grants Receivable at year end [Body] => [DueDiff] => 43 ) ) )

    Read the article

  • Shortest distance between a point and a line segment

    - by Eli Courtwright
    I need a basic function to find the shortest distance between a point and a line segment. Feel free to write the solution in any language you want; I can translate it into what I'm using (Javascript). EDIT: My line segment is defined by two endpoints. So my line segment AB is defined by the two points A (x1,y1) and B (x2,y2). I'm trying to find the distance between this line segment and a point C (x3,y3). My geometry skills are rusty, so the examples I've seen are confusing, I'm sorry to admit.

    Read the article

  • Reading files using Windows API

    - by Eli Polonsky
    Hi I'm trying to write a console program that reads characters from a file. i want it to be able to read from a Unicode file as well as an ANSI one. how should i address this issue? do i need to programatically distinguish the type of file and read acoordingly? or can i somehow use the windows API data types like TCHAR and stuff like that. The only differnce between reading from the files is that in Unicode i have to read 2 bytes for a character and in ASNSI its 1 byte? im a little lost with this windows API. would appretiate any help thanks

    Read the article

  • Get pointer to member function from within member function in C++

    - by Eli
    Currently in the program I am attempting to write I need to be able to get a pointer to a member function within a member function of the same class. The pointer needs to be passed to a function as a void (*)(). Example: //CallFunc takes a void (*)() argument class testClass { public: void aFunc2; void aFunc1; } void testClass:aFunc2(){ callFunc(this.*aFunc1); // How should this be done? } void testClass:aFunc1(){ int someVariable = 1; } I'm trying to do this in GCC 4.0.1. Also, the member function being called can't be static because it references non-static variables in the class that it is part of.

    Read the article

  • How to access core data objects from Javascript?

    - by Eli
    How can I gain access to Core Data objects from Javascript/WebKit on Mac OS X? I've made custom subclasses of NSManagedObject for each of my tables, with accessors defined using @property/@dynamic for each attribute, but neither isSelectorExcludedFromWebScript: or isKeyExcludedFromWebScript: is called for any of them, so Javascript just stops when I try to access any of the attributes. It returns 'undefined' if I access it as a property (eg business.name ) and javascript execution stops if I access it as a function (eg business.name() ).

    Read the article

  • Recommended Python publish/subscribe/dispatch module ?

    - by Eli Bendersky
    From PyPubSub: Pypubsub provides a simple way for your Python application to decouple its components: parts of your application can publish messages (with or without data) and other parts can subscribe/receive them. This allows message "senders" and message "listeners" to be unaware of each other: one doesn't need to import the other a sender doesn't need to know "who" gets the messages, what the listeners will do with the data, or even if any listener will get the message data. similarly, listeners don't need to worry about where messages come from. This is a great tool for implementing a Model-View-Controller architecture or any similar architecture that promotes decoupling of its components. There seem to be quite a few Python modules for publishing/subscribing floating around the web, from PyPubSub, to PyDispatcher to simple "home-cooked" classes. Can you recommend a module that works well in most cases ? Which modules have you had positive experience with ? Negative ? Thanks in advance

    Read the article

  • nginx - redirect a certain path to another domain

    - by Eli
    Hey there. I am very unfamiliar with nginx, as a forewarning, and also can't find any actual references on the regex system they use. So right now it's a black box to me. All I want to do is redirect a user trying to go to www.mydomain.com/mydirectory/X to www.myotherdomain.com/X . Seems like I should be using the rewrite command but the syntax of the regex is eluding me. Thanks in advance.

    Read the article

  • Measuring CPU time per-thread on Windows

    - by Eli Courtwright
    I'm developing a long-running multi-threaded Python application for Windows, and I want the process to know the CPU time that each of its threads has taken. I can get the overall times for the entire process with os.times() but I need to know the per-thread times. I know that there are external tools such as the Sysinternals Process Explorer, but my program itself needs to have this information. If I were on Linux, I look in the /proc filesystem, as described here. If I were writing C code, I'd use the GetThreadTimes call, as described here. So how can I accomplish this on Windows using Python?

    Read the article

  • How to perform a non-polymorphic HQL query in Hibernate?

    - by Eli Acherkan
    Hi all, I'm using Hibernate 3.1.1, and in particular, I'm using HQL queries. According to the documentation, Hibernate's queries are polymorphic: A query like: from Cat as cat returns instances not only of Cat, but also of subclasses like DomesticCat. How can I query for instances of Cat, but not of any of its subclasses? I'd like to be able to do it without having to explicitly mention each subclass. I'm aware of the following options, and don't find them satisfactory: Manually filtering the instances after the query, OR: Manually adding a WHERE clause on the discriminator column. It would make sense for Hibernate to allow the user to decide whether a query should be polymorphic or not, but I can't find such an option. Thanks in advance!

    Read the article

  • Change a select list display value upon selecting description

    - by eli
    Hello, I would like a select list that does the following: When the select list is open, display the list of descriptions. When the user selects an item, the select list will close an only the value will be displayed. The reason for this is to conserve space as the values will be much shorter. I'm hoping that there's an answer in jQuery. Thanks.

    Read the article

  • Python Desktop Application with the Browser as an interface?

    - by Eli
    I want to create an application that runs on the users computer, a stand-alone application, with installation and what-not, but I want the interface to be a browser, either internal and displayed as an OS window or external accessible using the browser (i.e. some http server). The reason would be because I know a little about Python, but I think I can manage as long as I have some basic roots that I can use and manipulate, and those would be HTML, CSS, and Javascript. I've yet to find a good GUI tool which I can use, and always abandon the idea after trying to mess around and eventually not getting anything.

    Read the article

  • testng multiple suites

    - by Eli
    Hi people. my problem is as follows: i am testing a web-ui using selenium and testng. i have a test suite with many test classes in it. i have a method with the @BeforeSuite witch also has a @Parameters annotation, this method recieves as a parameter the browser in witch the selenium will test by run,executing the lines: selenium = new DefaultSelenium("localhost", 4444, **browser**, "http://localhost:8099"); selenium.start(); the xml im using to run the test suite is: <suite name="suite"> <parameter name = "browser" value = "*firefox"/> <test name="allTests"> <classes> <class name="test.webui.MemcachedDeploymentTest" /> </classes> </test> </suite> this works fine and the test runs in firefox. my problem is that i would like to somehow run this suite again, immediatly after the first run finishes, but this time with chrome as the browser. i now have 2 xml suites, one with chrome and one with firefox, is there any way to run these test suites one after the other automatically? maybe using a third xml? Thanks in advance

    Read the article

  • Have you switched from CodeIgniter to Kohana?

    - by Eli
    Hi All, I usually just work with straight PHP, but want to try MVC and see if a framework will really speed up development. After much waffling, analysis paralysis, and many dumb SO questions, I thought I had settled on CodeIgniter for my next PHP project. However, I am now seriously considering Kohana. Has anyone made the switch from CI to Kohana? If so, why? What's better about the actual code, libraries, etc? Edit: Hi All, I did end up going with Kohana. It's easy to use, but more importantly, it's easy NOT to use, since there are a lot of things I like to work with native PHP for. It's ridiculously extensible, well coded, and seems like it is beginning to pull out ahead of CI in a few things like putting views in views, passing subview data, etc. I am sure CI will catch up, but Kohana should be 3 steps ahead by then =o)

    Read the article

  • Correct formulation of the A* algorithm

    - by Eli Bendersky
    Hello, I'm looking at definitions of the A* path-finding algorithm, and it seems to be defined somewhat differently in different places. The difference is in the action performed when going through the successors of a node, and finding that a successor is on the closed list. One approach (suggested by Wikipedia, and this article) says: if the successor is on the closed list, just ignore it Another approach (suggested here and here, for example) says: if the successor is on the closed list, examine its cost. If it's higher than the currently computed score, remove the item from the closed list for future examination. I'm confused - which method is correct ? Intuitively, the first makes more sense to me, but I wonder about the difference in definition. Is one of the definitions wrong, or are they somehow isomorphic ?

    Read the article

  • Event for "end edit" in a text box

    - by eli.rodriguez
    I am using a textbox in winform (c#) and using the text of to make consults in a database. But i need constantly consult the text of the textbox every time that text change. So for these i use the KeyUp. But this event is too slow. Is any event that just fire when the textbox editing has been finished ?. I consider for finish 2 conditions The control lost focus. The control has 200ms without keypress

    Read the article

  • iPhone - Make loadView entries fill up parent view?

    - by Eli
    I have a loadView call that basically places one view at the top (like a header) and one at the bottom (like a footer). It's possible via a passed in parameter to not have a header or a footer, to hide them later, or to resize the view. I have all this working, but it's very susceptible to breaking because the views can go in various places of various sizes and all must be manually set to the correct size or they will not use up all the space. I want one in between the two of them that automatically resizes to fill whatever space is not taken by the others. loadView doesn't seem to be able to obtain the size of its parent's frame (or where it's being fit in, exactly), nor do I see an obvious way to just put the center view at a certain position and have its width and height automatically adapted. Any ideas? If I'm not explaining myself well enough and you know Java Swing, think BorderLayout with a BorderLayout.NORTH, BorderLayout.SOUTH, and BorderLayout.CENTER component.

    Read the article

  • Sorting datatable column by day name

    - by Eli
    Hi, I have a datatable with day name column. I want to sort this column by day name e.g. if I have [Friday, Monday,Sunday] sorting should return [Monday ,Friday, Sunday] (ascending) and [Sunday,Friday, Monday] (descending). I tried to use custom sorting but I wasn't able to represent my custom order. Do you have ideas ? Thanks

    Read the article

  • Shortest distance between a point and a line segment

    - by Eli Courtwright
    I need a basic function to find the shortest distance between a point and a line segment. Feel free to write the solution in any language you want; I can translate it into what I'm using (Javascript). EDIT: My line segment is defined by two endpoints. So my line segment AB is defined by the two points A (x1,y1) and B (x2,y2). I'm trying to find the distance between this line segment and a point C (x3,y3). My geometry skills are rusty, so the examples I've seen are confusing, I'm sorry to admit.

    Read the article

  • in c# are methods private by default?

    - by Eli Perpinyal
    If I have a method that does not specify its Accessibility Level will it be Private by default? void Item_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { throw new NotImplementedException(); } Is the above method private?

    Read the article

  • Python style: multiple-line conditions in IFs

    - by Eli Bendersky
    Hello, Sometimes I break long conditions in IFs to several lines. The most obvious way to do this is: if (cond1 == 'val1' and cond2 == 'val2' and cond3 == 'val3' and cond4 == 'val4'): do_something Isn't very very appealing visually, because the action blends with the conditions. However, it is the natural way using correct Python indentation of 4 spaces. Edit: By the way, for the moment I'm using: if ( cond1 == 'val1' and cond2 == 'val2' and cond3 == 'val3' and cond4 == 'val4'): do_something Not very pretty, I know :-) Can you recommend an alternative way ?

    Read the article

  • Attribute to skip over statement in unit test c#

    - by Eli Perpinyal
    I am looking to skip a certain statement in my unit tests eg: if (MessageBox.Show("Are you sure you want to remove " + contact.CompanyName + " from the contacts?", "Confirm Delete", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.Yes) == MessageBoxResult.Yes) is there an attribute i can place above the statement to avoid the unit test executing it?

    Read the article

  • Modulus PHP Problem

    - by Eli
    I have a problem, I am trying to calculate what the lowest prime is of a number but I do not understand the result that PHP is giving me. If I have this number $number = 600851475143; Then I modulus it: $primes = array( 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97); foreach($primes as $key=>$value) { if($number % $value == 0 ) {echo $value; break; } } Why is it that $value = 3? If $value = 3, that means that 600851475143 / 3 should be an integer, but its not. So I do not understand why that if() evaluates to true?

    Read the article

  • JQuery: Current, Well-Formatted, Printable Documentation?

    - by Eli
    Hi All, I'm looking for a current (1.2), well-formatted, printable version of the jQuery documentation. I've checked the alternative resources page and see the PDF versions from CF and Java, but both are out of date. The jQuery site has the API browser with "Printable Version" in the toolbox, but it prints terribly, and I don't really want to print one page or tab at a time. I have a hard time believing that there is no print doc for a tool this popular - all I want is a simple listing with descriptions and examples ON PAPER. Am I missing something? I can buy one of the books if I need to, but not sure which is for the current version. Thanks! Update: I can see that somebody voted this down. I know it's a pretty basic question, but it is not asked lightly or frivolously. I have made a pretty solid effort to find this on my own, and am pretty good at finding information when I need it. Perhaps the person who thought the question not worth asking knows where to find the print doc?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >