Posts

Showing posts from February, 2013

how to add more than 100 varient of a product in shopify -

i have 175 variant of product, shopify shows warning can not add more 100 variants product. how can resolve problem? you can't. that's restriction shopify products. won't able add more 100 variants a single product. however, trying model? if there's not change of price, example, you're selling t-shirts , color of t-shirt doesn't correlate change of price, can model using line item properties . you can collect customization information products using line item properties. line item properties let customers add information product when add cart. example, can let customer specify text monogram or engraving on product. you can make own dropdown sets line item value of color, name example. more information on official tutorial here . if need 175 different prices, should split on 2 products , set template custom template manipulate things accordingly. please notice, have negative impact on seo if not handled properly.

Is it possible to create an Azure CDN with Azure Files Storage? -

all documentation talks azure blob storage used cdn. unfortunately azure web portal doesn't allow me upload "blobs" blob storage. on other side can files storage type . however wasn't able access files storage through cdn endpoint. not supported? do need use blob storage , upload files programmatically? we can access azure file storage via smb or rest api. if want use anonymous http access, suggest choose azure blob storage. if want use cdn in azure file storage. think need write web application , access files via rest api. need connect cdn web application.

Simple MySql Select Queries are slow in C# but fast in MySql Workbench -

i don't have experience mysql, 1 of clients have asked hook thier mysql database. designed simplest query ever, basic select statement follows: select dateandtime, conveyor_belt_weight_theoretical_max_value conveyor_belt dateandtime >= '2016-08-19 01:51:40' , dateandtime < '2016-08-19opcsystems_to_air_airopcsystems_to_air_system_air_system 14:45:36' order dateandtime limit 1000 in visual studio code, connect mysql follows: datatable _dt = new datatable(); using (var cmd = this.mysqlconn.createcommand()) { if (this.mysqlconn.state != connectionstate.open) this.mysqlconn.open(); cmd.commandtext = sqlquery; using (mysqldatareader results = cmd.executereader()) { if (!results.read()) return null; _dt.columns.clear(); (int = 0; < results.fieldcount; i++) { _dt.columns.add(results.getname(i)); } _dt.load(results); } } return _dt; i feed exact same query procedure...

osx - Swift: How to not load AppDelegate during Tests -

i have os x application on startup loads data server , pushes notifications nsusernotificationcenter . have problem happens during unit tests. found no way yet prevent this. of course stub http loads. in cases want test loading , notifications sent anyway. what i'm trying make test runs not load appdelegate fake 1 i'm using tests. found several examples [1] on how uiapplicationmain , can pass specific appdelegate class name. same not possible nsapplicationmain [2]. what i've tried following: removed @nsapplicationmain appdelegate.swift , added main.swift following content: class fakeappdelegate: nsobject, nsapplicationdelegate { } nsapplication.sharedapplication() nsapp.delegate = fakeappdelegate() nsapplicationmain(process.argc, process.unsafeargv) this code runs before tests has no effect @ all. i might have say: appdelegate empty. handle mainmenu.xib stuff made separate view controller actual loading , notification stuff in awakefromnib . [1] http:...

c# - Outlook Add-in 2010 -

i have created add -in outlook using outlook add-in 2010, want work same in outlook 2007 , outlook 2013 in outlook 2013. created ribbon , custom menu, these functionalities working fine in outlook 2010. in outlook 2007 ribbons not getting displayed(even add in tag not visible) menu working fine , in outlook 2013, menu not displayed ribbon working fine. is there compatibility issues while using outlook add-in 2010? i used visual studio 2010 (.net framework 4). please provide solution this. i need write outlook add-in supported in 2007/2010/2013.

javascript - `npm run jshint` results in `missing script: jshint` -

i'm trying jshint few javascript files, reason local npm install of jshint isn't working. the package there: $ npm list --depth=0 testapp@1.0.0 /users/me/workspace/testapp └── jshint@2.9.3 and error following: $ npm run jshint npm err! darwin 15.4.0 npm err! argv "/usr/local/cellar/node/5.6.0/bin/node" "/usr/local/bin/npm" "run" "jshint" npm err! node v5.6.0 npm err! npm v3.6.0 npm err! missing script: jshint npm err! npm err! if need help, may report error at: npm err! <https://github.com/npm/npm/issues> npm err! please include following file support request: npm err! /users/me/workspace/testapp/npm-debug.log i can work around global install, i'd prefer have working locally. according the documentation npm run alias npm run-script , runs 1 of scripts in package.json file. if add jshint script entry package.json , should run locally-installed jshint : { "name": ..., ...

symfony - Symfony2 How to upload files Product->getPicture() on new record return null -

i try use symfony2 bundle vichuploaderbundle. when use record saved in database , request product->getpicture() receive uploaded file information. when try create it $product = new product(); $product->getpicture() i null object , can not upload files. product class. /** * @orm\entity(repositoryclass="crelabs\bundle\productbundle\entity\productrepository") * @orm\table(name="product") */ class product { use ormbehaviors\translatable\translatable; /** * @orm\id * @orm\column(type="integer") * @orm\generatedvalue(strategy="auto") */ protected $id; /** * @orm\column(type="string", length=20, nullable=true) */ protected $sku; /** * @orm\column(type="float", scale=2) */ protected $price; /** * @orm\column(type="float", scale=2, nullable=true) */ protected $msrp_price; /** * @orm\column(type="string...

python - UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 448: ordinal not in range(128) -

i using selenium python scrape linkedin data. can parse through various webpages , scrape data process interrupted after first few pages due unicode error. here's code: from selenium import webdriver time import sleep driver = webdriver.firefox() driver.get('https://www.linkedin.com/jobs/search?locationid=sg%3a0&f_tp=1%2c2&orig=fctd&trk=jobs_jserp_posted_one_week') result = [] while true: while true: try: sleep(1) result +=[i.text in driver.find_elements_by_class_name('job-title-text')] except: sleep(5) else: break try: in range(50): nextbutton = driver.find_element_by_class_name('next-btn') nextbutton.click() except: break open('jobtitles.csv', 'w') f: f.write('\n'.join(i in result).encode('utf-8').decode('utf-8')) you can use unicodewriter (from python docs): impo...

ruby on rails - MongoDB: Different applications connecting to different replicas -

we use mongodb central database our application; consumer facing mobile app. @ present 7-member replica-set replica-set-1 being master @ moment. backend connects mongo replica build in ruby on rails , use mongoid odm. there 3 pieces connecting mongodb replica-set. the consumer application the admin , customer care management application the data retrieval application ( analytics , such purposes ) all these 3 apps connect same replica set of now. what know whether possible connect different applications specific replicas. for example, mobile app connects primary writes , replicas 2-4 read; customer care management application connects primary ( writes ) , replicas 5-7 reads. i dont think explicitly mentioning specific replicas in mongoid.yml configuration working. though have mentioned replica-set-7 in mongoid hosts file data retrieval application, see queries in log file of replica-set-2 , 3 . so obviously, mongodb decides criteria distribute queries among rep...

python - Is there a way to access the properties of a class created in one function from another function? -

is there way access properties of class created in 1 function function ? class component(object): name = '' num = 100 def __setattr__(self, name, value): object.__setattr__(self, name, value) def one(): exec('aaa' + '=component()') aaa.name = 'aaa' aaa.num = aaa.num * 2 print '1', aaa.name, aaa.num def two(): print '2', aaa.name, aaa.num one() two() i "nameerror: global name 'aaa' not defined" class level attributes belong class , therefore shared among instances of class. if want different instances of class have different name , num attributes (by way, should using lowercased attribute names instances), should add them instance attributes. can access class attributes using class name (e.g. component.num ). class component(object): name = '' num = 100 def __init__(self, name, num): self.name = name self.num = num pri...

php - Return array key by value given (month given to return a date) -

i have php multidimensional array key , array under has dates. array ( [123] => array ( [one] => 2016-01-22 10:32:15 [two] => 2016-02-21 14:24:15 [three] => 2016-02-12 11:00:15 ) [553] => array ( [one] => 2016-03-22 10:32:15 [two] => 2016-02-21 14:24:15 [three] => 2016-08-12 11:00:15 ) ) i need key month given. example: $value = '2016-02'; return 123 -> 2 return 552 -> 1 how best approach achieve this? thank you. you can below in simple way:- <?php $array = array ( '123' => array ( 'one' => '2016-01-22 10:32:15', 'two' => '2016-02-21 14:24:15', 'three' => '2016-02-12 11:00:15' ), '553' => array ( 'one' => '2016-03-22 10:32:15', 'two' => '2016-02-21 14:24:15', 'three' =...

ddms - Systrace - error truncating /sys/kernel/debug/tracing/set_ftrace_filter: No such device (19) unable to start -

i working on project aims find out system doing behind series of user interaction on android ui. example, if user click send button in facebook messenger, measured response time such action 1.2 seconds. goal figure out 1.2 seconds consist of. friend suggested should take 'systrace'. however, when tried systrace on htc 1 m8, have encountered problems: first, error opening /sys/kernel/debug/tracing/options/overwrite - no such file or directory. solved problem building support of kernel following http://opensourceforu.com/2010/11/kernel-tracing-with-ftrace-part-1/ , mount -t debugfs none /sys/kernel/debug. find tracing directory. besides, set ro.debuggable=1 in file default.prop within ramdisk , burn boot.img phone. now encounter problem: when run - python systrace.py --time=10 -o mynewtrace.html sched gfx view wm, following error(19) pop up: error truncating /sys/kernel/debug/tracing/set_ftrace_filter: no such device (19). don't know if way building kernel support sy...

c# - Range for Datepicker -

i want make datepicker allow select start , end date create range. when use dates on airline sites... has pick start , end in 1 popup of datepicker . the examples see ranges 2x datepicker , use 1 start , other end. has done or know properties enable behave way? you can use calendar control instead, allows select multiple dates hence giving range of dates. have change it's style make datepicker control. here link customizing calendar control: https://msdn.microsoft.com/en-us/magazine/dd882520.aspx another one: http://classpattern.com/wpf-popup-calendar.html#.v700ju197iu

javascript - Lazy load scroll with nightmare JS -

i'm new nightmarejs , wrote script scrape website. works that. login profile, wait site load, go likes profile , there want scroll down till end of site. @ moment use kind of ugly work around , wonder if there way scroll down bottom of page results, , go next step. var nightmare = require('nightmare'); var vo = require('vo'); vo(run)(function(err, result) { if (err) throw err; }); function *run() { var nightmare = nightmare({ show: true, webpreferences: { partition: 'your-custom-partition'}}); yield nightmare .goto('https://facebook.com/login') .type('input[id="email"]', "user") .type("input[id='pass']", "pass") .click('#loginbutton') .wait('._8u._42ef') .goto('https://www.facebook.com/myprofile/likes') .wait(1000) yield nightmare .evaluate(function() { window.document.body.scrolltop =...

c# - Improving Entity Framework Performance during testing -

i'm trying reduce startup time tests against ef 6x datastore. tests within transaction , db gets rolled once done. appreciate suggestions on how retain instance of dbcontext between test sessions ef doesn't have go through whole view generation process again? i don't want use mocks/fakes, non-microsoft branch of ef , interactive views in place. thank you. different options. did not mentioned aim of testing , there not code, options are: if inserting many records tables, can bulk insert. best library doing is: entityframework.bulkinsert-ef6 . can install through nuget console. if see slowness while working data , have many load/manipulation/save operations, have in-memory operation sampath recommends. if loading data, load columns need. should use lazy loading option(which post, think know well). 4.some portion of slowness because of architecture of database. key column types have considerable effect on operations!

unity3d - Vuforia Android SDK explained samples? -

i'd appreciate if can provide sources can me understand how vuforia samples android work? i've installed , can run them on phone it's difficult understand project structure. it great if there's tutorial on how create simplest ar app android studio (not unity ). i've learnt how create ar scenes unity, export them android , run on device, still don't understand how work exported project in android studio further. my goal have 1 image target , several 3d objects. want have simple ui listview choose object place on target. also, possible build listview android , on item's click event switch 3d object in single scene created in unity? know can dynamically load 3d models unity c# script, can trigger function in script via android? i'd appreciate advice. summary: first upload picture vuforia cloud returns xml , .dat file. stored in streaming assets. dat file contains info in binary format marker. xml contains info name , size , lin...

osx - How can I build and install a C program on OS X with debugging symbols? -

how can build , install c program debugging symbols on os x? i'm trying build ( mutt ) debugging symbols on os x, me track down crash. i'm following homebrew formula mutt in build process. no matter try, resulting binary has no debugging symbols. build cflags='-g -o0' (after having tried default '-g -o2' in makefile). can see when see make output go using these flags should be, , don't see strip or install -s invocations; resulting binary has no debugging symbols, seen trying run in gdb or lldb, or running dsymutil on it. i'm trying understand the valgrind instructions on matter; basically, linker on os x doesn't put debug symbols exist in object files linked result -- read saying have run dsymutil on linked result, i'm little unsure whether automatically pulls in symbols object files, or if there's way need specify them. and if knew how use dsymutil here, don't see there debug symbols in of .o files. finally, i'm won...

swift - iOS Today Extension Crashing -

we've added today extension our app recently. its extension simple tableview load data our server, written in swift. but after extension online our users, we've received lots of crash data crashlytics , apple reporting same crash issue either. however, can't reproduce crash, or find reason of crash, because crashing on widgetperformupdatewithcompletionhandler method called system. below detail of crash log, information replaced. crashed: com.apple.main-thread 0 myappwidget 0x100091d8c myappwidgetviewcontroller.(widgetperformupdatewithcompletionhandler((ncupdateresult) -> ()) -> ()).(closure #1) (myappwidgetviewcontroller.swift) 1 myappkit 0x100603ab4 partial apply thunk (postservice.swift) 2 myappkit 0x100626080 servicerequestperfomer.(performrequest(a, complete : ([b]?, nserror?) -> ()?) -> ()).(closure #1) (servicerequestperformer.swift:35) 3 myappkit 0x100...

go - Golang Non-Struct Type Pointer Receiver -

i created custom type based on golang net.ip type. surprised me method declared pointer receiver custom type can't modify value receiver points. the u variable in code snippet remains nil after calling u.defaultip() . ip can modified if changed custom type struct ip field , method defined pointer receiver struct. missing? executable example can found here . type userip net.ip func main() { var u *userip u.defaultip() fmt.printf("%v\n", u) } func (u *userip) defaultip() { defaultip := userip("127.0.0.1") u = &defaultip } you need dereference u before setting it's value. from example, change defaultip := userip("127.0.0.1") u = &defaultip to *u = userip("127.0.0.1") for example updated , working: https://play.golang.org/p/ycclt0ed9f

javascript - Detecting input change in jQuery? -

when using jquery .change on input event fired when input loses focus in case, need make call service (check if value valid) input value changed. how accomplish this? updated clarification , example examples: http://jsfiddle.net/pxfunc/5kpej/ method 1. input event in modern browsers use input event. event fire when user typing text field, pasting, undoing, anytime value changed 1 value another. in jquery this $('#someinput').bind('input', function() { $(this).val() // current value of input field. }); starting jquery 1.7, replace bind on : $('#someinput').on('input', function() { $(this).val() // current value of input field. }); method 2. keyup event for older browsers use keyup event (this fire once key on keyboard has been released, event can give sort of false positive because when "w" released input value changed , keyup event fires, when "shift" key released keyup event fires ...

javascript - Moment.js how do you get the current Quarter and previous three quarters along with year? -

is there way current quarter , previous 3 quarters along year, example should return 4 quarters this q3-2016 q2-2016 q1-2016 q4-2015 here's solution using moment.js: const moment = require('moment'); let fmt = '[q]q-y'; let quarters = [ moment().format(fmt), moment().subtract(1, 'q').format(fmt), moment().subtract(2, 'q').format(fmt), moment().subtract(3, 'q').format(fmt) ]; // quarters = [ 'q3-2016', 'q2-2016', 'q1-2016', 'q4-2015' ] or more concise version: let quarters = [ 0, 1, 2, 3 ].map(i => moment().subtract(i, 'q').format('[q]q-y') )

python - My answers are 5, 4, 3, 2,but when I run the code ,the answers are 5, 4.Why? -

num = 5 if num > 2: print(num) num -= 1 print(num) here thoughts:5>2,5,4; 4>2,4,3; 3>2,3,2; 2.so answers 5, 4, 3, 2 when run code,the answers 5 ,4. don't understand it. use while instead of if . >>> num = 5 >>> while num > 2: ... print(num) ... num -= 1 # 5 # 4 # 3 >>> print(num) # 2

html - Uploading an XAMPP subfolder to a web server -

i'm new xampp, , don't know more html , css. i've put website subfolder in htdocs called test . in html, have relative links /test/path/to/image.jpg . i planning on uploading subfolder test server using ftp. question is, encounter problems because of way have links formatted? when website live, i'd url more example.com/path/to/image.jpg rather example.com/test/path/to/image.jpg . better use ../ define paths instead? i've seen similar questions required people use .htaccess file, can't find that/don't know how use it. again, sorry total lack of knowledge on this; i'd super grateful help. /test/path/to/image.jpg isn't relative path/link - absolute, meaning web server try serve file http://www.example.com/test/path/to/image.jpg . if file served using relative url, should use: path/to/image.jpg which serve file relative page requesting it. if requesting page in test directory, , document root test directory, server ...

javascript - Binding ajax page in angular.js -

i tried coding angular.js 1.5. <div class="container clearfix" id="mainmenu" ng-controller="mainmenucontroller mainmenu"> <ul class="menu clearfix" ng-init="tab = 'ant'"> <li class="menu1" ng-class="{menu_active:mainmenu.isselected('ant')}"> <a href="#!/anttalklist" ng-click="mainmenu.selecttab('ant')">개미생톡</a></li> <li class="menu2" ng-class="{menu_active:mainmenu.isselected('expert')}"> <a href="#!/experttalklist" ng-click="mainmenu.selecttab('expert')">전문가생톡</a></li> <li class="menu3" ng-class="{menu_active:mainmenu.isselected('club')}"> <a href="#!/clubtalklist" ng-click="mainmenu.selecttab('club')">둥지생톡</a></li...

python - Jenkins - pip having long shebang line: No such file or directory error -

i have jenkins job in using virtualenv , installing python modules (enlisted in requirements file). my code pretty simple: virtualenv env source ./env/bin/activate echo $(python --version) echo $(which pip) echo $(pip --version) when job runs, python , pip show me correct output pip --version throws error: ++ python /scratch/jenkins/ncs-jenkins/workspace/proj/docker/mail/tools/ici/gate/kokilla-gold/testproj-my deploy-newchanges-20/env/bin/python ++ pip /scratch/jenkins/ncs-jenkins/workspace/proj/docker/mail/tools/ici/gate/kokilla-gold/testproj-my deploy-newchanges-20/env/bin/pip ++ pip --version /tmp/hudson2230168319717284464.sh: /scratch/jenkins/ncs-jenkins/workspace/proj/docker/mail/tools/ici/gate/kokilla-gold/testproj-my deploy-newchanges-20/env/bin/pip: /scratch/jenkins/ncs-jenkins/workspace/proj/docker/mail/tools/ici/gate/kokilla-gold/testproj-my deploy-newchanges-20/: bad interpreter: no such file or directory i think what's going on here shebang ...

algorithm - Given a sorted array which is rotated 'N' times. Find the value of 'N'. The array can have duplicate elements -

for example if input (1,2,3,4,1) ans 4 (1,2,3,4)->0 (5,1,2,3)->1 if array not contain duplicate elements,it simple solve (using modified binary search) here,it contains duplicate elements ? in advance !! i think original o(log n) approach no longer work in case array contains duplicate elements. since there duplicate elements, cannot rule out half of array elements when searching "turning point" (the point array element max element, followed min element) for example: {1, 1, 1, 1, 2, 1}, a[0] = a[5] = a[(0+5)/2] = 1. cannot discard half of elements there's not enough information indicating turning point lies. so, pretty straight forward way o(n) sequential search turning point.

java - minecraft cannot find symbol -

package net.minecraft.modproj; import net.minecraft.creativetab.creativetabs; import net.minecraft.item.item; public class itempadding extends item { public itempadding() { this.setcreativetab(creativetabs.misc); this.sethassubtypes(true); } } whenever run mcp931 recompiler on it, tells me src/minecraft/net/minecraft/item/itempadding.java:3: error: cannot find symbol public class itempadding extends item { ^ the error did have last word "item" in lowercase, in code wasn't in lowercase. have it?

javascript - The angular datepicker totally mis-behavior as expectation -

Image
i ran deadly chaos on datepicker issues. who can solve problem can give 100 point return. when click calendar on 2016-08-23 show me 2016-08-22 date value. furthermore, date value in angular model not correct. i want make output can consistent. to reproduce buggy issue, change timezone between la , tokyo demo site: https://test.jiyubi.com/tour_package/home controller js app.controller('tourpackagestartdatepickerctrl', function ($scope) { $scope.initstartdate = function () { $scope.startdate = $scope.startdate || null; }; $scope.initstartdate(); $scope.dateoptions = { basedate: $scope.startdate, mindate: $scope.startdate || moment.utc().todate(), }; $scope.openstartdateclick = function () { $scope.startdatepopup.opened = true; }; }); app.controller('tourpackageenddatepickerctrl', function ($scope, $rootscope) { $scope.c...

c# - Logging Exceptions and Redirect to Specific Page -

i using handleerrorinfo() handle errors. need update url when handleerrorinfo() redirects error page. www.mysite.com/error instead of www.mysite.com/update also need know how log exception. web.config: <customerrors mode="on" defaultredirect ="~/admin/error"></customerrors> admin controller: public actionresult error() { return view(); }

java.io.IOException: The document has no pages. - PowerPoint to PDF -

i'm making javafx application convert powerpoint pdf. error: exceptionconverter: java.io.ioexception: document has no pages i tried many ppt files didn't anything. files error. don't know what's problem. package application; import java.awt.color; import java.awt.dimension; import java.awt.graphics2d; import java.awt.geom.affinetransform; import java.awt.geom.rectangle2d; import java.awt.image.bufferedimage; import java.io.file; import java.io.fileinputstream; import java.io.fileoutputstream; import java.io.ioexception; import java.io.inputstream; import com.itextpdf.text.document; import com.itextpdf.text.documentexception; import com.itextpdf.text.image; import com.itextpdf.text.rectangle; import com.itextpdf.text.pdf.pdfpcell; import com.itextpdf.text.pdf.pdfptable; import com.itextpdf.text.pdf.pdfwriter; import org.apache.commons.io.filenameutils; import org.apache.poi.hslf.model.slide; import org.apache.poi.hslf.usermodel.slideshow; import org.apache.p...

Stream Poco Zip Compression to Poco HTTPServerResponse -

i directly compress directory poco::httpserverresponse stream. however, downloading zip file produced following code leads corrupt archive. know below compression approach work locally created zip files have done much. missing or not possible? (poco v1.6.1) std::string directory = "/tmp/data"; response.setstatusandreason(httpresponse::httpstatus::http_ok); response.setkeepalive(true); response.setcontenttype("application/zip"); response.set("content-disposition","attachment; filename=\"data.zip\""); poco::zip::compress compress(response.send(),false); compress.addrecursive(directory, poco::zip::zipcommon::compressionmethod::cm_store, poco::zip::zipcommon::compressionlevel::cl_maximum, false, "data"); compress.close(); i use same technique successfully, slight difference: compression method , compression level (cm , cl). compress.addfile( cachefile, poco::datetime(), currentfile.getname(), poco::zip...

Rails units testing: No route matches why? -

i'm trying units test, first time. i don't understand why there no route matches . when run $ rake test test/controllers/products_controller_test.rb i in output of console: 1) error: productscontrollertest#test_should_get_edit: actioncontroller::urlgenerationerror: no route matches {:action=>"edit", :controller=>"products"} test/controllers/products_controller_test.rb:20:in `block in <class:productscontrollertest>' 2) error: productscontrollertest#test_should_get_show: actioncontroller::urlgenerationerror: no route matches {:action=>"show", :controller=>"products"} test/controllers/products_controller_test.rb:35:in `block in <class:productscontrollertest>' 3) error: productscontrollertest#test_should_get_create: actioncontroller::parametermissing: param missing or value empty: product app/controllers/products_controller.rb:59:in 'product_params' app/controllers/pr...

java - ESRI Geometry API - how to choose QuadTree query tolerance -

i'm playing around esri geometry api . documentation getiterator methods doesn't explain tolerance parameter does. code doesn't shed light on kind of values appropriate. unit tests use 0.0 , except single test uses 0.001 . what factors should consider when choosing value tolerance ? put way, if best value typically 0.0 , when else? generally 1mm . example if coordinates wgs84, can use 1e-8 degrees.

c# - xna fires OutOfMemoryException on 1.3GB -

so developping game in xna studio , bumped following problem: whenever use more 1.3gb of ram, outofmemoryexception fired, after googling found out because of rule in .net 4.5 framework limits memory usage 32 bit applications. solved changing compiled bin editbin.exe shipped visual studio. because xna not support 64 bit compiling has been dicontinued, wondering if there way can guarantee memory limit increased 4gb (or 3gb) when compile end user? told there /largeaddressaware options don't know how use them in xna project.

Spring Batch Writer throws java.sql.SQLException: Unsupported feature -

i facing challenge in retrieving auto generated column of oracle table in spring batch poc. this poc reads data flat file , loads oracle table. trying use oracle sequence generate primary key table , retrieve upon successful insertion of row spring batch writer implementation. throws folllowing error. org.springframework.jdbc.uncategorizedsqlexception: preparedstatementcallback; uncategorized sqlexception sql i not sure missing or issue related oracle driver. need valuable inputs. specifications: oracle database version 11.1.0.7 oracle driver added maven proj ojdbc14-10.1.0.5.jar jdk version 1.8 spring.version 4.0.5.release spring.jdbc.version 4.0.5 spring.batch.version 3.0.4.release my job.xml <bean class="org.springframework.jdbc.core.namedparam.namedparameterjdbctemplate" id="namedparameterjdbctemplate"> <constructor-arg ref="datasource"/> </bean> my customeritemwriter class: public class customitemwriter i...

Publishing visitor posts through Graph API as a Facebook Page admin -

as facebook page admin, want able publish visitor's post through graph api. documentation on facebook's developer's portal explicitly states is_hidden field not valid approving visitor's post on page. there graph api endpoint can accomplish with?

javascript - Typescript Jasmine toHaveBeenCalledTimes() is not a function -

i have test in typescript application: it("should send current state when new subscriber added (watching on file)", () => { runs(() => { flag = false; subscriber = createspyobj<ipathwatchsubscriber>("pathwatchsubscribermock", ["processnotifyaction"]); subscriber2 = createspyobj<ipathwatchsubscriber>("pathwatchsubscribermock", ["processnotifyaction"]); pathwatch.subscribe(subscriber); pathwatch.watch(filepath); pathwatch.subscribe(subscriber2); w(() => { flag = true; }); }); waitsfor((): boolean => { return flag; }, "failure", chokidaroperationdelay); runs(() => { expect(subscriber.processnotifyaction).tohavebeencalledwit...

javascript - How to use spyOn to mock jQuery value for a selector in Jasmine? -

this question has answer here: spying on jquery selectors in jasmine 6 answers i'm writing unit tests using angularjs / karma / jasmine , couldn't jasmine's 'spyon' method work. after use spyon , i'm still getting undefined selector. the problem the issue i'm running into, after run spyon($("#username"), "val").and.returnvalue("test@test.com"); i try value of username this: $("#username").val(); and undefined . code want test function isvalidemail() { var email = $("#username").val(); var regex = /^([a-za-z0-9_.+-])+\@(([a-za-z0-9-])+\.)+([a-za-z0-9]{2,4})+$/; return email.match(regex); } unit test 'use strict'; describe('test/spec/controllers/validation.js - no controller', function () { describe('email validation', funct...

c# - SQL Server Express login failed for user domain\name -

i created c# program connection string server=.\sqlexpress;attachdbfilename=|datadirectory|apsdb.mdf;database=apsdb; initial catalog= apsdb; trusted_connection=true; user instance=true; it works using computer created with, upon using advanced installer , deploying laptop test if works on different environment, utterly fails. program runs, once accesses database, gives me error: login failed user domain\name. i have checked sql server error log, there no error 18456, state 38 anymore. says: 2016-08-24 17:32:03.57 spid69s starting database ‘apsdb’ 2016-08-24 17:32:03.57 spid69s [info] hkhostdbctxt::initialize(): database id: [6] ‘apsdb’. xtp engine version 0.0. 2016-08-24 17:32:03.57 spid69s [info] hkhostdbctxt::initialize(): database id: [6] ‘apsdb’. xtp engine version 0.0. 2016-08-24 17:32:03.57 spid69s [info] hkhostdbctxt::initialize(): database id: [6] ‘apsdb’. xtp engine version 0.0. upon changing account sql server express ...

jquery - Creating table with javascript and add id and class to each td -

i'm trying create chess game in javascript. created chessboard , next step add id's , classes created td's. here code: <html> <head> <title> play chess! </title> <meta charset="utf-8"> <link rel='stylesheet' href='css/styles.scss' type='text/css'/> </head> <body> <script> var table =''; var rows =8; var cols=8; (var r = 0; r<rows;r++){ table +='<tr>'; for(var c=0;c<cols;c++){ table+='<td>' +''+'</td>'; } table+='</tr>'; } document.write("<table border=1>"+table+'</table>'); </script> </body> </html> i know can html, it's code ,...

javascript - I can't seem to get Bootstrap Carousel to work locally, but it works on codepen -

i'm trying bootstrap carousel working on site, , shows collapsed, instead of going next slide, "jumps" down little bit. here header might out of order: <head> <script src="https://code.jquery.com/jquery-3.1.0.min.js" type="javascript"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="javascript"></script> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/2.0.0-beta.17/angular2-all-testing.umd.dev.js" type="javascript"></script> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"> <link href="css/main.css" rel="stylesheet"> and here html carousel i'm having trouble wit...

javascript - Do search engines consider dynamic meta tags for ranking pages -

suppose have static page linked number of dynamic pages. need optimize each page search engines. hence, change keywords of meta tag dynamically each page. not sure is, search engines take dynamic change account or consider keywords in meta tag of static page will google process javascript before processing keyword metatag?

create service with getter and setting in angular 2? -

trying create service stores data , passes different component. service looks this: import { injectable } '@angular/core'; @injectable() export class selecteddateservice { selecteddate: selecteddate; getcheckin () {return this.selecteddate.checkin; } getcheckout (){return this.selecteddate.checkout; } setcheckin (value) { this.selecteddate.checkin = value; } setcheckout (value: string) { this.selecteddate.checkout = value; } } interface selecteddate { checkin?: string; checkout?: string; } my component looks this: @component({ selector: 'first-component', template: require('./first.component.html'), styles: [require('./first.component.css')], directives: [datepickercomponent], providers: [selecteddateservice] }) export class firstcomponent { constructor(private dateselectservice: selecteddateservice) { } ondatechanged(event) { if (event.formatted !== '' || event !== undefined ) { this.sel...

java - Including only individual entities in Spring Boot JPA Test -

i trying test jpa queries in separate projects entities kicking off spring boot project generate platform insert data h2 database, run queries against it, , validate results of these queries. because separate project has large entity base, i'd selectively pick out entities want per test. i've tried use @entityscan annotation this, seems designed pull entire packages, if specify class. this strikes me there must solution for, have far been unable find it. the thing when set test class spring context, context exists tests in class, unless use @dirtiescontext or other trick make rebuild itself. @entityscan(basepackageclasses = myentity.class) the code above doesn't tell spring use myentity , tells start searching entities in package myentity exists in. recursively, if have instance: com.example.entities.myentity com.example.entities.subpackage.myotherentity it pick both myentity and myotherentity . if, however, wrote entityscan this: @entitysc...

How do I deal with string input in C? -

i'm practicing c , make simple login program username , password... here code: int main(){ char uname, passwd; printf("enter username: "); scanf("%c", uname); printf("enter password: "); scanf("%c", passwd); printf(" \n"); if (uname == "waw" && passwd == "wow"){ printf("you have logged in\n"); } else { printf("failed, please try again\n"); } return 0; } and got error when try compile it log.c: in function ‘main’: log.c:7:10: warning: format ‘%c’ expects argument of type ‘char *’, argument 2 has type ‘int’ [-wformat=] scanf("%c", uname); ^ log.c:9:10: warning: format ‘%c’ expects argument of type ‘char *’, argument 2 has type ‘int’ [-wformat=] scanf("%c", passwd); ^ log.c:13:14: warning: comparison between pointer , integer if (uname == "waw" && passwd == ...