Search Results

Search found 2327 results on 94 pages for 'reverse geocoding'.

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

  • Standard Workflow when working with JPA

    - by jschoen
    I am currently trying to wrap my head around working with JPA. I can't help but feel like I am missing something or doing it the wrong way. It just seems forced so far. What I think I know so far is that their are couple of ways to work with JPA and tools to support this. You can do everything in Java using annotations, and let JPA (whatever implementation you decide to use) create your schema and update it when changes are made. You can use a tool to reverse engineer you database and generate the entity classes for you. When the schema is updated you have to regenerate these classes, or manually update them. There seems to be drawbacks to both, and benefits to both (as with all things). My question is in an ideal situation what is the standard workflow with JPA? Most schemas will require updates during the maintenance phase and especially during the development phase, so how is this handled?

    Read the article

  • rewrite a function using only pointer increment/decrement

    - by Richard Nguyen
    can anyone help me rewrite the function i wrote below using only points and pointer increment/decrement? I dont have much experience with pointer so I dont know what to do. void reverse(char * s) { int i, l = strlen(s); char c; for(i = 0; i < (l >> 1); i++) { c = s[i]; s[i] = s[l - i - 1]; s[l - i - 1] = c; } } do not use pointer arithmetic or array notation. any help or hint on how to rewrite the function above is appriciated. Thanks!

    Read the article

  • Is there an existing algorithm for this notation translation/conversion?

    - by John
    A system has a notation that would require writing an expression like (A+B)*C as #MUL(#ADD(A,B),C). Is there already an algorithm to do this kind of notation conversion so users can enter in a more conventional way? In other words an algorithm to convert from infix - my notation. First issue is I don't know an exact name for my notation... it's similar to reverse-polish but not quite. Every operator is encoded as a function taking arguments.

    Read the article

  • How to make a table view which can be scrolled for ever?

    - by mystify
    I have a set of 100 rows, pretty similar to values which can be selected in a picker. When the user scrolls the table, I want the rows to be appended like an forever-ongoing assembly-belt. So when the user scrolls down and reaches the row 100, and scrolls even further, the table view will show again row 1, and so on. Reverse direction same thing. My thoughts: don't display scroll indicators (they would make not much sense, probably) what value to return in the numberOfRows delegate method? This infinity constant? in cellForRowAtIndexPath: simply wrap the index around when it exceeds bounds?

    Read the article

  • Using :limit and :order in the associated model

    - by r2b2
    Hello, Is there any way i can limit the results of an associated model? This what i was trying to do : <ul> <% account.logins.slice(0,5).sort_by(&:login_date).reverse.each do |login| -%> <li><%=h login.login_date.strftime("%d.%m.%Y")%></li> <% end -%> </ul> I'm trying to get the last five logins of the account. I cant seem to do it with account.logins(:limit=5) Thanks !

    Read the article

  • Restricting access to a website by IP address range / domain

    - by test
    Hi, I would like advice on the best way to restrict access to a weba pplication (using .net 2.0 and II6) based on the clients IP address. The two ways I am considering: 1) Through the server side code - check the client I.P against a list of IP addresses within the web.config. 2) Through IIS by creating a virtual directory and restricting the I.P addresses on this virtual directory. My question is if I go the virtual directory route there are a lot of users that access this website and I have read reverse domain lookups made during each client request can be very expensive on server resources. How much of a risj is this? Any other suggestions /ideas to doing this would be much appreciated Thanks advance,

    Read the article

  • Java Hibernate id auto increment

    - by vinise
    Hy I'v a little problem with hibernate on netbeans. I've a table with an Auto increment id : CREATE TABLE "DVD" ( "DVD_ID" INT not null primary key GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), "TITLE" VARCHAR(150), "COM" LONG VARCHAR, "COVER" VARCHAR(150) ); But this auto increment is not properly detected with Reverse Engineering. I get a map file with this : <id name="dvdId" type="int"> <column name="DVD_ID" /> <generator class="assigned" /> </id> i've looked on google and on this site ... foud some stuf but i'm still stuck.. i've tried to add insert="false" update="false" on the map file but i get back : Caused by: org.xml.sax.SAXParseException: Attribute "insert" must be declared for element type "id". Anny help will be pleased Vincent

    Read the article

  • How to wrap Plone authentication around a third-party servlet?

    - by smocking
    We're using Plone to serve up some third-party middle-ware. Unfortunately the middle-ware has a particular servlet that gets invoked from a Java applet and doesn't do any kind of authentication. I would like to firewall this off and somehow wrap authentication around it, preferably using the existing session that users will have on Plone. My first idea was to configure nginx (which we're using as the reverse proxy) to check the cookie and only proxy if the user has a valid session (along the lines of this example). However, how to check the session ID against Plone, since it's all stored in the Zope database? Alternatively we could have a Plone python script that basically passes everything along to the back-end after authenticating, but I'm not sure how to do that. Any suggestions? Or alternative ideas?

    Read the article

  • Branch structure for a web site

    - by steve_d
    I was recently reading the TFS Branching Guide and it suggests a branch for every release. For a web site, there is only one "version" released at a time. In that case is it appropriate to have a single "Production" branch? Then, during the process of preparing for a release, you merge changes from the Main branch into Production. (As opposed to the suggestion to branch each release.) If you need to do a hotfix, do it in the Production branch, then reverse integrate into Main. Doing it this way allows you to keep configuration files for Production intact in the Production branch.

    Read the article

  • Is there a way to undo Mocha stubbing of any_instance?

    - by Steve Weet
    Within my controller specs I am stubbing out valid? for some routing tests, (based on Ryan Bates nifty_scaffold) as follows :- it "create action should render new template when model is invalid" do Company.any_instance.stubs(:valid?).returns(false) post :create response.should render_template(:new) end This is fine when I test the controllers in isolation. I also have the following in my model spec it "is valid with valid attributes" do @company.should be_valid end Again this works fine when tested in isolation. The problem comes if I run spec for both models and controllers. The model test always fails as the valid? method has been stubbed out. Is there a way for me to remove the stubbing of any_instance when the controller test is torn down. I have got around the problem by running the tests in reverse alphabetic sequence to ensure the model tests run before the controllers but I really don't like my tests being sequence dependant.

    Read the article

  • Weblogic server lib VS instance libext

    - by Sebastien Lorber
    Hello, I use weblogic 10. Its provide an Oracle JDBC driver 10.2.0.2 (in the server/lib on weblogic home). Actually someone at work put a long time ago a 10.2.0.3 driver in instance libext folder. But in production we got a jdbc driver stack (nullpointer :O) and by reverse engineering it seems we are using driver 10.2.0.2. We know that we could change the driver in the server/lib of weblogic but i want to understand. Isn't libext supposed to override server libs like META-INF libs override libext? By the way we are in a strange situation: - We have 2 EAR, and for the exact same treatment in those 2, one will sometime throw the oracle driver nullpointer while the other doesn't - I wonder if one ear isn't using 10.2.0.2 while the other is using 10.2.0.3 (i saw a bug fixed that could fit to our problem for this version). - I need to look better but at first sight both ear use the exact same datasource set in weblogic JNDI resources Any idea?

    Read the article

  • What we call this kind of chaining in C#

    - by Thinking
    Can you please tell me what kind of construct in C# is this. Code Golf: Numeric equivalent of an Excel column name C.WriteLine(C.ReadLine() .Reverse() .Select((c, i) => (c - 64) * System.Math.Pow(26, i)) .Sum()); Though I am new to C# (only two months exp so far), but since the time I have joined a C# team, I have never seen this kind of chaining. It really attracted me and I want to learn more about it. Please give some insight about this.

    Read the article

  • Why doesn't infinite recursion hit a stack overflow exception in F#?

    - by Amazingant
    I know this is somewhat the reverse of the issue people are having when they ask about a stack overflow issue, but if I create a function and call it as follows, I never receive any errors, and the application simply grinds up a core of my CPU until I force-quit it: let rec recursionTest x = recursionTest x recursionTest 1 Of course I can change this out so it actually does something like this: let rec recursionTest (x: uint64) = recursionTest (x + 1UL) recursionTest 0UL This way I can occasionally put a breakpoint in my code and see the value of x is going up rather quickly, but it still doesn't complain. Does F# not mind infinite recursion?

    Read the article

  • List of divisors of an integer n (Haskell)

    - by Code-Guru
    I currently have the following function to get the divisors of an integer: -- All divisors of a number divisors :: Integer -> [Integer] divisors 1 = [1] divisors n = firstHalf ++ secondHalf where firstHalf = filter (divides n) (candidates n) secondHalf = filter (\d -> n `div` d /= d) (map (n `div`) (reverse firstHalf)) candidates n = takeWhile (\d -> d * d <= n) [1..n] I ended up adding the filter to secondHalf because a divisor was repeating when n is a square of a prime number. This seems like a very inefficient way to solve this problem. So I have two questions: How do I measure if this really is a bottle neck in my algorithm? And if it is, how do I go about finding a better way to avoid repetitions when n is a square of a prime?

    Read the article

  • SQL query to print mirror labels

    - by Eric
    I want to print labels in words as returned by a SQL query such as follow. 1 2 3 4 5 6 When I want to print the reverse of those labels, I have to print them as follow 3 2 1 6 5 4 In my real case, I have 5 colums by 2 rows, how can I formulate my query so that my records are ordered like the second one. The normal ordering is handled by word, so my query is like SELECT * FROM Products ORDER BY Products.id I'm using MS Access =( EDIT : Just to make it clear I'd like my records to be ordered such as 3 2 1 6 5 4 9 8 7 12 11 10 EDIT2 : my table looks like this ID ProductName 1 Product1 2 Product2 3 Product3 n Product[n] I want the ids to be returned as I mentioned above

    Read the article

  • How do I restrict the WCF service called by an ASP.NET AJAX page to only allow calls for that page?

    - by NovaJoe
    I have an AjaxControlToolkit DynamicPopulate control that is updated by calls to a WCF service. I know I can check the HttpContext in the service request to see if a user of the page (and thus, the control) is authenticated. However, I don't want anyone clever to be able to call the service directly, even if they're logged in. I want access to the service to be allowed ONLY to requests that are made from the page. Mainly, I don't want anyone to be able to programatically make a large number of calls and then reverse-engineer the algorithm that sits behind the service. Any clever ideas on how this can be done? Maybe I'm over-thinking this? Thanks in advance.

    Read the article

  • regex: trim all strings directly preceeded by digit except if string belongs to predefined set of st

    - by Geert-Jan
    I've got addresses I need to clean up for matching purposes. Part of the process is trimming unwanted suffices from housenumbers, e.g: mainstreet 4a --> mainstreet 4. However I don't want: 618 5th Ave SW --> 618 5 Ave SW in other words there are some strings (for now: st, nd, rd, th) which I don't want to strip. What would be the best method of doing this (regex or otherwise) ? a wokring regex without the exceptions would be: a = a.replaceAll("(^| )([0-9]+)[a-z]+($| )","$1$2$3"); //replace 1a --> 1 I thought about first searching and substiting the special cases with special characters while keeping the references in a map, then do the above regex, and then doing the reverse substitute using the reference map, but I'm looking for a simpler solution. Thanks

    Read the article

  • EF 4.x generated entity classes (POCO) and Map files

    - by JBeckton
    I have an MVC 4 app that I am working on and using the code first implementation except I cheated a bit and created my database first then generated my entity classes (poco) from my database using the EF power tools (reverse engineer). I guess you can say I did database first method but I have no edmx file just the context class and my entity classes (poco) I have a few projects in the works using MVC and EF with pocos but just the one project I used the tool to generate my pocos from the database. My question is about the mapping files that get created when I generate my pocos using the tool. What is the purpose of these Map files? I figured the map files are needed when generating the db from the model like with the true code first method, in my case where I am using a tool to generate my model from the database do the map files have any influence on how my app uses the entity classes?

    Read the article

  • Database Design Question: GUID + Natural Numbers

    - by Alan
    For a database I'm building, I've decided to use natural numbers as the primary key. I'm aware of the advantages that GUID's allow, but looking at the data, the bulk of row's data were GUID keys. I want to generate XML records from the database data, and one problem with natural numbers is that I don't want to expose my database key's to the outside world, and allow users to guess "keys." I believe GUID's solve this problem. So, I think the solution is to generate a sparse, unique iD derived from the natural ID (hopefully it would be 2-way), or just add an extra column in the database and store a guid (or some other multibyte id) The derived value is nicer because there is no storage penalty, but it would be easier to reverse and guess compared to a GUID. I'm (buy) curious as to what others on SO have done, and what insights they have.

    Read the article

  • Trimming a vector of strings

    - by dreamlax
    I have an std::vector of std::strings containing data similar to this: [0] = "" [1] = "Abc" [2] = "Def" [3] = "" [4] = "Ghi" [5] = "" [6] = "" How can I get a vector containing the 4 strings from 1 to 4? (i.e. I want to trim all blank strings from the start and end of the vector): [0] = "Abc" [1] = "Def" [2] = "" [3] = "Ghi" Currently, I am using a forward iterator to make my way up to "Abc" and a reverse iterator to make my way back to "Ghi", and then constructing a new vector using those iterators. This method works, but I want to know if there is an easier way to trim these elements. P.S. I'm a C++ noob. Edit Also, I should mention that the vector may be composed entirely of blank strings, in which case a 0-sized vector would be the desired result.

    Read the article

  • Is there a way to refactor this javascript/jquery?

    - by whyzee
    switch (options.effect) { case 'h-blinds-fadein': $('.child').each(function (i) { $(this).stop().css({opacity:0}).delay(100 * i).animate({ 'opacity': 1 }, { duration: options.speed, complete: (i !== r * c - 1) || function () { $(this).parent().replaceWith(prev); options.cp.bind('click',{effect: options.effect},options.ch); } }); }); break; case 'h-blinds-fadein-reverse': $('.child').each(function (i) { $(this).stop().css({opacity:0}).delay(100 * (r * c - i)).animate({ 'opacity': 1 }, { duration: options.speed, complete: (i !== 0) || function () { $(this).parent().replaceWith(prev); options.cp.bind('click',{effect: options.effect},options.ch); } }); }); break; ....more cases } I have alot of similiar other cases. One way i could think of is to write functions ? i'm not sure i'm still fairly new to the language

    Read the article

  • Which one is better apporach comet or ajax?

    - by Rajesh Rolen- DotNet Developer
    i need to update client on any changes occurred on server. for that i found 2 approach. 1. using ajax which is also known as reverse ajax for this purpose. 2. using COMET. but i don't know exact difference in both. my site contains news content and i want that news to be automatically updates when new news is entered by my CMS application. i have got hundreds of concurrent users on my web application. please suggest me which approach should i use to get best solution. also please provide me good example's like for that so that i can implement it. NOTE: i am using .net framework 2.0 but if its not possible in 2.0 then can also move to 3.5 Thanks.

    Read the article

  • Django ORM dealing with MySQL BIT(1) field

    - by Carles Barrobés
    In a Django application, I'm trying to access an existing MySQL database created with Hibernate (a Java ORM). I reverse engineered the model using: $ manage.py inspectdb > models.py This created a nice models file from the Database and many things were quite fine. But I can't find how to properly access boolean fields, which were mapped by Hibernate as columns of type BIT(1). The inspectdb script by default creates these fields in the model as TextField and adds a comment saying that it couldn't reliably obtain the field type. I changed these to BooleanField but it doesn't work (the model objects always fetch a value of true for these fields). Using IntegerField won't work as well (e.g. in the admin these fields show strange non-ascii characters). Any hints of doing this without changing the database? (I need the existing Hibernate mappings and Java application to still work with the database).

    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

  • python processs complete list files matched

    - by thomytheyon
    Hi All, I'm trying to get a simple code working, unfortunatly im a python beginner. My script should return a list of files that doesn't match a pattern, more information here : http://stackoverflow.com/questions/2910106/python-grep-reverse-matching/2910288#2910288 My code is running but doesn't process the complete list of files found as it should : import sys,os filefilter = ['.xml','java','.jsp','lass'] path= "/home/patate/code/project" s = "helloworld" for path, subdirs, files in os.walk(path): for name in files: if name[-4:] in filefilter : f = str(os.path.join(path, name)) with open(f) as fp: if s in fp.read(): print "%s has the string" % f else: print "%s doesn't have the string" % f This code return : /home/patate/code/project/blabla/blabla/build.xml doesn't have the string None If i change f = str(os.path.join(path, name)) for print str(os.path.join(path, name)) I can see the whole list being printed. How can i process the whole list as i which to ? :( Thanks again.

    Read the article

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