Is it possible to move a process from one shell to another? Ex: I have launched a process in some shell, and I decide I'd like to move it to my GNU screen session. Is that possible?
I do not really understand how Google Code handles file versioning.
I am building a jQuery plugin that anyone can access. Like so:
<script type="text/javascript" src="http://jquery-old-browser-warning.googlecode.com/files/jquery.browser-warning.js"></script>
This script accesses other files on the same project (via ajax).
The problem is, that when I upload a new file, it just seems like there aren't any changed to it. Google recommends that new files should have new names.
But then I would have to change the filenames that the script loads.
But then I would have to change the script file as well, and that would break everybodys implementation (with the script-tag above)
Is there a way to force a file to change when uploading with the same filename?
PS: If I go directly to the project page's file list. Then I do get the file with the updated content. But as I said, not when getting it through ajax.
I tried to use this code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<style type="text/css">
div {display: none}
</style>
<script type="text/javascript">
$('.radio1').click(function () {
$('.div1').show();
});
$('.radio2').click(function () {
$('.div2').show();
});
</script>
<label><input type="radio" name="group1" class="radio1"></label>
<label><input type="radio" name="group1" class="radio2"></label>
<div class="div1">Radio1 selected !</div>
<div class="div2">Radio2 selected !</div>
But when I check any radio then notthing happens.
I tried with Fiddle: http://jsfiddle.net/Ac9c4/
and same no results
Any idea?
Ive got a site that does a few ajax calls on page load, now for some reason, codeIgnitor is inserting 4 sessions (I'm assuming for each ajax call) as you load the page. I'm storing the sessions in the database.
I'm pretty sure there should only be one session per browser? FF seems to only generate one, other browsers seem to create a whole bunch of sessions.
Multiple sessions for the same user are giving me some serious authentication problems.
any ideas?
I am making a real estate non interactive display for their shop window.
I have kicked jCarousel into doing what I want:
Add panels per AJAX
Towards the end of the current set, go and AJAX some new panels and insert them
This works fine, but it appears calling jQuery's remove() on the prior elements cause an ugly bump. I'm not sure if calling hide() will free up any resources, as the element will still exist (and the element will be off screen anyway).
I've seen this, and tried carousel.reset() from within a callback. It just clears out all the elements.
This will be running on Google Chrome on Windows XP, and will solely by displaying on LCD televisions.
I am wondering, if I can't find a reasonable solution to remove the extra DOM elements, will it bring my application to a crawl, or will Chrome do some clever garbage collecting?
Or, how would you solve this problem?
Thanks
I have a Page with a Wizard component. The user can navigate the panels of the wizard by using the next and previous buttons which I have performing full (non-ajax) form submissions so that the app is back-button friendly.
When the next button is clicked, I would like to attempt ajax form validation (if javascript is enabled). I tried doing:
nextButton.add( new AjaxFormValidatingBehavior( form, "onsubmit") );
to add such validation. The behaviour works - however, when validation errors occur the browser still submits the entire form.
What is the Wicket way to prevent the browser from submitting the form in this case?
I want to display result of this javascript in a label control on my asp.net page, instead of alert. how can i do so?
<script type="text/javascript" language="Javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <!-- Require EasyJQuery After JQuery --><script type="text/javascript" language="Javascript" src="http://api.easyjquery.com/easyjquery.js"></script> <script type="text/javascript" language="Javascript">
// 1. Your Data Here
function my_callback(json) {
alert("IP :" + json.IP + " COUNTRY: " + json.COUNTRY);
}
function my_callback2(json) {
alert("IP :" + json.IP + " COUNTRY: " + json.COUNTRY + " City: " + json.cityName + " Region Name: " + json.regionName);
}
// 2. Setup Callback Function
// EasyjQuery_Get_IP("my_callback"); // fastest version
EasyjQuery_Get_IP("my_callback2","full"); // full version
</script>
I am trying to move away from TextPad and I just cant get reg expressions like ^ and $ to be replaced.
I have definitely ticked the regular expression box
What am I doing wrong
EDIT: I am trying to find the start of a new line - In textpad it is find '^' and ensure reg ex is enabled. With notepad++ it does not do that. It just says not found
I'm having problems with using the Model in a javascript call when setting up my knockout VM..
@model List<AdminGui.Models.Domain>
<script src="http://ajax.aspnetcdn.com/ajax/knockout/knockout-2.2.1.js" type="text/javascript"></script>
<script type="text/javascript">
function ViewModel() {
var self = this;
self.domains = ko.observableArray(
ko.utils.arrayMap(@Model, function(item) {
return new Domain(item.guid, item.description, item.namespaces);
}));
}
I get a syntax error on @Model in the ko.utils.arrayMap call. I suspect it might be my Razor-fu that is lacking... :)
I have a customer page on which user can enter multiple locations for customer. I am using telerik ajax grid to display locations, and when a new location is added, I am adding it to session and returning back to the grid. Finally, when user submits, customer and all locations using customerid as reference key gets inserted. I am clearing the session, when user enters create/edit page and on successful commit or any exception occurs. Problem is when user adds the locations for one user and then opens another tab, to create another user then all locations get cleared for previous user. Coz of session, this issue is occuring. Something of viewstate would be page specific. But for ajax grid actions, viewdata/viewbag is not working. Any thoughts on how to implement this. Thanks in advance.
I have a Windows 2003 server running a SSH server (WRQ Reflection), how would I ssh to it and specify a specific drive letter? (like the D: drive)
ex: from another workstation: ssh [email protected] d:
When I do that it fails and I get this error: "exec request failed on channel 0" If I simply SSH to that same windowsbox without trying to specify a drive letter I get a Windows (CMD.EXE) command prompt shell on the C: drive. I can then run any windows command.
Thanks
if the following possible? I wish to move the alert(result) into a function and to dynamically call it.
Current
$.ajax(this.href, {
success: function (result)
{
alert(result);
AjaxComplete();
}
});
My Attempt - not working
$.ajax(this.href, {
success: function (result)
{
window["MyAlert(result)"]();
AjaxComplete();
}
});
function MyAlert(result)
{
alert(result);
}
Is this possible?
I'm looking for a command to get text around a specific line of a file.
ex:
file content:
a
b
c
d
e
f
g
h
i
j
a command like:
]$ commandname -text f -lines 3
giving the output
c
d
e
f
g
h
i
Hi am having an issue with the margin auto of my website where i have a wrapper div with the width set to 1000px and the margins top and bottom to 0 and left and right to auto. I have a navigation menu in the side bar, where i used java script to replace the same div with different tables. when i click a link in the menu the wrapper shifts right some px and the comes to original, I don't want that action i want the wrapper to be static and not to vary at any time. how can i achieve that.
when i set the margin to just 0, so problem with positioning. But i want the wrapper to be centered.
Here is my css code:
body {
background-color:#E2E3E4;
color:#333;
margin:0;
padding:0;
font-size: 12px;
}
#wrapper {
width:1000px;
margin:0 auto;
margin-bottom:10px;
}
#header1 {
width:1000px;
height:44px;
margin:0 auto;
background-color:#ED6B06;
}
#header2 {
width:1000px;
height:40px;
margin:0 auto;
border-bottom:1px solid #EDE9DE;
}
#header3 {
width:1000px;
height:40px;
margin:0 auto;
border-bottom:1px solid #EDE9DE;
}
#header2 p {
margin:0 auto;
font-size:20pt;
color: #364395;
font-smooth: auto;
margin-left:15px;
margin-top:5px;
}
#welcome {
width:600px;
float:left;
padding:10px;
margin:0 auto;
}
#status{
margin:0 auto;
width:50px;
float:right;
padding:10px;
margin-top:3px;
margin-right:15px;
}
#content {
width:780px;
float:right;
}
#sidebar {
width:150px;
margin-top:15px;
margin-left:10px;
float:left;
border-right:1px solid #EDE9DE;
margin-bottom:25px;
}
#footer {
clear:both;
margin:0 auto;
width:1000px;
height:44px;
border-top:1px solid #EDE9DE;
}
HTML:
<html>
<head>
<link rel="stylesheet" type="text/css" href="style/style.css" media="screen" />
<title>Pearson Schools Management Portal</title>
</head>
<body id="home">
<div id="wrapper">
<?php include('includes/header1.php'); ?>
<?php include('includes/header2.php'); ?>
<?php include('includes/header3.php'); ?>
<div id="content">
<h2>Welcome to Portal!</h2>
</div> <!-- end #content -->
<?php include('includes/sidebar.php'); ?>
<?php include('includes/footer.php'); ?>
</div> <!-- End #wrapper -->
<link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://jzaefferer.github.com/jquery-validation/jquery.validate.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<?php include('scripts/index_data.js'); ?>
</body>
I have the following piece of code:
// setup the AJAX request
var pageRequest = false;
if(window.XMLHttpRequest) pageRequest = new XMLHttpRequest();
else if(window.ActiveXObject) pageRequest = new ActiveXObject("Microsoft.XMLHTTP");
// callback
pageRequest.onreadystatechange = function() {
alert('pageRequest.readyState: ' + pageRequest.readyState
+ '\npageRequest.status: ' + pageRequest.status);
}
pageRequest.open('POST','ajax.php',true);
// q_str contains something like 'data=value...'
pageRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
pageRequest.setRequestHeader("Content-length", q_str.length);
pageRequest.setRequestHeader("Connection", "close");
pageRequest.send(q_str);
This works fine in Chrome, but IE chokes on it, spitting out an "Unspecified error." and it points to the line with the alert() in it. Why can't it display the alert?
I have a jquery script as below:
$.ajax({
type: "GET",
url: "http://www.site.com/v4/ajax/get_song_info.php",
data: ({id : song_id }),
dataType: "json",
success: function(data)
{
alert( "Data: " + data );
}
});
And the associated php page:
<?php
include_once '../connect.php';
$song_id = $_GET['id'];
$query = mysql_query("SELECT * FROM songs WHERE id = '$song_id' LIMIT 1");
$song = mysql_fetch_row($query);
$song_info = array( htmlentities($song[3]) , htmlentities($song[4]) );
header('Content-Type: application/json');
echo json_encode($song_info);
?>
The php returns something like this when I call it on its own in a browser: ["Peaches","I Feel Cream (Proxy Remix)"]
However when I make the jQuery call my alert shows 'Data: null'
So today I just came across the 'live()' function that binds any future and past elements to the whatever event you choose, such as 'onclick'.
Right now I'm having to set up buttons like the following each time I load a new button via ajax ...
$('a.btn.plus').button({icons:{primary:'ui-icon-plusthick'}});
$('a.btn.pencil').button({icons:{primary:'ui-icon ui-icon-pencil'}});
$('a.btn.bigx').button({icons:{primary:'ui-icon ui-icon-closethick'}});
So, instead of calling these lines each time I use ajax to add a new button, is there a similar way to tell JQuery to setup my buttons ANYTIME I add new ones?
Thanks for any help!
I am trying to overwrite a JavaScript on change event in the below code with jQuery however I believe that the inline JavaScript is taking priority over the jQuery functionality declared. Essentially I am trying to have an AJAX version of my site which includes an additional JavaScript file. I need this functionality to still work without the additional AJAX version, but I am not sure as to whether I should include it in the main JavaScript file or leave it inline like it is right now. Any suggestions and information regarding them would be greatly appreciated! Thanks!
<form action="/cityhall/villages/" method="post" name="submit_village">
<select name="village" onchange="document.submit_village.submit();">
<option value=""></option>
</select>
</form>
I am trying to use the jQuery Form Plugin to submit the posts to the PHP to handle the requests as follows:
var bank_load_options = {
target: '#content',
beforeSubmit: showRequest,
success: showResponse
};
$('form.get_pages').livequery(function(){
$(this).ajaxForm(bank_load_options);
return false;
});
I modified the code as following:
<form action="/cityhall/villages/" method="post" id="submit_village" name="submit_village">
<select name="village" class="get_pages" rel="submit_village">
<option value=""></option>
</select>
</form>
<script>
# main JavaScript
$('.get_pages').live('change',function(e){
var submit_page = $(this).attr('rel');
$("#"+submit_page).submit();
});
# ajax JavaScript
var bank_load_options = {
target: '#content',
beforeSubmit: showRequest,
success: showResponse
};
$('.get_pages').live('change',function(){
var submit_page = $(this).attr('rel');
$("#"+submit_page).ajaxForm(get_pages_load_options);
return false;
});
</script>
However now it only runs every other option when I change it.
We do maintenence on a number of systems.
I'm finally in a place where I'm teh fucking boss for once, and have to design a large system that will have a long maintenance contract.
There's a couple of tasks I find myself always repeating:
1) similar tasks for users with JS and those without
2) similar things for contents and rss/atom feeds, etc.
To combat these I will need appropriate handling of assets (think JS files, CSS, themes/templates, etc.), excellent auth/user systems, javascript/ajax forethought, appropriate model setups. Codeigniter fails on many of these. Basically, with enough time I could build this system with Zend, but I'm curious what else is out there as Zend is also kind of a heavy-weight. We need something that is Rapid but maintainable, CodeIgniter is not maintainable.
We will have a lot of AJAX APIs in place for the design team to play with. At first I thought jQuery was cool, but now I'm looking at Dojo.
To make click-able divs, I do:
<div class="clickable" url="http://google.com">
blah blah
</div>
and then
$("div.clickable").click(
function()
{
window.location = $(this).attr("url");
});
I don't know if this is the best way, but it works perfectly with me, except for one issue:
If the div contains a click-able element, such as
<a href="...">, and the user clicks on the hyperlink, both the hyperlink and div's-clickable are called
This is especially a problem when the anchor tag is referring to a javascript AJAX function, which executes the AJAX function AND follows the link in the 'url' attribute of the div.
Anyway around this?
I'm working on an AJAX login system. Right now, when the user clicks on a link, the login form is dynamically loaded when the person clicks on a "log in" link. Since I'm using AJAX for this, I want to prevent the form from actually submitting when the submit button is clicked. I tried the following code as part of my load function, and the form loads correctely, but the form still submits normally.
$('#loginBox').load('loginform.php');
$('#loginBox form').submit(function(event) {
event.preventDefault();
});
How can I fix this?