Posts

data modeling - Represent a many to many relationship in sqlite -

i want represent many many relationship in relational model , i'm having doubts. create table tipodeseguro ( tiposeguro text not null, tipodeseguroid integer not null primary key ) ; create table cobertura ( nome text not null, coberturaid integer not null primary key ) ; these tables want join using many many relationship. create table jointipodesegurotocobertura ( coberturaid integer, tipodeseguroid integer ) ; this junction table. both of these tuples primary keys? should both reference main class? best regards they should foreign keys , not null if needed. create table jointipodesegurotocobertura ( coberturaid integer not null, tipodeseguroid integer not null, foreign key(coberturaid) references cobertura(coberturaid), foreign key(tipodeseguroid) references tipodeseguro(tipodeseguroid) );

ruby on rails - Simple form text input fields as part of an array -

so have 3 text input fields , each 1 represents co-ordinate , stored in array format [x, y, z] in model. i trying use input fields work produce array submitted form. code currently: =f.input_field :coordinates[0], value: "1" =f.input_field :coordinates[1], value: "2" =f.input_field :coordinates[2], value: "3" so hoping can use coordinates param in controller save database. issue setup html produced <input value="1" name="shape[o]" id="shape_o"> when should <input value="1" name="shape[coordinates][]" id="shape_coordinates_0"> n.b. have serialize :coordinates in model try set custom attributes directly this: = f.input_field :coordinates, input_html: { value: 1, id: "shape_coordinates_0", name: "shape[coordinates][]" } but suggest create attr_readers ...

svn - What file formats does Subversion Edge ViewVC support -

i've been looking around, , either don't understand answer given or i'm not asking right question. figure i'll open up. know viewvc plugin subversion edge. made email program hooks post-commit. @ first attached href @ end of each file added, modified, , deleted. of files don't work. if click on added , deleted says viewvc error. if click on file not supported viewvc diff error. plan this..easier show c# code. private string getlistelementbasedontype(string thetype, string element, int rev) { switch (thetype) { case "added": return string.format(""); //todo case "deleted": return ""; //todo case "modified": return string.format("<a href=\"{0}/viewvc/{1}/{2}?r1={3}&r2={4}&pathrev={3}&diff_format=h\">\t[view diff]</a>", repourl, this.reponame, element, rev, rev - ...

jquery - Wait Until Infinite Scroll Finishes Loading - Javascript -

i'm working "infinite scroll" page calls 40 elements @ time when user scrolls bottom of page. how detect moment @ content of recent set has been loaded? this works initial page load: $(window).load(function() { // }); is there similar when there's "load" long after page has been done loading? sorry if repeat of question. unable find solution anywhere else. after more digging around, i've used variation of question/answer . my end result looks this: function ($container, previouscount, callback) { var _imgs = $container.find('img'), _newimages = _imgs.slice(previouscount), // 'start index' new images imgcount = _newimages.length, // count how many new ones exist counter = 0; _imgs.on('load', function() { // count loaded runcallback(20, callback); }).on('error', function() { // count errors, anyway, reach total runcallback(20, callback); })...

unix - subversion permissions on files in .svn -

i setting shared working copy web development. of users not unix/command line capable connecting working copy on webserver via samba , using tortoisesvn. have set default umask on bash , samba give read/write access user , group. i've made users default group "webteam" belong to. means file create writable them , other member of team. we using svn version 1.6 (as default on rhel). umask , group ownership stuff works fine, when run checkout: # svn co svn://scythia/www . if go directory files, first check permissions of .svn dir: drwxrwxr-x 6 geofa webteam 4096 jul 3 09:28 .svn that want. same goes sub directories. files wrong permissions: [geofa@scythia dac_property]$ ll .svn total 20 -r--r--r-- 1 geofa webteam 838 jul 3 09:28 entries drwxrwxr-x 2 geofa webteam 4096 jul 3 09:28 prop-base drwxrwxr-x 2 geofa webteam 4096 jul 3 09:28 props drwxrwxr-x 2 geofa webteam 4096 jul 3 09:28 text-base drwxrwxr-x 5 geofa webteam 4096 jul 3 09:28 tmp al...

vaadin7 - vaadin TwinColSelect not side by side -

Image
for reason twincolselect not side side. see below: has seen before? have tried putting horizontallayout, etc. edit: here better example: it in formlayout, inside panel, if helps. matches examples have seen online. edit 2: overall structure ( mimics dashboard demo app!!! ): mainview - horizontallayout menu component content component ( verticalsplitpanel ) header - horizontallayout content, things go ( csslayout ) usersview ( verticallayout ) user header ( horizontallayout ) user list ( table ) userform ( panel ) form ( formlayout ) various data entry fields ( textfield, combobox, etc ) notifications selection ( twincolselect ) save button ( button ) edit 3: stated in comments, captions positioned. elements broken ui elements allow user interaction, arrow buttons , right selection box. ...

mc - How to open context menu in mcedit under ubuntu 16.04? -

can't open context menu mouse right click. worked fine in ubuntu 14.04. there way fix it? the solution easy holding shift key during right click. well, never required before 16.04.