Search Results

Search found 15698 results on 628 pages for 'keep alive'.

Page 89/628 | < Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >

  • Making OR/M loosely coupled and abstracted away from other layers.

    - by Genuine
    Hi all. In an n-tier architecture, the best place to put an object-relational mapping (OR/M) code is in the data access layer. For example, database queries and updates can be delegated to a tool like NHibernate. Yet, I'd like to keep all references to NHibernate within the data access layer and abstract dependencies away from the layers below or above it. That way, I can swap or plug in another OR/M tool (e.g. Entity Framework) or some approach (e.g. plain vanilla stored procedure calls, mock objects) without causing compile-time errors or a major overhaul of the entire application. Testability is an added bonus. Could someone please suggest a wrapper (i.e. an interface or base class) or approach that would keep OR/M loosely coupled and contained in 1 layer? Or point me to resources that would help? Thanks.

    Read the article

  • Are today's young programmers getting wrapped around the axle with patterns and practices?

    - by Robert Harvey
    Recently I have noticed a number of questions on SO that look something like this: I am writing a small program to keep a list of the songs that I keep on my ipod. I'm thinking about writing it as a 3-tier MVC Ruby on Rails web application with TDD, DDD and IOC, using a factory pattern to create the classes and a singleton to store my application settings. Do you think I'm taking the right approach? Do you think that we're handing novice programmers a very sharp knife and telling them, "Don't cut yourself with this"? NOTE: Despite the humorous tone, this is a serious (and programming-related) question.

    Read the article

  • python: multiline regular expression

    - by facha
    Hi, everyone I have a piece of text and I've got to parse usernames and hashes out of it. Right now I'm doing it with two regular expressions. Could I do it with just one multiline regular expression? #!/usr/bin/env python import re test_str = """ Hello, UserName. Please read this looooooooooooooooong text. hash Now, write down this hash: fdaf9399jef9qw0j. Then keep reading this loooooooooong text. Hello, UserName2. Please read this looooooooooooooooong text. hash Now, write down this hash: gtwnhton340gjr2g. Then keep reading this loooooooooong text. """ logins = re.findall('Hello, (?P<login>.+).',test_str) hashes = re.findall('hash: (?P<hash>.+).',test_str)

    Read the article

  • How Transport for London Website Works

    - by Subhen
    Hi, Here let me clarify , I have no intentions to peep in to or any evil intention towards tfls database and other related information. But , ofcourse Millions of users are greatly beniftted the way it serves the information. http://journeyplanner.tfl.gov.uk/ So , If we want to create some site like tfl, journeyplanner , what are the basic things we need to keep in mind. Which Architecture We should use? Can We create this website using ASP.NET(Should be able to)? Is TFL integrating it's website with google maps or any other GPS Edit: While you enter the Zip/Pin code or Station name , it creates a map automatically from source to destination and calcculates the distance also. My Question here is , How do they calculate the distance , do they keep help of Maps or GPS or they created there own webservic?

    Read the article

  • Server-side application configuration security. Best practices

    - by Andrew Florko
    We publish server-side application to our customer workstation and customer's security guys are concerned about configuration connection strings safety. Connection strings are stored as plain text right now, but as configuration file is not in the public/shared folder we supposed that workstation security itself is enough. What are the ways to improve connection strings security further? It is a big step forward to encrypt password and keep a decryption key on the same workstation? What are the steps we can take to keep connection strings (and alike) information more and more securable? Thank you in advance!

    Read the article

  • sql server replication algorithm.

    - by reggie
    Anyone know how the underlying replication model in sql server works? Do they essentially depend on UTC datetime values to determine if something is new or do they keep a table of all the changes (like a table of tableID+rowid that have changed). I am building my own "replication" system and was planning on using the dates to know what to replicate. Then I started wondering what would happen if the date got off in the computer for some reason. The obvious choice is to keep a log of the changes as you go and once you replicate those changes, you remove from the log of changes. But thats a lot of extra work, instead of just checking dates. I figure if sql server replication works by just checking the dates, then that should be good enough for me. Any wisdom here? thanks

    Read the article

  • how to deal with the position in a c# stream

    - by CapsicumDreams
    The (entire) documentation for the position property on a stream says: When overridden in a derived class, gets or sets the position within the current stream. The Position property does not keep track of the number of bytes from the stream that have been consumed, skipped, or both. That's it. OK, so we're fairly clear on what it doesn't tell us, but I'd really like to know what it in fact does stand for. What is 'the position' for? Why would we want to alter or read it? If we change it - what happens? In a pratical example, I have a a stream that periodically gets written to, and I have a thread that attempts to read from it (ideally ASAP). From reading many SO issues, I reset the position field to zero to start my reading. Once this is done: Does this affect where the writer to this stream is going to attempt to put the data? Do I need to keep track of the last write position myself? (ie if I set the position to zero to read, does the writer begin to overwrite everything from the first byte?) If so, do I need a semaphore/lock around this 'position' field (subclassing, perhaps?) due to my two threads accessing it? If I don't handle this property, does the writer just overflow the buffer? Perhaps I don't understand the Stream itself - I'm regarding it as a FIFO pipe: shove data in at one end, and suck it out at the other. If it's not like this, then do I have to keep copying the data past my last read (ie from position 0x84 on) back to the start of my buffer? I've seriously tried to research all of this for quite some time - but I'm new to .NET. Perhaps the Streams have a long, proud (undocumented) history that everyone else implicitly understands. But for a newcomer, it's like reading the manual to your car, and finding out: The accelerator pedal affects the volume of fuel and air sent to the fuel injectors. It does not affect the volume of the entertainment system, or the air pressure in any of the tires, if fitted. Technically true, but seriously, what we want to know is that if we mash it to the floor you go faster..

    Read the article

  • Deleting an element from an array in perl

    - by Flamewires
    Hey I'm wondering how i can get this code to work, basically i want to keep the lines of $filename as long as they contain the $user in the path. Sry, perl noob. open STDERR, ">/dev/null"; $filename=`find -H /home | grep $file`; @filenames = split(/\n/, $filename); for $i (@filenames) { if ($i =~ m/$user/) { #keep results } else { delete $i; # does not work. } } $filename = join ("\n", @filenames); close STDERR; I know you can delete like delete $array[index] but I don't have an index with this kind of loop that I know of.

    Read the article

  • Emulate Historical Figures i.e. Einstein - Is this possible using linguistic logic for my http://www.ustimeline.com Education System

    - by Johnnylight
    After hearing about the success of IBM's Watson I started thinking perhaps emulating human language is now possible? My goal is to create Virtual Historical characters to represent the main characters in my Adventur-Cation The Great American Adventure program such as Einstein or Crazy Horse. The goal is to build an intelligent system capable of indexing the internet and storing the data using a schema using modern knowledge on linguistic theory (phonemes, morphemes, syntax) to build a system capable to returning a semantically sound response very similar to the response made by the same person if still alive today. The goal would be to use the same engine/system for all characters. Each characters would have their own digital representation and voice, and would organize data differently based on tags/keywords stored about the individual. Imagine a Max Headroom Einstein. Based on the success of Watson, I believe something like this may now be possible. Would be an interesting way to study history and would be a vehicle of entertainment as well. Can anyone confirm if this has already been attempted? Is anyone interested in exploring this using Cognitive Science, Psychology, Artificial Intelligence, Historical data captured on the internet, and Linguistic theory?

    Read the article

  • Eval IronPython Scripts during ASP.NET Web Request; Static Engine or Not

    - by Josh Pearce
    I would like to create an ASP.NET MVC web application which has extensible logic that does not require a re-build. I was thinking of creating a filter which had an instance of the IronPython engine. What I would like to know is: how much overhead is there in creating a new engine during each web request, and would it be a better idea to keep a static engine around? However, if I were to keep a single static engine around, what are the issues I might run into as far as locking and script scope? Is it possible to have multiple scopes in the same IropPython engine so I don't get variable collision and security issues between web requests?

    Read the article

  • On activate does not fire with my Modal/Pop-Up form to Requery

    - by Odesmere
    I have a modal/pop-up form frmEditContact open on this form there is a combo box full of addressescmbAddressList, populated by a query. when the user wants to add an address that doesn't exist there is a button that opens the frmAddress where they may add an address. frmAddress allows them to enter an address to the list and gives the option to save, or cancel (both actions close the form after). with this form closed, the focus is now again on frmEditContact I would like to repopulate the combo box using docmd.Requery cmbAddressList after they close the other form I'm not sure where to handle this, I've tried On Avtivate, On Load, On Update, On Open, On Focus...but none of them fire as I keep the frmEditContact open when they are using the other form is there a way to keep frmEditContact open the whole time, but still an action Event that will fire so that I can Requery? And does On Activate not work with modal forms?

    Read the article

  • how do I notify child controls of a change in the parent

    - by fishhead
    what is the best way to keep a child control up to date for changes in the parent. I have a number of child controls hosted inside my parent object and I can think of two ways to send change information to them. 1) wire the child control to an event in the parent. and fire that event on a change in the parent 2) keep a list of the children in an array and intenerate through the array when the change has happened and invoke a method in the child to handle the new changes. I hope I describe it okay. both work but there is probably a right way to handle this and a wrong way.

    Read the article

  • (Wordpress) Global variable to detect pagination?

    - by Gnee
    I am showing 6 posts on one page. On the 7th post, pagination occurs on so on. goal: If there is more than one page (page 1, 2, 3, etc..), JavaScript is to add a specific div element. If there are only 6 posts or less, no pagination occurs, no div element is added. The number of posts to show: $showposts = get_query_var('showposts'); The current post number I can keep track of: $post_count++; Problem is I can keep track of posts 1-6 but how to tell if if it goes over to 7 and starts pagination? I thought there was a global variable that returns if pagination occurs, but I can't seem to find it. (I know there is global to detect pagination via <!--nextpage--> but so far I can't find it's equivalent for index.php).

    Read the article

  • call function from external js (php) file

    - by bah
    Hi, I have a file where I keep all scripts so my pages wouldn't get messy (I have php file which generates required javascript). My includes basically look like this: </html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="script.php"></script> </head> <body> <input type="button" onClick="return blah();" /> </body> </html> In script.php there's jquery wrapper $(document).ready where I keep all jquery related stuff. The funny thing is, when I put function blah() inside this wrapper I get "blah is not defined" error, but when I put it outside - works perfectly. So, what could be the problem?

    Read the article

  • How to force delete cookies even if one window is still open?

    - by medopal
    Apparently in IE8, there is this option 'Preserve Favorites website data', even if I uncheck it the browser will still keep the cookies until the last window is closed. Problem scenario. say I logged in to somesite.com, then without out logging out, I closed the window, but there was still another IE8 window open. In this case IE8 will keep the cookies of this site. So If I opened the site again (same window or another) the site won't ask for login info. The client wants the web application to be logged off as soon as the user closes the browser. Can I force delete the cookies IE8 is saving? or maybe I can stop the user from closing the window until I simulate a click on logout button?

    Read the article

  • #include <string> adding ~43 KB to my exe

    - by Lienau
    I'm using Code::Blocks to write my program and when I include <string> (or <iostream>) the size of my exe grows. My program is very simple and I need to keep it small <20kb. I'm pretty sure this is happening because of the C++ Standards Committee swapped the old .h versions for many new libraries without the .h. But how would I keep it from adding the ~43kb? Are there settings for Code::Blocks so that it wont add the extra kb or is there another native lib I can use?

    Read the article

  • s3cmd setacl to grant 'Authenticated Users'

    - by rynop
    I'm using jgit to create a remote in s3. Problem I'm having is when I do a jgit push s3 master it creates the files in s3 as owned by me. I want to keep the files private, and be read/write by 'Authenticated users'. I'd like to be able to either set acl: authenticated-read in the ~/.jgit file OR be able to modify the acl after the push: s3cmd --add-header=x-amz-acl:authenticated-read setacl --acl-private s3://my.bucket/repo/* Neither of these work. How do i use jgit and push to s3 and keep it private, and let anyone with auth read/write?

    Read the article

  • calling a service from an activity

    - by newbie
    Hi,I have been stuck on this issue for quite some time now.Have read the documentation and many tutorials and they just confuse me more.I hope someone will provide me a straightforward answer.It's really important.Thank you.. Ok ..so i want an activity to get some input from the user as and then send that string to a service.Then i want my service to run in a way so that i can use other applications while this one keeps running in the background.Also i don't want the service to keep running every second.What i want is for the service to get updated location of my current position every 10 minutes so i was thinkin if there could be a way to make my service to go to sleep n wake up evry 10 mins n check for updates.I don't want to show the update on the UI so i dont think i need to use an AIDL approach and also dont need to bind to the service.I js simply want to start the service as soon as the user enters the string and keep the service runing every 10 mins.I think it is really simple but m very confused.Please help.

    Read the article

  • Universal App won't build for device

    - by Felix Khazin
    I'm trying to get an iPad/iPhone app to run on my iPad. (it builds and runs fine on the simulator) I went through the menu to create a new universal project. Then I added another library that my app will use (route-me), and i keep getting the following linker errors: "___restore_vfp_d8_d15_regs", referenced from: and "___save_vfp_d8_d15_regs", referenced from: I did a search on Google, and found (http://www.badrit.com/blog/2010/6/6/building-route-me-for-ipad) that it's just a matter of matching up project settings in the library projects. I did that but it didn't help. I still keep getting these linker errors. Anyone have any ideas what I can try?

    Read the article

  • How prevent anyone from stealing my shared_ptr?

    - by Kyle
    So, I use boost::shared_ptr for all the various reference-counting benefits it provides -- reference counting for starters, obviously, but also the ability to copy, assign, and therefore store in STL Containers. The problem is, if I pass it to just one "malicious" function or object, the object can save the ptr and then I'll never be able to de-allocate it without the foreign function or object nicely relinquishing its ownership. Ultimately, I try to keep object ownership explicit. I accomplish this by having the owner keep the only shared_ptr to the object, and "guest" objects only store weak_ptrs to the object. I really don't want the "shared" part of shared_ptr, but I'm required to use shared_ptr in order to make weak_ptrs. I want to use scoped_ptr, but it's extremely limited since you can't copy it. You can't store it in a container, you can't lend out weak_ptrs from it, and you can't transfer ownership to a new manager. What's the solution?

    Read the article

  • Does SQL Server Compact not support keywords 'Foreign Key References' in Create Table or am I making a mistake?

    - by johnmortal
    I keep getting errors using Sql Compact. I have seen that it is possible to create table constraints in compact edition as shown here. And according to the documents found here it provides "Full referential integrity with cascading deletes and updates". So am I really not allowed to do the following or am I making a mistake? I keep getting complaints from sql server compact edition that the constaint is not valid, though it works fine on express edition. CREATE TABLE [A] (AKey int NOT NULL PRIMARY KEY); CREATE TABLE [B] (AKey int NOT NULL FOREIGN KEY REFERENCES A(AKey));

    Read the article

  • Import small number of records from a very large CSV file in Biztalk 2006

    - by rwmnau
    I have a Biztalk project that imports an incoming CSV file and dumps it to a database table. The import works fine, but I only need to keep about 200-300 records from a file with upwards of a million rows. My orchestration discards these rows, but the problem is that the flat file I'm importing is still 250MB, and when converted to XML using a regular flat file pipeline, it takes hours to process and sometimes causes the server to run out memory. Is there something I can do to have the Custom Pipeline itself discard rows I don't care about? The very first item in each CSV row is one of a few strings, and I only want to keep rows that start with a certain string. Thanks for any help you're able to provide.

    Read the article

  • How to regularly merge two git repositories, one with submodules into one without

    - by smoothify
    I maintain a Drupal project in a git repository containing submodules. This works well for me overall, and I like the submodule approach. However, I would like to move my site to a hosting provider that offers deployment via git push but doesn't work with submodules. I would like to keep my current repository intact, and then when I'm ready to deploy, I would like to merge the changes from my repository into the deployment repository, but any submodules need to be exported into the tree. So, it needs to be (semi) automated, so I can just run a command or two and initiate the merge, and then push to the server. Ideally it would keep track of individual commits, but I wouldn't mind if it squashed them into a single commit. How would be the most effective way to achieve this?

    Read the article

  • webgame engine how does it works

    - by TWCrap
    Hy all, first off all, don't yell that i shouldn't start with it, i just want to know how that works... The thing is, how does the engine of an webgame works. A game like tribalwars, grepolis and forge of empires. How does that keeping alive work. I mean, a user is building an building, and quit the browser... The building is build even when the session of the user is expired. but the points of the user is updated when the building is finished... So how does that works. What do you guys think? do they have some kind of cronjob that is fired every second, and that walks throug the database, and search for finished buildings, and update's the stuff? or do you guys think that they do it difrent?!? I hope that i was clear. -NOTE- i don't need anny code, i'm just intrested in the progress behind the game... Greetingz Marc

    Read the article

< Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >