Computing desk | ||
---|---|---|
< November 23 | << Oct | November | Dec >> | November 25 > |
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. |
I asked about String vs. Pattern delimiters earlier. Anyway, I have a really basic program that will read in the file using the scanner and break it up into pieces and can assemble them the way I want. Just one question --- it reads only from .txt as far as I know (a Scanner with a File) so I put all my file from a .doc into a .txt, losing all the formatting (i.e bold, centered text). Is there any way that I could redo that formatting using my program. The delimiter breaks my file into chunks and I'm trying to format a piece of that chunk, not the whole chunk. I just need to make text bold and centered. Is there any way possible?
I don't think I explained it very clearly so: What I mean to say for a chunk is that my delimiter is TEST. So I have a set of text that goes TESTTOSS-UP Math Short Answer Question. Answer. TOSS-UP. All I'm trying to do is make the TOSS-UP bold and centered.
—Preceding unsigned comment added by 66.133.196.152 ( talk) 01:15, 24 November 2009 (UTC)
In Mathematica, I am trying to make a function that inputs an integer and outputs the integer mod squares. Hopefully that makes sense, but an example would be if I plug in any square integer, I get 1. If I plug in a square free integer, I get itself back. If I plug in 32, I get 2 because it removes an even number of powers of 2. If I input 2^5 * 3^4 * 5^9 * 11^13, I get back 2 * 5 * 11. I have tried factoring the integer with FactorInteger and then using the Cases command to take only the prime factors which have odd exponent, but I am not getting it. Any help would be much appreciated! StatisticsMan ( talk) 02:54, 24 November 2009 (UTC)
numberout=1; flist=FactorInteger[n]; listlength=Length[flist]; (* ie the number of pairs *) Do[ (* repeat the steps below for each pair - fno is the number of the pair we're on *) pair=flist[[fno]]; (* take the fno'th pair of numbers *) pfactor=pair[[1]]; (* pfactor is the first number in pair, ie the prime factor *) pwr=pair[[2]]; (* pwr is the second number in pair, ie the power *) pwr=Mod[pwr,2]; (* now take pwr mod 2, ie 0 if it's even or 1 if it's odd *) numberout=numberout*(pfactor^pwr) ,{fno,listlength}] numberout
numberout=1; flist=FactorInteger[n]; Do[ numberout=numberout*(flist[[fno,1]]^Mod[flist[[fno,2]],2]) ,{fno,Length[flist]}] numberout
I'm trying to install an application called Drupal and one of the instructions is to "Move the contents of that directory into a directory within your web server's document root or your public HTML directory" with the command
mv drupal-x.x/* drupal-x.x/.htaccess /var/www/html
I'm a little confused as to why there appear to be three arguments after the mv command, which mv doesn't seem to support. Can someone please clear up my confusion? Thanks! — Sam 76.24.222.22 ( talk) 04:10, 24 November 2009 (UTC)
Why haven't there been any DOS/9x Windows versions since ME? jc iindyysgvxc ( my contributions) 09:25, 24 November 2009 (UTC)
Most .NET development is (generally speaking) focused on creating web applications or in-house business applications. What 'mainstream' applications also use .NET? By 'mainstream' I mean, non-business apps and something that a non-programmer might use. I can think of Paint.NET, Windows PowerShell and SyncToy. Are there any others? 12.165.250.13 ( talk) 16:05, 24 November 2009 (UTC)
Referring back to this question: [6]
I now find myself unable to copy and paste this information into emails. Is this something new in Internet Explorer 8?
I do recall warnings that I was telling the computer to do something unsafe and that was stopped, but I hardly see where just the symbols would cause a problem. I do remember video or something else moving and I was told don't use Explorer. I stay away from Firefox and use plain text when possible, but copying the symbols manually is such a pain. Vchimpanzee · talk · contributions · 20:43, 24 November 2009 (UTC)
My HP Deskjet 930C has got blinking error lights which prevent printing (I do already know what the manual says about them thanks), and despite several times in the past being able to fix the same pattern of blinking lights and get it working, this time I have not been able to. It has been a robust printer in the past, pity I cannot get it to work this time. a) I refill my own black-ink cartridges to save money. What robust reliable model of printer would suit this please? I have an old computer with WinXP, and thus cannot run some modern printers. I am happy to buy a 2nd hand printer. b) Are there any unofficial instructions about how to renovate this model of computer? HP says nothing about removing the cover etc. The printer is too old for paying for maintenance to be worthwhile - buying new would be cheaper. c) Is there any way to find out more specifically what the problem is? None of the HP software can do this, it would have to be some diagostic program an independant programmer has done, if anything exists at all. Thanks 92.24.170.160 ( talk) 21:20, 24 November 2009 (UTC)
I wish it were possible to buy or unofficially modify a printer so that instead of having to play around with injecting ink into cartridges, you just poured ink into it like filling a car. If it were not for the business model used, that would be how they would be designed. Roll on the days when we have fabrication machines and can make freeware designs of objects. 78.146.176.198 ( talk) 23:01, 25 November 2009 (UTC)
We do already have fabrication tools at least, if not a fabrication machine, for woodwork and so on. I suppose it would be possible with a drill and the right glue to fit either a small screw-top to an ink cartridge (or just a hole with a small bung), or a flexible plastic tube leading from the cartidge to an ink reservoir. In the later case it could be difficult to stop too much ink flowing into the cartidge, and some of the cover of the printer would have to be removed so that the cartridge could move to its non-working position. 78.147.183.186 ( talk) 00:42, 30 November 2009 (UTC)
Computing desk | ||
---|---|---|
< November 23 | << Oct | November | Dec >> | November 25 > |
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. |
I asked about String vs. Pattern delimiters earlier. Anyway, I have a really basic program that will read in the file using the scanner and break it up into pieces and can assemble them the way I want. Just one question --- it reads only from .txt as far as I know (a Scanner with a File) so I put all my file from a .doc into a .txt, losing all the formatting (i.e bold, centered text). Is there any way that I could redo that formatting using my program. The delimiter breaks my file into chunks and I'm trying to format a piece of that chunk, not the whole chunk. I just need to make text bold and centered. Is there any way possible?
I don't think I explained it very clearly so: What I mean to say for a chunk is that my delimiter is TEST. So I have a set of text that goes TESTTOSS-UP Math Short Answer Question. Answer. TOSS-UP. All I'm trying to do is make the TOSS-UP bold and centered.
—Preceding unsigned comment added by 66.133.196.152 ( talk) 01:15, 24 November 2009 (UTC)
In Mathematica, I am trying to make a function that inputs an integer and outputs the integer mod squares. Hopefully that makes sense, but an example would be if I plug in any square integer, I get 1. If I plug in a square free integer, I get itself back. If I plug in 32, I get 2 because it removes an even number of powers of 2. If I input 2^5 * 3^4 * 5^9 * 11^13, I get back 2 * 5 * 11. I have tried factoring the integer with FactorInteger and then using the Cases command to take only the prime factors which have odd exponent, but I am not getting it. Any help would be much appreciated! StatisticsMan ( talk) 02:54, 24 November 2009 (UTC)
numberout=1; flist=FactorInteger[n]; listlength=Length[flist]; (* ie the number of pairs *) Do[ (* repeat the steps below for each pair - fno is the number of the pair we're on *) pair=flist[[fno]]; (* take the fno'th pair of numbers *) pfactor=pair[[1]]; (* pfactor is the first number in pair, ie the prime factor *) pwr=pair[[2]]; (* pwr is the second number in pair, ie the power *) pwr=Mod[pwr,2]; (* now take pwr mod 2, ie 0 if it's even or 1 if it's odd *) numberout=numberout*(pfactor^pwr) ,{fno,listlength}] numberout
numberout=1; flist=FactorInteger[n]; Do[ numberout=numberout*(flist[[fno,1]]^Mod[flist[[fno,2]],2]) ,{fno,Length[flist]}] numberout
I'm trying to install an application called Drupal and one of the instructions is to "Move the contents of that directory into a directory within your web server's document root or your public HTML directory" with the command
mv drupal-x.x/* drupal-x.x/.htaccess /var/www/html
I'm a little confused as to why there appear to be three arguments after the mv command, which mv doesn't seem to support. Can someone please clear up my confusion? Thanks! — Sam 76.24.222.22 ( talk) 04:10, 24 November 2009 (UTC)
Why haven't there been any DOS/9x Windows versions since ME? jc iindyysgvxc ( my contributions) 09:25, 24 November 2009 (UTC)
Most .NET development is (generally speaking) focused on creating web applications or in-house business applications. What 'mainstream' applications also use .NET? By 'mainstream' I mean, non-business apps and something that a non-programmer might use. I can think of Paint.NET, Windows PowerShell and SyncToy. Are there any others? 12.165.250.13 ( talk) 16:05, 24 November 2009 (UTC)
Referring back to this question: [6]
I now find myself unable to copy and paste this information into emails. Is this something new in Internet Explorer 8?
I do recall warnings that I was telling the computer to do something unsafe and that was stopped, but I hardly see where just the symbols would cause a problem. I do remember video or something else moving and I was told don't use Explorer. I stay away from Firefox and use plain text when possible, but copying the symbols manually is such a pain. Vchimpanzee · talk · contributions · 20:43, 24 November 2009 (UTC)
My HP Deskjet 930C has got blinking error lights which prevent printing (I do already know what the manual says about them thanks), and despite several times in the past being able to fix the same pattern of blinking lights and get it working, this time I have not been able to. It has been a robust printer in the past, pity I cannot get it to work this time. a) I refill my own black-ink cartridges to save money. What robust reliable model of printer would suit this please? I have an old computer with WinXP, and thus cannot run some modern printers. I am happy to buy a 2nd hand printer. b) Are there any unofficial instructions about how to renovate this model of computer? HP says nothing about removing the cover etc. The printer is too old for paying for maintenance to be worthwhile - buying new would be cheaper. c) Is there any way to find out more specifically what the problem is? None of the HP software can do this, it would have to be some diagostic program an independant programmer has done, if anything exists at all. Thanks 92.24.170.160 ( talk) 21:20, 24 November 2009 (UTC)
I wish it were possible to buy or unofficially modify a printer so that instead of having to play around with injecting ink into cartridges, you just poured ink into it like filling a car. If it were not for the business model used, that would be how they would be designed. Roll on the days when we have fabrication machines and can make freeware designs of objects. 78.146.176.198 ( talk) 23:01, 25 November 2009 (UTC)
We do already have fabrication tools at least, if not a fabrication machine, for woodwork and so on. I suppose it would be possible with a drill and the right glue to fit either a small screw-top to an ink cartridge (or just a hole with a small bung), or a flexible plastic tube leading from the cartidge to an ink reservoir. In the later case it could be difficult to stop too much ink flowing into the cartidge, and some of the cover of the printer would have to be removed so that the cartridge could move to its non-working position. 78.147.183.186 ( talk) 00:42, 30 November 2009 (UTC)