Posts

Showing posts from March, 2013

Excel VBA : assign formula to multiples dynamic range table in same sheet -

i new , learning excel vba. having problem there more 10 tables in worksheet (number of tables not consistent) the number of columns consistent not rows in each tables i apply total row end of every table after that, apply same formula every table , put results on right side of each table this easy core problem range unknown. - not actual table in excel, tried first define range of data creating table it, again, don't have idea on how create table without knowing range. below came (which not "dynamic") sub plswork() set u = thisworkbook.worksheets("sheet2") set f = u.range("a").find(what:="name", lookat:=xlpart) = f.address set sht = u.range(a) 'trying insert @ end of table total = sum(u.offset(2, 1) + u.offset(3, 1) + u.offset(4, 1)) if cells(i, 2) = vbnullstring 'this not applicable top 2 row in colb has null string u.offset(i, 1).value = total 'putting table name @ f2 u.offset(-2, 5).value = u.offset(-3

wpf - How to change desktop/folders Icons size programmatically C# -

Image
i'm developing wpf needs make desktop icons , folder icons bigger while wpf active , returns them previous state when closing wpf basically want able control following options programmatically: folders icons : desktop icons: also how change folder option single click mode : folder icon settings per-folder , have hard time forcing preferences on them. can find descriptions of registry locations , format if search internet "shellbags" puts in undocumented territory. the desktop icon mode can changed undocumented/hacky means should let user it. you might able change double-click mode playing fdoubleclickinwebview , shgetsetsettings .

C: Scanf string with field skipper "%*" applied on conversion specifier in while loop -

i have defined structure typedef struct emp { char name[100]; int id; float salary; } emp; and use in while-loop input emp emprecs[3]; int i; = 0; while (i < 3) { printf("\nenter name: "); scanf("%*[\n\t ]%[^\n]s", emprecs[i].name); printf("\enter id: "); scanf("%d", &emprecs[i].id); printf("\nenter salary: "); scanf("%f", &emprecs[i].salary); i++; } but loop takes first name , skips other input after (it finishes, empty input). example c textbook, problem? it works better without "%*[\n\t ]" field skip, textbook tells use it. try this scanf(" %*[\n\t ]%[^\n]s", emprecs[i].name); ^^^ white space instead of scanf("%*[\n\t ]%[^\n]s", emprecs[i].name); also, scanf(" %d", &emprecs[i].id); scanf(" %f", &emprecs[i].salary);

xml - Cant read file using PHP Filter method which has spaces -

i tried read file using php://filter/ method.. i able read paths dont have spaces in between eg: php://filter/resource=c:/windows/win.ini but when try read file path has spaces, getting blank response. eg: php://filter/resource=c:/program files (x86)/xampp/htdocs/xampp/phpinfo.php my actual call done through xml entity <?xml version="1.0" encoding="utf-8"?> <!doctype gpx [<!entity xxe system 'php://filter/resource=c:/program files (x86)/xampp/htdocs/xampp/phpinfo.php'> ]> please me solve issue. you've couple of options: 1 - use quotes: "c:/program files (x86)/xampp/htdocs/xampp/phpinfo.php" 2 - use shortname program files (x86) : c:/progra~2/xampp/htdocs/xampp/phpinfo.php

php - Laravel dynamic pivot table -

in app use custom class replicate tables during tests. class create new tables _test postfix , tell eloquent work them. when work "many many" relations need specify pivot table name too. possible change pivot table during runtime application? if have understood question correctly, want able change tables in many-to-many relationship dynamically. please pay attention source code of belongstomany relationship: public function belongstomany($related, $table = null, $foreignkey = null, $relatedkey = null, $relation = null) { // if no relationship name passed, pull backtraces // name of calling function. use function name // title of relation since great convention apply. if (is_null($relation)) { $relation = $this->guessbelongstomanyrelation(); } // first, we'll need determine foreign key , "other key" // relationship. once have determined keys we'll make query // instances relationship instances need

oauth - Identity Server3 Client Claims vs Scope Claims -

is possible insert dynamically client claims , similar scope claims overriding methods such getprofiledataasync or getclaimsfromaccount ? note: if insert client claims directly configuration of client, claims inserted in access token, need somehow way insert claims dynamically somewhere. flag alwayssendclientclaims set true. the scenario following: have multiple clients, 2 resources (web api & signalr) , in order access resource need user details such userid, companyid, etc., same resources. 1 idea, tried , working, create scope , add scope claims every needed user detail , use userservice inject necessary claims. if have different scopes accessing resources? don't want have scope claim duplicated in different claims, want specify common user details @ client claims included in access token, , leave specifics scope claims. i appreciate suggestion in direction.

unity3d - Download files via FTP on Android -

i need make connection local ftp protocol between computer (server) , android device (client). should download files (images, obj,...) used in android unity app scene. i've used www class create connection , works fine in unity player run in computer client. once i've exported same scene android apk didn't work (i'm sure ftp connection stable , works because i'm able access files browser). know if there way or there problems in code use ftp protocol on android unity app? (the client doesn't need authorisation , authentication anonymous) here code use download 1 image inside scene , render sprite. using system.collections; using system.collections.generic; using unityengine; using system.net; using system.io; public class clientftp : monobehaviour { public unityengine.ui.image label; ienumerator start () { // create connection , whait until established string url = ("ftp://192.168.10.11/prova.png"); www ftpco

Aritmetic operation on Cron pattern -

i have use case need schedule 2 tasks 1. @ 'x' time defined cron pattern 2. @ 'x minus 2 hours' need calculate cron pattern based on first cron pattern for eg if first task scheduled @ 1 o'clock everyday 0 01 * * * find out first task time minus 2 hours, 0 23 * * * please suggest on how can achieved.

python - Pandas subplot using two series -

Image
i have 2 series' contains same data, contain different number of occurrences of data. want compare these 2 series' making bar chart, 2 compared. below i've done far. import matplotlib.patches mpatches fig = plt.figure() ax = fig.add_subplot(111) width = 0.3 tree_amount15.plot(kind='bar', color='red', ax=ax, width=width, position=1, label='nyc') queens_tree_types.plot(kind='bar', color='blue', ax=ax, width=width, position=0, label='queens') plt.legend(bbox_to_anchor=(0., 1.02, 1., .102), loc=3, ncol=2, mode="expand", borderaxespad=0.) ax.set_ylabel('total trees') ax.set_xlabel('tree names') plt.show() which gives me following chart: the problem have that, though 'tree names' same in each series, 'total trees' of course different, example, #5 (callery pear) #5 in 'tree_amount15', it's #3 in 'queens_tree_types' , on. how can order series such i

java - Bukkit Plugin: Can't import command -

i started working on bukkit plugin other day aim return hello in text window when user types in '/hello'. not working, because cannot import command line in eclipse. suggestions? says, "command cannot resolved type" package me.nickedyerpants; import org.bukkit.command.commandsender; import org.bukkit.plugin.java.javaplugin; public class plugin extends javaplugin{ @override public void onenable(){ //what happens when plugin enabled getlogger().info("first plugin starting up...."); } @override public void ondisable(){ //for when plugin disabled boolean oncommand(commandsender sender, command cmd, string label, string[] args){ if (cmd.getname().equalsignorecase("hello") && sender instanceof player){ player player = (player) sender; player.sendmessage("hello"); } return true; } } } so code literally bad, you're implementing oncomma

hibernate - Spring Data JPA transitive query method -

is possible in spring data jpa create transitive query method? e.g. : game entity: public class game{ long id; @manytomany private set<user> users; } user entity: public class user{ long id; string lastname; @manytomany(mappedby = "users") private set<game> games; } i tried create method: list<user> findgameusersbyidorderbylastname(long gameid); in gamerepository extending crudrepository . want users game ordered lastname . doesn't work. possible this? you should use here @query: @query("select u user u join u.games g g.id = :gameid order u.lastname") set<> custommethodname(@param("gameid") long gameid); you can more info @query here

c++ - CMake can't detect gcc built-in functions such as sqrt, pow ,exp and so on -

i wanna use cmake detect whether built-in functions of gcc exist. used check_function_exists command checking works. here code snippet in cmakelists.txt . include (checkfunctionexists) set (cmake_required_includes math.h) set (cmake_required_libraries m) check_function_exists(sqrt have_sqrt) check_function_exists (pow have_pow) check_function_exists (exp have_exp) check_function_exists (log have_log) code snippet in tutorialconfig.h.in // configured options , settings tutorial #define tutorial_version_major @tutorial_version_major@ #define tutorial_version_minor @tutorial_version_minor@ #cmakedefine use_mymath #cmakedefine have_sqrt #cmakedefine have_pow #cmakedefine have_log #cmakedefine have_exp    however, directory when executed cmake command under source directory. got such error, weird. -- c compiler identification gnu 7.0.0 -- cxx compiler identification gnu 7.0.0 -- check working c compiler: /usr/bin/cc -- check working c compiler: /usr/bin/cc -- works --

android - Exception while processing task java.io.ioexception: can't write or read -

hello added new dependency , started getting following error when try run application: warning:exception while processing task java.io.ioexception: can't write [/users/paularellano/documents/workbench/android/huddle/huddle_2.0 updt/huddle_android/build/intermediates/transforms/proguard/release/jars/3/1f/main.jar] (can't read [/users/paularellano/.android/build-cache/d4e5659d4f4fc411f22ba3f779b09d40beccc03f/output/jars/libs/internal_impl-23.0.1.jar(;;;;;;**.class)] (duplicate zip entry [internal_impl-23.0.1.jar:android/support/v4/view/windowinsetscompat.class])) i tried adding exclude not sure should exclude remove duplicate jars, appreciated it! thank in advance! gradle: compilesdkversion 23 buildtoolsversion '25.0.2' dependencies { compile ('com.google.android.gms:play-services-location:6.5.87') { exclude module: 'support-v4' } compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.android.support

php - S3 Notifications to SQS: "Unable to validate the following destination configurations" -

i trying create s3 bucket notification sqs. $downarn = $client->getqueuearn($downurl); $client->addpermission([ 'queueurl' => $downurl, 'label' => 's3watcher', 'awsaccountids' => [ 'aws' => '*' // throw error; setting plain * not work ], 'actions' => ['*'] ]); $s3->putbucketnotificationconfiguration([ 'bucket' => 's3-to-sqs-test', 'queueconfigurations' => [ [ 'id' => 'files upload watcher', 'queuearn' => $downarn, 'events' => [ 's3:objectcreated:put', ], ], ] ]); problem without permission can't create notification, receive error unable validate following destination configurations when manually going sqs , adding permission, there can mark everybody (*) users, can't make same

debugging - C++ Heap/Stack. Why only one new-operator? -

i'm starting learn topic of dynamic memory allocation. i have following code: #include <iostream> #include "a.h" #include "b.h" using namespace std; int main() { /* both objects on stack */ classastack; b classbstack; /* both objects on heap*/ // *classaheap = new a(); // b *classbheap = new b(); /* objects on heap b ???*/ *classaheap = new a(); return 0; } #ifndef a_h_ #define a_h_ #include <iostream> #include "b.h" class { public: a(); virtual ~a(); public: b b; }; #endif /* a_h_ */ #include "a.h" a::a() { std::cout <<"constructor called" << std::endl; } a::~a() { } #ifndef b_h_ #define b_h_ #include <iostream> class b { public: b(); virtual ~b(); }; #endif /* b_h_ */ #include "b.h" b::b() { std::cout <<"constructor b called" << std::endl; } b::~b() { } the output of debugger is

php - laravel Creating default object from empty value -

i have function of this function notifystore($storeid, $notification,$type, $link) { $notify = new app\store_notification; $notify->store_id = $storeid; $notify->notification = $notification; $notity->link = $link; $notify->type = $type; $notify->save(); } and in controller $order = new store_order; $orderarray['user_id'] = $signed['user_id']; $orderarray['store_id'] = $store->store_id; $orderarray['payment_method'] = $signed['payment_id']; $orderarray['address_info'] = $signed['address']; $orderarray['invoice_id'] = $signed['invoice_id']; $orderarray['order_status'] = 2; $orderarray['created_at'] = carbon::now()->format('y-m-d h:i:s'); $invoice = $order->insertgetid($orderarray); notifystore($store->store_id,"you have order review",3,$signed['invoice_id']); but every time sub

javascript - html tag inside innerHTML -

html <a href="#1" class="current">1</a> <div id="xyz"></div> javascript function updatehash() { var number = document.queryselectorall('.current')[0].innerhtml; document.queryselector('#xyz').innerhtml = '<a>'+ number + '</a>'; } updatehash(); obviously, works. however, need <a> <a href="#> so when that: document.queryselector('#xyz').innerhtml = '<a href="#'+ number + '"</a>'; it fails. i don't know if can resolved escaping character; when tried escape " & #, didn't work. maybe there isn't way escape character scenario. any appreciated. [update] i solved way. function updatehash() { var number = document.queryselectorall('.current')[0].innerhtml; var tag = '<a href=#' document.queryselector('#xyz').innerhtml = tag + number + '

php - Docker Alpine image non finding php7.1-xsl -

i trying create container alpine linux contains php7-xsl . my dockerfile follows: from composer run echo "@edge http://liskamm.alpinelinux.uk/edge/main" >> /etc/apk/repositories; \ echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories # install xls extension run apk --no-cache --update add libxslt-dev php7.1-xsl when try build container, following error: error: unsatisfiable constraints: php7.1-xsl (virtual): provided by: php7-xsl required by: world[php7.1-xsl] command '/bin/sh -c apk --no-cache --update add libxslt-dev php7.1-xsl@testing' returned non-zero code: 1 how can fix this?

client certificates - Why are my ClientCertificate properties all blank? -

i have simple loop in asp display of properties , values in clientcertificate in html page this: dim x each x in request.clientcertificate response.write("<p>") response.write(x & " = " & request.clientcertificate(x)) response.write("</p>") next i don't errors, loop doesn't write out single value. it's if clientcertificate object empty. connect server using certificate , sll , served content without problem. i'm working on issue need "subject alternative name" value cert. i'm using iis 8 server connect using reverse proxy. authentication "anonymous" because i'm not using ad; i'm using ldap. do have turn on else on server?

reactjs - Difference between component and container in react redux -

what difference between component , container in react redux? component part of react api. component class or function describes part of react ui. container informal term react component connect -ed redux store. containers receive redux state updates , dispatch actions, , don't render dom elements; delegate rendering presentational child components. for more detail read presentational vs container components dan abramov.

r - Can I pass row elements as arguments with apply? How? -

starting sample data: sample_data <- data.frame(id = 1:3, x = c(128, 113, 126), n = c(347, 344, 347), m = c(335, 334, 347), index = c(11, 9, -1)) theta <- matrix(c(0.5 ,0.5, 2, 2), nrow=2, ncol=2) lhs <- function(a, b, g, d, dat){ beta(a + dat$x, b + dat$n - dat$x) / beta(a, b) * beta(g, d + dat$n) / beta(g, d) } the function lhs returns vector of same number of rows argument dat. rhs <- function(dat, ...){ n = dat$n m = dat$m x = dat$x index = dat$x temp <- data.frame(i = 0:index, n = rep(n, index + 1) , m = rep(m, index + 1) , x = rep(x, index + 1)) sum(beta(a + temp$x, b + temp$m - temp$x + temp$i) / beta(a,b) * beta(g + 1, d + temp$m + temp$i) / beta(g, d)) } the function rhs works on single row because each observation has different value index (the index sum inside rhs).

Android custom keyboard - How to detect requested keyboard type -

following this tutorial have created working android os keyboard. standard qwerty alpha/numeric. i have second keyboard mark-up numeric keyboard. what can't seem detect type of keyboard being specified text input box. edittext specifies type edittext.setinputtype(inputtype.type_class_text); how ime service detect can present correct keyboard? public class mykeybdime extends inputmethodservice implements keyboardview.onkeyboardactionlistener { private keyboardview kv; private keyboard keyboard; private keyboard numboard; private boolean caps = false; @override public view oncreateinputview() { kv = (mkeyboardview)getlayoutinflater().inflate(r.layout.keyboard, null); keyboard = new keyboard(this, r.xml.qwertyfull); numboard = new keyboard(this, r.xml.num); // inputmethodmanager imm = (inputmethodmanager) getsystemservice(context.input_method_service); //how can detect being asked for? // imm.toggle

android - Blurry image on mobile, not on desktop. Solution? -

sorry if duplicate, couldn't find questions here or through google matched needs. i working on small image (167px x 98px) , noticed came on desktop, on mobile version of site looked blurry (not pixelated though). it's still legible noticeably hazy. after research, realized related pixel density. monitors have density of 102 ppi while phone has 554 ppi. so, thought if raised ppi while maintaining desired dimensions, should able increase quality of image while maintaining size. bumped ppi 550 , result same original 72 ppi image started with. is there else can improve quality? more info: image must uploaded netsuite used site's logo, there no coding interfere. image png-24 format has transparent background. tried regular rgb , raising image 32-bit rgb. tried increasing ppi 700 in both color formats. while 32-bit version made image better, still blurry. tested in: firefox , chrome mobile on lg g5. tested in edge, firefox, chrome , ie on desktop. running windows 10

elasticsearch - How to see the analyzed data that was indexed? -

how see analyzed data stored after index something. i know can search see this http://localhost:9200/local_products_fr/fields/_search/ but want see actual data not _source something when call _analyzer http://localhost:9200/local_products_fr/_analyze?text=<p>my <b>super</b> text</p>&analyzer=analyzer_fr { "tokens": [ { "token": "my", "start_offset": 3, "end_offset": 5, "type": "<alphanum>", "position": 0 }, { "token": "b", "start_offset": 7, "end_offset": 8, "type": "<alphanum>", "position": 1 }, { "token": "sup", "start_offset": 9, "end_offset": 14, "type": "<alphanum>", "position": 2 }, {

php - Read file on a network drive -

i'm running xampp on windows server ; apache running service local account. on server, network share mounted x: specific credentials. i want access files located on x: , run following code <?php echo shell_exec("whoami"); fopen('x:\\text.txt',"r"); ?> and theservername\thelocaluser warning: fopen(x:\text.txt) [function.fopen]: failed open stream: no such file or directory i tried run apache, not service directly launching httpd.exe ... , code worked. i can't see causes difference between service , application , how make works. you're not able using drive letter, network mapped drives single user , can't used services (even if mount user). what can instead use unc path directly, example: fopen('\\\\server\\share\\text.txt', 'r'); note, however, there few issues php's filesystem access unc paths. 1 example bug filed imagettftext , there issues file_exists , is_writeable . haven't rep

web scraping - Save rendered selection with computed CSS -

suppose want scrape part of page reproduce particular rendering with, @ most, single css. i can copy full rendering using browser console commands , still produces html classes referencing css stack. e.g., <h1 class="x"> <span class="y">here's header</span> </h1> <div class="z">here's more text different format</div> is there way either: get styles expanded inline? get referenced styles defined in single "computed" css block?

node.js - Can we do profiling in Javascript -

i have js file contain configuration code like: module.exports = { database: { username: 'devusername', password: 'devpassword', host: 'xx.xx.xx.xx', port: 27017, name: 'admin' } }; the username,password,host,port , name can change according enviornment. development , qa , production . every time when change environment need modify js file.is there way can keep details , values respective environment. thanks in advance you can set these settings using environment variables grab them via process.env . way, long environment variables named same, it's matter of having environment provisioning setup provide them.

java - Change the configuration to trigger Email to send out the Automation Test Results -

this issue specific project. posting question details issue, facing. wasn't issue until week ago when email services shut down. i trying see if somehow new email services can utilized copy test results , send out email expected stake holders. so here's .bat file configured in git executed through jenkins job. @ last line of code instructions picks paths set , executes command send out email html generated @ end of execution. :: locations @echo on @set hh=%time:~0,2% @if "%hh:~0,1%"==" " set hh=0%hh:~1,1% @set todays_datetime=%date:~10,4%-%date:~4,2%-%date:~7,2%-%hh%%time:~3,2% @set test_source_dir=\\cxxxxxxxxa1\cxxxxxplatform\decepticons\decepticons-mocebofms\test-suite @set test_results_dir=\\cxxxxxxxxa1\cxxxxxplatform\decepticons\decepticons-mocebofms\test-results\regression\demo\chrome\sign_in_%todays_datetime% @set test_execution_dir=c:\tempdocebo\webalt qed testing :: configuration , build files used @s

java - Mocking Generic types using Mockito -

i writing test case using junit , mockito rest services using jersey. getting null object instead of mocked object response class. code under test response response = builder .put( entity.entity( new bytearrayinputstream( jsonobj.tostring().getbytes() ), mediatype.application_json ), response.class ); test case: private invocation.builder builder; private entity<bytearrayinputstream> inputstream; private response response; @before public void setup() throws exception { builder = mock( invocation.builder.class ); inputstream = (entity<bytearrayinputstream>)mock( entity.class ); response = mock( response.class ); } @test public void mytest() { when( builder.put( inputstream, response.class ) ).thenreturn( response ); } so line of code gives me null response. there other way this. thanks. that because mixing various things. your production code does: entity.entity( new bytearrayinputstream( ... so, got there

erd - How to show composite keys in Chen E-R Diagram -

Image
how show composite keys in chen e-r diagram? have not used notation , don't it. references suffice, have excellent understanding of data modeling concepts (what brag!). note: aware of symbol associative entity, in such symbol, 1 may have auto-increment key pk, again, 1 may use 2 fks. in later case, pk composite. don't know how show since chen attribute symbol oval each attribute. thanks. you can underline text of each attribute involved in primary key: note associative entity set has composite key. introducing surrogate key changes regular entity set own identity. associative entity sets relationships subjects of further relationships, , relationships identified entity keys of related entity sets.

Remove text phrases from SQL Server column -

i want change string : ud12679s aspl 0001362701 bosch lista eaa152325 eaa 254336 elstock 01179470 khd 1179470 khd lrs02664 lucas 560004113 psh 12030287 robert's to ud12679s 0001362701 eaa152325 254336 01179470 1179470 lrs02664 560004113 1203028 so remove words without number. send me request: select string_agg(wyraz, ' ') unnest(string_to_array('ud12679s aspl 0001362701 bosch lista eaa152325 eaa 254336 elstock 01179470 khd 1179470 khd lrs02664 lucas 560004113 psh 12030287 robert''s'::text, ' ')) x(wyraz) wyraz~'[0-9]' but i'm not sql , want have in request update [table] set [column] = can help? in sql server 2016+ can use string_split() , in sql server 2017+ use string_agg() . in sql server pre-2016, using csv splitter table valued function jeff moden: along using stuff() select ... xml path ('') method of string concatenation . declare @str varchar(8000) = 'ud12679s as

passing a variable value from Jenkins to Node APP -

not sure how ask question put here , want hear suggestions. far, use " db_link" variable has mongo database url in config.json file. node app uses variable connect mongo. db_link gets checked git, dont want happen because dont want check in passwords git. in local development, use local.json file has these configs , not check file git (in .gitignore entry). fine making work in local dev environment, challenge when jenkins try push code test, has pass testcases (it has run test cases, time db_link value needed) before deployment happens. when need db_link variable passed jenkins. here did far .. in jenkins configurations, @ ' predefined parameters' added db_link=mymongolink parameters list. value not being handed on node app. suggestions on how achieve trying achieve? ok. figured out. before change, used pass command jenkins run test cases npm run test but now, dblink=mydb npm run test so dblink variable here being handed on node app , a

session - PHP Youtube API upload video code sample uploads twice -

i using php code sample uploading video provided youtube, can found here: https://developers.google.com/youtube/v3/code_samples/php#upload_a_video however, when session starts, requires user authorise it, takes authorise page, redirects back. on doing this, uploads twice, assume trying upload video not when not authorised. double uploads when authorising, , not when page reloaded , session still valid. how stop initial duplicate upload? you can use following code upload file after user has signin when user click submit button path defined in text input : <?php /** * library requirements * * 1. install composer (https://getcomposer.org) * 2. on command line, change directory (api-samples/php) * 3. require google/apiclient library * $ composer require google/apiclient:~2.0 */ if (!file_exists(__dir__ . '/vendor/autoload.php')) { throw new \exception('please run "composer require google/apiclient:~2.0" in "' . __dir__ .'

android - java.lang.RuntimeException - maps activity -

when try luch application, error message appear this error message: 04-14 19:19:06.846 18713-18713/ms_br.appriuso d/androidruntime: shutting down vm --------- beginning of crash 04-14 19:19:06.847 18713-18713/ms_br.appriuso e/androidruntime: fatal exception: main process: ms_br.appriuso, pid: 18713 java.lang.runtimeexception: unable instantiate activity componentinfo{ms_br.appriuso/ms_br.appriuso.mapsactivity}: java.lang.instantiationexception: java.lang.class<ms_br.appriuso.mapsactivity> cannot instantiated @ android.app.activitythread.performlaunchactivity(activitythread.java:2568) @ android.app.activitythread.handlelaunchactivity(activitythread.

c# 4.0 - How to MOQ a repository and ensure that the method is called using VerifyAll()? -

Image
this repository class using system; using system.collections.generic; using dealer.rails.common.utils; using dealer.rails.repository.entities.c3; using dealer.rails.repository.repositories.c3.interfaces; using dealer.rails.repository.repositories.soar; using microsoft.extensions.logging; using newtonsoft.json; namespace dealer.rails.repository.repositories.c3 { public class vehiclestagingrepository : baserepository, ivehiclestagingrepository { public vehiclestagingrepository(ilogger<vehiclestagingrepository> logger) : base(logger) { } public void savevehiclestaging(list<importstagevh> vehiclestagingrecords, c3context c3context) { using (var transaction = c3context.database.begintransaction()) { var vehiclestagingrecordbeforesaving = new importstagevh(); try { foreach (var vehiclestagingrecord in vehiclestagingrecord

html5 - Twitter bootstrap modal window doesn't appear -

i have application twitter bootstrap library included. jquery library loaded first library, others libraries loaded next. reason modal window doesn't work. no errors in console. have same application , same code works great. here code: <body ng-app="calca" ng-controller="calcactrl"> <div class="calc-container" ng-cloak> <form class="calc-fields" name="choice" novalidate ng-hide="types.individual || types.kids || types.family || types.car"> <!-- code --> </div> </form> <div class="modal fade" id="mymodal" tabindex="-1" role="dialog" aria-labelledby="mymodallabel"> <div class="modal-dialog" role="document" style="width: 75%; height :95%; font-size: small"> <div class="modal-content"> <div class="modal-

javascript - Regex to not match partial sequences, but match full ones -

i have escaped html this: &lt;img border=&#039;0&#039; /&gt; i'm trying match , replace full escape sequences &#039; not partial, 39 , since 39 not in unescaped string. essentially, each escape sequence should treated single token. this js regex. there way exclude matches between & , ; while still accepting sequences include both of characters? desired results: search &lt;img border=&#039;0&#039; /&gt; lt : no match. search &lt;img border=&#039;0&#039; /&gt; 39 : no match. search &lt;img border=&#039;0&#039; /&gt; &#039; : match. search &lt;img border=&#039;0&#039; /&gt; border=&#039; : match. current code: > var str = '&lt;img border=&#039;0&#039; /&gt;' > str.replace(/(border)/gi, '|$1|') '&lt;img |border|=&#039;0&#039; /&gt;' // ok > str.replace(/(39)/gi, '|$1|') '&lt;img b

api.ai - Conversation Started Callback -

when start action: ok google talk my assistant it authenticates , runs welcome intent loads user entities can used subsequent questions api.ai when try start action: ok google ask my assistant some question it authenticates, there no way me load users entities because not have sessionid conversation. when api.ai tries evaluate some question can't because user entities have not been loaded. it seems option slotfilling webhook ... not need (or complexity requires) if have option define users entities. any way api.ai sessionid (which defined google actions) before making first request api.ai ? or other way webhook called contains sessionsid before api.ai tries evaluate some question ? well found solution. placed input context named "entitiesloaded" of deep link questions. when issue: ok google ask assistant question it calls fallback intent. in fallback intent following: load user entities set "entitiesloaded" c

biztalk - Query to retrieve the Datetime for ALL the messages received by the given Receive Location -

purpose: query retrieve datetime messages received given receive location. usgage: execute sql query in biztalkdtadb database. provide receivelocation name in commented place. select rp.nvcname [receiveportname] ,rl.name [receivelocationname] ,mf.[event/adapter] [adapter] ,rl.inboundtransporturl [inboundtransporturl] ,mf.[event/timestamp] [messagereceiveddatetime] biztalkmgmtdb.dbo.adm_receivelocation rl join biztalkmgmtdb.dbo.bts_receiveport rp on rp.nid = rl.receiveportid join biztalkdtadb.dbo.dtav_messagefacts mf on mf.[event/port] = rp.nvcname , mf.[event/url] = rl.inboundtransporturl --give receivelocation name (i replace rl location name when executing query) rl.name='<<receivelocation name>>' , mf.[event/direction] = 'receive' order messagereceiveddatetime desc when ran query using sqlmanagementstudio i'm not getting , query create table hea