How can I get the client’s IP address in ASP.Net MVC?


Request.ServerVariables["REMOTE_ADDR"] should work – either directly in a view or in the controller action method body (Request is a property of Controller class in MVC, not Page).

It is working.. but you have to publish on a real IIS not the virtual one.


How can I avoid Excel reformatting the scientific notation numbers I enter?

I had this with list of long numbers, about 14000 entered into one column. I highlighted the column, Data -> Text to Columns -> Fixed length -> Don’t create any break lines. Clear any that show up -> Select column data format text -> Finish. Worked like a charm.

shareimprove this answer

VBA to copy a file from one directory to another


Use the appropriate methods in Scripting.FileSystemObject. Then your code will be more portable to VBScript and To get you started, you’ll need to include:

Dim fso As Object
Set fso = VBA.CreateObject("Scripting.FileSystemObject")

Then you could use

Call fso.CopyFile(source, destination[, overwrite] )

where source and destination are the full names (including paths) of the file.



unibasic’s sort function


RE: unibasic’s sort function

Edward Brown
81 posts
The SORT function (which I’m embarrassed to say I didn’t think existed,
and I’ve been coding unibasic for the last 8 or 9 years!) sorts the data
passed into it; there isn’t a return value. So


does work. Your original program sets LIST to 0 because LIST is set to
the return result of the sort statement – perhaps this should throw a
compiler error? Or perhaps there’s an undocumented return code if the
data could not be sorted?


Interactive Map of Linux kernel


The interactive Linux kernel map helps you traverse complex interconnections between subsystems of the kernel while you explore its source code. A Linux hacker, trying to track down a bug or just understand how some subsystem works, can get exhausted just trying to figure out what invokes what — so the kernel map comes to the rescue!

The map depicts over 400 prominent functions and structures divided into major subsystems. You can zoom in on any function and move about the functions graphically. The relationships among all functions are shown through connecting lines, and clicking on any function takes you to source code in the Linux Cross Reference and the collection of Linux kernel documentation.

How to Use the K2 Destination Plan per Slot No Destinations rule


In this article we will learn how to use one of the K2 blackpearl destination rule – Plan per slot (no destinations).

The K2 blackpearl Plan per slot (no destinations) Destination Rule can be used for activity with server events. K2 User Destinations cannot be configured when plan per slot is used and the server creates one instance per slot. Each instance will have its own activity data fields.

1 - Simple K2 blackparl Workflow process

1 – Simple K2 blackparl Workflow process

By using Plan per slot and SmartObject event we will update all inactive users as active and send a notification. In the below image we can see there are 3 inactive users in table.

2 - K2 Destination Users

2 – K2 Destination Users

Select Destination Rule for activity and run in advanced mode, select plan per slot (no destinations) and destination rule has two options:
1) Can select number of slots to be created (static)

3 - Plan per slot

3 – Plan per slot

2) Number of slots will be created based on the number of records returned by the Smartobject List Method (Dynamic)

4 - Use SmartObject to determine number of slots

4 – Use SmartObject to determine number of slots

In our case, we have selected the EmployeeInfo.List.ID list field on the Destination Rule Options page and mapped Active property value as false.
This will create a slot for each inactive users

5 - K2 SmartObject loading destination users

5 – K2 SmartObject loading destination users

In Smartobject Update method Map value for ID as ActivityInstanceDestInstanceData and Active as true.

6 - K2 ActivityInstanceDestinationData

6 – K2 ActivityInstanceDestinationData

7 - Employee Id from ActivityInstanceDestinationData

7 – Employee Id from ActivityInstanceDestinationData

This will update all the Inactive users as active and notify the users.

8 - Notify Active Users Only

8 – Notify Active Users Only

9 - K2 Notifications

9 – K2 Notifications

We can set a Succeeding Rule for activity to check whether all slots of the Activity Instance “Active Datafield” is set to True. Once all the instances complete, the succeeding rule executes and thus process moves to completed state.

10 - K2 succeeding rule

10 – K2 succeeding rule