Using PHP how can I get week's start date and end date from any given date. For example 2010-05-13 is Thursday so how can I get 2010-05-09 (SUN) and 2010-05-15 (SAT)
I seem to recall hearing at some point (I believe it was MIX09) that Microsoft has a licensing model of some sort where a business can consume licenses for up to two years, free of charge, until they reach a point where they are stable position and can pay their licensing at the end of two years. However, I can't find information regarding it online.
I want to say that possibly stackoverflow used this licensing model to kick start their site. Is anyone familiar with this?
Hi
I m working on a client-server program, where there is no test at all.
When i try to do some test with two server, it's look like both server is connected to the same database. I think the reason is some bad use of static field.
So i wonder, is there a way to start two VM in a junit test?
One of the more common complaints I have read about the AppEngine database (for Java) is that it is extremely slow when it come to "cold start time". What does this mean? And is it something I should be worried about?
Hello,
I am having a rather strange problem, I deployed 2 .NET applications on my machine. Both run on v2.0.
Now, while one of it works smoothly, the other one doesn't even start! Moreover, it doesn't throw any error, I couldn't see any error listings in the Event Viewer.
Becoming hard to debug. On every other machine, both the exe's work perfectly fine!
Any known issues?
Thanks
Does switching activities in Android start a fresh JVM? It seems like each activity is meant to run as its own "main" method. If I have a singleton (via Guice, not an actual singleton in this case) should I expect to be re-creating it every time I switch activities?
I have one node(ImageView) that displays an image and another node(rectangle) that resides on top of it. The behavior I need is that when the mouse is dragged(press-drag-release gesture) over the rectangle, both the nodes should move coherently. My thought process goes in the following direction:
• Move both the nodes by the same distance in the direction of the drag.
For this option(maybe there are more options) I need the distance between the start and end of the mouse drags. I tried capturing the start and end coordinates of the drag but have been unsuccessful. I think I am getting lost in which handlers to implement.
The code I have is below:
import javafx.event.EventHandler;
import javafx.geometry.Rectangle2D;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
public class MyView
{
double mouseDragStartX;
double mouseDragEndX;
double mouseDragStartY;
double mouseDragEndY;
ImageView imageView;
public MyView()
{
imageView = new ImageView("C:\\temp\\test.png");
}
private void setRectangleEvents(final MyObject myObject)
{
myObject.getRectangle().setOnMousePressed(new EventHandler<MouseEvent>()
{
@Override
public void handle(MouseEvent mouseEvent)
{
mouseDragStartX = mouseEvent.getX();
mouseDragStartY = mouseEvent.getY();
mouseEvent.consume();
}
});
myObject.getRectangle().setOnMouseReleased(new EventHandler<MouseEvent>()
{
public void handle(MouseEvent mouseEvent)
{
mouseDragEndX = mouseEvent.getX();
mouseDragEndY = mouseEvent.getY();
myObjectDraggedHandler();
}
});
}
private void myObjectDraggedHandler()
{
Rectangle2D viewport = this.imageView.getViewport();
double newX = this.imageView.getImage().getWidth()
+ (mouseDragEndX - mouseDragStartX);
double newY = this.imageView.getImage().getHeight()
+ (mouseDragEndY - mouseDragStartY);
this.imageView.setViewport(new Rectangle2D(newX, newY, viewport.getWidth(), viewport
.getHeight()));
}
}
P.S: This code is just for indicating what I am trying to implement and will not compile correctly.
Or maybe my question should just have been:
How to capture the length or span of a mouse drag?
From cmd on windows, you can stype "start filename" and an action will be taken based on the type of the file. EXEs will launch, JPEGs will have an associated file viewer opened, etc..
Is there a way to do this on Linux / Ubuntu?
Hi..
actually my question is just like the title says..
i need to find out the first cell and the last cell of a vertically merged cell..
lets say i merge the Cells B2 down to B50
how can i get in VBA the start cell(=B2) and the end cell(=B50) ?
thanks a lot
Hi, I need to create a bash shell script starting with a day and then loop through each subsequent day formatting that output as %Y_%m_d
I figure i can submit a start day and then another param for the number of days.
My issue/question is how to set a DATE (that is not now) and then add a day.
so my input would be 2010_04_01 6
my output would be
2010_04_01
2010_04_02
2010_04_03
2010_04_04
2010_04_05
2010_04_06
Thanks
Is there a formula someplace which can be used to determine the minimum number of segments / bytes which need to be transfered across a TCP connection to determine it's bandwidth and which takes into account Slow Start and Congestion Avoidance?
I downloaded pidgin source code and i don't know where to start from ..
Can any one pls ;) point the right way to understand that program ?
and also tell how to compile it on windows system .. it has manuals to compile on a Linux system but not windows .
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\program\sanweetha\quotation.php:280) in C:\xampp\htdocs\program\sanweetha\php\captcha demo\captcha_demo.php on line 1
i have a pet programming goal: to develop a bot for a game. Now, this won't be anything malicious, and I just want to do this to further my knowledge in programming.
Can anyone help me out by pointing to where i can start learning how to develop a bot?
the type of bots i want to make are video game bots (online multiplayer, first person shooters, and offline games(like solitaire and such)).
Thanks!
I have a ClickOnce application that I would like to "re-brand" for multiple clients.
Is there a way, without separate deployments or branched builds, to change the start menu folder/link of the application?
Obviously once it starts and gets the settings it can rebrand everything else from there...
Hi ,
I wanted to know if there is any system variable which is can use to access package execution start and end times. My requirement is that i need to store this in 2 relevant fields in a table in the database.
Thank you.
Abhi
Hello;
Why can't I start a line using a parenthesis followed by the keyword new?? For example:
(New <custom_obj>).foo(var)
In that case is obvious that I'm trying to avoid creating a named instance of the the <custom_obj> because I know that I'll only be using it at that sentence.
Note that actually creating a named instance is not a problem for me... I just wanna know the reason why this is not possible.
Trying to find a way to trim spaces from the start and end of the string. I was using this, but it dont seem to be working:
title = title.replace(/(^[\s]+|[\s]+$)/g, '');
Any ideas?
Say that I'm writing a test and my caret is here (indicated by "|"):
[ExpectedException(typeof(InvalidOperationException|))]
In Visual Studio 2010, I'd like to press some shortcut that would take me to the next line so that I could start typing "public void Etc()".
Right now, I need to press
Right arrow
Right arrow
Right arrow
Enter
Which is too many key presses IMO. Is there a VS2010 / ReSharper shortcut to aid this operation?
my laptop is starting up and produces the normal screen due to abrupt power failure and when i click to start normally or in safe mode, the blue screen splashes and then disappears and then it tries to reboot again and the same problem takes place. it was running on xp service pack 2. could anyone help
Following function is used to get the page's start address of an address which in side this page:
void* GetPageAddress(void* pAddress)
{
return (void*)((ULONG_PTR)pAddress & ~(PAGE_SIZE - 1));
}
But I couldn't quite get to it, what is the trick it plays here?
I have one activity which i am using for displaying Dialogs and as a normal layout.
So what i want to do is, sometimes i want to start activity as Theme Dialog and some times using setContentView.
I can't use <activity android:theme="@android:style/Theme.Dialog"> in manifest file as it will always display activity as dialog.
So can we do it programmatic, i have also tried setTheme() method but it did't work.
Thanks,
PP.