Working with c# dataset

A Data Set resembles a database. Data Table resembles the database table. Data Row resembles a record in the table.

DataSet reqClasses = new DataSet();
DataTable reqClassesTable = new DataTable();

//.. from stored procedure … selecting ClassID from InstCrsReq …The dataset is defined as DataSet reqList in this line…
objDA.Fill(reqList, “ReqList”);

So I can access the data using this assignment…
reqClassesTable  = reqClasses.Tables[“reqList”];

Then I can loop through the data and do whatevs…
foreach (DataRow row in reqClassesTable.Rows)
{string ClassID = row[“ClassID”].ToString();}

Another way to use the data set is to call to a database and return one.

DataSet movieList = new DataSet();
myDatabaseCall(movieList);

movieList.Tables[“movieList”] now contains the results of the database call, maybe somthing like:

MovieIDMovieName
1The Matrix
2Justice League

You can loop through the rows as so…

foreach (DataRow row in movieList.Tables[“movieList”] )

{ Label1.Text += row[“MovieName”];}

The control named “Label1” would contain: The MatrixJustice League

because I didn’t use any logic to add commas or a space between the field results display.

Wifi , lan , wan Hacking tools and practices

Kali Linux is a great resource

Kali Linux is an open source project that is maintained and funded by Offensive Security, a provider of world-class information security training and penetration testing services. In addition to Kali Linux, Offensive Security also maintains the Exploit Database and the free online course, Metasploit Unleashed.

https://www.kali.org/about-us/

 

 

 

They are really working hard to get you. They can spoof access points. They can Man in the Middle and grab your data. They can even spoof login pages to grab your credentials.

Here are the tools they are using:

  1. AirCrack NG
  2. PwnStar

https://arstechnica.com/security/2014/06/free-wi-fi-from-xfinity-and-att-also-frees-you-to-be-hacked/

 

Wireshark

Wireshark is the world’s foremost and widely-used network protocol analyzer. It lets you see what’s happening on your network at a microscopic level and is the de facto (and often de jure) standard across many commercial and non-profit enterprises, government agencies, and educational institutions.

 

Cain and able

Cain & Abel is a password recovery tool for Microsoft Operating Systems. It allows easy recovery of various kind of passwords by sniffing the network …

Black out certain days in from the Jquery Calendar Picker

The JQuery Calendar picker is a very handy element that is used in many places on the web. The default functionality is great, but what if you need a custom date range, or to black out specific dates?  The picker has an event handler called “beforeShowDay” that will let you hook into and modify what dates are available to pick from the element.

For example, to allow users to sign up for campus visits on Tuesday and Thursday, I needed to  “black out” the rest of the days from the ui. I also needed to black out a couple of days that will be unavailable due to special events. I can write a function to specify these days, then call the function on the “beforeShowDay” event handler.

[code]

var unavailableDates = [“19-5-2016”, “16-6-2016”];
function unavailable(date) {
dmy = date.getDate() + “-” + (date.getMonth()+1) + “-” +date.getFullYear();
if ($.inArray(dmy, unavailableDates) < 0) {
return [true,””,””];
} else {
return [false,””,”This day is unavailable.”];

}
var day = date.getDay();
return [(day == 2 || day==4)];
}
$( “#mydatefield” ).datepicker({
minDate: ‘+7d’, changeMonth: true,   changeYear: true, yearRange:”c-80:c”,  beforeShowDay: unavailable});

[/code]