Hi all
I am very confused about the const version and mutable version member function like below::
value_type& top() { return this.item }
const value_type& top() const { return this.item }
What is the different these two functions? In what situation they would be used? Could someone give me some explanation about it?
Best Regards,
Hi
I have wordpress site. I have installed modern-blue-green-120070612-2 theme.Then i got an error message on the right hand side "Fatal error: Call to undefined function cypher_previousposts() in mydomain\wp-content\themes\modern-blue-green-120070612-2\sidebar.php on line 59.
Does any one know this? Please help me ....
Thaks in advance
I have one image. i want that when someone scrolls the browser window then by jquery i should also change the image position from top as well
I want to use jquery only . Is there function like that.
I don't want to use position:fixed or something like that. I want something like
onScroll(){
var x = getScrollDIstance();
moveImageDown(x);
}
How can i make my own delete method to prevent that the data really gets deleted?
i want to set a datetime field when it gets deleted insted of a normal delete.
i read about overriding the submitchanges function, but i don't get it to work
thanks
Hello I am trying to write code for a function called Triplet getTriplet()
and I must use find and atoi in this fuction to call the array[3] = {0, 1, 2} and find the "," and find the "()" in the program? I am so lost. I have read and read and cannot locate any informatin which really touches on the subjects enough to give me an understanding of what I am suppose to do. Please help if you can! Thanks in advance.
Hey guys, I'm new to javascript and I'm doing a project for my final in class. I need to make it so this game engine I manipulated causes the generation button to go for an infinite loop.
I also need to stop it using (Reset==1). Any help? Here's the code I have so far if that helps:
function generation()
{
for(y2=0; y2<2500; y2++)
{
tempmapactual[y2]=mapactual[y2];
}
for (g=0;g<2500;g++)
{
neighbours=0;
for (h=0;h<8;h++)
{
if (g+coords[h]>0 && g+coords[h]<2499 && mapactual[g+coords[h]]=="white.gif")
{neighbours=neighbours+1;}
}
if (neighbours>=4 || neighbours==1 || neighbours==0)
{tempmapactual[g]="black.gif";}
if (neighbours==3) {tempmapactual[g]="white.gif";}
}
for(y3=0; y3<2500; ++y3)
{
if (mapactual[y3]!=tempmapactual[y3])
{
mapactual[y3]=tempmapactual[y3];
document.images[y3+offset].src=mapactual[y3];
}
}
}
</script>
<script>
function doIt()
{
for (i=0; i<X; i++)
{
// This is where I have trouble. What part of generation() do I call?
}
if (Reset==1) break; // This will kill the loop instantly.
}
}
</script>
<script>
window.onload(doIt($(X).value)));
</script>
<form>
<input type="button" value="generate" onClick="generation();">
</form>
<form>
<input type="text">
</form>
<form>
<input type="button" value="Infinite Loop!" onclick="doIt();">
</form>
<form>
<input type="button" value="Reset" onclick="doIt();">
</form>
I use the previewKeyDown() function for some controls in my project but they always get called twice for each key press. Anyone who knows how to solve this?
And is there anyway to do a global keylistener in my project?
I am dynamically creating a hyperlink in the c# code behind file of ASP.NET. I need to call a JavaScript function on client click. how do i accomplish this?
thanks in advance
Hi,
I am trying to implement my own version of pow() and sqrt() function as my custom library doesn't have pow()/sqrt() floating point support.
Can anyone help?
Sometime back I used a windows tool to see what a process is doing. This tool allowed me to inspect functions exported from DLL. It also allowed me to change the values passed to a function on the fly.
I cannot recollect the name(not sure if that was free or commercial one). Could any one point to me solution that can do this?
(Tools like ProcessExplorer, ProcessMonitor helps a bit.. this was better)
Cheers,
Jayan
Is there a debugging system that allows me to record javascript function calls and their parameters as they occur? this would allow me to trace and debug applications in live/client situations without the performance hit due to manual logging.
Edit: I'm not talking about manually calling functions using a 'console' window and viewing the results, or manually adding 'trace' or 'log' commands into my javascript. I need it to work with any running javascript.
I've found many definitions of the 'var' statement but most of them are incomplete (usually from introductory guides/tutorials). Should I use 'var' if the variable & scope has been declared in the params list?
someFunc = function(someVar)
{
// Is it considered good practice to use 'var', even if it is redundant?
var someVar = cheese;
};
$('#calendar').fullCalendar
(
{
editable: true,
events:
$.ajax
(
{
type: "POST",
url: "Calender.aspx/GetCDCatalog",
contentType: "application/json; charset=utf-8",
data: "{}",
dataType: "json"
}
)
}
)
calender.aspx is page and getcddialog is function which return type is array which doest not bind calender.
public CD[] GetCDCatalog()
{
XDocument docXML =
XDocument.Load(Server.MapPath("mydata.xml"));
var CDs =
from cd in docXML.Descendants("Table")
select new CD
{
title = cd.Element("title").Value,
star = cd.Element("star").Value,
endTime = cd.Element("endTime").Value,
};
return CDs.ToArray<CD>();
}
Hello,
I want to plot a piecewise function, but I don't want any gaps to appear
at the junctures, for example:
t=[1:8784];
b=(26.045792 + 13.075558*sin(0.0008531214*t - 2.7773943)).*((heaviside(t-2184))-(heaviside(t-7440)));
plot(b,'r','LineWidth', 1.5);grid on
there should not be any gaps appearing in
the plot between the three intervals , but they do.
I want the graph to be continueous without gaps.
Any suggestions on how to achieve that.
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 have this function in .net code:
public class StringGenerator
{
public static string GenerateString(string hash)
{
return hash.GetHashCode();
}
}
I want to be able to call this from PHP page. Any idea how?
Hi everyone,
I am having little problem with importing classes in python. My work flow goes like this
index.py
class Template:
def header():
def body():
def form():
def footer():
display.py
I want to call function header(), body() and footer () in my display.py page. Will anyone make me clear about this issue in python. Thanks for your concern.
Which virtual table will be pure virtual function located? In the base class or derived class?
For example, what does the virtual table look like in each class?
class Base {
virtual void f() =0;
virtual void g();
}
class Derived: public Base{
virtual void f();
virtual void g();
}
I am trying to visualize some values on a form. They range from 0 to 200 and I would like the ones around 0 be green and turn bright red as they go to 200.
Basically the function should return color based on the value inputted. Any ideas ?
I am looking for a javascript beautifier with a very specific function. I need a beautifier that can sort functions and vars alphabetically based off of their names. I have a very long javascript file that is an eyesore to look at. Does anyone know of any javascript beautifiers that will do this?
I've Got a program that uploads/downloads files into an online server,Has a callback to report progress and log it into a textfile, The program is built with the following structure:
public void Upload(string source, string destination)
{
//Object containing Source and destination to pass to the threaded function
KeyValuePair<string, string> file = new KeyValuePair<string, string>(source, destination);
//Threading to make sure no blocking happens after calling upload Function
Thread t = new Thread(new ParameterizedThreadStart(amazonHandler.TUpload));
t.Start(file);
}
private void TUpload(object fileInfo)
{
KeyValuePair<string, string> file = (KeyValuePair<string, string>)fileInfo;
/*
Some Magic goes here,Checking The file and Authorizing Upload
*/
var ftiObject = new FtiObject ()
{ FileNameOnHDD = file.Key,
DestinationPath = file.Value,
//Has more data used for calculations.
};
//Threading to make sure progress gets callback gets called.
Thread t = new Thread(new ParameterizedThreadStart(amazonHandler.UploadOP));
t.Start(ftiObject);
//Signal used to stop progress untill uploadCompleted is called.
uploadChunkDoneSignal.WaitOne();
/*
Some Extra Code
*/
}
private void UploadOP(object ftiSentObject)
{
FtiObject ftiObject = (FtiObject)ftiSentObject;
/*
Some useless code to create the uri and prepare the ftiObject.
*/
// webClient.UploadFileAsync will open a thread that
// will upload the file and report
// progress/complete using registered callback functions.
webClient.UploadFileAsync(uri, "PUT", ftiObject.FileNameOnHDD, ftiObject);
}
I got a callback that is registered to the Webclient's UploadProgressChanged event , however it is getting called twice per sent request.
void UploadProgressCallback(object sender, UploadProgressChangedEventArgs e)
{
FtiObject ftiObject = (FtiObject )e.UserState;
Logger.log(ftiObject.FileNameOnHDD, (double)e.BytesSent ,e.TotalBytesToSend);
}
Log Output:
Filename: C:\Text1.txt Uploaded:1024 TotalFileSize: 665241
Filename: C:\Text1.txt Uploaded:1024 TotalFileSize: 665241
Filename: C:\Text1.txt Uploaded:2048 TotalFileSize: 665241
Filename: C:\Text1.txt Uploaded:2048 TotalFileSize: 665241
Filename: C:\Text1.txt Uploaded:3072 TotalFileSize: 665241
Filename: C:\Text1.txt Uploaded:3072 TotalFileSize: 665241
Etc...
I am watching the Network Traffic using a watcher, and only 1 request is being sent.
Some how i cant Figure out why the callback is being called twice, my doubt was that the callback is getting fired by each thread opened(the main Upload , and TUpload), however i dont know how to test if thats the cause.
Note: The reason behind the many /**/ Comments is to indicate that the functions do more than just opening threads, and threading is being used to make sure no blocking occurs (there a couple of "Signal.WaitOne()" around the code for synchronization)
I'm running GM_xmlhttpRequest and storing the responseText into a newly created HTML element:
var responseHTML = document.createElement('HTML');
onload: function() { responseHTML.innerHTML = response.responseText; }
And then I am trying to find an element in responseHTML.
console.log(responseHTML.getElementsByTagName('div'));
console.log(responseHTML.getElementById('result_0'));
The first works fine, but not the second. Any ideas?
HI I try to run :
select
year,
regr_slope(sum(sale_count),year) as slope,
from products
group by year
It throws "00937. 00000 - "not a single-group group function"" .When i delete year from select clause problem disapears. Shouldn't I be able to select column with which I'm grouping?
Oracle 11.2 sqldeveloper
ty for help !
Hi,
I would like to open a webpage and run a javascript function from within a java app.
For example I would like to open the page www.mytestpage.com and run the following javascript code:document.getElementById("txtEmail").value="[email protected]";submit();void(0);
This works in a browser...how can I do it programatically?
Thanks!