Daily Archives

Articles indexed Saturday May 15 2010

Page 18/78 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • HOW TO RECOVER A WWW DIRECTORY AND INCLUDED FIELS IN UBUNTU 9.04

    - by Al Mubarak
    hai., i'm using ubuntu 9.04 for drupal development. today morning accidentally i removed my www folder in directory. the folder has so many of my web development documents. O God., I just restart after my system when it happens., and i install some recovery software like gpart. is theri any possibilities to recover my www directory and files., bcos its includes more of web development documents. pls pls pls i'm very afraid about that issue. let me know asap. Thanks in Many more advance,

    Read the article

  • RECOVER A DELETED FILE WWW in ubuntu 9.04

    - by Al Mubarak
    Hai., i'm using unbuntu 9.04 and i had all web developing dump has been installed in www folder., today morning unfortunately i delete the www folder via terminal. but i'm afraid about that issue., i dont have any knowledge for how to restore the www folder and included files asap. IF anyone Could known the issue and how to rectify that issue., pls let me know., Thnaks in Advance.,

    Read the article

  • Asus MyCinema U3100mini Choppy

    - by dsimcha
    I'm running an Asus MyCinema U3100mini ATSC on Windows 7 64-bit. When I play live TV in Windows Media Center, it's very choppy and uses 500+ MB of RAM, I'm guessing due to the hard drive buffering functionality. Is there any way to disable the live TV pause buffer completely? If not, can anyone recommend alternative software that: Works with the MyCinema. Is lightweight and not horribly bloated with features I'll never use like Windows Media Center is. Edits: This is a dual boot system. I've discovered that the tuner actually works fine on XP. It also works fine on my other computer, which has slower hardware and also runs Windows 7 64-bit. The problem actually seems to be with playback at large screen sizes, not with hard drive buffering. Everything works fine below a certain window size and fails for large windows or full screens. Also, the same thing seems to happen whether playing live or recorded TV. As far as the obvious stuff goes, I have the latest video drivers from ATI for my Radeon x1050.

    Read the article

  • Can you tell DDR and DDR2 apart visually?

    - by Macha
    I'm getting a few old computers to take apart for parts soon. Most of them are defintely using DDR2 RAM, but there is the possibility that one or two of them are using DDR RAM. Since these are quite old, the manuals have since been lost. Is it possible to tell DDR and DDR2 RAM apart visually, and if so how?

    Read the article

  • Best data-structure to use for two ended sorted list

    - by fmark
    I need a collection data-structure that can do the following: Be sorted Allow me to quickly pop values off the front and back of the list Remain sorted after I insert a new value Allow a user-specified comparison function, as I will be storing tuples and want to sort on a particular value Thread-safety is not required Optionally allow efficient haskey() lookups (I'm happy to maintain a separate hash-table for this though) My thoughts at this stage are that I need a priority queue and a hash table, although I don't know if I can quickly pop values off both ends of a priority queue. I'm interested in performance for a moderate number of items (I would estimate less than 200,000). Another possibility is simply maintaining an OrderedDictionary and doing an insertion sort it every-time I add more data to it. Furthermore, are there any particular implementations in Python. I would really like to avoid writing this code myself.

    Read the article

  • How to use Comparator in Java to sort

    - by Dan
    I learned how to use the comparable but I'm having difficulty with the Comparator. I am having a error in my code: Exception in thread "main" java.lang.ClassCastException: New.People cannot be cast to java.lang.Comparable at java.util.Arrays.mergeSort(Unknown Source) at java.util.Arrays.sort(Unknown Source) at java.util.Collections.sort(Unknown Source) at New.TestPeople.main(TestPeople.java:18) Here is my code: import java.util.Comparator; public class People implements Comparator{ private int id; private String info; private double price; public People(int newid, String newinfo, double newprice){ setid(newid); setinfo(newinfo); setprice(newprice); } public int getid() { return id; } public void setid(int id) { this.id = id; } public String getinfo() { return info; } public void setinfo(String info) { this.info = info; } public double getprice() { return price; } public void setprice(double price) { this.price = price; } public int compare(Object obj1, Object obj2) { Integer p1 = ((People)obj1).getid(); Integer p2 = ((People)obj2).getid(); if (p1 p2 ){ return 1; } else if (p1 < p2){ return -1; } else return 0; } } import java.util.ArrayList; import java.util.Collections; public class TestPeople { public static void main(String[] args) { ArrayList peps = new ArrayList(); peps.add(new People(123, "M", 14.25)); peps.add(new People(234, "M", 6.21)); peps.add(new People(362, "F", 9.23)); peps.add(new People(111, "M", 65.99)); peps.add(new People(535, "F", 9.23)); Collections.sort(peps); for(int i=0;i I believe it has to do something with the casting in the compare method but I was playing around with it and still could not find the solution

    Read the article

  • C++0x Overload on reference, versus sole pass-by-value + std::move?

    - by dean
    It seems the main advice concerning C++0x's rvalues is to add move constructors and move operators to your classes, until compilers default-implement them. But waiting is a losing strategy if you use VC10, because automatic generation probably won't be here until VC10 SP1, or in worst case, VC11. Likely, the wait for this will be measured in years. Here lies my problem. Writing all this duplicate code is not fun. And it's unpleasant to look at. But this is a burden well received, for those classes deemed slow. Not so for the hundreds, if not thousands, of smaller classes. ::sighs:: C++0x was supposed to let me write less code, not more! And then I had a thought. Shared by many, I would guess. Why not just pass everything by value? Won't std::move + copy elision make this nearly optimal? Example 1 - Typical Pre-0x constructor OurClass::OurClass(const SomeClass& obj) : obj(obj) {} SomeClass o; OurClass(o); // single copy OurClass(std::move(o)); // single copy OurClass(SomeClass()); // single copy Cons: A wasted copy for rvalues. Example 2 - Recommended C++0x? OurClass::OurClass(const SomeClass& obj) : obj(obj) {} OurClass::OurClass(SomeClass&& obj) : obj(std::move(obj)) {} SomeClass o; OurClass(o); // single copy OurClass(std::move(o)); // zero copies, one move OurClass(SomeClass()); // zero copies, one move Pros: Presumably the fastest. Cons: Lots of code! Example 3 - Pass-by-value + std::move OurClass::OurClass(SomeClass obj) : obj(std::move(obj)) {} SomeClass o; OurClass(o); // single copy, one move OurClass(std::move(o)); // zero copies, two moves OurClass(SomeClass()); // zero copies, one move Pros: No additional code. Cons: A wasted move in cases 1 & 2. Performance will suffer greatly if SomeClass has no move constructor. What do you think? Is this correct? Is the incurred move a generally acceptable loss when compared to the benefit of code reduction?

    Read the article

  • No drop packets using the error models for wirelesss scenario ?

    I am trying to use the error model in ns2 with wireless links, I am using ns2.33. I tried the uniform error model and the markov chain model. No errors from ns but when I am trying to find the dropped packets due to corruption I can not find any of them using either the uniform or markov models. So please help me if I made any error in using the error model. to search for dropped packets I am using eid@eid-laptop:~/code/ns2/noisy$ cat mixed.tr | grep d My code is available here : http://pastebin.com/f68749435

    Read the article

  • C# 2D Vector Graphics Game using DirectX or OpenGL?

    - by Brian
    Hey Guys, So it has been a while since I have done any game programming in C#, but I have had a recent bug to get back into it, and I wanted some opinions on what configuration I should use. I wanted to use C# as that is what I use for work, and have become vary familiar with. I have worked with both DirectX and OpenGL in the past, but mostly in 3D, but now I am interested in writing a 2D game with all vector graphics, something that resembles the look of Geometry Wars or the old Star Wars arcade game. Key points I am interested in: • Ease of use/implementation. • Easy on memory. (I plan on having a lot going on at once) • Looks good, I don't want curve to look pixelated. • Maybe some nice effects like glow or particle. I am open to any and all suggestions, maybe even something I have not thought of... Thanks in advance!

    Read the article

  • I know my Before Tax Pay and my After Tax Pay, how can I work out how much I get taxed?

    - by Pete
    I've been entering some data into an Excel spreadsheet to work out my monthly earnings, etc. and was wondering how I can I find out how much I'm getting taxed? Say this is my current spreadsheet: Hours Worked 37.5 39.5 37.5 30 Hourly Rate $25 $25 $25 $25 Before Tax 937.50 987.50 937.50 750.00 After Tax 260.00 276.00 260.00 ??? How can I use this known data to work out my After Tax pay for the 4th column? :/

    Read the article

  • Convert Ubuntu 10.04 into a server?

    - by letseatfood
    Hello, I have Ubuntu 10.04 Lucid Lynx Desktop version installed and am interested in running it as a server. I have already installed Apache, PHP, and MySQL. I am completely new to server administration. Would somebody please point me in a good direction to setting this up? I am sure there are numerous tutorials online, but I just can't seem to find one. Thanks!

    Read the article

  • Programming Concepts That Were "Automated" By Modern Languages

    - by Ygam
    Weird question but here it is. What are the programming concepts that were "automated" by modern languages? What I mean are the concepts you had to manually do before. Here is an example: I have just read that in C, you manually do garbage collection; with "modern" languages however, the language itself takes care of it. Do you know of any other, or there aren't any more?

    Read the article

  • Django aggregation query on related one-to-many objects

    - by parxier
    Here is my simplified model: class Item(models.Model): pass class TrackingPoint(models.Model): item = models.ForeignKey(Item) created = models.DateField() data = models.IntegerField() In many parts of my application I need to retrieve a set of Item's and annotate each item with data field from latest TrackingPoint from each item ordered by created field. For example, instance i1 of class Item has 3 TrackingPoint's: tp1 = TrackingPoint(item=i1, created=date(2010,5,15), data=23) tp2 = TrackingPoint(item=i1, created=date(2010,5,14), data=21) tp3 = TrackingPoint(item=i1, created=date(2010,5,12), data=120) I need a query to retrieve i1 instance annotated with tp1.data field value as tp1 is the latest tracking point ordered by created field. That query should also return Item's that don't have any TrackingPoint's at all. If possible I prefer not to use QuerySet's extra method to do this. That's what I tried so far... and failed :( Item.objects.annotate(max_created=Max('trackingpoint__created'), data=Avg('trackingpoint__data')).filter(trackingpoint__created=F('max_created')) Any ideas?

    Read the article

  • creating a vector with references to some of the elements of another vector

    - by memC
    hi, I have stored instances of class A in a std:vector, vec_A as vec_A.push_back(A(i)). The code is shown below. Now, I want to store references some of the instances of class A (in vec_A) in another vector or another array. For example, if the A.getNumber() returns 4, 7, 2 , I want to put a reference to that instance of A in another vector, say std:vector<A*> filtered_A or an array. Can someone sow me how to do this?? Thanks! class A { public: int getNumber(); A(int val); ~A(){}; private: int num; }; A::A(int val){ num = val; }; int A::getNumber(){ return num; }; int main(){ int i =0; int num; std::vector<A> vec_A; for ( i = 0; i < 10; i++){ vec_A.push_back(A(i)); } std::cout << "\nPress RETURN to continue..."; std::cin.get(); return 0; }

    Read the article

  • app can not run on Windows 2003

    - by Carlos_Liu
    I have created a application base on .net framework 2.0 in a windows XP machine, then I copied the app to another Windows 2003 server machine which has installed .net framework 3.5 but the app can't be launched and throught the event view i got the following errors: Event Type: Error Event Source: .NET Runtime 2.0 Error Reporting Event Category: None Event ID: 5000 Date: 5/15/2010 Time: 2:19:39 PM User: N/A Computer: AVCNDAECLIU4 Description: EventType clr20r3, P1 ftacsearchpopup.exe, P2 1.0.0.0, P3 4bee3c42, P4 ftacsearchpopup, P5 1.0.0.0, P6 4bee3c42, P7 11, P8 e, P9 system.io.fileloadexception, P10 NIL. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: 63 00 6c 00 72 00 32 00 c.l.r.2. 0008: 30 00 72 00 33 00 2c 00 0.r.3.,. 0010: 20 00 66 00 74 00 61 00 .f.t.a. 0018: 63 00 73 00 65 00 61 00 c.s.e.a. 0020: 72 00 63 00 68 00 70 00 r.c.h.p. 0028: 6f 00 70 00 75 00 70 00 o.p.u.p. 0030: 2e 00 65 00 78 00 65 00 ..e.x.e. 0038: 2c 00 20 00 31 00 2e 00 ,. .1... 0040: 30 00 2e 00 30 00 2e 00 0...0... 0048: 30 00 2c 00 20 00 34 00 0.,. .4. 0050: 62 00 65 00 65 00 33 00 b.e.e.3. 0058: 63 00 34 00 32 00 2c 00 c.4.2.,. 0060: 20 00 66 00 74 00 61 00 .f.t.a. 0068: 63 00 73 00 65 00 61 00 c.s.e.a. 0070: 72 00 63 00 68 00 70 00 r.c.h.p. 0078: 6f 00 70 00 75 00 70 00 o.p.u.p. 0080: 2c 00 20 00 31 00 2e 00 ,. .1... 0088: 30 00 2e 00 30 00 2e 00 0...0... 0090: 30 00 2c 00 20 00 34 00 0.,. .4. 0098: 62 00 65 00 65 00 33 00 b.e.e.3. 00a0: 63 00 34 00 32 00 2c 00 c.4.2.,. 00a8: 20 00 31 00 31 00 2c 00 .1.1.,. 00b0: 20 00 65 00 2c 00 20 00 .e.,. . 00b8: 73 00 79 00 73 00 74 00 s.y.s.t. 00c0: 65 00 6d 00 2e 00 69 00 e.m...i. 00c8: 6f 00 2e 00 66 00 69 00 o...f.i. 00d0: 6c 00 65 00 6c 00 6f 00 l.e.l.o. 00d8: 61 00 64 00 65 00 78 00 a.d.e.x. 00e0: 63 00 65 00 70 00 74 00 c.e.p.t. 00e8: 69 00 6f 00 6e 00 20 00 i.o.n. . 00f0: 4e 00 49 00 4c 00 0d 00 N.I.L... 00f8: 0a 00 ..

    Read the article

  • Passing a comparator syntax help in Java

    - by Crystal
    I've tried this a couple ways, the first is have a class that implements comparator at the bottom of the following code. When I try to pass the comparat in sortListByLastName, I get a constructor not found error and I am not sure why import java.util.*; public class OrganizeThis implements WhoDoneIt { /** Add a person to the organizer @param p A person object */ public void add(Person p) { staff.put(p.getEmail(), p); //System.out.println("Person " + p + "added"); } /** * Remove a Person from the organizer. * * @param email The email of the person to be removed. */ public void remove(String email) { staff.remove(email); } /** * Remove all contacts from the organizer. * */ public void empty() { staff.clear(); } /** * Find the person stored in the organizer with the email address. * Note, each person will have a unique email address. * * @param email The person email address you are looking for. * */ public Person findByEmail(String email) { Person aPerson = staff.get(email); return aPerson; } /** * Find all persons stored in the organizer with the same last name. * Note, there can be multiple persons with the same last name. * * @param lastName The last name of the persons your are looking for. * */ public Person[] find(String lastName) { ArrayList<Person> names = new ArrayList<Person>(); for (Person s : staff.values()) { if (s.getLastName() == lastName) { names.add(s); } } // Convert ArrayList back to Array Person nameArray[] = new Person[names.size()]; names.toArray(nameArray); return nameArray; } /** * Return all the contact from the orgnizer in * an array sorted by last name. * * @return An array of Person objects. * */ public Person[] getSortedListByLastName() { PersonLastNameComparator comp = new PersonLastNameComparator(); Map<String, Person> sorted = new TreeMap<String, Person>(comp); ArrayList<Person> sortedArrayList = new ArrayList<Person>(); for (Person s: sorted.values()) { sortedArrayList.add(s); } Person sortedArray[] = new Person[sortedArrayList.size()]; sortedArrayList.toArray(sortedArray); return sortedArray; } private Map<String, Person> staff = new HashMap<String, Person>(); public static void main(String[] args) { OrganizeThis testObj = new OrganizeThis(); Person person1 = new Person("J", "W", "111-222-3333", "[email protected]"); Person person2 = new Person("K", "W", "345-678-9999", "[email protected]"); Person person3 = new Person("Phoebe", "Wang", "322-111-3333", "[email protected]"); Person person4 = new Person("Nermal", "Johnson", "322-342-5555", "[email protected]"); Person person5 = new Person("Apple", "Banana", "123-456-1111", "[email protected]"); testObj.add(person1); testObj.add(person2); testObj.add(person3); testObj.add(person4); testObj.add(person5); System.out.println(testObj.findByEmail("[email protected]")); System.out.println("------------" + '\n'); Person a[] = testObj.find("W"); for (Person p : a) System.out.println(p); System.out.println("------------" + '\n'); a = testObj.find("W"); for (Person p : a) System.out.println(p); System.out.println("SORTED" + '\n'); a = testObj.getSortedListByLastName(); for (Person b : a) { System.out.println(b); } System.out.println(testObj.getAuthor()); } } class PersonLastNameComparator implements Comparator<Person> { public int compare(Person a, Person b) { return a.getLastName().compareTo(b.getLastName()); } } And then when I tried doing it by creating an anonymous inner class, I also get a constructor TreeMap cannot find symbol error. Any thoughts? inner class method: public Person[] getSortedListByLastName() { //PersonLastNameComparator comp = new PersonLastNameComparator(); Map<String, Person> sorted = new TreeMap<String, Person>(new Comparator<Person>() { public int compare(Person a, Person b) { return a.getLastName().compareTo(b.getLastName()); } }); ArrayList<Person> sortedArrayList = new ArrayList<Person>(); for (Person s: sorted.values()) { sortedArrayList.add(s); } Person sortedArray[] = new Person[sortedArrayList.size()]; sortedArrayList.toArray(sortedArray); return sortedArray; }

    Read the article

  • how to re-factor a web site for 3G?

    - by George2
    Hello everyone, I have a traditional web site which serves users from desktop computer browsers. I am using Microsoft technologies, like ASP.Net, C#, .Net, SQL Server 2008, IIS and Windows Server 2008. Nowadays, more and more users are using 3G mobile phones, and I am wondering from software perspective, how to add new features to my web site (do I need a client application runs on mobile phone as well?) so that 3G users could have good user experience or new kinds of 3G specific applications? Any recommended documents or real samples are welcome. For 3G users, I want to distinguish from traditional less-powered and slow network access GPRS mobile phone. thanks in advance, George

    Read the article

  • NAnt errors when generating assembly info after project is upgraded to VS2010

    - by Grant Palin
    I have a project I recently upgraded to VS2010 - the project/solution files are updated, but I'm still targeting .NET 3.5. Until now, my standard NAnt build script has not given me any trouble. However, it appears that after updating the project, and updating the NAnt config to be aware of the new tooling, I am now receiving an error when autogenerating assembly information, which fails the build. The relevant build task is below: <asminfo output="${dir.src}\${file.commonAssemblyInfo}" language="${project.codeLanguage}"> <imports> <import namespace="System.Reflection" /> </imports> <attributes> <attribute type="AssemblyVersionAttribute" value="${project.fullversion}" /> <attribute type="AssemblyFileVersionAttribute" value="${project.fullversion}" /> <attribute type="AssemblyInformationalVersionAttribute" value="${project.fullversion}" /> <attribute type="AssemblyCopyrightAttribute" value="${assembly.copyright}" /> <attribute type="AssemblyCompanyAttribute" value="${assembly.company}" /> <attribute type="AssemblyConfigurationAttribute" value="${project.config}" /> <attribute type="AssemblyTrademarkAttribute" value="${assembly.trademark}" /> <attribute type="AssemblyProductAttribute" value="${assembly.product}" /> </attributes> </asminfo> The error is highlighted for the first line of the asminfo task. It reads: AssemblyInfo file 'C:\Users\Grant\Projects\VisualStudio\Checklist\src\CommonAssemblyInfo.cs' could not be generated. This method implicitly uses CAS policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the NetFx40_LegacySecurityPolicy configuration switch. Please see http://go.microsoft.com/fwlink/?LinkID=155570 for more information. I've gathered so far that this is something new to .NET 4. Has anyone had to address this error before? Does anyone know what it is about asminfo that may be triggering the error?

    Read the article

  • Passing Global Variable value to Facebook - Gets NULL only

    - by Viral
    hi all friends, I am making a game application in that I want to pass my score on wall of face book. I've completed all the things (the log in and message passing part) but when I passes the score via global variable, I am getting only null as a value and not the score that I want. Is there any way to pass data or string to Face book and write on a wall? My code is (void)viewDidLoad { static NSString* kApiKey = @"be60415be308e2b44c0ac1db83fe486b"; static NSString* kApiSecret = @"4f880c7e100321f808c41b1d3c813dfa"; _session = [[FBSession sessionForApplication:kApiKey secret:kApiSecret delegate:self] retain]; score = [NSString stringWithFormat:@"%@",appDelegate.myTextView]; [_session resume]; [super viewDidLoad]; } whre score is NSString and myTextView is NSString in other viewcontrollerfile, And appDelegate is global variable. Any help?? thanks in advance.

    Read the article

  • notebook display problem

    - by kpower
    I have RoverScan Voyager notebook. It worked good for a few months. But some day I turned it on and saw that it displays badly. I mean, picture that should be displayed by monitor is copied six times and displayed on screen (6 same small pictures, not crossed each other). And the picture itself is bad - it displayed as interchange of vertical lines (it's really hard to see real picture or distinguish some details on it - it is distorted badly). Can you suppose, what's the reason? And what can I do to solve the problem?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >