This file contains 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
HTML: | |
<div data-dropdown="toggle"> | |
<div>Block</div> | |
<ul data-dropdown="target"> | |
<li> | |
<a f href="javascript: void(0)" class="category-menu__item-link"> | |
<span> | |
TEXT | |
</span> | |
</a> |
This file contains 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
function byteArrayToWordArray(ba) { | |
var wa = [], | |
i; | |
for (i = 0; i < ba.length; i++) { | |
wa[(i / 4) | 0] |= ba[i] << (24 - 8 * i); | |
} | |
return CryptoJS.lib.WordArray.create(wa, ba.length); | |
} |
This file contains 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
/** | |
* In the example response below, observe each snippet has an object named resourceId, | |
which has a property named videoId. So, to get that in the response, to the fields query string | |
parameter, add the following path: resourceId/videoId. | |
So, your fields parameter now becomes: | |
pageInfo, items/snippet(title, description, resourceId/videoId) | |
*/ | |
{ |
This file contains 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 class RouteConfig | |
{ | |
public static void RegisterRoutes(RouteCollection routes) | |
{ | |
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); | |
routes.MapRoute( | |
"Sub", // Route name | |
"{controller}/{action}/{id}", // URL with parameters | |
new { controller = "SubdomainController", action = "AnyActionYouLike", id = UrlParameter.Optional }, |
This file contains 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 Practice.Java.Swing; | |
public class MainWindow extends JFrame { | |
private static final long serialVersionUID = 1L; | |
public MainWindow(String title) { | |
super(title); | |
Initialize(); |
This file contains 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; | |
namespace NullObjectDesignPattern | |
{ | |
public class Employee | |
{ | |
public string Name { get; set; } | |
public Bonus Bonus { get; set; } | |
} |
This file contains 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; | |
using System.Threading.Tasks; | |
namespace NullObjectDesignPattern | |
{ | |
// Bad design example | |
abstract class Customer { public virtual string Name { get; set; } } |
This file contains 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.Linq; | |
using System.Reflection; | |
namespace NullObjectDesignPattern | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
This file contains 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.Linq; | |
using System.Reflection; | |
namespace NullObjectDesignPattern | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |