Wikipedia:Reference desk/Archives/Computing/2011 July 11

= July 11 =

How do I get gtk working?
Hi, I'm using Fedora 4 and trying to do some gui programming. Certain websites say to use the header #include , but the compiler doesn't recognise it. I have gimp, and I at least have a folder called gtk (I actually have /etc/gtk and /etc/gtk-2.0, both of which contain a handful of files, all of them small), but somehow nothing is working. Is there a path variable I need to alter so the compiler picks these things up? I have the same problem if I do #include . I even used the line at the command prompt (for ): g++ -o hello2 hello2.cpp `gnome-config --libs gnomeui` but to no avail. What can I do? I just want to do easy graphical programming, like using gui windows for inputting simple data. Many thanks, It&#39;s been emotional (talk) 01:09, 11 July 2011 (UTC)


 * I don't know Fedora (rather than Ubuntu) but you'd expect the headers to be in /usr/include/ and the libraries in /usr/lib (/etc/gtk-2.0 is for configuration). To generate the necessary -I and -L commands that gcc wants (which tell it where to look for headers and libraries) the gtk tutorial) says one should use pkg-config rather than gnome-config (my system doesn't have anything by that latter name). If, for example, I directly run pkg-config --cflags --libs gtk+-2.0 at the command line, it reports a hefty swathe of -I -L and -l (and a few other) gcc options. -- Finlay McWalter ☻ Talk 10:12, 11 July 2011 (UTC)


 * Are you really using Fedora Core 4 (from 2006)?; if so then my reply is probably wrong, as things will have changed over the last 5 years. -- Finlay McWalter ☻ Talk 10:15, 11 July 2011 (UTC)


 * Even if you have gimp installed, the gtk dev files maynot be. do a search for gtk.h; if you find it you can use the -I option to add the directory to your gcc call. good luck. Staticd (talk) 10:32, 11 July 2011 (UTC)

It is really beating your head against the wall to do Gtk programming without using Autoconf and Automake. There is a serious learning curve involved, but without them the dependencies are just too hairy to manage. It's also, in my view, beating your head against the wall to do Gtk programming with an out-of-date OS. Looie496 (talk) 21:30, 11 July 2011 (UTC)

Thanks for the help. Somehow I've got it working, and I now have some useful tricks to improve it as well. It&#39;s been emotional (talk) 08:33, 13 July 2011 (UTC)

Formalizing a rule
What does that mean when a programming teacher tells you to 'formalize a certain rule"? — Preceding unsigned comment added by Wikiweek (talk • contribs) 01:38, 11 July 2011 (UTC)


 * I imagine it means write the rule in a computer language. 92.24.187.78 (talk) 14:49, 11 July 2011 (UTC)


 * Let me give an example. Let's say the rule is "Each person has a gender".  To formalize this for programming, we need to decide the following:


 * 1) Are people allowed not to specify their gender, say if they are worried about discrimination ?


 * 2) Are "male" and "female" the only allowed genders ? What about intersex people, can they select both "male" and "female", or neither ?


 * 3) Do we mean their genetic gender in the case of people who've undergone sex-change operations, or their current apparent gender ?


 * 4) Same question for transvestites.


 * 5) What should people with extra sex chromosomes put as their gender ?


 * So, you can see that even the simplest question can become quite complex, once you think through all the possible implications. StuRat (talk) 18:48, 11 July 2011 (UTC)

Special help for access 2007
Please i need help !

I do not know if this is possible, and cant explain with acceess word so i will use drawings. I have these two tables:

this table is for the dog, and some values of him (medical values).

this table let say is for the cat and some medical values for it.

IN ANOTHER TABLE i want to make this :

In this finale table, is my question. With a combo box i will select the type of animal (dog cat ect).

After i select, the values in columns should take the min and max values from the two first tables.

Examlpe : When i select dog, it takes values from the dog table.

And when i write a value greater than max or lower than min it should turn red AUTOMATICLY.

I have tried hard, using relationships or referncig some columns to other tables.NOTHING

Can it be done with codes or scripts, or i can use the interface of  access 2007 ?

Sorry for the long question everyone, i hope someone knows this. Thank u in advance 95.107.197.68 (talk) 08:05, 11 July 2011 (UTC)


 * This can be done, but it will require quite a bit of work setting up the interface. I'll be doing some Access programming later today (lucky me) so I'll take a look at exactly how I'd set this up. I believe it can be done without using VBA, though VBA is in some ways the easiest answer to this (there is no question you could do it with VBA scripting in Access). --Mr.98 (talk) 13:34, 11 July 2011 (UTC)


 * Here's one way to do it, using VBA. This is the easiest way that I know of. There is some of what you are describing that is ambiguous to me — what kind of forms you are thinking about. Below is one interpretation. If it is incorrect, please feel free to clarify what you mean.
 * This assumes that your cat data above is in a table named tblCat, and your dog data is in tblDog, and that your min/max values are in fields named "Min" and "Max".
 * Create a new form. On it, create a new combo box control, and give it the name, "cbo_select." Give it the values of "cat" and "dog".
 * Create a new text box control, and give it the name "txt_value". Make sure the Properties window is open. Select the text box (txt_value) and then go to the Event tab in the Properties window, then to the On Change event. If you click on the white space next to "On Change," an ellipses button (...) appears to the right of it. Click on that button, then select "Code builder," and it will open up the VBA editor.
 * This will put you into a subroutine called Private Sub txt_value_Change. Paste in the following code:


 * Then you can save and close out of the VBA editor.
 * And that should do it, so that if you start to type in a value into your text box, it will change color if it is within the bounds of a given table. If that's not what you wanted, let me know. The code above is pretty straightforward but let me know if you have questions about how it works, how to modify it, etc. --Mr.98 (talk) 14:28, 11 July 2011 (UTC)

Like Mr 98 says this can be done via forms and queries (relatively easily just the exact syntax is a pain). If the data in your two table is uniform you can use a UNION query to merge the data tables and then run a SELECT query on those results filtered by the choice you make in the first form's drop down list. I don't have MS Access on this machine so can't say for certain how i'd build this but this was something i've built many times without needing to use VBA (though it can be more flexible in VBA). Anyhoo here's a link to the syntax for referencing the form field's value (http://msdn.microsoft.com/en-us/library/aa223116(v=office.11).aspx). Good luck! ny156uk (talk) 17:22, 11 July 2011 (UTC)

Ignore my answer - teaches me for not reading the whole question! Sorry! ny156uk (talk) 17:24, 11 July 2011 (UTC)

single left click in e speaking software
I have downloaded and used e speaking voice and speech recognition software. I have read the mouse commands, as mouse up ,mouse down and others.but I can not get how to use single mouse click using this software. — Preceding unsigned comment added by 182.187.18.164 (talk) 08:40, 11 July 2011 (UTC)

what is cloud computing?
what is cloud computing? — Preceding unsigned comment added by 59.144.62.18 (talk) 11:52, 11 July 2011 (UTC)
 * See Cloud computing as a start. AndrewWTaylor (talk) 11:59, 11 July 2011 (UTC)
 * A marketing perspective: cloud computing is dynamic, it is liberating, it is empowering, it is efficient, instead of wasteful, it is amazing, instead of agonizing, it is massive, social, user-centric, and colossally world-wide in its scope, power, breadth, and depth. It is your key to the door to the window. 188.28.228.34 (talk) 15:44, 12 July 2011 (UTC)

VBA unicode
I have made a VBA program that gives output texts in english.I have to change the code so that the program gave output in Unicode font other than Latin alfabets.How can it be done? — Preceding unsigned comment added by 113.199.159.35 (talk) 15:23, 11 July 2011 (UTC)


 * I've Googled a little and apparently it is quite a pain in the neck. What kind of output is it? It is apparently different if you want it to output to the screen or to a file. It is not something that VBA does very well with, shamefully enough. --Mr.98 (talk) 23:40, 11 July 2011 (UTC)
 * My question is how to type unicode alphabets from other languages in VBA codes with taxts and comments. — Preceding unsigned comment added by 116.90.230.202 (talk) 10:42, 12 July 2011 (UTC)


 * It's not, not, not easy. It requires using the ChrW$ function for each and every character that requires unicode. See this post and program that is meant to make it a little easier. It seems pretty awful to me. --Mr.98 (talk) 14:25, 12 July 2011 (UTC)

pipelinks
I have read the section and have pipe-linked other words but cannot, for the life of me pipelink this:

the earl of Oxford - link to John de Vere, 7th Earl of Oxford

Can you tell me what I am doing wrong. It comes out that I lose the first mention i.e., the earl of Oxford but what appears and appears ONLY is the linked John de Vere, 7th Earl of Oxford.

I only want: the earl of Oxford to show in the text of the article (but for it to be linked to John de Vere, 7th Earl of Oxford) which I do not want to show in the article.

thankyou. Mugginsx (talk) 16:19, 11 July 2011 (UTC)


 * Do you want to do this: the Earl of Oxford? Card Zero  (talk) 16:28, 11 July 2011 (UTC)


 * The underscores in the wikisyntax are not necessary, they are optional. More examples can be found on the Help page for links.  Nimur (talk) 18:43, 11 July 2011 (UTC)


 * Here: the Earl of Oxford. Or is this not what you want? --Mr.98 (talk) 15:41, 12 July 2011 (UTC)

how do i download a file online to itunes for free
how can i download south parks La reststance song to itunes for use in the iphone for free. i dont whant to pay $12 for the whole album — Preceding unsigned comment added by UltraJosh97 (talk • contribs) 16:36, 11 July 2011 (UTC)


 * It depends on what you mean by "download." iTunes uses the terms Add to Library, Import, and Convert to describe different iTunes functions..  "Choosing File > Library > Import Playlists allows you to import playlists and other data files into iTunes."  Nimur (talk) 18:40, 11 July 2011 (UTC)
 * It sounds like what your wanting to do is commit copyright violation. The music you want is not free, and there is no way for anyone on wikipedia to change that for about 90 years.  There is lots of music available on the internet that IS free, but not the song you're looking for.  I'm going to avoid suggesting places where you could illegally acquire this song, but they do exist. i kan reed (talk) 21:16, 11 July 2011 (UTC)

http://www.youtube.com/results?search_query=la+resistance + http://winff.org/ &brvbar; Reisio (talk) 06:31, 12 July 2011 (UTC)


 * I want to note that in some cases you can usually only buy one song in the album. However you will not able to get legally for free. If you do wish to 'be illegal' please consult other means. Sorry, but this is not the place to ask for illegal stuff. General Rommel (talk) 08:53, 12 July 2011 (UTC) If anyone believes this is too harsh, please discuss on my talk page

Laptop adapter
I will be traveling from the United States to Ireland with a Dell Latitude D620. Will I need to purchase an adapter for my power cable? If so, what type? Thanks. 151.204.184.212 (talk) 17:04, 11 July 2011 (UTC)

This article on the VisitIreland website may be of use (http://www.visitireland.com/planning/electricity.asp). Unfortunately it suggests most electrical items from the US won't work in Ireland (though above that it mentions that most laptops should be fine as they're likely dual voltage). Hopefully someone will be along with an answer based on experience soon enough (it may also be worth moving this to the Miscellaneous section to get more responses)ny156uk (talk) 17:16, 11 July 2011 (UTC)
 * Nearly all modern laptops come with a multi-voltage power supply. Check the label - it should say something like "Input: 100-240V, 50-60Hz". In this case, it's compatible with most power outlets in the world, and certainly with power in Ireland (both Northern and the Republic of). You will need a plug adapter. Ireland uses a three-pronged outlet/plug. You should be able to get it for about US$ 5 from Amazon (but see many related products), or pick it up, at the usual absurd markups, in most airport electronic shops. --Stephan Schulz (talk) 17:31, 11 July 2011 (UTC)


 * If you're going to be spending a while in Ireland (or the UK, or other places with the same power outlets) then it'd be worthwhile buying a C5 <-> BS 1363 cable (I'm almost certain the power supply on your Dell will have a C5 "mickey mouse" connector). Any computer or electrical shop in Ireland will sell one of those. -- Finlay McWalter ☻ Talk 19:32, 11 July 2011 (UTC)


 * It looks like I'll only have to get a three-prong adapter. Thanks for the help.151.204.184.212 (talk) 19:35, 11 July 2011 (UTC)


 * I used to have a Latitude D620 and travelled from the UK to work for a few weeks out of our US office. The power block itself said "Input: 100-240V, 50-60Hz", so I had no problems just using a UK/US plug adapter.  If you are going to visit for business, the company's local IT guys might be able to fix you up with a suitable adapter.  Astronaut (talk) 10:43, 12 July 2011 (UTC)

Step by step explanation of internet processes
Hello everybody, does anybody konow where I can find a step by step explanation or a good diagramm that shows all the steps that take place before a web page can be displayed by a browser. Things like first, you enter the URL wikipedia.org, then the computer looks up the IP adress of Wikipedia at the name server and so on...Just a little overview where things like HTTP or TCP/IP are explained. It would really help me if somebody finds me something like this. Thanks a lot! --87.173.106.57 (talk) 19:12, 11 July 2011 (UTC)


 * You could read Douglas E. Comer's Internetworking with TCP/IP(vol.1) which covers all the layers from ethernet to IP to TCP to HTTP and ancillary stuff like DNS, BGP, and ICMP. Or you could set up Wireshark, set it tracing, view a website, and then spend the rest of the day analysing all the packets that went back and forward. Really every tutorial or book you see will try to view each level of the transaction with the lower layers abstracted away; if you really care to see the totally of the thing, down to the individual ethernet frames that are exchanged between your PC and your home router, you can't do much better than Wireshark. It's kind of drinking-from-the-firehose, as there's all kinds of other stuff going on at the same time, and stuff like retries and fragmentation can make the lower levels rather confusing at first, but if you really want to see what's going on, I really recommend it (and having a copy of Comer around so you can figure out what's supposed to be happening). -- Finlay McWalter ☻ Talk 19:26, 11 July 2011 (UTC)


 * That goes well beyond the "little overview" that was requested. Also beyond what was requested, but not that deep, would be browsing the relevant RFCs, like RFC 2616 (start at section 1.4), or just browsing our Hypertext Transfer Protocol article.  That is not the whole story but it's a significant part of it.  Comet Tuttle (talk) 21:04, 11 July 2011 (UTC)


 * Our main articles are Protocol stack, OSI model, and TCP/IP model (which contain many diagrams). I would recommend that you begin reading about HTTP version 1.0, which is significantly simpler than the version 1.1 protocol used by most browsers.  Once you understand HTTP 1.0, 1.1 will seem like a trivial and logical extension to take advantage of server-side and network- parallelism.  When you understand the streams transport, you may then dive down to understand TCP, which packetizes the streams.  And finally, if you are very interested, you can dive down to understand IP, which is used to route the packets.  At that layer, you will understand the need for a DNS server.  If you are a hardware-minded person, you may choose to continue learning about specific PHY ("physical") implementations that convert and encode data into electromagnetic signals for transport by wire, by fiber-optic link, or by radio.Nimur (talk) 21:39, 11 July 2011 (UTC)