Posts

Showing posts from April, 2015

osx - Android emulator taking forever to load (OS X) -

Image
i've got macbookpro running intel core i5 os x yosemite. far been on 20 minutes, , still shows android loading screen. installed haxm extension , confirm loaded: ➜ ~ kextstat | grep intel 147 0 0xffffff7f82bd4000 0x14000 0x14000 com.intel.kext.intelhaxm (1.1.1) <7 5 4 3 1> here avd profile using:

codeigniter - How to make jQuery select onchange -

i want make forgot password page. page can use email or sms, want make select button choose one. can me? this view <div class="form-group"> <div class="row"> <div class="col-lg-3 col-md-3 col-sm-4 col-xs-5 col-xxs"> <label class="control-label">confirm email address</label> </div> <div class="col-lg-4 col-md-4 col-sm-5 col-xs-7 col-xxs"> <input placeholder="email address." class="form-control" type="text" name="re_email" value="<?php echo input_data('re_email'); ?>"> <?php echo form_error('re_email'); ?> </div> </div> </div> <div class="form-group"> <div class="row"> <div class=" col-lg-offs...

Swift enum loses initialized values when set as a property? -

i've found work-around, problem vexing me , thought i'd share in case else having same problem. love know why happening. in code below, can switch on enum fine during class initializer when it's local variable. store enum value property. when try switch on stored property (named foo) in different method (named bar()) in example below - compiler warnings , error member(s) not recognized. seems know foo myenum type, doesn't know .abc, .def, , .ghi members. enum myenum { case abc, def, ghi } class myclass : nsobject { var foo : myenum! convenience init(foo: myenum) { self.init() self.foo = foo switch foo { case .abc: println("abc foo") case .def: println("def foo") case .ghi: println("ghi foo") default: println("no foo") } } func bar() { switch foo { case .abc: println("abc foo") case .def: prin...

c# - Asp.Net MVC 4 view model and domain model ids -

our system runs on multiple servers. tables in our system uses guid primary key , foreign key fields. our old system , it going through brand new rewrite. the motivation use guid in old system migration of data. reasonable migrate items 1 server another. using int ids problematic when data gets migrated across. now new system want use guid ids due migration factor. new system written using ddd mvc 4. using kendoui ui controls. kendoui looks of things not support guid int grids foreign key s. column blank when used. someone mentioned design wrong , should not use guid id. wrong use guid in view model ? difficult use guid in domain model , int in view model . what better datatype use in system ids important across multiple servers in case of migration. or migration of data separate issue should using api's , domain services migrate data over, in case using int id reasonable. can point me right direction please? you're right wanting use guids...

Can you override (write) the nest ambient_temperature? -

the permission write there description says read. want set temperature in upstair room wireless arduino board temp sensor , override nest ambiant downstairs temp? nest reference api url no. although field part of "thermostat read/write" permission, "read only" per api reference

Jenkins CLI -- how to build a job in a subdirectory -

Image
i trying build job using jenkins-cli.jar, cannot figure out how tell jenkins job in subdirectory. $ java -jar jenkins-cli.jar -s https://myserver/ list-jobs util --username jerry --password swordfish thejobiwant anotherjob someotherjob so job there, inside folder. when try run it, get: $ java -jar jenkins-cli.jar -s https://myserver/ build util/thejobiwant -s --username jerry --password swordfish no such job 'util/thejobiwant' how supposed call job cli? when saying 'subdirectory', mean 'subview' ? i've created job named 'job1' under netsted view-->subview folder. when tried trigger build jenkins command line, using: java -jar jenkins-cli.jar -s http://localhost:8080/ build job1 --username admin --password admin and can see, 'job1' has been triggered. hope helps!

c# - Using a partial view -

i'm trying understand how make partial views. far have following partial view, called "_news": @model site.services.news.newsitem <div class="bs-callout bs-callout-primary"> <h2> @html.displayfor(model => item.title) </h2> </div> and in controller have: @model ienumerable<site.services.news.newsitem> - belong here? ...other controller code here... @foreach(var item in model) { html.partial("_news", item); } but i'm getting "nullreferenceexception" when try run application. doing wrong? edit per comments: public actionresult index() { newsreader newsreader = new newsreader(); var newsitems = newsreader.getnewsitems(); return view(newsitems); } @model site.services.news.newsitem <div class="bs-callout bs-callout-primary"> <h2> @html.displayfor(model => model.title)...

c++ - Polymorphic operator<< from virtual base class -

i want overload operator<< specialized operation within context of polymorphic classes. give direct example of want (using int example): base* = new a; (*a) << 10; i use syntax because portion of program same operation using <<, on non-polymorphic classes. the problem is, base pure virtual, , @ loss how implement sort of system without complete, valid base class. example: class base { public: virtual void avirtualfunction() = 0; virtual base operator<<( int ) = 0; }; class : public base { base operator<<( int ) { // } }; class b : public base { base operator<<( int ) { // } }; this generates error because base abstract. i can't put overloads in inherited classes, need access operator pointer base class without casting child. my question similar question asked in overloading << operator polymorphism , except base class not valid object on own. your code doesn't ...

css - Fill image/button with colour on hover -

i'm new css & wordpress, i've spent night trying , looking solution - can me. i have image, , when hovers on want white/see-through portion in middle fill colour #f7ca18 bottom top http://wp.tek-monkey.com/wp-content/uploads/2015/06/circle1_test_seethrough.png i've tried following try , simple transition white/see-through inner desired colour, none of them have worked. i'm not sure if i'm doing wrong in wordpress; under appearance>editor paste css code @ bottom, , on page image edit image , type box (image css class) .circle-test for example. .circle-test { background: #ffffff; transition-property: background; transition-duration: 1s; transition-timing-function: linear; } .circle-test:hover { background: #f7ca18; } .circle-test:hover{ background-color: #f7ca18; } .circle-test{ background:none; } .circle-test:hover{ background:#f7ca18; } totally doable. trick adding border-radius of 100% create circle...

java - how to make search jtextfield like jcombobox -

i working on project make database application in java swing. i want set a jtextfield search box of browser. want typed first character , data appear so want this? i'm sure can use build towards objective (just needs few edits/adds/changes). public static void main(string[] args) { scanner scanner = new scanner(system.in); string datainput; system.out.println("what search for? "); datainput = scanner.nextline(); // imagine database involves usernames of various people. string[] usernamedata = new string[] { "jack901", "chimp00" }; (string loaddata : usernamedata) { if (loaddata.charat(0) == datainput.charat(0)) { system.out.println(loaddata); } else { system.out.println("user not found."); } } }

python logging basic how to use -

python logging helps me create transcripts of background processing scripts. i have far used basic configuration: import logging log_filename = 'example.log' logging.basicconfig(filename=log_filename,level=logging.debug) logging.debug('this message should go log file') as explained in python docs: 15.6. logging . nice thing of doing way can use line: logging.debug('this message should go log file') throughout modules , classes without bothering of logging configurations. setup logging in main script go file , messages go same file. easy. there way of doing same, goes along these lines: my_logger = logging.getlogger('mylogger') my_logger.setlevel(logging.debug) my_logger.debug('test string') which same thing except have instance keep track of: my_logger. modules , classes don't know how logger of day named , having pass variable around cumbersome. suspect miss basic here, either use of logging module faulty , works glitch ...

javascript - Why my plugin fires multipe callback or clicks -

i creating simple jquery plugin can use attach action's confirmation. facing strange issue, work fine single element click, when going click second element bind plugin work fine it's fires previous clicked element well. (function ($) { $.fn.bootconfirm = function (options) { // establish our default settings var settings = $.extend({ message: 'are sure ?', complete: null }, options); var self = this; var cointainer = '\ <div class="modal fade" id="confirmboot" role="dialog" aria-labelledby="confirmdeletelabel" aria-hidden="true">\ <div class="modal-dialog">\ <div class="modal-content">\ <div class="modal-header">\ <button type="button" class="close" data-dismiss="modal" ...

authentication - Get username information from a cookie in Pyramid (Python) -

i'm writing pyramid app allows registration of arbitrary number of users in database table. login code: @view_config(route_name='login', renderer='templates/login.jinja2') def login(request): username = request.params.get('username', '') error = '' if request.method == 'post': error = 'login failed' authenticated = false try: authenticated = do_login(request) except valueerror e: error = str(e) if authenticated: headers = remember(request, username) return httpfound(request.route_url('home'), headers=headers) return {'error': error, 'username': username} where def do_login(request): username = request.params.get('username', none) password = request.params.get('password', none) if not (username , password): raise valueerror('both username , password req...

javascript - Can I associate a user's account with an action to the drive API? -

we're looking make little webapp manage our week-long nerf war (humans vs zombies precise), , we're thinking how easy have google sheets our backend, , our frontend entirely javascript/html/css. let's there's 2 actions can done in javascript: register, adds row sheet. report tag, adds row sheet. let's have 100 players. we'll have each player sign in using google account. there way either of above actions, can have sheets know made action? this way, if gets hold of api key , spoofs referer make bad requests, can know google account did , ban them game. for example, if open sheet , "see revision history", want not see 1 user revisions, want see user triggered action. is reasonable approach, , possible? thanks! (note: know these 2 actions can done via google forms, can associate user's account, imagine have more complex actions cant achieved google form) the short answer no. you'll using spreadsheets api (not drive ap...

webview - How to access Windows Phone folders from a Gmail Wrapper App -

i have created gmail wrapper windows phone 8.1 (winrt) application using webview. when try compose email , try add attachments, file picker not displayed , nothing happens. however when use internet explorer , login same gmail account , click on attach, file picker shown different options choose attachment from. i have enabled required capabilities in app manifest, file picker not shown in wrapper application. any or pointers appreciated. the hosted browser ( webview ) cannot show native file picker. you'd need proxy request somehow , show picker c# example. but, don't own gmail source code, making proper surgical changes difficult (and subject changed).

vector - R base plot polygon map with specified z range? -

i'd generate set of maps consistent color ramps , little bit stuck. know how want rasters, not vector data. here's behavior want rasters: require(raster) r1=raster(matrix(sample(1:50,16),4,4)) r2=raster(matrix(sample(1:100,16),4,4)) plot(r1,col=colorramppalette(c("red","white","blue"))(10),zlim=c(0,100)) plot(r2,col=colorramppalette(c("red","white","blue"))(10),zlim=c(0,100)) how make similar maps polygons? for example: poly1=rastertopolygons(r1) poly2=rastertopolygons(r2) # previous code... require(raster) r1=raster(matrix(sample(1:50,16),4,4)) r2=raster(matrix(sample(1:100,16),4,4)) poly1=rastertopolygons(r1) poly2=rastertopolygons(r2) ################################################# # color polygons specific z range: # create function generate continuous color palette work rbpal <- colorramppalette(c('red','white','blue')) # make color scale polygons 1 & 2 ...

Create slider with dynamic range based on user input matlab gui -

Image
hi have quick question on how solve issue. take inputs 2 edit text boxes , specify them min , max of sliders range. don't have problem doing min entered slider disappears because min above default slider value, 0. understand error because value no longer in range of min , max, , want fix updating value above min in call function min/max input text boxes. there way can update default value above min can past error , use slider? warning: 'slider' control cannot have 'value' outside of 'min'-'max' range control not rendered until of parameter values valid here have tried in call edit box gets user input minimum slider: function input_min_callback(hobject, eventdata, handles) value_min=str2double(get(hobject, 'string')); if value_min > slidervalue_default set(handles.input_transverse_shear_layer1, 'value', value_min+1); set(handles.input_transverse_shear_layer1, 'min', value_min); end any appreciated! thank...

html - I forgot how to capture a post in php -

i trying capture $_post form: <?php var_dump($_post); ?> <form class="form-horizontal" action="" method="post"> <div class="form-group"> <div class="col-sm-6"> <input type="text" class="form-control input-lg" id="inputemail3" placeholder="name*"> </div> <div class="col-sm-6"> <input type="email" class="form-control input-lg" id="inputpassword3" placeholder="email*"> </div> </div> <div class="form-group"> <div class="col-sm-6"> <input type="text" class="form-control input-lg" id="inputpassword3" placeholder="position"> </div...

sql server - SQL Query in Crystal Reports does not function properly -

using microsoft sql server express i'm new crystal reports , trying generate report looks this: https://imgur.com/8rbpxbm is possible create sql query has these entries sort of array or struct result? i've got, example, query gives average completion days high priority task, , looks this: select avg(datediff(d,"opendate","clsddate")*1.0) avgcompletiondayshighfromlastfullmonth "trackit_data2"."trackitapp_1"."vtasks_browse" "priority" = 'high - 1 day' , datepart(m,"clsddate") = datepart(m, {?reportingdate}) /*these next 2 lines specify closed tickets in last month*/ , datepart(yyyy,"clsddate") = datepart(yyyy, {?reportingdate}) now, think can create query creates each , every cell in spreadsheet, don't know how create table of results accessed report. how can "return struct" of these queries can use "." operator (from c-like languages) pick out use in repor...

numpy - Integration not successful in Python QuTiP -

Image
i have been trying use qutip solve quantum mechanics matrix differential equation (a lindblad equation). here code: from qutip import * matplotlib import * import numpy np hamiltonian = np.array([[215, -104.1, 5.1, -4.3 ,4.7,-15.1 ,-7.8 ], [-104.1, 220.0, 32.6 ,7.1, 5.4, 8.3, 0.8], [ 5.1, 32.6, 0.0, -46.8, 1.0 , -8.1, 5.1], [-4.3, 7.1, -46.8, 125.0, -70.7, -14.7, -61.5], [ 4.7, 5.4, 1.0, -70.7, 450.0, 89.7, -2.5], [-15.1, 8.3, -8.1, -14.7, 89.7, 330.0, 32.7], [-7.8, 0.8, 5.1, -61.5, -2.5, 32.7, 280.0]]) h=qobj(hamiltonian) ground=qobj(np.array([[ 0.0863685 ], [ 0.17141713], [-0.91780802], [-0.33999268], [-0.04835763], [-0.01859027], [-0.05006013]])) rho0 = ground*ground.dag() scipy.constants import * ktuple=physical_constants['boltzmann constant in ev/k'] k = ktuple[0]* 8065.6 htuple = physical_constants['planck constant in ev s'] hbar = (htuple[0]* 8065.6)/(2*pi) gamma=(2*pi)*((k*300)/hbar)*(35/(150*hbar)) l1 = qobj(...

c++ - Qt Maps (QML) application window is blank -

this code qt maps application i'm trying make. http://pastebin.com/pncyivm9 - main.qml i'm using qt creator on ubuntu 14.04. when compile , run code application window blank. i haven't edited main.ui.qml apart adding qt location import. i've added location keyword in .pro file appreciated since can't find tutorials on maps. edit: here's code import qtquick 2.4 import qtquick.controls 1.3 import qtquick.window 2.2 import qtquick.dialogs 1.2 import qtlocation 5.4 applicationwindow { title: qstr("hello world") width: 640 height: 480 visible: true plugin{ id: osmplugin name:"osm" } map { plugin: osmplugin id: map zoomlevel: (maximumzoomlevel - minimumzoomlevel)/2 // center { // latitude: -27.5796 // longitude: 153.1003 // } // enable pinch gestures zoom in , out gesture.flickdeceleration: 3000 ...

java - BufferedinputStream default buffer size -

bufferedinputstream default buffer size 8k jvm. harcoded value, or can changed altering system parameter? i'd use 128k without modifying java code. possible? thanks, there no way change default buffer size system property. must use constructor accepts size argument. place buffer created in constructor: public bufferedinputstream(inputstream in, int size) { super(in); if (size <= 0) { throw new illegalargumentexception("buffer size <= 0"); } buf = new byte[size]; } this applies jvm version (1.8.0_31) possibly different on other implementations.

arm - JTag Debugging with Eclipse Mars CDT : "Program file does not exist" -

i have compiled arm embedded project, next files has been created: myproject.elf myproject.bin myproject.hex myproject.map myprojectmd5.bin then going run -> debug configurations -> gdb segger j-link debugging -> new -> debug , error: program file not exist the gcc compiler arm used: https://launchpad.net/gcc-arm-embedded arm eclipse plugins used: http://gnuarmeclipse.livius.net/blog/ and that's see in console: 23:25:36 **** build of configuration release project myproject **** make invoking: cross arm gnu print size arm-none-eabi-size --format=berkeley "myproject.elf" text data bss dec hex filename 40120 252 2252 42624 a680 myproject.elf finished building: myproject.siz 23:25:36 build finished (took 112ms) it seems there problem running jlinkgdbserver $ jlinkgdbserver segger j-link gdb server v4.98e command line version jlinkarm.dll v4.98e (dll compiled may 5 2015 11:59:...

apex code - DocuSign for Salesforce - Add Recipients in Envelope through URL -

i working on salesforce docusign project created button send emails attachments account object. button calls docusign salesforce app link {!requirescript("/apex/dsfs__docusign_javascript")} docusign_createenvelope(); is there way me pass contact id linked account record docusign envelope recipient? it's not easy passing contact record id. i have never done before, post below gives concept of need do: docusign salesforce custom button - auto populate recipients in summary, need build own docusign custom button logic: https://10226ec94e53f4ca538f-0035e62ac0d194a46695a3b225d72cc8.ssl.cf2.rackcdn.com/docusign-for-salesforce-custom-button-logic.pdf read on how use crl parameter. then embed soql query button logic pull contacts related account record. i hope pushes in right direction.

java - can someone explain me the syntax of '${' and ':' in standalone.xml? -

can explain me syntax of '${' , ':' in standalone.xml of jboss (for example) , in : port-offset="${jboss.socket.binding.port-offset:0}" ? i know 'jboss.socket.binding.port-offset' system properties . if being set - overwrite 0 value? meaning of ':' in context ? from here as can see contains beanshell expression means, unless jboss.socket.binding.port-offset set, evaluates 0 standard sockets.

java - Getting console error -

this question has answer here: what nullpointerexception, , how fix it? 12 answers i'm using libgdx trying make game, when run desktoplauncher, error in console: exception in thread "lwjgl application" java.lang.nullpointerexception @ com.orhantozan.game.pongmain.render(pongmain.java:216) @ com.badlogic.gdx.backends.lwjgl.lwjglapplication.mainloop(lwjglapplication.java:215) @ com.badlogic.gdx.backends.lwjgl.lwjglapplication$1.run(lwjglapplication.java:120) what cause of this? dont know error means :( core: http://pastebin.com/r74wb5xx desktop: http://pastebin.com/i0w4h4wq dew class: http://pastebin.com/wupnubbg make sure dewlist field gets initialized. alternatively change array<dew> dewlist; to array<dew> dewlist = new array(); if possible.

python - Django: extend queryset or exclude from exclude method -

i have django app need combine 2 querysets, , disregard exclude() filter items. here example of model , query. class mymodel(models.model): name = models.charfield(max_length=20) var1 = models.integerfield() var2 = models.booleanfield() var3 = models.booleanfield() var4 = models.integerfield() var5 = models.integerfield() qs1 = mymodel.objects.filter(var1__lte=10,var2=true).exclude(q(var4=10) | q(var5=20)) must_include_list = ['name1','name2','name3'] qs2 = mymodel.objects.filter(name__in=must_include_list) i need have single queryset filter , exclude qs1, includes rows qs2 regardless of whether match qs1 filter , exclude. i tried doing this: qs1 = mymodel.objects.filter(q(var1__lte=10,var2=true) | q(name__in=must_include_list)).exclude(q(var4=10| | q(var5=20)) but still applies exclude must_include_list, miss of required entries. is there way tell exclude() not exclude items in must_include_list, or there way combine...

android - How to save an array of floats and shorts in byte to disk in java? -

i have 2 arrays i'd save file. array of floats , array of shorts (mesh data). don't want save these characters because makes files unnecessarily large. file loaded both android , ios bytebuffer.nativeorder thing makes me nervous. suggestions, tips, warnings appreciated. float verts[x] short indices[y] i'd use dataoutputstream - write out number of vertices, vertices themselves. write out number of indices, indices. this use big-endianness, , should easy enough read/write on ios, without worrying native byte ordering.

javascript - d3 "end-of-ticking" event for force layout -

i'm working d3's force layout , trying find simple way identify when layout has reached steady state (i.e. when tick function has stopped manipulating position of nodes). my definition of force looks this... var force = d3.layout.force() .friction(frictionvalue) .theta(thetavalue) //.alpha(0.1) .size([width, height]) .gravity(gravityvalue) .charge(chargevalue) .on("tick", tick); then tick function begins... function tick(e) { ... i assumed "e" key catching end-point of simulation, since i'm not explicitly passing e tick function on force definition i'm not sure represents or how might able use identify end of simulation. can either shed light on function of e (since i'm not explicitly passing value), or suggest better method simple display "alert(..)" message once force layout simulation has ended? huge in advance @ all! you're right, tick wrong ...

delphi - Why TToolBar doesn't want to wrap? -

i put ttoolbar on form , add tspeedbutton . ensure myself wrapable set true , run application. when shrink form buttons don't wrap on new line. missing ? using delphi 2009. you need set ttoolbar.autosize true , , add separators between groups of buttons there's place split toolbar sections. it's better use ttoolbutton on ttoolbar instead, it's designed work them. right-click toolbar , choose new button or new separator . assign images want display timagelist , , assign imagelist ttoolbar.images property, set imageindex each button display image list. (another advantage can separate imagelists hotimages , disabledimages properties well.)

runatserver - Why does ASP.NET webforms need the Runat="Server" attribute? -

why have specify runat="server" on asp.net controls when mandatory attribute , server option available in limited knowledge of asp.net, , error if don't use it? i understand can optionally use on html tags, , understand client/server paradigm , specifying. is redundant tag implied control being asp.net control, or there underlying reason? i've believed there more understanding can mix asp.net tags , html tags, , html tags have option of either being runat="server" or not. doesn't hurt leave tag in, , causes compiler error take out. more things imply web language, less easy budding programmer come in , learn it. that's reason verbose tag attributes. this conversation had on mike schinkel's blog between himself , talbot crowell of microsoft national services. relevant information below (first paragraph paraphrased due grammatical errors in source): [...] importance of <runat="server"> more consisten...

Is my eval wrong or do I not understand eq vs == in Perl -

i having trouble understand eval or maybe not understand eq vs == . have short perl script: [red@tools-dev1 ~]$ cat so.pl #!/usr/local/bin/perl -w use strict; while(<data>) { chomp; ($arg1, $arg2, $op ) = split /,/; if ( $op eq '=' ) { $op = 'eq'; } $cmd = "$arg1 $op $arg2"; print "[$cmd]\n"; $rc = eval $cmd || 0; print "rc [$rc]\n"; } __data__ cat,cat,= when execute get: [red@tools-dev1 ~]$ ./so.pl [cat eq cat] rc [0] one think you'd ... [cat eq cat] rc [1] ... since "cat" equals "cat", right? you're using barewords in strict mode, error: $ perl -e 'use strict; cat eq cat' bareword "cat" not allowed while "strict subs" in use @ -e line 1. bareword "cat" not allowed while "strict subs" in use @ -e line 1. execution of -e aborted due compilation errors. whenever eval string, should check $...

symfony - Custom Authentication doesn't authenticate the user correctly -

i setting own custom authenticator in symfony 2.6 have got issue. doesn't authenticate user correctly. authenticate @ first fails. here goes security.yml security: encoders: mlm\bundle\mlmbundle\entity\empreendedor: algorithm: bcrypt cost: 12 role_hierarchy: role_admin: role_user role_empreendedor: role_user role_super_admin: [role_user, role_admin, role_allowed_to_switch] providers: empreendedor_provider: id: empreendedor.user.provider firewalls: # disables authentication assets , profiler, adapt according needs dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false area_empreendedor_login: pattern: ^/escritorio-virtual/login$ #anonymous: ~ security: false area_empreendedor: pattern: ^/escritorio-virtual provider: empreendedor_provider ...

json ld - Two properties, one type -

when author , publisher of article 1 , same, microdata it’s possible markup in following manner: <span itemprop="author publisher" itemscope="" itemtype="http://schema.org/organization"> <span itemprop="name">name of organization</span> </span> is there option other following when using json-ld? "author" : { "@type" : "organization", "name" : "name of organization" }, "publisher" : { "@type" : "organization", "name" : "name of organization" }, there's no equivalent functionality in json-ld. depending on whether have identifiers entities or not, might able leverage reverse properties achieve same. generally, however, wouldn't advise use such "hacks". { "@context": [ "http://schema.org/", { "publisherof": { "@reverse": "publis...

sql - SSAS Processing Cubes - Won't work in powershell but works in Visual Studio -

i'm attempting process cubes , dimensions in powershell. has been working awhile of sudden stops. can process dimensions , cubes in visual studio processing them powershell script in same order gives me duplicate attribute key error. powershell script: [system.reflection.assembly]::loadwithpartialname("microsoft.analysisservices") $serveras = new-object microsoft.analysisservices.server $serveras.connect("server") $db = $serveras.databases["analysis db"] $db.cubes | select name, storagemode, lastprocessed $db.dimensions | select name, isparentchild, lastprocessed, storagemode foreach ($c in $db.dimensions) {$c.process("processfull")} foreach ($c in $db.cubes) {$c.process("processfull")} you need ignore key errors this: ## set error configuration key errors ignored $errorconfig = new-object ` microsoft.analysisservices.errorconfiguration("d:\processlogs\") $errorconfig.keynotfound = "...

.net - How do I get the current date and time in the local timezone? -

this question has answer here: .net datetime.now returns incorrect time when time zone changed 4 answers c# event detect daylight saving or manual time change 3 answers how current date , time in local timezone? system.datetime.now returns current date , time local time zone when program started, wrong thing. duplicate of sum of: .net datetime.now returns incorrect time when time zone changed c# event detect daylight saving or manual time change you use code below if know local time zone you're targetting datetime timeutc = datetime.utcnow; try { timezoneinfo cstzone = timezoneinfo.findsystemtimezonebyid("central standard time"); datetime csttime = timezoneinfo.converttimefromutc(timeutc, cstzone); console.writeline(...

First time OrientDB user regarding security in REST api -

i new orientdb. going thorugh rest apis , not able understand security of apis. dont have experience backend development (i front end developer) please me clarify points here : as can see requests open, in, if know url & record or class name can type in web browser & can access records. how data protected ?? how access tokens or session works rest apis ?? this might basic question since have started learning please suggest right approach or useful resources. thanks. all rest requests authenticated using http authentication, if have orientdb studio open authenticated , browser not ask again user/password. try open new anonymous browser window , send rest call, see popup asking user/password. here can find additional info http , sessions http://orientdb.com/docs/last/orientdb-rest.html

Android/iOS unlimited Apps tied to a single website subscription -

i have website provides service customers pay monthly subscription fee. have created apps android , ios connect subscribed account. subscription can connect unlimited number of users android/ios applications account. if release app market free customers need register paid subscription main account on website seen breach of market t&cs play store , app store? thanks help. you should fine - large companies this, examples off top of head are: rdio, economist. you can purchase via website, linking accounts full functionality. the company gets save on 30% fees, app not allowed provide links purchase workflow on website - otherwise violate terms. this same both android , ios.

Android make button disabled after setting alpha 0 -

probably rhetorical question. in ios when set view's (any uiview subclass such uibutton ) alpha 0, ios default disables user interaction on view. i got android app animate fade out view by: objectanimator fadeout = objectanimator.offloat(buttonselectioncontainer, "alpha", 1, 0); fadeout.setduration(500); fadeout.start(); however, noticing when tap screen, animation starts again, leading me believe, in android, when button alpha set 0, still tappable, true? is there way globally tell android disable user interaction view (and subviews) when alpha set 0, either explicitly through using: view.setalpha(0.0f); or through objectanimator above code block used ? a temporary work around problem schedule code run after 500 ms: // psuedocode: after 500ms dispatch_dosomethingafter(500) { mybutton.setenabled(false); } not ideal solution might solution, unless bright android developers out there has better solution ? use addlistener on objectani...

html - Prevent inline SVG pixel snapping in chrome -

i have svg i'm using show wavy edge on div. svg needs display same div due sub pixel snapping/rounding alignment varies resize. firefox seems work fine. see demo: https://jsfiddle.net/meojwnlv/ when using svg background image background-size:100% auto; scales correctly want able change color need inline. how can prevent happening? thanks it looks chrome snapping height and width of svg object integer values. since svg's width larger height, every 1px change in height of svg causing width change 10px. viewbox="20 20 900 66" there's easy workaround — make svg taller: viewbox="20 20 900 500" here's updated jsfiddle.

How to checkout project from head using CVS command using windows command prompt -

i searched extensively resolve issue, not find solution. requirement: need checkout adm project head. cvs server name : cvs02dv ( cvs installed on windows ) cvs server directory: c:\cvs\dev (the location files can accessed using eclipse or cvs client tool smartcvs) project checked out head: adm using eclipse can access files using pserver:user@cvs02dv:c:\cvs\dev i downloaded cvs client below site, unzipped in d:\vinu\installedsw\cvsclient directory. http://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-woe/cvs-1-11-22.zip command used checkout window command line: d:\vinu\installedsw\cvsclient>cvs -d:pserver:usera@cvs02dv:c:\cvs\dev co adm error: cvs checkout: cvsroot requires path spec: cvs checkout: :(gserver|kserver|pserver):[[user][:password]@]host[:[port]]/path cvs checkout: [:(ext|server):][[user]@]host[:]/path cvs [checkout aborted]: bad cvsroot: `:pserver:user@cvs02dv:c:\cvs\dev'. appreciate hint finally able resolve issue, suspected i...

css - How do I style an ASP.NET HTML server control by ID? -

when create html server control in asp.net 4.5 id , use css style id , fails. when inspect source of aspx page, shows asp.net has changed control's id . in instance... <div id="passwordstatus" class="well well-sm" runat="server"> current </div> ...becomes... <div id="article_passwordstatus" class="well well-sm"> current </div> can reliably (and best practices in mind) create css style #article_passwordstatus instead? or should create one-use css class it, like... <div id="passwordstatus" class="well well-sm password-status"> current </div> preferably, can still somehow use original id assigned? note : not want convert web server control. assuming .net 4 , greater, can use clientidmode . html this <div id="passwordstatus" class="well well-sm" runat="server" clientidmode="static"> curren...

php - Laravel multiple table join saved to a variable and running a foreach against it (search function) -

i presently have 3 tables: shows, genres , show_genre (associates two). have search form submits series of checkboxes values array based on genres selected. presently want associate shows table , genres table variable , run query against once every genre checkbox selected. then, once selection filtered, can display resulting show objects matched users parameters. my present setup following public function searchshows(searchrequest $request) { //$showswithgenres give collection inside collection can't seem access values without doing bunch of ugly code using count() in loop $showswithgenres = show::with('genres')->get(); $genres = $request->name; if(isset($genres)) { foreach($genres $genre) { //iterate against selection repeatedly reducing number of results } } } thanks. you should use wherehas() , wherein . perhaps should it: $shows = show::wherehas('genres', function($q) us...

java - How to ignore <BR> tag while printing in console -

i trying print table having 1 column heading - assigned <br> on . when printing table heading in console, due br tag, entire table not getting printed in desired structure. till reaches assigned, printed in 1 line, on goes down line. structure of table not in correct format. using selenium webdriver , goal print table same structure displaying in web page. not finding way how ignore <br> tag. check string regex replacement may help: string teststring = "abc/d <br> ff</br>"; teststring = teststring.replaceall("<br>|</br>", "");

java - Construct the name of the method to be called at runtime -

i'm learning java , i'm new this. here problem pseudocode: public void objectcaller(int objectnumber) { switch(objectnumber) { case 1: object1.setfill(color.red); break: case 2: object2.setfill(color.red); break; . .and on } } is there way replace in way that? public void objectcaller(int objectnumber) { (object + objectnumber).setfill(color.red); } it not concrete problem. thinking if possible assemble object names. you reflection , case overkill. approach?: store objects in array (or list) , use index access required one. note i'm assuming objects of same class or least have parent-child class relationship, @chetankinger pointed in comment below. public void methodcaller(int methodnumber) { myarrayofobjects[methodnumber].setfill(color.red); } ps: in fact, trying compose "object" names, not methods names. in case need use reflection api

c# - Notification Failed (Registration Invalid) on an Android Push -

i have succeeded sending push message ios device i'm running problem android. have been given gcm api key , registration id of device has app installed. however, when try send push message, notificationfailed event triggered. exception of type pushsharp.android.gcmmessagetransportresponse , message "invalid registration". doing wrong? var push = new pushbroker(); push.onnotificationsent += notificationsent; push.onchannelexception += channelexception; push.onserviceexception += serviceexception; push.onnotificationfailed += notificationfailed; push.ondevicesubscriptionexpired += devicesubscriptionexpired; push.ondevicesubscriptionchanged += devicesubscriptionchanged; push.onchannelcreated += channelcreated; push.onchanneldestroyed += channeldestroyed; push.registergcmservice(new gcmpushchannelsettings("aixxxxxxxxxxxxxxxx")); push.queuenotification(new gcmnotification() .fordeviceregistrationid("apaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...