Search Results

Search found 7897 results on 316 pages for 'generate'.

Page 69/316 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • Monotone-increasing Version Number based on Mercurial Commits

    - by Isaac
    When I was using subversion for the code for an application, I could append a period and the result of svnversion to the version number to create a unique and monotone-increasing version number and also be guaranteed that any check-out of the same revision of the code would generate the same version number. In Mercurial, because revision numbers are not necessarily consistent across clones, the local revision number is not suitable. The hash is appropriately unique and consistent, but does not create a number that is monotone-increasing. How can I generate a suitable number to append to the version number based on the Mercurial repository commits?

    Read the article

  • Recursive N-way merge/diff algorithm for directory trees?

    - by BobMcGee
    What algorithms or Java libraries are available to do N-way, recursive diff/merge of directories? I need to be able to generate a list of folder trees that have many identical files, and have subdirectories with many similar files. I want to be able to use 2-way merge operations to quickly remove as much redundancy as possible. Goals: Find pairs of directories that have many similar files between them. Generate short list of directory pairs that can be synchronized with 2-way merge to eliminate duplicates Should operate recursively (there may be nested duplicates of higher-level directories) Run time and storage should be O(n log n) in numbers of directories and files Should be able to use an embedded DB or page to disk for processing more files than fit in memory (100,000+). Optional: generate an ancestry and change-set between folders Optional: sort the merge operations by how many duplicates they can elliminate I know how to use hashes to find duplicate files in roughly O(n) space, but I'm at a loss for how to go from this to finding partially overlapping sets between folders and their children. EDIT: some clarification The tricky part is the difference between "exact same" contents (otherwise hashing file hashes would work) and "similar" (which will not). Basically, I want to feed this algorithm at a set of directories and have it return a set of 2-way merge operations I can perform in order to reduce duplicates as much as possible with as few conflicts possible. It's effectively constructing an ancestry tree showing which folders are derived from each other. The end goal is to let me incorporate a bunch of different folders into one common tree. For example, I may have a folder holding programming projects, and then copy some of its contents to another computer to work on it. Then I might back up and intermediate version to flash drive. Except I may have 8 or 10 different versions, with slightly different organizational structures or folder names. I need to be able to merge them one step at a time, so I can chose how to incorporate changes at each step of the way. This is actually more or less what I intend to do with my utility (bring together a bunch of scattered backups from different points in time). I figure if I can do it right I may as well release it as a small open source util. I think the same tricks might be useful for comparing XML trees though.

    Read the article

  • Problems with FileSet in Ant script?

    - by ipkiss
    Hi, I am using Ant script to generate javadoc and I just only wnt Ant to look for some classes based on a certain pattern, so I wrote: <javadoc access="public" source="1.6" sourcepath="src" destdir="dest" > <fileset dir="src" casesensitive="yes" defaultexcludes="yes"> <filename name="**/ABC*.java"/> </fileset> </javadoc> That means I only want Ant to look for source file that starts with "ABC" only and generate javadoc for these files. However, the results are awayls duplicate for each file starting with "ABC". Did I do something wrong? Thanks

    Read the article

  • New asp "showat" attribute required inconsistently in VS2010. Why?

    - by Patrick Karcher
    When I generate code using T4 templates in Visual Studio 2010, I get the following error for each of my asp controls when I try to compile: Control "ddState" is missing required attribute "showat". I have never gotten this error in previous versions of .NET. Further, I don't get this error when I manually construct my pages either by dragging/dropping, nor do I get it when I type out the control text myself. When I generate code, I have to manually add showat="client" to my tag for the compiler to be happy. It was my understanding that I never had to explicitly specify this tag. The following: <asp:dropdownlist id="ddState" runat="server" showat="client" /> solves the problem. Why do I have to add this to generated code but not other times? (It's a VS-2010 webforms project, using VB, in case that makes a difference.)

    Read the article

  • Depth First Search Basics

    - by cam
    I'm trying to improve my current algorithm for the 8 Queens problem, and this is the first time I'm really dealing with algorithm design/algorithms. I want to implement a depth-first search combined with a permutation of the different Y values described here: http://en.wikipedia.org/wiki/Eight_queens_puzzle#The_eight_queens_puzzle_as_an_exercise_in_algorithm_design I've implemented the permutation part to solve the problem, but I'm having a little trouble wrapping my mind around the depth-first search. It is described as a way of traversing a tree/graph, but does it generate the tree graph? It seems the only way that this method would be more efficient only if the depth-first search generates the tree structure to be traversed, by implementing some logic to only generate certain parts of the tree. So essentially, I would have to create an algorithm that generated a pruned tree of lexigraphic permutations. I know how to implement the pruning logic, but I'm just not sure how to tie it in with the permutation generator since I've been using next_permutation. Is there any resources that could help me with the basics of depth first searches or creating lexigraphic permutations in tree form?

    Read the article

  • Virtual pages for my plugin

    - by Fini
    Hi, I am currently in the process of making a WordPress Plugin which is going to parse some external data (products) from various web services and present them as normal pages in WordPress. I would like to avoid actually creating the pages programatically and instead just generate them on the fly to avoid any synchronization issues if a product is deleted and so forth. My plugin is going to have a base url in which it will hook on to, for example /products/, and then I would generate each product page by calling /products/some-product-name/. I also anticipate the need for uri's like /products/category/some-category-name/ which I will use to list all items in that category. Since I am new to WordPress plugin development, I am looking for some tips and advice to get me started on the right foot. Any help is highly appreciated ;)

    Read the article

  • How doe we name test methods where we are checking for more than one condition?

    - by Sandbox
    I follow the technique specified in Roy Osherove's The Art Of Unit Testing book while naming test methods - MethodName_Scenario_Expectation. It suits perfectly well for my 'unit' tests. But,for tests that I write in 'controller' or 'coordinator' class, there isn't necessarily a method which I want to test. For these tests, I generate multiple conditions which make up one scenario and then I verify the expectation. For example, I may set some properties on different instances, generate an event and then verify that my expectations from controller/coordinator is being met. Now, my controller handles events using a private event handler. Here my scenario is that, I set some properties, say 3 condition1,condition2 and condition3 Also, my scenario includes an event is raised I don't have a method name as my event handler is private. How do I name such a test method?

    Read the article

  • ldapsearch and vcard creation

    - by Aaron Hoffman
    I'm using openldap on Mac OS X Server 10.6 and need to generate a vcard for all the users in a given group. By using the ldapsearch I can list all the memberUid's for all users in that group. I found a perl script (Advanced LDAP Search or ALS) that was written by someone that will generate the vcard easily. ALS can be found here http://www.ldapman.org/tools/als.gz So what I need to do is create a wrapper script (in python or perl) that will effectively loop through the memberUid's and run the ALS command to create the vcard and append it to the file. This command provides the memberUid's: ldapsearch -x -b 'dc=ldap,dc=server,dc=com' '(cn=testgroup)' Then running ALS gives the vcard: als -b dc=ldap,dc=server,dc=com -V uid=aaronh > vcardlist.vcf If it's easier to do this using Perl since ALS is already using it that would be fine. I've done more work in python but I'm open to suggestions. Thanks in advance, Aaron

    Read the article

  • Spring 3 MVC - how to turn a form into a query string?

    - by caerphilly
    I have a simple Spring form that gets bound to a form object on post. The http POST handler does some work, and then needs to redirect to a new URL, passing the form data as querystring parameters. So, assuming I have a form backing object with properties "param1" and "param2", I want to build a string that looks something like this: redirect:/app/new/page?param1=value;param2=value Now, Spring will automatically bind values FROM a querystring or a form post into my form object, but I want to GENERATE a querystring with values taken from the form object. Obviously it's trivial to do this manually but since I'm going to have lots of different form backing objects, is there some built-in facility in Spring to generate a query string from a form object, suitable for building into a URL? Thanks.

    Read the article

  • MySQL: updating a row and deleting the original in case it becomes a duplicate

    - by Silvio Donnini
    I have a simple table made up of two columns: col_A and col_B. The primary key is defined over both. I need to update some rows and assign to col_A values that may generate duplicates, for example: UPDATE `table` SET `col_A` = 66 WHERE `col_B` = 70 This statement sometimes yields a duplicate key error. I don't want to simply ignore the error with UPDATE IGNORE, because then the rows that generate the error would remain unchanged. Instead, I want them to be deleted when they would conflict with another row after they have been updated I'd like to write something like: UPDATE `table` SET `col_A` = 66 WHERE `col_B` = 70 ON DUPLICATE KEY REPLACE which unfortunately isn't legal in SQL, so I need help finding another way around. Also, I'm using PHP and could consider a hybrid solution (i.e. part query part php code), but keep in mind that I have to perform this updating operation many millions of times. thanks for your attention, Silvio Reminder: UPDATE's syntax has problems with joins with the same table that is being updated

    Read the article

  • PHP - Looking for an HTML Generator/Manager

    - by John Himmelman
    I'm trying to find a tool that I can use to generate markup programatically (non-irl word). Here is an example of what I'm trying to accomplish in pseudo-code... $htmlDoc = new HTML_Document(); $htmlDoc->setTitle('Cool Title'); $htmlDoc->addJs('some_js_file.js'); $htmlDoc->addStylesheet('some_css_file.css'); $divElement = new HTML_Element_Div(); $htmlDoc->append('body', $divElement); $output = $htmlDoc->generate(); What is the best tool for this?

    Read the article

  • php tree structure problem

    - by agazerboy
    Hi All, I have all my data in my database. It has following 4 columns id source_clust target_clust result_clust 1 7 72 649 2 9 572 650 3 649 454 651 4 32 650 435 This data is like tree structure. source_clust and target_clust generate target_clust. target_clust can be source_clust or target_clust to make a new target_clust. Is there any php function or class that I can use to generate tree structure for my data???? I see this MySql site they are doing exactly what I need but I couldn't find how to implement that query in my data. Thanks !

    Read the article

  • Excel 2003 VSTO convert to PDF

    - by KClough
    I have an excel workbook vsto solution that needs to generate a pdf copy of one of its sheets as output. I have a license for abcdpdf .net and tried outputting to html, then using abcpdf to convert the html to pdf, but the excel html markup tries to emulate excel with all 4 worksheets with horrible markup. It also messes up the colors (silver background across entire workbook). Any suggestions? Here is the code I'm currently using to generate the html file: FileInfo excelDoc = new FileInfo(Globals.ThisWorkbook.Path + @"\Document.html"); Globals.Sheet2.SaveAs(excelDoc.FullName, Excel.XlFileFormat.xlHtml, missing, missing, false, false, Excel.XlSaveAsAccessMode.xlNoChange, missing, missing, missing); If I hack away some of the html header tags manually, I can get abcdpf to accept it, but the formatting is a bit off and this solution seems sub optimal. Thanks in advance.

    Read the article

  • Is it possible to create ICriteria/ICriterion from LINQ or HQL?

    - by adrin
    I am creating a method that can create filter understood by NHibernate (by filter i mean a set of ICriteria object for example) from my abstract filter object. public static IEnumerable<ICriterion> ToNhCriteria(this MyCriteria criteria) { // T4 generated function // lots of result.Add(Expression.Or(Expression.Eq(),Expression.Eq)) expression trees - hard to generate // Is there a way to generate HQL/Linq query here istead? } then i want to do something like session.CreateCriteria<Entity>().Add(myCriteria.ToNhCriteria()) to filter entities. The problem is that using Expression. methods (Expression.Or etc) is quite tedious (the method is generated and i have multiple or statements that have to be joined into an expression somehow). Is there a way to avoid using Expression.Or() and create ICrietrion / ICriteria using LINQ or HQL?

    Read the article

  • Visual Studio 2010 SQL Server Database Project - Ignore Stored Procedures and Functions

    - by Carter
    I really like the new SQL Server Database projects in Visual Studio 2010. I also like using the "Generate DROP statements for objects that are in the target database but that are not in the database project" option in the deployment properties. However, I do not want to manage Stored Procedures and Functions using this interface; I have another tool for that. Every time I do a build and deploy, VS will drop my stored procedures that I have created with my external program. I would like to essentially "ignore" stored procedures and functions. Is there a way to ignore stored procedures and functions when building SQL Server Database projects? I won't be able to use the "Generate DROP statements..." option if I want to use my external tool for stored procedures and functions.

    Read the article

  • MeioUpload and phpThumb() does not exist error

    - by Cameeob2003
    I am currently using CakePHP v2.2.1 and MeioUpload 4.0 along with phpThumb() to try and generate image uploads and thumbnails for those images. If i set my $actAs = array() without the thumbsizes property everything is uploaded well, but when I add the following: 'thumbsizes' => array( 'small' => array('width' => 165, 'height' => 115), 'medium' => array('width' => 800, 'height' => 600) ), to generate thumbnails I get an error stating the following: "E:/xampp/htdocs/site/vendors/phpthumb/img/posts/image-name.jpg" does not exist I have tried several different methods of fixing this from around the web and nothing seems to work. I am new to cakephp so this may be an easy fix and I am just not connecting the dots to find the solution. Any help would be very much appreciated.

    Read the article

  • creating PHP C/C++ extension modules using SWIG

    - by morpheous
    I have written some C/C++ extension modules for PHP, using the 'old fashioned way' - i.e. by using the manual way (as described by Sarah Golemon in her book). This is too fiddly for me, and since I am lazy, and would like to automate as much as possible. Also, I have used SWIG now to generate extensions to Python, and I am getting to like using it quite a lot. I am thinking of using SWIG to generate my future PHP extensions. I am using PHP v5.2 (and above) on my production servers. My questions are: Is SWIG PHP interface stable yet (i.e. ready for production)? If you answered yes to question 1 -are YOU using it in YOUR production site? Are there any 'gotchas' I need to be aware of when creating PHP extension ,modules using SWIG?

    Read the article

  • ASP.NET MVC grid/table

    - by nivlam
    public class Person { public string First { get; set; } public string Last { get; set; } public int Age { get; set; } public IEnumerable<Child> Children { get; set; } } public class Child { public string First { get; set; } public string Last { get; set; } public int Age { get; set; } } I'm searching for a way to render a table from my model, which is of type IEnumerable<Person>. I'm trying to generate the following table: <table> <tr class="person"> <td>First 1</td> <td>Last 1</td> <td>1</td> </tr> <tr class="child"> <td>First 1</td> <td>Last 1</td> <td>1</td> </tr> <tr class="child"> <td>First 2</td> <td>Last 2</td> <td>2</td> </tr> ... ... </table> Each person is a row and each of their children would be individual rows under the person row. This would repeat for each person in IEnumerable<Person>. Are there any grids or components that generate a table like this? I found MvcContrib's grid component, but it doesn't appear to be able to generate these child rows. Is there a way to extend MvcContrib's grid to do this?

    Read the article

  • Identity column SQL Server 2005 inserting same value twice

    - by DannykPowell
    I have a stored procedure that inserts into a table (where there is an identity column that is not the primary key- the PK is inserted initially using the date/time to generate a unique value). We then use SCOPEIDENTITY() to get the value inserted, then there is some logic to generate the primary key field value based on this value, which is then updated back to the table. In some situations the stored procedure is called simultaneously by more than one process, resulting in "Violation of PRIMARY KEY constraint..." errors. This would seem to indicate that the identity column is allowing the same number to be inserted for more than one record. First question- how is this possible? Second question- how to stop it...there's no error handling currently so I'm going to add some try/ catch logic- but would like to understand the problem fully to deal with properly

    Read the article

  • Amazon S3 security credentials per bucket

    - by slythic
    Hi all, I was wondering if it was possible to generate security credentials per individual Amazon S3 bucket. I am working with a developer and would like to grant him access only to the bucket we are working with. It's not a trust issue, it's more a concern that he'll delete the wrong bucket or its contents. For example: If we were working on an application that used a bucket called test-application I could generate the credentials for just that one bucket. These credentials would not allow access to other buckets in my account. Is this possible? Thanks, Tony

    Read the article

  • Tag/Keyword based recommendation

    - by Hellnar
    Hello I am wondering what algorithm would be clever to use for a tag driven e-commerce enviroment: Each item has several tags. IE: Item name: "Metallica - Black Album CD", Tags: "metallica", "black-album", "rock", "music" Each user has several tags and friends(other users) bound to them. IE: Username: "testguy", Interests: "python", "rock", "metal", "computer-science" Friends: "testguy2", "testguy3" I need to generate recommendations to such users by checking their interest tags and generating recommendations in a sophisticated way. Ideas: A Hybrid recommendation algorithm can be used as each user has friends.(mixture of collaborative + context based recommendations). Maybe using user tags, similar users (peers) can be found to generate recommendations. Maybe directly matching tags between users and items via tags. Any suggestion is welcome. Any python based library is also welcome as I will be doing this experimental engine on python language.

    Read the article

  • System.XML or Regex.Replace?

    - by cam
    I'm generating a large amount of XML documents from a set of values in an Excel file. The only thing that changes for each XML document is the values. I figured the best way to generate these documents was to make a "XML skeleton" (since the XML format never changes) and then plug in symbols like "&%blahNameblahTest", so then I could just preform a Regex.Replace on each value. I will be handing over this project to another developer and I'm wondering if I should convert the project to generate the XML file manually everytime through the System.XML namespace. The only advantages I see to this is ensuring that the XML document is valid. The current method would be more readable than that method, and way faster since I'm generating around 1500 documents.

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >