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 MyShape = function (x, y) { | |
this.x = x; | |
this.y = y; | |
} | |
MyShape.prototype.move = function(xOffset, yOffset){ | |
this.x += xOffset; | |
this.y += yOffset; | |
console.log(`MyShape instance moved to ${this.x}, ${this.y}.`); | |
} |
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
import java.io.IOException; | |
import java.io.ObjectInputStream; | |
import java.io.Serializable; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* Used to illustrate transient (don't get serialized) fields. | |
* Useful for values that are derived from other members, like totals. | |
* For deserialization, you must specify the value for transient fields in the readObject method |
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
package com.jwhh; | |
import java.io.BufferedWriter; | |
import java.io.IOException; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
import java.nio.charset.Charset; | |
import java.nio.file.*; | |
import java.util.Arrays; | |
import java.util.HashMap; |
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
package com.ps.utils; | |
import com.ps.WorkHandler; | |
import com.ps.finance.BankAccount; | |
import com.ps.finance.HighVolumeAccount; | |
@WorkHandler(useThreadPool = false) | |
public class AccountWorkerRevisited implements Runnable, TaskWorker { | |
// Only include BankAccount as HighVolumeAccount inherits from it | |
private BankAccount ba; |
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
package com.ps.utils; | |
import com.ps.finance.BankAccount; | |
import com.ps.finance.HighVolumeAccount; | |
public class AccountWorker implements Runnable { | |
private BankAccount ba; | |
private HighVolumeAccount hva; | |
private char txType = 'w'; |
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
package com.ps; | |
import com.ps.finance.BankAccount; | |
public class AccessTypeClassInstance { | |
public static void main(String[] args) { | |
// Class instance from Type Reference | |
BankAccount acct = new BankAccount("1234"); | |
doWork(acct); |
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
package com.ps; | |
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
public class Adder implements Runnable { | |
private String inFile, outFile; |
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
package com.ps; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
public class Main { | |
// Parent and child logger | |
static Logger pkgLogger = Logger.getLogger("com.ps"); | |
static Logger logger = Logger.getLogger("com.ps.Main"); | |
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
<?php | |
$imgsrc = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "Full"); | |
echo $imgsrc[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
<?php | |
function SearchFilter($query) { | |
if ($query->is_search) { | |
$query->set('post_type',array('post','page')); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts','SearchFilter'); | |
?> |
NewerOlder