Posts

Showing posts from September, 2011

c# - anchor not working with iphone mail body -

i have email service generates approval emails information , 2 link buttons... thing is, it`s working in email apps except outlook mobile app on iphone 2 buttons not appearing here link buttons html added code behind: strhtmlbutton = "<tr><i><font size=\"2\" color=\"red\">please click on 1 of below actions automaticallygenereate e-mail response. make sure input comments fed within quotes. please not modify other response prompts.</font> </i><br><p> action:<a id='lnkapprove' style='text-decoration: none;' class=\"oralink\" href=#/\"mailto:" + objemail.emailfrom + "?subject=" + subjectapp + " &amp;body=action:%20%27approve%27%0d%0a%0d%0amanager%20comments:%20%27%27%0d%0a%0d%0a%0d%0a%0d%0aapid " + permissionid + "%0d%0a%0d%0amanagerid " + managerid + "%0d%0a%0d%0anotificationid " + notificationid + "\"><font siz

.net - WebService hangs while loading VB6 legacy interop -

we have 2 dll's - 1 x.dll (legacy dll built visual c/c++ 2005 , visual basic 6), x.interop.dll generated tlbimp. x.interop.dll added reference , used our webservice. while using .net asmx application there 2 calls it: first - checks if service available , provides data available query second - starts using x.interop.dll , queries data. second query not pass , hangs while loading interop. some interesting facts: it not work on deployment server (iis 8.5) while works on development machine (iis 10). on both server same msi package installed. it possible reproduce same issue on development machine renaming or removing access x.dll. however, in event viewer writes warning or error service not have access it, while deployment server not says accessing x.dll. tried various various configurations on component security settings , nothing seems helpful. 32-bit applications enabled on web-service. wrote separate console exe application x.interop.dll simple initializat

bar chart - Change color of bar graph after reopen figure file in MATLAB -

i have lot of graphs fig file , want change font size , color of these in function. in example, it's bar graph. this code: function changeproperties(fontsize, figdata) openfig(figdata); set(gca,'fontsize',fontsize); set(gca,'facecolor','r'); saveas(gcf,'graph.pdf','pdf'); end it changes fontsize, not bar color. the error message this: error using matlab.graphics.axis.axes/set there no facecolor property on axes class. error in changeallfonts (line 4) ‍‍‍‍‍‍ ‍‍‍‍‍‍ set(gca,'facecolor','r'); gcf doesn't work. fault? you open saved .fig files, need right handle bar object (children of axes) posteriorly (i.e. after exists, , not while creating it). quite robust way use findobj : function changeproperties(fontsize,figdata) openfig(figdata); set(gca,'fontsize',fontsize); b = findobj(gca,'type','bar'); % returns handle bar

php - Defining variable in a class -

i new php, , i'm getting undefined variable $firstdect though defined: class deck { public function getdeck() { $firstdeck = new deck(); return $this->firstdeck; } } and, <div class="panel-body"> <?php foreach ($firstdeck->getdeck() $card): ?> <img class="col-md-3" src="<?php echo $card->getimage(); ?>"> <?php endforeach; ?> </div> class deck { /* have define variable below before accessing $this->firstdeck */ public $firstdeck; public function getdeck() { $this->firstdeck = new deck(); return $this->firstdeck; } } read more here

android - Webview inside RecyclerView is showing blank screen sometimes on Nougat devices only -

in nougat device, webview inside recyclerview blank sometimes. when scroll , go webview item content disappear. there no issue on devices below android n. android n uses chrome default browser apps. thought there might bug in chrome raise bug in chrome portal well. there couple of related question in didn't solve problem. there way in android webview setting can solve problem? have written detail description in bug link. bug link: click here my onbindviewholder method code webview is final vhitem vhitem = (vhitem) holder; vhitem.webviewchild.getsettings().setusewideviewport(false); vhitem.webviewchild.getsettings().setjavascriptenabled(true); vhitem.webviewchild.loaddata("<body>" + html + "</body>", "text/html;charset=utf-8", "utf-8"); where html html string for start webview consumes memory because load has load , render html data. rather using webview in recycler view, think better if implemented e

java - How to read Sharedpreference value from another activity -

i make 2 activity first timer.java activity countdown activity , second activity saveresttime.java in activity user input number value in edittext , user save use shared preference in activity want value user save in saveresttime.java class automatically make value of countdown if user not save value default value 30 sec please me confuse how read value activity here timer.java code package com.cinegoes.www.daily10exercise; import android.app.activity; import android.content.context; import android.content.sharedpreferences; import android.os.bundle; import android.os.countdowntimer; import com.cinegoes.www.daily10exercise.saveresttime; import android.view.view; import android.widget.button; import android.widget.progressbar; import android.widget.textview; import java.util.concurrent.timeunit; import static com.cinegoes.www.daily10exercise.saveresttime.mypreference; /** * created ever on 7/25/2017. */ public class timer extends activity implements view.onclicklistener {

node.js - Uncaught TypeError: useValue,useFactory,data is not iterable! Angular 4 cli project error -

Image
i new angular 4 , have created project angular cli , error uncaught typeerror: usevalue,usefactory,data not iterable! i unable resolve it. installed , reinstalled cli , want know how can resolve it. did ng new myprj mkdir myprj ng serve i fixed problem adding es6-shim script tag in index.html file: < script > src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.22.1/‌​es6-shim.min.js">< /s‌​cript > i running same issue when running ng test during travis deployment, though executed without error locally. chromium 37.0.2062 (ubuntu 0.0.0) error uncaught typeerror: usevalue,usefactory,data not iterable! @ http://localhost:9876/_karma_webpack_/polyfills.bundle.js:830

c++ - Qt conversion error when connecting slots and signals -

i have class inherits qlistwidget called menu , trying connect class' signals widget's slots. class menu : qlistwidget { q_object public: menu(config &config, qwidget *parent = 0); ~menu(); public slots: void itemchanged(qlistwidgetitem *item); signals: void clickeditemchanged(std::string item); private: std::vector<qlistwidgetitem*> items; }; // in widget connect signals , slots connect(menu, signal(clickeditemchanged(std::string)), this, slot(menuitemchanged(std::string))); but compilation failed, saying cannot cast 'menu' private base class 'const qobject' . signature of slot matches of signal, , widget class slot belongs holds reference menu . caused problem , how should solve it?

c++ - display rectangle around components in original image -

i using opencv c++ application.i'm using connected component object detection.i want draw rectangle around object in original frame.i can draw rectangle in comonent window.can draw color rectangle in gray scale image ?in below write part of code.thanks help. mat frame; mat stat, centroid; int threshval = 100; static void on_trackbar(int, void*){ mat bw = threshval < 128 ? (frame < threshval) : (frame > threshval); mat labelimage(frame.size(), cv_32s); int nlabels = connectedcomponentswithstats(bw, labelimage, stat, centroid, 8); std::vector<vec3b> colors(nlabels); colors[0] = vec3b(0, 0, 0);//background (int label = 1; label < nlabels; ++label) { colors[label] = vec3b((rand() & 255), (rand() & 255), (rand() & 255));} @ dst(frame.size(), cv_8uc3); (int r = 0; r < dst.rows; ++r) { (int c = 0; c < dst.cols; ++c) { int label = labelimage.at<int>(r, c); vec3b &pixel = dst.at<vec3b>(r, c);

Drupal 8 - Admin - Show only content for that role -

i have problem in admin, if assign privileges roles, defining contentypes can manage , not, when person has access 1 type of content, when accessing admin, sees contents. yes, can edit ones have defined in privilege zone, can see contents in addition, can filter types of content using contetype select dropdown in search zone is there way if have created user has privileges edit , view contentype "offices" not see rest of contentypes, nor in listings, if in select filter etc? thank you by default drupal doesn't provide permissions set control view permission individual node. there single permission set 'view content', control view permission of nodes user roles. i suggest contributed modules content access , node access grants , node view permission things done you. if choose content access guide available here https://www.ostraining.com/blog/drupal/drupal-8-restricting-content/ .

encryption - Substitution cipher giving me the same text in C program -

over last few weeks i've been meddling encryption in c. i've been using simple substitution cipher i've encountered problems following code. though program runs smoothly, contents of text file "message" change same piece of text : c=Øžû† . hoping change every character of string in file random letter. #define _crt_secure_no_warnings #include <stdio.h> #include <stdlib.h> #include <windows.h> #include <type.h> #include <string.h> const int maxsize = 50; void encrypt(file *file, char file[maxsize], int i, int j) { file = fopen("message.txt", "r+"); (i = 0; < 6; i++) { file[i] = rand() + 26; fputc(file[i], file); } printf("%s", file); fclose(file); return; } int main() { int = 0; int j = 0; char file[maxsize]; file *file = 0; encrypt(file, file, i, j); system("pause"); return 0; } there quite few pr

c++ - Understanding bitwise operations - shifting and AND -

uint8_t payload[] = { 0, 0 }; pin5 = analogread(a0); payload[0] = pin5 >> 8 & 0xff; payload[1] = pin5 & 0xff; this code xbee library published andrewrapp on github. wondering how bitwise operation worked. suppose pin 5 gets analog value of 256 using particle photon board comes in 12bit format text 000100000000. payload[0] last 8 bits ie 00000000, or value after shifting ie, 00000001? becomes value in payload[1]? i want add 4-bit code of on using bitmask first 4 bits in array followed data bits. can & payload[1] 0x1 payload[1] this? the code in example reverser content of pin5 's 2 bytes payload array: significant byte placed payload[0] , least significant byte placed payload[1] . if, example, pin5 0x0a63 , payload contain 0x63 , 0x0a . if pin5 has 12-bit value, can use 4 significant bits store four-bit value of own. make sure upper bits zeroed out, use 0x0f mask instead of 0xff : payload[0] = pin5 >> 8 & 0x0f; //

php - Codeigniter : file uploading through mobile -

i using following code upload file . $this->load->library('upload'); $files = $_files; $cpt = count($_files['userfile']['name']); $this->data['data']= $files; $this->upload->initialize($this->set_upload_options()); for($i=0; $i<$cpt; $i++) { $_files['userfile']['name']= $files['userfile']['name'][$i]; $_files['userfile']['type']= $files['userfile']['type'][$i]; $_files['userfile']['tmp_name']= $files['userfile']['tmp_name'][$i]; $_files['userfile']['error']= $files['userfile']['error'][$i]; $_files['userfile']['size']= $files['userfile']['size'][$i]; $this->data['name']= $_files['userfile

Javascript: two .onclick with different functions -

i'm trying familiarize myself javascript, , behavior i've seen trying work on calculator. setup(); function setup(){ element = document.getelementbyid("1"); console.log(element); if(element.innerhtml === "1"){ var test = element; element.onclick = test1; element.onclick = test2; } } function test2(){ console.log("test2 function"); } function test1(){ console.log("test1 function"); } how come if run this, test2 function returns log, return last function called, or behavior of .onclick function? now if try calling test1 function inside test2 this, still doesn't work. function test2(){ console.log("test2 function"); test1; } but if instead this function test2(){ console.log("test2 function"); test1(); } it logs both of them. how come? i'm used ruby if relevant. ================================

java - Client-server, can't figure it out how to make multiclients sending string to one server -

need bit of help.. creating project client-server make working on watching files. working,exept part should messages client. don't know why not it. package server; import java.io.filenotfoundexception; import java.io.ioexception; import org.json.simple.parser.parseexception; public class server { public static void main(string[] args) throws filenotfoundexception, ioexception, parseexception, classnotfoundexception { new config(); new clientcomm(); while(true){ clientcomm.getlineandtypefromclient(); } system.out.println(clientcomm.ois.available()); } } client.java: package client; public class client { public static void main(string arg[]) throws exception{ new config(); new servercomm(); if(servercomm.sendauth() == true) { system.out.println("client connected server : " + servercomm.getsocket().isconnected()); new fileprocessing(); } } } servercomm.java : s

php - How to remove Warning: mysqli_connect(): (HY000/2002)? -

Image
warning: mysqli_connect(): (hy000/2002): connection attempt failed because connected party did not respond after period of time, or established connection failed because connected host has failed respond. in c:\xampp\htdocs\phpfiles\phpfile.php on line 2 my code ok...php connects local host not remote server...remote database on xamp think microsoft windows 10 <?php $con=mysqli_connect("192.168.1.1","cykiqdbuser","pass","cykiqdb"); // check connection if (mysqli_connect_errno()) { echo "failed connect mysql: " . mysqli_connect_error(); } $result = mysqli_query($con,"select * cy_bikes_log"); echo "<table border='1'> <tr> <th>id</th> <th>dock id</th> <th>status</th> </tr>"; while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['id'] . "

java - How to identify which endpoint a Twitter4j RateLimitStatusEvent contains the limit for -

i building application in java 8 using twitter4j (twitter4j-core:4.0.6) crawl friendships , followers. going populate graph structure data, , expecting hit rate limits pretty fast, trying build application in such way exhausted endpoints go sleep. to sure have correct number of remaining calls, other apps, threads or instances exhaust same pool of requests, trying use ratelimitstatuslistener interface have onratelimitstatus(ratelimitstatusevent event) , onratelimitreached(ratelimitstatusevent event) control sleep flags loops. the problem however, can't seem find anywhere access endpoint, i.e. "/friends/ids", "/followers/ids" or "/users/lookup", ratelimitstatusevent corresponds to. i have considered looking rate limit , keep local count, if there multiple instances, other apps etc. accesses info @ same time, rate limits reached before local count aware of. might publish application when finished, , might have more 1 simultaneous user. does

python - How do you get all classes defined in a module but not imported? -

i've seen following question doesn't quite me want: how can list of classes within current module in python? in particular, not want classes imported, e.g. if had following module: from my.namespace import mybaseclass somewhere.else import someotherclass class newclass(mybaseclass): pass class anotherclass(mybaseclass): pass class yetanotherclass(mybaseclass): pass if use clsmembers = inspect.getmembers(sys.modules[__name__], inspect.isclass) accepted answer in linked question suggests, return mybaseclass , someotherclass in addition 3 defined in module. how can newclass , anotherclass , yetanotherclass ? inspect __module__ attribute of class find out module defined in.

Angular dynamic filter placeholder/fallback text? -

i'm attempting create placeholder text fallback dynamic filter, can not working , not sure if possible? the filter code is: *ngfor="let example of scale.examples | filter:{type: 'solo'} i able specify placeholder/fallback text if filter type not matched. you can apply pipes anywhere. can this: <div *ngif="(scale.examples | filter:{ 'type': 'solo' }).length === 0">no values</div> <div *ngfor="let example of scale.examples | filter:{ 'type': 'solo' }"> {{example.value}} </div> here's working plunker: https://plnkr.co/edit/lxrrtdfl4di9qwjmx3wy?p=preview update if don't want overhead of sorting array twice can use new ngif else syntax: <div *ngif="(myarr | filter:{ 'type': 'triple' }); let filteredarr" style="color: blue;"> <div *ngif="filteredarr.length === 0">no results</div> <div *ngf

wpf - Dynamic Mvvm ContextMenu but SubMenu not showing -

Image
the code snippet below works desired of couple posts here, no visual flaws more , incl. separator. tried add sub-contextmenu itemsource, , not working. this have, said working expected, code snipped window 3 section 2 not (test submenu). next xaml (isnullconverter1 converter test object not null). <listbox itemssource="{binding stackvisualitems}" selecteditem="{binding selectedvisualitem}"> <listbox.itemtemplate> <datatemplate datatype="models:visualitem"> <textblock text="{binding text2display}" /> </datatemplate> </listbox.itemtemplate> <listbox.contextmenu> <contextmenu itemssource="{binding actioncollection}"> <contextmenu.resources> <controltemplate x:key="menuseparatortemplate"> <separator /> </controltemplate>

objective c - How to check for API availability in XCode 9 -

i'm using usernotification framework available in ios 10. declaring method uses framework , far, have been doing check availability follows: @interface myservice : nsobject #if __iphone_os_version_max_allowed >= 100000 -(bool)handlewillpresentnotification:(unnotificationcontent *)notificationcontent; #endif @end xcode 9 beta release , code warning 'unnotificationcontent' partial: introduced in ios 10.0 annotate 'handlewillpresentnotification:withcompletionhandler:' availability attribute silence the question how annotate in objective c code entire method? know xcode 9 introduced if (@available(ios 10, *)) { // ios 10 objc code } but how wrap entire method (including signature) in it? cheers to answer own question: need mark method using ns_available_ios macro follows: -(bool)handlewillpresentnotification:(unnotificationcontent *)notificationcontent ns_available_ios(10_0);

slider - UIKit Lightbox next button not working properly -

i'm setting slider lightbox images inside, can see bigger picture. problem comes when image fullscreen. need press next button 3 times in order next image. don't know went wrong, console throws no error. i've put whole template in codepen: <div data-uk-slider class="uk-slidenav-position"> <div class="uk-slider-container uk-container-center"> <ul class="uk-slider uk-grid" data-uk-grid-match> <li><a class="uk-display-block" href="" data-uk-lightbox="{group:'gallery'}"><img src=""/></a></li> <li><a class="uk-display-block" href="" data-uk-lightbox="{group:'gallery'}"><img src=""/></li> <li><a class="uk-display-block" href="" data-uk-lightbox="{group:'gallery'}"><img src="

java - Javafx Webengine only one website seems to be empty -

i'm developing browser opens url www.gumgum.com . can't figure out why browser loads background image. all other sites being loaded correctly. edited example: import com.sun.javafx.webkit.webconsolelistener; import javafx.application.application; import javafx.scene.scene; import javafx.scene.layout.vbox; import javafx.scene.web.webview; import javafx.stage.stage; import javafx.scene.web.webengine; public class browser extends application { public static void main(string[] args) { system.setproperty("sun.net.http.allowrestrictedheaders", "true"); application.launch(args); } @suppresswarnings("restriction") @override public void start(final stage stage) { webview webview = new webview(); webengine webengine = webview.getengine(); webengine.load("http://www.gumgum.com"); webconsolelistener.setdefaultlistener(new webconsolelistener(){ @over

How to display two views block with separate exposed filter respectively in drupal on the same page -

Image
i new in drupal. want display 2 view block on same page different exposed filter respectively. please see image bellow. as per given image view1 , view2 different views view2 depend on view1. please help. thanks in advance. this may work. suppose top block , b bottom block. now, create block exposed filter district. next, create b block 2 exposed filters district , census. make sure identifier in b block district exposed filter should same on block. whatever value applied in block filter result of b block same filter criteria. show both on page assigning them in region here in admin /admin/structure/block . now, can hide district field of b block using css. you can @ views field views module achieve same other way.

ios - NSUserDefaults.standardUserDefaults().stringForKey("useremail") value returning null -

i creating login registeration page there error. userstoredemailuser , userstoredpassword returning null when try login. please error. login code: let useremail=email.text; let userpassword=password.text; let userstoredemail = nsuserdefaults.standarduserdefaults().stringforkey("useremail") //return null let userstoredpassword = nsuserdefaults.standarduserdefaults().stringforkey("userpassword") //return null // print(emails); // print(userstoredemail); registreration code: let useremail=email.text; let userpassword=password.text; let userrepassword = repassword.text; //check empty field //store data let defaults = nsuserdefaults.standarduserdefaults() defaults.setobject("useremail", forkey: useremail!) defaults.setobject("userpassword", forkey: userpassword!) defaults.synchronize() let alert1 = uialertcontroller(title: "alert", message:"registration succesfully complete", preferredstyle:.alert) // add action

php - How to know whether I have LAMP or XAMPP installed in my Ubuntu? -

Image
i working in php in localhost. have php version 5.5.9-1, apache2 version 2.4.7, , mysql ver 14.14 in ubuntu 14.04. how check whether using lamp or xampp? i tried typing "lamp" , "xampp" in terminal. shows "command not found". should come conclusion these things(apache, mysql , php) installed seperately? you have understand : 1) lamp for lamp setup, have install php, apache , mysql packages separately. in lamp don't manage server in gui way. for ex : start apache server have type command in terminal. start apache : sudo service apache2 start for installing lamp refer : https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu 2) xampp it complete package comes bundled php,apache, mysql etc in single installation. gives control panel can manage server , configuration files.it of sort. for xampp : https://www.apachefriends.org/download.html if don't find xampp control

unix - Send html table with csv attachment using mail command -

Image
i have csv file want attach. have created html table of csv aswell inline display of table below. if not attach file, script runs fine. cat htmltempfile <head> <style> table { border-collapse: collapse; width: 70%; } th, td { padding: 8px; text-align: left; border-bottom: 1px solid #ddd; } tr:hover{background-color:#dddddd} </style> </head> <body> <table> <tr><th>team</th><th>type</th><th>10:15:00</th><th>11:15:00</th><th>12:15:00</th><th>13:15:00</th><th>14:15:00</th><th>15:15:00</th><th>15:30:00</th></tr> <tr><td>c</td><td>w</td><td>278645</td><td>434543</td><td>4906</td><td>55494</td><td>68232</td><td>7341</td><td>123641</td></tr> <tr><td>b</td><td>p</td&g

windows - How to run commands on another cmd -

i want run commands on 2 cmds while opening same file, if open .bat file opens 2 cmd , run 2 differents commands (1 each). it's possible that? if got right want do, note it's batch file: @echo off start cmd /c "echo 1st command && pause" start cmd /c "echo 2nd command && pause" read cmd here , start here . following switches of cmd command can considered: /c: carries out command specified string , stops. /k: carries out command specified string , continues. instead of using /k used /c pause command show concatenation of 2 commands here. to concate 2 commands use commanda && commandb described here @ ss64 great site when comes batch scripting: commanda && commandb : run commanda , if succeeds run commandb as requested example cd , dir , pause like: @echo off start cmd /c "cd c:\users\ && dir && pause" start cmd /c "cd c:\ && dir &

java - incompatible type GridLayout cannot be converted to layout manager -

here demo code, please check out why code given me problem. package gridlayout; import java.awt.*; import javax.swing.*; public class gridlayout { public static void main(string[] args) { eventqueue.invokelater(()->{ myframe frame = new myframe(); //frame.setdefaultcloseoperation(0); //frame.settitle("grid layout"); // frame.setdefault }); } } class myframe extends jframe{ public myframe(){ settitle("my programm"); setdefaultcloseoperation(jframe.exit_on_close); add(new mypanel()); pack(); setvisible(true); } } class mypanel extends jpanel{ private jbutton display; private double result; private string lastcommand; private boolean start; private jpanel panel; // private static final int n = 4; public mypanel(){ setlayout(new borderlayout()); //setlayout(new gridlayout(4,4)); result = 0; lastcommand = "="; start = false; display

corda - CURRENT_RPC_CONTEXT.get() must not be null -

written integration test case testing corda flows through api class as: val api=projectapi(mocknode1.rpcops) val message = "some input message" val resp: response=api.publishssi(message) assertequals(resp.status, 201,"failed publish ssi") but getting current_rpc_context.get() must not null exception while starting corda flow inside api.publishssi() method. cause? you need use rpc client api connect node. can find more details here: https://docs.corda.net/tutorial-clientrpc-api.html

ios - Array empty before finishing the method it -

i have made mistake can't find. array (class level) gets empty before returning it. private func loaduserdata() { // we're getting user info data json response let session = twitter.sharedinstance().sessionstore.session() let client = twtrapiclient.withcurrentuser() let userinfourl = "https://api.twitter.com/1.1/users/show.json" let params = ["user_id": session?.userid] var clienterror : nserror? let request = client.urlrequest(withmethod: "get", url: userinfourl, parameters: params, error: &clienterror) client.sendtwitterrequest(request) { (response, data, connectionerror) -> void in if connectionerror != nil { print("error: \(connectionerror)") } { let json = json(data: data!) if let username = json["name"].string, let description = json["description"].string, let followerscount =

MongoDb CurrentDate with setonInsert -

with $currentdate can set timestamp field server datetime. this looks this: updatedefinition<mydto> update = updates .currentdate(x => x.servertimestamp); .setoninsert(x => x.timestamp, commit.timestamp) but in want use setoninsert method. date set created documents not updated is there way c# driver?

javascript - __utma & __utmz cookies are not getting set in browser -

(function(i,s,o,g,r,a,m){i['googleanalyticsobject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new date();a=s.createelement(o), m=s.getelementsbytagname(o)[0];a.async=1;a.src=g;m.parentnode.insertbefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'ua-xxxxxx', {'sitespeedsamplerate': 100}); ga('send', 'pageview'); using code, __utma & __utmz cookies not getting set in browser. code appended in body. __utma , __utmz cookies don't exist on current version of google analytics api (analytics.js aka universal analytics). this normal instead uses cookie called _ga default. see: https://developers.google.com/analytics/devguides/collection/analyticsjs/cookie-usage

c# - Xamarin.Forms: Rendering Xamarin.Froms Control in native Dialog - wrap_content ignored -

Image
say want render xamarin.froms control (e.g xamarin.forms.label ) in native android view. following code works. ignores width , height of control ( wrap_content ). // create xamarin.froms.label xamarin.forms.label view = new xamarin.forms.label() { text = "this xamarin.forms.label", backgroundcolor = color.red, }; // create renderer var renderer = xamarin.forms.platform.android.platform.createrenderer(view); // create alertdialog var builder = new alertdialog.builder(xamarin.forms.forms.context); builder.setview(renderer.viewgroup); // use viewgroup of renderer builder.settitle("dialog"); // create , show dialog builder.create().show(); produces following: doing same native label: var view = new android.widget.textview(xamarin.forms.forms.context) { text = "this android.widget.textview", background = new android.graphics.drawables.colordrawable(android.graphics.color.red), }; var builder = new alertdialog.builder(xamarin.for

Convert TagName into <TagName></TagName> with a shortcut in Visual Studio Code -

i've encountered behaviour several times when using ctrl+c , ctrl+v in vs code, never figure out i've pressed. misspressed buttons , got this. there's combination converts selection tagname (should selected) . i've looked through list of shortcuts , wasn't able find one. ideas? you can press tab use it. example, have ul , press tab , <ul></ul> . for more informations, here .

php - SuiteCRM metadata for SAML Authentication -

i trying integrate saml authentication suitecrm 7.8.5 version. have set login url, slo url , x509 certificate in password management page.i have shibboleth idp installed on server , need metadata of suitecrm installtion configure there. have been going through suitecrm forums , tried make connection sugarcrm docs find out url/location getting metadata xml. far no luck. when taking suitecrm url, getting redirected idp , getting following message there. you may seeing page because used button while browsing secure web site or application. alternatively, may have mistakenly bookmarked web login form instead of actual web site wanted bookmark or used link created else made same mistake. left unchecked, can cause errors on browsers or result in returning web site tried leave, page presented instead.

html - multiple tables with the same TD width -

to format these 2 tables have css sheet. top table filter/sort selection. second scrollable data table. div#scrolltablecontainer { width: auto; margin: 20px; /* presentation purposes */ border: 1px solid black; } #theadcontainer { background: #cc3600; color: black; font-weight: bold; } #tbodycontainer { height: 750px; overflow-y: scroll; } td:first-child { min-width: 5%; /* edit */ max-width: 5%; border-left:0; } td:first-child + td { min-width: 4%; max-width: 4%; } td:first-child + td + td { min-width: 4%; max-width: 4%; } <div id="scrolltablecontainer"> <div id="theadcontainer"> <table border="1" align="center" width="100%" cellpadding="0" cellspacing="0"> <tr>

apache - url rewrite rules not applying to sub-directory files -

am creating site admin side , trying write general .htacess handle rewrites site , stored @ root of site. problem having rewrite rules applying files @ root files under admin directory don't work. here contents of .htaccess file: <ifmodule mod_rewrite.c> rewriteengine on rewritebase / # add trailing slash /admin rewritecond %{request_uri} ^.*/admin$ rewriterule ^(.+)$ $1/ [r=301,l] rewritecond %{request_filename} -f [or] rewritecond %{request_filename} -d rewriterule . - [l] rewriterule ^([a-z_]+)/?$ $1.php [nc,l] rewriterule ^([a-z_]+)/([a-z_]+)/?$ $1.php?$2 [nc,l] rewriterule ^([a-z_]+)/([a-z_]+)/([0-9]+)/?$ /$1.php?$2=$3 [nc,l] </ifmodule> when try access file under under admin directory example typing http://my_site/admin/test receive 404 error , nothing displayed yet file exists when access admin root http://my_site/admin/ able see default index.php file in directory. herer of content /var/log/apache2/error.log after running command less error.log

angularjs - How to disable drag side menu in ionic -

i using 2 side menu in ionic app i.e. on left , right side. how can disable dragging right menu only. tried using $ionicsidemenudelegate.candragcontent(false) disables both side dragging. html ref <ion-nav-bar> <ion-nav-buttons side="left"> <button menu-toggle="left"> </button> </ion-nav-buttons> <ion-nav-buttons side="right"> <button menu-toggle="right"> </button> </ion-nav-buttons> </ion-nav-bar> how can disable dragging right menu only. important: following answer works in ionic2/3 . you can use swipeenable(shouldenable, menuid) method, in right menu. since have 1 menu on each side, instead of id, can use side ( 'left' or 'right' ). import { menucontroller, ... } 'ionic-angular'; @component({ templateurl: 'app.html' }) export class myapp { constructor(private menuctrl: menucontroller, ...) { this.menuctrl.

mysql - SQL update table attribute after table join -

new sql. i have 2 tables. client: client_id client_name status 1 jz null 2 kd null 3 tf null and transactions: transaction_id amount client_id 1 5 1 2 5 2 3 5 3 i can join follows: select client.status, client.client_id, client.client_name, sum(transactions.amount) balance client join transactions on transactions.client_id=client.client_id group client.client_id order client_id and result: client_id client_name balance status 1 jz 5 null 2 kd 5 null 3 tf 5 null however, update value in 'status' 'on' if client balance >=0, , 'off' if <0. possible updates 'client' table? your query has syntax errors, answer question case expression: select c.client_id, c.clien

c# - a method that takes Dictionary with different data types -

the following code goes class called formula , generates numbers , labels formula. these come in 2 separate dictionarys because numbers double data type , labels string. formula formula = new formula(formula_type, primary_output, fat_values); dictionary<string, double> numbers = formula.generatenumbers(); dictionary<string, string> labels = formula.generatelabels(); i trying create method can fed either of these dictionarys stuck on put in data type in method signature (see ??? in code below). private static void displaydata(string text, dictionary<string, ???> dict) { string words = "the " + text + " dictionary contains following:"; console.out.writeline(words); foreach (var pair in dict) { console.out.writeline(pair.key + "=>" + pair.value); } console.out.writeline(""); } is there simple way accomplish this? if solution complex, alternative approach preferable because simplicity important.

TYPO3 TCA type "select" performance issue -

is there possibility use tca field type "select" table has thousands of entries? the selectbox entries shouldn't displayed (else record loads minutes or memory limit or max execution time error), search field (like existing wizard "suggest") or record browser (like tca type "group" has). it's possible tca type "group" , (very important!) setting foreign_table: 'config' => [ 'type' => 'group', 'internal_type' => 'db', 'allowed' => 'fe_users', 'foreign_table' => 'fe_users' ], from offical documentation ( https://docs.typo3.org/typo3cms/tcareference/columnsconfig/type/group.html#foreign-table ): foreign_table: property not exist group-type fields. needed workaround extbase limitation. used resolve dependencies during extbase persistence. should hold same values property allowed. notice 1 table name allowed here in co

Disable Horizontal Scrolling in PhpStorm -

is there way this? i'd rather have code wrap , within 80-100 character line lengths. scroll on every time swipe driving me crazy! there "soft wraps" functionality in ide -- -- virtually (on screen only) breaks line multiple show whole line without need horizontal scrolling. it can enabled at: for files: settings/preferences | editor | general | use soft wraps in editor for current file only: view | active editor | use soft wraps these options available via gutter context menu (the area line numbers are). if have customized context menu long time ago ... may not there (as added there straight away).

domain driven design - Dealing with a user dependent application -

an application i'm writing heavily dependent on current logged in user, give concrete example lets have list of products. now every user has 'rights' see products, particular details of product, , edit / remove fewer of those. e.g.: the user can see 3/5 products the user can see details 2 out of 3 products ... as case of application's domain, have tendency pass around user in methods. becomes cumbersome time time. have pass in user in methods, pass down 1 needs it. my gut tells me i'm missing something, i'm not sure how tackle problem. i gave thoughts @ using class holds user, , inject class everywhere need it. or using static property. now time time handy pass in user in method, guess override then: public dosomething(user user = null) { var u = user ?? this.authservice.user; ... } are there other ways tackle kind of problem ? your gut correct, keep listen it. authorization checks should not mixed core domain checks.

xamarin.forms - Xamarin Forms IoC containter + navigation service -

does xamarin.forms have built-in ioc navigation service? mean prism, register routes. if yes - documentation? if not - xamarin.forms have built-in navigation service in near future? also - if not - best mvvm fw xamarin.android, xamarin.ios, xamarin.winxyz , xamarin.forms? , why? it seems me comes down battle between prism , freshmvvm - brings me important questions: which of these 2 performing better? (which 1 faster?) which of these more lead way of mvvm frameworks considering mobile development in future? no xamarin forms not offer navigation prism. had goal of making built in navigation similar prism, has since disappeared roadmap. there no direct ioc concept built directly xamarin forms. if developing native ui's prism isn't purpose built xamarin forms. in case might should @ mvvmcross. battle tested in lot of classic xamarin apps. if developing xamarin forms, prism best use. opinion may biased, it's public opinion of many of on xamarin tea