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
#include "queue.h" | |
#include <stdio.h> | |
#include "geometry.h" | |
#define MAXV 100 /* the Maximum number of vertices */ | |
#define MAXDEGREE 50 /* maximum outdegree for the vertex*/ | |
typedef struct { | |
int v; /* neighboring vertex */ | |
int capacity; /* capacity of edge */ | |
int flow; /* flow through edge */ | |
int residual; /* residual capacity of edge */ |
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
#include "queue.h" | |
#include <stdio.h> | |
#include "geometry.h" | |
#define MAXV 100 /* the Maximum number of vertices */ | |
#define MAXDEGREE 50 /* maximum outdegree for the vertex*/ | |
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
PATH=$PATH:/data/myscripts | |
export PATH |
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
// clear the screen for testing | |
document.body.innerHTML = ''; | |
var nums = [1,2,3]; | |
// Let's loop over the numbers in our array | |
for (var i = 0; i < nums.length; i++) { | |
// This is the number we're on... | |
var num = nums[i]; |
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
// clear the screen for testing | |
document.body.innerHTML = ''; | |
var nums = [1,2,3]; | |
// Let's loop over the numbers in our array | |
for (var i = 0; i < nums.length; i++) { | |
// This is the number we're on... | |
var num = nums[i]; |
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 UploadFile(file) { | |
var xhr = new XMLHttpRequest(); | |
xhr.upload.addEventListener("progress", function(e) { | |
var pc = parseInt((e.loaded / e.total * 100)); | |
document.getElementById("progressbar").value= pc; | |
document.getElementById("progressbarstatus").innerHTML= pc +"% upload done"; | |
}, false); | |
xhr.onreadystatechange = function(e) { | |
if (xhr.readyState ==200) { | |
console.log(e); |
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 ajaxUpload(a){ | |
files=a.files[0];//get file | |
formdata=new FormData(); // created http transport object | |
formdata.append("files",files) ;// append a new value and this is going to send as post | |
ajax=new XMLHttpRequest(); | |
ajax.upload.addEventListener("progress",console.log(1),false) | |
ajax.open("POST","manage.php/upload"); | |
ajax.send(formdata); | |
function progressHandler(e){ | |
console.log(e.loaded/e.total); |
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
$("input[name='options']").on("click",function(){ | |
$(".active").each(function(){ | |
$(this).removeClass("active"); | |
}); | |
$(this).parent().addClass("active"); | |
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
if ($( ".subtabs" )){ | |
$( window ).scroll(function() { | |
var p = $( ".subtabs" ); | |
var offset = p.offset(); | |
var viewableOffset = p.offset().top - $(window).scrollTop(); | |
console.log($(window).scrollTop()); | |
if(viewableOffset<=20){ | |
p.addClass("fixed"); | |
} | |
if ($(window).scrollTop()<60){ |
NewerOlder