Skip to content

Instantly share code, notes, and snippets.

View teocci's full-sized avatar
👨‍💻
Coding

Teocci teocci

👨‍💻
Coding
View GitHub Profile

Accessing Session from Javascript using JQuery, AJAX in ASP.Net

Well, well well, this is one of those problems which crops out many a time while developing web application “How do i access session variables in my Javascript?” Usually the answer is you cannot, simply because sessions are stored on the server (backside) and your application is running on some remote client (Firefox de m...). Theoretically that is truth, but not the whole truth. Let us dispel the misconception.

Accessing session variables in ASP.Net

Well as we said before, it is not completely true when someone tells you, that session values cannot be used in JavaScript. It can be done, but with limitations. You can only have read-only access:).

This sample will show how we do it

//Consider you have set the following session variable in code-behind

NDK support in Android Studio

NDK support requires the use of Android NDK (r10e or above) and the android gradle-experimental plugin (0.7.0-alpha1). NDK support for the gradle(-stable) plugin, check this article on the NDK and Android Studio. This user guides provides general details on how to use it and highlights the difference between the experimental plugin and the original plugin. (This guide is based on the gradle-experimental 0.7.0 and Android Studio 2.1)

Setting up the gradle-experimental plugin

A typical Android Studio project may have a directory structure as follows. Files that we need to change are marked with a "*":

.

How To Install Node.js on an Ubuntu 14.04 server

Node.js is a Javascript platform for server-side programming that allows users to build network applications quickly. By leveraging Javascript on both the front-end and the back-end, development can be more consistent and be designed within the same system.

In this guide, we'll show you how to get started with Node.js on an Ubuntu 14.04 server.

If you are looking to set up a production Node.js environment, check out this link: How To Set Up a Node.js Application for Production.

How To Install the Distro-Stable Version

Ubuntu 14.04 contains a version of Node.js in its default repositories that can be used to easily provide a consistent experience across multiple servers. The version in the repositories is 0.10.25. This will not be the latest version, but it should be quite stable.

ZoneMiner Installation: Build Package From Source

(These instructions assume installation from source on a ubuntu 14.x+ system)

First we make sure you have the needed tools

sudo apt-get update
sudo apt-get install cmake git

Next up we make sure you have all the dependencies

NetBeans IDE Keyboard Shortcuts I use the most

Initially for exploration of the features working with mouse may feel fancy but as you continue using the tool for project development and want to concentrate more on task in hand you start finding ways to do things faster. NetBeans IDE 6.1 provides many keyboard shortcuts if used judiciously they can save a lot of developers time.

I use certain shortcut keys more often than other keys. This is a list of the keyboard shortcuts for NetBeans IDE which I use in my day to day development tasks.

CTRL+F12 Navigate to Member

When my class becomes big and there are many methods in the class navigating to a specific method becomes easy with this dialog box.

<?php
namespace WebSocket;
/**
* WebSocket Connection class
*
* @author Nico Kaiser <nico@kaiser.me>
* @author Simon Samtleben <web@lemmingzshadow.net>
*/
class Connection
{

How to build a JAVA web app with WebSocket, JavaScript and HTML5

This tutorial shows how to create a JAVA application that uses the WebSocket API for real-time communication between a client and a server. In this tutorial, we will explore how to:

  • Create a JAVA application that uses the WebSocket API
  • Use the OnOpen and OnMessage WebSocket lifecycle events to perform different actions on the application.
  • Define a client-side WebSocket endpoint by using JavaScript
  • Operate on Java Objects, in real-time, with actions invoked from a web browser client

1. Introduction

How to turn off ALL Ads/Featured Content/Bundle in Utorrent

Step 1. Turn ALL settings to false:

Options > Preferences > Advanced...

  • bt.enable_pulse
  • distributed_share.enable
  • gui.show_notorrents_node
  • offers.left_rail_offer_enabled
  • gui.show_plus_upsell