Computing desk | ||
---|---|---|
< November 17 | << Oct | November | Dec >> | November 19 > |
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'd like to create an array such as the type:
truthtable : array [1..n,1..x] of boolean;
in pascal after having used readln(n), and x:=n-1 to get the variables.
As far as I can tell the compiler only allows constants in the definition. Excluding creating a block of memory at run time and not using an array is there a work around ? 83.100.237.223 ( talk) 01:41, 18 November 2010 (UTC)
var truthtable: array of boolean; begin SetLength(truthtable, n, x); // Now you got truthtable as an array[0..n-1, 0..x-1] of boolean end;
var truthtable : array of array of boolean; ...etc
83.100.237.223 ( talk) 18:17, 18 November 2010 (UTC)
So I'm thinking about learning a more "hardcore" programming language.
I work on a Mac (so no Visual Studio products). I am pretty proficient with PHP, Javascript, VBScript, and Actionscript. I can meddle with VB.NET but I haven't used it as much as I could. I pick up things pretty quickly and have a fairly good programming mind. I know the basics of programming logic and object oriented programming. Of the languages I know, I find PHP the most straightforward and VBScript the least straightforward. What I like about PHP is I find it very easy to translate the logical structure in my head into the code on the page, without having to jump through too many jargony hoops, if that makes sense.
What's a good next step? I'd like whatever language I use to not involve too much meddling with the nuts and bolts of computer memory. I'd like it to be cross-platform enough to develop on my Mac, but to make programs that could theoretically be ported to PCs. I'd like it to be able to create GUI programs that look pretty good. The programs it make ought to be easily distributable as binaries.
I'm not 100% sure what I'd use it for at this point — I make lots of little things, and find that obviously having the capacity to use the language inspires me to have ideas as to what to make with it. My general model will probably be to get a "how to learn language X" book and work through it first, whatever the language.
I'm leaning towards Java. It seems to allow more portability than most others, seems to be relatively flexible and popular, and seems like it would open up opportunities for using it, say, in conjunction mobile apps.
Any other suggestions, thoughts, warnings? I understand this is entire subjective. -- Mr.98 ( talk) 01:57, 18 November 2010 (UTC)
Thanks for the suggestions. I think I'm going to go with Java, or at least give it a gander. I appreciate your taking the time to try and make sense of my notably subjective terms and requests. -- Mr.98 ( talk) 01:52, 19 November 2010 (UTC)
About 8 months ago, I bought a used computer which came installed with Windows XP or Vista (I can't remember which; probably the latter). You can actually read about it here (although I ended up buying a d620 not d520). As such I have two SATA hard drives:
I have a few questions about this setup:
Magog the Ogre ( talk) 05:28, 15 November 2010 (UTC)
Well, considering that the other disk is collecting dust in the basement, yes, I'm quite sure it's not a virtual drive. ;) Magog the Ogre ( talk) 06:05, 15 November 2010 (UTC)
Also some searching finally turned up [3], but I don't think I have the CD. Magog the Ogre ( talk) 06:34, 15 November 2010 (UTC)
No, I use VirtualBox, but it has no support for DirectX. Virtual OS's are not good for gaming. Magog the Ogre ( talk) 12:42, 15 November 2010 (UTC)
I'm moving this section back to the bottom to get more input. Magog the Ogre ( talk) 02:18, 18 November 2010 (UTC)
What does NP, PP and NN means in following context?
81. 3k 100 hz NP
60. 0k 75 hz PP
56. 4k 70 hz NN
Jib-boom ( talk) 04:44, 18 November 2010 (UTC)
How do I delete game memory in my Xbox so that it resets to default? —Preceding unsigned comment added by 220.255.2.65 ( talk) 08:49, 18 November 2010 (UTC)
it's win 2003 srv std ed. thanx -- 217.194.34.103 ( talk) 08:56, 18 November 2010 (UTC)
(e/c)
10,000+ strings consisted of a-z are generated randomly, and all of them are shorter than 5 letters. Now I want to count how many strings are valid English vocabularies, so I need a method or a program to do this work, could you help me?-- Merry Rabbit 09:16, 18 November 2010 (UTC)
#!/usr/bin/env python
english = set()
# Use UNIX word list - probably not the best...
fp = open("/usr/share/dict/words")
for i in fp:
english.add(i)
fp.close()
count = 0
english_words = 0
# Hard coded, one word per line.
fp = open("mywords")
for i in fp:
count = count+1
if i in english:
english_words = english_words+1
fp.close()
print "Read ", count, " words", english_words, " are english words"
$ wc -l a 10000 $ wc -l b 479625 $ sort -u a b|wc -l 487576
New York Times informs that the Chinese rerouted much of the Internet traffic through Chinese servers on 2 occasions last spring. The article notes that "While sensitive data such as e-mails and commercial transactions are generally encrypted before being transmitted, the Chinese government holds a copy of an encryption master key, and there was speculation that China might have used it to break the encryption on some of the misdirected Internet traffic." What key is that? What's the point to encrypt secret military emails with a code that could be broken by the Chinese government??? 93.172.63.225 ( talk) 10:43, 18 November 2010 (UTC)
Follow-up to: [ [6]] above.
Now, I am at list getting the IP and some traffic is flowing through the network.
Extended content
|
---|
GNOME PPP: STDERR: --> Ignoring malformed input line: ";Do NOT edit this file by hand!" GNOME PPP: STDERR: --> WvDial: Internet dialer version 1.60 GNOME PPP: STDERR: --> Cannot get information for serial port. GNOME PPP: STDERR: --> Initializing modem. GNOME PPP: STDERR: --> Sending: ATZ GNOME PPP: STDERR: ATZ GNOME PPP: STDERR: OK GNOME PPP: STDERR: --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 GNOME PPP: STDERR: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 GNOME PPP: STDERR: OK GNOME PPP: STDERR: --> Modem initialized. GNOME PPP: STDERR: --> Sending: ATM1L1DP*99# GNOME PPP: STDERR: --> Waiting for carrier. GNOME PPP: STDERR: ATM1L1DP*99# GNOME PPP: STDERR: CONNECT GNOME PPP: STDERR: --> Carrier detected. Starting PPP immediately. GNOME PPP: STDERR: --> Starting pppd at Wed Nov 17 21:59:09 2010 GNOME PPP: STDERR: --> Pid of pppd: 7875 GNOME PPP: STDERR: --> Using interface ppp0 GNOME PPP: STDERR: --> Authentication (CHAP) started GNOME PPP: STDERR: --> Authentication (CHAP) successful GNOME PPP: STDERR: --> local IP address 212.169.177.2 GNOME PPP: STDERR: --> remote IP address 10.64.64.64 GNOME PPP: STDERR: --> primary DNS address 85.62.229.133 GNOME PPP: STDERR: --> secondary DNS address 85.62.229.134 GNOME PPP: STDERR: --> Script /etc/ppp/ip-up run successful GNOME PPP: STDERR: --> Default route Ok. GNOME PPP: STDERR: --> warning, can't find address for `www.suse.de` GNOME PPP: STDERR: --> warning, address lookup does not work GNOME PPP: STDERR: --> Nameserver (DNS) failure, the connection may not work. GNOME PPP: STDERR: --> Connected... Press Ctrl-C to disconnect |
But, I still cannot navigate. There's a problem (see above at the end) with the DNS and the browser cannot resolve any address.
My config file for wvdial is:
Extended content
|
---|
[Dialer CARREFOURINTERNET] Modem = /dev/ttyUSB0 Baud = 115200 Init = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Init3 = AT+CGDCONT=1,"IP","CARREFOURINTERNET" Phone = *99# ISDN = off Username = '' Password = '' New PPPD = yes Stupid Mode = 1 Dial Command = ATDT |
I have the impression that the problem lyes in the init strings, since when I changed them, I also got an IP. By the way, what do this init strings mean anyway? Mr.K. (talk) 10:55, 18 November 2010 (UTC)
What is the best way to save Hotmail emails to hard disk? Not doing them manually, as that would take weeks. I only have Outlook Express available (but not used) as I deleted MS Office some time ago. I'd prefer some freeware gismo that would just do it without too much complication. I use WinXP. Thanks 92.24.187.23 ( talk) 13:36, 18 November 2010 (UTC)
I use WinXP. I have a small pen drive pernamently stuck into the back of my computer. I would like to be able to copy c:/mydata to e:/backup. In fact I'd like to copy to backup2, then when that is copied without any problems to delete backup1; and then next time to copy from mydata to backup1 and then delete backup2. What would be an easy script language to write this in please?
I would like this script to operate as part of the closing-down procedure of the computer: how do I get it to do that please? Thanks 92.24.187.23 ( talk) 13:42, 18 November 2010 (UTC)
Just the small directory mydata. 92.15.5.101 ( talk) 17:05, 18 November 2010 (UTC)
OK, what script languages can copy directories and their contents easily (eg "copy c:mydata e:backup"), and would be suited to the above task? Thanks 92.29.125.34 ( talk) 20:43, 19 November 2010 (UTC)
Would FreeBasic be a macro language? Thanks 92.24.181.96 ( talk) 23:14, 20 November 2010 (UTC)
I want a Windows program which can take a picture with an attached digital camera every 1 hour. So far in my searches I've only found this which works perfectly except that it overwrites the image each time it takes a new one. I tried using %date% %time% as the filename in the save as dialogue box, so that each time the program takes a picture it doesn't overwrite the previous file, but it doesn't work sine %date% and %time% output using : separate the digits, and : is not allowed in Windows filenames. Are there any other programs which I could try, or perhaps a way to get a timestamp from Windows without : in it? The OS is Windows XP 82.44.55.25 ( talk) 15:28, 18 November 2010 (UTC)
Thanks. 84.153.193.81 ( talk) 16:01, 18 November 2010 (UTC)
it wasn't homework, but I have mild mental retardation and am not able to do "trig" or other math like that, I just wondered what the screen percentage is. Thanks for your understnading. 84.153.193.81 ( talk) 16:42, 18 November 2010 (UTC)
Is there a flash advert archive somewhere online? Smallman12q ( talk) 17:00, 18 November 2010 (UTC)
Coloribus maybe? 92.15.13.70 ( talk) 20:20, 18 November 2010 (UTC)
I have a printer set up on my house PC but the kids keep printing out picture using up all my ink, is there a way I can prevent them from printing from their user accounts, their user accounts are not set up with admin privileges. Mo ainm ~Talk 19:21, 18 November 2010 (UTC)
One my website, Leubantia Wiki, the flags of Republic of Macedonia, Paraguay, Honduras, Romania, Croatia, Nigeria, Belgium, Estonia, Slovakia, Peru, Republic of Ireland, Gabon, Costa Rica, USA, Algeria, Georgia (country), and many, many more images are not showing up. I do not have a clue why so many images are not showing up. My computer must, but maybe not, have a virus or something... Also, when I try to re-upload them, they still don't show up. There has got to be a bug. Also, my stupid compute is making TYPOS!!!!!! —Preceding unsigned comment added by Velociraptor888 ( talk • contribs) 21:46, 18 November 2010 (UTC)
Computing desk | ||
---|---|---|
< November 17 | << Oct | November | Dec >> | November 19 > |
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'd like to create an array such as the type:
truthtable : array [1..n,1..x] of boolean;
in pascal after having used readln(n), and x:=n-1 to get the variables.
As far as I can tell the compiler only allows constants in the definition. Excluding creating a block of memory at run time and not using an array is there a work around ? 83.100.237.223 ( talk) 01:41, 18 November 2010 (UTC)
var truthtable: array of boolean; begin SetLength(truthtable, n, x); // Now you got truthtable as an array[0..n-1, 0..x-1] of boolean end;
var truthtable : array of array of boolean; ...etc
83.100.237.223 ( talk) 18:17, 18 November 2010 (UTC)
So I'm thinking about learning a more "hardcore" programming language.
I work on a Mac (so no Visual Studio products). I am pretty proficient with PHP, Javascript, VBScript, and Actionscript. I can meddle with VB.NET but I haven't used it as much as I could. I pick up things pretty quickly and have a fairly good programming mind. I know the basics of programming logic and object oriented programming. Of the languages I know, I find PHP the most straightforward and VBScript the least straightforward. What I like about PHP is I find it very easy to translate the logical structure in my head into the code on the page, without having to jump through too many jargony hoops, if that makes sense.
What's a good next step? I'd like whatever language I use to not involve too much meddling with the nuts and bolts of computer memory. I'd like it to be cross-platform enough to develop on my Mac, but to make programs that could theoretically be ported to PCs. I'd like it to be able to create GUI programs that look pretty good. The programs it make ought to be easily distributable as binaries.
I'm not 100% sure what I'd use it for at this point — I make lots of little things, and find that obviously having the capacity to use the language inspires me to have ideas as to what to make with it. My general model will probably be to get a "how to learn language X" book and work through it first, whatever the language.
I'm leaning towards Java. It seems to allow more portability than most others, seems to be relatively flexible and popular, and seems like it would open up opportunities for using it, say, in conjunction mobile apps.
Any other suggestions, thoughts, warnings? I understand this is entire subjective. -- Mr.98 ( talk) 01:57, 18 November 2010 (UTC)
Thanks for the suggestions. I think I'm going to go with Java, or at least give it a gander. I appreciate your taking the time to try and make sense of my notably subjective terms and requests. -- Mr.98 ( talk) 01:52, 19 November 2010 (UTC)
About 8 months ago, I bought a used computer which came installed with Windows XP or Vista (I can't remember which; probably the latter). You can actually read about it here (although I ended up buying a d620 not d520). As such I have two SATA hard drives:
I have a few questions about this setup:
Magog the Ogre ( talk) 05:28, 15 November 2010 (UTC)
Well, considering that the other disk is collecting dust in the basement, yes, I'm quite sure it's not a virtual drive. ;) Magog the Ogre ( talk) 06:05, 15 November 2010 (UTC)
Also some searching finally turned up [3], but I don't think I have the CD. Magog the Ogre ( talk) 06:34, 15 November 2010 (UTC)
No, I use VirtualBox, but it has no support for DirectX. Virtual OS's are not good for gaming. Magog the Ogre ( talk) 12:42, 15 November 2010 (UTC)
I'm moving this section back to the bottom to get more input. Magog the Ogre ( talk) 02:18, 18 November 2010 (UTC)
What does NP, PP and NN means in following context?
81. 3k 100 hz NP
60. 0k 75 hz PP
56. 4k 70 hz NN
Jib-boom ( talk) 04:44, 18 November 2010 (UTC)
How do I delete game memory in my Xbox so that it resets to default? —Preceding unsigned comment added by 220.255.2.65 ( talk) 08:49, 18 November 2010 (UTC)
it's win 2003 srv std ed. thanx -- 217.194.34.103 ( talk) 08:56, 18 November 2010 (UTC)
(e/c)
10,000+ strings consisted of a-z are generated randomly, and all of them are shorter than 5 letters. Now I want to count how many strings are valid English vocabularies, so I need a method or a program to do this work, could you help me?-- Merry Rabbit 09:16, 18 November 2010 (UTC)
#!/usr/bin/env python
english = set()
# Use UNIX word list - probably not the best...
fp = open("/usr/share/dict/words")
for i in fp:
english.add(i)
fp.close()
count = 0
english_words = 0
# Hard coded, one word per line.
fp = open("mywords")
for i in fp:
count = count+1
if i in english:
english_words = english_words+1
fp.close()
print "Read ", count, " words", english_words, " are english words"
$ wc -l a 10000 $ wc -l b 479625 $ sort -u a b|wc -l 487576
New York Times informs that the Chinese rerouted much of the Internet traffic through Chinese servers on 2 occasions last spring. The article notes that "While sensitive data such as e-mails and commercial transactions are generally encrypted before being transmitted, the Chinese government holds a copy of an encryption master key, and there was speculation that China might have used it to break the encryption on some of the misdirected Internet traffic." What key is that? What's the point to encrypt secret military emails with a code that could be broken by the Chinese government??? 93.172.63.225 ( talk) 10:43, 18 November 2010 (UTC)
Follow-up to: [ [6]] above.
Now, I am at list getting the IP and some traffic is flowing through the network.
Extended content
|
---|
GNOME PPP: STDERR: --> Ignoring malformed input line: ";Do NOT edit this file by hand!" GNOME PPP: STDERR: --> WvDial: Internet dialer version 1.60 GNOME PPP: STDERR: --> Cannot get information for serial port. GNOME PPP: STDERR: --> Initializing modem. GNOME PPP: STDERR: --> Sending: ATZ GNOME PPP: STDERR: ATZ GNOME PPP: STDERR: OK GNOME PPP: STDERR: --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 GNOME PPP: STDERR: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 GNOME PPP: STDERR: OK GNOME PPP: STDERR: --> Modem initialized. GNOME PPP: STDERR: --> Sending: ATM1L1DP*99# GNOME PPP: STDERR: --> Waiting for carrier. GNOME PPP: STDERR: ATM1L1DP*99# GNOME PPP: STDERR: CONNECT GNOME PPP: STDERR: --> Carrier detected. Starting PPP immediately. GNOME PPP: STDERR: --> Starting pppd at Wed Nov 17 21:59:09 2010 GNOME PPP: STDERR: --> Pid of pppd: 7875 GNOME PPP: STDERR: --> Using interface ppp0 GNOME PPP: STDERR: --> Authentication (CHAP) started GNOME PPP: STDERR: --> Authentication (CHAP) successful GNOME PPP: STDERR: --> local IP address 212.169.177.2 GNOME PPP: STDERR: --> remote IP address 10.64.64.64 GNOME PPP: STDERR: --> primary DNS address 85.62.229.133 GNOME PPP: STDERR: --> secondary DNS address 85.62.229.134 GNOME PPP: STDERR: --> Script /etc/ppp/ip-up run successful GNOME PPP: STDERR: --> Default route Ok. GNOME PPP: STDERR: --> warning, can't find address for `www.suse.de` GNOME PPP: STDERR: --> warning, address lookup does not work GNOME PPP: STDERR: --> Nameserver (DNS) failure, the connection may not work. GNOME PPP: STDERR: --> Connected... Press Ctrl-C to disconnect |
But, I still cannot navigate. There's a problem (see above at the end) with the DNS and the browser cannot resolve any address.
My config file for wvdial is:
Extended content
|
---|
[Dialer CARREFOURINTERNET] Modem = /dev/ttyUSB0 Baud = 115200 Init = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Init3 = AT+CGDCONT=1,"IP","CARREFOURINTERNET" Phone = *99# ISDN = off Username = '' Password = '' New PPPD = yes Stupid Mode = 1 Dial Command = ATDT |
I have the impression that the problem lyes in the init strings, since when I changed them, I also got an IP. By the way, what do this init strings mean anyway? Mr.K. (talk) 10:55, 18 November 2010 (UTC)
What is the best way to save Hotmail emails to hard disk? Not doing them manually, as that would take weeks. I only have Outlook Express available (but not used) as I deleted MS Office some time ago. I'd prefer some freeware gismo that would just do it without too much complication. I use WinXP. Thanks 92.24.187.23 ( talk) 13:36, 18 November 2010 (UTC)
I use WinXP. I have a small pen drive pernamently stuck into the back of my computer. I would like to be able to copy c:/mydata to e:/backup. In fact I'd like to copy to backup2, then when that is copied without any problems to delete backup1; and then next time to copy from mydata to backup1 and then delete backup2. What would be an easy script language to write this in please?
I would like this script to operate as part of the closing-down procedure of the computer: how do I get it to do that please? Thanks 92.24.187.23 ( talk) 13:42, 18 November 2010 (UTC)
Just the small directory mydata. 92.15.5.101 ( talk) 17:05, 18 November 2010 (UTC)
OK, what script languages can copy directories and their contents easily (eg "copy c:mydata e:backup"), and would be suited to the above task? Thanks 92.29.125.34 ( talk) 20:43, 19 November 2010 (UTC)
Would FreeBasic be a macro language? Thanks 92.24.181.96 ( talk) 23:14, 20 November 2010 (UTC)
I want a Windows program which can take a picture with an attached digital camera every 1 hour. So far in my searches I've only found this which works perfectly except that it overwrites the image each time it takes a new one. I tried using %date% %time% as the filename in the save as dialogue box, so that each time the program takes a picture it doesn't overwrite the previous file, but it doesn't work sine %date% and %time% output using : separate the digits, and : is not allowed in Windows filenames. Are there any other programs which I could try, or perhaps a way to get a timestamp from Windows without : in it? The OS is Windows XP 82.44.55.25 ( talk) 15:28, 18 November 2010 (UTC)
Thanks. 84.153.193.81 ( talk) 16:01, 18 November 2010 (UTC)
it wasn't homework, but I have mild mental retardation and am not able to do "trig" or other math like that, I just wondered what the screen percentage is. Thanks for your understnading. 84.153.193.81 ( talk) 16:42, 18 November 2010 (UTC)
Is there a flash advert archive somewhere online? Smallman12q ( talk) 17:00, 18 November 2010 (UTC)
Coloribus maybe? 92.15.13.70 ( talk) 20:20, 18 November 2010 (UTC)
I have a printer set up on my house PC but the kids keep printing out picture using up all my ink, is there a way I can prevent them from printing from their user accounts, their user accounts are not set up with admin privileges. Mo ainm ~Talk 19:21, 18 November 2010 (UTC)
One my website, Leubantia Wiki, the flags of Republic of Macedonia, Paraguay, Honduras, Romania, Croatia, Nigeria, Belgium, Estonia, Slovakia, Peru, Republic of Ireland, Gabon, Costa Rica, USA, Algeria, Georgia (country), and many, many more images are not showing up. I do not have a clue why so many images are not showing up. My computer must, but maybe not, have a virus or something... Also, when I try to re-upload them, they still don't show up. There has got to be a bug. Also, my stupid compute is making TYPOS!!!!!! —Preceding unsigned comment added by Velociraptor888 ( talk • contribs) 21:46, 18 November 2010 (UTC)