core

Print to log a core dump file stack, C++ over windows?

When my process crashes, how can I print to log a core dump file stack, C++ over windows? I know that in Unix there is a way to do it using some signal handlers but never did it myself. How can I do it in windows (prefer not to use ACE)? Thanks. ...

delete temporary file in java

I'm creating temporary file in java but i'm unable to delete it. This is the code I have written: temp = File.createTempFile("temp", ".txt"); temp.deleteOnExit(); fileoutput = new FileWriter(temp); buffout = new BufferedWriter(fileoutput); ...

Problem with scoped local variables and conditionals

Hello, I am trying to construct method which returns a boolean: public boolean isStringValid(String s){ boolean isValid; String temp = null; // only combinations of 'A','B','C' are allowed for (int i = 0; i < s.length(); i++) { temp = s.substring(i, i+1); if (temp.equals("A")|temp.equals("B")|temp.equals("C")){ isValid= t...

serialport exception java

hi, i'm reading data from serialport using javax.comm API but when i run the code 2-3 times it is showing port currently own by this,but i have closed the port what's the problem i'm not getting plz help me this is expetion: javax.comm.PortInUseException: Port currently owned by flashhandler.TwoWaySerialComm Thanks for reply ...

Create java application jar file in eclipse

Hi, I have created a java application in eclipse, wich needs comm.jar and jexcel.jar and .property files so i have added to libray. I want to make a jar file out of my java appliction, including the external jar files added to the appliction. How can I do it? To run serialport programs I have copied win32.dll into java_home/bin and com...

remove allfile option in jFilechosser java

Hi, i'm using swings jfilechooser in program,i want it to filter files with .txt extension,and it is showing allfiles option also in window,so i want to remove allfiles option,how can i do it plz help me this is my code: fc1 = new JFileChooser(); fc1.setMultiSelectionEnabled(true); // Allow for multiple selections fc1.setCurrentDire...

Treeset to order elements in descending order

Here is the piece of code that I have used for Java 5.0 TreeSet<Integer> treeSetObj = new TreeSet<Integer>( Collections.reverseOrder() ) ; Collections.reverseOrder() is used to obtain a comparator in order to reverse the way the elements are stored and iterated. Is there a more optimized way of doing it? ...

Add image to JAR Java

Hi, I'm using some imgages in JFrame, I have given a path to load image into panel of the frame, but when i made jar of the application its not dispalying images. Where should I place the image? How should I specify the path? setIconImage(Toolkit.getDefaultToolkit().getImage( "D:\RFT\src\dailogBox\dump.jpg")); like this i have do...

CoreAnimation jerky with large window

I have a very simple CA demo. It creates a layer with content from an image file, and displays that image. When you click in the window, it uses implicit animation to smoothly move the image to the mouse point. This works fine, runs with perfect smoothness. But, as the window gets larger, the smoothness gets less. It's acceptable below a...

stuck on current location - iphone sdk

I'm trying to get the current location using the iphone sdk. Here is the code: http://pastie.org/572062 here is the error on build: Building target “Send2iPhone” of project “Send2iPhone” with configuration “Release” — (2 errors) cd /Users/pswenson/dev/send2iphone/iphone_code/Send2iPhone setenv MACOSX_DEPLOYMENT_TARGET 10....

Drupal: Access $profile from a block

I'm trying to get the avatar (profile picture) located in the $profile array to appear in a BLOCK. The variable $profile is not accessible from blocks. It's scope is only in that actual user-profile.tpl.php file. So... does anybody know how I can execute something like this: print $profile[user_picture]; in a drupal BLOCK? ...

check file exists java

Hi, i want create text file if file allready exists it should not create new file it should append to next how can i do it in java? for every one second i'm reading data from inputstream when i stop reading and again i start reading data at that time i should write to same file if file allready exist does i have to check the coditi...

threads for reading and writing java

hi, i'm reading data from serial port for average interval say 1 second,and at the same time writing read data to textArea and textfile,problem is i'm not getting correct data at some time,may be because i'm doing all three process in a single program,how to do writing to text area and text file by separate thred? this is my code: impo...

flex core process window

if someone presses ctrl +alt +delete or any kind of shutdown hook from any os and delete the flex process from task manager then how can i track from that flex process application that killing that flex process was activated so i like to do some processing before killing this process. ...

flv video flex core

i have a flv video file i loaded the binary data of this flv file to memory by using var myFile:File = File.documentsDirectory.resolvePath("AIR Test/video.flv"); var myFileStream:FileStream = new FileStream(); myFileStream.open(myFile, FileMode.READ); var bytes:ByteArray = new ByteArray(); myFileStream.readBytes(bytes); myFileStream.c...

CGAffineTransform on NSObjects?

Does CGAffineTransform only work on UIViews? This is troublesome for my design. The objects that im drawing are essentially images, which i draw using drawAtPoint. These objects are NSObjects, and thus do not have transformation matrices. What would be the best way to give my rendered images the ability to be scaled and translated (and...

adt air flex core

I made an dance.air file but it has 3 directories inside the dance.air file. but when i installed this air file in macintosh then only one file was extracted or installed in macintosh desktop directory. But when i installed in windows xp then all directories are extracted in desktop. So, now question is, is there any possibility to m...

Does apple support core plot framework? Can we use googlecode repository source codes ?

Hi folks, I have a doubt if apple is supporting coreplot framework in it's application.Can anyone tell me? ...

Draw a shadow behind UIWebView

I know similar questions have been asked before, so don't get snarky and link to previous answers. The reason I am repeating this is that none of the answers have worked. I have a UIWebView, and I want to draw a pretty drop-shadow behind it. I have tried subclassing and using some CoreGraphics goodness in drawRect:, but to no avail. Can...

dos command flex core

can i execute some dos like command from flex just like attrib c:\a.txt -h. function available in c exec(), in java Runtime.getRuntime().exec(). but in flex is there any available? ...