Daily Archives

Articles indexed Tuesday June 26 2012

Page 8/18 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Unable to boot into 11.10 in normal (get a black screen) OR recovery (get just a flashing cursor, no cli)

    - by user1092284
    Okay, so I had a dual boot of Tango Studio (based on Ubuntu 10.04) and Windows XP. Yesterday I downloaded the .iso for Ubuntu 11.10 and attempted to install from a USB (my BIOS won't normally boot from USB but I had PLOP boot manager on a CD). I booted up Ubuntu from the USB and then from there formatted the partition with Tango on and installed Ubuntu 11.10. On booting up I came into Grub rescue mode. So I booted up from the USB again and used boot-repair to reinstall Grub. After this I would see the normal Grub menu, but on choosing Ubuntu I would come to a black screen. On choosing recovery mode it would begin starting normally with no obvious errors but instead of coming to a cli I would just get a blank screen with a flashing cursor on the top left, not accepting any input. I have since reformatted and reinstalled from a CD rather than USB and had the exact same problem. I used boot-repair again and the result is the same. Output of the most recent boot-repair is at http://paste.ubuntu.com/869805/ I have also tried editing the ubuntu grub entry and replacing quiet with text nomodeset as I saw in an answer to another question. This got me a bit further - I saw the purple ubuntu loading screen but still came to a blank screen after that. Anyway, in most of the other questions in which that is brought up the user is still able to boot into recovery, while I am not. Can anyone help? Thanks in advance, let me know if there's any more info I need to provide! EDIT FOR MORE INFO: I read something saying it's quiet splash that should be replaced with nomodeset. Earlier I had left splash in the line. So i tried it this way and it froze after displaying the following text: fsck from util-linux 2.19.1 mountall: Plymouth command failed mountall: Disconnected from Plymouth /dev/sda5:clean, 139359/1741488 files, 745830/6961125 blocks From a bit of googling it doesn't look like plymouth is essential, but I've checked and I do have the most current versions of mountall and plymouth installed so I don't know why there's a problem EDIT FOR MORE INFO AGAIN: I used dkpg --reconfigure plymouth cause I saw it mentioned in another forum and it still says plymouth command failed on boot

    Read the article

  • Websites or tools similar to Ginwiz (mobile website creator)

    - by t3st
    I have a website which i want to make more mobile friendly(currently its not). While searching about this i found this awesome website Ginwiz; my website can be modified into an mobile friendly site without any additional coding. But i find two disadvantages with this website (free version) 1)We cant add our domain to it with out upgrading (i dont have enough money to pay for it) 2)We can only "Advanced edit" one page Do you know any website which is similar to Ginwiz but can use our domain address instead of theirs (in free version). Do you have any idea about any tools which can be also used to convert my website to mobile website by trimming my current website easily.

    Read the article

  • Should I indicate that the user exists or was deleted on the error page?

    - by animuson
    On an ordinary public website, the user's profile is always publicly visible to all visitors (such as Stack Overflow), where they can limit certain pieces of information via privacy settings or just removing the information. Now the user has decided to delete their account (in my case deactivate) so that their account doesn't technically "exist" anymore. The way my system is set up, when their account is deactivated, their username for any content connected to them just becomes "Anonymous User" as if it were a guest that posted. I feel like this could cause some confusion for other users. I'm also concerned about what kind of error to display when someone attempts to view their profile page. My gut tells me to just display a standard 404 page to hide the fact that they ever existed, but then you also have to consider that, since usernames must be unique, anyone can go to the register page and type in the username to see if it really exists or not. I have a similar problem with another website, which gives users the ability to hide their profiles from the public and only allow registered users to view it. Again it's with the dilemma of what kind of error message to display when an unregistered users attempts to view their profile with invalid permissions. So, would it be acceptable to display basic errors such as "user has been deactivated" or "you must be logged in to view this profile" in order to give other visitors some idea of why the page can't be displayed, or should I attempt to cover the user's privacy a little and just display a standard 404 without indicating in any way that the user might exist? Are there any other issues that I'm not realizing about either route? To go back to the beginning, should I even bother changing the user's name to "Anonymous User" when their account is deactivated? Would it be acceptable to just display a non-linked version of their username in place of the normal linked display name?

    Read the article

  • Any advantage to the script version of Google Adwords' conversion tracking code?

    - by ripper234
    Google Adword has an HTML snippet to track conversions: <script type="text/javascript"> /* <![CDATA[ */ var google_conversion_id = 12345; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "someopaqueid"; var google_conversion_value = 0; /* ]]> */ </script> <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/12345/?label=opaque&amp;guid=ON&amp;script=0"/> </div> </noscript> It is composed of two parts: For clients supporting javascript, an inline script that sets variables, plus loading a reporting script. For other clients, an image tag. As far as I can see, the image tag has some advantages: It works on all browsers. It is asynchronous. It's shorter to have only this version, compared to both this and the js version. Any reason not to drop the <noscript> tag and just use the image conversion snippet directly?

    Read the article

  • How to point one sub-domain to another sub-domain and they can be used interchangeably

    - by Talon
    I'm trying to do this secure.domain2.com -loads content from- secure.domain1.com So if somebody goes to secure.domain2.com it will load the content of secure.domain1.com Note that I don't want a redirect, so if someone goes to secure.domain2.com in the address bar it will still say secure.domain2.com even though it's loading content from secure.domain1.com I've read that it's possible with a CName or something like that, what is the best way to do that?

    Read the article

  • Transform 3D vectors between coordinate systems

    - by Nir Cig
    I've got 6 points in 3D space: A,B,C,D,E,F, that represent 4 vectors. AB is perpendicular to AC and DE is perpendicular to DF. I need to find a transformation matrix M, that transforms AB to DE and AC to DF. In other words: M·AB=DE, M·AC=DF If no scaling was involved, this could be solved with a simple rotation matrix. But since the ratios |AB|/|DE|, |AC|/|DF| might be different, I'm not sure how to proceed.

    Read the article

  • How to utilize miniMax algorrithm in Checkers game

    - by engineer
    I am sorry...as there are too many articles about it.But I can't simple get this. I am confused in the implementation of AI. I have generated all possible moves of computer's type pieces. Now I can't decide the flow. Whether I need to start a loop for the possible moves of each piece and assign score to it.... or something else is to be done. Kindly tell me the proper flow/algorithm for this. Thanks

    Read the article

  • Cocos2D 2.0 - masking a sprite

    - by Desperate Developer
    I have read this tutorial about how to mask sprites using Cocos2D 2.0. http://www.raywenderlich.com/4428/how-to-mask-a-sprite-with-cocos2d-2-0 But the author talks about OpenGL ES textures and vertices as they were common knowledge. My knowledge about OpenGl is zero raised to infinity. All I want is to use a rectangle to mask a sprite to it. How I would do in Photoshop using a rectangle as mask (yes, I want to clip a sprite to the rectangle bounds and no, I do not want to use the ClippingNode solution, that do not works for animation/scaling etc.). So, can you guys translate the klingon language used in this tutorial and tell how a solid rectangle can be used to mask a sprite in Cocos2D? I am desperate, as my username states. I am searching this for a week and have tried several solutions without satisfactory results. Please help me. Thanks!

    Read the article

  • Is it possible to construct a cube with less than 24 vertices

    - by Telanor
    I have a cube-based world like minecraft and I'm wondering if there's a way to construct a cube with less than 24 vertices so I can reduce memory usage. It doesn't seem possible to me for 2 reasons: the normals wouldn't come out right and per-face textures wouldn't work. Is this the case or am I wrong? Maybe there's some fancy new dx11 tech that can help? Edit: Just to clarify, I have 2 requirements: I need surface normals for each cube face in order to do proper lighting and I need a way to address a different indexes in a texture array for each cube face

    Read the article

  • XNA: Networking, what is a good bytes per second sent/received number

    - by SimpleRookie
    I am working with XNA networking, on the XBOX. I was wondering what is a safe number to stay under in the bytes sent and received when it comes to the xbox. Obviously various factors will effect the number, and you want as little packet data as possible to keep things smooth, but what is a good number for that? (Using : networksession.bytespersecondsent and networksession.bytespersecondreceived to measure the number.)

    Read the article

  • Using Copyrighted Images

    - by TMP
    I was thinking about developing a sidescrolling platformer very similar to an old Mario and Luigi game for NES. To start out I was thinking about taking the images from a site like this: http://www.mariouniverse.com/sprites/nes/smb3 Which clearly states a copyright. I was wondering how far I am allowed to take these images. I figure I'm probably allowed to use it for personal development, but what if I publish the game as an exe file and send it to some friends? I figured a definite no-no would be selling the game with the copyrighted images included. A secondary question would be whether or not I would be allowed to modify them slightly and then call them my own.

    Read the article

  • C# creating a simple snake game

    - by Guy David
    I was thinking about creating a snake game with C#, so I ran ideas in my head, and some problems came up. How can I track and output in the correct location the blocks that run after the snake's head? If the snake is built of five blocks, and the user starts going in a circle, how can I print the snake body in the right location? Also, how can I create an action that will run on the background, which will move the snake forward, no matter what the user does? What structure should my code have? (code design structure) This should be a console application, since it's the only framework I am familiar with. I am not looking for finished code, since I want to really understand how it should work.

    Read the article

  • Bitmap to Texture2D problem with colors

    - by xnaNewbie89
    I have a small problem with converting a bitmap to a Texture2D. The resulted image of the conversion has the red channel switched with the blue channel :/ I don't know why, because the pixel formats are the same. If someone can help me I will be very happy :) System.Drawing.Image image = System.Drawing.Bitmap.FromFile(ImageFileLoader.filename); System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(image); Texture2D mapTexture = new Texture2D(Screen.Game.GraphicsDevice, bitmap.Width, bitmap.Height,false,SurfaceFormat.Color); System.Drawing.Imaging.BitmapData data = bitmap.LockBits(new System.Drawing.Rectangle( 0, 0, bitmap.Width, bitmap.Height), System.Drawing.Imaging.ImageLockMode.ReadOnly,System.Drawing.Imaging.PixelFormat.Format32bppArgb); byte[] bytes = new byte[data.Height * data.Width*4]; System.Runtime.InteropServices.Marshal.Copy(data.Scan0, bytes, 0, bytes.Length); mapTexture.SetData<byte>(bytes, 0, data.Height * data.Width * 4); bitmap.UnlockBits(data); bitmap.Dispose(); image.Dispose();

    Read the article

  • android.permission.CALL_PHONE: making single apk for phones and tablets:

    - by Eugene Chumak
    I want my app to be available for both phones and tablets. The only difference between phone and tablet versions is: in "phone" version my app has buttons, which allow to make a phone call to a certain number. What is my problem: to be able to make phone call I need to add a permission to manifest file - <uses-permission android:name="android.permission.CALL_PHONE" /> This permission makes application incompatible with tablets. If I remove the permission, app cant make calls being launched on phone. How to make an app, that supports both phones and tablets and allow to make calls from phones?

    Read the article

  • Raise an event when Property Changed using Reflection

    - by Dante
    I am working in C# and I have an object which I can only access using Reflection (for some personal reasons). So, when I need to set some value to one of its properties I do as below: System.Reflection.PropertyInfo property = this.Parent.GetType().GetProperty("SomeProperty"); object someValue = new object(); // Just for example property.SetValue(this.Parent, someValue, null); And, to get its value I use the method GetValue. My question is: Is there a way to fire an event when the property changes using Reflection? Thank you in advance.

    Read the article

  • proper way to dynamically assign backbone.js view el

    - by kikuchiyo
    I would like to create two ( or more ) view instances, each with different el attributes, and have events bound to them via backbone.js view's events hash ( not through jQuery ). Getting events to trigger when all instantiations have the same el is easy: someView = Backbone.View.extend({ el: '#someDiv', events: { 'click': 'someFunction' }, someFunction: function(){ //Do something here } }); So far, if I assign el in the initialize function, and set events normally as follows, events do not trigger: someView = Backbone.View.extend({ events: { 'click': 'someFunction' }, initialize: function( options ){ this.el = options.el }, someFunction: function(){ //Do something here } }); My first instinct was to have el be a function that returns the string representation of the dom element of interest: someView = Backbone.View.extend({ el: function(){ return '#someDiv-' + this.someNumber }, events: { 'click': 'someFunction' }, initialize: function( options ){ this.someNumber = options.someNumber }, someFunction: function(){ //Do something here } }); However, this triggers someFunction x times if I have x instantiations of someView. Next I tried setting both the el and events attributes in initialize: someView = Backbone.View.extend({ initialize: function( options ){ this.el = options.el this.events = { 'click': 'someFunction' } }, someFunction: function(){ //Do something here } }); but this does not trigger events. At this point I'm pretty much fishing. Does anyone know how instantiate a backbone.js view with an el specific to that instance that has events that only trigger for that instance, and not other instances of the View?

    Read the article

  • C# Check if character exists in encoding

    - by Alvin Wong
    I am writing a program that a part renders a bitmap font in CP437. In a function that renders the text with I want to be able to check whether a char is available in CP437 before the encoding conversion, like: public static void DrawCharacter(this Graphics g, char c) { if (char_exist_in_encoding(Encoding.GetEncoding(437), c) { byte[] src = Encoding.Unicode.GetBytes(c.ToString()); byte[] dest = Encoding.Convert(Encoding.Unicode, Encoding.GetEncoding(437), src); DrawCharacter(g, dest[0]); // Call the void(this Graphics, byte) overload } } Without the check, any characters outside CP437 will result in a '?' (63, 0x3F). I want to hide any invalid characters completely. Is there an implementation of char_exist_in_encoding other than the following stupid approach? public static bool char_exist_in_encoding(Encoding e, char c) { if (c == '?') return true; byte[] src = Encoding.Unicode.GetBytes(c.ToString()); byte[] dest = Encoding.Convert(Encoding.Unicode, Encoding.GetEncoding(437), src); if (dest[0] == 0x3F) return false; return true; } Perhaps not very relevant, but the bitmap is created like this: Bitmap b = new Bitmap(256 * 8, 16); Graphics g = Graphics.FromImage(b); g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit; Font f = new Font("Whatever 8x16 bitmap font", 16, GraphicsUnit.Pixel); for (byte i = 0; i < 255; i++) { byte[] arr = Encoding.Convert(Encoding.GetEncoding(437), Encoding.Unicode, new byte[] { i }); char c = Encoding.Unicode.GetChars(arr)[0]; g.DrawString(c.ToString(), f, Brushes.Black, i * 8 - 3, 0); // Don't know why it needs a 3px offset } b.Save(@"D:\chars.png");

    Read the article

  • I am attempting to pull all years and terms from database except the last term

    - by Jonathan Moriarty
    I have a logic problem: We have a database that has a donations table with name, address, last donation year, and last donation term (Spring and Fall). We want to pull all donors unless they donated in the last term (Spring or Fall). I have been trying to figure out the logic of pulling all years up to the current year while omitting the last term. So for example this year is 2012 and we are in the Spring term (I defined the spring term between 1/1 and 6/30) so I only want to display donors before and including spring 2011 (we will exclude the current term which is spring 12 and the last term which is fall 2011). The problem is I want to pull sprig 2011, fall 2010, spring 2010 etc, but only omit the current term and last term donated.

    Read the article

  • Facebook SSO authorize in safari but not in facebook app

    - by Pedro Calero
    My problem: I has developed an app with Facebook SSO in my iPhone/iPad. It was working OK. But I have changed the certificate of my app (so now it has new app ID). I also have changed the "iOS pack ID" property in Facebook: I deleted the old app ID and I added the new one. But now my app doesn't do the Facebook SSO when Facebook app is installed. It does it OK when Facebook app is not installed and it uses Safari. I have read this question and this question that say the problem is the "iOS pack ID" and app ID don't match. I have checked it a lot of times, and it is the same. I have put the old app ID in the "iOS pack ID" property of Facebook, but it still doesn't work. I don't know if Facebook take a time to check if my app ID is valid, and how they show the result. I have been a lot of time with this issue. It seem like the problem is the iOS pack ID is not exactly the app ID, but it is not the problem: they are exactly the same. Thank you very much.

    Read the article

  • 7 - drupal overriding theme fucntions gettting notices

    - by welovedesign
    So I am overriding a theme function by putting the contents in my template.php module, the problem is that it it throwing up loads of undefined index notices because there are lots of functions that are defined in the module. How can I define these in the template.php file and prevent the notices. Note: I know i can turn them off 'uc_cart_block_content' => array( 'variables' => array( 'help_text' => NULL, 'items' => NULL, 'item_count' => NULL, 'item_text' => NULL, 'total' => NULL, 'summary_links' => NULL, 'collapsed' => TRUE, ), 'file' => 'uc_cart.theme.inc', ),

    Read the article

  • Function this parameter on onclick

    - by Jerome
    I've some html code generated in javascript like this cell.innerHTML = '<a href="#" class="sortheader" id="sortheader_'+i+'" '+ 'onclick="ts_resortTable(this, '+i+');return false;">' + txt+'<span class="sortarrow"></span></a>'; I'd like to call the function ts_resortTable() but independently of the onclick event how can i generate the "this" parameter of the function? I tried the DOM selector : $('sortheader_'+i) in jQuery and the getElementById('#sortheader_'+i) as well but it's not working

    Read the article

  • How to traverse table in Jquery and add a class?

    - by SWL
    I have a simple table of two rows. The first column is required, but the others are not; however, I would like them to be required in pairs. So if the user enters a value for Quantity3, then Size3 should also now be required. As a fiddle: http://jsfiddle.net/NaRts/7/ <tr> <td><input name="qty1[492]" class="qty required" type="text"></td> <td><input name="qty2[492]" class="qty" type="text"></td> <td><input name="qty3[492]" class="qty" type="text"></td> </tr><tr> <td><input name="size1[492]" type="text" class="size required" ></td> <td><input name="size2[492]" type="text" class="size" ></td> <td><input name="size3[492]" type="text" class="size" ></td> </tr> And the simple jQuery I have is: $('.qty').keyup(function() { var s = $(this).attr('name'); // = qty3[418] var qtyID = s.replace(/[^1-9\[\]]/g, ""); // = 3[418] var SizeID = "size" + qtyID; var $sizeInput = $(this).closest('tr').next().find(SizeID); $sizeInput.css('background-color', 'green'); $sizeInput.addClass('required'); //I tried this too but it didn't work //$(this).parent().find(SizeID).addClass('required'); });? ? Any help is much appreciated.

    Read the article

  • Format textfield while typing Ios

    - by BBios
    Ive seen other examples and tried - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string I am not sure what I am doing wrong, I just started coding my first Iphone App This is what I am trying to do I have 4 textfields and each has a limit on number of letters while typing I have done this using the below code - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { int valid; NSString *cs2 = [textField.text stringByReplacingCharactersInRange:range withString:string]; // int charCount = [cs2 length]; if(textField == cvv){ valid = 4; }else if(textField == cardName) { valid=26; }else if(textField == expDate) { valid=5; // if (charCount == 2 ) { // textField.text = [cs2 stringByAppendingString:@"/"]; // textField.text = cs2; // return YES; // } }else if(textField == acNumber) { valid=19; } return !([cs2 length] > valid); Works fine till here, I have a textfield where the user enters Exp date and would like to format it as if I am entering 112 then it should display as 01/12 and if I enter 2 then it should display as 1122 I tried checking if the length of the textfield value is 2 then append a / but then that gives me when I enter 12 it gives 11/22

    Read the article

  • nested list comprehension using intermediate result

    - by KentH
    I am trying to grok the output of a function which doesn't have the courtesy of setting a result code. I can tell it failed by the "error:" string which is mixed into the stderr stream, often in the middle of a different conversion status message. I have the following list comprehension which works, but scans for the "error:" string twice. Since it is only rescanning the actual error lines, it works fine, but it annoys me I can't figure out how to use a single scan. Here's the working code: errors = [e[e.find('error:'):] for e in err.splitlines() if 'error:' in e] The obvious (and wrong) way to simplify is to save the "find" result errors = [e[i:] for i in e.find('error:') if i != -1 for e in err.splitlines()] However, I get "UnboundLocalError: local variable 'e' referenced before assignment". Blindly reversing the 'for's in the comprehension also fails. How is this done? THanks. Kent

    Read the article

  • What does LAME text does in MP3 file?

    - by Dims
    I see here http://en.wikipedia.org/wiki/MP3 that MP3 file consists of MP3 headers interchanged with MP3 data. MP3 header consist of few bytes. But here is my MP3 file dump with ID3 tag cut. Header is highlighted with blue. You can see that "LAME3.96" text is highlighted with green. What does it does there? Is this a part of MP3 elementary stream? Or this is the part of some headers I didn't tag?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >