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)
Hi,
How can i copy a substring from a given string with start and end index or giving the start index and length of the string are given.
Thanks,
iSight
Hi peoples, I'm building a pdf document with reportlab, using the Paragraph class:
doc = SimpleDocTemplate(response, leftMargin=lateral_margin, rightMargin=lateral_margin,
topMargin=top_bottom_margin, bottomMargin=top_bottom_margin)
Document = []
Document.append(Paragraph("bla bla bla bla", my_style))
doc.build(Document)
Now I want to add at the end of every page a string, how can I do that??
I would like to calculate end date (and time) of an event. I know starting date and duration (in minutes). But:
I have to skip holidays - non-recurrent situation
I have to skip weekends - recurrent situation
I have to not count working time (e.g: from 8:00am till 5:00pm) - recurrent situation, but with finer granularity
Is there a simple way to achieve these cases using Joda time library?
I have problem with validation such code
function show_help_tip(event, element) {
var $e = $(element);
var pos = $e.offset();
$('.body-balloon',$help_tip_div).html($(' <p> </p> ').html(element.getAttribute('title')));
$help_tip_div.css({position:'absolute',top:530,left:pos.left+$e.width()-20}).show();
}
end tag for element "P" which is not open
What's wrong?
I need an AI Bot for a chat service which can imitate a human. I have tried ALICE with AIMLBot(C#) as a front-end but it didn't work very well.
Are there any good bots you would recommend?
does one create an admin front-end from scratch for every web application (not CMS sites)?
are there any tools for aiding this process?
some tutorials?
share your thoughts and experiences!
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?
Greetings,
in my application i have a listbox with items. THe application is written in WPF.
How to scroll automatically to the last added item? I want the scrollviewer to be moved to the end of the list when new item has been added.
Is thare any event like "ItemsChanged"?
(I don't want to use SelectionChanged event)
hi,
can I order alphabetically the tags in my edit content pages ?
See screenshot here:
http://dl.dropbox.com/u/72686/tagsOrder.png
Currently the order is given by the Taxonomy Manager module (I installed in my Drupal).
I would like to know if I should use jQuery to order the tags in my back-end pages.
thanks
I have some strings like below:
ffffffffcfdeee^dddcdeffffffffdddcecffffc^cbcb^cb`cdaba`eeeeeefeba[NNZZcccYccaccBBBBBBBBBBBBBBBBBBBBBB
eedeedffcc^bb^bccccbadddba^cc^e`eeedddda`deca_^^\```a```^b^`I^aa^bb^`_b\a^b```Y_\`b^`aba`cM[SS\ZY^BBB
Each string MAY (or may not) end with a stretch of trailing "B" of varied length.
I'm just wondering if we can simply use bash code to remove the "B" stretch?
thx
The answer to this must be somewhere but I'm not finding it -- can anyone help me understand why in Gedit, if I have a page of code there is no extra trailing blank line, but then when I do a file comparison for my svn commit it shows an extra line being added at the end of the file?
I have a feeling that Gedit is automatically adding an ending line break. But why, I have no idea...
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
I have bat-file, that make some operations. How to run this file from Delphi and wait, until it stops.
Something like that:
procedure TForm1.Button1Click(Sender: TObject);
begin
//Starting bat-file
bla-bla-bla
showmessage('Done');
end;
Does anyone know why im getting runtime error when i click on return button on iphone keyboard. I need to hide keyboard after done editing values to UITextField. So i assigned Did End On Exit to IBAction and the IBAction code below
-(IBAction)FinishEditing:(id)sender
{
[folderName resignFirstResponder];
}
When running ma project i facing a runtime error and the variable values shown below
argv char ** 0xbffff58c
*argv char * 0xbffff6b8
**argv char '/'
Console Value
(lldb)
Any idea to overcome this issue??
I have a composite combobox control (textbox and a listbox):
Initially I have the cursor on the start, but when I select an item from the listbox and it gets displayed on the textbox then also the cursor remains at start position.
I want the cursor to be at the end. Please suggest/help.
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
Hi,
I would like to order alphabetically the content in my Drupal back-end
Is there any simpler method than using Views module or hacking the code for doing it ?
I don't need an ordering selector, just to statically order the nodes differently.
thanks
I have the following source code
public class mod_MyMod extends BaseMod
public String Version()
{
return "1.2_02";
}
public void AddRecipes(CraftingManager recipes)
{
recipes.addRecipe(new ItemStack(Item.diamond), new Object[] {
"#", Character.valueOf('#'), Block.dirt
});
}
When I try to compile it I get the following error:
java:11: reached end of file while parsing }
What am I doing wrong? Any help appreciated.
I'm designing a web application.
I was wondering if it was feasible to design a php front end (using some php framework e.g. CakePHP), which stores and retrieves data to display to the user.
Then develop a java backend which listens to the database for changes, and depending on what was changed, performs some actions and updates the database.
Any thoughts on this type of implementation would be appreciated.
i am reading soap message from server over ssl connection using SSL_read(m_pssl,f_data,f_datalen) but it reading 265 bytes first.
then i again called SSL_read() and it reads rest of message + starting of message.
Can anyone tell me how to find the end of message over server over ssl connection?
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?
Is there a widely supported video playback technology for web pages that provides an event/hook that can be captured from Javascript when playback reaches the end of the stream?
My goal is to provide a web page that plays a video and then asks the user a question about the video once playback is complete. The question would be hidden or disabled until they have actually viewed the video.