Pasang Iklan Anda Pada Blog Kami :)
Pasang Iklan Anda Pada Blog Kami :)
Pasang Iklan Anda Pada Blog Kami :)

How to Create Database Connection In Many Ways

jumpa lagi dengan HWP, kali ini HWP akan membuat koneksi SQL Database dalam berbagai cara di Visual Studio C#..

Oke cara pertama dengan langsung dalam kodingan...
buat aplikasi baru Web/Form (HWP Menggunakan Forms Application)
jangan lupa tambah namespace dibawaah...

setelah itu masukkan kode berikut di atas class public..

public SqlConnection con = new SqlConnection("Data Source=HABIBDEA-PC;Initial Catalog=RPP;Persist Security Info=True;User ID=sa;Password=password");




untuk datasource silahkan diganti dengan nama pc masing", initial catalog diganti dengan nama database yg akan di connect, lalu password diganti dengan pass SQL... itu cara pertama..

untuk cara kedua sama seperti cara pertama, tetapi kita akan lewat app.config utk di winforms dan web.config untuk di web...

silahkan buka .config di solution explorer, lalu ketiikan kode dibawah ini dalam tag


   




setelah itu kita panggil connectionstring yang kita buat di mainform, sebelumnya jangan lupa tambahkan namespace ini..


lalu panggil sql connection di atas class public latihan..

oke sekian tutorial dari HWP untuk koneksi databasenya, nantikan tutorial selanjutnya :)


Read more

Binding Datagrid from Database in C# Winforms

Hei, lama sekali HWP ga posting tentang post, oke sekarang HWP mau buat tutor buat ngebind database ke Datagrid di windows application...

oke pertama buka visual studionya, pilih windows forms application, lalu di tool box sebelah kiri expand all windows form pilih data grid view seperti gambar dibawah..

nah sekarang pencet F7 (shortcut untuk masuk ke view code).

nah disini kalian tinggal buat koneksi dulu ke database, kalau HWP sudah, yaitu dengan cara configuration manager, kenapa ? karena kalau pake configuration manager cuma buat 1 koneksi saja , sudah bisa dipanggil di beberapa form, lebih gampang juga jikalau kita ingin memindah app di komputer lain, hanya perlu mengganti 1 koneksi sudah beres semua..oke selanjutnya jangan lupa untuk menambahkan namespace dibawah untuk menambah koneksi..

using System.Configuration;
using System.Data;
using System.Data.SqlClient;

lalu ketikkan code dibawah ini..

public SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["MyConnection"].ToString());
        SqlCommand cmd;

code yang saya bold itu bisa diganti dengan koneksi kalian masing"..
selanjutnya buat kelas untuk mengambil data dari database yang akan di bind ke datagridnya..
lalu ketikkan kode dibawah ini di class binddata()
con.Open();
            SqlCommand cmd = new SqlCommand("Select * from Dosen", con);
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            DataSet ds = new DataSet();
            sda.Fill(ds);
            cmd.ExecuteNonQuery();
            con.Close();
            if (ds.Tables[0].Rows.Count > 0)
            {
                dataGridView1.Enabled = true;
                dataGridView1.DataSource = ds.Tables[0];
                dataGridView1.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
            }

            else
            {
                this.dataGridView1.Enabled = false;
                MessageBox.Show("Anda Belum Mempunyai Data, Silahkan Tambah Data","Warning",MessageBoxButtons.OK,MessageBoxIcon.Warning);
            }      
 jadi seperti ini..

lalu panggil class binddata di dalam class latihan() atau class utama..

setelah itu run programmnya atau pencet F5..,maka jadi seperti ini hasilnya..
sekian tutorial datagrid view dari HWP, tunggu tutor selanjutnya :)


Read more

Tutorial Pivot Table Excel

Pivot Table

PivotTable dapat memberikan kombinasi ringkasan data yang kaya dan variatif
Pada tutorial ini akan ditunjukkan langkah demi langkah pembuatan dasar PivotTable. Contoh file disediakan sehingga memudahkan Anda untuk mengikuti instruksi yang ada.


Pivot Table adalah sebuah table khusus yang merangkum informasi dari beberapa kolom tertentu dari sebuah sumber data (data source). Selanjutnya, hasilnya adalah sebuah table baru yang akan memberikan informasi yang lebih mudah dibaca dan dilihat.

(Catatan : Anda bisa mengklik tiap gambar untuk melihat ukuran aslinya.)

File Latihan


Pembuatan PivotTable

  • Jalankan program Excel 2007 dan buka file latihan yang telah Anda download tersebut.

    Catatan : File ini merupakan file contoh fiktif data-data transaksi yang terjadi pada suatu minimarket, dengan produk buah-buahan, sayur-sayuran dan makanan & minuman.
  • Buka sheet transaksi, dimana datanya terlihat seperti pada gambar berikut ini.

  • Sekarang pilih range data A1:F43680 atau tekan tombol CTRL + SHIFT + *.
  • Klik tab Insert pada Ribbon, pilih menu PivotTable | Insert PivotTable.

  • Pada dialog yang muncul, pilih New Worksheet, klik tombol OK.

  • Sheet baru akan muncul disertai suatu kotak / placeholder PivotTable (PivotTable Box).

    Selain itu terdapat panel daftar field (PivotTable Field List) pada posisi sebelah kanan worksheet. Terlihat pada daftar tersebut 6 field heading dari range data yang kita pilih sebelumnya.



  • Pada bagian bawah panel terdapat 4 kotak area, dari tiap kotak tersebut dapat kita tambahkan field-field yang terdapat pada field list.

    Adapun fungsi dari 4 kotak tersebut adalah sebagai berikut :
    • Report Filter : pada kotak ini field akan digunakan sebagai filter yang mempengaruhi hasil data pada PivotTable namun tidak akan terlihat sebagai isi dari PivotTable itu sendiri.
    • Column Labels : data dari field akan ditempatkan pada bagian kolom dari table dengan level sesuai urutan susunan pada area ini.
    • Row Labels : data dari field akan ditempatkan  pada bagian baris  dari table dengan level sesuai urutan susunan pada area ini.
    • Values : nilai field yang terdapat pada kotak ini akan dijadikan sebagai basis perhitungan summary. Tipe summary yang bisa digunakan adaah count, sum, average, dan lain-lain.
  • Mari sekarang kita coba berbagai kombinasi penempatan field dalam empat kotak area tersebut.

    Susunlah layout field dengan urutan berikut :
    • Field nama_kategori ke kotak Column Labels.
    • Field nama_cabang ke kotak  Row Labels.
    • Field jumlah_unit ke kotak Values.

      Perhatikan pada saat ditempatkan di kotak Values, nama field jumlah_unit akan berubah menjadi Sum of jumlah_unit. Ini menandakan bahwa field adalah kalkulasi sum (penjumlahan) dari nilai-nilai field jumlah_unit.

  • Perhatikan hasil pengaturan ini pada area PivotTable.  Area ini akan berisi suatu table dengan grouping field nama_cabang pada bagian baris,  field nama_kategori pada kolom.

    Sedangkan nilai total jumlah_unit ditempatkan pada cell-cell hasil perpotongan item grouping baris dan kolom tersebut.



    Salah satu contoh perpotongan adalah total jumlah unit yang terjual pada PHI Mini Market - Jakarta Pusat 01 dan kategori Makanan & Minuman, adalah sebesar 525.138 unit.

Menambahkan Tipe Summary Baru

  • Sekarang mari kita tambahkan field jumlah_unit kembali ke kotak Value. Akan muncul field baru dengan nama Sum of jumlah_unit2.

  • Kita akan mendapatkan satu kolom perhitungan baru yang sama dengan hasil sebelumnya. Tentunya bukan ini yang kita inginkan.

  • Mari kita kembali ke area Values, dan klik tombol panah bawah pada field Sum of jumlah_unit2. Pilih item Value Field Settings.

  • Pada dialog yang muncul rubah Sum menjadi Count.  Perhatikan nama field akan berubah menjadi Count of jumlah_unit2.

  • Klik tombol OK.
  • Pada area PivotTable, kita sekarang mendapatkan dua summary, yakni :
    • nilai total unit penjualan yang terjadi (sum)
    • jumlah transaksi yang terjadi (count).



  • Selesai.

Kesimpulan

Pada artikel tutorial dasar PivotTable ini kita telah mempelajari beberapa teknik berikut :
  • Persiapan Data : mempersiapkan sumber data PivotTable dari suatu data range.
  • Pembuatan PivotTable : menghasilkan PivotTable baru pada sheet terpisah dari sumber data.
  • Pengaturan Layout  : menyusun field-field pada bagian area PivotTable : Row Labels, Column Labels dan Values.
  • Tipe Summary : menentukan tipe summary yang diinginkan. Pada artikel ini, kita menggunakan tipe sum dan count.
Demikian artikel tutorial ini kami sajikan. Semoga dapat bermanfaat buat Anda. Kami juga sangat terbuka atas saran, komentar dan kritikan membangun (jika ada) dari Anda.

 sumber


Read more

Materi Logic Building and Effective Problem Solving


Assalamu'alaikum Wr.Wb

Sebelumnya maaf, karena admin sibuk dan banyak tugas yg harus dikerjakan, jadi baru kali ini bisa Upload Materi untuk kelas yg saya ampu, jadi harap dimaklumi..
Ok tanpa panjang lebar lagi, karena kalo panjang itu mulutnya t*kul :D, kali ini saya akan membagikan (sharing) tentang Materi LBEPS, mungkin ringkasan yg saya buat bisa membantu anda dalam perkuliahan, silahkan di sedoootttt, ehh di download gan :D

Materi :
Ok untuk materi yg selanjutnya akan menyusul, be patience :)


Read more

WLtoys V912 4-Channel Fixed Pitch Helicopter Mini-Review




Introduction

I’ve always wondered how is like to fly “big” fixed pitch flybar helicopters. I have several V911 which are a breeze to fly. I progressed to a KDS 450QS and it was a whole new level in terms of control and speed. After mastering non-3D flight with my 450, I thought about this - what happens if a V911 is enlarged? Would it be more challenging and more fun to fly? I’d like to find out if this helicopter is a worthy upgrade from a V911.

I was glad that Tmart decided to send me a WLtoys V912 for review.

Packaging



The package is huge! It was as tall as my 1.5 year old son!



Tmart did a nice job in protecting the package by providing additional bubble wrap at the vulnerable part of the box. Good job!

The foam box was rather tightly secured to the cardbard box, but the effort in pulling out the foam box was worthwhile.




V912 vs the Rest

The bird is huge, when it is compared against V911 or V922.





Smaller brother V922 and bigger brother V912.



But when I took out my 450, we know who is the boss!





Don’t you just love BIG helicopters?






Up Close with the V912

The bird is heavy. For a start, you can find mostly metal pieces on its body. It also has a huge 2S battery and a monstrous main motor.



The two servos and swashplate did not come perfectly level. It is a must to level the swashplate. Do not depend on the electronic trims (on the TX) because you need them for quick trimming when you’re in the field. If you used up all your electronic, you’re out of luck!

If you’re not used to reparing helicopters, it could be quite painful to sort out the servos. Like my 450 heli, I wanted to level the servos. I examined the bird in detail to find the best way to extract the servos out of the body. In the end, I took the shortcut - I left the servos in the body while I removed the servo arms. It’s hard to do that, especially when you have fat fingers.

I set all trims to neutral and powered up the bird. After it initialized I took out the servo arm and tried to put it back at a horizontally level position. To my disappointment, there is no way to do that. It’s either too high or too low. And there is no subtrim to fix this. I picked the lower position for both servos. Bad idea.

After putting everything back, I realized to level the swash, I had to lengthen the linkage rods. And I needed to lengthen quite a bit which made the linkage rods on the verge of separating! I was lazy and left it that way.

In the end, I got a horizontally leveled swash.





Saying the tail blade is big is an understatement. I have no worries of its heading hold ability just by looking at the size of the tail blade.



The receiver board mounted horizontally above the huge battery. There is a spare connector for additional LED light.



The battery could be removed for charging. This may be required if you intend to charge it with your computerized charger and you find that the JST and balance lead are too short. But if intend to charge with the stock charger, it should not be a problem.



The head light is very bright. It blinded me when I tried flying it towards me at night.




Transmitter

Like the V922, this transmitter is a big leap from the previous E728. It looks and feels like a hobby grade transmitter.


6-Channel Transmitter for V922 vs 4-Channel Transmitter for V912


It supports Modes 1 to 4 - throttle and/or rudder can be on the left or right stick. To switch between modes 2 and 4, while it is powered off, hold on to the “Left” button at the right of the LCD display, then power it on.

I’m pretty disappointed with the transmitter. I was hoping that it could support configurable rates. To toggle between the predefined low and high rates, press the top-left corner button.



Low rates are only suitable for indoor flight where there is no wind. But you really wouldn’t want to fly such a big heli indoors. At high rates, the helicopter flies fine outdoors.
Strangely, the lights button doesn’t on or off the lights despite showing the status change on the LCD display.

It has the same annoying start up beep like the rest of WLtoys 4-channel transmitters. It was able to bind with my V939 but I didn’t have the time to fly my quads with this transmitter.


Flight Experience

Avoid applying throttle too quickly when spooling up. Give the tail some time to kick in. But take note that the helicopter lifts off at 45% to 50% throttle.

Like the V911, it drifts left as it lifts off the ground. However, the left drift is much more pronounced in this bigger bird. Just make it a habit to apply right aileron as it lifts off.

While it is hovering in the air, it needs around 40% throttle. I’m not exactly used to flying helicopters at low throttle. What this also means is that the bird has plenty of power. I gave it a 80% throttle boost and it rocketed up into the air. I don’t remember my V911 to be able to do that.

At the ground effect zone, the bird is not as stable as a 450 CP helicopter, but is easier to handle than the V911. But avoid lingering at low altitude as you really need to be very familiar with the required throttle inputs in to prevent hitting the ground.

Piros are surprisingly fast. You can see this in my video. The bird does not have the same overly sensitive rudder as the V911. You do not need to concentrate on applying small amounts of rudder during banked turns.

Just like the V911, right banked turns are very easy to pull off but left banked turns are tricky. It’s gonna take me a while to get that right.

Cyclic stick movements are like the V911 - not too sensitive - and the bird is easy to move about with the elevator and aileron controls.

Forward flight feels a little harder than the V911, perhaps because the tail is heavier than the nose. As the helicopter stops, it seesaws slightly, again may be due to the heavier tail. I checked the center of gravity and found the tail to be very slightly heavier than the nose.


Tail is slightly heavier, not very apparent from the photo.

Perhaps I could improve forward flight by removing the tail boom support brace and the tail horizontal fin.

I’m not sure if all fixed pitch flybarred helicopters can’t handle winds well, but for my V911 and V912, they are quite affected by light gusts of winds. However, I do notice that the V912 performs better in windy conditions that V911. As a safety precaution, apply the wind-countering stick movements when the wind starts blowing. It takes time for the helicopter to react to it. If the wind is gentle and does not affect your flight, you may apply counter stick movement to correct the wind-countering stick movement. If you managed to counter the wind, good job. Else, the wind is too strong for your helicopter, land it. Your resistance is futile.

Remember, this is not a V911. If you lose control, either the heli is gonna get hurt, or somebody, or something is gonna get hurt. Did you see how big the metallic flybar is? And let’s not forget the metal landing skids.

It was a unique experience flying a large FP FB helicopter. It’s definitely more challenging than a V911, because of the heavier weight and corresponding higher inertia. Anyone who is overly familiar with a V911 should start off this helicopter really slow. You don’t want to discover it’s “different” when the large, heavy bird is in a difficult to handle situation.

Now that I shared my thoughts on the difference of flying the V912 vs V911, let’s visit the next question - is it a worthy upgrade from a V911?


Progressing from V911 to V912

The short answer is - YES!

If you’re looking for a more challenging FP FB helicopter, most likely you’d like a bigger one that handles wind (slightly) better, and demands more of your focus and attention. The consequence of crashing a V912 is far greater than a V911 so this adds on to the challenge of flying a V912.

As this is a larger, heavier, more powerful bird, it can fly at a much faster pace. This can be really fun to you adrenaline junkies out there. I tried tight U-turns with this bird and I must say the feeling was great! The sound of the main rotor blades cutting the wind, and the tail blades working really hard, as the big V912 U-turned right in front of me, was extremely thrilling. I think it was captured in my video.

I’ve flown collective pitch helicopters to know that it is (obviously) different from a FP FB helicopter. I’m also aware that there are folks out there who can’t seem to pick up the skills to fly a CP heli. In this case, the V912 may be just right!

As for using it to prepare for a 450 CP helicopter, well, I don’t really that it would help. This is largely because the V912 is far too stable as compared to a CP helicopter.


Conclusion

WLtoys V912 is stable and fun to fly. Experienced V911 pilots looking for something that flies different or more of a challenge may find this a worthy upgrade. The main gripe I had with the V911 is the twitchy tail (I did not perform the resistor mod), and I’m glad the issue does not exist on V912. This makes banked turns really easy with the V912. If I had not fallen in love with CP helicopters, I’d be flying my V912 regularly.


Gallery

Outdoor Flight Video:

WLtoys V912 4-Channel Fixed Pitch Helicopter (4 min 5 sec)




Photos: http://www.flickr.com/photos/fyresg/...7632447963389/


Pros
+ Very good rudder control; tail holds very well
+ Handles wind well, better than V911
+ Inherited the high stability of V911
+ Powerful main motor

Cons
- Needs tweaking to ensure swashplate is level
- May need to shift the center of gravity closer to the nose, to improve forward flight
- No spare battery






Sumber



Read more