logs
stringlengths
104
251k
* Record live audio. * Convert tapes and records into digital recordings or CDs. * Edit Ogg Vorbis, MP3, WAV or AIFF sound files. * Cut, copy, splice or mix sounds together. * Change the speed or pitch of a recording.
import getopt, sys def main(): try: opts, args = getopt.getopt(sys.argv[1:], "ho:v", ["help", "output="]) except getopt.GetoptError: # print help information and exit: usage() sys.exit(2) output = None verbose = False for o, a in opts: if o == "-v": ...
public class ImageConverter : IValueConverter { public object Convert( object value, Type targetType, object parameter, CultureInfo culture) { return new BitmapImage(new Uri(value.ToString())); } public object ConvertBack( object value, Type targetType, object parameter, Culture...
'****************************************************************************************** ' Name: SetASPDotNetVersion ' Description: Set the script mappings for the specified ASP.NET version ' Inputs: objIIS, strNewVersion '****************************************************************************************** Sub...
bool is_equals(float A, float B, float maxRelativeError, float maxAbsoluteError) { if (fabs(A - B) < maxAbsoluteError) return true; float relativeError; if (fabs(B) > fabs(A)) relativeError = fabs((A - B) / B); else relativeError = fabs((A - B) / A); if (relativeError <= maxRelat...
-- Deadlock retry template declare @lastError int; declare @numErrors int; set @numErrors = 0; LockTimeoutRetry: begin try; -- The query goes here return; -- this is the normal end of the procedure end try begin catch set @lastError=@@error if @lastError = 1222 or @lastError = 1205 -- Lock timeout or dea...
emailUtil.sendEmail(userId, "foo"); public void sendEmail(String userId, String message) throws MailException { /* ... logic that could throw a MailException */ }
public class CreateMemberPresenter { private ICreateMemberView view; private IMemberTasks tasks; public CreateMemberPresenter(ICreateMemberView view) : this(view, new StubMemberTasks()) { } public CreateMemberPresenter(ICreateMemberView view, IMemberTasks tasks) { this.vie...
$ git init Initialized empty Git repository in .git/ $ echo "testing reset" > file1 $ git add file1 $ git commit -m 'added file1' Created initial commit 1a75c1d: added file1 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 file1 $ echo "added new file" > file2 $ git add file2 $ git commit -m 'add...
$ git init Initialized empty Git repository in .git/ $ echo "testing reset" > file1 $ git add file1 $ git commit -m 'added file1' Created initial commit 1a75c1d: added file1 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 file1 $ echo "added new file" > file2 $ git add file2 $ git commit -m 'add...
irb(main):001:0> case 'a'; when /\w/: puts 'word'; end SyntaxError: (irb):1: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n'
irb(main):001:0> {1=>2}.index(2) (irb):18: warning: Hash#index is deprecated; use Hash#key => 1 irb(main):002:0> {1=>2}.key(2) => 1
irb(main):001:0> case 'a'; when /\w/: puts 'word'; end SyntaxError: (irb):1: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n'
irb(main):001:0> {1=>2}.index(2) (irb):18: warning: Hash#index is deprecated; use Hash#key => 1 irb(main):002:0> {1=>2}.key(2) => 1
irb(main):001:0> class C < BasicObject; def f; Math::PI; end; end; C.new.f NameError: uninitialized constant C::Math
public static string Column(int column) { column--; if (column >= 0 && column < 26) return ((char)('A' + column)).ToString(); else if (column > 25) return Column(column / 26) + Column(column % 26 + 1); else throw new Exception("Invalid Column #" + (column + 1).ToString()); }
define('MAP', 'var/cache/autoload.map'); error_reporting(E_ALL); require 'setup.php'; print(buildAutoloaderMap() . " classes mapped\n"); function buildAutoloaderMap() { $dirs = array('lib', 'view', 'model'); $cache = array(); $n = 0; foreach ($dirs as $dir) { foreach (new RecursiveIteratorItera...
[Conditional("DEBUG")] public static void DebugAssertValueEquality<T>(T current, T other, bool expected, params string[] ignoredFields) { if (null == current) { throw new ArgumentNullException("current"); } if (null == ignoredFields) { ignoredFields = new...
--Cursor DECLARE @phoneNumber char(7) DECLARE c CURSOR LOCAL FAST_FORWARD FOR SELECT PhoneNumber FROM Customer WHERE AreaCode IS NULL OPEN c FETCH NEXT FROM c INTO @phoneNumber WHILE @@FETCH_STATUS = 0 BEGIN DECLARE @exchange char(3), @areaCode char(3) SELECT @exchange = LEFT(@phoneNumber, 3) SELECT @areaC...
[Serializable] public class MemoizeAttribute : PostSharp.Laos.OnMethodBoundaryAspect, IEqualityComparer<Object[]> { private Dictionary<Object[], Object> _Cache; public MemoizeAttribute() { _Cache = new Dictionary<object[], object>(this); } public override void OnEntry(PostSharp.Laos.Method...
@Test(expected=IOException.class) public void flatfileMissing() throws IOException { readFlatFile("testfiles"+separator+"flatfile_doesnotexist.dat"); }
>>> a = "Yellow" >>> b = ("Black", "Burgundy") >>> do_something(a, b) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 3, in do_something AttributeError: 'tuple' object has no attribute 'append'
>>> a = "Yellow" >>> b = ("Black", "Burgundy") >>> do_something(a, b) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 3, in do_something AttributeError: 'tuple' object has no attribute 'append'
Public Sub WriteToFile(ByVal FilePath As String, ByVal FileName As String, ByVal Data() As Byte) Dim FileOpen As Boolean Dim File As System.IO.FileStream = Nothing Dim StartTime As DateTime Dim MaxWaitSeconds As Integer = 120 StartTime = DateTime.Now FileOpen = False ...
Line 38: MasterConn = New ADODB.Connection() Line 39: MasterConn.connectiontimeout = 10000 Line 40: MasterConn.Open(strDB)
DRDA (Security Check) DDM (SECCHKRM) Length: 55 Magic: 0xd0 Format: 0x02 0... = Reserved: Not set .0.. = Chained: Not set ..0. = Continue: Not set ...0 = Same correlation: Not set DSS type: RPYDSS (2) CorrelId: 0 Len...
function callback(a){ return function(){ alert("Hello " + a); } } var a = "world"; setTimeout(callback(a), 2000); a = "Stack Overflow";
<bean id="exceptionResolver" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver"> <property name="exceptionMappings"> <props> <prop key="UserNotFoundException"> rescues/UserNotFound </prop> <prop key="HibernateJdbcException"> rescues/databaseProb...
public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line; try { line = br.readLine(); while(line != null) { System.out.println(line); line = br.readLine(); } } catch (IOException e) { ...
using System; using System.ComponentModel; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; namespace Dentactil.UI.WinControls { [DefaultProperty("TextString")] [DefaultEvent("TextClick")] public partial class RoundedLabel : UserControl { private static readonly...
Unhandled Error in Silverlight 2 Application Invalid attribute value {Binding ElementName=oUserTeams, Path=TeamId} for property TeamId. [Line: 21 Position: 146] at System.Windows.Application.LoadComponent(Object component, Uri xamlUri) at agChat.Page.InitializeComponent() at agChat.Page..ctor() at agChat.App.Applicatio...
Unhandled Error in Silverlight 2 Application Invalid attribute value {Binding ElementName=oUserTeams, Path=TeamId} for property TeamId. [Line: 21 Position: 146] at System.Windows.Application.LoadComponent(Object component, Uri xamlUri) at agChat.Page.InitializeComponent() at agChat.Page..ctor() at agChat.App.Applicatio...
1<System.Data.SqlClient.SqlDataReader>) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.MethodAccessException: .Read_<>f__AnonymousType0
.Read_<>f__AnonymousType0`2 (System.Data.Linq.SqlClient.Implementation.ObjectMaterializer`1<System.Data.SqlClient.SqlDataReader>) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in t...
public static void main(String arg[]) throws IOException{ Runtime runtime = Runtime.getRuntime(); Process proc = runtime.exec("shutdown -s -t 0"); System.exit(0); }
byte[] buffer = new byte[MAX_PATH * 2]; int chars = GetModuleFileName(IntPtr.Zero, buffer, MAX_PATH); if (chars > 0) { string assemblyPath = System.Text.Encoding.Unicode.GetString(buffer, 0, chars * 2); } [DllImport("coredll.dll", SetLastError = true)] private static extern int GetModuleFileName(IntPtr hModule, ...
--fails in sql2000, works in 2005 SELECT t1.* FROM usertable t1 WHERE 1 in (Select val from fnSplitStringToInt(t1.legacyCSVVarcharCol, ',') ) --works everywhere: SELECT t1.* FROM usertable t1 WHERE 1 in ( Select val from fnSplitStringToInt('1,4,543,56578', ',') )
--fails in sql2000, works in 2005 SELECT t1.* FROM usertable t1 WHERE 1 in (Select val from fnSplitStringToInt(t1.legacyCSVVarcharCol, ',') ) --works everywhere: SELECT t1.* FROM usertable t1 WHERE 1 in ( Select val from fnSplitStringToInt('1,4,543,56578', ',') )
$.ajax({ type: "POST", url: "SomePage.aspx/GetSomeObjects", contentType: "application/json; charset=utf-8", dataType: "json", data: "{id: '" + someId + "'}", success: function(json) { $("#success").html("json.length=" + json.length); itemAddCallback(json); }, error: funct...
<script> function changeReport(dropDownList) { var selectedReport = dropDownList.options[dropDownList.selectedIndex]; window.location = ("scratch.htm?SelectedReport=" + selectedReport.value); } </script> <select id="SelectedReport" onchange="changeReport(this)"> <option value="foo">foo</opt...
try: os.stat(path) except OSError, e: if e.errno == errno.ENOENT: print 'path %s does not exist or is a broken symlink' % path else: raise e
> print (factorial(234132)) stdin:3: stack overflow stack traceback: stdin:3: in function 'factorial' stdin:3: in function 'factorial' stdin:3: in function 'factorial' stdin:3: in function 'factorial' stdin:3: in function 'factorial' stdin:3: in function 'factorial' stdin:3: in function 'fac...
public Task CreateTask(XmlElement elem) { if (elem != null) { switch(elem.Name) { case "merge": return new MergeTask(elem); default: throw new ArgumentException("Invalid Task"); } } }
#!/bin/bash DATA=data ERROR="0" if cut -d' ' -f2 /proc/mounts | grep -q "^/mnt/$1\$"; then ERROR=0 else if mount /dev/vg/$1 /mnt/$1; then ERROR=0 else ERROR=$? echo "Can't backup $1, /mnt/$1 could not be mounted: $ERROR" fi fi if [ "$ERROR" = "0" ]; then if cut -d' ' -f2 /...
if df |grep -q '/mnt/mountpoint$' then echo "Found mount point, running task" # Do some stuff else echo "Aborted because the disk is not mounted" # Do some error correcting stuff exit -1 fi
public static TimeZoneInformation FromName(string name) { TimeZoneInformation[] zones = EnumZones(); foreach (TimeZoneInformation tzi in zones) { if (tzi.DisplayName.Equals(name)) return tzi; } throw new ArgumentOutOfRangeException("name", name, ...
SqlCommand command = new SqlCommand(sqlQuery, _Database.Connection); command.CommandTimeout = 0; int rows = command.ExecuteNonQuery();
SqlCommand command = new SqlCommand(sqlQuery, _Database.Connection); command.CommandTimeout = 0; int rows = command.ExecuteNonQuery();
private ScaleConverter converter; public DiveLog() { InitializeComponent(); converter = new ScaleConverter(); visibilitySlider.ValueChanged += new RoutedPropertyChangedEventHandler<double>(visibilitySlider_ValueChanged); } private void visibilityS...
[08/26/08,09:46:11] Microsoft .NET Framework 2.0SP1 (CBS): [2] Error: Installation failed for component Microsoft .NET Framework 2.0SP1 (CBS). MSI returned error code 1 [08/26/08,09:46:13] WapUI: [2] DepCheck indicates Microsoft .NET Framework 2.0SP1 (CBS) is not installed.
[08/26/08,09:46:11] Microsoft .NET Framework 2.0SP1 (CBS): [2] Error: Installation failed for component Microsoft .NET Framework 2.0SP1 (CBS). MSI returned error code 1 [08/26/08,09:46:13] WapUI: [2] DepCheck indicates Microsoft .NET Framework 2.0SP1 (CBS) is not installed.
<echo message="**** Starting SpecUnit report generation ****" /> <copy file="${specunit.exe}" tofile="${output.dir}SpecUnit.Report.exe" /> <exec program="${output.dir}SpecUnit.Report.exe" failonerror="false"> <arg value="${acceptance.tests.assembly}" /> </exec>
Imports System.Runtime.CompilerServices Namespace Extensions ''' <summary> ''' Extensions for the Image class. ''' </summary> ''' <remarks>Several usefull extensions for the image class.</remarks> Public Module ImageExtensions ''' <summary> ''' Extends the image class so that it is easier t...
error: function (XMLHttpRequest, textStatus, errorThrown) { $("#error").html(XMLHttpRequest.status + "\n<hr />" + XMLHttpRequest.responseText); }
<Target Name="AspNetMerge" Condition="'$(UseMerge)' == 'true'" DependsOnTargets="$(MergeDependsOn)"> <AspNetMerge ExePath="$(FrameworkSDKDir)bin" ApplicationPath="$(TempBuildDir)" KeyFile="$(_FullKeyFile)" DelaySign="$(DelaySign)" Prefix="$(AssemblyPrefixName)" SingleAssemblyName...
Exception Type: System.DllNotFoundException Exception Message: Unable to load DLL 'HardwareID.dll': Invalid access to memory location. (Exception from HRESULT: 0x800703E6) Exception Target Site: GetHardwareID
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.CSharp; using System.CodeDom; using System.IO; using System.CodeDom.Compiler; using System.Reflection; namespace CodeDomQuestion { class Program { private static void Main(string[] args) { ...
git init git commit --allow-empty -mOne git commit --allow-empty -mTwo git checkout -b anotherbranch git commit --allow-empty -mThree git checkout master # This changes the HEAD, but not the repository contents git show HEAD~1 # => One git show HEAD@{1} # => Three git reflog
git init git commit --allow-empty -mOne git commit --allow-empty -mTwo git checkout -b anotherbranch git commit --allow-empty -mThree git checkout master # This changes the HEAD, but not the repository contents git show HEAD~1 # => One git show HEAD@{1} # => Three git reflog
On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colProcessList = objWMIService.ExecQuery _ ("Select * from Win32_Process Where Name = 'BackgroundProcess.exe'") For Each objProcess in colProcessList ...
R:\>tnsping someconnection TNS Ping Utility for 32-bit Windows: Version 9.0.1.3.1 - Production on 27-AUG-20 08 10:38:07 Copyright (c) 1997 Oracle Corporation. All rights reserved. Used parameter files: C:\Oracle92\network\ADMIN\sqlnet.ora C:\Oracle92\network\ADMIN\tnsnames.ora TNS-03505: Failed to resolve name R:...
R:\>tnsping someconnection TNS Ping Utility for 32-bit Windows: Version 9.0.1.3.1 - Production on 27-AUG-20 08 10:38:07 Copyright (c) 1997 Oracle Corporation. All rights reserved. Used parameter files: C:\Oracle92\network\ADMIN\sqlnet.ora C:\Oracle92\network\ADMIN\tnsnames.ora TNS-03505: Failed to resolve name R:...
public static void populateWithJSON(HttpServletResponse response,JSONObject json) { String CONTENT_TYPE="text/x-json;charset=UTF-8"; response.setContentType(CONTENT_TYPE); response.setHeader("Cache-Control", "no-cache"); try { response.getWriter().write(json.toString()); } catch (IOException e) {...
public static void populateWithJSON(HttpServletResponse response,JSONObject json) { String CONTENT_TYPE="text/x-json;charset=UTF-8"; response.setContentType(CONTENT_TYPE); response.setHeader("Cache-Control", "no-cache"); try { response.getWriter().write(json.toString()); } catch (IOException e) {...
success: function(data){ var created = $("result", data).attr("success"); if (created == "OK"){ resetNewUserForm(); listUsers(''); } else { var errorMessage = $("result", data).attr("message"); $("#newUserErrorMessage").text(errorMessage).show(); } enableNewUserForm()...
<build number="1.0.{build.number}"> <statusInfo status="FAILURE"> <text action="append">Tests failed: 16, passed: 88</text> </statusInfo> </build>
Public Partial Class ucTestMVP Inherits System.Web.UI.UserControl Implements ITestMVPView Protected Sub PageLoad(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then Dim presenter As New TestMVPPresenter(Me) presenter.InitView() End If End Sub ...
static void Main(string[] args) { Test("1.0.0.0", "1.0.0.1", -1); Test("1.0.0.1", "1.0.0.0", 1); Test("1.0.0.0", "1.0.0.0", 0); Test("1, 0.0.0", "1.0.0.0", 0); Test("9, 5, 1, 44", "3.4.5.6", 1); Test("1, 5, 1, 44", "3.4.5.6", -1); Test("6,5,4,3", "6.5.4.3", 0)...
Slave-IO-Running: Yes Slave-SQL-Running: No Replicate-Do-DB: Last-Errno: 1062 Last-Error: Error 'Duplicate entry '15218' for key 1' on query. Default database: 'db'. Query: 'INSERT INTO db.table ( FIELDS ) VALUES ( VALUES )'
private static void ImportFromCsvToAccessTable(String mdbFilePath, String accessTableName , String csvDirPath , String csvFileName ) throws ClassNotFoundException, SQLException { Connection msConn = getDestinationConnection(mdbFilePath); try{ String strSQL = "SELECT * INTO " + accessTableName + " FRO...
<project name="cocoathing" default="build"> <target name="build"> <exec executable="xcodebuild" dir="CocoaThing" failonerror="true"> <arg line="-target CocoaThing -buildstyle Deployment build" /> </exec> </target> </project>
In file included from include/asm/page.h:3, from /tmp/vmware-config0/vmmon-only/common/hostKernel.h:56, from /tmp/vmware-config0/vmmon-only/common/task.c:30: include/asm/page_32.h: In function ‘pte_t native_make_pte(long unsigned int)’: include/asm/page_32.h:112: error: expected primary-expression before ...
System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall at System.Net.Sockets.Socket.Accept() at System.Net.Sockets.TcpListener.AcceptTcpClient()
try { hwservicens.Service1 service1 = new hwservicens.Service1(); service1.HelloWorld(); } catch(Exception e) { Console.WriteLine(e.ToString()); }
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: HelloWorldException at WebService1.Service1.HelloWorld() in C:\svnroot\Vordur\WebService1\Service1.asmx.cs:line 27 --- End of inner exception stack trace ---
try { hwservicens.Service1 service1 = new hwservicens.Service1(); service1.HelloWorld(); } catch(Exception e) { Console.WriteLine(e.ToString()); }
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: HelloWorldException at WebService1.Service1.HelloWorld() in C:\svnroot\Vordur\WebService1\Service1.asmx.cs:line 27 --- End of inner exception stack trace ---
generic function set_x specific function set_y generic function get_x 20 generic function get_y 30 generic function set_z Notice: Fatal error: Call to undefined method set_z() in [...] on line 16
public double xProjection(Point p1, Point p2) { if (p1 == null || p2 == null) { throw new IllegalArgumentException("Invalid argument for xProjection"); } return (p2.x - p1.x) * 1.5; } public double xProjection(Point p1, Point p2) { assert p1 != null : "p1 should not be null"; assert p2 != n...
public module Foo public module Bar # factory method for new Bar implementations def self.new(...) SimpleBarImplementation.new(...) end def baz raise NotImplementedError.new('Implementing Classes MUST redefine #baz') end end private class SimpleBarImplementation include Bar ...
import win32serviceutil import win32service import win32event import servicemanager import socket class AppServerSvc (win32serviceutil.ServiceFramework): _svc_name_ = "TestService" _svc_display_name_ = "Test Service" def __init__(self,args): win32serviceutil.ServiceFramework.__init__(self,args) ...
/* * This makes the updating content item automatically scroll * into view if it is off the viewport. */ public void contentsChanged(final ListDataEvent evt) { if (!EventQueue.isDispatchThread()) { /** * Make sure the scrolling happens in the graphics "dispatch" thread. */ Eve...
public void someFun(String val1, String val2) throws IllegalArgumentException { ExceptionUtilities.checkNull(val1, "val1"); ExceptionUtilities.checkNull(val2, "val2"); /** alternatively: ExceptionUtilities.checkNull(val1, val2); **/ /** ... **/ }
try { db.SubmitChanges(ConflictMode.ContinueOnConflict); } catch (ChangeConflictException e) { Console.WriteLine("Optimistic concurrency error."); Console.WriteLine(e.Message); Console.ReadLine(); foreach (ObjectChangeConflict occ in db.ChangeConflicts) { MetaTable metatable = db.Mapping...
joe[~]$ irb >> "12341:asdf"[/\d+/] # => "12341" >> "12341:asdf"[/\d*/] # => "12341" >> "12341:asdf"[0..5] # => "12341:" >> "12341:asdf"[0...5] # => "12341" >> "12341:asdf"[0, ':'] TypeError: can't convert String into Integer from (irb):5:in
joe[~]$ irb >> "12341:asdf"[/\d+/] # => "12341" >> "12341:asdf"[/\d*/] # => "12341" >> "12341:asdf"[0..5] # => "12341:" >> "12341:asdf"[0...5] # => "12341" >> "12341:asdf"[0, ':'] TypeError: can't convert String into Integer from (irb):5:in `[]' from (irb):5 >> "12341:asdf"[0, 5] # => "12341"
nslookup > set type=mx > stackoverflow.com Server: 158.155.25.16 Address: 158.155.25.16#53 Non-authoritative answer: stackoverflow.com mail exchanger = 10 aspmx.l.google.com. stackoverflow.com mail exchanger = 20 alt1.aspmx.l.google.com. stackoverflow.com mail exchanger = 30 alt2.aspmx...
public class Test { public static final void main(String[] args) throws Exception { String s = "This is the original string."; /* This is commented out. s = "This is the end of a comment: */ "; */ System.out.println(s); } }
test_sequence_0_foo (__main__.TestSequence) ... ok test_sequence_1_bar (__main__.TestSequence) ... FAIL test_sequence_2_lee (__main__.TestSequence) ... ok ====================================================================== FAIL: test_sequence_1_bar (__main__.TestSequence) -------------------------------------------...
test_sequence_0_foo (__main__.TestSequence) ... ok test_sequence_1_bar (__main__.TestSequence) ... FAIL test_sequence_2_lee (__main__.TestSequence) ... ok ====================================================================== FAIL: test_sequence_1_bar (__main__.TestSequence) -------------------------------------------...
<authentication mode="Forms"> <forms defaultUrl="~/Default.aspx" loginUrl="~/login.aspx" timeout="1440" ></forms> </authentication>
BOOL ret=FALSE; DWORD dwError; DWORD size; void *p=NULL; WLAN_INTERFACE_STATE *ps; dwError = WlanQueryInterface(hClient, &guid, wlan_intf_opcode_interface_state, NULL, &size, &p, NULL); ps=(WLAN_INTERFACE_STATE *)p; if(dwError!=0) ret=FALSE; else if(*ps==wlan_interface_...
BOOL ret=FALSE; DWORD dwError; DWORD size; void *p=NULL; WLAN_INTERFACE_STATE *ps; dwError = WlanQueryInterface(hClient, &guid, wlan_intf_opcode_interface_state, NULL, &size, &p, NULL); ps=(WLAN_INTERFACE_STATE *)p; if(dwError!=0) ret=FALSE; else if(*ps==wlan_interface_...
public static org.w3c.dom.Document loadXMLFrom(String xml) throws org.xml.sax.SAXException, java.io.IOException { return loadXMLFrom(new java.io.ByteArrayInputStream(xml.getBytes())); } public static org.w3c.dom.Document loadXMLFrom(java.io.InputStream is) throws org.xml.sax.SAXException, java.io.IOExcept...
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilder; import org.w3c.dom.Document; import java.io.ByteArrayInputStream; public Document loadXMLFromString(String xml) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamesp...
<% form_remote_tag :url => product_path, :update => 'content', :method => 'get' do -%> <% content_tag :div, :id => 'content' do -%> <%= select_tag :update, options_for_select([["foo", 1], ["bar", 2]]), :onchange => "this.form.commit.click" %> <%= submit_tag 'submit_button', :style => "display: none" %> <% e...
<% form_remote_tag :url => product_path, :update => 'content', :method => 'get' do -%> <% content_tag :div, :id => 'content' do -%> # the following line does not work <%= select_tag :update, options_for_select([["foo", 1], ["bar", 2]]), :onchange => "this.form.onsubmit()" %> <% end %> <% end %>
<form action="/products/1" method="post" onsubmit="new Ajax.Updater('content', '/products/1', {asynchronous:true, evalScripts:true, method:'get', parameters:Form.serialize(this)}); return false;"> <div style="margin:0;padding:0"> <input name="authenticity_token" type="hidden" value="4eacf78eb87e9262a0b631a8a6e417...
<html> <head> <style> div.sidebox { width: 25%; } div.sidebox div.qrytxt { height: 1em; line-height: 1em; overflow: hidden; } div.sidebox div.qrytxt span.ellipsis { float: right; } </style> </head> <body> <div class="sidebox"> <div class="qrytxt"> <span class="ellipsis">&hellip;</...
> nosetests -v testgen.test_generator('a', 'a') ... ok testgen.test_generator('a', 'b') ... FAIL testgen.test_generator('b', 'b') ... ok ====================================================================== FAIL: testgen.test_generator('a', 'b') ---------------------------------------------------------------------- T...