[go: nahoru, domu]

Jump to content

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

From Wikipedia, the free encyclopedia
Computing desk
< February 10 << Jan | February | Mar >> February 12 >
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.


February 11[edit]

Apache Tomcat counters[edit]

Hi All

can anybody please answer below question.

What are the popular counters available in Apache Tomcat Server. — Preceding unsigned comment added by Ravisana99 (talkcontribs) 05:30, 11 February 2011 (UTC)[reply]

In general, counters are not popular anymore. They are a very useless statistic, so nobody checks them. Instead, a logfile analyzer is used. See Web log analysis software. -- kainaw 14:37, 11 February 2011 (UTC)[reply]

Why do Alarm Clocks sometimes not ring?[edit]

Various alarm devices (simple alarm clock, simple digital watches with alarm functions, iPod touches) will occasionally not ring their alarm at all in the mornings even when the settings have no been changed at all and their batteries are properly charged. Why does this happen? Acceptable (talk) 07:51, 11 February 2011 (UTC)[reply]

I know iPod Touches will not ring if your sound is not turned up. As for the others, maybe you were doing something then so it failed? General Rommel (talk) 08:13, 11 February 2011 (UTC)[reply]
Apart from true alarm clocks, most devices have a very quiet alarm. I suspect you are just not hearing it, unless it's an iPhone, in which case it really doesn't always work[1].--Shantavira|feed me 10:54, 11 February 2011 (UTC)[reply]
A common problem on cheapie alarm clocks is that the rheostat which controls the volume goes bad, causing it to seemingly randomly switch between loud and too quiet to hear. If you have it set to radio alarm, then the same problem with the tuning "pot" can also cause it to go off-station, which may be quitter or louder, depending on how it handles static. StuRat (talk) 08:27, 15 February 2011 (UTC)[reply]
In the category of user error, having AM and PM mixed up (either on the time setting or the alarm setting) can cause it to go off when you are away, thus making it seem like it's not going off at all. StuRat (talk) 08:29, 15 February 2011 (UTC)[reply]

nokia 1280 ringtone[edit]

i am in india, I have a nokia 1280 and I have an mp3 file on my computer i would like to have as the ringtone. does anyone able to tell me how i can set this up??Thanks 117.241.122.68 (talk) 09:08, 11 February 2011 (UTC)[reply]

According to the Nokia 1280 support page for India, that phone supports mp-3 ringtones but has no means to load/manage mp-3 files through a data cable, bluetooth or infra-red. I'm not even sure it can accept ringtones sent to it from a company that sells ringtones. If you consider buying your desired ringtone and getting it sent via SMS, check that it is compatible with your phone first... the people who run that kind of business generally don't give refunds. Astronaut (talk) 12:52, 11 February 2011 (UTC)[reply]

sql in c[edit]

i read in a book that if you include stdlib you can execute sql statements simply typing 'exec sql' before 'em after connecting with 'connect to user@dbname'. But dbname is the host or the instance? And the Password? Thanx --83.103.117.254 (talk) 09:34, 11 February 2011 (UTC)[reply]

It sounds like your book described some nonstandard pre-processor directive or macro. It's possible that it was also suggesting that you use system() to exec a sql program externally. Normally, in C, to execute database commands, you must use a database connection library. For example, take a look at the MySQL C API provided by the mysqlclient library. Several Embedded SQL compilers exist as well; some can even abstract away the database connection library. However those compilers are not strictly compilers for the C programming language (and many are proprietary, non-free tools). Check your book carefully; it's possible they explained a toolchain setup, or explained that the SQL statements were expressed in pseudocode to avoid the details of any specific database API. Nimur (talk) 10:53, 11 February 2011 (UTC)[reply]
The question is very likely about Pro*C. How to use it depends on your development environment - would that be some version of Microsoft Visual Studio? Oracle probably has an example project for Visual Studio... 130.188.8.11 (talk) 12:38, 11 February 2011 (UTC)[reply]
For example, both Ingres (example) and its relation PostgreSQL (example) offer an embedded SQL compiler to transform embedded SQL into calls to the regular C API; you then take the C program this yields and compile it with the C compiler. PostgreSQL's program for doing this is called ecpg. As to the specifics of the particular database ESQL you're talking about, you'd need to look in the documentation for that specific database and its toolset; they're not very standardised. -- Finlay McWalterTalk 12:38, 11 February 2011 (UTC)[reply]

A heuristic autoplaying bot that can defeat Lone Wolf on Halo: Reach - Exists?[edit]

Or possible to program?

Halo: Reach's Lone Wolf mission appears to be the most epically unbeatable level I have ever come across of any video game in recent memory. It appears unwinnable to human players.

Therefore, with the orders-of-magnitude quicker thinking of autoplaying bot-scripts, if equipped with a heuristic subroutine, then it should learn from its mistakes and improve upon its own strategies every time it dies or even takes a hit from enemy weapons.

With its self-adapting abilities, I could keep it on for a week (or even many months if necessary), and enable it to save its own updated tactical and strategic subroutines every 30 minutes in case of a power failure.

Some have claimed that "it was not designed to be won," so then the bot will learn how to violate those design parameters!

Now, some questions:

1. Does such a self-adaptive autoplaying bot already exist, that can play Halo: Reach?

2. If so, how do I put one together?

3. How quickly could it potentially learn to get better?

4. From this, could anyone extrapolate how well it would do after running for a week?

5. ...after running for a month?

6. What is the size of the entire Covenant and/or Flood Army that is deployable to Reach?

7. How many soldiers arrive in a single wave of reinforcements, and how often do those waves arrive?

8. Therefore, after calculating the waves of reinforcements and total army sizes, how long would a bot need to take in order to singlehandedly defeat every last possible wave of reinforcements, therefore wipe out their entire army, thus win the Lone Wolf battle of Reach?

9. If I arranged to hook up the bot and game to the fastest supercomputer in the world, how much quicker would it be able to win Lone Wolf? --70.179.187.21 (talk) 09:47, 11 February 2011 (UTC)[reply]

To write a bot, your game usually needs to present a software development kit (SDK), which exposes a set of game features and data for your bot to process. Then, you'd design algorithms to work with the data that the game provides. It doesn't look like Halo's development studio or publisher has ever released an SDK to the public; so there's no practical, realistic way for you or anyone to design a bot. Theoretically, you could design a computer-vision system that watches your monitor, analyzes the gameplay, and produces commands to the controller - but in practice, that would be prohibitively difficult. Theoretically, you could also reverse-engineer the game's binary distribution and hook your bot into that, but this is pretty infeasible. One reason a game studio chooses not to provide a bot SDK is because it is extremely difficult to release one that would prohibit "cheater-bots." In a sense, providing the necessary data would make it possible for you to write a perfect bot; and it'd be entirely up to you to add "imperfections." Have a look at this article, Analyzing the AI Bot Library from the Quake 3 Source Code. Nimur (talk) 11:08, 11 February 2011 (UTC)[reply]


If the level is not designed to be one, then there is probably no victory condition. What makes you think that there is a "last possible wave of reinforcements"?
I haven't played it, but If the level is designed to be unwinnable, the developers probably just put the reinforcements on an infinite loop. APL (talk) 15:22, 11 February 2011 (UTC)[reply]
I assume he knows that, that's why he's saying he would calculate the maximum possible reinforcements (in an in-universe way I assume) and just "call it good" once he'd killed enough spawned enemies to exceed that number. Look at it this way, if you had a "supposed to lose" fight with infinite respawns in a WWII game, once you've killed as many NPCs as the entire population of Germany, Japan, Italy and Austria in 1939, you could reasonably assume that the outcome of the fight was 'winning the war singlehandedly'. 65.29.47.55 (talk) 21:59, 11 February 2011 (UTC)[reply]
Note that it would probably be easier to hack the game/console in some way so that you do not take any damage, than it would be to build a bot. The former issue is just finding what variable contains your health meter and keeping it untouched. (I don't know how you'd do this, mind you.) The latter involves developing complicated AI. --Mr.98 (talk) 16:48, 11 February 2011 (UTC)[reply]
Learning is a super difficult problem in the general case. Filtering out irrelevant information is something humans can do easily, but we have no idea how to systematize it. Without a way to discard irrelevant information, a learning AI is left doing hill climbing in a heavily multidimensional space; it'll get stuck at a local maximum (it'll probably make it there really quickly) and never improve after that. (I'm not an AI expert at all, so there may be some approaches I'm missing, but I've never heard of anything like the kind of learning humans do.)
Supercomputers probably wouldn't be any use for playing games; they consist of many many CPUs that are each not very much more powerful than the CPUs in a desktop machine. Data parallel problems can be solved in hours instead of years this way, but a task like this doesn't lend itself into being broken into little bits that can be executed independently. Paul (Stansifer) 00:35, 12 February 2011 (UTC)[reply]

[edit]

I have a PMWiki website; how can I change the logo that is in the top left? 128.223.222.68 (talk) 18:29, 11 February 2011 (UTC)[reply]

Looks like you have to set a variable in PmWiki; see the variables page. ---— Gadget850 (Ed) talk 18:59, 11 February 2011 (UTC)[reply]
Once you determine the address; i.e. in what directory, etc. the original logo is currently, kept, all you really need to do is rename that logo, to say logo.old, and then upload a new one to the same location. This can be a little less daunting for a newbie than resetting the location in one's localsettings.php file, for which you need server access. Д-рСДжП,ДС 21:36, 11 February 2011 (UTC)[reply]

ReferencePreservingDataContract in WCF calls[edit]

Today at work, I just solved a problem in fifteen minutes that had been troubling our customer for days. They had reported that whenever they try to access a certain feature of our application, they get an error message instead. It turned out that this feature was calling a WCF method, and the object returned had cyclic references, so the call crashed. I solved it simply by adding [ReferencePreservingDataContract] to the WCF interface, which allows the WCF call to return objects with cyclic references. But why isn't this enabled by default? What's the harm in using it? JIP | Talk 18:55, 11 February 2011 (UTC)[reply]

Connecting keyboard + monitor to a smartphone[edit]

Can you connect both to your smartphone? I know that connecting normal keyboards shouldn't be a huge deal, since it can be done through bluetooth. But is it always possible? (provided the phone has bluetooth). — Preceding unsigned comment added by Wikiweek (talkcontribs) 20:22, 11 February 2011 (UTC)[reply]

Depends on the phone, as far as I'm aware the iPhone's bluetooth supports ONLY headsets. Droid is obviously a much more open platform, can't speak for windows. Caveat: that may be outdated information I haven't looked into the latter generation iPhones since the android platform came out. 65.29.47.55 (talk) 22:02, 11 February 2011 (UTC)[reply]
The existence of bluetooth keyboards doesn't mean you'll be able to connect it to a bluetooth phone. But, in the case of Android, seems normally possible to do that. The case of the monitor is more tricky, since you'll be moving loads of data through it, and do not only need a connection, but also a good graphic card. AFAIK, no smartphone has this capability. Quest09 (talk) 12:30, 12 February 2011 (UTC)[reply]
You might be interested in the Motorola Atrix that comes with a dock for connecting a monitor and USB keyboard (or bluetooth) and mouse to it. It also has a laptop dock with build in monitor, keyboard, and mouse and a special mode for when it is docked that gives a full firefox browser with flash support.--v/r - TP 22:39, 19 February 2011 (UTC)[reply]