Wireframes while redesigning the Stanford page
Diposting oleh
empy
Rabu, 12 Februari 2014
di 23.15 0 komentar Label: page, redesigning, stanford, the, while, wireframesUsing ADO Record Source
Code on how to use ado record source in visal basic .net
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Create a connection string
Dim ConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\Northwind.mdb"
Dim sql As String = "SELECT CustomerId, CompanyName, ContactName From Customers"
Create a Connection object and open it
Dim conn As Connection = New Connection()
Dim connMode As Integer = ConnectModeEnum.adModeUnknown
conn.CursorLocation = CursorLocationEnum.adUseServer
conn.Open(ConnectionString, "", "", connMode)
Dim recAffected As Object
Dim cmdType As Integer = CommandTypeEnum.adCmdText
Dim rs As _Recordset = conn.Execute(sql)
Create dataset and data adpater objects
Dim ds As DataSet = New DataSet("Recordset")
Dim da As OleDbDataAdapter = New OleDbDataAdapter()
Call data adapters Fill method to fill data from ADO
Recordset to the dataset
da.Fill(ds, rs, "Customers")
Now use dataset
DataGrid1.DataSource = ds.DefaultViewManager
Read More..
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Create a connection string
Dim ConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\Northwind.mdb"
Dim sql As String = "SELECT CustomerId, CompanyName, ContactName From Customers"
Create a Connection object and open it
Dim conn As Connection = New Connection()
Dim connMode As Integer = ConnectModeEnum.adModeUnknown
conn.CursorLocation = CursorLocationEnum.adUseServer
conn.Open(ConnectionString, "", "", connMode)
Dim recAffected As Object
Dim cmdType As Integer = CommandTypeEnum.adCmdText
Dim rs As _Recordset = conn.Execute(sql)
Create dataset and data adpater objects
Dim ds As DataSet = New DataSet("Recordset")
Dim da As OleDbDataAdapter = New OleDbDataAdapter()
Call data adapters Fill method to fill data from ADO
Recordset to the dataset
da.Fill(ds, rs, "Customers")
Now use dataset
DataGrid1.DataSource = ds.DefaultViewManager
Press Release from Sofitel Philippine Plaza French Month
Diposting oleh
empy
Selasa, 11 Februari 2014
di 10.45 0 komentar Label: french, from, month, philippine, plaza, press, release, sofitelTo view my own article, click the link below:
![]() |
| French Chefs Cecile and Eric |
![]() |
| Cod fish aioli |
![]() |
| Cote de boeuf |
![]() |
| Duck confit cassoulet |
![]() |
| Lamb chops with roasted eggplant |
![]() |
| Onion Pissaladierie |
![]() |
| Pan-fried scallop with leek Mussel Mariniere |
![]() |
| Potato Reblochon Cheese Gratin |
![]() |
| Quiche Lorraine |
![]() |
| Savory buckwheat crepe |
![]() |
| Steamed scallops black bean sauce |
![]() |
| Sauteed Porcini with truffle |
![]() |
| Tropezienne |
PS. Liked the post? Subscribe to my blog by typing in your email below. Youll get my posts in your inbox via email.
-->
decode in oracle
I had a SQL query and I forgot how to put calculated content in the output. Yes, you can use the "DECODE" function and it works great.
SELECT FLD1,FLD2, DECODE("FLD1"="JED","CLAMPETT") FROM TABLE_HILLBILLY
SELECT FLD1,FLD2, DECODE("FLD1"="JED","CLAMPETT") FROM TABLE_HILLBILLY
Mongo M101P Application Engineering Week 6
Diposting oleh
empy
Minggu, 09 Februari 2014
di 22.15 0 komentar Label: 6, application, engineering, m101p, mongo, weekChoosing a Shard Key (? min)
Sharding + Replication (? min)
Implications of Sharding (? min)
Building a Sharded Environment (? min)
Introduction to Sharding (? min)
Review Implication of Replication (? min)
Read Preferences (? min)
Write Concern revisited (? min)
Proper handling of failover (? min)
Detecting Failover (? min)
What happens when failover occurs? (? min)
Connecting to a Replica Set from Pymongo (? min)
Failover and Rollback (? min)
Replica Set Internals (? min)
Creating a Replica Set (? min)
Write Consistency (? min)
Replica Set Elections (? min)
Introduction to Replication (? min)
Pymongo Driver (? min)
Network Errors (? min)
Write Concern (? min)
Sharding + Replication (? min)
Implications of Sharding (? min)
Building a Sharded Environment (? min)
Introduction to Sharding (? min)
Review Implication of Replication (? min)
Read Preferences (? min)
Write Concern revisited (? min)
Proper handling of failover (? min)
Detecting Failover (? min)
What happens when failover occurs? (? min)
Connecting to a Replica Set from Pymongo (? min)
Failover and Rollback (? min)
Replica Set Internals (? min)
Creating a Replica Set (? min)
Write Consistency (? min)
Replica Set Elections (? min)
Introduction to Replication (? min)
Pymongo Driver (? min)
Network Errors (? min)
Write Concern (? min)
Chess Is A Good Hobby
There was a bit of press attention a few days ago concerning a firearms trainer who accidentally shot one of his students (fortunately, not a spectacularly serious injury). Shall Not Be Questioned reports that this was not the first time this particular trainer accidentally shot one of his students, and makes a suggestion with which I completely agree:
There are some basic safety rules for firearms.
1. Assume that every gun is loaded unless you have personally verified that there are no live rounds in the gun, including verifying that the chamber on a semiautomatic is empty.
2. Assume that if you put an unloaded gun down, even for a few seconds, that gremlins have very quietly loaded it. Recheck it when you pick it up again.
3. Never point a gun, even an "unloaded" gun at any object that you are not prepared to destroy.
4. Never put your finger inside the triggerguard of the gun until you are ready to fire. And that even means in a potential combat situation -- finger outside the triggerguard until you have made the conscious decision to fire the gun. Many years ago, the Santa Rosa, California Police Department had to install a new liver for a civilian. The civilian was drunk and disorderly, but that was all. One of the responding police officers had been trained in the bad old days, and had his finger inside the triggerguard of his Glock. The civilian turned around rather suddenly, and instinctively, the police officer pulled the trigger, destroying the civilians liver.
Guns are very serious business. Treat them that way, at all times.
Read More..
I’d say if you find yourself at a point in life where you’ve shot two people accidentally, it’s probably a really good idea to seriously examine your relationship with firearms, and decide if maybe you’d be better off taking up a hobby where reckless abandon is considerably less consequential. Chess is a good hobby.Although who knows? Someone with such "bad luck" could probably turn playing chess into a dangerous hobby.
There are some basic safety rules for firearms.
1. Assume that every gun is loaded unless you have personally verified that there are no live rounds in the gun, including verifying that the chamber on a semiautomatic is empty.
2. Assume that if you put an unloaded gun down, even for a few seconds, that gremlins have very quietly loaded it. Recheck it when you pick it up again.
3. Never point a gun, even an "unloaded" gun at any object that you are not prepared to destroy.
4. Never put your finger inside the triggerguard of the gun until you are ready to fire. And that even means in a potential combat situation -- finger outside the triggerguard until you have made the conscious decision to fire the gun. Many years ago, the Santa Rosa, California Police Department had to install a new liver for a civilian. The civilian was drunk and disorderly, but that was all. One of the responding police officers had been trained in the bad old days, and had his finger inside the triggerguard of his Glock. The civilian turned around rather suddenly, and instinctively, the police officer pulled the trigger, destroying the civilians liver.
Guns are very serious business. Treat them that way, at all times.
Example ProgressBar in Visual Basic
Diposting oleh
empy
Sabtu, 08 Februari 2014
di 11.15 0 komentar Label: basic, example, in, progressbar, visualExample ProgressBar in Visual Basic
Uses the ProgressBar to animate your program with actions such as stop, pause and resume his work are essential steps to good ProgressBar. Bad use of a ProgressBar can slow your program or make your program inaccessible.
I introduce two examples of ProgressBar in this article. The first one is a very simple case perfect for programmers who enjoy working in sequential programming as opposed to event-driven programming.
<summary> this is a sample on how to use a progress bar. The main problem in this exemple is that the form is frooze while the progress bar is working. </summary> <remarks></remarks> Public Class Form1 Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Me.Text = My.Application.Info.AssemblyName With ProgressBar1 .Style = ProgressBarStyle.Blocks .Step = 1 .Minimum = 0 .Maximum = 100 .Value = 0 End With With Button1 .Text = "Start ProgressBar" End With End Sub Private Sub Button1_MouseUp(sender As System.Object, e As System.EventArgs) Handles Button1.MouseUp With ProgressBar1 .Style = ProgressBarStyle.Blocks .Step = 1 .Minimum = 0 .Maximum = 100 .Value = 0 End With if you repress the button now, it wont restart now Do ALL events in your form will ahve to wait until this loop is completed! Threading.Thread.Sleep(100) ProgressBar1.PerformStep() cant use this if ProgressBar1.Style = ProgressBarStyle.Marquee Loop Until ProgressBar1.Value >= ProgressBar1.Maximum Me.Button1.Text = "finished, press to restart" End Sub End Class |
When you run the program and you press the button, the ProgressBar will animate. It works well because you could press the button a second time for the animation again. The value of the ProgressBar takes the value of zero and then increment at each stage of your programming work.
This example illustrates the perfect example of the most popular programming were computers were operating with a single processor 16-bit or Intel 80386, 80486, Pentium I, Pentium II, Citrix, AM386 or computer ... 32 bit until the 2000s. In fact, we were taught that the computer could only make a single statement at a time. And there was a time when the work of programmers was once measured by the number of lines of code written: 10000 lines, 50000 lines ...
What is interesting in this type of programming is that it is very popular not only in the programming software in computers but also in other applications such as electronic programming, industrial automation, engineering and more. For example, your dishwasher has a sequential behavior and has a sequence of wash cycles: closes the door, sprinkles, lather, rinse, dry and opens the door.
Programming events
In simple terms, the program must work in harmony with other competing programs and user. Program developed with events is the basic principle of the computer-aided design. This is obviously more difficult because the programmer first and foremost have a mentality contrary to selfishness. The programmer must think at all the elements around his program. For example, if the user wants to pause the program, nothing more frustrating than seeing the message "PROGRAM NOT RESPONDING" on the screen because the program is too busy to perform a certain task or because it was designed this way. Commercially speaking, then we can say that in 2013 the program was poorly designed.
Here is a code example of improved ProgressBar. In principle, it is almost the same as the previous example except that it is capable of handling user events with and be compatible with the resources of the computer.
<summary> This is a sample of threading. this sample have a PLAY, PAUSE, RESUME and STOP or Restart Carefull, you cant use the ThreadState to check your Thread Status because is not reliable. That is why a created a member called suspended. </summary> <remarks></remarks> Public Class Form1 Private tProgessBar As Threading.Thread Delegate Function tProgressBar_at_Max() As Boolean Private suspended As Boolean Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If tProgessBar Is Nothing Then tProgessBar = New Threading.Thread(AddressOf ProgessBarFunction) If tProgessBar.IsAlive Then If suspended Then suspended = Not suspended tProgessBar.Resume() Button1.Text = "Playing, click to pause" Else suspended = Not suspended tProgessBar.Suspend() Button1.Text = "Paused, click to resume" End If Else With ProgressBar1 .Style = ProgressBarStyle.Blocks .Step = 1 .Minimum = 0 .Maximum = 100 .Value = 0 End With Button1.Text = "Playing, click to pause" tProgessBar = New Threading.Thread(AddressOf ProgessBarFunction) tProgessBar.IsBackground = True tProgessBar.Start() suspended = False End If End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Button1.Text = "Press to Start" End Sub Private Sub ProgessBarFunction() Do Me.Invoke(New MethodInvoker(Sub() Me.ProgressBar1.PerformStep())) Threading.Thread.Sleep(100) Loop Until ProgressBar_at_Max() Me.Invoke(New MethodInvoker(Sub() Me.Button1.Text = "finished, press to restart")) End Sub Private Function ProgressBar_at_Max() As Boolean ProgressBar_at_Max = False If ProgressBar1.Value >= ProgressBar1.Maximum Then ProgressBar_at_Max = True Else ProgressBar_at_Max = False End If End Function End Class |
First, the presence of a thread is important for the proper functioning of the programming events because you want to introduce a kind of subroutine in the main program which is our form. When you start the ProgressBar, the thread is constantly working, but in the background and becomes less important compared to Form1 and controls. We must also avoid falling into the room of the comparison. Many will think that a thread in the background is equivalent to the use of events as called Reactors or Events. Know that it is not at all the same thing. The mere fact that the level of experience required for the use of threads versus Reactors or Events should be enough to convince you.
Note the use of the Resume function and suspends them which mean that the thread is suspended. During the time that the thread is suspended, the progress bar is virtually not using any resources from the processor.
You can download the program and source code examples used in this article.
Langganan:
Postingan (Atom)














