Daily Archives

Articles indexed Saturday April 17 2010

Page 12/81 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How can I keep a file in Windows 7's cache?

    - by netvope
    Sometimes you know better than Windows what files will be re-used later. Suppose you have 8GB of memory, and you use the same 1GB file every hour in an I/O-bound application (which takes 1 second to finish if the file is cached, and 1 minute if not.) Now you process some other 16GB of data that are not going to be re-used. Naturally the frequently used 1GB file will be pushed out of the cache. It would be beneficial if one can tell Windows to keep that 1GB file in memory. (Better yet, it would be great if I can tell Windows not to cache those 16GB of data, but I'm not optimistic that this can be done.) The poor-man's way to keep a file in the cache would be to keep reading the file. Are there any better ways? Are you aware of any programs that do this? (If this can be easily done under Linux, please let me know too.)

    Read the article

  • What is the problem with this Java code dealing with Generics?

    - by devoured elysium
    interface Addable<E> { public E add(E x); public E sub(E y); public E zero(); } class SumSet<E extends Addable> implements Set<E> { private E element; public SumSet(E element) { this.element = element; } public E getSum() { return element.add(element.zero()); } } It seems that element.add() doesn't return an E extends Addable but rather an Object. Why is that? Has it anything to do with Java not knowing at run-time what the object types really are, so it just assumes them to be Objects(thus requiring a cast)? Thanks

    Read the article

  • How to handle optional variables of an object in Java?

    - by Arvanem
    Hi folks, For my trading program, I have a Merchant class. A given Merchant object may or may not have a particular special quality or bundle of special qualities. For example, one Merchant object may have the Stockbroker quality, another Merchant may have the Financial Services and Stockbroker qualities, and another Merchant may have no special qualities at all. My initial thought was to create a HashMap and a Qualities class as follows: Map<Qualities, Boolean> merchantQualities = new HashMap<Qualities, Boolean>(); The only problem is, there are at least 50 possible special qualities for Merchants, such that it would be extremely tiresome to subclass all the qualities from the Quality class. Is there a better way of coding for these optional special qualities and representing them in the Merchants class than a HashMap and subclassing a Qualities class?

    Read the article

  • Understanding MQ Series bindings files

    - by Marcus
    Our Java app writes to MQ Series queues via a Weblogic JMS Message Bridge. The actual MQ Series connection/queue details are stored in the MQ Series .bindings file on the app server. I've never really got my head around the bindings file and what all the entries mean. Can anyone provide guidance to understand this file?

    Read the article

  • Cannot find code completion and suggestions in Aptana 2.0

    - by Benjamin
    Greetings, I recently started using Aptana 1.5 to work on a site via FTP, developing pages in .php format with a mixture of HTML, CSS, jQuery, and -- naturally -- PHP. I develop a page with all of these elements together to save time, then separate them. One thing that I really liked about Aptana 1.5 was that it completed code (brackets, parentheses, etc) and suggested things as I typed. I upgraded to 2.0 today and cannot figure out for the life of me how to bring back all of these capabilities -- or remember if I had to do anything in 1.5 to get them. Here is a picture of what I am looking for Notice the suggestion for margin: and the "HTML, Js, CSS" up top. Any help with getting this to work in 2.0 would be greatly appreciated. Ever since installing 2.0, 1.5 has been throwing error messages and I can't seem to get my FTP settings to stay locked in.

    Read the article

  • Sorting table data across two table sets with jquery tablesorter

    - by Peter
    I am using jquery table sorter and have two tables. Instead of sorting the data just in the first table, could there be a way to combine the data in the second table and sort both? As an example, sorting column 1 on table 1 OR 2, will result in: //ORIGINAL //RESULT TABLE 1 TABLE 1 col1 | col2 col1 | col2 1 | 1 1 | 1 3 | 3 2 | 2 5 | 5 3 | 3 TABLE 2 TABLE 2 col1 | col 2 col1 | col 2 2 | 2 4 | 4 4 | 4 5 | 5 6 | 6 6 | 6

    Read the article

  • File version maintainence via PHP FTP?

    - by Michael
    Currently I'm working on a "plugin" that will be installed on many different sites and I was wondering on the best way for me to maintain the file version of this "plugin". Here's what I was thinking. Have a "master copy" of the plugin on a server, then connect via FTP to the target sites and upload the copy to their site overwriting whatever files they may have. I was wondering the best way to go about this. The "plugin" will have many different folders and files so transferring one file at a time will be too tedious. Is there a way to copy an entire folder over at a time? Or even better, is there a way to recurse through the folders and checking for file difference before uploading the new file? This is to make sure we are uploading a new file and not just the same one.

    Read the article

  • Cyrus: How Do I Configure saslauthd For Authentication?

    - by Nick
    I'm trying to get Cyrus IMAP (v 2.2 on Ubuntu 9.04) setup and working, but I'm having a bit of trouble getting the login working correctly. I've created a mailbox for my test user "nrahl": cm user/nrahl and then created a password: $ saslpasswd2 nrahl I'm attempting to connect to the mailbox using Thunderbird. I'm using the machine's LAN IP address as the host, and "nrahl" as the username. It connects to the server and prompts me for the password. When I enter it, I get "Login to server failed." in Thunderbird, and /var/log/mail.log shows: Apr 15 19:20:01 IMAP cyrus/imap[1930]: accepted connection Apr 15 19:20:09 IMAP cyrus/imap[1930]: badlogin: [192.168.5.21] plaintext nrahl SASL(-13): authentication failure: checkpass failed Part of /etc/imapd.conf with comments removed: sieveusehomedir: false sievedir: /var/spool/sieve #mailnotifier: zephyr #sievenotifier: zephyr #dracinterval: 0 #drachost: localhost hashimapspool: true allowplaintext: yes sasl_mech_list: PLAIN #allowapop: no #sasl_maximum_layer: 256 #loginrealms: example.com #virtdomains: userid #defaultdomain: sasl_pwcheck_method: saslauthd #sasl_auxprop_plugin: sasldb sasl_auto_transition: no UPDATE: When setting: sasl_pwcheck_method: alwaystrue in /etc/imapd.conf, login works correctly. So I'm assuming the issue is saslauthd related.

    Read the article

  • what firefall linux distro applicance could track internet usage per device in my home?

    - by GregH
    Hello, Anyone know of a community edition/open source/free firewall/gateway software product that I could install onto an old PC to act as my firewall/gateway/proxy etc, BUT for which it has the power to track internet usage per device in my home. So: a) Mandatory - Track internet usage for devices on my home network on a per device basis (e.g. various PCs/Xbox etc) b) Mandatory - Report/graph would would give a breakdown of internet usage, per device (e.g. IP address), per day. c) Desirable - as in b) above but per hour d) Desirable - realtime graph (e.g. 5 minute measurement intervals or something) that shows current internet usage per device e) Mandatory - Handles all internal<=internet requests for all protocols (e.g. HTTP, HTTPS, xbox etc) f) Mandatory - No explicit settings in clients required - i.e. Transparent Monitoring concept (for both HTTP and non-HTTP traffic like xbox, skype etc) g) Mandatory - easy "appliance" like installation onto a dedicated low spec PC thanks in advance

    Read the article

  • What are the best options for a root filesystem hosted on SSD under Linux

    - by stsquad
    I'm working on an embedded system which is going to be booting and hosting it's rootfs on an SSD disk. We are currently looking at using Intel X-18M SSDs. The file system structure will have a fairly static /usr section (modulo software upgrades) and an active /var and /var/log for maintaining state and logging. Given the wear-levelling done by the underlying flash does having separate partitions help or hinder? As modern SSDs appear as straight block devices and hide their mapping magic behind their firmware is there any point trying to optimise the choice of file-system that sits on-top of the SSD? Finally does enable SMART monitoring make any sense in this context or are their SSD specific ways of determining the underlying health of the storage hardware?

    Read the article

  • What are some tips for troubleshooting builds of complicated software?

    - by Goose Bumper
    Sometimes I want to build Python or GCC from scratch just for fun, but I can't parse the errors I get, or don't understand statements like "libtool link error # XYZ". What are some tricks that unix/systems gurus use to compile software of this size from scratch? Of course I already do things like read config.log (if there is one), google around, and post in newsgroups. I'm looking for things that either make the process go smoother or get me more information about the error to help me understand and fix it. It's a little tough to get this information sometimes, because some compile bugs can be quite obscure. What can I do at that point?

    Read the article

  • Open Source/Free Social Networking SDK

    - by Nix
    I am currently gathering some technology requirements for a site that will be a social network based. I don't want to re-invent the wheel so i am looking for some type of SDK or collection of tools that can provide me with a way of creating/managing a social network. I understand that no framework will probably fit my exact needs so I am also looking for a flexible/extensible framework. An example extension point would be allowing the user to provide sub networks, maybe a global network that could be sub classified as work and friends. Beyond that it would also be nice to somehow be able to import contacts from other networking sites (Facebook, Linked In, etc). My current technology suite will more than likely consist of the following: IIS 7.0 WCF Data Services SQL Server 2005/2008 ASP.NET front end. So my two questions are 1) C# Open Source Social Network SDK 2) C# Open Source Social Netowrk APIs (facebook, linked in, etc) If there is any more information you may need please let me know.

    Read the article

  • Best Practices with MVC Route

    - by codemnky
    if this is asked before just point me in the right direction I am a OO and MVC newbie. I am following along the MVC Storefront(a little outdated now) where they are talking about routes and adding them to global.asax.cs My question is this. wouldn't it be better if only 1 route is defined and after that everything is done programatically? I dont want the user to navigate using the address bar thank you

    Read the article

  • django admin: Add a "remove file" field for Image- or FileFields

    - by w-
    I was hunting around the net for a way to easily allow users to blank out imagefield/filefields they have set in the admin. I found this http://www.djangosnippets.org/snippets/894/ What was really interesting to me here was the code posted in the comment by rfugger remove_the_file = forms.BooleanField(required=False) def save(self, *args, **kwargs): object = super(self.__class__, self).save(*args, **kwargs) if self.cleaned_data.get('remove_the_file'): object.the_file = '' return object When i try to use this in my own form I basically added this to my admin.py which already had a BlahAdmin class BlahModelForm(forms.ModelForm): class Meta: model = Blah remove_img01 = forms.BooleanField(required=False) def save(self, *args, **kwargs): object = super(self.__class__, self).save(*args, **kwargs) if self.cleaned_data.get('remove_img01'): object.img01 = '' return object when i run it I get this error maximum recursion depth exceeded while calling a Python object at this line object = super(self.__class__, self).save(*args, **kwargs) When i think about it for a bit, it seems obvious that it is just infinitely calling itself causing the error. My problem is i can't figure out what is the correct way i should be doing this. Any suggestions? thanks

    Read the article

  • appointments scheduler managment with asp.net MVC

    - by Alexandre Jobin
    I'm building an Appointments Scheduler manager on asp.net mvc. My requirements are: The administrator will add timeslot appointments to the calendar for each persons in the company who can receive a client The client can search online for available timeslot appointments and can make a reservation Idealy, the UI can show the appointsments by days/weeks or agenda style Is there any asp.net mvc control that can do this. Or any tutorials that can inspire me of how I can do this? For now, I've found the jQuery Week Calendar but I'm not sure it will answer all my needs and the author has stopped the development of the project. Thank you very much for the help!

    Read the article

  • Replicate behavior of Android browser

    - by Brian515
    Hi all, I am writing for Android, and I can't figure out how to replicate the effect of the Android browser where the progress bar is at the top of the screen, with the webview below it, yet when you scroll down, the bar scrolls with the page. I've tried placing both the webview and the progress bar into a scrollview, but when I do that, the webview becomes completely unresponsive and will not load (or respond to any commands, for that matter). Any help would be greatly appreciated. Thanks! P.S., I'm using the Eclipse IDE, and I'd like to to continue using the 1.5 SDK if possible to maintain backwards compatibility (and just to be able use my own application -- my phone isn't getting 2.1 for a couple of months).

    Read the article

  • Inside a Migration

    <b>OSNews:</b> "You mentioned (pre-interview) your organization is looking at making a move to Linux servers. What operating system have you been running and what prompted the change?"

    Read the article

  • what's the differences between rsync applications to use for backups?

    - by Thr4wn
    There are many concerns about backing up servers (naturally), and the best responses I found for "backing up best practices" was http://serverfault.com/questions/512/best-practices-to-keep-your-computers-backed-up-efficiently/1076#1076. However, Many people recommended 'rsync', but there are many rsync applications out there (like rsync-backup and duplicity, etc), and I want to know the trade-offs and recommendations for which one to use. Is there one that simply is newer and technically superior to all the rest?

    Read the article

  • How to skip words in OS X terminal?

    - by Yuval
    Say I wrote a long command in the Mac OSX terminal, i.e say "Hello, how are you? I am good thank you. How is it going with you? Fine, thanks" and now I decided I want to change the word Hello to Hi. To do that, right now I have to keep pressing (or hold down) the left keyboard key until the "cursor" gets to the end of the word Hello, and then delete it. The usual 'holding down option' technique doesn't work as it does in most other OS X applications. Is there a way to skip a word at a time instead (or any other shorter way of getting the cursor there)? Thanks!

    Read the article

  • Can NSDictionary be used with TableView on iPhone?

    - by bobo
    In a UITableViewController subclass, there are some methods that need to be implemented in order to load the data and handle the row selection event: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; //there is only one section needed for my table view } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [myList count]; //myList is a NSDictionary already populated in viewDidLoad method } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease ]; } // indexPath.row returns an integer index, // but myList uses keys that are not integer, // I don't know how I can retrieve the value and assign it to the cell.textLabel.text return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Handle row on select event, // but indexPath.row only returns the index, // not a key of the myList NSDictionary, // this prevents me from knowing which row is selected } How is NSDictionary supposed to work with TableView? What is the simplest way to get this done?

    Read the article

  • Flex SWF assets loaded into Flash SWF at runtime within same ApplicationDomain

    - by Xyre
    I'm trying to load a swf compiled by the Flex SDK into a swf exported by the Flash IDE and instantiate the assets by way of getDefinition(). Normally this works fine with assets exported from the Flash IDE then loaded into another swf also from Flash IDE. This is how I could normally do this using only the Flash IDE: Loader - Using same ApplicationDomain - getDefinition(class) Now, using the 'Test.as' compiled from Flex SDK using the [Embed] metadata tag: Loader - Using same ApplicationDomain - getDefinition("Test_" + class) The problem is I'd rather not have to keep track of the asset libraries loaded to prefix the class name I'd like to get (('Test_" + class) vs (class)). Is there any way of doing this without referencing the library the class is being pulled from or without accessing the original loader? This way I don't need to know which swf the asset is coming from, just the class name that I could instantiate from the current ApplicaitonDomain. Thanks

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >