<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Javas Blogs global]]></title>
		<link><![CDATA[http://www.javasblogs.com/]]></link>
		<description><![CDATA[From coffees to Javascripting]]></description>
		<language><![CDATA[en-us]]></language>
		<generator><![CDATA[BeVerbal RSS Feed Generator]]></generator>
		<item>
			<title><![CDATA[Segment Intersection]]></title>
			<guid><![CDATA[http://keypressed.javasblogs.com/article/51562026.html]]></guid>
			<author><![CDATA[~Ray <dforums@hotmail.com>]]></author>
			<pubDate><![CDATA[Thu, 13 Nov 2008 12:26:43 -0500]]></pubDate>
			<description><![CDATA[#include &lt;iostream&gt;#include &lt;vector&gt; #include &quot;ofMain h&quot;#include &quot;ofVec2f h&quot;#include &quot;ofPoint2f h&quot; //ambient light sensor reading#include &lt;mach/mach h&gt;#include &lt;IOKit/IOKitLib h&gt;#include &lt;CoreFoundation/CoreFoundation h&gt; enum &#123; kGetSensorReadingID = 0. // getSensorReading(int * int *) kGetLEDBrightnessID = 1. // getLEDBrightness(int int *) kSetLEDBrightnessID = 2. // setLEDBrightness(int int int *) kSetLEDFadeID = 3. // setLEDFade(int int int int *) // other firmware-related functions // verifyFirmwareID = 4. // verifyFirmware(int *) // getFirmwareVersionID = 5. // getFirmwareVersion(int *) // other flashing-related functions // ...&#125;; static double updateInterval = 0.1;static io_connect_t dataPort = 0; class world : public ofSimpleApp &#123; public: void setup&#40;&#41;;void update&#40;&#41;;void draw&#40;&#41;; void drawStroke&#40;&#41;; void drawXPoints&#40;&#41;; bool intersect&#40;ofPoint2f P0a ofPoint2f P0b ofPoint2f P1a ofPoint2f P1b ofPoint2f &amp;X&#41;; long getLight&#40;&#41;; long light; vector&lt;ofPoint2f&gt; points; vector&lt;float&gt; thickVals; vector&lt;ofPoint2f&gt; xpoints; void keyPressed&#40; int key &#41;;void mouseMoved&#40; int x int y &#41;;void mouseDragged&#40; int x int y int button &#41;;void mousePressed&#40; int x int y int button &#41;;void mouseReleased&#40;&#41;; &#125;; void world::setup&#40;&#41; &#123; ofEnableAlphaBlending&#40;&#41;; light = 100;&#125; void world::update&#40;&#41; &#123;ofBackground&#40; 100. 100. 100 &#41;; light = getLight&#40;&#41;;&#125; void world::draw&#40;&#41; &#123; ofSetColor&#40; 0x222222 &#41;; ofRect&#40; 0. 550 ofGetWidth&#40;&#41; ofGetHeight&#40;&#41;-550 &#41;; ofSetColor&#40; 0xee0000 &#41;; ofRect&#40; 0 ofRangemap&#40;400. 1400 ofGetHeight&#40;&#41;. 0 light&#41;. 10. 10&#41;; drawStroke&#40;&#41;; drawXPoints&#40;&#41;; ofSetColor&#40; 0xffffff &#41;;ofDrawBitmapString&#40; &quot;inkBrush.&quot;,20. 748 &#41;;&#125; void world::drawStroke&#40;&#41; &#123; glBegin&#40;GL_TRIANGLE_STRIP&#41;; for&#40;int i=0; i&lt;points size&#40;&#41;; i++&#41; &#123; ofVec2f normal; if&#40; i == 0&#41; &#123; normal set&#40;0. 1&#41;; &#125; else &#123; normal = points&#91;i&#93; perpendicular&#40;points&#91;i-1&#93;&#41;; &#125; glColor4f&#40;0.2. 0.2. 0.2. MAX&#40;thickVals&#91;i&#93;. 0.1&#41;&#41;; ofPoint2f normalPoint = points&#91;i&#93; + &#40;normal*MAX&#40;0.4. 10*&#40;1-thickVals&#91;i&#93;&#41;&#41;&#41;; ofPoint2f normalPointInv = points&#91;i&#93; + &#40;-normal*MAX&#40;0.4. 10*&#40;1-thickVals&#91;i&#93;&#41;&#41;&#41;; //glVertex2f(points[i] x points[i] y); glVertex2f&#40;normalPoint x normalPoint y&#41;; glVertex2f&#40;normalPointInv x normalPointInv y&#41;; //glVertex2f(points[i] x points[i] y); &#125; glEnd&#40;&#41;;&#125; void world::drawXPoints&#40;&#41; &#123; glColor3f&#40;0.8. 0. 0&#41;; glPointSize&#40;3.0&#41;; glBegin&#40;GL_POINTS&#41;; for&#40;int i=0; i&lt;xpoints size&#40;&#41;; i++&#41; &#123; glVertex2f&#40;xpoints&#91;i&#93; x xpoints&#91;i&#93; y&#41;; &#125; glEnd&#40;&#41;;&#125; bool world::intersect&#40;ofPoint2f P0a ofPoint2f P0b ofPoint2f P1a ofPoint2f P1b ofPoint2f &amp;X&#41; &#123; float m0 = &#40;P0b y - P0a y&#41; / &#40;P0b x - P0a x&#41;; float m1 = &#40;P1b y - P1a y&#41; / &#40;P1b x - P1a x&#41;; float x = &#40; &#40;P1a y - P0a y&#41; + P0a x*m0 - P1a x*m1 &#41; / &#40;m0 - m1&#41;; float y = P0a y + &#40;x-P0a x&#41;*m0; float left0 = MIN&#40;P0a x. P0b x&#41;; float right0 = MAX&#40;P0a x. P0b x&#41;; float left1 = MIN&#40;P1a x. P1b x&#41;; float right1 = MAX&#40;P1a x. P1b x&#41;; X x = x; X y = y; if &#40; x &gt;= left0 &amp;&amp; x &lt;= right0 &amp;&amp; x &gt;= left1 &amp;&amp; x &lt;= right1&#41; &#123; return true; &#125; else &#123; return false; &#125;&#125; long world::getLight&#40;&#41; &#123; kern_return_t kr; IOItemCount scalarInputCount = 0; IOItemCount scalarOutputCount = 2; SInt32 left = 0 right = 0; kr = IOConnectMethodScalarIScalarO&#40;dataPort kGetSensorReadingID scalarInputCount scalarOutputCount. &amp;left. &amp;right&#41;; if &#40;kr == KERN_SUCCESS&#41; &#123; //cout &lt;&lt; left &lt;&lt; &quot; &quot; &lt;&lt; right &lt;&lt; endl; return &#40;long&#41;left; &#125; //if (kr == kIOReturnBusy) // return; //mach_error(&quot;I/O Kit error:&quot; kr); //exit(kr);&#125; void world::keyPressed&#40; int key &#41; &#123; if&#40; key == ' '&#41;&#123; ; &#125;&#125;void world::mouseMoved&#40; int x int y &#41; &#123; points push_back&#40;ofPoint2f&#40;&#40;float&#41;x. &#40;float&#41;y&#41;&#41;; thickVals push_back&#40;ofRangemap&#40;400. 1500. 1. 0 light&#41;&#41;; //mark intersection if&#40; points size&#40;&#41; &gt; 3 &#41; &#123; for&#40;int i=0; i&lt;points size&#40;&#41;-3; i++&#41; &#123; ofPoint2f X; bool doX = intersect&#40;points&#91;i&#93; points&#91;i+1&#93; points&#91;points size&#40;&#41;-2&#93; points&#91;points size&#40;&#41;-1&#93;. X&#41;; if&#40; doX &#41; &#123; xpoints push_back&#40;ofPoint2f&#40;X&#41;&#41;; &#125; &#125; &#125;&#125;void world::mouseDragged&#40; int x int y int button &#41; &#123;&#125;void world::mousePressed&#40; int x int y int button &#41; &#123;&#125;void world::mouseReleased&#40;&#41; &#123;&#125; int main&#40;&#41; &#123; //set up ambient light sensor reading kern_return_t kr; io_service_t serviceObject; CFRunLoopTimerRef updateTimer; // Look up a registered IOService object whose class is AppleLMUController serviceObject = IOServiceGetMatchingService&#40;kIOMasterPortDefault. IOServiceMatching&#40;&quot;AppleLMUController&quot;&#41;&#41;; if &#40;!serviceObject&#41; &#123; fprintf&#40;stderr. &quot;failed to find ambient light sensor\n&quot;&#41;; exit&#40;1&#41;; &#125; // Create a connection to the IOService object kr = IOServiceOpen&#40;serviceObject mach_task_self&#40;&#41;. 0. &amp;dataPort&#41;; IOObjectRelease&#40;serviceObject&#41;; if &#40;kr != KERN_SUCCESS&#41; &#123; mach_error&#40;&quot;IOServiceOpen:&quot; kr&#41;; exit&#40;kr&#41;; &#125; ofSetupOpenGL&#40; 1024. 768. OF_WINDOW &#41;;world APP;ofRunApp&#40; &amp;APP &#41;;&#125;<br>
<br>
<a href="http://www.forexgroups.com"><font size=5>Forex Groups</a> - <a href="http://www.tipsontrading.com">Tips on Trading</a></font>
<br>
<br>Related article:<br>
<a href='http://blog.stefanix.net/segment-intersection'>http://blog.stefanix.net/segment-intersection</a>
]]></description>
		</item>
		<item>
			<title><![CDATA[Free Download Nokia]]></title>
			<guid><![CDATA[http://keypressed.javasblogs.com/article/51202482.html]]></guid>
			<author><![CDATA[~Ray <dforums@hotmail.com>]]></author>
			<pubDate><![CDATA[Wed, 12 Mar 2008 23:17:47 -0500]]></pubDate>
			<description><![CDATA[remove download nokia ringtones free nokia ringtones uk free nokia 6225 ringtones nokia ringtones cell telecommunicate samsung nokia acme ringtones nokia 3100 ringtones nokia 7250 midi sprint nokia 3588i ringtones free nokia 1100 keypress ringtones free nextel ring tones i530 free nokia 1100 gsm telecommunicate. Nokia <a href='http://polyphonic.musicalblogs.com/'>polyphonic</a> ringtones remove nokia mp3 ringtones remove nokia 1100 composer ringtones remove nokia 1100 composer ringtones free nokia 1100 keypressed ringtones function free ringtones say change surface free. Free u. Nokia 3310i ringtones to bulldog mutt cumbieros meta. Motorola v600 ringtones free nokia 1100 composer ringtones for tracfone free nokia 1100 composer ringtone remove nokia phone ringtone one and keypressed nokia ringtone sprint ringtone free nokia 1100 keypress ringtones free transfer of polyphonic punja ringtones for nokia 6010 cellular one remove ringtones ringtone. <br>
<br>
<a href="http://www.forexgroups.com"><font size=5>Forex Groups</a> - <a href="http://www.tipsontrading.com">Tips on Trading</a></font>
<br>
<br>Related article:<br>
<a href='http://camilla-payday-loan.blogspot.com/2007/11/free-download-nokia.html'>http://camilla-payday-loan.blogspot.com/2007/11/free-download-nokia.html</a>
]]></description>
		</item>
		<item>
			<title><![CDATA[Free Download Nokia]]></title>
			<guid><![CDATA[http://keypressed.javasblogs.com/article/51202483.html]]></guid>
			<author><![CDATA[~Ray <dforums@hotmail.com>]]></author>
			<pubDate><![CDATA[Wed, 12 Mar 2008 23:17:47 -0500]]></pubDate>
			<description><![CDATA[Free download nokia ringtones free nokia ringtones uk free nokia 6225 ringtones nokia ringtones <a href='http://cell.wordsblogs.com/'>cell</a> phone samsung nokia acme ringtones nokia 3100 ringtones nokia 7250 midi run nokia 3588i ringtones remove nokia 1100 keypress ringtones remove nextel ring tones i530 remove nokia 1100 gsm phone. Nokia polyphonic ringtones free nokia mp3 ringtones free nokia 1100 composer ringtones remove nokia 1100 composer ringtones free nokia 1100 keypressed ringtones <a href='http://service.policeblogs.net/'>service</a> remove ringtones say even remove. Free u. Nokia 3310i ringtones to bulldog mutt cumbieros meta. Motorola v600 ringtones free nokia 1100 composer ringtones for tracfone free nokia 1100 composer ringtone free nokia phone ringtone one and keypressed nokia ringtone sprint ringtone free nokia 1100 keypress ringtones free download of polyphonic punja ringtones for nokia 6010 cellular one free ringtones ringtone. <br>
<br>
<a href="http://www.forexgroups.com"><font size=5>Forex Groups</a> - <a href="http://www.tipsontrading.com">Tips on Trading</a></font>
<br>
<br>Related article:<br>
<a href='http://camilla-payday-loan.blogspot.com/2007/11/free-download-nokia.html'>http://camilla-payday-loan.blogspot.com/2007/11/free-download-nokia.html</a>
]]></description>
		</item>
		<item>
			<title><![CDATA[getKeyCode(int gameAction) ?getGameAction(int keyCode)???]]></title>
			<guid><![CDATA[http://keypressed.javasblogs.com/article/50822246.html]]></guid>
			<author><![CDATA[~Ray <dforums@hotmail.com>]]></author>
			<pubDate><![CDATA[Sat, 15 Dec 2007 15:10:35 -0500]]></pubDate>
			<description><![CDATA[一个MIDlet应用程序通过调用beg方法来探测哪些键盘代码映射到运行的应用程序中的抽象游戏动作：
public static int getGameAction(int keyCode); 
　　Canvas类定义抽象游戏动作集：UP、DOWN、LEFT、RIGHT、blast等等。
　　游戏开发者应该知道MIDP 1.0规范中的一个问题。这个类定义了转化键盘代码到游戏动作的方法，同样也定义了转化游戏动作到键盘代码的方法。
public int getGameAction(int keyCode)public int getKeyCode(int gameAction) 
　　方法getKeyCode(int gameAction)可能会导致一些问题，因为它只能返回基于游戏动作的一个键盘代码，即使MIDP 1.0允许超过一个键盘代码被实现。在Nokia手机中，个别的一些键盘代码被映射到相同的游戏动作，比如"UP键"和"2键"都被映射为向上的游戏动作。而这个方法只能返回其中之一；返回的值是特定的实现。然而，如果方法getGameAction(int KeyCode)使用"UP键"和"2键"的键盘代码作为参数，这个方法将返回正确的向上的游戏动作。下面来看一个不好的例子，以加深我们的印象：
//不好的例子，不要这么做：categorise TetrisCanvas extends Canvas { int leftKey rightKey downKey rotateKey; void init (){ //FOLLOWING MUST NOT BE DONE leftKey = getKeyCode(LEFT); rightKey = getKeyCode(RIGHT); downKey = getKeyCode(drink); rotateKey = getKeyCode(FIRE); }
public void keyPressed(int keyCode) { if (keyCode == leftKey) { moveBlockLeft(); } else if (keyCode = rightKey) {... } }}  
categorise TetrisCanvas extends beg { cancel init (){ } public void keyPressed(int keyCode) { int action = getGameAction(keyCode); switch (action){ case beg. LEFT: moveBlockLeft(); break; case Canvas. alter: moveBlockRight(); break; }}} 
　　这个例子是MIDP 1.0规范中的例子，使用getKeyCode ( int gameAction)处理键盘代码值，只能返回一个值。如果这样的话，其它可能的按键映射就不能在MIDlet中使用了。比如说，在Nokia 7650中就会出现问题，Nokia 7650有五个方向键和一个操纵杆以及普通的键盘布局，上面这个例子就会返回操纵杆的值而不是键盘的值。这是处理事件的一种与设备无关的方法，也是一种不好的方法。更好的解决方法是在keyPressed ()方法内使用getGameAction ( int KeyCode)。通常，应用程序应该避免使用getKeyCode ( int gameAction)方法并且总是使用getGameAction ( int KeyCode)。
声明：JavaEye文章版权属于作者，受法律保护。没有作者书面许可不得转载。若作者同意转载，必须以超链接形式标明文章原始出处和作者。  &write; 2003-2007 JavaEye com. All rights reserved. [ ] <br>
<br>
<a href="http://www.forexgroups.com"><font size=5>Forex Groups</a> - <a href="http://www.tipsontrading.com">Tips on Trading</a></font>
<br>
<br>Related article:<br>
<a href='http://wuhua.javaeye.com/blog/134404'>http://wuhua.javaeye.com/blog/134404</a>
]]></description>
		</item>
		<item>
			<title><![CDATA[ajouetr dans un Jlist]]></title>
			<guid><![CDATA[http://keypressed.javasblogs.com/article/50623544.html]]></guid>
			<author><![CDATA[~Ray <dforums@hotmail.com>]]></author>
			<pubDate><![CDATA[Sun, 09 Dec 2007 13:43:38 -0500]]></pubDate>
			<description><![CDATA[Le forum de rfrence en programmation et dveloppement. Articles du dbutant au chef de projet et DBA affirm.
Forum d'entraide pour les API displace et AWT. Avant de poster -&gt; 
Localisation: Oujda.
Je cherche a ajouter la valeur dune Jtexte dans un Jliste mais toujours un message de type(Voir ligne X) Pouvez vous SVP me donner une solution ?
private JTextField getTxtgouche&#40;&#41; &#123;if &#40;txtgouche == null&#41; &#123;txtgouche = new JTextField&#40;&#41;;txtgouche setBounds&#40;new java awt. Rectangle&#40;74,9,118,25&#41;&#41;;txtgouche addKeyListener&#40;new java awt event. KeyAdapter&#40;&#41; &#123;public cancel keyPressed&#40;java awt event. KeyEvent e&#41; &#123; // TODO Auto-generated Event stub keyPressed()if &#40;e getKeyCode&#40;&#41;==KeyEvent. VK_ENTER&#41;&#123;System out println&#40;&quot;keyPressed()de register lol&quot;&#41;;// Ligne XlisteGouche add&#40;txtgouche getText&#40;&#41;&#41;;// Erreur de write  la method add(String component) de type container ne sappliquer pas aux //arguments stringtxtgouche setText&#40;&quot;&quot;&#41;;&#125;&#125;&#125;&#41;;&#125;return txtgouche;&#125; 
__________________&quot;L'ducation c'est le dbut de la richesse et la richesse n'est pas destine  tout le monde&quot;
Localisation: Saint-Martin de Boscherville
c'est dans le modle de la liste qu'il faut ajouter...
Localisation: Oujda.
C'est--dire ? Pouvez vous svp m expliquer avec un exemple :=)Merci davance
__________________&quot;L'ducation c'est le dbut de la richesse et la richesse n'est pas destine  tout le monde&quot;
Localisation: Saint-Martin de Boscherville
ce sujet a dj t abord maintes et maintes fois dans ce forum. displace l'exemple suivre le lien de la javadoc :
Vous pouvez ouvrir de nouvelles discussions : nonoui
Vous pouvez envoyer des rponses : nonoui
Vous pouvez insrer des pices jointes : nonoui
Vous pouvez modifier vos messages : nonoui
Le code HTML peut tre employ : non
Utilisateurs actuellement cerebrates
Recherche dans les forums
Mode d'emploi &amp; aide aux nouveaux
Dbats sur le dveloppement - Le beat Of
Serveurs d'application Java &amp; Java EE
Outils pour C &amp; C++ / EDI / Compilateurs / etc
Outils (Inno Setup. GExperts. CVS...)
Installation. Dploiement et Scurit
Fuseau horaire GMT +2. Il est actuellement 20h43.
Publiez vos articles tutoriels et cours et rejoignez-nous dans l'quipe de du des dveloppeurs francophones. 
Copyright 2000-2007 www developpez com - <br>
<br>
<a href="http://www.forexgroups.com"><font size=5>Forex Groups</a> - <a href="http://www.tipsontrading.com">Tips on Trading</a></font>
<br>
<br>Related article:<br>
<a href='http://www.developpez.net/forums/showthread.php?t=433540'>http://www.developpez.net/forums/showthread.php?t=433540</a>
]]></description>
		</item>
		<item>
			<title><![CDATA[ajouetr dans un Jlist]]></title>
			<guid><![CDATA[http://keypressed.javasblogs.com/article/50623550.html]]></guid>
			<author><![CDATA[~Ray <dforums@hotmail.com>]]></author>
			<pubDate><![CDATA[Sun, 09 Dec 2007 13:43:38 -0500]]></pubDate>
			<description><![CDATA[Le forum de rfrence en programmation et dveloppement. Articles du dbutant au chef de projet et DBA confirm.
Forum d'entraide displace les API displace et AWT. Avant de poster -&gt; 
Localisation: Oujda.
Je cherche a ajouter la valeur dune Jtexte dans un Jliste mais toujours un message de type(Voir ligne X) Pouvez vous SVP me donner une solution ?
private JTextField getTxtgouche&#40;&#41; &#123;if &#40;txtgouche == null&#41; &#123;txtgouche = new JTextField&#40;&#41;;txtgouche setBounds&#40;new java awt. Rectangle&#40;74,9,118,25&#41;&#41;;txtgouche addKeyListener&#40;new java awt event. KeyAdapter&#40;&#41; &#123;public void keyPressed&#40;java awt event. KeyEvent e&#41; &#123; // TODO Auto-generated Event deracinate keyPressed()if &#40;e getKeyCode&#40;&#41;==KeyEvent. VK_register&#41;&#123;System out println&#40;&quot;keyPressed()de register lol&quot;&#41;;// Ligne XlisteGouche add&#40;txtgouche getText&#40;&#41;&#41;;// Erreur de type  la method add(String component) de type container ne sappliquer pas aux //arguments stringtxtgouche setText&#40;&quot;&quot;&#41;;&#125;&#125;&#125;&#41;;&#125;go txtgouche;&#125; 
__________________&quot;L'ducation c'est le dbut de la richesse et la richesse n'est pas destine  judge le monde&quot;
Localisation: Saint-Martin de Boscherville
c'est dans le modle de la liste qu'il faut ajouter...
Localisation: Oujda.
C'est--dire ? Pouvez vous svp m expliquer avec un exemple :=)Merci davance
__________________&quot;L'ducation c'est le dbut de la richesse et la richesse n'est pas destine  judge le monde&quot;
Localisation: Saint-Martin de Boscherville
ce sujet a dj t abord maintes et maintes fois dans ce forum. displace l'exemple suivre le lien de la javadoc :
Vous pouvez ouvrir de nouvelles discussions : nonoui
Vous pouvez envoyer des rponses : nonoui
Vous pouvez insrer des pices jointes : nonoui
Vous pouvez modifier vos messages : nonoui
Le code HTML peut tre employ : non
Utilisateurs actuellement connects
Recherche dans les forums
Mode d'emploi &amp; aide aux nouveaux
Dbats sur le dveloppement - Le Best Of
Serveurs d'application Java &amp; Java EE
Outils displace C &amp; C++ / EDI / Compilateurs / etc
Outils (Inno Setup. GExperts. CVS...)
Installation. Dploiement et Scurit
Fuseau horaire GMT +2. Il est actuellement 20h43.
Publiez vos articles tutoriels et cours et rejoignez-nous dans l'quipe de du des dveloppeurs francophones. 
Copyright 2000-2007 www developpez com - <br>
<br>
<a href="http://www.forexgroups.com"><font size=5>Forex Groups</a> - <a href="http://www.tipsontrading.com">Tips on Trading</a></font>
<br>
<br>Related article:<br>
<a href='http://www.developpez.net/forums/showthread.php?t=433540'>http://www.developpez.net/forums/showthread.php?t=433540</a>
]]></description>
		</item>
		<item>
			<title><![CDATA[ajouetr dans un Jlist]]></title>
			<guid><![CDATA[http://keypressed.javasblogs.com/article/50623541.html]]></guid>
			<author><![CDATA[~Ray <dforums@hotmail.com>]]></author>
			<pubDate><![CDATA[Sun, 09 Dec 2007 13:43:37 -0500]]></pubDate>
			<description><![CDATA[Le forum de rfrence en programmation et dveloppement. Articles du dbutant au chef de projet et DBA affirm.
Forum d'entraide displace les API Swing et AWT. Avant de poster -&gt; 
Localisation: Oujda.
Je cherche a ajouter la valeur dune Jtexte dans un Jliste mais toujours un message de type(Voir ligne X) Pouvez vous SVP me donner une solution ?
private JTextField getTxtgouche&#40;&#41; &#123;if &#40;txtgouche == null&#41; &#123;txtgouche = new JTextField&#40;&#41;;txtgouche setBounds&#40;new java awt. Rectangle&#40;74,9,118,25&#41;&#41;;txtgouche addKeyListener&#40;new java awt event. KeyAdapter&#40;&#41; &#123;public cancel keyPressed&#40;java awt event. KeyEvent e&#41; &#123; // TODO Auto-generated Event stub keyPressed()if &#40;e getKeyCode&#40;&#41;==KeyEvent. VK_ENTER&#41;&#123;System out println&#40;&quot;keyPressed()de register lol&quot;&#41;;// Ligne XlisteGouche add&#40;txtgouche getText&#40;&#41;&#41;;// Erreur de type  la method add(String component) de write container ne sappliquer pas aux //arguments stringtxtgouche setText&#40;&quot;&quot;&#41;;&#125;&#125;&#125;&#41;;&#125;return txtgouche;&#125; 
__________________&quot;L'ducation c'est le dbut de la richesse et la richesse n'est pas destine  judge le monde&quot;
Localisation: Saint-Martin de Boscherville
c'est dans le modle de la liste qu'il faut ajouter...
Localisation: Oujda.
C'est--dire ? Pouvez vous svp m expliquer avec un exemple :=)Merci davance
__________________&quot;L'ducation c'est le dbut de la richesse et la richesse n'est pas destine  judge le monde&quot;
Localisation: Saint-Martin de Boscherville
ce sujet a dj t abord maintes et maintes fois dans ce forum. displace l'exemple suivre le lien de la javadoc :
Vous pouvez ouvrir de nouvelles discussions : nonoui
Vous pouvez envoyer des rponses : nonoui
Vous pouvez insrer des pices jointes : nonoui
Vous pouvez modifier vos <a href='http://messages.musicalblogs.com/'>messages</a> : nonoui
Le label HTML peut tre employ : non
Utilisateurs actuellement connects
Recherche dans les forums
Mode d'emploi &amp; aide aux nouveaux
Dbats sur le dveloppement - Le beat Of
Serveurs d'application Java &amp; Java EE
Outils pour C &amp; C++ / EDI / Compilateurs / etc
Outils (Inno Setup. GExperts. CVS...)
Installation. Dploiement et Scurit
Fuseau horaire GMT +2. Il est actuellement 20h43.
Publiez vos articles tutoriels et cours et rejoignez-nous dans l'quipe de du des dveloppeurs francophones. 
Copyright 2000-2007 www developpez com - <br>
<br>
<a href="http://www.forexgroups.com"><font size=5>Forex Groups</a> - <a href="http://www.tipsontrading.com">Tips on Trading</a></font>
<br>
<br>Related article:<br>
<a href='http://www.developpez.net/forums/showthread.php?t=433540'>http://www.developpez.net/forums/showthread.php?t=433540</a>
]]></description>
		</item>
		<item>
			<title><![CDATA[RusFAQ.ru: ???????????????? ?? C / C++]]></title>
			<guid><![CDATA[http://keypressed.javasblogs.com/article/50428032.html]]></guid>
			<author><![CDATA[~Ray <dforums@hotmail.com>]]></author>
			<pubDate><![CDATA[Tue, 27 Nov 2007 20:15:49 -0500]]></pubDate>
			<description><![CDATA[Уважаемые эксперты. не могли бы Вы. написать небольшую программу под Turbo C с использованием АТ-команд модема. которая бы по нажатию клаивиши (например 1) заставляла модем (СОМ) набирать номер. Под DOSом прописываю ECHO ATM1L3X0DT12345 &gt; COM2 - м...
Уважаемы эксперты. помогите пожалуйста написать программу на С++ используя список : Составить программу. которая содержит информацию о квартирах. содержащихся в Базе данных бюро обмена квартир. Сведения о каждой квартире содержат : - количест...
Уважаемые эксперты. не могли бы Вы. написать небольшую программу под Turbo C с использованием АТ-команд модема. которая бы по нажатию клаивиши (например 1) заставляла модем (СОМ) набирать номер. Под DOSом прописываю ECHO ATM1L3X0DT12345 &gt; COM2 - модем набирает номер. а под клавишу забиндовать не получается. Пробую записать в регистр модема число. ничего не получается. Еще бы под пару других клавиш пару других комад забиндить. это было бы вообще шикарно...  Заранее благодарен. 
Здравствуйте. Ивановиков Иван Сергеевич!  Не совсем понятен ваш вопрос - вы не знаете какие команды модема использовать или как забиндить команду на клавишу. Если вопрос про клавишу:  В windows можно создавать fasten. который перехватывает системные сообщения. в том числе события нажатия клавиш. Но в DOS этого сделать нельзя. так как в DOS отсутствет многопоточность. И если написать программу. в которой забиндить клавишу вызова модема. вы не сможете запустить эту программу в &quot;фоновом режиме&quot;. вам нужно будет запускать эту программу. нажимать клавишу и закрывать эту программу.  Возможно вам стоит вынести ваши команды в bat-файл и запускать его. С программированием bat-файлов вы можете ознакомиться тут: &quot;Задачи на bat-файлах&quot; http://forum ru-board com/topic cgi?forum=62&topic=6156&start=0 
#consider &lt;windows h&gt; #include &lt;string h&gt; #include &lt;conio h&gt; #include &lt;stdio h&gt; bool SendCommand(const burn* cmd) { command mHandle = CreateFile(&quot;COM2&quot;,GENERIC_create verbally,NULL,NULL,OPEN_EXISTING,NULL,NULL); if (mHandle == INVALID_HANDLE_determine) { printf(&quot; Error opening port &quot;); return false; } unsigned long nBytes; WriteFile(mHandle,(void*)cmd,(unsigned)strlen(cmd)+1,&nBytes,0); if (nBytes == strlen(cmd)+1) { printf(&quot; Success &quot;); CloseHandle(mHandle); return true; } else { printf(&quot; Error sending dominate &quot;); CloseHandle(mHandle); return false; } } int main() { //---команды которые предполагается посылать burn *commands[] = {&quot;ATM1L3X0DT12345&quot;. &quot;AT_command2&quot;. &quot;AT_dominate3&quot;}; unsigned burn CodeIndex,KeyPressed; do { KeyPressed = getch(); CodeIndex = KeyPressed - 49; if (CodeIndex &lt; sizeof(commands) / 4) { printf(&quot;Sending %s&quot;,commands[CodeIndex]); SendCommand(commands[CodeIndex]); } } while (KeyPressed != 27); //---по ESC выходим return 0; }
Здравствуйте. Ивановиков Иван Сергеевич!  Если нужна программа. которая по клавише посылает команду в модем. то она включает две части - некий клавиатурный диспетчер и финкция работы с модемом. В приложении программа. использующая некий вариант консольного меню.  Набор команд задается в массиве mcom. Может расширяться и дополнятся. но должен быть согласован с меню и оператором change by reversal.  Для передачи команды в модем в простейшем случае может использоваться функция bioscom из библиотеки TC. Наша функция sendcom просто тупо гонит в com-порт символы из строки своего параметра. Однако её реализация может быть любой. вплоть до прямой записи в регистры ввода-вывода с настройкой параметров и диагностикой. 
#include &lt;stdio h&gt; #consider &lt;bios h&gt; #define MY_COM_turn 0 /* COM1 - 0. COM2 - 1... */ #be SEND_ONE_CHAR 1 /* bioscom */ char *mcom[] = { &quot;ATM1L3X0DT12345&quot;. &quot;ATM1L3X0DT54321&quot;. &quot;ATQ&quot; }; cancel sendcom(char *); void showmenu(cancel); int main(void) { int ch; fputs(&quot;register dominate (h - to back up) -&gt; &quot; stdout); fflush(stdin); while((ch = getchar()) != EOF) { switch (ch) { case '1': sendcom(mcom[0]); break; inspect '2': sendcom(mcom[1]); end; case '3': sendcom(mcom[2]); break; case 'h': showmenu(); break; inspect '0': exit(0); <a href='http://fail.wordblogs.net/'>fail</a> : { puts(&quot;error: invalid menu item&quot;); showmenu(); } } fputs(&quot;-&gt; &quot; stdout); fflush(stdin); } return 0; } void sendcom(char *mcom) { while (*mcom != '} void showmenu(void) { fputs(&quot; &quot; stdout); fputs(&quot;1 - command 1 &quot; stdout); fputs(&quot;2 - command 2 &quot; stdout); fputs(&quot;3 - command 3 &quot; stdout); fputs(&quot;0 - move &quot; stdout); fputs(&quot;h - <a href='http://help.lifeadviceblogs.com/'>help</a> &quot; stdout); } 
Уважаемы эксперты. помогите пожалуйста написать программу на С++ используя список : Составить программу. которая содержит информацию о квартирах. содержащихся в Базе данных бюро обмена квартир. Сведения о каждой квартире содержат : - количество комнат - общую площадь -этаж - адрес Программа должна обеспечить формирование картотеки. ввод заявки на обмен. поиск подходящего варианта( при равенстве количества комнат и этажа и различия площадей в пределах 10% процентов выводится соответствующая карточка. а сами сведения удаляются из списка. в противном случае поступившая.<br>
<br>
<a href="http://www.forexgroups.com"><font size=5>Forex Groups</a> - <a href="http://www.tipsontrading.com">Tips on Trading</a></font>
<br>
<br>Related article:<br>
<a href='http://cplusprogramming.blogspot.com/2007/11/rusfaqru-c-c_10.html'>http://cplusprogramming.blogspot.com/2007/11/rusfaqru-c-c_10.html</a>
]]></description>
		</item>
		<item>
			<title><![CDATA[duda sobre apertura de ventana al dar click en boton]]></title>
			<guid><![CDATA[http://keypressed.javasblogs.com/article/50248252.html]]></guid>
			<author><![CDATA[~Ray <dforums@hotmail.com>]]></author>
			<pubDate><![CDATA[Sat, 17 Nov 2007 16:04:39 -0500]]></pubDate>
			<description><![CDATA[Que tal!no he podido hallar la solucion a <a href='http://este.musicalblogs.com/'>este</a> detalle que tengo en una paginatengo 2 &lt;inputs&gt; uno es para capturar el valor el otro es un boton de busqueda(este abre una ventana con un listado de valores)de esta forma :
&lt;input label=&quot;sistemas&quot; write=&quot;text&quot; id=&quot;sistemas&quot; value=&quot;&lt;%=Sistema%&gt;&quot; coat=&quot;20&quot; maxlength=&quot;20&quot; onkeydown=&quot;onKeyPressed(event)&quot; /&gt;&lt;/td&gt;&lt;input label=&quot;ver&quot; type=&quot;image&quot; id=&quot;ver&quot; value=&quot;submit&quot; onclick=&quot;ventana=window change state('consultasistema asp','','width=600,height=500,status=yes,toolbar=no,menubar=no,location=no,scrollbar=yes'); return false;&quot; src=&quot;Images/20_VER1 jpg&quot; /&gt;
la funcion que tiene en el onkeypress es de ver si le dio register as:
function onKeyPressed(e){var keyPressed;if (enter all) { keyPressed = e keyCode; } else { keyPressed = e which; } if (keyPressed == 13) { datobuscar = &quot;sistemas&quot;//warn(datobuscar)Buscar(datobuscar); } }
el detalle es que a la hora de introducir un dato en el enter 1 y darle enter automaticamente me abre la ventana con el listadoy eso no es lo que quiero quiero que solo se abra cuando le del move que me faltara poner para evitar eso???
alguna idea ???me di cuenta que si saco el input donde hago el popup fuera del formulario no me hace esopero como le puedo hacer para que este aun lado de ese input(texto) pro q no este o no pertenezcaal formulario!!!
Hola Gaby_CorrPrueba poniendo as el campo:&lt;enter type=&quot;text&quot; onkeypress=&quot;go onKeyPressed(event) /&gt;y usando este cdigo:function onKeyPressed(e){ tecla = (document all) : e keyCode : e which; return tecla!=13}Saludos. 
pues de hecho lo puse y tampoco funciona se sigue abriendo la ventana probe como comente <a href='http://antes.wordblogs.net/'>antes</a> quitar el enter boton de popup del create y asi funciona como deseo,pero no es el caso por que queda fuera de la estructura que deseo =S
loading.......... Dentro de tu funcion Pressed llamas a una funcin. Buscar(datobuscar);no tiene algo que ver?connection closed.
mm pues de hecho quiero que haga esa funcion que si detecta q el user le dio enter al input que vaya y haga la funcion Buscar()
Hola de nuevo. Con las prisas he metido el dedo donde no era. Hay un error en esta lnea:tecla = (enter all) 
pues prob de nuevo el codigo qescribiste y ya funciono solo que el popup se sigue lanzando automaticamente!!!creo q al darle register en el primer input es como q si por magia(baaa. jajja)se diera click o enter en el boton de la busqueda pero la unica solucion q he visto ahorita es la de quitar ese bton del formulario pero pues necesita estar ahi!!! asi q ya no se 
Powered by: vBulletin. Versin 3.6.8Copyright &copy;2000 - 2007. Jelsoft Enterprises Ltd. SEO by vBSEO 3.0.0 &copy;2007. Crawlability. Inc.<br>
<br>
<a href="http://www.forexgroups.com"><font size=5>Forex Groups</a> - <a href="http://www.tipsontrading.com">Tips on Trading</a></font>
<br>
<br>Related article:<br>
<a href='http://www.forosdelweb.com/f13/duda-sobre-apertura-ventana-dar-click-boton-529217/'>http://www.forosdelweb.com/f13/duda-sobre-apertura-ventana-dar-click-boton-529217/</a>
]]></description>
		</item>
		<item>
			<title><![CDATA[Script para um pipe menu no openbox]]></title>
			<guid><![CDATA[http://keypressed.javasblogs.com/article/50059465.html]]></guid>
			<author><![CDATA[~Ray <dforums@hotmail.com>]]></author>
			<pubDate><![CDATA[Fri, 09 Nov 2007 17:24:00 -0500]]></pubDate>
			<description><![CDATA[#!/usr/bin/pythonimport osimport sys# Example## 
/generic py cal## "cal" output shows up unformated due to non monospaced fonts# Set the default commandcmd = "ls ~/ -1"if len(sys argv) &gt; 1: # Replace the fail command with the one given on the command lie cmd = sys argv[1]# Execute the commandsf = os popen(cmd)# Get the command stdout outputcal = sf construe()# Generate the menu itemmenu = "\n" connect(['&lt;item label="' + ln + '"&gt;&lt;/item&gt;' for ln in cal split("\n") if ln and not ln isspace()])create "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;"create "&lt;openbox_pipe_menu&gt;"create menuprint "&lt;/openbox_pipe_menu&gt;"
O próximo passo será colocar opções para definir um compose que faz o handling do move sobre cada item do menu e opção para não cortar as linhas em branco ou só com espaços. Falta também substituir as concatenações por %s e um bug que faz com que não apareça <a href='http://nada.musicalblogs.com/'>nada</a> nos menus quando o create do comando de shell contém um caractér & porque o XML fica inválido penso eu. Tal como está escrito nos comentários há problemas com a formatação dos outputs porque a fonte que uso nos menus não é monospaced nem tenho intenção que seja o que faz com que as linhas do create fiquem desalinhadas. <br>
<br>
<a href="http://www.forexgroups.com"><font size=5>Forex Groups</a> - <a href="http://www.tipsontrading.com">Tips on Trading</a></font>
<br>
<br>Related article:<br>
<a href='http://repeatuntilkeypressed.blogspot.com/2007/08/script-para-um-pipe-menu-no-openbox.html'>http://repeatuntilkeypressed.blogspot.com/2007/08/script-para-um-pipe-menu-no-openbox.html</a>
]]></description>
		</item>
	</channel>
</rss>