Hi,
I wonder if there is something wrong with the copy constructor function below?
class A
{
private:
int m;
public:
A(A a){m=a.m}
}
Thanks and regards!
I have a set of data (in ArrayCollection) and I need to fit a power function { f(x)= B + x^alpha } to it, before display in LineChart.
As result I need the alpha and B paremeter.
How to do this with Flex?
Hi all,
I've found that setting a dark color theme in Eclipse makes the function tooltips unreadable.
This is probably easiest to describe with a picture:
Any ideas how to fix this?
I keep getting this error, although the file still gets moved into the correct directory. Anybody know why i'm getting this error?
Warning: rename(../Images/uploaded/1162504_56863010.jpg,../Images/uploaded/Portraits/1162504_56863010.jpg) [function.rename]: No error in D:\Data\Websites\wamp\www\StephsSite\PHP\addImage.php on line 21
Here is the function description
test($argv)
$argv is an array, for example $argv=array($from1,$to1,$from2,$to2.....);
array items must be even.
$argv=array(1,2,4,5) : this will output values like below:
1_4
1_5
2_4
2_5
The number of array $argv's is not constant.
Maybe 3 or 4 levels of loop will be outputed.
I know this will used RECURSIVE , but i don't know exactly how to code.
Can anyone please explain a recursive function to me in PHP (without using Fibonacci) in layman language and using examples? i was looking at an example but the Fibonacci totally lost me!
Thank you in advance ;-)
Also how often do you use them in web development?
I have a function that is side effect free and I would like to run for every element in an array and return an array with all of the results. I'm wondering if python has something built into to generate all of the values.
Thank you.
Here is my check login function:
protected bool checkLoginStatus(String email, String password)
{
bool loginStatus = false;
bool status = false;
try
{
Connector.openConn();
String str = "SELECT * FROM [User]";
SqlCommand cmd = new SqlCommand(str, Connector.conn);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "tblUser");
//check valid
foreach (DataRow dr in ds.Tables[0].Rows)
{
if (email == dr["Email"].ToString()
&& password == Connector.base64Decode(dr["Password"].ToString()))
{
Session["login_status"] = true;
Session["username"] = dr["Name"].ToString();
Session["userId"] = dr["UserId"].ToString();
status = true;
break;
}
}
}
catch (Exception ex)
{ }
finally {
Connector.closeConn();
}
return status;
}
And call it at my aspx page:
String email = Login1.UserName.Trim();
String password = Login1.Password.Trim();
if (checkLoginStatus(email, password))
Response.Redirect(homeSite);
else
lblFailure.Text = "Invalid!";
I ran this page at localhost successful!
When I published it to server, this function only can run if email and password correct! Other, error occured:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I tried open SQL Server 2008 Configuration Manager and enable SQL Server Browser service (Logon as:NT Authority/Local Service) but it stills error.
(note: here is connection string of openConn() at Localhost (run on SQLEXpress 2005)
connectionString="Data Source=MYLAPTOP\SQLEXPRESS;Initial Catalog=Spider_Vcms;Integrated Security=True" />
)
At server (run on SQL Server Enterprise 2008)
connectionString="Data Source=SVR;Initial Catalog=Spider_Vcms;User Id=abc;password=123456;" />
anyone have an answer for my problem :(
thanks a lot!
Good day.
I have Eclipse PHP Galileo for Mac OSX, 32bit Cocoa version.
The problem is the rename function doesn't work properly.
While editing PHP file I choose Refactor-Rename menu or a rename hotkey and Eclipse doesn't offer me to rename a variable, instead a rename file dialog appears.
Tried to configure hotkeys but no luck.
If you do know the solution – please tell. Thank you.
Hi,
I am writing a small app to automatically connect my PC to the internet at a certain time..
I am using rasdial.exe for it...
Private Sub SetIt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim windir As String = Environment.GetEnvironmentVariable("WINDIR")
Shell(windir & "\system32\rasdial.exe", AppWinStyle.NormalNoFocus)
End Sub
My question is how to make the shell function run at a specified time or after a certain interval??
Regards,
Shardul
I have the following scenario
jQuery('#content').fadeOut('slow',function(){
jQuery('#content').load("detail.php?product="+imgID+"&category="+cat);
jQuery('#content').fadeIn('fast');
});
My problem however is that all the effects happen and when the effects are done, then only the contents of the PHP file loads into content, is there a better way so that the content is not slow in loading
Cursor cursor = db.rawQuery("SELECT COUNT(rat)
FROM "+ TABLE_NAME_EXTRA +" apkid=\""+apkid, null);
cursor.moveToFirst();
int somatotal = cursor.getInt(0);
I'm trying to do a SQL function like count and sum, but this code returns a exception saying "emptyvalues".
anyone know why?
Write your own version of the strcmp function string_compare.
Supply a main program that will test each of the 3 differing outcomes.
int string_compare(char *s, char *t);
returns
<0 if s is lexically before t
0 if s is identical to t
>0 if s is lexically after t
I am using the Oracle Data Provider. I am having trouble calling a function that returns a record type defined as TABLE_NAME%ROWTYPE. How do you do this from C#
So my logic is flawed and I need a better and correct way to resize an image in my c# app
I need a function similar to this setup
public void ResizeImageForWeb(string OriginalFile, string NewFile, int MaxWidth, int MaxHeight, int Quality)
{
// Resize Code
}
Basically, I'm a web designer lost trying to programming a desktop app.
Hello,
I want to encode passwords for UNIX accounts using the crypt function. I'm using pharo 1.0. I tried to install the crypto package from squeakmap, but it gaves me an error and the package seem to get partially installed (categories without class).
How can I get my password crypted? I'm willing to invoke external code, if it is required (and there's a package in SqueakMap that makes the trick in pharo).
Thanks.
Hello,
Please help me with writing function which takes two arguments : list of ints and index (int) and returns list of integers with negative of value on specified index position in the table
MyReverse :: [Int]-Int-[Int]
for example
myReverse [1,2,3,4,5] 3 = [1,2,-3,4,5]
if index is bigger then length of the list or smaller then 0 return the same list.
Thanks for help
here is the function description
test($argv)
$argv is an array , for example $argv=array($from1,$to1,$from2,$to2.....);
array items must be even.
$argv=array(1,2,4,5) : this will output values like below:
1_4
1_5
2_4
2_5
the number of arrray $argv's is not constant.
maybe 3 or 4 levels of loop will be outputed.
i know this will used RECURSIVE , but i don't know exatly how to code.
I have a message class that I use like so:
RedirectMsg::go('somepage.php', MessageType::ERROR, 'Your message here.');
Would it be better to use a regular function? Or is this a personal preference issue?
redirectMsg('somepage.php', MessageType::ERROR, 'Your message here.');
With GCC 4.1.2, I get the error tmp.cpp:8: error: invalid function declaration for the following code
namespace edit {
class A {
public:
void foo( );
};
}
void edit:A::foo( ) {
}
I want to use Oracle stored procedure or function via 'iBATIS 3 for Java' with annotation.
But I can't find any sample codes.
Can anyone help me? I need a simple sample code.
in mysql database context, what is the difference among these 3 terms?
stored procedure,stored routine,stored function.
p.s. build-in functions like those date time functions, (weekday()) are considered as what?
thanks in advance!
When I click on the hx:commandButton the method should get called but the method is not getting called. My code is as follows:
function test() {
alert('ss');
return "true";
}
and method calling is :
<hx:commandExButton
type="submit"
value="Search"
styleClass="action2" id="searchButton"
onclick="return test();"
action="#{pc_WorkInProgressUserGrid.doSearchButtonAction}"
immediate="true">
</hx:commandExButton>
Any suggestion would be helpful.
I am attempting to create a search function for user profiles on my site.
$search= $_POST['search'];
$res=mysql_query("SELECT * FROM ".TBL_USERS." WHERE username LIKE '$search%'");
This is the code I use. This will only work if you search something that matches the start of the result. Is there any way I can return values that have what i type as part of the username regardingless of upper or lower cases?
Thankyou
I have this code:
function render_message(id)
{
var xmlHttp;
xmlHttp=new XMLHttpRequest();
xmlHttp.onreadystatechange=function()
{
if(xmlHttp.readyState==4)
{
document.getElementById('message').innerHTML=xmlHttp.responseText;
document.getElementById('message').style.display='';
}
}
var url="include/javascript/message.php";
url=url+"?q="+id;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
For some reason it does not work in IE and an error is being reported on this line "document.getElementById('message').innerHTML=xmlHttp.responseText;" with an "Unknown Runtime Error".
Can anyone help?
Edit: The code being added to the div is valid code ect.
Here is the response:
<div style="margin-left:auto;margin-right:auto;width:400px;">
<img src="/forum/img/avatars/2.gif" width="90" height="89" style="float:left;">
<div style="margin-left:100px;">
<span style="font-size:16pt;">Sam152</a></span><br>
<span style="font-size:10pt;text-transform:uppercase;font-weight:bold;">From Sam152</span><br>
<span style="font-size:10pt;font-weight:bold;">Recieved April 17, 2009, 9:44 am</span><br>
<br><br>
</div>
</div>
<div style="margin-left:auto;margin-right:auto;width:400px;">
asd</div>
<div style="margin-left:auto;margin-right:auto;width:400px;text-align:right;padding-top:10px;">
<span onClick="requestPage('http://www.gametard.com/include/scripts/delete_message.php?id=14');document.getElementById('message14').style.display='none';document.getElementById('message').style.display='none';" class="button">Delete</span>
<span onClick="document.getElementById('message').style.display='none';" class="button">Close</span>
<span onClick="document.getElementById('to').value ='Sam152';document.getElementById('to').style.color ='#000';document.getElementById('newmessage').style.display='';" class="button">Reply</span>
</div>