Computing desk | ||
---|---|---|
< August 2 | << Jul | August | Sep >> | August 4 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
What's the most elegant workaround to the restriction that no column in a MySQL view can refer to another column's output from the same row of the same view? NeonMerlin 01:18, 3 August 2009 (UTC)
CREATE VIEW ... AS SELECT ..., least(max(copylimit.max_copies), maxdesiredcopies()) as desired_copies, greatest(least(max(copylimit.max_copies), maxdesiredcopies()) - total_copies, 0) as lacking_copies FROM ...
I need help Downloading ALL attached pictures of a forum, the pictures are posted on the website under \attachments. I have tried using Extremepicturefinder and picture ripper, but both programs have trouble following the links and threads. All of the pics are posted under a single category but in different threads. The only way I've found is downthemall but thats a grueling process of going through hundreds of threads! anyone have any ideas? --Gary123 (talk) 02:57, 3 August 2009 (UTC)
Hi, Java programmers! I'm writing a Swing program that has my subclasses of JComponents that resize themselves after the main frame is resized (i.e. fires ComponentEvent.COMPONENT_RESIZED). The hierarchy is JFrame >> JLayeredPane >> JPanel, and I'm using a GridBagLayout. When the event is fired, all my JComponents resize themselves correctly, but they stay in the same position in the JFrame and overlap each other (when they resize larger). The problem seems to be with the LayoutManager, which isn't laying out my JLayeredPanes to give them the new space they need. I have overridden getPreferredSize() to indicate the amount of space needed after resizing events. What else do I need to do to get the GridBagLayout to space out my JLayeredPanes? Thank you!--el Aprel (facta-facienda) 03:37, 3 August 2009 (UTC)
Hello. I have no experience in blogging, but want to start a blog. Is it possible to earn money through blogging, i.e. through advertisement in blogs? Does wordpress allow advertisement in personal blogs? How to find/contact an advertiser? And which is the best weblog hostingprovider? --GeneticRobot (talk) 08:22, 3 August 2009 (UTC)
I work in a school in Korea and recently there was an announcement that government institutions were hit by a virus (three times), and we were advised that the best way to combat the virus was to reset the time on the clocks on all the computers to an earlier time. We did this, and luckily none of our computers were affected, but I am wondering why this advice was issued. What does resetting the time on the clock have to do with the viruses? Oh, and it wasn't a system restore, it was a case changing the time. This confused me, and nobody could tell me the answer. --KageTora - (영호 (影虎)) (talk) 11:51, 3 August 2009 (UTC)
I'm programming in Python and this trying to format strings with a code taken directly from the Python tutorial found here. This is the code I tried: print 'We are the {0} who say "{1}!"'.format('knights', 'Ni') and this is the outcome:
Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print 'We are the {0} who say "{1}!"'.format('knights', 'Ni') Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'str' object has no attribute 'format'
Why doesn't it work? Is it because I'm using an old version of Python, because I tried a lot of examples from the Python tutorial and they all failed. --BiT (talk) 12:09, 3 August 2009 (UTC)
print 'We are the %s who say "%s!"' % ('knights', 'Ni')
-- Finlay McWalter • Talk 13:09, 3 August 2009 (UTC)
name="john"
age=23
# then, some time later...
print "my name is %(name)s and I am %(age)d years old" % locals()
Another problem... I tried compiling Python 3.1 and then downloaded Python 3 using apt-get but it worked on neither one! What's going on here? This is the result for Python 3.1:
Python 3.1 (r31:73572, Aug 3 2009, 20:24:49)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print 'We are the {0} who say "{1}!"'.format('knights', 'Ni')
File "<stdin>", line 1
print 'We are the {0} who say "{1}!"'.format('knights', 'Ni')
^
SyntaxError: invalid syntax
And this is the result for Python 3.0:
Python 3.0rc1+ (py3k, Oct 28 2008, 09:23:29)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print 'We are the {0} who say "{1}!"'.format('knights', 'Ni')
File "<stdin>", line 1
print 'We are the {0} who say "{1}!"'.format('knights', 'Ni')
^
SyntaxError: invalid syntax
It's the same Monty Python reference as I used first time (boy there sure are a lot of them in Python tutorials), taken directly from the official documentation- on a Python version I downloaded from the official Python webpage, and compiled from source and on another version downloaded directly from the Ubuntu repositories but it still doesn't work! What is going on?! --BiT (talk) 20:18, 4 August 2009 (UTC)
"Thank you {0} for helping me!".format('Finlay')
=)
Is it possible to stream voice quality audio files over a LAN with a delay of less than a second? Is it possbile on a thin client system like citrix?--202.164.141.164 (talk) 12:40, 3 August 2009 (UTC)
This is about my flash drive that seems to have some issues. Whenever I use Disk Utility to repair it, it says it repaired it successfully but it finds the error again when I "repair" the flash drive with the disk utility again. Could someone tell me what is wrong with my flash drive? Thanks. Kushal (talk) 13:23, 3 August 2009 (UTC)
Here's the log of a typical event.
|headerstyle=background:#ccccff}}
**********
Aug 3 08:12:14: Disk Utility started.
Verify and Repair disk “Mac”
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Checking Catalog hierarchy.
Checking volume bitmap.
Checking volume information.
Volume Header needs minor repair�
Repairing volume.
Rechecking volume.
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Checking Catalog hierarchy.
Checking volume bitmap.
Checking volume information.
The volume Mac was repaired successfully.
Mounting Disk
1 HFS volume checked
Repair attempted on 1 volume
1 HFS volume repaired
Eject of “Generic USB Flash Drive Media” succeeded
**********
Aug 3 08:18:58: Disk Utility started.
Verify and Repair disk “Mac”
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Checking Catalog hierarchy.
Checking volume bitmap.
Checking volume information.
Volume Header needs minor repair�
Repairing volume.
Rechecking volume.
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Checking Catalog hierarchy.
Checking volume bitmap.
Checking volume information.
The volume Mac was repaired successfully.
Mounting Disk
1 HFS volume checked
Repair attempted on 1 volume
1 HFS volume repaired
Verifying volume “Mac”
The disk “Mac” could not be unmounted
Verify volume failed with error Could not unmount disk
Verify and Repair disk “Mac”
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Checking Catalog hierarchy.
Checking volume bitmap.
Checking volume information.
Volume Header needs minor repair�
Repairing volume.
Rechecking volume.
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Checking Catalog hierarchy.
Checking volume bitmap.
Checking volume information.
The volume Mac was repaired successfully.
Mounting Disk
1 HFS volume checked
Repair attempted on 1 volume
1 HFS volume repaired
**********
Aug 3 08:19:32: Disk Utility started.
Verify and Repair disk “Mac”
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Checking Catalog hierarchy.
Checking volume bitmap.
Checking volume information.
Volume Header needs minor repair�
Repairing volume.
Rechecking volume.
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Checking Catalog hierarchy.
Checking volume bitmap.
Checking volume information.
The volume Mac was repaired successfully.
Mounting Disk
1 HFS volume checked
Repair attempted on 1 volume
1 HFS volume repaired
Kushal (talk) 13:23, 3 August 2009 (UTC)
Thank you for your reply, Indeterminate. I did what you asked me to do and here's the result for fdisk:
fsck -f /dev/disk1
BAD SUPER BLOCK: MAGIC NUMBER WRONG
LOOK FOR ALTERNATE SUPERBLOCKS? no
Is that giving any indication to what we need? When I said it finds errors again, I mean both. It does it if I run disk utility right away and when I eject and reinsert the drive (I usually eject drives safely). The flash drive is almost two years old but I am not sure if it is physically failing yet. Anything else that I could do to give you more information? Thanks, Kushal (talk) 22:39, 3 August 2009 (UTC)
Thanks for your reply. I found a bunch of backups with newfs but none of them seem to work. Is it possible to salvage this flash drive? I can still use it to carry data around (although it acts strangely sometimes) but my priority right now is getting a Mac installer on it so that if (or should I say when) the hard disk on my computer crashes, I can replace it with the 320 GB WD I bought recently. (No, the DVD drive just spits the disc out and I don't trust slot-loading on anything unless its a Wii anymore... long story.)
What should be the next step to take? Thanks. Kushal (talk) 13:06, 6 August 2009 (UTC)
Last login: Thu Aug 6 07:03:53 on console
Welcome to Darwin!
Spiderman:~ kush$ diskutil list
/dev/disk0
#: type name size identifier
0: GUID_partition_scheme *55.9 GB disk0
1: EFI 200.0 MB disk0s1
2: Apple_HFS Macintosh HD 55.6 GB disk0s2
/dev/disk1
#: type name size identifier
0: GUID_partition_scheme *3.9 GB disk1
1: EFI 200.0 MB disk1s1
2: Apple_HFS Boot 3.6 GB disk1s2
Spiderman:~ kush$ fsck -f /dev/disk1
** /dev/rdisk1 (NO WRITE)
BAD SUPER BLOCK: MAGIC NUMBER WRONG
LOOK FOR ALTERNATE SUPERBLOCKS? no
Spiderman:~ kush$ fsck-b 32 -f /dev/disk1
-bash: fsck-b: command not found
Spiderman:~ kush$ fsck -b 32 -f /dev/disk1
Alternate super block location: 32
** /dev/rdisk1 (NO WRITE)
BAD SUPER BLOCK: MAGIC NUMBER WRONG
Spiderman:~ kush$ newfs -N /dev/disk1
Warning: Block size and bytes per inode restrict cylinders per group to 4.
Warning: 2688 sector(s) in last cylinder unallocated
disk1: 8189952 sectors in 1004 cylinders of 255 tracks, 32 sectors
3999.0MB in 251 cyl groups (4 c/g, 15.94MB/g, 3968 i/g)
super-block backups (for fsck -b #) at:
32, 32704, 65376, 98048, 130720, 163392, 196064, 228736,
261408, 294080, 326752, 359424, 392096, 424768, 457440, 490112,
522784, 555456, 588128, 620800, 653472, 686144, 718816, 751488,
784160, 816832, 849504, 882176, 914848, 947520, 980192, 1012864,
1045536, 1078208, 1110880, 1143552, 1176224, 1208896, 1241568, 1274240,
1306912, 1339584, 1372256, 1404928, 1437600, 1470272, 1502944, 1535616,
1568288, 1600960, 1633632, 1666304, 1698976, 1731648, 1764320, 1796992,
1829664, 1862336, 1895008, 1927680, 1960352, 1993024, 2025696, 2058368,
2091040, 2123712, 2156384, 2189056, 2221728, 2254400, 2287072, 2319744,
2352416, 2385088, 2417760, 2450432, 2483104, 2515776, 2548448, 2581120,
2613792, 2646464, 2679136, 2711808, 2744480, 2777152, 2809824, 2842496,
2875168, 2907840, 2940512, 2973184, 3005856, 3038528, 3071200, 3103872,
3136544, 3169216, 3201888, 3234560, 3267232, 3299904, 3332576, 3365248,
3397920, 3430592, 3463264, 3495936, 3528608, 3561280, 3593952, 3626624,
3659296, 3691968, 3724640, 3757312, 3789984, 3822656, 3855328, 3888000,
3920672, 3953344, 3986016, 4018688, 4051360, 4084032, 4116704, 4149376,
4182048, 4214720, 4247392, 4280064, 4312736, 4345408, 4378080, 4410752,
4443424, 4476096, 4508768, 4541440, 4574112, 4606784, 4639456, 4672128,
4704800, 4737472, 4770144, 4802816, 4835488, 4868160, 4900832, 4933504,
4966176, 4998848, 5031520, 5064192, 5096864, 5129536, 5162208, 5194880,
5227552, 5260224, 5292896, 5325568, 5358240, 5390912, 5423584, 5456256,
5488928, 5521600, 5554272, 5586944, 5619616, 5652288, 5684960, 5717632,
5750304, 5782976, 5815648, 5848320, 5880992, 5913664, 5946336, 5979008,
6011680, 6044352, 6077024, 6109696, 6142368, 6175040, 6207712, 6240384,
6273056, 6305728, 6338400, 6371072, 6403744, 6436416, 6469088, 6501760,
6534432, 6567104, 6599776, 6632448, 6665120, 6697792, 6730464, 6763136,
6795808, 6828480, 6861152, 6893824, 6926496, 6959168, 6991840, 7024512,
7057184, 7089856, 7122528, 7155200, 7187872, 7220544, 7253216, 7285888,
7318560, 7351232, 7383904, 7416576, 7449248, 7481920, 7514592, 7547264,
7579936, 7612608, 7645280, 7677952, 7710624, 7743296, 7775968, 7808640,
7841312, 7873984, 7906656, 7939328, 7972000, 8004672, 8037344, 8070016,
8102688, 8135360, 8168032,
Spiderman:~ kush$ fsck -b 32704 -f /dev/disk1
Alternate super block location: 32704
** /dev/rdisk1 (NO WRITE)
BAD SUPER BLOCK: MAGIC NUMBER WRONG
Spiderman:~ kush$ fsck -b 65376 -f /dev/disk1
Alternate super block location: 65376
** /dev/rdisk1 (NO WRITE)
BAD SUPER BLOCK: MAGIC NUMBER WRONG
Spiderman:~ kush$ fsck -b 8135360 -f /dev/disk1
Alternate super block location: 8135360
** /dev/rdisk1 (NO WRITE)
BAD SUPER BLOCK: MAGIC NUMBER WRONG
Spiderman:~ kush$
Are the snippets from the terminal of any use? Kushal (talk) 15:34, 8 August 2009 (UTC)
Everything that runs flash such as Browser's Flash player , vlc player's flash video player etc runs (at times) slow for no apparent reason. Only cure is restarting the machine. Once it runs at normal speed, no problems until I shut down the machine. It does not matter even if I restart the browser or vlc player. I use flash player 10 on windows and the machine its self is fast enough- well over 2GHZ and hundreds of RAM. Please say how to fix flash. —Preceding unsigned comment added by 131.220.46.25 (talk) 13:28, 3 August 2009 (UTC)
When it is slow, it is slow on both browsers ( IE and firefox). In both browsers, it would play like a slideshow when it is slow, after the movie is over (sound is track is finished and youtube shows play again icon) it would play the remaining video at slightly higher speed than slideshow. This lag between audio and video exists only in big ( greater than 10 minutes and better quality videos). —Preceding unsigned comment added by 131.220.46.25 (talk) 08:09, 4 August 2009 (UTC)
Recently, I am having bitter experience with my newly upgraded hardware. If I run my system for 6 to 9 hours it gets freeze. The symptoms are: mouse pointer stops for a while then I can move it and again it stops, music gets crashed if I play. Same thing happens with keyboard. My usb modem also gets disconnected at that time. I tried to run my system with case cover open and blow a fan into inside (My pc case contains 4 cooler fan inside though). But nothing happens. It gets frozen (until I press power button to shut it off). I am using vista 64 bit ultimate. My mobo is 750i SLI Nvidia Geforce, Graphics card ATI Radeon 4890 1 GB (GPU Clock 850 MHz). All are 64 bit supported.
Another problem I have just faced is my dvd rom icon suddenly disappear from "my computer" and system gets frozen. The above mentioned symptoms were also happening. It happened when I inserted a dvd.
I checked system with diagnostics tools (prime95) and no errors. My all drivers are up to date.
Is overheating causing all these problems? Should I reduce my GPU Clock from 850MHz to 750MHz (ATI Radeon 4870 1 GB) or 625 MHz (ATI Radeon 4850 1 GB)?--119.30.36.54 (talk) 17:32, 3 August 2009 (UTC)
Update: I have Just checked Graphics card temperature with CPUID Hardware Monitor software. It showed GPU Core temperature is 61*C (Value), 61*C (Min) 62*C (Max) and HDD temperature is 29*C (Value, Min and Max). One more thing I want to know is how in BIOS "fail safe defaults" option works. If I choose it will all drivers work properly?Thank you. --119.30.36.42 (talk) 17:48, 4 August 2009 (UTC)
Can all PCs display all eBooks? • S • C • A • R • C • E • 18:41, 3 August 2009 (UTC)
I have a scanned PDF book with 2 pages on each page. Is there any way I could split the whole doc down the middle so there is 1 book page per page. --Gary123 (talk) 21:37, 3 August 2009 (UTC)