Displaying 20 results from an estimated 10000 matches similar to: "select lists - initial and empty elements"
2007 Nov 24
5
Service.start arguments failing or causing segfault
Hi,
Unless I''m mistaken the final arguments to Service.start should be
passed to the Daemon''s service_main method. Correct?
I modified the Service.start method (now in CVS) to look something like
this:
def self.start(service, host=nil, *args)
...
num_args = args.length
if args.empty?
args = nil
else
args.unshift(service) # Necessary?
2005 Dec 19
3
Is there a list of html_options for the FormOptionsHelper?
I''m looking for a way to select a default value from a select box, like
this:
select("user", "role_id", Role.find_all.collect {|r| [ r.name, r.id ] },
{ :default_value => ''5'' }
(of course, there is no ":default_value")
If the form is being used on a ''create'' page, it should display a
default in the select box. If
2008 Jan 23
6
JRuby and callbacks?
Hi all,
Any Java/JRuby folks on the list? I''d like to see if we can implement
api.c for JRuby using JNA and see how it handles the callbacks.
I''m not a Java guy, nor do I know JNA, but I''ll take a stab at it if no
one else on the list does.
Here are a couple of useful links:
http://www.infoq.com/news/2007/09/jna-jruby
https://jna.dev.java.net/
Regards,
Dan
This
2008 Apr 30
8
Playing with NtQueryInformationFile
Hi all,
I''m trying to get the allocation size of a file via a file handle
(rather than its name). The example below works for FileNameInformation
but I can''t get it to work as expected for FileStandardInformation.
Here''s some sample code:
# query_test.rb
require ''windows/handle''
require ''windows/error''
include Windows::Handle
2008 Jun 10
7
Unraveling a FAR*
Hi all,
Just looking over fole_s_connect() in win32ole.c and I noticed this bit:
hr = CLSIDFromProgID(pBuf, &clsid);
...
hr = GetActiveObject(&clsid, 0, &pUnknown);
...
hr = pUnknown->lpVtbl->QueryInterface(
pUnknown,
&IID_IDispatch,
(void **)&pDispatch
);
Using win32-api, that would be something like:
IID_IUnknown =
2008 Jun 04
3
Ruby 1.8.7
Hi all,
Has anyone else been able to build Ruby 1.8.7 from source on Windows? I
get this when I run configure:
C:\>win32\configure.bat
find: =: No such file or directory
Creating Makefile
Creating Makefile(6) : fatal error C1085: Cannot write compiler
generated file: '''': Invalid argument
NMAKE : fatal error U1077: ''cl'' : return code ''0x1''
2008 Nov 10
4
PathFindExtension and wide strings
Hi,
What''s happening here?
require ''windows/path''
require ''windows/unicode''
include Windows::Path
include Windows::Unicode
file_a = ''bar.txt''
file_w = multi_to_wide(file_a)
p PathFindExtensionA(file_a) # ''.txt'' => OK
p PathFindExtensionW(file_w) # ''.'' => WRONG
Is Ruby chopping the
2007 Oct 05
11
Session handling busted on Oracle
Hi,
Ruby 1.8.6 (one-click)
Camping 1.5
I''d submit this as a bug, but the tracker says I''m forbidden, so here
you go.
The first problem is that the sql to create the sessions table is
broken. This is what it tried to send:
CREATE TABLE sessions (
id NUMBER(38) NOT NULL PRIMARY KEY (38), --> Problem here
hashid VARCHAR2(32),
created_at DATE,
ivars CLOB DEFAULT
2008 Jul 08
12
Some more win32-security: SID.create
Hi all,
How does this look as a general approach to a SID.create method:
# Creates and initializes
def self.create(authority, *sub_authorities)
if sub_authorities.length > 8
raise ArgumentError, ''maximum of 8 subauthorities allowed''
end
authorities = Array.new(8, 0)
authorities.replace(sub_authorities)
count = authorities.select{ |e| e > 0 }.size
2006 Feb 07
1
displaying foreign keys help request
Hi ..
(I seem to be having some problems getting my posts to the list for some
reason. Sorry if you see this as a repost).
A conceptual question this time.
I have the relation:
member (m)---(1) member_type
The schema looks something like this (simplified + PGSQL)
create table member_types (
id serial,
info varchar( 20 ) not null,
primary key( id
2008 May 06
4
DeviceIoControl + IOCTL_DISK_GET_DRIVE_GEOMETRY problem
Hi all,
Ok, what am I doing wrong here?
require ''windows/device_io''
require ''windows/handle''
require ''windows/error''
include Windows::DeviceIO
include Windows::Handle
include Windows::Error
fh = File.open(''test.txt'') # Assume you have this
handle = get_osfhandle(fh.fileno)
if handle == INVALID_HANDLE_VALUE
puts
2008 Jun 25
3
[OT] Byacc error
Hi all,
Yeah, I''m going OT here...
I''m not entirely sure I understand how Ruby builds parse.y on Windows,
but it works. However, when I changed all instances of "Ruby" to
"Sapphire", and renamed all the source files, I suddenly started getting
this error:
byacc ./parse.y
''byacc'' is not recognized as an internal or external command,
2008 Apr 25
4
win32-mmap test failures
Hi all,
This is odd. It looks to me like we have all 4 variations of memcpy set
in Windows::MSVCRT::Buffer but somehow this one creeps up. I actually
noticed it in a few cases with that earlier mmap sub/replace example,
but I wasn''t sure what was happening.
Note that windows-api 0.2.3 and windows-pr-0.8.3 are the latest versions
in CVS, but this happens with windows-api-0.2.2 and
2008 Jan 16
2
Problem with win32-open3 and net-ping
Hi all,
I''m seeing strange behavior with net-ping on Windows, which uses
win32-open3 (Open3.popen3) behind the scenes.
Download (or checkout) net-ping and run this:
ruby -Ilib test\tc_pingexternal.rb
It looks like the test suite is running twice. What''s happening?
Thanks,
Dan
This communication is the property of Qwest and may contain confidential or
privileged
2007 Sep 25
2
Bug in win32-api with void prototypes?
Hi all,
It seems that a void prototype requires an explicit argument in our
version of win32/api:
C:\>irb
irb(main):001:0> require ''win32/api''
=> true
irb(main):002:0> include Win32
=> Object
irb(main):003:0> require ''Win32API''
=> true
# Our version
irb(main):004:0> GetLastErrorA = API.new(''GetLastError'',
2005 Sep 08
11
Stopping services
I''m back to getting stuff to run as a Windows service, and am running
in to a problem. My service (a Daemon ruby class) installs and starts
fine, but when I try to stop it, I get:
C:\workspaces\default\tahoe>ruby script\service stop
script/service:77:in `stop'': An exception occurred in the service
when handling
the control request. (Win32::ServiceError)
from
2006 Apr 21
10
"Client closed socket" spewage
Hi all,
Ruby 1.8.4
Rails 1.1.2
Mongrel 0.3.12
I''m seeing this output from the Mongrel server:
Client closed socket requesting file
C:/eclipse/workspace/dslscheduler/public/javascripts/prototype.js:
Invalid argument
It seems to be harmless, but I''m curious as to what''s causing it. Any
ideas?
Thanks,
Dan
2006 Mar 03
1
starting webrick from ruby (tar2rubyscript.rb)
I am using tar2rubyscript to package up a rails application and run it
as one file from the server.
If you run script/server and have lighttpd install it will start lighty
instead of webrick. So, thanks to Erik Veenstra''s suggestion, I add
ARGV.unshift("webrick") to the init.rb file to force webrick to start:
ARGV.unshift("webrick")
load "script/server"
2008 Dec 01
2
Code formatting with VS 2008?
Hi everyone,
I see that Visual Studio 2008 Pro has the ability to auto-format code.
Does anyone know if there''s a way to auto-format pre-ansi C code to ANSI
C? I couldn''t find anything, but there''s so many options in VS I wasn''t
sure.
Regards,
Dan
This communication is the property of Qwest and may contain confidential or
privileged information.
2006 Dec 04
9
mongrel install on win32 XP problems
I can''t get mongrel installed on a Win XP. I keep getting some unknown
error with this "win32-service-0.5.2". While it states results are
logged, the file is empty - not much help. I even tried complete
uninstall of ruby and reinstalled ruby 1.8.5-21. But no luck.
Oddly, I had no problem installing earlier on a Win 2K machine. Is
there something special about XP?
here