Overriding default SWIG name for static class functions
I have several classes that I am using swig to wrap for an embedded Lua
script. We have already defined what we want the function calls to look
like.
display.writeLine("Hello")
The problem is that SWIG doesn't seem to have an option to define how it
generates the library name. The c++ class looks like this.
class Display
{
public:
static void writeLine(char *);
}
I can easily get SWIG to wrap this function, it's just that always shows
up like this Display_writeLine()
So instead of just using my custom namespace, I would have to do
display.Display_writeLine()
which is not what I want. I have tried experimenting with the rename rules
but nothing seems to work. Right now I have an extern C function that then
calls my static function but it's an extra call I don't need. Seems like
it should be something simple...
Sunday, 18 August 2013
Given that $5a+2b+3c=10$, What is the minimum value of $a^2+b^2+c^2$?
Given that $5a+2b+3c=10$, What is the minimum value of $a^2+b^2+c^2$?
The question is ,
Given that $$5a+2b+3c=10$$ What is the minimum value of $$a^2+b^2+c^2$$?
I know that I have to use AM-GM inequality somehow but I have no idea how
to use it for this problem. Help would be much appreciated.
The question is ,
Given that $$5a+2b+3c=10$$ What is the minimum value of $$a^2+b^2+c^2$$?
I know that I have to use AM-GM inequality somehow but I have no idea how
to use it for this problem. Help would be much appreciated.
casperjs: how to include dependencies for unit tests in tests themselves?
casperjs: how to include dependencies for unit tests in tests themselves?
I am doing some unit test in casperjs and I got stuck: how do include
dependency file from the test itself? I know I can include from the
command line
$ casperjs test --include=./my-mock.js mytest.js
but how can I include files from the test itself?
Putting following on the top does not work for me... my_mock is undefined
casper.options.clientScripts = ["./my-mock.js"]; //push() does not help
either
//mytest.js is below
// ------------------------------------------
casper.test.begin('ajax mock test', function suite(test) {
my_mock.setFetchedData("bla");
my_mock.doRequest();
test.assertEquals( ......);
test.done();
});
// ------------------------------------------
CasperJS version 1.1.0-DEV using phantomjs version 1.9.1
I am doing some unit test in casperjs and I got stuck: how do include
dependency file from the test itself? I know I can include from the
command line
$ casperjs test --include=./my-mock.js mytest.js
but how can I include files from the test itself?
Putting following on the top does not work for me... my_mock is undefined
casper.options.clientScripts = ["./my-mock.js"]; //push() does not help
either
//mytest.js is below
// ------------------------------------------
casper.test.begin('ajax mock test', function suite(test) {
my_mock.setFetchedData("bla");
my_mock.doRequest();
test.assertEquals( ......);
test.done();
});
// ------------------------------------------
CasperJS version 1.1.0-DEV using phantomjs version 1.9.1
Saturday, 17 August 2013
Problems on vb.net and ms access
Problems on vb.net and ms access
i am making an AMS-attendance monitoring system and in the interface where
the employee will enter his/her id number and the date and the time of
IN/OUT will appear in the database,my problem is the date on the
database-ms access is not right, for example the date today is 8/18/13 but
in the database it appears 8/1/13.
i am making an AMS-attendance monitoring system and in the interface where
the employee will enter his/her id number and the date and the time of
IN/OUT will appear in the database,my problem is the date on the
database-ms access is not right, for example the date today is 8/18/13 but
in the database it appears 8/1/13.
VB.net Click through form
VB.net Click through form
I'm trying to make a program for my late night star gazing, I need my
laptop screen to be only red, so I want to make a program that acts as a
red filter. It would cover the whole screen and be transparent + red. The
user can click through it, it would be just like putting a piece of
transparent red plastic in-front of the screen.
So far I have a form that sizes itself to what ever your screen size is,
and moves itself to the upper left corner.
I need to make all clicks on the form pass through, as I will eventually
make the form transparent and red, but I don't want the user to be able to
interact with it.
Public Class Form1
Dim Screens As Array
Dim TotalWidth As Integer
Dim TotalHeight As Integer
Dim Heights As List(Of Integer) = New List(Of Integer)
'Load / Close
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Screens = Screen.AllScreens
For I As Integer = 0 To UBound(Screens)
TotalWidth += Screens(I).Bounds.Width
Heights.Add(Screens(I).Bounds.Height)
Next
TotalHeight = Heights.Max()
Me.Width = TotalWidth
Me.Height = TotalWidth
Me.Location = New Point(0, 0)
'Make it click through
SetWindowLong(Me.Handle, GWL_EXSTYLE, WS_EX_TRANSPARENT)
End Sub
'Click Through Functionality
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal
hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Const GWL_EXSTYLE = -20
Const WS_EX_TRANSPARENT = &H20
End Class
This is what I have so far, the part after "'Click Through Functionality"
I found online, however, it gives me this error:
A call to PInvoke function 'Red Filter!Red_Filter.Form1::SetWindowLong'
has unbalanced the stack. This is likely because the managed PInvoke
signature does not match the unmanaged target signature. Check that the
calling convention and parameters of the PInvoke signature match the
target unmanaged signature.
I do not know how the code I found online works, but the error happens in
the last line of the form's load event.
Does anyone know how to make a form click-through?
I'm trying to make a program for my late night star gazing, I need my
laptop screen to be only red, so I want to make a program that acts as a
red filter. It would cover the whole screen and be transparent + red. The
user can click through it, it would be just like putting a piece of
transparent red plastic in-front of the screen.
So far I have a form that sizes itself to what ever your screen size is,
and moves itself to the upper left corner.
I need to make all clicks on the form pass through, as I will eventually
make the form transparent and red, but I don't want the user to be able to
interact with it.
Public Class Form1
Dim Screens As Array
Dim TotalWidth As Integer
Dim TotalHeight As Integer
Dim Heights As List(Of Integer) = New List(Of Integer)
'Load / Close
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Screens = Screen.AllScreens
For I As Integer = 0 To UBound(Screens)
TotalWidth += Screens(I).Bounds.Width
Heights.Add(Screens(I).Bounds.Height)
Next
TotalHeight = Heights.Max()
Me.Width = TotalWidth
Me.Height = TotalWidth
Me.Location = New Point(0, 0)
'Make it click through
SetWindowLong(Me.Handle, GWL_EXSTYLE, WS_EX_TRANSPARENT)
End Sub
'Click Through Functionality
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal
hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Const GWL_EXSTYLE = -20
Const WS_EX_TRANSPARENT = &H20
End Class
This is what I have so far, the part after "'Click Through Functionality"
I found online, however, it gives me this error:
A call to PInvoke function 'Red Filter!Red_Filter.Form1::SetWindowLong'
has unbalanced the stack. This is likely because the managed PInvoke
signature does not match the unmanaged target signature. Check that the
calling convention and parameters of the PInvoke signature match the
target unmanaged signature.
I do not know how the code I found online works, but the error happens in
the last line of the form's load event.
Does anyone know how to make a form click-through?
How to configure Telerik Extension on ASP.NET MVC 4
How to configure Telerik Extension on ASP.NET MVC 4
I am unable to configure Telerik Extension for ASP NET MVC 4 on my
machine. However all source codes and configurations are given only for
MVC 3.
Can anyone help me out of this problem? Step by step procedures are welcome.
Thanking you a lot for your help.
I am unable to configure Telerik Extension for ASP NET MVC 4 on my
machine. However all source codes and configurations are given only for
MVC 3.
Can anyone help me out of this problem? Step by step procedures are welcome.
Thanking you a lot for your help.
Can you know if the user installs your app for the first time or if he made an update?
Can you know if the user installs your app for the first time or if he
made an update?
Is is possible to know if the user made an update or a fresh install
considering that I didn't though of it before this version (so my previous
version put no user default or keychain flag for me to use in my current
version for checking)?
made an update?
Is is possible to know if the user made an update or a fresh install
considering that I didn't though of it before this version (so my previous
version put no user default or keychain flag for me to use in my current
version for checking)?
Subscribe to:
Posts (Atom)