1116 Replies - 38173 Views - Last Post: 11 March 2013 - 02:51 PM
#1096
Re: Ctrl + V dump
Posted 25 June 2012 - 08:24 PM
for (int suit = 0; suit < 4; suit++)
{
for (int rank = 0; rank < 13; rank++)
{
cards.Add(new Card(suit,rank));
currentCard++;
}
}
Shuffle();
#1098
Re: Ctrl + V dump
Posted 24 July 2012 - 11:40 AM
#Region "Exports to Excel"
''' <summary>
''' Exports to excel
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks></remarks>
Private Sub btnExportToExcel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExportToExcel.Click
Dim dialog As DialogResult = MessageBox.Show("Are you sure you want to generate the excel?", "Delete confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If dialog = DialogResult.No Then
'Do not generate Excel
Else
'Generate the Excel
Dim oExcelApp As Excel.Application
Dim oWkBk As Excel.Workbook
Dim oSheet As Excel.Worksheet
Dim oRnge As Excel.Range
Dim iMaxXCoordinate As Integer = 0
Dim iMaxYCoordinate As Integer = 0
' Start Excel and get Application object.
oExcelApp = CreateObject("Excel.Application")
oExcelApp.Visible = True
' Get a new workbook.
oWkBk = oExcelApp.Workbooks.Add
oSheet = oWkBk.ActiveSheet
'******************HEADER SECTION**********************************
'If motors controllers exist, add that section to excel
If lstMotorController.Count > 0 Then
iMaxYCoordinate = 2
oSheet.Range("A" & iMaxYCoordinate, "I" & iMaxYCoordinate).Merge()
oSheet.Cells(HeaderRow, 1).value = "MOTOR PARTS"
With oSheet.Range("A" & iMaxYCoordinate, "I" & iMaxYCoordinate)
.Font.Bold = True
.Font.Size = "12"
.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter
.VerticalAlignment = Excel.XlVAlign.xlVAlignCenter
.Interior.ColorIndex = 44
End With
End If
iMaxYCoordinate = 3
'*************EXPORT MOTOR PARTS TO EXCEL*************
oSheet.Cells(iMaxYCoordinate, PartSections.PartNumber).Value = "Part Number"
oSheet.Cells(iMaxYCoordinate, PartSections.Manufacturer).Value = "Manufacturer"
oSheet.Cells(iMaxYCoordinate, PartSections.Description).Value = "Description"
oSheet.Cells(iMaxYCoordinate, PartSections.Vendor).Value = "Vendor"
oSheet.Cells(iMaxYCoordinate, PartSections.Quantity).value = "Quantity"
oSheet.Cells(iMaxYCoordinate, PartSections.Price).value = "Price"
oSheet.Cells(iMaxYCoordinate, PartSections.ExtPrice).value = "Ext Price"
oSheet.Cells(iMaxYCoordinate, PartSections.Status).value = "Status"
oSheet.Cells(iMaxYCoordinate, PartSections.InSock).value = "In Stock"
With oSheet.Range("A" & iMaxYCoordinate, "I" & iMaxYCoordinate)
.Font.Bold = True
.Font.Size = "12"
.VerticalAlignment = Excel.XlVAlign.xlVAlignCenter
.Borders.Color = Color.Black
.Interior.ColorIndex = 44
End With
'Add each motor to the excel
For iCount As Integer = 0 To lstMotorController.Count - 1
iMaxYCoordinate = 4
oSheet.Cells(iMaxYCoordinate, PartSections.PartNumber) = lstMotorController.Item(iCount).MotorControllerPartNumber
oSheet.Cells(iMaxYCoordinate, PartSections.Manufacturer) = lstMotorController.Item(iCount).MotorControllerManufacturer
oSheet.Cells(iMaxYCoordinate, PartSections.Description) = lstMotorController.Item(iCount).MotorControllerDescription
oSheet.Cells(iMaxYCoordinate, PartSections.Vendor) = lstMotorController.Item(iCount).MotorControllerVendor
oSheet.Cells(iMaxYCoordinate, PartSections.Quantity) = lstMotorController.Item(iCount).MotorControllerQuantity
oSheet.Cells(iMaxYCoordinate, PartSections.Price) = lstMotorController.Item(iCount).MotorControllerPrice
oSheet.Cells(iMaxYCoordinate, PartSections.ExtPrice) = "=E" & iMaxYCoordinate & "*F" & iMaxYCoordinate
Next
With oSheet.Range("A" & iMaxYCoordinate, "G" & iMaxYCoordinate)
End With
'*****************END EXPORT MOTOR CONTROLLERS TO EXCEL*************
THAT'S A LOT OF CRAP...
This post has been edited by S-John: 24 July 2012 - 11:41 AM
#1099
Re: Ctrl + V dump
Posted 04 August 2012 - 03:34 AM
John Cena cannot learn more than 4 moves.
#1100
Re: Ctrl + V dump
Posted 23 October 2012 - 04:56 PM
primecheck--;
I asked for help making a whole number square root class.
Don't you just love shameless advertising?
#1101
Re: Ctrl + V dump
Posted 25 October 2012 - 03:36 AM
Thats on my clipboard
This post has been edited by JL29: 25 October 2012 - 03:37 AM
#1102
Re: Ctrl + V dump
Posted 25 October 2012 - 07:10 AM
private static int primes = 2;
public static void main (String args[]){
int number = 1;
System.out.println("Prime #1: 2");
number++;
primefinder:
for ( ; primes < 100 ; primes++ ) {
if (primes % 2 == 0) {
continue primefinder;
}
for ( int primecheck = 1 ; ; ) {
for ( ; ; primecheck++) {
if (primecheck*primecheck >= primes) {
break;
}
}
for ( ; primecheck > 1 ; primecheck-- ) {
if ( primes % primecheck == 0){
continue primefinder;
}
}
System.out.println("Prime #" + number + ": " + primes);
number++;
if (primes == 2147483647) {
break primefinder;
}
continue primefinder;
}
}
//primes--;
//number--;
//System.out.println("Prime #" + number + ": " + primes);
}
}
I was posting the full code to my corrected efficient prime number generator.
#1103
Re: Ctrl + V dump
Posted 30 October 2012 - 09:34 PM
Quote
I didn't use it! Somebody was posting about how evil it is and I agree.
This post has been edited by Aphex19: 30 October 2012 - 09:35 PM
#1105
Re: Ctrl + V dump
Posted 01 November 2012 - 12:44 AM
ICLRMetaHost *pMetaHost = NULL;
ICLRRuntimeInfo *pRuntimeInfo = NULL;
ICLRRuntimeHost *pRuntimeHost = NULL;
TCHAR *tPath[MAX_PATH*2];
//IEnumUnknown *pRuntimeEnum = NULL;
HRESULT hr = CLRCreateInstance(CLSID_CLRMetaHost, IID_ICLRMetaHost, (LPVOID*) &pMetaHost);
//hr = pMetaHost->EnumerateInstalledRuntimes(&pRuntimeEnum);
hr = pMetaHost->GetRuntime(L"v4.0.30319", IID_ICLRRuntimeInfo, (LPVOID*) &pRuntimeInfo);
hr = pRuntimeInfo->GetInterface(CLSID_CorRuntimeHost, IID_ICorRuntimeHost, (LPVOID *) &pRuntimeHost);
DWORD dwRes = GetModuleFileNameA(nullptr, (LPSTR) &tPath, sizeof(tPath));
std::string Path (*tPath);
Path.resize(Path.find_last_of('\\')+1);
Path.append("flea.dll");
hr = pRuntimeHost->Start();
DWORD dwRet = 0;
hr = pRuntimeHost->ExecuteInDefaultAppDomain((LPWSTR) Path.c_str(), L"flea.Main", L"Exec", L"NOP", &dwRet);
hr = pRuntimeHost->Stop();
hr = pRuntimeHost->Release();
return TRUE;
#1106
Re: Ctrl + V dump
Posted 01 November 2012 - 06:36 AM
#1108
Re: Ctrl + V dump
Posted 06 November 2012 - 05:17 PM
I was purchasing oinks on JNF.
#1109
Re: Ctrl + V dump
Posted 06 November 2012 - 07:30 PM
Hmm.. I guess that had to be when I was tinkering with an inf file for a game's pet AI
#1110
Re: Ctrl + V dump
Posted 07 November 2012 - 12:21 AM
Review the SLOs (student learning outcomes) being met for this seminar week and then prove, through descriptive writing using examples, how you have met the student learning outcomes in this week’s readings and assignments.
(SLOs can be located by clicking on Seminars in the navigation area. They are listed with each seminar week.)
You must also formulate two additional questions that you would like to learn more about or that you have general questions about from the Lab assignments.
The most effective way to complete this assignment is to review the SLOs prior to starting this week’s assignments and as you work through them, “log” activities and questions.
This assignment requires you to respond to at least two of your classmates’ Learning Logs.
Submit your Learning Log to the Discussion Board.
|
|

New Topic/Question


MultiQuote





|