my vim editor auto highlights php files, html files and so on.
but when i type: vim scriptname
and inside it write a bash script, it doesnt highlight it.
how come?
Recently i was asked
(1) "How will you do performance optimization over your jQuery in ASP.net ?"
(2) "How many script manager can we have in ASP.net Application?" why? (Ajax related).
I have no ideas on both.Help me to grow.
I have a script (Joomla) that creates files and directories on the server. The problem is that it creates them under owner 99 99 (nobody) and after I can't delete or modify them by FTP without the help of the server admin.
I think that is move_uploaded_file function of php.
Is there any solution of this problem by the WHM or by the server admin? Can I modify the default owner in ftp?
Getting the following error when trying to start a session:
Warning: session_start() [function.session-start]: Node no longer exists in file.php on line 3
The script uses SimpleXML to parse XML files from remote hosts. It's running on a Linux Ubuntu server with PHP 5.2.6.
Has anyone come across this message before or have an insight in to what it means?
Hi people,
I have three projects written with VB.NET (2005) and have to convert them to C# code. (I know that i don't need to convert codes of .net languages at all). I have no time to rewrite them, need a tool or script to convert.
Note: they are console applications.
I need a script to automatically delete the user profile left on ubuntu 9.04, anyone please send me this mail: [email protected] thank you, please indicate how I work not fluent in shellscript.
I am trying to implement the CurvyCorners script onto the site: euroworker.no. It reports back that certain CSS values don't exist on the page, how I can I turn off this alert?
Found the alert code:
if (j === null)
curvyCorners.alert("No object with ID " + arg + " exists yet.\nCall curvyCorners(settings, obj) when it is created.");
I have two tables, with the same structure, for example: table "first' with columns 'a','b','c' and table 'second' with the same columns. How to find difference betweet those two tables?
Of course, I can make some script on python, that will make set(a)-set(b), but I think there is some way to do it in mysql.
Is there a way to detect when the disabled attribute of an input changes in JQuery. I want to toggle the style based on the value.
I can copy/paste the same enable/disable code for each change event (as I did below) but I was looking for a more generic approach.
Can I create a custom event that will monitor the disabled attribute of specified inputs?
Example:
<style type="text/css">.disabled{ background-color:#dcdcdc; }</style>
<fieldset>
<legend>Option 1</legend>
<input type="radio" name="Group1" id="Radio1" value="Yes" />Yes
<input type="radio" name="Group1" id="Radio2" value="No" checked="checked" />No
<div id="Group1Fields" style="margin-left: 20px;">
Percentage 1:
<input type="text" id="Percentage1" disabled="disabled" /><br />
Percentage 2:
<input type="text" id="Percentage2" disabled="disabled" /><br />
</div>
</fieldset>
<fieldset>
<legend>Option 2</legend>
<input type="radio" name="Group2" id="Radio3" value="Yes" checked="checked" />Yes
<input type="radio" name="Group2" id="Radio4" value="No" />No
<div id="Group2Fields" style="margin-left: 20px;">
Percentage 1:
<input type="text" id="Text1" /><br />
Percentage 2:
<input type="text" id="Text2" /><br />
</div>
</fieldset>
<script type="text/javascript">
$(document).ready(function () {
//apply disabled style to all disabled controls
$("input:disabled").addClass("disabled");
$("input[name='Group1']").change(function () {
var disabled = ($(this).val() == "No") ? "disabled" : "";
$("#Group1Fields input").attr("disabled", disabled);
//apply disabled style to all disabled controls
$("input:disabled").addClass("disabled");
//remove disabled style to all enabled controls
$("input:not(:disabled)").removeClass("disabled");
});
$("input[name='Group2']").change(function () {
var disabled = ($(this).val() == "No") ? "disabled" : "";
$("#Group2Fields input").attr("disabled", disabled);
//apply disabled style to all disabled controls
$("input:disabled").addClass("disabled");
//remove disabled style to all enabled controls
$("input:not(:disabled)").removeClass("disabled");
});
});
</script>
Hi all,
I tried this script to copy release folder of one of my Xcode projects to desktop:
tell application "Finder"
set targetFolder to folder "release" of folder "build" of folder "8_15pm" of folder "26th_March" of folder "XYZ" of startup disk
set destinationFolder to folder "Desktop" of folder "miraaj" of folder "Users" of startup disk
copy targetFolder to destinationFolder
end tell
I was expecting that I will obtain a folder named as release on my desktop but I did not get any :(
Can anyone suggest me where I am wrong or some better way to do this??
Thanks,
Miraaj
What command can I use to print out the commit id of HEAD?
This is what I'm doing by hand:
$ cat .git/HEAD
ref: refs/heads/v3.3
$ cat .git/refs/heads/v3.3
6050732e725c68b83c35c873ff8808dff1c406e1
But I need a script that can reliably pipe the output of some command to a text file such that the text file contains exactly the commit id of HEAD (nothing more or less, and not just a ref). Can anyone help?
I have the following code I am trying to get working correctly:
<div id="newspost_bg">
<article>
<p>
<header><h3>The fast red fox!</h3></header>
This is where the article resides in the article tag. This is good for SEO optimization.
<footer>Read More..</footer>
</p>
</article>
</div>
<div id="newspost_bg">
hello
</div>
<div id="newspost_bg">
hello
</div>
<div id="advertisement">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2139701283631933";
/* testing site */
google_ad_slot = "4831288817";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
</div>
Here is the css that goes with it:
#newspost_bg{
position: relative;
background-color: #d9dde1;
width:700px;
height:250px;
margin: 10px;
margin-left: 20px;
border: solid 10px #1d2631;
float:left;
}
#newspost_bg article{
position: relative;
margin-left: 20px;
}
#advertisement{
float: left;
background-color: #d9dde1;
width: 125px;
height: 605px;
margin: 10px;
}
The problem I'm experiencing is that the advertisements im trying to get setup will align with the last with the id of newspost_bg but im looking to havce it align to the top of the container it is in. I dont know if this is enough info, if not please let me know what you might need. Im new to the web coding scene so any and all critiques help me.
Good Morning,
Just a quick question what this field actually means?
I am trying to create an export script which follows this standard:
lname varchar(30) **NOT NULL**,
So if last name is_nullable=yes then would I put NULL rather than NOT NULL at the *'d code.
Many Thanks,
Joel
A short question:
I've got a TabNavigator with multiple canvas children. How can i open one of the children with actions script (imagine it as a tab with an intro and after login the tab with content needs to be opened).
I have tried this.parentDocument.tabs.selectedIndex(1); but that doesnt work.
What's needed:
To move several directories between two Windows 2008 servers on a regular basis.
Due to security requirements, neither server is supposed to have network shares set up or extraneous software installed.
What's available:
Administrator access to both machines (including remote desktop access if that helps).
A third machine with:
Visual Studio 2010
Cygwin
Bonus extras
The script that does the rest of the work (apart from moving the files) is currently written in F#, but any .net/command line based solution would be fine.
Hey i got small problem getting an unknown curl error from my script "curl_error(): 180 is not a valid cURL handle resource".
Im not able to find any recourses about that error so maybe anyone has any experience with this.
Thanks already.
heres the part which causes the error
$resp = curl_error($ch);
error_log(date('Y M D h:s:m '). ": $current error: " .curl_error($ch)."\n", 3, '../../usererrors/'.$username.'errors');
I have a simple single-dimension array, let's say:
fruits = ["apples","bananas","oranges","peaches","plums"];
I can loop thru with with $.each() function:
$.each(fruits, function(index, fruit) {
showFruit(fruit);
});
but I'm calling to another function which I need to finish before moving on to the next item.
So, if I have a function like this:
function showFruit(fruit){
$.getScript('some/script.js',function(){
// Do stuff
})
}
What's the best way to make sure the previous fruit has been appended before moving on?
I am new to Stack OverFlow and coding in general. I am trying to take an XML file and render it in the browser using JavaScript. I have looked around at some sample code of how to do this and came up with the following code:
<!DOCTYPE html>
<html>
<body>
<script>
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","social.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
document.write("<table border='1'>");
var x=xmlDoc.getElementsByTagName("CD");
for (i=0;i<x.length;i++)
{
document.write("<tr><td>");
document.write(x[i].getElementsByTagName("c_id")[0].childNodes[0].nodeValue);
document.write("</td><td>");
document.write(x[i].getElementsByTagName("facebook_id")[0].childNodes[0].nodeValue);
document.write("</td></tr>");
}
document.write("</table>");
</script>
</body>
</html>
Anyway, when I run this on my local server none of the data that I am trying to display in the table appears. My .html file and .xml file are in the same folder, so I believe I have the correct file pathway. I could just be making a rookie mistake here, but I can't for the life of me figure out why a table listing the c_id and facebook_id values is not being created. I looked around for answers and haven't been able to find any. Any help would be greatly appreciated. Thanks!
Do you see any problem with this:
I'm in ASP.net and I'm using pikachoose jquery slideshow. It works fine in IE and was working in Firefox. However, somehow it's now stopped working in firefox and firebug is giving the doctype line above out as a syntax error and
$ is not defined for the jquery script?
Any ideas
Thanks
Andy
We're trying to document the performance difference of our site using different browsers. We use LoadRunner for load testing but I don't see a way to specify the "browser engine" it uses to run it's tests (perhaps it's using it's own?). In any event I'm not sure that LoadRunner is the right tool for this job but we own it so if we can use it, great.
If not, is there another tool out there that I can use to record a script and run it automatically against a site using several different browsers?
i have a multiple textboxes in repeater and i will enter value in those textboxes at runtime. and i want sum of all value entered in those textboxes in one label.i want to do this thing using java script. so can u please help me.
Does anyone know of a open source 3d engine which can be operated via telnet?
What I'm looking for is scripting via a socket connection. To allow for world creation and/or camera movement.
Does anybody know of any that has this built in or very, very easy to add as a plugin or script?
The platform is not crucial.
I want to assign the browser's (IE/FF) page zoom controls (Menu: View/Zoom/Zoom In_Zoom Out) to two large "(+)(-)" icons on the web page so that vision impaired visitors can use these controls conveniently.
A lot of searching for a suitable script came up empty so here I am.
Any code you know that will do this simply?
All the best...
Bob
I have a class that loads a springframework application context like so:
package com.offlinesupport;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class OfflineScriptSupport {
private static ApplicationContext appCtx;
public static final void initialize() {
appCtx = new ClassPathXmlApplicationContext( new String[] {
"mycontext.spring.xml"
} );
}
public static final ApplicationContext getApplicationContext() {
return appCtx;
}
public static final void main( String[] args ) {
System.out.println( "Starting..." );
initialize();
System.out.println( "loaded" );
}
}
The class OfflineScriptSupport, and the file mycontext.spring.xml are each deployed into separate jars (along with other classes and resources in their respective modules). Lets say the jar files are OfflineScriptSupport.jar and *MyContext.jar". mycontext.spring.xml is put at the root of the jar.
In a Jython script (*myscript.jy"), I try to call the initialize method to create the application context:
from com.offlinesupport import OfflineScriptSupport
OfflineScriptSupport.initialize();
I execute the Jython script with the following command (from Linux):
jython -Dpython.path=spring.jar:OfflineScriptSupport.jar:MyContext.jar myscript.jy
The Springframework application context cannot find the mycontext.spring.xml file. It displays the following error:
java.io.FileNotFoundException: class path resource [mycontext.spring.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:137)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:167)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:269)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)
at com.offlinesupport.OfflineScriptSupport.initialize(OfflineScriptSupport.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
If I run the jar directly from Java (using the main entry point in OfflineScriptSupport) it works and there is no error thrown.
Is there something special about the way Jython handles classpaths making the Springframework's ClassPathXmlApplicationContext not work (i.e. not be able to find resource files in the classpath)?
In my page I have drop down control, grid view. Inside the grid view in template field I have people picker control. When ever I change the drop down value from 'Select' to another I am displaying my grid view with people picker. Everything is working fine. But after applying 'update panel', whenever I change the drop down value, people picker control is not working inside the grid view.
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="gvDirectory" runat="server" AutoGenerateColumns="false"
ShowHeader="false" onrowcommand="gvDirectory_RowCommand"
onrowdeleting="gvDirectory_RowDeleting"
onrowdatabound="gvDirectory_RowDataBound" BorderWidth="0">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="chkselect" runat="server" Width="20px" AutoPostBack="true"
oncheckedchanged="chkselect_CheckedChanged"/>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="lnkcategory" runat="server" Text='<%# Eval("Title") %>' Target="_blank" NavigateUrl='<%# Eval("URL") %>' Width="200px" onclick="ShowAwesomeHelloPageInDialog(this);return false;"></asp:HyperLink>
<asp:Label ID="lblvalue" runat="server" Text='<%# Eval("value") %>' Visible="false"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<SharePoint:PeopleEditor ID="Assignedusers" runat="server" AllowEmpty="false"
MultiSelect="true" Width="250px" BorderColor="#559CD7"
Height="20px" SelectionSet="User,SPGroup" Rows="2" PlaceButtonsUnderEntityEditor="false" EnableViewState="true" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Delete">
<ItemTemplate>
<asp:ImageButton ID="btnDelete" runat="server" CommandArgument='<%# Container.DataItemIndex%>' ImageUrl="~/_layouts/images/EditTaskPage/Delete.png" CommandName="Delete" Text="Delete" Height="26px" Width="26px"/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
<%--<Triggers>
<asp:PostBackTrigger ControlID="ddlCategory" />
</Triggers>--%>
</asp:UpdatePanel>
<script type="text/javascript">
_spOriginalFormAction = document.forms[0].action;
_spSuppressFormOnSubmitWrapper = true;
</script>
how can I solve this problem..
thanks in advance....