Search Results

Search found 10046 results on 402 pages for 'repository pattern'.

Page 7/402 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Print a string that contains a certain pattern in Java

    - by jjpotter
    I am trying to find a regular expression within a line of a .csv file, so I can eventually save all the matches to another file, and lose all the other junk. So a line in my file might look like: MachineName,User,IP,VariableData,Location The VariableData is what I want to match, and if there's a match, print the line. I am using a pattern for this because I only want 3 out of 10 of variations of VariableData, and out of those 3, they are numbered differently(example, "pc104, pccrt102, pccart65"). I am trying to do this using the Scanner Class and keeping it simple as possible so I can understand it. Here is where I was heading with this...(the pattern isn't complete, just have it like this for testing). import java.io.File; import java.util.Scanner; import java.util.regex.Pattern; public class pcv { public static void main(String[] args) { File myFile = new File("c:\\temp\\report.csv"); Pattern myPat = Pattern.compile("pc"); try{ Scanner myScan = new Scanner(myFile); while(myScan.hasNext()){ if(myScan.hasNext(myPat)){ System.out.println("Test"); } } }catch(Exception e){ } } } This code loops, im guessing the .hasNext() methods are resetting themselves. I've played around with the Matcher class a little bit, but only found a way to match the expression but not get the whole line. My other throught was maybe somehow count the line that contains the pattern, then go back and print the line that corresponds to the counts.

    Read the article

  • Grid Infrastructure Management Repository (GIMR) database now mandatory in Oracle GI 12.1.0.2

    - by Mike Dietrich
    During the installation of Oracle Grid Infrastructure 12.1.0.1 you've had the following option to choose YES/NO to install the Grid Infrastructure Management Repository (GIMR) database MGMTDB: With Oracle Grid Infrastructure 12.1.0.2 this choice has become obsolete and the above screen does not appear anymore. The GIMR database has become mandatory.  What gets stored in the GIMR? See the documentation here See the changes in Oracle Clusterware 12.1.0.2 here: Automatic Installation of Grid Infrastructure Management Repository The Grid Infrastructure Management Repository is automatically installed with Oracle Grid Infrastructure 12c release 1 (12.1.0.2). The Grid Infrastructure Management Repository enables such features as Cluster Health Monitor, Oracle Database QoS Management, and Rapid Home Provisioning, and provides a historical metric repository that simplifies viewing of past performance and diagnosis of issues. This capability is fully integrated into Oracle Enterprise Manager Cloud Control for seamless management. Furthermore what the doc doesn't say explicitly: The -MGMTDB has now become a single-tenant deployment having a CDB with one PDB This will allow the use of a Utility Cluster that can hold the CDB for a collection of GIMR PDBs When you've had already an Oracle 12.1.0.1 GIMR this database will be destroyed and recreated Preserving the CHM/OS data can be acchieved with OCULMON to dump it out into node view The data files associated with it will be created within the same disk group as OCR and VOTING  In a future release there may be an option offered to put in into a separate disk group Some important MOS Notes: MOS Note 1568402.1FAQ: 12c Grid Infrastructure Management Repository, states there's no supported procedure to enable Management Database once the GI stack is configured MOS Note 1589394.1How to Move GI Management Repository to Different Shared Storage(shows how to delete and recreate the MGMTDB) MOS Note 1631336.1Cannot delete Management Database (MGMTDB) in 12.1 -Mike

    Read the article

  • Entity Framework Generic Repository Error

    - by Jeff Ancel
    I am trying to create a very generic generics repository for my Entity Framework repository that has the basic CRUD statements and uses an Interface. I have hit a brick wall head first and been knocked over. Here is my code, written in a console application, using a Entity Framework Model, with a table named Hurl. Simply trying to pull back the object by its ID. Here is the full application code. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.Objects; using System.Linq.Expressions; using System.Reflection; using System.Data.Objects.DataClasses; namespace GenericsPlay { class Program { static void Main(string[] args) { var hs = new HurlRepository(new hurladminEntity()); var hurl = hs.Load<Hurl>(h => h.Id == 1); Console.Write(hurl.ShortUrl); Console.ReadLine(); } } public interface IHurlRepository { T Load<T>(Expression<Func<T, bool>> expression); } public class HurlRepository : IHurlRepository, IDisposable { private ObjectContext _objectContext; public HurlRepository(ObjectContext objectContext) { _objectContext = objectContext; } public ObjectContext ObjectContext { get { return _objectContext; } } private Type GetBaseType(Type type) { Type baseType = type.BaseType; if (baseType != null && baseType != typeof(EntityObject)) { return GetBaseType(type.BaseType); } return type; } private bool HasBaseType(Type type, out Type baseType) { Type originalType = type.GetType(); baseType = GetBaseType(type); return baseType != originalType; } public IQueryable<T> GetQuery<T>() { Type baseType; if (HasBaseType(typeof(T), out baseType)) { return this.ObjectContext.CreateQuery<T>("[" + baseType.Name.ToString() + "]").OfType<T>(); } else { return this.ObjectContext.CreateQuery<T>("[" + typeof(T).Name.ToString() + "]"); } } public T Load<T>(Expression<Func<T, bool>> whereCondition) { return this.GetQuery<T>().Where(whereCondition).First(); } public void Dispose() { if (_objectContext != null) { _objectContext.Dispose(); } } } } Here is the error that I am getting: System.Data.EntitySqlException was unhandled Message="'Hurl' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly., near escaped identifier, line 3, column 1." Source="System.Data.Entity" Column=1 ErrorContext="escaped identifier" ErrorDescription="'Hurl' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly." This is where I am attempting to extract this information from. http://blog.keithpatton.com/2008/05/29/Polymorphic+Repository+For+ADONet+Entity+Framework.aspx

    Read the article

  • GIT repository layout for server with multiple projects

    - by Paul Alexander
    One of the things I like about the way I have Subversion set up is that I can have a single main repository with multiple projects. When I want to work on a project I can check out just that project. Like this \main \ProductA \ProductB \Shared then svn checkout http://.../main/ProductA As a new user to git I want to explore a bit of best practice in the field before committing to a specific workflow. From what I've read so far, git stores everything in a single .git folder at the root of the project tree. So I could do one of two things. Set up a separate project for each Product. Set up a single massive project and store products in sub folders. There are dependencies between the products, so the single massive project seems appropriate. We'll be using a server where all the developers can share their code. I've already got this working over SSH & HTTP and that part I love. However, the repositories in SVN are already many GB in size so dragging around the entire repository on each machine seems like a bad idea - especially since we're billed for excessive network bandwidth. I'd imagine that the Linux kernel project repositories are equally large so there must be a proper way of handling this with Git but I just haven't figured it out yet. Are there any guidelines or best practices for working with very large multi-project repositories?

    Read the article

  • Linq to SQL and concurrency with Rob Conery repository pattern

    - by David Hall
    I have implemented a DAL using Rob Conery's spin on the repository pattern (from the MVC Storefront project) where I map database objects to domain objects using Linq and use Linq to SQL to actually get the data. This is all working wonderfully giving me the full control over the shape of my domain objects that I want, but I have hit a problem with concurrency that I thought I'd ask about here. I have concurrency working but the solution feels like it might be wrong (just one of those gitchy feelings). The basic pattern is: private MyDataContext _datacontext private Table _tasks; public Repository(MyDataContext datacontext) { _dataContext = datacontext; } public void GetTasks() { _tasks = from t in _dataContext.Tasks; return from t in _tasks select new Domain.Task { Name = t.Name, Id = t.TaskId, Description = t.Description }; } public void SaveTask(Domain.Task task) { Task dbTask = null; // Logic for new tasks omitted... dbTask = (from t in _tasks where t.TaskId == task.Id select t).SingleOrDefault(); dbTask.Description = task.Description, dbTask.Name = task.Name, _dataContext.SubmitChanges(); } So with that implementation I've lost concurrency tracking because of the mapping to the domain task. I get it back by storing the private Table which is my datacontext list of tasks at the time of getting the original task. I then update the tasks from this stored Table and save what I've updated This is working - I get change conflict exceptions raised when there are concurrency violations, just as I want. However, it just screams to me that I've missed a trick. Is there a better way of doing this? I've looked at the .Attach method on the datacontext but that appears to require storing the original version in a similar way to what I'm already doing. I also know that I could avoid all this by doing away with the domain objects and letting the Linq to SQL generated objects all the way up my stack - but I dislike that just as much as I dislike the way I'm handling concurrency.

    Read the article

  • Repository pattern with lazying loading using POCO

    - by Simon G
    Hi, I'm in the process of starting a new project and creating the business objects and data access etc. I'm just using plain old clr objects rather than any orms. I've created two class libraries: 1) Business Objects - holds all my business objects, all this objects are light weight with only properties and business rules. 2) Repository - this is for all my data access. The majority of my objects will have child list in and my question is what is the best way to lazy load these values as I don't want to bring back unnecessary information if I dont need to. I've thought about when using the "get" on the child property to check if its "null" and if it is call my repository to get the child information. This has two problems from what I can see: 1) The object "knows" how to get itself I would rather no data access logic be held in the object. 2) This required both classes to reference each other which in visual studio throws a circular dependency error. Does anyone have any suggestions on how to overcome this issue or any recommendations on my projects layout and where it can be improved? Thanks

    Read the article

  • Repository Pattern Standardization of methods

    - by Nix
    All I am trying to find out the correct definition of the repository pattern. My original understanding was this (extremely dubmed down) Separate your Business Objects from your Data Objects Standardize access methods in data access layer. I have really seen 2 different implementations. Implementation 1 : public Interface IRepository<T>{ List<T> GetAll(); void Create(T p); void Update(T p); } public interface IProductRepository: IRepository<Product> { //Extension methods if needed List<Product> GetProductsByCustomerID(); } Implementation 2 : public interface IProductRepository { List<Product> GetAllProducts(); void CreateProduct(Product p); void UpdateProduct(Product p); List<Product> GetProductsByCustomerID(); } Notice the first is generic Get/Update/GetAll, etc, the second is more of what I would define "DAO" like. Both share an extraction from your data entities. Which I like, but i can do the same with a simple DAO. However the second piece standardize access operations I see value in, if you implement this enterprise wide people would easily know the set of access methods for your repository. Am I wrong to assume that the standardization of access to data is an integral piece of this pattern ? Rhino has a good article on implementation 1, and of course MS has a vague definition and an example of implementation 2 is here.

    Read the article

  • Simple Oracle File repository with folder hierarchy

    - by Ope
    I have an application that stores large amount of files (XML and binary) in folder hierarchies. Currently the main method is storing them in file system or using a legacy CMS, which we want to get rid of. The CMS supports Oracle and a customer wants to keep the files in Oracle because of enterprise policies (backup etc.) The question is: Is there a simple implementation of file repository with folder hierarchy for Oracle? What I am looking for is a small .Net component or example code (PL/SQL and/or .Net) that would have the following methods: Create, Delete, Exists Folder CRUD file Move and potentially Copy file or directory Access to files and folders with paths like "/root/folder1/folder2/file.xml" Ability to get all the files and folders in a folder and potentially also the entire directory tree Tree traversal, getting the parent, all children etc. needs to be fast. I need the implementation in .Net, but if it was just the stored procedures, I could create the .Net calling code. I have pointers to generic articles for creating hierarchies in DB, so if I need to do it from scratch, I know where to start. What I am asking here, is there already an implementation that I could take without doing this from scratch? It seems like such a generic requirement... If the answer is a CMS, Document management system or such it should be Open Source or at least quite cheap (some hundreds / server) and it should be possible to deploy it XCopy - hopefully only couple of DLL:s. I do not need - or want - a full featured big CMS with dozens of dlls and especially not an msi-installation. I have tried to google this, but the words "repository", "CMS", "file hierarchy" etc. give so many answers, the searches are pretty much useless. Thanks, OPe

    Read the article

  • What should I do when the GETDEB repository is down?

    - by 13east
    I'm trying to install programs/files from the getdeb repo but get a "check your internet connection" error. Programs than I've tried include Qbittorrent and Mozilla-Plugin-VLC. Through the terminal I get the following errors: Err http://archive.getdeb.net/ubuntu/ natty-getdeb/apps qbittorrent amd64 2.8.2-1~getdeb2 Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) E: Failed to fetch http://archive.getdeb.net/ubuntu/pool/apps/q/qbittorrent/qbittorrent_2.8.2-1~getdeb2_amd64.deb: Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) & Err http://archive.getdeb.net/ubuntu/ natty-getdeb/apps mozilla-plugin-vlc amd64 1.1.10-1~getdeb1 Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) E: Failed to fetch http://archive.getdeb.net/ubuntu/pool/apps/v/vlc/mozilla-plugin-vlc_1.1.10-1~getdeb1_amd64.deb: Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) I'm not having any problems adding/removing other programs/files from my machine. Is there a problem with GETDEB repo (and if so, is there any way to fix it on my end) or is there something wrong with my computer's configuration?

    Read the article

  • Etiquette for adding repository during rpm/deb install

    - by Craig Peterson
    We're distributing a commercial application for Linux and we currently make it available for download as a .tar.gz, a .rpm, and a .deb. We're setting up both RPM and DEB repositories to make upgrading easier. Is it appropriate to add our repository to /etc/apt/sources.list or /etc/yum.repos.d automatically as part of the initial install? Are there any good reasons not to?

    Read the article

  • Repository organization for Hadoop project

    - by Alex N.
    I am starting on a new Hadoop project that will have multiple hadoop jobs(and hence multiple jar files). Using mercurial for source control, I was wondering what would be optimal way of organizing the repository structure? Should each job live in separate repo or would it be more efficient to keep them in the same, but break down into folders?

    Read the article

  • Does using msysgit lead to repository corruption?

    - by randomusing
    While stumbling through the chromium code documentation, I came across this post: http://code.google.com/p/chromium/wiki/UsingGit#Windows If you are using msysgit, you are asking for trouble. Using both msysgit (including TortoiseGit) and cygwin's version of git is a path to lead to repository corruption so it's safer to stick with the cygwin's version. So if you still have msysgit in your PATH, you are on your own. Does this really happen? What causes the corruption?

    Read the article

  • Selective Checkout or a View, on a project in repository

    - by Yossi Zach
    I have a bunch of interconnected projects which share the same project tree. I'm looking for a version control system which provides a possibility to checkout a subset of the project tree. If my the full project tree looks like this: Project Root |-Feature1 | |-SubFeature11 | \-SubFeature12 |-Feature2 | |-SubFeature21 | \-SubFeature22 |-file1 \-file2 I want be able to checkout only subset like this: Project Root |-Feature1 | \-SubFeature12 |-Feature2 | \-SubFeature22 |-file1 \-file2 So do you know any version control system that allows to do selective checkout or a view on a repository?

    Read the article

  • How should I structure my repository classes?

    - by Innogetics
    I am new to DDD. In my mini-project, I have a structure that looks like this (different from the actual names): EntryClassificationGroup EntryClassification Entry EntryType Should I have just one repository class for all these 4 entities, since they are all related? Or should I have individual repositories for each one?

    Read the article

  • How does one mirror a maven repository?

    - by Randy
    Our company would like to mirror our Maven 2 Repository inside of the Amazon network. What software should one use to do this? We have looked into a Wagon-S3 but that sort of functionality is not desirable... we want the artifacts to already be present when we are ready for a build.

    Read the article

  • Repository Pattern : Add Item

    - by No Body
    Just need to clarify this one, If I have the below interface public interface IRepository<T> { T Add(T entity); } when implementing it, does checking for duplication if entity is already existing before persist it is still a job of the Repository, or it should handle some where else?

    Read the article

  • OLL Live webcast - Using SQL for Pattern Matching in Oracle Database

    - by KLaker
    If you are interested in learning about our exciting new 12c SQL pattern matching feature then mark your diaries. On Wednesday, October 30th at 8:00 am (US/Pacific time zone) Supriya Ananth, who is one of our top curriculum developers at Oracle, will be hosting an OLL webcast on our new SQL pattern matching feature. The ability to recognize patterns in a sequence of rows has been a capability that was widely desired, but not possible with SQL until now. Row pattern matching in native SQL improves application and development productivity and query efficiency for row-sequence analysis. With Oracle Database 12c you can use the new MATCH_RECOGNIZE clause to perform pattern matching in SQL to do the following: Logically partition and order the data using the PARTITION BY and ORDER BY clauses Use regular expressions syntax to define patterns of rows to seek using the PATTERN clause. These patterns a powerful and expressive feature, applied to the pattern variables you define. Specify the logical conditions required to map a row to a row pattern variable in the DEFINE clause. Define measures, which are expressions usable in the MEASURES clause of the SQL query. For more information and to register for this exciting webcast please visit the OLL Live website, see here: https://apex.oracle.com/pls/apex/f?p=44785:145:116820049307135::::P145_EVENT_ID,P145_PREV_PAGE:461,143.  Please note - if the above link does not work then go to OLL (https://apex.oracle.com/pls/apex/f?p=44785:1:) and click the OLL Live icon (upper right, beneath the Login link or logout link if you are already logged in). The pattern matching webcast is listed on the calendar of events on 30 October.

    Read the article

  • pattern matching in .Net consistent with IsolatedStorageFile.GetFileNames() pattern matching

    - by Mick N
    Is the pattern matching logic used by this API exposed for reuse somewhere in the .Net Framework? Something of the form FilePatternMatch( string searchPattern, stringfileNameToTest ) is what I'm looking for. I'm implementing a temporary workaround for WP7 not filtering the results for this overload and I'd like the solution to both provide a consistent experience and avoid reinventing this functionality if it is exposed. If the behaviour is not exposed for reuse, a regular expression solution (like glob pattern matching in .NET) will suffice and would save me spending the time to test the fine details of what the behaviour should be. Perhaps one of the answers posted in the thread linked above is correct. Since I haven't confirmed the exact behaviour as yet, I wasn't able to determine this at a glance. Feel free to point me to one of those answers if you know it is behaviouraly an exact match to the API referenced in the question title. I could assume the pattern matching is consistent with how DOS handled * and ? in 8.3 file names (I'm familiar with behavioural nuances of that implementation), but it's reasonable to assume Microsoft has evolved pattern matching behaviour for file names in the decade+ since so I thought I would check before proceeding on that assumption.

    Read the article

  • Lua pattern matching vs. regular expressions

    - by harald
    hello, i'm currently learning lua. regarding pattern-matching in lua i found the following sentence in the lua documentation on lua.org: Nevertheless, pattern matching in Lua is a powerful tool and includes some features that are difficult to match with standard POSIX implementations. as i'm familiar with posix regular expressions i would like to know if there are any common samples where lua pattern matching is "better" compared to regular expression -- or did i misinterpret the sentence? and if there are any common examples: why is any of pattern-matching vs. regular expressions better suited? thanks very much, harald

    Read the article

  • Numerical Pattern Matching

    - by Timothy Strimple
    A project I'm researching requires some numerical pattern matching. My searches haven't turned up many relevant hits since most results tend to be around text pattern matching. The idea is we'll have certain wave patterns we'll need to be watching for and trying to match incoming data vs the wave database we will be building. Here is and example of one of the wave patterns we'll need to be matching against. There is clearly a pattern there, but the peaks will not have the exact same values, but the overall shape of the wave iterations will be very similar. Does anyone have any advice on how to go about storing and later matching these patterns, and / or other search terms I can use to find more information on the subject of pattern matching? Thanks, Tim.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >