|
Can you take a look at this http://imgur.com/JdKLgkR,gbRUpjS,P9dV4Za#0
Now,how to write a script from the above example?
And please don't mention google CSE,Chrome personal-blocklist,I have already tried them.
Thank you
modified 30-Aug-14 9:03am.
|
|
|
|
|
If you are asking how to hack people's systems you will get no assistance on this site. If you have a proper programming question, then please edit your post above and provide the details.
|
|
|
|
|
I want to exclude torrent sites from Google,cause family members(kids) trying to find torrent sites.I got a warning letter from ISP.
|
|
|
|
|
Rather than trying to modify their search results, why not try changing the settings on the router to restrict their access? Turn off UPnP and block all outbound ports except 21 (FTP), 80 (HTTP) and 443 (HTTPS).
If it still doesn't work, take their computers away until they learn to follow your rules.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Also have a look at the filtering the search results through Google options settings[^]
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
|
My requirement is, to focus fancy box pop up as soon as it pops out, and block other opened windows, till the user clicks on it.
Plz help...!!274
Thanks in advance.
|
|
|
|
|
Where are you stuck? What does you code look like?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
A quick google search for their site then shows there is a modal setting. http://fancybox.net/api[^]
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Have you written any code for that? if yes then pls share with us else first start doing it and then ask for help if u really got stucked.
|
|
|
|
|
Why don't you share your code if you tried anything? Or search in Google.
|
|
|
|
|
I am looking over some code that someone else wrote for three.js
The main.js file starts out with this.
var APP = {};
(function () {
"use strict";
/*global VT,THREE,Detector,requestAnimationFrame*/
/*jslint browser: true*/
/***************************************************************************
* Global Variables
*/
// three.js variables
var scene = null;
var renderer = null;
var camera = null;
var controls = null;
var mesh = null;
var clock = new THREE.Clock();
var domContainer = null;
var virtualTexture = null;
/***************************************************************************
* Initialiaze application
*/
function resize() {
renderer.setSize(window.innerWidth, window.innerHeight);
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
}
.
.
.
APP.load = function (geometry, config) {
// create virtual texture
geometry.computeTangents();
geometry.computeVertexNormals();
virtualTexture = new THREE.VirtualTexture(renderer.context, config);
var material = THREE.createVirtualTextureMaterial(virtualTexture);
mesh = new THREE.Mesh(geometry, material);
scene.add(mesh);
THREE.duplicateGeometryForVirtualTexturing(geometry, virtualTexture);
};
}());
and the code ends like above.
I dont get this line (function () {
How does that work or even get called?
The code actually works and not seeing anything like this before
just made me curious.
Hope someone can shed some light on this.
Thanks,
Bob
|
|
|
|
|
All of the code is encapsulated inside an anonymous function that starts with the
(function () { line and ends with
}());
The function is executed straight away - the () on the last line calls it with no arguments. The only variable that this script exposes is "APP", which is an object containing the "load" function (and anything else that was added in the ... part).
|
|
|
|
|
|
|
Nice explanation
|
|
|
|
|
(function () {
}());
equal with:
var fn = function(){
};
fn();
look at the following codes:
(function(words){alert(words);}('hello!'));
|
|
|
|
|
It’s an Immediately-Invoked Function Expression, or shorter: IIFE. It executes immediately after it’s created.
This pattern is often used when trying to avoid polluting the global namespace, because all the variables used in the function are not visible outside its scope.
|
|
|
|
|
Can someone please help me with this code by looking over it for something obvious? The problem seems to be that the embedded JavaScript code is not being executed and, therefore, the PHP code is also skipped. Both, the HTML and the PHP files are in the root directory.
html/js:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery AJAX test form</title>
<script src="js/jquery.min.js"></script>
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div id="contacts">
<div class="row">
<div class="col-sm-offset-3 col-sm-6">
<p> </p>
<p>Some header message here</p>
<p> </p>
<form name="contact" class="well" id="contact">
<legend>Contact Form</legend>
<div class="control-group">
<div class="controls">
<input type="text" class="form-control" placeholder="Name" id="name" />
<p class="help-block"></p>
</div>
</div>
<div class="control-group">
<div class="controls">
<input type="email" class="form-control" placeholder="Email" id="email" required/>
</div>
</div>
<div class="control-group">
<div class="controls">
<textarea rows="10" cols="100" class="form-control" placeholder="Message" id="message" style="resize:none"></textarea>
</div>
</div>
<div id="success"> </div>
<button type="submit" class="btn btn-primary pull-right" id="submit">Send</button>
<button type="reset" class="btn btn-default pull-right" id="res">Reset</button>
<br />
</form>
</div>
</div>
</div>
</div>
<script>
$(function() {
$("button#submit").click(function(event){
event.preventDefault();
$.ajax({
type: "POST",
url: "process.php",
data: $('form.contact').serialize(),
success: function(){
alert("success");
},
error: function(){
alert("failure");
}
});
});
});
</script>
</body>
</html>
php:
<?php
if (isset($_POST['name'])) {
$name = strip_tags($_POST['name']);
$email = strip_tags($_POST['Email']);
$message= strip_tags($_POST['message']);
echo "Name =".$name."</br>";
echo "Email =".$email."</br>";
echo "Message =".$message."</br>";
echo "<span class=\"label label-info\" >your message has been submitted .. Thank you</span>";
}
?>
ralf.riedel@usm.edu
|
|
|
|
|
RalfPeter wrote: $("button#submit").click(function(event){
Change your selector from...
$("button#submit").
to.
$("#submit").
|
|
|
|
|
Nope. It now enters the ajax code, but does not access the php code. Thx for the tip.
ralf.riedel@usm.edu
|
|
|
|
|
try debugging your error handler to see what is happening. I would change the error function to receive the three different parameters and then add a breakpoint on the error handler in whatever browser you are using.
error: function(xhr, status, error){
}
|
|
|
|
|
Hi folks,
I just started working on a very interesting project as part of my university research for 3D visualization of earth's surface in 3D (not 3D modeling but real 3D!) using nVidia 3D vision in browser environment. I'm planning to use one of web-based javascript mapping platforms (like open layers or leafletjs) as a base and develop necessary modules for 3D visualization. I have all necessary data (2 image pairs for a test area created from satellite image and Digital Elevation Model) and looking for information on platform, modules and libraries you might know that can help me build this or even any already developed tool you know. I would also appreciate if you mention any document, resource or guide you can share or if you have any comment, advice or ideas.
In case you are interested in being part of this tiny but fun project, you can contact me on the following Email:
T E Z a-t A B 0 d-o-t O R G (without space! third character after at sign is "0" (zero) and not "O" (the letter))
PS: here is a demo of nVidia's tech on browser for those who have access to 3D glasses and graphics card (you should choose 3D vision tab in gallery and turn your 3D feature ON to see it):
http://photos.3dvisionlive.com/HiTechLegion/image/4d0191b7378501b5010c0000/
Cheers
|
|
|
|
|
I already made a post at Superuser http://superuser.com/questions/800325/how-to-make-google-search-look-dumb[^]
I will summerize here:
[1] http://i.stack.imgur.com/ZN60B.jpg
My point is i do not want to see torrent sites in the search results,so if someone searches Google or any other search engine this phrase(-torrent-download-watch) should be automatically and invisibly added.
[2] http://i.stack.imgur.com/4mUSt.jpg
And one of the answers was this userscript written by krowe:
function GM_main () {
window.onload = function () {
var targ = window.location;
if(targ && targ.href && targ.href.match('https?:\/\/www.google.com/.+#q=.+') && targ.href.search("/+-torrent/+-watch/+-download")==-1) {
targ.href = targ.href +"+-torrent+-watch+-download";
}
};
}
function addJS_Node(text, s_URL, funcToRun, runOnLoad) {
var D=document, scriptNode = D.createElement('script');
if(runOnLoad) scriptNode.addEventListener("load", runOnLoad, false);
scriptNode.type = "text/javascript";
if(text) scriptNode.textContent = text;
if(s_URL) scriptNode.src = s_URL;
if(funcToRun) scriptNode.textContent = '(' + funcToRun.toString() + ')()';
var targ = D.getElementsByTagName('head')[0] || D.body || D.documentElement;
targ.appendChild(scriptNode);
}
addJS_Node (null, null, GM_main);
But the script is not working at all. I copied it to tampermonkey , tried it several times no luck.I need some help please.
I will be happy if this script can atleast work in YouTube,Bing and Yahoo.
Thank you in advance.
|
|
|
|
|