Posts

Showing posts from March, 2014

can not compile cratedb correctly -

i download source of cratedb, can not compile correctly,here detail: jdk:1.8 /workspace/crate$ ./ gradlew compilejava :compilejava up-to-date :es:es-core:compilejava up-to-date :es:es-core:processresources up-to-date :es:es-core:classes up-to-date :es:es-core:jar up-to-date :core:compilejava /workspace/crate/core/src/main/java/io/crate/action/futureactionlistener.java:26: error: package org.elasticsearch.action not available import org.elasticsearch.action.actionlistener; it should elasticsearch package missing, how can next? thanks! please follow instructions on https://github.com/crate/crate/blob/master/develop.rst - think missing --recursive when cloning repository , there es submodule wasn't pulled it.

java - Remove a certain character from a .txt file -

if type java deletex e < input.txt > output.txt in terminal, code supposed remove character (in case e ) input.txt file , save same text new file output.txt e s should removed. ex: if text in input.txt follows: hello! name john doe. the output.txt file should be: hllo! nam john do. but don't spaces in output.txt . get: hllo!mynamisjohndo. code: public class deletex{ public static void main(string []args){ string x = args[0]; // character want removed text char x = x.charat(0); // transform character string char while(! stdin.isempty()){ string line = stdin.readstring(); // .txt file for( int = 0; < line.length(); i++){ if( line.charat(i) != x ){ system.out.print(line.charat(i)); } // if } // } // while } // main } // class i think better way use replace method on string. like: line = line.replace(x, ""); and print out.

html - Present table cells as links in Plone (Novice) -

new here - , sorry say; html novice. i trying use table cells links in plone . want create illusion of 'tabs' (as not available in current css) , don't want text underlined, want function page cells direct page. i tried few suggestions online don't seem work makes first cell underlined , text linked. e.g.: <td><a href="http://example.com"> hello world </a></td> my table row looks like: <table class="data"> <tbody> <tr> <th class="green" style="text-align: center; ">tab a</th> <th class="white" style="text-align: center; "> <a class="internal-link" href="www.google.com"></a>tab b</th> <th class="white" style="text-align: center; ">tab c</th> <th class="white" style="text-align: center; ">tab d&l

amazon web services - Unable to access ElasticSearch AWS through Python -

i'm trying access elasticsearch aws localhost through python (i can access through browser). from elasticsearch import elasticsearch elastic_search_endpoint = 'https://xxx' es = elasticsearch([elastic_search_endpoint]) i'm receiving error: improperlyconfigured('root certificates missing certificate validation. either pass them in using ca_certs parameter or install certifi use automatically.',) how can access it? have not configured certificate, liberated ips can access elasticsearch service. elasticsearch-py doesn’t ship default set of root certificates. have working ssl certificate validation need either specify own ca_certs or install certifi picked automatically. from elasticsearch import elasticsearch # can use rfc-1738 specify url es = elasticsearch(['https://user:secret@localhost:443']) # ... or specify common parameters kwargs # use certifi ca certificates import certifi es = elasticsearch( ['localhost',

Do I need to install Java 8 SDK to use Bazel Build to build C++ project? -

this question comes in 2 part: from can see in https://github.com/bazelbuild/bazel/tree/master/src/main , bazel written in mix of c++, java , linux .sh files. not sure core java or c++. windows binary in release page .exe rather .jar, mean don't need java sdk if never need use bazel build java? if first part false, has java 8 sdk , or java 8 jre suffice? yes, need jdk, @ least jdk 8. of bazel written in java. on platforms bazel self-extracting binary, on windows it's self-extracting .exe file. message see upon running bazel first time ("extracting bazel installation...") hints @ this. edit: think jre not enough, if don't build java rules, haven't confirmed this.

amazon web services - cloudfront points to old version of React hosted on s3 -

i have deployed react app on s3 . using cloudfront use certificate , reach s3 bucket through https . after struggling setting up, managed set up, working well. now updated project, created new version of bundle.js , uploaded s3 . my issue mydomain.com points v1 of bundle.js so tried dig little bit more, , here found: mydomain.com points v1 xxxxx.cloudfront.net points v1 mydomain.com.s3-website-eu-west-1.amazonaws.com points v2 so guess reason, cloudfront points v1, why ? there cache somewhere in there ? here config, in case helps: route53 type a points xxxxxx.cloudfront.net cloudfront domain xxxxxx.cloudfront.net cloudfront cnames mydomain.com , www.mydomain.com cloudfront origin domain name , path mydomain.com.s3-website-eu-west-1.amazonaws.com s3 bucket mydomain.com ps : double check issue not coming bundle.js , deleted background image bucket, somehow, still found , used when accessing mydomain.com (so showing v1) as @joe clay

php - Magento 1.9 create new Hello World module -

hello, guys! i hope me this. trying make new module in magento 1.9.3.2, show "hello world!" phtml file. created step step rules. module created, when open module (127.0.0.1/magento/helloworld) in browser, nothing appear, empty template. opened module in browser - screenshot here steps guided: 1. module declaration: create new xml file in app/etc/modules/m4u_helloworld.xml <?xml version="1.0"?> <config> <modules> <m4u_helloworld> <active>true</active> <codepool>local</codepool> </m4u_helloworld> </modules> </config> module configuration 2.1. create controller class in app/code/local/m4u/helloworld/controllers/indexcontroller.php class m4u_helloworld_indexcontroller extends mage

How to configure a dynamic autocomplete in Orbeon Forms? -

Image
i need use dynamic autocomplete based on ws rest show suggestions of field. used didn't work, didn't update list of suggestions. example: <fr:autocomplete id="control-3-control" appearance="minimal" labelref="@label" resource="http://127.0.0.1/api/ws/pays/all" bind="control-3-bind"> <xf:label ref="$form-resources/control-3/label"/> <xf:hint ref="$form-resources/control-3/hint"/> <xf:alert ref="$fr-resources/detail/labels/alert"/> <xf:itemset ref="./_"> <xf:label ref=".//libelle"/> <xf:value ref=".//id"/> </xf:itemset> </fr:autocomplete> and screenshot: doing "filtering" based on value entered users responsibility of service autocomplete calling. however, can't if don't provide current value of field. thi

sql - Rails - storing a date when the day is optional -

i'm collecting date store in database have account fact user may not know exact date. want offer option enter month , year. best way store these values on database? if use date object without day , store date in database defaults 1st of month, inaccurate. had idea of potentially storing day, month , year separately integers , having method on model returned date object , whether or not day accurate (ie had been inputted user , not defaulted system). it seems little messy though, there better way this? thanks. there multiple solutions available. choose 1 serves use-cases best: 1. individual date-part fields you've experimented idea. seems this: create table t( year int, month int, day int ) a month of 2017-03 represented (2017, 3, null) . note fields null -able. can make year not null if want information @ least. with model, must use client logic construct kind of date-like object further use. the big disadvantage of model is hard inde

php - send pdf to server and save it in database -

i try send pdf , text android app server , succeeded in sending text. problem can't send pdf , don't if problem in android code or php code me in problem android code private class postdata extends asynctask<string, void, string> { edittext email = (edittext) myview.findviewbyid(r.id.email); edittext phone = (edittext) myview.findviewbyid(r.id.email); string eemail=email.gettext().tostring(); string pphone=phone.gettext().tostring(); edittext first = (edittext) myview.findviewbyid(r.id.firstname); edittext second= (edittext) myview.findviewbyid(r.id.lastname); string firstname=first.gettext().tostring(); string lastname=second.gettext().tostring(); @override protected string doinbackground(string... params) { httpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost("http://phone.tmsline.com/api/request_job"); string json = ""; string responsest

xml - Whitelisting in Cordova Application -

i have cordova app whitelist of website except mine navigate user in cases. <access uri="http://dev.*" subdomains="false" /> the wildcard foo.com or bar.com or bar.in totally depends on users selection. i have tried well <allow-navigation href="http://dev.*" /> but nothing seem work. opens in new browser. if hardcode this <allow-navigation href="http://dev.foo.com" /> it works correctly,in sense opens in app rather browser.

cordova - Error when executing an ionic 2 Android app on prod mode , cannot find module ngfactory -

Image
we having error when executing , ionic2 app using --prod flag and screen gets white after splashscreen load. the command launching : ionic run android --prod we using device deployment, nexus 5x (the same behaviour emulators) ionic info: apache cordova 6.4.0 ionic framework version: 2.1.0 ionic cli version: 2.2.1 ionic app lib version: 2.2.0 ionic app scripts version: 1.2.0 ios-deploy version: not installed ios-sim version: not installed os: windows 7 node version: v6.5.0 xcode version: not installed cordova plugins: those our dependencies on package.json: "dependencies": { "@angular/common": "2.1.1", "@angular/compiler": "2.1.1", "@angular/compiler-cli": "2.1.1", "@angular/core": "2.1.1", "@angular/forms": "2.1.1", "@angular/http": "2.1.1", "@angular/platform-browser": "2.1.1", "@angular/platform-browse

python - Algorithm for searching text from corrupted file -

i have search tags text file damaged, file damaged data has changed(some character deleted , have been modified). example, have search tag -> "no of pages" text file 1: bhaskar rao mukku (57)abstract in system 2 pedal rods pedals, 1 side balls based axle, hollowed secondary axle, counter axle, 2 splined gear wheels has 2 clutch pin holes on circular pitch, 2 splined gear wheels has ratchet gears on circular pitch, sprocket wheel, 4 clutch pins , liver used convert ordinary bicycle gear bicycle. number page : 10 text file 2: bhaskar rao mukku (57)abstract in system 2 pedal rods pedals, 1 side balls based axle, hollowed secondary axle, counter axle, 2 splined gear wheels has 2 clutch pin holes on circular pitch, 2 splined gear wheels has ratchet gears on circular pitch, sprocket wheel, 4 clutch pins , liver used convert ordinary bicycle gear bicycle. no. of pages: 10 text file 3: bhaskar rao mukku (57)abstract in system 2 pedal rods pedals, 1 side

javascript - Angular digest cycle is not run for the first time -

here jsfiddle. in text box first time keypress symbol effecting ng-model because element(blur) . how can remove symbol first keypress itself. app.directive('format', ['$filter', function ($filter) { return { require: 'ngmodel', scope: { val : '=val' }, link: function (scope, elem, attrs, ctrl) { if (!ctrl) return; ctrl.$formatters.unshift(function (a) { if(attrs.symbol == '$') return $filter(attrs.format)(ctrl.$modelvalue, '$') else return $filter(attrs.format)(ctrl.$modelvalue) }); elem.bind('blur', function(event) { var = elem.val(); var plainnumber = a.split('.').filter(function(e){ return (e.length > 0); }).join('.'); var = 0; if(isnan(parsefloat(plainnum

jquery - solution to countdown restarting after refreshing -

please kindly me countdown code restarting refresh page. also, minutes , seconds counting @ same time below current javascript code; function starttimer(duration, display) { var start = date.now(), diff, minutes, seconds; function timer() { // number of seconds have elapsed since // starttimer() called diff = duration - (((date.now() - start) / 1000) | 0); // same job parseint truncates float minutes = (diff / 60 * 60) | 0; seconds = (diff % 60) | 0; minutes = minutes < 10 ? "0" + minutes : minutes; seconds = seconds < 10 ? "0" + seconds : seconds; display.textcontent = minutes + ":" + seconds; if (diff <= 0) { // add 1 second count down starts @ full duration // example 05:00 not 04:59 start = date.now() + 1000; } }; // don't want wait ful

unit testing - what is difference between chutzpah reference path and typescript reference path -

in work have seen there test project typescript project(with ts file app1.ts).it using chutzpah test runner.in config file has reference path js file generated ts compiler(app1.js).in test project there file apptests.ts in there import statement import app1.ts.as per knowledge both doing same referencing same file,but chutzpah runner doing reference. the chutzpah_reference old way let chutzpah know file referencing 1 testing. use if knew when building real deployment handled differently. said, should not use anymore , make use of chutzpah.json file.

ms word - Python-docx, customize table boders -

can customize table borders using python-docx? mean, different provided default word table styles (which don't like). example, create following tables? table examples

html - How to set the size of the images in the Carousel: -

i have been trying set size of images same value. need images appear in same size(same height , width). following code carousel. images appear in original sizes. how go achieving this? <div id="mycarousel" class="carousel slide" data-ride="carousel"> <!-- indicators --> <ol class="carousel-indicators"> <li data-target="#mycarousel" data-slide-to="0" class="active"></li> <li data-target="#mycarousel" data-slide-to="1"></li> <li data-target="#mycarousel" data-slide-to="2"></li> <li data-target="#mycarousel" data-slide-to="3"></li> </ol> <!-- wrapper slides --> <div class="carousel-inner" role="listbox"> <div class="item active"> <img src="images\banner.jpg" al

BrowserSync (Gulp Version) injecting new CSS changes but then reloads a cached CSS version in Google Chrome -

Image
when change css files browsersync injects changes correctly chrome reloads cached css file version. it works in newest versions of safari , firefox, not in chrome. browser-sync 2.17.5 google chrome version 57.0.2987.110 (64-bit) macos sierra 10.12.3 (16d32) here gulpfile.js the solution (workaround) to: open chrome dev tools, on mac: option + cmd + i in top right corner open settings , under network disable cache

javascript - Error in opening jquery dilog.$dilog()is not a function in Django -

i trying open dilaog/popup using jquery. have 12 elements on web page clicking on individually should open respective popups. but code working 5 elements maximum. after opens pop not show data. , give error $dilog()is not function.i passing element name using ajax.but element not getting passed server. please me this. my code is <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> </script> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/0.9.9/jquery.magnific-popup.min.js"></script> <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> <script src="http://code.jquery.com/ui/1.11.1/jquery-ui.min.js&q

Exclude a property from a schema [Swagger] -

i have scheme foo fields a , b , c . c array not returned when get /foos , returned when get /foos/{foo_id} . how can represent swagger scheme? (the c field being shown when get ing specific foo )

Assign one text box to second text box with key press event on both text box using jquery? -

i have 2 text box box.now want 1 text on key press event value enter value automatically write in second text box key press event.so want key press event got second text box.so how can don't know. here text box : <input type="search" id="search" class="form-control" placeholder="search..."> this script code : <script type="text/javascript"> $(function () { $("#search").keypress(function () { debugger; //$("#anothername").val($(this).val()); $(".fixed-table-container").find(".datatables_filter input.input-sm[type='search']").val($(this).val()); // want text box key press event // 2nd text box }); }) </script> so here write first text box key press event working want same time 2nd text box key press want. for example write abc on 1st textbox same time keypress using abc write automatically in 2nd

xml - how to make boost property tree print all subtrees and then end parent tree -

in code below iam trying traverse through nested map , not sure how property tree interpreting data. it printing parent tree data , starts printing child tree #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/xml_parser.hpp> #include <iostream> #include <fstream> #include <boost/archive/xml_oarchive.hpp> #include <string> #include <iostream> #include <map> #include <map> #include <iostream> #include <string> #include <vector> #include <set> #include <iterator> using namespace boost::property_tree; struct values { std::string a; std::string b; values():a("milepost"),b("dummyval"){}; values( std::string ab, std::string bc) { a=ab; b=bc; }; bool operator<(const values& other) const { return (a< other.a && b < other.b) ; } friend std::ostream& operator<<(s

Character.charValue() vs toString in JAVA -

what difference between charvalue() , tostring() methods of class character . both of them return same i.e, character value held object of class character in following code. public class othercharmethods { public static void main(string[] args) { character c1 = 'a'; character c2 = 'a'; system.out.printf( "c1 = %s\nc2 = %s\n\n", c1.charvalue(), c2.tostring()); if (c1.equals(c2)) system.out.println("c1 , c2 equal\n"); else system.out.println("c1 , c2 not equal\n"); } } // end class othercharmethods the 1 method returns single char value ( primitive type ); other 1 returns string (reference type). that there this. given comment: thing understand - returned string of course contain one character; 1 charvalue() returns you. but : still 2 different things. literals "a" , 'a' contain 1 char; in end mean different things. if print va

c# - On Asp.net core how to trigger action or method -

i working on asp.net core project , need on request on 1 controllers action trigger method , don't wait finish respond caller immediately. how can accomplish it? you can use task this. however, isn't idea because if asp.net recycles, work disappear. task.run(() => fireandforgetmethod()); a more robust , safe choice use hangfire.io relies on reliable storage. backgroundjob.enqueue(() => fireandforgetmethod());

Pycharm multiple anaconda python packages -

Image
i have project created in pycharm anaconda3 (python3) root, , doesnt recognize packages (for example in case seaborn package). when try install terminal says, seaborn installed in anaconda2 (python2.7). how can manage 2 different versions of anaconda, because still have work legacy (python2.7) codes. my project interpreter set 3.5, whereas terminal doesn't change accordingly. your situation ideal case usage of virtual environments in python. virtualenvs allow maintain versions of python without of dependency linking etc looks getting into. with anaconda , process easier can use anaconda's built in manager create separate python 2 environment below. conda create --name <yourenvname> python=2.7 anaconda which install full blown anaconda environment in 2.7. doing allow switch between python 2 , python 3 without having these managment issues. for more information see here in anaconda on using 2or3

amazon web services - Get the latest Windows 2012R2 base AMI id using aws cli? -

is there way latest windows 2012r2 base ami id using aws cli? something get-ec2imagebyname -names windows_2012r2_base in powershell. want use in linux. i have tried fetching ami id aws ec2 describe-images --owners amazon --filters "name=name,values=windows_server-2012-r2_rtm-english-64bit-base-*" feels hack. there better way in powershell? the "hack" described correct way retrieve these in aws cli. matter of fact, powershell tools' get-ec2imagebyname behind scenes; maps raw ami name (exposed showfilter parameter) pre-defined name pattern, exposed allavailable parameter. you can see listing showfilter parameter; first result matches name value you've listed: c:/ > get-ec2imagebyname -showfilters windows_server-2012-r2_rtm-english-64bit-base* windows_server-2012-r2_rtm-english-64bit-sql_2014_sp1_express* windows_server-2012-r2_rtm-english-64bit-sql_2014_sp1_standard* windows_server-2012-r2_rtm-english-64bit-sql_2014_sp1_web* wi

vb.net - Web scraping with a pop-up (Visual Basic) -

i'm trying scrape page, when login page displays pop before page need (welcome blah-blah-blah...don't hit refresh slow process...etc.etc...). naturally, httpwebrequest scrapes data , not page follows. the popup self cancels if httpwebrequest wait second or 2 , scrape, work - or - if can 2 scrapes (and discard 1st one) in same session work too. here's code: dim cookiejar new cookiecontainer dim request httpwebrequest = webrequest.createhttp(textbox1.text) request.cookiecontainer = new cookiecontainer() request.cookiecontainer.add(new uri(textbox1.text), new cookie("id", "1234")) request.preauthenticate = true request.credentials = credentialcache.defaultcredentials request.useragent = "user-agent: mozilla/5.0 (windows nt 6.1; wow64)" request.allowautoredirect = true request.maximumautomaticredirections = 4 request.maximumresponseheaderslength = 4 dim response webresponse = directcast(request.getresponse(), httpwebresponse)

jsf - How make commandButton not fully refresh page? How to use f:ajax? -

i have stream webcam video, use ustream that, generate flash embed code me, , have button turn off/on light, when press button refresh whole page , flash component. there's way not refresh page , still send command ? it's way: <h:form id="form_supervisory"> <h:panelgrid> <h:column> <iframe width="480" height="296" src="http://www.ustream.tv/embed/9599890" scrolling="no" frameborder="0" style="border: 0px none transparent;"> </iframe> <h:commandbutton value="lâmpada" action="#{supervisoryc.invertbo}" /> <h:graphicimage value="#{supervisoryc.imagebo}" /> </h:column> </h:panelgrid> </h:form> make use of ajax. it's matter of nesting <f:ajax> inside command button

SQL Server February exceeded to march -

i have problem in regards february dates: the result this: payperiod -------------- 02/15/2017 03/02/2017 expected result should this: payperiod -------------- 02/15/2017 02/28/2017 my code: create procedure [dbo].[get15thdaypayperiod] @mindate date = null, @maxdate date = null -- execute sp: -- exec [get15thdaypayperiod] @mindate = '02/01/2017', @maxdate = '02/28/2017' -- declare @mindate date = convert(varchar(15),dateadd(month, datediff(month, 0, getdate()), 0), 101), -- @maxdate date = convert(varchar(15),eomonth(getdate()),101), -- @mindate date = '20170901', -- @maxdate date = '20170930', declare @date date; declare @counter int = 0; if isnull(@mindate, 0) = 0 begin set @mindate = convert(varchar(15),dateadd(month, datediff(month, 0, getdate()), 0), 101) end if isnull(@maxdate, 0) = 0 begin set @maxdate = convert(varchar(15),eomonth(getdate()),101) end declare my_cursor cursor local static r

python - Take temperature readings every 10 minutes from a Raspberry Pi -

i have raspberry pi temperature sensors. wrote python code measure temperature , sends database. want send measurements every 10 minutes. my code currently: #!/usr/bin/python import adafruit_charlcd lcd import math import os import rpi.gpio gpio import spidev import string import time import urllib2,urllib3,urllib # .... timestamp = int(time.time()) print timestamp # <temperature measurement here> do have this? if ($timestamp < (time() - 600)): # if test ok, send measures. url = 'database address' user_agent = 'mozilla/4.0 (compatible; msie 5.5; windows nt)' param = {'timestamp' : timestamp, 'te1' : temperatures[1], te2 te3... how can make test procedure? you can wait loop follows: import time ... timestamp = int(time.time()) while true: time.sleep(10) # sleep 10 sec if int(time.time()-timestamp) > 10*60*1000: savetodatabase() timesta

ios - If/Else based on existence of object in array? -

i want trigger else statement if there no object @ indexpath in array. the array let exercisesets = unsortedexercisesets.sorted { ($0.setposition < $1.setposition) } then use let cellsset = exercisesets[indexpath.row] there chance, when user adding new cell, wont have exerciseset @ indexpath populate (adding new set existing array of sets) , need run else statement set blank cell rather attempting populate , crashing app. however if use if let error: initializer conditional binding must have optional type, not 'userexerciseset' here whole function context if needed: func configure(_ cell: newexercisetableviewcell, @ indexpath: indexpath) { if self.userexercise != nil { print("restoring cells existing exercise") let unsortedexercisesets = self.userexercise?.exercisesets?.allobjects as! [userexerciseset] let exercisesets = unsortedexercisesets.sorted { ($0.setposition < $1.setposition) } if let cel

ruby on rails - Build a cron expression -

i want build cron expression following - should run every 2 weeks , start specific day of month. i tried build expression - 5 4 2/14 * * * (here want run cron @ 04:05 on every 14th day-of-month 2 through 31) can help? so, want run on 2nd, 14 days later, , again 14 days later? not enormous list, give list: 5 4 2,16,30 * *

python - How to formulate SQLAlchemy queries to load columns and tuples multiple models in an .html file? -

i making "my pages"-page online application users can view information previous , upcoming orders. goal display placed orders, contents, associated given user id. want divide orders whether have been collected or not in order separate order history orders have not yet been collected. in order handle information orders , products i've made database in file named models.py containting following classes: class user(db.model): id = db.column(db.integer, primary_key=true) email = db.column(db.unicode(120), index=true, unique=true) password = db.column(db.unicode(20)) orders = db.relationship('order', backref='user', lazy='dynamic') def __repr__(self): return '<user %r>' % self.id class product(db.model): id = db.column(db.integer, primary_key=true) name = db.column(db.unicode(120), index=true, unique=true, nullable=false) price = db.column(db.integer, index=true, nullable=false) orders

c++ - Why ostream is not convertible to ostream? -

i doing type checking in project. following example using namespace std; cout << ( is_convertible<ostream,ostream>::value ? "true":"false" ) << endl; returns "false". could explain why? is_convertible tests if imaginary function test() { return std::declval<from>(); } is formed ( source ). std::ostream alias std::basic_ostream<char> . copy constructor deleted, , move constructor protected. so test imaginary function not formed. in short, asked if can move construct ostream ostream, , answer "no".

sql - Apply one trigger on many tables in Oracle -

i using oracle 11g on solaris platform. have created trigger inserts entry in test table every insert/update/delete on orders table. how can use same trigger 100 tables? need create 100 triggers i.e. 1 trigger on each table on want calculate dml operations? a trigger can belong 1 table. need 1 hundred triggers in situation. description seems take same form, generate create trigger statements using data dictionary. if processing complex should wrap logic in stored procedure , call (generated) triggers.

javascript - Cognito Forms: Prefill hidden field with page url -

i'm using "seamless" embed code, found on following resource page: http://help.cognitoforms.com/prefilling-a-form , , trying prefill field called "pageurl" results of like: "window.location.href", having difficulty. below example resource page preloading first , last name fields predefined text (obviously not i'm trying do, it' example have). <div class="cognito"> <script src="https://services.cognitoforms.com/yourforminfo"></script> <script>cognito.load("forms", { id: "1", entry: { "name": { "first": "bart", "last": "simpson" } } });</script> </div>

pandas - Python Dataframe select rows based on max values in one of the columns -

i have dataframe in python (many rows, 2 columns). want modify df unique value in column 1 based on largest value in column 2 (column 2 sorted in ascending order if helps). write loop prefer 1 or 2 line solution. thanks. ex. id value 100 11 100 14 100 16 200 10 200 20 200 30 300 45 400 0 400 25 desired result 100 16 200 30 300 45 400 25 you want groupby on 'a' column , index of max value using idxmax , use these indices index orig df: in [12]: df.loc[df.groupby('a')['b'].idxmax()] out[12]: b 2 100 16 5 200 30 6 300 45 8 400 25

mule - SFTP connector throwing error while giving encrytped passwords in properties file -

i using mule credential vault store encrypted passwords in mule-app-env.properties file. key used encrypt password there in mule-app.properties file. i have many password in file in encrypted form smtp connector password, salesforce user password , sftp password. password working fine sftp connector throwing - many bad attempt authorization failure error while using encrpted passwords . password , username correct only. exact error: error during login username@host: ssh_msg_disconnect: 11 many bad authentication attempts! when m printing value sftp password in logger correctly printing decrypted value. sftp connector throwing error password. can please me out regarding this

c++ - VS 2015 Macro Explanation -

we found macro #define offsetofclass(base, derived) \ ((dword)(dword_ptr)(static_cast(base*)((derived*)8))-8) while working on windows kits header resides here c:\program files (x86)\windows kits\8.1\include\um\shlwapi.h what macro ? this macro calculates offset between base , derived pointers. first takes random address ( 8 ) , casts derived* . says "let's random derived starts @ memory address 8". then static_casts base* . since base base class of derived , resulting base* pointer or not point @ same point in memory ( 8 ), depending on it's layout. then casts result dword_ptr , dword make number out of pointer. subtracts 8 (the initial value used) , gets offset. random number can used instead of 8 . for example if both base , derived empty classes, then: derived * point 8 base* point 8 the result dword 8 8-8 = 0, offset between pointers 0.