Search Results

Search found 4355 results on 175 pages for 'filesystem notification'.

Page 62/175 | < Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >

  • Get ANSI-colored output from external command

    - by German Rumm
    I am writing a small script for watchr that runs my PHP unit tests. Current script runs tests using system() and displays them colored. I am trying to add libnotify functionality, but for that I need to parse the output and match against regexp, so that notification will either display green or red. system() doesn't return output, %x does return, but puts p doesn't display colors, which I need to quickly see which test failed. One option would be to run tests twice - once for display in terminal window, and second time for checking which notification to show, but I would rather avoid it.

    Read the article

  • Create fake subdirectories with htaccess and php AND keep existing directories as is.

    - by Arseni
    I have a website, which has numerous subdirectories already. (All existing in server's filesystem) I want to create new "virtual" sub-dirs with htaccess, but I only want the htaccess rule work for directories, listed in DB, and not existing in filesystem. i.e. File system has: /dir1/ & /dir2/ MySQL database has record for 'dir3' & 'dir4' And I want: A: mysite.com/dir1/ and mysite.com/dir2/ display existing old content B: mysite.com/dir3/ and mysite.com/dir4/ display content from MySQL provided by PHP sctipt via redirect like: mysite.com/myscript.php?dir=dir3 C: mysite.com/dir5/ display 404 error (Dir does not exist in DB nor in Database) Basically I want .htaccess to work like this: IF DIR Exists in DB - apply the rewrite rule and show content from myscript.php?dir=DIR ELSE don't apply any rule. I can create a separate php script, which can return 0/1 when given dir name exist in DB or not, but how do I make mod_rewrite get the data from that script? Is it possible with htaccess/PHP at all?

    Read the article

  • Django: query spanning multiple many-to-many relationships

    - by Brant
    I've got some models set up like this: class AppGroup(models.Model): users = models.ManyToManyField(User) class Notification(models.Model): groups_to_notify = models.ManyToManyField(AppGroup) The User objects come from django's authentication system. Now, I am trying to get all the notifications pertaining to the groups that the current user is a part of. I have tried.. notifications = Notification.objects.filter(groups_to_notify=AppGroup.objects.filter(users=request.user)) But that gives an error: more than one row returned by a subquery used as an expression Which I suppose is because the groups_to_notify is checking against several groups. How can I grab all the notifications meant for the user based on the groups he is a part of?

    Read the article

  • PHP Code- How to check duplicate entries in Mysql Database

    - by yash bhavnani
    Hi guys, I am working on Google checkout API notification URL. I want to apply a check in my php code which will see if transaction ID present in transaction table of my DB, it will exit not process. I am struggling into applying here. Can somebody help? I want to check if trasaction ID exists in table of DB it will exit, it will not process: *case "new-order-notification": $sql = "update transactions set remote_trans_id=\"".$_REQUEST["google-order-number"]."\", updated=now() where id=".$_REQUEST["shopping-cart_items_item-1_merchant-item-id"]." "; execute($sql, $conn); break;* Regards

    Read the article

  • How to know when the MPMoviePlayerController has been paused in iPhone?

    - by iPhoney
    I want to add an overlay view for my video when the video is paused by the user. Is there any way to get the pause notification from MPMoviePlayerController? According to Apple Doc, there should be ways to do this but I can't find which notification should I use for this purpose. Quote: In addition to being notified when playback finishes, interested clients can be notified in the following situations: -When the movie player begins playing, is paused, or begins seeking forward ... For more information, see the Notifications section in this reference.

    Read the article

  • How can I implement "real time" messaging on Google AppEngine?

    - by Freed
    I'm creating a web application on Google AppEngine where I want the user to be notified a quickly as possible after certain events occour. The problem is similar to say a chat server in that I need something happening on one connection (someone is writing a message in a chat room) to propagate to a number of other connections (other people in that chat room gets the message). To get speedy updates from the server to the client I'm planning on using long polling with XmlHttpRequest, hoping that AppEngine won't interfere other than possibly restriing the timeout. The real problem however is efficient notification between connections on AppEngine. Is there any support for this type of cross connection notification on AppEngine that does not involve busy-waiting? The only tools I can think of to do this at all is either using the data storage (slow) or memcache (unreliable), and none of them would let me avoid busy-waiting. Note: I know about XMPP support on AppEngine. It's related, but I want a browser based solution, sending messages to the users by XMPP is not an option.

    Read the article

  • Template engine recommendations

    - by alex
    I'm looking for a template engine. Requirements: Runs on a JVM. Java is good; Jython, JRuby and the like, too... Can be used outside of servlets (unlike JSP) Is flexible wrt. to where the templates are stored (JSP and a lot of people require the templates to be stored in the FS). It should provide a template loading interface which one can implement or something like that Easy inclusion of parameterized templates- I really like JSP's tag fragments Good docs, nice code, etc., the usual suspects I've looked at JSP- it's nearly perfect except for the servlet and filesystem coupling, Stringtemplate- I love the template syntax, but it fails on the filesystem coupling, the documentation is lacking and template groups and stuff are confusing, GXP, TAL, etc. Ideas, thoughts? Alex

    Read the article

  • Help with Uitextfield....

    - by Skov
    Hey .... im working on a Iphone app ..i cant get this working: i want this alert to show up if the text field is empty when clicking the button linked to "timedAlarm" and if the text filed has a text i want it to go ahead and do the local notification, every thing works fine, until i put in this code before all the code for the notification, i have tried a lot of ways, but it wont work, either the alert shows up, even if there is a text, or els the alert wont show. - (IBAction) timedAlarm { if (eventText.text != nil){ UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Excuse Me !" message:@"Plz enter an alarm text" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [message show]; [message release]; }else { Hope u can help me :-D Rene Skov

    Read the article

  • python unit testing os.remove fails file system

    - by hwjp
    Am doing a bit of unit testing on a function which attempts to open a new file, but should fail if the file already exists. when the function runs sucessfully, the new file is created, so i want to delete it after every test run, but it doesn't seem to be working: class MyObject_Initialisation(unittest.TestCase): def setUp(self): if os.path.exists(TEMPORARY_FILE_NAME): try: os.remove(TEMPORARY_FILE_NAME) except WindowsError: #TODO: can't figure out how to fix this... #time.sleep(3) #self.setUp() #this just loops forever pass def tearDown(self): self.setUp() any thoughts? The Windows Error thrown seems to suggest the file is in use... could it be that the tests are run in parallel threads? I've read elsewhere that it's 'bad practice' to use the filesystem in unit testing, but really? Surely there's a way around this that doesn't invole dummying the filesystem?

    Read the article

  • Android SharedPreferences set True or False - Clear on App Exit

    - by KickingLettuce
    I want a notification to pop up when an app opens. But once User dismisses, I don't want it to come back again, even if they go back to the same activity. But when the app exits, and they come back later, I want same dialog notification to pop up (prompting user to login). So basically... boolean b = true; if (b == true) { // show dialog b = false; } I simply want var b to save state but clear on exit.

    Read the article

  • django accessing class variables in a view

    - by dana
    hello, i want to make a notification function, and i need fields from 2 different models. how can i access those fields? in my notification view i wrote this data = Notices.objects.filter(last_login<date_follow) where last_login belongs to the model class User , and date_follow to Follow but it is not a proper and correct way of accessing those variables. How can i access them? I need to compare the two dates for realising the notifications that one did not see since his last login. Thanks!

    Read the article

  • How to treat compressed folders as files using ShellObject from WindowsAPICodePack?

    - by JustABill
    I am trying to implement a filesystem browser using the WindowsAPICodePack for C# (.Net 4), and it works pretty well, except that the ShellObject system treats zip files as folders, whereas I'd prefer they be files. Is there some way I can force it to work this way? The low-level interop it does is beyond me. As far as I can tell, internally it asks if the item is a Folder or a Filesystem element. It then uses this (and some type checks) to figure out what it actually is. Is it safe to force it to treat it as a file if it's Compressed? Or do I have to do something else?

    Read the article

  • UITableView animations for a "lazy" UI design?

    - by donuts
    I have a UITableViewController that allows the user to perform editing tasks. Now, once a user has committed his change, the table view doesn't directly change the model and updates the table, rather "informs" the model what the user wants to do. The model in turn updates accordingly and then posts a notification that it has been changed. As far as I've seen, I need to begin/end updates on the tableview and in between change the model to its' final form. My changes though, are asynchronous and cannot guarantee to update the model before 'tableview endupdates' is called. Currently, each time I receive a 'model did change' notificaiton, I reload the entire table. So, how can I really make cell animations (delete/insert) work? Should the model fire a notification for each little change instead of the entire table?

    Read the article

  • slideIn and slideOut reduces width of component

    - by shub
    Can someone help me to solve the problem of reducing the width of the component during SlideIn or SlideOut? I am using the Ext JS version 4.1 RC1. Ext.onReady(function () { Ext.create('Ext.container.Viewport', { layout: 'border', items: [{ region: 'north', autoHeight: true, border: false, margins: '0 0 5 0', items: [{ xtype: 'container', id: 'con_notification-box', cls: 'notification-box', hidden: true, border: true, width: 500, height: 0, style: { position: 'fixed', minHeight: '75px !important', left: '50%', marginLeft: '-250px', zIndex: '999999', backgroundColor: 'white' }, items:[{ xtype: 'container', html: '<p>Insert your information text here.</p>' },{ xtype: 'container', id: 'con_application-close', cls: 'notification-close', html: '<br />Close' }] },{ xtype: 'container', html: '<h1 class="x-panel-header">Your title</h1>' }] }] }); var con_notification_box = Ext.getCmp('con_notification-box').getEl(); con_notification_box.slideIn('t', { easing: 'easeOut', duration: 500 }); Ext.getCmp('con_application-close').getEl().on('click',function(){ con_notification_box.slideOut('t', { duration: 2000 }); }); }); I'd be very grateful if you could help me. Kind regards, shub

    Read the article

  • Toastr.js notifications as modal notfication

    - by Maxsteel
    I know it's not what toastr (or toast notifs in general) are meant to be used for, but I want to use them as a modal notification. My idea is following. On toast show: toastr.options.onShown = function() { //Create an overlay on the entire page} Overlay: #overlay { background-color: rgba(0, 0, 0, 0.8); z-index: 999; position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: none; } And on toast close: toastr.options.onHidden = function() { //make overlay go away } Also, I'm setting timeout of toast to 0 so it won't disappear by itself. Question: I want the toast notification to stay atop the overlay and not behind it as overlay will cover everything. How can I do it?

    Read the article

  • Can I subscribe to window-docking events in windows 7 from C#

    - by www.mortenbock.dk
    Hi. I am wondering if it is possible to create an application that could receive a notification when any other application/window is docked with the new windows 7 docking feature (f.ex. Winkey + left arrow) The purpose of my application would be to set up custom rules for certain windows. So for example if I am using Chrome and I press the Win+LEFT keys, then my application would receive a notification, and would be able to say that the window should not resize to 50% of the screen, but should use 70%. I am not very familiar with writing windows applications (mostly do web), so any pointers at how this might be achieved are very welcome. Thanks.

    Read the article

  • jQuery - deferred versus promise

    - by fletchsod
    What is the difference between Deferred and Promise other than the jQuery versions? What should I use for my need? I only want to call the fooExecute(). I only need the fooStart() and fooEnd() to toggle the html div status for example. //I'm using jQuery v2.0.0 function fooStart() { /* Start Notification */ } function fooEnd() { /* End Notification */ } function fooExecute() { /* Execute the scripts */ } $('#button1').on('click', function() { var deferred1 = $.Deferred(); var promise1 = $.Promise(); deferred1.??? promise1.??? });

    Read the article

  • DB fields not showing up in association custom queries?

    - by Kevin
    I have a notification list that the user can select different show options for different kinds of notifications along with how many results are returned. I'm keeping them in the user model because I want the custom sort to stay with the user between sessions. Here is the association in my user model: has_many :notifications, :class_name => "Notification", :foreign_key => "user_id", :conditions => ["won = ? and lost = ? and paid = ?", self.prefs_won, self.prefs_lost, self.prefs_paid], :limit => self.prefs_results.to_s But when I use the above code, Rails throws me an "unknown method" error for self.prefs_won. It is definitely a field in my database and set as a boolean value, but Rails can't find it... what's the problem?

    Read the article

  • How can I delete a file in Sinatra after it has been sent via send_file?

    - by John Reilly
    I have a simple sinatra application that needs to generate a file (via an external process), send that file to the browser, and finally, delete the file from the filesystem. Something along these lines: class MyApp < Sinatra::Base get '/generate-file' do # calls out to an external process, # and returns the path to the generated file file_path = generate_the_file() # send the file to the browser send_file(file_path) # remove the generated file, so we don't # completely fill up the filesystem. File.delete(file_path) # File.delete is never called. end end It seems, however, that the send_file call completes the request, and any code after it does not get run. Is there some way to ensure that the generated file is cleaned up after it has been successfully sent to the browser? Or will I need to resort to a cron job running a cleanup script on some interval?

    Read the article

  • How can I modify the application file of an application that is currently running (on Linux)?

    - by Hach-Que
    I have an application running called AppFS. This application has an ext2 filesystem just attached to the end of the file (it's positioned so that the application binary exists in a 1MB spacing area, followed by the ext2 data). Now I've got FUSE embedded in the program and I've managed to extract the filesystem out of the application data into a temporary file so that FUSE can mount / use it. The problem I have now is writing the temporary file back into the application file. I get "Text file busy" presumably because the application has locked itself and won't let writes occur. Is there a way I can force the file to become unlocked so I can write data to it? (It's important to note that I'm not changing the application binary area - just rewriting the ext2 component.) It needs to be unlocked without requiring root permissions (unlocked by the same user who started the application).

    Read the article

  • How to send Message to all registered users with android gcm?

    - by FlyBy
    I am using android gcm to make push notifications for my users. Everything is working so fine. To send a notification I need the users registration id to identify him. It works. Now my problem is that I have some hundreds of users and I would like to inform them ALL about certain updates. Is there a way to send a notification to all users? Do I really have to push them all by their registration ids? On the server side I am using PHP and CURL as it is shown in many examples around here...

    Read the article

  • Resizing Ubuntu x64 Server Partition with VirtualBox not reflected in OS

    - by daleyjem
    I've already resized my virtual disk with VirtualBox, but now need to extend the partition of my Ubuntu VM itself. I thought I was on my way with GParted live CD, but after I resize the "extended" filesystem partition, and then the child "lvm2 pv" filesystem partition to fill the unallocated space, df -h still shows the original disk size after I reboot into the VM. Any tips on this? I've scoured the webs tirelessly. Should I be resizing the boot (/dev/sda1) partition instead? Should I try to convert my lvm2 to ext4 or something? I'm lost on this. Note: VirtualBox hard disk is "dynamic". Specs: VBox 4.2.18 Ubuntu 12.04.2 amd64 Gparted 0.16.2-1b-i486

    Read the article

  • CSS Rule Priorities

    - by Antilogic
    Given the following mark-up... <div id="Header"> <a href="#" class="Highlight">foo</a> </div> And the following stylesheet... /******************Exceptions******************/ #Footer, #Header, #Footer a, #Header a { color: #f8f8f8; } /******************Classes******************/ .Highlight, a.Highlight { color: #B1D355; } .Notification, a.Notification { color: Red; } Why is my link still off-white (F8F8F8) rather than green (B1D355)? Shouldn't using the class Highlight override the color settings for Header and Footer since it comes after their declarations?

    Read the article

< Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >