I'm running Drupal 6.14 and my back-end complaints that I need to upgrade to 6.16.
How can I do that? Do I just replace my php files with the new ones? Is there an update script?
I have a python function that gets an array called row.
Typically row contains things like:
["Hello","goodbye","green"]
And I print it with:
print "\t".join(row)
Unfortunately, sometimes it contains:
["Hello",None,"green"]
Which generates this error:
TypeError: sequence item 2: expected string or Unicode, NoneType found
Is there an easy way to replace any None elements with ""?
I have a HTML string and want to replace all links to just a text.
E.g. having
Some text <a href="http://google.com/">Google</a>.
need to get
Some text Google.
What regex should I use?
Hello I was wondering what is better in MySQL.
I have a SELECT querry that exclude every entry associated to a banned userID
currently I have a subquerry clause in the WHERE statement that goes like
AND (SELECT COUNT(*) FROM TheBlackListTable WHERE userID = userList.ID AND blackListedID = :userID2 ) = 0
Which will accept every userID not present in the TheBlackListTable
Would it be faster to retrieve first all Banned ID in a previous request and replace the previous clause by
AND creatorID NOT IN listOfBannedID
Thank you!
I have a string value coming from a label in the .aspx page as following.
string text = Price.Text; // Price.Text = "$31.07"
Single value = Convert.ToSingle(text); //throws FormatException
I can replace the $ sign with the empty text and then Convert to Single but I was wondering if there is better way to de-format the text with the '$' sign into a Single.
I got this code and working fine
$access_token = $facebook->getAccessToken();
$vars = array(
'caption' => 'Caption message',
'message' => 'I need help',
'name' => 'I need Help',
'link' => 'http://www.google.com/',
'description' => 'description',
'picture' => ''
);
But I want to replace the message or the name in to like : " (name of user) Need Help...
I have this link
@Ajax.ActionLink("create poll question", "CreatePoll", new { id = Model.DebateID }, new AjaxOptions
{
UpdateTargetId = "poll-entry-box",
InsertionMode = InsertionMode.Replace,
HttpMethod = "GET"
})
which is pointing at a action with the [Authorize] Attribute. The login works, but the returnURL is empty so it just redirects to the index page.
Is there some way to manually set the returnURL ?
NOTE
I am using the method described here http://haacked.com/archive/2011/10/04/prevent-forms-authentication-login-page-redirect-when-you-donrsquot-want.aspx because the login page was loading inside my partial.
Do we have a preg_callback equivalent in Perl ?
Lets say I want to match something and replace it with the return value of the function that is called with the matched thing.
I want to make some custom controls, with images as buttons. I don't want images ON buttons - I want to totally replace the button with an image read from a file.
Is it possible?
How to replace from regex many empty/blank characters with none? ex:
<div class="someClass" id="someID">
...bunch of elements/content
<input type="button" name="myInput" id="inputID" title="myInput Title" />
...bunch of elements/content
</div>
when replaced :
<a class="myselector" rel="I need this value"></a><div class="someClass" id="someID">...bunch of elements/content<input type="button" name="myInput" id="inputID" title="myInput Title" />...bunch of elements/content</div>
When am lancing camera using
Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, CAMERA_REQUEST);)
And then we getting callback after taking pic to the
onActivityResult(){
//HERE AM CALL ING ANOTHER FRAGMENT
FragmentManager fm = getFragmentManager();
fm.beginTransaction().replace( R.id.tab_upload, new uploadingActivty(), "tabId").setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
.addToBackStack(null).commit();
}
Then we getting error as
11-21 16:13:44.316: E/AndroidRuntime(30944): Caused by: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
Any idea?
What is the easiest way to detect a character in a text field?
I want to be able to detect a certain character and replace that character with another specific character.
So If I write in a text field... "zyxw" I want it to be replaced with "abcd".
I'm a newbie and don't really know where to start with this or how to go about it. If anyone has any methods of doing this, I would really appreciate it.
I am trying to autocomplete in a input, It is working fine in Chrome,Safari&Firefox . It is not working on IE 9 alone. Please help.
$("#name").autocomplete({
select: function(event, iu) {
id = event.toElement.innerText.split('-')
$("#id_estudiante").val(id[1]);
$("#FinancieroGrid").load('php/Financiero/librerias/FindStudent.php?action='+id[1].replace(' ',''));
},
source:'php/Financiero/function/getstuden.php',
minLength:1
});
How do I change the library a function loads from during run time?
For example, say I want to replace the standard printf function with something new, I can write my own version and compile it into a shared library, then put "LD_PRELOAD=/my/library.so" in the environment before running my executable.
But let's say that instead, I want to change that linkage from within the program itself. Surely that must be possible... right?
Hi
I'm a beginner in BlackBerry programming, I need to replace in my application the default menu (when you press the menu button) by a custom menu, horizontal. The best to describe is I want the same result as the WeatherEye application for BlackBerry...
I know how to create the default menu, but this one I have no idea!
Thank you,
I have been wondering why when I set the encoding to UTF-8 and rendering the XML it replace the extended characters by escape characters (or character reference) like ’ instead of '?
I'm using the Render method
render(contentType:"text/xml", encoding:"UTF-8") {...}
with a proper header
render(contentType:"text/xml", encoding:"UTF-8", text:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
Any idea if there is a way to write it properly?
Thanks.
Is it possible to replace the following with a list comprehension?
res = []
for a, _, c in myList:
for i in c:
res.append((a, i))
For example:
# Input
myList = [("Foo", None, [1, 2, 3]), ("Bar", None, ["i", "j"])]
# Output
res = [("Foo", 1), ("Foo", 2), ("Foo", 3), ("Bar", "i"), ("Bar", "j")]
I am trying t o create img captions based on src value match.
JQUERY : What is the best way to extract "Author-ABC" from an img with src value wwww.abcd.com/images/imagename_Author-ABC_.jpg and replace the alt value with this value.
DRUPAL : Is there a way to preprocess this a drupal template function and save the value in img alt attribute?
Ideas?
Basho
I would like to set the width and the height of the div element dynamically using jQuery.
I was trying to replace
<div id="mainTable" style="width:100px; height:200px;"></div>
with this:
$("#mainTable").css("width", "100");
$("#mainTable").css("height", "200");
but, it does not work for me.
Please help to understand why.
I have a string like this
BRADI5G20430|BRADI5G20430.1||1
How can I replace the bar (single and multiple) with tab ("\t")?
I tried this but dont' work
sed 's/\|+/\t/g'
I also want to include this line in bash script.
In my iPhone app, I am using the UIImagePickerController with source type UIImagePickerControllerSourceTypeCamera. When the user takes a picture, the phone plays the familiar camera shutter sound. How can I replace this with my own custom sound? I know it's possible because I've seen other apps from the App Store do it (e.g. Red Laser).
Thanks in advance!
I want to use perl's sprintf to zerofill a variable.
sprintf("%08d", $var);
but I want the dynamically determine how many digits to zero fill.
How do I replace the "8" in sprintf("%08d", $var) with a variable called $zerofill.
Thanks.
class A
{
public:
A()
{
}
};
class B : public A
{
public:
B()
{
}
};
int main()
{
A *a=new A();
B * b=static_cast<B*>(a);
///The above code compiles while if I replace above two line in main with below assignment it gives error.
A *a=new A();
B * b=new A();
}
Hello,
I'm working on .net project and writing an application that interacts with database. I currently have some SQL statements in the code and I want to put these statements in separate file with solution. So, later when the application gets deployed, and if I want to update SQL statements, I could just update the statements in the file and just replace the file instead of redeploying the whole solution.
Thank you for your help.
Hello, My TeamCity's nightly build produces more than 130Mb java doc as Build Configuration artifact.
I have to share these artifact for other teams(developers), but javadoc every time has another one URL(I know that it's possible to get it like .lastFinished), and get's new place on Build Machine.
Is it possible on each build replace old artifact with new one because I don't need need previous versions? And have independent from build version URL for accessing.