Question about the java.util.Date class.
The book I read said, class Date represents a value int long since January 1, 1970.I created a class of Date like this
long mesh = 2000L;
d.setTime (st);
System.out.println ("new time is =" + d.toString ());
When the above code, ultimately she prints the date as follows.
New schedule is = Wed Dec 31 16:00:02 PST 1969
No idea why the printed date before 1970? I expect the date to be a value greater than 01, January 1970.
Welcome to the forum!
>
The book I read said, class Date represents a value int long since January 1, 1970.
I created a class of Date like this
long mesh = 2000L;
d.setTime (st);
System.out.println ("new time is =" + d.toString ());
When the above code, ultimately she prints the date as follows.
New schedule is = Wed Dec 31 16:00:02 PST 1969
No idea why the printed date before 1970? I expect the date to be a value greater than 01, January 1970.
>
Because of the way as the setTime method is defined. What time zone do you use?
http://docs.Oracle.com/javase/1.5.0/docs/API/Java/SQL/date.html#SetTime (long)
>
setTime
Public Sub setTime(long date) defines an object Date existing using time value given in milliseconds. If the value of milliseconds given contains time information, the driver will set the components at the time in the default time zone (zone of the Java virtual machine running the application) which corresponds to zero GMT.
Tags: Java
Similar Questions
-
A few questions about the use of data and Cliq
I have the cliq, however I chose to not get 3G (so I bought full fare). So I have a few questions about the phone and the use of 3G / 2 G/Edge:
1 - is possible to disable completely the 2G / 3 G/Edge? I know you can switch between them, but are anyway just tell the phone to stop using them altogether since I'm not subbed to the service?
2. when the update takes place, I guess we'll have to reconnect motoblur and etc, but if I don't have 3 G will I have motoblur connection problems after the update? Or he keeps the latest wifi settings so that it would connect to wifi to connect. When I first got my phone it was not a problem b/c I had 3G for the first month.
I hope that makes sense, thanks!
To stop all the data, I would like to download an application called APNDroid. He cut them all down. When you log on to blur you have 3G or WIFI doe this without getting a timeout error. During the process of setting up your Blur account, you can press the menu button and set up your wifi to work, this will connect you to Blur and your phone will be connected to the blur. If I were you I would be rethinking to do a data plan since you are really losing out on most of your main features of phones. It's your choice, however.
-
Question about the reports and data of rollups
We followed in place that I need to create monthly reports. There is a custom agent that collects two key all measures that can be used to define a percentage of system availability. They check essentially two types of errors that may occur together or individually. I have not really used reports in Foglight but has spent a good amount of time to play with them today. The main problem/issue I have at this point is how to deal with the accumulation of data. Our retention policy performs three stacks of separate data in a month, how can you effectively report on these data rolled upward?
Example: one of the agents simply return a 0 if the system is ok and 1 if it finds the error. In the end, we just need to know how many times that 1 has been returned in a month. How would one accomplish? If the sum is for example, 40 for a total of 4 hours is that it means that he met the 40 times error? The frequency of the agent is set to 60 seconds, so that would mean 40 minutes of time error...?
The other control agent returns specific error codes and not a simple binary value. If the above example or the question is trivial I still don't know how to deal with this one...
Most likely, you can use the value of the sum for the metric, just as you might have guessed. Because the value is 0 or 1, the amount will be the total of the values for the time period. There are also a number of samples, which should / could be higher because there might be 0.
-
A few questions about the design of Data Guard
Hi, I have a few basic questions around design Data Guard
Q1. Looking at the instructions of Oracle for the creation of a logical standby, he recommends first creating a physical standby and then convert waiting logic. However, I thought that a logical standby might have a totally different physical structure of the primary. How can this be the case if a logical standby first starts his life pending physical (where the structure must be the same)?
Q2. It is a normal practice to back up your database before as well - if yes why?
Q3. Can RMAN back up a database of the day before while he is in the State mounted (rather than opening it)?
Q4. What is the point of cascade redo apply rather than just get the primary ship to each standby?
I guess you could try to reduce the latency of node to node if some the day before were quite remote from the primary
Q5. Is it possible to convert a physical logical Standby?
Q6. What number best of Standby, you can have - Oracle suggests 30 but I thought I remember reading somewhere regarding the 11 GR 2, that this limit has now been increased?
Thank you
Jim
Hello again;
"begins each logical waiting first her life on hold physical?"
Its the only way I ever did. I think it is the simple way to do it. By the presence of a physical standby first you have already confirmed the network and most of the settings for Data Guard so that you can focus on only the logic of the standby database configuration.
Chapter 3 of this book, it's easy:
http://www.Visi.com/~mseberg/data_guard/new_dg_book.html
Best regards
mseberg
-
Question about the management of data Cache OBIEE 10g / 11g.
Hi friends,
I have a question: how we can find the display of data in the report (in the answers or dashboard) if Cache or paintings of DW? y at - there no mechanism for this? I know that normally we can find data in tables of aggregation using file view log. Can you please help on this and I would really appreciate your help.
Cheers!
SriniAdd the suggestions above, to find the query caches
1. use followed - cache_ind_flg O/N indicates whether or not the application has reached the cache.
2 NQQuery.log will show "cache hit" (if not you will see SQL to the physical database)There is no mechanism to track if it hits the browser cache / cache of presentation server.
I hope this helps...
-
Question about the Java Support Oracle professional
We are an ISV in the Japan. We have products of commercial software that runs on the JRE distributed with our applications.
The JRE bundled with our application include JRockit and, sometimes, our customer of the unannounced JVM dumps core report,.
asked to perform the diagnosis and the requests for clarification on exactly what part of our application has caused the dump.
Unfortunately, we don't have expertise in the analysis of the problems of FMV and this is why we are not and we are looking for professional support, that we have.
Our question is whether Oracle offers any type of professional support for ISVS regarding including JRockit Java virtual machines?
If Oracle does, we would also like to know if we are eligible for the program they have, as we are located in the Japan.
The Oracle Java support, hopefully that's what we need, does not seem to fall into this category, because the details of the support program.
as we confirmed reading the FAQ document, deals with the named user licenses more and by processor, which were apparently to be purchased by the customer using our product.
Ask our customer to purchase the subscription just to use our application doesn't seem to be an option.
We would also like to note what our options are and other software companies to tackle the problem even how to manage any relevant question of JVM reported by their customers due to their applications on virtual machines Java runnig.
A few days ago we send the message similar to what precedes to Oracle sales email address, but we did not have all the answers.
Among the partner sales representative oracle actually told us the Oracle Java SE Support enough that we are concerned, that's why we bought the subscription for 1 year for nothing and now we cannot get a refund from Oracle.
Any response is appreciated, thank you.
If you are an ISV, please let us know your opinion.
Haruhiko NishiYou are asking in the wrong place. This is a user forum. I suggest that you contact your local Oracle Office. Locking this thread.
-
Question about the use of dates
Hello
I have a few SQL used for a calendar in the APEX and have a duration field to set the end date.
What I need is an additional field that would be a date, but I need a registration for all dates in the date from beginning to end date, including all the dates between the two.
select ID ,VISIT_DATE ,duration ,VISIT_DATE + round(DURATION)-1 END_DATE from FIELD_VISITS_CALENDAR Results ID |VISIT_DATE|DURATION |END_DATE -------------------|------------|--------- 241 |22-JAN-09 | .5 |22-JAN-09 239 |16-JAN-09 | .5 |16-JAN-09 242 |23-JAN-09 | 2 |24-JAN-09 237 |08-JAN-09 | 1.5 |09-JAN-09 221 |12-DEC-08 | 2 |13-DEC-08 233 |23-DEC-08 | 1 |23-DEC-08 238 |15-JAN-09 | 1 |15-JAN-09 240 |09-JAN-09 | 1 |09-JAN-09 Wanted results ID |VISIT_DATE|DURATION |END_DATE |CAL_DATE ---|----------|---------------|----------|--------- 241|22-JAN-09 | .5 |22-JAN-09|22-JAN-09 239|16-JAN-09 | .5 |16-JAN-09|16-JAN-09 242|23-JAN-09 | 2 |24-JAN-09|23-JAN-09 242|23-JAN-09 | 2 |24-JAN-09|24-JAN-09 237|08-JAN-09 | 1.5 |09-JAN-09|08-JAN-09 237|08-JAN-09 | 1.5 |09-JAN-09|09-JAN-09 221|12-DEC-08 | 2 |13-DEC-08|12-DEC-08 221|12-DEC-08 | 2 |13-DEC-08|13-DEC-08 233|23-DEC-08 | 1 |23-DEC-08|23-DEC-08 238|15-JAN-09 | 1 |15-JAN-09|15-JAN-09 240|09-JAN-09 | 1 |09-JAN-09|09-JAN-09 {code} Thanks Adam
Like this?
SQL> ed Wrote file afiedt.buf 1 with t as (select 241 as id, to_date('22-jan-2009','dd-mon-yyyy') as visit_date, 0.5 as duration from dual union all 2 select 239, to_date('16-jan-2009','dd-mon-yyyy'), 0.5 from dual union all 3 select 242, to_date('23-jan-2009','dd-mon-yyyy'), 2 from dual union all 4 select 237, to_date('08-jan-2009','dd-mon-yyyy'), 1.5 from dual union all 5 select 221, to_date('12-jan-2009','dd-mon-yyyy'), 2 from dual union all 6 select 233, to_date('23-jan-2009','dd-mon-yyyy'), 1 from dual union all 7 select 238, to_date('15-jan-2009','dd-mon-yyyy'), 1 from dual union all 8 select 240, to_date('09-jan-2009','dd-mon-yyyy'), 1 from dual) 9 -- 10 select distinct 11 id 12 ,visit_date 13 ,duration 14 ,visit_date+(case when rn < round(duration) then rn else 0 end) as end_date 15 from t, (select rownum-1 rn from dual connect by rownum <= (select max(duration) from t)) x 16* order by t.id SQL> / ID VISIT_DATE DURATION END_DATE ---------- ---------- ---------- ---------- 221 12/01/2009 2 12/01/2009 221 12/01/2009 2 13/01/2009 233 23/01/2009 1 23/01/2009 237 08/01/2009 1.5 08/01/2009 237 08/01/2009 1.5 09/01/2009 238 15/01/2009 1 15/01/2009 239 16/01/2009 .5 16/01/2009 240 09/01/2009 1 09/01/2009 241 22/01/2009 .5 22/01/2009 242 23/01/2009 2 23/01/2009 242 23/01/2009 2 24/01/2009 11 rows selected. SQL>
-
I have a simple question about the meta-data.
Hello. It is a simple question about the meta-data. How can I get the video bitrate of a flv or mp4 (video playing via NetStream file) file
right now I have this:
Code var netClient:Object = new Object();
netClient.onMetaData = function(meta:Object)
{
for (var in meta props) {}
trace (props + ":" + meta [props]);
}
MovieClip (root) .durations = meta.duration;
trace (MovieClip (root) .durations);
};
NS.client = netClient;And my output is:
videocodecid: avc1
audiocodecid: m4as
aacaot: 2
Width: 960
AudioChannels: 2
videoframerate: 23.976
TrackInfo: [object Object], [object Object]
moovposition: 32
avcprofile: 77
audiosamplerate: 48000
avclevel: 31
seekpoints: [object Object], [object Object], [object Object], [object Object]
height: 540
Duration: 221.312As you can see, there is nothing of video bitrate.
I know that the video bitrate of my videos, but then I have to manually type each number of bitrate into my flash project, and it would be such a fuss when I have a lot of videos. Would be nice if flash can detect the video bitrate.
It's for my online portfolio.
Why you divide by 8? If you want to convert bytes into bits, multiply by 8.
-
Recently bought a laptop computer; A few questions about the offer Upgrade to Windows 8
I have a few questions about the Upgrade of Windows 8 offer for new computers. I recently bought a Toshiba Satellite S855-S5268 of amazon.com, which came with Windows 7 Home Premium. Toshiba already has a beta version of drivers and utilities for Windows 8 for the S855 on their Web site.
(1) I bought my laptop in July of this year, and I've not yet registered for 8 Windows Upgrade offer with Microsoft. Am I still eligible to receive the upgrade, if I sign up soon?(2) if I buy the upgrade through this offer, I'll be able to download an ISO file so I can burn the installation media, or do I need to upgrade to Windows 7?(3) if I will be able to burn the installation media, I'll be able to erase my hard drive and do a clean install of Windows 8 (which I'd rather do, I have a lot of backups of my data). I am aware that I would probably need to provide my product key Windows 7 Home Premium 64-bit OEM during the new installation, because it is an upgrade and not a full version; This isn't a big deal, because my Windows 7 Home Premium 64-bit OEM product key is stuck at the bottom of my laptop.(4) my current copy of Windows 7 is activated by seeing my BIOS (I have a traditional BIOS, not a UEFI). If I had to switch to Windows 8 and decide then I'd rather back in Windows 7, for example, a few months later, I'll be able to do that (I burned recovery of Windows 7 with the Toshiba utility disks, which I did), and Windows 7 will continue to activate by seeing my BIOS, even after the installation (and later remove) Windows 8?Thank you very much!I have a few questions about the Upgrade of Windows 8 offer for new computers. I recently bought a Toshiba Satellite S855-S5268 of amazon.com, which came with Windows 7 Home Premium. Toshiba already has a beta version of drivers and utilities for Windows 8 for the S855 on their Web site.
(1) I bought my laptop in July of this year, and I've not yet registered for 8 Windows Upgrade offer with Microsoft. Am I still eligible to receive the upgrade, if I sign up soon?Yes, the registration period is between June 2, 2012 to January 31, 2013.(2) if I buy the upgrade through this offer, I'll be able to download an ISO file so I can burn the installation media, or do I need to upgrade to Windows 7?Yes, the Upgrade Wizard of Windows 8 will allow you to create a bootable DVD or you can grab the ESD file and save it.(3) if I will be able to burn the installation media, I'll be able to erase my hard drive and do a clean install of Windows 8 (which I'd rather do, I have a lot of backups of my data). I am aware that I would probably need to provide my product key Windows 7 Home Premium 64-bit OEM during the new installation, because it is an upgrade and not a full version; This isn't a big deal, because my Windows 7 Home Premium 64-bit OEM product key is stuck at the bottom of my laptop.Yes and there are better ways to reinstall Windows 8 without using the installation disc, you can use the reset and refresh.These steps will take you through refreshing your PC:
· Press the Windows key + C on your keyboard to show the charms (if you use a touch screen: touch the right edge of your screen and drag your finger to the left)
· Click settings
· Click change PC settings
· Click general in the left column
· Under refresh your PC without affecting your files, click Start
Then follow the instructions that will be provided on-screen to cool your PC.
(4) my current copy of Windows 7 is activated by seeing my BIOS (I have a traditional BIOS, not a UEFI). If I had to switch to Windows 8 and decide then I'd rather back in Windows 7, for example, a few months later, I'll be able to do that (I burned recovery of Windows 7 with the Toshiba utility disks, which I did), and Windows 7 will continue to activate by seeing my BIOS, even after the installation (and later remove) Windows 8?As long as you have a recovery disk which you should create or use the construction in the recovery partition, Yes, it will self activate.Thank you very much! -
A question about the methods and parameters.
Hey guys, this is my first post here. I am very new to Java and done a bit of C++ before Java. I had a question about the methods and parameters. I do not understand the methods; I know they can be repeated when it is called, but it's almost everything. I also know that a program should have a class that contains the main method. What I really, really understand on methods is what the parameters are. I know they are in parentheses and that is it. Could you explain what they are? I really appreciate it. Thanks to all in advance. Best regards, MichaelTaking an example:
Suppose you calculate area of the rectangle you need two inputs one is the length and the width. Area = l X b, where l = length, b = widthIf your method, say, calculateAreaOfRectangle (length int, int width) will be two parameters as arguments.
System.out.println ("field of rectangle:" + calculateAreaOfRectangle (40,30);)
public int calculateAreaOfRectangle (int length, int width) {}
int area;
Area = length * width;
return of area;
}So if you call this method then the output will be returned in 120.
Parameters of a method are simply the input variables for the method of treatment for all calculations or something useful.
And we cannot have methods inside the main method in Java. It is in the java syntax and if you do, it will throw a syntax error.
-
Just a quick question about the appearance of the cluster
Hello, this is Matthew, just a quick question about the appearance of the cluster
Is there anyway to rearrange the order of the elements? I know cutting automatic resizing, I could move the items by hand. But if I use the cluster somewhere else, I have to move the items again...
What I want is of the order of "Mx My Mz Ax Ay Az Temp voltage CS".
Is there a quicker way to deal with?
THz so much!
You can right-click the border of the cluster and choose "arrange control cluster...". "The user interface is not as intuitive as it could be, but it will allow you to reorder items. If you use the cluster in several places, you should make the cluster in a type definition and replace all current uses of the latter with the type definition, so that they all match. They will also update automatically when you make changes to the type definition. Otherwise, you could have a situation where you have multiple groups with the same data types, but with elements in a different order, and your data will be getting a new denominated, when wire you the whole clusters. The data will be in the same order, but given that the item labels are in a different order, you can't get the data you want, when ungroup you by name.
-
Question about the differences in commands
Hey guys -.
I just had a few questions about the differences between orders that seem to perform the same function. Can you let me know if an order is more preferable to the other and what the difference is. I would really appreciate it as it I currently practice some INE laboratories and I see that orders change from lab to lab. Thanks advance!
1. When you write a static NAT for specific host 1 - is - this important if I understand the 32 subnet?
EX: static (inside, outside) 1.1.1.1, 2.2.2.2 VS static (inside, outside) 1.1.1.1 2.2.2.2 netmask 255.255.255.255
2. when I'm setting up a router as a CA server and it is necessary to "export" the key, whatever my method of exporting the key? If so, in which method call for which solution?
EX: key export cryptographic rsa ciscox pem URL nvram: cisco VS. exporting key 3des cryptographic ciscox pem 3des rsa terminal cisco
3. If I have to mark a packet with a DSCP of X value, matter if I use the 'set dscp' VS 'set ip dscp? If so, what is the difference?
FXY
Policy-map X
class X
the dscp X value
VS
Policy-map X
class X
X ip dscp value
I guess pertaining to 2, if i was speaking in terms of from a cisco router to another cisco router - would terminal be acceptable?
Yes, the "Import cryptographic key" command can take a url and also from the terminal entrance. In this terminal case wil is much easier.
--
Don't stop once you have upgraded your network! Improve the world by lending money to low-income workers:
http://www.Kiva.org/invitedBy/karsteni -
Questions about the management of specific nodes in different hierarchies
Hi all
I have a question about the specific management of some particular set nodes, which are located in different hierarchies within a same version.
I want to know if there is any editing made to certain properties of these specific nodes or if the nodes are deleted/moved/edited approval to be triggered for the data manager.
or should not allow users to edit (adding/moving/deleting/changing property values) or those specific members.
According to my understanding of the nodes of domain prevents the removal of nodes, but I don't want my Member prefix/suffix, domain is the only way to prevent the change.
Thanks and greetings
Madhu
We have an obligation to not allow a node to remove or deleted without the approval of the admin, so I created a Boolean property AllowDelete is false, which is substitutable, default and is available only in a category of property Admin, for which most of the users do not have access. Then, I created a validation of PropRemove with an error message that tells the user to contact a user admin to remove or delete the node. The admin can change the AllowDelete to true, then can either remove himself or to allow the user to do.
-
Questions about the implementation of clusters of storage and DTS on active cluster
I have a few questions about the implementation of clusters of data store and SRS storage in VSphere 5.1.
We have a data center with about 15 HP blades and a few servers non-lame. The hosts are all either VSphere 5.0 or 5.1. Our back-end storage is an EMC VNX 5700 with about 20 stores of data. All the VMWare is managed by VCenter 5.1 running on a dedicated physical machine.
Currently, each data store is used individually; No piles of data store are put in place. When a new virtual machine is created, the administrator usually chooses the data with the most space store. Periodically, we will go back and manually storage vMotion machines to balance the load.
Recently, we have expanded the VNX storage, so we now have LUNS in different pools, with different levels of performance.
What I would do is set up for the data store clusters, so that us when a virtual machine is created, the administrator must not know what data store is in which pool. Also take advantage of the DRS storage so that the burden of storage will be "refine" himself a little.
I know the setting up of a cluster of storage in a 'clean' environment is quite simple, but my concern is creation/conversion data warehouses existing in active production in the cluster, while they are used.
If I access the screen "data warehouses and store data from clusters ', right-click on the data center and create a cluster, and then move the various data stores in the new cluster, will there be an interruption in the production running systems?
I also wonder about activation of storage i/o control. It is not currently enabled on data warehouses. I know it's useful for the StorageDRS, but will be allowing any negative impact on the system? If I turn on the warehouses of data, is there anything else I should do or set in addition to all that allows him?
Finally, we are in the process of Site Recovery Manager configuration. SRS has an impact on the configuration of the data clusters and DTS store?
Thanks in advance for your comments.
Mike O.
Gregg Robertson wrote:
Hello
Clusters of data and using DTS store doesn't impact RS even if you create a cluster of data store for storage of replicated data and another for everyone else, this way you machines virtual you want to replicate are not moved on warehouses of data that are not replicated , but will still have the ability to move if there is a conflict.
Gregg
With all due respect but SRM and DTS don't go together. SRM does not at all support the use of DTS. So if you are configuring SRM forget DTS for now.
Reason for this is that SRM knows no DTS and VMs can be in flight when a failover should occur, and bad things can happen. Also, the protection breaks when a virtual computer is moved between data warehouses in a cluster data store.
In short: don't go there.
-
Hello
Oracle version: Enterprise Edition Release 12.1.0.1.0 - 64 bit
OS: CentOS 4.6 X86_64
I have a question about the localTimeStamp function. According to the documentation for this function is
the same thing as current_TimeStamp except that the returned value does not include the time zone.Consider the following example:
SQL > create table tmptab (colval timestamp with time zone not null);
Table created.
SQL > insert into tmptab (colval) values (localTimeStamp);
1 line of creation.
SQL > select t1.colval, tmptab from t1;
COLVAL
---------------------------------------------------------------------------
24 JANUARY 14 09.45.42.253732 H + 01:00
SQL >
Why introduce the foregoing did not fail? the data type of the column in my table colval expects a timestamp with time zone
during each which inserts as I understand (correct me if I'm wrong) is not provided by the localTimeStamp function.
Could someone kindly tell me what I misunderstood?
Thanks in advance,
dariyoosh wrote:
Hello
Oracle version: Enterprise Edition Release 12.1.0.1.0 - 64 bit
OS: CentOS 4.6 X86_64
I have a question about the localTimeStamp function. According to the documentation for this function is
the same thing as current_TimeStamp except that the returned value does not include the time zone.Consider the following example:
SQL > create table tmptab (colval timestamp with time zone not null);
Table created.
SQL > insert into tmptab (colval) values (localTimeStamp);
1 line of creation.
SQL > select t1.colval, tmptab from t1;
COLVAL
---------------------------------------------------------------------------
24 JANUARY 14 09.45.42.253732 H + 01:00
SQL >
Why introduce the foregoing did not fail? the data type of the column in my table colval expects a timestamp with time zone
during each which inserts as I understand (correct me if I'm wrong) is not provided by the localTimeStamp function.
Could someone kindly tell me what I misunderstood?
Thanks in advance,
Then, when you do
create table t (neck DATE);
Insert into t (to_date ('1st January 2014', ' mon-dd-yyyy "");)
Are you surprised that it works? After all a DATE column contains a time component, you do not provide: but he
works and gives you 00:00:00 as the component "hour".
Similarly, the timezone component is being developed to automatically with, I think, time zone of your system.
Maybe you are looking for
-
Using Thunderbird on 2 PCs and ayncing with iPhone email
I have Thunderbird installed on my desktop and my laptop. I have also set up to sync with email on my iPhone. Is there a way to set it up so that when I read on my iPhone and delete it, the email is not deleted on the desktop? Also, is it possible to
-
Re: Win 8 support for Satellite A660 - 1 EV
Can you tell me are Windows 8 support drivers for Toshiba Satellite A660? Like Windows 7?
-
How many systems we can use with a cloud of Adobe® Photoshop® CC... ?
Please let us know, how many systems we can use with a cloud of Adobe® Photoshop® CC... ?
-
Change the theme color is not applied
I recently discovered the joy of change view code with CC 2015 color schemes, and it's great. (I don't know whether or not it existed before the update, but I've just learned about this.)My qualm, however, is that when I have a theme (for instantiati
-
I'm lost! iPad Media Q, strange behavior
http://www.sandiegohomegrown.com/testSDTG/First of all, let me start by saying: this is my first RWD and my goal was to create breakpoints where ever and whenever that was necessary. On my browser, everything seems to be OK if the code is a little s