Search Results

Search found 308 results on 13 pages for 'midnight commander'.

Page 3/13 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How can a Windows program temporarily change its time zone?

    - by Rob Kennedy
    I've written a function to return the time_t value corresponding to midnight on a given day. When there is no midnight for a given day, it returns the earliest time available; that situation can occur, for example, when Egypt enters daylight-saving time. This year, the time change takes effect at midnight on the night of April 29, so the clock goes directly from 23:59 to 01:00. Now I'm writing unit tests for this function, and one of the tests should replicate the Egypt scenario. In Unix, I can accomplish it like this: putenv("TZ", "Egypt", true); tzset(); After doing that, further calls to localtime behave as if they're in Egypt instead of Minnesota, and my tests pass. Merely setting the environment variable doesn't have any effect on Windows, though. What can I do to make the unit test think it's somewhere else without affecting the rest of the programs running on the system?

    Read the article

  • Unicode Regex; Invalid XML characters

    - by Ambush Commander
    The list of valid XML characters is well known, as defined by the spec it's: #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] My question is whether or not it's possible to make a PCRE regular expression for this (or its inverse) without actually hard-coding the codepoints, by using Unicode general categories. An inverse might be something like [\p{Cc}\p{Cs}\p{Cn}], except that improperly covers linefeeds and tabs and misses some other invalid characters.

    Read the article

  • How to fetch populated associated models in CakePHP when calling read()

    - by Code Commander
    I have the following Models: class Site extends AppModel { public $name = "Site"; public $useTable = "site"; public $primaryKey = "id"; public $displayField = 'name'; public $hasMany = array('Item' => array('foreignKey' => 'siteId')); public function canView($userId, $isAdmin = false) { if($isAdmin) { return true; } return array_key_exists($this->id, $allowedSites); } } and class Item extends AppModel { public $name = "Item"; public $useTable = "item"; public $primaryKey = "id"; public $displayField = 'name'; public $belongsTo = array('Site' => array('foreignKey' => 'siteId')); public function canView($userId, $isAdmin = false) { // My problem appears to be the next line: return $this->Site->canView($userId, $isAdmin); } } In my controller I am doing something like this: $result = $this->Item->read(null, $this->request->id); // Verify permissions if(!$this->Item->canView($this->Session->read('userId'), $this->Session->read('isAdmin'))) { $this->httpCodes(403); die('Permission denied.'); } I notice that in Item->canView() $this->data['Site'] is populated with the column data from the site table. But it merely an array and not an object. On the other hand $this->Site is a Site object, but it has not been populated with the column data from the site table like $this->data. What is the proper way to have CakePHP get the associated model as the object and containing the data? Or am I going about this all wrong? Thanks!

    Read the article

  • Deeper Unity search indexing

    - by Chris Bauer
    Unity is currently only indexing and displaying a shallow set of file results. Suppose I want to open the file "/home/Music/Creedence Clearwater Revival/Willy and the Poor Boys/The-Midnight-Special.mp3". I open the "Files and Folders" lens and type "The Midnight Special". Unfortunately, the song doesn't display. I try "Willy and the Poor Boys" but that folder doesn't display either. The only folder that does display in the lens is "Music". Therefore I must open the "Music" folder then navigate through the entire directory tree to open the file I want. How do I get a deeper index of files to display in the "Files and Folders" lens? Thanks for your help!

    Read the article

  • How to correctly remove items from Wine Programs menu?

    - by Ivan
    As soon as a Windows application creates a shortcut/directory in Wine Start Menu Programs directory (in particular I do this manually by means of Total Commander and it works), it gets reflected in Ubuntu Wine Programs menu. But when a shortcut/folder is removed (manually, by means of Total Commander again) - Ubuntu Wine Programs menu item persists, and this is an undesirable behaviour. I've once done something causing Wine/Ubuntu to actually refresh the menu state and remove orphan items, but unfortunately I can't remember what. Do you know the way? I am specifically interested in hand-made/removed shortcuts, not installing/uninstalling Windows software.

    Read the article

  • Is there a hotkey to toggle between the two panes only in Nautilus (with Extra Pane/F3 mode)?

    - by Jakob
    I am running Nautilus with the Extra Pane feature enabled. But I am missing a keyboard shortcut to switch between the left and right pane. Is there a shortcut key for toggling just between the left and right file pane? Something that works like tab in Total Commander/Midnight Commander? Tab and Shift-Tab are not what I'm looking for. They cycle through several other GUI elements in addition to the two panes. I'm on Ubuntu 10.04 if that matters.

    Read the article

  • How often should we write unit tests?

    - by Midnight Blue
    Hi, I am recently introduced to the test-driven approach to development by my mentor at work, and he encourages me to write an unit-test whenenver "it makes sense." I understand some benefits of having a throughout unit-test suite for both regression testing and refractoring, but I do wonder how often and how throughout we should write unit-test. My mentor/development lead asks me to write a new unit test-case for a newly written control flow in a method that is already being tested by the exsisting test class, and I think it is an overkill. How often do you write your unit tests, and how detailed do you think your unit tests should be? Thanks!

    Read the article

  • Remote NX login to Ubuntu, Gnome can't mount CD/DVD drive

    - by T.J. Crowder
    Even though I'm sitting next to it, I log into my Ubuntu 10.04 LTS system via NX Free Edition from another system at the moment (this is temporary, not worth buying a KVM for). Curiously, though, when I do that Gnome's auto-mounting fails for CD/DVD media (I haven't tried other kinds) with a "Not Authorized" error. For instance here's what happens when I put the Ubuntu 10.04 LTS installation CD in: This does not happen if I log into it locally (not via NX) with the same user account. When using NX, I can mount the media if I go to mount directly: tjc@midnight:~$ sudo mkdir /media/dvd tjc@midnight:~$ sudo mount -r -t iso9660 /dev/sr0 /media/dvd tjc@midnight:~$ ls /media/dvd autorun.inf casper dists install isolinux md5sum.txt pics pool preseed README.diskdefines ubuntu wubi.exe ...which, along with the "not authorized" error, suggests some kind of permissions problem to me (doh). What I find odd is that the same user is involved in both cases (local and via NX). I'm new to Ubuntu on the desktop (used it and other distros on servers for years), so I'm afraid I don't know how this auto-mounting is happening. I think it's handled by the gvfs package and its daemon, but that's about as far as I got (and perhaps I've taken a left turn even getting that far). Although I can work around it with mount, does anyone know how I might get auto-mounting to work?

    Read the article

  • Dual pane file manager for Mac OS

    - by Alex Kaushovik
    Is there a good customizable dual-pane file manager for Mac like Total Commander / Far Manager in Windows, or like Krusader / Midnight Commander in Linux? I used to work on Windows for quite a while and mostly used Far Manager and sometimes Total Commander, then I switched to Ubuntu Linux and used Krusader, now I switched to Mac OS (Snow Leopard) and I'm having a hard time trying to find a good file manager... Many of the existing applications are trying to replace the Finder with "multimedia capabilities nobody cares about in file manager - IMHO" (Path Finder, ForkLift), some of them are almost good dual-pane file managers (couldn't remember examples), but none of them worked for me mostly because of one reason: I couldn't integrate my file/folder comparison utility (Araxis Merge for Mac) with them... The way it worked for me in Windows and Linux is that I was setting the cursor on one file in the left pane, then setting the right-pane cursor on another file in right pane, then I pressed a hotkey that launched Araxis Merge with those to files/folders comparison results. It was very easy to set up in Far Manager (Windows) and Krusader (Linux, actually in Linux I used "Meld" instead of Araxis Merge...) The tool I'm looking for doesn't necessarily has to be free... Thank you!

    Read the article

  • Dual pane file manager for Mac OS

    - by Alex Kaushovik
    Is there a good customizable dual-pane file manager for Mac like Total Commander / Far Manager in Windows, or like Krusader / Midnight Commander in Linux? I used to work on Windows for quite a while and mostly used Far Manager and sometimes Total Commander, then I switched to Ubuntu Linux and used Krusader, now I switched to Mac OS (Snow Leopard) and I'm having a hard time trying to find a good file manager... Many of the existing applications are trying to replace the Finder with "multimedia capabilities nobody cares about in file manager - IMHO" (Path Finder, ForkLift), some of them are almost good dual-pane file managers (couldn't remember examples), but none of them worked for me mostly because of one reason: I couldn't integrate my file/folder comparison utility (Araxis Merge for Mac) with them... The way it worked for me in Windows and Linux is that I was setting the cursor on one file in the left pane, then setting the right-pane cursor on another file in right pane, then I pressed a hotkey that launched Araxis Merge with those to files/folders comparison results. It was very easy to set up in Far Manager (Windows) and Krusader (Linux, actually in Linux I used "Meld" instead of Araxis Merge...) The tool I'm looking for doesn't necessarily has to be free... Thank you!

    Read the article

  • Dual pane file manager for Mac OS X

    - by Alex Kaushovik
    Is there a good customizable dual-pane file manager for Mac like Total Commander / Far Manager in Windows, or like Krusader / Midnight Commander in Linux? I used to work on Windows for quite a while and mostly used Far Manager and sometimes Total Commander, then I switched to Ubuntu Linux and used Krusader, now I switched to Mac OS (Snow Leopard) and I'm having a hard time trying to find a good file manager... Many of the existing applications are trying to replace the Finder with "multimedia capabilities nobody cares about in file manager - IMHO" (Path Finder, ForkLift), some of them are almost good dual-pane file managers (couldn't remember examples), but none of them worked for me mostly because of one reason: I couldn't integrate my file/folder comparison utility (Araxis Merge for Mac) with them... The way it worked for me in Windows and Linux is that I was setting the cursor on one file in the left pane, then setting the right-pane cursor on another file in right pane, then I pressed a hotkey that launched Araxis Merge with those to files/folders comparison results. It was very easy to set up in Far Manager (Windows) and Krusader (Linux, actually in Linux I used "Meld" instead of Araxis Merge...) The tool I'm looking for doesn't necessarily has to be free... Thank you!

    Read the article

  • How do I aggregate activerecord model data for a specific time period?

    - by gsiener
    I'm collecting data from a system every ~10s (this time difference varies due to communication time with networked devices). I'd like to calculate averages and sums of the stored values for this activerecord model on a daily basis. All records are stored in UTC. What's the correct way to sum and average values for, e.g., the previous day from midnight to midnight EST? I can do this in sql but don't know the "rails way" to make this calculation.

    Read the article

  • how to find end of quarter given a date in the quarter

    - by Ramy
    If i'm given a date (say @d = '11-25-2010'), how can I determine the end of the quarter from that date. I'd like to use a timestamp one second before midnight. I can get this: select dateadd(qq, datediff(qq, 0, getdate()), 0) as quarterStart which gives me: '10-1-2010' and I use this for one second before midnight of a given day: select DateAdd(second, -1, DateAdd(day, DateDiff(day, 0, @d))+1, 0) ) AS DayEnd in the end, a quarterEnd method would give me '12-31-2010 23:59:00'

    Read the article

  • Automating an SSRS 2008 R2 Report Snapshots and run report with most recent data

    - by Mr Shoubs
    I would like to automate a report snapshot, but there is only an option to take a snapshot in the Report History Tab. All the resources I've found suggest I need to go to processing options and select "Render this report from a snapshot". But I don't want to do that - when I go to a report, I want to get the most recent data. However daily at midnight I'd like to take a snapshot and store it in the history in case I want to compare the reports as of midnight for the last few weeks. Or am I doing this wrong and have to create a subscription instead? Note: this is for an auditing database and has way to much data in to query a range with more than 1 day in it - reports are restricted as such. (1 day has over 1 million rows on it's own).

    Read the article

  • Why my widows 8 pc always powered on by moving mouse?

    - by Shinbo
    I recently installed windows 8 RTM, but found a very annoying thing. My PC always powered on automatically even in midnight. Eventually I noticed that I can power on the PC by pressing keyboard or mouse, and even moving mouse. After searched this in google, I turned off Sleep and Hibernate in Power Options - System Settings - Shutdown settings, but it still did not work. Would anyone please help me? I don't want to suffer from the noise of PC powering on in midnight any more. Thank a lot.

    Read the article

  • What command to use to unpack a .tar.gz file in Windows?

    - by Ivan
    I use to receive tar.gz files fromm colleagues but unpacking them with 7zip is not convenient as it unpacks a tar file from gz first while I usually seek to get the tar file contents (so I have to unpack the tar file explicitly next). I've tried adding tar -zxvf %P%N command to Total Commander button bar but it turned that tar -zxvf doesn't work but returns the following error (tried it in bare command prompt): tar: Cannot fork: Function not implemented tar: Error is not recoverable: exiting now I have got both GnuWin32 and cygwin installed, but I seek a solution that will work in Windows command line promt (and so will be callable from Totat Commander), not in cygwin command line promt.

    Read the article

  • Is there any two-panels bookmarks manager for Google Chrome?

    - by L. Shaydariv
    Hi to all. I'm just wondering, is there any two-panels-interface (like Total Commander, File Manager, etc) bookmark manager, extension, etc for Google Chrome? Using of the default bookmark manager is not so suitable because of two reasons: 1) I've gathered a very large collection of bookmarks (please, don't ask why) 2) bookmarks hierarchy tree always expands its branches when the bookmark manager is open (this makes the moving of bookmarks through the bookmark tree much and much harder). I tried to use Link Commander but it's very and very slow. Any suggestions? Thank you for advices.

    Read the article

  • How to use JQuery to set the value of 2 html form select elements depending on the value of another

    - by Chris Stevenson
    My Javascript and JQuery skills are poor at best and this is ** I have the following three elements in a form : <select name="event_time_start_hours"> <option value="blank" disabled="disabled">Hours</option> <option value="blank" disabled="disabled">&nbsp;</option> <option value="01">1</option> <option value="02">2</option> <option value="03">3</option> <option value="04">4</option> <option value="05">5</option> <option value="06">6</option> <option value="07">7</option> <option value="08">8</option> <option value="09">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="midnight">Midnight</option> <option value="midday">Midday</option> </select> <select name="event_time_start_minutes"> <option value="blank" disabled="disabled">Minutes</option> <option value="blank" disabled="disabled">&nbsp;</option> <option value="00">00</option> <option value="15">15</option> <option value="30">30</option> <option value="45">45</option> </select> <select name="event_time_start_ampm"> <option value="blank" disabled="disabled">AM / PM</option> <option value="blank" disabled="disabled">&nbsp;</option> <option value="am">AM</option> <option value="pm">PM</option> </select> Quite simply, when either 'midnight' or 'midday' is selected in "event_time_start_hours", I want the values of "event_time_start_minutes" and "event_time_start_ampm" to change to "00" and "am" respectively. My VERY poor piece of Javascript says this so far : $(document).ready(function() { $('#event_time_start_hours').change(function() { if($('#event_time_start_hours').val('midnight')) { $('#event_time_start_minutes').val('00'); } }); }); ... and whilst I'm not terribly surprised it doesn't work, I'm at a loss as to what to do next. I want to do this purely for visual reasons for the user as when the form submits I ignore the "minutes" and "am/pm". I'm trying to decide whether it would be best to change the selected values, change the selected values and then disable the element or hide them altogether. However, without any success in getting anything to happen at all I haven't been able to try the different approaches to see what feels right. I've ruled out the obvious things like a duplicate element ID or simply not linking to JQuery. Thank you.

    Read the article

  • How can I deal with file association in different application(not in Nautilus)?

    - by Julius
    Maybe i don't understand the system. Upgraded to (reinstalled) Ubuntu 11.04. Is there any way the applications can use something that i set in nautilus, or it's just a wrong idea about the usage? In nautilus the file association works great, easy, handy and so on... My first problem was when installed chromium. Downloaded a file, a popup ask for assocation, set nautilus. And it only opens folder, for any file show an error: it is not a direcrory. Ok, so i thought Google chrome changed, because previously .pdf open acrobat,.torrent open vuze and so on. But now i have to open nautilus on download folder with it, than select and open the preferable application by manually and can't use any automatism i used to. Then in gnome commander , it not followed the default association i set in nautilus. Ok maybe it is commander fault. use it's own. Then in calibre, the "read" use again this default "can't open its not a directory" error So it's seems to me the applications not using well this file associations or i really don't understand the aim of file associations system (mime,.desktop files,...) If there is no solution i think i have to search some program (if any exist's) which can identify and launch application and set as default instead nautilus.

    Read the article

  • T-SQL select where and group by date

    - by bconlon
    T-SQL has never been my favorite language, but I need to use it on a fairly regular basis and every time I seem to Google the same things. So if I add it here, it might help others with the same issues, but it will also save me time later as I will know where to look for the answers!! 1. How do I SELECT FROM WHERE to filter on a DateTime column? As it happens this is easy but I always forget. You just put the DATE value in single quotes and in standard format: SELECT StartDate FROM Customer WHERE StartDate >= '2011-01-01' ORDER BY StartDate 2. How do I then GROUP BY and get a count by StartDate? Bit trickier, but you can use the built in DATEADD and DATEDIFF to set the TIME part to midnight, allowing the GROUP BY to have a consistent value to work on: SELECT DATEADD (d, DATEDIFF(d, 0, StartDate),0) [Customer Creation Date], COUNT(*) [Number Of New Customers] FROM Customer WHERE StartDate >= '2011-01-01' GROUP BY DATEADD(d, DATEDIFF(d, 0, StartDate),0) ORDER BY [Customer Creation Date] Note: [Customer Creation Date] and [Number Of New Customers] column alias just provide more readable column headers. 3. Finally, how can you format the DATETIME to only show the DATE part (after all the TIME part is now always midnight)? The built in CONVERT function allows you to convert the DATETIME to a CHAR array using a specific format. The format is a bit arbitrary and needs looking up, but 101 is the U.S. standard mm/dd/yyyy, and 103 is the U.K. standard dd/mm/yyyy. SELECT CONVERT(CHAR(10), DATEADD(d, DATEDIFF(d, 0, StartDate),0), 103) [Customer Creation Date], COUNT(*) [Number Of New Customers] FROM Customer WHERE StartDate >= '2011-01-01' GROUP BY DATEADD(d, DATEDIFF(d, 0, StartDate),0) ORDER BY [Customer Creation Date]  #

    Read the article

  • Does cache absolute expiration guarantee that the cache is eliminated at the exact time?

    - by Fabio Milheiro
    I am using the HttpRuntime cache to store lists of objects and in our current project it was specified that the objects should be cached until midnight, so I am using DateTime.Today.AddHours(24) in order to set the absolute expiration date to midnight. For example, if today is May 26th, the absolute expiration time will be set to May 27th 0:00. But somehow, when I change the clock of my computer, the objects are still in cache. Should I wait a little (the CacheItemPriority is set to Normal)? Am I forgetting something? Thank you

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >