Search Results

Search found 9564 results on 383 pages for 'character encoding'.

Page 3/383 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to apply effects that occur (or change) over time to characters in a game?

    - by Joshua Harris
    So assume that I have a system that applies Effects to Characters like so: public class Character { private Collection<Effect> _effects; public void AddEffect (Effect e) { e.ApplyTo(this); _effects.Add(e); } public void RemoveEffect (Effect e) { e.RemoveFrom(this); _effects.Remove(e); } } public interface Effect { public void ApplyTo (Character character); public void RemoveFrom (Character character); } Example Effect: Armor Buff for 5 seconds. void someFunction() { // Do Stuff ... Timer armorTimer = new Timer(5 seconds); ArmorBuff armorbuff = new ArmorBuff(); character.AddEffect(armorBuff); armorTimer.Start(); // Do more stuff ... } // Some where else in code public void ArmorTimer_Complete() { character.RemoveEffect(armorBuff); } public class ArmorBuff implements Effect { public void applyTo(Character character) { character.changeArmor(20); } public void removeFrom(Character character) { character.changeArmor(-20); } } Ok, so this example would buff the Characters armor for 5 seconds. Easy to get working. But what about effects that change over the duration of the effect being applied. Two examples come to mind: Damage Over Time: 200 damage every second for 3 seconds. I could mimic this by applying an Effect that lasts for 1 second and has a counter set to 3, then when it is removed it could deal 200 damage, clone itself, decrement the counter of the clone, and apply the clone to the character. If it repeats this until the counter is 0, then you got a damage over time ability. I'm not a huge fan of this approach, but it does describe the behavior exactly. Degenerating Speed Boost: Gain a speed boost that degrades over 3 seconds until you return to your normal speed. This is a bit harder. I can basically do the same thing as above except having timers set to some portion of a second, such that they occur fast enough to give the appearance of degenerating smoothly over time (even though they are really just stepping down incrementally). I feel like you could get away with only 12 steps over a second (maybe less, I would have to test it and see), but this doesn't seem very elegant to me. The only other way to implement this effect would be to change the system so that the Character checks the _effects collection for effects that alter any of the properties any time that they are being used. I could handle this in functions like getCurrentSpeed() and getCurrentArmor(), but you can imagine how much of a hassle it would be to have that kind of overhead every time you want to do a calculation with movement speed (which would be every time you move your character). Is there a better way to deal with these kinds of effects or events?

    Read the article

  • how to know which special character is there in a file?

    - by Pangea
    My app needs to process text files during a batch process. Occassionally I receive a file with some special character at the end of the file. I am not sure what that special character is. Is there anyway I can find what that character is so that I can tell the other team which is producing that file. I have used mozilla's library to guess the file encoding and it says UTF-8.

    Read the article

  • Changing Encoding while Xml.parse() with SaxFeedParser Java

    - by zOro
    Hi , I am trying to load hebrew rss using the fllow : Xml.parse(_InputStream, Xml.Encoding.ISO_8859_1 , root.getContentHandler()); taken from ibm site : link text I would like to use other Encoding like "ISO8859_8" rather than : Xml.Encoding.ISO_8859_1, Xml.Encoding.US_ASCII, Xml.Encoding.UTF_16, Xml.Encoding.UTF_8 Thanks a lot!

    Read the article

  • Problem with "Transfer-Encoding: chunked" in Apache 2.2

    - by Michal Niklas
    One of client of our web service uses axis2 application that sends HTTP 1.1 query with: Transfer-Encoding: chunked header. Such query is refused by our Apache 2.2 with message: <title>411 Length Required</title> </head><body> <h1>Length Required</h1> <p>A request of the requested method POST requires a valid Content-length.<br /> In Apache logs there is: [Mon May 17 09:06:04 2010] [error] [client 127.0.0.1] chunked Transfer-Encoding forbidden: /app/webservices/soap.hdb When I send such message without Transfer-Encoding: chunked and with Content-Length all works ok. I searched how to solve this problem, but I found only how to disable Transfer-Encoding: chunked on client side. Is there any way to do it on server side?

    Read the article

  • Changing the character encoding of a MySQL database

    - by Julien Genestoux
    Our whole application is now able to handle UTF-8 and it will be our choice in terms of encoding all across our architecture. The last step is to change the encoding of our MySQL databases. Of course, ALTER TABLE db_table CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; should be able to convert each of the tables to the right UTF8 encoding, yet, is there anything else I should do? I believe that the my.cnf configuration file needs to be changed as well.

    Read the article

  • Is there any way to distribute x264 encoding jobs across multiple computers (to increase the encodin

    - by Breakthrough
    Does anyone know of a current, active solution to encoding x264 videos across many computers (via the network) to increase encoding FPS? I heard in the past of the project x264farm; unfortunately, it is not actively developed anymore, and isn't compatible with newer x264 builds. I'm looking for a current solution, which is compatible with newer builds of x264. Just to note this, I'm a Windows user, so I'm only looking for Windows solutions (or at the very least, Linux). I've also seen the ELDER distributed encoder, but the quality varies depending on the settings you use - I'd prefer a solution similar to x264farm as noted above (the documentation outlines the encoding process), but one that is compatible with new(er) x264 builds, and is preferably actively developed. Final Edit: Unfortunately, the bounty for this question has expired, and I haven't found a decent solution for this. So if at any time someone finds a new, distributed encoding solution for x264 (or any h.264 coded, for that matter) - please answer this question! I'd love to discover an ideal method to make this work!

    Read the article

  • Is there any way to distribute x264 encoding jobs across multiple computers (to increase the encoding speed)?

    - by Breakthrough
    Does anyone know of a current, active solution to encoding x264 videos across many computers (via the network) to increase encoding FPS? Brownie points for cross-platform and open source, but just so you all know, I usually use Windows. Programs that I have heard of, and why I do not believe they are suitable: x264farm: Not actively developed. Good interface, but does not support two-pass encoding, and fails with newer x264 builds. ELDER: Again, not actively developed, but my issue was that it didn't work with new x264 builds, and it was very difficult to configure (read: randomly stopped working). While I don't absolutely need a program which is being actively developed, I would like one that supports two-pass encoding, and works with new(er) x264 builds. Additional information: So far, I've offered (and awarded!) two separate bounties on this question since I first posted it over two years ago, and I still haven't found a solution to this problem. What I'm looking for basically is a simple program to allow me to encode x264 videos using the processing power of multiple computers connected over a LAN. Furthermore, it would be nice if it worked with new(er) x264 builds, and supported two-pass encoding. If at any time someone has an updated answer, or a new solution to this problem, please post it and it will be given some consideration.

    Read the article

  • Media Encoder w\ Merge Files & SandyBridge Hardware Encoding Support

    - by GruffTech
    So i have a Z68 chipset that allows Quick Sync encoding on my i7 processor. I want a media encoder that supports both Hardware encoding and allows me to "merge files". My problem is Fraps breaks my recording into 4GB files. I need to stitch these files together & re-encode for Youtube ect, but i want to use the hardware encoding I paid for. I have not figured out how to do this on Handbrake or MediaEsspresso.

    Read the article

  • Grep a strange acirc character

    - by John Hunt
    I have this character appearing in places in some files I have:  (if you can't see it or it looks like a question mark it's the Acirc character (capital A with a circumflex over it)) I simply want to grep replace this char with a space, however when I do this: grep --color -ri  myproject.php Putty gets very confused, as does grep. As I understand it there's probably a way to use an escaped hex code with grep.. does anyone know how? EDIT: The character is showing up on my web page as a weird <?>. The http headers for the page specify utf-8 as does the meta character set and I still see the strange character. In putty it appears as a space (putty also set to utf-8.) When I copy from vim and paste into grep it simply doesn't find it. Cheers, John

    Read the article

  • Determining default character set of platform in Java

    - by Anand
    I am programming in Java I have the code as: byte[] b = test.getBytes(); In the api it is specified that if we do not specify character encoding it takes the default platform character encoding. What is meant by "default platform character encoding" ? Does it mean the Java encoding or the OS encoding ? If it means OS encoding the how can i check the default character encoding of Windows and Linux ? Is there anyway we can get the default character encoding using command line ?

    Read the article

  • PHP & IIS 6 Encoding problem

    - by Alexander
    The server is running Windows 2003 with IIS 6.0.3790.1830 x86 (iis.dll). My database server is Microsoft SQL Server 2000. My PHP version is 5.3. The original application is hosted on appserv1 and it's database is on dbserv1. It's working fine, everything is tuned up, running great. It was needed to place the same application (different modules) on another server, for other uses, so I copied the database on dbserv2, configured appserv2 to host the application, so I achieved 2 almost identical copies. Both dbserv1 and dbserv2 use the same encoding, both appserv1 and appserv2 are on IIS6 with the same PHP configurations. I also tried my best to have the same settings in the IIS. I also made sure that I pass the encoding information both in the HTTP headers and in the meta tags with http-equiv. Both applications use utf-8. The Problem is that the copy of the application doesn't display the non-ASCII characters normally in the browser, even if the browser detects correctly the UTF-8 encoding of the page. First I thought it was a database issue, given the fact that MSSQL 2000 doesn't support UTF-8, and instead it uses UCS-2, but when I redirected the application on appserv2 to work with the database on dbserv1, it had the same encoding problems. This is why I am asking in what way I can make it work. thank you for reading.

    Read the article

  • Ivar definitions show 'long' type encoding as 'long long' type encoding

    - by Frank C.
    I've found what I think may be a bug with Ivar and Objective-C runtime. I'm using XCode 3.2.1 and associated libraries, developing a 64 bit app on X86_64 (MacBook Pro). Where I would expect the type encoding for the following "longVal" to be 'l', the Ivar encoding is showing a 'q' (which is a 'long long'). Anyone else seeing this? Simplified code and output follows: Code: #import <Foundation/Foundation.h> #import <objc/runtime.h> @interface Bug : NSObject { long longVal; long long longerVal; } @property (nonatomic,assign) long longVal; @property (nonatomic,assign) long long longerVal; @end @implementation Bug @synthesize longVal,longerVal; @end int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; unsigned int ivarCount=0; Ivar *ivars= class_copyIvarList([Bug class], &ivarCount); for(unsigned int x=0;x<ivarCount;x++) { NSLog(@"Name [%@] encoding [%@]", [NSString stringWithCString:ivar_getName(ivars[x]) encoding:NSUTF8StringEncoding], [NSString stringWithCString:ivar_getTypeEncoding(ivars[x]) encoding:NSUTF8StringEncoding]); } [pool drain]; return 0; } And here is output from debug console: This GDB was configured as "x86_64-apple-darwin".tty /dev/ttys000 Loading program into debugger… sharedlibrary apply-load-rules all Program loaded. run [Switching to process 6048] Running… 2010-03-17 22:16:29.138 ivarbug[6048:a0f] Name [longVal] encoding [q] 2010-03-17 22:16:29.146 ivarbug[6048:a0f] Name [longerVal] encoding [q] (gdb) continue Not a pretty picture! -- Frank

    Read the article

  • file-name encoding problems

    - by tenhouse
    I googled over this topic but couldn't find what I was looking for... the following "happend" to me: I had my files stored on a NTFS-USB Harddisk, because of space problems I moved them to an ext3 system....somehow the filename (content is still ok as far as I saw) encoding screwed up....my files look like the following now: Kküken <--- should have an "ü" Jäger <--- should be an "ä" Zwölf <--- should be an "ö" fünfte <-- should be an "ü" etc .... These are just examples, but already give me my first question Why has the "ü" two different representations? (Maybe I screw up, before I screw up and now I have a mixing of x different encoding-layers? :) ) I tried the following command: convmv -r -f UTF-8 -t ISO-8859-1 * This command work for some files (for example Zwölf) but not for all: iso-8859-1 doesn't cover all needed characters for: "fünfte" So Iguess it must be another encoding - but which? How can I find out this? And is there any way that I can still fix all of this?

    Read the article

  • How to auto detect text file encoding?

    - by ???
    There are many plain text files which were encoded in variant charsets. I want to convert them all to UTF-8, but before running iconv, I need to know its original encoding. Most browsers have an Auto Detect option in encodings, however, I can't check those text files one by one because there are too many. Only having known the original encoding, I then can convert the texts by iconv -f DETECTED_CHARSET -t utf-8. Is there any utility to detect the encoding of plain text files? It doesn't have to be a 100% perfect correct, but it should recognize most of them.

    Read the article

  • Ripping Blu-Ray for Xbox 360 with Minimal Encoding

    - by Adam Haile
    What's the best way to rip a Blu-ray disc to an Xbox 360 compatible format, while preferably maintaining surround sound and as little video encoding as possible? As far as I can tell, the 360 technically supports both AVC and VC-1 (though if at those bit rates is questionable), so I'm kind of hoping that you could do it without actually re-encoding the video at all and, instead, just processing the audio and the re-muxing everything together in a new file.

    Read the article

  • How to set the mechanize page encoding?

    - by Juan Medín
    Hi, I'm trying to get a page with an ISO-8859-1 encoding clicking on a link, so the code is similar to this: page_result = page.link_with( :text => 'link_text' ).click So far I get the result with a wrong encoding, so I see characters like: 'T?tulo:' instead of 'Título:' I've tried several approaches, including: Stating the encoding in the first request using the agent like: @page_search = @agent.get( :url => 'http://www.server.com', :headers => { 'Accept-Charset' => 'ISO-8859-1' } ) Stating the encoding for the page itself page_result.encoding = 'ISO-8859-1' But I must be doing something wrong: a simple puts always show the wrong characters. Do you know how to state the encoding? Thanks in advance, Added: Executable example: require 'rubygems' require 'mechanize' WWW::Mechanize::Util::CODE_DIC[:SJIS] = "ISO-8859-1" @agent = WWW::Mechanize.new @page = @agent.get( :url => 'http://www.mcu.es/webISBN/tituloSimpleFilter.do?cache=init&layout=busquedaisbn&language=es', :headers => { 'Accept-Charset' => 'utf-8' } ) puts @page.body

    Read the article

  • Encoding over SSH Issues

    - by user1104160
    I have a Linux machine and a Windows machine, both using Vim with the Powerline plugin. They both work great with patched fonts. Next, I want to SSH onto an OSX 10.6 machine and also use the Powerline in the terminal with Vim. However, I get weird symbols with normal mode ("^^B" in one area) and fancy mode ("~@" and "~B" spread throughout the bar. I thought this mixup was an encoding issue, but when I look at Putty's encoding it is using UTF-8 and the same with the Ubuntu terminal. Additionally, on the OSX machine, "locale" returns "en_US.UTF-8" for all variables (I set it to do that in order to troubleshoot). However, the symbols are still showing. I am using a patched font (Inconsolata, the same one as the Ubuntu terminal) for the OSX terminal, so I am stumped. Is there a missing component to this equation? Are there additional problems that can arise from SSH encoding? On the OSX end, additionally, these same symbols appear, so it may not even be related to SSH and therefore I'm totally lost.

    Read the article

  • Does FFMpeg support gpu acceleration of media encoding/decoding?

    - by Jason123
    I was wondering if ffmpeg supported gpu acceleration. I was reading on their websites and came across contradicting information. http://www.ffmpeg.org/general.html#Video-Codecs -H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration) http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide -Will a graphics card make x264 encode faster? No. libx264 doesn't use them (at least not yet). There are some proprietary encoders that utilize the GPU, but that does not mean they are well optimized, though encoding time may be faster; and they might be worse than x264 anyway, and possibly slower. Regardless, FFmpeg today doesn't support any means of gpu encoding, outside of libx264. If not, is there any way to add gpu acceleration to h.264 encoding/decoding?

    Read the article

  • sql and web encoding problem

    - by Marki
    Guys, I've got an encoding problem I believe. I have upgraded from phpBB2 to phpBB3. The old databases were in latin1, the new ones have utf8 encoding. Already during the upgrade process some rows of the DB were only read partly into the new version, because of strange characters as it turned out. When I use PHP's mb_convert_encoding() function to convert those strings to UTF8 they end up e.g. as 0x0093, i.e. they must have been some kind of double quotes. Even after doing this conversion, they still show up as 0x0093 in the browser (the squares with 0093 in them when the browser does not know what to display). Can someone explain the problem here? I'm a little confused and afraid I don't see all the dependencies that need to work to have the correct encodings and the correct display thereof...

    Read the article

  • Video encoding is very slow on Amazon EC2 instance

    - by Timka
    We are using Amazon EC2 m1.xlarge instance for video re-encoding and it looks like the actual encoding process takes a very long time. For an average 250mb video file it takes about an hour to encode. Intance: m1.xlarge (Xeon E5645 x 15gb ram) Windows Server 2008 R2 64-bit AviSynth version 2.5 (32bit) + ffms2 plugin (FFmpegSource 1.21) FFmpeg SVN-r13712 libavutil 3213056 libavcodec 3356930 libavformat 3411456 libavdevice 3407872 Number of parallel jobs is 3 Average CPU utilization ~96% Update#1 Source video: mp4/h.264 Parameters for ffmpeg: --enable-memalign-hack --enable-avisynth --enable-libxvid --enable-libx264 + --enable-libgsm --enable-libfaac --enable-libfaad --enable-liba52 + --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-pthreads + --enable-swscale --enable-gpl Video files encoded to mp4/h.264 with the following extra command line options: -threads 0 -coder 0 -bf 0 -refs 1 -level 30 -maxrate 10000000 -bufsize 10000000

    Read the article

  • c# HTTPListener encoding issue

    - by Rob Griffin
    I have a Java application sending HTTP requests to a C# application. The C# app uses HTTPListener to listen for requests and respond. On the Java side I'm encoding the URL using UTF-8. When I send a \ character it gets encoded as %5C as expected but on the C# side it becomes a / character. The encoding for the request object is Windows-1252 which I think may be causing the problem. How do I set the default encoding to UTF-8? Currently I'm doing this to convert the encoding: foreach (string key in request.QueryString.Keys) { if (key != null) { byte[] sourceBytes =request.ContentEncoding.GetBytes(request.QueryString[key]); string value = Encoding.UTF8.GetString(sourceBytes)); } } This handles the non ASCII characters I'm also sending but doesn't fix the slash problem. Examining request.QueryString[key] in the debugger shows that the / is already there.

    Read the article

  • International JRE6 or JDK6 or reading a file in "cp037" encoding scheme

    - by Reddy
    I have been trying to read a file in "cp037" encoding scheme using JAVA. I able to read a file in basic encoding schemes like UTF-8, UTF16 etc...After a bit of research on the internet i came to know that we need charset.jar or international version of JRE be installed to support extended encoding schemes. Can anyone send me a link for international version of JRE6 or JDK6. or is there any better way that i could read a file in cp037 encoding scheme. P.S: cp037 is a character encoding scheme supported by IBM Mainframes. All i need is to display a file in windows, which is being generated on IBM Mainframes machine, using a java program. Thanks in advance for your help... :-)

    Read the article

  • What encoding to use for exporting to CSV?

    - by Michael Borgwardt
    I'm developing a java app that exports data to CSV files, intended to be opened in Excel by end users. We just noticed that the export function uses Java's platform default encoding. This causes umlaut characters to be lost and unit test to fail on the build server (which is configured to have US-ASCII as its platform default encoding exactly to catch such potential problems). The question is: which would be the best encoding to use? How does Excel determine what encoding to use? Does it use something platform-specific that presumably matches Java's platform default? I'm currently leaning towards hardcoding Cp1252 - that should cover the target machines (the deployment environment is actually specified) and would fix the test problem. From googling around, Excel does not seem to handle UTF-8 well, so that's out, and sticking to the platform default encoding would require some sort of workaround hack for the tests.

    Read the article

  • ADSL throughput loss from Reed-Solomon encoding

    - by javano
    I'm reading about ADSL starting here and I am confused by how the Reed-Solomon encoding for ECC is limiting the available transfer rate, as much as it does (nearly half). This pdf on the same subject contains the following; A maximum of 255 sub-carriers can be used to modulate data in the downstream direction. Sub-carrier 256, the downstream Nyquist frequency, and sub-carrier 64, the downstream pilot frequency, are not available for user data, thus limiting the total number of available downstream sub-carriers to 254. Each of these 254 sub-carriers can support the modulation of 0 to 15 bits. Since the ADSL DMT data frame rate is 4000 frames per second, the maximum theoretical downstream data rate of an ADSL system is 15.24Mbps. Due to limitations in system architecture, specifically the maximum allowable Reed-Solomon codeword size (255 bytes), the maximum achievable downstream data rate is 8.16Mbps. How is this nearly halving the throughput? Is all that extra bandwidth overhead of the RS encoding? 15240000 bps (15.24Mbps) - 8160000 bps (8.12Mbps) = 7080000 bps (7.08Mbps). Where has that 7Mbps of throughput gone? EDIT: I tried to read the wiki page on Reed-Soloman but it's all crazy maths and algerbra, which I don't understand. I can understand that data is split into 255 byte codewords, because that maybe the max codeword size whilst still maintaining accuracy during transmission; But I don't understand why that means less data is sent?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >