Posts

Showing posts from July, 2015

kendo ui - master detail with combobox and a grid -

i use combobox , grid telerik kendoui php , trying make master detail relation when current selected item change in combobox grid update current data. here combobox code: $combobox = new \kendo\ui\combobox('combobox'); $combobox->datatextfield('text') ->datavaluefield('value') ->datasource(array( array('text' => 'item 1', 'value' => '1'), array('text' => 'item 2', 'value' => '2'), array('text' => 'item 3', 'value' => '3') )) ->change('onchange'); ?> <div class="demo-section"> <h3 class="title">combobox </h3> <?php echo $combobox->render(); ?> </div> <script> function onchange() { } </script> the grid used standard 1 data php file return data in json format. should use on...

node.js - XMPP GCM Server only works locally -

i've mounted small nodejs web server using express , node-xmpp-client on amazon ec2 instance use gcm push notification server. i've set strange thing works when try local, on own macbook, won't work on server: never receive "online" log message nodejs, "connecting...." (check code below). i've added server ip google developers console , made sure open required ports on ec2 security group, still no change: works on local, nothing on server. code looks this: var options = { type: 'client', jid: '<my user id>@gcm.googleapis.com', password: gcm_api_key, port: 5235, host: 'gcm.googleapis.com', legacyssl: true, preferredsaslmechanism : 'plain' }; xmppclient = new xmpp.client(options); xmppclient.connection.socket.settimeout(0) xmppclient.connection.socket.setkeepalive(true, 10000) xmppclient.on('stanza', function(stanza) { console.log("stanza:") console.log(stanza.tost...

asp.net - Error when deploying .NET Core webapp to Azure -

i complete beginner on .net world trying first dummy .net core webapp run on azure app service. the code can found here: https://github.com/jordi-chacon/bcn_pollution my development machine runs ubuntu, using visual studio code. i have .net core webapp running on localhost:5000 fine , want run on azure app service. i have configured continuous deployment on app service fetch code github. then azure tried deploy webapp failed following error: using following command generate deployment script: 'azure site deploymentscript -y --no-dot-deployment -r "d:\home\site\repository" -o "d:\home\site\deployments\tools" --aspnet5 "d:\home\site\repository\project.json" --aspnet5version "1.0.0-rc1-final" --aspnet5runtime "clr" --aspnet5architecture "x86"'. project file path: .\project.json generating deployment script asp.net 5 application generated deployment script files command: "d:\home\site\deployments\tools...

Android main activity destroy(finish) automatically -

in app there 3 activities: a, b, , c. activity main activity. when start activity b using intent , automatically destroyed. however, not finished when start b. then, when press button in device started using oncreate , i've lost data since not using intent go back. the same happens when opening c b. button.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { // todo auto-generated method stub startactivity(new intent(activitya.this, activityb.class)); } }); what's going on? how fix this? if using 'activity b' sort of one-off result sounds need using startactivityforresult construct. see [the docs]( http://developer.android.com/reference/android/app/activity.html#startactivityforresult(android.content.intent , int)) however , maintain state information 'activity a' without persisting anywhere want bundling i...

android - Open Facebook user profile -

is there way open facebook user profile facebook app app? i link graph api: https://www.facebook.com/app_scoped_user_id/1234567/ link user profile , open profile using facebook app. if create intent action_view , url opens facebook in browser. thanks! i saw other options outdated. i'm using v2.4 graph api. i used code , worked. based on post suggested @kristo1990. string uri = "fb://profile/12345678"; intent intent = new intent(intent.action_view, uri.parse(uri)); startactivity(intent);

python - Flask - How to get a cookie expiration time? -

i'd know how can expiration time of flask cookie. setting it, have following code: resp.set_cookie('id', my_id expires = current_time + current_time + datetime.timedelta(days=30)) however, having difficulties getting value back. i think cannot, according microsoft's explanation of how ordinary browsers work. the browser responsible managing cookies, , cookie's expiration time , date browser manage store of cookies. therefore, although can read name , value of cookie, cannot read cookie's expiration date , time https://msdn.microsoft.com/en-us/library/ms178194(v=vs.100).aspx a question " how cookie's expire time " refers same problem, , way of putting expiration date cookie's value shown in 1 of answers.

angularjs - Angular and Google tag manager (GTM) gtm.click -

Image
i running problem, , cannot seem find fix it. situation follows marketing department wants integrate gtm. fine want have full control on different third party providers wish integrate. happen have ability track clicks on page. and came me no click events being tracked current configuration within gtm. @ first thought events not propagating (bubbling) upwards. having tested myself binding event listener document (click) (see below) div, buttons etc. ng-click directives did reach handler without problems. document.addeventlistener("click", function(event){ console.dir(event.target); }); so assumption there wrong configuration after looking @ configuration (one created myself looks follows): i still not work. buttons use angulartics - https://luisfarzati.github.io/angulartics/ send event gtm container work expected: <a href="file.pdf" analytics-on="click" analytics-event="download">download</a> only catch click ev...

theory - How dose an algorithm access components of a Data structure in STL -

the standard template library (stl) provides data structures , algorithms. however, not case every algorithm can used every data structure. suppose stl supports use of algorithm data structure d. (a) how link between , d established. in other words, how access components of d? give examples. (b) stl guarantees (i.e., promises) result of using d. guarantee? a) stl provides various "iterators" access elements on data structures. there various types of iterators, can travel linearly start end, can travel in both directions, , can move freely element in d. type of iterator supported d determine type of can run using d. b) if can run on d stl guarantees time-complexity (o(n)) take complete a. hello! studying theory exam. wondering if think missed in answers here. "(a) how link between , d established. in other words, how access components of d? give examples." it done through iterators. iterators glue between algorithms , data structures in stl...

reporting services - Run reports/send emails from a list of parameters? -

i've run problem that, although feel in gut there 'simple' resolution, i'm not getting anywhere it! reports i'm running using dataset includes username need use 1) use parameter running report , 2) use create email address , send user. don't know enough yet ssrs, or have experience, have created parameterized report (nevermind iterating through dataset i'm assuming needed), nor have ever set data-driven subscription. on either of these issues earn eternal gratitude. thank all....again! patrick its not bad once you've been through once. first need sql out of parameter dataset (it's redundant in report definition). in report manager/sharepoint can define data driven subscription. paste in sql parameter dataset wizard query, , use columns select on later pages of wizard required e.g. email address ... email address. no coding required (beyond parameter dataset have) , wizard self-explanatory , documented. good luck! mike

java - Spring MVC + AngularJS - 415 (Unsupported Media Type) -

i had working until added department attribute in employee model onetomany , manytoone relation database. java controller method: @requestmapping(value = "/addemployee" , method = requestmethod.post) public responseentity<void>addemployee(@requestbody employee empl, uricomponentsbuilder ubuilder){ system.out.println(empl); employeedao.addentity(empl); httpheaders headers = new httpheaders(); headers.setlocation(ubuilder.path("/addemployee/{id}").buildandexpand(empl.getemp_id()).touri()); return new responseentity<void>(headers,httpstatus.created); } i tried adding consumes = {"application/json;charset=utf-8"}) as seen in other similar questions didn't work. here angular service method: addemployee: function(employee){ return $http.post('http://localhost:8080/project/addemployee',employee).then( function(resp){ console.log('added empl') ...

android - API key is always missing when I try to access MailChimp's api using Retrofit -

i'm sure non issue knows they're doing, first time using mailchimp's api , retrofit. basically, api key missing. have no idea mailchimp's proper url looks when including api key. the url attempting is: /3.0/lists/613cd953b2/members?user=email@gmail.com:apikey and others of variety http://developer.mailchimp.com/documentation/mailchimp/reference/lists/members/#create-post_lists_list_id_members curl --request \ --url 'https://.api.mailchimp.com/3.0/' \ --user 'anystring:your_apikey' this says attempting post. here android / java code... final okhttpclient client = new okhttpclient(); httplogginginterceptor interceptor = new httplogginginterceptor(); interceptor.setlevel(httplogginginterceptor.level.body); client.interceptors().add(interceptor); client.interceptors().add(new interceptor() { @override public com.squareup.okhttp.response intercept(chain chain) throws ioexception { ...

r - read csv, skip three lines but include header names in data.frame -

this question has answer here: unable column names when using skip along read.csv 1 answer i want read csv file skip 3 lines (except header) include header names in data.frame. i've tried following header names wrong: > sine = read.csv(file="sine.csv",head=true,sep=",", skip=3, check.names=true) > colnames(sine) [1] "x0" "x0.0" "x0.0.1" "x0.0.2" "none" "x1.0" "x0.0.3" "none.1" "x.." [10] "x0.1" "x0.2" when read dataset without skipping 3 lines header names ok: > sine = read.csv(file="sine.csv",head=true,sep=",", skip=0, check.names=true) > colnames(sine) [1] "reset" [2] "angle" ...

Check White Space in textbox (C#) -

how check white space in textbox?. want take username input, there shouldn't white space. how check returning true false? try this: bool iswhitespace = txtbox.text.any(char.iswhitespace); this question resolved here

RxJS / React and best way to share state between seperate components (w/o flux) -

so, thinking of creating new app in rxjs / react -- "maybe" cycle.js holding me thought of sharing state single page app. usually, can self contain components state - because of user interaction on various parts of page, curious best practices architecture. granted, knowledge of rxjs on deeper level not there - might missing obvious 'state' management ability. so, cascade components state flows down parent container - seems easiest, have 1 giant component bunch of children. introduce reflux really question asks: best practice using rxjs / react , share state. sidenote: common examples of "counters" trivial , have not been help. example, need instance - click arrow, pane slides in, different part of page - title fades in. not sure if took @ rx react boilerplate (it has counter though!) to utilise animation app in react use library react-motion i think might easier route @ redux i'm sure there animation examples out there can ...

jquery - Bootstrap Tabbed Content Not Hiding Properly -

Image
i'm trying bootstrap tab field working , i'm having difficulties. the content tabbing between each div, i'm running content each tab being displayed on page, hidden. whenever 1 of tabs clicked hides content above, , unhides content below instead of switching properly. in screenshot below can see content #android-screenshots tab showing beneath content in #ios-screenshots tab causing large amount of unneeded blank space. here markup looks like: <div id="mobile-splash-faq-screenshots" class="container-fluid"> <div class="row"> <!-- nav tabs --> <ul class="nav nav-tabs" role="tablist"> <li role="presentation" class="active"><a href="#ios-screenshots" aria-controls="ios-screenshots" role="tab" data-toggle="tab">ios screenshots</a></li> <li role="presentation...

android - DataBinding: cannot find symbol class -

i've got problem databinding in android. above xml file , activity class: activity_main.xml ( binding in android:enabled="@{logininfo.existinguser}") <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"> <data> <variable name="logininfo" type="com.example.android.loginapplication.logininfo"/> </data> <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="16dp"> <radiogroup android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <radiobutton android:layout_width="wrap_content"...

jpa - Unable to lookup JNDI name -

hi i'm using netbeans+glassfish i'm trying run code: create db without table ( running code want create tables , persist object) public static void main(string[] args) { smartphoneservice ss = new smartphoneservice(); smartphone smart = new smartphone(0, 0, null, null, null); ss.create(smart); } but got error : unable lookup jndi name my persistence.xml: <persistence-unit name="manager1" transaction-type="resource_local"> <provider>org.hibernate.ejb.hibernatepersistence</provider> <jta-data-source>java:comp/env/jdbc/mysql</jta-data-source> <exclude-unlisted-classes>false</exclude-unlisted-classes> <properties> <property name="javax.persistence.schema-generation.database.action" value="create"/> </properties> my class smartphoneservice: @stateless public class smartphoneservice implements idao<smartphone> { private static final string jp...

asp.net - How to delete old aspnet users with aspnet_Users_DeleteUser procedure? -

i using standard aspnet membership tables , i'm doing maintenance of our database. want remove users have not logged in year. i know how call aspnet_users_deleteuser stored procedure in order delete single user, how can use delete users aspnet_users.lastactivitydate < '1/1/2015' ? i can write select statement out usernames delete, how can execute procedure on each of them? this should trick... declare @applicationname nvarchar(256), @username nvarchar(256), @tablestodeletefrom int = 15, @numtablesdeletedfrom int declare cur cursor select aa.loweredapplicationname, au.loweredusername [dbo].[aspnet_users] au join [dbo].[aspnet_applications] aa on au.applicationid = aa.applicationid lastactivitydate < '1/1/2015' open cur fetch next cur @applicationname, @username while @@fetch_status = 0 begin exec [dbo].[aspnet_users_deleteuser] ...

javascript - AngularJS Load Data from Service -

i having problem getting data service populated view. have service defined such app.factory('nukeservice', function($rootscope, $http) { var nukeservice = {}; nukeservice.nuke = {}; //gets list of nuclear weapons nukeservice.getnukes = function() { $http.get('nukes/nukes.json') .success(function(data) { nukeservice.nukes = data; }); return nukeservice.nukes; }; return nukeservice; }); and controller function navigationctrl($scope, $http, nukeservice){ /*$http.get('nukes/nukes.json').success(function(data) { $scope.nukes = data; });*/ $scope.nukes = nukeservice.getnukes(); } if use $http.get controller data populates fine, however, if try call data service, nothing. understand query asynchronous having hard time understanding how populate $scope variable once data returned. use $rootscope broadcast event , listen in controller not seem correct ...

javascript - Can't figure out how to properly zoom in on the entire webpage -

i need zoom-in on entire page looks this . i know can on hover, using following css: .cycle-slideshow img:hover { transform: scale(1.25); transition: 20s; } but i'm not sure how on page load, without enlarging images itself. appreciate advises. in advance! you'll have use keyframes make zoom in. css: @keyframes imageanimation { 0% { transform: scale(1.0); } 100% { transform: scale(1.25); } } then call animation wherever want apply it: #image-container { width: 600px; overflow: hidden; } #myimage { animation: imageanimation 20s infinite alternate; width: 600px; } html: <div id="image-container"> <img id="myimage" src="myimage.jpg" alt="image"> </div> here working fiddle . can read more keyframes , how there work here .

CBV Django Form View set data for ChoiceField -

i'm using django form view , want enter custom choices per user choicefield . how can this? can use maybe get_initial function? can overwrite field? when want change things form such label text, adding required fields or filtering list of choices etc. follow pattern use modelform , add few utility methods contain overriding code (this helps keep __init__ tidy). these methods called __init__ override defaults. class profileform(forms.modelform): class meta: model = profile fields = ('country', 'contact_phone', ) def __init__(self, *args, **kwargs): super(profileform, self).__init__(*args, **kwargs) self.set_querysets() self.set_labels() self.set_required_values() self.set_initial_values() def set_querysets(self): """filter choicefields here.""" # show active countries in ‘country’ choices list self.fields["country...

javascript - Node.js Split large file into parts and iterate over the parts -

node.js running on linux. test files larger 100mb , split them chunks of 100mb. can use exec // executes `split` child = exec("split -d -b 104857600k $file_name", function (error, stdout, stderr) { sys.print('stdout: ' + stdout); sys.print('stderr: ' + stderr); if (error !== null) { console.log('exec error: ' + error); } }); but how know how many parts generated , how can iterate on them? you can enable --verbose print in stdout result files. child = exec("split -d -b 104857600k --verbose $file_name", function (error, stdout,stderr) { if (!error) { // file names output var resultfiles = stdout.match(/x(\d+)/g); } else { console.log('exec error: ' + error); } });

ms word - Can't Close and Delete Open MSWord 2010 Document (ActiveDocument.Close prevents Kill command from running.) -

i'm trying close open word document , delete part of documentbeforeclose event. keep running across following code in searches (+/- error trapping statements): dim killfile string killfile = dir$(activedocument.fullname) if len(dir$(killfile)) > 0 setattr killfile, vbnormal activedocument.close false kill killfile end if i've found similar code (well, frankly identical code) in several places, , seems confirm works, cannot run correctly in own attempts, regardless of module have code in. when run, document closes, code stops there , never gets kill command. in theory instance of word supposed keep running script once document closes; in case instance open, there's nothing running anymore @ point. doing wrong here? if it's helpful, in version of code i'm working have while loop going through directory , deleting documents containing " temp.doc " in name. code has no trouble running through , deleting closed files, not de...

Java: Calling a method in a raw Class which's name is undefined? -

right, first have no idea called hope title correct? in main class main.java it'll run piece of code: classtwo ctwo new classtwo(); ctwo.addevent(new eventone()); ctwo.addevent(new eventtwo()); ctwo.addevent(new eventthree()); now within classtwo's addevent() have as: public void addevent(class<?> event) { event.update(); } the class<?> event put there have no idea else start at. event.update() of course comes error there no such method in type class . every event class have update() method in them how go making work? edit: ok question wasn't clear. in classtwo made api , contains gameloop thread. interfaces have no idea java.lang.reflect.method looks want i'm looking for. edit2: update method: private bufferedimage gameimage; public void update() { graphics2d g = (graphics2d) gameimage.getgraphics(); g.setcolor(color.yellow); g.fillrect(0, 0, gsystem.getwidth() - 1, gsystem.getheight() - 1); /////////// // ...

r - Asymmetric expansion of limits [ggplot2 2.0] -

Image
how adjust expansion of limits asymmetrically in ggplot? example, library(ggplot2) ggplot(mtcars) + geom_bar(aes(x = cyl), width = 1) i bottom of bars flush bottom of panel background, still space @ top. can achieve blank annotation: ggplot(mtcars) + geom_bar(aes(x = cyl), width = 1) + annotate("blank", x = 4, y = 16) + scale_y_continuous(expand = c(0.0,0)) in previous versions of ggplot , however, use the solution provided rosen matev : library("scales") scale_dimension.custom_expand <- function(scale, expand = ggplot2:::scale_expand(scale)) { expand_range(ggplot2:::scale_limits(scale), expand[[1]], expand[[2]]) } scale_y_continuous <- function(...) { s <- ggplot2::scale_y_continuous(...) class(s) <- c('custom_expand', class(s)) s } and use scale_y_continuous(expand = list(c(0,0.1), c(0,0))) add consistently addition top of chart. in current version, however, error ggplot(mtcars) + geom_bar(aes(x = ...

Unable to display Flash messages in Cakephp 3.x -

i not able flash messages display on of views. an example of trying call flash message in controller (which untouched cake bake except message, syntax has stayed same). $this->flash->success('your account has been created!'); in appcontroller initialize function: $this->loadcomponent('flash'); in default layout: <?= $this->flash->render() ?> <?= $this->fetch('content') ?> i not getting error messages, far can see , after doing lots of research issue seems set correctly. the flash messages visible in session , when declare them key: $this->flash->default('a message... ',['key' => 'cutom_error_key',]); $this->flash->success('welcome',['key' => 'loggedin']); i have made sure valid flash .ctp files in element\flash folder (copied working project after running issue). any ideas causing issue? add following in controller: use cake\contro...

android - which adb.exe to chose? -

im having trouble getting adb work, keep getting ''adb' not recognized internal or external command, operable program or batch file' , found out need set system path tried locate adb.exe i found in 3 folfder: c:\users\sven\appdata\local\android\sdk\platform-tools c:\users\sven\appdata\local\android\sdk1\platform-tools c:\users\sven\appdata\local\android\sdk2\platform-tools how know 1 add path? date created looks same. doesn't make difference.. can use whichever like..i suggest- c:\users\sven\appdata\local\android\sdk2\platform-tools since looks to latest if go "sdk2"

R Error: java.lang.OutOfMemoryError: Java heap space -

i trying connect r teradata pull data directly r analysis. however, getting error of: error in .jcall(rp, "i", "fetch", stride, block) : java.lang.outofmemoryerror: java heap space i have tried set r options increase max heap size of jvm doing: options(java.parameters = "-xmx8g") i have tried initialize java parameters rjava function .jinit as: .jinit(parameters="-xmx8g") . still failed. the calculated size of data should approximately 3g (actually less 3g). could me on this? advice appreciated. you need make sure you're allocating additional memory before loading rjava or other packages. wipe environment first , set options @ top of script. options(java.parameters = "-xmx8000m") see example https://support.snowflake.net/hc/en-us/articles/115000235523-solution-using-r-the-following-error-is-returned-java-lang-outofmemoryerror-gc-overhead-limit-exceeded

c# - Windows Phone 7 crash when accessing directory -

i having trouble getting info on directory in windows phone 7 c#. application freezes or crashes when call: system.io.directoryinfo dir = new system.io.directoryinfo("content/levels"); it freezes when try determine path of application think problem lies. what possibly doing wrong , can fix this? update: seems problem related sequirity issue don't know how resolve this. there possibly way find root directory withouth sequirity isue? if makes differences these files stored in xna content pipeline. to access file within actual xap (known "title storage"), first of must export content xna content pipeline. select file(s) content project , under properties set build action content (i believe none same thing). export directly, raw, xap , accessible within game/app. secondly, access files title storage, can't access root directory directly on wp7. use this class access files title storage: using (streamreader r = new streamreader(t...

html escape - Using helper methods like html_escape in rails console -

i trying see going wrong encoding of variables in view. fire rails console , try do $ rails console loading development environment (rails 3.2.11) irb(main):001:0> html_escape({:a=>1, :b=>"my str"}) nomethoderror: undefined method `html_escape' main:object how use h or html_escape in rails console? you call through helper . methods private may need use send call them helper.send(:html_escape, '123') helper.pluralize 3, 'user'

sql server - T-SQL Update Null Values With Previous values (not necessarily immediately before) based on seat location, ID and Time -

Image
i using mssms 2008 r on win7 machine. i extremely new sql , still trying grasp fundamentals, different have used in past. bare me... i having issues trying hands on data. here looks after munged heck out of (this small set). i need search null values in mediaid col. (which straight forward enough). once have found these values, need search (in time) same location , logid occurred right before null values' time-stamp , replace null correct mediaid. i have solid understanding of problem , how approach (in languages) sql weird , giving me problems... took me forever data stage have no idea go here. have researched cte's , cursors still unsure how apply these methods. btw sorry cannot post of code due nature of work, think enough info ponder. you can use subquery update column previous value using code below: update t set t.mediaid = ( select top 1 mediaid yourtable s s.logid = t.logid ...

Java compare user input to char array -

first off hello, new here. i'm new java , i'm having issues comparing user input using scanner class dynamically created char array. have list of 10 words, program randomly choosing one, converting char array. i've got working. i'm having issue comparing user input char in array. i'm practicing string manipulation , creating simple hang man game daughter can fool with. advice appreciated, helpful links information great too. in advance. import java.util.random; import java.util.scanner; public class hangman { public static void main(string[] args) { string[] words = new string[10]; words[0] = "elsa"; words[1] = "anna"; words[2] = "olof"; words[3] = "sphen"; words[4] = "christoph"; words[5] = "tinkerbell"; words[6] = "arial"; words[7] = "snowwhite"; words[8] = "cinderella"; ...

java - Playing sound via button crash (Android) -

i have 3 buttons, when buttons tapped sound play. reason starting error now, after implemented 3 buttons. when did 1 button, played sound no error. after implemented 2 more, app started crash. here code button in .xml <button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="play!" android:id="@+id/play1" android:layout_below="@+id/imageview" android:layout_toleftof="@+id/play3" android:layout_tostartof="@+id/play3" /> and here code in mainactivity.java // final mediaplayer mp = mediaplayer.create(this, r.raw.sounds1); // final mediaplayer mp2 = mediaplayer.create(this, r.raw.sounds2); // final mediaplayer mp3 = mediaplayer.create(this, r.raw.sounds3); @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layo...

jsp - Hibernate criteria query to display children -

i trying develop simple web application using hibernate data portion. basically, attempting table row each category. in 1 cell each row, want display kpis category. that, attempting use criteria object. immediate problem nothing can results in second query firing. here relevant bits code. i've tried sorts of things, i've got. category.java @entity @table(name="category") public class category { @id @column(name="category_id") @generatedvalue(strategy=generationtype.identity) private int id; @column(name="category_name") private string categoryname; @transient private kpi[] kpis; ... public kpi[] getkpis() { return this.kpis; } } categorydao public interface categorydao { public list<category> listcategories(); public category getcategorybyid(int id); public list<kpi> getkpisforcategory(int cat); } categorydaoimpl public class categorydaoimpl implement...

quickbooks - IPP Customer Query Issue - SyncManager updates timestamp even though no changes made -

is there workaround case? i programmatically modify customer in cloud. syncmanager pulls customer down quickbooks. i subsequently query modified customers , same customer since syncmanager updates timestamp though no real changes occurred in quickbooks. i need startcreatedtms equivalent list items pull entities physically modified in quickbooks. i've attempted insert startcreatedtms tag query ignored, ostensibly because designed transactions. any ideas? just give thread answer, can use last upload time , last write time company file. http://docs.developer.intuit.com/0025_intuit_anywhere/0050_data_services/v2/0500_quickbooks_windows/0600_object_reference/company thanks jarred

java - Nested Loops and Rolling Dice -

i assigned project in need make program, making use of nested loops, takes user input on how many sides pair of dice has , how many times roll it. program should calculate probability of rolling number combinations. program simple because gives of code, need put in correct order. i've been working @ foir few days haven't seemed able make work. here's have code: /** * program roll dice selected amount of sides selected amount of times. * * timothy pierce * 1/5/2016 * */ import java.util.scanner; import java.util.random; class diceprobability { public static void main (string[] args) { //initalizing variables int numrolls = 0; int numsides = 0; int match = 0; int sum = 0; //accepting user input scanner in = new scanner(system.in); system.out.print("please enter number of rolls: "); numrolls = in.nextint(); system.out.print("please enter number of sides on dice: "); numsides = in.n...

c++ - Converting among pointers-to-member -

i know can't convert pointer-to-member pointer-to-non-member (e.g., void* ), can convert among pointers-to-member same class? e.g.: class c , types t , u , can convert t c::* u c::* ? i want able map string names pointers-to-member class. example, given: template<class classtype> struct mbr_map_traits { typedef std::string mbr_name_type; typedef void* classtype::*any_mbr_ptr; typedef std::map<mbr_name_type,any_mbr_ptr> map_type; }; /** * %mbr_map used map string arbitrary pointer-to-member of class. * @tparam classtype class members map to. */ template<class classtype> struct mbr_map : mbr_map_traits<classtype>::map_type { typedef typename mbr_map_traits<classtype>::mbr_name_type mbr_name_type; /** * initalizes entry in map mape \a name pointer-to-member. * @param name name map. * @param p pointer-to-member map to. */ template<typename membertype> void mbr_init( mbr_name_type con...

datatables - Jquery dataformat number tables not working when mobile version -

Image
i have problem when using format number. in normal resolution jquery format number working on mobile not working. on normal resolution: on mobile: this code : { "data": "adult_single_price", "class":"text-right", "render": function( data, type, full ) { return formatnumber(data); }, "width": "10%", "name": "view_tour.adult_single_price" }, need understanding problem. thanks

ember.js - Dynamic Properties on Model with EmberJS -

below basic ember model: app.person = ds.model.extend({ firstname: ds.attr('string'), birthday: ds.attr('date'), day1: ds.attr('string'), day2: ds.attr('string'), day3: ds.attr('string') }); for purpose of example, if had days go 50? rather going line line... day4, day5, day6... there way loop through dynamically? first instinct use mixin, , push these onto object, don't think work if had computed property: isholiday: function(){ if(this.get('day1') == 'off'){ return true; } }.property('day1'), given 'this' in there , have return, don't believe can 'push' onto model generate this: app.person = ds.model.extend({ firstname: ds.attr('string'), birthday: ds.attr('date'), day1: ds.attr('string'), day2: ds.attr('string'), day3: ds.attr('string'), isholiday: function(){ if(this.get('day1...

java - Printing additional line when using System.in.read() -

public class dwdemo { public static void main(string args[]) throws java.io.ioexception { char ch; { system.out.print("press key followed enter: "); ch = (char) system.in.read(); } while (ch != 's'); } } trying learn java. it's simple function result is press key followed enter: d press key followed enter: press key followed enter: g press key followed enter: press key followed enter: e press key followed enter: press key followed enter: f press key followed enter: press key followed enter: s system print "press key followed enter:" twice in intellij , in eclipse print 3 times. please help! since reading char console. every "enter" == '\n' taken character. (char)system.in.read() taking 2 chars , loop gets incremented every character reads , "enter".

Python 2.7.9: No module named requests -

i writing code in python 2.7.9 need requests module. installed module using sudo pip install requests still in python 2.7.9 getting error follows: python 2.7.9 (default, jan 5 2016, 18:47:14) [gcc 4.8.4] on linux2 type "help", "copyright", "credits" or "license" more information. >>> import requests traceback (most recent call last): file "<stdin>", line 1, in <module> importerror: no module named requests i checked installation location /usr/local/lib/python2.7/dist-packages , contains requests package directory. same thing works fine in python3 , guessing it's installation error. how can fix ? edit: on executing pip lists , see requests (2.1.9) in list. after ran pip uninstall requests shows requests (2.2.1) in pip list . based on comments, seems have installed python 2.7.9 using method ubuntu doesn't like. because of dist-packages folder not added sys.path . set pythonpath ...

Method post request not working but Get method is working in Laravel 5 -

i getting blank page post request, code working method. here code form: <form class=`search_form` action=`index.php/packages` method=`post`> <div class=`search domain_search`> <div class=`input_box`> <input type=`text` id=`emailtext` placeholder=`your business name...` class=`user_name` onkeyup=`emailsearch()` name=`subdomaintext`> <input id=`token` name=`token` type=`hidden` value=`{{$encrypted_token}}`> </div> <div class=`input_button_box`> <input class=`btn-seconsdary` type=`submit` value=`submit`></div> <div class=`clearfix`></div> </div> </form> route: route::post(`domainsearch`, `sitecontroller@domainsearch`); controller: public function domainsearch() { $data[`user`] = \input::get(`subdomaintext`); return view(`email_search`,$data); }

java - Jenkins - Env Inject - Changing .properties file used in my project -

how inject environmental variables jenkins following structure of automation.properties file of maven project (test-ng). have placed same in config folder of project workspace. baseurl = http://uat.myportal.com/ browser = firefox getdbversion=y testdata = inputtestdata/inputdata.xlsx geomcheckdata = inputtestdata/geometry_check.xlsx c_testdata = inputtestdata/c_testdata.xlsm d_testdata = inputtestdata/d_testdata.xlsm i retrieving properties , add global variables shown below: public void storeallconfigproptoconstants() throws exception { fileinputstream fs = new fileinputstream("config/automation.properties"); config = new properties(); config.load(fs); constants.url = config.getproperty("baseurl").trim(); constants.testdata = config.getproperty("testdata").trim(); constants.getdbversion= config.getproperty("getdbversion").trim(); .... .... } when integrate project jenkins, couldnt change these ...

mysql - Inserting values into a table which is composite primary key with 3 columns, those colums are foreign keys -

my table looks this: create table tbluserfollower ( userid int foreign key references tblusers(userid), followerid int foreign key references tblusers(userid), subcourseid int foreign key references tblsubcourse(subcourseid), statusid int foreign key references tblstatus(statusid), isactive bit not null, createddate datetime default getdate(), createdby nvarchar(50) default 'admin', updateddate datetime default getdate(), updatedby nvarchar(50) default 'admin', primary key(userid, followerid, subcourseid) ) i want write stored procedure insert values table.

extending - Is it a good idea to extend a grails domain object? -

i need similar object grails domain object not need persisting. in order not have make changes in 2 places field changes, idea extend domain class can benefits of single set of fields. although related objects , collections need redone. @cfrick spot on. groovy trait way go. can full example here (bad name project, know). here's quick example: // mytrain.groovy: put in src/main/groovy/my/package package my.package trait mytrait { integer number string } // mydomainclass.groovy: goes other domain classes. package my.package class mydomainclass implements mytrait { /* * number , properties available here. * become table columns. */ static constraints { /* * , can place constraints on them, * had been declared in class. */ } }

php - Insert multiple values in INT field -

Image
i got multiple check box drop down allows user select number of students wants add class. how add multiple student_id in student_class table? field have int instead of varchar because need auto increment. shows error when tried insert multiple value in it. below output need achieve. thankyou yes simple if student_id not auto_increment. try add multiple row's of student class student_id's same class_id's.

php - Export HTML table to text or CSV file -

i have php search page outputs results html table. using jquery plugin allow columns sorted clicking on column headers. allow users download search results txt or csv file, sort order preserved. there way this? browser side (javascript) can't generate downlodable files, need generate server side (php in case). can keep track of last order used javascript , pass forward php script generate file in propper order

javascript - Cannot POST /index.html in AngularJS error in localhost whereas works fine on server -

i working amgularjs project, sign-in in homeview when host project on amazon server whereas din't works in localhost. app.js : //define angular module our app var app = angular.module('blickbeelite', [ 'ngroute']); app.controller('maincontroller', function($scope, $http) { }); app.config(['$provide', '$routeprovider', function ($provide, $routeprovider) { $routeprovider .when('/', { templateurl: 'views/login.html', }) .when('/:templatefile', { templateurl: function (param) { return 'views/'+param.templatefile+'.html' } }) .otherwise({ redirectto: '/' }); }]); and error : cannot post /index.html have included 'angular-route.js' in html?? similar question angular unknown provider , cannot post /signup