Posts

Showing posts from August, 2014

MongoDB-design for revisioned data -

there many articles , questions mongodb data-model storing old revisions of documents. however, found nothing satisfying 1 of requirements; need able retroactively query database unambiguously find documents matched arbitrary criteria given point in time. to clarify, need able efficiently answer question; "which documents (and preferably versions) matched criteria {x:y...} @ time t". pseudocode: /* match version active 2010 - 2016-05-01 zipcode 12345 */ db.my_objs.find({zipcode: "12345", ~time: isodate("2016-01-01 22:14:31.003")~}) i haven't managed find solution, neither on google nor myself. have tried; having simple "from"-timestamp on data, , select "the first item before queried timepoint, matches other criteria", have not managed express in mongo. having from/to on each version, , whenever write new version, update "to" on previous version match on new version. however, have not found way atom...

MSBuild Copy task ignores (%RecursiveDir) -

i have subdirectories in build output files copied root destination directory without applying %recursivedir . <propertygroup> <slnpath>.</slnpath> <binpath>.\projname\</binpath> <destination>..\..\deploy\projname\master</destination> <propertygroup> <itemgroup> <defaultexclude include="$(slnpath)\.\**\*.svn-base"/> <defaultexclude include="$(slnpath)\.\**\.svn\**"/> <defaultexclude include="$(slnpath)\.\**\.git\**"/> <defaultexclude include="$(slnpath)\.\**\.hg\**"/> <defaultexclude include="$(slnpath)\.\**\*.log"/> <defaultexclude include="$(slnpath)\.\**\log\*.*" /> </itemgroup> <createitem include="$(slnpath)\$(binpath)bin\**\*.*" exclude="@(defaultexclude)"> <output itemname="filestocopy" taskparameter="include"/> </createitem> <copy sourcefil...

c# - ModelFirst, How to Implement Inheritance in EF6 -

Image
i making 'academy' database, has baseentity , user & course table.i won't inherit 'course' & 'user' parent table 'baseentity', using modelfirstapproach. can please me? here's baseentity table: the course table: & user table:

c# - CRM plugin PreImage not updating related entity -

i'm new developing i've encountered problem when creating plugin dynamics crm. plugin supposed render parentcustomerid field null on contact entity when account entity linked updated when field primarycontactid updated else, either null on linked contact. with code have written no errors thrown , code executed successful parentcustomerid field still contains account linked when should remove link. here code have currently: public void execute(iserviceprovider serviceprovider) { itracingservice tracingservice = (itracingservice)serviceprovider.getservice(typeof(itracingservice)); //obtain execution context ipluginexecutioncontext context = (ipluginexecutioncontext)serviceprovider.getservice(typeof(ipluginexecutioncontext)); //obtain organizational services iorganizationservicefactory servicefactory = (iorganizationservicefactory)serviceprovider.getservice(typeof(iorganizationservicefactory));...

php - Formidable Pro form - $ Post hook not working -

hi looking formidable pro web form send data crm system, after submit button cliked i have 90% coded reason not sending information through i have added website using code snippets plugin wordpress, , set snippet such tht when form x submitted should post various bits of data through crm system the data formidable pro form output in following format [21], or [18] etc have removed set of brackets around data - there set of brackets[] in formatting attached developers guide , example code crm system , own 90% developed code ideas why not connecting ? my code add_action('frm_after_create_entry', 'yourfunctionname', 30, 2); function yourfunctionname($entry_id, $form_id){ if($form_id == 2){ //replace 5 id of form //set post variables $url = 'https://secure4.mortgagekeeperonline.co.uk/mywebsitelink/php/newmortgagequickdetails.php'; // system url $fields = array( 'stagepk'=>urlen...

ruby - Rails rendering locals to partials in a loop and accessing them -

Image
hi want make game application users can participate in games , can create teams. here code in games_controller.rb def team_events @doubles = game.where(game_type: game::doubles) @mixed_doubles = game.where(game_type: game::mixed_doubles) @others = game.where(game_type: game::others) end code in team_events.html.erb: <div class = "container-fluid"> <div class = "row"> <%= render partial: "shared/table", locals: {doubles_games: @doubles} %> </div> </div> in below partial show link "create team" beside every game. when user clicks modal dialog opens contains form create team. code in _table.html.erb partial <table class = "table table-hover"> <thead> <tr> <th> game </th> <th> game type </th> <th> actions </th> </tr> </thead> <tbody> <% doubles_games.each |game| %> ...

javascript - How should I properly use setAttribute() method? -

i have single svg element i'm adding rect element createelement() method , giving width , height setattribute() method. var svg = document.queryselector("svg"); function addrect(side) { var newrect = document.createelement("rect"); svg.appendchild(newrect); var thisrect = svg.lastchild; thisrect.setattribute("width", side); thisrect.setattribute("height", side); } addrect("100"); http://codepen.io/stromqvist/pen/ywzpnb the result in chrome dev tools show <rect width="100" height="100"></rect> , yet rect doesn't have dimensions. what doing wrong? when creating svg elements, you'd use createelementns create elements qualified namespace, svg elements document.createelementns("http://www.w3.org/2000/svg", "svg"); and attributes you'd use setattributens, regular attributes width , height, setattribute should work svg.setattributens(...

JMeter: How to capture dynamic request parameter values in HTTP Request -

Image
i have recorded login script has form_key parameter dynamic. user of regular expression extractor, how can capture dynamic value in form_key? please help. you need extract form_key parameter previous response, i.e. get request login page post-processor fetch form_key (usually regular expression extractor ) post request login page (credentials , form_key previous response) also suggest add http cookie manager test plan. if experience problems - feel free use jmeter magento login test plan reference

java - How to check if a file exists in Apache Camel? -

i have next code: package camelinaction; import org.apache.camel.camelcontext; import org.apache.camel.builder.routebuilder; import org.apache.camel.impl.defaultcamelcontext; public class makenotabenefile { public static void main(string args[]) throws exception { // create camelcontext camelcontext context = new defaultcamelcontext(); // add our route camelcontext context.addroutes(new routebuilder() { public void configure() { from("quartz://report?cron=0/2+*+*+*+*+?") .setbody().simple("\n") .to("file:/c:/users/mishin/documents/work_line/?filename=${date:now:ddmmyyyy}/${date:now:ddmmyyyy}_nb.txt"); } }); // start route , let work context.start(); thread.sleep(1000); // stop camelcontext context.stop(); } } i have code creates directory , file current date camel makenotabenefile....

xml - How to fix xsd schema validation errors? -

i trying write xsd schema based on example msdn . have modified example xsd local xml file , not use namespace. however, xml fails validate. xsd file (sys_params.xsd): <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" targetnamespace="http://tempuri.org/po.xsd" xmlns="http://tempuri.org/po.xsd" elementformdefault="qualified"> <xs:annotation> <xs:documentation xml:lang="en"> purchase order schema example.com. copyright 2000 example.com. rights reserved. </xs:documentation> </xs:annotation> <xs:element name="purchaseorder" type="purchaseordertype"/> <xs:element name="comment" type="xs:string"/> <xs:complextype name="purchaseordertype"> <xs:sequence> <xs:element name="shipto" type="usaddress"/> <xs:element name="billto" type="usaddress"/> ...

performance testing - How to calculate Pacing time in load runner -

i have run 100 iterations 50 users. total duration of test 1 hour. 1 user can 2 iterations , number of transactions in script 6. how calculate pacing time? pacing 'inter-iteration' gap , used control rate of iterations during test. if goal 1 user complete 2 iterations per hour, results pacing of 1800sec (little's law mentioned above) . long summation of resp times of 6 transactions , think time between them less 1800s, able achieve desired rate. note: iteration not equal transaction, unless iteration has 1 transaction. refer pictorial understanding https://theperformanceengineer.com/2013/09/11/loadrunner-how-to-calculate-transaction-per-second-tps/

css - dropdown menus stacking onto one another -

i need in displaying drop-down sub-menus correctly in website possible. the sub-menus in drop-down menu stacking on 1 another . i want sub-menus displayed vertically. how fix this? here code : div#nav_menu-2{ float: left!important; } div.menu-secondary-container{ display: block; background-color: #f3e6ff; background-size: cover; margin: 0px; padding: 0px; overflow: visible; position: static; } div#nav_menu-2 ul{ top: 0px; margin: 0px; } div#nav_menu-2 ul li{ list-style-type: none; /*position: relative;*/ display: inline-block; } div#nav_menu-2 ul li a{ display: block; padding: 14px 16px; text-align: center; line-height: 30px; text-decoration: none; font-size: 12pt; font-weight: bold; color: purple; text-transform: uppercase; } div#nav_menu-2 ul li a:hover{ background-color: lightgray; } div#nav_menu-2 ul li a:active{ background-color: hotpink; } div#nav_menu-2 ul li a:link{ ...

sql - How to generate combinations -

i have requirement create table identifier column. identifier data comprised of 3 parts, first being letter [a-z], second being number [1-42] , third being again number [1-6]. i wondering quickest , best way go i'm stuck. output should this: a-1-1 a-1-2 a-1-3 ... z-42-6 thanks help you should use cross join derived tables containing letters/numbers needed select letters.let + '-' + numbers.num + '-' + numbers2.num from(select 'a' let union select 'b' .....) letters cross join(select '1' num union select '2' ....) numbers -- 42 cross join(select '1' num union select '2' ....) numbers2 -- 6

php - Cannot declare class App\Utils\System\Log because the name is already in use -

i'm using laravel 5.2 & php version 5.6.21 , have come across issue : fatalerrorexception in log.php line 8: cannot declare class app\utils\system\log because name in use in log.php line 8 my log.php looks : <?php namespace app\utils\system; use log; use app\log logdb; use carbon\carbon carbon; class log { public function save($msg,$flag) { /* //check see if there organisation set $org = ''; if(!is_null(session('organisation_name'))) { $org = session('organisation_name'); } $message ='{"action":"'.$msg.'", "uuid":"'.\auth::user()->id.'", "company_id":"'.\auth::user()->company_id.'","organisation":"'.$org.'","date":"'.carbon::now().'"}'; //set local log if($flag=='info') ...

osx - El Capitan php version update using brew -

i updated mac os x el capitan 10.11.5. stable version of php 5.5.34. need newer 5.6.21. first step did update php is: brew install php56 . brew installs packages under dir: /usr/local/cellar . os x el capitan path php usr/bin i tried creating symbolic link php version cellar dir points 1 of el capitan: sudo ln -sv /usr/local/cellar/php56/5.6.21/bin/php /usr/bin/php but error message: ln: /usr/bin/php: operation not permitted and there nothing can do...? maybe there way of updating php version on mack rather brew , symbolic link. also when want check php.ini php --ini this: configuration file (php.ini) path: /etc loaded configuration file: (none) you can either @ user level bash_profile or @ system level if have multiple users of machine paths file. bash profile method this common method, add or edit existing bash_profile file with vi ~/.bash_profile and add following line export path=/usr/local/bin:/usr/bin:$path its hierarchica...

php - Unable to delete session at times -

i have below handle logout , display information in header show after logout. sometimes, doesn't work. suspect whether write code handle. have ideas? please help public function logout(){ $this->nativesession->delete('user'); redirect(base_url()); } in header section of php page: <?php $usr = $this->nativesession->get('user'); if(!isset($usr) || empty($usr) || $usr["username"]==null) { // show login button } logout function: public function logout() { // removing session data $this->session->sess_destroy(); redirect('users/home'); } add in header befor html tag: <?php if ($this->session->userdata['admin']!='admin' ) { redirect('login'); } ?>

javascript - How to appendChild() on Jquery selected DOM -

i trying append child via jquery on of selected html element. my code: var table = $(this).parent(); console.log(table) table.appendchild(table_row); console: [table.table.unit-list, prevobject: jquery.fn.init[1], context: tr] //log ... appendchild not function //error just use .append() description: insert content, specified parameter, end of each element in set of matched elements. table.append(table_row); read difference between append , appendchild

How to insert vector element inside vector in java -

i have 2 set of vector , need insert second set in each of first set element , print. my input : {red,blue,green},{csk,mi,rcb} my output : {red,csk},{red,mi},{red,rcb},{blue,csk},{blue,mi},{blue,rcb},{green,csk},{green,mi},{green,csk} i tried code this. can please suggest way public static void main(string[]args){ vector v = new vector(); v.addelement("red"); v.addelement("blue"); v.addelement("green""); vector v2 = new vector(); vector v3 = new vector(); v2.addelement("csk"); v2.addelement("rcb"); v2.addelement("mi"); for(int i=0; i<v.size(); i++){ for(int j=0; j<v2.length; j++){ v3 = v(i).add(v2(j)); } } for(int i=0; i<v3.size(); i++){ system.out.println(v3); } } your expected output can achived in below way. public static void main(string[]args){ vector v = new vector(); v.addelement("red"); v.addelement("blue"); v.adde...

Swift iOS - Detect Touch Drag Enter UIView from outside UIView -

Image
how event touch, anywhere on screen, draged , enters specific uiview? how can it, in simple way, in swift ios? an example of want achieve shown below: override method of controller override func touchesmoved(touches: set<uitouch>, withevent event: uievent?) { } than check if touch inside of views rect using function cgrectcontainspoint

How to access css or js from public folder in Rails 4.0? -

i migrated application rails 3.2 4.0 . having css , js in assets folder , public -> technology folder. while running application, css , js under public folder not applicable. this layout: <!doctype html> <head> <meta charset="utf-8"> <title>abc technologies</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/technology/css/vendor/bootstrap.css"> <link rel="stylesheet" href="/technology/css/all.css"> <link rel="stylesheet" href="/technology/css/colorbox.css"> <%= javascript_include_tag "application" %> <script src="/technology/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script> <script src="/technology/js/vendor/bootstrap.min.js">...

version control - git fetch changes from a local branch -

i have git problem local branch , don't know how solve it. after reading topics on stack overflow thought found solution git produces error don't understand. i have master branch few commits behind development branch. since want make bugfix on master , made feature branch , want these changes development branch. thought switch development branch , fetch new featurebranch getting message featurebranch no repository... $ git fetch clusters fatal: 'clusters' not appear git repository fatal: not read remote repository. please make sure have correct access rights , repository exists. $ git branch clusters * develop master plotlydev protrna_plot release010 so how changes within featurebranch development branch? fetch retrieves changes remote. you're thinking of merge git checkout develop git merge feature

Return empty response in REST API in WSO2 ESB -

i have api artifact in wso2 esb 4.9.0 offering simple put rest service. the put service simplified here log of incoming request , should respond http code 200 without content. this api resource: <api xmlns="http://ws.apache.org/ns/synapse" name="myapi" context="/context"> <resource methods="put" uri-template="/resource"> <insequence> <log level="custom"> <property name="put" value="/v1/updateworkflowdata" /> </log> <property name="no_entity_body" value="true" scope="axis2" /> <property name="http_sc" value="200" scope="axis2" /> <respond /> </insequence> </resource> </api> with property "no_entity_body" true (which being used in requests) following exception...

java - My function cant save the photo in the phone gallery. he save the photo in DCIM -

this question has answer here: android:java.lang.outofmemoryerror: failed allocate 23970828 byte allocation 2097152 free bytes , 2mb until oom 20 answers here function save photo. want put picture in gallery. public file getoutputmediafile() { file dir2 = new file(environment.getexternalstoragepublicdirectory(environment.directory_pictures), "dentafy"); string timestamp = new simpledateformat("yymmdd_hhmmss", locale.getdefault()).format(new date()); string dir = environment.getexternalstoragepublicdirectory(environment.directory_pictures).tostring(); string filename = file.separator + "2img_" + timestamp + ".jpg"; log.d("getoutmediafile", filename); file c = new file(dir2.getpath(), filename); filepath = filename; pic...

Is it possible passing List<byte[]> into C++ from C# -

i m quite new integration. core requirement follows, 1. bind byte[] list<byte[]> [0] -> byte[] --- blob value [1] -> byte[] --- blob value [2] -> byte[] --- blob value [3] -> byte[] --- blob value 2. build in c# [dllimport("cs_dll.dll", callingconvention = callingconvention.cdecl, charset = charset.ansi, entrypoint = "csmultipleverificationblob")] public static extern int csmultipleverificationblob(list<byte[]> reffilename, string verifyfilename, string datafolder,long relength); 3. in cpp header follows extern "c" {__declspec(dllexport)int csmultipleverificationblob(char* pszreferencefile[], char* verifyimagefilename, char datafoldername[], long reflength); } note: pszreferencefile[] blob value db(one blob or many) created pszreferencefile byte[] , listed in c# i need pass value const char* in cpp output. actually stuck while passing variables between c++ , c#. there amy mars...

jaxb - Use JAXWS enableWrapperStyle while generating Java source with XJC -

i'm trying generate java source xsd , have disable wrapper style jaxws. i've written custom binding seems jaxws doesn't work xjc. binding use pretty simple. <jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns="http://java.sun.com/xml/ns/jaxws" version="2.1" jaxb:extensionbindingprefixes="xjc"> <jaxb:bindings> <jaxb:globalbindings typesafeenummaxmembers="2000" generateelementproperty="false" > <jaxws:enablewrapperstyle>false</jaxws:enablewrapperstyle> </jaxb:globalbindings> </jaxb:bindings> if i'm trying run ant script i'm getting following error messages. [xjc] [error] unsupported binding namespace "http://java.sun.com/xml/ns/jaxws". perhaps mean...

php - OneSignal group notification -

i created project on 1 signal. i can send php notification on phone. the problem comes when arrives more 1 notification. new notification replaces previous notification (not yet read ). how instead android has 2 unread notifications? the array can send: $fields = array( 'app_id' => "xxxxxxxxxxxxxxxxxxxxxx", 'included_segments' => array('all'), 'data' => array("foo" => "bar"), 'headings' => array("en" => "test"), 'contents' => $content, 'android_visibility' => '0', 'priority' => '10', 'android_group' => '', 'android_group_message' => array("en" => "$[notif_count] message"), 'url' => "http://www.google.it" ); thank you! use single quotes or escape $ here if want use $ character 'android_group_message' =...

java - Is "monitor" the synonym of "lock"/"bolt"? -

in javadoc, can read several times word "monitor" in object:wait , object:notify. it seems used synonym of "verrou" (in french), or "lock"/"bolt" in english. is true ? thank you. strictly speaking, monitor , mutex not mean same thing. a mutex synonym lock; i.e. "synchronization device commonly used establish mutual exclusion" . a monitor combines semantics of mutex mechanism signaling , waiting on condition. references: wikipedia page on "mutual exclusion" wikipedia page on "lock (computer science)" wikipedia page on "monitor (synchronization)" note these articles include various references cs literature give historical context use of these terms in computer science. having said that, these 2 terms (incorrectly) treated interchangeable.

php - How can I download Wordpress on my server automatically? -

i provide wordpress theme users download. thought nice give them option download newest version of wordpress includes theme. url of newst version of wordpress is: https://wordpress.org/latest.zip i following: first download latest version of wordpress on server unzip (if needed) move theme theme directory zip (if needed) provide download once zip file on ftp server, don't see problems move or unzip files. question rather: how can download wordpress on server? assuming using apache/linux server cli command on $ wget https://wordpress.org/latest.tar.gz this download latest wordpress release user folder on server. there can unpack , move var/www/...

java - Android List in SharedPreference -

i trying edit values list in sharedpreferences someting going wrong. my sharedpreference is: public class stepsdata { static sharedpreferences data; static sharedpreferences.editor editor; static final int value_key = 0; static final list<string> list_key= new vector<string>(); } i use sharedpref by: stepsdata.data = getapplicationcontext().getsharedpreferences("userdata", mode_private); stepsdata.editor = stepsdata.data.edit(); if want edit or value value_key works by: int step = stepsdata.data.getint(string.valueof(value_key), 0); editor.putint(string.valueof(value_key), 0).apply(); but have problem using list, code value is: list<string> mylist = (list<string>) data.getstringset(string.valueof(list_key),null); and delete: list<string> clearlist = new vector<string>(); editor.putstringset(string.valueof(list_key), (set<string>) clearlist).apply(); but there nullpointerexception. best way use...

iphone - How to come Ios App to foreground from background -

i working on swift ios app. want phone user connect specific wifi. open iphone wifi settings nsurl this . after app go background , control ssid every 500ms in background background task this . when phone connect specific wifi can see status , stop background task. cant comes app foreground. tried open app use nsurl metod video (i add custom url info.plist , add application function in appdelagate) app has no return use metod. unfortunately bringing app background foreground not possible. can send notification or badge user click , open app. user should have notifications enabled work. happy coding!

css - html table with vertical scroll inside tbody -

Image
i trying vertical scroll bar inside tbody fixed header. tried solution provided in link. html table 100% width, vertical scroll inside tbody table { width: 100%; border-spacing: 0; } thead, tbody, tr, th, td { display: block; } thead tr { /* fallback */ width: 97%; /* minus scroll bar width */ width: -webkit-calc(100% - 16px); width: -moz-calc(100% - 16px); width: calc(100% - 16px); } tr:after { /* clearing float */ content: ' '; display: block; visibility: hidden; clear: both; } tbody { height: 100px; overflow-y: auto; overflow-x: hidden; } tbody td, thead th { width: 19%; /* 19% less (100% / 5 cols) = 20% */ float: left; } it works fine if scroll bar appears.but if rows few , scroll bar doesn't appear, thead not aligned tbody. how can fix issue css? once tbody data move-out assigned height, y-axis get's activated. tbody { height: 50px; display: inline-block; width: 100%; overflow-y:scroll; }...

ios - instantiateViewControllerWithIdentifier returning nil -

Image
i have authorization window. when app starting okey. tap sign in , go next window. when tap sign out , want @ authorization window - nil. in method signinview controller nil. you need take instance storyboard. let storyboard = uistoryboard(name: "main", bundle: nil) let controller = storyboard.instantiateviewcontrollerwithidentifier(“myviewcontroller”) in way controller instance. make sure set storyboard id controller.

php - How to write XML tags of GRPO which has more than one document rows, SAP B1? -

Image
i have question related xml. i'm not in xml, according example of tags , screenshots can write xml tags have cardcode , dates of grpo. problem have know how can include document rows in tags example of tags <?xml version="1.0" encoding="utf-8"?> <grpo> <goods> <cardcode>v10000</cardcode> <docdate>07/11/2016</docdate> <docduedate>07/11/2016</docduedate> <taxdate>07/11/2016</taxdate> </goods> <goods> <cardcode>v1010</cardcode> <docdate>07/11/2016</docdate> <docduedate>07/11/2016</docduedate> <taxdate>07/11/2016</taxdate> </goods> </grpo> 1st screenshot 2nd screenshot i want have above data in xml, how can include document rows data in xml tags? please can me. if understand question correctly, you're unsure how configure lines in custom xml layout, correct? if that's question can this: <...

c++ - Faster evaluation of modular polynomials -

a polynomial defined such of coefficients given less prime number p. wish evaluate polynomial @ point mod p. simple approach be; int sum=arr[n],j=n-1;//sum polynomial value mod p @ point , arr[] coefficient array , k point @ polynomial evaluated while(j>=0) { sum = ((sum*k)%p + arr[j])%p; j--; } but property exist regarding such polynomials such above approach optimized further (lesser time complexity)?

python - Detect location of specific text -

appium 1.5.0 xcode 7.3 ios 10.11.4 osx ei capitan using on:simulator ios 8.1 suppose have text field to see more information click here and more click here . so identified text using xpath , can location , size. can somehow location of here .i need click it, because not element cannot search it. somehow if can location, can tap @ that. but how can location , still keep generic runs on different devices? there isn't direct way achieve this(no api available in appium itself). however, solution generic , work on devices(android , ios), programming language implementation. [you have done] location , size of element. take screenshot of current screen. crop image screenshot using location , size of image.[this step can skipped if there not ambiguous targets] [you need 1 time manually] crop out image portion want location. search location of cropped image, location , perform precise tap/click. for image search refer here : how find image within image ...

php - MYSQL Duplicate rows -

i trying insert values table in mysql, table has column should unique,so column have different values. i tried putting unique coloumn did not work, tried putting column primary key , insert ignore into command did not work ( http://www.tutorialspoint.com/mysql/mysql-handling-duplicates.htm ) my intention put phonenumber column unique every value in column different. if newly inserting value not unique should skip wihout giving error. my code create table: public function create_member_table($table) { $this->sql ="create table if not exists $table ( id bigint not null auto_increment, username varchar(50) not null, phonenumber varchar(20) not null, country varchar(2) not null, profession varchar(5000) not null, profilepic varchar(5000) not null, sms...

doctrine2 - How should Symfony projects implement UML2 class interfaces in its entity classes? -

Image
after reading around how build uml class diagrams , using solid principles , i've tried putting uml class diagram i'm happy new symfony project i'm going start. however, interfaces i've defined - example: i'm unclear if/how should implemented symfony abstract entities. i've read there seems conflicting opinions: symfony docs: how define relationships abstract classes , interfaces , seems when accessing abstract classes other bundles? questions such this people advise against using abstract classes , isntead create 'normal' entities (ie professor , student) - although isn't disregarding benefits of solid? you should @ inheritance mapping section of doctrine documentation... allows have abstract "person" class , extend make "student" or "teacher" there couple of different ways can pull off... simplest of single_table inheritance, uses "discriminator" in database know type of entity is. ...

typescript - How get the correct form of code html with (Input...) angular2 -

i need code input [input] , tag #tag because when try code html jquery console.log($("#content")[0].outerhtml); for exemple part of code become <div dnd-droppable [dropzones]="['docgrid']" (ondropsuccess)="transferdatasuccess()" class="page" id="content" size="a5" layout="portrait" > <div #content hidden></div> </div> like this <div _ngcontent-ugk-10="" class="page" dnd-droppable="" id="content" layout="portrait" size="a5" ng-reflect-dropzones="docgrid"> <div _ngcontent-ugk-10="" hidden=""></div> </div> i need come wrote in ide thanks there no way of doing that, can inline template of component . cannot alter it. inline template (and when there 1 annotation on componen...

Connecting HighCharts with external SQL Server database in SharePoint 2013 -

we have sharepoint 2013 installation , sql server 2012 external database. we rendering information sql server using highcharts. we have been doing using external lists, creating bdc connection in order retrieve information csom queries external list. are there guidelines or best practice doing developing data access layer on sharepoint?

How to detect if a String has specific UTF-8 characters in it? (Python) -

i have list of strings in python. want remove strings list special utf-8 characters. want strings include characters "u+0021" "u+00ff". so, know way detect if string contains these special characters? thanks :) edit: use python 3 the latin1 encoding correspond 256 first utf8 characters. differently, if c unicode character code in [0-255] , c.encode('latin1') has same value ord(c) . so test whether string has @ least 1 character outside [0-255] range, try encode latin1 . if contains none, encoding succeed, else unicodeencodeerror: no_special = true try: s.encode('latin1') except unicodeencodeerror: no_special = false btw, told in comment unicode characters outside [0-255] range not special , not in latin1 range. please note above accepts control characters \t , \r or \n because legal latin1 characters. may or not want here.

GWT - How to stop propagation from a child's event to its parent -

i'm building gwt application tree. every tree items represent object has boolean attribute can set through checkbox displayed in tree item itself. i have selection handler stuff on tree gets called on click on every tree items. what want do, prevent selection event firing when i'm clicking on checkboxes ... however, checkboxes don't have selectionhandler, tried put clickeventhandler event.stoppropagation(), selectionhandler still getting called ... edit: selectionhandler getting fired before clickeventhandler anyway ... thanks in advance you might consider following method provided in gwt documentation here . should bit interested in.

resultset - getString method of result set in SQL, returns the last value even when cursor is after the last line -

i have query gives 5 lines output. tried iterate on resultset using next method. after 5/more 5 iterations, rs.next starts give 0. getstring method returns last value, when cursor after last row. can please me find how possible or if expected? thanks, mathi

mysql - SQL - #1064 - You have an error in your SQL syntax; -

i exported database, because changing server. want import sql dump, getting error: #1064 - have error in sql syntax; check manual corresponds mariadb server version right syntax use near 'phpmyadmin sql dump set sql_mode = "no_auto_value_on_zero"' @ line 1 here begin of dump: -- phpmyadmin sql dump -- version 4.0.5 -- http://www.phpmyadmin.net -- -- host: localhost -- czas wygenerowania: 28 cze 2016, 12:42 -- wersja serwera: 5.5.32-cll -- wersja php: 5.3.17 set sql_mode = "no_auto_value_on_zero"; set time_zone = "+00:00"; /*!40101 set @old_character_set_client=@@character_set_client */; /*!40101 set @old_character_set_results=@@character_set_results */; /*!40101 set @old_collation_connection=@@collation_connection */; /*!40101 set names utf8 */; are changing server types? (microsoft sql, mysql, postgres...) if so, affect how sql works. need use appropriate syntax sql version using. #1064 - have error in sql syntax; check ...