URGENT! Currently abroad, need help with iMessage on 4S in Airplane Mode.
Hey guys,
As stated in the description, I need help turning on my iMessage on my iPhone 4S that's in Airplane Mode. Before I left California for vacation abroad, I accidently turned it off, now having problems turning it back on. It reads, "Waiting for activation..." under the iMessage switch. I tried turning my phone off then back on, but the message was still there. Any tips on what I should do? Since I'm in another country, I don't want to take it off Airplane Mode till I'm back home in California.
Thanks for your help in advance!
James Ward4 wrote:
should it?
Yes.
I've never had to deal with that, and have turned iMssage off on the iPhone a number of times.
But you'll always had the ability to send an SMS, correct? Big difference.
I seen this before with users who turn off iMessage, as the OP did, put their phone in Airplane Mode, go to a foreign country, & then can't re-activate it.
Similar Messages
-
Need help with imessage and someone else getting my texts.
Yesterday i bought a phone, NOT A IPHONE, a samsung. And i got a brand new number. The number i got belonged to someone else before they changed theyre phone, the Person has an iphone but changed their number. They CHANGED their number, but for some reason they are receiving MY TEXTS (only from my friends with iphones/imessage
) i was able to get a hold of him and i told him to just turn off his imessage. I read online about that youre supposed to turn off imessage and reset network settings etc. but i did not know at the time i am worried he will sign back into his apple id and get my messages again, or because he turned off imessage and put it back on while my NOW number be erased from his phone? thanks.Wow...OK...let me see if I can understand that...if I boil all of that down, I think we are at this point.
You still want to send SMS to an email account -- I stand by what I said before; I know of no method that an SMS can be sent to an email. Now, if you are meaning some other kind of "text" or "messages" (there are many many kinds of those), then you will need to clarify exactly what you mean. What I gather from what you've said so far continues to mean "SMS sending to Email".
You do not have BlackBerry Internet Service on your BB plan from your carrier. As such, you will be limited as per this guideline:
http://www.blackberryfaq.com/index.php/What_do_I_need_a_Data_Plan_for%3F
You may think that BIS is ridiculous, but that is a core function and feature of BB's. Period. Without it, all you have is a phone (IMHO).
Good luck!
Occam's Razor nearly always applies when troubleshooting technology issues!
If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
Join our BBM Channels
BSCF General Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code -
When I choose an email for iMessage it goes back to the sign in page! I have used iMessage many times before on the same device! Plz plz plz help meeeee
Solved it, my date had gone forward a day. Everyone beware that iMessage is obviously synced to date and time. So if u have this problem plz check ur time! Thnx
-
i need help with my imessage i am using a Iphone 4 ios 6.1.3 but when i go to settings>message>send and reecieve. i only get the options Apple ID: and You can be reached by iMessage at: my current email and add another email. my question is how do i get it to where imessage uses my cell phone number instead of my Email i have looked all over the web and no luck......
The hidden text should be sent for you automatically by the phone. From personal experience, this is automatic, but something has obviously tripped up somewhere on your phone.
It appears from reading the documentation, I would first try signing out of your Apple ID by going to Settings > Messages > Send and Receive then press your Apple ID, and press Sign Out. Then sign back in. This should hopefully trigger a re-activation of your mobile number. Your mobile number should be assigned to your Apple ID on first sign-in so hopefully this signing in and out should trigger an automatic re-activation.
Failing that, others have posted a reset of the phone, as does the support page I quoted. It appears this could be a last resort as a reset can be a bit of a pain (although if you Back your phone up via iTunes, you should be able to restore it to how it is currently). I would try the signing in and out method. Hopefully, fingers crossed, it should kick your phone back into action. -
Need help with a currently "in-use" form we want to switch to Adobes hosting service
Hi, I am in desperate need of help with some issues concerning several forms which we currently use a paid third party (not Adobe) to host and "re-distribute through email"...Somehow I got charged $14.95 for YOUR service, (signed up for a trial, but never used it)..and now I am paying for a year of use of the similar service which Adobe is in control of. I might want to port my form distribution through Adobe in the hopes of reducing the errors, problems and hassles my customers are experiencing when some of them push our "submit button". (and I guess I am familiar with these somewhat from reading what IS available in here, and I also know that, Adobe is working to alleviate some of these " submit" issues, so let's don't start by going backwards, here) I need solutions now for my issues or I can leave it as is, If Adobe's solution will be no better for my end users...
We used FormsCentral to code these forms and it works for the most part (if the end-user can co-operate, and thats iffy, sometimes), but I need help with how to make it go through your servers (and not the third party folks we use now), Not being cruel or racist here, but your over the phone "support techs" are about horrible & I cannot understand them or work with any of them, so I would definitely need someone who speaks English and can understand the nuances of programming these forms, to please contact me back. (Sorry, but both those attributes will be required to be able to help me, so, no "newbie-interns" or first week trainees are gonna cut it).... If you have anyone who fits the bill on those items and would be willing to help us, please contact me back at your earliest convenience. If we have to communicate here, I will do that & I can submit whatever we need to & to whoever we need to.
I need to get this right and working for the majority of my users and on any platform and OS.
You may certainly call me to talk about this, and I have given my number numerous times to your (expletive deleted) time wasting - recording message thingy. So, If it's not available look it up under [email protected]
(and you will probably get right to me, unlike my and I'm sure most other folks', "Adobe phone-in experiences")
Thank You,
Michael Corman
VinylCouture
Phenix City, Alabama 36869Well, thanks for writing back...just so you know...I started using Adobe products in 1987, ...yeah...back then...like Illustrator 1 & 9" B&W Macs ...John Warnock's Helvetica's....stuff like that...8.5 x 11 LaserWriters...all that good stuff...I still have some of it working on a mac...much of it was stuff I bought. some stuff I did not...I'm not a big fan of this "cloud" thing Adobe has foisted upon the creatives of the world...which I'm sure you can tell...but the functionality and usefulness of your software can not be disputed, so feel free to do whatever we will continue to pay for, ...I am very impressed with CC PS on the 64 bit PC and perhaps I will end up paying you the stipend that you demand for the other services.
So I guess that brings us to our problem.. a few years back and at the height of the recession and near bankruptcy myself, I was damn lucky and hit on something and began a small arts and crafts supply service to sell my products online to a very "niche market" ...I had a unique product and still sell that product (plus others) online...My website is www.vinylcouture.com...Strange? Yes...but there is a market it seems, for everything now, and this is the market I service...Catagorically, these are 99%+ women that use these "adhesive, sticky backed vinyl products" to make different "craft items" that are just way too various and numerous to go into... generally older women, women who are computer illiterate for the most part...and all this is irrelevant to my problem, but I want you to have every bit of background on this and especially the demographic we are dealing with, so we can get right to the meat of the problem.
OK...So about two years ago, I decided to offer a "plain sheet" product of a plain colored "stick back" vinyl... it is available in multiple quantities of packs ( like 5 pieces, 10 pieces, 15 pieces, in a packi & so on)...and if you are still on my site.. go to any "GO RIGHT TO OUR ORDER PAGE" button, scroll down a little...and then to the "PLAIN VINYL" section...you will see the Weebly website order process.) You can back out from here, I think,..but, anyway this product is available in 63 colors + or - a few. So then the problem is, how do they select their individual colors within that (whatever) pack?... .
So my initial idea was to enable a "selection form" for these "colors" that would be transmitted to me via email as 'part" of the "order process".. We tried getting our customers to submit a " a list" ( something my competitiors still do, lol, poor bastards)......but that..is just unbelievable..I can't even begin to tell you what a freakin' nightmare that was...these people cannot even count to 10, much less any higher... figuring out what colors to list and send me... well, lets just say, it wasn't working......I had to figure out a better way...Something had to be done.
So after thinking this all out, and yeah...due to my total ignorance, i figured that we could make a form with Live Cycle Designer (Now Forms Central)...(back then something that was bundled with Adobe Acrobat Pro), I believe, and thats what this thing was authored in... and it would be all good...LOL!
Well not so simple...as you well know, Adobe Acrobat would NOT LET YOU EMAIL anything from itself.....it just wouldn't work (and I know why, and all that hooey), but not being one to take NO for answer,.I started looking for a way to make my little gizmo work.. So I found this company that said they can "hijack" (re-direct actually) the request to email, bypass the wah-wah, and re-transmit it to the proper parties.....for less than $100 a year, I think...its called http://pdf-fillableforms.com/.
A nice gentleman named Joseph Silva helped us program the thing to go to his servers and back out. Please dont hassle them...I need them...for now..it basically does work...try it...you should get back a copy of the form that you filled out...good luck however, if you're on MAC OSX or similar...
I have included a copy of both of our forms (and feel free to fill it out and play with it)...just put test somewhere on it...(and you must include YOUR email or it will balk)..they are supposed to be mostly identical, except one seems to be twice as large....generating a 1.7 meg file upon submission, while the other one only generates a 600K file or so...thats another issue for another day or maybe you can advise on that also...
OK so far so good......In our shop, once Grandma buys a 10 pack (or whatever), Only then she gets to the link on her receipt page ro the relevant "selection form" ,(this prevents "Filling and Sending" with "no order" and "no payment", another early problem we had)... which they can click on and it will usually download and open up on their device if all goes well...Then our little form is supposed to be fillable and is supposed to ADD UP all the quantities, so grandma knows how many she is buying and so forth right on the fly, and even while she changes her mind..., and IT'S LARGE so grandma can see it, and then it TOTALS it all up for them, ( cause remember, they can NOT add).., except there is a programming bug (mouse-click should be a mouse-up probably or something..) which makes you click in the blank spaces to get to a correct TOTAL...about 70-80% of our customers can enable all these features and usually the process completes without problems for them especially on PC's running Windows OS and Acrobat Reader X or XI...at least for most... Unfortunately it is still not the "seamless process" I would like or had envisioned for the other folks out there that do have trouble using our form.... Many folks report to us the following issues that we know of. First of all it takes too much time to load up...We know its HUGE...is there anyway that you can see, to streamline this thing? I would love for it to be more compact...this really helps on the phones and pads as I'm sure you well know.
Some just tell us,"it WON'T work"....I believe this is because they are totally out of it and dont even have Adobe Reader on their machine, & don't know how to get it ( yes, we provide the links).....or it's some ancient version....no one can stop this one...
It almost always generates some kind ( at least one time) of "error message" which we do warn them about..., telling one, basically that "Acrobat doesnt even like this happening at all, and it could be detrimental to ones computer files", blah-blah...(this freaks grandma out really bad)...& usually they end up not even trying to send it... and then I get calls that even you wouldn't believe...& If they DO nut up and push the Red "Submit Form" button, it will usually send the thing to us (and also back to them at the "required email address" they furnished on the form, thats what the folks at the "fillable forms place" do) so, if it's performing it's functions, why it is having to complain?. What are we doing wrong?....and how can I fix it?...Will re-compiling it or saving it as a newer version of "FormsCentral" correct any of these problems ?
Ok, so that should keep you busy for a minute and we can start out with those problems...but the next thing is, how can I take advantage of YOUR re-direct & hosting services?, And will it get rid of the error messages, and the slowness, and the iOS incompatibilities ? (amazingly, the last iOS Reader version worked almost OK.. but the newest version doesnt seem to work with my form on my iphone4) If it will enable any version of the iOS to send my form correctly and more transparently, then it might be worth the money...$14.95 a MONTH you say. hmmmmm...Better be good.
Another problem is, that I really don't need 5000 forms a month submitted. I think its like 70-100 or less....Got any plans for that? Maybe I'm just not BIG ENOUGH to use Adobe's services, however in this case, I really don't care whose I do use as long as the product works most correctly for my customers as well as us. Like I said, If I'm doing the best I can, I won't change anything, and still use the other third party, If Adobe has a better solution, then i'm all for that as well. In the meantime, Thanks for any help you can provide on this...
Michael Corman
VinylCouture.com
(706) 326-7911 -
Hi!!
I urgently need help with this:
When I compile this in Flex Builder 3 it says: The element type 'mx:Application' must be terminated by the matching end-tag '</mx:Application>'.
but I have this end tag in my file, but when I try to switch from source view to desgin view it says, that: >/mx:Script> expected to terminate element at line 71, this is right at the end of the .mxml file. I have actionscript(.as) file for scripting data.
This is the mxml code to terminate apllication tag which I did as you can see:
MXML code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#007200, #000200]" width="1024" height="768" applicationComplete="popolni_vse()">
<mx:HTTPService id="bazaMME" url="lokalnabaza/baza_MME_svn.xml" showBusyCursor="true" resultFormat="e4x"/>
<mx:Script source="dajzaj.as"/>
<mx:states>
<mx:State name="Galerije">
<mx:SetProperty target="{panel1}" name="title" value="Galerije MME"/>
<mx:SetProperty target="{panel2}" name="title" value="opis slik"/>
<mx:SetProperty target="{panel3}" name="title" value="Opis Galerije"/>
<mx:AddChild relativeTo="{panel1}" position="lastChild">
<mx:HorizontalList x="0" y="22" width="713.09863" height="157.39436" id="ListaslikGalerije"></mx:HorizontalList>
</mx:AddChild>
<mx:SetProperty target="{text1}" name="text" value="MME opisi galerij "/>
<mx:AddChild relativeTo="{panel1}" position="lastChild">
<mx:Label x="217" y="346" text="labela za test" id="izbr"/>
</mx:AddChild>
<mx:SetProperty target="{label1}" name="text" value="26. November 2009@08:06"/>
<mx:SetProperty target="{label1}" name="x" value="845"/>
<mx:SetProperty target="{label1}" name="width" value="169"/>
<mx:SetProperty target="{Gale}" name="text" value="plac za Galerije"/>
</mx:State>
<mx:State name="Projekti"/>
</mx:states>
<mx:MenuBar id="MMEMenu" labelField="@label" showRoot="true" fillAlphas="[1.0, 1.0]" fillColors="[#043D01, #000000]" color="#9EE499" x="8" y="24"
itemClick="dajVsebino(event)" width="1006.1268" height="21.90141">
<mx:XMLList id="MMEmenuModel">
<menuitem label="O nas">
<menuitem label="reference podjetja" name="refMME" type="check" groupName="one"/>
<menuitem label="reference direktor" name="refdir" type="check" groupName="one"/>
<menuitem label="Kontakt" name="podatMME" groupName="one" />
<menuitem label="Kje smo" name="lokaMME" type="check" groupName="one" />
</menuitem>
<menuitem type="separator"/>
<menuitem label="Galerija">
<menuitem label="Slovenija" name="galSvn" type="check" groupName="one"/>
<menuitem label="Nemčija" name="galDeu" type="check" groupName="one" />
</menuitem>
<menuitem type="separator"/>
<menuitem label="projekti">
<menuitem label="Slovenija" name="projSvn" type="check" groupName="one"/>
<menuitem label="Nemčija" name="projDeu" type="check" groupName="one" />
<menuitem label="Madžarska" name="projHun" type="check" groupName="one"/>
</menuitem>
</mx:XMLList>
</mx:MenuBar>
<mx:Label x="845" y="10" text="25. November 2009@08:21" color="#FFFFFF" width="169" height="18.02817" id="label1"/>
<mx:Label x="746" y="10" text="zadnja posodobitev:" color="#FFFFFF"/>
<mx:Panel x="9" y="57" width="743.02814" height="688.4507" layout="absolute" title="Plac za Vsebino" id="panel1">
<mx:Text x="0" y="-0.1" text="MME vsebina" width="722.95776" height="648.4507" id="Gale"/>
</mx:Panel>
<mx:Label x="197.25" y="748.45" color="#FFFFFF" text="Copyright © 2009 MME d.o.o." fontSize="12" width="228.73239" height="20"/>
<mx:Label x="463.35" y="748.45" text="izdelava spletnih strani: FACTUM d.o.o." color="#FBFDFD" fontSize="12" width="287.60565" height="20"/>
<mx:Panel x="759" y="53" width="250" height="705.07043" layout="absolute" title="Plac za hitre novice" id="panel3">
<mx:Text x="0" y="0" text="MME novice" width="230" height="665.07043" id="text1"/>
<mx:Panel x="-10" y="325.35" width="250" height="336.61972" layout="absolute" title="začasna panela" color="#000203" themeColor="#4BA247" cornerRadius="10" backgroundColor="#4B9539" id="panel2">
<mx:Label x="145" y="53" text="vrednost" id="spremmen"/>
<mx:Label x="125" y="78" text="Label"/>
<mx:Label x="125" y="103" text="Label"/>
<mx:Label x="0" y="53" text="spremenljivka iz Menuja:"/>
<mx:Label x="45" y="78" text="Label"/>
<mx:Label x="45" y="103" text="Label"/>
</mx:Panel>
</mx:Panel>
<mx:Label x="9.9" y="10" text="plac za naslov MME vsebine" id="MMEnaslov" color="#040000"/>
</mx:states></mx:Application>I know it's been a while but… did you fix this?
It looks to me like you are terminating the <mx:Application> tag at the top. The opening tag should end like this: resultFormat="e4x">, not resultFormat="e4x"/> (Remove the /).
Carlos -
Urgent: im new and need help with this task!
I need help with converting the pseudo code to java code, Any help will b greatly appreciated!
// Declare a variable of type int, called "choice".
// Generate a random number between 0 inclusive and 7
// exclusive, and store that number into the variable
// "choice". (How do you generate a random number? Use the
// nextInt(int) method inside the random object, which takes
// a single int parameter. You can read about this method
// here:
// http://java.sun.com/j2se/1.5.0/docs/api/java/util/Random.html
// If "choice" is equal to 0, then create and return a new
// IBlock object, passing "game" as the parameter to IBlock's
// constructor.
// Otherwise, if "choice" is equal to 1, then create and
// return a new TBlock object, passing "game" as the
// parameter.
// Otherwise, if "choice" is equal to 2, then create and
// return a new OBlock object, passing "game" as the
// parameter.
// Otherwise, .... etc ....
// (please continue to do this for all of the 7 kinds of block
// that can be created)import java.util.*;
public class Echo{
public static void main(String[] args) {
//System.out.println("enter ur choice");
Random r=new Random();
int choice=r.nextInt(6);
switch(choice)
case 0:
IBlock object0=new IBlock("games");
break;
case 1:
TBlock object1=new TBlock("games");
break;
case 2:
OBlock object2=new OBlock("games");
break;
case 3:
LBlock object3=new LBlock("games");
break;
case 4:
JBlock object4=new JBlock("games");
break;
case 5:
SBlock object5=new SBlock("games");
break;
case 6:
ZBlock object6=new ZBlock("games");
break;
class TBlock
TBlock(String s)
System.out.print("TBlock called"+"\n value passed is "+s);
class IBlock
IBlock(String s)
System.out.print("IBlock called"+"\n value passed is "+s);
class JBlock
JBlock(String s)
System.out.print("JBlock called"+"\n value passed is "+s);
class OBlock
OBlock(String s)
System.out.print("OBlock called"+"\n value passed is "+s);
class LBlock
LBlock(String s)
System.out.print("LBlock called"+"\n value passed is "+s);
class SBlock
SBlock(String s)
System.out.print("SBlock called"+"\n value passed is "+s);
class ZBlock
ZBlock(String s)
System.out.print("ZBlock called"+"\n value passed is "+s);
} -
Need help with trim and null function
Hi all,
I need help with a query. I use the trim function to get the first three characters of a string. How do I write my query so if a null value occurs in combination with my trim to say 'Null' in my results?
ThanksHi,
Thanks for the reply. What am I doing wrong?
SELECT trim(SUBSTR(AL1.user_data_text,1,3)),NVL
(AL1.user_data_text,'XX')
FROM Table
I want the XX to appear in the same column as the
trim.The main thing you're doing wrong is not formatting your code. The solution may become obvious if you do.
What you're saying is:
SELECT trim ( SUBSTR (AL1.user_data_text, 1, 3))
, NVL ( AL1.user_data_text, 'XX' )
FROM Tablewhich makes it clear that you're SELECTing two columns, when you only want to have one.
If you want that column to be exactly like the first column you're currently SELECTing, except that when that column is NULL you want it to be 'XX', then you have to apply NVL to that column, like this:
SELECT NVL ( trim ( SUBSTR (AL1.user_data_text, 1, 3))
, 'XX'
FROM Table -
Need help with conditional query
guys this is just an extension of this post that Frank was helping me with. im reposting because my requirements have changes slightly and im having a hell of a time trying to modify the query.
here is the previous post.
need help with query that can look data back please help.
CREATE TABLE "FGL"
"FGL_GRNT_CODE" VARCHAR2(60),
"FGL_FUND_CODE" VARCHAR2(60),
"FGL_ACCT_CODE" VARCHAR2(60),
"FGL_ORGN_CODE" VARCHAR2(60),
"FGL_PROG_CODE" VARCHAR2(60),
"FGL_GRNT_YEAR" VARCHAR2(60),
"FGL_PERIOD" VARCHAR2(60),
"FGL_BUDGET" VARCHAR2(60)
)data
Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','11','00','400');
Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','1','100');
Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','1','0');
Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','11','1','400');
Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('360055','360055','7200','4730','02','10','1','400');
Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('360055','360055','7600','4730','02','10','1','400');
Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','14','200');
Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','10','14','100');
Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','14','200');
Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','2','100');
Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','11','2','600');
I need to find the greatest grant year for the grant by a period parameter.
once i find the greatest year i need to check the value of period 14 for that grant for the previous year and add it to the budget amount for that grant. however if their is an entry in the greatest year for period 00 then i need to ignore the period 14 of previous year and do this calculation current period +(current period - greatest year 00)
hope that makes sense so in other words with the new data above. if i was querying period two of grant year 11. i would end up with $800
because the greatest year is 11 it contains a period 0 with amount of $400 so my total should be
period 2 amount $ 600
period 0 amount $ 400 - period 2 amount of $600 = 200
600+200 = $800
if i query period 1 of grant 360055 i would just end up with 800 of grnt year 10.
i have tried to modify that query you supplied to me with no luck. I have tried for several day but im embarrased to say i just can get it to do what im trying to do .
can you please help me out.
here is the query supplied by frank kulash who gracefully put this together for me.
WITH got_greatest_year AS
SELECT fgl.* -- or whatever columns are needed
, MAX ( CASE
WHEN fgl_period = :given_period
THEN fgl_grnt_year
END
) OVER () AS greatest_year
FROM fgl
SELECT SUM (fgl_budget) AS total_budget -- or SELECT *
FROM got_greatest_year
WHERE ( fgl_grnt_year = greatest_year
AND fgl_period = :given_period
OR ( fgl_grnt_year = greatest_year - 1
AND fgl_period = 14
;MiguelHi, Miguel,
Are you waying that, when the greatest year that has :given_period also has period='00' (or '0', or whatever you want to use), then you want to double the budget from the given_period (as well as subtract the budget from the '00', and not count the pevious year's '14')? If so, add another condition to the CASE statement which decides what you're SUMming:
WITH got_greatest_year AS
SELECT TO_NUMBER (fgl_grnt_year) AS grnt_year
, fgl_period
, TO_NUMBER (fgl_budget) AS budget
, MAX ( CASE
WHEN fgl_period = :given_period
THEN TO_NUMBER (fgl_grnt_year)
END
) OVER () AS greatest_year
FROM fgl
, got_cnt_00 AS
SELECT grnt_year
, fgl_period
, budget
, greatest_year
, COUNT ( CASE
WHEN grnt_year = greatest_year
AND fgl_period = '00'
THEN 1
END
) OVER () AS cnt_00
FROM got_greatest_year
SELECT SUM ( CASE
WHEN grnt_year = greatest_year -- New
AND fgl_period = :given_period -- New
AND cnt_00 > 0 THEN budget * 2 -- New
WHEN grnt_year = greatest_year
AND fgl_period = :given_period THEN budget
WHEN grnt_year = greatest_year
AND fgl_period = '00' THEN -budget
WHEN grnt_year = greatest_year - 1
AND fgl_period = '14'
AND cnt_00 = 0 THEN budget
END
) AS total_budget
FROM got_cnt_00
;You'll notice this is the same as the previous query I posted, except for 3 lines maked "New". -
I am currently living in Europe and using my iPhone on airplane mode when I have wifi. My iMessage is switched to my icloud e-mail address and when I go to my setting to switch it back to my number, it is grayed out and not an option to click. This was working before with my number so I know that it's not from being on airplane mode. How do I get it back to my number?
They need to go into their settings>messages and make sure iMessage is on. Also they should click on the send & receive button to make sure their phone number is selected.
-
Need Help With File Matching Records
I need help with my file matching program.
Here is how it suppose to work: FileMatch class should contain methods to read oldmast.txt and trans.txt. When a match occurs (i.e., records with the same account number appear in both the master file and the transaction file), add the dollar amount in the transaction record to the current balance in the master record, and write the "newmast.txt" record. (Assume that purchases are indicated by positive amounts in the transaction file and payments by negative amounts.)
When there is a master record for a particular account, but no corresponding transaction record, merely write the master record to "newmast.txt". When there is a transaction record, but no corresponding master record, print to a log file the message "Unmatched transaction record for account number ..." (fill in the account number from the transaction record). The log file should be a text file named "log.txt".
Here is my following program code:
// Exercise 14.8: CreateTextFile.java
// creates a text file
import java.io.FileNotFoundException;
import java.lang.SecurityException;
import java.util.Formatter;
import java.util.FormatterClosedException;
import java.util.NoSuchElementException;
import java.util.Scanner;
import org.egan.AccountRecord;
import org.egan.TransactionRecord;
public class CreateTextFile
private Formatter output1; // object used to output text to file
private Formatter output2; // object used to output text to file
// enable user to open file
public void openTransFile()
try
output1 = new Formatter("trans.txt");
catch (SecurityException securityException)
System.err.println("You do not have write access to this file.");
System.exit(1);
} // end catch
catch (FileNotFoundException filesNotFoundException)
System.err.println("Error creating file.");
System.exit(1);
} // end method openTransFile
// enable user to open file
public void openOldMastFile()
try
output2 = new Formatter("oldmast.txt");
catch (SecurityException securityException)
System.err.println("You do not have write access to this file.");
System.exit(1);
} // end catch
catch (FileNotFoundException filesNotFoundException)
System.err.println("Error creating file.");
System.exit(1);
} // end method openOldMastFile
// add transaction records to file
public void addTransactionRecords()
// object to be written to file
TransactionRecord record1 = new TransactionRecord();
Scanner input1 = new Scanner(System.in);
System.out.printf("%s\n%s\n%s\n%s\n\n",
"To terminate input, type the end-of-file indicator",
"when you are prompted to enter input.",
"On UNIX/Linux/Mac OS X type <ctrl> d then press Enter",
"On Windows type <ctrl> z then press Enter");
System.out.printf("%s\n%s",
"Enter account number (> 0) and amount.","? ");
while (input1.hasNext()) // loop until end-of-file indicator
try // output values to file
// retrieve data to be output
record1.setAccount(input1.nextInt()); // read account number
record1.setAmount(input1.nextDouble()); // read amount
if (record1.getAccount() > 0)
// write new record
output1.format("%d %.2f\n", record1.getAccount(), record1.getAmount());
} // end if
else
System.out.println("Account number must be greater than 0.");
} // end else
} // end try
catch (FormatterClosedException formatterClosedException)
System.err.println("Error writing to file.");
return;
} // end catch
catch (NoSuchElementException elementException)
System.err.println("Invalid input. Please try again.");
input1.nextLine(); // discard input so user can try again
} // end catch
System.out.printf("%s %s\n%s", "Enter account number (> 0) ",
"and amount.","? ");
} // end while
} // end method addTransactionRecords
// add account records to file
public void addAccountRecords()
// object to be written to file
AccountRecord record2 = new AccountRecord();
Scanner input2 = new Scanner(System.in);
System.out.printf("%s\n%s\n%s\n%s\n\n",
"To terminate input, type the end-of-file indicator",
"when you are prompted to enter input.",
"On UNIX/Linux/Mac OS X type <ctrl> d then press Enter",
"On Windows type <ctrl> z then press Enter");
System.out.printf("%s\n%s",
"Enter account number (> 0), first name, last name and balance.","? ");
while (input2.hasNext()) // loop until end-of-file indicator
try // output values to file
// retrieve data to be output
record2.setAccount(input2.nextInt()); // read account number
record2.setFirstName(input2.next()); // read first name
record2.setLastName(input2.next()); // read last name
record2.setBalance(input2.nextDouble()); // read balance
if (record2.getAccount() > 0)
// write new record
output2.format("%d %s %s %.2f\n", record2.getAccount(), record2.getFirstName(),
record2.getLastName(), record2.getBalance());
} // end if
else
System.out.println("Account number must be greater than 0.");
} // end else
} // end try
catch (FormatterClosedException formatterClosedException)
System.err.println("Error writing to file.");
return;
} // end catch
catch (NoSuchElementException elementException)
System.err.println("Invalid input. Please try again.");
input2.nextLine(); // discard input so user can try again
} // end catch
System.out.printf("%s %s\n%s", "Enter account number (> 0),",
"first name, last name and balance.","? ");
} // end while
} // end method addAccountRecords
// close file
public void closeTransFile()
if (output1 != null)
output1.close();
} // end method closeTransFile
// close file
public void closeOldMastFile()
if (output2 != null)
output2.close();
} // end method closeOldMastFile
} // end class CreateTextFile--------------------------------------------------------------------------------------------------
// Exercise 14.8: CreateTextFileTest.java
// Testing class CreateTextFile
public class CreateTextFileTest
// main method begins program execution
public static void main( String args[] )
CreateTextFile application = new CreateTextFile();
application.openTransFile();
application.addTransactionRecords();
application.closeTransFile();
application.openOldMastFile();
application.addAccountRecords();
application.closeOldMastFile();
} // end main
} // end class CreateTextFileTest-------------------------------------------------------------------------------------------------
// Exercise 14.8: TransactionRecord.java
// A class that represents on record of information
package org.egan; // packaged for reuse
public class TransactionRecord
private int account;
private double amount;
// no-argument constructor calls other constructor with default values
public TransactionRecord()
this(0,0.0); // call two-argument constructor
} // end no-argument AccountRecord constructor
// initialize a record
public TransactionRecord(int acct, double amt)
setAccount(acct);
setAmount(amt);
} // end two-argument TransactionRecord constructor
// set account number
public void setAccount(int acct)
account = acct;
} // end method setAccount
// get account number
public int getAccount()
return account;
} // end method getAccount
// set amount
public void setAmount(double amt)
amount = amt;
} // end method setAmount
// get amount
public double getAmount()
return amount;
} // end method getAmount
} // end class TransactionRecord -------------------------------------------------------------------------------------------------
// Exercise 14.8: AccountRecord.java
// A class that represents on record of information
package org.egan; // packaged for reuse
import org.egan.TransactionRecord;
public class AccountRecord
private int account;
private String firstName;
private String lastName;
private double balance;
// no-argument constructor calls other constructor with default values
public AccountRecord()
this(0,"","",0.0); // call four-argument constructor
} // end no-argument AccountRecord constructor
// initialize a record
public AccountRecord(int acct, String first, String last, double bal)
setAccount(acct);
setFirstName(first);
setLastName(last);
setBalance(bal);
} // end four-argument AccountRecord constructor
// set account number
public void setAccount(int acct)
account = acct;
} // end method setAccount
// get account number
public int getAccount()
return account;
} // end method getAccount
// set first name
public void setFirstName(String first)
firstName = first;
} // end method setFirstName
// get first name
public String getFirstName()
return firstName;
} // end method getFirstName
// set last name
public void setLastName(String last)
lastName = last;
} // end method setLastName
// get last name
public String getLastName()
return lastName;
} // end method getLastName
// set balance
public void setBalance(double bal)
balance = bal;
} // end method setBalance
// get balance
public double getBalance()
return balance;
} // end method getBalance
// combine balance and amount
public void combine(TransactionRecord record)
balance = (getBalance() + record.getAmount());
} // end method combine
} // end class AccountRecord -------------------------------------------------------------------------------------------------
// Exercise 14.8: FileMatch.java
import java.io.File;
import java.io.FileNotFoundException;
import java.lang.IllegalStateException;
import java.util.NoSuchElementException;
import java.util.Scanner;
import java.util.Formatter;
import java.util.FormatterClosedException;
import org.egan.AccountRecord;
import org.egan.TransactionRecord;
public class FileMatch
private Scanner inTransaction;
private Scanner inOldMaster;
private Formatter outNewMaster;
private Formatter theLog;
// enable user to open file
public void openTransFile()
try
inTransaction = new Scanner(new File("trans.txt"));
} // end try
catch (FileNotFoundException fileNotFoundException)
System.err.println("Error opening file.");
System.exit(1);
} // end catch
} // end method openTransFile
// enable user to open file
public void openOldMastFile()
try
inOldMaster = new Scanner(new File("oldmast.txt"));
} // end try
catch (FileNotFoundException fileNotFoundException)
System.err.println("Error opening file.");
System.exit(1);
} // end catch
} // end method openOldMastFile
// enable user to open file
public void openNewMastFile()
try
outNewMaster = new Formatter("newmast.txt");
catch (SecurityException securityException)
System.err.println("You do not have write access to this file.");
System.exit(1);
} // end catch
catch (FileNotFoundException filesNotFoundException)
System.err.println("Error creating file.");
System.exit(1);
} // end method openNewMastFile
// enable user to open file
public void openLogFile()
try
theLog = new Formatter("log.txt");
catch (SecurityException securityException)
System.err.println("You do not have write access to this file.");
System.exit(1);
} // end catch
catch (FileNotFoundException filesNotFoundException)
System.err.println("Error creating file.");
System.exit(1);
} // end method openLogFile
// update records
public void updateRecords()
TransactionRecord transaction = new TransactionRecord();
AccountRecord account = new AccountRecord();
try // read records from file using Scanner object
System.out.println("Start file matching.");
while (inTransaction.hasNext() && inOldMaster.hasNext())
transaction.setAccount(inTransaction.nextInt()); // read account number
transaction.setAmount(inTransaction.nextDouble()); // read amount
account.setAccount(inOldMaster.nextInt()); // read account number
account.setFirstName(inOldMaster.next()); // read first name
account.setLastName(inOldMaster.next()); // read last name
account.setBalance(inOldMaster.nextDouble()); // read balance
if (transaction.getAccount() == account.getAccount())
while (inTransaction.hasNext() && transaction.getAccount() == account.getAccount())
account.combine(transaction);
outNewMaster.format("%d %s %s %.2f\n",
account.getAccount(), account.getFirstName(), account.getLastName(),
account.getBalance());
transaction.setAccount(inTransaction.nextInt()); // read account number
transaction.setAmount(inTransaction.nextDouble()); // read amount
else if (transaction.getAccount() != account.getAccount())
outNewMaster.format("%d %s %s %.2f\n",
account.getAccount(), account.getFirstName(), account.getLastName(),
account.getBalance());
theLog.format("%s%d","Unmatched transaction record for account number ",transaction.getAccount());
} // end while
System.out.println("Finish file matching.");
} // end try
catch (NoSuchElementException elementException)
System.err.println("File improperly formed.");
inTransaction.close();
inOldMaster.close();
System.exit(1);
} // end catch
catch (IllegalStateException stateException)
System.err.println("Error reading from file.");
System.exit(1);
} // end catch
} // end method updateRecords
// close file and terminate application
public void closeTransFile()
if (inTransaction != null)
inTransaction.close();
} // end method closeTransFile
// close file and terminate application
public void closeOldMastFile()
if (inOldMaster != null)
inOldMaster.close();
} // end method closeOldMastFile
// close file
public void closeNewMastFile()
if (outNewMaster != null)
outNewMaster.close();
} // end method closeNewMastFile
// close file
public void closeLogFile()
if (theLog != null)
theLog.close();
} // end method closeLogFile
} // end class FileMatch-------------------------------------------------------------------------------------------------
// Exercise 14.8: FileMatchTest.java
// Testing class FileMatch
public class FileMatchTest
// main method begins program execution
public static void main( String args[] )
FileMatch application = new FileMatch();
application.openTransFile();
application.openOldMastFile();
application.openNewMastFile();
application.openLogFile();
application.updateRecords();
application.closeLogFile();
application.closeNewMastFile();
application.closeOldMastFile();
application.closeTransFile();
} // end main
} // end class FileMatchTest-------------------------------------------------------------------------------------------------
Sample data for master file:
Master file
Account Number Name Balance
100 Alan Jones 348.17
300 Mary Smith 27.19
500 Sam Sharp 0.00
700 Suzy Green -14.22Sample data for transaction file:
Transaction file Transaction
Account Number Amount
100 27.14
300 62.11
300 83.89
400 100.56
700 80.78
700 1.53
900 82.17 -------------------------------------------------------------------------------------------------
My FileMatch class program above has bugs in it.
The correct results for the newmast.txt:
100 Alan Jones 375.31
300 Mary Smith 173.19
500 Sam Sharp 0.00
700 Suzy Green 68.09The correct results for the log.txt:
Unmatched transaction record for account number 400Unmatched transaction record for account number 900------------------------------------------------------------------------------------------------
My results for the newmast.txt:
100 Alan Jones 375.31
300 Mary Smith 111.08
500 Sam Sharp 0.00
700 Suzy Green -12.69My results for the log.txt
Unmatched transaction record for account number 700-------------------------------------------------------------------------------------------------
I am not sure what is wrong with my code above to make my results different from the correct results.
Much help is appreciated. Please help.From the output, it looks like one problem is just formatting -- apparently you're including a newline in log entries and not using tabs for the newmast output file.
As to why the numbers are off -- just from glancing over it, it appears that the problem is when you add multiple transaction values. Since account.combine() is so simple, I suspect that you're either adding creating transaction objects incorrectly or not creating them when you should be.
Create test input data that isolates a single case of this (e.g., just the Mary Smith case), and then running your program in a debugger or adding debugging code to the add/combine method, so you can see what's happening in detail.
Also I'd recommend reconsidering your design. It's a red flag if a class has a name with "Create" in it. Classes represent bundles of independant state and transformations on that state, not things to do. -
I need Help with a website I've created
I need help with a website I've created (www.jonathanhazelwood.com/lighthouse) I created the folowing site with dreamweaver at my current resolution 1366 by 768. Looks great on my screen resolution but if it is viewed on other resolutions the menu moves and some of the text above and below. How can I keep all content centered and working like it does on 1366 by 768 on all resolutions. The htm to my site is below I started off with a blank template through dreamweaver CS5.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The Lighthouse Church</title>
<style type="text/css">
<!--
body {
font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
background: #42413C;
margin: 0;
padding: 0;
color: #000;
background-color: #000;
/* ~~ Element/tag selectors ~~ */
ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
padding: 0;
margin: 0;
h1, h2, h3, h4, h5, h6, p {
margin-top: 0; /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
padding-right: 15px;
padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
border: none;
/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
a:link {
color: #42413C;
text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
a:visited {
color: #6E6C64;
text-decoration: underline;
a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
text-decoration: none;
/* ~~ this fixed width container surrounds all other elements ~~ */
.container {
width: 960px;
background: #FFF;
margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */
/* ~~ This is the layout information. ~~
1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.
.content {
padding: 10px 0;
/* ~~ miscellaneous float/clear classes ~~ */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
.fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
float: left;
margin-right: 8px;
.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the overflow:hidden on the .container is removed */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
#apDiv1 {
position:absolute;
width:352px;
height:2992px;
z-index:1;
top: 171px;
left: 507px;
#apDiv2 {
position:absolute;
width:961px;
height:1399px;
z-index:1;
left: 187px;
top: 1px;
#apDiv3 {
position:absolute;
width:961px;
height:1001px;
z-index:1;
top: -2px;
#apDiv4 {
position:absolute;
width:963px;
height:58px;
z-index:1;
left: 0px;
top: 101px;
#apDiv5 {
position:absolute;
width:961px;
height:1505px;
z-index:1;
top: -5px;
#apDiv6 {
position:absolute;
width:962px;
height:150px;
z-index:1;
left: 0px;
top: -1px;
#apDiv7 {
position:absolute;
width:361px;
height:25px;
z-index:2;
left: 35px;
top: 1308px;
#apDiv8 {
position:absolute;
width:320px;
height:24px;
z-index:2;
left: 200px;
top: 1479px;
#apDiv9 {
position:absolute;
width:962px;
height:63px;
z-index:3;
left: -10px;
top: -1292px;
#apDiv10 {
position:absolute;
width:270px;
height:27px;
z-index:2;
left: 200px;
top: 1478px;
#apDiv11 {
position:absolute;
width:961px;
height:44px;
z-index:3;
left: 195px;
top: 183px;
-->
</style>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#apDiv12 {
position:absolute;
width:295px;
height:23px;
z-index:4;
left: 198px;
top: 1px;
#apDiv13 {
position:absolute;
width:135px;
height:22px;
z-index:5;
left: 1001px;
top: 3px;
#apDiv14 {
position:absolute;
width:309px;
height:992px;
z-index:1;
left: 33px;
top: 479px;
#apDiv15 {
position:absolute;
width:327px;
height:999px;
z-index:1;
left: 324px;
#apDiv16 {
position:absolute;
width:262px;
height:1000px;
z-index:2;
left: 674px;
top: 477px;
#apDiv17 {
position:absolute;
width:85px;
height:34px;
z-index:1;
left: -379px;
top: 1001px;
#apDiv18 {
position:absolute;
width:200px;
height:115px;
z-index:6;
#apDiv19 {
position:absolute;
width:168px;
height:31px;
z-index:3;
left: 448px;
top: 1451px;
#apDiv20 {
position:absolute;
width:94px;
height:33px;
z-index:3;
left: 384px;
top: 1477px;
body {
background-color: #000;
margin-left: 0px;
margin-right: 0px;
#apDiv21 {
position:absolute;
width:920px;
height:200px;
z-index:4;
left: 19px;
top: 233px;
</style>
</head>
<body>
<div class="container">
<div class="content">
<div id="apDiv5">
<div id="apDiv16">
<div id="apDiv17">
<map name="Map2" id="Map2">
<area shape="rect" coords="4,2,77,28" href="http://www.myspace.com/lighthousechurch1" />
</map>
<img src="paypal-donate-button.png" width="83" height="33" border="0" usemap="#Map" />
<map name="Map" id="Map">
<area shape="rect" coords="2,2,80,30" href="https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=HgApKd0bxyPQv1ixwBW3HgWXaLxPIiT Po9gSsRELLQp72IZ2-_8uvSmCLRO&dispatch=5885d80a13c0db1f8e263663d3faee8d9384d85353843a619606 282818e091d0" />
</map>
</div>
</div>
<div id="apDiv21">
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<p><img src="faithexplosion.png" width="314" height="225" /></p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</div>
<div id="apDiv14">
<div id="apDiv15">
<div>
<div>
<p> Special Message from Perry Stone </p>
<h2> Was Jesus Born on December 25?</h2>
<p> 12/20/2010 </p>
<p><img alt="iStock_000003631829XSmall" src="http://www.voe.org/images/iStock_000003631829XSmall.jpg" width="300" height="234" /></p>
<p>Last year, in response to the growing number of Christians who celebrate Hanukkah but hate Christmas, I wrote an article for this website titled “Hanukkah or Christmas?” I explained why I think Jesus was either conceived or birthed on December 25.</p>
</div>
</div>
<div>
<div><a href="http://www.voe.org/Prophecy-Update/what-happened-to-global-warming.html"> READ MORE</a>
<p> Prophecy Update </p>
<h2> What Happened to Global Warming?</h2>
<p> 12/17/2010 </p>
<p> </p>
</div>
</div>
<div>
<div></div>
</div>
<div>
<div></div>
</div>
</div>
<div>
<p><font size="2">Special Word</font></p>
<p><font size="2">January 7th, 2011</font></p>
<p> <font size="2">Dear Viewers:</font></p>
<p><font size="2">We have now entered into one of the most trying times; but also one of the most glorious times in church history. Many things are coming upon the world and also upon the church and we (the church) must be totally prepared to take up our cross daily and venture out into the lost and</font></p>
<p> <a href="http://sermon.lighthousechurchinc.org/2011/01/07/special-word-1711-evangelist-barbara-lync h.aspx" target="_parent">Click Here for More</a></p>
</div>
<p> </p>
<div></div>
<div>
<!--// weAddFlash("lhi09hdr.swf",800, 100,"true","true","high","showall","true","#ffffff"); //--></div>
<div></div>
<p> </p>
</div>
<img src="lighthousegraphic2.jpg" width="960" height="1509" />
<div id="apDiv20"><img src="myspacebutton.jpg" width="89" height="30" border="0" usemap="#Map3" />
<map name="Map3" id="Map3">
<area shape="rect" coords="3,2,87,28" href="http://www.myspace.com/lighthousechurch1" />
</map>
</div>
</div>
<p> </p>
</div>
<!-- end .container --></div>
<div id="apDiv10"><font size="1"><font color="#FFFFFF">Copyright 2011 The Lighthouse Church Inc.</font></font></div>
<div id="apDiv11">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a href="#">Home</a> </li>
<li><a href="#" class="MenuBarItemSubmenu">Our Pastor</a>
<ul>
<li><a href="#">Fresh Word</a></li>
<li><a href="#">Itinerary</a></li>
<li><a href="#">Prophetic Word</a></li>
<li><a href="#">Sermons</a></li>
<li><a href="#">Special Words</a></li>
<li><a href="#">Word of Month</a></li>
</ul>
</li>
<li><a href="#">Men Ministry</a></li>
<li><a href="#" class="MenuBarItemSubmenu">Ministers</a>
<ul>
<li><a href="#">Chris Gore</a></li>
</ul>
</li>
<li><a href="#" class="MenuBarItemSubmenu">Our Church</a>
<ul>
<li><a href="#">Contact Us</a></li>
<li><a href="#">Donate</a></li>
<li><a href="#">Events</a></li>
<li><a href="#">Our Store</a></li>
<li><a href="#">Prayer Request</a></li>
<li><a href="#">Salvation</a></li>
<li><a href="#">Subscribe</a></li>
<li><a href="#">Vision</a></li>
<li><a href="#">We Believe</a></li>
</ul>
</li>
<li><a href="#" class="MenuBarItemSubmenu">Resources</a>
<ul>
<li><a href="#">Prepare for Disaster</a></li>
<li><a href="#">How to Fast</a></li>
<li><a href="#">Heaven & Hell</a></li>
<li><a href="#">Warfare Prayers</a></li>
<li><a href="#">Wisdom Words</a></li>
</ul>
</li>
<li><a href="#" class="MenuBarItemSubmenu">Prophetic</a>
<ul>
<li><a href="#">Article Archive</a></li>
<li><a href="#">Audio Prophecies</a></li>
<li><a href="#">Color for Year</a></li>
<li><a href="#">Major Articles</a></li>
<li><a href="#">Prophecy Archive</a></li>
<li><a href="#">Prophetic Articles</a></li>
<li><a href="#">Word for Year</a></li>
</ul>
</li>
</ul>
</div>
<div id="apDiv12"><font size="1"><font color="#FFFFFF">6 South Railroad Ave Wyoming,DE 19934</font></font></div>
<div id="apDiv13"><font size="1"><font color="#FFFFFF">Phone:(302) 697-1472</font></font></div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>Look at all the apdiv's you have. Those are absolutely positioned layers. I'm assuming by your post that you are very new to Dreamweaver and HTML and CSS. I would highly recommend not using absolutely positioned layers until you have a better grasp on HTML and CSS.
Looking at your code I would suggest that you consider using one of Dreamweaver's built in, or downloadable templates as a starting point and work from there.
http://www.adobe.com/devnet/dreamweaver/articles/dreamweaver_custom_templates.html -
Need help with home work see what you got
1. The MEMBERS table has the phone number broken into three fields:
CountryCode - e,g., '1' for the United States
AreaCode - e.g., three digits for the United States
Phone - e.g., 7 digits, with or without a dash between the first three digits (Exchange) and last four digits (Line)
Any or all of the fields may be missing (null) or blank or contain only spaces.
Write a T-SQL statement to concatenate the three fields into a complete phone number
with the format: CountryCode(AreaCode)Exchange-Line, e.g., 1(816)123-4567
If no Phone is present, return a blank string.
If no area code is present, return only the Phone number. Do not return an empty pair of parentheses or the CountryCode.
2. The PERSON_CAMPAIGN table contains a row for each war/conflict the member served in. A member may have served in multiple conflicts
For this purpose, each row contains:
PersonID - unique member identifier
Campaign - name of war/conflict
Write a T-SQL statement to return one row per member with all campaigns concatenated into a single field and separated by commas
E.g., PersonID Campaigns
12345678 Global War on Terror, Iraq, Afghanistan
3. The MEMBER_STATISTICS table contains one row per post.
For this purpose, each row contains the post's:
Division - a way of grouping posts by their member size
Department - the state in which the post is located
PostNumber - unique post identifier
Reinstated - count of members whose annual subscription had lapsed for at least two years but who have now subscribed for the current year
Write a T-SQL statement to determine the top ten posts in each division based on the number of reinstated members, with a minimum of 50 reinstated members.
Rank them by highest to lowest reinstated count.
Return their Division, Rank, Department, PostNumber, ReinstatedI got 3 home work questions think i have the first two need help with the last one please.
Kinda stuck on #3 hard I can see data not sure witch to sum or count?
1. The MEMBERS table has the phone number broken into three fields:
CountryCode - e,g., '1' for the United States
AreaCode - e.g., three digits for the United States
Phone - e.g., 7 digits, with or without a dash between the first three digits (Exchange) and last four digits (Line)
Any or all of the fields may be missing (null) or blank or contain only spaces.
Write a T-SQL statement to concatenate the three fields into a complete phone number
with the format: CountryCode(AreaCode)Exchange-Line, e.g., 1(816)123-4567
If no Phone is present, return a blank string.
If no area code is present, return only the Phone number. Do not return an empty pair of parentheses or the CountryCode.
ANSWER******************
Notes: created a funtion to format the phone
Then used the this function in a select to concatenate Phone
CREATE FUNCTION dbo.FORMATPHONE (@CountryCode int, @AreCode int, @Phone VARCHAR(14))
RETURNS VARCHAR(14)
AS BEGIN
DECLARE @ReturnPhone VARCHAR(14)
DECLARE @NewPhone VARCHAR(14)
-- Note case sets newphone to null if phone null or '' also to see if phone has '-' in it if not inserts into newphone
case
when @Phone is null or @Phone = ''
Then SET @NewPhone = Null
when @Phone = substring(@Phone,4,1)='-'
Then SET @NewPhone = @Phone
else
SET @NewPhone = substring(@Phone,1,3)+'-'+ substring(@Phone,4,4)
End
case
when @NewPhone is null then SET @ReturnPhone = @NewPhone
elese case
when @AreCode is null or @AreCode = '' then SET @ReturnPhone = @NewPhone
else
SET @ReturnPhone = @CountryCode + '(' + @AreCode + ')' + @NewPhone
END
END
RETURN @ReturnPhone
END
select dbo.FORMATPHONE(CountryCode,AreCode,Phone)
from MEMBERS
2. The PERSON_CAMPAIGN table contains a row for each war/conflict the member served in. A member may have served in multiple conflicts
For this purpose, each row contains:
PersonID - unique member identifier
Campaign - name of war/conflict
Write a T-SQL statement to return one row per member with all campaigns concatenated into a single field and separated by commas
E.g., PersonID Campaigns
12345678 Global War on Terror, Iraq, Afghanistan
ANSWER******************
SELECT PersonID,
STUFF(( SELECT ',' + Campaign AS [text()]
FROM PERSON_CAMPAIGN
WHERE (PersonID = Results.ID)
FOR XML PATH('')
), 1, 1, '' )
AS Campaigns
FROM PERSON_CAMPAIGN Results
3. The MEMBER_STATISTICS table contains one row per post.
For this purpose, each row contains the post's:
Division - a way of grouping posts by their member size
Department - the state in which the post is located
PostNumber - unique post identifier
Reinstated - count of members whose annual subscription had lapsed for at least two years but who have now subscribed for the current year
Write a T-SQL statement to determine the top ten posts in each division based on the number of reinstated members, with a minimum of 50 reinstated members.
Rank them by highest to lowest reinstated count.
Return their Division, Rank, Department, PostNumber, Reinstated -
Need help with calculator project for an assignment...
Hi all, I please need help with my calculator project that I have to do for an assignment.
Here is the project's specifications that I need to do"
"""Create a console calculator applicaion that:
* Takes one command line argument: your name and surname. When the
program starts, display the date and time with a welcome message for the
user.
* Display all the available options to the user. Your calculator must include
the arithmetic operations as well as at least five scientific operations of the
Math class.
-Your program must also have the ability to round a number and
truncate it.
-When you multiply by 2, you should not use the '*' operator to perform the
operation.
-Your program must also be able to reverse the sign of a number.
* Include sufficient error checking in your program to ensure that the user
only enters valid input. Make use of the String; Character, and other
wrapper classes to help you.
* Your program must be able to do conversions between decimal, octal and
hex numbers.
* Make use of a menu. You should give the user the option to end the
program when entering a certain option.
* When the program exits, display a message for the user, stating the
current time, and calculate and display how long the user used your
program.
* Make use of helper classes where possible.
* Use the SDK to run your program."""
When the program starts, it asks the user for his/her name and surname. I got the program to ask the user again and again for his/her name and surname
when he/she doesn't insert anything or just press 'enter', but if the user enters a number for the name and surname part, the program continues.
Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??
Here is the programs code that I've written so far:
{code}
import java.io.*;
import java.util.*;
import java.text.*;
public class Project {
private static String nameSurname = "";
private static String num1 = null;
private static String num2 = null;
private static String choice1 = null;
private static double answer = 0;
private static String more;
public double Add() {
answer = (Double.parseDouble(num1) + Double.parseDouble(num2));
return answer;
public double Subtract() {
answer = (Double.parseDouble(num1) - Double.parseDouble(num2));
return answer;
public double Multiply() {
answer = (Double.parseDouble(num1) * Double.parseDouble(num2));
return answer;
public double Divide() {
answer = (Double.parseDouble(num1) / Double.parseDouble(num2));
return answer;
public double Modulus() {
answer = (Double.parseDouble(num1) % Double.parseDouble(num2));
return answer;
public double maximumValue() {
answer = (Math.max(Double.parseDouble(num1), Double.parseDouble(num2)));
return answer;
public double minimumValue() {
answer = (Math.min(Double.parseDouble(num1), Double.parseDouble(num2)));
return answer;
public double absoluteNumber1() {
answer = (Math.abs(Double.parseDouble(num1)));
return answer;
public double absoluteNumber2() {
answer = (Math.abs(Double.parseDouble(num2)));
return answer;
public double Squareroot1() {
answer = (Math.sqrt(Double.parseDouble(num1)));
return answer;
public double Squareroot2() {
answer = (Math.sqrt(Double.parseDouble(num2)));
return answer;
public static String octalEquivalent1() {
int iNum1 = Integer.parseInt(num1);
String octal1 = Integer.toOctalString(iNum1);
return octal1;
public static String octalEquivalent2() {
int iNum2 = Integer.parseInt(num2);
String octal2 = Integer.toOctalString(iNum2);
return octal2;
public static String hexadecimalEquivalent1() {
int iNum1 = Integer.parseInt(num1);
String hex1 = Integer.toHexString(iNum1);
return hex1;
public static String hexadecimalEquivalent2() {
int iNum2 = Integer.parseInt(num2);
String hex2 = Integer.toHexString(iNum2);
return hex2;
public double Round1() {
answer = Math.round(Double.parseDouble(num1));
return answer;
public double Round2() {
answer = Math.round(Double.parseDouble(num2));
return answer;
SimpleDateFormat format1 = new SimpleDateFormat("EEEE, dd MMMM yyyy");
Date now = new Date();
SimpleDateFormat format2 = new SimpleDateFormat("hh:mm a");
static Date timeIn = new Date();
public static long programRuntime() {
Date timeInD = timeIn;
long timeOutD = System.currentTimeMillis();
long msec = timeOutD - timeInD.getTime();
float timeHours = msec / 1000;
return (long) timeHours;
DecimalFormat decimals = new DecimalFormat("#0.00");
public String insertNameAndSurname() throws IOException{
boolean inputCorrect = false;
while (inputCorrect == false) {
while (nameSurname == null || nameSurname.length() == 0) {
for (int i = 0; i < nameSurname.length(); i++) {
if ((nameSurname.charAt(i) > 'a') && (nameSurname.charAt(i) < 'Z')){
inputCorrect = true;
else{
inputCorrect = false;
break;
try {
BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
System.out.print("Please enter your name and surname: ");
nameSurname = inStream.readLine();
inputCorrect = true;
}catch (IOException ex) {
System.out.println("You did not enter your name and surname, " + nameSurname + " is not a name, please enter your name and surname :");
inputCorrect = false;
System.out.println("\nA warm welcome " + nameSurname + " ,todays date is: " + format1.format(now));
System.out.println("and the time is now exactly " + format2.format(timeIn) + ".");
return nameSurname;
public String inputNumber1() throws IOException {
boolean inputCorrect = false;
while (inputCorrect == false) {
try {
BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
System.out.print("\nPlease enter a number you want to do a calculation with and hit <ENTER>: ");
num1 = br.readLine();
double number1 = Double.parseDouble(num1);
System.out.println("\nThe number you have entered is: " + number1);
inputCorrect = true;
} catch (NumberFormatException nfe) {
System.out.println("\nYou did not enter a valid number: " + "\""+ num1 + "\" is not a number!!");
inputCorrect = false;
return num1;
public String calculatorChoice() throws IOException {
System.out.println("Please select an option of what you would like to do with this number from the menu below and hit <ENTER>: ");
System.out.println("\n*********************************************");
System.out.println("---------------------------------------------");
System.out.println("Please select an option from the list below: ");
System.out.println("---------------------------------------------");
System.out.println("1 - Add");
System.out.println("2 - Subtract");
System.out.println("3 - Multiply");
System.out.println("4 - Divide (remainder included)");
System.out.println("5 - Maximum and minimum value of two numbers");
System.out.println("6 - Squareroot");
System.out.println("7 - Absolute value of numbers");
System.out.println("8 - Octal and Hexadecimal equivalent of numbers");
System.out.println("9 - Round numbers");
System.out.println("0 - Exit program");
System.out.println("**********************************************");
boolean inputCorrect = false;
while (inputCorrect == false) {
try {
BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
System.out.print("Please enter your option and hit <ENTER>: ");
choice1 = inStream.readLine();
int c1 = Integer.parseInt(choice1);
System.out.println("\nYou have entered choice number: " + c1);
inputCorrect = true;
} catch (NumberFormatException nfe) {
System.out.println("You did not enter a valid choice number: " + "\""+ choice1 + "\" is not in the list!!");
inputCorrect = false;
return choice1;
public String inputNumber2() throws IOException {
boolean inputCorrect = false;
while (inputCorrect == false) {
try {
BufferedReader br2 = new BufferedReader (new InputStreamReader(System.in));
System.out.print("\nPlease enter another number you want to do the calculation with and hit <ENTER>: ");
num2 = br2.readLine();
double n2 = Double.parseDouble(num2);
System.out.println("\nThe second number you have entered is: " + n2);
System.out.println("\nYour numbers are: " + num1 + " and " + num2);
inputCorrect = true;
} catch (NumberFormatException nfe) {
System.out.println("You did not enter a valid number: " + "\""+ num2 + "\" is not a number!!");
inputCorrect = false;
return num2;
public int Calculator() {
int choice2 = (int) Double.parseDouble(choice1);
switch (choice2) {
case 1 :
Add();
System.out.print("The answer of " + num1 + " + " + num2 + " is: " + decimals.format(answer));
break;
case 2 :
Subtract();
System.out.print("The answer of " + num1 + " - " + num2 + " is: " + decimals.format(answer));
break;
case 3 :
Multiply();
System.out.print("The answer of " + num1 + " * " + num2 + " is: " + decimals.format(answer));
break;
case 4 :
Divide();
System.out.print("The answer of " + num1 + " / " + num2 + " is: " + decimals.format(answer));
Modulus();
System.out.print(" and the remainder is " + decimals.format(answer));
break;
case 5 :
maximumValue();
System.out.println("The maximum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
minimumValue();
System.out.println("The minimum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
break;
case 6 :
Squareroot1();
System.out.println("The squareroot of value " + num1 + " is: " + decimals.format(answer));
Squareroot2();
System.out.println("The squareroot of value " + num2 + " is: " + decimals.format(answer));
break;
case 7 :
absoluteNumber1();
System.out.println("The absolute number of " + num1 + " is: " + decimals.format(answer));
absoluteNumber2();
System.out.println("The absolute number of " + num2 + " is: " + decimals.format(answer));
break;
case 8 :
octalEquivalent1();
System.out.println("The octal equivalent of " + num1 + " is: " + octalEquivalent1());
octalEquivalent2();
System.out.println("The octal equivalent of " + num2 + " is: " + octalEquivalent2());
hexadecimalEquivalent1();
System.out.println("\nThe hexadecimal equivalent of " + num1 + " is: " + hexadecimalEquivalent1());
hexadecimalEquivalent2();
System.out.println("The hexadecimal equivalent of " + num2 + " is: " + hexadecimalEquivalent2());
break;
case 9 :
Round1();
System.out.println("The rounded number of " + num1 + " is: " + decimals.format(answer));
Round2();
System.out.println("The rounded number of " + num2 + " is: " + decimals.format(answer));
break;
case 0 :
if (choice2 == 0) {
System.exit(1);
break;
return choice2;
public String anotherCalculation() throws IOException {
boolean inputCorrect = false;
while (inputCorrect == false) {
try {
BufferedReader br3 = new BufferedReader (new InputStreamReader(System.in));
System.out.print("\nWould you like to do another calculation? Y/N ");
more = br3.readLine();
String s1 = "y";
String s2 = "Y";
if (more.equals(s1) || more.equals(s2)) {
inputCorrect = true;
while (inputCorrect = true){
inputNumber1();
System.out.println("");
calculatorChoice();
System.out.println("");
inputNumber2();
System.out.println("");
Calculator();
System.out.println("");
anotherCalculation();
System.out.println("");
inputCorrect = true;
} else {
System.out.println("\n" + nameSurname + " thank you for using this program, you have used this program for: " + decimals.format(programRuntime()) + " seconds");
System.out.println("the program will now exit, Goodbye.");
System.exit(0);
} catch (IOException ex){
System.out.println("You did not enter a valid answer: " + "\""+ more + "\" is not in the list!!");
inputCorrect = false;
return more;
public static void main(String[] args) throws IOException {
Project p1 = new Project();
p1.insertNameAndSurname();
System.out.println("");
p1.inputNumber1();
System.out.println("");
p1.calculatorChoice();
System.out.println("");
p1.inputNumber2();
System.out.println("");
p1.Calculator();
System.out.println("");
p1.anotherCalculation();
System.out.println("");
{code}
*Can you please run my code for yourself and have a look at how this program is constructed*
*and give me ANY feedback on how I can better this code(program) or if I've done anything wrong from your point of view.*
Your help will be much appreciated.
Thanks in advanceSmirre wrote:
Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??You cannot restrict the user. It is a sad fact in programming that the worst bug always sits in front of the Computer.
What you could do is checking the input string for numbers. If it contains numbers, just reprompt for the Name.
AND you might want to ask yourself why the heck a calculator needs to know the users Name. -
Need help with Berkeley XML DB Performance
We need help with maximizing performance of our use of Berkeley XML DB. I am filling most of the 29 part question as listed by Oracle's BDB team.
Berkeley DB XML Performance Questionnaire
1. Describe the Performance area that you are measuring? What is the
current performance? What are your performance goals you hope to
achieve?
We are measuring the performance while loading a document during
web application startup. It is currently taking 10-12 seconds when
only one user is on the system. We are trying to do some testing to
get the load time when several users are on the system.
We would like the load time to be 5 seconds or less.
2. What Berkeley DB XML Version? Any optional configuration flags
specified? Are you running with any special patches? Please specify?
dbxml 2.4.13. No special patches.
3. What Berkeley DB Version? Any optional configuration flags
specified? Are you running with any special patches? Please Specify.
bdb 4.6.21. No special patches.
4. Processor name, speed and chipset?
Intel Xeon CPU 5150 2.66GHz
5. Operating System and Version?
Red Hat Enterprise Linux Relase 4 Update 6
6. Disk Drive Type and speed?
Don't have that information
7. File System Type? (such as EXT2, NTFS, Reiser)
EXT3
8. Physical Memory Available?
4GB
9. Are you using Replication (HA) with Berkeley DB XML? If so, please
describe the network you are using, and the number of Replica’s.
No
10. Are you using a Remote Filesystem (NFS) ? If so, for which
Berkeley DB XML/DB files?
No
11. What type of mutexes do you have configured? Did you specify
–with-mutex=? Specify what you find inn your config.log, search
for db_cv_mutex?
None. Did not specify -with-mutex during bdb compilation
12. Which API are you using (C++, Java, Perl, PHP, Python, other) ?
Which compiler and version?
Java 1.5
13. If you are using an Application Server or Web Server, please
provide the name and version?
Oracle Appication Server 10.1.3.4.0
14. Please provide your exact Environment Configuration Flags (include
anything specified in you DB_CONFIG file)
Default.
15. Please provide your Container Configuration Flags?
final EnvironmentConfig envConf = new EnvironmentConfig();
envConf.setAllowCreate(true); // If the environment does not
// exist, create it.
envConf.setInitializeCache(true); // Turn on the shared memory
// region.
envConf.setInitializeLocking(true); // Turn on the locking subsystem.
envConf.setInitializeLogging(true); // Turn on the logging subsystem.
envConf.setTransactional(true); // Turn on the transactional
// subsystem.
envConf.setLockDetectMode(LockDetectMode.MINWRITE);
envConf.setThreaded(true);
envConf.setErrorStream(System.err);
envConf.setCacheSize(1024*1024*64);
envConf.setMaxLockers(2000);
envConf.setMaxLocks(2000);
envConf.setMaxLockObjects(2000);
envConf.setTxnMaxActive(200);
envConf.setTxnWriteNoSync(true);
envConf.setMaxMutexes(40000);
16. How many XML Containers do you have? For each one please specify:
One.
1. The Container Configuration Flags
XmlContainerConfig xmlContainerConfig = new XmlContainerConfig();
xmlContainerConfig.setTransactional(true);
xmlContainerConfig.setIndexNodes(true);
xmlContainerConfig.setReadUncommitted(true);
2. How many documents?
Everytime the user logs in, the current xml document is loaded from
a oracle database table and put it in the Berkeley XML DB.
The documents get deleted from XML DB when the Oracle application
server container is stopped.
The number of documents should start with zero initially and it
will grow with every login.
3. What type (node or wholedoc)?
Node
4. Please indicate the minimum, maximum and average size of
documents?
The minimum is about 2MB and the maximum could 20MB. The average
mostly about 5MB.
5. Are you using document data? If so please describe how?
We are using document data only to save changes made
to the application data in a web application. The final save goes
to the relational database. Berkeley XML DB is just used to store
temporary data since going to the relational database for each change
will cause severe performance issues.
17. Please describe the shape of one of your typical documents? Please
do this by sending us a skeleton XML document.
Due to the sensitive nature of the data, I can provide XML schema instead.
18. What is the rate of document insertion/update required or
expected? Are you doing partial node updates (via XmlModify) or
replacing the document?
The document is inserted during user login. Any change made to the application
data grid or other data components gets saved in Berkeley DB. We also have
an automatic save every two minutes. The final save from the application
gets saved in a relational database.
19. What is the query rate required/expected?
Users will not be entering data rapidly. There will be lot of think time
before the users enter/modify data in the web application. This is a pilot
project but when we go live with this application, we will expect 25 users
at the same time.
20. XQuery -- supply some sample queries
1. Please provide the Query Plan
2. Are you using DBXML_INDEX_NODES?
Yes.
3. Display the indices you have defined for the specific query.
XmlIndexSpecification spec = container.getIndexSpecification();
// ids
spec.addIndex("", "id", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
spec.addIndex("", "idref", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
// index to cover AttributeValue/Description
spec.addIndex("", "Description", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_SUBSTRING, XmlValue.STRING);
// cover AttributeValue/@value
spec.addIndex("", "value", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
// item attribute values
spec.addIndex("", "type", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
// default index
spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
// save the spec to the container
XmlUpdateContext uc = xmlManager.createUpdateContext();
container.setIndexSpecification(spec, uc);
4. If this is a large query, please consider sending a smaller
query (and query plan) that demonstrates the problem.
21. Are you running with Transactions? If so please provide any
transactions flags you specify with any API calls.
Yes. READ_UNCOMMITED in some and READ_COMMITTED in other transactions.
22. If your application is transactional, are your log files stored on
the same disk as your containers/databases?
Yes.
23. Do you use AUTO_COMMIT?
No.
24. Please list any non-transactional operations performed?
No.
25. How many threads of control are running? How many threads in read
only mode? How many threads are updating?
We use Berkeley XML DB within the context of a struts web application.
Each user logged into the web application will be running a bdb transactoin
within the context of a struts action thread.
26. Please include a paragraph describing the performance measurements
you have made. Please specifically list any Berkeley DB operations
where the performance is currently insufficient.
We are clocking 10-12 seconds of loading a document from dbd when
five users are on the system.
getContainer().getDocument(documentName);
27. What performance level do you hope to achieve?
We would like to get less than 5 seconds when 25 users are on the system.
28. Please send us the output of the following db_stat utility commands
after your application has been running under "normal" load for some
period of time:
% db_stat -h database environment -c
% db_stat -h database environment -l
% db_stat -h database environment -m
% db_stat -h database environment -r
% db_stat -h database environment -t
(These commands require the db_stat utility access a shared database
environment. If your application has a private environment, please
remove the DB_PRIVATE flag used when the environment is created, so
you can obtain these measurements. If removing the DB_PRIVATE flag
is not possible, let us know and we can discuss alternatives with
you.)
If your application has periods of "good" and "bad" performance,
please run the above list of commands several times, during both
good and bad periods, and additionally specify the -Z flags (so
the output of each command isn't cumulative).
When possible, please run basic system performance reporting tools
during the time you are measuring the application's performance.
For example, on UNIX systems, the vmstat and iostat utilities are
good choices.
Will give this information soon.
29. Are there any other significant applications running on this
system? Are you using Berkeley DB outside of Berkeley DB XML?
Please describe the application?
No to the first two questions.
The web application is an online review of test questions. The users
login and then review the items one by one. The relational database
holds the data in xml. During application load, the application
retrieves the xml and then saves it to bdb. While the user
is making changes to the data in the application, it writes those
changes to bdb. Finally when the user hits the SAVE button, the data
gets saved to the relational database. We also have an automatic save
every two minues, which saves bdb xml data and saves it to relational
database.
Thanks,
Madhav
[email protected]Could it be that you simply do not have set up indexes to support your query? If so, you could do some basic testing using the dbxml shell:
milu@colinux:~/xpg > dbxml -h ~/dbenv
Joined existing environment
dbxml> setverbose 7 2
dbxml> open tv.dbxml
dbxml> listIndexes
dbxml> query { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }
dbxml> queryplan { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }Verbosity will make the engine display some (rather cryptic) information on index usage. I can't remember where the output is explained; my feeling is that "V(...)" means the index is being used (which is good), but that observation may not be accurate. Note that some details in the setVerbose command could differ, as I'm using 2.4.16 while you're using 2.4.13.
Also, take a look at the query plan. You can post it here and some people will be able to diagnose it.
Michael Ludwig
Maybe you are looking for
-
New Airport express not finding wireless network
I just got a new AX plugged it in it was recognized did the set up and said to update. It went through the update but the amber light kept flashing. After the update I also lost my internet connection. I have to re-establish my internet connection ea
-
Help? Verizon has no idea what's wrong..
I'm trying to get some of these issues resolved before my 1st month is up.. Verizon doesn't have any idea what's going on. In 2 weeks, I've gone through 2 STBs and today a tech replaced the box (ONT?) inside the garage. I won't go over the larger
-
Hi, I had created one table view to diasplay KM Data with 3 columns Name, path, created.For path column with LinkbyURL property and i can able to display it in explorer but i want down load that file whenever i clicked on that link .How can it possi
-
Hirarchical Tree Sorting in Developer 6i
Hi all, I have created a hirarchical tree in the developer 6i and want to sort it alphabatically, any one who can help to solve this problem ? bye Hafeez
-
Is there a way to set up the software so that you can delay live footage? Here's what I'd like to do.... I coach volleyball so I would like to set up live video of the players performing skills. It would be set up so the camera would film them and th