Rotating images: Poor performance and incorrect direction of the dropshadow
I've created an extremely simple application that is rotating a bitmap image. I have two issues:
1) The performance is quite frankly terrible with stuttering and screen tearing. Is there any way to improve the performance or is this a known limitation of JFX's rendering?
2) The Image has a dropshadow, but as the image rotates so does the shadow which is not the behavior I want since that makes it look like the lightsource is also moving. How can I get around this? I want the shadow to stay on the bottom right. Am I putting the dropshadow in the wrong location in the scenegraph?
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.effect.*;
import javafx.scene.image.ImageView;
import javafx.scene.image.Image;
import javafx.animation.Interpolator;
import javafx.animation.Timeline;
var x: Number;
Timeline {
repeatCount: Timeline.INDEFINITE
autoReverse: true
keyFrames: [
at (0s) {x => 0.0},
at (5s) {x => 365.0 tween Interpolator.LINEAR}
}.play();
Stage {
title: "Application title"
width: 800
height: 1000
scene: Scene {
content: [
ImageView {
image: Image {
url: "{__DIR__}image.jpg"
effect: DropShadow {
offsetX: 5
offsetY: 5
translateX: 10
translateY: 10
rotate: bind x
}
lol, nope, that still won't show the image... i guess i have really screwed up my install on this system. i had nb6.5 beta then i installed the new nb for javafx but it created an new instance of the app instead of updating the old one. so i removed both and installed the new one... think i will try and setup the nb on a totally clean system and open the app from there and recompile to see if somethin hinky is going on with that.
Similar Messages
-
I created an image in Photoshop and saved it as the PSD file. Now when I try and open it it says it is not compatible with my version. How could this be when I created it in this version?
That depends on why it won't open. Most of the time it means the file is corrupted and unlikely to be recovered. If you saved it right after adding or copying a LOT of layers - then it might just be the layer limit and we can attempt to recover it.
-
I have itunes 10.5.2 Can i download and update directly to the latest version of itunes without any issues?
Yes, but back up the library first. Note that if you're using Mac OS X 10.5.8, you won't be able to update iTunes past 10.6.3.
(96898) -
Replace sentances and words directly in the FramMaker
Hi!
I want to replace complete sentances and words directly in the FramMaker where I keep the layout of my entire book.
The program/the code I am looking for need to be able to replace many words and sentences at the same time.
For example:
<in such a way> after replacing: <på sådant sätt>
<To this end> after replacing: <För detta ändamål>
<refer to the instructions> after replacing: <se anvisningarna i>
<by means of> . after replacing: <med hjälp av>
I´ve come across som programs with language memory, but I need to be able to replace thousands of words/sentences and the opensource versions I´ve seen only allow me to load the memory with 150 words.
Would you be so kind and point me in the correct direction. If you could recommend some program or code that is able to do at least some of these requirements, it would be of great help because i could rewrite the code myself.
With kind regards
Cecilia VYou might want to consider looking at FrameScript http://www.framescript.com to automate this.
If you have the FM content in structured FM and can roundtrip it via XML, then there would be a lot of other tools available for processing the content. I'm partial to TextPipePro, see http://www.datamystic.com/textpipe.html
You may be also be able to use TextPipe on the MIF format, however, sometimes FM breaks up the content into smaller substrings, so it's quite possible to miss some groups of words or sentences for replacement. -
When I am connected to the WiFi, my apps cannot be download. Once I had disable the wifi and connect directly to the service provider, the apps will start to download. Please advise what is the problem and solution for my iPhone 5.
I can't follow your meaning. What does connect directly to your ISP mean?
Did you mean turning off WiFi but turning on Cellular Data on your iPhone? -
Poor performance and high number of gets on seemingly simple insert/select
Versions & config:
Database : 10.2.0.4.0
Application : Oracle E-Business Suite 11.5.10.2
2 node RAC, IBM AIX 5.3Here's the insert / select which I'm struggling to explain why it's taking 6 seconds, and why it needs to get > 24,000 blocks:
INSERT INTO WF_ITEM_ATTRIBUTE_VALUES ( ITEM_TYPE, ITEM_KEY, NAME, TEXT_VALUE,
NUMBER_VALUE, DATE_VALUE ) SELECT :B1 , :B2 , WIA.NAME, WIA.TEXT_DEFAULT,
WIA.NUMBER_DEFAULT, WIA.DATE_DEFAULT FROM WF_ITEM_ATTRIBUTES WIA WHERE
WIA.ITEM_TYPE = :B1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 4 0
Execute 2 3.44 6.36 2 24297 198 36
Fetch 0 0.00 0.00 0 0 0 0
total 3 3.44 6.36 2 24297 202 36
Misses in library cache during parse: 1
Misses in library cache during execute: 2Also from the tkprof output, the explain plan and waits - virtually zero waits:
Rows Execution Plan
0 INSERT STATEMENT MODE: ALL_ROWS
0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF 'WF_ITEM_ATTRIBUTES' (TABLE)
0 INDEX MODE: ANALYZED (RANGE SCAN) OF 'WF_ITEM_ATTRIBUTES_PK' (INDEX (UNIQUE))
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
library cache lock 12 0.00 0.00
gc current block 2-way 14 0.00 0.00
db file sequential read 2 0.01 0.01
row cache lock 24 0.00 0.01
library cache pin 2 0.00 0.00
rdbms ipc reply 1 0.00 0.00
gc cr block 2-way 4 0.00 0.00
gc current grant busy 1 0.00 0.00
********************************************************************************The statement was executed 2 times. I know from slicing up the trc file that :
exe #1 : elapsed = 0.02s, query = 25, current = 47, rows = 11
exe #2 : elapsed = 6.34s, query = 24272, current = 151, rows = 25
If I run just the select portion of the statement, using bind values from exe #2, I get small number of gets (< 10), and < 0.1 secs elapsed.
If I make the insert into an empty, non-partitioned table, I get :
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.01 0.08 0 137 53 25
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.01 0.08 0 137 53 25and same explain plan - using index range scan on WF_Item_Attributes_PK.
This problem is part of testing of a database upgrade and country go-live. On a 10.2.0.3 test system (non-RAC), the same insert/select - using the real WF_Item_Attributes_Value table takes :
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.10 10 27 136 25
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.10 10 27 136 25So I'm struggling to understand why the performance on the 10.2.0.4 RAC system is so much worse for this query, and why it's doing so many gets. Suggestions, thoughts, ideas welcomed.
I've verified system level things - CPUs weren't/aren't max'd out, no significant paging/swapping activity, run queue not long. AWR report for the time period shows nothing unusual.
further info on the objects concerned:
query source table :
WF_Item_Attributes_PK : unique index on Item_Type, Name. Index has 144 blocks, non-partitioned
WF_Item_Attributes tbl : non-partitioned, 160 blocks
insert destination table:
WF_Item_Attribute_Values:
range partitioned on Item_Type, and hash sub-partitioned on Item_Key
both executions of the insert hit the partition with the most data : 127,691 blocks total ; 8 sub-partitions with 15,896 to 16,055 blocks per sub-partition.
WF_Item_Attribute_Values_PK : unique index on columns Item_Type, Item_Key, Name. Range/hash partitioned as per table.
Bind values:
exe #1 : Item_Type (:B1) = OEOH, Item_Key (:B2) = 1048671
exe #2 : Item_Type (:B1) = OEOL, Item_Key (:B2) = 4253168
number of rows in WF_Item_Attribute_Values for Item_Type = OEOH : 1132587
number of rows in WF_Item_Attribute_Values for Item_Type = OEOL : 18763670
The non-RAC 10.2.0.3 test system (clone of Production from last night) has higher row counts for these 2.
thanks and regards
Ivanhi Sven,
Thanks for your input.
1) I guess so, but I haven't lifted the lid to delve inside the form as to which one. I don't think it's the cause though, as I got poor performance running the insert statement with my own value (same statement, using my own bind value).
2) In every execution plan I've seen, checked, re-checked, it uses a range scan on the primary key. It is the most efficient I think, but the source table is small in any case - table 160 blocks, PK index 144 blocks. So I think it's the partitioned destination table that's the problem - but we only see this issue on the 10.2.0.4 pre-production (RAC) system. The 10.2.0.3 (RAC) Production system doesn't have it. This is why it's so puzzling to me - the source table read is fast, and does few gets.
3) table storage details below - the Item_Types being used were 'OEOH' (fast execution) and 'OEOL' (slow execution). Both hit partition WF_ITEM49, hence I've only expanded the subpartition info for that one (there are over 600 sub-partitions).
============= From DBA_Part_Tables : Partition Type / Count =============
PARTITI SUBPART PARTITION_COUNT DEF_TABLESPACE_NAME
RANGE HASH 77 APPS_TS_TX_DATA
1 row selected.
============= From DBA_Tab_Partitions : Partition Names / Tablespaces =============
Partition Name TS Name High Value High Val Len
WF_ITEM1 APPS_TS_TX_DATA 'A1' 4
WF_ITEM2 APPS_TS_TX_DATA 'AM' 4
WF_ITEM3 APPS_TS_TX_DATA 'AP' 4
WF_ITEM47 APPS_TS_TX_DATA 'OB' 4
WF_ITEM48 APPS_TS_TX_DATA 'OE' 4
WF_ITEM49 APPS_TS_TX_DATA 'OF' 4
WF_ITEM50 APPS_TS_TX_DATA 'OK' 4
WF_ITEM75 APPS_TS_TX_DATA 'WI' 4
WF_ITEM76 APPS_TS_TX_DATA 'WS' 4
WF_ITEM77 APPS_TS_TX_DATA MAXVALUE 8
77 rows selected.
============= From dba_part_key_columns : Partition Columns =============
NAME OBJEC Column Name COLUMN_POSITION
WF_ITEM_ATTRIBUTE_VALUES TABLE ITEM_TYPE 1
1 row selected.
PPR1 sql> @q_tabsubpart wf_item_attribute_values WF_ITEM49
============= From DBA_Tab_SubPartitions : SubPartition Names / Tablespaces =============
Partition Name SUBPARTITION_NAME TS Name High Value High Val Len
WF_ITEM49 SYS_SUBP3326 APPS_TS_TX_DATA 0
WF_ITEM49 SYS_SUBP3328 APPS_TS_TX_DATA 0
WF_ITEM49 SYS_SUBP3332 APPS_TS_TX_DATA 0
WF_ITEM49 SYS_SUBP3331 APPS_TS_TX_DATA 0
WF_ITEM49 SYS_SUBP3330 APPS_TS_TX_DATA 0
WF_ITEM49 SYS_SUBP3329 APPS_TS_TX_DATA 0
WF_ITEM49 SYS_SUBP3327 APPS_TS_TX_DATA 0
WF_ITEM49 SYS_SUBP3325 APPS_TS_TX_DATA 0
8 rows selected.
============= From dba_part_key_columns : Partition Columns =============
NAME OBJEC Column Name COLUMN_POSITION
WF_ITEM_ATTRIBUTE_VALUES TABLE ITEM_KEY 1
1 row selected.
from DBA_Segments - just for partition WF_ITEM49 :
Segment Name TSname Partition Name Segment Type BLOCKS Mbytes EXTENTS Next Ext(Mb)
WF_ITEM_ATTRIBUTE_VALUES @TX_DATA SYS_SUBP3332 TblSubPart 16096 125.75 1006 .125
WF_ITEM_ATTRIBUTE_VALUES @TX_DATA SYS_SUBP3331 TblSubPart 16160 126.25 1010 .125
WF_ITEM_ATTRIBUTE_VALUES @TX_DATA SYS_SUBP3330 TblSubPart 16160 126.25 1010 .125
WF_ITEM_ATTRIBUTE_VALUES @TX_DATA SYS_SUBP3329 TblSubPart 16112 125.875 1007 .125
WF_ITEM_ATTRIBUTE_VALUES @TX_DATA SYS_SUBP3328 TblSubPart 16096 125.75 1006 .125
WF_ITEM_ATTRIBUTE_VALUES @TX_DATA SYS_SUBP3327 TblSubPart 16224 126.75 1014 .125
WF_ITEM_ATTRIBUTE_VALUES @TX_DATA SYS_SUBP3326 TblSubPart 16208 126.625 1013 .125
WF_ITEM_ATTRIBUTE_VALUES @TX_DATA SYS_SUBP3325 TblSubPart 16128 126 1008 .125
WF_ITEM_ATTRIBUTE_VALUES_PK @TX_IDX SYS_SUBP3332 IdxSubPart 59424 464.25 3714 .125
WF_ITEM_ATTRIBUTE_VALUES_PK @TX_IDX SYS_SUBP3331 IdxSubPart 59296 463.25 3706 .125
WF_ITEM_ATTRIBUTE_VALUES_PK @TX_IDX SYS_SUBP3330 IdxSubPart 59520 465 3720 .125
WF_ITEM_ATTRIBUTE_VALUES_PK @TX_IDX SYS_SUBP3329 IdxSubPart 59104 461.75 3694 .125
WF_ITEM_ATTRIBUTE_VALUES_PK @TX_IDX SYS_SUBP3328 IdxSubPart 59456 464.5 3716 .125
WF_ITEM_ATTRIBUTE_VALUES_PK @TX_IDX SYS_SUBP3327 IdxSubPart 60016 468.875 3751 .125
WF_ITEM_ATTRIBUTE_VALUES_PK @TX_IDX SYS_SUBP3326 IdxSubPart 59616 465.75 3726 .125
WF_ITEM_ATTRIBUTE_VALUES_PK @TX_IDX SYS_SUBP3325 IdxSubPart 59376 463.875 3711 .125
sum 4726.5
[the @ in the TS Name is my shortcode, as Apps stupidly prefixes every ts with "APPS_TS_"]
The Tablespaces used for all subpartitions are UNIFORM extent mgmt, AUTO segment_space_management ; LOCAL extent mgmt.regards
Ivan -
Story
I've been using arch for the past four months, dual booting with my old Windows XP. As I'm very fond of Flash games and make my own programs with a cross-platform language, I've found few problems with the migration. One of them was the Adobe Flash Player performance, which was stunningly bad. But everyone was saying that was normal, so I left it as is.
However, one special error always worried me: a seemingly randomly started siren sound coming from the motherboard speaker. Thinking it was a alarm about some fatal kernel error, I had been solving it mostly with reboots.
But then it happened. While playing a graphics intensive game on Windows quickly after rebooting from Arch, the same siren sound started. It felt like a slap across the face: it was not a kernel error, it was an motherboard overheat alarm.
The Problem
Since the computer was giving overheat signs, I started looking at things from another angle. I noticed that some tasks take unusually long times in Arch (i.e.: building things from source; Firefox / OpenOffice startup; any graphics intensive program), specially from the Flash Player.
A great example is the game Penguinz, that runs flawlessly in Windows but is unbearably slow in Arch. So slow that it alone caused said overheat twice. And trying to record another flash game's record using XVidCap things went so bad that the game halved the FPS and started ignoring key presses.
Tech Info
Dual Core 3.2 processor
1 gb RAM
256 mb Geforce FX 5500 video card
Running Openbox
Using proprietary NVIDIA driver
TL;DR: poor performance on some tasks. Flash Player is so slow that overheats CPU and makes me cry. It's fine on Windows.
Off the top of my head I can think up some reasons: bad video driver, unwanted background application messing up, known Flash Player performance problems and Actionscript Linux/Arch-only bug.
Where do you think is the problem?jwcxz wrote:Have you looked at your process table for any program with abnormal CPU usage? That seems like the logical place to start. You shouldn't be getting poor performance in anything with that system. I have a 2.0GHz Core 2 Duo and an Intel GMA 965 and I've never had any problems with Flash. It's much better than it used to be.
Pidgin scared me for a while because it froze for no apparent reason. After fixing this, the table contains this two guys here:
%CPU
Firefox: 80%~100%
X: 0~20%
Graphic intensive test, so I think the X usage is normal. It might be some oddity at the Firefox+Linux+Flash sum, maybe a conflict. I'll try another browser.
EDIT:
Did a Javascript benchmark to test both systems and browsers.
Windows XP + Firefox = 4361.4ms
Arch + Firefox = 5146.0ms
So, it's actually a lot slower without even taking Flash into account. If someone knows a platform-independent benchmark to test both systems completely, and not only the browser, feel free to point out.
I think that something is already wrong here and the lack of power saving systems only aggravated the problem, causing overheat.
EDIT2:
Browser performance fixed: migrated to Midori. Flash stills slower than on Windows, but now it's bearable. Pretty neat browser too, goes better with the Arch Way. It shouldn't fix the temperature, however.
Applied B's idea, but didn't test yet. I'm not into the mood of playing flash games for two straight hours today.
Last edited by BoppreH (2009-05-03 04:25:20) -
Poor performance and voltage fluctuation.
I'm running two 280x in crossfire which I upgraded from two 6970's. When I'm playing DayZ my FPS never go above 30 FPS. With my 6970's I was well into the 70's. I never changed my video settings when I went from the 6970's to the 280X's. For the most part I have a lot of the graphics low or disabled. Borderlands 2 is a nightmare on the 280X. I drop down into 10 fps area and this has never happened with on my 6970's.
During games my core voltage fluctuates between 500mhz and 1020mhz during game play. I have ULPS disable as well.
My power supply is an Antec HCG-900.
Happened on all these drivers 14.4, 14.6 Beta, and 14.6 RC (currently installed).jwcxz wrote:Have you looked at your process table for any program with abnormal CPU usage? That seems like the logical place to start. You shouldn't be getting poor performance in anything with that system. I have a 2.0GHz Core 2 Duo and an Intel GMA 965 and I've never had any problems with Flash. It's much better than it used to be.
Pidgin scared me for a while because it froze for no apparent reason. After fixing this, the table contains this two guys here:
%CPU
Firefox: 80%~100%
X: 0~20%
Graphic intensive test, so I think the X usage is normal. It might be some oddity at the Firefox+Linux+Flash sum, maybe a conflict. I'll try another browser.
EDIT:
Did a Javascript benchmark to test both systems and browsers.
Windows XP + Firefox = 4361.4ms
Arch + Firefox = 5146.0ms
So, it's actually a lot slower without even taking Flash into account. If someone knows a platform-independent benchmark to test both systems completely, and not only the browser, feel free to point out.
I think that something is already wrong here and the lack of power saving systems only aggravated the problem, causing overheat.
EDIT2:
Browser performance fixed: migrated to Midori. Flash stills slower than on Windows, but now it's bearable. Pretty neat browser too, goes better with the Arch Way. It shouldn't fix the temperature, however.
Applied B's idea, but didn't test yet. I'm not into the mood of playing flash games for two straight hours today.
Last edited by BoppreH (2009-05-03 04:25:20) -
Poor performance and now dropping connection
I am very underwhelmed by performance since switching to infinity FTTC last year. Download speed is very variable and I just cannot get an upload speed much better than 1.1 Mb/s.
Now we have a regularly dropping connection. Last Saturday morning we had a thunderstorn with heavy downpour and phone line dropped completely - no dialtone and unsurprisingly no broadband. Did a line check from my mobile - all fine and no reported problems in the area. I phoned BT and got an Indian who just repeated what the website told me and said couldn't get an engineer for 4 days! Phone came back late the same afternoon and a little while later broadband came up but connection was up and down like a yo-yo. After 4 days of sunshine when the engineer turned up broadband had been up solid from 3 am and phone was fine. Engineer did more detailed tests which showed no problem and reckoned our problem must have been fixed, and that reason broadband had been dropping was because of computerised checks due to reported fault which would cause line to drop.
For a few days all was fine, although performance still underwheliming, until we had another downpour yesterday morning. Phone line stayed up, although a little crackly, but once again broadband started dropping regularly. Since then it has gradually improved (no more rain).
My suspicion is (and always has been) that with the heavy rain water is getting into a connection somewhere. How do I go about communicating it to BT support (I can't even find a web page or number for reporting broadband problems) this fact and actually getting someone to look into it properly? I rejected the "fault reported fixed" on the tracking your fault web page but so far nothing.
I am distinctly unimpressed with BT support and unless this gets fixed soon I am seriously thinking of switching to fibre to the home with Virgin (despite hating Branson) especially as the move from Yahoo mail to BT mail has not been smooth and the BT webmail is full of bugs (which again I cannot find any way of reporting).Thanks. I tried that. Broadband up and down regularly until the day the engineer came. Day before had intermittent heavy crackling on the line and calls dropping. Day he came all is fine and of course his diagnostics checks come back all clear. Apparently, or so he told me, they are not allowed to work on our line unless the checks show a fault...which they didn't.
I've just had 24 hours of our broadband working but just now it's started dropping regularly again.
I am getting very frustrated/annoyed. What do I do now? How do they expect to solve the problem if it isn't constant and they can't get an engineer to look at it within 3 or 4 days? Do I just keep on calling our an engineer until by chance it happens to hit a problem while they're on site? Not good for customer satisfaction and surely it must cost them to keep sending out an engineer! -
Poor performance and speed since 21CN Update.
My Wholesale exchange was upgraded to BT21CN at the end of January. (MELLOR, LANCASHIRE)
Before the upgrade :
> We got about 6-7Mbps constantly. (BT Unlimited Broadband). This was day and night via Speedtest.net and BT Speedtest
> iPlayer and other services reliably streamed in HD at any time of day.
> We didnt have any speed drops at night and could stream video content etc perfectly for years.
Now everything has changed.......
After the Update 31/01/14 :
> Video from outside the UK is slow and constantly buffers. US Netflix for example no longer streams reliably.
> Video and streming services from within the UK arent that great either. iPlayer and other services struggle to stream in HD - if ever.
> BT Speedtest says we get around 17-18Mbps. Speedtest.net Constantly says less than 5Mbps. BBC iPlayer speed tests only register 1.8Mbps. - we cant stream any HD Olympic services.
> After 4pm speeds drop across the range of activities, video services like youtube, iplayer, netflix etc etc dont work unless the streaming quality is very low.
> At night other Speedtest services report <3-4Mbps. BT still says above 17Mbps, buit we cant even use video and the internet feels slow.
>IP Profile is 19.34Mbps.
We pay for full unlimited BT Broadband however since the change to 21CN and a 20Mbps connection our service is now worse ! It almost feels as if we are being penalised or throttled for video and anything from outside the UK
BT Speedtest is the only one that ever says we get high speeds- but we dont, we cant even reliably stream video.
Cany anyone help??MY CURRENT STATS (09/02/2014) ....
ADSL Line Status
Connection Information
Line state:
Connected
Connection time:
0 days, 04:12:22
Downstream:
16.47 Mbps
Upstream:
1.134 Mbps
ADSL Settings
VPI/VCI:
0/38
Type:
PPPoA
Modulation:
G.992.5 Annex A
Latency type:
Interleaved
Noise margin (Down/Up):
7.1 dB / 7.1 dB
Line attenuation (Down/Up):
9.7 dB / 5.5 dB
Output power (Down/Up):
19.9 dBm / 12.4 dBm
FEC Events (Down/Up):
3 / 0
CRC Events (Down/Up):
0 / 1
BTW PERFORMANCE TEST:
Download speedachieved during the test was - 13.39 Mbps
For your connection, the acceptable range of speeds is 4 Mbps-21 Mbps.
IP Profile for your line is - 19.34 Mbps
Upload speed achieved during the test was - 0.91Mbps
Additional Information:
Upstream Rate IP profile on your line is - 0.83 Mbps
SPEEDTEST.NET to Closest Server
Download Speed : 4.7Mbps
Upload Speed : 0.94Mbps
PING: 50ms
BBC iPlayer Speed Test:
Download Speed : 11.3Mbps
Streaming Speed 1 : 5.01Mbps
Streaming Speed 2 : 1.4Mbps
Streaming Speed 3 : 0.6Mbps
Your Connection : 2.3Mbps
TV-HD - NO
TV-SD - YES -
HI, I am small iphone developer,i have one problem in my app,please give the guidence to me.
THIS IS MY PROBLEM:
I HAVE SELECTED ONE PICTURE FROM ALBUMS OR TAKE PICTURE FROM CAM SO I WANT TO CHANGE THE HAIR STYLES PART WITH ANOTHER HAIR STYELS AND SAVE THE PICTURE INTO ALBUMS HOW CAN GENRATE THE CODE OR LOGIC TO ME......I AM TRYING IT FROM 3WEEKS SO COULD YOU PLEASE GIVE ME GUIDENCE TO ME.................HI, I am small iphone developer,i have one problem in my app,please give the guidence to me.
THIS IS MY PROBLEM:
I HAVE SELECTED ONE PICTURE FROM ALBUMS OR TAKE PICTURE FROM CAM SO I WANT TO CHANGE THE HAIR STYLES PART WITH ANOTHER HAIR STYELS AND SAVE THE PICTURE INTO ALBUMS HOW CAN GENRATE THE CODE OR LOGIC TO ME......I AM TRYING IT FROM 3WEEKS SO COULD YOU PLEASE GIVE ME GUIDENCE TO ME.................
Sir I am did it by using Objcetive-C code in iphone as fallows
demoprojectViewController.h
#import <UIKit/UIKit.h>
@interface demoprojectViewController : UIViewController<UIImagePickerControllerDelegate,UINavigationControllerDelegate >
UIImageView *imageView,*editingimage,*maskimage;
UIButton *takePictureButton;
UIButton *selectFromCameraRollButton;
UIView *myview;
@property(nonatomic,retain)IBOutlet UIImageView *imageView;
@property(nonatomic,retain)IBOutlet UIImageView *maskimage;
@property(nonatomic,retain)IBOutlet UIImageView *editingimage;
@property(nonatomic,retain)IBOutlet UIButton *takePictureButton;
@property(nonatomic,retain)IBOutlet UIButton *selectFromCameraRollButton;
@property(nonatomic,retain )IBOutlet UIView *myview;
- (IBAction)getCameraPicture:(id)sender;
- (IBAction)selectExistingPicture;
-(IBAction)pickHair:(id)sender;
-(IBAction)done;
-(IBAction)back;
@end
demoprojectViewController.m
#import "demoprojectViewController.h"
@implementation demoprojectViewController
@synthesize imageView,editingimage,maskimage;
@synthesize takePictureButton;
@synthesize selectFromCameraRollButton;
@synthesize myview;
CGFloat lastScaleFactor = 1;
CGFloat netRotation;
CGPoint netTranslation;
NSArray *images;
int imageIndex = 0;
- (void)didReceiveMemoryWarning
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
#pragma mark - View lifecycle
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
// maskimage=[[UIImageView alloc]initWithFrame:CGRectMake(50, 50, 150, 150)];
//maskimage.image=[UIImage imageNamed:@"1.png"];
if ([UIImagePickerController isSourceTypeAvailable:
UIImagePickerControllerSourceTypeCamera]) {
takePictureButton.hidden = NO;
selectFromCameraRollButton.hidden = NO;
UITapGestureRecognizer *tapGesture =
[[UITapGestureRecognizer alloc]
initWithTarget:self
action:@selector(handleTapGesture:)];
tapGesture.numberOfTapsRequired = 1;
[maskimage addGestureRecognizer:tapGesture];
[tapGesture release];
UIPinchGestureRecognizer *pinchGesture =
[[UIPinchGestureRecognizer alloc]
initWithTarget:self
action:@selector(handlePinchGesture:)];
[maskimage addGestureRecognizer:pinchGesture];
[pinchGesture release];
///---rotate gesture---
UIRotationGestureRecognizer *rotateGesture =
[[UIRotationGestureRecognizer alloc]
initWithTarget:self
action:@selector(handleRotateGesture:)];
[maskimage addGestureRecognizer:rotateGesture];
[rotateGesture release];
//---pan gesture---
UIPanGestureRecognizer *panGesture =
[[UIPanGestureRecognizer alloc]
initWithTarget:self
action:@selector(handlePanGesture:)];
[maskimage addGestureRecognizer:panGesture];
[panGesture release];
//---swipe gesture---
images = [[NSArray alloc] initWithObjects:
@"1.png",
@"2.png",
@"3.png", nil];
//---right swipe (default)---
UISwipeGestureRecognizer *swipeGesture =
[[UISwipeGestureRecognizer alloc]
initWithTarget:self
action:@selector(handleSwipeGesture:)];
[maskimage addGestureRecognizer:swipeGesture];
[swipeGesture release];
//---left swipe---
UISwipeGestureRecognizer *swipeLeftGesture =
[[UISwipeGestureRecognizer alloc]
initWithTarget:self
action:@selector(handleSwipeGesture:)];
swipeLeftGesture.direction = UISwipeGestureRecognizerDirectionLeft;
[maskimage addGestureRecognizer:swipeLeftGesture];
[swipeLeftGesture release];
[super viewDidLoad];
-(IBAction) handleTapGesture:(UIGestureRecognizer *) sender {
if (sender.view.contentMode == UIViewContentModeScaleAspectFit)
sender.view.contentMode = UIViewContentModeCenter;
else
sender.view.contentMode = UIViewContentModeScaleAspectFit;
-(IBAction) handlePinchGesture:(UIGestureRecognizer *) sender {
CGFloat factor = [(UIPinchGestureRecognizer *) sender scale];
if (factor > 1) {
//---zooming in---
sender.view.transform = CGAffineTransformMakeScale(
lastScaleFactor + (factor-1),
lastScaleFactor + (factor-1));
} else {
//---zooming out---
sender.view.transform = CGAffineTransformMakeScale(
lastScaleFactor * factor,
lastScaleFactor * factor);
if (sender.state == UIGestureRecognizerStateEnded){
if (factor > 1) {
lastScaleFactor += (factor-1);
} else {
lastScaleFactor *= factor;
//---handle rotate gesture---
-(IBAction) handleRotateGesture:(UIGestureRecognizer *) sender {
CGFloat rotation = [(UIRotationGestureRecognizer *) sender rotation];
CGAffineTransform transform = CGAffineTransformMakeRotation(
rotation + netRotation);
sender.view.transform = transform;
if (sender.state == UIGestureRecognizerStateEnded){
netRotation += rotation;
//---handle pan gesture---
-(IBAction) handlePanGesture:(UIGestureRecognizer *) sender {
CGPoint translation =
[(UIPanGestureRecognizer *) sender translationInView:maskimage];
sender.view.transform = CGAffineTransformMakeTranslation(
netTranslation.x + translation.x,
netTranslation.y + translation.y);
if (sender.state == UIGestureRecognizerStateEnded){
netTranslation.x += translation.x;
netTranslation.y += translation.y;
-(IBAction) handleSwipeGesture:(UIGestureRecognizer *) sender {
UISwipeGestureRecognizerDirection direction =
[(UISwipeGestureRecognizer *) sender direction];
switch (direction) {
case UISwipeGestureRecognizerDirectionUp:
NSLog(@"up");
break;
case UISwipeGestureRecognizerDirectionDown:
NSLog(@"down");
break;
case UISwipeGestureRecognizerDirectionLeft:
imageIndex++;
break;
case UISwipeGestureRecognizerDirectionRight:
imageIndex -- ;
break;
default:
break;
imageIndex = (imageIndex < 0) ? ([images count] - 1):
imageIndex % [images count];
imageView.image = [UIImage imageNamed:
[images objectAtIndex:imageIndex]];
#pragma mark -
- (IBAction)getCameraPicture:(id)sender {
UIImagePickerController *picker =
[[UIImagePickerController alloc] init];
picker.delegate = self;
//picker.allowsImageEditing = YES;
picker.sourceType = (sender == takePictureButton) ?
UIImagePickerControllerSourceTypeCamera :
UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self presentModalViewController:picker animated:YES];
[maskimage removeFromSuperview];
[picker release];
- (IBAction)selectExistingPicture {
if ([UIImagePickerController isSourceTypeAvailable:
UIImagePickerControllerSourceTypePhotoLibrary]) {
UIImagePickerController *picker =
[[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:picker animated:YES];
[maskimage removeFromSuperview];
[picker release];
else {
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Error accessing photo library"
message:@"Device does not support a photo library"
delegate:nil
cancelButtonTitle:@"Drat!"
otherButtonTitles:nil];
[alert show];
[alert release];
#pragma mark -
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingImage:(UIImage *)image
editingInfo:(NSDictionary *)editingInfo {
imageView.image = image;
[picker dismissModalViewControllerAnimated:YES];
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
[picker dismissModalViewControllerAnimated:YES];
- (IBAction)btnSave_Clicked:(id)sender;
UIImageWriteToSavedPhotosAlbum(editingimage.image, nil, nil, nil);
//UIImageWriteToSavedPhotosAlbum(imageView.image, nil, nil, nil);
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Success" message:@"Image saved successfully to iPhone photo albums..." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[alert show];
[alert release];
-(IBAction)pickHair:(id)sender;
//[maskimage setMultipleTouchEnabled:YES];
// [maskimage setUserInteractionEnabled:YES];
//[maskimage setContentMode:UIViewContentModeScaleAspectFit];
maskimage.image=[UIImage imageNamed:@"1.png"];
[imageView addSubview:maskimage];
-(IBAction)done
NSLog(@"hiafjdkfj");
UIGraphicsBeginImageContext(imageView.image.size);
CGRect rect1 = CGRectMake(netTranslation.x,netTranslation.y,maskimage.image.size.width , maskimage.image.size.height);
CGRect rect = CGRectMake(0, 0, imageView.image.size.width, imageView.image.size.height);
[imageView.image drawInRect:rect];
[maskimage.image drawInRect:rect1];
UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[editingimage setImage:resultingImage];
[myview addSubview:editingimage];
[self.view addSubview:myview];
-(IBAction)back
[myview removeFromSuperview];
//[editingimage removeFromSuperview];
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:touch.view];
maskimage.center = location;
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[self touchesBegan:touches withEvent:event];
- (void)viewDidUnload
self.imageView = nil;
self.maskimage=nil;
self.takePictureButton = nil;
self.selectFromCameraRollButton = nil;
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceO rientation
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
- (void)dealloc {
[imageView release];
[images release];
[takePictureButton release];
[selectFromCameraRollButton release];
[super dealloc];
@end
but i can not put the hair to the proper place means on edit image when am saving the image please help meee -
Performance and Contention problem with the database ?
Hello!
I am having one database which is used by around 95 thousand
users.Database contain about 4 lakh records. The database is
going smooth and perfect.
The problem(perfomance is slow and there is contension too) came
when i made 4 web applications which contain atleast 1000 hits
(1000 records are inserted in the database ) per day.
Now the db is not going so smooth(contention and performance
problem).
I think this is happening becuase of those 4 web applications.
So should i make new database for that 4 applications or i need
to get the new system for it or there is another way through i
can tune my running database.
Any help will be appreciated.
Regards
SeemabHi,
If i well understand, u have one database and u insert 4000 rows
per day and u have performance problem ?
I think u have a big problem cause it's not really a big
intensity on a base. So u should have big problems on ur
database design such as undersized memory area, bad disk
repartition, bad types of indexes or something like that.
To decrease the contention, u should separate ur data and index
datafiles over differents disks and specialize tablespace by the
granularity of the table.
But u r not enough precise to expect a precise answer; could u
be more precise ? as the server u have, data volumes, a select *
from v$system_event, etc...
Good Luck,
Fred DENIS -
I am trying to aukthorize a new pc but when I log in to itunes and click on store I get no menu and end up directly in the store How do I get to the store menu where I can select authorization
Hi there,
In the newer versions of iTunes for Windows the menu is hidden. I would recommend taking a look at the article below for instrucions on how to re-enable them.
iTunes: Turning on iTunes menus in Windows 8 and 7
http://support.apple.com/kb/HT5610
Hope that helps,
Griff W. -
Poor performance and increase CPU on UNIX 64 bit
Hi
I have moved one of my 300GB test databases from a 4GB RAM 2x DUAL zeon 3GHz processors LINUX machine to a UNIX 64 bit 6GB RAM 2x1GHz USIIIi processor machine. Both have the oracle data stored on RAID 5 disk.
Both Oracle versions are the same. The data was transered via export/import.
Running exactly the same queries the UNIX box is up to 3 times slower and sits at 100% CPU, wheras LINUX machine sits between 30-50% CPU and performance is really good. No other users are accessing the machines.
Statspack reports look very similar, both have 100%/near 100% instance efficiency. top wait events on both machines are control file parallel write and db file sequential read, but even the values for these do not look worrying. The only difference is there is more memory allocated to the SGA of the UNIX server.
Any ideas as to why the UNIX 64bit server is slower and using 100%CPU would be greatly received.
ThanksLINUX
SELECT
count(*)
FROM
mastermap.topographicline
WHERE
descriptivegroup like :"SYS_B_00"
and
descriptiveterm like :"SYS_B_01"
and
physicalpresence = :"SYS_B_02"
AND
sdo_filter(geom, mdsys.sdo_geometry(:"SYS_B_03", :"SYS_B_04", null,
mdsys.sdo_elem_info_array (:"SYS_B_05", :"SYS_B_06", :"SYS_B_07"),
mdsys.sdo_ordinate_array (:"SYS_B_08", :"SYS_B_09", :"SYS_B_10",:"SYS_B_11")), :"SYS_B_12")=:"SYS_B_13"
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 2 0 0
Execute 1 0.01 0.01 0 11 2 0
Fetch 2 0.20 0.18 0 10713 0 1
total 4 0.21 0.19 0 10726 2 1
UNIX
SELECT
count(*)
FROM
mastermap.topographicline
WHERE
descriptivegroup like :"SYS_B_00"
and
descriptiveterm like :"SYS_B_01"
and
physicalpresence = :"SYS_B_02"
AND
sdo_filter(geom, mdsys.sdo_geometry(:"SYS_B_03", :"SYS_B_04", null,
mdsys.sdo_elem_info_array (:"SYS_B_05", :"SYS_B_06", :"SYS_B_07"),
mdsys.sdo_ordinate_array (:"SYS_B_08", :"SYS_B_09", :"SYS_B_10",:"SYS_B_11")), :"SYS_B_12")=:"SYS_B_13"
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.03 0.02 0 42 2 0
Fetch 2 0.24 0.34 0 10707 0 1
total 4 0.27 0.36 0 10749 2 1
The elapsed time is twice as slow on unix, and it seems to be a fetch issue. Any ideas? -
Poor performance and unidasd connections are getting closed and re-opened
The problem is due to the unidasd daemon looking for some orphaned
Calendar users in LDAP and it is resulting in the snc broker dropping
unidasd connections (processes that handle LDAP connections) if the
result of an LDAP search for a Calendar user comes back with no match.
<P>
For "Found dead connection" of "Service = unidas" problems, you need to correct
the process of managing the Directory Server, i.e., always shut down the Calendar
Server before shutting down the Directory Server and then starting the Calendar
Server after the Directory Server has started. Or you may need to make sure the
Directory Server is configured properly, i.e., the parameter idletimeout should
be set to zero-- never timeout-- (see article 1783 for more info),
or you need to get the Calendar Server and Directory Server back in sync.
<P>
This last point can be accomplished by using a new Calendar Server tool, unidsdiff,
to identify any user or resource objects that are out of sync and another new
Calendar Server tool, unireqchk, to identify any user or resource requests
in the CWS queue that are no longer in the directory server. Both these tools
can be downloaded from http://help.netscape.com/business/filelib.html#caltools.Troubleshooting Apple Mail
What does Mail/Window/Connection Doctor Show? If the server is red, select it and look at the Show Details box.
Troubleshooting sending and receiving email messages
Troubleshooting sending email messages
SMTP servers keep going offline
Maybe you are looking for
-
No GR on Confirmation Approval in Extended Classic Scenario
Hi all gurus out there, We are trying to implement confirmation approval workflow in our SRM system. Our SRM version is SRM 3.0 or EBP 4.0 and we are operating in extended classic scenario. We implement the approval workflow WS10400002 (1-step approv
-
Table export using datapump - estimate the time to export
I aim to export the table ABC of size 300GB using datapump ( oracle 10g) I would like to know how long to take the table for export ( estimate time)
-
Using dialog-window in CE 7.1 without gray-scale
I'm using the new "dialog-popup" feauture in my CE 7.1 WebDynPro. When i'm integrating the WD into an Portal iView (eg. URL-IView or WebDynPro) the "gray-screen" is over the portal masthead. So I can't navigate anymore! I tried allready URL-Iview or
-
Unable to Create Portal Resource for contentListTemplateDef
Using JDeveloper 11g PS 5 and WebCenter Spaces. We are trying to create a Content Presenter template list definition. We've already created a template item definition which went fine. If we have a simple Content Presenter template list definition: <?
-
Insert/Update table via DBLink
I have a situation where the table that I want users to be able to maintain is owned by a different schema on a different database. TABLE1 is owned by SCHEMA1 on DB1 select,insert,update,delete is granted to SCHEMA2 on DB1 DBLINK is a DBLink from SCH