Posts

stable marriage - My method isn't putting names into my array and removing them properly -

stable marriage - My method isn't putting names into my array and removing them properly - i've been working on "stable marriage problem" class i'm in , cannot implement gale-shapely algorithm correctly. out set when prompted: for (int q = 0; q < nummen; q++ ) system.out.println(couples[q].tostring()); is "brian patricia george nancy john susan robert nancy stephen joyce" on different lines. how ever proper combination "brian patricia george joyce john susan robert nancy stephen anne. issue won't remove "nancy" george's pair. background men[][] matrix of men's preferences in format men[i][0] name of each man 0 < < 4 , men[i][k] k preferences in positions 1 < k < 5. same thing women matrix. couples[] array of object "couple" , array holds each matched pair of man , woman. here's place problem is: public static void solvemenmarriages() { int i, k; string m, w, fiance; = 0...

CSS background image wont stay put -

CSS background image wont stay put - my problem this: using 3 background images web page, 2 of them able position correctly using 'background-position' property 3rd image (lady.png) not remain want on page when browser window stretched wider. appears beingness positioned relative the border of browser. have tried utilize 'background-attachment:fixed' maintain photo in 1 place not working. what want main top , bottom graphics aligned 'top center' , image of woman 200px left , 300px downwards top. have tried 'background-position: 200px 300px' still moves frame. assistance appreciated. here code of page: http://dev.salonbuilder.com/website/150099/services.asp <td width="100%" style="background-image:url(<%=imagepath%>lady.png),url(<%=imagepath%>new-bg-top.jpg),url(<%=imagepath%>new-bg-line.jpg);background-repeat:no-repeat,no-repeat,repeat-y;background-position:80px 150px, top center,top center; backgrou...

ruby - Faster cycle detection in a Directed Acyclic Graph? -

ruby - Faster cycle detection in a Directed Acyclic Graph? - i have programme in ruby 1.9.3 constructs rubytree. info best described beingness directed acyclic graph (dag); please note not polytree. well, @ to the lowest degree info should dag, despite users' best efforts foil programme bad data. i build dag dynamically parsing xml document. xml document not explicitly specify tree structure, provide cross-references of integer ids found links between elements in document. i need ensure rubytree not contain cycles. source info may (erroneously) have cycle, , if does, programme needs aware of it, rather entering infinite loop or crashing. accomplish currently, mixed in ruby standard library's tsort module rubytree's tree::treenode class. uses tarjan's algorithm perform topological sort on graph each time node added. during topological sort, if cycle detected, exception raised -- want. for example: module tree class treenode include tsort ...

Is it possible for Gradle projects in Eclipse/STS to resolve dependencies to other Gradle projects in the same workspace? -

Is it possible for Gradle projects in Eclipse/STS to resolve dependencies to other Gradle projects in the same workspace? - a gradle project in workspace (call downstream) needs depend on gradle project (call upstream). outside of eclipse, of course of study upstream need build , install ed before downstream (so gradle can resolve it). in eclipse, since both projects in workspace together, i'd have gradle in workspace first , create dependency between projects, not repo. m2e (maven integration eclipse) (the alternative called resolve dependencies workspace). gradle eclipse plugin has alternative called remap jars maven projects seems pom-driven m2e projects, not other gradle projects. is there way gradle resolve dependencies local workspace (when they're present) instead of repo? it turns out is outstanding feature request gradle ide. has been delivered 3.6.3 release of gradle ide. you do have enable it, though: the feature has enabled in gradle prefe...

ios - Asset catalogues and multiple targets -

ios - Asset catalogues and multiple targets - before start , move towards utilize of asset catalogues (which seems alternative in xcode 6, apart manually manipulating info.plist) inquire if there way have different asset catalogues different build targets. i have multiple targets different apps using same code base. far had different folders each target icons etc. , included ones wanted. how do asset catalogues, or best way deal situation in xcode 6? you can have several "icon app" in same xcassets file (right-click + new app icon). can select "icon app" want utilize each of target. ios iphone xcode xcode6 asset-catalog

How to use a shortcut to read in the price amount without the dollar sign in C? -

How to use a shortcut to read in the price amount without the dollar sign in C? - this question similar question asked before why not getting right char values scanf(c linux vi) when scanning file? . i learned answers question can utilize scanf scanf(" %c") skip on blank spaces , white lines when reading in character. there shortcut can work money too? user types $4.22 standard in. there scanf lets skip on special characters , interpret money amount float? or have scanf character first , scanf float money amount? if know there $, can include in format, scanf("$%d.%d", &dollars, &cents). seek it! $ cat scan.c #include <stdio.h> int main() { int dollars, cents; scanf("$%d.%d", &dollars, &cents); printf("that's %d dollars , %d cents.\n", dollars, cents); homecoming 0; } $ create scan cc scan.c -o scan $ ./scan $4.22 that's 4 dollars , 22 cents. $ c

internet explorer - Is the command line used when opening a file from the browser? -

internet explorer - Is the command line used when opening a file from the browser? - when utilize net explorer (or other browser) , seek download file, can little menu asks if "open or save" file. if click "open," command line run , there way me see or capture command line prompt in vb6 application? for example, net explorer asks me if want open or save .abc file. click open. want myproject1.exe (written in vb6) read command line used open .abc file. (assuming file association exists between myproject1.exe , .abc extensions) is possible? you can read in command line arguments via command() function try next test project: '1 project with: ' 0 forms ' 1 module ' startup object in project properties should set sub main alternative explicit public sub main() dim intarg integer dim strcmd string dim strarg() string dim strshow string 'read command line strcmd = command if len(strcmd) > 0 'split c...