Posts

Showing posts from September, 2010

java - Merge PDF with FDF output only PDF -

i have pdf , fdf file , want merge them single pdf. .pdf has no fields, these included in .fdf file, contents of fields also. i have several solutions found, these works when fields stored in pdf. i use itext java. does have demo code how can solve problem? thank you! here's code works when fields present in pdf pdfreader pdfreader = new pdfreader(pdfinpath); pdfstamper stamp = new pdfstamper(pdfreader, new fileoutputstream(pdfoutpath)); fdfreader fdfreader = new fdfreader(fdfinpath); acrofields form = stamp.getacrofields(); form.setfields(fdfreader); stamp.close();

bash - Edit conf file without get in the file -

this question exact duplicate of: editing/replacing content in multiple files in unix aix without opening it 2 answers i wonder know if there way edit conf file without getting in file , changing lines? in case, need edit zabbix-agent conf file (located in /etc/zabbix/zabbix_agentd.conf) , there parameters in file need change, such server name, debuglevel, , others. normally edit file using vim , change lines, idea edit file directly bash, don`t know if possible. for example, if need change parameter debuglevel, @ bash run: # /etc/zabbix/zabbix_agentd.conf.debuglevel=3 this doesn`t works, problem... does knows?? i tested david said, didn`t solved problem... there lines in file commented , need uncomment them, , there lines need change. for example, line above: # debuglevel=3 i need change to: debuglevel=3 and line: server=127.0.0.1 i need

Spring Integration HTTP: inconsistent attribute "path" for element "inbound-gateway" -

i noticed spring integration use attribute "path" in element "inbound-gateway", reported in documentation: http://docs.spring.io/spring-integration/reference/html/http.html#_request_mapping_support but in xsd of http integration "path" attribute doesn't exist: http://www.springframework.org/schema/integration/http/spring-integration-http.xsd <xsd:element name="inbound-gateway"> <xsd:complextype> <xsd:annotation> <xsd:documentation>defines inbound http-based messaging gateway.</xsd:documentation> </xsd:annotation> <xsd:complexcontent> <xsd:extension base="gatewaytype"> <xsd:attribute name="name" type="xsd:string"/> <xsd:attribute name="extract-reply-payload" type="xsd:string" default="true"/> <xsd:attribute name=&

javascript - ERROR:Element type "uses-permission" must be followed by either attribute specifications, ">" or "/>" -

i have been trying convert web page app.but every time try run in device attached laptop usb, these errors show up. error:element type "uses-permission" must followed either attribute specifications, ">" or "/>". and error:cannot read packagename c:\users\mukesh\androidstudioprojects\new\app\src\main\androidmanifest.xml [1]: http://i.stack.imgur.com/3lxbs.jpg <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.garvit.anew"> <uses-permission android:name="android.permission.internet"s /> <application android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsrtl="true" android:theme="@style/apptheme"> <activity android:name=".firstnew" android:lab

Jasmine array comparison -

i don't understand output: expected [ ({ label: 'label1', value: 'value1' }), ({ label: 'label2', value: 'value2' }), ({ label: 'label3', value: 'value3' }) ] equal [ object({ label: 'label1', value: 'value1' }), object({ label: 'label2', value: 'value2' }), object({ label: 'label3', value: 'value3' }) ] jasmine tells me test failing , problem. don't see problem. see 2 arrays of objects should equal each other , do equal each other. is there subtlety i'm not getting? expectation not being identified 'object({ ... })'? did change jasmine while away mac not running npm install @ all? did change gravitational constant of universe? answers on postcard. or here better. what test assertion? if using .toequal should work - although objects different, .toequal performs deep comparison.

java - Android: How can I delete an item from a listview that is saved in a SQLite database? -

i've delete item listview saved in sqlite database. can using search "edittext", need remove rows clicking on them. here's code: dbhelper: public class eventdbhelper extends sqliteopenhelper { private static final string database_name = "userinfo.db"; private static final int database_version = 1; private static final string create_query = "create table "+ event.neweventinfo.table_name+"("+ event.neweventinfo.name+" text,"+ event.neweventinfo.year+" text,"+ event.neweventinfo.month+" text,"+ event.neweventinfo.day+" text,"+ event.neweventinfo.hour+" text,"+ event.neweventinfo.minute+" text);"; public eventdbhelper(context context){ super(context,database_name,null,database_version); log.e("database operations","database created/opened...")

mysql - How to view a .sql file that is too large to open in an editor? -

i have got .sql file result of backing whole website data. have sql file me now. want view data tables. file quite big , weighs 700 mb. have mysql software me. when try open file, first ask whether open or run, saying quite big file handle. selecting run make software stuck , report problem , close. if select open, after long time open showing many sentences of codes insert, , all. if choose run sql there, again stuck. so, become impossible view table. there alternative way view sql file table? using software or online ways, view table. i suggest import dump local database, able navigate , run queries against it.

rdf - how to generate triples by using sparql entailment rules in DotnetRDF? -

i defined classes in rdf file, , subclasses inherited using protege following: person class. employee subclass of person. ex-employee subclass of employee. for example if have ex-employee instances want generate , insert them instances employee class. also if have employee instances want insert them instances of person class. what asking how generate triples based on inheritance relationship between these classes following statement ? insert mygraphfile {?newinstance rdf:type ?y} mygraphfile { ?newinstance rdf:type ?x. ?x rdfs:subclassof ?y. } how can using dotnetrdf? also appreciate example illustrates entailment rules in sparql dotnetrdf library.

parsing - PHP Parse/Syntax Errors; and How to solve them? -

Image
everyone runs syntax errors. experienced programmers make typos. newcomers it's part of learning process. however, it's easy interpret error messages such as: php parse error: syntax error, unexpected '{' in index.php on line 20 the unexpected symbol isn't real culprit. line number gives rough idea start looking. always @ code context . syntax mistake hides in mentioned or in previous code lines . compare code against syntax examples manual. while not every case matches other. yet there general steps solve syntax mistakes . references summarized common pitfalls: unexpected t_string unexpected t_variable unexpected '$varname' (t_variable) unexpected t_constant_encapsed_string unexpected t_encapsed_and_whitespace unexpected $end unexpected t_function … unexpected { unexpected } unexpected ( unexpected ) unexpected [ unexpected ] unexpected t_if unexpected t_foreach unexpected t_for unexpected t_while unexpected t_do

c# - Best way to load required assemblies from another path -

i have control engine processes jobs. each job configuration specifies assembly , class needs find jobs run interface in. assembly local or on server. eg have following implement run interface \server1\assembly1.class1 \server2\folder1\assembly2.class2 \server3\folder2\folder3\assembly3.class3 i want able configure 3 jobs, each 1 referencing relevant path , assembly name should run. control engine uses reflection load specified assembly above , runs run() method. however difficulty have if assembly loading has dependencies, not loaded. eg if assembly1 depends on entity framework , control engine doesn't have dependency, fail. entity framework of course present in same folder \server1\assembly1.class1 example class1 depends on , builds location, control engine knows load class1, not ef. i need way specify each job, dependent assemblies required load , best way load them same location run() interface assembly class. i have looked @ appdomain.assemblyresolve , thought

c# - Xamarin.Forms DependencyService Get() Method Returns Null in PCL -

i have latest xamarin alpha installed , can't uwp , dependencyservice working. in uwp project have: forms.init(e); // release version, doc said debug dependencyservice.register<specialinterface>(); iinterface1 iinterface1 = dependencyservice.get<iinterface1>(); this find interface pointer. in pcl have: iinterface1 iinterface1 = dependencyservice.get<iinterface1>(); in view model contained in pcl (after button click) fails returning null value get<iinterface1>() call on both uwp , android. here implementation contained in uwp project: using prismunityapp2.uwp; using sharedproject1; using xamarin.forms; [assembly: dependency(typeof(specialinterface))] namespace prismunityapp2.uwp { public class specialinterface : iinterface1 { public specialinterface() { } public int testmethod(int i) { return i; } } } finally, interface defined in shared project follows: namespace sharedproj

android - How to hide Only Tablayout when scroll in Fragment's GridView? -

Image
i need hide tablayout , filter layout when scroll in fragment's gridview. here tried hide tablayout refers link not working. how hide 2 layouts when scroll. <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/ll_main_container" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="false" android:orientation="vertical"> <android.support.design.widget.coordinatorlayout android:id="@+id/main_content" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.appbarlayout android:id=&

perl - Passing a quoted string to system() keeping quotes intact -

this problem applies perl v5.24.0 on windows 10 except simplest cases. problem passing command lines , parameter lists between programs. taking account effects of whitespace , shell metacharacters, possibly data remains intact on several levels of calls, can involve mess of escapes , quotation marks the panacea has been use multiple-parameter form of system (which tries avoid calling shell intermediary) each parameter reliably separated without resorting quotes a call this system("dir \"c:\\program files\\\"") is easier on eye written this system('dir', 'c:\program files\\') however, can see no way pass values include enclosing quotes if write test program show.pl use data::dump; dd \@argv; and call system('show', 'xxx') then output expect ["xxx"] however, suppose want pass string "xxx" . if try system('show', '"xxx"') then quotes stripped @ point al

Javascript: capture value to use in form action field of Laravel app -

i have laravel app javascript function captures data i'm using dynamically fill modal box. $(function() { $('#edit-auction-modal').on("show.bs.modal", function (e) { var auctionid = $(e.relatedtarget).data('id'); console.log(auctionid); //auctionid has correct value selected auction. needs used in view file }); }); in view file, have modal box form (to update fields). <div id="edit-auction-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mymodallabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="panel panel-info"> <div class="panel-heading"> <div class="panel-title" id="auctionlabel"></div> </div>

html5 - AngularJS local storage service wrong return -

i have service in app. service set , user in localstorage. getuser function returning json.parse function not object. anybody know how resolve insue? the code here: .service('userservice', function() { // purpose of example store user data on ionic local storage should save on database var setuser = function(user_data) { window.localstorage.extract = json.stringify(user_data); }; var getuser = function(){ console.log(json.parse(window.localstorage.user || '{}')); return json.parse(window.localstorage.user || '{}'); }; var clearuser = function(){ delete window.localstorage.user; }; return { getuser: getuser, setuser: setuser, clearuser: clearuser }; }) thanks i use localstorage.get/set item methods below. service like .service('userservice', function() { var getuser = function(){ return json.parse(window.localstorage.getitem('user')); }; var setuser =

c# encoding to PHP encoding -

i have asp project in encoding algorithm used save password. have convert c# code php code compare password table value in sql database. code used in c# encoding md5cryptoserviceprovider md5hasher = new md5cryptoserviceprovider(); byte[] hasheddatabytes; utf8encoding encoder = new utf8encoding(); hasheddatabytes = md5hasher.computehash(encoder.getbytes(password)); now while registration, entered password '123456', , when checked table customers , password saved 0xe10adc3949ba59abbe56e057f20f883e00000000000000000000000000000000000000000000000000000000000000000000 and column structure in table password (binary(50),null). can 1 please tell me code should use in php compare '123456' 0xe10adc3949ba59abbe56e057f20f883e00000000000000000000000000000000000000000000000000000000000000000000 you have check method computehash in class md5cryptoserviceprovider , write similiar class/method in php bit of code, nobody can you!

vbscript - How to iterate visible rows alone using UFT -

when iterate below webtable,i getting row count 3(with hidden row). can see 2 rows in application. can row count of descriptive programming,but want iterate rows visible. <table> <tbody> <tr class="show">name</tr> <tr class="hide">ticket</tr> <tr class="show">city</tr> </tbody> </table> i have tried below code,but displays hidden row text well, for i=1 rowcount print owebtable.getcelldata(i,2) next actual output - name, ticket, city expecting output - name, city uft has no way knowledge of show/hide class names. if want filter out rows need yourself. set desc = description.create() desc("html tag").value = "tr" desc("class").value = "show" set cells = owebtable.childobjects(desc) print "count: " & cells.count = 0 cells.count - 1 print & ": " & cells(i).getroproperty("inner_text&quo

python - How to get the indices list of all NaN value in numpy array? -

say have numpy array defined as, [[1,2,3,4], [2,3,nan,5], [nan,5,2,3]] now want have list contains indices of missing values, [(1,2),(2,0)] @ case. is there way can that? np.isnan combined np.argwhere x = np.array([[1,2,3,4], [2,3,np.nan,5], [np.nan,5,2,3]]) np.argwhere(np.isnan(x)) output: array([[1, 2], [2, 0]])

typescript - TS Compile fails silently -

Image
i've included ng2-semantic-ui in package.json , version ^0.2.3 , , had component looked this: import {component} '@angular/core'; import {title} '@angular/platform-browser'; import {hometreecomponent} './tree'; import {userphotocomponent} "./userphoto.component"; @component({ templateurl: 'app/home/index.html', providers: [title], directives: [hometreecomponent, userphotocomponent] }) export class homeindexcomponent { constructor(title: title) { title.settitle('welcome'); } } which compiles nicely , gives javascript file expected. add import {tab_directives} "ng2-semantic-ui/ng2-semantic-ui"; imports , tab_directives directives things go wrong. but, i'm not getting compilation errors tsc - in fact errorlevel (running node on windows) 0 , prints neither errors or warnings, , other ts files compiled properly. other files compiled properly, not file. have overlooked something?

c# - Default values only for unset properties when deserializing -

i have little problem, i'm guessing should have been solved better code design beginning. here am. i have app pretty large user base. app uses profiles. profiles are deserialized file when starting app. in new releases profile class gets new properties. if profile deserialized older version these properties uninitialized. have set default values if profile created current version of app. is there simple way of initializing property default value if serialized version doesn't have it? you can specify method run after deserializing set default values: using system.runtime.serialization; [serializable] class car { public int id { get; set; } public string make { get; set; } public int doors { get; set; } public string foo { get; set; } // added property ... [ondeserialized()] internal void ondeserializedmethod(streamingcontext context) { if (string.isnullorempty(this.foo)) this.foo = "ziggy";

c# - How to replace single quotes string with literal if it contains escaped single quotes? -

i need escape single quotes strings literals , using following regular expression: '[^']*' it working fine, except when have escaped single quotes in string must replaced itself. example, following string: [compute:{iif([client name] '%happy%', 'happy\'s', 'other\'s jr.')}] i have these matches: %happy% happy\ , s jr. i can replace \' other sequence of characters (for example internal_value ) , perform string replacement, more clearer if can regular expression instead. you need negative behind. use lazy match .*? can put negative behind backslash (?<!\\) before end single quote. var reg = new regex(@"'.*?(?<!\\)'"); foreach(match m in reg.matches(@"[compute:{iif([client name] '%happy%', 'happy\'s', 'other\'s jr.')}]")) console.writeline(m); outputs '%happy%' 'happy\'s' 'other\'s jr.'

c++ - Programming techniques for evaluating multiple choice questions -

i need design module (in c++) evaluation of student sheets containing question more 1 option correct (with partial marking); my inputs :- correct answer : vector of options (e.g. 'a','c','d'); student answer : vector of options (e.g. 'a','b','c'); the rules evaluation of above question types :- full marks : (+4) if options corresponding correct options marked partial mark : (+1) marking every correct option provided there no incorrect options marked no marks : (0) if no option marked negative marks : (-2) in other cases for example, if (a), (c) , (d) correct options question, marking these 3 result in +4 marks; marking (a) , (d) result in +2 marks; , marking (a) , (b) result in -2 marks, wrong option marked. note: above rules may change later , complicated well. i have thought of following approaches :- hard-coding rules. not flexible rules may change e.g. new sub clause : incorrect option filled results in p

php - Localhost page downloading error -

in context of course on php, downloaded correctly wamp package, @ time of opening localhost homepage, got following error message : page downloading error. connection failed. firefox cannot connect server @ address localhost. run apache 2.4.17, mysql 5.7.9, php 5.6.16 , 7.0.0 versions. thanks helping. patrick fédida you must start apache service first before can enter localhost. if it's started try using following: http://localhost:80/ http://localhost:8080/

sending and receive data from client using python -

i using rs485 wifi router above model rs485 communication. intailly tried simple code arduino. sending serial data on client every 2s. void setup() { serial.begin(9600); } void loop() { serial.println("smcb1,1,1,1,1,2,3,4,5,6,6,7,8,9,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); delay(2000); } i used below python code, receive data client 1 , client 2 import socket tcp_ip = '192.168.1.3' tctcp_ip1='192.168.1.2' tcp_port = 8899 buffer_size = 100 buffer_size1=100 message = "hello, world!" s = socket.socket(socket.af_inet, socket.sock_stream) s1 = socket.socket(socket.af_inet, socket.sock_stream) s.connect((tcp_ip, tcp_port)) s1.connect((tctcp_ip1, tcp_port)) s.send(message) s1.send(message) data = s.recv(buffer_size) data1= s1.recv(buffer_size) s.close() s1.close() print "received data:", data print "received data:", data1 now have uploaded modbus rtu code , sending request , trying response. request need send in

c# - How do I fetch a particular record based on Last Week, The current week using datetime() function? -

i have sqlite db table contains date & time each item. how fetch records belongs current week , of previous week. tried doing datetime() function not find better solution/approach. i'm trying xamarin form based application. please let me know how can achived. thanks in advance... use date() function in clause. example i'm starting @ , getting last days of week date('now', 'weekday 6') , starting now, getting first day of next week, , -2 weeks date('now', 'weekday 0', '-14 day') select field1, field2 table datefield < date('now', 'weekday 6') , datefield > date('now', 'weekday 0', '-14 day')

angularjs - angular controllerAs(this) equivalent of $scope.$broadcast and $scope.on, -

according answer want fire event controller another call method of controller controller using 'scope' in angularjs $scope.$on("myevent", function (event, args) { $scope.rest_id = args.username; $scope.getmaincategories(); }); and in second controller you'd do $scope.initrestid = function(){ $scope.$broadcast("myevent", {username: $scope.user.username }); }; but don't use $scope in application, controlleras , this. there way fire event without inject scope ? or should inject $scope anyway ?but read in answer using both scope , controlleras bad practice. it's not possible register $emit or $broadcast event without $scope or $rootscope being injected in controller. it indeed bad practice use $scope variables , functions since instance of controller injected inside $scope controlleras syntax. but there not other choice injecting scope objects if want use these events. however shouldn't use $emit or $

windows - Oracle OCI.dll statically links to MSVCR100.dll - will it work with Visual Studio 2015? -

our (native) c++ app accesses oracle database through oci . ( not occi ) we're compiling on vs2010. want migrate our code base vs2015, , while seems implied oci should work there, noticed 12c version of oci.dll statically links msvcr100.dll , dynamic crt lib of visual studio 2010. should expect oci 12c (instant client) access work through native c++ app compiled vs2015 toolset? (or visual-c++ version newer 2010, really.) our app use msvcr* libs of 2015, , oci.dll continue ose msvcr100, not problem in principle . disclaimer: personally, i'd say: hell yes, sure should work, can't find official support statement (probably temporary search blindness), and i'm not fluent full oci api i'm not sure whether there corner cases invalid stuff passed.

Ruby Openssl not being found in NET::HTTP -

i'm getting following error: /users/user_name/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/net/https.rb:124:in `use_ssl=': uninitialized constant net::http::openssl (nameerror) so, opened https file , changed 1 thing see happen, did this: @ssl_context = ::openssl::ssl::sslcontext.new if can't see it, added :: openssl::ssl::sslcontext.new in method: def use_ssl=(flag) and problem went away. now can't edit source code directly ruby libs added following top of script act patch: module net class http def use_ssl=(flag) flag = (flag ? true : false) raise ioerror, "use_ssl value changed, session started"\ if started? , @use_ssl != flag if flag , not @ssl_context @ssl_context = ::openssl::ssl::sslcontext.new end @use_ssl = flag end end end however i'm getting error: scripts/get_social_data.rb:27:in `use_ssl=': uninitialized constant openssl (nameerror) despite having

r - How to run parallel Elbow method to find appropriate k-clusters -

the "data.clustering" data frame size: 943x2 > head(data.clustering) age gender 2 2 1 3 6 2 4 2 1 5 2 1 6 6 2 7 6 1 when found k values using elbow method: elbow.k <- function(mydata){ ## determine "good" k using elbow dist.obj <- dist(mydata); hclust.obj <- hclust(dist.obj); css.obj <- css.hclust(dist.obj,hclust.obj); elbow.obj <- elbow.batch(css.obj); # print(elbow.obj) k <- elbow.obj$k return(k) } # find k value start.time <- sys.time(); k.clusters <- elbow.k(data.clustering); end.time <- sys.time(); cat('time find k using elbow method is',(end.time - start.time),'seconds k value:', k.clusters); time large: time find k using elbow method 24.01472 seconds k value: 10 can me use parallel in r reduce time of elbow method ? lot. you can use library(parallel) package in r. must consider import variable , package enviroment using clusterev

python - Create dataframe from nested dictionary keeping nested dictionary as column -

Image
i have following nested dictionary , convert dataframe. the first 2 columns keys of first dictionary , third column nested dictionary. any suggestions? lot in advance! that's not greatest input data, if you're confident structure of dictionary won't change, try below: dataframe([ [x[0] x in nested_dict.keys()], [x[1] x in nested_dict.keys()], [x x in nested_dict.values()], ]).t this should give dataframe specs. 0 1 2 0 timestamp4 324 {326: 3} 1 timestamp3 323 {325: 2} 2 timestamp 321 {321: 0} 3 timestamp2 322 {323: 1}

java - Storing parent-child relationship in MarkLogic -

for marklogic (and maybe nosql in general?), best store parent-child 1 document? thus, if coming relational world, normalized parent-child table need denormalized , stored single document? will design impact how searches done (since children records searched in context of parent)? it might depend whether children can have multiple parents or not (e.g. graph-type data, instead of hierarchical), reasoning hierarchical data, storing in natural hierarchical form (using xml or json or such), makes sense. doesn't mean storing entire parent-child table 1 document, rather expanding records original trees, , storing documents. this not fit nosql solutions, work fall document store category, particularly if provide search around contents , hierarchy.. marklogic.. note: graph-type data can stored triples inside marklogic. allow querying sparql, , inferencing on instance.. hth!

android - Though ADB wifi Debugging want to install one app to 100 devices simultaneously -

i want connect many devices adb server.my idea install 1 apk approx 100 devices simultaneously . please tell me best approach can use. i don't know exact use case is. such large number of devices preferred upload application on google playstore alpha/beta release. app wont visible publicly, registered alpha/beta accounts(devices) receive updates/installation of application. https://support.google.com/googleplay/android-developer/answer/3131213?hl=en

android - Adding device-specific files as a codenameone native lib -

Image
i want add native code specific device native android libs. so, in other words, have folder full of *.so files: i have seperate cn1lib app native code contianing several libs. example app showes folder being added alongside normal .jar libs, did same codenameone: the sofolder containing so files (named correctly per example android app). i build cn1lib, , add main project under lib folder, works. however, when inspect codenameone apk , compare example android app, .so files sit in different locations. example app has under lib folder in root, , codenameone app has under assets folder. causes device requires these files not able find them. the example app being on left, , codenameone app being on right. is there way so folder under lib folder in apk file using codenameone? assistance appreciated. if don't want go through trouble of creating aar there semi-solution. you create normal android library project, , after building it, manually open arch

c# - Unable to add/remove objects to group due to orphaned SIDs: PrincipalOperationException: An error (1332) occurred -

Image
i need add/remove objects (users, groups) local group on server. below , works fine: principal adobject = principal.findbyidentity(domaincontext, login); groupprincipal groupprincipal = groupprincipal.findbyidentity(machinecontext, identitytype.name, localgroupname); groupprincipal.members.add(adobject); groupprincipal.save(); except cases when local group contains orphaned sids (active directory users or groups deleted). in case below exception: system.directoryservices.accountmanagement.principaloperationexception: error (1332) occurred while enumerating group membership. member's sid not resolved. this error message appears when try add, remove , enumerate members in local group. while reading current members of group below workaround works fine: directoryentry group = (directoryentry)groupprincipal.getunderlyingobject(); foreach (object member in (ienumerable)group.invoke("members", null)) { ... } however converting groupprincipal directoryentr

mongodb - Update form in meteor using autoform -

i have collection handles default values forms. need build ui update default values themselves, instead of force updating via mongo backed. i've used aldeed's update-each functionality. data being fetched db , displayed in table. however, when try update inputting new values in textbox, not persist. in fact, keeps throwing error i'm not aware of. exception in template helper: typeerror: cannot read property 'namedcontext' of undefined @ object.autoformfieldisinvalid as sample, here i'm working with: mongo collection: meteor:primary> db.testcollection.find() { "_id" : objectid("577ccd87f57f43d790c3ec49"), "schemaname" : "test_schema", "label" : "test_lable", "value" : "test_value" } schema: test_schema = new simpleschema({ "schemaname": { type: string, }, "label": { type: string, }, "value": {

.net - dotnet pack ouput and Visual Studio's local package source -

i trying use dotnet pack create nuget package , copy nuget packages folder used nuget source in visual studio. before dotnet used dnu pack creating nuget packages. command created folder project version lib folder, .nuspec , .nupkg , .nupkg.sha512 files. when dotnet introduced, migrated , after packing got 2 files, .nupkg , .symbols.nupkg . if copy folder used in visual studio nuget source, not recognised. what missing? using version 1.0.0-preview3-003171 of .net core. here's how handle packages locally in development environment: step 1 : set local nuget source. need copy of nuget cli if don't have it. follow instructions on creating local nuget feed : basically, create empty folder. chose c:\users\nate\documents\localnuget . step 2 : add packages local source nuget add [file] -source [folder] . added environment variable called local_nuget_path pointed folder wouldn't have type time: > setx local_nuget_path "c:\users\<you>\do

html - php works but shows no content -

i working on form , had use php send data through email. new coding. started working php. form works receive emails through php page shows blank. tried using echo , error reporting nothing shows no html code shows either. newbie mistake. php code: <?php $name = $_post['fullname']; $email_address = $_post['email']; $phone = $_post['phonenumber']; $gender = $_post['gender']; $country = $_post['country']; $age = $_post['age']; $headers = "from: noreply@domainname.com"; $to = 'someone@example.com'; $email_subject = "website contact form: $name"; $email_body = "you have received new message website contact form.\n\n"."here details:\n\nname: $name\n\nemail: $email_address\n\nphone: $phone\n\ngender: $gender\n\ncountry: $country\n\nage: $age"; mail($to,$email_subject,$email_body,$headers); return true; echo "thank you" ?> you have 2 options right now: rem

java - Spring: Pass object to RestController from Application -

so busy writing spring boot app cannot seem find out out how can pass object restcontroller main application. here application.java: @springbootapplication @componentscan("webservices") public class application { public static void main(string[] args) { applicationcontext ctx = springapplication.run(application.class, args); application app = new application(ctx); linkedblockingqueue<rawdate> queue = new linkedblockingqueue<>(); // other stuff here } } and here restcontroller: @restcontroller public class googletokencontroller { private linkedblockingqueue<rawdata> queue; @crossorigin @requestmapping(value = "/google/token", method = requestmethod.post, headers = {"content-type=application/json"}) @responsebody public string googletoken(@requestbody authcode authcode) { system.out.println("code: " + authcode.getauthcode()); // other st

javascript - Load jQuery first in 'head' tag -

i have widget i've embedded in squarespace website on multiple pages. uses jquery, it's not working each time loads because haven't loaded jquery first (i think). know paypal loads jquery dependency. i'm trying solve injecting code 'head' tag on each page of site (there's easy way on squarespace). however, i'm unsure how code this. thanks! code on each page: https://jsfiddle.net/nsilverblatt/y26nfq6v/ jquery code looks relevant (i'm new this): <script src="https://www.paypalobjects.com/eboxapps/js/5c/e55b8dad5c8ac1fc2d31f92f0dc3e810b7df96.js"></script> <script src="https://www.paypalobjects.com/eboxapps/js/73/476f06e3db7705e4f9a56a016f80df1973fc84.js"></script> <script src="https://www.paypalobjects.com/tagmgmt/bs.js" async="" defer=""></script> <script src="//www.paypalobjects.com/js/site_catalyst/pp_jscode_080706.js"></script> th

android - Chrome Custom Tab does not go back to app -

i have webview loads html links inside. links opened using chrome custom tabs. strange scenario: open chrome browser open app press link (this open chrome custom tab) press button or "x" button on custom tab instead of going app chrome browser shown. [updated] launch mode of activity, set in androidmanifest, singleinstance. the problem activity had launch mode "singleinstance". changing "singletask" or not having launchmode set in androidmanifest solves problem. don't know why that. if know why, gladly mark explanation solution.

(0xc0000005) 'Access violation': LINQ to SQL WPF VB.NET -

application compiles no errors. application runs ends no debug errors. stepping through it, cuts designer @ line output showing: "the program '[24680] appname.vshost.exe' has exited code -1073741819 (0xc0000005) 'access violation'." crashes on line: dim c_instancedetail t_instance_detail = (from instdet in db.t_instance_details instdet.id = guinstance_id select instdet).single in sub: private sub refresh_pca_instancedetail() dim c_instancedetail t_instance_detail = (from instdet in db.t_instance_details instdet.id = guinstance_id select instdet).single me.datacontext = c_instancedetail me.instancedetailtypeview = ctype(collectionviewsource.getdefaultview(me.datacontext), bindinglistcollectionview) end sub edit: class variables: private db new appdatabase_dbdatacontext 'appdatabase_db being name of dbml file - appdatabase_db.dbml private instancedetailtypeview bindinglistcollectionview property guinstance_id guid t_instance_

Access-Control-Allow-Origin header needed when pulling data from a Google Sheet with Javascript? -

everyone! first post here, although i've been lurking quite while. basically, question taking data published google sheet , putting on website javascript. have been able done, using following code between script tags, in asterisks replaced actual thing (note code repeated multiple times different cells): $.ajax("https://docs.google.com/spreadsheets/d/*spreadsheetid*/pub?gid=0&range=*cellid*&single=true&output=csv").done(function(result){ document.getelementbyid("*id*").innerhtml = result; }); i got code here , changed slight amount: getting value of cell google docs spreadsheet javascript now, problem that, while works locally on own computer, not work when upload hosting service (if helps, i'm using hostinger , running latest version of chrome, although doesn't work on ie either). on post linked above said should work, despite cross domain issues, reason, doesn't seem to. when inspect element , go under console tab, there m