How can i detect if my PC is not on Network..... Urgent Pls Help Soon !!!!!
Hello Everyone,
We all know whenever we try to connect to a PC which is not on network, we get UnKnownHostException etc..... by which we can detect that the corresponding PC is not an network(intranet/internet)
But when i send a msg from my PC to my PC, it works fine even if the network is down. I hv provided my PC's IP address instead of using localhost or 127.0.0.1 which reduces the possibility that the msg will not be traversed thru the network.
Any IDEA how this works.
Is There any possible way by which i can detect that my PC is not on network or the PC to which i'm trying to connect is not on network .......
Pls help me out, its really urgent as to be implemented in my Project
Thanks In Advance
Sahil Shaikh
Hello Surtee
I have developed a Messeging Service for the eCRM Apllication my company is developing and we r in the final stage of debugging.
Now whenever a user sends a msg to a PC which is not on network, the messaging service automatically sends an Offline mssg to that PC. But know i want ot distinguish wheather the PC to which i'm sending the msg is not on network or am I not on network based on this i need to perform diff. actions, hence i wanted to know that how can i detect .......
Pls see if u canhelp me out ......
Thanks
Sahil Shaikh
Similar Messages
-
hi..I cant activate my Iphone 5. I bought this from someone who cant remember her apple password and even the email address that she used to set up the account.What am I gonna do now....How can I activate my Iphone. what are my options...pls help me.thank you
Activation Lock in iOS 7 > http://support.apple.com/kb/HT5818
hannibalfromlemery wrote:
.I cant activate my Iphone 5. I bought this from someone
The Apple ID and Password that was Originally used to Activate the iDevice is required.
If you cannot get this information from the seller
Removing a device from a previous owner’s account
You need to return the Device for a refund, as you will not be able to re-activate it. -
How can I filter the rows displayed on an ADF Table ? pls help urgent..
Hi All,
I have a page with ADF readonly table, based on who is logging in I want to filter the rows to be displayed when the page is firstly loaded. This page is called from the main menu.
I have created a custom method in the Application Module Impl :
public void setInvoiceFilter () {
ViewObject vo = findViewObject("BrowseInvoice1");
ViewCriteria vc = vo.createViewCriteria();
ViewCriteriaRow vcr1 = vc.createViewCriteriaRow();
vcr1.setAttribute("Userid","xxxx");
vc.add(vcr1);
vo.applyViewCriteria(vc);
vo.executeQuery();
The question is : where and how should I call this method ?
is this a correct approach ?
Thank you very much for your help,
xtantoI assume you're talking about a JSF application.
I think you should be able to do this in the constructor of a backing bean.
1) Add an operation binding, bound to your service method, to the page's pageDefinition.
2) On the JSF page flow Overview tab, add a managed property to the backing bean. Call it, say, myMethod, give it type oracle.bindings.OperationBinding, and give it the value #{bindings.nameOfYourOperationBinding}
3) Add a myMethod field of type OperationBinding, with getter and setter, to your backing bean class.
4) In the backing bean class's constructor, add code like:
myMethod.execute();This will execute the method every time the page is loaded.
Now, if you want to execute the method only the first time the page is loaded, it's a bit trickier. You need to set, and use, a session variable:
Map sessionVars = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
if (sessionVars.get("hereBefore") == null)
myMethod.execute();
sessionVars.put("hereBefore", "true");
} -
How can I detect a dialog and respond?
I'm having trouble doing something that's probably not that hard. I'm trying to "Print to PDF" a bunch of old AppleWorks documents. When you open a document created in AppleWorks v6 it opens right up, but when you open a document created in AppleWorks 5 you get a dialog box that says, "This document was created by a previous version of AppleWorks. A copy will be opened and "[v6.0]" will be added to the filename."
Right now I open the file and then:
tell application "AppleWorks 6"
activate
repeat while not (exists front document)
delay .2
end repeat
end tell
When the dialog box pops up, there's no front document so the whole thing freezes until you hit OK. How can I detect this dialog box and dismiss it?
Thanks
PS
When the box is open I ran this and got this result:
/usr/bin/osascript -e 'tell application "System Events" to get properties of windows of application process "AppleWorks 6"'
minimum value:missing value, orientation:missing value, position:436, 153, class:window, role description:dialog, accessibility description:missing value, focused:missing value, title:missing value, size:412, 123, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXDialog, selected:missing value, name:missing value, description:dialog, minimum value:missing value, orientation:missing value, position:8, 76, class:window, role description:floating window, accessibility description:missing value, focused:missing value, title:Starting Points, size:631, 189, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXFloatingWindow, selected:missing value, name:Starting Points, description:floating window, minimum value:missing value, orientation:missing value, position:4, 22, class:window, role description:floating window, accessibility description:missing value, focused:missing value, title:Button Bar, size:612, 51, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXFloatingWindow, selected:missing value, name:Button Bar, description:floating windowHi,
The simplest would be to set the application preferences in the script.
Like this :
-- *** set prefs ****
tell application "AppleWorks 6"
activate
set oldPrefs to its preferences
copy oldPrefs to tPrefs
tell tPrefs
set old version warning to false --doesn't show the old version warning alert
set converted file suffix to true -- append “[v6.0]” to documents converted from older formats
set locked file warning to false
set paint reduction warning to false
end tell
set preferences to tPrefs
end tell
-- *** end set prefs ****
--**** your script, example ***
set tfiles to choose file with multiple selections allowed
tell application "AppleWorks 6"
repeat with i in tfiles
open i
tell front document
-- do something
end tell
end repeat
end tell
--**** end your script ***
-- *** reset prefs ****
tell application "AppleWorks 6" to set preferences to oldPrefs -
How can I detect a certain text within a field within CASE using IF
Dear all,
for a transformation / generation of values receiving from R/3 into BW I try to
manupulate three fields. I have a problem detecting a string in a field.
I am using a CASE with several WHEN clauses on one field. Depending on the
value, an IF is integrated. There I look into another field evaluating, if it contains
a certain string. E.g. IF STRING CP 'xyz' OR 'abc'.
System gives error for the locigal expression. I also tried CS, but same error.
How can I detect a certain text within a field and which is the right logical
expression.
Many thanks in advance!!!
ClaudiaHi,
Folow the blow example...
May be it helps....
DATA: hex1 TYPE string,
hex2 TYPE string.
hex1 = 'FFFF'.
hex2 = '123FF'.
IF hex1 CP hex2.
ENDIF.
Cheers,
SImha. -
How can we detect a virus on our mac?, How can we detect a virus on our mac?
We think we may have a virus from the USPS spam email. How can we detect a virus on our computer?
What makes you think there is a "virus"? Any symptoms...?
There are other types of malware (such as trojans) that can affect Mac OS X, but no viruses. A trojan would have to trick you into installing something (the malware) by making you think it is something else. You would be notified (by the system) that you are running a downloaded application for the first time, AND if something will be done to update your current system, you will be asked to authenticate (with your admin user name and password). If something like that comes up when you don't expect it, you should be suspicious (and NOT authenticate). Just opening an email won't do anything, even if it's an email that may affects Windows PCs.
This free utility can scan your Mac for malware.
http://www.clamxav.com/
Apparently, there is a version on the Mac App Store.
http://search.itunes.apple.com/WebObjects/MZContentLink.woa/wa/link?path=mac%2fC lamXav
In the past, when I bothered to run it a few times a year, the only things it found were junk emails that I had not bothered to delete with embedded malware, all of it aimed at Windows PCs. -
How can i detect the windows version
Hi,
How can I detect the windows version from Forms 6i?
I was used get_application_property(operating_system); But it only return MSWINDOWS, MSWINDOWS32, WIN32COMMON.
Any function or way can return the exact windows version(98/ME/NT/XP)?
Regards, WingYou may use Win_Api_Environment API call to get windows version.
I have sample code on my home PC if you need code send mail at [email protected] -
How can I detect the lable of CD or hard drive?
hi all
How can I detect the lable of CD or hard drive?
thanx ;)Hi,
Not to my knowmledge... you must use JNI to access the OS methods for that.
JRG -
How can I detect that there is an internet connection?
How can I detect that there is an internet connection?
Peter GoossensHow can I detect that there is an internet connection?
Peter Goossens
Peter,
You might want to experiment with this. It's not perfect, but...
Class
Imports System.IO
Imports System.Net
Namespace InternetConnection
Public Class SiteInfo
Private _displayName As String
Private _connectionString As String
Private Sub New(ByVal name As String, _
ByVal connectionString As String)
_displayName = name.Trim
_connectionString = connectionString.Trim
End Sub
''' <summary>
''' Gets the connection string of this instance.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property ConnectionString() As String
Get
Return _connectionString
End Get
End Property
''' <summary>
''' Gets the display name of this instance.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property DisplayName() As String
Get
Return _displayName
End Get
End Property
''' <summary>
''' A method which will add a new site to your collection of SiteInfo.
''' </summary>
''' <param name="siList">Your generic List(Of SiteInfo).</param>
''' <param name="displayName">The display name for this new instance
''' of SiteInfo.</param>
''' <param name="connectionString">The connection string for this
''' new instance of SiteInfo.</param>
''' <remarks></remarks>
Public Shared Sub AddNew(ByRef siList As List(Of SiteInfo), _
ByVal displayName As String, _
ByVal connectionString As String)
Try
If siList Is Nothing Then
Throw New NullReferenceException("The collection of SiteInfo cannot be null.")
ElseIf String.IsNullOrEmpty(displayName) OrElse displayName.Trim = "" Then
Throw New ArgumentException("The display name cannot be null or empty.")
ElseIf String.IsNullOrEmpty(connectionString) OrElse connectionString.Trim = "" Then
Throw New ArgumentException("The connection string cannot be null or empty.")
Else
If siList.Count > 0 Then
Dim findDuplicate As IEnumerable(Of SiteInfo) = _
From si As SiteInfo In siList _
Where si.DisplayName.ToLower.Replace(" "c, "") = _
displayName.ToLower.Replace(" "c, "") AndAlso _
si.ConnectionString.ToLower.Replace(" "c, "") = _
connectionString.ToLower.Replace(" "c, "")
If findDuplicate.Count <> 0 Then
Throw New ArgumentException("This is a duplicate entry.")
Else
siList.Add(New SiteInfo(displayName, connectionString))
End If
Else
siList.Add(New SiteInfo(displayName, connectionString))
End If
End If
Catch ex As Exception
Throw
End Try
End Sub
''' <summary>
''' A method which will return a boolean value to indicate internet
''' connection status.
''' </summary>
''' <param name="siList">Your generic List(Of SiteInfo).</param>
''' <param name="displayName">The display name for the instance
''' of SiteInfo to use.</param>
''' <returns></returns>
''' <remarks></remarks>
Public Shared Function InternetIsConnected(ByVal siList As List(Of SiteInfo), _
ByVal displayName As String) As Boolean
Dim retVal As Boolean = False
Try
If siList Is Nothing Then
Throw New NullReferenceException("The collection of SiteInfo cannot be null.")
ElseIf siList.Count = 0 Then
Throw New ArgumentOutOfRangeException("Count", "The collection of SiteInfo cannot be empty.")
ElseIf String.IsNullOrEmpty(displayName) OrElse displayName.Trim = "" Then
Throw New ArgumentException("The display name cannot be null or empty.")
Else
Dim findInstance As IEnumerable(Of SiteInfo) = _
From si As SiteInfo In siList _
Where si.DisplayName.ToLower.Replace(" "c, "") = _
displayName.ToLower.Replace(" "c, "")
If findInstance.Count <> 1 Then
Throw New ArgumentException("This instance is not in the collection of SiteInfo.")
Else
retVal = TestConnection(findInstance.First.ConnectionString)
End If
End If
Catch ex As Exception
Throw
End Try
Return retVal
End Function
Private Shared Function TestConnection(ByVal url As String) As Boolean
Dim retVal As Boolean = False
Try
Dim request As WebRequest = WebRequest.Create(url)
Using response As HttpWebResponse = DirectCast(request.GetResponse, HttpWebResponse)
Using dataStream As Stream = response.GetResponseStream
Using reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
retVal = True
End Using
End Using
End Using
Catch ex As WebException
retVal = True
Catch ex As Exception
retVal = False
End Try
Return retVal
End Function
End Class
End Namespace
Example Usage
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim siList As New List(Of InternetConnection.SiteInfo)
InternetConnection.SiteInfo.AddNew(siList, _
"Test1", _
"http://dev.virtualearth.net/REST/v1/Locations/37221?o=xml")
InternetConnection.SiteInfo.AddNew(siList, _
"Test2", _
"nothing here")
InternetConnection.SiteInfo.AddNew(siList, "Test3", _
"www.google.com")
InternetConnection.SiteInfo.AddNew(siList, "Test4", _
"http://fls-online.com")
' This will return true:
Dim bool1 As Boolean = _
InternetConnection.SiteInfo.InternetIsConnected(siList, _
"Test1")
' This will return false:
Dim bool2 As Boolean = _
InternetConnection.SiteInfo.InternetIsConnected(siList, _
"Test2")
' This will return false:
Dim bool3 As Boolean = _
InternetConnection.SiteInfo.InternetIsConnected(siList, _
"Test3")
' This will return true:
Dim bool4 As Boolean = _
InternetConnection.SiteInfo.InternetIsConnected(siList, _
"Test4")
Stop
End Sub
End Class
Let me know your results please?
Still lost in code, just at a little higher level. -
How can I detect the PC show down event?
I want to save a file to a certain destination once the PC shut down event happened.
And the save process must be proceeded prior to the PC shutdown.
How can I detect the PC shut down event?Hi there
Try the "Application Instance Close?" Event.
Best regards
chris
CL(A)Dly bending G-Force with LabVIEW
famous last words: "oh my god, it is full of stars!" -
How can I detect in Business HTML that the app was called from portal?
How can I detect in Business HTML that the app was called from portal?
I need to distinguish whether the application was called from portal (URL iView) or by using an URL outside of portal.
So what I'm looking for is a variable or function that can be used like this:
`if (~within_portal==1)`
do this if called from portal
`else;`
do that if not called from portal
`end;`
For example, can I check in the program that there is a SSO2 cookie from the portal?
I'm using Integrated ITS in Basis 700.Here is the trick:
if (sapwp_active=="1")
in portal
else
without portal
end; -
How can I detect if I'm running a compiled versione of my application?
In my application I have included some special functions I don't want my customer to use. Since I will distribute the application as an .exe file, instead of cutting away those functions before releasing the .exe, I want to hide them when the application is runnig as an executable, and leave them active when running in the LV environment.
How can I detect if I'm running an executable or the LV environment? Do I have to scan the application name until I find an .exe different from labview.exe or there is another way to obtain the flag (something similar to CVI function InStandaloneExecutable() for example)?
Roberto
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?An application property exists:Application:Kind
with the following values: Development System, Runtime System, Student Edition, or Embedded LabVIEW.
greetings from the Netherlands -
How can I detect the vertices of a rectangle in my image ?
I have applied a gradientMagnitude operator to my Image, and now I can see the shape of a rectangle with also other lines.
How can I detect the vertices of the rectangle in my image?
thank youRight mouse click the song and select "Get Info", go to option tab and check both Start Time and Stop Time. Type in the Start and Stop time then click OK
-
How can java programs execute automatically when it connects to network
Good Day dears...
How can java programs execute automatically when it connects to network.
Thanks in Advance friends Shackir884924 wrote:
Good Day dears...
How can java programs execute automatically when it connects to network.What is "it"? That is, execute when what connects to the network?
Your computer? If that's what you mean, this is not a Java question. It's an OS operational/administrative question. Executing any program, whether written in Java or not, based on some system event has to do with that system, not with the program. If it's possible to do this, you'd do it exactly the same way for a Java program as you would for any other program.
Or is "it" the program itself? If this is what you mean, then it's a nonsensical question. For the program to connect to the network and detect that it has connected to the network, it must already be executing, so asking how to execute it at that point is meaningless.
Finally, I'll point out that "connecting to the network" is a pretty meaningless phrase. Or rather, it has so many potentially valid meanings that it's impossible to know which one you're referring to when you use that phrase. And I'd be willing to bet you don't have a clear picture of that yourself. -
How can i print all the tab pages not just the first page (tab)
how can i print all the tab pages not just the first page (tab)
You would need to do this programmatically. Here's one way:
Attachments:
Example_VI_BD6.png 3 KB
Maybe you are looking for
-
How to connect my macbook pro to apple TV ?
I bought an apple TV and its work perfectly with my iPhone and iPad, I would like to know how to connect it to my macbook pro as i tried but i couldn't ?
-
I have Creative Suite Design and web premium 6 - with a serial number. I have reinstalled my computer, AFter installing the CS6, from direct download from my Adobe, again it will not accept my serial code, and the information is: " the serial you pro
-
Hello, I have all my contact duplicate 5 or 6 times... I don't want to sync anymore and even connect my q10 to my computer... How can I erase all those duplicate? There is no option to select all contact and erase them all at the same time...basic co
-
Hi guys, This is mainly a SQL question related to SCCM 2012. I've got the below query which works fine with x86 VM's: SELECT distinct SYS.Netbios_Name0, Gvm.PhysicalHostName0, SYS.User_Name0, SYS.Resource_Domain_OR_Workgr0,OPSYS.Caption0 as C054, OPS
-
My Scenario is IDoc to File. I have to send the IDoc for two folders based on QUANTITY field. Here if the QUANTITY is less than 0 then it should go to one folder or else to other folder. I have created two Business systems for two receiver communicat