Search Results

Search found 59230 results on 2370 pages for 'character set'.

Page 11/2370 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Oracle SqlPlus Command Line: There's a way to concatenate set options?

    - by Lex
    Heya, I need to set up some SET options in Oracle SQLplus command line program each time I use it, such as SET HEADING OFF and the likes to beautify my results. I found that I always have to input each line separately so Set different options and this is becoming annoying since I need to access it many times a day. I found that there's no way to separate different SET commands with semicolumns because it doesn't accept it: SET HEADING OFF; SET LINESIZE 100; returns an error A solution could be adding them to a control script and create a shell alias, but I know control scripts execute and then exit and don't return you control over the command line. So, anybody knows another solution? Or am I missing something?

    Read the article

  • Encoding gives "'ascii' codec can't encode character … ordinal not in range(128)"

    - by user140314
    I am working through the Django RSS reader project here. The RSS feed will read something like "OKLAHOMA CITY (AP) — James Harden let". The RSS feed's encoding reads encoding="UTF-8" so I believe I am passing utf-8 to markdown in the code snippet below. The em dash is where it chokes. I get the Django error of "'ascii' codec can't encode character u'\u2014' in position 109: ordinal not in range(128)" which is an UnicodeEncodeError. In the variables being passed I see "OKLAHOMA CITY (AP) \u2014 James Harden". The code line that is not working is: content = content.encode(parsed_feed.encoding, "xmlcharrefreplace") I am using markdown 2.0, django 1.1, and python 2.4. What is the magic sequence of encoding and decoding that I need to do to make this work? Thanks.

    Read the article

  • Java: How to get Unicode name of a character (or its type category)?

    - by java.is.for.desktop
    Hello, everyone! The Character class in Java defines methods which check a given char argument for equality with certain Unicode chars or for belonging to some type category. These chars and type categories are named. As stated in given javadoc, examples for named chars are HORIZONTAL TABULATION, FORM FEED, ...; example for named type categories are SPACE_SEPARATOR, PARAGRAPH_SEPARATOR, ... However, being byte or int values instead of enums, the name of these types are "hidden" at runtime. So, is there a possibility to get characters' and/or type categories' names at runtime?

    Read the article

  • Convert Chinese character .wav song into .mp3 or .wma on English OS

    - by Jack
    I have bunch of Chinese .wav files on my hard disk that I'm trying to convert into .mp3 with Audacity but it appear that Audacity can not read Chinese character songs but the .wav file display correctly on my 32 bits Win7 Ultimate(English) pc. I have to rename these Chinese character songs into English file name in order to convert them. Does anyone know if there is any software (prefer open source) that will take Chinese character file name(.wav) and convert it into .mp3 without renaming the file?

    Read the article

  • How to remove installation like SET ,metasploit

    - by Renado
    i have installed into me laptop dual boot windows 7 and ubuntu 13.04 and i have install into ubuntu SET form www.trustedsec.com .it create direcotry set but when i try to start set it dosent start .when i type ./set it get error or ./set is a direcory can you give me a solution how to install it step by step or how to remove set for my pc. a second problem is when i install aircrack-ng when i type airmon-ng on terminal my desktop go crazy and i must restart manyally form my power button. Thanks

    Read the article

  • Optimizing a "set in a string list" to a "set as a matrix" operation

    - by Eric Fournier
    I have a set of strings which contain space-separated elements. I want to build a matrix which will tell me which elements were part of which strings. For example: "" "A B C" "D" "B D" Should give something like: A B C D 1 2 1 1 1 3 1 4 1 1 Now I've got a solution, but it runs slow as molasse, and I've run out of ideas on how to make it faster: reverseIn <- function(vector, value) { return(value %in% vector) } buildCategoryMatrix <- function(valueVector) { allClasses <- c() for(classVec in unique(valueVector)) { allClasses <- unique(c(allClasses, strsplit(classVec, " ", fixed=TRUE)[[1]])) } resMatrix <- matrix(ncol=0, nrow=length(valueVector)) splitValues <- strsplit(valueVector, " ", fixed=TRUE) for(cat in allClasses) { if(cat=="") { catIsPart <- (valueVector == "") } else { catIsPart <- sapply(splitValues, reverseIn, cat) } resMatrix <- cbind(resMatrix, catIsPart) } colnames(resMatrix) <- allClasses return(resMatrix) } Profiling the function gives me this: $by.self self.time self.pct total.time total.pct "match" 31.20 34.74 31.24 34.79 "FUN" 30.26 33.70 74.30 82.74 "lapply" 13.56 15.10 87.86 97.84 "%in%" 12.92 14.39 44.10 49.11 So my actual questions would be: - Where are the 33% spent in "FUN" coming from? - Would there be any way to speed up the %in% call? I tried turning the strings into factors prior to going into the loop so that I'd be matching numbers instead of strings, but that actually makes R crash. I've also tried going for partial matrix assignment (IE, resMatrix[i,x] <- 1) where i is the number of the string and x is the vector of factors. No dice there either, as it seems to keep on running infinitely.

    Read the article

  • Overlay 2d weapon sprite over character sprite ?

    - by Mr.Gando
    Hello, I'm working on a game where my character needs to be able to have different weapons. For that I think that somehow overlaying the weapon over the moving sprite would be the correct choice, but I'm not sure about how could I do this. Assuming my Character spritesheet looks like this: And my preliminar weapon spritesheet ( haven't decided on a fixed square size for the weapon yet ), looks like this: How would you make the overlay to set the weapon correctly over the character hand for each of his frames? I know that one way would be just to have a weapon frame the same size as my character sprites, and overlay those too, but I think that if the game has way too much weapons (say 15 different kinds of one hand weaps) this could get pretty insane ( having one weapon sprite sheet the same size as the character sprite sheet for each type of weapon ) Do you guys have any advice on how to implement this? (supporting overlaying the weapon sprites over the character sprites) Thanks!

    Read the article

  • How to detect the character encoding of a text file?

    - by Cédric Boivin
    I try to detect which character encoding is used in my file. I try with this code to get the standard encoding public static Encoding GetFileEncoding(string srcFile) { // *** Use Default of Encoding.Default (Ansi CodePage) Encoding enc = Encoding.Default; // *** Detect byte order mark if any - otherwise assume default byte[] buffer = new byte[5]; FileStream file = new FileStream(srcFile, FileMode.Open); file.Read(buffer, 0, 5); file.Close(); if (buffer[0] == 0xef && buffer[1] == 0xbb && buffer[2] == 0xbf) enc = Encoding.UTF8; else if (buffer[0] == 0xfe && buffer[1] == 0xff) enc = Encoding.Unicode; else if (buffer[0] == 0 && buffer[1] == 0 && buffer[2] == 0xfe && buffer[3] == 0xff) enc = Encoding.UTF32; else if (buffer[0] == 0x2b && buffer[1] == 0x2f && buffer[2] == 0x76) enc = Encoding.UTF7; else if (buffer[0] == 0xFE && buffer[1] == 0xFF) // 1201 unicodeFFFE Unicode (Big-Endian) enc = Encoding.GetEncoding(1201); else if (buffer[0] == 0xFF && buffer[1] == 0xFE) // 1200 utf-16 Unicode enc = Encoding.GetEncoding(1200); return enc; } My five first byte are 60, 118, 56, 46 and 49. Is there a chart that shows which encoding matches those five first bytes?

    Read the article

  • Perl numerical sorting: how to ignore leading alpha character [migrated]

    - by Luke Sheppard
    I have a 1,660 row array like this: ... H00504 H00085 H00181 H00500 H00103 H00007 H00890 H08793 H94316 H00217 ... And the leading character never changes. It is always "H" then five digits. But when I do what I believe is a numerical sort in Perl, I'm getting strange results. Some segments are sorted in order, but then a different segment starts up. Here is a segment after sorting: ... H01578 H01579 H01580 H01581 H01582 H01583 H01584 H00536 H00537 H00538 H01585 H01586 H01587 H01588 H01589 H01590 ... What I'm trying is this: my @sorted_array = sort {$a <=> $b} @raw_array; But obviously it is not working. Anyone know why?

    Read the article

  • How to store character moves (sprite animations)?

    - by Saad
    So I'm thinking about making a small rpg, mainly to test out different design patterns I've been learning about. But the one question that I'm not too sure on how to approach is how to store an array of character moves in the best way possible. So let's say I have arrays of different sprites. This is how I'm thinking about implementing it: array attack = new array (10); array attack2 = new array(5); (loop) //blit some image attack.push(imageInstance); (end loop) Now every time I want the animation I call on attack or attack2; is there a better structure? The problem with this is let's say there are 100 different attacks, and a player can have up to 10 attacks equipped. So how do I tell which attack the user has; should I use a hash map?

    Read the article

  • How to design a character animation system?

    - by Andrea Benedetti
    I'm searching for suggestions and resources on the possible ways to design a character animation system. I mean a system built on top of the graphics engine (as graphics engine I use Ogre3D, that provide an animation layer), and in strict contact with the logic of the game. It's for a sports title, so the question is not easy. Edit: What I'm searching for are suggestions and resources about the action state mechines (or animation state machines), that is build on top of the animation pipeline already provided by the graphics engine. So, a state-driver animation interface for use by virtually all higher-level game code.

    Read the article

  • Maya Animated Character export for XNA 4.0 problem

    - by FahidK
    To begin with, I'm trying to export an animated character in .fbx format from Maya 2013 to XNA 4.0 In Maya, The Model has a basic rig and the animations are in clips made in the Trax editor. so the issue i'm having is after selecting the model and the root joint and then hitting export in .fbx format, for some reason when i open the exported .fbx file the joint system is detached from the model with no animation. Btw, i have the animations in clips so that they can be called in code, for example "run","walk","attack". So, what can i do to solve this problem? Thank you.

    Read the article

  • Unity3D Android - Move your character to a specific x position

    - by user3666251
    Im making a new game for android and I wanted to move my character (which is a cube for now) to a specific x location (on top of a flying floor/ground thingy) but I've been having some troubles with it.I've been using this script : var jumpSpeed: float = 3.5; var distToGround: float; function Start(){ // get the distance to ground distToGround = collider.bounds.extents.y; } function IsGrounded(): boolean { return Physics.Raycast(transform.position, -Vector3.up, distToGround + 0.1); } function Update () { // Move the object to the right relative to the camera 1 unit/second. transform.Translate(Vector3.forward * Time.deltaTime); if (Input.anyKeyDown && IsGrounded()){ rigidbody.velocity.x = jumpSpeed; } } And this is the result (which is not what I want) : https://www.youtube.com/watch?v=Fj8B6eI4dbE&feature=youtu.be Anyone has any idea how to do this ? Im new in unity and scripting.Im using java btw. Ty.

    Read the article

  • Character with several colliders and rigidbodies

    - by Lautaro
    I am doing a PvP fighting game. This is the GameObject hierarchy of the player character. Player contains: Legs Sword Torso Head I want to be able to Register impacts of the sword on a specific body part Use AddForce on the whole player entity when a body part is struck Change the animation of the player that owns the sword that hit Questions Is it correct that the only rigidbody should be on the root Player GameObject ? Is it correct that The body parts should have colliders and be triggers ? Is it correct that The swords should have colliders but not be trigger ?

    Read the article

  • how to use string::find to look for a word rather each character seperately

    - by RubyKing
    Hello how would I look through a string for a word rather then each character in that word. I have my code here and it always seems to find everything that is .obj even if its o or b or j or "." is there anyway to get passed this here is my code? I checked the docuementation here link but nothing returned any results I craved so hard string &str = *it; if(it->find(".obj")) { cout << "Found .Obj" << endl; } I also tried to use string::compare but that failed :(

    Read the article

  • categorize a set of phrases into a set of similar phrases

    - by Dingo
    I have a few apps that generate textual tracing information (logs) to log files. The tracing information is the typical printf() style - i.e. there are a lot of log entries that are similar (same format argument to printf), but differ where the format string had parameters. What would be an algorithm (url, books, articles, ...) that will allow me to analyze the log entries and categorize them into several bins/containers, where each bin has one associated format? Essentially, what I would like is to transform the raw log entries into (formatA, arg0 ... argN) instances, where formatA is shared among many log entries. The formatA does not have to be the exact format used to generate the entry (even more so if this makes the algo simpler). Most of the literature and web-info I found deals with exact matching, a max substring matching, or a k-difference (with k known/fixed ahead of time). Also, it focuses on matching a pair of (long) strings, or a single bin output (one match among all input). My case is somewhat different, since I have to discover what represents a (good-enough) match (generally a sequence of discontinuous strings), and then categorize each input entries to one of the discovered matches. Lastly, I'm not looking for a perfect algorithm, but something simple/easy to maintain. Thanks!

    Read the article

  • Error in Postgres execute

    - by RAJA
    I'm using this function... -- Function: dbo.sp_acc_createaccount(character varying, integer, integer, character varying, character varying, character varying, character varying) -- DROP FUNCTION dbo.sp_acc_createaccount(character varying, integer, integer, character varying, character varying, character varying, character varying); CREATE OR REPLACE FUNCTION dbo.sp_acc_createaccount(IN in_orgmgrtype character varying, INOUT in_parentid integer, IN in_levelid integer, IN in_name character varying, IN in_phone character varying, IN in_webpage character varying, IN in_owner character varying, OUT out_accountid integer) RETURNS record AS $BODY$ DECLARE l_CoID int; l_CurrID int; l_OrgMgrId int; errmsg varchar(250); BEGIN IF in_ParentID = -1 THEN errmsg := 'execute sp_Acc_GetCompanyIDForUser failed'; l_CoID := dbo.sp_Acc_GetCompanyIDForUser(in_user); IF l_CoID = -2 THEN RAISE EXCEPTION 'execute sp_Acc_GetCompanyIDForUser failed'; END IF; errmsg := 'execute sp_Acc_GetOrgMgrIDForCompany failed'; l_OrgMgrID := dbo.sp_Acc_GetOrgMgrIDForCompany(in_OrgMgrType, l_CoID); IF l_OrgMgrID = -2 THEN RAISE EXCEPTION 'execute sp_Acc_GetOrgMgrIDForCompany failed'; END IF; in_ParentID := l_OrgMgrID; ELSE errmsg := 'Select orgmgrid failed'; SELECT OrgMgrID INTO l_CurrID FROM dbo.OrgMgr WHERE Name = in_Name AND ParentID = in_ParentID; END IF; -- if not, add it IF l_CurrID IS NULL THEN errmsg := 'Insert into orgmgr(account creation) failed'; INSERT INTO dbo.OrgMgr (ParentID, LevelID, Name, PrimaryPhone, WebPage, Owner) VALUES (in_ParentID, in_LevelID, in_Name, in_Phone, in_WebPage, in_Owner); out_AccountID := currval('dbo.OrgMgr_accountid_seq'); ELSE out_AccountID := -1; END IF; COMMIT; EXCEPTION WHEN RAISE_EXCEPTION THEN out_AccountID := 99; RAISE NOTICE 'ERROR : %',errmsg; WHEN OTHERS THEN out_AccountID := 99; RAISE EXCEPTION 'ERROR : %',errmsg; END $BODY$ LANGUAGE 'plpgsql' VOLATILE COST 100; ALTER FUNCTION dbo.sp_acc_createaccount(character varying, integer, integer, character varying, character varying, character varying, character varying) OWNER TO postgres; But.. it's showing error in execute time .. ERROR: SPI_execute_plan failed executing query "ROLLBACK": SPI_ERROR_TRANSACTION

    Read the article

  • Can the get of a property be abstract and the set be virtual?

    - by K. Georgiev
    I have a base class like this: public class Trajectory{ public int Count { get; set; } public double Initial { get; set { Count = 1; } } public double Current { get; set { Count ++ ; } } } So, I have code in the base class, which makes the set-s virtual, but the get-s must stay abstract. So I need something like this: ... public double Initial { abstract get; virtual set { Count = 1; } } ... But this code gives an error. The whole point is to implement the counter functionality in the base class instead in all the derived classes. So, how can I make the get and set of a property with different modifiers?

    Read the article

  • How do browsers/PHP handle characters outside the set characterset?

    - by Maarten
    I'm looking into how characters are handled that are outside of the set characterset for a page. In this case the page is set to iso-8859-1, and the previous programmer decided to escape input using htmlentities($string,ENT_COMPAT). This is then stored into Latin1 tables in Mysql. As the table is set to the same character set as the page, I am wondering if that htmlentities step is needed. I did some experiments on http://floris.workingweb.nl/experiments/characters.php and it seems that for stuff inside Latin1 some characters are escaped, but for example with a Czech name they are not. Is this because those characters are outside of Latin1? If so, then the htmlentities can be removed, as it doesn't help for stuff outside of Latin1 anyway, and for within Latin1 it is not needed as far as I can see now...

    Read the article

  • JQuery going through a set of UL and dynamically set ids incremently on each one

    - by Calibre2010
    I have an unordered list which contains serveral items called 'oListItems' the UL has a class but no id. The class OuteroListItems contains many of oListitems oList.AppendFormat("<ul class='OuteroListItems'>"); oList.AppendFormat("<li>"); oList.AppendFormat("<ul class='oListItems'>"); oList.AppendFormat("<li>" + s.sName + "</li>"); oList.AppendFormat("<li>" + s.eName + "</li>"); oList.AppendFormat("<li>" + s.SDate + "</li>"); oList.AppendFormat("<li>" + s.EDate + "</li>"); oList.AppendFormat("</ul>"); oList.AppendFormat("</li>"); oList.AppendFormat("</ul>"); I want for each .oListItem class that gets retrieved, add dynamically an id to it. var o = $(".oListItem"); $.each(o, function (){ var f = $(this).attr("id", 'listItem' + i); i++; }); wasent sure on the approach, this is what I have so far?

    Read the article

  • SQL SERVER – A Brief Note on SET TEXTSIZE

    - by pinaldave
    Here is a small conversation I received. I thought though an old topic, indeed a thought provoking for the moment. Question: Is there any difference between LEFT function and SET TEXTSIZE? I really like this small but interesting question. The question does not specify the difference between usage or performance. Anyway we will quickly take a look at how TEXTSIZE works. You can run the following script to see how LEFT and SET TEXTSIZE works. USE TempDB GO -- Create TestTable CREATE TABLE MyTable (ID INT, MyText VARCHAR(MAX)) GO INSERT MyTable (ID, MyText) VALUES(1, REPLICATE('1234567890', 100)) GO -- Select Data SELECT ID, MyText FROM MyTable GO -- Using Left SELECT ID, LEFT(MyText, 10) MyText FROM MyTable GO -- Set TextSize SET TEXTSIZE 10; SELECT ID, MyText FROM MyTable; SET TEXTSIZE 2147483647 GO -- Clean up DROP TABLE MyTable GO Now let us see the usage result which we receive from both of the example. If you are going to ask what you should do – I really do not know. I can tell you where I will use either of the same. LEFT seems to be easy to use but again if you like to do extra work related to SET TEXTSIZE go for it. Here is how I will use SET TEXTSIZE. If I am selecting data from in my SSMS for testing or any other non production related work from a large table which has lots of columns with varchar data, I will consider using this statement to reduce the amount of the data which is retrieved in the result set. In simple word, for testing purpose I will use it. On the production server, there should be a specific reason to use the same. Here is my candid opinion – I do not think they can be directly comparable even though both of them give the exact same result. LEFT is applicable only on the column of a single SELECT statement. where it is used but it SET TEXTSIZE applies to all the columns in the SELECT and follow up SELECT statements till the SET TEXTSIZE is not modified again in the session. Uncomparable! I hope this sample example gives you idea how to use SET TEXTSIZE in your daily use. I would like to know your opinion about how and when do you use this feature. Please leave a comment. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >