I need a similar function in PHP for this JavaScript function
text = text.replace(/ffc/g, "Hello");
I think preg_replace will do, but i'm not sure how to write the expression..
Hello,
I have a List of object, produced by JPA q.getResultList().
I would like to use it in a drop down, but Stripes "option" tag cant accept List, just Collection, Enum and Map.
Im new to Java, that why perhaps the List can translated to each of them but I dont know how can I solve this issue.
(Stripes select,option-map,-enumeration, -collection can build up a drop down from previous mentioned input object structures )
Thanks advance
I want to execute python code from C# with following code.
static void Main(string[] args)
{
ScriptEngine engine = Python.CreateEngine();
ScriptSource source = engine.CreateScriptSourceFromFile(@"F:\Script\extracter.py");
source.Execute();
}
I have the problem at line source.Execute(), I got error "No module named difflib".
What is wrong in my code?
This is my python code (extracter.py).
import re
import itertools
import difflib
print "Hello"
hello
I have complete code for implemention for facebook in my application But the problem arises as follow :
Firstly whenever i import FBConnect\FBConnect.h the error will show that it doesn't "NO such file or direectory"
secondly due to this error i have 182 error in my application..
Thanks
Hello. Does anyone know how to remove the "click" sound you get when navigating to another page, when using a WebBrowser on a WinForm? I would have thought they would have included an option to choose weither you want it enabled, but they didn't. Thanks for the help!
Hello,
I followed this tutorial to add fields in the registration form of a customer under Magento, I succeed to run the example, but I know that It is not clean, for upates later...
What' the best way to rewrite all the files used in the tutorial, in a clean way :
app/design/frontend/default/yourtheme/template/customer/form/register.phtml
app/design/frontend/default/yourtheme/template/customer/form/edit.phtml
app/code/core/Mage/Customer/Model/Entity/Setup.php
app/code/core/Mage/Customer/etc/config.xml
app/code/core/Mage/Customer/controllers/AccountController.php
Thanks a lot
Hello, I am making a twitter application for iPhone, I am trying to add a button which will open Safari, and take the user to their twitter homepage. I have a textfield called username, so the following code does not work, hopefully someone will be able to help me out.
-(IBAction)viewAccount {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.twitter.com/", username.text]];
}
Any help is appreciated! Thank you!
Hello, I've got the following question:
Is it possible te disable everything in windows except the program it's running?
I need to program an application on a touchscreen (fullscreen), where people can fill in a survey.
The only thing they should use is this program. (for protection of the survey anwsers and other secret stuff :p )
And the program should be closed when entering the right password.
So how can I disable everything else but the program I'm running?
Thanks
Hello,
I'm working on a website using extensively javascript. The code I'm working on also rely on other big javascript libs. The thing is that somewhere in these libraries, some alert box are poping.
I was wondering if there are some way to disable the javascript alert box on the fly and re-enable it later.
Thanks
I want to pass a command as a command line argument from one batch file to another
e.g.
first.bat
call test.bat "echo hello world" "echo welcome "
test.bat
set initialcommand=%1
set maincommand=%2
%maincommand%
%initialcommand%
hi i want to execute a command that is saved as a string
e.g
test.bat
call temp.bat "echo hello world" "echo welcome"
temp.bat
set first=%1
set sec=%2
%first%
%sec%
please tell me how to do this
thanks
Hello,
I am using a couple varaibles that have value of DateTime.now for both database and web services purpose. Now, if someone asks you that how I am handling non-machine timezone, is that question refering that how the code will handle in case if the application gets deployed to machines in different time zones?
To give more information, the application will manipulate data from different time zones.
Thank you.
Hello evryone
I have some codes to use ASINetworkQueue as multi thread download
ASINetworkQueue *networkQueue;
NSURL *url = [NSURL URLWithString:s];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[networkQueue addOperation:request];
[networkQueue go];
if I try to use the code below to cancel the thread with index k
[[[networkQueue operations] objectAtIndex:k] cancel];
I notice all requests in ASINetworkQueue were cancelled and stop working.
Welcome any comment
Thanks
interdev
Hello people,
I have to copy tables from an Oracle database to a db2 v7 one, and in order to do this (avoiding millions of drops and creates) I'd like to know if db2 has a feature like Oracle to enable / disable constraints temporarily without dropping them.
Thanks in advance,
Mauro.
I'm trying to build a basic Qt hello world inside visual studio.
I got the moc step to work (i think), but I am at a loss as to how to pass this linker error..
1>moc_mainwindow.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QMainWindow::staticMetaObject" (?staticMetaObject@QMainWindow@@2UQMetaObject@@B)
I've pleanty of googling but I am really at a loss.
Hello,
How do I compress/decompress a string in VB.NET ?
I am trying to send long string through the Network and need them to be as small as possible before sending.
Thanks
hello all
i have a problem, i have some data in Datacontext and i want to fetch this data how can i achive it
thanks in advance
shashank
button1.DataContext = new DataView(tablename, "field1 in (" + stringbuilder.ToString() + "0)", "field1", DataViewRowState.CurrentRows);
Hello,
After using stackoverflow for weeks i am just addicted by its system and the "badges" system. Is it possible to create a simple Q&A board with this concept or is there any tutorials ?
Hello, I'm trying to port some old MSVC C++ code to MinGW/GCC.
One problem is that the project relies heavily on the /DELAYLOAD option for functions that aren't always used, and where the proper dll is located at runtime.
Is there such a similar option on MinGW/GCC?
This code is targeting the windows platform.
Hello.
Seems,that very basic question.
Anyway can't get the meaning of next definition from Spring tutorials - "bean X is injected into bean Y" .
Does it mean composition relation between classes(when one bean has reference to another)? Or it's something more?
Thank you for answer or reference with explanation.
I am from a Java background and is learning C++. I encountered the following C++ code:
String source = String::New("'Hello' + ', World'");
As what I understand so far, this should be a call to static member function 'New' of class 'String'. But, I've searched through the whole header file defining 'String', there is not any static member named 'New' in the String class or its super classes. Is there any special meaning attached to String class or the New member function in C++?
Hello, after reading through a couple similar Qs/As I haven't quite found the solution I'm looking for. The table data I have is GROUP BY DATE(timestamp) and returning a count, example result:
[timestamp] = 2010-05-12 20:18:36
[count] = 10
[timestamp] = 2010-05-14 10:10:10
[count] = 8
Without using a temporary table, or calendar table is there a way to fill in those missing dates? so that with the same table data would return (adding the bold row):
[timestamp] = 2010-05-12 20:18:36
[count] = 10
[timestamp] = 2010-05-13 00:00:00
[count] = 0
[timestamp] = 2010-05-14 10:10:10
[count] = 8
Thanks!
Hello
I have a problem with django translations.
Problem 1 - i updated string in django.po file, but the change does not appear on the webpage.
Problem 2 - i have created my own locale file with django-admin.py makemessages -l et, added the translation string into file, but they too do not appear on the page.
I do not think this is setting problem, because the translations from django.po file do appear on the website, its just the changes and the translations from my own generated file that do not appear.
Alan
Hello All,
I wrote a function in python which is used to tell me whether the two words are similar or not.
but now i want to pass japanese text in my same function.It is giving error not a ascii character.I tried using utf -8 ecoding, but then it giving the same error
Non-ASCII character '\xe3' in file
Is there any way to do that.I cant generate the msg file for that since the 2 keyword will be not be constant.
Hello, I'm using SFML Input system for my own application. Here is my code:
size_t windowHnd = %MY_WINDOW_HANDLER%;
sf::Window MyWindow(windowHnd);
const sf::Input& MyInput = MyWindow.GetInput();
cannot convert ‘sf::Window’ to ‘size_t’ in assignment
In official documentation I found sf::Window constructor signature:
WindowHandle Handle
What is the correct way to pass window handler for the SFML?