Displaying 17 results from an estimated 17 matches for "fkey".
Did you mean:
_key
2011 Apr 01
0
[GIT PULL] elflink cmdline
...char *filename)
+{
+ FILE *f;
+ char line[2048];
+
+ f = fopen(filename, "r");
+ if (!f)
+ return -1;
+
+ while (fgets(line, sizeof(line), f) != NULL)
+ printf("%s", line);
+
+ fclose(f);
+ return 0;
+}
+
+void cat_help_file(int key)
+{
+ struct menu *cm = current_menu;
+ int fkey;
+
+ switch (key) {
+ case KEY_F1:
+ fkey = 0;
+ break;
+ case KEY_F2:
+ fkey = 1;
+ break;
+ case KEY_F3:
+ fkey = 2;
+ break;
+ case KEY_F4:
+ fkey = 3;
+ break;
+ case KEY_F5:
+ fkey = 4;
+ break;
+ case KEY_F6:
+ fkey = 5;
+ break;
+ case KEY_F7:
+ fkey = 6;
+ break;
+ case KEY_F8...
2006 Feb 20
0
Override automatic accessor for reference field in model
When a column in a database table is actual data, rather than an fkey to
another table, I can override the automatic accessor by just doing the
following:
def field_name
# do something here
read_attribute(field_name)
end
This does not seem to work for me if the field is an fkey, say user_id,
linking to another table. I''ve made this work by aliasing...
2006 Jan 09
1
Newbie Question. I''m dumb with forms and foreign keys
For some reason I am just not able to get this.
I am trying to setup an organizational hierarchy, so I have a
organization which works fine. From there I want to be able to define
new divisions, departments, areas, etc.
For creating a Division, my original thought was to pass the
organization''s id to the new organization unit form, and then do a
Division.new(:organization_id =>
2006 Oct 25
0
has_one & foreign_key - generating bad SQL
- MODEL -
class Document < ActiveRecord::Base
has_one :user,
:class_name => "User",
:foreign_key => "fkey",
:conditions => "user = ''NAME''"
end
- GENERATED SQL (per the .log) -
SELECT FIRST 1 * FROM table_name WHERE (table_name.fkey IS NULL AND
(user_id = ''NAME''))
What I can''t figure out is what the "IS NULL" is doing...
2005 Mar 09
1
Slightly OT - Snom 190 function keys via subscribed config
...the case when its the first non-white space
char found on a line, or is it true for any
position in the resulting data being passed to the phone.
I'm currently using snom190-3.56m-SIP-j.bin firmware on the phones.
A sample of the resulting output from the configuration script:
===========
fkey0!: line
fkey1!: line
fkey2!: dest <sip:1000@asterisk-server;user=phone>
fkey3!: dest <sip:1002@asterisk-server;user=phone>
fkey4!: dest <sip:1011@asterisk-server;user=phone>
===========
The 190s seem to ignore all fkey settings. The existing setting in the
phone that I have fro...
2006 Feb 17
0
Model relationships in tests
...s between tables/classes.
For example, I might have something like this:
vehicle.yml
red_ford:
id:1
owner_id:2
owner.yml
ford_owner:
id:2
address_id:5
address.yml
home_address:
id:5
etc.
To build up complex test relations, I have to edit all three files,
keeping track of the ids / fkeys for each test case. I''ve thought about
skipping foreign keys altogether in the fixtures and creating the
relations programmatically in the test, or possibly writing a custom
fixture generator of some sort. I know I could create the relations in
the db one way or the other and expo...
2006 Feb 19
0
Handling nil attributes in views
...ilable" %>
Option 2:
Define the reader for B_attr
alias old_b_attr b_attr
def b_attr
if self.b_attr_id.nil?
B.new # essentially, create a new empty version
else
old_b_attr
end
end
BTW, I''m using the alias method because read_attribute does not work
(afaik) with fkey relationships.
Both of these methods work, but still don''t quite feel "right". Any
suggestions?
TIA,
Keith
--
Posted via http://www.ruby-forum.com/.
2005 Nov 28
1
has_one / HABTM relationship overlap - please advise
1. I have a few tables: ''users'', ''shops'', ''addresses'', and ''pictures''.
2. Users and Shops will both use the addresses and pictures tables. I have
created several mapping tables:
addresses_shops
pictures_shops
addresses_users
pictures_users
3. Users CAN have many addresses and pictures (simple HABTM), but...
4.
2007 Oct 01
1
Patch to add option-key menus (similar to SuSE patch)
...ing that will be added to the APPEND string of the
currently selected boot entry. This is applied to the last ENTRY.
OPTMENU F1...F12 DEFAULT entrynum
Selects which entry in the indicated submenu will be selected by default.
OPTMENUS F1 F2 F3...
To be used in a LABEL section, this selects which fkey submenus will
be active for the current LABEL.
Example config file:
TIMEOUT 200
DEFAULT /boot/vesamenu.c32
MENU TITLE test menu
OPTMENU F2 TITLE Video mode
OPTMENU F2 ENTRY Text (80 x 25)
OPTMENU F2 VALUE vga=normal
OPTMENU F2 ENTRY Text (80 x 50)
OPTMENU F2 VALUE vga=ext
OPTMENU F2 E...
2008 Jan 02
4
Lamps on Snom phones
Hello
Happy New Year to all!!
I've just completed porting from Asterisk 1.2 to 1.4. I did this by
doing a clean install on a new box, and moving over configuration and
scripts where needed. All went surprisingly well!
Anyway, one lingering issue is that the function key "lamps" on our Snom
phones have all stopped working! We're using a mix of Snom 290/320/360
phones and
2007 Oct 18
0
18 commits - doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_flash_security.c
....c
+++ b/libswfdec/swfdec_flash_security.c
@@ -37,15 +37,8 @@ swfdec_flash_security_allow (SwfdecSecurity *guard, SwfdecSecurity *key)
} else if (SWFDEC_IS_SECURITY_ALLOW (key)) {
return g_object_ref (guard);
} else if (SWFDEC_IS_FLASH_SECURITY (key)) {
- SwfdecFlashSecurity *fguard, *fkey, *ret;
- fguard = SWFDEC_FLASH_SECURITY (guard);
- fkey = SWFDEC_FLASH_SECURITY (key);
-
- SWFDEC_FIXME ("merging flash securities - this should create the right type");
- ret = g_object_new (SWFDEC_TYPE_FLASH_SECURITY, NULL);
- ret->allow_local = fguard->allow_local...
2011 Apr 16
20
[PATCH 00/20] Switch to ELF modules
From: Matt Fleming <matt.fleming at linux.intel.com>
This series fixes some bugs and switches the elflink branch to be
entirely ELF modules. It applies on top of,
http://syslinux.zytor.com/archives/2011-April/016369.html
The deletions in the diff stat below are mainly from deleting
com32/elflink/modules (finally!). Now there should be no duplicate
code because we don't need COM32 and
2008 Mar 19
6
Hardphone SIP phone costs
I'm trying to understand something that just doesn't seem to compute.
How can companies like Cisco justify selling their hard phones for as
much as they do? I know there is a matter of recouping R&D costs but
when you look at the iPhone with all its amazing features for less than
$500.00 it just doesn't make sense. Am I the only one that thinks this?
Roy Anciso
Director of
2007 Oct 17
0
28 commits - configure.ac debian/changelog debian/control debian/copyright debian/.gitignore debian/libswfdec0.dirs debian/libswfdec0.files debian/libswfdec0.shlibs debian/libswfdec-dev.dirs debian/libswfdec-dev.files debian/rules debian/swf-player.dirs
...flash_security, SWFDEC_TYPE_SECURITY)
+
+static SwfdecSecurity *
+swfdec_flash_security_allow (SwfdecSecurity *guard, SwfdecSecurity *key)
+{
+ if (SWFDEC_IS_SECURITY_ALLOW (key)) {
+ return g_object_ref (guard);
+ } else if (SWFDEC_IS_FLASH_SECURITY (key)) {
+ SwfdecFlashSecurity *fguard, *fkey, *ret;
+ fguard = SWFDEC_FLASH_SECURITY (guard);
+ fkey = SWFDEC_FLASH_SECURITY (key);
+
+ ret = g_object_new (SWFDEC_TYPE_FLASH_SECURITY, NULL);
+ ret->allow_local = fguard->allow_local && fkey->allow_local;
+ ret->allow_remote = fguard->allow_remote &&...
2006 Mar 24
8
Snom 360 problems
Anyone have a Snom they're happy with? How did you manage that? :)
I have a system of:
Asterisk 1.2.3
2 Wildcard TDM400P Rev I and E/F
1 Snom 360 + sidecar
~15 Sipura/Linsys SPA-841
~15 Grandstream 101
Everything (currently) is on the same network, not a router to be seen
between any two. Also everything, except the snom, is working sweetly.
The main problem is ECHO.. awful echo and
2008 Mar 08
9
Validation error handling on related models
I have 2 models, entity and client. Entity has_one client and client
belongs_to entity.
Entity has attributes name and legal_name. Entity also has an unique
index on (lower(name)). The pKey for both is the conventional Rails id.
Client has a fKey constraint on entity_id and is indexed in entity_id.
In controllers/clients_controller.rb I have:
# GET /clients/new
# GET /clients/new.xml
def new
@client = Client.new
@entity = Entity.new
respond_to do |format|
# new.html.erb
format.html { render :template => &...
2007 Feb 26
24
Ruby/rails port of Cocoon/hibernate
Hi,
I''m currently running an apache/jboss cocoon/flow/hibernate/ajax
paypal (directpayment) project and am looking into the possibility of
porting it across to ruby/rails. For that reason I would like to know
the following:
1. Can I call my java classes or would I be looking at a complete
rewrite in ruby?
2. How effective is ruby in terms of seperation of concerns regarding
design from