Daily Archives

Articles indexed Monday January 3 2011

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

  • In linux: how to exit a program but not kill it?

    - by biomed
    I use Ubuntu 10.10 and I have a python program (mnemosyne) that I synchronize the data files using dropbox. If I forget to close (exit) this program. Here is my problem scenario. I leave the program running at home and go to work but if I open the program at work and work on it the data file is changed and I loose my progress at home when I exit (it automatically saves) when exitimg. I thought I could create a cron job to automatically close mnemosyne every morning regardless os me remembering to do it or not but if I use kill the program exits without saving the datafile and I end up with a tmp file and an error message when I restart it. Is there a better way of sending the exit signal to this program emulating me clicking fileexit menu option. Thanks

    Read the article

  • X11 forwarding - have window showing on two computers.

    - by Tim
    I currently have 2 desks: one with a mac, the other with a 2 Linux computers on. One of those Linux computers is constantly on, so I would run the chat app on that (pidgin, most likely). I can run pidgin on Mac by sshing into the Linux computer with "ssh -X", i.e. X11 forwarding. However, I want to have the chat windows viewable on both computers simultaneously (or at the very least, by entering a command or whatever). Is this possible and if so, how? (Also: I know that it'd be possible via VNC or whatever, but yuck - X11 on mac is bad enough.) Thanks, Tim

    Read the article

  • Virtualbox fullscreen mode problem

    - by AtharvaI
    hi all I have a slightly weird issue with virtualbox. My host OS is Win7 (64-bit) and guest OS is Ubuntu 10.10(64-bit). When I switch to fullscreen mode in virtualbox, ubuntu display resizes to fit my screen size. however, after that the display is not updated. So if i click a menu or something I don't see it appear. but it seems to work in the background. if i click a menu in fullscreen mode, i don't see anything happen, but if then switch to windowed mode I see the menu already open. I have installed virtuabox guest additions. if any has a similar issue or has found a solution please let me know thanks.

    Read the article

  • Optimal partition setup for Windows 7 on SSD

    - by Mike C.
    Hello, I'm setting up my system with Windows 7 right now, with knowledge that I am going to be getting a SSD in the future. What optimizations/setup should I do now to make a smoother transition in the future? Should I created two partitions - one for the OS and one for the data? Assuming this is the case, I would be able to easily ghost my OS partition onto the SSD in the future. If so, what should go on the OS drive besides the OS? Program files? If I install games or Visual Studio, should it go on the OS drive or the data drive? I can see the SSD filling up fast if I install all my program files on there. I've seen a few posts where people talk about leaving a portion of the SSD unformatted - is this something I should do? Thanks!

    Read the article

  • SQL SERVER – 2008 – Missing Index Script – Download

    - by pinaldave
    Download Missing Index Script with Unused Index Script Performance Tuning is quite interesting and Index plays a vital role in it. A proper index can improve the performance and a bad index can hamper the performance. Here is the script from my script bank which I use to identify missing indexes on any database. Please note, if you should not create all the missing indexes this script suggest. This is just for guidance. You should not create more than 5-10 indexes per table. Additionally, this script sometime does not give accurate information so use your common sense. Any way, the scripts is good starting point. You should pay attention to Avg_Estimated_Impact when you are going to create index. The index creation script is also provided in the last column. Download Missing Index Script with Unused Index Script -- Missing Index Script -- Original Author: Pinal Dave (C) 2011 SELECT TOP 25 dm_mid.database_id AS DatabaseID, dm_migs.avg_user_impact*(dm_migs.user_seeks+dm_migs.user_scans) Avg_Estimated_Impact, dm_migs.last_user_seek AS Last_User_Seek, OBJECT_NAME(dm_mid.OBJECT_ID,dm_mid.database_id) AS [TableName], 'CREATE INDEX [IX_' + OBJECT_NAME(dm_mid.OBJECT_ID,dm_mid.database_id) + '_' + REPLACE(REPLACE(REPLACE(ISNULL(dm_mid.equality_columns,''),', ','_'),'[',''),']','') + CASE WHEN dm_mid.equality_columns IS NOT NULL AND dm_mid.inequality_columns IS NOT NULL THEN '_' ELSE '' END + REPLACE(REPLACE(REPLACE(ISNULL(dm_mid.inequality_columns,''),', ','_'),'[',''),']','') + ']' + ' ON ' + dm_mid.statement + ' (' + ISNULL (dm_mid.equality_columns,'') + CASE WHEN dm_mid.equality_columns IS NOT NULL AND dm_mid.inequality_columns IS NOT NULL THEN ',' ELSE '' END + ISNULL (dm_mid.inequality_columns, '') + ')' + ISNULL (' INCLUDE (' + dm_mid.included_columns + ')', '') AS Create_Statement FROM sys.dm_db_missing_index_groups dm_mig INNER JOIN sys.dm_db_missing_index_group_stats dm_migs ON dm_migs.group_handle = dm_mig.index_group_handle INNER JOIN sys.dm_db_missing_index_details dm_mid ON dm_mig.index_handle = dm_mid.index_handle WHERE dm_mid.database_ID = DB_ID() ORDER BY Avg_Estimated_Impact DESC GO Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, PostADay, SQL, SQL Authority, SQL Download, SQL Index, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • How much information can you mine out of a name?

    - by Finglas Fjorn
    While not directly related to programming, I figured that the programmers on here would be just as curious as I was about this question. Feel free to close the question if it does not meet with the guidelines. A name: first, possibly a middle, and surname. I'm curious about how much information you can mine out of a name, using publicly available datasets. I know that you can get the following with anywhere between a low-high probability (depending on the input) using US census data: 1) Gender. 2) Race. Facebook for instance, used exactly that to find out, with a decent level of accuracy, the racial distribution of users of their site (https://www.facebook.com/note.php?note_id=205925658858). What else can be mined? I'm not looking for anything specific, this is a very open-ended question to assuage my curiousity. My examples are US specific, so we'll assume that the name is the name of someone located in the US; but, if someone knows of publicly available datasets for other countries, I'm more than open to them too. I hope this is an interesting question!

    Read the article

  • What most games would benefit from having

    - by Phil
    I think I've seen "questions" like this on stackoverflow but sorry if I'm overstepping any bounds. Inspired by my recent question and all the nice answers (Checklist for finished game?) I think every gamedev out there has something he/she thinks that almost every game should have. That knowledge is welcome here! So this is probably going to be an inspirational subjective list of some sorts and the point is that anyone reading this question will see a point or two that they've overlooked in their own development and might benefit from adding. I think a good example might be: "some sort of manual or help section. Of course it should be proportional to how advanced the game is. Some users won't need it and won't go looking for it but the other ones that do will become very frustrated if they can't remember how to do something specific that should be in the manual". A bad example might be "good gameplay". Of course every game benefits from this but the answer is not very helpful.

    Read the article

  • What causes player box/world geometry glitches in old games?

    - by Alexander
    I'm looking to understand and find the terminology for what causes - or allows - players to interfere with geometry in old games. Famously, ID's Quake3 gave birth to a whole community of people breaking the physics by jumping, sliding, getting stuck and launching themselves off points in geometry. Some months ago (though I'd be darned if I can find it again!) I saw a conference held by Bungie's Vic DeLeon and a colleague in which Vic briefly discussed the issues he ran into while attempting to wrap 'collision' objects (please correct my terminology) around environment objects so that players could appear as though they were walking on organic surfaces, while not clipping through them or appear to be walking on air at certain points, due to complexities in the modeling. My aim is to compose a case study essay for University in which I can tackle this issue in games, drawing on early exploits and how techniques have changed to address such exploits and to aid in the gameplay itself. I have 3 current day example of where exploits still exist, however specifically targeting ID Software clearly shows they've massively improved their techniques between Q3 and Q4. So in summary, with your help please, I'd like to gain a slightly better understanding of this issue as a whole (its terminology mainly) so I can use terms and ask the right questions within the right contexts. In practical application, I know what it is, I know how to do it, but I don't have the benefit of level design knowledge yet and its technical widgety knick-knack terms =) Many thanks in advance AJ

    Read the article

  • Value objects in DDD - Why immutable?

    - by Hobbes
    I don't get why value objects in DDD should be immutable, nor do I see how this is easily done. (I'm focusing on C# and Entity Framework, if that matters.) For example, let's consider the classic Address value object. If you needed to change "123 Main St" to "123 Main Street", why should I need to construct a whole new object instead of saying myCustomer.Address.AddressLine1 = "123 Main Street"? (Even if Entity Framework supported structs, this would still be a problem, wouldn't it?) I understand (I think) the idea that value objects don't have an identity and are part of a domain object, but can someone explain why immutability is a Good Thing? EDIT: My final question here really should be "Can someone explain why immutability is a Good Thing as applied to Value Objects?" Sorry for the confusion! EDIT: To clairfy, I am not asking about CLR value types (vs reference types). I'm asking about the higher level DDD concept of Value Objects. For example, here is a hack-ish way to implement immutable value types for Entity Framework: http://rogeralsing.com/2009/05/21/entity-framework-4-immutable-value-objects. Basically, he just makes all setters private. Why go through the trouble of doing this?

    Read the article

  • Issue scrolling table view with content inset

    - by Rog
    Hi all, I am experiencing a weird scrolling issue and I was hoping someone could give me a hand in trying to identify why this is happening. I have included the part of my code that I think is relevant to the question but am happy to update this post with whatever else is needed. I have implemented a pull to refresh view in the tableview's content inset area. The refresh fires an Async NSURLConnection that pulls data from a webserver, parses the relevant information and refreshes the table as required. This is where the refresh process kicks off: - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{ if (scrollView.contentOffset.y <= - 65.0f && !self.reloading) { self.reloading = YES; [self reloadTableViewDataSource]; [refreshHeaderView setState:EGOOPullRefreshLoading]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.2]; self.tableView.contentInset = UIEdgeInsetsMake(60.0f, 0.0f, 0.0f, 0.0f); [UIView commitAnimations]; } } Problem is if I start to scroll whilst the content inset is "visible" (i.e. during reload) I get this weird behaviour where my table sections do not scroll all the way to the top - see screenshot for a clear visual of what I am trying to describe here. I have included a couple of screenshots below that clearly identify what is happening at the moment. Has anyone experienced this before? Any ideas on what I should be looking at to try and fix it? Many thanks in advance, Rog And this is the result if I start scrolling the table. The orange bit at the top of the image is the actual navigation bar, where I would expect the table section (date 1 December 2010) to be.

    Read the article

  • C++ RPC library suggestions

    - by Oxsnarder
    I'm looking for suggestions regarding RPC libraries implemented in C++, for C++ developers. Some requirements constraints: Should work on both linux/unix and win32 systems Be able to execute free function and class methods Hopefully written in modern C++ not 90's/java-esque C++ Be able to function over networks and hetrogenous architectures Not too slow or inefficient Hopefully provide interfaces for TR1 style std::function's et al. My example usage is to invoke the free function foo on a remote machine. ---snip--- // foo translation unit int foo(int i, int j) { return i + j; } ---snip--- ---snip--- // client side main int main() { //register foo on client and server //setup necassary connections and states int result; if (RPCmechanism.invoke("foo",4,9,result)) std::cout << "foo(4,9) = " result << std::endl; else std::cout << "failed to invoke foo(4,9)!" << std::endl; return 0; } ---snip--- Something that can achieve the above or similar would be great.

    Read the article

  • Accepting more simultaneous keyboard inputs

    - by unknownthreat
    Sometimes, a normal computer keyboard will only accept user's inputs up to a certain key simultaneously. I got a logitech keyboard that can accept up to 3-4 key presses at the same time. The computer does not accept any more input if you press more than 4 keys for this keyboard. And it also depends on certain areas of your keyboard as well. Some locations allow more key to be pressed (like the arrow keys), while some locations permit you to press only 1-2 keys. This also differs from keyboard to keyboard as well. Some older keyboards only accept up 1-2 keys. This isn't problematic with usual office work, but when it comes to gaming. For instance, imagine a platform game, where you have to jump, attack, and control direction at the same time. This implies several key presses and some keyboards cannot accept such simultaneous input. However, I've tried this on several games and the amount of possible keyboard inputs seem to be also different. Therefore, we have two issues: Keyboards have different amount of simultaneous inputs. Some games can accept more keyboard inputs than other games. At first, I thought this is hardware only problem, but why do some programs behave differently? Why some programs can accept more keyboard inputs than other programs? So how can we write our programs to accept more keyboard inputs?

    Read the article

  • running python script with cron

    - by paulo
    hey guys, im trying to run a python script after every 5 minutes using cron, inside the script is a django import import django when running the crontab i get mailed the following error ImportError: No module named django this is what the crontab file looks like: [email protected] */5 * * * * /usr/bin/python /Users/paulo/Desktop/ashtanga/ping/sender.py do anyone of you know whats causing this ? btw i do have django insalled version 1.2, python 2.6, and MacOX 10.6

    Read the article

  • adding opacity's of the PhoneAccentBrush to a Silverlight toolbox pie chart

    - by Doug
    Hi there, i am working on a windows phone application and i am using the pie chart - i am relatively new to the silverlight control toolbox. i want to make my pie chart use different opacity's of the PhoneAccentBrush as its colour pallete. (ie if the accent colour is green then i use the green and then a 0.8,0.6,0.4,0.2 opacity of the colour as my pie charts pallete) i have tried a few things, but none of them worked - has anyone accomplished this and if so how? thanks in advance Doug

    Read the article

  • iOS - conditional compilation (xcode)

    - by sol
    I have created an additional iPad target for what was originally an iphone app. From the Apple docs: "In nearly all cases, you will want to define a new view controller class to manage the iPad version of your application interface, especially if that interface is at all different from your iPhone interface. You can use conditional compilation to coordinate the creation of the different view controllers." But they don't give any example or detail on what conditional compilation is. Can anyone give an example? And where would I do this?

    Read the article

  • Please Recommend CS Project books

    - by kunjaan
    Programming Collective Intelligence is an awesome way to get your feet wet in Machine learning. I am looking for similar books which has small but interesting programming projects. Do you have any recommendations? Edit: It need not be related to machine learning. It could be any programming project-based books. Thanks. Edit2: Collective Intelligence in Action is one more book that looks at some interesting CS stuffs. Do you guys have any similar recommendations?

    Read the article

  • PHP image resize using nearest-neighbor interpolation?

    - by shipshape
    I have a 16x16 sprite in PNG or GIF image format, and would like to display it on a website at 64 x 64 in all its pixelated glory. In Firefox 3.6+ and IE I can do this easily with CSS using image-rendering and -ms-interpolation-mode, but as this doesn't work in all browsers I'd like to resize the image on the fly using PHP instead. What's the best way to resize images using nearest-neighbor interpolation in PHP?

    Read the article

  • iPhone - Image overlay MapKit framework?

    - by Peter
    I can see with iOS4 you can now tile an image on google maps (Been looking at the TileMap example from apple). This is great as this is what I want to do, but from what I can see I need to know the GEO reference of the image so I can raster the images with the appropriate zoom levels, etc. What I have is an artist image, which is a map of a specific area and I want to overlay this image on google maps. Am I missing something here, but can this be done with a none standard map and having different zoom levels? The main reason why I need to use google maps is because of the GPS functionality, so the user will know where they currently are on the map.

    Read the article

  • How big are most production databases?

    - by TheLQ
    Seeing some posts that say 10 million rows in a table is nothing made me wonder: Just how big are most production databases? I'm not talking about physical disk size of the database (saying 60 GB tells me nothing), I'm wondering how many rows. Personally the largest DB I've ever worked with was a test DB of a production system with 10 million rows. But I've seen people brag about DB's in the billions of rows.

    Read the article

  • Windows Advanced Firewall (Command Line Interface)

    - by Bradford Fisher
    I'm wondering where to find detailed information regarding the Microsoft Advanced Windows Firewall command line settings. For instance, from reading a couple technet articles I've learned that I can run the following: netsh advfirewall firewall set rule group=”File and Printer Sharing” new enable=Yes The bit about 'group="File and Printer Sharing"' is the part I'm having trouble finding documentation for. Any help would be greatly appreciated. And, if possible, I'd rather a pointer to the docs than a simple listing of group names.

    Read the article

  • Media Player Classic creating folder

    - by radiok
    Whenever I open a file in Media Player Classic it creates a new folder "Media Player Classic" under the folder of the file I opened. Originally it was putting a playlist in that folder, "default.mpcpl", but I found that if you open the playlist (Ctrl+7) and right-click the playlist, there is an option "Remember items", unchecking that will prevent MPC from creating this playlist. I was hopeful that without the auto-generated playlist MPC would have no reason to create the folder. Wrong. Now the folder is empty, but I still have to follow MPC around deleting all these blank folders. I use Media Player Classic on several of my computers so I think I just screwed up some variable somewhere somehow regarding where it stores playlists or something, but I can't figure out what it is, I've tried uninstalling and reinstalling to little avail. Which makes me think it might be in the registry. Does anyone have any ideas?

    Read the article

  • XPS M1730 Freezing & Crashing unexpectedly

    - by evesirim
    I have a Dell XPS M1730, freshly installed with Windows 7 Professional 32-bit that every so often crashes completely unexpectedly. It need not be running any applications at all for this to happen, never mind anything particularly intensive. It also clearly is not a BSoD issue as no Minidump files are being created in the process. All drivers are up to date and have been both rolled back and then updated and the Device Manager reports no issues. There are very few applications installed on the machine and it has only been online once. It runs a minimal boot of Win7 and yet still after all of this something is making it crash. All of this suggests to me it may be more like a hardware problem but to be honest I really have no idea - so I thought I'd try here. Any thoughts...? Many thanks in advance

    Read the article

  • How come Win+R prompt can open Python when it's not in my path?

    - by houbysoft
    When I use the run prompt in Windows XP Professional (Win+R), and type python.exe or python, it works and greets me with the python prompt. However, when I start a cmd window, and then type python.exe or python, it doesn't find it. This is what I expect, as the Python directory (for me, I:\Python31\) is not in my PATH. How come, then, that if I type python.exe in the Win+R prompt, it works? Edit: here is a partial output of SET, I removed most irrelevant entries, I'm not sure why is it useful, apart from the PATH variable which I already said doesn't include the Python directory. If you need a particular variable other than these, please ask. CLIENTNAME=Console CommonProgramFiles=I:\Program Files\Common Files ComSpec=I:\WINDOWS\system32\cmd.exe FP_NO_HOST_CHECK=NO OS=Windows_NT Path=I:\WINDOWS\system32;I:\WINDOWS;I:\WINDOWS\system32\WBEM;I:\WINDOWS\system32\WindowsPowerShell\v1.0;I:\Qt\2010.05\mingw\bin;I:\Program Files\CMake 2.8\bin PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1 ProgramFiles=I:\Program Files PROMPT=$P$G SESSIONNAME=Console SystemDrive=I: SystemRoot=I:\WINDOWS VBOX_INSTALL_PATH=I:\Program Files\Oracle\VirtualBox\ windir=I:\WINDOWS

    Read the article

  • Cannot enable wireless Ubuntu 10.04

    - by woaddoa
    I have recently installed Ubuntu 10.04, however I am having trouble getting wireless to work. Ubuntu says that wireless is disabled, and I am unable to enable it. I have tried Administration Hardware Drivers however the only drivers listed are Nivida graphics ones. I am unsure what to do as I do not think the process is the same as searching for drivers for a windows machine. Any advice appreciated.

    Read the article

  • Can you resize all mac windows at once? (e.g. when docking)

    - by Ian Varley
    I've recently bought a Henge Dock, and like the ability to plug my MacBook in and instantly reconnect to all my peripherals (external monitor, keyboard, mouse, etc.). The only problem is that when I dock or undock, all of my windows are left at the wrong size (either too big or too small) and I have to manually resize them, one by one. Not the end of the world, but ... isn't there an easier way? I've seen Cinch and Sizeup, but they seem to only work on one window (the current app). I looked at the Automator as a possible way to do this, but it didn't seem to have any window operations. I also tried the AppleScript listed here, but it put the windows in wacky places.

    Read the article

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