Daily Archives

Articles indexed Sunday April 4 2010

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

  • finding IP address using Linux command prompt

    - by John Kube
    I'm looking for a way to get my IP address using the command prompt in Linux. I know when you type "ifconfig" you can get your local IP address (i.e. 192.168.0.103), but I'm looking for my IP address that I get from my ISP. How can I get this from Linux without having to visit some website?

    Read the article

  • Why can't the Adobe Flash player send key strokes it doesn't handle to the browse in which it is run

    - by jim.e.clark
    I'm a heavy web user that uses the address bar constantly while browsing the web. I often use Ctrl + T to open a new tab or Ctrl + D to move focus to the address bar so it is very annoying that these shortcut keys do not work when a Flash object has focus on the active browser tab. I would happily give up all keyboard handling in the Flash Player in exchange for having keystrokes sent to the browser. In fact, as someone who has worked in software development for over 15 years it is hard to believe that Flash doesn't pass common browser shortcut keys to the browser or have an option to do so. So my question is this: Am I missing some option, some Flash shortcut key or some Firefox add-on that will alleviate my suffering?

    Read the article

  • Is there a way to get YQL to return HTML?

    - by Joe Shaw
    I am trying to use YQL to extract a portion of HTML from a series of web pages. The pages themselves have slightly different structure (so a Yahoo Pipes "Fetch Page" with its "Cut content" feature does not work well) but the fragment I am interested in always has the same class attribute. If I have an HTML page like this: <html> <body> <div class="foo"> <p>Wolf</p> <ul> <li>Dog</li> <li>Cat</li> </ul> </div> </body> </html> and use a YQL expression like this: SELECT * FROM html WHERE url="http://example.com/containing-the-fragment-above" AND xpath="//div[@class='foo']" what I get back are the (apparently unordered?) DOM elements, where what I want is the HTML content itself. I've tried SELECT content as well, but that only selects textual content. I want HTML. Is this possible?

    Read the article

  • Using the @ symbol to identify users like twitter does

    - by Justin Phillips
    I'm creating my own version of twitter, I have no idea how to get my back end php script to pick up the @membername within the entered text. Including multiple @membername's for example @billy @joseph, @tyrone,@kesha message or @billy hit up @tyrone he's bugging @kesha about the money you owe him. Any scripts of use on how I can accomplish this?

    Read the article

  • Webdev.Webserver has stopped working

    - by Alexander
    When I execute the code saveXML below it generates the error above, why?? using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Xml.Serialization; using System.IO; /// <summary> /// Summary description for Post /// </summary> public class Post { private int postIDCounter = 0; private String DateCreated; public Post() { Author = "unknown"; Title = "unkown"; Content = ""; DateCreated = DateTime.Now.ToString(); ID = postIDCounter++; } public int ID { get { return ID; } set { if (ID != value) ID = value; } } public string Author { get { return Author; } set { if (Author != value) Author = value; } } public string Title { get { return Title; } set { if (Title != value) Title = value; } } public string Content { get { return Content; } set { if (Content != value) Content = value; } } public void saveXML() { XmlSerializer serializer = new XmlSerializer(typeof(Post)); Stream writer = new FileStream("..'\'App_Data'\'posts'\'" + new Guid(ID.ToString()).ToString() + ".xml", FileMode.Create); serializer.Serialize(writer, this); writer.Close(); } }

    Read the article

  • .htaccess twitter or facebook URL naming convention

    - by Mike Silvis
    For my Social Networking Site, I would like to build a facebook, or twitter similar URL rewriting naming convention. Using Twitter as an example, they have pages labeled twitter.com/about and another page labeled twitter.com/{$username} However, how do you differentiate between say a user who has registers on to our site as "about" then. From this we are going to have a server conflict between the user "about" and the page about. What is the best way to handle this?

    Read the article

  • raising a vb6 event using interop

    - by Steve
    Hi, I have a legacy VB6 component that I've imported into VS using tlbimp.exe to generate my interop assembly. The VB6 component defines an event that allows me to pass messages within VB6. Public Event Message(ByVal iMsg As Variant, oCancel As Variant) I would really like to be able to raise this even in my C# program, but its getting imported as an event, not a delegate or something else useful. So, I can only listen, but never fire. Does anyone know how to fire an event contained within VB6? The C# event looks like [TypeLibType(16)] [ComVisible(false)] public interface __MyObj_Event { event __MyObj_MessageEventHandler Message; } I unfortunately cannot change the VB6 code. Thanks.

    Read the article

  • Clipped UITextField with UITextFieldAlignmentRight

    - by Typeoneerror
    Got a small problem with UITextField. I have a simple UITextField and when I set the textAlignment property to "right", it gets clipped by 1-2 pixels. It looks shite so I'm hoping someone has an idea of how to remedy this. I've tried setting the frame to integers to prevent them from being on .5 pixels. - (UITextField *)textControlForSetting:(NSDictionary *)settings { CGRect frame = CGRectIntegral(CGRectMake(100.0f, 0.0f, 170.0f, 44.0f)); UITextField *textField = [[[UITextField alloc] initWithFrame:frame] autorelease]; NSString *defaultValue = [settings objectForKey:kDefaultValueKey]; NSString *currentValue = [prefs objectForKey:[settings objectForKey:kSettingKey]]; textField.tag = settingsCounter; textField.delegate = self; textField.textAlignment = UITextAlignmentRight; textField.font = [UIFont fontWithName:@"HelveticaNeue" size:14.0f]; textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; textField.placeholder = (currentValue != nil) ? currentValue : defaultValue; settingsCounter++; return textField; }

    Read the article

  • Hudson leaving open sessions

    - by James Carr
    Does anyone have any experiences with Hudson leaving sessions open to a Subversion server? We've been increasing our job list and got ~50 which poll the SCM regularly. It's been working fine but recently our SCM has started acting up by refusing handshakes, which we suspect is down to the sessions left open by Hudson. Last count there were ~400 sessions with nothing building on Hudson. At the moment the only solution we've found is restarting the Subversion service but this is becoming increasingly frequent and not a long term solution. Any experiences/ideas would be appreciated.

    Read the article

  • Tell me what&rsquo;s wrong! &ndash; An XNA sample demonstrating exception handling and reporting in

    - by George Clingerman
    I’ve always enjoyed using Nick Gravelyn’s exception handling in all of my games. You’re always going to encounter those unhandled exception that your players are going to ferret out and having a method to display them rather than just crashing to the dashboard is definitely more of an elegant solution. But the other day I got to thinking…what if we could do more? What if instead of just displaying the error, we could encourage the players to send us the error. So I started playing with that an expanding upon Nick’s sample code to see what I could come up with. I got close to what I envisioned, but unfortunately there were some limitations to just what the XNA API could do. In my head I was picturing the players hitting “Send Message” and a 360 message would just be sent to the XBLIG developer. Unfortunately, you can only send messages in an XNA game to someone you’re currently in a network session with. Since I didn’t want to have a 360 server running all the time, virally connecting to players just to get error messages, I did the next best thing and just open up a 360 message and encourage them to manually enter the gamertag. Maybe someday we’ll be able to do that a little better, but this works for now. In the sample, players can hit the “A” button or key to generate in an exception. If the debugger is not attached, then the Exception message screen will be shown explaining what has happened and giving the player a chance to send a 360 message to the gamertag provided or maybe even just send an email. Nick’s code has been changed just a bit. It now accepts any PlayerIndex (no longer hard coded to just PlayerIndex.One) and it no longer uses a MessageBox to get the users selection. The code has also been modified so that it works both for the 360 and for the PC. Check out “Tell me what’s wrong!” and let me know if you have any thoughts or suggestions. I really do appreciate the feedback.

    Read the article

  • Ubuntu installation does not recognize previous partitions

    - by Hawkcannon
    I have been attempting to install Ubuntu (10.04, Lucid Lynx) on my computer. I wasn't ready to take the pure-Linux plunge yet, so I reserved a partition on which I would install Ubuntu. I ran the installer and answered the 'minor' questions (keyboard layout, time zone, etc.), but had trouble when I reached the partitioning. I have several partitions, but Ubuntu only saw one of them, which was not the ext3 partition that I had set up. I tried deleting the partition in hope that the installer would find and utilize the empty space, but it only saw the original partition. I do not have an external hard drive to use, and I cannot clear any existing partitions. Am I running the installer incorrectly, or is there a more serious problem?

    Read the article

  • image rendering issue

    - by burkejam71
    I am running Apache/2.2.3 (CentOS). For some reason certain images, jpg, gif, or png will show up as byte code when accessed directly on the server. Firefox 3 and Safari both think the content type is text/html. IE I believe has something built in to recognize it is an image and ignore the content type and renders the image correctly regardless. I can't seem to find anyone else with this issue. An example of this can be found at http://www.thedacs.com/admin/gp/userfiles/image/gp28%5Fimg%5F01.jpg but the image below on same server the image is rendered correctly (use same path from above) Fig3mod.jpg The first image works fine in Photoshop CS, Illistrator, GIMP, Paint.net,and any other image editing software. I have tried everything when editing the images from trying multiple file formats to print screens and cropping to create a new image to lose old image meta data. Can anybody help?

    Read the article

  • Search for content in functions with regex

    - by Marlun
    Hello, How would I with regular expression search for functions which contains the use of a global variable without running "global $var" first? The files looks like this: class TestClass { function correctFunc() { global $var; $name = $var->name; } function invalidFuncIWantToFind() { $age = $var->user->age; } } I want to find the function names of all the invalidFuncIWantToFind. At work this would have really speeded up our work but I didn't get how to do it.

    Read the article

  • Possible to change the alpha value of certain pixels on iPhone?

    - by emi1faber
    Is it possible to change just a portion of a Sprite's alpha in response to user interaction? A good example of what I mean is iFog or iSteam, where the user can wipe "steam" off the iPhone's screen. Swapping images out wouldn't be feasible due to the sheer number of possibilities where the user could touch and move... For example, say you have a simple app that has a brick wall in the background that has graffiti on it, so there'd be two sprites, one of the brick wall, then one of the graffiti that has a higher z value than the brick wall. Then, based upon where the user touches (assuming their touch controls a sandblaster), some of the graffiti should be removed, but not all of it, which could be accomplished by changing the alpha value on a portion of the graffiti sprite. Is there any way to do this in cocos2d-iphone? Or, do I need to drop down into openGL, and if so, where would be a good place to start my search on how to accomplish this? Ideally, I'd like to accomplish this on a cocos2d-iphone Sprite, but if it's not possible, where's the best place to start looking? Thanks in advance, Ben

    Read the article

  • Re-programming the output on a Magtek MagWedge

    - by Bill
    I am trying to reprogram the the output of my Magtek MagWedge and I cant find any documentation on how the syntax to send to output just the cc number from my cc swipe reader and not of the other data Below is the example configuration, however I have no clue how to change these values to. Comment:Set up IntelliPIN to Required Configuration /rawxact 50B01001011 /rawxact 50E10000000 /rawxact 940101010101010101 /rawxact 564 Comment:99{{SN}} /rawsend 52 Comment:50Z00000110 /rawsend 42Setup Done Thanks!

    Read the article

  • SQL Server Concatinate string column value to 5 char long

    - by mrp
    Scenario: I have a table1(col1 char(5)); A value in table1 may '001' or '01' or '1'. Requirement: Whatever value in col1, I need to retrive it in 5 char length concatenate with leading '0' to make it 5 char long. Technique I applied: select right(('00000' + col1),5) from table1; I didn't see any reason, why it doesn't work? but it didn't. Can anyone help me, how I can achieve the desired result?

    Read the article

  • actionscript 3.0 load images dynamically

    - by johnny
    I am making a photo slideshow in flash and would like to be able to load images dynamically from a folder. So that whenever i have a new photo i can just stick it in a folder and have my swf file read from that folder and update the slideshow. Is this doable in actionscript 3.0? if so any pointers would be helpful. thanks!

    Read the article

  • Background image for list view still shows white behind text for cells.

    - by MonkeyTroy
    I wanted to put a background image partially visible behind a list view. I created a list view in my nib with an image view behind it and made the list view background 20% opacity. This allows the background image to show thru but my text in the cells show a white background behind and if I create the cells in cellForRowAtIndexPath the cells have a white background too. I am creating and setting the cell textLabel and the detailTextLabel in the cellForRowAtIndexPath event. Not sure how to get rid of that, or if there is a better way to do the background image.

    Read the article

  • What jquery code or plugin would I use to update the position of an element?

    - by Breadtruck
    I am using a jquery plugin from [ FilamentGroup ] called DateRangePicker. I have a simple form with two text inputs for the start and end date that I bind the DateRangePicker to using this $('input.tbDate').daterangepicker({ dateFormat: 'mm/dd/yy', earliestDate: new Date(minDate), latestDate: new Date(maxDate), datepickerOptions: { changeMonth: true, changeYear: true, minDate: new Date(minDate), maxDate: new Date(maxDate) } }); I have a collapsible table above this form that when shown, moves the form and the elements that the daterangepicker plugin is bound to, down lower on the page, but the daterangepicker appears to keep the position from when it was actually created. What code could I put in the daterangepicker's onShow Callback to update its position to be next to the element is was initially bound to? Or is there some specific jquery method or plugin that I could chain to the daterangepicker plugin so that it will update its position correctly. This would come in handy for some other plugins that I use that don't seem to keep their position relative to other elements correctly either.

    Read the article

  • HttpUtility.UrlEncode in Windows Phone 7?

    - by lfoust
    The regular .Net framework contains HttpUtility.UrlEncode in the System.Web Assembly and in Silverlight it appears it was moved to System.Windows.Browser. But in Windows Phone 7 (which I thought was the same as Silverlight) I can't seem to find a proper way to UrlEncode anything. Neither of the previously mentioned assemblies are available in the Windows Phone 7 environment.

    Read the article

  • How does this Switch statement know which case to execute? (PHP/MySQL)

    - by ggfan
    Here is a code form a PHP+MySQL book I am reading and I am having trouble understanding this code. This code is about checking a file uploaded into a database. (Please excuse any spelling errors if any, I was typing it in) Q1: How does it know which case to echo? In the whole code, there is no mention of each case. Q2: Why do they skip case 5?! Or does it not matter which numbers you use(so I can have case 1, case 18, case 2?) if($_FILES['userfile']['error']>0) { echo 'Problem: '; switch($_FILES['userfile']['error']) { case 1: echo 'File exceeded upload_max_filesize'; break; case 2: echo 'File exceeded max_file_size'; break; case 3: echo 'File only partially uploaded'; break; case 4: echo 'No file uploaded'; break; case 6: echo 'Cannot upload file: no temp directory specified'; break; case 7: echo 'Upload failed: Cannot write to disk'; break; } exit; }

    Read the article

  • Relative connection string to AzMan XML store when using security application block

    - by David Hall
    Is it possible to specify a relative connection string for an AzMan XML store? My current connection string is connectionString="msxml://c:/azman.xml" but I really need to make that relative so other developers and automated builds can get the latest authorization store. MS documentation seems to suggest that connectionString="msxml://azman.xml" should work but that throws a The request is not supported error. EDIT: I realised that the fact I'm using AzMan through the Enterprise Library Security Application Block was important to the question.

    Read the article

  • Moving from php4 to php5

    - by fastcodejava
    I tried moving to php5, I am getting into lot of issues. This class gives error : Class DatabaseConnection { // error here private $connection; private $result; // public function __construct() { $this->databaseName = $GLOBALS['configuration']['db']; } // other methods follow }

    Read the article

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