Search Results

Search found 1882 results on 76 pages for 'tom barnett'.

Page 51/76 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • Amazon S3 as secure backup without multiple invoices

    - by Tom Viner
    I'm storing copies of database backups on Amazon S3 using the Python Boto library. But I worry that if my web server was hacked, those backups could be deleted using the credentials I need to do the upload. Ok, so I know you can grant permissions to another Amazon email address, so I can imagine doing that after an upload then removing the original user's write access BUT in this scenario I now end up with 2 accounts and 2 sets of invoices to give to accounts every month. Is there a solution to this that doesn't require a new Amazon account for each web server I run?

    Read the article

  • Manipulate Excel workbooks programmatically

    - by Tom
    I have an Excel workbook that I want to use as a template. It has several worksheets setup, one that produces the pretty graphs and summarizes the numbers. Sheet 1 needs to be populated with data that is generated by another program. The data comes in a tab delimited file. Currently the user imports the tab delimited file into a new Workbook, selects all and copies. Then goes to the template and pastes the data into sheet1. This is a large amount of data, 269 columns and over 135,000 rows. It’s a cumbersome process and the users are not experienced Excel users. All they really want is the pretty graphs. I would like to add a step after the program that generates the data to programmatically automate the process the user currently must do manually. Can anyone suggest the best method/programming language that could accomplish this?

    Read the article

  • Creating a Modeless Dialog

    - by Tom
    I'm trying to create a child modeless dialog of a dialog and currently I'm using these style parameters: STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_TOOLWINDOW I'm not being able to transfer the control its parent dialog once i try to create its child dialog. is there anything else I'm missing in the process to make the dialog modeless?

    Read the article

  • Java Logger only to file, no screen output!

    - by Tom Taylor
    Hello there SO'ers, I got a quite simple problem but cant find a solution for it. I have a logger with a file handler added, but it still spams to hell out of my console. How could I get the logger to solely route all output to a file, with NO console outputs? Thanks a lot, cru

    Read the article

  • Glassfish: Storing Java classes in the docroot folder?

    - by Tom Marthenal
    I'm very new to using Glassfish or JSP. I have this working in NetBeans (which has Glassfish bundled) but when I try to put it on my server which is running Glassfish Server, I really don't know what I'm doing. I can place a JSP file in "domains/domain1/docroot/index.jsp" and it will work when I visit my site, but I can't, for some reason, get Java classes to work. I copied the files in "/build/web/" from the NetBeans project to the docroot folder on my server. The errors I get when I visit the site are: org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6199: Generated servlet error: string:///index_jsp.java:7: package test does not exist PWC6197: An error occurred at line: 5 in the jsp file: /index.jsp PWC6199: Generated servlet error: string:///index_jsp.java:52: cannot find symbol symbol : class TestClass location: class org.apache.jsp.index_jsp PWC6197: An error occurred at line: 5 in the jsp file: /index.jsp PWC6199: Generated servlet error: string:///index_jsp.java:52: cannot find symbol symbol : class TestClass location: class org.apache.jsp.index_jsp The actual Java class is in "WEB-INF/classes/test/TestClass.class" (it is pre-compiled). I really have no idea what I'm doing wrong so any help is greatly appreciated. Thanks!

    Read the article

  • Background Image displaying in Design view but not in browser? (Visual Studio 2008)

    - by Tom Hutchinson
    I'm new to CSS and this issue in Visual Studio is driving me mad! I have a background image defined within a simple style sheet... body { background-image: url(Images\Greenhouse.jpg); background-position: center; } My style sheet is referenced within the HTML code... <head runat="server"> <title></title> <link rel="Stylesheet" type="text/css" href="Stylesheet.css"/> </head> The background image shows in design view but in the browser, nothing! I've tried changing position etc and refreshed the browser, cleared the cache etc. This happens with all my images. Images are within the project folder (\Images) and added to the solution explorer in VS. Tried "", changing image file names etc, nothing is working!

    Read the article

  • Rewrite URL to index.php but avoid index.php in the URL

    - by Tom
    I'm trying to internally redirect all requests to index.php and externally redirect all requests that contain index.php using a .htaccess file. So URLs like http://host/test should be processed by index.php and URLs like http://host/index.php/test should be redirected to http://host/test and then processed by index.php (without redirecting the browser to index.php) I tried the following but always get a message "Too many redirects...": RewriteRule ^index\.php/?(.*)$ /$1 [R,L] RewriteRule .* index.php/$0 [L]

    Read the article

  • Is it possible to set a default behaviour for custom (non-native) methods/functions in Java?

    - by Tom
    Is it possible to set a default behaviour for custom (non-native) methods/functions in Java? For example, I would like to change the default "Function" to do a System.out.println("message") whenever called. So, when a custom method/function is being created: public String testMethod() { //custom code } it should execute the newly added default behaviour (in this case the system output), before the custom code is run. Even if this would be a bad excercise, is it possible? Maybe by extending the function class or something?

    Read the article

  • Cannot pass null to server using jQuery AJAX. Value received at the server is the string "null".

    - by Tom
    I am converting a javascript/php/ajax application to use jQuery to ensure compatibility with browsers other than Firefox. I am having trouble passing true, false, and null values using jQuery's ajax function. Javascript code: $.ajax ( { url : <server_url>, dataType: 'json', type : 'POST', success : receiveAjaxMessage, data: { valueTrue : true, valueFalse : false, valueNull : null } } ); PHP code: var_dump($_POST); Server output: array(3) { ["valueTrue"]=> string(4) "true" ["valueFalse"]=> string(5) "false" ["valueNull"]=> string(4) "null" } The problem is that the null, true, and false values are being converted to strings. The Javascript AJAX code currently in use passes null, true, and false correctly but only works in Firefox. Does anyone know how to solve this problem using jQuery? Here is some working code (not using jQuery) to compare with the code not-working code given above. Javascript Code: ajaxPort.send ( <server_url>, { valueTrue : true, valueFalse : false, valueNull : null } ); PHP code: var_dump(json_decode(file_get_contents('php://input'), true)); Server output: array(3) { ["valueTrue"]=> bool(true) ["valueFalse"]=> bool(false) ["valueNull"]=> NULL } Note that the null, true, and false values are correctly received. Note also that in the second method the $_POST array is not used in the PHP code. I think this is the key to the problem, but I cannot find a way to replicate this behavior using jQuery.

    Read the article

  • Linq Scope Problem + Reduce Repeated Code

    - by Tom Gullen
    If the parameter is -1, it needs to run a different query as to if an ID was specified... how do I do this? I've tried initialising var q; outside the If block but no luck! // Loads by Entry ID, or if -1, by latest entry private void LoadEntryByID(int EntryID) { IEnumerable<tblBlogEntry> q; if (EntryID == -1) { q = ( from Blog in db.tblBlogEntries orderby Blog.date descending select new { Blog.ID, Blog.title, Blog.entry, Blog.date, Blog.userID, Comments = ( from BlogComments in db.tblBlogComments where BlogComments.blogID == Blog.ID select BlogComments).Count(), Username = ( from Users in db.yaf_Users where Users.UserID == Blog.userID select new { Users.DisplayName }) }).FirstOrDefault(); } else { q = ( from Blog in db.tblBlogEntries where Blog.ID == EntryID select new { Blog.ID, Blog.title, Blog.entry, Blog.date, Blog.userID, Comments = ( from BlogComments in db.tblBlogComments where BlogComments.blogID == Blog.ID select BlogComments).Count(), Username = ( from Users in db.yaf_Users where Users.UserID == Blog.userID select new { Users.DisplayName }) }).SingleOrDefault(); } if (q == null) { this.Loaded = false; } else { this.ID = q.ID; this.Title = q.title; this.Entry = q.entry; this.Date = (DateTime)q.date; this.UserID = (int)q.userID; this.Loaded = true; this.AuthorUsername = q.Username; } } My main aim is to reduce repeating code

    Read the article

  • ServiceStack razor default page

    - by Tom
    Say I have 2 pages /NotADefault.cshtml /Views/Default.cshtml Question 1. Now I run it, page A always gets called implicitly as start-up default page no matter what I name it. Page B will only be called when I explicitly call localhost/View/Default. How do I make page B (the one in View folder) my default page? Question 2. I also have NotADefaultService.cs and DefaultService.cs. I give each page a Service class at the back. However, when page A is called NotADefaultService.cs never gets called. Only DefaultService.cs gets called when page B is called... My observation is that only the pages in the View folder will get their back-end service class working. Outside of View folder it doesn't work. Combining Q1 and Q2. How do I: Option 1. get the backend service class working under / root outside "View" folder? OR Option 2. appoint /View/Default.schtml as my default at start-up where the service class can be hit?

    Read the article

  • MySQL: Is it possible to return a "mixed" dataset?

    - by Tom
    Hi, I'm wondering if there's some clever way in MySQL to return a "mixed/balanced" dataset according to a specific criterion? To illustrate, let's say that there are potential results in a table that can be of Type 1 or Type 2 (i.e. a column has a value 1 or 2 for each record). Is there a clever query that would be able to directly return results alternating between 1 and 2 in sequence: 1st record is of type 1, 2nd record is of type 2, 3rd record is of type 1, 4th record is of type 2, etc... Apologies if the question is silly, just looking for some options. Of course, I could return any data and do this in PHP, but it does add some code. Thanks.

    Read the article

  • Is there any way to maximize PHP_INT_MAX?

    - by Tom
    I can't find this row in php.ini, so is there any way to do that? So ok, I understood, the answer is not, then how should I calculate the result of this task if I want it do with php? The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ?

    Read the article

  • looking to scan documents directly to be uploaded to a webpage

    - by Tom
    I was hoping to do this from a flash plugin, kind of how flash accesses the microphone or webcam but it doesn't seem possible. Is this going to be possible using Java, or ActiveX, or some other strategy that I haven't looked at yet? The idea is to do it without a client install, or at least something lightweight and browser and platform independent, (and possibly the moon on a stick as welll ;-))

    Read the article

  • Lua + SWIG Monkey Patching

    - by Tom J Nowell
    I have used SWIG to bind a set of classes to lua. The problem comes if I want to start monkey patching. e.g. game.GetEnemies1 = game.GetEnemies2 does not work as expected. The behaviour after that line is still consistent with the original GetEnemies1 not GetEnemies2. how do I combat this problem?

    Read the article

  • iFrame Access Problem

    - by Tom
    Hi Guys, I have data which sits outside an iframe with a script on the outside as well. When a user performs an action - I want this ata to be sent "inside" the iframe. I have having a bit trouble achieving this and was wondering whether its possible and if it is, how I can do it ? Thx

    Read the article

  • Enums With Default Throw Clause?

    - by Tom Tresansky
    I noticed the following in the Java Language spec in the section on enumerations here: link switch(this) { case PLUS: return x + y; case MINUS: return x - y; case TIMES: return x * y; case DIVIDE: return x / y; } throw new AssertionError("Unknown op: " + this); However, looking at the switch statement definition section, I didn't notice this particular syntax (the associated throw statement) anywhere. Can I use this sort of "default case is throw an exception" syntactic sugar outside of enum definitions? Does it have any special name? Is this considered a good/bad practice for short-cutting this behavior of "anything not in the list throws an exception"?

    Read the article

  • [C++] Multiple inheritance from template class

    - by Tom P.
    Hello, I'm having issues with multiple inheritance from different instantiations of the same template class. Specifically, I'm trying to do this: template <class T> class Base { public: Base() : obj(NULL) { } virtual ~Base() { if( obj != NULL ) delete obj; } template <class T> T* createBase() { obj = new T(); return obj; } protected: T* obj; }; class Something { // ... }; class SomethingElse { // ... }; class Derived : public Base<Something>, public Base<SomethingElse> { }; int main() { Derived* d = new Derived(); Something* smth1 = d->createBase<Something>(); SomethingElse* smth2 = d->createBase<SomethingElse>(); delete d; return 0; } When I try to compile the above code, I get the following errors: 1>[...](41) : error C2440: '=' : cannot convert from 'SomethingElse *' to 'Something *' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1> [...](71) : see reference to function template instantiation 'T *Base<Something>::createBase<SomethingElse>(void)' being compiled 1> with 1> [ 1> T=SomethingElse 1> ] 1>[...](43) : error C2440: 'return' : cannot convert from 'Something *' to 'SomethingElse *' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast The issue seems to be ambiguity due to member obj being inherited from both Base< Something and Base< SomethingElse , and I can work around it by disambiguating my calls to createBase: Something* smth1 = d->Base<Something>::createBase<Something>(); SomethingElse* smth2 = d->Base<SomethingElse>::createBase<SomethingElse>(); However, this solution is dreadfully impractical, syntactically speaking, and I'd prefer something more elegant. Moreover, I'm puzzled by the first error message. It seems to imply that there is an instantiation createBase< SomethingElse in Base< Something , but how is that even possible? Any information or advice regarding this issue would be much appreciated.

    Read the article

  • Why NullPointerException is a runtime exception and RemoteException not?

    - by Tom Brito
    A possible reason because a NullPointerException is a runtime exception is because every method can throw it, so every method would need to have a "throws NullPointerException", and would be ugly. But this happens with RemoteException. And a possible reason because RemoteException is not a runtime exception, is to tell it client to treat the exception. But every method in a remote environment need throws it, so there is no difference of throwing NullPointerException. Speculations? Was I clear?

    Read the article

  • Parsing a Vimeo ID using Javascript?

    - by Tom
    Hi, Could anyone point me in the right direction to parse an ID from a Vimeo URL in Javascript? The URL will be entered by a user so I will need to check that they have entered it in the correct format. I need the ID so that I can use their simple API to retrieve video data. Any help appreciated.

    Read the article

  • Javascript: sort objects

    - by tom
    function Player() { var score; this.getScore = function() { return score; } this.setScore = function(sc) { score = sc; } } function compare(playerA, playerB) { return playerA.getScore() - playerB.getScore(); } var players = []; players['player1'] = new Player(); players['player2'] = new Player(); Array(players).sort(compare); I have code that is similar to the above. When I step through the code with a debugger, the compare function never gets called and the array isn't sorted. I'm not sure what's wrong with my code?

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >