Daily Archives

Articles indexed Wednesday March 17 2010

Page 15/128 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • NSMutableDictionary, alloc, init and reiniting...

    - by Marcos Issler
    In the following code: //anArray is a Array of Dictionary with 5 objs. //here we init with the first NSMutableDictionary *anMutableDict = [[NSMutableDictionary alloc] initWithDictionary:[anArray objectAtIndex:0]]; ... use of anMutableDict ... //then want to clear the MutableDict and assign the other dicts that was in the array of dicts for (int i=1;i<5;i++) { [anMutableDict removeAllObjects]; [anMutableDict initWithDictionary:[anArray objectAtIndex:i]]; } Why this crash? How is the right way to clear an nsmutabledict and the assign a new dict? Thanks guy's. Marcos.

    Read the article

  • Can I make a PowerPoint file expire from browser cache?

    - by djdilicious
    My website utilizes ASP. I have a link to a PowerPoint file within my website's file structure. The file is replaced every day with an updated version, but when users click on the link, the browser displays the cached version if they have visited before. How can I ensure that the updated version is loaded without asking the user to clear his or her cache?

    Read the article

  • How can I properly use environment variables encoded as Windows-1251 in Perl?

    - by Kartlee
    I have an environment variable set in Windows as TEST=abc£ which uses Windows-1252 code page. Now, when I run a Perl program test.pl this environment value comes properly. When I call another Perl code - test2.pl from test1.pl either by system(..) or Win32::Process, the environment comes garbled. Can someone provide information why this could be and way to resolve it? The version of perl I am using is 5.8. If my understanding is right, perl internally uses utf-8, so the initial process - test1.pl received it right from Windows-1252 → utf-8. When we call another process, should we convert back to Windows-1252 code page?

    Read the article

  • How do i set and get UIButtons' tag?

    - by Sam Jarman
    How do i set a tag for a button programmatically? I later want to compare to tags for a conclusion ive tried this -(IBAction)buttonPressed:(id)sender{ NSLog(@"%d", [sender tag]); } but that just crashes the app.... :( any other ideas? Cheers Guys Sam

    Read the article

  • ChangePassword control without provider

    - by EugeneK
    Hello, Is there a way to make ChangePassword control work without Membership provider? Like the same way Login control works through an Authenticate event, could I make this component to use my password changing function and then showing success view without me writing custom provider? Thanks, Eugene.

    Read the article

  • How can I get the name of the uploaded file in HTML::Mason?

    - by marghi
    Recently I've been trying to get some files uploaded on to my server in my HTML::Mason application. All good, no problems there. Apparently Mason returns a filehandle directly in the argument. The problem is that I cannot retrieve the filename from that filehandle in a elegant way. One method of resolving this issue is parsing the filename on the client before sending it to the server and placing the extracted value in a hidden field so that it gets sent upon submit. BUT that is very unsafe!

    Read the article

  • Loading an image control from a local drive

    - by Kumar
    I have a folder C:\Images which has a some images. This folder is not inside my project and I would to know if there is a way to load an image from that folder on to an ASP.NET Image control. <asp:Image ID="img" runat="server" /> One solution could be to make the Images folder a Virtual directory on the IIS but I would like to know if this can be done without creating a virtual directory for the Images folder.

    Read the article

  • Subscription Management with Merchant Account via API

    - by Josh
    I'm researching gateways/vendors that provide the ability to create subscription based transitions for merchant accounts. In other words, I want to allow customers to signup for a subscription for a website service that charges once a month. Authorize.Net has an ARB (Automated Recurring Billing) Module. The cost is cheap, $10 a month for the service, with unlimited subscriptions, and they have an API that allows XML or SOAP access to create, update and cancel. The LARGE negative of the service is that it doesn't have elegant way to obtain the current status of a subscription. They can send a daily email with an attached CSV file, or someone can login into the site and review statuses – neither is an enterprise solution. The parent company "CyberSource" has a "Recurring Billing Service" which implies a more robust solution, including API access to subscription information. I’m currently waiting for a sales call back on costs related to the service. I also looked at PayPal's Recurring Billing Service, but that appears to require that users are redirected to the PayPal site to signup for the subscription -- again, not an an elegant solution. Does anyone know of any other vendors/gateways that offer subscription service, that meet the following criteria: Vendor/Gateway must host the credit card number and be PCI compliant Have an API that accessible via a Web Service, Post over HTTPS or SOAP Have an API that allows querying the status of subscriptions and/or the ability to query for activity since a certain date. Thanks in advance for your suggestions.

    Read the article

  • The Open Data Protocol

    - by Bobby Diaz
    Well, day 2 of the MIX10 conference did not disappoint.  The keynote speakers introduced the preview release of IE9, which looks really cool and quick, and Visual Studio 2010 RC that is scheduled to RTM on April 12th.  It seemed to have a lot of improvements aimed at making developers more productive.  Here are the current links to these two offerings: Internet Explorer 9 – Platform Preview Visual Studio 2010 and .NET 4 – Release Candidate While both of these were interesting, the demos that really blew me away today centered around the work being done with The Open Data Protocol, or OData for short!  OData is a recommended standard being pushed by Microsoft that uses a REST based interface to interact with various types of data in a uniform manner.  Data producers then provide the data to consumer in either ATOM or JSON formats as requested by the client application. The OData SDK contains client and server libraries for many of the popular languages in use today, including .NET, Java, PHP, Objective C and JavaScript, so you consume or even produce your own OData services.  More information can be found using the following links: OData.org How to navigate an OData compliant service Query Functions (WCF Data Services) Netflix has made available one of the first live OData services by exposing their entire movie catalog.  You can browse and query using URLs similar to the following: http://odata.netflix.com/ http://odata.netflix.com/Catalog/Genres('Horror')/CatalogTitles http://odata.netflix.com/Catalog/CatalogTitles?$filter=startswith(Title/Regular,%20'Star%20Wars')&$orderby=Title/Regular So now I just need to find an excuse reason to start using OData in a real project! Enjoy!

    Read the article

  • How to target SCOM 2007 R2 monitor to monitor only one server

    - by Trondh
    Hi, This might be basic, but hopefully someone can help me: We have a well-working SCOM 2007 R2 implementation monitoring our Microsoft infrastructure. Now, on one of these servers there's an event (logged to the eventlog) that I need to be alerted on. I have created a group and put this one windows server in it. Then, I created a monitor with simple event detection, entered the event id and used the group name as "monitor target". This doesnt work - the monitor doesn't show up in health explorer at all. However, If I create the monitor with "Windows computers" as target it works, but that means I'll have to disable the monitor, and then enable it for the group, which is cumbersome and slightly illogical to me. Is this by design, or am I doing something wrong?

    Read the article

  • Reinstalling Windows XP over openSUSE [closed]

    - by Ashish
    I had installed Windows XP and after that openSUSE. If i want to retain only Windows XP on my system, if I reinstall Windows XP but it gives problem of partition error. If I reinstall openSUSE then grub loader shows Windows which starts setup again which was remained after restart.

    Read the article

  • How do I place widgets above and below a listview?

    - by Jay Askren
    I have a list view and want to put stuff both above(on the y axis) and below(y axis) it including images, text views, and a row of buttons. Below is a simplified version of what I am creating. Unfortunately the list covers(i.e. above on the z axis) the header so the header text is not visible instead of being underneath (on the y axis) <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <TextView android:id="@+id/footer" android:text="footer" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_alignParentBottom="true" /> <ListView android:id="@+id/list_view" android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_above="@id/footer" android:background="#ff9999ff"/> <TextView android:id="@+id/header" android:text="header" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_alignParentTop="true" android:layout_above="@id/list_view" android:baselineAlignBottom="false" /> </RelativeLayout> Here is the corresponding Activity class: public class SampleListActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.list_activity); } }

    Read the article

  • How do I structure a GWT project?

    - by smaye81
    Hello, I have followed the basic GWT tutorial for creating a project in Eclipse. Now, I am trying to build off what I learned in the tutorial. I created a static utility class to perform some database connection logic. However, when I try to compile I get: [ERROR] Line 46: No source code is available for type com.sample.server.ConnectionUtil; did you forget to inherit a required module? Where can I put simple classes that I've created on my own? Do they have to be outside the package structure of the basic module, 'com.sample'? Or do I have to specify a whole new module in the gwt.xml file and inherit from that? There has to be something simple I'm missing.

    Read the article

  • How is thread local storage (__thread) implemented on LInux?

    - by anon
    __thread Foo foo; How is "foo" actually resolved? Does the compiler silently replace every instance of "foo" with a function call? Is "foo" stored somewhere relative to the bottom of the stack, and the compiler stores this as "hey, for each thread, have this space near the bottom of the stack, and foo is stored as "offset x from bottom of stack"" ? Insights please.

    Read the article

  • How to generate XML with attributes in .NET?

    - by user292815
    I have that code: ... request data = new request(); data.username = formNick; xml = data.Serialize(); ... [System.Serializable] public class request { public string username; public string password; static XmlSerializer serializer = new XmlSerializer(typeof(request)); public string Serialize() { StringBuilder builder = new StringBuilder(); XmlWriterSettings settings = new XmlWriterSettings(); settings.OmitXmlDeclaration = true; settings.Encoding = Encoding.UTF8; serializer.Serialize( System.Xml.XmlWriter.Create(builder, settings ), this); return builder.ToString(); } public static request Deserialize(string serializedData) { return serializer.Deserialize(new StringReader(serializedData)) as request; } } I want to add attributes to some nodes and create some sub-nodes. Also how to parse xml like that: <answer> <player id="2"> <coordinate axis="x"></coordinate> <coordinate axis="y"></coordinate> <coordinate axis="z"></coordinate> <action name="nothing"></action> </player> <player id="3"> <coordinate axis="x"></coordinate> <coordinate axis="y"></coordinate> <coordinate axis="z"></coordinate> <action name="boom"> <1>1</1> <2>2</2> </action> </player> </answer> p.s. it is not a xml file, it's answer from http server.

    Read the article

  • Custom Paging for GridView in an UpdatePanel not firing PageIndexChanging event

    - by JeffCren
    I have a GridView that uses custom paging inside an UpdatePanel (so that the paging and sorting of the gridview don't cause postback). The sorting works fine, but the paging doesn't. The PageIndexChanging event is never called. This is the aspx code: <asp:UpdatePanel runat="server" ID="upSearchResults" ChildrenAsTriggers="true" UpdateMode="Always"> <ContentTemplate> <asp:GridView ID="gvSearchResults" runat="server" AllowSorting="true" AutoGenerateColumns="false" AllowPaging="true" PageSize="10" OnDataBound="gvSearchResults_DataBound" OnRowDataBound ="gvSearchResults_RowDataBound" OnSorting="gvSearchResults_Sorting" OnPageIndexChanging="gvSearchResults_PageIndexChanging" Width="100%" EnableSortingAndPagingCallbacks="false"> <Columns> <asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Center"> <ItemTemplate> <asp:HyperLink ID="lnkAdd" runat="server">Add</asp:HyperLink> <asp:HiddenField ID="hfPersonId" runat="server" Value='<%# Eval("Id") %>'/> </ItemTemplate> </asp:TemplateField> <asp:BoundField HeaderText="First Name" DataField="FirstName" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" SortExpression="FirstName" /> <asp:BoundField HeaderText="Last Name" DataField="LastName" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" SortExpression="LastName" /> <asp:TemplateField HeaderText="Phone Number" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" > <ItemTemplate> <asp:Label ID="lblPhone" runat="server" Text="" /> </ItemTemplate> </asp:TemplateField> </Columns> <PagerTemplate> <table width="100%" class="pager"> <tr> <td> </td> </tr> </table> </PagerTemplate> </asp:GridView> <div class="btnContainer"> <div class="btn btn-height_small btn-style_dominant"> <asp:LinkButton ID="lbtNewRecord" runat="server" OnClick="lbtNewRecord_Click"><span>Create New Record</span></asp:LinkButton> </div> <div class="btn btn-height_small btn-style_subtle"> <a onclick="openParticipantModal();"><span>Cancel</span></a> </div> </div> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="gvSearchResults" EventName="PageIndexChanging" /> <asp:AsyncPostBackTrigger ControlID="gvSearchResults" EventName="Sorting" /> </Triggers> </asp:UpdatePanel> In the code behind I have a SetPaging method that is called on the GridView OnDataBound event: private void SetPaging(GridView gv) { GridViewRow row = gv.BottomPagerRow; var place = row.Cells[0]; var first = new LinkButton(); first.CommandName = "Page"; first.CommandArgument = "First"; first.Text = "First"; first.ToolTip = "First Page"; if (place != null) place.Controls.Add(first); var lbl = new Label(); lbl.Text = " "; if (place != null) place.Controls.Add(lbl); var prev = new LinkButton(); prev.CommandName = "Page"; prev.CommandArgument = "Prev"; prev.Text = "Prev"; prev.ToolTip = "Previous Page"; if (place != null) place.Controls.Add(prev); var lbl2 = new Label(); lbl2.Text = " "; if (place != null) place.Controls.Add(lbl2); for (int i = 1; i <= gv.PageCount; i++) { var btn = new LinkButton(); btn.CommandName = "Page"; btn.CommandArgument = i.ToString(); if (i == gv.PageIndex + 1) { btn.BackColor = Color.Gray; } btn.Text = i.ToString(); btn.ToolTip = "Page " + i.ToString(); if (place != null) place.Controls.Add(btn); var lbl3 = new Label(); lbl3.Text = " "; if (place != null) place.Controls.Add(lbl3); } var next = new LinkButton(); next.CommandName = "Page"; next.CommandArgument = "Next"; next.Text = "Next"; next.ToolTip = "Next Page"; if (place != null) place.Controls.Add(next); var lbl4 = new Label(); lbl4.Text = " "; if (place != null) place.Controls.Add(lbl4); var last = new LinkButton(); last.CommandName = "Page"; last.CommandArgument = "Last"; last.Text = "Last"; last.ToolTip = "Last Page"; if (place != null) place.Controls.Add(last); var lbl5 = new Label(); lbl5.Text = " "; if (place != null) place.Controls.Add(lbl5); } The paging works if I don't use custom paging, but I really need to use the custom paging. I can't figure out why the PageIndexChanging event isn't fired when I'm using the custom paging. Thanks, Jeff

    Read the article

  • How to make a Windows Mobile based WinForms .Net application easily changeable?

    - by Arthur
    I need to build a Win Mobile WinForms .Net application that once developed will be easy to morph or adjust to new user requirements quickly (including changes in GUI). The main objective is to minimize the development time (development to production roll-out effort). Also, a nice thing to have is to be able to test it in an automated way. The application must be able to: 1) Persist state (may use a local database); 2) Sync data across (via Radio or WiFi); 3) Exchange info with a desktop PC or a central server;

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >