Hi everyone,
i'm a newbie in using jasperreports. In my swing application i wanna show jasper viewer inside a jpanel or jframe..! can anyone help me out..?
Thanks in advance...!
Hi ,
Silverlight version : 4
Silverlight patter :MVVM
Visual Studio template :Silverlight navigation application
How do I deal with the browser's forward and backward buttons, specially during async calls?
thank you.
I'm writing an application that displays data using Google Earth.
In certain situations, it would be more convenient if, rather than displaying satellite images, the surface of the earth would look more like the 'regular map' on Google Maps.
Is this possible?
I have a web page containing something like this:
<div onclick="location.href = 'AnotherPage';">
This page also uses asynchronous XMLHttpRequests for some ajax updating.
I have found that while an asynchronous XMLHttpRequest is in progress, clicking on this div does not load the new page. If I cancel my request first then it works fine. This seems wrong, but I cannot find any documentation that describes what should happen.
So the question is: what should happen to asynchronous XMLHttpRequests in progress when a new page is loaded using location.href?
I'm trying to do a couple of things at once. I'm trying to do one major thing: redirect the application output that is displayed in the Qt Creator console to a textEdit that I have on my GUI. However, the class that I need to do this in is written in C and all of its related headers are in C as well. Is there a way that I can redirect the output into the textEdit within the C class?
I have the following code that works on firefox and chrome
$("#adicionarItem").click(function(){
$.ajax({
type: 'GET',
url: $("#formAdicionaItem").attr("action"),
data: $("#formAdicionaItem").serialize(),
success: function(response){
alert($("div#errors", response).size());
}
});
});
In IE the alert always returns zero. In firefox/chrome it returns 1 wich is the expected value.
Does anyone know if this is a bug or if I am doing something wrong?
I'm trying to write a script that will show the rss version of a single url (title, author, image, source, etc..). This should behave much the way that facebook does when you copy paste a link to share and it generates this information automatically. I'm trying to do this with a php script but would also be open to opensource programs that can do this as well.
also, if anyone knows of any Joomla/Drupal plugins that can do this that would be great. This may eventually end up on a site run on one of these frameworks.
thanks!!
I want to build a page for end users to visit (in our MPLS Network) and it show the following information in regards to them:
Computer Name
OS
Disk Space
Memory
IP Address
Active Directory User Name
Password Expiration Time (As defined by Global Policy)
Maybe a few other things such as Trend Micro Office current version vs. their version, # of MS Updates needed (we utilize WSUS), and a few other things in the future.
My question is how would I pull this information from the user when they visit the page? What is the proper function for this? Anyone have examples they wish to share for me to learn by if possible?
I like to use a lot of unique graphics on my pages, which often results in making different page sizes depending on available screen width/height.
Here are two examples:
http://www.uvm.edu/~areid/homesite/ - the image floats at the bottom of my screen but on a larger browser, the image floats near the middle making it look off. It looks best when the bottom of the window aligns with the bottom of the image
www.stevenlebel.com - it loads two different pages depending on what monitor size is detected.
This seems like a lot of redundant coding. My question is, how can I make sliced/Photoshop images transition well to different screen sizes. Does Photoshop allow you to make DIVS instead of tables?
Can i make each of the slices created by Photoshop grow/shrink when the browser window size changes?
If anyone has any input on creating websites like this I would be very interested to hear what they have to say.
Thanks
Katie
You know, like the "Compose Mail," "Inbox," "Sent Mail," etc., on the left hand-side when you load up GMail? I did a search for "Compose Mail" in the page source and got nothing.
Hi
Can anyone please provide specific links which cite the advantages of RPC over other inter process communication models.
Also whether RPC is best suited for TCP/IP or HTML or similar other transfer mediums.
Thanks and in advance.
Hai any one please tell me is there any possibility to create a DataGrid in android ,if yes mean please help me with some code snippets,or give some related web urls.
Hi,
I've been trying to figure this out, and can't seem to get it
Here is the code..
$m= date("m");
$de= date("d");
$y= date("Y");
for($i=0; $i<=6; $i++){
echo "<br>";
echo date('m/d',mktime(0,0,0,$m,($de+$i),$y));
echo "<br>";
}
That displays this
04/08
04/07
04/06
04/05
04/04
04/03
04/02
That is exactly what I want but I want it to flip around so echos it would like this
04/02
04/03
04/04
04/05
04/06
04/07
04/07
How would I do this?
Thank you in advance!
Maybe I am being a n00b here, but for the life of me, I cant find a simple drop in type solution for displaying an rss feed inside an aspx page?
I am looking for a simple solution, as when Firefox gets pointed to an rss feed, it just plainly displays it, no thrills, no fuss. I don't want to get into the xml and format it extensively. I just want a basic feed, will style it with font and a:styles. Thats it.
Any ideas?
EDIT:
I am attempting to show a worpress "feed" inside an aspx page...
I have been banging my head against the wall trying to figure out how I can run update scripts concurrently against multiple databases in a single SQL Server instance using SMO. Our environments have an ever-increasing number of databases which need updating, and iterating through one at a time is becoming a problem (too slow).
From what I understand SMO does not support concurrent operations, and my tests have bore that out. There seems to be shared memory at the Server object level, for things like DataReader context, keeps throwing exceptions such as "reader is already open." I apologize for not having the exact exceptions I am getting. I will try to get them and update this post.
I am no expert on SMO and just feeling my way through to be honest. Not really sure I am approaching it the right way, but it's something that has to be done, or our productivity will slow to a crawl.
So how would you guys do something like this? Am I using the wrong technology with SMO? All I am wanting to do is execute sql scripts against databases in a single sql server instance in parallel.
Thanks for any help you can give, Daniel
I get the above error when calling this code:
<?
class Test1 extends Core {
function home(){
?>
This is the INDEX of test1
<?
}
function test2(){
echo $this->uri->get_segment(1); //this is where the error comes from
?>
This is the test2 of test1 testing URI
<?
}
}
?>
I get the error where commentated.
This class extends this class:
<?php
class Core {
public function start()
{
require("funk/funks/libraries/uri.php");
$this->uri = new uri();
require("funk/core/loader.php");
$this->load = new loader();
if($this->uri->get_segment(1) != "" and file_exists("funk/pages/".$this->uri->get_segment(1).".php")){
include("funk/pages/". $this->uri->get_segment(1).".php");
$var = $this->uri->get_segment(2);
if ($var != ""){
$home= $this->uri->get_segment(1);
$Index= new $home();
$Index->$var();
}else{
$home= $this->uri->get_segment(1);
$Index = new $home();
$Index->home();
}
}elseif($this->uri->get_segment(1) and ! file_exists("funk/pages/".$this->uri->get_segment(1).".php")){
echo "404 Error";
}else{
include("funk/pages/index.php");
$Index = new Index();
$Index->home();
//$this->Index->index();
echo "<!--This page was created with FunkyPHP!-->";
}
}
}
?>
And here is the contents of uri.php:
<?php
class uri
{
private $server_path_info = '';
private $segment = array();
private $segments = 0;
public function __construct()
{
$segment_temp = array();
$this->server_path_info = preg_replace("/\?/", "", $_SERVER["PATH_INFO"]);
$segment_temp = explode("/", $this->server_path_info);
foreach ($segment_temp as $key => $seg)
{
if (!preg_match("/([a-zA-Z0-9\.\_\-]+)/", $seg) || empty($seg)) unset($segment_temp[$key]);
}
foreach ($segment_temp as $k => $value)
{
$this->segment[] = $value;
}
unset($segment_temp);
$this->segments = count($this->segment);
}
public function segment_exists($id = 0)
{
$id = (int)$id;
if (isset($this->segment[$id])) return true;
else return false;
}
public function get_segment($id = 0)
{
$id--;
$id = (int)$id;
if ($this->segment_exists($id) === true) return $this->segment[$id];
else return false;
}
}
?>
i have asked a similar question to this before but the answer does not apply here.
I have rewritten my code 3 times to KILL and Delimb this godforsaken error! but nooooooo....
This code was once working on sql server 2005. Now isolated in a visual basic 6 sub routine using ADODB to connect to a sql server 2008 database it throws an error saying:
"Login failed for user 'admin' "
I have since verified the connection string does work if i replace the body of this sub with the alternative code below this sub. When I run the small program with the button, it stops where it is marked below the asterisk line. Any ideas? thanks in advance.
Private Sub Command1_Click()
Dim cSQLConn As New ADODB.Connection
Dim cmdGetInvoices As New ADODB.Command
Dim myRs As New ADODB.Recordset
Dim dStartDateIn As Date
dStartDateIn = "2010/05/01"
cSQLConn.ConnectionString = "Provider=sqloledb;" _
& "SERVER=NET-BRAIN;" _
& "Database=DB_app;" _
& "User Id=admin;" _
& "Password=mudslinger;"
cSQLConn.Open
cmdGetInvoices.CommandTimeout = 0
sProc = "GetUnconvertedInvoices"
'On Error GoTo GetUnconvertedInvoices_Err
With cmdGetInvoices
.CommandType = adCmdStoredProc
.CommandText = "_sp_cwm5_GetUnCvtdInv"
.Name = "_sp_cwm5_GetUnCvtdInv"
Set oParm1 = .CreateParameter("@StartDate", adDate, adParamInput)
.Parameters.Append oParm1
oParm1.Value = dStartDateIn
.ActiveConnection = cSQLConn
End With
With myRs
.CursorLocation = adUseClient
.LockType = adLockBatchOptimistic
.CursorType = adOpenKeyset
'.CursorType = adOpenStatic
.CacheSize = 5000
'***************************Debug stops here
.Open cmdGetInvoices
End With
If myRs.State = adStateOpen Then
Set GetUnconvertedInvoices = myRs
Else
Set GetUnconvertedInvoices = Nothing
End If
End Sub
Here is the code which validates the connection string is working.
Dim cSQLConn As New ADODB.Connection
Dim cmdGetInvoices As New ADODB.Command
Dim myRs As New ADODB.Recordset
cSQLConn.ConnectionString = "Provider=sqloledb;" _
& "SERVER=NET-BRAIN;" _
& "Database=DB_app;" _
& "User Id=admin;" _
& "Password=mudslinger;"
cSQLConn.Open
cmdGetInvoices.CommandTimeout = 0
sProc = "GetUnconvertedInvoices"
With cmdGetInvoices
.ActiveConnection = cSQLConn
.CommandText = "SELECT top 5 * FROM tarInvoice;"
.CommandType = adCmdText
End With
With myRs
.CursorLocation = adUseClient
.LockType = adLockBatchOptimistic
'.CursorType = adOpenKeyset
.CursorType = adOpenStatic
'.CacheSize = 5000
.Open cmdGetInvoices
End With
If myRs.EOF = False Then
myRs.MoveFirst
Do
MsgBox "Record " & myRs.AbsolutePosition & " " & _
myRs.Fields(0).Name & "=" & myRs.Fields(0) & " " & _
myRs.Fields(1).Name & "=" & myRs.Fields(1)
myRs.MoveNext
Loop Until myRs.EOF = True
End If
I've been dealing a lot lately with abstract classes that use generics. This is all good and fine because I get a lot of utility out of these classes but now it's making for some rather ugly code down the line. For example:
abstract class ClassBase<T>
{
T Property { get; set; }
}
class MyClass : ClassBase<string>
{
OtherClass PropertyDetail { get; set; }
}
This implementation isn't all that crazy, except when I want to reference the abstract class from a helper class and then I have to make a list of generics just to make reference to the implemented class, like this below.
class Helper
{
void HelpMe<C, T>(object Value)
where C : ClassBase<T>, new()
{
DoWork();
}
}
This is just a tame example, because I have some method calls where the list of where clauses end up being 5 or 6 lines long to handle all of the generic data. What I'd really like to do is
class Helper
{
void HelpMe<C>(object Value)
where C : ClassBase, new()
{
DoWork();
}
}
but it obviously won't compile. I want to reference ClassBase without having to pass it a whole array of generic classes to get the function to work, but I don't want to reference the higher level classes because there are a dozen of those. Am I the victim of my own cleverness or is there an avenue that I haven't considered yet?
Hello! First and foremost thank you for checking out my problem, and for any help you may give!
Okay, so like the title says I'm in need of calling a php function from my index page, which adds a new record in my database as a vote, using JQuery Ajax. This function will return one integer, which will then be printed inside the form button in which it was called from.
Anyone have an idea on how I would accomplish this? Any guidance is appreciated!
Hi all,
I have an sql query here and it returns a number of results. I'd like to show these results in groups.
What I mean is,
show the first 20 results in some part of the page,
show the next 20 results in another part of the page
etc...
How can I do that?
Hello,
I'm looking for an entry point in an EJB deployed on JBoss.
Servlets have the tag to use in its web.xml. I'm searching for similar init() functionality for an ejb.
I have Decimal field in SQLserver 2005 table,
Price decimal(18, 4)
if I write 12 it will be converted to 12.0000, if I write 12.33 it will be converted into 12.3300.
Always it's putting zero to the right of the decimal point in the count of Scale Part(4).
I was using these in SQL Server 2000, it was not behaving like this, in SQL Server 2000 if I put 12.5 it will be stored as 12.5 not as 12.5000 what SQLServer2005 do.
My Question is how to stop SQL Server 2005 from putting zeros to the right of the decimal point?
My jQuery code (using ajax) request's data from a php script (pgiproxy.php) using the following function:
function grabPage($pageURL) {
$homepage = file_get_contents($pageURL);
echo $homepage;
}
I then extract the html code i need from the returned data using jQuery and insert it into a div called #BFX, as follows:
$("#btnNewLoadMethod1").click(function(){
$('#temp1').load('pgiproxy.php', { data : $("#formdata").serialize(), mode : "graph"} , function() {
$('#temp').html( $('#temp1').find('center').html() );
$('#BFX').html( $('#temp').html() );
});
});
This works fine. I get the html data (which is a gif image) i need displayed on screen in the correct div.
The problem is i can see the html data loading into the div (dependant on network speed), but what I want is to insert the extracted html code into #BFX ONLY when the ajax request has fully completed.
I have a multi-language website that makes use of pretty urls, so called search engine friendly urls.
Now there are a few places to define the language in the url.
1)
www.mydomain.com/en/articles/random
www.mydomain.com/nl/articles/random
2)
en.mydomain.com/articles/random
nl.mydomain.com/articles/random
3)
www.mydomain.com/articles/random?lang=en
www.mydomain.com/articles/random?lang=nl
Is there any preffered way of showing this, or is there another way better that I did not show. I would like to hear your comments on this.