Can't create an instance
I have a console application and a web application.the web application
call the console application and the console application create an
instance of a MSWORD .it is working fine in visual studio.But when I host
the web app in IIS and try localhost:222 it don't work. here is my code
web app code
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
Dim info = New System.Diagnostics.ProcessStartInfo()
info.FileName="F:\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe"
info.Arguments = TextBox1.Text & " " & TextBox2.Text
info.UseShellExecute = True
Dim process = New System.Diagnostics.Process()
process.StartInfo = info
process.Start()
process.WaitForExit()
End Sub
And the console app code is
Public Sub Main(args As String())
' CREATE AN OBJECT FOR WORD
Dim objWord As Object
objWord = CreateObject("Word.Application")
objWord.visible = True
End Sub
Anybody know what is the problem.
Wednesday, 21 August 2013
Tuesday, 20 August 2013
Obtaining BreezeJS Predicate equivalent on the Server Side
Obtaining BreezeJS Predicate equivalent on the Server Side
There are times when I wish to execute the same query on the server as I
do on the client when using the BreezeJS library.
Here's a trivial example. Imagine the results of a query are limited on
the client for paging using skip() and take(). An "Export" function would
allow the download of the unpaged dataset; ie: without the "take/skip"
restrictions.
Now in a simple "Select * from TableName" type of query, this is trivial,
but what if the breeze Predicate is complex, and dynamically created
(precluding using a well-known server side SQL View).
Ideally, I'd like to know the source code that the Breeze.js .NET client
uses to translate the Predicate into a Linq Where clause.
This isn't my best question I've ever posted, so if you're willing to
help, and need more info, please comment and I'll be happy to post an
example or more details.
There are times when I wish to execute the same query on the server as I
do on the client when using the BreezeJS library.
Here's a trivial example. Imagine the results of a query are limited on
the client for paging using skip() and take(). An "Export" function would
allow the download of the unpaged dataset; ie: without the "take/skip"
restrictions.
Now in a simple "Select * from TableName" type of query, this is trivial,
but what if the breeze Predicate is complex, and dynamically created
(precluding using a well-known server side SQL View).
Ideally, I'd like to know the source code that the Breeze.js .NET client
uses to translate the Predicate into a Linq Where clause.
This isn't my best question I've ever posted, so if you're willing to
help, and need more info, please comment and I'll be happy to post an
example or more details.
Group of finite ideles
Group of finite ideles
A simple question:
If $\overline{\mathbb{Q}}$ denotes the algebraic closure of $\mathbb{Q}$
in $\mathbb{C}$ then what is the definition of the group of $finite$
ideles of $\overline{\mathbb{Q}}$?
Many thanks
A simple question:
If $\overline{\mathbb{Q}}$ denotes the algebraic closure of $\mathbb{Q}$
in $\mathbb{C}$ then what is the definition of the group of $finite$
ideles of $\overline{\mathbb{Q}}$?
Many thanks
Why can't I chown to nobody over nfsv4?
Why can't I chown to nobody over nfsv4?
Server: FreeBSD 9.2-RC1, ZFS
Client: FreeBSD 9.0-RELEASE-p3
Filesystem is exported with "alldirs,maproot=root".
On the client, I can chown a file to any user but nobody.
client# touch foo
client# ls -l foo
-rw-r--r-- 1 root staff 0 Aug 20 11:18 foo
client# chown chris foo
client# ls -l foo
-rw-r--r-- 1 chris staff 0 Aug 20 11:18 foo
client# chown root foo
client# ls -l foo
-rw-r--r-- 1 root staff 0 Aug 20 11:18 foo
client# chown nobody foo
No name and/or group mapping for uid,gid:(65534,-1)
chown: foo: Operation not permitted
nobody exists on both client and server, with UID 65534 in both places. It
looks like this is something to do with nfsv4's user mapping (nfsuserd),
but I'm not finding good documentation on how that works. I've read hints
that nobody is handled specially.
Server: FreeBSD 9.2-RC1, ZFS
Client: FreeBSD 9.0-RELEASE-p3
Filesystem is exported with "alldirs,maproot=root".
On the client, I can chown a file to any user but nobody.
client# touch foo
client# ls -l foo
-rw-r--r-- 1 root staff 0 Aug 20 11:18 foo
client# chown chris foo
client# ls -l foo
-rw-r--r-- 1 chris staff 0 Aug 20 11:18 foo
client# chown root foo
client# ls -l foo
-rw-r--r-- 1 root staff 0 Aug 20 11:18 foo
client# chown nobody foo
No name and/or group mapping for uid,gid:(65534,-1)
chown: foo: Operation not permitted
nobody exists on both client and server, with UID 65534 in both places. It
looks like this is something to do with nfsv4's user mapping (nfsuserd),
but I'm not finding good documentation on how that works. I've read hints
that nobody is handled specially.
How to get the values from a multi dimension array
How to get the values from a multi dimension array
I have a result from my db query that's look like this when dump and the
query is doing what is expected, bu I am have a little problem getting the
array values. I am using PHP PDO to get the result.
$result = $_stmt->fetchAll();
$row = count($result);
print_r($result);
Array ( [0] => Array ( [SUM(od_price * od_qty)] => 69.85 [0] => 69.85 )
[1] => Array ( [SUM(od_price * od_qty)] => 13.97 [0] => 13.97 )
) 69.8513.97
You can see that the result contains both an array and a string values. I
have an option to get either the array or the string value. But I would
rather to get the array values since the the string values are all
togather. Can some one please explain what I am doing that's wrong in the
foreach loop?
if($row == 2)
{
foreach ($result as $k)
{
echo $price_1 = $k[0][0]; // expected 69.85
echo $price_2 = $k[0][1]; // expected 13.97
}
unset($k);
}
I need to get the expected values, but instead I am getting the string
values that are all togather.
I have a result from my db query that's look like this when dump and the
query is doing what is expected, bu I am have a little problem getting the
array values. I am using PHP PDO to get the result.
$result = $_stmt->fetchAll();
$row = count($result);
print_r($result);
Array ( [0] => Array ( [SUM(od_price * od_qty)] => 69.85 [0] => 69.85 )
[1] => Array ( [SUM(od_price * od_qty)] => 13.97 [0] => 13.97 )
) 69.8513.97
You can see that the result contains both an array and a string values. I
have an option to get either the array or the string value. But I would
rather to get the array values since the the string values are all
togather. Can some one please explain what I am doing that's wrong in the
foreach loop?
if($row == 2)
{
foreach ($result as $k)
{
echo $price_1 = $k[0][0]; // expected 69.85
echo $price_2 = $k[0][1]; // expected 13.97
}
unset($k);
}
I need to get the expected values, but instead I am getting the string
values that are all togather.
Upgrading without losing Visual Studio
Upgrading without losing Visual Studio
If we upgrade from Windows 8 to Windows 8.1, do we need to re-install
Visual Studio (any version) or any of the usual dev tools or
redistributables?
I found http://windows.microsoft.com/en-au/windows-8/preview-faq but it
only says "You can keep Windows Settings, personal files, and most apps."
with no other information about which apps you can't keep.
If we upgrade from Windows 8 to Windows 8.1, do we need to re-install
Visual Studio (any version) or any of the usual dev tools or
redistributables?
I found http://windows.microsoft.com/en-au/windows-8/preview-faq but it
only says "You can keep Windows Settings, personal files, and most apps."
with no other information about which apps you can't keep.
Google Maps LatLng returning (NaN,NaN)
Google Maps LatLng returning (NaN,NaN)
I am obtaining my clients geographic coordinates with the following code:
loc={}
if (navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(function(position){
loc.lat = position.coords.latitude;
loc.lng = position.coords.longitude;
});
}
I am then trying to turn this into a google map coordinate with the
following code
var clientLocation = new google.maps.LatLng(loc.lat, loc.lng);
This however is returning
(NaN,NaN)
Can anyone suggest what I may be doing wrong?
I am obtaining my clients geographic coordinates with the following code:
loc={}
if (navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(function(position){
loc.lat = position.coords.latitude;
loc.lng = position.coords.longitude;
});
}
I am then trying to turn this into a google map coordinate with the
following code
var clientLocation = new google.maps.LatLng(loc.lat, loc.lng);
This however is returning
(NaN,NaN)
Can anyone suggest what I may be doing wrong?
Subscribe to:
Posts (Atom)