Daily Archives

Articles indexed Wednesday May 5 2010

Page 31/119 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • cp command force

    - by user121196
    currently there's a xxx dir already in /home/yyy I'm trying to overwrite it cp -fr ../xxx /home/yyy/ doesn't work still prompts me to overwrite the individual files. how do I fix it?

    Read the article

  • Is there a way to increase performance on my simple textfilter?

    - by djerry
    Hey guys, I'm writing a filter that will pick out items. I have a list of Objects. The objects contain a number, name and some other irrelevant items. At the moment, the list contains 200 items. When typing in a textbox, i'm looking if the string matches a part of the number/name of the objects in the list. If so, add them to the listbox. Here's the code for my textbox textchanged event : private void txtTelnumber_TextChanged(object sender, TextChangedEventArgs e) { lstOverview.Items.Clear(); string data = ""; foreach (ucTelListItem telList in _allUsers) { data = telList.User.H323 + telList.user.E164; if (data.Contains(txtTelnumber.Text)) lstOverview.Items.Add(telList); } } I sometimes see a little delay when entering a character, especially when i go from 4 records to 200 records (so when i had a filter and 4 records matched, and i backspace and the whole list appears again). My list is a list of usercontrols, cause i found it takes less time to load the usercontrols from a list, then to have to initialize a new usercontrol each time. Can i do something about the code, or is it just adding the usercontrol the listbox that causes the small delay (small delay = <1 sec)? Thanks in advance.

    Read the article

  • Close a tag with no text in lxml

    - by PulpFiction
    I am trying to output a XML file using Python and lxml However, I notice one thing that if a tag has no text, it does not close itself. An example of this would be: root = etree.Element('document') rootTree = etree.ElementTree(root) firstChild = etree.SubElement(root, 'test') The output of this is: <document> <test/> </document I want the output to be: <document> <test> </test> </document> So basically I want to close a tag which has no text, but is used to the attribute value. How do I do that? And also, what is such a tag called? I would have Googled it, but I don't know how to search for it.

    Read the article

  • Running resize2fs on /

    - by Paul Steckler
    I'm trying to resize an ext4 filesystem on a Fedora 11 box. Using fsdisk and lvm, I was able to grow the partition and logical volume containing the filesystem. When I try to run resize2fs on the device containing the filesystem (/dev/sda2 in this case), I get: "Device or resource busy while trying to open /dev/sda2, Couldn't find valid filesystem superblock" I've tried this from a rescue disk that doesn't have the filesystem mounted, no joy. Maybe resize2fs doesn't know about ext4?

    Read the article

  • OpenGL ES 2.0 Rendering with a Texture

    - by Kyle
    The iPhone SDK has an example of using ES 2.0 with a set of (Vertex & Fragment) GLSL shaders to render a varying colored box. Is there an example out there on how to render a simple texture using this API? I basically want to take a quad, and draw a texture onto it. The old ES 1.1 API's don't work at all anymore, so I'm needing a bit of help getting started. Most shader references talk mainly about advanced shading topics, but I'm really unsure about how to tell the shader to use the bound texture, and how to reference the UV's. Thanks!

    Read the article

  • WPF - Binding an ObservableCollection Dependency Property within a UserControl

    - by John
    I have a control class DragGrid : Grid { ... } which inherits from the original grid and enables dragging and resizing its child elements. I need to bind a custom DP named WorkItemsProperty to an observable collection of type WorkItem (implements INotifyPropertyChanged). Each element in the grid is bound to a collection item. Whenever the user adds a new item dynamically at runtime (the items cannot be declared in XAML!), or deletes an item from that collection, the WorkItems DP on the DragGrid should be updated, and the children in the grid (where each child represents a WorkItem collection item). My question is how does the DP notify the control about which child element in the grid must be removed, changed ('change' means user dragged an element, or resized it with the mouse) or added, and how would I identify which one of the existing children is the one that needs to be deleted or changed. I understand that this is where the DependencyPropertyChangedCallback comes in. But that only gets called when the DP property is set anew, not when something inside the collection changes (like add, remove item). So in the end, does the DragGrid control somehow need to subscribe to the CollectionChanged event? At what point would I hook up the event handler for that?

    Read the article

  • Where UnityContainerElement in Unity 2?

    - by TheAbdalla
    I was in Unity 1.2, use the following code: UnityConfigurationSection UnitySection = (UnityConfigurationSection)ConfigurationManager.GetSection("Unity"); Dictionary<string, IUnityContainer> Containers = new Dictionary<string, IUnityContainer>(); foreach (UnityContainerElement element in UnitySection.Containers) { IUnityContainer container = new UnityContainer(); Containers.Add(element.Name, container); element.Configure(Containers[element.Name]); } but, I couldn't do so in the Unity 2.0 beta2, because The class 'UnityContainerElement' does not exist in Unity 2 beta2. How can I do this in the new version?

    Read the article

  • UIScrollView won't autorotate

    - by clozach
    My app design requires the same scrolling functionality found in the iPhone's native Photos app when browsing photos in full screen. Specifically: Each view snaps into place as the view is swiped Scrolling happens in only one direction Rotating the iPhone rotates the entire scrolling region as well such that the frame of each subview (photos, in Apple's case) rotates in-place and paging is still in the same direction (left-to-right) I started to use Apple's sample PageControl code as a launching point, and everything was going swimmingly until I attempted adding autorotation to the code. My sense from the docs was that all I had to do to get autorotation working was to add this to the sample code's MyViewController.m - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } While that does seem to cause the subviews' backgrounds to rotate, the UILabels and the enclosing UIScrollView stay fixed so that, from a user perspective, paging through the views now requires up/down flicking instead of left/right.

    Read the article

  • Sharing settings between a few virtual hosts in Apache

    - by Ivan Virabyan
    There are many virtual hosts in my apache configuration, each having quite a big amount of settings. The problem is that most of the virtual servers have the same settings. So config file is huge, full of identical virtual hosts, that differ only by ServerName directive. To change or add setting, I need to go through all of these vhosts. Is it possible to somehow share settings between virtual hosts, but still having few of them with their own ones? I hoped dynamic vhosts would be a good solution, but as I understand, it doesn't fit my problem, because there is no way to set specific settings for some of the vhosts. Furthermore I don't want my vhosts to be dynamic, because I have a fixed number of them. ServerAlias directive is also not a solution, because I need to know what url the user came from.

    Read the article

  • AWStats is processing log files but does not display them

    - by Wouter
    I've setup AWStats on my VPS to get some more insight into the traffic coming to my site. As instructed I ran a manual build/update which ran fine: sudo -u www-data ./awstats.pl -config=xxxx.com Create/Update database for config "/etc/awstats/awstats.xxxx.com.conf" by AWStats version 6.9 (build 1.925) From data in log file "/usr/share/doc/awstats/examples/logresolvemerge.pl /var/www/xxxx.com/logs/*-access.log |"... Phase 1 : First bypass old records, searching new record... Searching new records from beginning of log file... Phase 2 : Now process new records (Flush history on disk after 20000 hosts)... Warning: awstats has detected that some hosts names were already resolved in your logfile /usr/share/doc/awstats/examples/logresolvemerge.pl /var/www/xxxx.com/logs/*-access.log |. If DNS lookup was already made by the logger (web server), you should change your setup DNSLookup=1 into DNSLookup=0 to increase awstats speed. Jumped lines in file: 0 Parsed lines in file: 814 Found 0 dropped records, Found 0 corrupted records, Found 0 old records, Found 814 new qualified records. It also produced the file in the DatDir: /var/lib/awstats/awstats052010.xxxx.com.txt which contains what I would expect. BUT when I visit: xxxx.com/awstats/awstats.pl it tells me Last Update: Never updated (See 'Build/Update' on awstats_setup.html page) and the rest of the page is blank. I'm pretty sure I set it up correctly but now I cannot figure out why this is happening. Hopefully someone smarter then me can help me. Thank you in advanced.

    Read the article

  • Core 2 Duo Processor E8400 with LGA 755 socket?

    - by Someone
    The motherboard on my PC (Dell XPS 410) has socket LGA 755 and according to the box on this processor I have, says it requires a motherboard with socket LGA 775. Will this processor work on the 755 motherboard? Edit: After reading further result online, I think I may have been fed some mis-information. According to this thread the XPS comes with socket LGA 755 but on other sites it says that it comes with LGA 775...

    Read the article

  • Clone existing structs with different alignment in Visual C++

    - by Crend King
    Is there a way to clone an existing struct with different member alignment in Visual C++? Here is the background: I use an 3rd-party library, which uses several structs. To fill up the structs, I pass the address of the struct instances to some functions. Unfortunately, the functions only returns unaligned buffer, so that data of some members are always wrong. /Zp is out of choice, since it breaks the other parts of the program. I know #pragma pack modifies the alignment of the following struct, but I would like to avoid copying the structs into my code, for the definitions in the library might change in the future. Sample code: test.h: struct am_aligned { BYTE data1[10]; ULONG data2; }; test.cpp: #include "test.h" // typedef alignment(1) struct am_aligned am_unaligned; int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { char buffer[20] = {}; for (int i = 0; i < sizeof(unaligned_struct); i++) { buffer[i] = i; } am_aligned instance = *(am_aligned*) buffer; return 0; } Consider am_aligned is defined in the library header file. am_unaligned is my custom declaration, and only effective in test.cpp. The commented line does not work of course. instance.data2 is 0x0f0e0d0c, while 0x0d0c0b0a is desired. Thanks for help!

    Read the article

  • Why aren't my objects sorting with sortedArrayUsingDescriptors?

    - by clozach
    I expected the code below to return the objects in imageSet as a sorted array. Instead, there's no difference in the ordering before and after. NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"imageID" ascending:YES]; NSSet *imageSet = collection.images; for (CBImage *image in imageSet) { NSLog(@"imageID in Set: %@",image.imageID); } NSArray *imageArray = [[imageSet allObjects] sortedArrayUsingDescriptors:(descriptor, nil)]; [descriptor release]; for (CBImage *image in imageArray) { NSLog(@"imageID in Array: %@",image.imageID); } Fwiw, CBImage is defined in my core data model. I don't know why sorting on managed objects would work any differently than on "regular" objects, but maybe it matters. As proof that @"imageID" should work as the key for the descriptor, here's what the two log loops above output for one of the sets I'm iterating through: 2010-05-05 00:49:52.876 Cover Browser[38678:207] imageID in Array: 360339 2010-05-05 00:49:52.876 Cover Browser[38678:207] imageID in Array: 360337 2010-05-05 00:49:52.877 Cover Browser[38678:207] imageID in Array: 360338 2010-05-05 00:49:52.878 Cover Browser[38678:207] imageID in Array: 360336 2010-05-05 00:49:52.879 Cover Browser[38678:207] imageID in Array: 360335 ... For extra credit, I'd love to get a general solution to troubleshooting NSSortDescriptor troubles (esp. if it also applies to troubleshooting NSPredicate). The functionality of these things seems totally opaque to me and consequently debugging takes forever.

    Read the article

  • Facebook: Unable to get users' birthday

    - by Sarfraz
    Hello All, I have been trying hard for the last 5 hours or so to get the facebook users' birthday through facebook connect but I have not managed to do so. The same code worked previously and still works on other sites made earlier (old ones) but does not seem to work again. Here is the code: require_once ('./connect/facebook.php'); $facebook = new Facebook("myapi", "mysecret"); $fbuser = $facebook->get_loggedin_user(); if ($fbuser) { $_SESSION['custid'] = $fbuser; $fb_look_fields = array( 'name', 'first_name', 'last_name', 'name', 'timezone', 'name', 'sex', 'birthday', 'birthday_date', 'current_location', 'proxied_email', 'affiliations' ); try { $user_data = $facebook->api_client->users_getInfo($fbuser, $fb_look_fields); } catch (Exception $e) { echo $e->getMessage(); } # for birth date $fb_birthday = $user_data[0]['birthday']; if (!$fb_birthday) { $fql_result_xml = $facebook->api_client->fql_query("SELECT birthday FROM standard_user_info WHERE uid = " . $fbuser); $fb_birthday = $fql_result_xml['birthday']; } echo $fb_birthday; The birthday is always empty even though i have set it to visible to all. I am using new facebook php client I even tried getting info from standard table but without any luck I would really appreciate your help and ideas. Thanks

    Read the article

  • How can I use System.Web.Caching.Cache in a Console application?

    - by Ron Klein
    Context: .Net 3.5, C# I'd like to have caching mechanism in my Console application. Instead of re-inventing the wheel, I'd like to use System.Web.Caching.Cache (and that's a final decision, I can't use other caching framework, don't ask why). However, it looks like System.Web.Caching.Cache is supposed to run only in a valid HTTP context. My very simple snippet looks like this: using System; using System.Web.Caching; using System.Web; Cache c = new Cache(); try { c.Insert("a", 123); } catch (Exception ex) { Console.WriteLine("cannot insert to cache, exception:"); Console.WriteLine(ex); } and the result is: cannot insert to cache, exception: System.NullReferenceException: Object reference not set to an instance of an object. at System.Web.Caching.Cache.Insert(String key, Object value) at MyClass.RunSnippet() So obviously, I'm doing something wrong here. Any ideas? Update: +1 to most answers, getting the cache via static methods is the correct usage, namely HttpRuntime.Cache and HttpContext.Current.Cache. Thank you all!

    Read the article

  • GDB disas question about address values

    - by user324994
    I'm working with a binary file that I disas'd in gdb. Right now I'm just examining the return value of a function. 0x08048604 <playGame+78>: ret Is the address shown the address where ret is stored in the function? Or is it just the address of the instruction to return the ret value?

    Read the article

  • NVP request - CreateRecurringPaymentsProfile

    - by jiwanje.mp
    Im facing problem with Trail period and first month payemnt. My requirement is users can signup with trial period which allow new users to have a 30 day free trial. This means they will not be charged the monthly price until after the first 30 days the regular amount will be charged to user. but the next billing date should be one month later the profile start date. but next billing data and profile start date shows same when i query by GetRecurringPaymentProfile? Please help me how can i send the Recurring bill payment for this functionality. Thanks in advance, jiwan

    Read the article

  • What are the primary advantages of Visual Studio Team Foundation Server over the other versions?

    - by Andrew Dunaway
    We are looking into the possibility of upgrading to Team Foundation Server 2008 for our development team. One of our primary reasons is some of the deployment capabilities surrounding BizTalk 2009, but I am curious what other benefits there are for other projects outside of BizTalk. Some of our interests so far are moving to a one click build and deploy process, the addition of unit tests, and continuous integration. Some definite steps forward for the company I work for. What other benefits or information should I look at as I pitch this to upper management? I am looking for technical reasons, money is a not really a concern for this discussion.

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >