RSS

Category Archives: .NET

The .NET framework is a software framework (designed mainly for the Microsoft Windows operating system). It includes an implementation of the Base Class Library, Common Language Runtime, and Dynamic Language Runtime. It supports many programming languages, including C#, VB.NET, F# and C++.

Online code compiling and execution for some languages


Hi dear reader,

Today’s post is about Rextester. An online tools for anyone who finds them useful, Initially was started as online .net regular expression tester.

Regex tester – .net regex tester.
Regex replace – .net regex replacement.
Regex reference – short regex reference.
Diff checker – find difference between two text fragments.
Run code – online compiling and execution for some languages.

Rextester provides online code compilation for C# or also named C sharp, using .NET framework 4. The executing code will be given max 5 seconds of CPU time and limited memory (~100 mb). Also executing code will run in an appdomain with basic execution rights, reflection and thread control privileges only.
The entry point for you code is given Main method in type Program in namespace Rextester. This entry point can’t be changed.

C sharp types from the following assemblies are available:

  • System.dll
  • System.Core.dll
  • System.Data.dll
  • System.Data.DataSetExtensions.dll
  • System.Xml.dll
  • System.Xml.Linq.dll
  • Microsoft.CSharp.dll – when C# is used
  • Microsoft.VisualBasic.dll – when Visual Basic is used
  • System.Web.dll
  • System.ComponentModel.DataAnnotations.dll
  • System.ComponentModel.Composition.dll

SQL Server 2008 R2 server is also supported. There is only one database that queries executed. Queries executed on behalf dbowner so all sort of actions are allowed including DDL queries. However, all actions run in transaction which is rolled back immediately after execution is over. This way any desired objects may be built, populated with data and worked on within the scope of one request. There is 10 seconds limit for work to be completed. Execution of queries is achieved using ADO.NET mechanisms, in particular SqlDataReader type. This reader is also monitored for memory and CPU consumption.
‘GO’ statement just like in T-SQL has special meaning: ‘GO’ will be removed from your code, but statements separated by ‘GO’ will be executed separately, in different batches. So, for example, if you want to create a function and later use it in select statement you have to separate create statement and select statement by ‘GO’, otherwise you’ll receive an error from parser since in select statement you would be referring to a function which doesn’t yet exist.
For convenience there is simple pre-built schema, shown here.

There are some other languages which run on linux. Here are compiler versions:

  1. Assembly – nasm 2.09.04
  2. C++ – g++ 4.5.2 (g++ -Wall)
  3. C – gcc 4.5.2 (gcc -Wall)
  4. Haskell – ghc 6.12.3
  5. Java – Sun’s implementation of java, compiler version 1.6.0_26 (javac -Xlint -encoding UTF-8  |  java -Dfile.encoding=UTF-8)
  6. Javascript – V8 3.12.3
  7. Lua – lua 5.0.3
  8. Objective-C – gcc 4.5.2 (gcc -Wall -lobjc)
  9. Pascal – fpc 2.4.0
  10. Perl – perl 5.10.1 (perl -w)
  11. Php – php 5.3.5
  12. Python – python 2.7.1
  13. Ruby – ruby 1.8.7 (ruby -w -W1)

I do not intent to promote something here but I liked something and sharing is good.

For more details follow the www.rextester.com

 
Leave a comment

Posted by on July 31, 2012 in .NET, C#, Introduction, JavaScript, SQL, Utility

 

Tags: , , , , , , , , , , ,

HBCode – WPF With The Model-View-ViewModel Design Pattern and Entity Framework


This post is in reference to my previous post on WPF With The Model-View-ViewModel Design Pattern and Entity Framework.

I just made an early alpha release of the wpf application on codeplex – HBCode.

I hope peope will like and I would get more responses.

Here are few screen previews:

 
4 Comments

Posted by on April 30, 2012 in .NET, C#, Entity Framework, WPF

 

Tags: , , , , , , , , ,

Creating a desktop shortcut for a Click Once application


Nice video on Creating a desktop shortcut for a Click Once application

RobinDotNet's Blog

This GoldMail shows how to create a desktop shortcut for your ClickOnce application. The code can be used for any ClickOnce application, assuming you set your attributes accordingly.
 
 
This download contains the sample code (VS2008, C#). If you are a VB developer and can’t figure out how to translate this to VB, post a query and I’ll see what I can do for you.
ClickOnce_DesktopShortcut.zip

July 19, 2009 edit: Here is a link to the follow-up post that provides the code and implementation details for doing same in VB.

ClickOnce Desktop Shortcut Using VB

[edit 7/7/2011 Move zip file to Azure blob storage]

[edit 3/8/2014 Move to different Azure blob storage]

View original post

 
Leave a comment

Posted by on April 5, 2012 in .NET, Winforms

 

Tags:

What is error AjaxControlToolkit.CommonToolkitScripts ?


In asp.net application, check below ASP.NET HTML and Javascript code

Problem case:

<aspext:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
      <Scripts>
           <asp:ScriptReference Name="AjaxControlToolkit.Common.Common.js" Assembly="AjaxControlToolkit" />
           <asp:ScriptReference Name="AjaxControlToolkit.ExtenderBase.BaseScripts.js" Assembly="AjaxControlToolkit" />
      </Scripts>
</aspext:ToolkitScriptManager>
<asp:Panel ID="Panel1" runat="server" ClientIDMode="Static" />

<script type="text/javascript" language="javascript">
      function getPosition() {
           var commonObj = new AjaxControlToolkit._CommonToolkitScripts();
           $common.setBounds($get("Panel1"),
           {
                x : 100,
                y : 200,
                width : 200,
                height : 100
           }
      }
 </script>
The assembly 'AjaxControlToolkit, Version=4.1.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' does not contain a Web resource that has the name 'AjaxControlToolkit.Common.Common.js'. Make sure that the resource name is spelled correctly. Make sure that the application references the correct version of an ASP.NET AJAX Framework assembly

Possible Solution:

1. Try using ScriptManager instead of ToolkitScriptManager as below

<asp:ScriptManager ID="ScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Name="AjaxControlToolkit.Common.Common.js" Assembly="AjaxControlToolkit" />
                <asp:ScriptReference Name="AjaxControlToolkit.ExtenderBase.BaseScripts.js" Assembly="AjaxControlToolkit" />
            </Scripts>
</asp:ScriptManager>

2. Check the version of your ASP.NET application, because above scripts are for .NET 3.5 sp1 as mentioned here on www.asp.net.

Reference from my answer on StackOverflow

 
 

Tags: , , , , , ,

Quick Update on “WPF With The MVVM and Entity Framework”


Due to lack of time, the demo application is being delayed which I mentioned here, but (for time being) you could have the other application mentioned as ‘Book Library’ from WPF Application Framework on codeplex.

Cheers 😀

UPDATE

check here for more HBCode – WPF With The Model-View-ViewModel Design Pattern and Entity Framework

 
3 Comments

Posted by on March 30, 2012 in .NET, C#, Entity Framework, WPF

 

Tags: , , ,