This is a mirror of official site: http://jasper-net.blogspot.com/

Хотите построить успешный бизнес в сфере программных продуктов?

| Thursday, November 17, 2011
6332070190_5baf68a04c_o.png

Наверняка многие программисты ответят, что с хорошего кода и идеи, менеджеры — идеи и бизнес-плана, художники — вдохновения и т.д. Мнений, как видите, много, но на самом деле самым верным решением будет построение бизнес-модели (возражения приветствуются, но, желательно, на своем примере и после прочтения поста до конца).

Методик масса, лично я считаю наиболее полезной Business ModelCanvas, но не настаиваю. Всем, кто только начинает свой бизнес, рекомендую попробовать заполнить canvas, а всем, кто уже вовсю работает, и может быть даже зарабатывает, предлагаю проверить свою бизнес-модель с помощью восьми вопросов от Алекса Остервальдера.


Read more: Habrahabr.ru
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=habrahabr.ru/blogs/startup/132648/

Posted via email from Jasper-net

Back To Basics - Dispose Vs Finalize

|
Introduction

We have been using the Dispose method for disposing objects in .NET. For the same purpose, we may also use the Finalize method. In this article I will try to explain what the Dispose and the Finalize methods are and where to use the Finalize and where to use the Dispose. I will also try to explain the difference between them.

Dispose

Garbage collector (GC) plays the main and important role in .NET for memory management so programmer can focus on the application functionality. Garbage collector is responsible for releasing the memory (objects) that is not being used by the application. But GC has limitation that, it can reclaim or release only memory which is used by managed resources. There are a couple of resources which GC is not able to release as it doesn't have information that, how to claim memory from those resources like File handlers, window handlers, network sockets, database connections etc. If your application these resources than it's programs responsibility to release unmanaged resources. For example, if we open a file in our program and not closed it after processing than that file will not be available for other operation or it is being used by other application than they can not open or modify that file. For this purpose FileStream class provides Dispose method. We must call this method after file processing finished. Otherwise it will through exception Access Denied or file is being used by other program.
Close Vs Dispose

Some objects expose Close and Dispose two methods. For Stream classes both serve the same purpose. Dispose method calls Close method inside.

void Dispose()
{
      this.Close();
}

Here question comes, why do we need Dispose method in Stream. Having Dispose method will enable you to write below code and implicitly call dispose method and ultimately will call Close method.

using (FileStream file = new FileStream("path", FileMode.Open, FileAccess.Read))
{
      //Do something with file
}


Read more: C# Corner
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://www.c-sharpcorner.com/UploadFile/nityaprakash/back-to-basics-dispose-vs-finalize/

Posted via email from Jasper-net

How to: Detect ARP Spoofing under UNIX or Linux

|
Q. I would like to know - how do I detect ARP spoofing? I am using Debian Linux.

A. Use arpwatch command to keeps track for ethernet/ip address pairings. It logs message or activity to syslogs and reports certain changes via email.

Arpwatch uses pcap to listen for arp packets on a local ethernet interface.
Install arpwatch

Use apt-get command under Debian / Ubuntu Linux:
# apt-get install arpwatch
OR
$ sudo apt-get install arpwatch
arpwatch command examples

You can watch particular interface with command:
# arpwatch -i eth0

You will notice syslog entries as follows /var/log/syslog file (or /var/log/message file) when changes are made i.e MAC/IP address pair is changed:
# tail -f /var/log/syslogOutput:

Nov 10 15:59:34 debian arpwatch: new station 192.168.1.2 0:17:9a:a:f6:44 eth0

Above entry displays new workstation. If changes are made you should see something as follows:

Nov 10 15:59:34 debian arpwatch: changed station 192.168.1.2 0:17:9a:b:f6:f6
(0:17:9a:a:f6:44)


Read more: nixCraft
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://www.cyberciti.biz/faq/how-to-detect-arp-spoofing-under-unix-or-linux/

Posted via email from Jasper-net

PacketFence

|
What is PacketFence ?

PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) solution. Boasting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, powerful guest management options, 802.1X support, layer-2 isolation of problematic devices; PacketFence can be used to effectively secure networks small to very large heterogeneous networks. Among the different markets are :

    banks
    colleges and universities
    engineering companies
    convention and exhibition centers
    hotels
    manufacturing businesses
    school boards (K-12)

.. and many more!

Released under the GPL, PacketFence is built using trusted open source components that allows it to offer an impressive amount of features.

Read more: PacketFence
QR: home.html

Posted via email from Jasper-net

Next-Gen Xbox codenamed "Loop" and will run Windows 9?

| Wednesday, November 16, 2011
Cheaper, Smaller, and running Windows 9. That's what recent rumours are suggesting, the next generation Xbox console could be revealed running the unannounced Windows 9 operating system at E3 2012, and has been rumoured to be codenamed Loop.

Even though Windows 8 isn't publicly available yet, new rumours are suggesting that Microsoft is planning to run the Windows 9 operating system on the next generation Xbox console.

MS Nerd, who is known for being correct with trusted sources says: "The Xbox is another story altogether. With a heady mix of rumors, tips and speculation, I am now stating that Xbox codename “loop” (the erstwhile XboxTV) will indeed debut a modified Win9 core."

He continues: "It will use a Zune HD-like hardware platform—a “main” processor with multiple dedicated assistive cores for graphics, AI, physics, sound, networking, encryption and sensors. It will be custom designed by Microsoft and two partners based on the ARM architecture. It will be cheaper than the 360, further enabling Kinect adoption. And it will be far smaller than the 360. It will also demonstrate how Windows Phone could possible implement Win9’s dev platform on the lower end."

The next generation Xbox console is also rumoured to be revealed at E3 2012, and released sometime in 2013, but MS Nerd thinks that Windows 9 RTM will be released at E3 2014. Could Microsoft be holding the next generation console back until Windows 9 code is finished?

Read more: WinBeta
QR: next-gen-xbox-codenamed-loop-and-will-run-windows-9

Posted via email from Jasper-net

MSBuild Extension Pack November 2011

|
The MSBuild Extension Pack November 2011 release provides a collection of over 415 MSBuild tasks. A high level summary of what the tasks currently cover includes the following:

    System Items: Active Directory, Certificates, COM+, Console, Date and Time, Drives, Environment Variables, Event Logs, Files and Folders, FTP, GAC, Network, Performance Counters, Registry, Services, Sound
    Code: Assemblies, AsyncExec, CAB Files, Code Signing, DynamicExecute, File Detokenisation, GUID’s, Mathematics, Strings, Threads, Xml, Zip Files
    Applications: BizTalk 2006 / 2010, Email, IIS6, IIS7, MSBuild, SourceSafe, SQL Server 2005, SQL Server 2008, StyleCop, Twitter, Team Foundation Server, Visual Basic 6, Windows Virtual PC, WMI


Read more: Codeplex
QR: 66799

Posted via email from Jasper-net

Hosting a WCF service on GoDaddy

|
For one of my projects, I need to use a WCF service to perform some data manipulations. It is targeting .NET Framework 3.5. It is all good when I try to test the service locally – either in the context of the ASP.NET development server or in the context of IIS7 – no problems at all with the default configuration.

The problem was quite unexpected – when I decided to host my service on my own space (paying for hosting with GoDaddy – Windows Server hosting [IIS7] with .NET support), it didn’t work. What I did is I created a simple folder using a FTP client called svc35 in the server root and copied the code-behind and the service files into that folder. When I tried accessing the service from the web browser, all I’ve got was this error message:

image_thumb_3.png

Read more: .NET Zone
QR: hosting-wcf-service-godaddy

Posted via email from Jasper-net

New Tool for Debugging Parallel Applications in Visual Studio 11

|
Microsoft has released the Parallel Visualization Pack for Visual Studio 11 Developer Preview. Built to extend the functionality of the new Parallel Watch Window, the pack includes visual tools to aid in debugging multithreaded applications.

The Parallel Watch Window allows developers to view objects and values across all the threads in an application. Threads can be sorted, flagged or frozen while the rest of the application executes. The Visualization Pack adds a set of four visualizers to the Parallel Watch Window:

Heat Map
The Heat Map displays values on either a clustered, linear or logarithmic scale, to help spot uneven distribution of data across threads.

Histogram
A graph that groups the value of an expression with the number of occurrences across threads. It also allows the user to display any undefined values in the application.

Scatterplot
This visualizer creates a graph of data on an x-y axis to help spot outliers.


Read more: InfoQ
Read more: Visual Studio Gallery
QR: 384b40c9-b27f-4e32-a4df-1aab4c4c9c27

Posted via email from Jasper-net

Real time communications over UDP protocol

|
Introduction 

Fast and reliable communications is a basic requirement in almost all modern applications, but the real time systems take it to extreme and require real time responses from the network. In some cases, the requirements are so tough that may require special hardware to achieve desired performance. During the last decade, new technologies have emerged to support the growing demand, but their prices are high and availability is low. As a result, most of the systems are still using TCP/IP protocols stack over Ethernet backbone. Moreover, most of the programmers are still developing with well-known synchronous sockets API. This article explores usage of these dominating technologies in the real time systems and shows how to design and develop communications within such systems. In particular, it proposes reliable protocol over UDP transport layer, that gains less than one millisecond average round trip time (RTT) and processes dozens of thousands of messages every second at each and every port in network. 

Background 

Real time networking is a non-easy task, so before move any further, system connectivity requirements must be analyzed. The right way to do it is to map and classify traffic in the system. First classification to be made is messages sizes and their latency requirements. In many cases, these two parameters are sufficient to choose transport protocols and network topology.

Let us start with the transport protocol choice. Since this article concentrates on TCP/IP, our choice will be between TCP and UDP. The table below proposes protocol selection rules:

There is a question sign in low latency and large messages cell in the table above. In this specific case, we should consider different approaches, such as RDMA over Infiniband™, but these technologies are not in scope of this article.
TCP

Long messages may contain database tables, pictures, videos, bunches of parameters and other types of data which must be moved around the system without compromising its performance. The TCP protocol is dealing quite well with big amounts of data. Long messages allow TCP to warm up its engines and find best fit for sliding window to avoid retransmits and achieve good utilization of bandwidth. But as latency requirement become tighter, the TCP protocol exposers its weaknesses.

First, the TCP latency is not deterministic. Consider server with multiples clients. Clients are sharing the same link and thus their traffics affect each other latency. Given the fact that the TCP protocol is lacking fairness and quality of service features, the latency variation may exceed hundreds of milliseconds. Moreover, in case of multiple clients, the bandwidth utilization may significantly drop down (in legacy systems it may collapse to 50%).

Another problem that TCP suffers from is slow recovery process. Regular recovery for a lost TCP fragment may take hundreds of milliseconds. There are some tricks which allow reducing recovery time. For example, in Windows XP™, configuring of TcpAckFrequency and TcpDelAckTicks parameters in registry achieve 200ms saving in recovery time. Unfortunately, these settings are not available in all operating systems and even if they were, there are other TCP timers and algorithms which keep the recovery time high.

Short messages are special challenge for the TCP. By default, TCP uses Nagle algorithm to accumulate short messages and send them together. The algorithm may delay packets sending and, thus, affect their latency. Sockets provide an API to disable this behavior (see setsockopt function documentation), but legacy sockets implementations may not have this functionality.

Concluding the above, TCP is a great protocol, but it is not suitable for real time communications. As it has been stated in the table 1, it could be successfully used only in systems with latency above hundreds of milliseconds.


Read more: Codeproject
QR: UDP_RT.aspx

Posted via email from Jasper-net

Android – Interview Questions/Answer Part – 1

|
Que 1: Describe the APK format.
Ans:

    Android application package file (APK) is the file format used to distribute and install application software and middleware onto the Google Android operating system. (Same as .exe in windows)
    Each Android application is compiled and packaged in a single file that includes all of the application’s code (.dex files), resources, assets, and manifest file.
     The application package file can have any name but must use the .apk extension

Que 2: What is activity?
Ans:

    Activity is a single screen in application.
    It is derived from Activity class and support JAVA code.
    You can put view by using setContentView(View) method.
    Most commonly, an activity is visibly represented by a full screen window that can receive and handle UI events and perform complex tasks. Though an Activity is typically full screen, it can also be floating or transparent.

Que 3: What is intent?
Ans:

    An Intent object is an instance of Intent.
    A message object that you can use to launch or communicate with other applications/activities asynchronously.
     It includes several criteria fields that you can supply, to determine what application/activity receives the Intent and what the receiver does when handling the Intent. Available criteria include include the desired action, a category, a data string, the MIME type of the data, a handling class, and others.


Read more: TechnoTalkative | PM's Blog
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://pareshnmayani.wordpress.com/2011/11/08/android-interview-questionsanswer-part-1/

Posted via email from Jasper-net

Identity Theft Call Center

|
There's a group who charges to make social engineering calls to obtain missing personal information for identity theft.

This doesn't surprise me at all. Fraud is a business, too.

Read more: Schneier on Security
QR: identity_theft_8.html

Posted via email from Jasper-net

Direct3D 9 API Interceptor

| Tuesday, November 15, 2011
This is a program that intercepts all Direct3D 9 (D3D9) commands issued by a running application. These commands are then dispatched to a separate program that interprets and responds to them. The commands can be forwarded to the operating system, discarded, or modified as desired.

Overview

The idea that enables this interception is that Direct3D (like most Windows APIs) is dynamically linked. Furthermore, Windows first searches for dynamic link libraries (DLLs) in the application's local directory. Therefore, to intercept calls to the D3D9 dynamic link library, d3d9.dll, all that is required is to make a custom version of d3d9.dll and put it in the application's local directory, which is exactly what this framework does. All intercepted calls are passed to a separate DLL, d3d9Callback.dll. This DLL decides what actions to take as a result of the command stream. It is also allowed to modify or discard the command stream before the interceptor sends it to the "real" version of d3d9.dll that was the intended target of these calls, which dispatches the commands to the graphics card.

Read more: Matt's Webcorner
QR: D3D9Interceptor.html

Posted via email from Jasper-net

Use the WinDbg Engine in Visual Studio User-Mode Debugging

|
In our C++ Debugging course, there are several scenarios which require WinDbg and cannot be completed in Visual Studio. They all rely on advanced extension commands available in WinDbg. Some examples:

Tracing opened and closed handles with the !htrace command
Viewing native heap information with the !heap command
Loading and executing code in the debuggee process with the SDbgExt extension commands !loaddll, !remotecall
Inspecting handles to synchronization objects with the !handle command
The sheer power of WinDbg built-in commands and extensions makes it a viable replacement to Visual Studio when doing hard-core debugging. However, the user interface – the tool windows, the source editor, setting up breakpoints, stepping through source, inspecting variables – are no match to the rich Visual Studio environment.

The good news is that as of Visual Studio 11, we’ll be able to use the WinDbg debugging engine (“Windows Debugger”) inside Visual Studio, combining the powerful commands with the convenient interface. Just use the “Windows User Mode Debugger” transport in the Tools | Attach to Process dialog. This also applies to dumps – you can open dumps with the Visual Studio “Minidump Summary” dialog, or you can use the File | Open Crash Dump menu item, the same way as for kernel dumps.

image_thumb_5D5038CD.png

QR: use-the-windbg-engine-in-visual-studio-user-mode-debugging.aspx

Posted via email from Jasper-net

Using ExtendedReflection To Manage Your .NET Code at Runtime

|
Consider the following (bad) code:

class Program
{
    static void Main(string[] args)
    {
        new SubClass("go");
    }
}

public abstract class BaseClass
{
    protected BaseClass()
    {
        this.Run();
    }

    protected abstract void Run();
}

public class SubClass
    : BaseClass
{
    private string data;

    public SubClass(string data)
        : base() 
    {
        this.data = data;
    }

    protected override void Run()
    {
        Console.Out.WriteLine(data.Length);    
    }
}

The issue of calling virtual members in constructor has been discussed in depth before, so I won't cover it here (see http://blogs.msdn.com/b/scottwil/archive/2005/01/14/353177.aspx and http://msdn.microsoft.com/en-us/library/ms229060.aspx for details). It's not that you can't do it right, but it can cause issues if you're not a little careful. This issue actually bit me years ago because I'm fond of designs where my base class tells the subclasses to do something when the constructor is called. However, it's too error-prone - all it takes is for someone to subclass my class that's a little careless and then all sorts of bad things happen.

A while ago I ran into Pex (http://research.microsoft.com/en-us/projects/pex/), and I fell in love with its power and capabilities. It was kind of freaky-scary what Pex would uncover in my code - suddenly there were corner cases with a bright shining light on them and I realized that I have subtle errors that I really should fix! Pex is also interesting because of the technologies and frameworks that it uses that do all sorts of advanced, cool stuff. One in particular is called ExtendedReflection. This is basically a managed profiler - yes, you read that right. For the longest time I was under the impression that you can't write a profiler in .NET in managed code, but I was wrong, because ExtendedReflection does just that.

So what does this have to do with calling virtual members in constructors? Think of flipping around IDisposable. See, IDisposable works with the using statement in C# to automatically call the Dispose() method. Of course, this is all compiler magic; the runtime doesn't treat IDisposable-based objects any differently, so if you forget to call Dispose() in a timely manner, you could leak resources (depending on what the object used during its lifetime). Now, you could argue that the runtime should handle this for you, but that's not an easy problem to solve - in fact, it's downright difficult. But ... wouldn't it be interesting if you could have the runtime call a method on your object if it implemented a specific interface after the constructor was done but before anything else was done to the object?

Read more: Jasonbock.net
QR: Default.aspx?blog=entry.741d51816a064e7f8a00e03660dd16cf

Posted via email from Jasper-net

Self Contained Assembly

| Monday, November 14, 2011
What it Does?

         To see please download the Demo.zip extract and run.You will see a form with button , click  button chose the color and click ok. The form color will change to cool gradient. Actually its a gradient panel control which is created by GradientPanelFactory plugin present in PlugIns folder. The plugin  is loaded dynamically at runtime. The plugin in turn relies on Owf.Controls.A1Panel.dll  which contains this cool gradient panel control. But you will not see this dll any where with this application , not even in PlugIns folder. Then how it works? This missing dll is actually compressed in to zip file and added as embedded resource to plugin dll. And this missing dll is extracted by application at runtime from zip resource of plugin dll. So the plugin can be self contained and only single file irrespective of the number of dependency dlls. Read further to see why and how its done.

Read more: Codeproject
QR: SelfContainedAssembly.aspx

Posted via email from Jasper-net

Microsoft Safety Scanner

|
Following is a great security TIP:

Do you think your PC has a virus?

The Microsoft Safety Scanner is a free downloadable security tool that provides on-demand scanning and helps remove viruses, spyware, and other malicious software. It works with your existing antivirus software.

Note: The Microsoft Safety Scanner expires 10 days after being downloaded. To rerun a scan with the latest anti-malware definitions, download and run the Microsoft Safety Scanner again.

The Microsoft Safety Scanner is not a replacement for using an antivirus software program that provides ongoing protection.

Read more: Ohad Plotnik's Forefront Blog
Read more: Microsoft Safety Scanner
QR: default.aspx

Posted via email from Jasper-net

HTML5-консоль от Google

|
2f16335a.jpg

HTML5-консоль, который вы могли видеть в одном из выступлений на майской конференции Google I/O, работает в онлайне (судя по всему, только в браузере Chrome).

Read more: Habrahabr.ru
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://habrahabr.ru/blogs/html5/132479/

Posted via email from Jasper-net

Impacket

| Sunday, November 13, 2011
Impacket is a collection of Python classes focused on providing access to network packets. Impacket allows Python developers to craft and decode network packets in simple and consistent manner. It includes support for low-level protocols such as IP, UDP and TCP, as well as higher-level protocols such as NMB and SMB. Impacket is highly effective when used in conjunction with a packet capture utility or package such as Pcapy. Packets can be constructed from scratch, as well as parsed from raw data. Furthermore, the object oriented API makes it simple to work with deep protocol hierarchies.


Read more: Core security
QR: impacket.html

Posted via email from Jasper-net