Daily Archives

Articles indexed Saturday November 17 2012

Page 3/13 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to have a run in an Service?

    - by user1497664
    I have implemented an service that runs in a seperate process. This service contains a separate thread where i have a socket connection. This thread has a run() where it is continuously sending data to the port. My problem is after triggering the run() in the thread i don't get any contact with it anymore, i can see in the program that have open the socket that it consciously sends the data but the idea was that i while it is running i could change data that it sends for an example time. here is my run in the external thread: public void run() { if(run) { // Team and player names message is sent when entering in a game setBaseMessage(); SendMessageToCOMPort(base_message + CalculateCRC(base_message)); sleep(); // waits for 100 ms } } Anyone have any idea what might be wrong ?

    Read the article

  • install barnyard2 ubuntu 12.04

    - by Muhammad Ardiansyah
    I trying to install barnyard2 in ubuntu 12.04 32-bit I'm configure using syntax: ./configure --with-mysql-libraries=/usr/lib/x86_64-linux-gnu and when I trying to compile daq-1.1.1 using a makefile, I encountered the following errors: make[3]: Leaving directory /root/snortinstall/barnyard2/src' make[2]: Leaving directory/root/snortinstall/barnyard2/src' Making all in etc make[2]: Entering directory /root/snortinstall/barnyard2/etc' make[2]: Nothing to be done forall'. make[2]: Leaving directory /root/snortinstall/barnyard2/etc' Making all in doc make[2]: Entering directory/root/snortinstall/barnyard2/doc' make[2]: Nothing to be done for all'. make[2]: Leaving directory /root/snortinstall/barnyard2/doc' Making all in rpm make[2]: Entering directory /root/snortinstall/barnyard2/rpm' make[2]: Nothing to be done forall'. make[2]: Leaving directory /root/snortinstall/barnyard2/rpm' Making all in schemas make[2]: Entering directory/root/snortinstall/barnyard2/schemas' make[2]: Nothing to be done for all'. make[2]: Leaving directory /root/snortinstall/barnyard2/schemas' Making all in m4 make[2]: Entering directory /root/snortinstall/barnyard2/m4' make[2]: Nothing to be done forall'. make[2]: Leaving directory /root/snortinstall/barnyard2/m4' make[2]: Entering directory /root/snortinstall/barnyard2' make[2]: Nothing to be done for all-am'. make[2]: Leaving directory/root/snortinstall/barnyard2' make[1]: Leaving directory `/root/snortinstall/barnyard2'

    Read the article

  • Reading a file with a supplied name in C++

    - by Cosmina
    I must read a file with a given name (it's caled "hamlet.txt"). The class used to read the file is defined like this #ifndef READWORDS_H #define READWORDS_H /** * ReadWords class. Provides mechanisms to read a text file, and return * capitalized words from that file. */ using namespace std; #include <string> #include <fstream> class ReadWords { public: /** * Constructor. Opens the file with the default name "text.txt". * Program exits with an error message if the file does not exist. */ ReadWords(); /** * Constructor. Opens the file with the given filename. * Program exits with an error message if the file does not exist. * @param filename - a C string naming the file to read. */ ReadWords(char *filename); My definition of the members of the classis this: #include<string> #include<fstream> #include<iostream> #include "ReadWords.h" using namespace std; ReadWords::ReadWords() { wordfile.open("text.txt"); if( !wordfile ) { cout<<"Errors while opening the file!"<<endl; } } ReadWords::ReadWords(char *filename) { wordfile.open(filename); if ( !wordfile ) { cout<<"Errors while opening the file!"<<endl; } wordfile>>nextword; } And the main to test it. using namespace std; #include #include #include "ReadWords.h" int main() { char name[30]; cout<<"Please input a name for the file that you wish to open"; cin>>name; ReadWords x( name[] ); } When I complie it gives me the error: main.cpp:14: error: expected primary-expression before ']' token I know it's got something to do with the function ReadWords( char *filename), but I do not know what. Any help please?

    Read the article

  • cross-domain data with AJAX using JSONP

    - by kooshka
    I'm trying to get data from Geobytes. One of the templates returns JSON and I need to cross-domain access it. I wrote these 2 functions function getCountry(ip) { var surl = "http://www.geobytes.com/IpLocator.htm?GetLocation&template=json.txt"; $.ajax({ url: surl, data: '{"ipaddress":"' + ip + '"}', dataType: "jsonp", jsonp: "callback", jsonpCallback: "jsonpcallback" }); } function jsonpcallback(rtndata) { alert(rtndata.message); } The call is executed but I get 1 warning: Resource interpreted as Script but transferred with MIME type text/html: "http://www.geobytes.com/IpLocator.htm?GetLocation&template=json.txt&callback=jsonpcallback&{%22ipaddress%22:%22200.167.254.166%22}&_=1353148931121" 1 Error: Uncaught SyntaxError: Unexpected token : The error is thrown on the returned data at {"geobytes":{"countryid":117, I think is maybe because it's 117 and not "117" but I obviously can't control the returned data How can I fix these 2 issues?

    Read the article

  • Lift session valid ajax callback from a static javascript

    - by ChrisJamesC
    I am currently implementing a graph visualisation tool using lift on the server side and d3 ( a javascript visualisation framework) for all the visualisation. The problem I have is that in the script I want to get session dependent data from the server. So basically, my objective is to write lift-valid ajax callbacks in a static js script. Here is what I tried so far: What I have tried so far If you feel that the best solution is one that I already tried feel free to post a detailed answer telling me how to use it exactly and how it completely solves my problem. REST interface Usually what one would do to get data from a javascript function in lift is to create a REST interface. However this interface will not be linked to any session. This is the solution I got from my previous question: Get json data in d3 from lift snippet Give function as argument of script Another solution would be to give the ajaxcallback as an argument of the main script called to generate my graph. However I expect to have a lot of callbacks and I don't want to have to mess with the arguments of my script. Write the ajax callback in another script using lift and call it from the main script This solution, which is similar to a hidden text input is probably the more likely to work. However it is not elegant and it would mean that I would have to load a lot of scripts on load, which is not really conveniant. Write the whole script in lift and then serve it to the client This solution can be elegant, however my script is very long and I would really prefer that it remainss static. What I want On client side While reviewing the source code of my webpage I found that the callback for an ajaxSelect is: <select onchange="liftAjax.lift_ajaxHandler('F966066257023LYKF4=' + encodeURIComponent(this.value), null, null, null)" name="F96606625703QXTSWU" id="node_delete" class="input"> Moreover, there is a variable containing the state of the page in the end of the webpage: var lift_page = "F96606625700QRXLDO"; So, I am wondering if it is possible to simulate that my ajaxcall is valid using this liftAjax.lift_ajaxHandler function. However I don't know the exact synthax to use. On server side Since I "forged" a request on client side, I would now like to get the request on client side and to dispatch it to the correct function. This is where the LiftRules.dispatch object seems the best solution: when it is called, all the session management has been made (the request is authentified and linked to a session), however I don't know how to write the correct piece of code in the append function. Remark In lift all names of variables are changed to a random string in order to increase the security, I would like to have the same behavior in my application even if that will probably mean that I will have to "give" the javascript these values. However an array of 15 string values is still a better tradeoff than 15 functions as argument of a javascript function.

    Read the article

  • Regex: Match any character (including whitespace) except a comma

    - by selecsosi
    I would like to match any character and any whitespace except comma with regex. Only matching any character except comma gives me: [^,]* but I also want to match any whitespace characters, tabs, space, newline, etc. anywhere in the string. For example, I would like to be able to match all of this up until the comma: "bla bla bla" "asdfasdfasdfasdfasdfasdf" "asdfasdfasdf", Is there a simple way to do this without knowing where the whitespace may be?

    Read the article

  • Text should wrap if checkbox is selected

    - by Dainel
    i am working with android webview and inside webview i am displaying the webpage which is having css,Javascript so i want that whenever i will select the checkbox and try to zoom the page so it should wrap otherwise it should not. So for that i tried to set the property of css - w.loadUrl("javascript:(function() {" + "document.getElementByTagName('html')[0].style.whiteSpace='nowrap';})"); but i am changing these properties by programming so it is not affecting the text content so please tell me how can i make the webpage text as wrapped if the checkbox is selected and it should not wrap if the checkbox is not selected,so please provide me any suggestion?? Thanks in advance

    Read the article

  • Azure git deployment - missing references in 2nd assembly

    - by Dan
    I'm trying to setup Bitbucket deployment to an Azure website. I successfully have Bitbucket and Azure linked, but when I push to Bitbucket, I get the following error on the Azure site: If I click on 'View Log', it shows the following compile errors: D:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\DWASFiles\Sites\<projname>\VirtualDirectory0\site\repository\<projname>.Common\<projname>.Common.csproj] D:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "WebMatrix.WebData, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\DWASFiles\Sites\<projname>\VirtualDirectory0\site\repository\<projname>.Common\<projname>.Common.csproj] CustomMembershipProvider.cs(5,7): error CS0246: The type or namespace name 'WebMatrix' could not be found (are you missing a using directive or an assembly reference?) [C:\DWASFiles\Sites\<projname>\VirtualDirectory0\site\repository\<projname>.Common\<projname>.Common.csproj] CustomMembershipProvider.cs(9,38): error CS0246: The type or namespace name 'ExtendedMembershipProvider' could not be found (are you missing a using directive or an assembly reference?) [C:\DWASFiles\Sites\<projname>\VirtualDirectory0\site\repository\<projname>.Common\<projname>.Common.csproj] Models\AccountModels.cs(3,18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) [C:\DWASFiles\Sites\<projname>\VirtualDirectory0\site\repository\<projname>.Common\<projname>.Common.csproj] CustomMembershipProvider.cs(198,37): error CS0246: The type or namespace name 'OAuthAccountData' could not be found (are you missing a using directive or an assembly reference?) [C:\DWASFiles\Sites\<projname>\VirtualDirectory0\site\repository\<projname>.Common\<projname>.Common.csproj] Models\AccountModels.cs(40,10): error CS0246: The type or namespace name 'Compare' could not be found (are you missing a using directive or an assembly reference?) [C:\DWASFiles\Sites\<projname>\VirtualDirectory0\site\repository\<projname>.Common\<projname>.Common.csproj] Models\AccountModels.cs(40,10): error CS0246: The type or namespace name 'CompareAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\DWASFiles\Sites\<projname>\VirtualDirectory0\site\repository\<projname>.Common\<projname>.Common.csproj] Models\AccountModels.cs(73,10): error CS0246: The type or namespace name 'Compare' could not be found (are you missing a using directive or an assembly reference?) [C:\DWASFiles\Sites\<projname>\VirtualDirectory0\site\repository\<projname>.Common\<projname>.Common.csproj] Models\AccountModels.cs(73,10): error CS0246: The type or namespace name 'CompareAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\DWASFiles\Sites\<projname>\VirtualDirectory0\site\repository\<projname>.Common\<projname>.Common.csproj] Note that these compile errors are against another assembly in my project (the assembly where I put the business logic). When Googling, the only mention I found was about having to set the "local copy" flag to true for those references. I've tried this, but still got the same errors. This all compiles fine locally. Any ideas?

    Read the article

  • Recoverable error while running XSL

    - by Kate
    XSL: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" exclude-result-prefixes="wp wne w10 w ve o r m v" version="2.0"> <xsl:output method="text"/> <xsl:param name="styleName"/> <xsl:template match="w:p"> <xsl:apply-templates/><xsl:text>&#10;</xsl:text> </xsl:template> <xsl:template match="w:r[not ((parent::w:hyperlink[@w:anchor[matches(.,concat('^(',$styleName,')')),'i']]))]"> <xsl:value-of select="replace(., '.', '&#xFF00;')"/> </xsl:template> </xsl:stylesheet> While processing the above XSL, I am getting the below error, Recoverable Error: Recoverable error on line 11 FORG0006: An error occurred matching pattern {w:r[not ((parent::w:hyperlink[@w:anchor[matches(.,concat('^(',$styleName,')')),'i']]))]}: Effective boolean value is not defined for a sequence of two or more items starting with a boolean Please Help. I am not able to figure out this.

    Read the article

  • not able to style a ul inside a nav tag

    - by user1831677
    I am trying to make a nav menu for my website and have been using http://www.onextrapixel.com/2011/06/03/how-to-create-a-horizontal-dropdown-menu-with-html-css-and-jquery/ as a guide. It has worked fine but as soon as I try to add ( id="coolMenu" ) to the nav tag it stops working. I took it away from the ul tag and added it to the nav tag and it no longer works. It does not display anything at all. What am in doing wrong? Thanks. html code below: <nav id="coolMenu"> <ul> <li><a href="#">Lorem</a></li> <li><a href="#">Mauricii</a></li> <li> <a href="#">Periher</a> <ul class="noJS"> <li><a href="#">Hellenico</a></li> <li><a href="#">Genere</a></li> <li><a href="#">Indulgentia</a></li> </ul> </li> <li><a href="#">Tyrio</a></li> <li><a href="#">Quicumque</a></li> </ul> </nav> css below: /* Structure ------------------------------------------*/ #coolMenu, #coolMenu ul { list-style: none; } #coolMenu { float: left; } #coolMenu > li { float: left; } #coolMenu li a { display: block; height: 2em; line-height: 2em; padding: 0 1.5em; text-decoration: none; } #coolMenu ul { position: absolute; display: none; z-index: 999; } #coolMenu ul li a { width: 80px; } #coolMenu li:hover ul.noJS { display: block; } /* Main menu ------------------------------------------*/ #coolMenu { font-family: Arial; font-size: 12px; background: #2f8be8; } #coolMenu > li > a { color: #fff; font-weight: bold; } #coolMenu > li:hover > a { background: #f09d28; color: #000; } /* Submenu ------------------------------------------*/ #coolMenu ul { background: #f09d28; } #coolMenu ul li a { color: #000; } #coolMenu ul li:hover a { background: #ffc97c; }

    Read the article

  • Why won't this loop normalize my Vector2 list?

    - by ssb
    See the following code: List<Vector2> axes = new List<Vector2>(); axes.Add(TopRight() - TopLeft()); axes.Add(BottomLeft() - TopLeft()); axes.Add(otherRectangle.TopRight() - otherRectangle.TopLeft()); axes.Add(otherRectangle.BottomLeft() - otherRectangle.TopLeft()); // Try normalizing vectors? foreach (Vector2 axis in axes) { axis.Normalize(); } the Vector2.Normalize() method is a void method that normalizes the vector it's called on. Yet for some reason when I do this loop it doesn't normalize the vectors. Am I just unable to modify a list this way? Some oddities: Iterating with a for loop, i.e. axis[i].Normalize() doesn't work. Iterating with the built-in List<T>.ForEach iterator does not work. Creating a normalizing the vector before adding it to the list rather than iterating over the list does work. Why does iteration not work?

    Read the article

  • addsubview animation works only first time

    - by Priya
    I am trying add subview with animation effect using the code which work fine for the first time below. CATransition *transition = [CATransition animation]; transition.duration = 1.0; transition.type = kCATransitionMoveIn; transition.subtype = kCATransitionFromRight; [newView.layer removeAllAnimations] [newView.layer addAnimation:transition forKey:nil]; [self.masterview addSubview:newView]; There is a back button in newView which removes the View from the superview. [newView removeFromSuperview]; Now when I try adding newView as subview again using the above code,its first adds the view as a subview(without animation) and again with animation.

    Read the article

  • Compile aspx page "on the fly"

    - by user1122321
    I am trying to build an aspx page at runtime (by another aspx page which finally redirects to the new one). As far as I understand, aspx pages MUST be precompiled before a user can view them. In other words, the aspx page must be compiled to the DLL in the /bin folder. Is there a away to tell IIS, or to order it by VB.NET code, to compile a page before I am redirecting my user to the page? Any help would be greatly appriciated.

    Read the article

  • Splunk configuration

    - by user1696748
    is there a proper procedure to have real-time data in my application? Or I can add in any way so long as I added correctly? Firstly I created my application, then add new index. Next, I added the data scripts then added those logs that I want Splunk to monitor. Currently I cannot have real-time data. Perhaps due to my scripted inputs. Current situation is that Splunk did run my .bat in bin folder(logs were updated). However, my chart always shows "waiting for data" ...

    Read the article

  • Haskell Syntax: Parse Error On Input

    - by NuNu
    As part of a mini-haskell compiler that I'm writing, I have a function named app. What I want this function to do is take in these arguments epp (App e1 e2). The first step would be to evaluate e1 recursively (epp e1) and check if the output would be an error. If not then evaluate e2 and then call another function eppVals to evaluate the outputs of the calls on e1 and e2 which I defined as v1 and v2 respectively. epp (App e1 e2) | epp e1 /= Error = eppVals v1 v2 | otherwise = Error where v1 = epp e1 v2 = epp e2 <- parse error on input `=' Logically I believe what I have written so far works but I'm getting a parse error on input = where I stated above. Any idea why? My second try epp :: Exp -> Error Val epp (App e1 e2) = (eppVals v1 v2) where v1 = (epp e1) v2 = (epp e2) But now throws Couldn't match expected type Val with actual type Error Val

    Read the article

  • JPA Database strcture for internationalisation

    - by IrishDubGuy
    I am trying to get a JPA implementation of a simple approach to internationalisation. I want to have a table of translated strings that I can reference in multiple fields in multiple tables. So all text occurrences in all tables will be replaced by a reference to the translated strings table. In combination with a language id, this would give a unique row in the translated strings table for that particular field. For example, consider a schema that has entities Course and Module as follows :- Course int course_id, int name, int description Module int module_id, int name The course.name, course.description and module.name are all referencing the id field of the translated strings table :- TranslatedString int id, String lang, String content That all seems simple enough. I get one table for all strings that could be internationalised and that table is used across all the other tables. How might I do this in JPA, using eclipselink 2.4? I've looked at embedded ElementCollection, ala this... JPA 2.0: Mapping a Map - it isn't exactly what i'm after cos it looks like it is relating the translated strings table to the pk of the owning table. This means I can only have one translatable string field per entity (unless I add new join columns into the translatable strings table, which defeats the point, its the opposite of what I am trying to do). I'm also not clear on how this would work across entites, presumably the id of each entity would have to use a database wide sequence to ensure uniqueness of the translatable strings table. BTW, I tried the example as laid out in that link and it didn't work for me - as soon as the entity had a localizedString map added, persisting it caused the client side to bomb but no obvious error on the server side and nothing persisted in the DB :S I been around the houses on this about 9 hours so far, I've looked at this Internationalization with Hibernate which appears to be trying to do the same thing as the link above (without the table definitions it hard to see what he achieved). Any help would be gratefully achieved at this point... Edit 1 - re AMS anwser below, I'm not sure that really addresses the issue. In his example it leaves the storing of the description text to some other process. The idea of this type of approach is that the entity object takes the text and locale and this (somehow!) ends up in the translatable strings table. In the first link I gave, the guy is attempting to do this by using an embedded map, which I feel is the right approach. His way though has two issues - one it doesn't seem to work! and two if it did work, it is storing the FK in the embedded table instead of the other way round (I think, I can't get it to run so I can't see exactly how it persists). I suspect the correct approach ends up with a map reference in place of each text that needs translating (the map being locale-content), but I can't see how to do this in a way that allows for multiple maps in one entity (without having corresponding multiple columns in the translatable strings table)...

    Read the article

  • Mbean registered but not found in mbean Server

    - by Prisco
    I have a problem about the mbeans. I have created a simple mbean and I have registered it on the default mBeanServer that is run (Via eclipse or java -jar mbean.jar) and in the same process if I try to fouund the mbean registered with a simple query: for (ObjectInstance instance : mbs.queryMBeans(ObjectNameMbean, null)) { System.out.println(instance.toString()); } the query retuerns my mbean, but if I start another process and try to search this mbean registered the mbeas is not found! why? The approch is : (Process that is running) public static void main(String[] args) throws Exception { MBeanServer mbeanServer =ManagementFactory.getPlatformMBeanServer(); ObjectName objectName = new ObjectName(ObjectNameMbean); Simple simple = new Simple (1, 0); mbeanServer.registerMBean(simple, objectName); while (true) { wait (Is this necessary?) } } So this is the first process that is running (that has the only pourpose to registry the mbean, because there is another process that want to read these informations. So I start another process to search this mbean but nothing. I 'm not using jboss but the local Java virtual Machine but my scope is to deploy this simple application in one ejb (autostart) and another ejb will read all informations. All suggestions are really apprecciated. This example should be more useful : Object Hello: public class Hello implements HelloMBean { public void sayHello() { System.out.println("hello, world"); } public int add(int x, int y) { return x + y; } public String getName() { return this.name; } public int getCacheSize() { return this.cacheSize; } public synchronized void setCacheSize(int size) { this.cacheSize = size; System.out.println("Cache size now " + this.cacheSize); } private final String name = "Reginald"; private int cacheSize = DEFAULT_CACHE_SIZE; private static final int DEFAULT_CACHE_SIZE = 200; } Interface HelloBean (implemented by Hello) public interface HelloMBean { public void sayHello(); public int add(int x, int y); public String getName(); public int getCacheSize(); public void setCacheSize(int size); } Simple Main import java.lang.management.ManagementFactory; import java.util.logging.Logger; import javax.management.MBeanServer; import javax.management.ObjectName; public class Main { static Logger aLog = Logger.getLogger("MBeanTest"); public static void main(String[] args) { try{ MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); ObjectName name = new ObjectName("ApplicationDomain:type=Hello"); Hello mbean = new Hello(); mbs.registerMBean(mbean, name); // System.out.println(mbs.getAttribute(name, "Name")); aLog.info("Waiting forever..."); Thread.sleep(Long.MAX_VALUE); } catch(Exception x){ x.printStackTrace(); aLog.info("exception"); } } } So now I have exported this project as jar file and run it as "java -jar helloBean.jar" and by eclipse I have modified the main class to read informations of this read (Example "Name" attribute) by using the same objectname used to registry it . Main to read : public static void main(String[] args) { try{ MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); ObjectName name = new ObjectName("ApplicationDomain:type=Hello"); System.out.println(mbs.getAttribute(name, "Name")); } catch(Exception x){ x.printStackTrace(); aLog.info("exception"); } } But nothing, the bean is not found.

    Read the article

  • JBoss classloading when 2 WARs have the same class

    - by Pacman
    I have a web applications A.war which has two servlets AServlet and BServlet. Both instantiate a helper class com.mycompany.Foo.class (this is my own class, not a third party library). Now I want to split the two servlets into two separate WARs: A.war will have only AServlet and a new B.war will have BServlet. AServlet will invoke BServlet via HTTP GET. Both WARs will have com.mycompany.Foo.class. I want to deploy both WARs on the same JBoss instance. The question is, will there be any classloading issues due to the same class being present in both WARs, and the WARs being deployed on the same JBoss instance?

    Read the article

  • How to send Ctrl/Shift/Alt + Key combinations to an application window? (via SendMessage)

    - by user1792042
    I can successfully send any single key message to an application, but don't know how to send combinations of keys (like Ctrl+F12, Shift+F1, Ctrl+R, etc..) Tired doing this that way: SendMessage(handle, WM_KEYDOWN, Keys.Control, 0); SendMessage(handle, WM_KEYDOWN, Keys.F12, 0); SendMessage(handle, WM_KEYUP, Keys.F12, 0); SendMessage(handle, WM_KEYUP, Keys.Control, 0); but this doen not seems to work.. (application act like only F12 is pressed, not Ctrl+F12).. Any ideas how to make this work?

    Read the article

  • Need a Security Scenario for asp.net webservice

    - by Karamafrooz
    I have developed a .Net 3.5 windows forms application. I also want to design a website that has a webservice with multiple Webmethods to query the database on the host machine. I want the webservice to be called ONLY through my winapp and my website! And I don't want any other people to be able to call and use my webservice but only some people who have access to the windows application that I have developed. I need a good security scenario for this! I truly appreciate anyone who can help me because this is my first experience of developing a webservice and I really need it to be as secure as I mentioned!

    Read the article

  • Disable Ctrl-Alt-Del and shutdown for kiosk

    - by acidzombie24
    I finished an app for a client. After talking for a bit he would like me to do an additional app or recommend one for their kiosk. The client would like a way to prevent the computer from shutting down. They like to disable Ctrl+Alt+Delete (also so processes cant be killed), Alt+F4 to close their browser and no windows button to make the start menu pop up for the user to click or use keyboard to shutdown. Obviously there should be a way to unlock it I told them i'll look into it but they really don't need it. They are using Windows 7. Is there a WinAPI call I can use or an already existing app or a lib to do this?

    Read the article

  • possible UDP attack on BIND?

    - by Waleed Hamra
    hello everyone, i was surprised last month when my EC2 instance (ubuntu precise server), that is supposed to be under the free tier still, accumulated lots of traffic... today, while checking my current billing statement, i noticed i already have tons of traffic, while still in the middle of the month, and i'm fearing what my bill by the end of the month is going to be... i installed bandwidthd, and after few minutes, i noticed lots of UDP traffic to "108.162.233.15". this is apparently a cloudflare IP, and i don't have anything using cloudflare (as far as i know). so i ran "iftop" to see what ports are being used, and i saw the UDP traffic coming from port 80 to my port 53... why would a webserver query dns? so i stopped bind on my server, and ran it in foreground debugging mode, and saw the following query, being repeated continuously: 17-Nov-2012 12:30:58.216 client 108.162.233.15#80: UDP request 17-Nov-2012 12:30:58.216 client 108.162.233.15#80: request is not signed 17-Nov-2012 12:30:58.216 client 108.162.233.15#80: recursion available 17-Nov-2012 12:30:58.216 client 108.162.233.15#80: query 17-Nov-2012 12:30:58.216 client 108.162.233.15#80: query (cache) 'isc.org/ANY/IN' approved 17-Nov-2012 12:30:58.216 client 108.162.233.15#80: send 17-Nov-2012 12:30:58.216 client 108.162.233.15#80: sendto 17-Nov-2012 12:30:58.216 client 108.162.233.15#80: senddone 17-Nov-2012 12:30:58.217 client 108.162.233.15#80: next 17-Nov-2012 12:30:58.217 client 108.162.233.15#80: endrequest 17-Nov-2012 12:30:58.217 client @0x7fbee05126e0: udprecv 17-Nov-2012 12:30:58.343 client 108.162.233.15#80: UDP request 17-Nov-2012 12:30:58.343 client 108.162.233.15#80: request is not signed 17-Nov-2012 12:30:58.343 client 108.162.233.15#80: recursion available 17-Nov-2012 12:30:58.343 client 108.162.233.15#80: query 17-Nov-2012 12:30:58.343 client 108.162.233.15#80: query (cache) 'isc.org/ANY/IN' approved 17-Nov-2012 12:30:58.343 client 108.162.233.15#80: send 17-Nov-2012 12:30:58.344 client 108.162.233.15#80: sendto 17-Nov-2012 12:30:58.344 client 108.162.233.15#80: senddone 17-Nov-2012 12:30:58.344 client 108.162.233.15#80: next 17-Nov-2012 12:30:58.344 client 108.162.233.15#80: endrequest my question is... is this normal? should i be worried? or is this completely irrelevant to my data charges, and i should wait to see more data from bandwidthd? thank you in advance.

    Read the article

  • Configuring NVIDIA Quadro with Dell Precision M4600

    - by vsecades
    After a frustrating couple of weeks when I recently bought my Dell Precision laptop, I managed to fix an issue where Ubuntu (yes, was NOT using Windows, get serious) would not recognize the video card and would cause all sorts of problems all over the place. I ended up one Saturday morning nearly throwing this thing away, when I managed to find a post about NVIDIA Optimus technology... ( http://www.pcmag.com/article2/0,2817,2358963,00.asp ). Now I am a huge advocate of disruptive new stuff, as long as we keep the broader audience in mind. Anyhow, disabling this (which as the BIOS settings state only work on Windows 7 or later), effectively allow the NVIDIA based Ubuntu driver to kick in full force. No need for a trash can anymore thankfully. As I saw multiple posts all over the place about this, check your BIOS, disable and try the video again to see if this corrects your issues. Best of luck!

    Read the article

  • r1soft agent is failing with the error: "write error while sending code: Broken pipe"

    - by curiousguy
    I have an Ubuntu 10.04.4 LTS server with r1soft agent installed in it. Recently, the backups are failing with the following error. -------- write error while sending code: Broken pipe -------- I have reinstalled the buagent but to no avail. On checking the server logs, I could see the following errors listed in it: -------- # tail -f /var/log/messages |grep -i buagent Nov 17 03:35:06 microscope buagent: Need to back up 126 sectors Nov 17 03:35:06 microscope buagent: (Righteous Backup Linux Agent) 1.79.0 build 12433 Nov 17 03:35:06 microscope buagent: allowing control from backup server (10.128.136.195) with valid RSA key Nov 17 03:35:06 microscope buagent: allowing control from backup server (10.128.136.201) with valid RSA key Nov 17 03:35:06 microscope buagent: sending auth challenge for allowed host at (10.128.136.201) port (47890) Nov 17 03:35:06 microscope buagent: host (10.128.136.201) port (47890) authentication successful Nov 17 03:35:06 microscope buagent: Backup request accepted. Starting backup. Nov 17 03:35:06 microscope buagent: Snapshot completed in 0.010 seconds. Nov 17 03:45:03 microscope buagent: Error reading blocks from snapshot. Nov 17 03:45:03 microscope buagent: Reading blocks failed Nov 17 03:45:03 microscope buagent: error backup aborted Nov 17 03:45:03 microscope buagent: backup failed on agent closing connection Nov 17 03:45:03 microscope buagent: Backup failed. Nov 17 03:45:03 microscope buagent: write error while sending code: Broken pipe (32) Nov 17 03:45:03 microscope buagent: tell child write failed -------- I tried changing the 'Timeout' and 'DiskAsPartition' value in '/etc/buagent/agent_config' file but no luck. Also, verified that proper route is added to the backup server. The agent is also running fine. Am I missing anything? Any help would be much appreciated. Note: CDP 2.0 is installed in the backup server.

    Read the article

  • Planning office network [closed]

    - by gakhov
    I'm planning to setup my office network from scratch and want to ask professional opinions or tips. My office is connected to Internet with Cable connection (100Mb/s). The devices i would like to connect are VoIP Phone (RJ-11), TV (WiFi/LAN), 3 laptops (WiFi), a few smartphones (WiFi), iPad (WiFi), Kindle (WiFi) and, probably, MediaServer (WiFi/LAN). As you can see, the most load will be on WiFi connections (probably, even if TV supports WiFi it's better to connect it by LAN?). So, i need help to choose the best routers combination (or even one?) to support stable connections for all these devices and minimize the total number of routers/adapters. Any thoughts? Thank you!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >