How many dates are in each month?
Is there an easy way to determine how many dates are in each
month?
as of right now I am looping through creating a new Date()
and when the month changes I know the last date of the month.
This is kind of slow, and building a switch statement would
be kind of exhaustive.
Any ideas?
This method is created from the same named method in
mx.controls.CalendarLayout:
private function getNumberOfDaysInMonth(year:int,
month:int):int{
var n:int;
if (month == 1) {
if (((year % 4 == 0) && (year % 100 != 0)) || (year
% 400 == 0))
n = 29;
else
n = 28;
else if (month == 3 || month == 5 || month == 8 || month ==
10)
n = 30;
else
n = 31;
return n;
Similar Messages
-
Is there any way I can monitor how many Gb I download each month?
I'm considering changing broadband package and would like to know how much I download each month. All I can find are ways of estimating based on size of various files, streaming etc. as a multi person household it would be much more useful to know exactly how much I use.
You can only do this over all the PCs in the home if you have a special router that has this facility.
Otherwise you will need to install on every PC a network meter such as:
NetMeter Evo 2.0.0
or
Broadband Usage Meter - tbbMeter -
How to find that how many mailboxes are stored in each database
Hi every one.
Good evening
My question is, i have two databases in exchange 2010 server and i have around 150 mailboxes in both databases.
mdb01 & mdb02. I need to now how many mailboxes are stored in each database like
pls see example.. this is just a example..i dont no how many are stored in each datbase :-(
mdb01----20 mailbox
mdb02----130 mailboxes
and also i would like to know about the below details also
available mailboxsize in each database----DBsize---DB white space--
Thanks for your kind help
KaranTo see how many mailboxes you have in each database, run:
Get-Mailbox -Server <ServerName> | group database | ft Name,count -AutoSize
...and to get a hunch of how much free space you have available, run
Get-MailboxDatabase -Server <ServerName> -Status| ft Name,databasesize,available* -AutoSize
...but to get the exact amount of free space, you need to dismount the database and run
eseutil /ms
See:
How To Check Database White Space In Exchange
Martina Miskovic -
How many computers are using my sync data
I would like to know how many devices are utilizing my sync data.
this seems like it should be in my sync management console online, but it is not.
my paranoid brain sees a worst case scenario.. someone hacks my machine and somehow gets my sync key or was able to get a code generated to sync the data.
is there a way to find out what devises are accessing my data ?
thank youUnfortunately there's no easy way to do it, but there's a way to do it (and it's not obvious):
Go to your Options/Preferences window and select the Sync tab.
- From the "Manage account" drop-down, select "Reset Sync". (we are not going to Reset it...but is the way to go)
- Select "Replace all other computers"
- Press next and you will see the list of devices that are connected to the account.
After that, close the window (unless you want to complete the process).
I hope it helps. -
How many tables are created in Master data loading ( Including hierchy )
hi ,
Please anybody , can you tell us how many tables are created in Master data loading ( Including hierchy )
thanks
PhaniHi PP,
Depending upon the definition of an infoobject, the tables are created when the objects are activated.
/BI<C OR DIGIT>/<TABLE CODE><INFOOBJECT>
<C or digit>: C = Customer-defined InfoObjects
digit = SAP-defined InfoObjects
<table code>: S = SID table
T = Text table
P = Time-independent master data attributes
Q = Time-dependent master data attributes
M = Union of time-dependent and time-independent master
data attributes
X = SID table for time-independent navigational attributes
Y = SID table for time-dependent navigational attributes
H = Hierarchy table
K = Hierarchy SID table
I = Hierarchy SID structure table
J = Hierarchy interval table
Thnaks...
Shambhu -
How many books are approved a day - here are some stats
Do you want to know why it is taking forever to get your iBook approved? Do you wonder how many books are actually approved per day? I was asking myself the same question and because Apple doesn't release any numbers, I monitored the numbers on the iBookstore recently to get an idea.
Here are the numbers (just to get a rough idea, not scientifically proven)
The iBookstore has finally a feature that lets you browse only iBooks (aka Multi-Touch Books). It displays the numbers of all available Paid and Free iBooks. That is what I was monitoring each morning.
When I started to monitor the iBookstore on May15th it had a total of 3,217 iBooks. If you use January 19th as the start date, then Apple would have approved an average of 26 books a day.
Now here is a table where I wrote down the number from the iBookstore each morning of that day. The two columns next to it show the difference (how many approved that day) and the total number of approved iBooks (paid and free)
There are a few interesting conclusions you can draw from the numbers.
* You see a drop over the weekend. Maybe that is proof that the department is located in the US and not in China or India.
* The approval numbers fluctuate but the average is about twice as high as the 26 books from the original start. So they must have hired more staff (or reading faster)
* Interesting that there was a big junk of free iBooks yanked off the bookstore
Another unscientific info about the bestseller ranking from my own stats.
With about 10 sales a day I land in the 30s rank.
WIth about 2 sales a day it ranges from number 50-100
Those numbers fluctuate wildly and I'm sure there are other factors (i.e. total sales) in that calculation.
It would be interesting to hear numbers and experiences from other users.
Edgar Rothermich
DingDingMusic.comI looked up the number of book titles per category in Apple's and Amazon's bookstores yesterday:
Category
Amazon
Apple
Percent
Professional & Technical
107804
360619
26.98%
26.98%
Fiction & Literature
20700
227773
17.04%
44.02%
Reference
49942
95433
7.14%
51.16%
Business & Personal Finance
78007
76608
5.73%
56.89%
Halth, Mind & Body
63303
4.74%
61.63%
History
244585
51904
3.88%
65.51%
Religion & Spirituality
123177
49448
3.70%
69.21%
Romance
82851
48581
3.63%
72.85%
Children & Teens
67825
47718
3.57%
76.42%
Nonfiction
46908
3.51%
79.93%
Mysteries & Thrillers
64773
41776
3.13%
83.05%
Sci-Fi & Fantasy
60828
39861
2.98%
86.03%
Arts & Entertainment
71065
37874
2.83%
88.87%
Biographies & Memoirs
60365
33643
2.52%
91.38%
Science & Nature
87395
27825
2.08%
93.47%
Computers & Internet
29770
17558
1.31%
94.78%
Politics & Current Events
33551
17461
1.31%
96.09%
Travel & Adventure
21181
11874
0.89%
96.97%
Cookbooks, Food & Wine
8593
0.64%
97.62%
Sports & Outdoors
20909
8443
0.63%
98.25%
Lifestyle & Home
73509
8082
0.60%
98.85%
Humor
30506
7265
0.54%
99.40%
Comics & Graphic Novels
4559
0.34%
99.74%
Parenting
27879
3407
0.25%
99.99%
Textbooks
100
0.01%
100.00%
1356622
1336616
These numbers are upper bounds, as book titles can be in up to three categories. So the real number of unique titles is probably closer to 1/3 or 1/2 of the 1.33 million, which is close to K T's 700,000 number.
Amazon and Apple are similar in total number of titles (with a few different categories). I had expected there to be much less titles in the Apple bookstore compared to Amazon. So selection size isn't much of a differentiator anymore. That said, number of sales are still far higher in the Amazon store. Many early eBook adopters still prefer their Kindle over the iPad when looking for new eBooks. -
I have accessed the Apple Support site http://support.apple.com/kb/ht4627 but I could not find the "Manage Devices" link on iTunes. The advice they give is as follows:
You can view which devices or computers are currently associated, remove unused devices or computers, and see how long before they can be associated with a different Apple ID from the Account Information page in iTunes on your computer:
Open iTunes.
Sign in to your Apple ID by choosing Store > Sign In from the iTunes menu.
Choose Store > View My Account from the iTunes menu.
From the Account Information screen, click Manage Devices.
Next to each device or computer name, you will be able to see when each was associated to your Apple ID. You will also be able to track how many days are remaining before your associated devices or computers can be associated to a different Apple ID.
Help would be greatly appreciated! Thank you!Hello from Albania,
Please help me !! I'm desperate
I sold my iPhone 4s a few months ago.
Now i got my self a new iPad and created a new apple ID which i recently accociated with ITunes and ICloud.
However, i can't update anything on my Mac since it still requires the old apple id, even though i changed it anywhere i could.
I also don't get the manage devices when i tried to do this through the iTunes.
I have no idea what to do.
Waiting for your reply.
Regards -
Having issues finding out how many bytes are sent/recieved from a socket.
Hello everyone.
I've searched the forums and also google and it seems I can't find a way to figure out how many bytes are sent from a socket and then how many bytes are read in from a socket.
My server program accepts a string (an event) and I parse that string up, gathering the relevant information and I need to send it to another server for more processing.
Inside my server program after receiving the data ( a string) I then open another port and send it off to the other server. But I would like to know how many bytes I send from my server to the other server via the client socket.
So at the end of the connection I can compare the lengths to make sure, I sent as many bytes as the server on the other end received.
Here's my run() function in my server program (my server is multi threaded, so on each new client connection it spawns a new thread and does the following):
NOTE: this line is where it sends the string to the other server:
//sending the string version of the message object to the
//output server
out.println(msg.toString());
//SERVER
public class MultiThreadServer implements Runnable {
Socket csocket;
MultiThreadServer(Socket csocket) {
this.csocket = csocket;
public void run() {
//setting up sockets
Socket outputServ = null;
//create a message database to store events
MessageDB testDB = new MessageDB();
try {
//setting up channel to recieve events from the omnibus server
BufferedReader in = new BufferedReader(new InputStreamReader(
csocket.getInputStream()));
//This socket will be used to send events to the z/OS reciever
//we will need a new socket each time because this is a multi-threaded
//server thus, the z/OS reciever (outputServ) will need to be
//multi threaded to handle all the output.
outputServ = new Socket("localhost", 1234);
//Setting up channel to send data to outputserv
PrintWriter out = new PrintWriter(new OutputStreamWriter(outputServ
.getOutputStream()));
String input;
//accepting events from omnibus server and storing them
//in a string for later processing.
while ((input = in.readLine()) != null) {
//accepting and printing out events from omnibus server
//also printing out connected client information
System.out.println("Event from: "
+ csocket.getInetAddress().getHostName() + "-> "
+ input + "\n");
System.out.println("Waiting for data...");
//---------putting string into a message object-------------///
// creating a scanner to parse
Scanner scanner = new Scanner(input);
Scanner scannerPop = new Scanner(input);
//Creating a new message to hold information
Message msg = new Message();
//place Scanner object here:
MessageParser.printTokens(scanner);
MessageParser.populateMessage(scannerPop, msg, input);
//calculating the length of the message once its populated with data
int length = msg.toString().length();
msg.SizeOfPacket = length;
//Printing test message
System.out.println("-------PRINTING MESSAGE BEFORE INSERT IN DB------\n");
System.out.println(msg.toString());
System.out.println("----------END PRINT----------\n");
//adding message to database
testDB.add(msg);
System.out.println("-------Accessing data from Map----\n");
testDB.print();
//---------------End of putting string into a message object----//
//sending the string version of the message object to the
//output server
out.println(msg.toString());
System.out.println("Waiting for data...");
out.flush();
//cleaning up
System.out.println("Connection closed by client.");
in.close();
out.close();
outputServ.close();
csocket.close();
catch (SocketException e) {
System.err.println("Socket error: " + e);
catch (UnknownHostException e) {
System.out.println("Unknown host: " + e);
} catch (IOException e) {
System.out.println("IOException: " + e);
}Heres the other server that is accepting the string:
public class MultiThreadServer implements Runnable {
Socket csocket;
MultiThreadServer(Socket csocket) {
this.csocket = csocket;
public void run() {
try {
//setting up channel to recieve events from the parser server
BufferedReader in = new BufferedReader(new InputStreamReader(
csocket.getInputStream()));
String input;
while ((input = in.readLine()) != null) {
//accepting and printing out events from omnibus server
//also printing out connected client information
System.out.println("Event from: "
+ csocket.getInetAddress().getHostName() + "-> "
+ input + "\n");
System.out.println("Lenght of the string was: " + input.length());
System.out.println("Waiting for data...");
//cleaning up
System.out.println("Connection closed by client.");
in.close();
csocket.close();
} catch (IOException e) {
System.out.println(e);
e.printStackTrace();
}Here's an example of the program works right now:
Someone sends me a string such as this:
Enter port to run server on:
5656
Listening on : ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=5656]
Waiting for client connection...
Socket[addr=/127.0.0.1,port=4919,localport=5656] connected.
hostname: localhost
Ip address: 127.0.0.1:5656
Waiting for data...
Event from: localhost-> UPDATE: "@busch2.raleigh.ibm.com->NmosPingFail1",424,"9.27.132.139","","Omnibus","Precision Monitor Probe","Precision Monitor","@busch2.raleigh.ibm.com->NmosPingFail",5,"Ping fail for 9.27.132.139: ICMP reply timed out",07/05/07 12:29:12,07/03/07 18:02:31,07/05/07 12:29:09,07/05/07 12:29:09,0,1,194,8000,0,"",65534,0,0,0,"NmosPingFail",0,0,0,"","",0,0,"",0,"0",120,1,"9.27.132.139","","","","dyn9027132107.raleigh.ibm.com","","","",0,0,"","","NCOMS",424,""
Now my program makes it all nice and filters out the junk and resends the new string to the other server running here:
Enter port to run server on:
1234
Listening on : ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=1234]
Waiting for client connection...
Socket[addr=/127.0.0.1,port=4920,localport=1234] connected.
Parser client connected.
hostname: localhost
Ip address: 127.0.0.1:1234
Event from: localhost-> PacketType: UPDATE , SizeOfPacket: 577 , PacketID: 1, Identifer: UPDATE: "@busch2.raleigh.ibm.com->NmosPingFail1" , Serial: 424 , Node: "9.27.132.139" , NodeAlias: "" , Manager: "Omnibus" , Agent: "Precision Monitor Probe" , AlertGroup: "Precision Monitor" , AlertKey: "@busch2.raleigh.ibm.com->NmosPingFail" , Severity: 5 , Summary: "Ping fail for 9.27.132.139: ICMP reply timed out",StateChange: 07/05/07 12:29:12 , FirstOccurance: 07/03/07 18:02:31 , LastOccurance: 07/05/07 12:29:09 , InternalLast: 07/05/07 12:29:09 , EventId: "NmosPingFail" , LocalNodeAlias: "9.27.132.139"
Lenght of the string was: 579
The length of the final string I sent is 577 by using the string.length() function, but when I re-read the length after the send 2 more bytes got added, and now the length is 579.
I tested it for several cases and in all cases its adding 2 extra bytes.
Anyways, I think this is a bad solution to my problem but is the only one I could think of.
Any help would be great!(a) You are counting characters, not bytes, and you aren't counting the line terminators that are appended by println() and removed by readLine().
(b) You don't need to do any of this. TCP doesn't lose data. If the receiver manages get as far as reading the line terminator when reading a line, the line will be complete. Otherwise it will get an exception.
(c) You are assuming that the original input and the result of message.toString() after constructing a Message from 'input' are the same but there is no evidence to this effect in the code you've posted. Clearly this assumption is what is at fault.
(d) If you really want to count bytes, write yourself a FilterInputStream and a FilterOutputStream and wrap them around the socket streams before decorating them with the readers you are using. Have these classes count the bytes going past.
(e) Don't use PrintWriter or PrintStream on socket streams unless you like exceptions being ignored. Judging by your desire to count characters, you shouldn't like this at all. Use BufferedWriter's methods to write strings and line terminators. -
Setting TileList height to Change Based on How Many Items Are Within It
In my app I have a tilelist populated by an array collection and I need it's height to change based on how many items are within it i.e. as new items are added to the array collection which populates it the tilelist will grow in height so that a scrollbar isn't necessary. Is there some sort of formula I can apply to the tilelist height property so that it expands in height as more items are added to it similar to the way a vbox would?
Hi,
OK - you don't actually need to know how many items there are as javascript can create a collection for you and you can loop through that. In your example, each item will have a NAME attribute of "f02" - using document.getElementsByName("f02") will create a collection of all items that have this name and using a "for" loop, will allow you to examine every one.
One thing to note is that any INPUT item that is disabled or made read-only will not be included in the data when the page is submitted (this is a browser thing not an Apex one), so these items need to be re-enabled immediately prior to the submit action.
For an example of all of this, see my first post in: Re: A better method of handling tabular forms with variable column type?
Andy -
HT1420 how many computers are autherized for my account?
how many computers are autherized to my account and how can closed some of it that i dont use it anymore
You can check here:
Launch iTunes and go to iTunes Store > Account (Quick Links section on the right) > Computer Authorizations
Each individual computer has to be deauthorized from iTunes on that computer: iTunes Store: About authorization and deauthorization
If you no longer have the computers, you can deauthorize all by clicking the Deauthorize All button to the right in the Accounts section mentioned above. Then simply re-authorize the computers you are currently using.
*Apple limits this option to once every 12 months. -
How many songs are checked in Your Music?
I am wondering if there is a quick way to know how many songs are checked in "Your Music"? I tried to select all (ctrl+a) but didnt see a number. I have heard there is a 10,000 song limit. Is this still the case? I use the check feature to denote preffered songs on albums, and keep track of what I have listened too. I do not want to invest this time if I am going to hit the 10,000 mark and I wont let me add any more or worse yet remove an old check to add a new one! Thanks
Hello:
When you use the ctrl+a and all songs are highlighted, if you start to drag all tracks as you would when adding to a playlist, does a small context window open next to your mouse pointer informing you how many tracks you are dragging?
And sadly yes currently there is a 10,000 track limit in YOUR MUSIC. I still use playlists to add stuff and keep me aware of new things I add by date added to playlists and to know when something needs listening to next.
Now you can always uncheck content added under either SONGS or ALBUMS under YOUR MUSIC. And add new content each time if you are wanting to use it as a way to keep up with new stuff not listened to yet. Just click on either the tracks or albums check marks and click on the X on mouse hover to change them from a check mark to an X to remove those items, and you should be able to change out content that way. -
I recently upgraded my Thunderbird client to 3.1.10 from 2.2xx and I no longer can see the size of folders or how many messages are in certain folders. The folders do show how many are unread, but not the total messages or size of data in folder as I could with the previous version. If these options have been removed for some reason is there a problem with reverting to the previous version? Thanks, Dave English
That was exactly what I was looking for. Thanks
-
How many messages are in an archive file?
Hi,
Is there a way to tell how many messages are written to each archive file? It looks like the default file size is 200M.
Your help will be greatly appreciated.
Regards,
RickHey
If you really want,you can cancel this job in sm37.
But i would say that you can let it run. as long as it does not affects the performance of PI system you should be ok.
a better approach would have been to increase the retention period in sxmb_adm,then go to SE38 and execute the program RSXMB_SHOW_REORG_STATUS, this will tell you how many messages will be archived/deleted once the job run.
You can set the retention period so that it takes around 50-60K messages, then let the report run ,should finish in 3-4 hours max (thats what i used to do), then go back to sxmb_adm and reduce the retention period.execute the report again and see how many messages it will archive now.
Keep on doing this until you archive/delete all the messages.
Thanks
Aamir -
How many threads are running?
here's the code... i am trying to understand, at each point, how many threads are running:
I understand that one thread belongs to the caller of the start()
& at the same time there is another thread belonging to the instances of each thread (thread1, thread2, thread 3 etc.)
1public class ThreadTester {
2 public static void main( String args[] )
3 {
4 PrintThread thread1, thread2, thread3, thread4;
5
6 thread1 = new PrintThread( "thread1" );
7 thread2 = new PrintThread( "thread2" );
8 thread3 = new PrintThread( "thread3" );
9 thread4 = new PrintThread( "thread4" );
10
11 System.err.println( "\nStarting threads" );
12
13 thread1.start();
14 thread2.start();
15 thread3.start();
16 thread4.start();
17
18 System.err.println( "Threads started\n" );
19 }
}can you tell me if i am counting the number of threads in existance correctly...
LINE#.....CALLER...START...TOTAL THREADS
13..............1.........1.......2
14..............1+1......1+1.....4
15..............2+1......2+1.....6
16..............3+1......3+1.....8
so by the time line 16 executes i have a total of 8 threads,
4 threads belonging to each caller plus
4 threads created by start()
or is it
LINE#.....CALLER...START...TOTAL THREADS
13..............1........1........2
14..............1........1+1.....3
15..............1........2+1.....4
16..............1........3+1.....5
after line 16 executes does the caller thread die, thus leaving only a total of 4 threads?
there is only one thread belonging to the caller at line 13(plus the thread it creates).
at the start of line 14, the previous callers thread is dead & now a new thread is created that belongs to the caller on line 14... etc.well, i realize at the end there would be 4 threads but im trying to get my head around this explanation in the book:
"A program launches a threads executioin by calling the threads start method, which in turn call the run method. After start launches the thread, start returns to tis caller immediately. The caller then executes concurrently with the lauched thread." there fore if i have 2 concurrent processes, are there 2 threads running????
now having said the above, my question was:
for each line,
how many threads are in existance at
line13
line14
line15
line16
thanks. -
Can I find out how many clients are connected to a server process?
Hi, I am hoping I can find out how many clients are connected to a server process. This could be either a programmatic lookout number, a number in a log file etc.
By the way, does lookout have any application (not data) logs? I have noticed that occasionally lookout will crash and I cannot find any logs to determine why, what processes were running, who last accessed it etc.
ThanksHello,
There's currently no way to acquire this data. I think that'd be a great suggestion for the product. Please submit your feedback to our developers at the following link: http://digital.ni.com/applications/psc.nsf/default?OpenForm&temp1=&node=
Best regards,
Yusuf C
Application Engineer
National Instruments
Maybe you are looking for
-
Frozen screen with no connection with mouse or keyboard
Hello, My iMac has frozen on the start up page. I googled what might be wrong and came up with a bluetooth connection problem. So, I bought a wired mouse and it still won't 'wake up'. The wired mouse doesn't work either. Anyone got any suggestions? T
-
What is the significance of schedule line in inquery
hi all, i am new with this community hope u all like, i have a small doubt that what is the use of scheduline in inquery , as i saw in AN sceduleline is not price , delivery, movement relevent. then why AN schedule line is used in inquery thanks de
-
Google finding iWeb mobileme site
I have an iWeb mobileme site and a separate domain name linked. Google can't find it. Does a site have to be hosted separately for this to happen?
-
How to create Decision Node in Data Flow diagram under Process Model
Hi, I am starting a new project and would like to use Oracle Data Modeler for my data flow diagrams and logical/relational diagrams. Could you please guide me how can I ask Decision question in data flow diagram. Ideallly i would like to create a Dec
-
EPMA Server service not starting 11.1.2.2
Service cannot be started. Hyperion.DimensionServer.Interface.Exceptions.EPMAServiceException: Cannot initialize the Session Manager. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Sys