Daily Archives

Articles indexed Saturday April 3 2010

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

  • CreateChildControls AFTER Postback

    - by Francois
    I'm creating my own CompositeControl: a collection of MyLineWebControl and a "add" button. When the user press the "add" button, a new MyLineWebControl is added. In CreateChildControls(), I run through my model (some object MyGridOfLines which has a collection of MyLine) and add one MyLineWebControl for each MyLine. In addButton.Click, I add a new MyLine to my object MyGridOfLines. But, since the Click event method is called after CreateChildControls(), the new MyLineWebControl will be only displayed on the next postback. What can I do to "redraw" immediately my control, without loosing values that I've entered in each input?

    Read the article

  • Can I change the temp folder path?

    - by roufamatic
    I have an asp.net app that uses System.IO.Path.GetTempFileName() for temporary files. In the production IIS environment (W2K3), the temp folder (System.IO.Path.GetTempPath()) points to C:\Windows\Temp. But on my XP dev machine it's C:\documents and settings\machinename\ASPNET\temp. Is it possible to change this folder without affecting other accounts on my machine?

    Read the article

  • blackberry deployment and release process

    - by hishboy
    So I'm building a blackberry app and was wondering if there is any good documentation on deployment/release best practices? Blackberry's "A70 – How to Deploy and Distribute Applications" document is kind of lacking. I guess I'm looking for answers for the following question (Specifically for Over-The-Air aka OTA): I'm building an app for OS 4.5 and up. Do I need to compile a separate COD/JAD for each version? (i.e. 4.5, 4.6, 4.6.1, 4.7, and 5.0) How do I detect OS version from the user-agent? What's the best way to compile COD/JAD files? anything else that might be good to know :) Thanks in advance!

    Read the article

  • Custom keys for Google App Engine models (Python)

    - by Cameron
    First off, I'm relatively new to Google App Engine, so I'm probably doing something silly. Say I've got a model Foo: class Foo(db.Model): name = db.StringProperty() I want to use name as a unique key for every Foo object. How is this done? When I want to get a specific Foo object, I currently query the datastore for all Foo objects with the target unique name, but queries are slow (plus it's a pain to ensure that name is unique when each new Foo is created). There's got to be a better way to do this! Thanks.

    Read the article

  • How to embed a text field on my desktop in osx

    - by mechko
    How would I go about embedding a text field on my desktop? That is, I want to be able to type into it, but it needs to sit behind my windows at all times. I know I can use geektool to display text. Is there a similar program or piece of code that would allow me to do what I want? I am trying to hack together a twitter/fb/chat client which will not take up a separate window.

    Read the article

  • sizeof continues to return 4 instead of actual size

    - by Guest
    #include <iostream> using namespace std; int main() { cout << "Do you need to encrypt or decrypt?" << endl; string message; getline(cin, message); int letter2number; for (int place = 1; place < sizeof(message); place++) { letter2number = static_cast<int>(message[place]); cout << letter2number << endl; } } Examples of problem: I type fifteen letters but only four integers are printed. I type seven letters but only four integers are printed. The loop only occurs four times on my computer, not the number of characters in the string. This is the only problem I am having with it, so if you see other errors, please don't tell me. (It is more fun that way.) Thank you for your time.

    Read the article

  • Parsing Json Feeds with google Gson

    - by mnml
    I would like to know how to parse a json feed by items, eg. url / title / description for each item. I have had a look to the doc / api but, it didn't help me. This is what I got so far import com.google.gson.Gson; import com.google.gson.JsonObject; public class ImportSources extends Job { public void doJob() throws IOException { String json = stringOfUrl("http://feed.test/all.json"); JsonObject jobj = new Gson().fromJson(json, JsonObject.class); Logger.info(jobj.get("responseData").toString()); } public static String stringOfUrl(String addr) throws IOException { ByteArrayOutputStream output = new ByteArrayOutputStream(); URL url = new URL(addr); IOUtils.copy(url.openStream(), output); return output.toString(); } }

    Read the article

  • Admin GUI for sqllite?

    - by mark smith
    Hi there, Can anybody recommend a good FREE Admin GUI for Sqllite? Needs to be run on a Windows PC. I tried following some of the links i found via sqllite site which states they are free.. and when arriving they seem to be charging.. I just want a good standard GUI for listing data and executing sql etc Really appreciate any feedback

    Read the article

  • System.Web.HttpException on asp:gridview pagination

    - by Carlos Muñoz
    I have the following <asp:gridview> with one one TemplateField. En each cell there is an image with a link and a text with a link. It has AllowPaging=True This is the gridview: <asp:GridView ID="gvExperiencias" runat="server" AllowPaging="True" GridLines="None" ShowHeader="False" AutoGenerateColumns="False" Width="650px" PageSize="4" OnDataBinding="gvExperiencias_DataBinding" OnPageIndexChanging="gvExperiencias_PageIndexChanging"> <PagerSettings Mode="NumericFirstLast" FirstPageImageUrl="~/images/fle_pag_izq.gif" LastPageImageUrl="~/images/fle_pag_der.gif" NextPageImageUrl="~/images/fle_pag_der.gif" PreviousPageImageUrl="~/images/fle_pag_izq.gif" Position="TopAndBottom" PageButtonCount="4" FirstPageText="" LastPageText="" NextPageText="" PreviousPageText=""></PagerSettings> <Columns> <asp:TemplateField> <ItemTemplate> <div id="it_0" class="new_solo_exp_ini"> <asp:HyperLink ID="a_0" runat="server" NavigateUrl='<%# "experiencia.aspx?cod_cod=" + Eval("tttb_articulo_relacion_0.ARTCOD_ARTREL") + "&pag=" + pag + "&grp=" + Eval("idiocod_cod_idi_0") + "&cod="+cod %>' Visible='<%# Eval("NotEmpty_0") %>'> <asp:Image ID="Image_0" runat="server" Height="88px" ImageUrl='<%# Eval("arigls_nom_img_0","~/ArchivosUsuario/1/1/Articulos/{0}") %>' Width="88px" CssClass="new_image_exp_ini" /> </asp:HyperLink> <div class="new_vineta_tit_exp_ini"> <asp:HyperLink ID="HyperLink_0" runat="server" NavigateUrl='<%# "experiencia.aspx?cod_cod=" + Eval("tttb_articulo_relacion_0.ARTCOD_ARTREL") + "&pag=" + pag + "&grp=" + Eval("idiocod_cod_idi_0") + "&cod="+cod %>' Text='<%# Bind("arigls_tit_0") %>'> </asp:HyperLink> </div> </div> </ItemTemplate> </asp:TemplateField> </Columns> <PagerStyle CssClass="new_pag_bajo_exp_ini" /> <RowStyle CssClass="new_fila_exp_ini" /> </asp:GridView> When I click the last button or the ... it goes to the corresponding page but when i click on a previous page i get the following errror: An Error Has Occurred Because A Control With Id $ContentPlaceHolder1$gvExperiencias$ctl01$ctl01' Could Not Be Located Or A Different Control Is assigned to the same ID after postback. If the ID is not assigned, explicitly set the ID property of controls that raise postback events to avoid this error. So the pager does not work correctly. I think it's because of the Image's Id that has to be generated dinamically but i don't know how to do it. Can someone help me?

    Read the article

  • ASP.NET:Paging when deleting rows

    - by Niels Bosma
    I have a datagrid where a row can be deleted (using ajax). I'm have problem with the pager in the following scenario: Lets say my PageSize is 10, I have 101 rows so that's 11 pages with the last page with an single element. Let no assume that I'm on page 10 (PageIndex=9) and delete a row. Then I go to the 11'th page (who's now empty and doesn't really exist). ASP now shows me the EmptyDataTemplate and no pager so I can't go back. My approach (which isn't working) is to detect this scenario and step one page back: public void Bind() { gridMain.DataBind(); } public void SetPage(int page) { gridMain.PageIndex = page; gridMain.DataBind(); } protected void ldsGridMain_Selecting(object sender, LinqDataSourceSelectEventArgs e) { selectArgs = e; e.Result = (new EnquiryListController()).GetEnquiryList(OnBind(this), supplier); } protected void ldsGridMain_Selected(object sender, LinqDataSourceStatusEventArgs e) { totalRows = selectArgs.Arguments.TotalRowCount; //Detect if we need to update the page: if (gridMain.PageIndex > 0 && (gridMain.PageSize * gridMain.PageIndex + 1) > totalRows) SetPage(gridMain.PageIndex - 1); } protected void gridMain_PageIndexChanging(object sender, GridViewPageEventArgs e) { SetPage(e.NewPageIndex); } I can see that SetPage is called with the the right page index, but the databind doesn't seem to called as I still get the EmptyDataTemplate.

    Read the article

  • Silverlight Cream for April 02, 2010 -- #828

    - by Dave Campbell
    In this Issue: Phil Middlemiss, Robert Kozak, Kathleen Dollard, Avi Pilosof, Nokola, Jeff Wilcox, David Anson, Timmy Kokke, Tim Greenfield, and Josh Smith. Shoutout: SmartyP has additional info up on his WP7 Pivot app: Preview of My Current Windows Phone 7 Pivot Work From SilverlightCream.com: A Chrome and Glass Theme - Part I Phil Middlemiss is starting a tutorial series on building a new theme for Silverlight, in this first one we define some gradients and color resources... good stuff Phil Intercepting INotifyPropertyChanged This is Robert Kozak's first post on this blog, but it's a good one about INotifyPropertyChanged and MVVM and has a solution in the post with lots of code and discussion. How do I Display Data of Complex Bound Criteria in Horizontal Lists in Silverlight? Kathleen Dollard's latest article in Visual Studio magazine is in answer to a question about displaying a list of complex bound criteria including data, child data, and photos, and displaying them horizontally one at a time. Very nice-looking result, and all the code. Windows Phone: Frame/Page navigation and transitions using the TransitioningContentControl Avi Pilosof discusses the built-in (boring) navigation on WP7, and then shows using the TransitionContentControl from the Toolkit to apply transitions to the navigation. EasyPainter: Cloud Turbulence and Particle Buzz Nokola returns with a couple more effects for EasyPainter: Cloud Turbulence and Particle Buzz ... check out the example screenshots, then go grab the code. Property change notifications for multithreaded Silverlight applications Jeff Wilcox is discussing the need for getting change notifications to always happen on the UI thread in multi-threaded apps... great diagrams to see what's going on. Tip: The default value of a DependencyProperty is shared by all instances of the class that registers it David Anson has a tip up about setting the default value of a DependencyProperty, and the consequence that may have depending upon the type. Building a “real” extension for Expression Blend Timmy Kokke's code is WPF, but the subject is near and dear to us all, Timmy has a real-world Expression Blend extension up... a search for controls in the Objects and Timelines pane ... and even if that doesn't interest you... it's the source to a Blend extension! XPath support in Silverlight 4 + XPathPad Tim Greenfield not only talks about XPath in SL4RC, but he has produced a tool, XPathPad, and provided the source... if you've used XPath, you either are a higher thinker than me(not a big stretch), or you need this :) Using a Service Locator to Work with MessageBoxes in an MVVM Application Josh Smith posted about a question that comes up a lot: showing a messagebox from a ViewModel object. This might not work for custom message boxes or unit testing. This post covers the Unit Testing aspect. 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

  • Running KVM/XEN/Hyper-V VMs from a RAM disk, is this possible? Practical?

    - by Ausmith1
    Currently I'm using ESX (v3 and v4) to test a scripted OS (Windows 2003) and application install DVD. The DVD ISO (8GB) is mounted on a 1Gbps NFS datastore and the VMDK's (20GB) are on an SSD mounted via NFS over a 10Gbps link. It still takes a lot longer than I'd really like for to run through a test iteration and I'm wondering if mounting the virtual disks and ISO on a RAM disk on the same server as the hypervisor is running on would be worth my while. I can dedicate a server to this VM and 32GB of RAM in the system should be adequate to do the trick I'd guess. (1GB hypervisor OS, 28GB RAM disk and 2GB for the VM is < the 32GB available to me) Since hosting a RAM disk within ESX does not seem possible I'm open to trying KVM/Xen/Hyper-V. KVM would probably be my first choice of these three. Anyone out there tried this? Bear in mind this is purely for a test run of the installer, the VM will be discarded as soon as the test is completed so I'm not worried about losing data from the remote possibility of a power failure.

    Read the article

  • E-mails sent with postfix are marked as spam.

    - by unkown
    I am using gmail as my email provider, and I only have gmail servers for my mx records. I don't like the 500 message per day cap. To address this issue I would like to run postfix on my Linux machine to only send email, port 25 blocked by my firewall. I can send email, however google marks all messages sent with postfix as SPAM. How do I make sure that people know email sent with postfix is valid?

    Read the article

  • How to embed a text field on my desktop in Mac OS X?

    - by mechko
    How would I go about embedding a text field on my desktop? That is, I want to be able to type into it, but it needs to sit behind my windows at all times. I know I can use geektool to display text. Is there a similar program or piece of code that would allow me to do what I want? I am trying to hack together a twitter/fb/chat client which will not take up a separate window.

    Read the article

  • Cross-Platform Camera API

    - by Karim
    Hi, I'm now building a video transforming filter that have to transform video frames in real-time. One of the key requirements of the filter is to have high performance to minimize the number of dropped frames during the transform. Another requirement that is of lower priority but also nice to have is to make it cross-platform (both PC's and Mobile devices). The application is built in C++. Now my question is: is there any API that is more portable and has a similar or better performance characteristics than DirectShow? as DirectShow's portability is only limited to Windows-based devices (PCs and Windows Mobile&CE platforms). Also I've notices that for example using HTC's custom camera API has far better performance than what DirectShow offers. If you want to check this, try to build a filter in DirectShow that will multiply each color by 2 and render that in real-time from camera on the screen. Then do the same with HTC's API. There is almost 4-5x performance boost with vendor's specific API. So it'd be very nice if the library used the device-specific implementation of the driver, as performance is critical when doing this transforms on a mobile device (which is about ~500 MHz).

    Read the article

  • Algorithm to find the percentage of how much two texts are identical

    - by qster
    What algorithm would you suggest to identify how much from 0 to 1 (float) two texts are identical? Note that I don't mean similar (ie, they say the same thing but in a different way), I mean exact same words, but one of the two texts could have extra words or words slightly different or extra new lines and stuff like that. A good example of the algorithm I want is the one google uses to identify duplicate content in websites (X search results very similar to the ones shown have been omitted, click here to see them). The reason I need it is because my website has the ability for users to post comments; similar but different pages currently have their own comments, so many users ended up copy&pasting their comments on all the similar pages. Now I want to merge them (all similar pages will "share" the comments, and if you post it on page A it will appear on similar page B), and I would like to programatically erase all those copy&pasted comments from the same user. I have quite a few million comments but speed shouldn't be an issue since this is a one time thing that will run in the background. The programming language doesn't really matter (as long as it can interface to a MySQL database), but I was thinking of doing it in C++.

    Read the article

  • jQuery: Show tooltip without link

    - by bloggerious
    Is it possible to show a tooltip without making a link? For example, I have the following code without a link: <ul class="letters" title="This is the title"> <li>A</li> <li>B</li> <li>C</li> </ul> So how can I show the tooltip "This is the title" when I mouse over on it? Btw, I don't want to use any tooltip plugin.

    Read the article

  • ASP:GridView does not show data with ObjectdataSource

    - by Kashif
    I have been trying to bind a DataGrid with ObjectDataSource having custom paging but no output is display on my usercontrol. Here is the code I am using <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="LeadId" DataSourceID="dsBuyingLead1" AllowPaging="True"> <Columns> <asp:BoundField DataField="Subject" HeaderText="Subject" ReadOnly="True" /> <asp:BoundField DataField="ExpiryDate" HeaderText="ExpiryDate" ReadOnly="True" /> </Columns> </asp:GridView> <asp:ObjectDataSource ID="dsBuyingLead1" runat="server" EnablePaging="True" DataObjectTypeName="Modules.SearchBuyingLeadInfo" OldValuesParameterFormatString="original_{0}" SelectMethod="GetAllBuyingLeads" StartRowIndexParameterName="startRow" MaximumRowsParameterName="maximumRows" SelectCountMethod="GetAllBuyingLeadsCount" TypeName="Modules.SearchController"> <SelectParameters> <asp:QueryStringParameter Name="searchText" QueryStringField="q" Type="String" /> </SelectParameters> </asp:ObjectDataSource> Here are my methods from SearchController class: [DataObjectMethod(DataObjectMethodType.Select)] public static long GetAllBuyingLeadsCount(string searchText) { return DataProvider.Instance().GetAllBuyingLeadsCount(searchText); } [DataObjectMethod(DataObjectMethodType.Select)] public static List<SearchBuyingLeadInfo> GetAllBuyingLeads (string searchText, int startRow, int maximumRows) { List<SearchBuyingLeadInfo> l = CBO.FillCollection<SearchBuyingLeadInfo> ( DataProvider.Instance() .GetAllBuyingLeadswithText(searchText, startRow, maximumRows) ); return l; } Where SearchBuyingLeadInfo is my Data Access Object class I have verified by setting up break points that both GetAllBuyingLeadsCount and GetAllBuyingLeads return non-zero values but unfortunately nothing is displayed on the grid. Only the column headers are displayed. Can anyone tell me what am I missing?

    Read the article

  • How does compiler use lib file ?

    - by Xinus
    I am curious about how c/c++ compiler analyse lib files ? I mean say I create a library containing some classes, I am using that library in my main program. How does compiler know what class names are there in that library. Of course that information is present in binary format, I want to use that functionality in my program, to be specific I have a binary lib file and I want to know all classes and properties/functions present in that lib file. Is it possible ? If compiler can do that why can't some library ? thanks for any clue

    Read the article

  • E-mail sent with postfix are marked as spam.

    - by unkown
    I am using gmail as my email provider, and I only have gmail servers for my mx records. I don't like the 500 message per day cap. To address this issue I would like to run postfix on my Linux machine to only send email, incoming port 25 blocked by my firewall. I can send email, however google marks all messages sent with postfix as SPAM. How do I make sure that people know email sent with postfix is valid?

    Read the article

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