Posts

Showing posts from January, 2014

javascript - how to login multiple website by one account? -

i got question project.what want me is: 1)our school has 3 login panel 1 of them library, other 1 student info , more that. 2)so basically, user information id , password same of them.( login panel school has) 3)and want me code script create 1 login panel in order log in of them. is possible do? , not know start? thank you! what want sso (single sign-on), google , obtain lot of informations it

ios - How we change content of WebView -

i want change content of web view when user click bold,italic,underline corresponding change value in html string. implementing code .it change on view how change value in html. newer in ios. please help.any appreciated. - (bool)canperformaction:(sel)action withsender:(id)sender { nslog(@"canperfom action:called"); nslog(@"canperformaction: called"); nslog(@" action %@", nsstringfromselector(action)); if (action == @selector(_showtextstyleoptions:)) { nslog(@"hello"); return no; } if (action==@selector(toggleboldface:)) { nslog(@"bye"); return no; } return [super canperformaction:action withsender:sender]; } - (void)webviewdidfinishload:(uiwebview *)thewebview { [thewebview stringbyevaluatingjavascriptfromstring:@"document.body.style.webkittouchcallout='none'; document.body.style.khtmluserselect='none'"]; nsstring ...

deep learning - data propagation through restriced boltzmann machine -

in rbm, makes relationships within node in probability. how data can propagated through rbm? first order sampling? doesnt have fluctuation? or work feed forward mlp? (ie. hj = \sum_i vi * wij) in rbm there no concept of since paper says is stochastic model.

Multiple ruby installations for multiple projects -

i want use ruby 1.8.7 1 project , ruby 1.9.3 project. possible use both versions simultaneously both projects rvm, , have them deployed. possible .rvmrc? how can configure .rvmrc specific project. you can use pow run more 1 ruby simultaneously. from front page: tame multiple rubies. full support rbenv , bundler, pow makes simple run multiple apps @ once, each own version of ruby , own set of gems. testing apps on alternative runtimes rubinius has never been easier. , gem activation errors thing of past. it require setup, guess going ;)

c# - Fluent Assertions - Overriding comparison in ShouldBeEquivalentTo() -

i have following dto: public class dto { public datetime date { get; set; } } and i'm trying override comparison of property using syntax per fa wiki : public void override_test() { // arrange var actual = new dto { date = datetime.now }; var expected = new dto { date = datetime.now }; // act // assert actual.shouldbeequivalentto(expected, options => options.using<datetime>(x => x.subject.should().becloseto(datetime.now))); } but test not compile. error: cannot implicitly convert type 'fluentassertions.equivalency.equivalencyassertionoptions<fluentassertions.shouldbeequivalentto.override.dto>.restriction<system.datetime>' 'fluentassertions.equivalency.equivalencyassertionoptions<fluentassertions.shouldbeequivalentto.override.dto>' can advise correct syntax? you have tell fa when use using construction using whentypeis<datetime>() . in other words: actual.shouldbee...

java - How to convert BFF file to TAR format -

i downloaded ibm sdk 6 64 bit sr7 ibm using below url. file downloaded bff. inorder complete work in unix os, want tar format instead of bff. please suggest me tool or commands convert or let me know link can download required ibm sdk tar format... blocking @ since days.. support. list of versions : (need jdk 6 64 bit -- sr7) http://www.ibm.com/developerworks/java/jdk/aix/j664/java6_64.fixinfo.html downloaded : https://www-933.ibm.com/support/fixcentral/aix/downloadfixes?release=all&function=fixid&fixids=iz67338,iz67338,iz67338&includerequisites=1&includesupersedes=0&downloadmethod=http requirement : bff tar i think may asking wrong question. trying do, exactly? trying patch java sdk installed on system? running aix? trying download java sdk linux system? here commands should run find out: oslevel -s # running on aix? uname -a; cat /etc/issue # in case you're running linux java -version # java version have insta...

javascript - Angular view not updating according to model -

my angular view not updating when update model. have tried calling $scope.apply() no avail. <div ng-repeat="(key,value) in day.items track $index"> <label class="item item-input item-select"> <div class="input-label"> {{key}} </div> <select ng-model="value[$index].itemname" ng-options="item item item in equipment.{{key}}"> <option value="">select option</option> </select> </label> <label class="item item-input"> <input type="number" ng-model="value[$index].value" placeholder="amount/value"> </label> <button class="button button-balanced button-outline button-block" ng-click="additem(day,key)"> add {{key}} </button> </div> and in controller: $scope.additem = function(day,key) { day.items[key]...

I have found a bug in the Microsoft Dynamics CRM SDK - how and where to report? -

so, believe have found bug in microsoft.xrm.client.dll shipped part of microsoft dynamics crm sdk. my question is, there correct procedure reporting bugs sdk , it? at moment have posted here: https://community.dynamics.com/crm/f/117/t/144464.aspx not sure correct place? product support available direct microsoft , different ontact points if on-premises installation, crm online, or developers msdn subscription.

php - Magento Payment method page blank after enabling compilation -

for paypal multi currency issue, used "web_ppfix" extension gives result well. once, compilation enabled, menu "system configuration >> payment methods" gives blank page, cannot change thing in payment settings. when compilation disabled, payment method page works usual. anyone knows why happens , there workaround?

angularjs - Angular UI-router and using dynamic templates -

i'm trying load template file using rootscope value it's name. have init controller sets $rootscope.template "whatever.html", have route this: $stateprovider.state('/', { url: '/', access: 'public', views: { page: { controller: 'homectrl', templateprovider: function($templatefactory, $rootscope) { return $templatefactory.fromurl('/templates/' + $rootscope.template); } } } }); but doesn't work. freezes whole chrome have kill process in order stop it... i've tried templateurl no results. so how use dynamic template file ui-router? similiar other question (in order found them) : angular , ui-router, how set dynamic templateurl , created a working plunker show how to . how work? so, if state call: <a href="#/parent/child/1">#/parent/child/1</a> <a href="#/parent/child/2">#/parent/child/2</a> and these states: $s...

java - JAX-RS 2.0 - How to get entity from Response object -

i'm using jax-rs 2.0 dropwizard 0.8.0-rc1 , can't figure out how pull entity javax.ws.rs.core.response object. response.getentity() gives me bytearrayoutputstream . can create 2 requests - 1 gives me headers , links , other gives me response entity, seems stupid, wasteful , unclear thing do. there way getting entity response object? my current test code follows: public class groupsresourcetest { public static string configuration_file = "src/test/resources/test-conf.yml"; @classrule public final static dropwizardapprule<bpmconsoleconfiguration> rule = new dropwizardapprule<>(bpmconsoleapplication.class, configuration_file); static client client; @beforeclass public static void initclient(){ client = new jerseyclientbuilder(rule.getenvironment()).build("client"); client.register(httpauthenticationfeature.basic(user.admin.login, user.admin.password)); } @test public void...

oracle - How to update only rows selected in SYS_REFCURSOR -

i want update rows selected in cursor inside procedure , return cursor. procedure below: create or replace procedure p_fetch_test (out_cursor out sys_refcursor) begin open out_cursor select unique_id , comments , status t_test status=0 end p_fetch_test; i want add code in procedure update status column of rows selected in cursor out_cursor . in short, want update rows fetched cursor out_cursor . have updated comments column in following.change whatever want yourself. create or replace procedure p_fetch_test (out_cursor out sys_refcursor) begin update t_test set comments='your_value' status=0; open out_cursor select unique_id , comments , status t_test status=0 end p_fetch_test;

bash - Nested ssh run commands on 2nd server -

i can hostb hosta, , want run commands on hostb. ssh -t $hosta ssh -t $hostb " echo 'hello world!' echo 'test!' " at moment, connect hosta hostb , script pause. type exit (from hostb) return hosta, 2 echo commands printed , automatically exits hosta. how can run commands on hostb? changing code using here document , sshpass can trick ssh -t user@$hosta <<eoa sshpass -p password ssh -t user@$hostb <<eob echo hello eob eoa

How do I go about installing ColdFusion 11 Trial on an Ubuntu 14.04? -

i want try changing development environment windows 8 ubuntu know if possible install cf11 trial on ubuntu? first time working linux. know how install postgre 9.3 , pgadmin. i'm clueless cf though. can me? ubuntu 13.04 , 13.10 supported coldfusion 11. here list of supported environments . can download cf11 here . installation instructions, see: installing server configuration

Columns with varchar vs float in sql server for empty values -

in table there 50 columns float datatype, may empty ( ie null) , partially empty or full each row. what ideal design case to have float column datatype , null empty values to have float column datatype , -1.0 empty values to have varchar datatype , null empty values. i have come across fact if columns of variable length null not occupy space. in case 3rd option desirable afraid of performance due string comparisons search queries. on considering performance , disk usage , ideal solution table. edit : based on suggestions dropping of 2nd , 3rd choice. respect first choice better if create 50 seperate tables each column , join main table primary key . such there won't empty spaces , aslo can use decimal/long datatype. solution hold ? use appropriate datatype. if columns floats, use floats. on limited info, go option 1. 3 terrible idea.

AVPlayer IOS dont work when i popped view controller -

i have view controller , start play audio stream nsurl *soundfileurl = [nsurl urlwithstring:info[@"link"]]; playeritem = [avplayeritem playeritemwithurl:soundfileurl]; player = [avplayer playerwithurl:soundfileurl]; [player play]; player.actionatitemend = avplayeractionatitemendnone; but when popped controller player doesn't work me! what did expect happen? once popped controller player, player gets deallocated , released memory, , therefore cannot play more.

jquery - Countdown timer get values -

i playing around countdown timer. created input fields values , wrapped jquery in function called on button click. inside function did this: var d = document.getelementbyid('#day').value; etc. then in countdown time, instead of number added variable d day not work. can tell me how have jquery pull in value user input? here codepen code: http://codepen.io/bskousen/pen/jopveb it should be var d = document.getelementbyid('day').value; or var d = $('#day').val()

PHP Session Storage and header("location:") Issue -

i'm having trouble session , header. first of all, both working on local development computer. after published website, don't work there. the first problem storing session data. tried everything. i wrote session_start() @ top of page. checked if folder writable is_writable(session_save_path()) method. returns true. but still not working. second header("location: ") . works on localhost not working on server published website. what missing? for example, @ index.php, lines don't work. <?php session_start(); if (empty($_session['counter'])) { $_session['counter'] = 0; } echo $_session['counter'] ++; ?> when refresh page, doesn't increment value. solved! it seems white spaces before session_start() causing problem. removed them , works.

sql - MySQL: update all rows with random numbers from list -

i need run sql query picks random number list , updates specific column it. list of numbers: (101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122) rand table: (structure) id rand type 1 0 false 2 0 true 3 0 false 4 0 true 5 0 true i need pick random number list , update "rand" column, try this: update `rand` set `rand` = (select val ( select 101 val union select 102 union select 103 union select 104 union select 105 union select 106 union select 107 union select 108 union select 109 union select 110 union select 111 union select 112 union select 113 union select 114 union select 115 union select 116 union select 118 union select 119 union select 120 union select 121 union select 122 ) vals order rand() limit 1) it update rand column random value list @ each execution if list of ...

paypal - php in header url error -

i have quick question. using normal html link tag redirect paypal checkout page , working fine when had php inside url. when using in php header url cuts off enter php. header('location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=xxxx&lc=uk&item_name=<? echo $product . " " . $server ?>&amount=<? echo $xprice1; ?>%2e00&currency_code=gbp&button_subtype=services&no_note=0&bn=pp%2dbuynowbf%3abtn_buynowcc_lg%2egif%3anonhostedguest'); you placing php code inside of location redirect string. code not being evaluated php. try instead: <?php $url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=xxxx&lc=uk&item_name=" . $product . " " . $server ."&amount=" . $xprice1 . "%2e00&currency_code=gbp&button_subtype=services&no_note=0&bn=pp%2dbuynowbf%3abtn_buynowcc_lg%2egif%3anonhostedguest"; header('location: ...

command line - Microsoft VBScript runtime error: Input past end of file error -

i getting error: " c:\se2.vbs(28, 6) microsoft vbscript runtime error: input past end of file " when run script (i italicized line 28): dim strinput dim filesys dim path set filesys=createobject("scripting.filesystemobject") set objfso = createobject("scripting.filesystemobject") set ofso = createobject("scripting.filesystemobject") objstartfolder = "c:\program files\apache software foundation\tomcat 7.0_tomcat7_1010\webapps\geniisys\" 'directory search objtempfolder = "c:\users\njediaz\desktop\temp\" objoutputfile = "c:\users\njediaz\desktop\output\files.txt" strinput = inputbox("enter file search (case sensitive):") strsearchfor = strinput showsubfolders objfso.getfolder(objstartfolder) sub showsubfolders(folder) 'wscript.echo folder.path each objfile in folder.files ' wscript.echo folder.path & "\" & objfile.name path = folder.path & ...

alias - How to open webstorm from terminal -

to edit files terminal use subl (for sublime text) in order edit file; example: if need edit app.js file use subl app.js there way can set webstorm open terminal ? try in terminal ' wstorm ' , ' webstorm ' if commands don't work can run in webstorm: "tools" -> "create command line launcher..." note: solution works linux / macos

appcompat - Android appcompact Toolbar title from manifest -

im using appcompat toolbar in drawer layout inside fragmentactivity. inside each fragmentactivity need change title based on activity. there way set title manifest instead of setting in each activity oncreate toolbar.settitle("abc"). note: im not using getsupportactionbar(toolbar) firstactivity extends baseactivity themes.xml <style name="apptheme.base" parent="theme.appcompat.light"> <item name="colorprimary">@color/primary</item> <item name="colorprimarydark">@color/primarydarker</item> <item name="android:windownotitle">true</item> <item name="windowactionbar">false</item> <item name="drawerarrowstyle">@style/drawerarrowstyle</item> </style> <style name="drawerarrowstyle" parent="widget.appcompat.drawerarrowtoggle"> <item name="spinbars">true</item...

android - Empty RecyclerView from JSON to Fragment -

i'm new android development , first real app. did lots of research can't work. i'm trying send json data recyclerview in fragment displays blank screen, no error. here's code: fragment public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { string endpoints = "{\"access\": {\"token\":....; arraylist<hashmap<string, string>> jsonlist; view rootview = inflater.inflate(r.layout.fragment_overview, container, false); jsonlist = endpointsparser.parsejson(endpoints); recyclerview recyclerview = (recyclerview)rootview.findviewbyid(r.id.overviewrv); recyclerview.setlayoutmanager(new linearlayoutmanager(getactivity())); endpointsadapter endpointsadapter = new endpointsadapter(getactivity(),jsonlist); recyclerview.setadapter(endpointsadapter); return rootview; } parser public class endpointsparser extends activity{ public s...

phpstorm - In Laravel, what is meant by the term "clear compiled class" -

i'm trying use service class in laravel called ide-helper. provides auto completion phpstorm. not functioning expected. have been advised should run php artisan clear-compiled. what term "clear compiled" mean ? https://github.com/barryvdh/laravel-ide-helper#automatic-phpdoc-generation-for-laravel-facades many laravel uses optimized class loader better performance. the command php artisan clear-compiled deletes following 2 files: bootstrap/compiled.php created when optimize classes. app/storage/meta/services.json file created laravel tries optimize loading of service providers application uses. for more information on performance optimizing see http://laravel-recipes.com/recipes/60/optimizing-the-framework-for-better-performance

extjs - how to load a same funcion twice in javascript file -

i having init function , want load init function again calling same method. want refresh once same loaded page. example code is ext.onready(kbase.init, kbase); this call kbase.init = function(){ /* ... */ } i want load init function again in same js file. or else want refresh once same js page. just try call init function once more. ext.onread(kbase.init, kbase); /* ... */ $("button").click(function(){ kbase.init; }); or check if there "updated" function object.

python - How to Make view_config decorator work with a Pyramid Unit Test? -

i wrote login_required decorator pyramid web framework. in pyramid test server works well. but in pyramid unit tests @view_config decorator not work configurations (not decorator parameter). this code: class myviews(object): @view_config(decorator=login_required(login_url=login_url), match_param="action=change_password", request_method="get", renderer="accounts/change_password.jinja2") def change_password(self): form = changepwdform() return {'form': form} here test code: def test_change_password_fail(self): .views import accountsviews aviews = accountsviews(testing.dummyrequest(path='/accounts/forget_password')) response = aviews.forget_password() self.assertequal(response.status_code, 307) #httptemporaryredirect what excepted not-logined-user redirected login url. paramenters in @view_config such renderer , 'match_param' not ...

java - Show small window after button click -

Image
i looking way display small window beside button when clicked. using jface dialog not looking for, rather kind of window can positioned beside button tool tip. you can use second shell , position next button : public static void main(string[] args) { final display display = new display(); shell shell = new shell(display); shell.setlayout(new gridlayout(1, false)); button button = new button(shell, swt.push); button.settext("button"); final shell popup = new shell(shell, swt.none); popup.setlayout(new filllayout()); text input = new text(popup, swt.border); button.addlistener(swt.selection, new listener() { @override public void handleevent(event event) { if(popup != null && !popup.isdisposed()) popup.close(); } }); shell.pack(); shell.open(); popup.pack(); popup.open(); popup.setlocation(button.todisplay(button.getbound...

windows - Writing command prompt to a file -

i started cmd , using commands started services starts new cmd window , shows logs in window , closed within seconds. want redirect file. have tried below command > d:\temp.txt but of no use...can 1 tell me how try this command > d:\temp.txt 2>&1 but command works fine. update question command clear answer.

VCL styles missing in Delphi XE3 -

Image
my list of vcl styles empty in delphi xe3. i have delphi xe7 installed, , vcl styles showing fine in here. i have checked other solutions, one of which suggests checking style files exist in correct paths, do. delphi xe3, be: c:\users\jason\documents\rad studio\10.0\styles there 27 .vsf files in directory. another posting suggested running redistsetup.bat file ran "default" option, made no difference. does have other ideas of check, please? you need relocate styles : c:\users\public\public documents\rad studio\10.0\styles

ios - Google map SDK on iOS5.1 -

i using google map sdk in app. app supports deployment target of ios >=5 google map sdk included in app supports ios >=6. so, when run app on ios5 , app crashed following error : dyld: symbol not found: _objc_class_$_uiactivityviewcontroller i want run same app on ios5 excluding google map sdk.does 1 know how include google map sdk in app if device ios version >=6? have option make google map framework " optional " or importing google maps header using ios version macros ? if yes, pointers?

Google Visualization - Chart Wrapper with Diff Chart w/ Stacked Column Charts -

i developing dashboard has bunch of charts , pulls data google spreadsheet. 1 chart diff chart stacked column graphs. essentially, there stacked column graph in front , behind. same concept diff chart column graphs, have stacked column graphs displayed. dashboards, charts must in in chart wrapper, cannot think how this. is possible? have ideas? thanks. i wasn't able diff chart work in chart wrapper, solution developed consists of having front graph 'transparent' fill , narrow bars. similar-sized stacked column chart can positioned underneath div (with smaller z-index). same effect trying have...

Using a CSS id with f.select in html.slim -

i'm baffled trying figure out how put css id f.select, using html.slim template (i loathe .slim, unfortunately, working on else's project). here have: = f.select(:state, options_for_select(us_states, @user.state), id: "state-dropdown") i have tried moving parenthesis around , every other combination can think of, doesn't work. code above load, doesn't anything, , further confuse me, when inspect element, shows having id of "user_state". i know i'm missing obvious, html.slim documentation lacking. can shed light on going on here? in case matters, rails 4.0.0 ruby 2.1.2p95 . in advance! look @ docs , html_options = {} last argument, should be: = f.select(:state, options_for_select(us_states, @user.state), {}, id: "state-dropdown")

android - java.lang.AbstractMethodError on lint when using gradle build -

this build.gradle: buildscript { repositories { mavencentral() } dependencies { classpath 'com.android.tools.build:gradle:0.14.0' classpath 'com.github.jcandksolutions.gradle:android-unit-test:1.6.3' } } allprojects { repositories { maven { url "http://dl.bintray.com/populov/maven" } mavencentral() } } apply plugin: 'com.android.application' android { lintoptions { abortonerror false } packagingoptions { exclude 'license.txt' exclude 'meta-inf/license' exclude 'meta-inf/license.txt' exclude 'meta-inf/notice' exclude 'meta-inf/notice.txt' exclude 'meta-inf/lgp2.1' exclude 'meta-inf/lgpl2.1' } compilesdkversion 21 buildtoolsversion "21.1.0" defaultconfig { applicationid "com.example" minsdkversion 9 ...

wso2is - WSO2 Self Registration Confirmation Email -

i have client using userinformationrecoveryservicestub register new users. works until configure wso2 send confirmation email. in identity-mgt.properties set: identity.listener.enable=true notification.sending.internally.managed=true authentication.policy.account.lock.on.creation=true notification.expire.time=7200 notification.sending.enable=true authentication.policy.enable=true now when client call userinformationrecoveryservicestub.registeruser(), user added user store no email sent , client receives following exception: severe: null org.wso2.carbon.identity.mgt.stub.userinformationrecoveryserviceidentitymgtserviceexceptione(uxception: userinformationrecoveryserviceidentitymgtserviceexceptionexception @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:62) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:45) @ ...

About Wordpress theme architecture: one index.php vs. multiple template files -

Image
just quick questions wordpress wizards out there regarding wordpress theme architecture: what’s better in terms of performance, syntax, maintenance, etc.? version a: one index.php includes external parts (different loops , other structural) elements depending on if is_page , is_archive , is_single , is_tax , etc. or version b: separate files index.php , pages.php , single.php , archive.php , etc. version b going better performance, organizational standpoint. take @ way template files called generate wordpress page based on wordpress template hierarchy. straight the codex on template hierarchy . as can see, index.php last template looked during request. also, , perhaps more subjective, breaking templates individual files makes things easier maintain, don't have 1 huge file conditional statements. each template single thing, , thing well. edit: well, hoping you'd able see image...but here's original codex: http://codex.wordpress.org/images/...

sql - avoiding duplicate data in a "customers also bought" table -

i writing feature store website suggest other products other customers bought products in current customer's shopping cart. my plan have job trawls orders database , updates many-to-many table tracking how each pair of products associated 1 another. thought have structure this: +--------------+--------------+----------------+ | product_a_id | product_b_id | times_together | +--------------+--------------+----------------+ | 12 | 53 | 118 | +--------------+--------------+----------------+ then realized not avoid duplication of data in table definition rows this: +--------------+--------------+----------------+ | product_a_id | product_b_id | times_together | +--------------+--------------+----------------+ | 53 | 12 | 118 | +--------------+--------------+----------------+ so increment association new order, have 2 queries: update also_bought set times_together = times_together + 1 product_a_id = 12 , produ...

Listen to if a button is disabled or enabled in JavaFX -

i want code allows me listen changes made on textfield component disabling or enabling button called save . possible using bindings or similar? for example: save.disableproperty().bind(...) used 2 textfield components changing information stored in tableview . used data binding when tableview row selected, information in row displayed in textfield . @fxml private tableview<userdata> table; @fxml private tablecolumn<userdata, string> col1; @fxml private tablecolumn<userdata, string> col2; @fxml private textfield name; @fxml private textfield email; @fxml button newuser; @fxml button save; @fxml button delete; private connection conn; private statement stm; private preparedstatement prep; private resultset result; /** * initializes controller class. */ @override public void initialize(url url, resourcebundle rb) { populatetableview(); configuredisable(); table.getselectionmodel().selecteditemproperty().addlistener(userdatalistener); nam...

c++ - How to add a Menubar to a QWidget? -

i writing c++ application using qt framework, in 'main window' inherits qwidget class: class draughts : public qwidget { q_object public: explicit draughts(qwidget *parent = 0); ~draughts(); private: ui::draughts *ui; }; and attempted add simple menu bar application, using following code: draughts::draughts(qwidget *parent) : qwidget(parent), ui(new ui::draughts) { ui->setupui(this); qwidget *menuwidget = new qwidget; qmenu *menugame = new qmenu("game"); menugame->addaction("new"); menugame->addaction("exit"); qmenu *menuhelp = new qmenu("help"); menuhelp->addaction("how play..."); menuhelp->addaction("about"); //setup application menu qmenubar mainmenu(this); mainmenu.addmenu(menugame); mainmenu.addmenu(menuhelp); } should using qmainwindow class instead of qwidget class application? it easier use qmain...

servicestack - Auth Service Saying Not Authenticated when using Permanent Sessions -

when using temporary sessions works fine. log auth service , calling /auth without parameters , shows display name, session id, etc. when log in rememberme=true, call returns session information properly. on subsequent calls /auth without parameters, servicestack returns 401 not authenticated. session object's isauthenticated property true , exists. code checks , if it's false, forwards user login page doesn't happen know user authenticated. i not doing different. how can authenticate permanent session , subsequent calls /auth acknowledge logged in? if helps i'm using customcredentialsprovider. update: apphost code: public override void configure(funq.container container) { //set json web services return idiomatic json camelcase properties servicestack.text.jsconfig.emitcamelcasenames = true; config.restrictallcookiestodomain = configurationmanager.appsettings["cookiedomain"]; plugins.add(new authfeatu...

php - jquery clone to add more fileds -

working example in jsfiddle $(function () { $("#addbutton").on("click", function () { var newrow = $(".addrows").first().clone().addclass("newadded"); newrow.appendto("#textboxesgroup"); }); <form enctype="application/x-www-form-urlencoded" action="" method="post"> <table id="textboxesgroup" style="width:auto;margin:0 auto;" > <tr class="addrows"><td class="required"> start time:<br/> <input type="text" name="starttime[]" id="starttime" value="" class="time" size="5"> <button name="starttimenow" id="starttimenow" type="button" onclick="var currentdate = new date(); var hours = currentdate.gethours(); var minutes = currentdate.getminutes(); if(hours < 10) { hours = &#3...

android - Button click event is not working when inflated layout is used -

please can me, since new android not able solution - button onclick event not working if use inflated layout. here usemerge.xml code, <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#2996ff" > <linearlayout android:id="@+id/i1" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > </linearlayout> </relativelayout> toplayout.xml <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linear1" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <button android:id="@+id/butt1" ...

java - How can i write the validation for number+string? -

i stuck small problem. think in java can write validation want smart logic. in registration page there name field. name should rahul0533 not 0533rahul.. for wrote logic getting first char in string , check.i think huge. please how can validate. here in name field , name should not start special characters , numbers. remaining accepted. try use regex validation string name = "client name"; string patternstring = ""; // regexp pattern pattern = pattern.compile(patternstring); matcher matcher = pattern.matcher(name); regex basic syntax http://tutorials.jenkov.com/java-regex/syntax.html

bit manipulation - Manipulating hexadecimal data in Haskell -

i have csv file full of logged data process in haskell. data in csv file in hexadecimal format. when read haskell have strings such "0xff5fffc8ec5ffedf" represents 8 bytes of data. to process data, convert string data type allow me bit twiddling (bitwise and, or , xor). when done convert final result hex sting can write file. is easy in haskell? modules should looking at? you can use read parse ints or floats. in prelude can use without additional modules. try: a = "0xff5fffc8ec5ffedf" b = read a::double (it gives b = 1.8401707840883393e19) also, parsing csv, may aswell make own functions it. have week ago written simple csv parser. module csvutils ( parsecsv, showcsv , readcsv , writecsv , colfields , separator, document , csv , entry , field ) import data.char import data.list {- simple utility working csv (comma-separated value) files. these simple textual files fields delimited character (usually comm...

java - How to do multiple page form submission with ajax request -

the application ship items on 1st page customer fills information. on 2nd page gets different rate options choose from. on 3rd page needs fill address info. on 4th page payment info & on. now let's customer enter details on 1st page. send ajax request server & different rates options. once come in ajax success, need change page 2nd jsp. once customer chooses rate options again make ajax request & 3rd jsp & on. i need implement ui side of code without reloading or redirecting page. 2nd & 3rd jsps should have button go previous page. is possible jquery setting/replacing divs or there plugin use twitter bootstrap carousel? i need in ajax success function can go next or prev jsps submit & buttons? using spring mvc framework. i think bit confused makes what: mixing jsp , ajax, server side computation , client side. don't care jsp or spring. have nothing need: going implement single page application , jsp , spring in charge of deliver da...

unit testing - Is NUnit 3 removing the 'classic' syntax for tests? -

nunit has two styles of writing test . classic style assert.areequal(x, y); new style assert.that(y, is.equalto(x); the release notes nunit 2.9.3 (scroll down!) says support old style tests has been removed do mean classic style removed? it not removed in v3. looking @ latest alpha 2 can see methods are* still exist in assert object eg public static void areequal(int expected, int actual) { assert.that<int>(actual, is.equalto(expected), null, null); } old style tests prefixing of tests "test" (see launchpad )

objective c - is there a compatibility checker at XCode? -

can xcode check code compatibility against specific os x version? or external tool? i have project that's using function exists @ 10.9 , newer, though set xcode deployment target 10.7, builds without errors when trying run application on 10.8, doesn't work!! how can functions minimum os version required? xcode not provide tool check whether method available deployment target. if know method available specific version can check whether method available: if ([self respondstoselector:@selector(newmethodnotalwaysavailable:withparameters:)]) { [self newmethodnotalwaysavailable:@"1" withparameters:yes]; } else { // call other method don't anything. } you can ut classes: if ([somenewclass class] ) { // class available , can use }

objective c - MPMoviePlayerController in iOS 8 navigationBar remain visible after exiting Full Screen -

Image
for playing video using mpmovieplayercontroller ,my app supports portrait mode playing video need support landscape too. every thing working fine till ios 7.x. in ios 8.0, after exiting full screen there remains navigation bar. please refer below image. in app delegate, under supportedinterfaceorientationsforwindow , following used. -(nsuinteger)application:(uiapplication *)application supportedinterfaceorientationsforwindow:(uiwindow *)window { if (self.forcelandscaperight) { return uiinterfaceorientationmaskall; } return uiinterfaceorientationmaskportrait; } noe in controller class initiating mpmovieplayercontroller: [self.mpmovieplayercontr setcontenturl:object]; [themoviplayer preparetoplay]; self.mpmovieplayercontr.controlstyle = mpmoviecontrolstyleembedded; self.mpmovieplayercontr.scalingmode = mpmoviescalingmodeaspectfit; [self.mpmovieplayercontr play]; self.mpmovieplayercontr.view.autoresizingmask = uiviewautoresizing...

javascript - Is there a design pattern to manage parallel AJAX queries? -

i developing web application retrieving data several web services (let's 2 simplify). has retrieved 1 service not depend on has been retrieved other, can launch ajax requests in parallel. need perform actions once both queries have returned data. since seems usual, wondering if there well-formalised , accepted design pattern that. doing far there (using jquery): var data1 = null; var data2 = null; $.ajax({ url : url1, success: function(data) { data1 = data; if(data2) perform(); }, }); $.ajax({ url : url2, success: function(data) { data2 = data; if(data1) perform(); }, }); function perform() { //do interesting stuff on data1 , data2 } would as-well ? you can check : jquery: api.jquery.com/jquery.when we can use jquery's $.when() method, takes list of these "deferred" objects (all jquery ajax methods return deferred objects) , provides single callback. syntax $.when( // deferred...