I just installed Delphi for PHP to get an idea on how it works and have created a simple app with a button that puts a text into a listbox when it is clicked.
The app works if I copy all required files to my webserver and run it from there.
It also works if I save the project in the standard path:
"c:\documents and settings\username\My Documents\Delphi for PHP Projects"
But if I save the project in another directory, the ButtonClick event is not fired when the application runs from there. I've put a breakpoint in the event to see if it stops there but it doesn't.
The OnShow event of the form works as usual.
It really seems to be the path where the project is located to make it either work or not.
As I said, I have no experience with Delphi for PHP so far, it is probably just a simple solution that I don't see...
Can anyone tell me how I close an opened SQL connection inside a Function?
I call a Select Function like this:
Function Selec(ByVal SQLStr As String) As SqlDataReader
Dim SQLConn As New SqlConnection()
Dim SQLCmd As New SqlCommand()
SQLConn.ConnectionString = Session("bd")
SQLConn.Open()
SQLCmd.Connection = SQLConn
SQLCmd.CommandText = SQLStr
Selec = SQLCmd.ExecuteReader
End Function
And in another page I do a While method to retrieve me the data like this:
(Note: BDcon.BD is the name of the Class that have Functions)
Dim write as New BDcon.BD
Dim menu As SqlDataReader = writeBD.Selec("SELECT something from Table")
While menu.Read
'Do something
End While
menu.Close 'This close just the DataReader and not the SqlConnection
Finally I want to Close my SQL Connection by Function like this:
Function Close() As SqlConnection
Dim SQLConn As New SqlConnection()
SQLConn.ConnectionString = Session("bd")
SQLConn.Close()
End Function
I think that the problem is on the Close() Function, I want to close the connection but I don't know how to call my Opened Conneciton.
Please anyone can help me? Thanks in advance :)
In XP, to ensure a folder opened in a new window, I held down CTRL when I opened (by mouse or keyboard) the folder.
This action is so ingrained to me, I pretty much don't even realise I'm doing it at a conscious level.
Unfortunately, this action apparently hasn't made it to Vista. Is there a new way to do this, or am I just missing something obvious?
I am trying to setup a dev environment at home. My primary development environment is VS.NET 2008 (now it is VS 2010 Premium) with SQL Server 2008.
Objectives / Requirements :
- Should be simple and lightweight
- Should have a Visual Studio plugin (cost should be less than $50, if its not free)
- should work just fine with continuous integration systems like TFS and CruiseControl.NET
- VSS is not an option.
Thanks in advance,
SK
I would like to install VSS 2005 so I can work on a project that is stored under it. Does anyone have any idea where the VSS 2005 client can be obtained? It does not appear to be on my VS2005 install disc (although that is for Team Suite). I cannot get any help from Google. I have an MSDN license (AA edition) but it doesn't seem to be there. This is a real product right?
Just to clarify preemptively based on some of the discussions I see on Google when I search for things like "VSS 2005," I am aware of the flaws in VSS and I still need to get it working; I am not interested in converting the project to Subversion; I am not able to transfer it to TFS; I am not able to upgrade the project to VS2008.
Thanks.
Im looking at implementing a fix in an XmlDeserializer to allow for element lists without a specific containing element.
The XmlDeserializer im basing off checks for a list object type but then it gets the container element im trying to figure out how to get around this and make it work both ways.
enter code here var t = type.GetGenericArguments()[0];
var list = (IList)Activator.CreateInstance(type);
var container = GetElementByName(root, prop.Name.AsNamespaced(Namespace));
var first = container.Elements().FirstOrDefault();
var elements = container.Elements().Where(d => d.Name == first.Name);
PopulateListFromElements(t, elements, list);
prop.SetValue(x, list, null);
The XML im working with is from the google weather API (forecast_conditions elements)
<weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0">
<forecast_information>...</forecast_information>
<current_conditions>...</current_conditions>
<forecast_conditions>...</forecast_conditions>
<forecast_conditions>...</forecast_conditions>
<forecast_conditions>...</forecast_conditions>
</weather>
EDIT: Im looking at this as an update to the RESTsharp opensource .net library
I use an SSH tunnel from work to go around various idotic firewalls (it's ok with my boss :)). The problem is, after a while the ssh connection usually hangs, and the tunnel is broken.
If I could at least monitor the tunnel automatically, I could restart the tunnel when it hangs, but I haven't even figured a way of doing that.
Bonus points for the one who can tell me how to prevent my ssh connection from hanging, of course!
I have an nginx server running on ubuntu 12.04 that serves http through port 80 and https through port 443.
Everything works fine if I access it from the same computer via localhost, 127.0.0.1 or the local IP 192.168.0.11. If I try to access the server from another computer in the same VLAN it does not work for http; it works for https. I have changed my nginx configuration to also listen to port 8000 for http; I can then access http from the other computer in the same VLAN via "http://192.168.0.11:8000".
I also have a web server running on port 80 on a windows machine and can access it from another device in the same VLAN, therefore the router is not blocking incoming http traffic.
The nginx process is run by root. I have used tcpdump and I see that packets are arriving to Ubuntu:
192.168.0.16.49735 192.168.0.11.80
and that some response is being given
192.168.0.11.80 192.168.0.16.49735
(I do not know what the response is though). There is no request arriving at the nginx web server (I have checked the access log).
I have iptables empty. I have unsuccessfully tried to find a solution for a long time to this, it has now become a matter of happiness or bitterness :).
How can i convert language in my Java? Is there any API exist, which convert any language to any other language? I am using Google Translate API, but it giving me below exception.
java.lang.Exception: [google-api-translate-java] Error retrieving translation.
at com.google.api.GoogleAPI.retrieveJSON(GoogleAPI.java:123)
at com.google.api.translate.Translate.execute(Translate.java:69)
at com.nextenders.client.beans.ruleengine.RuleEngineTest.main(RuleEngineTest.java:27)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
null
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at com.google.api.GoogleAPI.retrieveJSON(GoogleAPI.java:107)
... 2 more
If anybody knows any API for translation, please tell me.
hi , i have problem in my network when I wrote telnet command from any pc to the router
black screen come then i cannot do any thing .. but when I connect to router from Sun System its ok ...
could anyone solve this problem ....
Hi!
I'm purposely targeting Java OS 1.4.2
I'm trying to use an iterator combined with apache's POI to read an excel spreadsheet.
The code runs perfectly in java 1.5, but in the 1.4.2 version I get the error listed in the question subject.
the code is:
Iterator myIter = null;
it breaks on that line of code, which is clearly at the beginning of the application. I dont understand what needs to be done to correct this issue. Please let me know if you have any insight!
When using an XmlDataSource is there good way to handle exceptions that are caused when the remote XML file is unavailable? I'm somewhat new to .NET and using C#.
I'm having the following problem:
I'm using Oracle ADF for the view and controller of my app.
With OpenSessionInViewFilter, I intercept the request and open an Hibernate's Session, and it is closed as soon as the bean's method finishes.
What I need is to keep the Session opened until the page is rendered, because in my JSP y use the lazy attributes of the object i load from the DB.
For example:
When I enter index.jspx the IndexBean#main() is executed:
public class IndexBean{
private DBObject myDBObject;
public String main(){
this.myDBObject = this.myDAO.loadObjectFromDB();
return null;
}
}
in index.jspx I have:
...
<af:inputText value="#{myDBObject.lazyAttribute}" />
...
I'd like that the Hibernate's Session keeps open until the af:inputText is processed.
Is this possible? How?
Thanks in advance
Instead of populating the BitmapData class from an IMAGE. I would like to (within Actionscript) GENERATE some new BitmapData by capturing the Bitmap representing say, a TextArea component on the stage.
In other words, sort of take a "screen capture" or "screenshot" of one of the components, and convert that into an image. Am I silly to even wonder if such a thing is feasible? Can an Air/Flex app "look at itself" in this way? Can it turn a datagrid or a canvas or a textinput into the corresponding image AS IF via screen capture?
Even a hint in the right direction would be appreciated,
Thanks In Advance.
Hello,
I am interested in a complex, mature and admin friendly cms. I am also searching the one with most extensions, packages, add-ons ...
I found these to be the most popular: alfresco, drupal, ez, joomla, dotcms, plone ...
Can you help me find the one I am looking for ? (dotcms and drupal are on my mind now)
Thank you.
I need to load controllers and models from a different folder than the default one. I am using a Linux system.
I am building a simple CI application for some people, for use on a shared hosting I own. But I want to give them access only to /views folder and some /config files. And this is why I need to store the controllers and models in a different folder on the same level as /public_html folder or maybe somewhere in the linux system.
I consider this would be a better solution than encoding files
Hello,
because it's almost obvious that either Thunderbird or Firefox freeze my whole system after some time, I'd like to not use FF at the moment and let Thunderbird run only for a short time as long as I check e-mails. Thunderbird web links should be opened with opera from now. For that I went in Thunderbird to Preferences-Advanced-General-Config Editor and set the following:
network.protocol-handler.app.http -> /usr/bin/opera
network.protocol-handler.app.https -> /usr/bin/opera
network.protocol-handler.warn-external.ftp -> true
network.protocol-handler.warn-external.http -> true
network.protocol-handler.warn-external.https -> true
Moreover I changed in Gnome in System-Preferences-Prefered Applications Opera as webbrowser and I checked in FF that it should warn if FF is not the default browser (obviously it isn't anymore).
Unfortunately all of these settings doesn't work. Thunderbird still opens web links with FF.
Any explantions why? (I already restarted Thunderbird although I don't have to, but no effect)