Posts

Showing posts from June, 2014

c++11 - boost::shared_ptr<std::vector<something>> usage of operator[] -

Image
i have struct looks this. typedef struct supercellboxstruct { float_tt cmx,cmy,cmz; /* fractional center of mass coordinates */ float_tt ax,by,cz; boost::shared_ptr<std::vector<atom>> atoms; /* contains atoms within super cell */ } supercellbox; now when want access atoms[i] error: invalid use of ‘boost::detail::sp_array_access >::type {aka void}’ what proper way of passing around shared vector in application, or correct way access operator[]? prefer unique_ptr<t[]> if can, because operator[] free (§ 20.7.1.3.3): quick demo: live on coliru #include <memory> #include <iostream> int main() { std::unique_ptr<int[]> p(new int[3] { 1,2,3 }); std::cout << "before: " << p[0] << ", " << p[1] << ", " << p[2] << ";\n"; p[1] = 42; std::cout << "after: " << p[0] << ", " <

java - How to convert URL field using Dozer bean Mapper? -

i have following classes , when used dozer bean mapper convert productentity product , , vice versa: public class productentity(){ private string name; private string description; private url site; } public class product(){ private string name; private string description; private url site; } i following error: internal error [java.lang.nosuchmethodexception: java.net.url.<init>() is dozer incompatible url class, or doing wrong? it's been while since i've done dozer, reason you're seeing due way dozer maps objects. it's looking create new object merely invoking no-arg constructor, , since url doesn't have one, why you're getting exception. the way around create identity conversion : map 1 instance of entity exact same type of entity. the way in 2 parts: first, declare custom configuration in dozer.xml file. <configuration> <custom-converters> <converter type

URL Rewriting - Multi-Domain - Remove Folder In Path on Primary Domain -

this challenge related url rewriting in using both primary domain fictitious folder , many secondary domains (without fictitious folder) needed. idea site have default domain can use, allow users use own domain. both need extensions removed @ end. i’ll outline how should work. have working except 1 thing , i’m hoping can assist or shed light. vs 2012 application uses iis. primary domain urls www.primarydomain.com/anyfictitiousname/page1 www.primarydomain.com/anyfictitiousname2/page2 www.primarydomain.com/anyfictitiousname3/somepath/page3 rewritten primary domain urls www.primarydomain.com/page1.aspx (or better yet www.primarydomain.com/page1.aspx?i=anyfictitiousname) www.primarydomain.com/page2.aspx (or better yet www.primarydomain.com/page2.aspx?i=anyfictitiousname2) www.primarydomain.com/somepath/page3.aspx (or better yet www.primarydomain.com/somepath/page3.aspx?i=anyfictitiousname3) secondary domain urls www.secondarydomain1.com/page1 www.secondarydomain2.com/pa

linux - Permission denied when generating a rails controllers -

i'm using vps ubuntu trying rails generate controller keep getting weird permissions error listed below, , when try use "sudo rails generate" says command can't found, ideas? /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:252:in `mkdir': permission denied @ dir_s_mkdir - /run/user/0/spring (errno::eacces) /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:252:in `fu_mkdir' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:226:in `block (2 levels) in mkdir_p' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:224:in `reverse_each' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:224:in `block in mkdir_p' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:210:in `each' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:210:in `mkdir_p' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.

css3 - Couldn't understand CSS selectors meaning in the juizy slideshow stylesheet code -

i'm trying add juizy slideshow site page need understand how it's made in order synchronize animations (slidings) own customs animations want add page well. in addition brief technical explanations in first link, here there more details (but in french , downladable code * 1 different of discussed 1 author made improvements on downloadable version). <body> <span id="sl_play" class="sl_command">&nbsp;</span> <span id="sl_pause" class="sl_command">&nbsp;</span> <span id="sl_i1" class="sl_command sl_i">&nbsp;</span> <span id="sl_i2" class="sl_command sl_i">&nbsp;</span> <span id="sl_i3" class="sl_command sl_i">&nbsp;</span> <span id="sl_i4" class="sl_command sl_i">&nbsp;</span> <section id="slideshow">

xmlschemaset - XMLSchema 0.8.0 Error in R 3.2.0 on Windows -

i'm trying install development version ( v. 0.8.0 ) of xmlschema in r 3.2.0 on windows 64-bit computer. unfortunately, release version ( v. 0.7.0 ) doesn't work database trying access. however, when try install 0.8.0 source, following error: > install.packages("xmlschema", type="source", repos = null) installing package ‘c:/users/will/documents/r/win-library/3.2’ (as ‘lib’ unspecified) * installing *source* package 'xmlschema' ... ** r ** inst ** preparing package lazy loading ** *** installing indices ** building package indices ** testing if installed package can loaded error in .mergemethodstable(generic, mtable, tt, attach) : trying slot "defined" object of basic class ("list") no slots error: loading failed execution halted error: loading failed * removing 'c:/users/will/documents/r/win-library/3.2/xmlschema' warning in install.packages : running command '"c:/progra~1/r/r-32~1.0/bin/x64/r"

Access Control on sub report on form -

i'm trying reference control on sub-report located on form. i've done before using subforms on form subreport version giving me error: [forms]![formname]![subreportname].[form]![controlname] it returns #error. when there data in control. ideas? all of below throw exception: [reports]![formname]![subreportname].[form]![controlname] [forms]![formname]![subreportname].[report]![controlname] [reports]![formname]![subreportname].[report]![controlname] a subreport located in report, not in form. thus: [reports]![reportname]![subreportname].report![controlname]

javascript - jQuery slidedown menu trigger makes menu slideup too quickly -

i have following html: <div class="col-sm-12" id='dropdown_menu_group'> <div id='dropdown_library_menu'> <div class="row" id='dropdown_menu_row'> <div class="col-sm-2"> <a class='button-text btn' id='library_button' href="{{pathfor 'library'}}">my library</a> </div> <div class='col-sm-2 col-sm-pull-1' id='google_drive_text'> google drive </div> <div class="col-sm-2" id='settings_button'></div> </div> </div> <div id='dropdown_library_menu_border'></div> </div> my id='dropdown_library_menu' hidden default, , div below <div id='dropdown_library_menu_border'></

java - Android ListView Adapter error calling notifyDataSetChanged, Android bug? -

Image
in app i've been working on, have custom class devicelistadapter extending baseadapter gets passed listview . in devicelistadapter class, keep own arraylist<device> use generate list's views view getview(... ) . whenever app causes change in data, use custom methods in devicelistadapter update arraylist<device> reflect changes. i've used debugger , many print statements check data changed how expect to, adding , removing device objects specified. however, after each change data call notifydatasetchanged() , on ui none of elements updated. in debugger, found after calling notifydatasetchanged() , getview(... ) method not being called, explains why listview wasn't being redrawn. figure out why, used debugger's "step into" function trace program execution went android framework since have sdk sources downloaded. found interesting. path of execution went this: devicelistadapter.notifydatasetchanged() baseadapter.notifydataset

ios - How to swipe through views in a containerView -

Image
so new using container views , have taken tutorials on how put them view controllers , connect them uiviewcontroller want contain in storyboard. i have app building view controller in embed navigation controller. have 2 buttons right under nav bar show 2 different table views. i want able either press button slide table views in/out or swipe left/right change between them. my question how can bring in new container view, cant drag onto storyboard without being placed existing view controller , since have 1 cant place in there. am going wrong way. there better solution without using container views? here process im looking images: sounds want here putting 2 different table views inside page view controller inside navigation controller. as problems dragging onto storyboard, it's easier put things want in nested layout dragging them outline hierarchy on left, if don't see revealed "show document outline" button in lower left corner.

c# - How to localize text in WPF XAML without embedding the resource file -

i trying localize wpf application support different languages using resource files. have set build action resource files "resource". managed localize strings .cs file using resgen, resourcemanager , getstring() method not able using binding xaml file. tried resx extension , static resources in xaml file none of them seem work. not want build action resource files embedded resources has compiled again. please suggest me how localize text xaml build action set "resource" resource files or me other approach resources not embedded application. in advance!! <window x:class="myapplication.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="mainwindow" height="350" width="525"> <grid> <button name="btn1" height="50" width="150" content="

php - Including post attachments (child posts?) in a single get_posts() call -

in wordpress template, i'm doing quick get_posts() call. i'd result 1 array of posts, where each post object in array contains array of post's attachments , (right need featured image, later may need more images). the reason: won't looping through result set in traditional template 'the_post_thumbnail()' - i'm setting quick ajax call, need 1 array data send client. can't find in docs or online. i've got working solution, feels inefficient , i'm sure theres better way... herse i'm doing now: $ps = get_posts($args); // add post thumbnail post object foreach ( $ps $post ) : setup_postdata( $post ); $post->img = wp_get_attachment_url( get_post_thumbnail_id($post->id) ); endforeach; // output updated array json header('content-type: application/json'); echo json_encode($ps); die(); so again, want 1 get_posts() call returns post array, attachment ids included in each post object. possible? thanks!

javascript - $injector unable to resolve required dependency -

i'm trying habit of structuring angular projects following lift protocol (locate, identify, flat, try(dry)) i'm having difficulty resolving dependencies other files. i have following factory: (function () { 'use strict'; angular .module('cbpwidget', []) .factory('apimanufacturers', apimanufacturers); function apimanufacturers () { function hello () { return 'hello'; } return { hello: hello }; } })(); and following controller: (function () { 'use strict'; angular .module('cbpwidget', []) .controller('steponecontroller', steponecontroller); steponecontroller.$inject = ['$scope', 'apimanufacturers']; function steponecontroller ($scope, apimanufacturers) { $scope.step = 'step1'; console.log(apimanufacturers.hello); } })(); and following

ios - UIView.transitionWithView not animating -

i'm trying animate change of image in uiimageview using transitionwithview . image changes, doesn't seem animating. not sure why happening. here's code: func changebackgroundatindex(index : int) { switch index { case 0: animatechangewithimage(mlstylekit.imageofaboutme) case 1: animatechangewithimage(mlstylekit.imageofprojects) case 2: animatechangewithimage(mlstylekit.imageofskills) case 3: animatechangewithimage(mlstylekit.imageofeducation) case 4: animatechangewithimage(mlstylekit.imageofthefuture) default: animatechangewithimage(mlstylekit.imageofaboutme) } } func animatechangewithimage(image : uiimage) { uiview.transitionwithview(backgroundimageview, duration: 0.4, options: uiviewanimationoptions.transitioncrossdissolve, animations: { () -> void in self.backgroundimageview.image = image },

Lisp loading error: undefined character in dispatch macro -

i decided birthday time try , fix lisp problems. i've received lisp program run experiment. works on os x environment. however, can't run on either windows 7 or ubuntu. program uses act-r 6.2 run model. when try load .lisp file receive following error: :reader error on #<basic-file-character-input-stream ("*path*"/28 utf-8)#xcfad1ae, near position 1048, within "smile* (#initwithco": undefined character #\/ in #\# dispatch macro. while executing: ccl:signal-reader-error, in process listener(1) the error exact same windows 7 , ubuntu. here console output if required: http://i.stack.imgur.com/dfxvm.png it seems load-turing-application.lisp loads multiple other files, 1 of turing-application-v1.lisp, in line (setf *smile* (#/initwithcontentsoffile: (#/alloc ns:ns-image)(ccl::%make-nsstring "smiley.jpg"))) seems culprit. suspect has #/-notation. any ideas appreciated. this answered in comments, #/ ccl syntax available on os

php - CodeIgniter Shopping Cart Class: How to retrieve independent values on an array? -

so have controller using codeigniter's shopping cart class on e-commerce website. it's working fine. loads class, adds products cart, goes checkout , completes transaction. need retrieve information (such product name, id, price) when user @ checkout send mixpanel (which analytics tool). i've added checkout controller code: // sends subscription information mixpanel $this->mixpanel_wrapper->people_set($aluno[0]->aluno_id, array( '$first_name' => $student[0]->student_first_name, '$last_name' => $student[0]->student_last_name, '$email' => $student[0]->student_email, )); $this->mixpanel_wrapper->identify($student[0]->student_id); $this->mixpanel_wrapper->track_something('added cart', array ($this->cart->contents())); // ends mixpanel it works. in dashboard see specific user activated event "added cart". in properties of

sql server - A table has two columns - how we can get the full_name into one column? -

i following sample data in sql table:- first_name last_name concatenation(f_name,l_name) ------------------------------------------------------------- mohd nazir mohd,nazir i want see result full_name = mohd nazir within same table how about alter table dbo.yourtablenamehere add fullname isnull(first_name, '') + ' ' + isnull(last_name, '') with computed column, have new column in table that'll contain concatenation of first , last name, separated space

r - How to rename group values into ordered values without reordering total data frame? -

in large datafile need rename grouping variables ordered number. there easy way that? this example of want do: group value 1 3 1 2 3 2 3 3 3 4 1 4 5 1 5 6 1 6 7 2 7 8 2 8 9 2 9 this data frame want change (by renaming group variable): group value 1 1 1 2 1 2 3 1 3 4 2 4 5 2 5 6 2 6 7 3 7 8 3 8 9 3 9 so, want rename group value ordered numbers, without reordering total data frame. has have idea how this? many in advance! you can try factor df1$group <- as.numeric(factor(df1$group, levels=unique(df1$group)))

parse.com - Android How to implement AsyncTask in my custom Listview -

when ran code log skipped 303 frames! application may doing work on main thread. how implement asynctask in code below, , how show progressbar, while fetching data 1 of parse.com's database. appreciate help. here activity's code: @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_doctors_name_list); bundle extras = getintent().getextras(); final string key = extras.getstring("key"); listview lvdoctorsname = (listview) findviewbyid(r.id.lvdoctorsname); parsequeryadapter.queryfactory<parseobject> factory = new parsequeryadapter.queryfactory<parseobject>() { public parsequery create() { parsequery query = new parsequery("doctors"); query.wherecontains("name", key); return query; } }; customlayout urgentadapter = new customlayout(this, factory); lvdoctorsname.s

Out of memory! in Perl program -

sub fetch_ms_table { $ms_initial_cnt = 0; $logger->info("begin fetching taccttree_ms"); $sql = "select $pk_string,link_c,length_q,paths_q taccttree_ms tree1 out_z>\"$process_time\""; &execsql($dbp, $sql); $cnt = 0; $cnt1 = 0; #load milestone table data while (@data = $dbp->dbnextrow()) { $data[0] =~ s/\s+//g; $taccttree_ms_cache{ $data[0] }{status} = "d"; #default record deleted. $taccttree_ms_cache{ $data[0] }{pk} = $data[0]; $taccttree_ms_cache{ $data[0] }{link_c} = $data[1]; $taccttree_ms_cache{ $data[0] }{length_q} = $data[2]; $taccttree_ms_cache{ $data[0] }{paths_q} = $data[3]; $ms_initial_cnt++; } $logger->info("end fetching taccttree_ms - fetched $ms_initial_cnt rows"); } the above function fails giving below log, info> main::fetch_ms_table begin fetching taccttree_ms failed 'milestone taccttree table' std err out of memory!

cocoa - Is it OK to have Many to Many relationships in Core Data? -

say have model employee can have many bosses (life tough) , boss can have many employees . i have many many relationship goes both ways. acceptable in core data? against 5 normal forms of database design? in nutshel, may go ahead , create relationship or cause me trouble in future? apple address issue in core data programming guide , under heading many many relationships . having introduced topic, guide reassures nervous users following: if have background in database management , [many-to-many relationships] causes concern, don't worry: if use sqlite store, core data automatically creates intermediate join table you. in other words, allowing many-to-many relationships core data isn't doing violates established database logic, it's handling logic you.

android - Repack existing boot.img using mkbootimg (cyanogenmod 12.1, lollipop) -

this cross-post xda-developers , here knows solution. have trouble re-packing existing boot.img cyanogenmod 12.1 (lollipop 5.1) d2spr (sprint s3). resulting image not boot. built mkbootimg/unpackbootimg source found here: https://github.com/osm0sis/mkbootimg . following: $ mkdir boot2 $ ../unpackbootimg -i boot.img -o boot2 board_kernel_cmdline androidboot.hardware=qcom user_debug=31 zcache androidboot.bootdevice=msm_sdcc.1 board_kernel_base 80200000 board_name board_page_size 2048 board_kernel_offset 00008000 board_ramdisk_offset 01500000 board_tags_offset 00000100 this unpacks boot.img into: $ ls -l boot2 total 7360 -rw-rw---- 1 galets galets 9 apr 22 08:59 boot.img-base -rw-rw---- 1 galets galets 1 apr 22 08:59 boot.img-board -rw-rw---- 1 galets galets 81 apr 22 08:59 boot.img-cmdline -rw-rw---- 1 galets galets 9 apr 22 08:59 boot.img-kerneloff -rw-rw---- 1 galets galets 5 apr 22 08:59 boot.img-pagesize -rw-rw---- 1 galets galets 663238 apr

How to set variable from git command output using windows cmd/batch -

i have trouble "forwarding" output variable. i'm using atlassian sourcetree git versioning. there want create custom action, can create zip file of modified files of 1 commit. created file should have formatted date of commit time in filename update-<yyyymmdd>t<hhmm>.zip . my working batch-file far (line numbers later reference) : 1: setlocal enabledelayedexpansion 2: set output= 3: /f "delims=" %%a in ('git diff-tree --no-commit-id --name-only -r %1^^') ( set output=!output! "%%a" ) 4: set hours= 5: git show -s --format=%%ci %1 > tmptmptmp & set /p hours= < tmptmptmp & del tmptmptmp 6: set hours=%hours:~0,4%%hours:~5,2%%hours:~8,2%t%hours:~11,2%%hours:~14,2% 7: git archive -o update-%hours%.zip head %output% 8: endlocal i'm having trouble rewrite line 5 (hours-line) avoid creating temporary file. if same in line 3 (output-line) like: for /f "delims=" %%a in ('git show -s --format=

excel - How do I populate a combobox with the name(s) of a worksheet as the result of a date selection? -

i have 2 comboboxes. 1st combobox (cboreviewdate) holds dates. 2nd combobox (cboreviewmodule) populated names of worksheets in active workbook (if contain date in column "x" matches date selected in cboreviewdate). i need setting logic , choosing correct search tool. logic flow work? loop routine erase existing entry in cboreviewmodule? this learning process me, develop code myself. please point me in right direction. here pseudocode: 'run on "cboreviewdate"_change state 'countif (date in column "x" = "cboreviewdate.value") in worksheet 1 of active workbook 'if result <> 0 pass name of worksheet variable "a" '.additem "cboreviewmodule" using value of variable "a" 'reset value of variable "a" , loop until worksheets in active workbook have been searched okay, here's me pointing in right/possible/some? direction. the first combobox should trigger change

postgresql - Can't use an IF ... THEN ... ELSE inside my CASE statment SQL state: 42601 -

i building insert query on fly. here collecting column names. columns need scrambled, , need decrypted, scrambled , encrypted. my idea check if column name in provided array, , if is, check see if value start 'pi2'. if so, apply necessary transformation decrypt, translate, encrypt. else translate value. here query: select case when column_name = any(array['a', 'pi2_b', 'pi2_c', 'd', 'e']) ( if (substring(column_name 0 4) = 'pi2') 'my_function.my_encrypt(translate(my_function.my_decrypt('||column_name ||'), '''|| var_scramble_key1 ||''','''|| var_scramble_key2 ||'''))'; else 'translate('||column_name||','''|| var_scramble_key1 ||''','''|| var_scramble_key2 ||''')'; end if; ) else column_name end information_schema.columns table_schema = 'my_temp' , t

javascript - jquery '[target]' mean anything special? -

i'm looking @ snippet of jquery code , wondered what, if anything, special [target] means in brackets below: try { $.each($('a:not([target])'), function(index, value) { resettoparent($(value)); }); } catch (e) { } that try block defined in 375 line(!) function , not part of click or other handler, otherwise use of target make more sense. it's being called 100 or lines down function part of normal flow. that selector telling jquery find <a> tags don't have target attribute. so match: <a href="someurl.com">a link</a> but not: <a href="someurl.com" target="_blank">a link</a>

paypal - Is there a way to limit the live api credentials to read-only? -

i asking myself, how damage can cause, if gets api credentials in hands. based on worry, asking question here. when speak "api credentials", speak ones, explained in tutorial .

java - PrettyFaces does not work with Struts 2 -

i want make urls nicer seo. i configured filter , works following e.g.: <url-mapping> <pattern value="/index" /> <view-id value="/index.html" /> </url-mapping> but when set view-id struts url not work. e.g.: <url-mapping> <pattern value="/index" /> <view-id value="/application/punchit.do" /> </url-mapping> it can not find (or can not execute) struts actions. is there solution configure prettyfaces struts 2 framework? i'm using pretty-faces 3.3.3. here config of pretty-config.xml: <?xml version="1.0" encoding="utf-8"?> <pretty-config xmlns="http://ocpsoft.org/prettyfaces/3.3.3" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://ocpsoft.org/prettyfaces/ http://ocpsoft.org/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.3.xsd">

css - How to change the colour of the text of an active button using SASS in Ionic? -

i using sass method style ionic app. on can achieve modifying variables stored in sass/_variables.sass. for specific button, i want change color of text when active (when clicked on) . however, default setup, possible change background color of button when clicked on in ionic setup. instance, find: $button-light-bg: $light !default; $button-light-text: #fff !default; $button-light-border: rgba(255,255,255, 0) !default; $button-light-active-bg: $light !default; $button-light-active-border: $light !default; how add additional variable in ionic change text color black? instance: $button-light-active-text: #000 !default; // not work now, button needs used somewhere? in ionic library can modify this? you add button.scss file , link file in ionic.app.scss file @import "pathto/button.scss" now in button.scss write: .button.button-light.active, .button.button-light.activated { color : #000 }

sql server - SSRS filteration on the basis of length of content in the cell -

how can filter report on basis of number of characters in cell. e.g have column name , want show names in report length of name less or equal 6. tried expression= name, operator=<=, , value=lenth(name) not working. please help. you should use length (len) function character length of field. expression like: =len(fields!yourfield.value) operator: <= value: 6 if length of field less or equal 6, text in field displayed, otherwise data not displayed.

Inserting integer array with postgresql in C (libpq) -

i'm trying post integer array postgresql database. i'm aware format string , send string 1 sql command. however, believe pqexecparams function should bring help. however, i'm kind of lost how use it. //we need convert number network byte order int val1 = 131; int val2 = 2342; int val3[5] = { 0, 7, 15, 31, 63 }; //set values use const char *values[3] = { (char *) &val1, (char *) &val2, (char *) val3 }; //calculate lengths of each of values int lengths[3] = { sizeof(val1), sizeof(val2), sizeof(val3) * 5 }; //state parameters binary int binary[3] = { 1, 1, 1 }; pgresult *res = pqexecparams(conn, "insert family values($1::int4, $2::int4, $3::integer[])", 3, //number of parameters null, //ignore oid field values, //values substitute $1 , $2 lengths, //the lengths, in bytes, of each of parameter values binary, //whether values binary or not 0); //we wan

sharepoint - OOTB Approval Workflow -

i wondering how set workflow in sharepoint 2010 users can choose approvers in ootb approval workflow within infopath form without using sharepoint designer. for example: first level approval manager 1 manager 2 manager 3 manager 4 manager 5 second level approval director 1 director 2 director 3 each director has 5 managers working them , user needs able select manager , director them able in infopath on form when submit request routed appropriate approval. know if set different workflow each 1 work lot of work doesn't need done. any great. thanks solutions:- 1.create new infopath form have 3 field user, manager , director. set value user current logged in user. fetch value using /_vti_bin/userprofileservice.asmx user profile( if user profile exists) automatically populate data against user. submit data list , run workflow when item created or modified.. check whether values exists or not. create new infopath , set user value current logge

c# - 3D Graphics - Matrix math is not working -

i'm new 3d graphics, expect have done fundamentally wrong. have built 4 matrixes handle objects in 3d space, scaling matrix, translation matrix, perspective matrix , rotation matrix. the rotation , scaling matrix work fine, perspective , translation matrixes not behave expected, understand translation , perspective matrixes like: translation perspective [1, 0, 0, x] [1, 0, 0 , 0] [0, 1, 0, y] [0, 1, 0 , 1] [0, 0, 1, z] [0, 0, 1 , 0] [0, 0, 0, 1] [0, 0, 1/d, 1] to understand how works behind scenes writing own math lib - create matrixes defined above have following methods: public static asmatrix4 createperspectivematrix(double focallength) { // create matrix identity matrix var m = new asmatrix4(); // set perspective matrix m.matrix[3].points[2] = 1 / focallength; m.matrix[1].points[3] = 1; return m; } public static asmatrix4 createtranslationmatrix(double x, double y, double z) { // reset identity matrix var m =

VS 2015 intern Android Emulator not starting vmWare -

my comment got deleted vs 2015 intern android emulator not starting (vmware 10) i can confirm windows phone 8 runs inside of vmware workstation 9 instance. android emulators visual studio 2015 ctp6 not. hyper-v can run inside of vmware supports [instruction hyper-v in vmware. if processor supports intel-vt technology][1] when @ hyper-v manager when android emulator starts following error appears. init: failed tp read /dev/hw_random: no such device. . ideas how can resolve this?

ios - Container views set height depending on children -

Image
here problem. have storyboard : first container must have fixed height. related detailformviewcontroller switch. not want scrollable. the second container must have dynamic height, i.e. take available height. show uitableview. here have on iphone 6 : , on iphone 5s : . i have 3 questions : why there blank space @ top of detailformviewcontroller tableview ? how can remove , can achieve goal ? do think layout put best way achieve want (based on iphone 6 screenshot) ? thank answers. for making top container height fixed , bottom container flexible. keep 4 rows in top container, set top container height constraint value equal 4cells height(4 * cell height). you need add constraints on 2 containers follows: i have named first container top container view , 2nd container bottom container view. top container view constraints: - top space top layout guide - leading space container - trailing space container - vertical space bottom conta

Java Play FrameWork 2.3 return streamed Json using jackson -

is there way can stream json in api response? i understand how can read , write json file using jackson library example: http://www.mkyong.com/java/jackson-streaming-api-to-read-and-write-json/ but in play framework, how can stream response or in other words return in api intead of return ok(); ? have tried play's chunked responses ? in controller have action on line: public result chunkedjson() { return ok(readjsonchunks()); } and in readjsonchunks method create chunks: public static chunks<string> readjsonchunks() { chunks<string> chunks = new stringchunks() { @override public void onready(play.mvc.results.chunks.out<string> out) { jsonfactory jfactory = new jsonfactory(); try { // read file jsonparser jparser = jfactory.createjsonparser(new file("c:\\user.json")); // loop until token equal "}" while (j

java - How to add information to a sqlite database and then display the information using javafx? -

public static void addtoqueuetable(patient p) { try { // open connection database conn = connectionfactory.getconnection(); // create statement stmt = conn.createstatement(); string sql = "insert queuetime values('" + p.getnhsnumber() + "', current_timestamp)"; // execute update stmt.executeupdate(sql); } catch (exception e) { e.printstacktrace(); system.out.println("error on building data"); } { // close open resources in database dbutil.close(stmt); dbutil.close(conn); } } the above code add details (nhsnumber , current timestamp) database - wondering how display using javafx? patient class follows: public patient(string nhsnumber, string firstname, string lastname, string postcode) { super(nhsnumber,firstname, lastname , postcode); } with javafx able display