Posts

ruby - Can't install rails on my Mac -

ruby - Can't install rails on my Mac - i trying install rails on mac version 10.9.5 , not working when seek see version of rails have installed following: /system/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:213: warning: insecure world writable dir /usr/local in path, mode 040777 rails not installed on system. latest version, type: $ sudo gem install rails can rerun "rails" command. if seek run command, getting... sudo gem install rails password: dyld: library not loaded: /usr/local/lib/libgmp.10.dylib referenced from: /users/ppmartins/.rvm/rubies/ruby-2.1.3/bin/ruby reason: image not found any thought what's happening , how solve issue? thank all. it best never utilize scheme ruby install gems. scheme ruby version of ruby ships mac. osx uses ruby various tasks, best leave lone , not risk corrupting gems. instead, should utilize ruby version managers install versions of ruby sc...

c# - refresh panel content when modal child is shown -

c# - refresh panel content when modal child is shown - i have main form panel drawn 3d scene. ok. after create modal form go modify things in 3d scene, , wish see result straight without closing modal form, until close form, no changes in '3d' panel. i tried this: my3dpanel.invalidate(); with nil changes; my3dpanel.refresh(); with panel take 'background' init color until close modal form. how can this? to refresh created static class this: public static class editorhelper { public delegate void refreshbridgeeventhandler(); public static event refreshbridgeeventhandler refreshbridgeevent; public static void needtonotifyparent() { if (refreshbridgeevent != null) { refreshbridgeevent(); } } } and main window: public frmmain() { initializecomponent(); editorhelper.refreshbridgeevent += editorhelper_refreshbridgeevent; } void editorhelper_refreshbridgeev...

c# - Access camera preview-stream on Windows Phone 8.1 -

c# - Access camera preview-stream on Windows Phone 8.1 - i'm trying create basic photographic camera application (for first application targeted towards wp). , want to, of course, preview photographic camera info screen before taking shot. but samples see online msdn etc old (many objects have been removed, ie libraries beingness updated making articles obsolete) i'm having problem getting started preview-stream. appreciated if knowledge give me help in matter. thank you. i suggest using captureelement control on xaml add together this: <captureelement x:name="capture" stretch="uniformtofill" flowdirection="lefttoright" /> i don't know if want utilize front end or webcam i'll show code both. in codebehind (or viewmodel if using mvvm) add together code: // first need find webcams deviceinformationcollection webcamlist = await deviceinformation.findallasync(devicecl...

Workbook with Ribbon keeps crashing Excel -

Workbook with Ribbon keeps crashing Excel - i have big workbook complex vba project. the workbook has custom-ribbon... there quite alot happening in workbook_open event too, unprotecting , reprotecting (userinterfaceonly), hiding , showing various sheets, storing reference ribbon etc. when macros not automatically enabled, workbook opens, enable button appears , when click happens should. the problem arises when file trusted, , macros run automatically. in these circumstances, has tendency crash application. it's though, if there pause user has click button, excel preparations, displays ribbon , workbook_open stuff, if there no enable button somehow excel's own startup stuff , displaying ribbon seems tangled workbook_open event, causing crash. this happens in 2007, 2010 , 2013 , on both windows 7 & 8(.1) i suspect ribbon, because problem isn’t total crash, instead, workbook opens, ribbon area blank. fyi code in workbook_open event looks this: enter ...

sql - MySQL table and query optimization -

sql - MySQL table and query optimization - the next table: gps_gotaxiking +-----------+---------------------+------+-----+---------+----------------+ | field | type | null | key | default | | +-----------+---------------------+------+-----+---------+----------------+ | recordid | bigint(20) unsigned | no | pri | null | auto_increment | | carno | varchar(10) | no | mul | null | | | valid | varchar(48) | no | | null | | | lon | varchar(13) | no | | null | | | lat | varchar(13) | no | | null | | | angle | varchar(10) | no | | null | | | speed | varchar(10) | no | | null | | | carstatus | varchar(10) | no | | null | | | time | datetime | no | | null | | +----------...

user interface - JavaFX tab pane not showing up -

user interface - JavaFX tab pane not showing up - i'm trying create simple ui using fxml application app send text file application used there. goal first tab in tab pane allow user input own grouping names , add together them list of grouping names they've entered. i'm hoping have user type grouping name textfield, , click add together button, move grouping name textarea goes new line. think i've gotten action handler right can't test because when run programme nil shows up! help appreciated. the java code: package pipeline.ui; import javafx.application.application; import javafx.fxml.fxmlloader; import javafx.scene.parent; import javafx.scene.scene; import javafx.stage.stage; /** * * @author pat */ public class pipelineui extends application { @override public void start(stage stage) throws exception { parent root = fxmlloader.load(getclass().getresource("pipelineui.fxml")); scene scene = new scene(roo...

c++ - Benchmarking linefeed characters vs std::endl -

c++ - Benchmarking linefeed characters vs std::endl - i'm reading “\n” or '\n' or std::endl std::cout? . despite consensus doesn't matter choose, decided build contrived test measure programme execution speed of each. here simple program: #include <iostream> int main() { (std::size_t = 0; < iters; ++i) { #ifdef ver1 std::cout << "\n"; #endif #ifdef ver2 std::cout << '\n'; #endif #ifdef ver3 std::cout << std::endl; #endif } } using 1 billion iterations , -o3 , redirecting output /dev/null/ , these results: class="lang-none prettyprint-override"> "\n" 0:30.96 '\n' 0:31.66 with -o2 : class="lang-none prettyprint-override"> "\n" 0:32.96 '\n' 0:31.54 why higher optimization level create '\n' slower? with setup, you're measuring test run happened interrupted lo...