Search Results

Search found 3459 results on 139 pages for 'if modified since'.

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

  • How to embed a Python interpreter in a PyQT widget

    - by Mathias
    I want to be able to bring up an interactive python terminal from my python application. Some, but not all, variables in my program needs to be exposed to the interpreter. Currently I use a sub-classed and modified QPlainTextEdit and route all "commands" there to eval or exec, and keep track of a separate namespace in a dict. However there got to be a more elegant and robust way! How? Here is an example doing just what I want, but it is with IPython and pyGTK... http://ipython.scipy.org/moin/Cookbook/EmbeddingInGTK

    Read the article

  • View a git diff-tree in a reasonable format

    - by Josh
    Howdy, I'm about to do a git svn dcommit to our svn repo -- and as is recommended in a number of places, I wanted to figure out exactly what I was going to be committing with a dry run. As such I ran: git svn dcommit -n This produced output: Committing to http://somerepo/svn/branches/somebranch diff-tree 1b937dacb302908602caedf1798171fb1b7afc81~1 1b937dacb302908602caedf1798171fb1b7afc81 How do I view this in a format that I can consume as a human? A list of modified files comes to mind. This is probably easy, but running git diff-tree on those hashes gives me a reference to a directory and a some other hashes, as well as some numbers. Not quite sure what to make of it. Thanks very much, Josh

    Read the article

  • IIS7 + ASP.NET MVC Client Caching Headers Not Working

    - by Tobin Harris
    Hey folks I've deployed an ASP.NET MVC app on IIS7 and Windows Server 2008. I've read posts on here, and around the web, but can't get the darn client-side caching to work. I'm trying to cache everything in the /Content folder. So far I've select that folder in IIS manager, and set the appropriate HTTP Response Headers (under Common Headers). I've also checked the web.config file in the /Content folder and the values there are being set. All resources in /Content come back with this (from FireBug): Cache-Control no-cache, no-store, must-revalidate Pragma no-cache Content-Type image/png Expires -1 Last-Modified Sun, 11 Oct 2009 19:01:40 GMT Accept-Ranges bytes Etag "f318d643a54aca1:0" Server Microsoft-IIS/7.0 X-Powered-By ASP.NET Date Sun, 11 Oct 2009 20:40:01 GMT Content-Length 620 Note the Cache-Control and Expires values for this static image being requested. The site is currently compiled in Debug (this will change), but surely that wouldn't make a difference? Obviously I'm overlooking something, any ideas would be appreciated. Thanks

    Read the article

  • replace all link href's with return of a function, with regex

    - by Rajat Singhal
    I have a function which returns a modified url, if passed a url.. I need to call this function on hrefs of all the links in my html data.. I can't use DomDocument, it's in php cli, I need regex solution.. I have tried preg_replace, and preg_replace_callback, but I simply don't understand the whole concept of using $1, $2 in the replacement string..If somebody can point to a good documentation,that'll be great too.. function modifyUrl($old_url) { ...... return $new_url; } $html = "...";//Long html content having links //need to call modifyUrl for all link's hrefs..

    Read the article

  • Why is Read-Modify-Write necessary for registers on embedded systems?

    - by Adam Shiemke
    I was reading http://embeddedgurus.com/embedded-bridge/2010/03/different-bit-types-in-different-registers/, which said: With read/write bits, firmware sets and clears bits when needed. It typically first reads the register, modifies the desired bit, then writes the modified value back out and I have run into that consrtuct while maintaining some production code coded by old salt embedded guys here. I don't understand why this is necessary. When I want to set/clear a bit, I always just or/nand with a bitmask. To my mind, this solves any threadsafe problems, since I assume setting (either by assignment or oring with a mask) a register only takes one cycle. On the other hand, if you first read the register, then modify, then write, an interrupt happening between the read and write may result in writing an old value to the register. So why read-modify-write? Is it still necessary?

    Read the article

  • Modify 3rd party code in subversion

    - by Alex
    I use a script for my homepage but I'd like to localize it. Furthermore the CSS uses images from a special folder which does not fit to my folder hierarchy. Because I don't want to adopt these paths and settings I'll have to modify the original sources. Currently my repository looks like this: /3rdParty /CompanyA /CompanyAProduct1 /v1_0 /v1_1 /MyProductA /branches /tags /trunk /import /export /source Via svn:externals I map all stuff I need (lib, dll, or code) into the import folder. Now I'd like to modify the files in the import folder but this will modify the original sources, too (as far as I know). What is the best solution to have the modified version in my import folder but the original sources remain unaffected? Should I make a branch of the 3rd party code? But then I have to update the original sources for every new release. Thanks!

    Read the article

  • Replacing a class with Mono.Cecil

    - by icktoofay
    Say I have assembly A. It was modified with Mono.Cecil a little bit. Now say I have assembly B. It has a class named SomeClass. Assembly A also has a class named SomeClass. Now I want to replace SomeClass from assembly A with the one in assembly B. I tried a few things, but I know that for one of my attempts, it actually remapped a method call like this: Console.WriteLine("Test."); ...into this: int.WriteLine("Test."); That can't be right. What is the correct way to replace a class with Mono.Cecil?

    Read the article

  • Synchronising local and remote DB

    - by nico
    Hi everyone, I have a general question about DB synchronisation. So, I'm developing a website locally (PHP + MySQL) and I would like to be able to synchronise at least the structure (and maybe the contents) of the two DB when one of the two is changed (normally I would change the local copy). Right now what I'm doing is to use mysqldump to dump the modified tables and then import them in the remote DB or do it by hand if the changes are minimal. However I find this tedious and error-prone. For the PHP I'm currently using Quanta+ which has the handy feature of finding files that have changed and just upload those. Is there something similar for MySQL? Otherwise how do you keep your DBs synchronised? Thanks nico PS: I'm sorry if this was already asked, I saw other questions that deal with similar topics, but couldn't really find an answer.

    Read the article

  • Connecting PC via Bluetooth SNP

    - by Nicholas
    Hi, I have a widcomm example BluChat "WIDCOMM SDK RFComm Service" running on my PC with an USB dongle (BT-2400P). I would like to connect this chat from my HTC Desire. So I stared with the Java example http://developer.android.com/resources/samples/BluetoothChat/index.html. This is also using BT RFComm. If I'm using my HTC as a server it work's fine, but I would like to use my PC as a server. Then .connect() comes back with "Service Discovery Failure". I have modified the UUID string in the Java example to match the PC-application mmSocket = mmDevice.createRfcommSocketToServiceRecord(UUID.fromString("5fc2a42e-144e-4bb5-b43f-4e61711d1c32")); mmSocket.connect(); What is missing? Any help appreciated. Nicholas

    Read the article

  • Inserting nil Values into Sqlite Database?

    - by Chris
    I am working on an iPhone App where I am pulling data from an XML file and inserting it into a sqlite database located in the App. I am able to successfully do this process, but it appears that if I try to sqlite3_bind_text with a NSString that has a value of "nil", the App quickly dies. This is an example of code that fails: (modified for this example) // idvar = 1 // valuevar = nil const char *sqlStatement = "insert into mytable (id, value) VALUES(?, ?)"; sqlite3_stmt *compiledStatement = nil; sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL); sqlite3_bind_int(compiledStatement, 1, [idvar intValue]);; sqlite3_bind_text(compiledStatement, 2, [valuevar UTF8String], -1, SQLITE_TRANSIENT);

    Read the article

  • git hooks - regenerate a file and add it to each commit ?

    - by egarcia
    I'd like to automatically generate a file and add it to a commit if it has changed. Is it possible, if so, what hooks should I use? Context: I'm programming a CSS library. It has several CSS files, and at the end I want to produce a compacted and minimized version. Right now my workflow is: Modify the css files x.css and y.css git add x.css y.css Execute minimize.sh which parses all the css files on my lib, minimizes them and produces a min.css file git add min.css git commit -m 'modified x and y doing foo and bar' I would like to have steps 3 and 4 done automatically via a git hook. Is that possible? I've never used git hooks before. After reading the man page, I think I need to use the @pre-commit@ hook. But can I invoke git add min.css, or will I break the internet?

    Read the article

  • Install .exe software application on remote machines.

    - by coral_reef
    Hi, I modified this script from the net, which is suppose to install .exe applications for remote machines: $m = Read-Host "Enter machine name" $File = "c:\temp\office2007sp2-kb958194-fullfile-en-us.exe" $product = [WMICLASS]"\$m\ROOT\CIMV2:win32_Process" $product.Create($File) When I run this script, I have noticed that this program promptly creates a process in the remote machine with the application name office2007sp2-kb958194-fullfile-en-us.exe. This can be checked in the task manager also. But other than that, there is no way to find out if this is getting installed in the remote machine or not. Is there a way to find out, if the installation is really happening? Or does this script actually works? Any help will be great! Reagrds Arindam

    Read the article

  • PHP + GD: imagetruecolortopalette not keeping transparency

    - by AlexMax
    I am using GD to output an image that is a truecolor+alpha channel PNG file using imagepng just fine. However, I would like to have the ability to also output an ie6-compatible 256-color PNG as well. According to the official documentation for imagetruecolortopalette: The code has been modified to preserve as much alpha channel information as possible in the resulting palette, in addition to preserving colors as well as possible. However, I am finding that the results of this function do not properly preserve any transparency at all. I used this firefox image with text superimposed on top of it as a test, and all the function did was give me a white background and a weird dark blue border. I know that I can't hope to preserve the full alpha channel, but surely this function would at least pick up on the transparent background. Is there something I'm missing? Are there any alternative approaches that I can take?

    Read the article

  • ACL suggestions needed for a small light framework developed

    - by Sai
    Hello all, I've developed a small framework that was needed for the firm that I work. The problem is I've not made a full level framework, as developers are finding tough time to understand what is what, So I made a simple structure with app/controllers, app/models, app/views so that they can clearly separate the code and can get used to higher frameworks later. All other things like components/modules/helpers are just coded for now in a file called app_functions.php. The above framework is derived from cakePHP, not all, but just the framework uses a modified code of dispatcher of cake. The models all work with normal sqls, and views with pure html using a template engine. Now I'm trying to develop a small application over it, it cameout well, but ACL is something which many versions of it have not proved that satisfactory. Can anybody suggest a good ACL. I've checked phpGACL(too heavy), Zend_ACL likely won't be compatible, Cakephp's ACL which wont fit in the structure,as we are not using cake's SQLs, as there too many queries hitting the database for one page display.

    Read the article

  • Junit exception test

    - by Prithis
    I have two tests to check the expected exception throw. I am using Junit 4 and has following syntax. @Test(expected=IllegalArgumentException.class) public void testSomething(){ .......... } One of the tests fail even though IllegalArgumentException is thrown and the other passes. Any idea whats missing?? I modified the test which is failing to following and it passes. public void testSomething(){ try{ ............ //line that throws exception fail(); }catch(IllegalArgumentException e) { } }

    Read the article

  • flex/actionscript client entity state refresh on JPA update using Pimento EntityManager

    - by Chris
    My Flex application uses a client-side pimento EntityManager which fetches quite a few objects and associations. It does this by forcing eager fetching of particular association ends in the form of fetch plans. I would like to update the client whenever a change has been made to an entity existing in the EntityManager's cache. Is it possible to update the state of the changed entity ONLY, including updating which entities are associated, without resetting the state of these associated entities? I have setup an EntityListener with a JPA post-update method that notifies clients when a persisted entity has been updated. I want this to trigger a refresh for the modified client-side entity, but calling EntityManager.refresh(entity) resets all lazy associations to proxies. Initializing these proxies resets the associated entities, even if they were loaded previously. I'm looking for an efficient way to keep the client's state in synch with the server's state, at least with respect to the entities that have already been retrieved by the initial load.

    Read the article

  • License similar to the MIT license but without the ability to sell?

    - by Ben
    I'm trying to decide how I want to license my Wordpress themes to the public. I know that the GPL is recommended to Wordpress theme creators, however I feel it might not be liberal enough for me because I want businesses to be able to use them if they want to. I really like the MIT license, the only thing that gets me is the freedom to sell part. I don't want someone taking my themes and selling them on some theme farm site, they should be free for everyone, however I don't want to require them to republish any changes under the MIT as well, I think that that freedom should remain intact. Is there a license that sort of fits into the terms I specified here? I'm not a lawyer so I have trouble reading through the complicated language of licenses. If there is not a similar license to the MIT but with the terms I have specified, should I just license under a modified MIT? If so, can anyone help me write it? Thanks very much!

    Read the article

  • How can I update a row and insert a new one automatically in NHibernate with one call to Save?

    - by snicker
    Let's say I have a Type II SCD database, that is basically append only. I am using NHibernate to persist objects to my database. I have an object like so: Pony |- int Id |- Guid EntityId |- string PonyName |- string PonyColor |- int RevisionValidFrom |- int RevisionValidTo Here's a typical scenario: Pony myLittlePony = myStable.GetLatestPonyByGuid("0f1ac08a-3328-43db-b278-77c272e4fea3"); myLittlePony.PonyColor = "Fish"; myNHSession.Save(myLittlePony); I want to be able to call Session.Save(myLittlePony) and have NHibernate UPDATE the old entity's RevisionValidTo to whatever I specify and then INSERT the modified Pony as a new row with a new Id, basically as if it were a brand new object being persisted to the DB.

    Read the article

  • Renaming Functions during runtime in PHP.

    - by The Rook
    In PHP 5.3 is there a way to rename a function or "hook" a function. There is the rename_function() within "APD" which has been broken since ~2004. If you try and build it on PHP 5.3 you'll get this error: 'struct _zend_compiler_globals' has no member named 'extended_info' This is a really easy error to fix, just change this line: GC(extended_info) = 1; to CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO; I modified my php.ini and the APD shows up in my phpinfo() as it should. However when i call rename_function() the PHP page doesn't load and I get a segmentation fault in my /var/log/apache2/error.log. Is there anyway to fix APD to work with a modern version of PHP? Or is there another method to rename functions? Why on earth is vital feature not in php!??!?! (Gotta love python :)

    Read the article

  • Help Auditing in Oracle

    - by enrique
    Hello everybody I need some help in auditing in Oracle. We have a database with many tables and we want to be able to audit every change made to any table in any field. So the things we want to have in this audit are: user who modified time of change occurred old value and new value so we started creating the trigger which was supposed to perform the audit for any table but then had issues... As I mentioned before we have so many tables and we cannot go creating a trigger per each table. So the idea is creating a master trigger that can behaves dynamically for any table that fires the trigger. I was trying to do it but no lucky at all....it seems that Oracle restricts the trigger environment just for a table which is declared by code and not dynamically like we want to do. Do you have any idea on how to do this or any other advice for solving this issue? thanks in advance.

    Read the article

  • Integrating Drools with JBossESB

    - by El Guapo
    In recent weeks I've been researching Drools amongst other CEP/Rule Engines and I believe I would like to use Drools. I also have an JBossESB which is responsible for routing of messages between different services. Unless I am totally missing the boat, I can't for the life of me see how I would get data into Drools via JBossESB. Inside of my ESB I have data (facts) that needs to be monitored and routed correctly (some of the data properties also needs to be modified based on other properties in each of the facts, I figured using Drools (a combination of Fusion and Expert) would be the best way to handle this, however, I don't really see in any of the JBoss (or other) documentation how I would get that done. Is this a cart-before-the-horse situation? Am I totally missing the boat somewhere? Any help is greatly appreciated. Thanks.

    Read the article

  • Paypal - DoExpressCheckoutPayment null pointer

    - by user969894
    String nvpstr = "&TOKEN=" + token + "&PAYERID=" + payerID + "&PAYMENTREQUEST_0_PAYMENTACTION=" + paymentType + "&PAYMENTREQUEST_0_AMT=" + finalPaymentAmount + "&PAYMENTREQUEST_0_CURRENCYCODE=" + currencyCodeType + "&IPADDRESS=" + serverName; Having done an earlier call to SetExpressCheckout, I had to change a few parameter names because Paypal had changed it in the documentation but not in the code from the integration wizard. Now for DoExpressCheckoutPayment I've modified a few but I get a null pointer at strAck: HashMap nvp = httpcall("DoExpressCheckoutPayment", nvpstr); String strAck = nvp.get("ACK").toString(); if (strAck.equalsIgnoreCase("Success")) { return nvp; } Not sure what is wrong, any suggestions for debugging this or possible solutions?

    Read the article

  • How to normalize a URL in Java?

    - by dfrankow
    URL normalization (or URL canonicalization) is the process by which URLs are modified and standardized in a consistent manner. The goal of the normalization process is to transform a URL into a normalized or canonical URL so it is possible to determine if two syntactically different URLs are equivalent. Strategies include lowercasing, adding trailing slashes, https = http, etc. The Wikipedia page lists many. Got a favorite method of doing this in Java? Perhaps a library (Nutch?), but I'm open. Smaller and fewer dependencies is better. I'll handcode something for now and keep an eye on this question.

    Read the article

  • svn track brand new code base

    - by Fire Crow
    I'm at a company, we keep recieviing new codebases from a third party vendor. we'd like to track the changes in subversion. is there a way to replace a branch with the new code and track the changes? currently we just delete all files in the branch, and then add the new files and commit. we'd like to track the files, but I havn't found a tool that will easily deal with all the .svn directories found in subfolders. does anyone know a tool that will replace an svn directory with a new branch and create the respective modify add and delete records as if the code base was organically modified?

    Read the article

  • XmlDocument caching memory usage

    - by mdsharpe
    We are seeing very high memory usage in .NET web applications which use XmlDocument. A small (~5MB) XML document is loaded into an XmlDocument object and stored in HttpContext.Cache for easy querying and XSLT transformation on each page load. The XML is modified on disk periodically so a cache has a dependency on the file. Such an application appears to be using hundreds of megabytes of RAM. I have experimented with requesting garbage collection on each request start, and this keeps the RAM usage far lower but I cannot imagine this is good practise. Does anyone have any suggestions as to how we can achieve the same goal but with lower RAM usage?

    Read the article

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