Search Results

Search found 259 results on 11 pages for 'zach russell'.

Page 9/11 | < Previous Page | 5 6 7 8 9 10 11  | Next Page >

  • $_POST to 2 pages

    - by russell kinch
    I have a page with 2 frames. In the top frame is a form called invoice.php. In it you type in an invoice number and then post it. I am wanting this post to be sent to 2 pages that will open in both the top and bottom frames. The top page is called invoicelab.php and the bottom is called invoice2.php. The information that I am posting is called workorder. The form page looks like this - --- Enter workorder number What is the best way to pass this information onto both invoice2.php and invoicelab.php. Thanks

    Read the article

  • On Redirect - Failed to generate a user instance of SQL Server...

    - by Craig Russell
    Hello (this is a long post sorry), I am writing a application in ASP.NET MVC 2 and I have reached a point where I am receiving this error when I connect remotely to my Server. Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed. I thought I had worked around this problem locally, as I was getting this error in debug when site was redirected to a baseUrl if a subdomain was invalid using this code: protected override void Initialize(RequestContext requestContext) { string[] host = requestContext.HttpContext.Request.Headers["Host"].Split(':'); _siteProvider.Initialise(host, LiveMeet.Properties.Settings.Default["baseUrl"].ToString()); base.Initialize(requestContext); } protected override void OnActionExecuting(ActionExecutingContext filterContext) { if (Site == null) { string[] host = filterContext.HttpContext.Request.Headers["Host"].Split(':'); string newUrl; if (host.Length == 2) newUrl = "http://sample.local:" + host[1]; else newUrl = "http://sample.local"; Response.Redirect(newUrl, true); } ViewData["Site"] = Site; base.OnActionExecuting(filterContext); } public Site Site { get { return _siteProvider.GetCurrentSite(); } } The Site object is returned from a Provider named siteProvider, this does two checks, once against a database containing a list of all available subdomains, then if that fails to find a valid subdomain, or valid domain name, searches a memory cache of reserved domains, if that doesn't hit then returns a baseUrl where all invalid domains are redirected. locally this worked when I added the true to Response.Redirect, assuming a halting of the current execution and restarting the execution on the browser redirect. What I have found in the stack trace is that the error is thrown on the second attempt to access the database. #region ISiteProvider Members public void Initialise(string[] host, string basehost) { if (host[0].Contains(basehost)) host = host[0].Split('.'); Site getSite = GetSites().WithDomain(host[0]); if (getSite == null) { sites.TryGetValue(host[0], out getSite); } _site = getSite; } public Site GetCurrentSite() { return _site; } public IQueryable<Site> GetSites() { return from p in _repository.groupDomains select new Site { Host = p.domainName, GroupGuid = (Guid)p.groupGuid, IsSubDomain = p.isSubdomain }; } #endregion The Linq query ^^^ is hit first, with a filter of WithDomain, the error isn't thrown till the WithDomain filter is attempted. In summary: The error is hit after the page is redirected, so the first iteration is executing as expected (so permissions on the database are correct, user profiles etc) shortly after the redirect when it filters the database query for the possible domain/subdomain of current redirected page, it errors out.

    Read the article

  • java double buffering problem

    - by russell
    Whats wrong with my applet code which does not render double buffering correctly.I am trying and trying.But failed to get a solution.Plz Plz someone tell me whats wrong with my code. import java.applet.* ; import java.awt.* ; import java.awt.event.* ; public class Ball extends Applet implements Runnable { // Initialisierung der Variablen int x_pos = 10; // x - Position des Balles int y_pos = 100; // y - Position des Balles int radius = 20; // Radius des Balles Image buffer=null; //Graphics graphic=null; int w,h; public void init() { Dimension d=getSize(); w=d.width; h=d.height; buffer=createImage(w,h); //graphic=buffer.getGraphics(); setBackground (Color.black); } public void start () { // Schaffen eines neuen Threads, in dem das Spiel l?uft Thread th = new Thread (this); // Starten des Threads th.start (); } public void stop() { } public void destroy() { } public void run () { // Erniedrigen der ThreadPriority um zeichnen zu erleichtern Thread.currentThread().setPriority(Thread.MIN_PRIORITY); // Solange true ist l?uft der Thread weiter while (true) { // Ver?ndern der x- Koordinate repaint(); x_pos++; y_pos++; //x2--; //y2--; // Neuzeichnen des Applets if(x_pos>410) x_pos=20; if(y_pos>410) y_pos=20; try { Thread.sleep (30); } catch (InterruptedException ex) { // do nothing } Thread.currentThread().setPriority(Thread.MAX_PRIORITY); } } public void paint (Graphics g) { Graphics screen=null; screen=g; g=buffer.getGraphics(); g.setColor(Color.red); g.fillOval(x_pos - radius, y_pos - radius, 2 * radius, 2 * radius); g.setColor(Color.green); screen.drawImage(buffer,0,0,this); } public void update(Graphics g) { paint(g); } } what change should i make.When offscreen image is drawn the previous image also remain in screen.How to erase the previous image from the screen??

    Read the article

  • Calling jQuery method from onClick attribute in HTML

    - by Russell
    I am relatively new to implementing JQuery throughout an entire system, and I am enjoying the opportunity. I have come across one issue I would love to find the correct resolve for. Here is a simple case example of what I want to do: I have a button on a page, and on the click event I want to call a jquery function I have defined. Here is the code I have used to define my method (Page.js): (function($) { $.fn.MessageBox = function(msg) { alert(msg); }; }); And here is my HTML page: <HTML> <head> <script type="text/javascript" src="C:\Sandpit\jQueryTest\jquery-1.3.2.js"></script> <script language="javascript" src="Page.js"></script> </head> <body> <div class="Title">Welcome!</div> <input type="button" value="ahaha" onclick="$().MessageBox('msg');" /> </body> </HTML> (The above code displays the button, but clicking does nothing.) I am aware I could add the click event in the document ready event, however it seems more maintainable to put events in the HTML element instead. However I have not found a way to do this. Is there a way to call a jquery function on a button element (or any input element)? Or is there a better way to do this? Thanks

    Read the article

  • Auto attach file in php mail

    - by Russell Kinch
    I am wanting to send a pdf file in php mail. I know the name and location of the file (an invoice printed in cup-pdf) and would like to sent this automatically in php when i click a button in my website. How can this be done? Thanks

    Read the article

  • stl priority queue based on lower value first

    - by russell
    I have a problem with stl priority queue.I want to have the priority queue in the increasing order,which is decreasing by default.Is there any way to do this in priority queue. And what is the complexity of building stl priority queue.If i use quick sort in an array which takes O(nlgn) is its complexity is similar to using priority queue??? Plz someone ans.Advanced thanx.

    Read the article

  • postgresql drop table

    - by Russell
    I have two tables (tbl and tbl_new) that both use the same sequence (tbl_id_seq). I'd like to drop one of those tables. On tbl, I've removed the modifier "not null default nextval('tbl_id_seq'::regclass)" but that modifier remains on tbl_new. I'm getting the following error: ERROR: cannot drop table tbl because other objects depend on it DETAIL: default for table tbl_new column id depends on sequence tbl_id_seq After reviewing http://www.postgresql.org/docs/9.1/static/sql-droptable.html It looks like there is only CASCADE and RESTRICT as options.

    Read the article

  • How to use double buffering inside a thread and applet

    - by russell
    I have a question about when paint and update method is called?? i have game applet where i want to use double buffering.But i cant use it.the problem is In my game there is a ball which is moving inside run() method.I want to know how to use double buffering to swap the offscreen image and current image.Someone plz help. And when there is both update() and paint() method.which are called first,when and why ???

    Read the article

  • JQuery use variable by name of divID

    - by Russell Parrott
    Just a quick question, that I cannot fathom out, hope you guys and girls can help. I have a div (with ID) that when clicked opens a new div - great works well, what I really want is to "populate" the new div with predefined text based on the clicked div's ID. example: <div class="infobox" id="help_msg1">Click me</div> I may have say 3 (actually more but...) of these div's This opens: <div id="helpbox">text in here</div> In/on my .js page I have doc ready etc then: var help_msg1 ='text that is a help message'; var help_msg2 ='text that is another help message'; var help_msg3 ='text that is yet another help message'; Then $('.infobox').live('click',function() { $('#helpbox').remove(); $('label').css({'font-weight': '400'}); $(this).next('label').css({'font-weight': '900'}); var offset = $(this).next().next().offset(); var offsetby = $(this).next().next().width(); var leftitby = offset.left+offsetby+10; $('body').append('text in here'); $('#helpbox').css( { 'left': leftitby, 'top': offset.top } ); }); Note I remove each #helpbox before appending the new one and the .next().next() identifies the appropriate text input that lot all works. What I need is how do I put var help_msg1 into the append when id="help_msg1" is clicked or var help_msg2 when id="help_msg2" is clicked etc. I have tried

    Read the article

  • Add all lines multiplied by another line in another table

    - by russell
    Hi, I hope I can explain this good enough. I have 3 tables. wo_parts, workorders and part2vendor. I am trying to get the cost price of all parts sold in a month. I have this script. $scoreCostQuery = "SELECT SUM(part2vendor.cost*wo_parts.qty) as total_score FROM part2vendor INNER JOIN wo_parts ON (wo_parts.pn=part2vendor.pn) WHERE workorder=$workorder"; What I am trying to do is each part is in wo_parts (under partnumber [pn]). The cost of that item is in part2vendor (under part number[pn]). I need each part price in part2vendor to be multiplied by the quantity sold in wo_parts. The way all 3 tie up is workorders.ident=wo_parts.workorder and part2vendor.pn=wo_parts.pn. I hope someone can assist. The above script does not give me the same total as when added by calculator.

    Read the article

  • Why does my regex fail when the number ends in 0?

    - by Russell C.
    This is a really basic regex question but since I can't seem to figure out why the match is failing in certain circumstances I figured I'd post it to see if anyone else can point out what I'm missing. I'm trying to pull out the 2 sets of digits from strings of the form: 12309123098_102938120938120938 1321312_103810312032123 123123123_10983094854905490 38293827_1293120938129308 I'm using the following code to process each string: if($string && $string =~ /^(\d)+_(\d)+$/) { if(IsInteger($1) && IsInteger($2)) { print "success ('$1','$2')"; } else { print "fail"; } } Where the IsInterger() function is as follows: sub IsInteger { my $integer = shift; if($integer && $integer =~ /^\d+$/) { return 1; } return; } This function seems to work most of the time but fails on the following for some reason: 1287123437_1268098784380 1287123437_1267589971660 Any ideas on why these fail while others succeed? Thanks in advance for your help!

    Read the article

  • Why does Net::Twitter complain "HTTP::Message content not bytes"?

    - by Russell C.
    We have been using Perl's Net:Twitter CPAN module (version 3.12) and basic authentication (not OAuth) for almost a year now to syndicate updates from our site to our Twitter account. We just migrated to a new server last week and since the move our updates to Twitter have stopped and the following error is being reported whenever we try to post an update: HTTP::Message content not bytes at /usr/lib/perl5/site_perl/5.8.8/HTTP/Request/Common.pm line 90 Here is the code we're using the update our Twitter account: use Net::Twitter; my $twitter = Net::Twitter->new( traits => [qw/API::REST/], username => $username, password => $password, source => 'twitterfeed' ); my $result = $twitter->update($status); I have no idea what the issue is and was hoping that someone else has run into this issue and can provide a quick solution. Thanks in advance for your help!

    Read the article

  • Adding Postgres table cells based on same value

    - by russell kinch
    I have a table called expenses. There are numerous columns but the ones involved in my php page are date, spplierinv, amount. I have created a page that lists all the expenses in a given month and totals it at the end. However, each row has a value, but many rows might be on the same supplier invoice.This means adding each row with the same supplierinv to get a total as per my bank statement. Is there anyway I can get a total for the rows based on the supplierinv. I mean say I have 10 rows. 5 on supplierinv 4, two on supplierinv 5 and 3 on supplierinv 12, how can a get 3 figures (inv 4, 5 and 12) and the grand total at the bottom. Many thanks

    Read the article

  • What to return when making an Ajax request

    - by Russell
    When we return data from an Ajax call, is it better to return a document containing HTML to display on the page or return an Xml/json data which can be processed? I know different circumstances may determine what 'better' means, but I really want to know which will be more appropriate for different circumstances. I am working on the framework for a large ASP .Net application, using jQuery Ajax (forms plugin). My initial thought was to return the data as Xml, then process accordingly. Then this increases processing required in Javascript, to populate the page. I am trying to balance flexible, clear and simple. Thanks in advance for your knowledge and information.

    Read the article

  • Connecting form to database errors

    - by Russell Ehrnsberger
    Hello I am trying to connect a page to a MySQL database for newsletter signup. I have the database with 3 fields, id, name, email. The database is named newsletter and the table is named newsletter. Everything seems to be fine but I am getting this error Notice: Undefined index: Name in C:\wamp\www\insert.php on line 12 Notice: Undefined index: Name in C:\wamp\www\insert.php on line 13 Here is my form code. <form action="insert.php" method="post"> <input type="text" value="Name" name="Name" id="Name" class="txtfield" onblur="javascript:if(this.value==''){this.value=this.defaultValue;}" onfocus="javascript:if(this.value==this.defaultValue){this.value='';}" /> <input type="text" value="Enter Email Address" name="Email" id="Email" class="txtfield" onblur="javascript:if(this.value==''){this.value=this.defaultValue;}" onfocus="javascript:if(this.value==this.defaultValue){this.value='';}" /> <input type="submit" value="" class="button" /> </form> Here is my insert.php file. <?php $host="localhost"; // Host name $username="root"; // Mysql username $password=""; // Mysql password $db_name="newsletter"; // Database name $tbl_name="newsletter"; // Table name // Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // Get values from form $name=$_POST['Name']; $email=$_POST['Email']; // Insert data into mysql $sql="INSERT INTO $tbl_name(name, email)VALUES('$name', '$email')"; $result=mysql_query($sql); // if successfully insert data into database, displays message "Successful". if($result){ echo "Successful"; echo "<BR>"; echo "<a href='index.html'>Back to main page</a>"; } else { echo "ERROR"; } ?> <?php // close connection mysql_close(); ?>

    Read the article

  • Undesired Output of Crontab Job Using CURL

    - by Russell C.
    I have written a perl script that runs as a daily crontab job that uploads files to Amazon S3 via CURL. I want the output of the cron job emailed to me which works fine but I don't want that email to include messages related to the CURL upload (only those message my script is outputting). Here are the CURL related messages I'm seeing in the daily email right now: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 230M 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 230M 0 0 0 544k 0 1519k 0:02:35 --:--:-- 0:02:35 1807k 0 230M 0 0 0 1744k 0 1286k 0:03:03 0:00:01 0:03:02 1342k 1 230M 0 0 1 2880k 0 1219k 0:03:13 0:00:02 0:03:11 1250k 1 230M 0 0 1 4016k 0 1198k 0:03:17 0:00:03 0:03:14 1218k 2 230M 0 0 2 5168k 0 1186k 0:03:19 0:00:04 0:03:15 1202k 2 230M 0 0 2 6336k 0 1181k 0:03:19 0:00:05 0:03:14 1157k 3 230M 0 0 3 7488k 0 1177k 0:03:20 0:00:06 0:03:14 1147k 3 230M 0 0 3 8592k 0 1167k 0:03:22 0:00:07 0:03:15 1142k 4 230M 0 0 4 9744k 0 1166k 0:03:22 0:00:08 0:03:14 1145k 4 230M 0 0 4 10.6M 0 1163k 0:03:23 0:00:09 0:03:14 1142k 5 230M 0 0 5 11.7M 0 1161k 0:03:23 0:00:10 0:03:13 1140k 5 230M 0 0 5 12.8M 0 1158k 0:03:23 0:00:11 0:03:12 1133k 6 230M 0 0 6 13.9M 0 1155k 0:03:24 0:00:12 0:03:12 1138k 6 230M 0 0 6 15.0M 0 1155k 0:03:24 0:00:13 0:03:11 1138k 7 230M 0 0 7 16.1M 0 1152k 0:03:25 0:00:14 0:03:11 1131k 7 230M 0 0 7 17.2M 0 1152k 0:03:25 0:00:15 0:03:10 1132k 7 230M 0 0 7 18.4M 0 1152k 0:03:24 0:00:16 0:03:08 1140k I am using a simple Perl system() call to invoke CURL. Does anyone know what command line argument I can supply CURL to turn off the reporting of the upload progress? Thanks in advance for your help!

    Read the article

  • Inserting an element into a sorted list

    - by Russell Cargill
    Ok I'm using getSharedPreferences to store my high score but before I fill it up I wanted to sort the scores into ascending order via and array, but if it finds a Score less than it in the first pos then it wont check the rest for the smallest? //function to add score to array and sort it public void addscoretoarray(int mScore){ for(int pos = 0; pos< score.length; pos++){ if(score[pos] > mScore){ //do nothing }else { //Add the score into that position score[pos] = mScore; break; } } sortArray(score); } should I call sortArray() before and after the loop to fix this problem or is there a better method to achive the same results? I should also mention that the sortArray(score) funtion is just calling Arrays.sort(score) where score is an array of mScore

    Read the article

  • Perl Regex Mismatch Issue

    - by Russell C.
    This is a really basic regex question but since I can't seem to figure out why the match is failing in certain circumstances I figured I'd post it to see if anyone else can point out what I'm missing. I'm trying to pull out the 2 sets of digits from strings of the form: 12309123098_102938120938120938 1321312_103810312032123 123123123_10983094854905490 38293827_1293120938129308 I'm using the following code to process each string: if($string && $string =~ /^(\d)+_(\d)+$/) { if(IsInteger($1) && IsInteger($2)) { print "success ('$1','$2')"; } else { print "fail"; } } Where the IsInterger() function is as follows: sub IsInteger { my $integer = shift; if($integer && $integer =~ /^\d+$/) { return 1; } return; } This function seems to work most of the time but fails on the following for some reason: 1287123437_1268098784380 1287123437_1267589971660 Any ideas on why these fail while others succeed? Thanks in advance for your help!

    Read the article

  • How can I keep curl output out of mail from my cronjob?

    - by Russell C.
    I have written a Perl script that runs as a daily crontab job that uploads files to Amazon S3 via CURL. I want the output of the cron job emailed to me which works fine but I don't want that email to include messages related to the CURL upload (only those message my script is outputting). Here are the CURL related messages I'm seeing in the daily email right now: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 230M 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 230M 0 0 0 544k 0 1519k 0:02:35 --:--:-- 0:02:35 1807k 0 230M 0 0 0 1744k 0 1286k 0:03:03 0:00:01 0:03:02 1342k 1 230M 0 0 1 2880k 0 1219k 0:03:13 0:00:02 0:03:11 1250k 1 230M 0 0 1 4016k 0 1198k 0:03:17 0:00:03 0:03:14 1218k 2 230M 0 0 2 5168k 0 1186k 0:03:19 0:00:04 0:03:15 1202k 2 230M 0 0 2 6336k 0 1181k 0:03:19 0:00:05 0:03:14 1157k 3 230M 0 0 3 7488k 0 1177k 0:03:20 0:00:06 0:03:14 1147k 3 230M 0 0 3 8592k 0 1167k 0:03:22 0:00:07 0:03:15 1142k 4 230M 0 0 4 9744k 0 1166k 0:03:22 0:00:08 0:03:14 1145k 4 230M 0 0 4 10.6M 0 1163k 0:03:23 0:00:09 0:03:14 1142k 5 230M 0 0 5 11.7M 0 1161k 0:03:23 0:00:10 0:03:13 1140k 5 230M 0 0 5 12.8M 0 1158k 0:03:23 0:00:11 0:03:12 1133k 6 230M 0 0 6 13.9M 0 1155k 0:03:24 0:00:12 0:03:12 1138k 6 230M 0 0 6 15.0M 0 1155k 0:03:24 0:00:13 0:03:11 1138k 7 230M 0 0 7 16.1M 0 1152k 0:03:25 0:00:14 0:03:11 1131k 7 230M 0 0 7 17.2M 0 1152k 0:03:25 0:00:15 0:03:10 1132k 7 230M 0 0 7 18.4M 0 1152k 0:03:24 0:00:16 0:03:08 1140k I am using a simple Perl system() call to invoke CURL. Does anyone know what command line argument I can supply CURL to turn off the reporting of the upload progress?

    Read the article

  • ASP.net attachment then refresh page

    - by Russell
    I am working on a c# project using ASP .net. I have a list of reports with a hyperlink for each, which calls the web server, retrieves a PDF and then returns the PDF for the user to save or open: ASPX page: <table> <tr> <td> <a href="#" onclick="SubmitFormToOpenReport();">Open Report 1</a> <td> </tr> ... </table> ASP.Net: context.Response.Clear(); context.Response.AddHeader("content-disposition", "attachment;filename=report.pdf"); context.Response.Charset = ""; context.Response.ContentType = "application/pdf"; context.Response.BinaryWrite(myReport); context.Response.Flush(); This works as expected, however I would like it to also refresh the page with an updated list. I am having trouble as the single request/response is returning the report. Is there a way to refresh the page as well? While there is a correct response, feel free to include answers which details alternative solutions/ideas for doing this.

    Read the article

  • Does Visual Studio 2010 Beta 2 Include a TFS server?

    - by Russell
    I recently downloaded Visual Studio 2010 beta 2, and was told it included a TFS server. However I am unsure of if it has/can be installed, or how to start it up if it has been. Can anyone shed any light on this for me please? Thanks :) Thanks for your help :) I am downloading the ISO of the separate product instead from msdn.

    Read the article

< Previous Page | 5 6 7 8 9 10 11  | Next Page >