Skip to content

Instantly share code, notes, and snippets.

View Cellane's full-sized avatar

Cellane

View GitHub Profile
/**
* Protected method that fixes coordinates of a line using Cohen-Sutherland algorithm,
* then calls drawLineBresenham () method to draw the line with corrected coordinates
*
* @param startX x coordinate of start point
* @param startY y coordinate of start point
* @param endX x coordinate of end point
* @param endY y coordinate of end point
* @param color color of painted line
*/
using System.Linq;
using BakeryController;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using BakeryModel;
using System.Collections.Generic;
namespace BakeryTest
{
/// <summary>
if (materialDataForm.ShowDialog() == DialogResult.OK)
{
MaterialController materialController = new MaterialController();
ErrorList errors;
int code = (int)materialDataForm.numCode.Value;
string name = materialDataForm.txtName.Text;
float amount = (float)materialDataForm.numAmount.Value;
string unit = materialDataForm.cbUnit.Text;
decimal price = materialDataForm.numPrice.Value;
using System;
using System.Drawing;
namespace Convolution
{
public class Convolution
{
public Image DoMagic(Bitmap input, ConvolutionKernel kernel)
{
var output = new Bitmap(input.Width, input.Height);
namespace BakeryController
{
public static class Constants
{
public enum UnecessaryColumnNames
{
[StringValue("Unit1")]
Unit1 = 1,
[StringValue("Material_Recipe")]
Material_Recipe = 2,
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FirstTest
private void readFile () {
FileReader fileReader;
FileDialog fileDialog = new FileDialog (new Frame (), "Open File", FileDialog.LOAD);
String fileName, line;
fileDialog.setVisible (true);
if (fileDialog.getFile () != null) {
fileName = fileDialog.getDirectory () + fileDialog.getFile ();
input.setText ("");
package PreklProjektSol;
// ********* THIS CODE IS AUTO PORTED FROM C# TO JAVA USING CODEPORTING.COM TECHNOLOGY *********
import com.codeporting.csharp2java.java.Enum;
import com.codeporting.csharp2java.System.msString;
import java.util.ArrayList;
/*enum*/ final class ElementType extends Enum
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class MainForm {
private JPanel panel;
private JButton magicButton;
private JLabel expressionLabel;
private JLabel resultLabel;
private JTextArea expressionText;
Only in /Volumes/BOOTCAMP/Users/Milan/Documents/Visual Studio 2010/Projects/HitTheKeys/HitTheKeys: Form1.Designer.cs
diff -ur Downloads/HeadFirstCSharp_All_Code/HFC#_ch4/p160 - Hit the keys/p160 - Hit the keys/Form1.cs /Volumes/BOOTCAMP/Users/Milan/Documents/Visual Studio 2010/Projects/HitTheKeys/HitTheKeys/Form1.cs
--- Downloads/HeadFirstCSharp_All_Code/HFC#_ch4/p160 - Hit the keys/p160 - Hit the keys/Form1.cs 2010-05-23 09:29:04.000000000 +0200
+++ /Volumes/BOOTCAMP/Users/Milan/Documents/Visual Studio 2010/Projects/HitTheKeys/HitTheKeys/Form1.cs 2012-10-11 13:57:37.000000000 +0200
@@ -7,7 +7,7 @@
using System.Text;
using System.Windows.Forms;
-namespace Hit_the_keys
+namespace HitTheKeys