Actally my java progrem like...
public class Schedule{
public static enum RepeatType {
DAILY, WEEKLY, MONTHLY;
}
public static enum WeekdayType {
MONDAY(Calendar.MONDAY), TUESDAY(Calendar.TUESDAY), WEDNESDAY(
Calendar.WEDNESDAY), THURSDAY(Calendar.THURSDAY), FRIDAY(
Calendar.FRIDAY), SATURDAY(Calendar.SATURDAY), SUNDAY(
Calendar.SUNDAY);
private int day;
private WeekdayType(int day) {
this.day = day;
}
public static List<Date> generateSchedule(RepeatType repeatType,List<WeekdayType> repeatDays) {
-----------------------------
----------------------------//hear some logic i wrote
}//Method
}
And i'm calling the method into my Business class like following...
@RemotingInclude
public void createEvent(TimetableVO timetableVO) {
if ("repeatDays".equals(timetableVO.getSearchKey())) {
List<Date> repeatDaysList=Schedule.generateSchedule(timetableVO.getRepeatType(),timetableVO.getRepeatDays());
}
}
And Finally TimetableVO is
@Entity
@Table(name="EC_TIMETABLE")
public class TimetableVO extends AbstractVO{
-----
private RepeatType repeatType;
private List<WeekdayType> repeatDays;//But in this case the method generateSchedule(-,-) was not calling.
-----
}
So my Question is Which one is Better Statement in the Following...
private List<WeekdayType> repeatDays;
(or)
private String repeatDays;//if we give like this `How to Convert Enum type to String` because generateSchedule() method taking enum type value....
As we know c++ is also an Object Oriented Programming language where most the things are objects like java. So wanted to know is the Serialize and deserializ features are available in c++ as well as we do it in java?
If yes how it can be achieved?
In java We use Serializable Interface to say that this type of object can be serialized and deserialized.
So in c++ how?
And out of curiosity is it same in c# as in java?
IIRC the situation is that IE simply doesn't support rounded corners, but some other browsers need browser-specific extensions... either FF or web-kit, I don't recall.
I'm happy to use it in some cases and let IE fall-back to square corners, but does using browser-extension CSS break validation... I quite like having my site validate AND work on IE6.
how do i ignore exceptions in c#?
i am reading a remote xml file, and sometimes the tag doesnt exist and it throws an exception. how do i ignore the exception and goto next?
Is there a way to include a LIKE expression in a GROUP BY query? For example:
SELECT Count(*)
from tblWhatever
GROUP BY column_x [LIKE %Fall-2009%]
column_x:
--------
BIOL-Fall_2009
HIST Fall_2009
BIOL Spring_2009
Result:
------
Fall_2009 2
Spring_2009 1
I have an array of timestamps referring to the days when a holiday home is booked.
each timestamp is a round day.
I want to turn this into an array of 'begins' and 'ends' pairs for consecutive dates
Are there any php functions I should be aware of for writing this function?
Or does anyone have any pointers for this kind of thing?
thanks!
edit:
example array:
Array
(
[0] => 1273536000
[1] => 1273622400
[2] => 1273708800
[3] => 1273795200
[4] => 1273881600
[5] => 1273968000
[6] => 1274054400
[7] => 1274140800
[8] => 1274227200
)
where a day = 86400 (seconds)
Hi
I am using the jquery .serializeArray() function and I send it to the server and that works all good.However I need to update a couple things on the client side that are serialized.
So instead of doing another selector on the textbox I want to just grab it out of the serialized array.
I am not sure how to do this
Product=Test&Qty=50
So say if I have something like this. I can I do something like this
var sendFormData = form.serializeArray();
var val = sendFormData["Product"].value;
but this seems not to work. I only can get it to work when I do something like this
var sendFormData = form.serializeArray();
var val = sendFormData[0].value;
I really don't want to do it by index since that means if the order changes the values could be all wrong. If you could do it by like keyname then that would not be a problem.
Hi,
Can we convert numbers to their alphabetical equivalents? For example
21 - twenty one
9999 - nine thousand nine hundred ninghty nine
If yes, how to do this?
Thanks and Regards,
EDIT :
Any language will do. C#, C++, Java, python.
I have .jpg images in my buttons. I also would like to put some text on top of the images. I use the following syntax for that:
JButton btn = new JButton(label,icon);
But I do not see text in the buttons (only image). What am I doing wrong?
Currently anybody can access the solr admin page by going to my_ip:8983/solr
I can't have it like that, so how can I make it prompt for password or something?
I have setup my servers apache2.conf file to prompt for password whenever my site is accessed by www.mydomain.com.
But when using another port, the "require password" wont show up.
Any ideas how to secure this?
Don't point me to the SolrSecurity wiki because it's simply too outdated. I have tried it without luck.
Thanks
I am looking into using Zookeeper to synchronized distributed Camel instances. In doing so it seems that there is not possibility to delete a znode from Zookeeper from Camel (I imagined some sort of producer operation).
A look at the components source seems to confirm this. (I didn't find any code explicitely requesting a node removal).
Am I missing something ? When would a node created via Camel (in my case EPHEMERAL) be deleted ? Maybe I am miss understanding something with zookeeper ?
<td style="width:77px" id="<%=id%>"><div class="condbar"><div class="condprogress" style="width:Data.condition%; background:condColor"></div> <div class="condvalue"><%=condition%><span>%</span></div></div></td>
I want to set the width of a div .roster_condprogress as a percentage according to data and change the color accordingly (using a variable for that). What is a correct way to write this? (if it exists)
I have an ASP form that needs to submit data to two different systems. First the data needs to go into an MS SQL database, which will get an ID. I then need to submit all that form data to an external system, along with that ID.
Pretty much everything in the code works just fine, the data goes into the database, and the data will go to the external system. The problem is I am not getting my ID back from SQL when I execute that query. I am under the impression this is happening because of how fast everything occurs in the code. The database is adding it's row at the same time my post page runs it's query to get the ID back, I think.
I need to know of a way to wait until SQL finished the insert or wait for a specific amount of time maybe. I already tried using the hacks to "sleep" with ASP, that did not help.
I am sure I could accomplish this in .Net, my background is more .Net than ASP, but this is what I have to work with on my current project.
Any ideas?
I'm running into some issues with having a lot of UIImages in memory, so I was wondering if there is any way of using PVRTC images instead of PNGs in UIImages.
I want to generate a tuple of tuple in form of ((x1,y1,x2,y2),...(x1,y1,x2,y2)) where x1,y1,x2,y2 are all in range of (0,8).
Is there any other way rather than the following?
S = list()
for x1 in range(0, 8):
for y1 in range(0, 8):
for x2 in range(0, 8):
for y2 in range(0, 8):
S.append([x1,y1,x2,y2])
S = tuple(S)
thanks
Array for example
$array = Array ( [0] = Array ( [first] = 5 ) [1] = Array ( [first] = 4 ) [2] = Array ( [second] = 3 ) );
How sum values by keys for result
$first with value 9 and $second - 3
thanks in advance
I know this is yet another question on how to setup network but I hope you are not bored of such questions yet.
The site is also an office, so it includes windows dc, windows ad, exchange, sql, file sharing, development app servers and other pcs.
In addition to office (internal) things, there are both test and prod environments consisting of a web server-app server-sql stack. There is also ftp service open to public.
I consider:
dmz1
- web server
- exchange edge
- ftp
dmz2
- app server
- sql for app server
internal
- dc and ad
- exchange hub and transport
- internal file sharing
- sql for internal use
- app servers for internal use
- pcs
public - dmz1, only web, ftp and smtp
public - dmz2 not possible
public - internal not possible
dmz1 - dmz2 is possible from web servers to app servers by using http or ajp
dmz1 - internal is only possible for exchange, otherwise not possible
dmz2 - internal not possible
Does this sound ok ? Any other recommendations ? It will be configured using either MS ISA or Jupiter SSG. Thank you.
I just unpacked my new Sony Vaio, with windows 8 pro installed. Everything is nice, so I tried setting my power management options. The "When I close the lid" option only list:
Hibernate
Sleep
Shutdown
The "Do nothing" option is not present.
I've seen loads of stuff on google where people ask or explain how to set this option to "Do nothing", but in all my power plans this option is absent...
Can I use a tool to prevent this, or is there a way to force windows to show me this option (and that it actually works)?
UPDATE
powercf /q guid gives me this output:
Subgroup GUID: 4f971e89-eebd-4455-a8de-9e59040e7347 (Power buttons and lid)
GUID Alias: SUB_BUTTONS
Power Setting GUID: 5ca83367-6e45-459f-a27b-476b1d01c936 (Lid close action)
GUID Alias: LIDACTION
Possible Setting Index: 000
Possible Setting Friendly Name: Sleep
Possible Setting Index: 001
Possible Setting Friendly Name: Hibernate
Possible Setting Index: 002
Possible Setting Friendly Name: Shut down
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000000
Other sections have different enumerations where 000 stands for No action
I'd like to bind ?? and ?? on Terminal.app to going to the start and end of the line respectively so it behaves like any (almost) other program in Mac OS X. Is it possible?
I went to Preferences and to configure key bindings and the only modifier keys are control, option, none and shift.
hi i have one question i know site mathoverflow.com and have posted question but unfortunately no one give me answer if i post here can anybody help me? it is not homework
because i know somebody will say it is homework what u have tried but this is not so i dont know how solve please if it is possible i will post here ok?
look at this table please
table
|id| |name| |order|
i must get the rows, where name = something and order = somevalue
so i write
select `id` from `table` where `name` = 'something' and `order` = 'somevalue'
but depend on php logic, sometimes i need to get all rows, where name = somethimg, independently of order value. i don't want to change the query structure, because in practise there are many number of fields, and possible count of queries will became very big. so i want to save the structure of query, and when i need to select just by name, i want to write something like this
select `id` from `table` where `name` = 'something' and `order` = any value
is it possible?
maybe the question is incomprehensible, at least i tried;)
sorry for bad english
thanks