Search Results

Search found 3677 results on 148 pages for 'cs 79'.

Page 103/148 | < Previous Page | 99 100 101 102 103 104 105 106 107 108 109 110  | Next Page >

  • How to port C# code which uses a callback to VB.NET?

    - by Bob
    I need to port the following from the ASP.NET MVC 2 sourcecode from C# to VB.NET. It's from AuthorizeAttribute.cs beginning on line 86: HttpCachePolicyBase cachePolicy = filterContext.HttpContext.Response.Cache; cachePolicy.SetProxyMaxAge(new TimeSpan(0)); cachePolicy.AddValidationCallback(CacheValidateHandler, null /* data */); where CacheValidateHandler is: private void CacheValidateHandler(HttpContext context, object data, ref HttpValidationStatus validationStatus) { validationStatus = OnCacheAuthorization(new HttpContextWrapper(context)); } The VB.NET port from http://converter.telerik.com doesn't quite work for this line: cachePolicy.AddValidationCallback(CacheValidateHandler, Nothing) ' Error where CacheValidateHandler is: Private Sub CacheValidateHandler(ByVal context As HttpContext, ByVal data As Object, _ ByRef validationStatus As HttpValidationStatus) validationStatus = OnCacheAuthorization(New HttpContextWrapper(context)) End Sub VS2008 complains that CacheValidateHandler does not specify its arguments for context, data, and validationStatus. Any ideas how to port this code?

    Read the article

  • Change the image height and width based on the scale?

    - by user281947
    I want to resize the image height and width after setting its scale, below is what i am doing : <Image x:Name="img" Source="sii.PNG" > <Image.RenderTransform> <ScaleTransform x:Name="scale" /> </Image.RenderTransform> </Image> below is the cs code : void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e) { scale.ScaleX = scale.ScaleY =e.NewValue; //here i have to change the height and width of an image }

    Read the article

  • Text property in a UserControl in C#

    - by yeyeyerman
    I have a control with a inner TextBox. I want to make a direct relationship between the Text property of the UserControl and the Text property of the TextBox. The first thing I realized is that Text was not being displayed in the Properties of the UserControl. Then I added the Browsable(true) attribute. [Browsable(true)] public override string Text { get { return m_textBox.Text; } set { m_textBox.Text = value; } } Now, the text will be shown for a while, but then is deleted. This is because the information is not written within the xxxx.Designer.cs. How can this behviour be changed?

    Read the article

  • How does the dataset designer determine the return type of a scalar query?

    - by Tobias Funke
    I am attempting to add a scalar query to a dataset. The query is pretty straight forward, it's just adding up some decimal values in a few columns and returning them. I am 100% confident that only one row and one column is returned, and that it is of decimal type (SQL money type). The problem is that for some reason, the generated method (in the .designer.cs code file) is returning a value of type object, when it should be decimal. What's strange is that there's another scalar query that has the exact same SQL but is returning decimal like it should. How does the dataset designer determine the data type, and how can I tell it to return decimal?

    Read the article

  • Clear the form once form submitted

    - by zurna
    Once the form submitted, response from another page is printed to #GameStorySys. But values entered to the form still stays there. Is it possible for the form values to disappear (but the form should still stay) once the form submitted? $("[name='GameStoryForm']").click(function() { $.ajax({ type: "POST", data: $("#GameStoryForm").serialize(), url: "content/commentary/index.cs.asp?Process=EditLiveCommentaryStory&CommentaryID=<%=Request.QueryString("CommentaryID")%>", success: function(output) { $('#GameStorySys').html(output); }, error: function(output) { $('#GameStorySys').html(output); } }); });

    Read the article

  • Creating a relative path to a Database in Asp.net for a library

    - by Greener
    In school I am part of a team of four working to create a GUI to translate the paper records of a made-up company and their functionality to a digital format. We're using an ASP.NET website for this purpose. Basically we use stored procedures and C# classes to represent the database. The folder we're using for the project contains the site and the libraries in separate folders. If I try to open the site from the folder containing both these elements the site will not run. I want to know if there is some way I can set up a relative path to the database in the Settings.Settings.cs file (or by some other means) of my libraries so I don't have to constantly change the database location for the connection string value every time we move the project. I suppose I should also mention that the database is in an App_Data folder.

    Read the article

  • How is the implicit segment register of a near pointer determined?

    - by Daniel Trebbien
    In section 4.3 of Intel 64® and IA-32 Architectures Software Developer's Manual. Volume 1: Basic Architecture, it says: A near pointer is a 32-bit offset ... within a segment. Near pointers are used for all memory references in a flat memory model or for references in a segmented model where the identity of the segment being accessed is implied. This leads me to wondering: how is the implied segment register determined? I know that (%eip) and displaced (%eip) (e.g. -4(%eip)) addresses use %cs by default, and that (%esp) and displaced (%esp) addresses use %ss, but what about (%eax), (%edx), (%edi), (%ebp) etc., and can the implicit segment register depend also on the instruction that the memory address operand appears in?

    Read the article

  • Is there any Application Server Frameworks for other languages/platforms than JavaEE and .NET?

    - by Jonas
    I'm a CS student and has rare experience from the enterprise software industry. When I'm reading about enterprise software platforms, I mostly read about these two: Java Enterprise Edition, JavaEE .NET and Windows Communication Foundation By "enterprise software platforms" I mean frameworks and application servers with support for the same characteristics as J2EE and WCF has: [JavaEE] provide functionality to deploy fault-tolerant, distributed, multi-tier Java software, based largely on modular components running on an application server. WCF is designed in accordance with service oriented architecture principles to support distributed computing where services are consumed by consumers. Clients can consume multiple services and services can be consumed by multiple clients. Services are loosely coupled to each other. Is there any alternatives to these two "enterprise software platforms"? Isn't any other programming languages used in a bigger rate for this problem area? I.e Why isn't there any popular application servers for C++/Qt?

    Read the article

  • Example applications and benefits of using "C" , "C++" or "Java"

    - by Waltzy
    Ok, I'm revising for my upcoming year 2 exams on a CS course and its likely something like this will come up. my question is what is an ideal application that would especially benefit from the program features of each of the three languages? I have a vague idea but getting a second opinion could really help. JavaPortability, easy - good for GUIs. C++Fast but may requite significant changes in order to be moved from system to system, good for image processing. CI'm unsure here small embedded applications? Some clarification on this would be really appreciated, thanks again StackOverflow

    Read the article

  • Splitting Nucleotide Sequences in JS with Regexp

    - by TEmerson
    I'm trying to split up a nucleotide sequence into amino acid strings using a regular expression. I have to start a new string at each occurrence of the string "ATG", but I don't want to actually stop the first match at the "ATG". Valid input is any ordering of a string of As, Cs, Gs, and Ts. For example, given the input string: ATGAACATAGGACATGAGGAGTCA I should get two strings: ATGAACATAGGACATGAGGAGTCA (the whole thing) and ATGAGGAGTCA (the first match of "ATG" onward). A string that contains "ATG" n times should result in n results. I thought the expression /(?:[ACGT]*)(ATG)[ACGT]*/g would work, but it doesn't. If this can't be done with a regexp it's easy enough to just write out the code for, but I always prefer an elegant solution if one is available.

    Read the article

  • issue with c# xml documentation

    - by galford13x
    I have the following comment. /// <summary> /// MSDN Time Format compatible with <see cref="DateTime.ParseExact(string, string, IFormatProvider)"/> /// </summary> /// <returns>MSDN Time Format compatible with <see cref="DateTime.ParseExact(string, string, IFormatProvider)"/></returns> but I'm not sure why I receive the following warning Warning 7 XML comment on 'MSLab.DateTime.SystemTimeProvider.GetTimeFormat()' has cref attribute 'DateTime.ParseExact(string, string, IFormatProvider)' that could not be resolved F:\My Documents\Visual Studio 2010\Projects\MSLab\trunk\MSLab\MSLab\DateTime\SystemTimeProvider.cs 110 57 MSLab

    Read the article

  • C++ Questions about vectors

    - by xbonez
    Hey guys, I have a CS exam tomorrow. Just want to get a few questions cleared up. Thanks a lot, and I really appreciate the help. Que 1. What are parallel vectors? Vectors of the same length that contain data that is meant to be processed together Vectors that are all of the same data type Vectors that are of the same length Any vector of data type parallel Que 2. Arrays are faster and more efficient than vectors. True False Que 3. Arrays can be a return type of a function call. True False Que 4. Vectors can be a return type of a function call. True False

    Read the article

  • Visual Studio swapping code between projects?!?!?!?!??!

    - by Tom
    Are there any known issues with visual studio and code being swapped between projects? I had a project running in VS2008 and when i went back to it, the code from another project had been swapped in the Program.cs class. I havent made any mistakes, im not talking about some code- i mean the whole project had been swapped out. Its as if the .proj files or .soln files had been swapped from their project folders??? EDIT Ive restarted laptop, opened the code again and its still showing the wrong code BUT when i execute it, its the right code?!?!?!

    Read the article

  • Changing careers to Software Engineering.... Wise?

    - by Phil
    Hello everyone, I notice this site has a wealth of software professionals and I am investigating a career change to Software Engineering: *Particularly, I would like to know how likely one would be able to work from home or another country over the internet. Is this something that can be done and what does it usually entail? (time?,experience?, specific companies?, etc) *Currently, I am a teacher but always had a passion for tech. I am interested in a MS - Software Engineering program designed for individuals based from another field. Is this a wise degree to obtain? Would I be just wasting my time and money obtaining this degree? (I'm suspicious about this program and the feasibility of obtaining employment without a healthy CS background) Thanks for any assistance you can provide!

    Read the article

  • avoid caching of page in browser

    - by Shan
    I am using an iframe to show the child pages.In that one one particular page contains hidden div and i am showing it as a pop-up like thing with javascript by changing the visibility of the hidden div. Problem is before showing the hidden div , some manipulations are done at server level and I am calling the div from C# code after the manipulations like Page.ClientScript.RegisterStartupScript(GetType(), "MyKey", "javascript:OpenModelPopup('cb','cs');", true); so the page is getting posted back and the div is shown. after this, after going to next page if i click browser back it shows that page with that hidden div and on next click of browser back gives the page without hidden div. but I want to show only the initial stage of the page ie. without showing the hidden div that stage with hidden div should not be cached or it should not be shown on click of browser back.

    Read the article

  • Programmatically Setting the Version of a Window's Service on the ProjectInstaller

    - by user302004
    I have a Windows Service created in Visual Studio 2005 in C#. I have a setup project and a ProjectInstaller class. I also have code to programmatically get the version from the AssemblyFileVersionAttribute. I need to figure out where I set the version that I've obtained (and where this code should go). I tried placing it in the InitializeComponent method on ProjectInstaller.Designer.cs and then appending the version to serviceInstaller1.DisplayName and serviceInstaller1.ServiceName. This didn't work and you're not supposed to modify the contents of this method. Any ideas?

    Read the article

  • SiteCore 6.5 - GeneralLink

    - by Steve Ward
    Im new to SiteCore.. I have created a Page template and add a field for a URL of type General Link. I have created another field for the text for the link (this is standard practice in this project). I simply want to display the link in my user control but I just cant get it to work. This should be simple but Im going round in circles Here's an example of the code I've tried .. ascx : ascx.cs: lnkMain.NavigateUrl = SiteCore.Context.Item.GetGeneralLink("Link1"); lnkMain.Text = item.GetFieldValue("Link1Text");

    Read the article

  • Should I use C(99) booleans ? ( also c++ booleans in c++ ?)

    - by Roman A. Taycher
    I haven't done much c programming but when I do when I need a false I put 0 when I want true I put 1, (ex. while(1)), in other cases I use things like "while(ptr)" or "if(x)". Should I try using C99 booleans, should I recommend them to others if I'm helping people new to programming learn c basics(thinking of cs 1?? students)? I'm pretty sure the Visual Studio compiler supports c99 bools, but do a lot of projects (open source and c apps in industry) compile for c89? If I don't use C bools should I at least do something like #define TRUE 1 #define FALSE 0? Also what about c++ Booleans (for c++)?

    Read the article

  • Error message regarding IEnumerable.GetEnumerator().

    - by Bon_chan
    I get this error message and I can't figure out why! Error 1 'Exo5Chap12.ShortCollection<T>' does not implement interface member 'System.Collections.IEnumerable.GetEnumerator()'. 'Exo5Chap12.ShortCollection<T>.GetEnumerator()' cannot implement 'System.Collections.IEnumerable.GetEnumerator()' because it does not have the matching return type of 'System.Collections.IEnumerator'. E:\MyFolders\Dev\c#\Chapter12\Exo5Chap12\Exo5Chap12\exo5.cs 9 18 Exo5Chap12 Here is the code with an implementation of GetEnumerator(). What is wrong? public class ShortCollection<T> : IList<T> { protected Collection<T> innerCollection; protected int maxSize = 10; public IEnumerator<T> GetEnumerator() { return (innerCollection as IEnumerator<T>).GetEnumerator(); } }

    Read the article

  • Did anybody use the constream (constrea.h) lib?

    - by user337938
    Two years ago, I used the conio.h (actually conio2.h for Dev-C++) to create a console form interface. Now I want to make the same thing, but C++ std lib does not provide the needed functions and I don't want to use the old C conio lib. I found some websites which highlights the constream lib, but I have no idea to use it on VS! I tried just copying the header file into my project, but VS show several erros. I believe I am doing something wrong. ps: i got this file: ftp://ftp.cs.technion.ac.il/pub/misc/baram/TC31/INCLUDE/CONSTREA.H

    Read the article

  • Thread 0 crashed with X86 Thread State (32-bit): in cocoa Application

    - by John
    I am doing crash fixing in an osx application .The crash report shows Date/Time: 2012-05-01 16:05:58.004 +0200 OS Version: Mac OS X 10.5.8 (9L31a) Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000545f5f00 Crashed Thread: 8 Thread 8 crashed with X86 Thread State (32-bit): eax: 0x140e0850 ebx: 0x00060fc8 ecx: 0x92df0ec0 edx: 0xc0000003 edi: 0x545f5f00 esi: 0x140e0870 ebp: 0xb0445988 esp: 0xb0445964 ss: 0x0000001f efl: 0x00010206 eip: 0x92dca68c cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x0000001f gs: 0x00000037 cr2: 0x545f5f00 How to tares the application code with this report? what is Thread 0 crashed with X86 Thread State (32-bit)? if anybody know please help me. Thanks in advance.

    Read the article

  • Catching / Redirecting 404's (ASP.NET)

    - by maxp
    Ive noticed that when I request a page in ASP.NET (webforms) that does not exist, the 'StaticFile' handler deals with the error notification. Id like to be a bit more helpful in these situations. What is the correct way for me to intercept this 404, and as a result, run some code to redirect the user? Two ways Ive thought of doing which I currently don't really like are: 1 - Create a module that basically does a if (!file.exists($url){redirect to $correctedurl}) 2 - Modify the error.aspx.cs(or the default error page) to do something similar (yuck!)

    Read the article

  • IEnumerable<SelectListItem> error question

    - by user281180
    I have the following code, but i`m having error of Error 6 foreach statement cannot operate on variables of type 'int' because 'int' does not contain a public definition for 'GetEnumerator' C:\Dev\DEV\Code\MvcUI\Models\MappingModel.cs 100 13 MvcUI How can I solve this? Note: string [] projectID; Class Employee { int id {get; set;} string Name {get;set;} } public IEnumerable<SelectListItem> GetStudents() { List<SelectListItem> result = new List<SelectListItem>(); foreach (var id in Convert.ToInt32(projectID)) { foreach( Employee emp in Project.Load(id)) result.Add(new SelectListItem { Selected = false, Text = emp.ID.ToString(), Value = emp.Name }); return result.AsEnumerable(); } }

    Read the article

  • Hilighting div tag in Masterpage on redirection to content page

    - by user1713632
    I have a link in Master page within a div tag. I want to highlight the div when I am clicking the link, in order to redirect to some content page. I have written the following code: <li> <div id="div_test" runat="server"> <asp:LinkButton ID="lnk_test_menu" Font-Underline="false" ForeColor="Black" runat="server" Text="Test Link" CausesValidation="false" onclick="lnk_test_menu_Click1" > </asp:LinkButton></div> </li> Code in the cs page: protected void lnk_test_menu_Click1(object sender, EventArgs e) { div_test.Attributes.Add("class", "testSelected"); Response.Redirect(Test.aspx"); } The div in the master page is not being selected on redirection. Could anybody help me on this?

    Read the article

  • Data binding of itemscontrol in Silverlight 3.0

    - by jmkarthik
    I am trying to define an itemscontrol and data bind it to a List and the code is as below. XAML Item Class public class Item { public string val; } XAML.cs public MainPage() { InitializeComponent(); List<Item> items = new List<Item>(); Item item1 = new Item(); item1.val = "iasl;fdj1"; items.Add(item1); Item item2 = new Item(); item2.val = "iasfdkasdkljf2"; items.Add(item2); ic.ItemsSource = items; } The items are displayed when I run this. Am I missing something?

    Read the article

< Previous Page | 99 100 101 102 103 104 105 106 107 108 109 110  | Next Page >