Search Results

Search found 1062 results on 43 pages for 'broke artist'.

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

  • Fixing Windows install by connecting its hard drive via USB to a different laptop

    - by Jason
    I tried to upgrade a laptop to SP3, which broke it. I later found out SP3 doesn't work on that 2002 laptop. I can't uninstall SP3, or fix SP2, because the hard drive is now not detected during setup (I've read that's the problem you get). I put the hard drive in a USB drive case and plugged it into my other laptop, and I can read (& write to) the disk okay. (The hard drive won't fit in my other laptop, so I'm using USB.) I need to get that disk back to SP2, or fix whatever files got screwed up causing the disk to not be recognized. I don't want to do a re-install as there are 80GB of files on it I need, and they won't fit on the HD of my other laptop, and also because I no longer have some of the install CDs for software on it. What do I need to do to fix that drive from my other laptop? (I don't want my working laptop (XP SP3) to get screwed with by putting an SP2 disk in the CD drive, or the non-o/s data on the other hard drive screwed with.)

    Read the article

  • Recovering a broken NTFS filesystem?

    - by OverTheRainbow
    A much-needed Windows Update broke a Vista laptop that was running fine until then: After booting up, Windows displays "Please wait..." but it never goes anywhere. I waited for a couple of hours, there is a bit of disk activity, but it didn't work out in the end. I booted with the Vista DVD, chose "Repair your computer" which said that there was nothing wrong :-/ Next, I booted it up with a Linux USB keydrive, and ran Gparted 0.8.1 (which includes ntfsresize v2011.4.12AR.4 libntfs-3g) which displays a bunch of warnings for the NTFS partition where the Vista system is located such as: ntfs_mst_post_read_fixup: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument Record 16 has no FILE magic (0x0) Next, I ran ntfsfix /dev/sda2, which said: Mounting volume... OK Processing of $MFT and $MFTMirr completed successfully. NTFS volume version is 3.1. NTFS partition /dev/sda2 was processed successfully. Next, I rebooted Vista, which did a CHKDSK, before rebooting. But I'm still getting nowhere with "Please wait..." Before I copy the user's data to another host and reinstall Vista from a DVD, does someone know what I could try? Thank you. Edit: In case someone else has the same issue... After the BIOS, hit F8 and choose "Repair your computer", followed by "Toshiba HDD Recovery". In addition to a 1,5GB partition labelled "WinRE", the hard disk contains a second partition labeled "Data" from which the application will fetch a system image and reinstall it in the "Vista" partition. Make sure you copy your data out of the system partition before doing this.

    Read the article

  • Why is /dev/urandom only readable by root since Ubuntu 12.04 and how can I "fix" it?

    - by Joe Hopfgartner
    I used to work with Ubuntu 10.04 templates on a lot of servers. Since changing to 12.04 I have problems that I've now isolated. The /dev/urandom device is only accessible to root. This caused SSL engines, at least in PHP, for example file_get_contents(https://... to fail. It also broke redmine. After a chmod 644 it works fine, but that doesnt stay upon reboot. So my question. why is this? I see no security risk because... i mean.. wanna steal some random data? How can I "fix" it? The servers are isolated and used by only one application, thats why I use openvz. I think about something like a runlevel script or so... but how do I do it efficiently? Maby with dpkg or apt? The same goes vor /dev/shm. in this case i totally understand why its not accessible, but I assume I can "fix" it the same way to fix /dev/urandom

    Read the article

  • Efficient mirroring of directories using hard links [closed]

    - by zoqaeski
    I'm backing up my music collection on to a number of NTFS-formatted external hard-drives; however, as I store my main collection in FLAC and have my library on my laptop as MP3s to save space, I want to be able to back up both sets, because mass conversion between formats is time-consuming. The "music" directory can contain any format; the "mp3s" directory contains only MP3s converted from files in the "music" directory. The music collection on the laptop contains only MP3s, but they come from both sources. When I backup my laptop's library to the "mp3s" directory, I want to only copy across MP3 files that don't exist in the "music" directory; those that do should be hard-linked to the "music" directory. All directories have an identical hierarchy, sorted by artist, album, date, discnumber if applicable, etc, and I use a tagging editor to ensure consistency across all these locations. I'm also using a Linux computer, but keeping the music collections on NTFS-formatted partitions so that they are readable by both Linux and Windows. At the moment, I use the following command to perform the backups, but this is time-consuming due to the expensive nature of finding hard links. rsync -avu --progress --relative --ignore-existing --link-dest=../music/ **/*.mp3 /media/ntfspocket/mp3s Is there a way to perform this backup more efficiently, taking advantage of the directory hierarchy?

    Read the article

  • USB Diskdrive cannot be formatted nor accessed

    - by Dmolish
    So I have just recently bought and 8GB USB stick(Kingston DT 100 G2) on which I had installed Linux. However I needed to reinstall said Linux so I formatted the stick to "default" settings which includes FAT32 filesystem. Later when the install process kept getting errors, I got advice that the problem might be with the FAT filesystem. I decided to try and format the stick to NTSF (format G:/fs:ntsf) but the formatting failed and the drive broke down. And with breaking down I mean you cannot access the drive anymore and when you plug it in Windows asks if I want to format the drive but despite my will the format always fails. To fix this I tried changing it back to FAT32 (format G:/fs:fat32), but i get "Error in IOCTL-call". Second thing I tried was trying to reset the filesystem with some 3rd party application like HP USB Disk Storage Format Tool. But the programs didn´t regocnize any media on the drive. So now I´m in the situation that I haven´t got any idea on what to do next. Is the drive recoverable or did I just create a piece of waste metal.

    Read the article

  • How can I tell System Restore in WIndows 7 recovery console to use my recovered backup drive's restore point data?

    - by Rich Shealer
    My Windows 7 desktop PC failed to boot. It would get to a grayish screen with a mouse and would only respond to the power button. After much examination I found that the problem was not a failed drive as running CHKDSK from the Recovery Console on my main drives passed without any errors. I had been installing various Java version in the days before the failure so I decided to use a restore point to roll backwards. I have an external SATA drive controller with two 2 TB drives mirrored using the Windows mirroring function. My system has been backing up to this drive regularly. The problem is I accidently broke the mirror when testing to see if this drive system might have been causing my boot issue. Connecting it to another machine showed two dynamic drives that were invalid. In the end I reformatted one as an NTFS basic disc and used recovery software on the other to copy all of the files to the reformatted drive. I had to copy the restore points into the new drive's System Volume Information folder by granting rights to that user. I moved the drive back to the original machine and rebooted. I can see my new drive, it even uses the same drive letter as it did in normal mode. Running System Restore it lists a new Automatic Restore point created while sitting at the RC along with all of my backups. Selecting the backup I want (or any other) I get a dialog. The backup drive could not be found. System Restore is looking for restore points on your backup. Make sure the backup drive is on and connected to this computer and then click OK. What do I need to do to allow system restore to see the restore points?

    Read the article

  • Could I have destroyed Partitioning-Scheme/Filesystem of HDDs with External Harddrive Case with builtin Raid-Controller?

    - by th3m3s
    I had just recently bought a Fantec QB-35US3R to have a nice box on my desk to make some backups to. Along with the HDD-Bay I had ordered some 4TB HDDs to let them run in Raid 5, which is handled by the hardware RAID controller of the Fantec HDD-Bay. The QB-35US3R arrived a few days before the hard drives, so I got impatient and had the idea to put three old 1TB disks in the Fantec device, just to test it... Long story short: I made a backup of the most important data on these three disks before they broke. I had set the configuration scheme to RAID 3 at the Fantec device. It seems, that the Fantec RAID controller has "somehow" destroyed the partitioning scheme or the file system, because when put into a HDD docking station, they get recognized by the OS (Ubuntu/Linux) but are not mountable anymore. I tried to recover the data from one HDD via gParted (parted), which ran some hours without success. Here I stopped, before trying other tools, cos I read that the longer a hard drive is running after a the partitioning got destroyed, the worse it gets. What could the HDD-Bay probably have done to my lovely hard drive disks? Is there some routine a RAID controller is executing, when it wants to create a RAID system? Like erasing the partition table (seems not plausible to me.) or writing some information to every hard drive in the RAID (seems more likely to me.)? Is there a chance to recover the data from these HDDs, or is the change a RAID controller makes so significant, that no software is of help?

    Read the article

  • Configure Web app for external access (IIS7), allowing only certain users via AD group. All users need internal access

    - by White Island
    We have a Web app running in IIS7 (Server 2008 R2). I now need to allow external access with an SSL certificate, so certain users (e.g. the owner of the company) can use it remotely without VPN. They want to roll out the external access only to those specific users at first (thinking: a Windows credential prompt), BUT everyone will still need access internally (HTTP), without the prompt. I have the SSL cert installed on the server and public DNS configured. I've been trying to figure out how to work the authentication/authorization. I was thinking I need to disable Anonymous authn and set Windows authn, then I keep coming back to 'URL Authorization' in my research for the group setting; however, when I tried URL authz, (removed allow all, added allow rule for the special group), it broke the site internally (403.2 Forbidden, I believe it was). I thought maybe setting up a second site in IIS pointing to the same program would work, but the exact same thing happened (and again with a new app pool, just for kicks). So I guess my question is, how would you do this: allow external access, limited to users in a specific AD group, while still allowing internal access without a credentials prompt? How do I separate the external HTTPS and internal HTTP authorization requirements? Will I need to just copy the entire contents of the app in Windows Explorer to a new folder and create my external site from that? Is Windows authentication the correct option for this? I did come across this, which refers to creating a custom module. While it sounds like a solution, it's not one I'm familiar with, and I just wondered if there is a simpler way to get it to work: http://forums.iis.net/p/1182792/2000775.aspx Thanks!

    Read the article

  • How to display a JSON error message?

    - by Tiny Giant Studios
    I'm currently developing a tumblr theme and have built a jQuery JSON thingamabob that uses the Tumblr API to do the following: The user would click on the "post type" link (e.g. Video Posts), at which stage jQuery would use JSON to grab all the posts that's related to that type and then dynamically display them in a designated area. Now everything works absolutely peachy, except that with Tumblr being Tumblr and their servers taking a knock every now and then, the Tumblr API thingy is sometimes offline. Now I can't foresee when this function will be down, which is why I want to display some generic error message if JSON (for whatever reason) was unable to load the post. You'll see I've already written some code to show an error message when jQuery can't find any posts related to that post type BUT it doesn't cover any server errors. Note: I sometimes get this error: Failed to load resource: the server responded with a status of 503 (Service Temporarily Unavailable) It is for this 503 Error message that I need to write some code, but I'm slightly clueless :) Here's the jQuery JSON code: $('ul.right li').find('a').click(function() { var postType = this.className; var count = 0; byCategory(postType); return false; function byCategory(postType, callback) { $.getJSON('{URL}/api/read/json?type=' + postType + '&callback=?', function(data) { var article = []; $.each(data.posts, function(i, item) { // i = index // item = data for a particular post switch(item.type) { case 'photo': article[i] = '<div class="post_wrap"><div class="photo" style="padding-bottom:5px;">' + '<a href="' + item.url + '" title="{Title}" class="type_icon"><img src="http://static.tumblr.com/ewjv7ap/XSTldh6ds/photo_icon.png" alt="type_icon"/></a>' + '<a href="' + item.url + '" title="{Title}"><img src="' + item['photo-url-500'] + '"alt="image" /></a></div></div>'; count = 1; break; case 'video': article[i] = '<div class="post_wrap"><div class="video" style="padding-bottom:5px;">' + '<a href="' + item.url + '" title="{Title}" class="type_icon">' + '<img src="http://static.tumblr.com/ewjv7ap/nuSldhclv/video_icon.png" alt="type_icon"/></a>' + '<span style="margin: auto;">' + item['video-player'] + '</span>' + '</div></div>'; count = 1; break; case 'audio': if (use_IE == true) { article[i] = '<div class="post_wrap"><div class="regular">' + '<a href="' + item.url + '" title="{Title}" class="type_icon"><img src="http://static.tumblr.com/ewjv7ap/R50ldh5uj/audio_icon.png" alt="type_icon"/></a>' + '<h3><a href="' + item.url + '">' + item['id3-artist'] +' - ' + item['id3-title'] + '</a></h3>' + '</div></div>'; } else { article[i] = '<div class="post_wrap"><div class="regular">' + '<a href="' + item.url + '" title="{Title}" class="type_icon"><img src="http://static.tumblr.com/ewjv7ap/R50ldh5uj/audio_icon.png" alt="type_icon"/></a>' + '<h3><a href="' + item.url + '">' + item['id3-artist'] +' - ' + item['id3-title'] + '</a></h3><div class="player">' + item['audio-player'] + '</div>' + '</div></div>'; }; count = 1; break; case 'regular': article[i] = '<div class="post_wrap"><div class="regular">' + '<a href="' + item.url + '" title="{Title}" class="type_icon"><img src="http://static.tumblr.com/ewjv7ap/dwxldhck1/regular_icon.png" alt="type_icon"/></a><h3><a href="' + item.url + '">' + item['regular-title'] + '</a></h3><div class="description_container">' + item['regular-body'] + '</div></div></div>'; count = 1; break; case 'quote': article[i] = '<div class="post_wrap"><div class="quote">' + '<a href="' + item.url + '" title="{Title}" class="type_icon"><img src="http://static.tumblr.com/ewjv7ap/loEldhcpr/quote_icon.png" alt="type_icon"/></a><blockquote><h3><a href="' + item.url + '" title="{Title}">' + item['quote-text'] + '</a></h3></blockquote><cite>- ' + item['quote-source'] + '</cite></div></div>'; count = 1; break; case 'conversation': article[i] = '<div class="post_wrap"><div class="chat">' + '<a href="' + item.url + '" title="{Title}" class="type_icon"><img src="http://static.tumblr.com/ewjv7ap/MVuldhcth/conversation_icon.png" alt="type_icon"/></a><h3><a href="' + item.url + '">' + item['conversation-title'] + '</a></h3></div></div>'; count = 1; break; case 'link': article[i] = '<div class="post_wrap"><div class="link">' + '<a href="' + item.url + '" title="{Title}" class="type_icon"><img src="http://static.tumblr.com/ewjv7ap/EQGldhc30/link_icon.png" alt="type_icon"/></a><h3><a href="' + item['link-url'] + '" target="_blank">' + item['link-text'] + '</a></h3></div></div>'; count = 1; break; default: alert('No Entries Found.'); }; }) // end each if (!(count == 0)) { $('#content_right') .hide('fast') .html('<div class="first_div"><span class="left_corner"></span><span class="right_corner"></span><h2>Displaying ' + postType + ' Posts Only</h2></div>' + article.join('')) .slideDown('fast') } else { $('#content_right') .hide('fast') .html('<div class="first_div"><span class="left_corner"></span><span class="right_corner"></span><h2>Hmmm, currently there are no ' + postType + ' posts to display</h2></div>') .slideDown('fast') } // end getJSON }); // end byCategory } }); If you'd like to see the demo in action, check out Elegantem but do note that everything might work absolutely fine for you (or not), depending on Tumblr's temperament.

    Read the article

  • is this correct use of jquery's document.ready?

    - by Haroldo
    The below file contains all the javascript for a page. Performance is the highest priority. Is this the most efficient way? Do all click/hover events need to to be inside the doc.ready? //DOCUMENT.READY EVENTS //--------------------------------------------------------------------------- $(function(){ // mark events as not loaded $('.event').data({ t1_loaded: false, t2_loaded: false, t3_loaded: false, art_req: false }); //mark no events have been clicked $('#wrap_right').data('first_click_made', false); // cal-block event click $('#cal_blocks div.event, #main_search div.event').live('click', function(){ var id = $(this).attr('id').split('e')[1]; event_click(id); }); // jq history $.historyInit(function(hash){ if(hash) { event_click(hash); } }); // search $('#search_input').typeWatch ({ callback: function(){ var q = $('#search_input').attr('value'); search(q); }, wait : 350, highlight : false, captureLength : 2 }); $('#search_input, #main_search div.close').live('click',function(){ $(this).attr("value",""); reset_srch_res(); }); $('#main_search').easydrag(); $('a.dialog').colorbox(); //TAB CLICK -> AJAX LOAD TAB $('#wrap_right .rs_tabs li').live('click', function(){ $this = $(this); var id = $('#wrap_right').data('curr_event'); var tab = parseInt($this.attr('rel')); //hide other tabs $('#rs_'+id+' .tab_body').hide(); //mark current(clicked) tab $('#rs_'+id+' .rs_tabs li').removeClass('curr_tab'); $this.addClass('curr_tab'); //is the tab already loaded and hidden? var loaded = $('#e'+id).data('t'+tab+'_loaded'); //console.log('id: '+id+', tab: '+tab+', loaded: '+loaded); if(loaded === true) { $('#rs_'+id+' .tab'+tab).show(); if (tab == 2) { art_requested(id); } } else { //ajax load in the tab $('#rs_'+id+' .tab'+tab).load('index_files/tab'+tab+'.php?id='+id, function(){ //after load callback if (tab == 1) { $('#rs_' + id + ' .frame').delay(600).fadeIn(600) }; if (tab == 2) { art_requested(id); } }); //mark tab as loaded $('#e'+id).data('t'+tab+'_loaded', true); //fade in current tab $('#rs_'+id+' .tab'+tab).show(); } }) }); // LOAD RS FUNCTIONS //--------------------------------------------------------------------------- function event_click(id){ window.location.hash = id; //mark current event $('#wrap_right').data('curr_event', id); //hide any other events if($('#wrap_right').data('first_click_made') === true) { $('#wrap_right .event_rs').hide(); } //frame loaded before? var loaded = $('#e'+id).data('t1_loaded'); if(loaded === true) { $('#rs_'+id).show(); } else { create_frame(id); } //open/load the first tab $('#rs_'+id+' .t1').click(); $('#wrap_right').data('first_click_made', true); $('#cal_blocks').scrollTo('#e'+id, 1000, {offset: {top:-220, left:0}}); } function create_frame(id){ var art = ents[id].art; var ven = ents[id].ven; var type = ents[id].gig_club; //select colours for tabs if(type == 1){ var label = 'gig';} else if(type == 2){ var label = 'club';} else if(type == 0){ var label = 'other';} //create rs container for this event var frame = '<div id="rs_'+id+'" class="event_rs">'; frame += '<div class="title_strip"></div>'; frame += '<div class="rs_tabs"><ul class="'+label+'"><li class="t1 nav_tab1 curr_tab hand" rel="1"></li>'; if(art == 1){frame += '<li class="t2 nav_tab2 hand" rel="2"></li>';} if(ven == 1){frame += '<li class="t3 nav_tab2 hand" rel="3"></li>';} frame += '</ul></div>'; frame += '<div id="rs_content"><div class="tab_body tab1" ></div>'; if(art == 1){frame += '<div class="tab_body tab2"></div>';} if(ven == 1){frame += '<div class="tab_body tab3"></div>';} frame += '</div>'; frame += '</div>'; $('#wrap_right').append(frame); //mark current event in cal-blocks $('#cal_blocks .event_sel').removeClass('event_sel'); $('#e'+id).addClass('event_sel'); if($('#wrap_right').data('first_click_made') === false) { $('#wrap_right').delay(500).slideDown(); $('#rs_'+id+' .rs_tabs').delay(800).fadeIn(); } }; // FUNCTIONS //--------------------------------------------------------------------------- //check to see if an artist has been requested function art_requested(id){ var art_req = $('#e'+id).data('art_req'); if(art_req !== false) { //alert(art_req); $('#art_'+art_req).click(); } } //scroll artist panes smoothly (scroll bars cause glitches otherwise) function before (){ if(!IE){$('#art_scrollable .bio_etc').css('overflow','-moz-scrollbars-none');} } function after (){ if(!IE){$('#art_scrollable .bio_etc').css('overflow','auto');} } function prep_media_carousel(){ //youtube and soundcloud player $("#rs_content .yt_scrollable a.yt, #rs_content .yt_scrollable a.sc").colorbox({ overlayClose : false, opacity : 0 }); $("#colorbox").easydrag(true); $('#cboxOverlay').remove(); } function make_carousel_scrollable(unique_id){ $('#scroll_'+unique_id).scrollable({ size:1, clickable:false, nextPage:'#r_'+unique_id, prevPage:'#l_'+unique_id }); } function check_l_r_arrows(total, counter, art_id){ //left arrow if(counter > 0) { $('#l_'+art_id).show(); $('#l_'+art_id+'_inactive').hide(); } else { $('#l_'+art_id).hide(); $('#l_'+art_id+'_inactive').show(); } //right arrow if(counter < total-3) { $('#r_'+art_id).show(); $('#r_'+art_id+'_inactive').hide(); } else { $('#r_'+art_id).hide(); $('#r_'+art_id+'_inactive').show(); } } function reset_srch_res(){ $('#main_search').fadeOut(400).children().remove(); } function search(q){ $.ajax({ type: 'GET', url: 'index_files/srch/search.php?q='+q, success: function(e) { $('#main_search').html(e).show(); } }); }

    Read the article

  • Ant and Flex-4 problem, MXMLC.jar not found !

    - by Ali
    Hi all, I updated a flex application from flex 3.5 to flex 4.0. We are using ant for compiling our project and we have a mxmlc task to handle the flex part. After the upgrade, our mxmlc task broke. Here is the task definition: <taskdef resource="flexTasks.tasks"> <classpath> <pathelement path="${FLEX_HOME}/ant/lib/flexTasks.jar"/> <pathelement path="${FLEX_HOME}/lib/flexTasks.jar"/> <fileset dir="${FLEX_HOME}/lib"> <include name="**/*.jar"/> </fileset> </classpath> </taskdef> And here is mxmlc task <mxmlc file="${src}/Main.mxml" output="${build}/main.swf" debug="true" target-player="10" services="../src/main/webapp/WEB-INF/flex/services-config.xml" context-root="/" > <compiler.library-path dir="${lib}"> <include name="*.swc"/> </compiler.library-path> <compiler.library-path dir="${FLEX_HOME}/frameworks/libs"> <include name="*.swc"/> </compiler.library-path> <compiler.library-path dir="${FLEX_HOME}/frameworks/libs/player/10.0"> <include name="*.swc"/> </compiler.library-path> <compiler.library-path dir="${FLEX_HOME}/frameworks/locale"> <include name="**/*"/> </compiler.library-path> </mxmlc> And we are getting: The class not found in jar file: mxmlc.jar I checked the ${FLEX_HOME}/lib folder and I can see the mxmlc.jar file there. I appreciate your comments for resolving this matter, Thanks, -A

    Read the article

  • Android "single top" launch mode and onNewIntent method

    - by Rich
    I read in the Android documentation that by setting my Activity's launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would reuse a single Activity instance and give me the Intent in the onNewIntent callback. I did both of these things, and onNewIntent never fires and onCreate fires every time. The docs also say that this.getIntent() returns the intent that was first passed to the Activity when it was first created. In onCreate I'm calling getIntent and I'm getting a new one every time (I'm creating the intent object in another activity and adding an extra to it...this extra should be the same every time if it was returning me the same intent object). All this leads me to believe that my activity is not acting like a "single top", and I don't understand why. To add some background in case I'm simply missing a required step, here's my Activity declaration in the manifest and the code I'm using to launch the activity. The Activity itself doesn't do anything worth mentioning in regards to this: in AndroidManifest.xml: <activity android:name=".ArtistActivity" android:label="Artist" android:launchMode="singleTop"> </activity> in my calling Activity: Intent i = new Intent(); i.putExtra(EXTRA_KEY_ARTIST, id); i.setClass(this, ArtistActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); startActivity(i);

    Read the article

  • HOW TO: Draggable legend in matplotlib

    - by Adam Fraser
    QUESTION: I'm drawing a legend on an axes object in matplotlib but the default positioning which claims to place it in a smart place doesn't seem to work. Ideally, I'd like to have the legend be draggable by the user. How can this be done? SOLUTION: Well, I found bits and pieces of the solution scattered among mailing lists. I've come up with a nice modular chunk of code that you can drop in and use... here it is: class DraggableLegend: def __init__(self, legend): self.legend = legend self.gotLegend = False legend.figure.canvas.mpl_connect('motion_notify_event', self.on_motion) legend.figure.canvas.mpl_connect('pick_event', self.on_pick) legend.figure.canvas.mpl_connect('button_release_event', self.on_release) legend.set_picker(self.my_legend_picker) def on_motion(self, evt): if self.gotLegend: dx = evt.x - self.mouse_x dy = evt.y - self.mouse_y loc_in_canvas = self.legend_x + dx, self.legend_y + dy loc_in_norm_axes = self.legend.parent.transAxes.inverted().transform_point(loc_in_canvas) self.legend._loc = tuple(loc_in_norm_axes) self.legend.figure.canvas.draw() def my_legend_picker(self, legend, evt): return self.legend.legendPatch.contains(evt) def on_pick(self, evt): if evt.artist == self.legend: bbox = self.legend.get_window_extent() self.mouse_x = evt.mouseevent.x self.mouse_y = evt.mouseevent.y self.legend_x = bbox.xmin self.legend_y = bbox.ymin self.gotLegend = 1 def on_release(self, event): if self.gotLegend: self.gotLegend = False ...and in your code... def draw(self): ax = self.figure.add_subplot(111) scatter = ax.scatter(np.random.randn(100), np.random.randn(100)) legend = DraggableLegend(ax.legend()) I emailed the Matplotlib-users group and John Hunter was kind enough to add my solution it to SVN HEAD. On Thu, Jan 28, 2010 at 3:02 PM, Adam Fraser wrote: I thought I'd share a solution to the draggable legend problem since it took me forever to assimilate all the scattered knowledge on the mailing lists... Cool -- nice example. I added the code to legend.py. Now you can do leg = ax.legend() leg.draggable() to enable draggable mode. You can repeatedly call this func to toggle the draggable state. I hope this is helpful to people working with matplotlib.

    Read the article

  • Editing a UITextField inside a UITableViewCell fails

    - by Stephen Darlington
    In my application I have a UITextField inside a UITableViewCell. If I click inside the text field and add some text I find that if try to move the insertion point it works the first time but fails on subsequent attempts. I am completely unable to move the selection; no "magnifying glass" appears. Even more curious, this "setting" seems to be permanent until I restart the application. And it affects all UITextFields on that screen and not just the one that I originally tried to edit. If you want to see it yourself, try the "UICatalog" sample that comes with the iPhone SDK. Click "text fields" and then "edit" and play around with the text boxes. I've done a lot of digging on this but it's pretty hard to Google for! The best references I've found are on Apple's support board and MacRumors formum (both reference a solution that apparently used to work on iPhone 2.0 but does work not with contemporary versions -- I did try). My feeling that is that this is a bug in the OS, but I thought I'd throw this out to the SO crowd for a second opinion and to see if there are any workarounds. Any ideas? Following benzado's suggestion, I tried building my application using the 2.0, 2.1 and 2.2 SDKs. I got the same behaviour in all versions. (Actually, something related but not the same broke in 2.2 but that's probably another question!)

    Read the article

  • AutoMapper a viable alternative to two way databinding using a FormView?

    - by tbone
    I've started using the FormView control to enable two way databinding in asp.net webforms. I liked that it saved me the trouble of writing loadForm and unloadForm routines on every page. So it seemed to work nicely at the start when I was just using textboxes everywhere....but when it came time to start converting some to DropDownLists, all hell broke lose. For example, see: http://stackoverflow.com/questions/2435185/not-possible-to-load-dropdownlist-on-formview-from-code-behind ....and I had many additional problems after that. So I happened upon an article on AutoMapper, which I know very little about yet, but from the sounds of it, this might be a viable alternative to two-way databinding a form to an domain entity object? From what I understand, AutoMapper basically operates on naming convention, so, it will look for matched names properties(?) on the source and destination objects. So, basically, I have all my domain entities (ie: Person) with properties (FirstName, LastName, Address, etc)....what I would like to be able to do is declare my asp controls with those exact same names, and have automapper do the loading and unloading. One obvious caveat is that AutoMapper would have to know the proper property name for each control type, ie: Person.FirstName -- form.FirstName*.Text* Person.Country -- form.Country.SelectedValue Person.IsVerified -- form.IsVerified.Checked ....so it would have to have the smarts to find the control on the form, determine its type, and then load/unload between the domain object and the webform control into the proper property of the control. So if this worked, a person could just get rid of the cursed FormView control entirely, and it would be just one line of code each for binding and unbinding a webform. Possible?

    Read the article

  • New to MVVM - Best practices for seperating Data processing thread and UI Thread?

    - by OffApps Cory
    Good day. I have started messing around with the MVVP pattern, and I am having some problems with UI responsiveness versus data processing. I have a program that tracks packages. Shipment and package entities are persisted in SQL database, and are displayed in a WPF view. Upon initial retrieval of the records, there is a noticeable pause before displaying the new shipments view, and I have not even implemented the code that counts shipments that are overdue/active yet (which will necessitate a tracking check via web service, and a lot of time). I have built this with the Ocean framework, and all appears to be doing well, except when I first started my foray into multi-threading. It broke, and it appeared to break something in Ocean... Here is what I did: Private QueryThread As New System.Threading.Thread(AddressOf GetShipments) Public Sub New() ' Insert code required on object creation below this point. Me.New(ViewManagerService.CreateInstance, ViewModelUIService.CreateInstance) 'Perform initial query of shipments 'QueryThread.Start() GetShipments() Console.WriteLine(Me.Shipments.Count) End Sub Public Sub New(ByVal objIViewManagerService As IViewManagerService, ByVal objIViewModelUIService As IViewModelUIService) MyBase.New(objIViewModelUIService) End Sub Public Sub GetShipments() Dim InitialResults = From shipment In db.Shipment.Include("Packages") _ Select shipment Me.Shipments = New ShipmentsCollection(InitialResults, db) End Sub So I declared a new Thread, assigned it the GetShipments method and instanced it in the default constructor. Ocean freaks out at this, so there must be a better way of doing it. I have not had the chance to figure out the usage of the SQL ORM thing in Ocean so I am using Entity Framework (perhaps one of these days i will look at NHibernate or something too). Any information would be greatly appreciated. I have looked at a number of articles and they all have examples of simple uses. Some have mentioned the Dispatcher, but none really go very far into how it is used. Anyone know any good tutorials? Cory

    Read the article

  • Strange xml/html accent issue

    - by Ayrad
    I have an XML file that contains a message with html tags in it. The XML file is read by a java class that mails it to people. When the mail is received, the accents do not show. For example é doesn't show. I have tried &eacute; in the xml but it gives an error in eclipse saying that the entity has not been declared. I also tried simply inserting &#233; but that shows nothing in the final output. The 3rd thing I tried was using <![CDATA[é]]> but that broke the parser since it didn't output anything after it. However I noticed something weird. When i put something like this in the xml and added UTF-16 encoding <message>text bla bla blaa é&lt; it did ouput the é at the end like this bla bla blaa blaa é. EDIT <message>text bla bla blaa éé&lt; outputs ?é or just one é The file looks something like this: <?xml version="1.0"? encoding="UTF-16"> <message> &lt;b&gt;hello é &lt;/b&gt; </message> </xml> What gives?

    Read the article

  • When does a PHP <5.3.0 daemon script receive signals?

    - by MidnightLightning
    I've got a PHP script in the works that is a job worker; its main task is to check a database table for new jobs, and if there are any, to act on them. But jobs will be coming in in bursts, with long gaps in between, so I devised a sleep cycle like: while(true) { if ($jobs = get_new_jobs()) { // Act upon the jobs } else { // No new jobs now sleep(30); } } Good, but in some cases that means there might be a 30 second lag before a new job is acted upon. Since this is a daemon script, I figured I'd try the pcntl_signal hook to catch a SIGUSR1 signal to nudge the script to wake up, like: $_isAwake = true; function user_sig($signo) { global $_isAwake; daemon_log("Caught SIGUSR1"); $_isAwake = true; } pcntl_signal(SIGUSR1, 'user_sig'); while(true) { if ($jobs = get_new_jobs()) { // Act upon the jobs } else { // No new jobs now daemon_log("No new jobs, sleeping..."); $_isAwake = false; $ts = time(); while(time() < $ts+30) { sleep(1); if ($_isAwake) break; // Did a signal happen while we were sleeping? If so, stop sleeping } $_isAwake = true; } } I broke the sleep(30) up into smaller sleep bits, in case a signal doesn't interrupt a sleep() command, thinking that this would cause at most a one-second delay, but in the log file, I'm seeing that the SIGUSR1 isn't being caught until after the full 30 seconds has passed (and maybe the outer while loop resets). I found the pcntl_signal_dispatch command, but that's only for PHP 5.3 and higher. If I were using that version, I could stick a call to that command before the if ($_isAwake) call, but as it currently stands I'm on 5.2.13. On what sort of situations is the signals queue interpreted in PHP versions without the means to explicitly call the queue parsing? Could I put in some other useless command in that sleep loop that would trigger a signal queue parse within there?

    Read the article

  • How can I debug why this click handler never fires?

    - by tixrus
    I am going to be excrutiatingly detailed here. I am using Firefox 3.6.3 on Max OSX with Firebug 1.5.3. I have two versions of a project, one which works and one with a bug. One I downloaded and one I typed by hand. Take a guess which one doesn't work. They should be the same except that mine uses a newer version of jQuery and the files are named differently. jQuery version is not the issue. I made mine use the older jquery and I made the working one use the newer jquery. Either way, mine still broke and the downloaded one still works. I've busted my eyes trying to see how these projects are different. The only thing I don't want to do is copy the working code to the busted code because I need to be able to figure this stuff out when it is my own unique code causing similar issues. There are no errors that I can see in Firebug in my code, in fact, 2/3 of it works just fine. just the second button does nothing. So I wanted to step through. These are always eyeball errors and I really suck at seeing them. I put it on a public server. http://colleenweb.com/jqtests/ex71.html And I want to debug ex71.js If you firebug the working one and set a break point at line 13 in ex71.js the variable json has the expected values when you click on the second button. But If you firebug this one, it never gets there. I've been over the html and all the names of everything seem to match up. I also wonder why the buttons aren't right justified but that's a css thing. Please tell me what I'm missing, and more importantly, what tool/technique I could use to find these types of bugs.

    Read the article

  • How do i convert String to Integer/Float in Haskell

    - by Ranhiru
    data GroceryItem = CartItem ItemName Price Quantity | StockItem ItemName Price Quantity makeGroceryItem :: String -> Float -> Int -> GroceryItem makeGroceryItem name price quantity = CartItem name price quantity I want to create a GroceryItem when using a String or [String] createGroceryItem :: [String] -> GroceryItem createGroceryItem (a:b:c) = makeGroceryItem a b c The input will be in the format ["Apple","15.00","5"] which i broke up using words function in haskell. I get this error which i think is because the makeGroceryItem accepts a Float and an Int. But how do i make b and c Float and Int respectively? *Type error in application *** Expression : makeGroceryItem a read b read c *** Term : makeGroceryItem *** Type : String -> Float -> Int -> GroceryItem *** Does not match : a -> b -> c -> d -> e -> f* Thanx a lot in advance :)

    Read the article

  • Django Admin: not seeing any app (permission problem?)

    - by Facundo
    I have a site with Django running some custom apps. I was not using the Django ORM, just the view and templates but now I need to store some info so I created some models in one app and enabled the Admin. The problem is when I log in the Admin it just says "You don't have permission to edit anything", not even the Auth app shows in the page. I'm using the same user created with syncdb as a superuser. In the same server I have another site that is using the Admin just fine. Using Django 1.1.0 with Apache/2.2.10 mod_python/3.3.1 Python/2.5.2, with psql (PostgreSQL) 8.1.11 all in Gentoo Linux 2.6.23 Any ideas where I can find a solution? Thanks a lot. UPDATE: It works from the development server. I bet this has something to do with some filesystem permission but I just can't find it. UPDATE2: vhost configuration file: <Location /> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE gpx.settings PythonDebug On PythonPath "['/var/django'] + sys.path" </Location> UPDATE 3: more info /var/django/gpx/init.py exists and is empty I run python manage.py from /var/django/gpx directory The site is GPX, one of the apps is contable and lives in /var/django/gpx/contable the user apache is webdev group and all these directories and files belong to that group and have rw permission UPDATE 4: confirmed that the settings file is the same for apache and runserver (renamed it and both broke) UPDATE 5: /var/django/gpx/contable/init.py exists This is the relevan part of urls.py: urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), ) urlpatterns += patterns('gpx', (r'^$', 'menues.views.index'), (r'^adm/$', 'menues.views.admIndex'),

    Read the article

  • Why can't the compiler/JVM just make autoboxing "just work"?

    - by Pyrolistical
    Autoboxing is rather scary. While I fully understand the difference between == and .equals I can't but help have the follow bug the hell out of me: final List<Integer> foo = Arrays.asList(1, 1000); final List<Integer> bar = Arrays.asList(1, 1000); System.out.println(foo.get(0) == bar.get(0)); System.out.println(foo.get(1) == bar.get(1)); That prints true false Why did they do it this way? It something to do with cached Integers, but if that is the case why don't they just cache all Integers used by the program? Or why doesn't the JVM always auto unbox to primitive? Printing false false or true true would have been way better. EDIT I disagree about breakage of old code. By having foo.get(0) == bar.get(0) return true you already broke the code. Can't this be solved at the compiler level by replacing Integer with int in byte code (as long as it is never assigned null)

    Read the article

  • Adapting existing HTML/Javascript model to Titanium's latest release (v 0.9)

    - by Alan Neal
    In pre-0.9 versions of Titanium, one could simply specify an .html file (local or remote) in the tiapp.xml file and interact with it in the same manner as one would on a website. As of version 0.9, that is no the longer case. One creates their entire app dynamically. Unfortunately, this broke my previous implementation and, other than an updated Kitchen Sink, much of the new model and API calls are not covered in the documentation (e.g., createLabel). So, my question is this... What are the simplest steps for re-creating the previous effect (knowingly forgoing some of the advantages of the Titanium's latest approach if necessary)? My previous implementation was exactly as it functions on the website. The website has a single index.html file with no content other than links to JavaScript and style files. The document body's onload event called the first JavaScript function (located in the main script) and, from that point forth, the entire content was dynamically created. How can I set up the latest version of Titanium so that I am poised to do the exact same thing? BTW: Whereas I previously had the choice to keep the files local or remote, I don't believe that remote access (e.g., simply using the webView widget to point to the website) is viable. That's because pages displayed via the webView do not have access to most of the API. Since the iPhone and Safari browsers do not support the file input type, the only means for uploading files (something my app requires) is calling Titanium's function. Thanks in advance.

    Read the article

  • Media Kind in iTunes COM for Windows SDK

    - by Joel Verhagen
    I recently found out about the awesomeness of the iTunes COM for Windows SDK. I am using Python with win32com to talk to my iTunes library. Needless to say, my head is in the process of exploding. This API rocks. I have one issue though, how do I access the Media Kind attribute of the track? I looked through the help file provided in the SDK and saw no sign of it. If you go into iTunes, you can modify the track's media kind. This way if you have an audiobook that is showing up in your music library, you can set the Media Kind to Audiobook and it will appear in the Books section in iTunes. Pretty nifty. The reason I ask is because I have a whole crap load of audiobooks that are showing up in my LibraryPlaylist. Here is my code thus far. import win32com.client iTunes = win32com.client.gencache.EnsureDispatch('iTunes.Application') track = win32com.client.CastTo(iTunes.LibraryPlaylist.Tracks.Item(1), 'IITFileOrCDTrack') print track.Artist, '-', track.Name print print 'Is this track an audiobook?' print 'How the hell should I know?' Thanks in advance.

    Read the article

  • subgraph cluster ranking in dot

    - by Chris Becke
    I'm trying to use graphviz on media wiki as a documentation tool for software. First, I documented some class relationships which worked well. Everything was ranked vertically as expected. But, then, some of our modules are dlls, which I wanted to seperate into a box. When I added the nodes to a cluster, they got edged, but clusters seem to have a LR ranking rule. Or being added to a cluster broke the TB ranking of the nodes as the cluster now appears on the side of the graph. This graph represents what I am trying to do: at the moment, cluster1 and cluster2 appear to the right of cluster0. I want/need them to appear below. <graphviz> digraph d { subgraph cluster0 { A -> {B1 B2} B2 -> {C1 C2 C3} C1 -> D; } subgraph cluster1 { C2 -> dll1_A; dll1_A -> B1; } subgraph cluster2 { C3 -> dll2_A; } dll1_A -> dll2_A; } </graphviz>

    Read the article

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