I am working on a solution, most of its core engine is developed as Win32 C++ (and is Platform independent and is also used on OS X), some time ago we needed to call C++ dll's of core engine from C# and I was able to Load main solution's DLL in C# (by the help of some threads here on SO). but now we have certain things implemented in Managed C# dll and need to use it in Win32 C++ project? (and just function definitions and dll are provided)
I'm new to Doctrine and ActiveRecord.
How should I filter a table after it has been loaded? (i suppose this is preferred over sending multiple queries?)
Is this 'good' or 'bad'?
class UserTable extends Doctrine_Table {
function filterByGroup($group) {
$ut = new UserTable();
foreach($this as $u) {
if($u->group = $group) $ut->add($u);
}
return $ut;
}
}
If I have magic_quotes switched on and I use mysql_real_escape_string, will the tring be double escaped? Will it cause problems? I assume so based on the get_magic_quotes() function but just seeking confirmation. (PS it's easier to ask this question than test it in my office with all the security we have in place - It takes me 10-15 to configure everything to get a useable envirnment)
my basic database setup is:
User:...
Info:
relations:
User: { foreignType:one }
When displaying information on the user it takes: 1 query to find info on the user, and 1 query to find additional info
I want to reduce this to one query that finds both, I assume I need to override a function from BaseUser.class.php, or something along those lines but I'm not really sure what to do.
Thanks!
I have an ajax call in the head section of my index.html
$.ajax({
method: 'get',
url : 'php/getRecord.php?color=red',
dataType: "json",
success: function (data) {
alert(data);
}
});
For some reason, that alert never gets called. Am I doing something wrong? The PHP file does give me data when testing it directly.
Does anyone have a idea,how to use date/time function to write time like facebook/twitter style:
e.g. 5 min ago
e.g. 10 hours ago.
Does anyone have tutorial for asp.net..
Is there a function for ASP.NET MVC 2 that performs the functionality of Jquery.Validate's isValid()?
I'd like to check if my fields are valid prior to using jquery ajax to send data to the server? Any suggestions?
Thank You.
Hello all
I am developing a program using OpenCV (IDE = devcpp). I am able to get the hand contour , move cursor position according to our our hand. no i want to implement right click functionality .Please help me with it .
i am using event SetCursorPos(x,y) to set the cursor position on the screen
is there any simple function to implement rightclick the same way .??
Hai
am having a WPF user control, when i use that control in another window it loading twice, so its throwing exception for me, coz am having some function in usercontrol_loaded event, when it loading twice it throwing error, is there any other way to check if the usercontrol is loaded like that, else how to solve this issue.
I need to build a function which parses the domain from a url.
So:
http://google.com/dhasjkdas/sadsdds/sdda/sdads.html
or
http://www.google.com/dhasjkdas/sadsdds/sdda/sdads.html
Would become "google.com" and
http://google.co.uk/dhasjkdas/sadsdds/sdda/sdads.html
would become "google.co.uk"
Hi!
I have issue
$('#myimg').animate({
border: '10px solid #ffffff'
},'fast',function(){
alert('callback');
});
Working with: FF 3.6.3, Chrome 5.0.375.55, Opera 10.53
Not working with: 8.0.7600.16385
Issue, no callback ;)
With animation for example "width", callback works also in IE, bug is with border.
I cannot supply a follow up question as of yet to Get the element under a touchend , so I am opening a new issue. I want to get the element under a touchend that is different from the touchstart, but my page has absolutely positioned elements, and the function document.elementFromPoint keeps on returning my background element instead of every element in front of it. How do I get the actual element being touched?
I am trying to find the correct syntax to pass a varible to my JQuery Post.
var id = empid;
$.ajax({
type: "POST",
url: "../Webservices/EmployeeService.asmx/GetEmployeeOrders",
data: "{empid: empid}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(result) {
alert(result.d);
}
I don't think the data: value is quite right. Someone set me straight?
Thanks!
Hi, I've been trying to make a button toggle a class, as well as show another div below it.
Here is a jsFiddle example I have made for you.
The first function works perfectly, shows and hides the div, but also I want the button itself to add and remove a class, I thought this would work but I seem to be doing something wrong.
Thanks.
I'm using Protovis Arc layout and I'd like to color links between nodes accoriding to the 'value' property defined in dataset. How can I access it?
Dataset is defined like that:
Nodes:
...
{nodeName:"Books"}
...
Links:
...
{source:1, target:4, value:20}
...
arc.link.add(pv.Line).strokeStyle(function(d) d.value 10 ? "#cc0000" : "#eeeeee"); - does not work
Quicksearch is really cool... but it has a usability issue that makes it behave weird. A lot of users presses enter after inserting a string so the page is reloaded with no parameters and the queries are destroyed.
look at that:
http://www.parksmania.it/parco_list.php?rid=1
Adding
$('form#filtroRapido').submit(function () { return false; });
doesn't work!
Has someone already solved this?
I've gone through ODBC API searching for a function that can extract information of a data source. The closest I found is SQLDataSources that enumerates all data sources and gives you the DSN name/description.
But specifically I would to extract the TNS service name of an Oracle data source. This property appears in the registry under ServerName but I found no way to access it through an API.
I have a string based code that can be either two or three characters in length and I am looking for some help in creating a function that will increment it.
Each 'digit' of the code has a value of 0 to 9 and A to Z.
some examples:
the first code in the sequence is 000
009 - next code is - 00A
00D - next code is - 00E
AAZ - next code is - AB0
the last code is ZZZ.
Hope this makes some sense.
hi,
I'm having a problem with a simple program I wrote, I want to perform a certain function according to the users input. I've already used a dictionary as a replacement for a switch to do assignment but when I try to assign functions to the dictionary it doesn't execute them...
The code:
def PrintValuesArea():
## do this
def PrintValuesLength():
## do that
def PrintValuesTime():
## do third
PrintTables={"a":PrintValuesArea,"l":PrintValuesLength,"t":PrintValuesTime}
PrintTables.get(ans.lower()) ## ans is the user input
what did I do wrong? It looks the same as all the examples I've seen....
I want to parse a timestamp from a log file that has been written via
datetime.datetime.now().strftime('%Y%m%d%H%M%S')
and then compute the number of seconds that have passed since this timestamp.
I know I could do it with datetime.datetime.strptime to get back a datetime object and then compute a timedelta. Problem is, the strptime function has been introduced with Python 2.5 and I'm using Python2.4.4 (an upgrade is not possible in my context).
Any easy way to do this?
hey Guys,
I need to run a string of html through a regex function that checks to see if the attributes are closed in quotes, and if they aren't then close them.
for example i want
<img src=http://www.domain.com/image.gif border=0>
to turn into
<img src='http://www.domain.com/image.gif' border='0'>
Can anyone help me?
How can i loop thru a stl::List and store the value of one of the objects for use later in the function?
Particle *closestParticle;
for(list<Particle>::iterator p1 = mParticles.begin(); p1 != mParticles.end(); ++p1 )
{
// Extra stuff removed
closestParticle = p1; // fails
}
I'm getting a compiler error with bind:
using namespace std;
bool odp(int arg1, int arg2);
// ...
find_if(vec.begin(), vec.end(), tr1::bind(odp, iValue, _1)); // C2065
My goal is to curry odp(), so its first argument is iValue, and apply that function in find_if.
The error:
C2065: '_1' : undeclared identifier.
What am I doing wrong?