Source code of copy image and paste it in paint
I want to copy the image from website and paste it in the paint and
Microsoft word. Pls help me to solve out this problem.
Thursday, 3 October 2013
Wednesday, 2 October 2013
How To create a report using data from Excel in Word Template
How To create a report using data from Excel in Word Template
Summary: I have to fill in a report using data from Excel in Word
Template. Problem: I am trying to write a macro which will search some
variables in pre-defined template (doc) and replace these variables with
data from excel. The variables are nothing but some text like <-Date->,
<-Author-> (self-created). There are also some Tables and Sections that
needs to be duplicated from the Word Template depending on the Excel Data.
For Example
I'll need to make 3 more Sections for Dates. Because Word
1.<-Date->
Excel 03-10-2013 04-10-2013 05-10-2013
After Macro 1. 03-10-2013
04-10-2013
05-10-2013
Thanks in advance.
Summary: I have to fill in a report using data from Excel in Word
Template. Problem: I am trying to write a macro which will search some
variables in pre-defined template (doc) and replace these variables with
data from excel. The variables are nothing but some text like <-Date->,
<-Author-> (self-created). There are also some Tables and Sections that
needs to be duplicated from the Word Template depending on the Excel Data.
For Example
I'll need to make 3 more Sections for Dates. Because Word
1.<-Date->
Excel 03-10-2013 04-10-2013 05-10-2013
After Macro 1. 03-10-2013
04-10-2013
05-10-2013
Thanks in advance.
Displaying console output in jtextarea even when other actions occur
Displaying console output in jtextarea even when other actions occur
I found this code here: how to display console output in java JTextarea
one by one in a loop when button action is triggered and it displays
console output in a jtextarea. I have added this class as action in a
jmenuitem. So that it appears when I want and when I run other classes it
will show the output there. However when I launch it, it works properly,
but if I try and launch another class which will show output in console
and accept userinput, the jtextarea which is supposed to show console
output at the same time, it freezes. How could I make it so that it stays
tuned, despite invoking other classes/frames? Thanks in advance
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class DynamicWrite implements ActionListener
{
JFrame frame = new JFrame("TextArea");
JTextArea tArea = new JTextArea(10,20);
JButton button = new JButton("Click");
JScrollPane pane = new JScrollPane(tArea);
SwingWorker worker;
String s= "Java is an Object Oriented Programming langauge...Java is
static typed language...asbfldfjsdj";//some random String
public void prepareAndShowGUI()
{
Container container = frame.getContentPane();
container.add(pane);container.add(button,BorderLayout.NORTH);
tArea.setLineWrap(true);
tArea.setWrapStyleWord(true) ;
button.addActionListener(this);
frame.pack();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
public void actionPerformed(ActionEvent evt)
{
if(evt.getSource()==button)
{
tArea.setText("");
if (worker!=null)
{
worker.cancel(true);
}
worker = new SwingWorker()
{
@Override
protected Integer doInBackground()//Perform the required
GUI update here.
{
try
{
for(int i = 0;i<s.length();i++)
{
tArea.append(String.valueOf(s.charAt(i)));
Thread.sleep(5);
}
}catch(Exception ex){}
return 0;
}
};
worker.execute();//Schedules this SwingWorker for execution on
a worker thread.
}
}
public static void main(String st[])
{
DynamicWrite dyna = new DynamicWrite();
dyna.prepareAndShowGUI();
}
}
I found this code here: how to display console output in java JTextarea
one by one in a loop when button action is triggered and it displays
console output in a jtextarea. I have added this class as action in a
jmenuitem. So that it appears when I want and when I run other classes it
will show the output there. However when I launch it, it works properly,
but if I try and launch another class which will show output in console
and accept userinput, the jtextarea which is supposed to show console
output at the same time, it freezes. How could I make it so that it stays
tuned, despite invoking other classes/frames? Thanks in advance
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class DynamicWrite implements ActionListener
{
JFrame frame = new JFrame("TextArea");
JTextArea tArea = new JTextArea(10,20);
JButton button = new JButton("Click");
JScrollPane pane = new JScrollPane(tArea);
SwingWorker worker;
String s= "Java is an Object Oriented Programming langauge...Java is
static typed language...asbfldfjsdj";//some random String
public void prepareAndShowGUI()
{
Container container = frame.getContentPane();
container.add(pane);container.add(button,BorderLayout.NORTH);
tArea.setLineWrap(true);
tArea.setWrapStyleWord(true) ;
button.addActionListener(this);
frame.pack();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
public void actionPerformed(ActionEvent evt)
{
if(evt.getSource()==button)
{
tArea.setText("");
if (worker!=null)
{
worker.cancel(true);
}
worker = new SwingWorker()
{
@Override
protected Integer doInBackground()//Perform the required
GUI update here.
{
try
{
for(int i = 0;i<s.length();i++)
{
tArea.append(String.valueOf(s.charAt(i)));
Thread.sleep(5);
}
}catch(Exception ex){}
return 0;
}
};
worker.execute();//Schedules this SwingWorker for execution on
a worker thread.
}
}
public static void main(String st[])
{
DynamicWrite dyna = new DynamicWrite();
dyna.prepareAndShowGUI();
}
}
If C# code is JIT compiled why do I have to choose a target platform in Visual Studio when building?
If C# code is JIT compiled why do I have to choose a target platform in
Visual Studio when building?
My assumption could be wrong, but I thought that the main advantage of JIT
compilation is that allows a single distributable that the JIT compiler
will compile for the target machines particular hardware.
If this is true, then why can a target platform be specified when
compiling C#?
Thanks.
Visual Studio when building?
My assumption could be wrong, but I thought that the main advantage of JIT
compilation is that allows a single distributable that the JIT compiler
will compile for the target machines particular hardware.
If this is true, then why can a target platform be specified when
compiling C#?
Thanks.
Tuesday, 1 October 2013
Creating A new Route in MVC
Creating A new Route in MVC
In MVC, the default route url pattern is - url : "{controller}/{action}/{id}"
When I add a new route as shown below before the default route, the
default route does not work. I can I make them to co-exist
routes.MapRoute(
name: "Name",
url: "{controller}/{action}/{name}",
defaults: new { controller = "Home", action = "Browse", name =
UrlParameter.Optional }
);
In MVC, the default route url pattern is - url : "{controller}/{action}/{id}"
When I add a new route as shown below before the default route, the
default route does not work. I can I make them to co-exist
routes.MapRoute(
name: "Name",
url: "{controller}/{action}/{name}",
defaults: new { controller = "Home", action = "Browse", name =
UrlParameter.Optional }
);
I cant simply await GetStringAsync?
I cant simply await GetStringAsync?
I thought I could do i straight forward, but maybe there is something
wrong with my setup? I'm trying to download a string in my app for logging
in:
private async void DoLogin()
{
HttpClient client = new HttpClient();
string response = await
client.GetStringAsync(Config.SERVER_URL + "/Login/");
All logic is removed, im going to add headers and so on, but VS2012 will
no allow me to await that response.
I tried to follow the code from here, but in my case I only get Cannot
await 'System.Threading.Tasks.Task<string'.
Why is that? Should'nt GetStringAsync simply return me a string? It
returns a Task<string>, but do I have to wrap it in a method?
I thought I could do i straight forward, but maybe there is something
wrong with my setup? I'm trying to download a string in my app for logging
in:
private async void DoLogin()
{
HttpClient client = new HttpClient();
string response = await
client.GetStringAsync(Config.SERVER_URL + "/Login/");
All logic is removed, im going to add headers and so on, but VS2012 will
no allow me to await that response.
I tried to follow the code from here, but in my case I only get Cannot
await 'System.Threading.Tasks.Task<string'.
Why is that? Should'nt GetStringAsync simply return me a string? It
returns a Task<string>, but do I have to wrap it in a method?
Conditional probability with and without replacement
Conditional probability with and without replacement
A sample of size $r$ is taken from a population of $n$ elements. Find the
probability that none
of the $N$ prescribed elements will be included in the sample, assuming
the sampling to be
a) without
b) with replacement
..
Compare the numerical value for the two methods, when
(i) n=100, r=N=3
and
(ii) n=100, r=N=10
..
A sample of size $r$ is taken from a population of $n$ elements. Find the
probability that none
of the $N$ prescribed elements will be included in the sample, assuming
the sampling to be
a) without
b) with replacement
..
Compare the numerical value for the two methods, when
(i) n=100, r=N=3
and
(ii) n=100, r=N=10
..
How to draw a big red cross through large parts of a text=?iso-8859-1?Q?=3F_=96_tex.stackexchange.com?=
How to draw a big red cross through large parts of a text? –
tex.stackexchange.com
I am co-authoring a piece of text, and I would like to indicate that in my
opinion certain parts should be removed, by drawing a big red cross
through that specific section. I have tried to work with …
tex.stackexchange.com
I am co-authoring a piece of text, and I would like to indicate that in my
opinion certain parts should be removed, by drawing a big red cross
through that specific section. I have tried to work with …
Subscribe to:
Comments (Atom)