This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var outerValue = 'ninja'; | |
var later; | |
function outerFunction() { | |
var innerValue = 'samurai'; | |
function innerFunction() { | |
assert(outerValue,"I can see the ninja."); | |
assert(innerValue,"I can see the samurai"); | |
} | |
later = innerFunction; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var errorMsgs = { | |
txtUSER_NAME: '- โปรดระบุ <bean:message bundle="<%=com.wealth.sellingagent.controller.DefaultDisplay.language%>" key="label.username"/>', | |
txtPASSWORD: '- โปรดระบุ <bean:message bundle="<%=com.wealth.sellingagent.controller.DefaultDisplay.language%>" key="label.password"/>' | |
}; | |
$('#loginForm').validate({ | |
onfocusout: false, | |
onkeyup: false, | |
onclick: false, | |
rules: { | |
txtUSER_NAME: 'required', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Circle { | |
private float radius; | |
private String color; | |
public float getDiameter() { | |
// what is "this" ? | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace ECal.Core | |
{ | |
public class Device | |
{ | |
private string name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int calUnit() | |
{ | |
decimal result = Convert.ToDecimal((Power / 1000.00) * Duration); | |
string[] str; | |
int font; | |
if (result.ToString().Contains('.')) | |
{ | |
str = result.ToString().Split('.'); | |
font = Convert.ToInt32(str[0]); | |
if (Convert.ToInt32(str[1]) > 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int calUnit() { | |
double realval = (this.power / 1000.00) * this.duration; | |
int tem = (int) realval; | |
if (realval - tem != 0) { | |
tem += 1; | |
} | |
return tem; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int calUnit() { | |
BigDecimal power = new BigDecimal(this.power); | |
BigDecimal duration = new BigDecimal(this.duration); | |
BigDecimal result = power.divide(new BigDecimal("1000.00")).multiply(duration); | |
String ans = result.setScale(0,BigDecimal.ROUND_UP).toString(); | |
return Integer.parseInt(ans); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_43 | |
{ | |
class Employee | |
{ | |
public Employee(int id) | |
{ | |
Id = id; | |
} | |
// ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_44 | |
{ | |
using System; | |
class Program | |
{ | |
// Define a nested class for processing the command line. | |
private class CommandLine | |
{ | |
public CommandLine(string[] arguments) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_47 | |
{ | |
using System; | |
// File: Person.Designer.cs | |
public partial class Person | |
{ | |
#region Extensibility Method Definitions | |
partial void OnLastNameChanging(string value); | |
partial void OnFirstNameChanging(string value); | |
#endregion |
OlderNewer