Daily Archives

Articles indexed Tuesday March 30 2010

Page 23/126 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • objective c coding guidelines

    - by Chandan Shetty SP
    Is there any pdf which tells about coding guidelines in objective C. For Example... 1. Breaking the function names - checkIfHitTheTrack. 2. member variables must be like - mVariableName. 3. Giving better names to subclass - ? Please share the related links...

    Read the article

  • Dependency Property on ValueConverter

    - by spoon16
    I'm trying to initialize a converter in the Resources section of my UserControl with a reference to one of the objects in my control. When I try to run the application I get an XAML parse exception. XAML: <UserControl.Resources> <converter:PointConverter x:Key="pointConverter" Map="{Binding ElementName=ThingMap}" /> </UserControl.Resources> <Grid> <m:Map x:Name="ThingMap" /> </Grid> Point Converter Class: public class PointConverter : DependencyObject, IValueConverter { public Microsoft.Maps.MapControl.Map Map { get { return (Microsoft.Maps.MapControl.Map)GetValue(MapProperty); } set { SetValue(MapProperty, value); } } // Using a DependencyProperty as the backing store for Map. This enables animation, styling, binding, etc... public static readonly DependencyProperty MapProperty = DependencyProperty.Register("Map", typeof(Microsoft.Maps.MapControl.Map), typeof(PointConverter), null); public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { string param = (string)parameter; Microsoft.Maps.MapControl.Location location = value as Microsoft.Maps.MapControl.Location; if (location != null) { Point point = Map.LocationToViewportPoint(location); if (string.Compare(param.ToUpper(), "X") == 0) return point.X; else if (string.Compare(param.ToUpper(), "Y") == 0) return point.Y; return point; } return null; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } }

    Read the article

  • Changing CSS on the fly in a UIWebView on iPhone

    - by Shaggy Frog
    Let's say I'm developing an iPhone app that is a catalogue of cars. The user will choose a car from a list, and I will present a detail view for the car, which will describe things like top speed. The detail view will essentially be a UIWebView that is loading an existing HTML file. Different users will live in different parts of the world, so they will like to see the top speed for the car in whatever units are appropriate for their locale. Let's say there are two such units: SI (km/h) and conventional (mph). Let's also say the user will be able to change the display units by hitting a button on the screen; when that happens, the detail screen should switch to show the relevant units. So far, here's what I've done to try and solve this. The HTML might look something like this: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <title>Some Car</title> <link rel="stylesheet" media="screen" type="text/css" href="persistent.css" /> <link rel="alternate stylesheet" media="screen" type="text/css" href="si.css" title="si" /> <link rel="alternate stylesheet" media="screen" type="text/css" href="conventional.css" title="conventional" /> <script type="text/javascript" src="switch.js"></script> </head> <body> <h1>Some Car</h1> <div id="si"> <h2>Top Speed: 160 km/h</h2> </div> <div id="conventional"> <h2>Top Speed: 100 mph</h2> </div> </body> The peristent stylesheet, persistent.css: #si { display:none; } #conventional { display:none; } The first alternate stylesheet, si.css: #si { display:inline; } #conventional { display:none; } And the second alternate stylesheet, conventional.css: #si { display:none; } #conventional { display:inline; } Based on a tutorial at A List Apart, my switch.js looks something like this: function disableStyleSheet(title) { var i, a; for (i = 0; (a = document.getElementsByTagName("link")[i]); i++) { if ((a.getAttribute("rel").indexOf("alt") != -1) && (a.getAttribute("title") == title)) { a.disabled = true; } } } function enableStyleSheet(title) { var i, a; for (i = 0; (a = document.getElementsByTagName("link")[i]); i++) { if ((a.getAttribute("rel").indexOf("alt") != -1) && (a.getAttribute("title") == title)) { a.disabled = false; } } } function switchToSiStyleSheet() { disableStyleSheet("conventional"); enableStyleSheet("si"); } function switchToConventionalStyleSheet() { disableStyleSheet("si"); enableStyleSheet("conventional"); } My button action handler looks something like this: - (void)notesButtonAction:(id)sender { static BOOL isUsingSi = YES; if (isUsingSi) { NSString* command = [[NSString alloc] initWithString:@"switchToSiStyleSheet();"]; [self.webView stringByEvaluatingJavaScriptFromString:command]; [command release]; } else { NSString* command = [[NSString alloc] initWithFormat:@"switchToConventionalStyleSheet();"]; [self.webView stringByEvaluatingJavaScriptFromString:command]; [command release]; } isUsingSi = !isUsingSi; } Here's the first problem. The first time the button is hit, the UIWebView doesn't change. The second time it's hit, it looks like the conventional style sheet is loaded. The third time, it switches to the SI style sheet; the fourth time, back to the conventional, and so on. So, basically, only that first button press doesn't seem to do anything. Here's the second problem. I'm not sure how to switch to the correct style sheet upon initial load of the UIWebView. I tried this: - (void)webViewDidFinishLoad:(UIWebView *)webView { NSString* command = [[NSString alloc] initWithString:@"switchToSiStyleSheet();"]; [self.webView stringByEvaluatingJavaScriptFromString:command]; [command release]; } But, like the first button hit, it doesn't seem to do anything. Can anyone help me with these two problems?

    Read the article

  • How to do browser detection with jQuery 1.3 with $.browser.msie deprecated?

    - by Darryl Hein
    How should browser detection be done now that jQuery 1.3 has deprecated (and I'm assuming removed in a future version) $.browser.msie and similar? I have used this a lot for determining which browser we are in for CSS fixes for pretty much every browser, such as: $.browser.opera $.browser.safari $.browser.mozilla ... well I think that's all of them :) The places where I use it, I'm not sure what browser issue is causing the problem, because a lot of times I'm just trying to fix a 1 px difference in a browser. Edit: With the new jQuery functionality, there is no way to determine if you are in IE6 or IE7. How should one determine this now?

    Read the article

  • android saveinstance saving vector datatypes

    - by Javadid
    hi friends, I am making an application which is currently working perfectly but with only 1 problem... As we all know that the activity is destroyed and recreated when user changes the orientation of the phone... my activity needs to save a vector full of objects wen the activity is recreated... i checked the OnSaveInstance() method and found that there is no way a vector can be stored... Does any1 have a suggestion for storing vector so that i can retrieve it on recreation of Activity??? Any help will be appreciated... Thanx...

    Read the article

  • Silverlight Cream for March 29, 2010 -- #824

    - by Dave Campbell
    In this Issue: smartyP(-2-), Al Pascual, Mike Taulty, Shawn Burke(-2-), Vikram Pendse, Tomasz Janczuk, Lee, and Alexey Zakharov. Shoutouts: Jeff Weber announced New Silverlight Game “Snow Spill” by Nick Avery of Liserd Arts Games John Papa summarized links to all the Silverlight and Windows Phone 7 Sessions from MIX 10 Tim Heuer has a post up about OData and the MIX10 feed: MIX10: Yet another way to view video content sessions using their OData feed From SilverlightCream.com: Creating a Windows Phone 7 Metro Style Pivot Application [Part 1] smartyP has a two-part video tutorial up on creating a WP7 pivot navigation app using Expression Blend. He's also looking for feedback. Creating a Windows Phone 7 Metro Style Pivot Application [Part 2] In part 2, smartyP adds gestures to his navigation. He also has some good external links listed. Al Pascual: My First Windows Phone 7 Application Al Pascual extends the MIX10 keynote WP7 sample by adding the ability to send tweets ... with all the code. Silverlight 4 RC and the “silent installation” Mike Taulty discusses and demonstrates installing an OOB app without having to visit a webpage to get it. In other words, pass it around on a USB drive, send it in email, etc. iPhone SDK vs Windows Phone 7 Series SDK Challenge, Part 1: Hello World! Shawn Burke has a 2-part series up comparing iPhone and WP7 development looking at how easy it is to code and lines of code produced by the tools. This first post is the classic Hello World. Check out the comments as well. iPhone SDK vs. Windows Phone 7 Series SDK Challenge, Part 2: MoveMe Shawn Burke's part 2 is comparing the classic iPhone 'MoveMe' app... again, check out all the comments. Silverlight 4 : Indic Support in Silverlight Vikram Pendse demonstrates using the Microsoft Indic Language Input tool. He has some screen shots and discussion about fonts in Silverlight. Comparison of HTTP polling duplex and net.tcp performance in Silverlight 4 RC Tomasz Janczuk is checking out Silverlight4 RC and has a comparison up of the performance of the three mechanisms for asynch data push for the server to the client/. Summary rows in Datagrid with multiple groups Lee revisted a post that displayed Summary/Totals in the group header to also support multiple groups now. Silverlight Commands Hacks: Passing EventArgs as CommandParameter to DelegateCommand triggered by EventTrigger Alexey Zakharov suggests a workaround 'InvokeDelegateCommandAction' to keep Blend from ignoring event args. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Browser won't connect to svn server

    - by devpi
    This has been driving me nuts. For some reason, I can't access my svn repository using a browser in this laptop that I'm using right now (firefox & ie) The connection just times out. I'm at home right now and the server is in another room. It connects OK there and it also connects OK in my virtual machine in this same laptop. I'm pretty stumped right now and can't figure out why this is happening. I've also checked the proxies and I'm 100% sure I'm not using any at all. The virtual machine running on this laptop is XP 32bit and this one is a Win7 64 bit. Thanks

    Read the article

  • Why "Reader" link doesn't show in Gmail in chrome?

    - by ablmf
    I use both chrome and firefox at the same time. As I always open Gmail first and then use the Reader link in upper left conner of Gmail to open Google Reader, I noticed that chomre hides the Google Reader Link. I can't find it anywhere in Gmail. Why doesn't chrome behave differently?

    Read the article

  • Add "My Dropbox" to Your Windows 7 Start Menu

    - by The Geek
    Over here at How-To Geek, we’re huge fans of Dropbox, the amazingly fast online file sync utility, but we’d be even happier if we could natively add it to the Windows 7 Start Menu, where it belongs. And today, that’s what we’ll do. Yep, that’s right. You can add it to the Start Menu… using a silly hack to the Libraries feature and renaming the Recorded TV library to a different name. It’s not a perfect solution, but you can access your Dropbox folder this way and it just seems to belong there. First things first, head into the Customize Start Menu panel by right-clicking on the start menu and using Properties, then make sure that Recorded TV is set to “Display as a link”. Next, right-click on Recorded TV, choose Rename, and then change it to something else like My Dropbox.   Now you’ll want to right-click on that button again, and choose Properties, where you’ll see the Library locations in the list… the general idea is that you want to remove Recorded TV, and then add your Dropbox folder. Oh, and you’ll probably want to make sure to set “Optimize this library for” to “General Items”. At this point, you can just click on My Dropbox, and you’ll see, well, Your Dropbox! (no surprise there). Yeah, I know, it’s totally a hack. But it’s a very useful one! Also, if you aren’t already using Dropbox, you should really check it out—2 GB for free, accessible via the web from anywhere, and you can sync to multiple desktops. Similar Articles Productive Geek Tips Use the Windows Key for the "Start" Menu in Ubuntu LinuxAccess Your Dropbox Files in Google ChromeSpeed up Windows Vista Start Menu Search By Limiting ResultsPin Any Folder to the Vista Start Menu the Easy WayEnable "Pin to Start Menu" for Folders in Windows Vista / XP TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Classic Cinema Online offers 100’s of OnDemand Movies OutSync will Sync Photos of your Friends on Facebook and Outlook Windows 7 Easter Theme YoWindoW, a real time weather screensaver Optimize your computer the Microsoft way Stormpulse provides slick, real time weather data

    Read the article

  • How to edit files directly on webdav in windows.

    - by phazei
    I have a webDAV setup with the cPanel webdisk. I can connect to it through NetHood and I can drag and drop files to/from there. What I can't do is simply edit any of the files directly. I need to copy it somewhere else, edit it, then copy it back. That's essentially what is needed with ftp, though smart clients will monitor the file, making it easier than webDAV in the current state I'm using it in. I was under the impression that webdav was supposed to let me work on the files as if it were a local drive. But nothing can actually open the files. How can I go about bringing more functionality around to it? Or is this as good as it gets? I have tried 'net use q:\ https://myserver.com:2083' and 'net use q:\ '\myserver.com@SSL:2083\' but neither work and only throws: "System error 67 has occurred. The network name cannot be found." I ultimately want to use TortiseSVN with the webDAV so I can have my working copy running on the server.

    Read the article

  • PHP fckeditor problem?

    - by TaG
    How do I correct the following error that is listed below. I'm using PHP & MySQL. I get the following error. Not Found The requested URL /fckeditor/editor/fckeditor.html was not found on this server. I followed the directions on http://docs.cksource.com/FCKeditor_2.x/Developers_Guide/Integration/PHP

    Read the article

  • passing parameters to .aspx page using renderpartial

    - by dexter
    in my index.aspx page i want to render another module.aspx page using renderpartial which then render a .htm file depanding on which parameter is passed from index.aspx (it would be number ie 1,2 etc ,so as to call different different .htm file everytime depending on the parameter) 1). now i want Index.aspx page to render module.aspx and pass it a parameter(1,2,3,etc) [the parameters would be passed programatically (hardcoded)] and 2). mudule.aspx should catch the parameter and depending on it will call .htm file my index.aspx has <% ViewData["TemplateId"] = 1; %> <% Html.RenderPartial("/Views/Templates/MyModule.aspx", ViewData["TemplateId"]); %> and module.aspx contains <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> <script type="text/javascript" src="/Scripts/jquery-1.3.2.js"></script> <script type="text/javascript" src="/Scripts/Service.js"></script> <script type="text/javascript"> debugger; var tid = '<%=ViewData["TemplateId"] %>'; $.get("/Templates/Select/" + tid, function(result) { $("#datashow").html(result); }); </script> <div id="datashow"></div> this is my controller which is called by $.get(....) (see code) public ActionResult Select(int id) { return File("/Views/Templates/HTML_Temp" +id.ToString()+".htm" , "text/html"); } and finally my .htm file <div id="divdata" class="sys-template"> <p>Event Title:<input id="title" size="150" type="text" style="background-color:yellow;font-size:25px;width: 637px;" readonly="readonly" value="{{title}}" /> </p> <p>Event Description:<input type="text" id="description" value="{{ description }}" readonly="readonly" style="width: 312px" /></p> <p>Event Date: <input type="text" id="date" value="{{ date }}" readonly="readonly" style="width: 251px"/></p> <p>Keywords : <input type="text" id="keywords" value="{{keywords}}" readonly="readonly" /></p> </div> <script type="text/javascript"> Sys.Application.add_init(appInit); function appInit() { start(); } </script> start() is javascript method which is in file Service.js when i run this programm it gives me error js runtime error: 'object expected' and debugger highlighted on <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/**xhtml**1-strict.dtd"> pls help me solve the problem

    Read the article

  • Accessing an asp.net web service with classic asp

    - by thchaver
    My company is considering working with another company on a particular module. Information would be sent back and forth between us through my web service. Thing is, my web service uses ASP.NET, and they use classic ASP. Everything I've found online says (it's a pain, but) they can communicate, but I'm not clear on some details. Specifically, do I have to enable GET and POST on my web service? If I don't have to, but could, would enabling them make the communication significantly easier/better? And finally, GET and POST are disabled by default because of security. What are the security risks involved in enabling them?

    Read the article

  • Can I set a property on an object that is only declared on the instance type, when I don't know the

    - by WilberBeast
    Let me explain. I have a List into which I am adding various ASP.NET controls. I then wish to loop through the list and set a CssClass, however not every Control supports the property CssClass. What I would like to do is test if the underlying instance type supports the CssClass property and set it, but I'm not sure how to do the conversion prior to setting the property since I don't know the type of each Control object. I know that I can use typeof or x.GetType(), but I'm not sure how to use these to convert the controls back to the instance type in order to test for and then set the property. Actually I seem to have solved this, so I thought that I would post the code here for others. foreach (Control c in controlList) { PropertyInfo pi = c.GetType().GetProperty("CssClass"); if (pi != null) pi.SetValue(c, "desired_css_class", null); } I hope that this helps someone else as I has taken me hours to research these 2 lines of code. Cheers Steve

    Read the article

  • python on 32 bit

    - by Mponnada
    Hi I am running Windows XP, on 32bit. How do I install python? When I run the installation file, it gives me an error saying "installation package not supported by processor type" does python need 64 bit to execute?

    Read the article

  • How to use ORDER BY, LOWER .. in SQL SERVER 2008 with non-unicode data

    - by hgulyan
    Hi, The question is about Armenian. I'm using sql server 2005, collation SQL_Latin1_General_CP1_CI_AS, data mostly is in Armenian and we can't use unicode. I tested on ms sql 2008 with a windows collation for armenian language ( Cyrillic_General_100_ ), I have found here, ( http://msdn.microsoft.com/en-us/library/ms188046.aspx ) but it didn't help. I have a function, that orders hex values and a lower function, which takes each char in each string and converts it to it's lower form, but it's not acceptable solution, it works really slow, calling that functions on every column of a huge table. Is there any solution for this issue not using unicode and not working with hex values manually?

    Read the article

  • GNU make copy files to distro directory

    - by TheRoadrunner
    I keep my source html (and images etc.) in separate directories for source control. Part of making the distro is to have make copy files to output folder and set the attributes. Today my makefile shows (extract): %.html: /usr/bin/install -c -p -m 644 $< $@ www: $(HTMLDST)/firmware.html $(HTMLDST)/firmware_status.html $(HTMLDST)/index.html $(HTMLDST)/firmware.html: $(HTMLSRC)/firmware.html $(HTMLDST)/firmware_status.html: $(HTMLSRC)/firmware_status.html $(HTMLDST)/index.html: $(HTMLSRC)/index.html This is shown with only three html files, but in reality, there are lots. I would like to just list the filenames (without paths) and have make do the comparison between source and destination and copy the files that have been updated. Thank you in advance Søren

    Read the article

  • How to create program that can be run by: #service myservice start

    - by Saif Bechan
    I am new to Linux and want to know what kind of programs can be run by using. #service myservice start And the programs stays on until stopped. Are they normal c++ programs or are they different. In some tutorials i have seen that they use ./myprogram to start a program. Another thing I have seen is the usage of .sh files. One last type of program i see is executed by the command: #/usr/bin/myprogramm Can someone explain the difference between these or point me to a basic tutorial/guide.

    Read the article

  • What's required for a nameserver to be registered?

    - by Lin
    I'm trying to change nameservers for some of my domains at GoDaddy, but I occasionally run into "Nameserver not registered" problems, and then I'm not allowed to set the nameservers. Here are the cases I've tried, and I still don't understand what it takes to have a registered nameserver. With ns1 and ns2 pointing to my nameservers, I can set the nameservers successfully when I set up domains as follows: Host Summary entries for ns1 and ns2 at GoDaddy .co.cc domains with A records for ONLY ns1 and ns2 Hosted with other nameservers. Have only A records for ns1 and ns2 But these do NOT work (nameserver not registered error): .info domains at GoDaddy with A records for ONLY ns1 and ns2 Hosts with dyndns.org that point to IP of nameservers Also, when I dig any domains hosted at my nameservers using any of the above, I get the correct response. So what's the deal here? Why do the last two cases get "nameserver not registered errors"? Thanks!

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >