Search Results

Search found 5423 results on 217 pages for 'care industry'.

Page 80/217 | < Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >

  • fastest way to upload an xls file into a database

    - by shmichael
    I have an xls file with ~60 sheets of data. I would like to move them into a database (postgres) such that each sheet's data is stored in a different table. What is the fastest way of creating these tables? I don't care about naming or proper typing of columns. The columns could all be strings for that matter. I don't want to run 60 different csv uploads.

    Read the article

  • Better way to write an object generator for an RAII template class?

    - by Dan
    I would like to write an object generator for a templated RAII class -- basically a function template to construct an object using type deduction of parameters so the types don't have to be specified explicitly. The problem I foresee is that the helper function that takes care of type deduction for me is going to return the object by value, which will result in a premature call to the RAII destructor when the copy is made. Perhaps C++0x move semantics could help but that's not an option for me. Anyone seen this problem before and have a good solution? This is what I have: template<typename T, typename U, typename V> class FooAdder { private: typedef OtherThing<T, U, V> Thing; Thing &thing_; int a_; // many other members public: FooAdder(Thing &thing, int a); ~FooAdder(); void foo(T t, U u); void bar(V v); }; The gist is that OtherThing has a horrible interface, and FooAdder is supposed to make it easier to use. The intended use is roughly like this: FooAdder(myThing, 2) .foo(3, 4) .foo(5, 6) .bar(7) .foo(8, 9); The FooAdder constructor initializes some internal data structures. The foo and bar methods populate those data structures. The ~FooAdder dtor wraps things up and calls a method on thing_, taking care of all the nastiness. That would work fine if FooAdder wasn't a template. But since it is, I would need to put the types in, more like this: FooAdder<Abc, Def, Ghi>(myThing, 2) ... That's annoying, because the types can be inferred based on myThing. So I would prefer to create a templated object generator, similar to std::make_pair, that will do the type deduction for me. Something like this: template<typename T, typename U, typename V> FooAdder<T, U, V> AddFoo(Thing &thing, int a) { return FooAdder<T, U, V>(thing, a); } That seems problematic: because it returns by value, the stack temporary object will be destructed, which will cause the RAII dtor to run prematurely. One thought I had was to give FooAdder a copy ctor with move semantics, kinda like std::auto_ptr. But I would like to do this without dynamic memory allocation, so I thought the copy ctor could set a flag within FooAdder indicating the dtor shouldn't do the wrap-up. Like this: FooAdder(FooAdder &rhs) // Note: rhs is not const : thing_(rhs.thing_) , a_(rhs.a_) , // etc... lots of other members, annoying. , moved(false) { rhs.moved = true; } ~FooAdder() { if (!moved) { // do whatever it would have done } } Seems clunky. Anyone got a better way?

    Read the article

  • Where does the AccountController in Asp.Net MVC 2 store its data?

    - by JLago
    I'm creating a website using ASP.NET MVC 2 and I'm thinking of using the default AccountController and Views to take care of the Users. The only problem is that, for all the rest, I'm using a Postgres database. Is there a way to link The account controller to a User class defined by me? I'm using Nhibernate to connect to the database, so I'll have a User class with whatever fields necessary. Thanks very much.

    Read the article

  • Is SQLlite strong enough to use as wordpress database ?

    - by justjoe
    i'm just curious. so i ask this particular question about SQLite. I haven't use this type of database extensively. but care to explain what is the basic different between SQLite and Mysql ? The reason behind all of this is i just want to know whether it possible to use it to store wordpress data and act as a database ?

    Read the article

  • require_once at the beginning or when really needed?

    - by takeshin
    Where should I put require_once statements, and why? Always on the beginning of a file, before the class, In the actual method when the file is really needed It depends ? Most frameworks put includes at the beginning and do not care if the file is really needed. Using autoloader is the other case here.

    Read the article

  • Example of xargs' -x option in action

    - by Ole Tange
    GNU xargs has option '-x'. The man page says: -x Exit if the size (see the -s option) is exceeded. But xargs seems to not care if -x is set or not. I have been unable to make an example in which the -x has any effect at all. Please provide two examples in which the only difference is an added -x and that produce different output.

    Read the article

  • Rails - before_filter than includes updated object

    - by Sam
    I have a before filter than calculates a percentage that needs to include the object that is being updated. Is there a one liner in rails that takes care of this? for example and this is totaly made up: Object.find(:all, :include = :updated_object) Currently I'm sending the object that is getting updated to the definition that calculates the percentage and that works but its making things messy.

    Read the article

  • List comprehension, map, and numpy.vectorize performance

    - by mcstrother
    I have a function foo(i) that takes an integer and takes a significant amount of time to execute. Will there be a significant performance difference between any of the following ways of initializing a: a = [foo(i) for i in xrange(100)] a = map(foo, range(100)) vfoo = numpy.vectorize(foo) a = vfoo(range(100)) (I don't care whether the output is a list or a numpy array.) Is there a better way?

    Read the article

  • c#: storing lots of data in my.settings

    - by every_answer_gets_a_point
    i will need to store 3 tables of data instead of implementing an entire database backend, i just want to store the record for these tables in application.settings has anyone done this before? i dont care about security is it advisable to do it with application settings? how else would you do it? perhaps storing a matrix in application.settings would be OK?

    Read the article

  • Creating a "virtual" path (/bla) in Mac OS X and Linux that calls custom code

    - by Michael Stum
    Just something I'd like to play with, I would like to create a "virtual" file/directory in the File System of Linux or Mac OS X (Not sure if I can share the same code - does POSIX help?), for example /foo and then perform custom code when something is read or written to it. Similar how /dev/null allows for stuff like echo "Hello!" > /dev/null I don't care if it's in /dev, /proc or anywhere else, as said it's mainly something to play with...

    Read the article

  • SQL query to remove text within parentheses?

    - by Josh Fraser
    What is the best SQL query to remove any text within parenthesis in a mySQL database? I'd like something that works regardless of the position of the parenthesis in the text (beginning, middle, end, whatever). I don't care about keeping the text inside the parenthesis, just removing it. Thanks!

    Read the article

  • Check if string is serialized in PHP

    - by Industrial
    Hi everyone, I am in the middle of building a cache layer for the Redis DB to my application and I have come to the point where's it's about to take care of arrays. I wonder if there's any good (high performance!) way of controlling an string to be serialized or not with PHP? Thanks a lot!

    Read the article

  • svn: default name for a tag when name is not important?

    - by Jason S
    I need to tag the current state of my source tree in svn. My problem is I don't care what the name is, I just need to mark the current revision in an immutable* manner. (*subject to malicious behavior) What's the best way to do this? branches/ tags/ ??? trunk/ should ??? be the date, an incrementing sequence, the repository rev # ...?

    Read the article

  • Command Design Pattern

    - by pchajer
    After reading command design pattern, I have a couple of question - Why we are creating concrete command and receiver object on client. Can't this initialization on invoker class? I think client should create invoker and pass it's request to invoker. Invoker should take care of all the stuff. By doing this, We have less dependency on client. The design of class diagram is totally different from actual design.

    Read the article

  • Programming Concepts That Were "Automated" By Modern Languages

    - by Ygam
    Weird question but here it is. What are the programming concepts that were "automated" by modern languages? What I mean are the concepts you had to manually do before. Here is an example: I have just read that in C, you manually do garbage collection; with "modern" languages however, the language itself takes care of it. Do you know of any other, or there aren't any more?

    Read the article

  • Asynchronous PHP calls?

    - by UltimateBrent
    Is there a way to PHP make asynchronous http calls? I don't care about the response, I just want to do something like file_get_contents(), but not wait on the request to finish before executing the rest of my code. This would be super useful for setting off "events" of a sort in my application, or triggering long processes. Any ideas?

    Read the article

  • Another getcwd question...

    - by rubenvb
    Sorry to keep hammering on this, but I'm trying to learn :). Is this any good? And yes, I care about memory leaks. I can't find a decent way of preallocating the char*, because there simply seems to be no cross-platform way. const string getcwd() { char* a_cwd = getcwd(NULL,0); string s_cwd(a_cwd); free(a_cwd); return s_cwd; }

    Read the article

  • Force download through markup or JS

    - by mschoening
    Lets assume I have a file on a CDN (Cloud Files from Rackspace) and a static html page with a link to that file. Is there any way I can force download this file (to prevent it from opening in the browser -- for mp3s for example)? We could make our server read the file and set the corresponding header to: header("Content-Type: application/force-download") but we have about 5 million downloads per month so we would rather let the CDN take care of that. Any ideas?

    Read the article

  • Capture Video of Android's Screen

    - by Taranfx
    Forget screenshots, is it posible to capture a video of the running application in android? Rooted or non-rooted, I don't care, I want atleast 15fps. Update: I don't want any external hardware. The intent is to make it perfectly portable and every frame is captured within Android OS. If it crosses the boundaries of the app sdk, I'm willing to go to OS level modifications but I would need a starting point.

    Read the article

  • Can freetextbox display links that were not explicitly added?

    - by Joe
    I would like to display links that are pasted in as links rather than text but freetextbox does not seem to do this. For instance, if somebody pastes in http://www.stackoverflow.com it looks like a link but shows up only as text. Do I need to convert this myself or is there a setting in the editor to take care of this?

    Read the article

  • Speed up PostGreSQL createdb?

    - by John
    Is there a way to speed up PostgreSQL's createdb command? Normally I wouldn't care, but doing unit testing in Django creates a database every time, and it takes about 5 seconds. I'm using openSUSE 11.2 64-bit, PostgreSQL 8.4.2

    Read the article

< Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >