Posts

Showing posts from February, 2010

jquery - Syntax error with datepicker -

datepicker working selecting date not saving database. trying several options show in code below still not working. code give me error. how format f.text_field? <div class="form-group"> <label class="control-label col-sm-5" for="time_stop">job date:</label> <div class="col-sm-7"> <%= f.text_field :jobdate, :id => @appointment.jobdate, "data-provide" => 'datepicker', @appointment.jobdate, class: "form-control" %> </div> <script> $(function() { $( "#jobdate" ).datepicker(); }); </script> </div> the error message: /home/ubuntu/workspace/agss/app/views/appointments/_form.html.erb:95: syntax error, unexpected ',', expecting => ...epicker', @appointment.jobdate, class: "form-control" );@out... ... ^ the order of parame...

java - How to extract rar file (AppEngineFile) in Google App Engine -

my application requires extracting rar file in google app engine. can extract rar file using this library supports java.io.file , not support appenginefile. can not find solution solve problem. have ideas ? thanks in advance the junrar library says takes inputstream, not file. you may want try uploading rar files blobstore instead of reading filesystem. can use blobstoreinputstream read data unrar. note since can't write filesystem, you'll need store unpacked data blobstore or datastore.

timezone - Programatically configure Windows Mobile to use an NTP server -

on windows ce, ntp settings stored under [hkey_local_machine\services\timesvc] , can programmatically changed if needed. that key not seem exist on windows mobile, , not find information on how make exact same thing on platform. resources seem discussing windows ce. how programmatically tell windows mobile use ntp server? not sure if helps, on windows desktop / server, at: hkey_local_machine\system\currentcontrolset\services\w32time\parameters\ntpserver

html - Inspect hovered element in Chrome? -

i trying view, through chrome's developer tools, how tooltips structured on site. however, when hovered on item, when "inspect element", nothing shows tooltip in html. know can set style :hover , still can't see html or css of tooltip. any ideas? i found trick twitter bootstrap tooltips. if open dev tools (f12) on monitor, hover on element bring tooltip, right click if select 'inspect element'. leaving context menu open, move focus on dev tools. html tooltip should show next element tooltip in html. can @ if element. if go chrome html disappears aware of. kind of weird way worked me figured share it.

c# - Decouple Windows event loop from DirectX Rendering loop -

is there way decouple windows event loop directx rendering loop when rendering directx , sharpdx via .net? that means want rendering continues when resize window example. yes, need make separate thread windows loop events. you can use systems.threading library. remember rendering should in main thread, create thread windows events, work.

java - Android Studio Theme rendering problems -

this image problem http://imgur.com/uud3its i have tried solutions in other posts , still rendering problems themes in android studio. its quite popular issue novice. there many possibilities of failure not render ui layouts. first , foremost solution resolve going android studio's default recommendations. if still fails resolve need go manual solution. (1.) incompatible api support issue : -- ref same snapshot, there little droid icon number 23(in case). represents latest supporting api. may select lower api no current number (i.e. 22, 21, etc.) , let system render ui layout. if success may again update latest api number (i.e. 23) 2.) there possibilities of inappropriate reference related activity java file/other resources. if submit code 1 able give specific solution problem. cheers! ** update 1 : ** if require try these solutions too. -> not syntax error; means can run app. after launched app on simulator/handset; come de...

C infinite do while loop -

this simple program class prompts user length of or shower in minutes (as positive integer, re-prompting needed) , prints equivalent number of bottles of water (as integer). it assumes shower uses 1.5 gallons of water per minute (192 oz) , plastic bottle size of 16 oz my do-while loop rejects negative numbers , 0, however, if input text such "foo" when prompted length of shower in minutes, program runs infinite loop, forever running loop , printing "how long shower(in minutes)?:" any ideas how refine while condition avoid this? #include <stdio.h> int min_to_bottles(int *n); int main(void) { int minutes; int bottles; { printf("how long shower(in minutes)?:"); scanf("%i", &minutes); } while (minutes < 1); bottles = min_to_bottles(&minutes); printf("equivalent of bottles used per shower is: %i\n", bottles); } int min_to_bottles(int *n) { int bottles; ...

php - Distinct Values from MySQLi Query -

i trying show unique userids (userids (0,1,2,3,4,5,6,7,8,9 etc...) query running. tried using distinct in query, shows me unique values of rows have 2 or more of same userid. is there way can use php show unique values. weak points arrays , makes more complicated because using data mysqli query. example right have query (lets group rentpaid desc , rent total 800.00 users): userid rentpaid rentmonth 2--------800.00------april 1--------500.00------april 3--------400.00------april 3--------400.00------april 1--------200.00------april 1--------100.00------april example desired output: userid rentpaid rentmonth 2--------800.00------april 1--------500.00------april 3--------400.00------april can mysql because tried distinct , wouldn't work, how php? query: select properties.*, leases.*, users.userid, users.primaryphone, concat(users.userfirstname,' ',...

Facebook app evaluate the 'Stream post URL security' flag from another facebook app -

i have 2 facebook apps 'a' , 'b' associated domain_a , domain_b respectively; 'a' has activated 'stream post url security' flag. i need post content fanpage x using "facebook sdk 4.0 php" app 'b', problem post success disabling a's stream post url security flag; otherway facebookrequest throws exception: one or more of given urls not allowed stream post url security app setting. must match website url or canvas url, or domain must subdomain of 1 of app's domains. it makes no sense, why facebook api checks flag in app a? i have double check ids , secret keys, maybe has open session permanently facebook users in navigators? this code: facebooksession::setdefaultapplication($api_id_b,api_secret_key_b); facebooksession::enableappsecretproof(false); $session = facebooksession::newappsession($api_id_b,api_secret_key_b); try { $post_id = (new facebookrequest( $session, 'post', ...

android - Proper Replacement of Fragments -

i have 1 activity called a. activity has 1 frame layout in fragments used. have 2 fragments, fragment1 , fragment2. when activity launched, fragment 1 fills frame layout. fragment1 contains button when clicked replaces fragment2 within same frame layout. question this, when click button in fragment1 should implement code a) activity gets notified of onclick in fragment through interface using type of boolean value , proceeds replace fragment2. or b)implement code replaces fragment1 fragment2 within fragment1 example: private fragmenttransaction ft; private button registerbutton, resetbutton; private fragment fragment; public loginfragment() { // required empty public constructor } @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view view = inflater.inflate(r.layout.fragment_login, container, false); registerbutton = (button)view.findviewbyid(r.id.register_button); re...

mysql - query the number of non-unique elements in table -

Image
let num number of city entries in station, , numunique number of unique cities. query value of num−numunique station. in other words, query number of non-unique city names in station subtracting number of unique city entries in table total number of city entries in table, has structure: where lat_n northern latitude , long_w western longitude. i have query returns wrong output. select sum(count(city)) station group city having count(city)>1; b select count(*) - count(distinct uniquevalue) table; you need determine expression identifies city uniquely. name? combination of lat_n , long_w? might use (1000*lat_n + long_w), example.

Using Stargazer in R to export csv direct into Excel -

i trying stargazer r package spit out huge .csv. descriptive statistics table 43 different companies excel. i have 43 different data frames pertaining meetings @ 43 different corporation. trying create output each 1 of these data frames list mean value of variable of meetings, standard deviation of variable august, max, min, , total number. reproducible example below company 1 "j" standing july, "a" august, "s" september, , "n" november: j s n 29 2 30 2 20 3 30 10 30 10 20 30 40 20 10 21 10 30 13 14 company 2 j s n 14 5 15 19 10 10 17 10 30 14 18 11 10 20 19 9 10 10 20 4 the following code used: stargazer(company1[c("j", "a", "s", "n")], type = "text", title="descriptive statistics company 1", digits=1, out="table1.txt", covariate.labels= c("j", "a", "s", "n"))...

azure - Cannot publish / deploy a Data Factory from VS2015 -

Image
i starting create azure data factories @ company. loading data our on-premise sql databases azure sql data warehouse. however, able publish them microsoft azure web portal, , not visual studio 2015. when right-click on project in solution explorer , select publish button, asked login ms visual studio. after logging in on data factory configuration page, cannot see existing data factories nor create new ones. use existing data factory name, subscription, resource group, , region drop downs disabled (see screenshot). i owner of data factory , have not had other issues publishing or running pipelines in data factories create. sole developer on team working data factories , person set me , configured our azure services cannot find problem either. i imagine configuration issue or account. have re-installed vs2015 enterprise scratch no avail. suggestions? you need have co-admin or admin privileges on atleast 1 subscription able create or use existing data factories...

io - Java - Moving files within filesystem -

i working on school assignment , doing simple filemanager should move files suffix "jpg" (for example) folder. problem should recursively through folders. example: in folder "downloads": --downloads ----me.jpg ----smth.doc ----folder1 ------you.jpg and have move .jpg files folder "photos" , create "folder1" there , move file "you.jpg" this have seems move files "downloads folder" private void move(string suffix, string sourcepath, string destination) throws ioexception{ file dir = new file(sourcepath); file destdir = new file(destination); string src; string dst; (file f : dir.listfiles(new extensionfilter(suffix))){ string name = f.getname(); src = f.getabsolutepath(); dst = destination + "\\" + name; files.createdirectories(paths.get(destination)); files.move(paths.get(src), paths.get(dst)); logs.add("mv;" + src + ";...

ios - How do you stop CocoaPods from linking against a dependency for a framework? -

say i've developed framework contains binary uses ocmock dependencies need. when create podspec , try use it, find need have ocmock added dependency. say have following in podfile - platform :ios, '9.0' inhibit_all_warnings! target "myapptests" inherit! :search_paths pod 'ocmock', '~> 2.0.1' end however, ocmock binary code present in framework bundle, causes double inclusion errors. there way in cocoapods can prevent ocmock being added in link binary libraries build phase of pods project, preventing being linked directly?

Use Java within Javascript -

i have jsp page looks following: what intent is, current environment via system variable , generate correct url environment. <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %> <% string sysenv = ""; if(system.getproperty("env.name").equals("test")) { sysenv = "test"; } %> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"><html> <head> <%@ include file="/includes/common.jsp" %> <script type="text/javascript" src="<c:out value="${requestscope.scriptslocation}"/>/scripts/general.js"></script> <c:if test="${requestscope.isfeed == true}"> <jsp:include page="/includes/someinclude.jsp"/> ...

Change environment variables persistently with Python -

is possible using python 3.5 create , update environment variables in windows , linux persisted? at moment use this: import os os.environ["my_variable"] = "true" however seems if not "store" environment variable persistently. i'm speaking linux here, not sure windows. environment variables don't work way. part of process (which modify changing os.environ), , propagate child processes of process (and children obviously). in-memory only, , there no way "set , persist" them directly. there several configuration files allow set environment on more granular basis. these read various processes, , can system-wide, specific user, specific shell, particular type of process etc. some of them are: /etc/environment system-wide variables /etc/profile shells (and children) several other shell-specific files in /etc various dot-files in user's home directory such .profile, .bashrc, .bash_profile, .tcshrc , on. read she...

xcode - How to share model object between view controllers? -

i created basic os x application storyboard draw circles in custom view. main window contains nssplitviewcontroller containing 2 sub-views (content , side bar apple pages or numbers have). content view custom subclass of nsview drawing circles while side bar view contains standard controls. both should bound model object holds properties number of circles, diameter , on. as understand both subviews have own controllers in case. how have data model object (let's call circles ) both controllers reference can hook key-value observation redrawing custom view on changing controls' values? my idea create model object in common parent controller , pass on children, how set in interface builder in xcode 7.2? working off comment. can use representedobject property of nsviewcontroller pass object along other view controllers. 1 downside though property of type anyobject? making work swift can awkward. in nsviewcontroller subclass can make new property store data , gi...

java - How would i do "Box entends Cube" -

i want extend cube box. program has 3 parts first rectangle class use extend box class extend cube. stuck @ cube part. instructions : assessment instructions a. cube box length, width, , height have same values. b. won’t have add additional instance variables or methods, have set cube’s constructor ensure length, width, , height have same values. rectangle: public class rectangle { // instance variables private int length; private int width; /** * constructor objects of class rectangle */ public rectangle(int l, int w) { // initialise instance variables length = l; width = w; } // return height public int getlength() { return length; } public int getwidth() { return width; } } box: public class box extends rectangle { // instance variables private int height; ...

.net - I want to show the current BUILD info on my title bar -

i want show current build info on title bar. (main_form.txt). i have seen several references finding it, none giving me data want. my project simple visual studio express 2015, win forms app .net 4.5 when in properties/publish see build currenly 1.0.0.13 , increase each publish do. where can variables ? i see in bbox2.exe.manifest file following line.... asmv1:assemblyidentity name="bbox2.exe" version="1.0.0.13" publickeytoken="1d053a5b342cefc4" language="neutral" ........ i have tried suggested in post following.. dim ass system.reflection.assembly = system.reflection.assembly.getexecutingassembly() dim ver system.version = ass.getname().version me.text = ("blacbox" & ver.major & "." & ver.minor & "." & ver.revision & "." & ver.build) but gets me 1.0.0.0 ?? any , advice appreciated. the publish version usable when publish applicati...

java - @UniqueConstraint and @Column(unique = true) in hibernate annotation -

what difference between @uniqueconstraint , @column(unique = true) ? for example: @table( name = "product_serial_group_mask", uniqueconstraints = {@uniqueconstraint(columnnames = {"mask", "group"})} ) and @column(unique = true) @manytoone(optional = false, fetch = fetchtype.eager) private productserialmask mask; @column(unique = true) @manytoone(optional = false, fetch = fetchtype.eager) private group group; as said before, @column(unique = true) shortcut uniqueconstraint when single field. from example gave, there huge difference between both. @column(unique = true) @manytoone(optional = false, fetch = fetchtype.eager) private productserialmask mask; @column(unique = true) @manytoone(optional = false, fetch = fetchtype.eager) private group group; this code implies both mask , group have unique, separately. means if, example, have record mask.id = 1 , tries insert record mask.id = 1 , you'll error, because colu...

gcc - "warning: invalid format string conversion" [printf-like-function] only in a CUDA source file -

using ' format specifier in printf-like-function leads warning. class logcontroller { auto __attribute__((format(printf, 2, 3))) insertlogentry( const char * formatstring, ... ) -> void; } ... logcontroller lc; lc.insertlogentry( "some data %'d", int_value ); // warning in .cu file // in .cpp file ok i have feeling nvcc issue , way avoid warning move 1 line foo.insertlogentry() .cpp file. even in .cu file host , not device function. idea how rid of warning? update: the ' according site extension supported on posix.1-2008-conforming systems . question if cudafe have support or not, underlying compiler gcc 4.9.3 ? update: as talonmies suggested use --dryrun , causes warning: cudafe --allow_managed --m64 --gnu_version=40903 --c++11 -tused --no_remove_unneeded_entities --debug_mode --gen_c_file_name "/tmp/tmpxft_000026f9_00000000-4_cudadevice.cud...

jquery - jqGrid compare pre and post cell or row editing values -

i need retrieve row content or cell content before editing can pass post data. need compare pre , post editing values , send them both database. code beforeedit cell not firing. grid.jqgrid({ url : url, editurl : updurl, mtype : "post", postdata : {'action':'wk','id':id}, datatype : "json", page : 1, regional : lang, beforeeditcell : getcellcurrentvalue, idprefix : "w_", colnames : wkcolname[lang], colmodel : [ { name: 'id', width: 25, hidden: true }, { name: 'c_id', key:true, editable: true, width: 20, editrules : { required: true, integer:true, minvalue:1} }, ], autowidth : true, height : 445, rownum : 20, caption : gridcaption, shrinktofit : true, sortorder : "asc", hidegrid : false, gridview : true, ...

Dynamically building multiple projects in Jenkins -

i'd use jenkins dynamically search *.sln files , trigger build each one. i have git repository following structure: \project1\project1.sln \project2\project2.sln \project3\project3.sln .. my current solution have 2 projects. parent project: add build step: "trigger/call builds on other projects" add parameterfactory : "for every matching file, invoke 1 build" search .sln files , trigger build each matching file, filename set to: solutionfile child project: use environment variable "solutionfile" create relative path solution file. for example: project1.sln becomes project1\project1.sln build solution does have suggestions better / more robust solution? this best solution i've been able come far. there 2 projects: top level responsible identifying solution files, sub project builds solution file. top level project: fetches repository executes windows powershell script search .sln files , creates p...

java - I need the length of an array element, and then print the last character -

so, today, given school project, , need help. i need find first , last letter of each element in array, , print it. of java people out there, please tell me function, method, or bit of code need in order this? one of issues comes when compile , run says charat(a);, tells me cannot take character there, whatever reason. so, if me work out, i'll grateful, due tonight, , cannot figure out. thanks much. /** * write description of class pokemon here. * * @author (your name) * @version (a version number or date) */ import java.util.scanner; public class pokemon { public static void main (string [ ] args) { scanner scan = new scanner(system.in); string array [ ] = new string [ 10 ]; array [ 0 ] = "charizard"; array [ 1 ] = "pikachu"; array [ 2 ] = "jigglypuff"; array [ 3 ] = "timburr"; array [ 4 ] = "conkeldurr"; array [ 5 ] = "gurdurr"; system.out.println("-----...

c++ - Why does Windows 10 start extra threads in my program? -

with visual studio 2015, in new, empty c++ project, build following console application: int main() { return 0; } set break point on return , launch program in debugger. on windows 7, of break point, program has 1 thread. on windows 10, has five(!) threads: main thread , 4 "worker threads" waiting on synchronization object. who's starting thread pool (or how find out)? crystal ball says debug > windows > threads window shows these threads @ ntdll.dll!tppworkerthread . sure enable microsoft symbol server see yourself, use tools > options > debugging > symbols. this happens in vs2013 not caused new vs2015 diagnostic features, @adam's guess cannot correct. tppworkerthread() entrypoint thread-pool thread. when set breakpoint debug > new breakpoint > function breakpoint on function. got lucky capture stack trace 1st threadpool thread when 2nd threadpool thread started executing: ntdll.dll!_ntopenfile@24() unknown ...

php - Not able to get saved value from db mysql as selected value in dropdown. I trying to update the form which user has already filled -

i trying data database values reflecting saved value dropdown not coming selected. <div class="col-md-4"> <select name="officename" id="officename" class="form-control" onchange="gettext(this)" required> <?php while($data = dbfetchassoc($result)){ ?> <option value=''><?php echo $data['off_name']; ?></option> <?php }//while ?> </select> </div> this common issue. let's have select statement populated key value pairs database: <select name="sel"> <?php foreach ($options $value => $label) : ?> <option value="<?= $value ?>"><?= htmlentities($label) ?></option> <?php endforeach ?> when form submitted, you'll value of sel in $_get or $_post (or $_request)....

c - Gstreamer: capturing still frames from webcam with appsink? -

i have working c program streams continuous frames webcam appsink. however, i'm interested in capturing single frames when user presses key. in other words: when idle, appsink receives no frames, when key pressed, appsink should pull single new frame camera source. i've tried using output_selector "valve" switch frames between fakesink , appsink . when app idle, pipeline running, , looks like v4l2src -> output_selector -> fakesink and when want capture frame, change output_selector 's active pad pipeline looks this: v4l2src -> output_selector -> jpegenc -> appsink then gst_app_sink_pull_sample() , switch active pad fakesink . issue (usually every other capture) duplicate frame that's same last one. how can resolve issue? there way achieve desired behavior?

java - composite inheritance: how to assign a final field at sub-class constructor which depends on 'this' value (backward reference)? -

i use composite classes group functionalities. but, class (with composite a1), got inherited b (with composite b1), , behavior existent @ a1 going adapted @ b1, final a1 must b1 instance work. obs.: have ways make sure composite instantiation happens (only composite partner). unable assign b1 object a1 final field: class finalfieldtestfails{ class a1{ a1(a a){} } class a{ protected final a1 a1; a(){ this.a1 = new a1(this); } a(a1 a1){ this.a1 = a1; } } class b1 extends a1{ b1(b b){ super(b); } } class b extends a{ //b(){ super.a1=new b1(this); } //fail: cant change final value //b(){super(new b1(this));} //fail: cant use 'this' or 'super' } } ps.: answer shall not involve reflection security tricks if possible. b(){ super.a1=new b1(this); } //fail: cant change final value you can not assign values assigned final variab...

ruby - One-liner to generate Powerball picks in Swift? -

with u.s.'s large $1.5 billion lottery week, wrote function in ruby make powerball picks. in powerball , choose 5 numbers range 1..69 (with no duplicates) , 1 number range 1..26 . this came with: def pball array(1..69).shuffle[0..4].sort + [rand(1..26)] end it works creating array of integers 1 69, shuffling array, choosing first 5 numbers, sorting those, , adding on number 1 26. to in swift takes bit more work since swift doesn't have built-in shuffle method on array . this attempt: func pball() -> [int] { let arr = array(1...69).map{($0, drand48())}.sort{$0.1 < $1.1}.map{$0.0}[0...4].sort() return arr + [int(arc4random_uniform(26) + 1)] } since there no shuffle method, works creating [int] values in range 1...69 . uses map create [(int, double)] , array of tuple pairs contain numbers , random double in range 0.0 ..< 1.0 . sorts array using double values , uses second map return [int] , uses slice [0...4] extract first 5 numb...

node.js - Strange closure issue in javascript -

how come in case getting ['undefined1','undefined2'] value array? pushed in same scope. router.post('/add', function(req, res) { var imagearr = []; for(var = 1; <= 4; i++) { if (req.body["photo" + i]) { imagearr.push(req.body.photo + '' + i); } } console.log(imagearr) // working fine here, returning correct values ['something','something'] if (req.body.is_update) { console.log(imagearr) // working fine here too, returning correct values } else { console.log(imagearr) // not working fine here, returning undefined1, undefined2.. } } is because of async, possibly? i thought turn comment formal answer question won't hang unanswered. you need replace part of script imagearr.push(req.body.photo+''+i); imagearr.push(req.body["photo"+i]); . examples of console outputs both cases can seen in fiddle.

Mysql Ranking Query on 2 columns -

table id user_id rank_solo lp 1 1 15 45 2 2 7 79 3 3 17 15 how can sort out ranking query sorts on rank_solo ( ranges 0 28) , if rank_solo = rank_solo , uses lp ( 0-100) further determine ranking? (if lp = lp, add ranking no tie rankings) the query should give me ranking random user_id. how performance wise on 5m+ rows? so user_id 1 have ranking 2 user_id 2 have ranking 3 user_id 3 have ranking 1 you can ranking using variablesl select t.*, (@rn := @rn + 1) ranking t cross join (select @rn := 0) params order rank_solo desc, lp;

angularjs - twig's dump ouput loaded via $http cannot be collapsed or expanded -

Image
i have simple action(in symfony 2.8 using twig 1.23.1), renders string: /** * @route("/test", name="my_test_route") * * @return \symfony\component\httpfoundation\response */ public function testaction() { $returncontent = array( 'message'=>'my message', 'test' => array( 'one' => 'one', 'two' => 'two', 'three' => 'three', 'four' => 'four', 'five' => 'five', 'six' => 'six', ) ); return $this->render('mybundle:message.html.twig', $returncontent); } the template outputs message , dumps test array: {% extends 'mybundle::layout.html.twig' %} {% block body %} {{ dump(test) }} {{ message }} {% endblock %} the above scenario working , expected dump output. however when output a...

magento2 - How to get prefix table in magento 2 -

i need prefix table in magento 2 join table. try find on internet don't see how prefix table in magento 2. can me it seems there have been code changes in magento. referring @manashvi birla answer, need replace : $connection->gettablename('customer_entity'); by : $this->_resource->gettablename('customer_entity'); to able table prefix.

Apache rewrite rules in both config and .htaccess -

i have cakephp application hosted in virtual host (apache 2.4) works ok. in internal network virtual host name cannot routed have use web server ip. , since server hosts multiple applications have set alias in config file: alias /abc "/var/www/cake/audio/webroot" <directory "/var/www/cake/audio"> options +followsymlinks -multiviews require granted allowoverride rewritebase /abc </directory> the problem specifying allowoverride all, rewritebase in .htaccess defaults / overrides config file. how can make rewritebase equal / when accessed using virtual host , rewritebase equal /abc when access using ip?

r - Average of last lowest N prior values by group -

basically want rolling average of lowest n values. i have tried using mydata$lowest_n = rollapply(values, 5, mean(sort[1:5]), align=c('right')) but cannot work. again needs rolling time series data set. above code know has obvious error, don't have attempted methods in front of me. advice appreciated!!!! if matters, have scenario many different groups, grouped using ddply() my data = structure(list(date = structure(c(13586, 13587, 13594, 13635, 13656, 13657, 13686, 13710, 13712, 13718, 13726, 13753, 13783, 13791, 13874, 13895, 13910, 13917, 13923, 13930, 13958, 13970, 13977, 13978, 13991, 14018, 14021, 14066, 14070, 14073, 14104, 14112, 14118, 14138, 14220, 14269, 14293, 14473, 14631, 13566, 13692, 13916, 14084, 12677, 12984, 13035, 13222, 13406, 13417, 13483, 13539, 13580, 13607, 13644, 13693, 13698, 13713, 13714, 13726, 13727, 13750, 13754, 13777, 13809, 13810, 13812, 13819, 13832, 13853, 13893, 13944, 13954, 14015, 14021, 1...

c# - The type 'IEnumerable<>' is defined in an assembly that is not referenced. System.Runtime -

i have asp.net 5 web application references class library. that class library use entity framework 7 perform query. public ienumerable<member> getmemberybyfirstname(string firstname) { var members = _context.members.where(m => m.firstname.contains(firstname)); return memebers; } but compile error the type 'ienumerable<>' defined in assembly not referenced. must add reference assembly 'system.runtime, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a'. * i figured out how wanted info available. it's quite complicated , revolves around project.json. the short answer changed project.json in class library { "version": "1.0.0-*", "description": "member.business class library", "authors": [ "bryan" ], "tags": [ "" ], "projecturl": "", "licenseurl": "", ...

jsf - How to find out client ID of component for ajax update/render? Cannot find component with expression "foo" referenced from "bar" -

the following code inspired primefaces datagrid + datatable tutorials , put <p:tab> of <p:tabview> residing in <p:layoutunit> of <p:layout> . here inner part of code (starting p:tab component); outer part trivial. <p:tabview id="tabs"> <p:tab id="search" title="search"> <h:form id="instable"> <p:datatable id="table" var="lndinstrument" value="#{instrumentbean.instruments}"> <p:column> <p:commandlink id="select" update="instable:display" oncomplete="dlg.show()"> <f:setpropertyactionlistener value="#{lndinstrument}" target="#{instrumentbean.selectedinstrument}" /> <h:outputtext value="#{lndinstrument.name}" />...

c++ - Are the column count and column decltypes invariant for the duration of the execution of a SQLite prepared statement? -

when @ code other folks have written using sqlite3 c api, find sqlite3_column_decltype , sqlite3_column_count called inner loop (once per result row). my understanding of database these values never change if statement re-compiled (see the bit sqlite3_prepare_v2 ). so should able call these once , cache them after call sqlite3_prepare . the columns' declared types can change, if use same statement in 2 transactions , database schema changed between them. in same situation, column count can change, if query using select * . however, single query execution inside transaction ( either manual or automatic one ). if cache values after call sqlite3_prepare_v2() , use them until next call sqlite3_reset() / sqlite3_finalize() , fine. can cache them longer if ensure uses inside same transaction.

java - Is this correct way to use Sqlite database in Android -

this question has answer here: unfortunately myapp has stopped. how can solve this? 14 answers i beginner android. start learning it. creating register form integrated sqlite database. throwing error when click register button. please me. correct ? wrong code. how can debug application in android. using gennymotion emulator. this database helper class : databasehelper.java public class databasehelper extends sqliteopenhelper { private static final int database_version = 1; private static final string database_name = "contacts.db"; private static final string table_name = "contacts"; private static final string column_id = "id"; private static final string column_name = "name"; private static final string column_password = "password"; sqlitedatabase db; private static final stri...

php - Redirecting out of modal box in joomla -

i have component in joomla contains form,this form in modal sbox...when form submitted redirects user successfull message page again in modal box,my problem want redirect normal page not in modal...how can that? this redirect code component... $url = jroute::_('index.php?option=com_jxtcappbook'.(jrequest::getint( 'pop', 0) ? '&view=complete&tmpl=component' : '')); $this->setredirect($url,jtext::_( 'you appointment booked succesfully.'.$pop )); you can user below code if using joomla 2.5 $app = jfactory::getapplication(); $app->redirect('index.php'); and if using joomla1.5 than global $mainframe; $mainframe->redirect('index.php'); vote me if helpful you thanks!

hdfs - No such file or directory error when using Hadoop fs --copyFromLocal command -

i have local vm has hortonworks hadoop , hdfs installed on it. ssh'ed vm machine , trying copy file local filesystem hdfs through following set of commands: [root@sandbox ~]# sudo -u hdfs hadoop fs -mkdir /folder1/ [root@sandbox ~]# sudo -u hdfs hadoop fs -copyfromlocal /root/folder1/file1.txt /hdfs_folder1/ when execute following error - copyfromlocal:/root/folder1/file1.txt': no such file or directory i can see file right in /root/folder1/ directory hdfs command throwing above error. tried cd /root/folder1/ , execute command same error comes. why file not getting found when right there? by running sudo -u hdfs hadoop fs... , tries read file /root/folder1/file.txt hdfs. you can this. run chmod 755 -r /root . change permissions on directory , file recursively. not recommended open permission on root home directory. then can run copyfromlocal sudo -u hdfs copy file local file system hdfs. better practice create user space root , copy files di...

Change the position of a table in page using CSS -

i have table , @ end of page: <table class="fes-display-field-table fes-submission-form-display-field-table"> </table> now want move table between: <h2 class="section-title"><span>giới thiệu về dịch vụ</span></h2> table here <article id="post-8306" class="post-8306 type-download status-publish format-standard hentry...> is there way css? here css file: https://jsfiddle.net/wcq1ft3k/ this want. have give position property table style.i concerned position table. try code. change values of left , top . think table class name mytable <html> <head> <title></title> </head> <style type="text/css"> .mytable{ border: 1px solid black; position: absolute; top: 200px; left: 300px; } </style> <body> <table class="mytable"> <tbody> <tr> <th style="width:200px; border-r...