Posts

Showing posts from March, 2011

powershell - How do I get the length of file names longer than 250, then output the character count to a csv file? -

i've got this: cmd /c dir /s /b |? {$_.length -gt 250} however, export character count , file path 2 separate columns in csv file. adding | export-csv ./250files.csv does trick exporting count column, want path each file on second column. export-csv expecting objects convert csv. since dealing strings need make objects in order desired output. calculated properties you cmd /c dir /s /b | select @{name="path";expression={$_}}, @{name="length";expression={$_.length}} should able pipe next step easy.

SAPUI5 Tool Header in XML-View -

i´ve started first sapui5 application , wanna use tool header item in developer guide . (i´m using xml-view.) i´ve included view error uicomponent.js:6 uncaught error: failed load 'sap/tnt/toolheader.js' resources/sap/tnt/toolheader.js: 404 - not found do have embed special script in application? (which one?) page.view.xml <core:view xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:tnt="sap.tnt" xmlns:html="http://www.w3.org/1999/xhtml" controllername="zdemo.controller.machdetail"> <tnt:toolheader> <button icon="sap-icon://menu2" type="transparent"> <layoutdata> <overflowtoolbarlayoutdata priority="neveroverflow" /> </layoutdata> </button> <toolbarspacer width="20px" /> <button text="...

javascript - Dropdown list set put selected value from database -

i trying create drop down menu select value stored in database. right code creates dropdown first option selected. have read through several tutorials, , tried apply them, cannot working. hope can help. <div class="form-group"> <label>up-to-date</label> <select class="form-control" name="uptodate"/> <option value="ja">ja</option> <option value="nee">nee</option> </select> </div> whole code : <?php error_reporting(e_all); ini_set('display_errors', 1); session_start(); include("../includes/connect.php"); if (isset($_session['logged_in'])) { if(isset($_post['btnslaop'])) { $id=$_post['id']; $uitgeleend=$_post['uitgeleend']; $nr=$_post['nr']; $model=$_post['model']; $serienummer=$_post['serienummer']; $capaciteit=$_post['capaciteit...

c++ - friend method from a different namespace -

i have following situation. have class foo inside own namespace my_lib : namespace my_lib{ template<typename t> class foo{ t data; public: // blah blah }; } i trying interface library has own namespace other_lib . putting interface inside wrapper namespace in own my_lib . copy method my_lib::wrapper::copy need access my_lib::foo::data need implement following: namespace my_lib{ namespace wrapper{ template<typename t> void copy(const foo<t>& my_foo, other_lib::foo<t>& other_foo) { // copy my_foo.data other_foo } } } to accomplish my_lib::wrapper::copy method needs friend of my_lib::foo class. can accomplish series of forward declarations in foo.h // forward declare other_lib::foo namespace other_lib{ template<typename t> class foo; } namespace my_lib{ // forward declare wrapper::copy namespace wrapper{ template<typename t> void copy(const foo<t>& my_foo, other_lib::foo<t>& other_foo); }...

android - Write permission on external SD card is denied -

i use command adb push transfer files external sd card of phone. i'm using android 5.0. write permission denied . i use ls command see permissions list. ./adb shell ls /storage/extsdcard -la and here 1 of got: drwxrwx--- root sdcard_r 2015-12-13 10:29 new as see, file group sdcard_r (has no write permission). please me! how can write data external sd card using adb? root user elevated permissions, can file or folder in system. it's dangerous, powerful, , integral part of linux. android popular "version" of linux in world (as popular computing system), discussed above superuser access more restricted on other linux systems root phone

android - use google mobile vision api to detect the first barcode and send the data to another activity -

hi checked barcode reader sample google on github , trying make barcodedetector detect first barcode (only one) , when send decoded barcode activity. mabye wrong need put code barcodegraphic graphic = mgraphicoverlay.getfirstgraphic(); barcode barcode = null; if (graphic != null) { barcode = graphic.getbarcode(); if (barcode != null) { intent data = new intent(); data.putextra(barcodeobject, barcode); setresult(commonstatuscodes.success, data); finish(); } else { log.d(tag, "barcode data null"); } } else { log.d(tag,"no barcode detected"); } return barcode != null; } somewhere in 1 barcode captured automatically without need tap when barcode graphic appears.i figured dont need multiprocessor.builder<> barcodedetector barcodedetector = new barcodedetector.builder(context).build(); barcodetrackerfactory barcodefactory ...

c# - Sort student array according to average marks -

i have created student class array in c# var student = new student[5]; having variables sid,name, avgmrks; want sort array according average marks of students. i assuming when having variables, mean student object has properties: sid, name, avgmrks. can do: student.orderby (x=>x.avgmrks);

get() set() memcached listening on UDP using Python -

question : how get set , memcached listening on udp only, using python (any of production level python bindings) what have done/tried far : making memcached listen on udp - specified options in memcached config: options="-p 0 -u 11211" # -u udp port , -p tcp port verification: # netstat -nlp|grep memcached udp 0 0 0.0.0.0:11211 0.0.0.0:* 12095/memcached udp6 0 0 :::11211 :::* 12095/memcached the problem is, didn't verify i.e. performing get , set or put i didn't work . i have looked python memcache bindings- 2 used ones (reliable, used in production) python-memcached , pylibmc . python-memcached didn't find explicit mention specifying upd or check if memcached listening on tcp or udp. pylibmc , though found mention : to specify udp, server address should prefixed "udp:", in "udp:127.0.0.1" to verif...

jquery - Stop Accordion Toggle when Checkbox is checked -

so have little idea of jquery. trying make piece of code working long now. don't understand problem is. following html code: <ul class="accordion"> <li> <div> <input type="checkbox" /><a href="#">administration</a></div> <ul class="accordion"> <li> <div><input type="checkbox" /><a href="#">president</a></div> <ul class="accordion"> <li> <div> <input type="checkbox" /><a href="#">manager 1</a></div> <ul class="accordion"> <li> <div> <input type="checkbox" /><a href="#">assistant manager 1</a></div></li> <li> ...

How to make a join query in Firebase Android -

how can perform join query select chatid " users " node, , chatid message items " chats " table. sample json: (1, 2, 134 , 155 random user id's) { "chats" : { "-kd3x3y16ydqhwsbxr5k" : { "-kd3x3y5zew00h29zg55" : { "text" : "hello", "timestamp" : "1458224515", "userid" : 1 }, "-kd3x4b1rmbaktvsooyn" : { "text" : "test", "timestamp" : "1458224517", "userid" : 1 } }, "-kd3xlnulu6ixb85u41s" : { "-kd3xlnv32fzduqlxr1v" : { "text" : "bla", "timestamp" : "1458224588", "userid" : 134 } } }, "users" : { "1" : { "2" : { "chatid" : "-kd3x3y16ydqhwsbxr5k" } }...

Is there a short code to apply all media queries in one shot bootstrap? -

now use this: <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2"> is there way shorten it? so don't have repeat, since columns span equally? yes, can set col-xs-2 , width apply on screen dimension

single sign on - SAML 2 Signature error in ADFS 2.0 -

in our sso scenario, using adfs 2.0 idp , shibboleth sp. sp-initiated sign-on. after configuring, when try establish communication between shibboleth , adfs 2.0(throw browser redirect), adfs 2.0 throwing below error. the verification of saml message signature failed. message issuer: http://sampleserver/adfs/services/trust exception details: msis1015: server required signed saml authenticationrequest no signature present. event id - 320 related event id - 364 > microsoft.identityserver.service.samlprotocol.samlprotocolsignatureverificationexception: > msis1015: server required signed saml authenticationrequest no > signature present. @ > microsoft.identityserver.service.samlprotocol.samlprotocolservice.validatesignaturerequirements(samlmessage > samlmessage) @ > microsoft.identityserver.service.samlprotocol.samlprotocolservice.issue(issuerequest > issuerequest) @ > microsoft.identityserver.service.samlprotocol.samlprotocolservice....

php - how to send parameters from one module to another module in joomla -

what did installed flexi custom code module use php in joomla website, created new database rather joomla database , put code below connected , gave results. $rows = $result->num_rows; // find total rows returned database if($rows > 0) { $cols = 3; // define number of columns $counter = 1; // counter used identify if need start or end row $nbsp = $cols - ($rows % $cols); // calculate number of blank columns $container_class = 'container-fluid'; // parent container class name $row_class = 'row'; // row class name $col_class = 'col-sm-4'; // column class name echo '<div class="'.$container_class.'">'; // container open while ($item = $result->fetch_array()) { if(($counter % $cols) == 1) { // check if it's new row echo '<div class="'.$row_class.'">'; // start new row } $...

javascript - using scalajs and d3 to create a histogram -

Image
i'm trying use scala-js facade on d3 create histogram 1000 integers have. i've used 1 of examples create kinda working model, there style aspects can't work out. ideally i'd justify entire histogram left against y-axis or @ least center entire thing , move y-axis on it's close. i'd have histogram more of density plot percentages on y-axis, haven't found anyway yet. val margin = js.dictionary("top" -> 30, "right" -> 30, "bottom" -> 30, "left" -> 30) val width = 2500 - margin("left") - margin("right") val height = 500 - margin("top") - margin("bottom") val x = d3.scale.identity().range(js.array(values.min, values.max)) val data = d3.layout.histogram().bins(x.ticks(100))(values) val mm: js.function2[bin[double], double, double] = { (x: bin[double], y: double) => x.y } val m = d3.max(data, mm) val y = d3.scale.linear().domain(js.array(0, m)).range(js.array...

How to connect to a remote system using ftp command? -

i have transfer files machine another(both windows platform) , purpose trying out ftp commands. so, opening command prompt , typing following: c:\windows\system32> ftp ftp> open sample.com ftp> username now when enter username throws me error "not connected".i not getting doing wrong. user name absolutely correct.please suggest how connect remote system using ftp commands. it seems "open" command failed , not connected ftp server. here connection looks like: c:\>ftp ftp> open ftp.microsoft.com connected ftp.microsoft.akadns.net. 220 microsoft ftp service user (ftp.microsoft.akadns.net:(none)): anonymous 331 anonymous access allowed, send identity (e-mail name) password. password: 230-welcome ftp.microsoft.com. visit http://www.microsoft.com/downloads. 230 user logged in. ftp> here username "anonymous" , provided @ "user" prompt. you can in way: c:\>ftp ftp> open ftp.microsoft.com connected ftp.mi...

css - Overlapping elements within a square grid -

i’ve implement layout based on square grid. shown on following image, elements have overlap responsive within grid. (the squares offset on x-axis , overlap 1 grid cell on y-axis.) http://i.stack.imgur.com/9bz5g.jpg does know how achieve effect? i'm using framework foundation 6. i’d prefer solution without javascript. can’t use foundation .#-push-# , .#pull-# classes because shift elements inwards , 2 squares have in separate rows. i’ve set jsfiddle containing 2 squares. .square { background: #f00; position: relative; } .square:after { content: ""; display: block; padding-bottom: 100%; } .content { position: absolute; width: 100%; height: 100%; } .dark { background: #cbcbcb; } .light { background: #dedede; } <link href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.2.0/foundation.css" rel="stylesheet"/> <div class="row"> <div class="small-12 columns...

QML Slider : handle and mouse cursor -

i created slider in item , customized in following code : item { id: item1 x: 0 y: 0 width: 200 height: parent.height rectangle { id: background anchors.fill: parent; color:qt.rgba(0.9,0.9,0.9,1); } slider { anchors.centerin: parent orientation: qt.vertical height: parent.height style: sliderstyle { groove: rectangle { implicitwidth: 200 implicitheight: 8 color: "gray" radius: 8 } handle: rectangle { anchors.centerin: parent color: control.pressed ? "white" : "lightgray" border.color: "gray" border.width: 2 width: 20 height: 20 radius: 6 } } } } the problem appears when change size of handle have wider high, change i...

javascript - function not called in promise -

i've been looking on answer this, sure must have been asked before, can't seem find 1 makes sense me. in node i'm creating couple of firebase 'watchers' handles sanitization of data in firebase , send sms when status of parameter changes. in below code i've got startchildchangedwatcher , sendsms function. problem occurs when try call sendsms within promise in bitly.shorten() . never gets executed, although works fine when called outside of promise. i've tried defining var self = this; because thought had scope, , calling self.sendsms("") , no luck. also, 1 of 2 log statements inside promise gets called. i'm sure pretty simple, it's difficult know search when looking similar answers. ref.authwithcustomtoken(token, function(error, authdata){ if (error) { console.log(error); } else { console.log("login successful"); startchildchangedwatcher(); ... } }); var startchildchangedwatcher = function() { ...

Get friends email address/phone number from Twitter API [Android] -

is possible email address or phone number of user's friends using twitter api? im aware need ask special permission user's email address. how user's friends? i checked this official documentation, cant find email address or phone number field. if not possible, how path "invite" user's friends via twitter api? thanks help no, not possible email or phone number via twitter api. maybe path sending invites using dm friends.

c# - Using EntityFramework Include with OfType -

in query need include (to avoid lazy loading) list of entities. query.include(x => x.actionvalues.select(a => a.actionvaluedetails)); this works without problems in cases need eager loaded property of actionvaluedetail . actionvaluedetail base class of many other implementations of it. code looks these cases: query.include(t => t.actionvalues.select(a => a.actionvaluedetails.oftype<actionvaluedetailspecial>().select(d => d.specialdetail))); but throws exception. the include path expression must refer navigation property defined on type. use dotted paths reference navigation properties , select operator collection navigation properties. i don't know how solve problem. using lazy-loading or projection not option me in case. need large exports ensure data loaded before we're writing stream. any great!

Worklight: Custom Authentication Module exception -

i calling adapter , have protected adapter custom login module have not defined custom authenticator . then created webservice calling adapter, when calling shows call goes inside custom login module credentials below exception appears. [5/22/13 10:53:34:359 ast] 0000003a systemout o login called: aahad1234/aahad1234 5/22/13 10:53:34:359 ast] 0000003a authenticatio e com.worklight.core.auth.impl.authenticationfilter dofilter fwlse0048e: unhandled exception caught: null java.lang.nullpointerexception @ com.worklight.core.auth.impl.authenticationcontext.logloginactivity(authenticationcontext.java:352) @ com.worklight.core.auth.impl.authenticationcontext.checkauthentication(authenticationcontext.java:495) @ com.worklight.core.auth.impl.authenticationcontext.processrealms(authenticationcontext.java:396) @ com.worklight.core.auth.impl.authenticationcontext.pushcurrentresource(authenticationcontext.java:373) @ com.worklight.co...

python - In this function, what is the real meaning of the " * " operator? -

from crypto.cipher import aes import os import base64 import socket import subprocess block_size = 16 padding='#' def _pad(data, pad_with=padding): return data + (block_size - len(data) % block_size) * padding i understand character "#" used pad block can't understand meaning of "*", used multiplication. in python, can multiply string integer repeat string many times. e.g. 'a' * 4 produces 'aaaa' any class can overload operator * implementing specially-named methods .

javascript - Autocomplete jQueryUI double call function on select and press enter -

i'd little help. here's jsfiddle : https://jsfiddle.net/mirawen/q59nqh2z/ function keypress(keyevent) { if (keyevent.which == 13) mainfunction(); } function mainfunction() { alert("hello world"); } var arrsource = ["foo", "foooo", "foooooo", "bar", "barr", "barr"]; $(document).ready(function() { $("#txtsearch").autocomplete({ source: arrsource, minlength: 1, select: function (event, ui) { mainfunction(); } }); }); when press enter, want call mainfunction() , , call function when select item autocomplete point is, when select item , press enter, mainfunction() called twice. don't know how solve this. thanks answers ! i think calling same function twice on same event,so calling main function twice. if press enter keypress/keyup/keydown event. so, when document ready, getting called once , gets called on enter keypress event.

python - IndexError: List Index out of range -

can figuring out what's wrong code? gives me error when run it: traceback (most recent call last): file "ap_settings.py", line 19, in <module> ap_number = settings[test_settings_index][0] indexerror: list index out of range this file ap_settings.py: # define variables # settings [ (ap_number, save_results, skip) ] test_settings_index = 3 settings = [ (0, 0, 0), ] # defining fuzzing mac address device sta_mac = "00:20:a6:61:2d:09" # defining injection interface iface = "ath0" ##### below variables should not tweaked user ap_number = settings[test_settings_index][0] save_results = settings[test_settings_index][1] skip = settings[test_settings_index][2] # defining fuzzing specific variables ap = [ ('kikoo', '00:11:22:33:44:55', 11, 'wpa-psk'), ][ap_number] ssid = ap[0] ap_mac = ap[1] channel = chr(ap[2]) ap_config = ap[3] # defining number of retries when auth...

salt stack - Multithreading modules -

one of modules takes 5 minutes execute due underlying shell commands. change , either make executing asynchronous or start commands in separate threads/processes. unfortunately not find example of such approach. is possible run steps of module inside separate thread? know example of it? i've been searching through modules inside salt repository, none using multithreading nor multiprocessing, got lost. you want sure minion in correct state after you've executed: salt '*' state.highstate i guess not meant asynchonous. you might want change bash script execute stuff in seperate threads. use language know - python or nodejs. depends on bash script does.

php - Transaction in laravel 5.1 -

does transaction in laravel works db facade?. want know if works eloquent model; i.e. following code have intended effect db::begintransaction(); try { eloquentmodel::query(); } catch (\exception $e) { db::rollback(); } yes, works both db facade , eloquent models. (as example, connection used default, you're ok.) don't forget db::commit(); when it's ok commit! also, database table engine must support transactions, such innodb. suggestion, can use simpler, transaction method db::transaction(function () { eloquentmodel::query(); }); also, don't afraid test out, increase confidence level. say, provoque error, see work db::begintransaction(); try { eloquentmodel::query(); eloquentmodel::create(['field_not_exists' => 'will throw exception!']); } catch (\exception $e) { // db::rollback(); // test comment, , without comment, check db results ;) } db::commit(); happy coding!

CSS - HTML - How to align images properly across the page -

Image
i want make images aligned if can appreciated images 100% same size not problem .box { float: left; width: 20%; padding-bottom: 20%; } .top-left { position:absolute; top: 10px; left: 10px; width: 50%; overflow: hidden; } .top-right { position:absolute; top: 10px; right: 10px; width: 50%; overflow: hidden; } .bottom-left { position:absolute; bottom: 10px; left: 10px; width: 50%; overflow: hidden; } .bottom-right { position:absolute; bottom: 10px; right: 10px; width: 50%; } @media screen , (max-width : 480px) { .box { width: 100%; } .box a{ position: relative; } .top-left, .top-right, .bottom-left, .bottom-right { width:100%; ...

vagrant - java.io.FileNotFoundException: "%USERPROFILE%\insecure_private_key" (The filename, directory name, or volume label syntax is incorrect) -

i experiencing issue when ssh vagrant box in phpstorm java.io.filenotfoundexception: "%userprofile%\insecure_private_key" (the filename, directory name, or volume label syntax incorrect) i can manually create ssh connection works vagrant box in phpstorm want use predefined ssh connection created vagrant box. i converted private_key_file ppk in putty no avail did encountered issue?

environment variables - setting external library /bin folder in cmake in windows -

my question related pcl installation , here goes: i compiled pcl using msvc2013 , updated manually pclconfig.cmake point dependences (3rdparty libs). problem want set binaries /bin folders in same cmake file (instead of adding /bin environment variables). there way ? what makes question pertinent i'am testing different versions of pcl (1.6, 1.7, 1.8...), won't adding /bin folders path of these versions create kind of confict between them afterwards (in retreive step) ? *to clear, succeded that, using cmake, can choose pclconfig of pcl version want, when running program (succefully compiled), throws missing pcl_****.dll missing, logic because pcl/bin folder not added system environement. so, question "can add pcl/bin floder project environment using cmakelists of project? (instead of adding system environment)" thanks in advance. a temporary fix found generating project specified pcl version wanted , adding bin folders manually in msvc 2013 : deb...

c++ - How to know if the main() is running? -

context : in application, have functions using global variables. due undefined order of allocation of global variables, want forbid call these functions before main function running. moment, document \attention in doxygen, add assertion. my question : is there elegant way know main function not running yet ? example (uniqid.cpp): #include <boost/thread.hpp> #include <cassert> unsigned long int uid = 0; boost::mutex uniqid_mutex; unsigned long int uniquid() { assert(main_is_running() && "forbidden call before main running"); boost::mutex::scoped_lock lock(uniqid_mutex); return ++uid; } my first (ugly) idea : first idea checking global variable specific value. probability have value in variable before initialisation small : // file main_is_running.h void launch_main(); bool main_is_running(); // file main_is_running.cpp unsigned long int main_is_running_check_value = 0; void launch_main() { main_is_running_check_value = 135798642...

javascript - How to splice variable value in AngularJS? -

how splice variable value in angularjs html: <div ng-repeat="steps in data" class="card" style="padding:10px 5px 10px 5px; margin-bottom:10px; margin-top:20px; background: url(@routes.assets.at("images/assets/icon_move.png")) no-repeat right #fafbfc; background-position : calc(100% - 10px) 50%;"> {{steps.title}} <div class="pull-right" ng-click="deletestep(steps);" style="color:#f26063; padding-right: 40px;">delete</div> <a class="pull-right" ng-click="openaddstep('lg');" style="color:#43c944; padding-right: 20px;">edit</a> </div> javascript: $scope.deletestep = function(steps){ alert('h'); (var = $scope.steps.length - 1; >= 0; i--) { if (!$scope.steps[i].value) { $scope.steps.splice(i, 1); } } } you can pass current index delete method , splice below, option ...

javascript - Send windows push notification to specific channel uri -

i'm attempting send windows push notification specific client channel uri azure mobile service end(javascript). far found wns object , supports specific tags.any api supports sending push notification specific device using channel uri? you can use notification hubs sdk directly (bypassing azure mobile apps / services sdk, used registration). allows use rest endpoint direct send: https://msdn.microsoft.com/en-us/library/azure/mt608572.aspx

php - Searching for NULL value on button press -

i have button when click it, loads list. button sends value of it, uses value populate list based on that. have null , able select too. problem being can't color = null . color null <button value="null">null</div> <button value="white">white</div> clicking white: $q = $_get['q']; /--this gets white--/ $people = $db2->prepare("select name table color = ? "); $people->execute(array($q)); /--this searches white--/ $data = $people->fetchall(); foreach ($data $row): ?> do have edit jquery function null value or there way make work this? thanks! there null-safe equal operator in mysql, can write query "select name table color <=> ?"

Neural network implementation using python + numpy -

have written code implement simple nn using python+numpy , optimize using fmincg scipy. think there issue gradient function - have tried using smaller nn also. cannot figure out wrong. tried optimizing - not converge. have looked many similar implementations cannot find meaningful difference. appreciate folks. in advance! import numpy np numpy import linalg la import time scipy import optimize def sigmoid(x): return (1/(1+np.exp(-x))) def pack_thetas(t1, t2): return np.concatenate((t1.reshape(-1), t2.reshape(-1))) def unpack_thetas(thetas, input_layer_size, hidden_layer_size, num_labels): t1_start = 0 t1_end = hidden_layer_size * (input_layer_size + 1) t1 = thetas[t1_start:t1_end].reshape((hidden_layer_size, input_layer_size + 1)) t2 = thetas[t1_end:].reshape((num_labels, hidden_layer_size + 1)) return t1, t2 def cost(params, x, y, lambdap, n, h): cost = 0.0 m, num_labels = np.shape(y) '''unroll thetas''' t1,...

ios - programmatically added UILabel to the UITableView not loading properly -

i want dynamically add uilabel uitableviewcell . in cellforrowatindex event did this. static nsstring *simpletableidentifier = @"simpletablecell"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:simpletableidentifier]; uilabel *lbl; [[cell viewwithtag:100] removefromsuperview]; if (cell == nil) { cell = [[uitableviewcell alloc] initwithstyle:uitableviewcellstylesubtitle reuseidentifier:simpletableidentifier]; } lbl=[[uilabel alloc] initwithframe:cell.imageview.frame]; [lbl settext:[nsstring stringwithformat:@"%lu",[[[mutarraypendingrequests objectatindex:indexpath.row] objectforkey:@"requestitems"] count]]]; [lbl settag:100]; [lbl settextalignment:nstextalignmentcenter]; [cell.contentview addsubview:lbl]; but problem when table loads text has not set uilabel . once scrolled loads top 3 cells , bottom 3 cells. middle cells label not loading. reason this? how can add uilabel as custom view uitableviewcell? please me. t...

mysql - Write delete query using GROUP BY, HAVING -

i have mysql query group by, having. query working fine need delete same records, , when trying delete these record getting error. select query select * user_location_history (timestampdiff(day,from_unixtime(location_date/1000),sysdate())>30) , user_id in (select user_id user_location_history (timestampdiff(day,from_unixtime(location_date/1000),sysdate()) < 30) group user_id having count(1) > 100) order id asc limit 200 delete query delete user_location_history (timestampdiff(day,from_unixtime(location_date/1000),sysdate())>30) , user_id in (select user_id user_location_history (timestampdiff(day,from_unixtime(location_date/1000),sysdate()) < 30) group user_id having count(1) > 100) order id asc limit 200 error error code: 1093 can't specify target table 'user_location_history' update in clause one way around problem wrap subquery in subquery: delete user_location_history timestampdiff(day,from_unixtime(location_date/1000),sys...

postgresql - opentaps installation-Java returned: 99 -

i installing opentaps on system , error is- [java] 2016-03-07 11:32:37,428 (main) [ transactionutil.java:345:info ] [transactionutil.rollback] transaction rolled [java] 2016-03-07 11:32:37,428 (main) [ entitydataloader.java:218:error] [java] ---- exception report ---------------------------------------------------------- [java] [install.loaddata]: error loading xml resource "file:/home/oodles/work/skulocity/custom-erp-crm/opentaps/amazon/data/amazondemosetup.xml"; error was: transaction error occurred reading data [java] exception: org.xml.sax.saxexception [java] message: transaction error occurred reading data [java] ---- cause --------------------------------------------------------------------- [java] exception: org.ofbiz.entity.genericdatasourceexception [java] message: sql exception occurred on commit (commit can not set while enrolled in transaction) [java] ---- cause --------------------------------------------------------------------- [java] exce...

ios - How to give hyperlink in the nsstring, to share in fb? -

nsstring "get xxx iphone app here". in string "here" , want give hyperlink particular url . fb share , , i'm using uiactivityviewcontroller . don't wanna go uilabel . know might silly,... me out. thanks in advance geeks.... if want share on facebook, need tell safari open url display facebook page allows user share. here example : //the url want share nsstring *urlstring = @"http://stackoverflow.com"; //the title want displayed on facebook nsstring *title = "the title of page"; //create url string tell facebook want share specific page nsstring *shareurlstring = [nsstring stringwithformat:@"http://www.facebook.com/sharer.php?u=%@&t=%@", urlstring , title]; //create url object nsurl *url = [ [ nsurl alloc ] initwithstring:shareurlstring ]; //launch safari url created [[uiapplication sharedapplication] openurl:url]; //release object if don't need [url release];

cassandra - How to denormalize deep hierarchies? -

i’ve read quite lot cassandra , art of denormalization , materialization while writing data. think understand concept, , seems make sense. however, having trouble implementing in scenarios there deep hierarchical data structure. consider contrived domain owner 1:* company company 1:* teams team 1:* players players 1:* equipment we have tables each of these entities, query equipment attributes owner seems thing create table (ownerequipment) has owner id , equipment id primary key owner id partition key. makes sense, if ux scenarios add , edit equipment not include owner’s id part of working set? most of denormalization examples i’ve encountered in research single level parent-child or master-detail type use case. seems pretty reasonable updating client have enough information immediate parent when updating child write denormalized reverse index, if data denormalize several “joins” away? this problem compounded further in our example when consider company ...