Search Results

Search found 2671 results on 107 pages for 'cool rr'.

Page 10/107 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Jar File doesn't work (It did not launch the application)

    - by Mr CooL
    Previously, I have no problem in running the JAR file generated by NetBeans. However, I encountered the problem now all of a sudden. When I click on the jar, it did not launch the application as if nothing is clocked. But, it can be run from the project. And also, the size of the Jframe for desktop Java application cannot be set from the NetBeans code also. When it runs, the size of the window different from in the designer. Any help please.

    Read the article

  • String replaceAll method (Java)

    - by Mr CooL
    I have following problem, Code: String a="Yeahh, I have no a idea what's happening now!"; System.out.println(a); a=a.replaceAll("a", ""); System.out.println(a); Before removing 'a', result: Yeahh, I have no a idea what's happening now! Actual Result: After removing 'a', result: Yehh, I hve no ide wht's hppening now! Desired Result: Yeahh, I have no idea what's happening now! Anyone can gimme some advices to achieve my desired result?

    Read the article

  • How to recive more than 65000 bytes in C++ socket using recv()

    - by Mr.Cool
    I am developing a client server application (TCP) in Linux using C++. I want to send more than 65,000 bytes at the same time. In TCP, the maximum packet size is 65,635 bytes only. How can I send the entire bytes without loss? Following is my code at server side. //Receive the message from client socket if((iByteCount = recv(GetSocketId(), buffer, MAXRECV, MSG_WAITALL)) > 0) { printf("\n Received bytes %d\n", iByteCount); SetReceivedMessage(buffer); return LS_RESULT_OK; } If I use MSG_WAITALL it takes a long time to receive the bytes so how can I set the flag to receive more than 10 lakhs bytes at time.

    Read the article

  • Java FileFilter

    - by Mr CooL
    public class DocFilter extends FileFilter { public boolean accept(File f) { if (f.isDirectory()) { return true; } String extension = Utils.getExtension(f); if (extension != null) { if (extension.equals(Utils.doc) || extension.equals(Utils.docx) ) { return true; } else { return false; } } return false; } //The description of this filter public String getDescription() { return "Just Document Files"; } } Netbeans compiler warned with the error, "No interface expected here" for above code Anyone has idea what was the problem?? I tried changing the 'extends' to 'implements', however, it didn't seem to work that way. and when I changed to implements, the following code cannot work, chooser.addChoosableFileFilter(new DocFilter()); and with this error, "method addChoosableFileFilter in class javax.swing.JFileChooser cannot be applied to given types required: javax.swing.filechooser.FileFilter" Can anyone help on this? Thanks..

    Read the article

  • Parse Formulae in .NET

    - by Cool
    I am trying to parse formula in C# language like "5*3 + 2" "(3*4 - 2)/5" Is it possible to do in C# or scripts like VBScript, JavaScript (which will be called in c# program).

    Read the article

  • Simple PHP form Validation and the validation symbols

    - by Cool Hand Luke UK
    Hi have some forms that I want to use some basic php validation (regular expressions) on, how do you go about doing it? I have just general text input, usernames, passwords and date to validate. I would also like to know how to check for empty input boxes. I have looked on the interenet for this stuff but I haven't found any good tutorials. Thanks

    Read the article

  • IE 6 dropdown selection area too narrow

    - by Cool Hand Luke UK
    Hi, I have a dropdown menu with the width set to 142px however the selection area when you drop down the menu needs to be larger as it has text that exceeds this width. Firefox (and most modern browsers) is clever and extends the selection area to fit in this text. However IE 6 and unchecked newer versions of IE do not show this text and keep the selection area the same width as the dropdown unclicked. The problem lies here, how can I get IE to extend the selection area where you click the selection you want without increasing the width of the dropdown area with out the dropdown selection showing. Hope that makes sense. :D cheers (DEATH TO IE)

    Read the article

  • Set PdfPTable columns width iText

    - by Mr CooL
    I've a PdfPTable created in my Java program, Is there any way to actually set the width of specific column for the PdfPTable????? For instance, First column to be 5% width, second column to be 20% and etc. Urgent help please if anyone knows the way. Thanks in advance.

    Read the article

  • one subdomain as cname for another domain, can i have different custom 404 pages

    - by lucky cool
    Actually I have a domain - domainone.com I have created a subdomain cname of anoter domain as abc.domaintwo.com - CNAME as - domainone.com so that I can use the js and css files e.g domainone.com/js/jquery.js files as abc.domaintwo.com/js/jquery.js SO Far everything is FINE, no issues at all. Problem: I have a custom 404 page for domainone.com and now when that abc.domaintwo.com goes 404 same page appears which i don't want. Any help is appreciated. Htaccess of domainone.com: ErrorDocument 404 /404/ All i want is to have different 404 for both..... Notes: Don't have access to shell for symlinks or alias as I am on shared hosting.

    Read the article

  • XPath select specific child elements

    - by Cool
    Hi, If I have XML tree like this- <Parent> <Image Name="a"/> <Image Name="b"/> <Child> <Image Name="c"/> <Image Name="d"/> </Child> <Image Name="e"/> </Parent> I want to select all <Image\> nodes except those listed inside <Child\> node. Currently I am using query to select all Image nodes, - xElement.XPathSelectElements("//ns:Image", namespace); Thanks in advance.

    Read the article

  • Cancel UITouch Events When View Covered By Modal UIViewController

    - by kkrizka
    Hi there, I am writing an application where the user has to move some stuff on the screen using his fingers and drop them. To do this, I am using the touchesBegan,touchesEnded... function of each view that has to be moved. The problem is that sometimes the views are covered by a view displayed using the [UIViewController presentModalViewController] function. As soon as that happens, the UIView that I was moving stops receiving the touch events, since it was covered up. But there is no event telling me that it stopped receiving the events, so I can reset the state of the moved view. The following is an example that demonstrates this. The functions are part of a UIView that is being shown in the main window. It listens to touch events and when I drag the finger for some distance, it presents a modal view that covers everything. In the Run Log, it prints what touch events are received. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@"touchesBegan"); touchStart=[[touches anyObject] locationInView:self]; } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { CGPoint touchAt=[[touches anyObject] locationInView:self]; float xx=(touchAt.x-touchStart.x)*(touchAt.x-touchStart.x); float yy=(touchAt.y-touchStart.y)*(touchAt.y-touchStart.y); float rr=xx+yy; NSLog(@"touchesMoved %f",rr); if(rr > 100) { NSLog(@"Show modal"); [viewController presentModalViewController:[UIViewController new] animated:NO]; } } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@"touchesEnded"); } - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@"touchesCancelled"); } But when I test the application and trigger the modal dialog to be displayed, the following is the output in the Run Log. [Session started at 2010-03-27 16:17:14 -0700.] 2010-03-27 16:17:18.831 modelTouchCancel[2594:207] touchesBegan 2010-03-27 16:17:19.485 modelTouchCancel[2594:207] touchesMoved 2.000000 2010-03-27 16:17:19.504 modelTouchCancel[2594:207] touchesMoved 4.000000 2010-03-27 16:17:19.523 modelTouchCancel[2594:207] touchesMoved 16.000000 2010-03-27 16:17:19.538 modelTouchCancel[2594:207] touchesMoved 26.000000 2010-03-27 16:17:19.596 modelTouchCancel[2594:207] touchesMoved 68.000000 2010-03-27 16:17:19.624 modelTouchCancel[2594:207] touchesMoved 85.000000 2010-03-27 16:17:19.640 modelTouchCancel[2594:207] touchesMoved 125.000000 2010-03-27 16:17:19.641 modelTouchCancel[2594:207] Show modal Any suggestions on how to reset the state of a UIView when its touch events are interrupted by a modal view?

    Read the article

  • groovy compile error

    - by Bunny Rabbit
    class x{ public static void main(String[] args){ String x="<html><head></head></html>"; String arr[]=x.split("<head>"); String script="hi"; x=arr[0]+"<head>"+script+arr[1]; System.out.println(x); } } the above code when compiled as a java file compiles fine but when used a s a groovy file spits the error : org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: D:\Garage\groovy-binary-1.7.1\groovy-1.7.1\bin\x.groovy: 4: Apparent variable 'a rr' was found in a static scope but doesn't refer to a local variable, static fi eld or class. Possible causes: You attempted to reference a variable in the binding or an instance variable fro m a static context. You misspelled a classname or statically imported field. Please check the spelli ng. You attempted to use a method 'arr' but left out brackets in a place not allowed by the grammar. @ line 4, column 10. String arr[]=x.split(""); ^ D:\Garage\groovy-binary-1.7.1\groovy-1.7.1\bin\x.groovy: 6: Apparent variable 'a rr' was found in a static scope but doesn't refer to a local variable, static fi eld or class. Possible causes: You attempted to reference a variable in the binding or an instance variable fro m a static context. You misspelled a classname or statically imported field. Please check the spelli ng. You attempted to use a method 'arr' but left out brackets in a place not allowed by the grammar. @ line 6, column 5. x=arr[0]+""+script+arr[1]; ^ D:\Garage\groovy-binary-1.7.1\groovy-1.7.1\bin\x.groovy: 6: Apparent variable 'a rr' was found in a static scope but doesn't refer to a local variable, static fi eld or class. Possible causes: You attempted to reference a variable in the binding or an instance variable fro m a static context. You misspelled a classname or statically imported field. Please check the spelli ng. You attempted to use a method 'arr' but left out brackets in a place not allowed by the grammar. @ line 6, column 28. x=arr[0]+""+script+arr[1]; ^ 3 errors D:\Garage\groovy-binary-1.7.1\groovy-1.7.1\bin

    Read the article

  • reading a string with spaces with sscanf

    - by SDLFunTimes
    For a project I'm trying to read an int and a string from a string. The only problem is sscanf appears to break reading an %s when it sees a space. Is there anyway to get around this limitation? Here's an example of what I'm trying to do: #include<stdio.h> #include<stdlib.h> int main(int argc, char** argv) { int age; char* buffer; buffer = malloc(200 * sizeof(char)); sscanf("19 cool kid", "%d %s", &age, buffer); printf("%s is %d years old\n", buffer, age); return 0; } What it prints is: "cool is 19 years old" where I need "cool kid is 19 years old". Does anyone know how to fix this?

    Read the article

  • What is the best API/framework/platform you ever worked with?

    - by Yuval A
    Most programming is done on an existing framework or platform, and using various APIs which make your programming job much more convenient. It can either be a superbly designed set of APIs, or a nice framework which you managed to get really cool things done really fast. All answers should give concrete examples of why that framework is so awesome, or examples of cool stuff you did with it. What existing framework really inspired you to do some awesome work? I know this is subjective, but I think we can get some cool ideas from this question. Please be easy on the "close" link :) Also - commun-ikified in advance.

    Read the article

  • CodeRush Tricks of the Trade

    - by dr. evil
    I was using CodeRush quite while ago and now I'm planning to use it again. I've install the trial but I forgot all cool features except Alt + Home (drop a marker). And when you don't know some cool tricks it's really like burning money (since it's not cheap for personal use) What do you like about it? What are your best features? My best feature is marker: Alt + Home (and use escape to go back) P.S Dear Devxpress, if you think I helped you by asking this question I can accept some donations, a free license of CodeRush would be nice! Currently What I like most ps/pi etc. shortcut to create properties cc to create constructors pressing tab to navigate between the references F12 to find references in new cool window Ctrl + Shift + . for recent files Ctrl + Shift + Q for jumping to any function / class fe/fi for "for loops"

    Read the article

  • Image re sizing not working after rotation in Html5 canvas

    - by Deepu the Don
    In my HTML 5 + Javascript application, we can drag, re size and rotate image in Html 5 canvas. But after doing rotation, re sizing is not working. (I think it i related to finding dx,dy,not sure). Please help me to fix the code given below. Thanks in advance. <!doctype html> <html> <head> <style> #canvas{ border:red dashed #ccc; } </style> <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> <script> $(function(){ var canvas=document.getElementById("canvas"),ctx=canvas.getContext("2d"),canvasOffset=$("#canvas").offset(); var offsetX=canvasOffset.left,offsetY=canvasOffset.top,startX,startY,isDown=false,pi2=Math.PI*2; var resizerRadius=8,rr=resizerRadius*resizerRadius,draggingResizer={x:0,y:0},imageX=50,imageY=50; var imageWidth,imageHeight,imageRight,imageBottom,draggingImage=false,startX,startY,doRotation=false; var r=0,rotImg = new Image(); rotImg.src="rotation.jpg"; var img=new Image(); img.onload=function(){ imageWidth=img.width; imageHeight=img.height; imageRight=imageX+imageWidth; imageBottom=imageY+imageHeight; w=img.width/2; h=img.height/2; draw(true,false); } img.src="https://dl.dropboxusercontent.com/u/139992952/stackoverflow/facesSmall.png"; function draw(withAnchors,withBorders){ ctx.fillStyle="black"; ctx.clearRect(0,0,canvas.width,canvas.height); ctx.save(); ctx.translate(imageX,imageY); ctx.translate(imageWidth/2,imageHeight/2); ctx.rotate(r); ctx.translate(-imageX,-imageY); ctx.translate(-imageWidth/2,-imageHeight/2); ctx.drawImage(img,0,0,img.width,img.height,imageX,imageY,imageWidth,imageHeight); ctx.restore(); if(withAnchors){ drawDragAnchor(imageX,imageY); drawDragAnchor(imageRight,imageY); drawDragAnchor(imageRight,imageBottom); drawDragAnchor(imageX,imageBottom); } if(withBorders){ ctx.save(); ctx.translate(imageX,imageY); ctx.translate(imageWidth/2,imageHeight/2); ctx.rotate(r); ctx.translate(-imageX,-imageY); ctx.translate(-imageWidth/2,-imageHeight/2); ctx.beginPath(); ctx.moveTo(imageX,imageY); ctx.lineTo(imageRight,imageY); ctx.lineTo(imageRight,imageBottom); ctx.lineTo(imageX,imageBottom); ctx.closePath(); ctx.stroke(); ctx.restore(); } ctx.fillStyle="blue"; ctx.save(); ctx.translate(imageX,imageY); ctx.translate(imageWidth/2,imageHeight/2); ctx.rotate(r); ctx.translate(-imageX,-imageY); ctx.translate(-imageWidth/2,-imageHeight/2); ctx.beginPath(); ctx.moveTo(imageRight+15,imageY-10); ctx.lineTo(imageRight+45,imageY-10); ctx.lineTo(imageRight+45,imageY+20); ctx.lineTo(imageRight+15,imageY+20); ctx.fill(); ctx.closePath(); ctx.restore(); } function drawDragAnchor(x,y){ ctx.save(); ctx.translate(imageX,imageY); ctx.translate(imageWidth/2,imageHeight/2); ctx.rotate(r); ctx.translate(-imageX,-imageY); ctx.translate(-imageWidth/2,-imageHeight/2); ctx.beginPath(); ctx.arc(x,y,resizerRadius,0,pi2,false); ctx.closePath(); ctx.fill(); ctx.restore(); } function anchorHitTest(x,y){ var dx,dy; dx=x-imageX; dy=y-imageY; if(dx*dx+dy*dy<=rr){ return(0); } // top-right dx=x-imageRight; dy=y-imageY; if(dx*dx+dy*dy<=rr){ return(1); } // bottom-right dx=x-imageRight; dy=y-imageBottom; if(dx*dx+dy*dy<=rr){ return(2); } // bottom-left dx=x-imageX; dy=y-imageBottom; if(dx*dx+dy*dy<=rr){ return(3); } return(-1); } function hitImage(x,y){ return(x>imageX && x<imageX+imageWidth && y>imageY && y<imageY+imageHeight); } function handleMouseDown(e){ startX=parseInt(e.clientX-offsetX); startY=parseInt(e.clientY-offsetY); draggingResizer= anchorHitTest(startX,startY); draggingImage= draggingResizer<0 && hitImage(startX,startY); doRotation = draggingResizer<0 && !draggingImage && ctx.isPointInPath(startX,startY); } function handleMouseUp(e){ draggingResizer=-1; draggingImage=false; doRotation=false; draw(true,false); } function handleMouseOut(e){ handleMouseUp(e); } function handleMouseMove(e){ mouseX=parseInt(e.clientX-offsetX); mouseY=parseInt(e.clientY-offsetY); if(draggingResizer>-1){ switch(draggingResizer){ case 0: //top-left imageX=mouseX; imageWidth=imageRight-mouseX; imageY=mouseY; imageHeight=imageBottom-mouseY; break; case 1: //top-right imageY=mouseY; imageWidth=mouseX-imageX; imageHeight=imageBottom-mouseY; break; case 2: //bottom-right imageWidth=mouseX-imageX; imageHeight=mouseY-imageY; break; case 3: //bottom-left imageX=mouseX; imageWidth=imageRight-mouseX; imageHeight=mouseY-imageY; break; } if(imageWidth<25) imageWidth=25; if(imageHeight<25) imageHeight=25; imageRight=imageX+imageWidth; imageBottom=imageY+imageHeight; draw(true,true); }else if(draggingImage){ imageClick=false; var dx=mouseX-startX; var dy=mouseY-startY; imageX+=dx; imageY+=dy; imageRight+=dx; imageBottom+=dy; startX=mouseX; startY=mouseY; draw(false,true); }else if(doRotation){ var dx=mouseX-imageX; var dy=mouseY-imageY; r=Math.atan2(dy,dx); draw(false,true); } } $("#canvas").mousedown(function(e){handleMouseDown(e);}); $("#canvas").mousemove(function(e){handleMouseMove(e);}); $("#canvas").mouseup(function(e){handleMouseUp(e);}); $("#canvas").mouseout(function(e){handleMouseOut(e);}); }); </script> </head> <body> <canvas id="canvas" width=800 height=500></canvas> </body> </html>

    Read the article

  • Is it possible to open a pipe-based filehandle which prints to a variable in perl?

    - by blackkettle
    Hi, I know I can do this, ------ open(F,"",\$var); print F "something cool"; close(F); print $var; ------ or this, open(F, "| ./prog1 | ./prog2 tmp.file"); print F "something cool"; close(F); but is it possible to combine these? The semantics of what I'd like to do should be clear from the following, open(F,"|./prog1 | ./prog2", \$var); print F "something cool"; close(F); print $var; however the above clearly won't work. A few minutes of experimenting and googling seems to indicate that this is not possible, but I'd like to know if I'm stuck with using the `` to capture the output.

    Read the article

  • Ideas for band site, which technology to use?

    - by brux
    I am attempting to design and build a website for my friends band. There is minimal content to be included such as bio,news,enbemdded Audio/Visual material. My web dev expertise is average. I'm basicaly looking for inspiration, I was edging towards embedding a silverlight deepzoom xap object to add some visual stimulation, perhaps by featuring a high res photo of the bandshardware/equipment which zooms when mouseover occurs. Does anyone have any cool ideas for a central feature for this site, and which way to approact it in terms of technique (js,css,silverlight etc) If anyone has any immediate ideas which they think would be cool then I am eager to hear them! Also if anyone can link me to any cool band sites they have come across recently I would be greatful,nothing too complicated though please I will be doing all the work myself. Im want the site to be simple but have a certain wow factor!

    Read the article

  • Alternative to slip string in this scenario?

    - by MEM
    I have the following information to dynamicaly display: Product XYZ Very nice Very good Very cool Those Very nice, very good, very cool are advantages of a given product, textual, description advantages, normally display in a form of bullets. I guess that it makes no sense to store those on a separate table called advantages, because it will never be used to anything else despite display, and I fill it as too overkill. So I was thinking about creating a varchar255 field on this product table, and allow values to be inserted like: Very nice;Very good;Very cool On a free-form text input field. Then split those on a php array. My question is: Is it out there, a better approach ?

    Read the article

  • issue in jquery radio button selection

    - by Sri
    I am not much more flexible with jquery. I have some li tags and for each li tag, I have one input tag of type radio like: <li><input type='radio' value='cool' name='radiooption' id='2'>2</li> <li class='answered'><input type='radio' name='radiooption' value='cool1' id='3'>3</li> <li><input type='radio' value='cool' name='radiooption' id='4'>4</li> <li><input type='radio' value='cool' name='radiooption' id='2'>5</li> Now by jquery how to add checked="checked" for radio button which is under li tag having class='answered'? Please guide me.

    Read the article

  • Multiple data centers and HTTP traffic: DNS Round Robin is the ONLY way to assure instant fail-over?

    - by vmiazzo
    Hi, Multiple A records pointing to the same domain seem to be used almost exclusively to implement DNS Round Robin as a cheap load balancing technique. The usual warning against DNS RR is that it is not good for high availability. When 1 IP goes down clients will continue to use it for minutes. A load balancer is often suggested as a better choice. Both claims are not completely true: When the traffic is HTTP then, most of the HTML browsers are able to automatically try the next A record if the previous is down, without a new DNS look-up. Read here chapter 3.1 and here. When multiple data centers are involved then, DNS RR is the only option to distribute traffic across them. So, is it true that, with multiple data centers and HTTP traffic, the use of DNS RR is the ONLY way to assure instant fail-over when one data center goes down? Thanks, Valentino Edit: Off course each data center has a local Load Balancer with hot spare. It's OK to sacrifice session affinity for an instant fail-over. AFAIK the only way for a DNS to suggest a data center instead of another is to reply with just the IP (or IPs) associated to that data center. If the data center becomes unreachable then all those IP are also unreachables. This means that, even if smart HTML browsers are able to instantly try another A record , all the attempts will fail until the local cache entry expires and a new DNS lookup is done, fetching the new working IPs (I assume DNS automatically suggests to a new data center when one fail). So, "smart DNS" cannot assure instant fail-over. Conversely a DNS round-robin permits it. When one data center fail, the smart HTML browsers (most of them) instantly try the other cached A records jumping to another (working) data center. So, DNS round-robin doesn't assure session affinity or the lowest RTT but seems to be the only way to assure instant fail-over when the clients are "smart" HTML browsers. Edit 2: Some people suggest TCP Anycast as a definitive solution. In this paper (chapter 6) is explained that Anycast fail-over is related to BGP convergence. For this reason Anycast can employ from 15 minutes to 20 seconds to complete. 20 seconds are possible on networks where the topology was optimized for this. Probably just CDN operators can grant such fast fail-overs. Edit 3:* I did some DNS look-ups and traceroutes (maybe some expert can double check) and: The only CDN using TCP Anycast seems to be CacheFly, other operators like CDN networks and BitGravity use CacheFly. Seems that their edges cannot be used as reverse proxies. Therefore, they cannot be used to grant instant failover. Akamai and LimeLight seems to use geo-aware DNS. But! They return multiple A records. From traceroutes seems that the returned IPs are on the same data center. So, I'm puzzled on how they can offer a 100% SLA when one data center goes down.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >