Search Results

Search found 1588 results on 64 pages for 'letter'.

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

  • Displaying text letter by letter

    - by Evi
    I am planing to Write a Text adventure and I don't know how to make the text draw letter by letter in any other way than changing the variable from h to he to hel to hell to hello That would be a terrible amount of work since there are tons of dialogue. Here is the source code so far { /// <summary> /// This is the main type for your game /// </summary> public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; Texture2D sampleBG; Texture2D TextBG; SpriteFont defaultfont; KeyboardState keyboardstate; public bool spacepress = false; public bool mspress = false; public int textheight = 425; public int rowspace = 40; public string namebox = "(null)"; public string Row1 = "(null)"; public string Row2 = "(null)"; public string Row3 = "(null)"; public string Row4 = "(null)"; public int Dialogue = 0; public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; graphics.PreferredBackBufferHeight = 600; graphics.PreferredBackBufferWidth = 800; IsMouseVisible = true; } /// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here base.Initialize(); } /// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // TODO: use this.Content to load your game content here sampleBG = Content.Load <Texture2D>("SampleBG"); defaultfont = Content.Load<SpriteFont>("SpriteFont1"); TextBG = Content.Load<Texture2D>("textbg"); } /// <summary> /// UnloadContent will be called once per game and is the place to unload /// all content. /// </summary> protected override void UnloadContent() { // TODO: Unload any non ContentManager content here } /// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { KeyboardState keyboardstate = Keyboard.GetState(); MouseState mousestate = Mouse.GetState(); // Changes Dialgue by pressing Left Mouse Button or Space #region Dialogue changer if (mousestate.LeftButton == ButtonState.Pressed && mspress == false) { mspress = true; Dialogue = Dialogue + 1; } if (mousestate.LeftButton == ButtonState.Released && mspress == true) { mspress = false; } if (keyboardstate.IsKeyDown(Keys.Space) && spacepress == false) { spacepress = true; Dialogue = Dialogue + 1; } if (keyboardstate.IsKeyUp(Keys.Space) && spacepress == true) { spacepress = false; } #endregion // ------------------------------------------------------ // Dialgue Content #region Dialgue if (Dialogue == 1) { Row1 = "Input Text 1 Here."; Row2 = "Input Text 2 Here."; Row3 = "Input Text 3 Here."; Row4 = "Input Text 4 Here."; } if (Dialogue == 2) { Row1 = "Text 1"; Row2 = "Text 2"; Row3 = "Text 3"; Row4 = "Text 4"; } #endregion // ------------------------------------------------------ base.Update(gameTime); } /// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); // TODO: Add your drawing code here spriteBatch.Begin(); spriteBatch.Draw(sampleBG, new Rectangle(0, 0, 800, 600), Color.White); spriteBatch.Draw(TextBG, new Rectangle(0, 400, 800, 200), Color.White); spriteBatch.DrawString(defaultfont, Row1, new Vector2(10, (textheight + (rowspace * 0))), Color.Black); spriteBatch.DrawString(defaultfont, Row2, new Vector2(10, (textheight + (rowspace * 1))), Color.Black); spriteBatch.DrawString(defaultfont, Row3, new Vector2(10, (textheight + (rowspace * 2))), Color.Black); spriteBatch.DrawString(defaultfont, Row4, new Vector2(10, (textheight + (rowspace * 3))), Color.Black); spriteBatch.End(); base.Draw(gameTime); } } }

    Read the article

  • System Reserved Partition has Drive Letter After Applying a WIM Image with ImageX

    - by user1291332
    I have installed Windows Vista on a computer using ImageX from WinPE. I followed the instructions here for partitioning the hard drive, creating a 300 MB system partition and using the rest of the drive for a Windows partition. The install has worked perfectly apart from the fact that the system partition has been assigned the drive letter C: and the Windows has been assigned the drive letter D:. I would like the system drive to have no letter and the Windows partition to have the drive letter C:. I think I have managed to figure out why it is doing this. See my answer below. Can anyone confirm this?

    Read the article

  • SSH to drive letter in Windows 2003

    - by JohnnyG76
    I have a Windows 2003 server running a SSH server (WRQ Reflection), how would I ssh to it and specify a specific drive letter? (like the D: drive) ex: from another workstation: ssh [email protected] d: When I do that it fails and I get this error: "exec request failed on channel 0" If I simply SSH to that same windowsbox without trying to specify a drive letter I get a Windows (CMD.EXE) command prompt shell on the C: drive. I can then run any windows command. Thanks

    Read the article

  • Windows XP mounting USB drive to same letter as previously mapped network drive

    - by GAThrawn
    Why does Windows always mount a USB drive as the next drive letter after the last physical drive, even when that letter is already taken by a mapped drive, and is there any way to improve this behaviour? What happens is I tend to use a few different flash drives on my PC, as well as having both a Blackberry and a personal phone that mount as USB drives when I plug them in to charge. Being on a corporate PC I also have a number of mapped network drives (some set by login script, some set as persistent mappings in my profile). When I first login I'll have drive letters like this: C: - Local Drive D: - DVD Drive G: - Login script mapped drive J: - Login script mapped drive When I plug the Blackberry in it'll mount two drives (one for onboard storage, one for the SD card) as E: and F:. If I then plug in another USB drive it will mount as G:, even though that's already taken by a network mapped drive. This leaves me with the following drives: C: - Local Drive D: - DVD Drive E: - USB drive (Blackberry) F: - USB drive (Blackberry) G: - Login script mapped drive [G: - USB drive - mounted but not visible in Explorer or command prompt] J: - Login script mapped drive I then have to go into Disk Management, find the new USB drive that's mounted to G: and re-assign it to another letter eg Z:, once this is done Auto-Play detects it and throws up its normal dialog, and its browseable in Explorer. While this is OK to do if you only use one or two USB drives and have admin access to your PC with your login account, its a total pain in the proverbial if you regularly use a whole load of different USB devices, and corporate policy means you have one account for your normal login (that only has User access to workstations), but have to use a different account for any privileged action. I realize that one possible reason for this is the difference between hardware which is mounted and assigned drive letters at the systen level, and mapped drives which are done at the user level. For USB devices that are already plugged in before login, then obviously they're mounted before Windows knows what network drives may be mapped. However if you plug the USB devices in after you're fully logged in and have drives mapped then Windows must know which letters are available?

    Read the article

  • Win 7 move ssd from SATA 1 to SATA 0, drive letter from G: to C:

    - by GaryH
    I got a new SSD, plugged it in on my notebook to the available SATA 1 connector and installed Win7 (Ultimate) on it as drive G:. It is working great. Now I would like to move the SSD to the SATA 0 connector and change the drive letter to C:. The existing 500gb HD that has another copy of Win7 (home) on it I will format and connect to the SATA 1 connector as the G: or some other letter drive. Is this possible? Is there software that will go through the registry and "correct" all of the entries for "G:" for everything installed and fix it all up? Or am I better off biting the bullet and setting the hardware where I want it and doing a fresh install of everything? Thanx, G

    Read the article

  • Cannot assign a letter to a FAT32 partition

    - by Toc
    I have an external hard disk where I have created many partitions to use also in Linux. First two partitions are FAT32. The third is a Truecrypt partition. I cannot assign a letter to the second partition. When I go to Manage disk and right-click on the unassigned partition, most of the options are not enabled. What have I to do to see this partition on my XP PC?

    Read the article

  • XP: cannot assign a letter to a FAT32 partition

    - by Toc
    I have an external hard disk, where I have created many partitions to use also in Linux. The first two partitions are FAT32. The third is a Truecrypt Partition. I cannot assign a letter to the second partition. When I go to Manage disk and make right clic on the unassigned partition, most of the items are not enables. See screenshot: http://i42.tinypic.com/ofsh9u.jpg What have I to do to see this partition on my XP pc?

    Read the article

  • Windows XP loses drive letter for existing partition on disk

    - by Kev
    Hi, apologies if this has already been asked - I couldn't spot anything exactly the same. I'm looking for help on the fact that Windows XP has suddenly decided to stop assigning a drive letter to the second partition on my laptop's disk. I haven't added or changed hardware and I keep everything pretty clean in terms of software installed. I've partitioned the disk into a system partition on C: and a user partition on d: but lately, when booting or coming out of hibernation or sometime from stand-by, Windows will lose it's d: mapping. If I notice and remap it from MMC, everything will be perfectly happy and will keep going. Any help on this will be greatly appreciated. Cheers, Kev

    Read the article

  • Windows system drive letter changed after repair install

    - by taffer
    yesterday I did a repair install, because Windows froze on welcome screen after resizing its partition on a dual boot system. corresponding question Everything worked fine so far, but now I am facing another challenge: The Windows drive letter changed from G: to C:, so that most programs, including drivers, firewall and virus scanner do not work anymore. I tried to reinstall the virus scanner, but the uninstaller said, that drive G: is not available. What to do now, to get all programs running again? Is it possible, to rename C: to G: or will that mess up my system?

    Read the article

  • Latex letter: Address right aligned

    - by user304235
    Hi, I am using Latex letter class, and would like the address to be right justified. The default is for it to be in a right aligned block, justified to the left. I am happy to change the letter.cls file, but haven't been able to figure out the right way to do it. I have tried using sclttr2 instead but there are too many variables for me. Thanks!

    Read the article

  • How do I make an external hard drive keep the same drive letter permanently?

    - by andygrunt
    I have a desktop PC (2002 vintage) running Windows XP that I turn on about 2 or 3 times per week. I have a mains powered 250Gb Western Digital hard disk connected to it via USB. I always turn the hard disk on before the PC so it's up and running as the PC boots. When I first connected the external hard disk, the PC assigned it a letter ('i' if it matters) and I've installed software to it, created shortcuts to various files and folders on the disk using that letter. For years everything was fine then I would boot the PC and the hard disk was assigned a different letter. I'd then have to go into 'my computer/manage/disk management' and manually change the letter back to 'i'. If I then rebooted the PC, the hard disk would usually still be 'i' but after the next reboot would be some other random letter and I have to manually change it back to 'i'. This would go on for some time then there'd be periods when the it would always be 'i' then, for no apparent reason (no new devices added, for example), the drive letter would start changing again. At the moment it's in random drive letter mood so I thought I'd ask the following question... How do I assign the external hard disk to be 'i' permanently? Answer: Thanks Molly that seems to have done the trick (after a little fiddling) - slightly disappointed there wasn't a way to do it within Windows without installing something else though. For anyone else trying this, it wasn't completely straightforward so here's what happened with me. I installed USBDLM as per the instructions on its website. I guessed that I had to assign the first USB letter to i so replaced the 'Letter1=' lines to 'Letter=I' in the ini file. To test it, I rebooted the PC only to find it came back up with the display set to 640x480 in 16 colours. After some investigation, I re-installed the display drivers and rebooted and set the display back to its usual setting. The external hard disk now gets set to 'i' but I found I had to re-apply sharing status to it so it was seen from my laptop which is on the same network. The end result of all this is that it now does what I wanted although it does act as though the hard drive has just been plugged in a few seconds after the Windows desktop appears i.e. the little box appears with a progress bar as it searches through the contents of the 'new' hard drive and I eventually get a dialogue box saying 'This disk or device contains more than one type of content. What do you want Windows to do?' and lists options such as play media files, print the pictures or open folder to view the files. This is a tiny pain I wish didn't happen but not exactly a huge price to pay. Other than that - it seems to work fine :) Looks like a spoke too soon... Every time I reboot, I have to re-share the 'i' drive (which I didn't have to do before) so it can be seen by my laptop on the same network. Any ideas how to make that permanent?

    Read the article

  • One letter game problem?

    - by Alex K
    Recently at a job interview I was given the following problem: Write a script capable of running on the command line as python It should take in two words on the command line (or optionally if you'd prefer it can query the user to supply the two words via the console). Given those two words: a. Ensure they are of equal length b. Ensure they are both words present in the dictionary of valid words in the English language that you downloaded. If so compute whether you can reach the second word from the first by a series of steps as follows a. You can change one letter at a time b. Each time you change a letter the resulting word must also exist in the dictionary c. You cannot add or remove letters If the two words are reachable, the script should print out the path which leads as a single, shortest path from one word to the other. You can /usr/share/dict/words for your dictionary of words. My solution consisted of using breadth first search to find a shortest path between two words. But apparently that wasn't good enough to get the job :( Would you guys know what I could have done wrong? Thank you so much. import collections import functools import re def time_func(func): import time def wrapper(*args, **kwargs): start = time.time() res = func(*args, **kwargs) timed = time.time() - start setattr(wrapper, 'time_taken', timed) return res functools.update_wrapper(wrapper, func) return wrapper class OneLetterGame: def __init__(self, dict_path): self.dict_path = dict_path self.words = set() def run(self, start_word, end_word): '''Runs the one letter game with the given start and end words. ''' assert len(start_word) == len(end_word), \ 'Start word and end word must of the same length.' self.read_dict(len(start_word)) path = self.shortest_path(start_word, end_word) if not path: print 'There is no path between %s and %s (took %.2f sec.)' % ( start_word, end_word, find_shortest_path.time_taken) else: print 'The shortest path (found in %.2f sec.) is:\n=> %s' % ( self.shortest_path.time_taken, ' -- '.join(path)) def _bfs(self, start): '''Implementation of breadth first search as a generator. The portion of the graph to explore is given on demand using get_neighboors. Care was taken so that a vertex / node is explored only once. ''' queue = collections.deque([(None, start)]) inqueue = set([start]) while queue: parent, node = queue.popleft() yield parent, node new = set(self.get_neighbours(node)) - inqueue inqueue = inqueue | new queue.extend([(node, child) for child in new]) @time_func def shortest_path(self, start, end): '''Returns the shortest path from start to end using bfs. ''' assert start in self.words, 'Start word not in dictionnary.' assert end in self.words, 'End word not in dictionnary.' paths = {None: []} for parent, child in self._bfs(start): paths[child] = paths[parent] + [child] if child == end: return paths[child] return None def get_neighbours(self, word): '''Gets every word one letter away from the a given word. We do not keep these words in memory because bfs accesses a given vertex only once. ''' neighbours = [] p_word = ['^' + word[0:i] + '\w' + word[i+1:] + '$' for i, w in enumerate(word)] p_word = '|'.join(p_word) for w in self.words: if w != word and re.match(p_word, w, re.I|re.U): neighbours += [w] return neighbours def read_dict(self, size): '''Loads every word of a specific size from the dictionnary into memory. ''' for l in open(self.dict_path): l = l.decode('latin-1').strip().lower() if len(l) == size: self.words.add(l) if __name__ == '__main__': import sys if len(sys.argv) not in [3, 4]: print 'Usage: python one_letter_game.py start_word end_word' else: g = OneLetterGame(dict_path = '/usr/share/dict/words') try: g.run(*sys.argv[1:]) except AssertionError, e: print e

    Read the article

  • EPPlus - .xlsx is locked for editing by 'another user'

    - by AdamTheITMan
    I have searched through every possible answer on SO for a solution, but nothing has worked. I am basically creating an excel file from a database and sending the results to the response stream using EPPlus(OpenXML). The following code gives me an error when trying to open my generated excel sheet "[report].xlsx is locked for editing by 'another user'." It will open fine the first time, but the second time it's locked. Dim columnData As New List(Of Integer) Dim rowHeaders As New List(Of String) Dim letter As String = "B" Dim x As Integer = 0 Dim trendBy = context.Session("TRENDBY").ToString() Dim dateHeaders As New List(Of String) dateHeaders = DirectCast(context.Session("DATEHEADERS"), List(Of String)) Dim DS As New DataSet DS = DirectCast(context.Session("DS"), DataSet) Using excelPackage As New OfficeOpenXml.ExcelPackage Dim excelWorksheet = excelPackage.Workbook.Worksheets.Add("Report") 'Add title to the top With excelWorksheet.Cells("B1") .Value = "Account Totals by " + If(trendBy = "Months", "Month", "Week") .Style.Font.Bold = True End With 'add date headers x = 2 'start with letter B (aka 2) For Each Header As String In dateHeaders With excelWorksheet.Cells(letter + "2") .Value = Header .Style.HorizontalAlignment = OfficeOpenXml.Style.ExcelHorizontalAlignment.Right .AutoFitColumns() End With x = x + 1 letter = Helper.GetColumnIndexToColumnLetter(x) Next 'Adds the descriptive row headings down the left side of excel sheet x = 0 For Each DC As DataColumn In DS.Tables(0).Columns If (x < DS.Tables(0).Columns.Count) Then rowHeaders.Add(DC.ColumnName) End If Next Dim range = excelWorksheet.Cells("A3:A30") range.LoadFromCollection(rowHeaders) 'Add the meat and potatoes of report x = 2 For Each dTable As DataTable In DS.Tables columnData.Clear() For Each DR As DataRow In dTable.Rows For Each item As Object In DR.ItemArray columnData.Add(item) Next Next letter = Helper.GetColumnIndexToColumnLetter(x) excelWorksheet.Cells(letter + "3").LoadFromCollection(columnData) With excelWorksheet.Cells(letter + "3") .Formula = "=SUM(" + letter + "4:" + letter + "6)" .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "7") .Formula = "=SUM(" + letter + "8:" + letter + "11)" .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "12") .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "13") .Formula = "=SUM(" + letter + "14:" + letter + "20)" .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "21") .Formula = "=SUM(" + letter + "22:" + letter + "23)" .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "24") .Formula = "=SUM(" + letter + "25:" + letter + "26)" .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "27") .Formula = "=SUM(" + letter + "28:" + letter + "29)" .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "30") .Formula = "=SUM(" + letter + "3," + letter + "7," + letter + "12," + letter + "13," + letter + "21," + letter + "24," + letter + "27)" .Style.Font.Bold = True .Style.Font.Size = 12 End With x = x + 1 Next range.AutoFitColumns() 'send it to response Using stream As New MemoryStream(excelPackage.GetAsByteArray()) context.Response.Clear() context.Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" context.Response.AddHeader("content-disposition", "attachment; filename=filetest.xlsx") context.Response.OutputStream.Write(stream.ToArray(), 0, stream.ToArray().Length) context.Response.Flush() context.Response.Close() End Using End Using

    Read the article

  • Generate a random letter in Python

    - by Waterfox
    Is there a way to generate random letters in Python (like random.randint but for letters)? The range functionality of random.randint would be nice but having a generator that just outputs a random letter would be better than nothing.

    Read the article

  • Automatically capitalize first letter of first word in a new sentence in LaTeX

    - by Tom Hagen
    I know one of LaTeX's bragging points is that it doesn't have this Microsoftish behavior. Nevertheless, it's sometimes useful. LaTeX already adds an extra space after you type a (non-backslashed) period, so it should be possible to make it automatically capitalize the following letter as well. Is there an obvious way to write a macro that does this, or is there a LaTeX package that does it already?

    Read the article

  • Programatically check whether a drive letter is a shared/network drive

    - by Philip Daubmeier
    Hi SO community! I searched a while but found nothing that helped me. Is there a way to check whether a drive letter stands for a shared drive/network drive or a local disc in python? I guess there is some windows api function that gives me that info, but I cant find it. Perhaps there is even a method already integrated in python? What I am looking for is something with this or similar behaviour: someMagicMethod("C:\") #outputs True 'is a local drive' someMagicMethod("Z:\") #outputs False 'is a shared drive' That would help me as well: someMagicMethod2() #outputs list of shared drive letters Thanks a lot in advance!

    Read the article

  • How to target specific letter/word with jquery?

    - by Gal
    As a mere example, I want to apply the class "fancy" to all occurrences of the sign "&" in the document. The CSS: .fancy { font-style: italic; } So a text that looks like this: Ben & Jerry's would be manipulated by jquery to this: Ben <span class="fancy">&</span> Jerry's Is there a function to target specific words/phrases/letters like this?

    Read the article

  • Java JSpinner Prevent Letter Insertion

    - by asmo
    A JSpinner is used to store a number in my application (with a SpinnerNumberModel). As expected, the spinner doesn't allow invalid characters (letters, symbols, etc.) to be stored. However, those characters do appear in the spinner component when I type them in. As soon as I switch the focus to another component, they disappear. Is there a way to prevent invalid characters from appearing in the spinner?

    Read the article

  • Letter spacing issue with 'overlapping' character

    - by Wesz-T
    I'm having some trouble with a font I found on Google Web Fonts. As you can see in the image posted below, the capital V in 'Versus' overlaps with the 'e' when i'm using Firefox. Though when i'm using Chrome (or IE) it does not overlap and leaves me with an ugly space between the two characters. Is there any way to fix this and make it look like the one in Firefox? Or should I start looking for another font? My HTML: <html> <head> <meta charset="utf-8"> <title>Versus</title> <link rel="stylesheet" type="text/css" href="css/reset.css" /> <link rel="stylesheet" type="text/css" href="css/style.css" /> <link href='http://fonts.googleapis.com/css?family=Marck+Script' rel='stylesheet' type='text/css'> </head> <body> <div> <h1>Versus</h1> </div> </body> My CSS: h1 { font-family: 'Marck Script', cursive; font-size: 100px; color:#444; text-align:center; padding:0 50px; text-shadow: 2px 2px 3px #777; } Thanks in advance!

    Read the article

  • Coolest Twitter Usernames – One Letter @A to @Z Names

    - by Gopinath
    How cool is your Twitter user name? If you think your twitter name is catchy and cool, what do you think about the Twitter usernames that are just one letter? Lucky Tweeple who registered at the inaugural days of Twitter service were able to grab single letter user names. The Atlantic site has compiled details about the twitter user names @a to @z and it’s an interesting read. Catch the details over here at The Atlantic [via im] This article titled,Coolest Twitter Usernames – One Letter @A to @Z Names, was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

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