Search Results

Search found 27946 results on 1118 pages for 'output buffer empty'.

Page 93/1118 | < Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >

  • How to output JavaScript with PHP

    - by krishna
    Hi, I am new to PHP. I need to output the following JavaScript with PHP. This is my code: <html> <body> <?php echo "<script type="text/javascript">"; echo "document.write("Hello World!")"; echo "</script>"; ?> </body> </html> But it's showing the error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /var/www/html/workbench/person/script.php on line 4 Can anyone please help? I also need some simple tutorials on how to use PHP, HTML and JavaScript for an application.

    Read the article

  • how to deal with a static analyzer output

    - by Jim
    We have started using a static analyzer (Coverity) on our code base. We were promptly stupefied by the sheer amount of warnings we received (its in the hundreds of thousands) , it will take the entire team a few mounts to clear them all (obliviously impossible). the options we discussed so far are 1) hire a contractor to sort out the warning and fix them - he drawback: we will probably need very experiences people to do all these modifications, and no contractor will have required understanding of the code. 2) filter out the warning and deal only with the dangerous ones - the problem here is that our static analysis output will always be cluttered by warning making it difficult for us to isolate problems. also the filtering of the warning is also a major effort. either way, bringing our code to a state when the static analyzer can be a useful tool for us seems a monumental task. so how is it possible to work with the static analyzer without braining current development efforts into a complete stand still?

    Read the article

  • Understanding top output in Linux

    - by Rayne
    Hi, I'm trying to determine the CPU usage of a program by looking at the output from Top in Linux. I understand that %us means userspace and %sy means system/kernel etc. But say I see 100%us. Does this mean that the CPU is really only doing useful work? What if a CPU is tied up waiting for resources that are not avaliable, or cache misses, would it also show up in the %us column, or any other column? Thank you.

    Read the article

  • Read from output file in installed WCF service

    - by fishiefishie
    I included a text file as output in a WCF set up project. The text file is correctly located in the same folder with the dll, exe, and config file after the project is installed (C:\Program Files\KLTesting\KLTestApp). However when the program tries to read it, it looks under "C:\Windows\system32", what's the correct way to find & read it? I have string a = Directory.GetCurrentDirectory(); a += "/R0303.txt"; string content = File.ReadAllText(a); Thanks.

    Read the article

  • Clean way to output values in ASP.NET MVC Views when value is not null

    - by Swoop
    Is there a better way to write the code below? I have quite a few blocks that are similar, and this is making the code in the Viewpage very messy to work with. The data value with the associated label only needs to be output when certain conditions are met, which is almost always if the value is not null. The options I can think is to use a response.write to atleast minimize the usage of the ASP script tags, or to format the webpage is such a way that the label displays with an appropriate n/a type value. <% if (myData.Balance != null) { %> Balance: <%= String.Format("{0:C}", (myData.Balance))%> <% } %>

    Read the article

  • Controlling CodeModel's code output formatting: putting lines between namespace declarations

    - by devoured elysium
    I'm making some experiments with Visual Studio's CodeModel. I tried creating a file with two namespaces in there through VS's Code Model: CodeModel codeModel = projItem.ContainingProject.CodeModel; codeModel.AddNamespace("Namespaces.FirstNamespace", "namespacestest.cs"); codeModel.AddNamespace("Namespaces.SecondNamespace", "namespacestest.cs"); the output of such code is: //file namespacestest.cs namespace Namespaces.FirstNamespace { } namespace Namespaces.SecondNamespace { } Which is almost what I'm looking for. The only catch here is that I'd like to control the spacing: having at least one line between the first and the second namespace. Does by chance anyone know of a way of achieving this? This is what I want: //file namespacestest.cs namespace Namespaces.FirstNamespace { } namespace Namespaces.SecondNamespace { } Thanks

    Read the article

  • SQL IF ELSE with output params stored proc help

    - by Kettenbach
    Hi All, I have a stored proc (SS2008) that takes a couple int ids and needs to look up if they exist in a table before adding a record. I have an int output param I would like to return and set its value based on what occrured. I have this so far, but it always returns 1. Can someone point me in the right direction? BEGIN TRY IF EXISTS ( SELECT * FROM tbMap WHERE (cId= @CId) ) SET @result = -1; -- This C User is already mapped ELSE IF EXISTS ( SELECT * FROM tbMap WHERE (dId = @DId) ) SET @result = -2; -- This D User is already mapped ELSE INSERT INTO tbMap ( Login , Email , UserName , CId , DId) SELECT @UserName , usr.EmailAddress , usr.UserName , @CId , @DId FROM tbUser usr WHERE usr.iUserID = @DId SET @result = 1; RETURN END TRY What am I missing? Thanks for any tips. Cheers, ~ck in San Diego

    Read the article

  • zChaff not showing output

    - by pns
    Hello, So I downloaded the latest version of zChaff (2007), and was trying out some very simple SAT problems. But zChaff does not output the solution (variable assignments). A very simple example input: p cnf 2 2 1 2 0 1 -2 0 And what I get: c 2 Clauses are true, Verify Solution successful. Instance Satisfiable 1 -2 Random Seed Used 0 Max Decision Level 1 Num. of Decisions 2 ( Stack + Vsids + Shrinking Decisions ) 0 + 1 + 0 Original Num Variables 2 Original Num Clauses 2 Original Num Literals 4 Added Conflict Clauses 0 Num of Shrinkings 0 Deleted Conflict Clauses 0 Deleted Clauses 0 Added Conflict Literals 0 Deleted (Total) Literals 0 Number of Implication 2 Total Run Time 5.1e-05 RESULT: SAT I can see the 1 -2 on the left of "Random Seed Used", but shouldn't this be outputing the variable assignments as "v ..." ? Thanks

    Read the article

  • Shift operator in Java bizarre program output

    - by Umesh Kacha
    I came across the following program and it behaving in unexpected manner. public class ShiftProgram { public static void main(String[] args) { int i = 0; while(-1 << i != 0) i++; System.out.println(i); } } If we think about this program output, when it reaches 32 while loop condition should return false and terminate and it should print 32. If you ran this program, it does not print anything but goes into an infinite loop. Any idea whats going on? Thank you in advance.

    Read the article

  • Finding the right name for an include that is to be executed before HTML output

    - by Pekka
    I am defining naming conventions for a simple plugin framework. For example: index.php - the main plugin file info.php - returns an array with plugin information install.php - self-explanatory can you think of an elegant, short-hand name for a PHP file that contains the code that is to be executed before any HTML is output? Do any examples from other frameworks come to your mind? What I have been thinking of: head.php - misleading, could be mixed up with HTML <head> before_output.php - clumsy, too long init.php - not exactly correct start.php - current favourite

    Read the article

  • Use of date function in PHP to output a user-friendly date

    - by Jamie
    I have a MySQL database column named DateAdded. I'd like to echo this as a readable date/time. Here is a simplified version of the code I currently have: $result = mysql_query(" SELECT ListItem, DateAdded FROM lists WHERE UserID = '" . $currentid . "' "); while($row = mysql_fetch_array($result)) { // Make the date look nicer $dateadded = date('d-m-Y',$row['DateAdded']); echo $row['ListItem'] . ","; echo $dateadded; echo "<br />"; } Is the use of the date function the best way to output a user-friendly date? Thanks for taking a look,

    Read the article

  • Prevent ASP.NET from encoding strings on output

    - by Darkwater23
    How can I stop ASP.Net from encoding anchor tags in List Items when the page renders? I have a collection of objects. Each object has a link property. I did a foreach and tried to output the links in a BulletedList, but ASP encoded all the links. Any idea? Thanks! Here's the offending snippet of code. When the user picks a specialty, I use the SelectedIndexChange event to clear and add links to the BulletedList: if (SpecialtyList.SelectedIndex > 0) { PhysicianLinks.Items.Clear(); foreach (Physician doc in docs) { if (doc.Specialties.Contains(SpecialtyList.SelectedValue)) { PhysicianLinks.Items.Add(new ListItem("<a href=\"" + doc.Link + "\">" + doc.FullName + "</a>")); } } }

    Read the article

  • How to get an variable output from remote pssession

    - by Vinith menon
    I have a script to get virtual harddisk info from vmm, im executing it remotely from a server, currently im unable to get the variable value outside of the pssession in the local host, could you please help me out with achieveing the same. PS C:\Windows\system32> enter-pssession iscvmm02 [iscvmm02]: PS C:\Users\su\Documents>Add-PSSnapin Microsoft.SystemCenter.VirtualMachineManager [iscvmm02]: PS C:\Users\su\Documents>$hide= Get-VMMServer -ComputerName "iscvmm02.corp.avanade.org" [iscvmm02]: PS C:\Users\su\Documents>$VM = Get-VM | where { $_.ComputerNameString -contains "idpsm02.corp.air.org" } [iscvmm02]: PS C:\Users\su\Documents>$harddisk=$VM.VirtualHardDisks [iscvmm02]: PS C:\Users\su\Documents>$h=$harddisk.length [iscvmm02]: PS C:\Users\su\Documents>for($i=0;$i-lt$h;$i++){ New-Variable -Name "HardDiskType_$i" -value $harddisk[$i].vhdtype New-Variable -Name "HardDiskLocation_$i" -value $harddisk[$i].Location } [iadpscvmm02]: PS C:\Users\su\Documents>Exit-PSSession PS C:\Windows\system32>$harddisktype_0 PS C:\Windows\system32>$harddisklocation_0 as you can see both the variable output's give null value, im unable to retain the values

    Read the article

  • make script output link to code in Visual Studio

    - by JoelFan
    I sometimes need to search code for patterns in a way that goes beyond the regex capabilities of Visual Studio (e.g. patterns that depend on what was seen previously in the file or on the contents of other files). So I use Perl to analyze the source and output matching lines, along with the file name and line number. Since this is the exact same format as is produced by the search feature of Visual Studio, I wonder if there is a way to duplicate the functionality where I can double-click on a line and it will display that line in context in Visual Studio. Any ideas?

    Read the article

  • How can I make the output from tapply() into a data.frame

    - by James Thompson
    I have a data.frame in R that looks like this: score rms template aln_id description 1 -261.410 4.951 2f22A.pdb 2F22A_1 S_00001_0000002_0 2 -231.987 21.813 1wb9A.pdb 1WB9A_4 S_00002_0000002_0 3 -263.722 4.903 2f22A.pdb 2F22A_3 S_00003_0000002_0 4 -269.681 17.732 1wbbA.pdb 1WBBA_6 S_00004_0000002_0 5 -258.621 19.098 1rxqA.pdb 1RXQA_3 S_00005_0000002_0 6 -246.805 6.889 1rxqA.pdb 1RXQA_15 S_00006_0000002_0 7 -281.300 16.262 1wbdA.pdb 1WBDA_11 S_00007_0000002_0 8 -271.666 4.193 2f22A.pdb 2F22A_2 S_00008_0000002_0 9 -277.964 13.066 1wb9A.pdb 1WB9A_5 S_00009_0000002_0 10 -261.024 17.153 1yy9A.pdb 1YY9A_2 S_00001_0000003_0 I can calculate summary statistics on the data.frame like this: > tapply( d$score, d$template, mean ) 1rxqA.pdb 1wb9A.pdb 1wbbA.pdb 1wbdA.pdb 1yy9A.pdb 2f22A.pdb -252.7130 -254.9755 -269.6810 -281.3000 -261.0240 -265.5993 Is there an easy way that I coerce this output back into a data.frame? I'd like for it to have these two columns: d$template mean I love tapply, but right now I'm cutting and pasting the results from tapply into a text file and hacking it up a bit to get the summary statistics that I want with appropriate names. This feels very wrong, and I'd like to do something better!

    Read the article

  • ExtJS Output JSON

    - by venkatesh a
    This is my Json structure. Got load into the form perfectly. Once i alter this form and click submit button. Output have to save with same structure like existing. Can anyone please help me to solve this ASAP?? { "comment": null, "clientinfo": { "clientName": "Timex", "clientCode": "143", "startDate": "04-Oct-2012", "clientType": "CR", "clientID": "TimexGroup", "hasGAMLeft": null, "gamLocation": "GB", "clientName": "xxx", "groupSegment": "FI", "groupSubSegment": "SUB-FI-SUB", "groupDomicileCounrty": "IN", "groupIsicCode": "2403-Copper & zinc" }, "CompanyClients": [ { "CName": "Timex", "ID": "1424317", "cType": "CR", "gType": "SD" }, { "CName": "Casio", "ID": "1416529", "cType": "AR", "gType": "RD" } ], "Country": [ { "CountryID": "Singapore", "CountryText": "SG" }, { "CountryID": "India", "CountryText": "IN" } ] } I used below code to POST. saves fine as its handcoded. i need to save this dynamically.

    Read the article

  • Simple Question:Output of below Java program

    - by Abhishek Jain
    public class abc1 { private String s; public abc1(String s){this.s=s;} public static void main(String args[]) { HashSet<Object> hs=new HashSet<Object>(); abc1 a1= new abc1("abc"); abc1 a2= new abc1("abc"); String s1= new String("abc"); String s2= new String("abc"); hs.add(a1); hs.add(a2); hs.add(s1); hs.add(s2); System.out.println(hs.size()); } } Why above program output is 3?

    Read the article

  • Output Unicode to Console Using C++

    - by Jesse Foley
    I'm still learning C++, so bear with me and my sloppy code. The compiler I use is Dev C++. I want to be able to output Unicode characters to the Console using cout. Whenver i try things like: # #include directive here (include iostream) using namespace std; int main() { cout << "Hello World!\n"; cout << "Blah blah blah some gibberish unicode: ÐAßGg\n"; system("PAUSE"); return 0; } It outputs strange characters to the console, like µA¦Gg. Why does it do that, and how can i get to to display ÐAßGg? Or is this not possible with Windows?

    Read the article

  • Where does output of print in kernel go?

    - by apoorv020
    I am debugging a driver for linux (specifically ubuntu server 9.04), and there are several printf statements in the code. Where can I view the output of these statements? EDIT1: What i'm trying to do is write to kernel using the proc file-system. The print code is static int proc_fractel_config_write(struct file *file, const char *argbuf, unsigned long count, void *data) { printk(KERN_DEBUG "writing fractel config\n"); ... In kern.log when I see the following message when i try to overwrite the file /proc/net/madwifi/ath1/fractel_config (with varying time of course). [ 8671.924873] proc write [ 8671.924919] Any explainations?

    Read the article

  • Output of the following code

    - by terrific
    String s1 = "Amit"; //true String s2 = "Amit"; //true String s3 = new String("abcd"); //true String s4 = new String("abcd"); //false System.out.println(s1.equals(s2)); //true System.out.println((s1==s2)); //true System.out.println(s3.equals(s4)); //false System.out.println((s3==s4)); //false Assume it to be in main why the output of the above code is true true true false and not true true false false???

    Read the article

  • CruiseControl.NET merge nunit and nant output

    - by JK
    I've just started using ccnet so I'm having trouble understanding why the merging of nant and nunit outputs are not working. I've setup my ccnet.config with typical values as found on google: <merge> <files> <file>D:\ccnet\path1\nant-results.xml</file> <file>D:\ccnet\path2\TestResult.xml</file> </files> </merge> <xmllogger /> Nant and ccnet are half working: if I deliberately put in a code error, then ccnet will say build failed. The same happens if I deliberately put in a failing test, ccnet will say build failed. But the ViewBuildReport.aspx page does not show any of the output from nant or nunit. Obviously I must be missing something, but I don't know what, any ideas? Thanks, JK

    Read the article

  • How can I output the fitted values?

    - by zenbomb
    Sorry if this is a novice question, but I don't understand it. I am fitting a sigmoid curve to my data with glm(). This works, I can plot the output and I see a nice sigmoid curve. However, how do I get R to return the final values it has fit? As I understand it, R fits the data to logit(y) = b0 + b1x, but when I do > summary(glm.out) I only get Call: glm(formula = e$V2 ~ e$V1, family = binomial(logit), data = e) Deviance Residuals: 1 2 3 4 5 6 7 -0.00001 -0.06612 -0.15118 -0.34237 0.20874 0.08724 -0.19557 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -24.784 20.509 -1.208 0.227 e$V1 2.073 1.725 1.202 0.229 (Dispersion parameter for binomial family taken to be 1) Null deviance: 4.60338 on 6 degrees of freedom Residual deviance: 0.23388 on 5 degrees of freedom AIC: 5.8525 Number of Fisher Scoring iterations: 8 How do I get b0 and b1?

    Read the article

  • Regex for zeroing in on build output text error

    - by Mike Atlas
    I'd like to quickly hone in on what failed in a build log output that is nearly 5k lines long, using Notepad++ as my editor for the file. Notepad++ has the nice ability to specify regular expressions, so I am wondering if there is a way to not match: Compile complete -- 0 errors, 0 warnings but to match, for example: Compile complete -- 1 errors, 0 warnings Compile complete -- 100 errors, 0 warnings where the match would be (1 or more) errors. If this isn't possible, I will probably just write a quick line-by-line parsing tool instead, but I was hoping someone on StackOverflow could whip out a regular expression in the same amount of time - I'm definitely not proficient enough with regular expressions to be able to write one for my needs in a short amount of time.

    Read the article

  • Output caching in HTTP Handler and SetValidUntilExpires

    - by mayor
    I'm using output caching in my custom HTTP handler in the following way: public void ProcessRequest(HttpContext context) { TimeSpan freshness = new TimeSpan(0, 0, 0, 60); context.Response.Cache.SetExpires(DateTime.Now.Add(freshness)); context.Response.Cache.SetMaxAge(freshness); context.Response.Cache.SetCacheability(HttpCacheability.Public); context.Response.Cache.SetValidUntilExpires(true); ... } It works, but the problem is that refreshing the page with F5 leads to page regeneration (instead of cache usage) despite of the last codeline: context.Response.Cache.SetValidUntilExpires(true); Any suggestions?

    Read the article

  • Printing python tkinter output

    - by Eric
    I am trying to print the contents of a python tkinter canvas. I have tried using the postscript method of canvas to create a postscript file, but I get a blank page. I know this is because I have embedded widgets, and these do not get rendered by the postscript method. Before I rewrite my program to create a more printer-friendly layout, can someone suggest a way to approach this problem? All of the programming books I have ever read approach the problem of sending output to a printer with a bit of hand-waving, something along the lines of: "It's a difficult problem that depends on interacting with the operating system." I also have a hard time finding resources about this because of all the pages related to printing to the screen. I am using Python 2.6, on Ubuntu 9.04.

    Read the article

< Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >