Posts

Showing posts from April, 2012

java - JavaFX - Exclude Text Node from preferred width sizing? -

in converting swing fx have number of screens have bunch of fields along long text description letting user know routine does. we not know width of screen before laid out, makes difficult call setwrappingwidth on text node. without calling setwrappingwidth, seems text node determines size of scene (assuming long description , wouldn't wrap without setwrappingwidth being called). currently have scene inside jfxpanel inside jinternalframe. typically call pack() method once setscene called on jfxpanel have screen size itself. i hoping exclude text node scene's width calculations , set wrapping width once scene sized. suggestions how handle this? thanks

sql - Why is my ALTER SYSTEM command failing here? -

a colleague gave me code run. need set archive log location directory inside db_recovery_file_dest . using virtualbox vm , called "oracle developer days" i'm trying run following command : alter system set log_archive_dest_1 = '/home' scope=both; but it's generating error : sql> alter system set log_archive_dest_1 = '/home' scope=both; alter system set log_archive_dest_1 = '/home' scope=both * error @ line 1: ora-32017: failure in updating spfile ora-16179: incremental changes "log_archive_dest_1" not allowed spfile sql> what spfile ? also , problem i'm using virtual machine ? the correct syntax alter system set log_archive_dest_1 = 'location=/home' scope=both; . it's in docs: find out more . you shouldn't setting /home . hope that's simplification you've made posting here. "what spfile ?" you need understand you're doing. please read documenta

powershell - TFS 2013 Build: Cannot leave solution/project files field blank -

i'm using build process template comes tfs 2013 (tfvctemplate.12.xaml). want create new build definition runs bunch of powershell scripts; however, not have .net build. tf build not seem that. i'm getting error below when leaving solution/project files field blank. there way around this? tf215097: error occurred while initializing build build definition \myprojectroot\mybuilddefinition: exception message: the process parameter projectstobuild required no value set. value must set on definition or when build queued (category: #200 build, display name: 1. projects). (type argumentexception) exception stack trace: at microsoft.teamfoundation.build.hosting.buildworkflowinstance.validateparameters(buildworkflowdefinition definition, idictionary`2 passedinparametervalues) @ microsoft.teamfoundation.build.hosting.buildworkflowinstance.initialize(buildworkflowdefinition definition, idictionary`2 datacontext) @ microsoft.teamfoundation.build.hosting.buildwo

c++ - Is it possible to use the modified returned reference in an overload like `int &operator[]'? -

suppose have class implements array of int grows on demand. class implements int &operator[] method overloading [] operator , returning reference value in array. now use operator in loop this classinstance[index] += 1; i want know whether it's possible use incremented value inside int &operator[] function? to make clear, want able know new value of referenced integer in order upadte maximum , minimum values. the way solve problem return pretends int& , while providing overloads methods operator+= , etc. something this: class myintreference { public: myintreference(int& reference_to_wrap) : wrapped_reference_{reference_to_wrap} {} // method returns void, have return whatever want void operator+=(const int addend) { wrapped_reference_ += addend; dowhateveryouwant(); } private: int& wrapped_reference_; } // then, in other class myintreference yourotherclass::operator[](const int index) { return myintrefer

c# - Interact with "system-wide" media player -

Image
i want develop music app windows 10 , i'm curious interface provided groove music next volume bar. i've tried googling more information haven't had success whatsoever. when i'm playing music in groove music , raise or lower volume, name artist , album artwork of current song show music controls next volume indicator this: i wondering how create dialog in own app , windows api's i'd have into. you need use systemmediatransportcontrols here basic setup play , pause. if enable more controls can using available properties ex. systemcontrols.isnextenabled = true; and have add case in button switch. case systemmediatransportcontrolsbutton.next: //handle next song break; xaml <mediaelement x:name="mediaelement" height="100" width="100" aretransportcontrolsenabled="true"/> c# public mainpage() { this.initializecomponent(); systemcontrols = sy

angularjs - Setting $scope.myModel element with ng-change enters in infinite loop -

i'm pretty new angular , trying achieve "basic". i've been googling 2 days without success , appreciate help. i have html page on i'm trying to: initialize data http post request call function via ng-change event update data http post when elements used filters changed (i.e. categories, sorting asc/desc...) my problem when i'm updating model programmatically http response (only in case) , triggers ng-change event attached element, calls update function , enters in infinite loop: ng-change -> updating function -> ng-change -> updating function note: i'm using angular material template doesn't change code html <html ng-app="myapp"> <body layout="column" ng-controller="searchservicecontroller"> <h1 class="md-headline">filter results</h1> <form name="searchserviceform" novalidate> <md-input-container>

java - Monitoring all output to the console -

i developing plugin program, bukkit, minecraft server, , need capture displayed in console. however, reason, unable this. following code use apply filters: /** * */ package com.gmail.neonblue858.remoteconsole.plugin; import java.util.logging.level; import java.util.logging.logger; import org.bukkit.scheduler.bukkitrunnable; /** * * *@author meguy26 * */ public class filterapplyer extends bukkitrunnable { private clientmanager man; public filterapplyer(clientmanager man){ this.man = man; } /* (non-javadoc) * @see java.lang.runnable#run() */ @override public void run() { //create handler loghandler handler = new loghandler(man); //set handler capture handler.setlevel(level.all); //add handler root logger applies loggers logger.getlogger("").addhandler(handler); //set system out filtering output stream system.setout(new filteroutputstream(system.out, man)); //set system err filtering output stream system.seterr(

android - how adding spinner on the toolbar below the toolbar title? -

i everybody, i'm developping android app , i'd add spinners (contains in layout) on toolbar, below toolbar title samsung "call log" menu : https://drive.google.com/file/d/0b1pgazzf7cp4be4zqllrnzfldvu/view?usp=sharing samsung add 3 horizontal tab below toolbar title "journal". so app : https://drive.google.com/file/d/0b1pgazzf7cp4cwppd0y5mlbhtfu/view?usp=sharing i'd add layout (pink rectangle) on yellow toolbar, intention of using hiding toolbar scrolling in futur. toolbar , layout xml : <android.support.v7.widget.toolbar xmlns:android="http://schemas.android.com/apk/res/android" android:popuptheme="@style/appthemeaccueiltoolbar" android:theme="@style/appthemeaccueiltoolbar" android:id="@+id/toolbaraccueil" android:layout_width="match_parent" android:layout_height="wrap_content" android:minheight="?attr/actionbarsize" android:elevat

ios - Swift: How to remember cookies for further http requests -

i working on login application. after successful login response comes cookie data. how can use/save data future requests? starters trying save in nshttpcookiestorage . not working. login method(partial): let task = session.datataskwithrequest(request) { (data, responsedata, error) -> void in if let response = responsedata as? nshttpurlresponse { statuscode = response.statuscode print("response code: \(statuscode)") } var json: nsdictionary? { json = try nsjsonserialization.jsonobjectwithdata(data!, options: .mutableleaves) as? nsdictionary } catch { print(error) err = error } if(statuscode != 200) { let jsonstr = nsstring(data: data!, encoding: nsutf8stringencoding) print("error not parse json: '\(jsonstr)'") } else {

php - Unify ZF2 Translator and AngularJS localization -

i built application uses zf2 authentification, routing, error pages etc., core functionalities on each view implemented in angularjs. whole thing localized, in 2 seperate instances: we have zf2 translator, configured in module.config.php 'translator' => array( 'locale' => 'de_de', 'translation_file_patterns' => array( array( 'type' => 'phparray', 'base_dir' => __dir__ . '/../language', 'pattern' => '%s.php', ), ), ), containing key=>value pairs 'app.frontend.title' => 'title' . and angular-translate module, configured by $translateprovider.usestaticfilesloader({ prefix: '/lang/', suffix: '.json' }); containing nested json object {'app': {'buttons': {'send': 'send now'}}}' the php part contains headlines, content <title&g

partial views - Ajax.Beginform refreshing whole page -

it redirects whole new page instead of updating current one, have unobtrusive scripts , web.config stuff. why not working? <div id="preview-image-placeholder"></div> @foreach (var item in model) { using (ajax.beginform("previewimage/" + @item.id.tostring(), "music", null, new ajaxoptions { httpmethod = "post", insertionmode = insertionmode.replace, updatetargetid = "preview-image-placeholder" }, new { @enctype = "multipart/form-data", @item.id })) { @html.antiforgerytoken() <input type="file" class="upload-image" id="upload-image-file_@item.id" name="file" accept="image/*"> <button class="btn btn-default" id="btn-preview_@item.id" style="display: none" type="submit"></button> } } <script src="~/scripts/jq

g++ - Issue with link library when compiling with cmake -

i can compile cpp file g++ using command: g++ test.cpp -lmpfr -lgmp how add these libraries cmakelists.txt compile cmake? it recommend go through cmake tutorial , "adding library (step 2)" , target_link_libraries documentation.

algorithm - Extending Python's os.walk function on FTP server -

how can make os.walk traverse directory tree of ftp database (located on remote server)? way code structured (comments provided): import fnmatch, os, ftplib def find(pattern, startdir=os.curdir): #find function taking variables both desired file , starting directory (thisdir, subshere, fileshere) in os.walk(startdir): #each of variables change directory tree walked name in subshere + fileshere: #going through of files , subdirectories if fnmatch.fnmatch(name, pattern): #if name of 1 of files or subs same inputted name fullpath = os.path.join(thisdir, name) #fullpath equals concatenation of directory , name yield fullpath #return fullpath anew each time def findlist(pattern, startdir = os.curdir, dosort=false): matches = list(find(pattern, startdir)) #find arguments pattern , startdir put list data structure if dosort: matches.sort() #isn't dosort automatically false? statement different same thing line in be

git/ Github notification on pull request involving subfolder -

is possible setup trigger git or github s.t. i'm notified if subfolder of git repo updated? or better, possible setup trigger s.t. i'm notified if pull request involves subfolder of git repo? you use github webhooks to: send payload integration service (ifttt, zapier, elasti.io, etc.) filter/search payload condition seeking notify via preferred method :) without github, accomplish using scripting language of choice via git hooks . unfortunately, github not support git hooks, other git hosting services do.

sql - Find a YTD Employee Average -

i'm looking find average number of employees first half of 2015. thats head count of each month, jan-jun / 6 (months). number desired result. for example, lets 3 months simplicity's sake. jan had 100, feb had 105, , mar had 103. 308/3 = 102.7 average employees. unfortunately i've been left few columns , i'd generate clean code make simple complete task. not sure how complete task though information have. code: select distinct a.personidno 'personid', a.[lasthiredate], a.[terminationdate], --count(distinct a.personidno) case when a.employmentstatus = 'regular full time' 'rft' when a.employmentstatus = 'prn' 'prn' when a.employmentstatus = 'regular part time' 'rpt' else a.employmentstatus end 'empstatus' --into #tmp_ytd_hc_avg [employeetable] a.orgcodeidno = '69' , (a.[terminationdate] >= '2015-01-01 00:00:00' ,

c++ - error: expected primary-expression before ‘int’ -

i'm using: gcc --version gcc (ubuntu 4.9.2-0ubuntu1~14.04) 4.9.2 i'm trying compiler following program: #include <iostream> #include <cilk/cilk.h> using namespace std; int main(){ cout << "\nstart\n"; cilk_for (int = 0; < 10; i++) { cout << "i = " << i; } } but following error: g++ -fcilkplus cilk_1.cpp cilk_1.cpp: in function ‘int main()’: cilk_1.cpp:9:12: error: expected primary-expression before ‘int’ cilk_for (int = 0; < 10; i++) { ^ cilk_1.cpp:9:23: error: ‘i’ not declared in scope cilk_for (int = 0; < 10; i++) { ^ what wrong ? thanks from link chris gave in comments, seems gcc 4.9 supports features of cilk extensions except _cilk_for out of box. therefore, compiler (gcc 4.9) not have cilk_for support.

c++ - How to connect an MFC control to a custom control in the visual dialog editor -

Image
i have created custom control in mfc visual dialog designer, shown below: however, unsure how can link custom control (in case have created class cgraphctrl inherits cwnd ) region have created in visual editor, assumed able when called cgraphctrl::create , however, takes const crect& argument, overrides region specified. calling cgraphctrl::create in cstockmanagerdlg::oninit follows: m_graphctrl.create( _t("static"), _t("graph control"), ws_child | ws_visible, crect( 0, 0, 100, 100 ), this, idc_graph ); you can create cstatic control in visual dialog editor. right-click on , create control member variable cstatic m_graphctrl. edit code make cgraphctrl m_graphctrl. attaches code original cstatic.

php - While importing CSV getting this error DateTime::__construct(): Failed to parse time string -

i'm importing data csv file database through html form, sometime works fine , sometime throws error datetime::__construct(): failed parse time string (23/06/2015 12:00) following code throws error $depdate = $emapdata['1']; //format 23/06/2015 12:00 $depdatetime = new datetime($depdate); //here throws error $date_depart = $depdatetime->format('y-m-d'); $time_depart = $depdatetime->format('h:i'); note: using explode , worked fine wana use new datetime(); datetime() not understand format providing. can accept range of formats including iso8601 , not 23/06/2015 12:00 . note @markbaker's comment / separator using implies date formatting first position month, , there no month 23. if cannot change / , can use method datetime::createfromformat specify format matching actual data format.

php - Restrict whole WP site access except few pages -

i want this: block whole site (say abc.com) allow few page abc.com/gamma , abc.com/alfa. do via .htaccess , @droid said. have replace file.php unique file want allow , add more of them if want so. order deny,allow deny <files "file.php"> allow </files>

How to add a padding to a KeyboardView in Android? -

i have row of keys. each key 18.5% width 2% gap. want gap on first key 10% , gap on last key 10% on right side . it's simple set horizontalgap on each key achieve effect, except see no way set right side gap. the spacing want follows (bracketed items keys, else it's gap): 10% [18.5%] 2% [18.5%] 2% [18.5%] 2% [18.5%] 10% i have tried: <keyboard xmlns:android="http://schemas.android.com/apk/res/android" android:keywidth="18.5%p" android:horizontalgap="2%" android:keyheight="7%p"> <row> <key android:codes="1" android:keylabel="1" android:horizontalgap="10%p" /> <key android:codes="2" android:keylabel="2" /> <key android:codes="3" android:keylabel="3" /> <key android:codes="4" android:keylabel="4" /> </row> </keyboard> this not give me 10%

php - Why does it echo all the errors in the file -

for reason, displays errors when no image uploaded. there away allow on 1 error display depending on error. thanks <?php require 'header.php'; ?> <center> <?php $target_dir = "uploads/"; $target_file = $target_dir . basename($_files["filetoupload"]["name"]); $uploadok = 1; $imagefiletype = pathinfo($target_file,pathinfo_extension); // check if image file actual image or fake image if(isset($_post["submit"])) { $check = getimagesize($_files["filetoupload"]["tmp_name"]); if($check !== false) { echo "file image - " . $check["mime"] . "."; $uploadok = 1; } else { echo "file not image."; $uploadok = 0; } } // check if file exists if (file_exists($target_file)) { echo "sorry, file exists."; $uploadok = 0; } // check file size if ($_files["filetoupload"]["size"] > 5000000)

makefile - mingw32-make + mklink... just not getting along? -

not sure if else has gotten work, i'm having no end of trouble following simple line in makefile running mingw32-make : mklink mk makefile the following created link, mingw32-make puked , threw error 255 thereafter: $(shell cmd /c 'mklink mk makefile') nothing else problematic, , have relatively complex makefile. mklink doing this. (apparently msys has it's own problems ln going down path appears pointless.) the following works me, (on win7 home premium, in virtualbox), provided invoke in shell running administrator privilege: $ cat makefile.tst all: cmd /c "mklink mk makefile.tst" @echo "success!" $ make -f makefile.tst cmd /c "mklink mk makefile.tst" symbolic link created mk <<===>> makefile.tst success! $ rm mk $ mingw32-make -f makefile.tst cmd /c "mklink mk makefile.tst" symbolic link created mk <<===>> makefile.tst success! my shell, in case msys sh.exe

print data in 3 columns with css -

Image
i want print data in 3 columns. data not arranged correctly in columns. have limited knowledge on css. please advice did wrong? i need print horizontal line in third column afer 6 , 8. <html> <head> <style> .container{ width: 596px; float:left; posy } .container .line { border-bottom: 1px dotted #999; border-top-style: none; margin: 7px 0; padding: 3px 0 0; } .col1{ width: 186px; right-padding:19px; float:left; } .col2{ left: 205px; right-padding:19px width: 186px; float:left; } .col3{ left: 410px; width: 186px; float:right; right:0px; } </style> </head> <body> <div class="container"> <div class="col1"> <ul> <li>test area 1</li> <li>test area 2</li> <li>test area 3</li> <li>test area 4</li> </ul> </div> <div class="col2"> <ul> <li>test area 5<

osx - Using termios in Swift -

now we've reached swift 2.0, i've decided convert my, yet unfinished, os x app swift. making progress i've run issues using termios , use clarification , advice. the termios struct treated struct in swift, no surprise there, surprising array of control characters in struct tuple. expecting array. might imagine took me while figure out. working in playground if do: var settings:termios = termios() print(settings) then correct details printed struct. in obj-c set control characters use, say, cfmakeraw(&settings); settings.c_cc[vmin] = 1; where vmin #define equal 16 in termios.h. in swift have do cfmakeraw(&settings) settings.c_cc.16 = 1 which works, bit more opaque. prefer use along lines of settings.c_cc.vim = 1 instead, can't seem find documentation describing swift "version" of termios. know if tuple has pre-assigned names it's elements, or if not, there way assign names after fact? should create own tuple named elements ,

c++ - Why "Multiple definitions linker error" when nm only sees one definition -

when linking object files bunch of errors like: obj-ia32/shadowroutine.o: in function `initializemap(unsigned int*)': shadowroutine.cpp:(.text+0x0): multiple definition of `initializemap(unsigned int*)' obj-ia32/shadowroutine.o:shadowroutine.cpp:(.text+0x0): first defined here with compilation , linking commands of: g++ -dbigarray_multiplier=1 -wall -wno-unknown-pragmas -fno-stack-protector \ -dtarget_ia32 -dhost_ia32 -dtarget_linux -i../../../source/include/pin \ -i../../../source/include/pin/gen -i../../../extras/components/include \ -i../../../extras/xed-ia32/include -i../../../source/tools/instlib -o3 \ -fomit-frame-pointer -fno-strict-aliasing -wno-unused-variable \ -wno-unused-function -i. -ishadow-memory -m32 -c \ -o obj-ia32/shadowroutine.o shadowroutine.cpp g++ -dbigarray_multiplier=1 -wall -wno-unknown-pragmas -fno-stack-protector \ -dtarget_ia32 -dhost_ia32 -dtarget_linux -i../../../source/include/pin \ -i../../../source/in

ios - How to custom in storyboard my view controller's UINavigationItem that is instantiated by identifier and pushed onto navigation stack? -

Image
in storyboard have uinavigationcontroller controllers. within last 1 have button button . when tap button instantiate view controller current storyboard: but here custom uinavigationitem custom uibarbuttonitem s. how here in storyboard? change top bar metrics view controller:

android - Up to date Tabbed Navigation -

i can't seem find date resource on how tabbed navigation bar in android. every tutorial suggests using actionbar , tab in seems deprecated. know current way of implementing this? thanks! your primary options are: use tablayout android design support library, or without a viewpager ; or use viewpager , favorite other tab solution it, whether pagertabstrip or any number of third-party tab implementations ; or use fragmenttabhost

c# - Rectangles don't collide correctly -

Image
as can see on top corner says col: false/true. if player bounds , tiles solids. rectangles tiles , players checked if intercept each-other. looks working right? nope. more closely. the bottom right corner needs inside tiles count. now let's code used understand problem. player bounds (rectangle) playerbounds.width = 32; playerbounds.height = 64; playerbounds.x = (int)this.position.x; playerbounds.y = (int)this.position.y; tile bounds (rectangle) newtile.bounds = new rectangle(x * tile_size, y * tile_size, tile_size, tile_size); now onto how detects it: for (int x = 0; x < tilemap.map_width; x++) { (int y = 0; y < tilemap.map_height; y++) { if (tm.tile[x, y].bounds.intersects(playerbounds)) { if (tm.tile[x, y].getsolid()) { colliding = true; } else { colliding

Python Cocos2d Label class is ignoring color -

i'm using python cocos2d game library , in their docs can find cocos.text.label accepts color=rgba(int, int, int, int) params. i've got following code create label: self.name = cocos.text.label("test label", font_name='times new roman', font_size=22, color=(163, 42, 44, 1), anchor_x='center', anchor_y='center') self.name.position = (10, 90) self.add(self.name) this code attached cocos.layer.layer , rendered in scene initiated in director. the issue this: if remove color param label label created correctly , displayed white color, if specified color, label never rendered. not black not there. any on why happening , how change label color appreciated. i'm using python 3.4.3 , latest version of python-cocos2d. i'm willing update , post code feel free ask. in advance. maybe can't see label? in rgba goes 0 255. value 1 tra

c++ - AVX 256-bit code performing slightly worse than equivalent 128-bit SSSE3 code -

i trying write efficient hamming-distance code. inspired wojciech muła's extremely clever sse3 popcount implementation , coded avx2 equivalent solution, time using 256 bit registers. l expecting @ least 30%-40% improvement based on doubled parallelism of involved operations, surprise, avx2 code tad slower (around 2%)! can enlighten me of possible reasons why i'm not obtaining expected performance boost? unrolled, sse3 hamming distance of 2 64-byte blocks: int32 sse_popcount(const uint32* __restrict pa, const uint32* __restrict pb) { __m128i paccum = _mm_setzero_si128(); __m128i = _mm_loadu_si128 (reinterpret_cast<const __m128i*>(pa)); __m128i b = _mm_loadu_si128 (reinterpret_cast<const __m128i*>(pb)); __m128i err = _mm_xor_si128 (a, b); __m128i lo = _mm_and_si128 (err, low_mask); __m128i hi = _mm_srli_epi16 (err, 4); hi = _mm_and_si128 (hi, low_mask); __m128i popcnt1 = _mm_shuffle_

swift - Ball collision and SKSpriteNode(s) collision not detected? -

i can’t find or solution problem. have 4 skspritenodes named: bottomgoalgreen, topgoalgreen, bottomgoalblue, , topgoalblue. have ball skspritenode named ball. first question/problem when have ball collide with, example, topgoalgreen or bottomgoalgreen, want topgoalgreen removed bottomgoalgreen , topgoalblue , bottomgoalblue appear , vice versa. other problem ball , collision. have 2 skaction.movetoy ball can move , down screen. wondering if skactions culprit why collision not happen. hope improved question. if not, try again clarify. import foundation import spritekit import uikit struct physicscatagory { static let bottomgoalgreen : uint32 = 1 static let topgoalgreen : uint32 = 2 static let bottomgoalblue : uint32 = 4 static let topgoalblue : uint32 = 8 static let ball : uint32 = 16 } class gameplayscene: skscene, skphysicscontactdelegate { var topgoalgreen = skspritenode(imagenamed: "green goal (top).png") var bottomgoalgreen = skspritenode(imagenamed: "gree

javascript array clean function -

simple function clean array if has null or empty values, if have: [ 'click1', 'click2', null, '', '', 'submitform' ] ...it return: [ 'click1', 'click2', 'submitform' ] here code: function squeakyclean(arr) { (var = 0; < arr.length; i++) { if (arr[i] == null || arr[i] == '') { arr.splice(i); }; }; return arr; } i have loop check each value in array , if statement see if equal null or , empty string, if used array splice method remove value , return clean array outside loop. it works if enter array no empty strings or null values, if enter [ 1, , 2, 3, 0, -1, 1.1 ] returns [1] should not do. missing here? ps: have looked how other people solved using without loop , splice method, interested in how solve using these two. your code fine apart use of .splice method must specify number of items on index delete. example: array.splice(index, numberofitemsfromindex);

python - How to send two variables with html as a JSON in Django? -

i want render 2 different html samples , send response ajax request. i have in view: def getclasses(request): user = request.user aircomcode = request.post.get('aircompany_choice', false) working_row = pr_aircompany.objects.get(user=user, aircomcode=aircomcode) economy_classes = working_row.economy_class business_classes = working_row.business_class economy = render_to_response('dbmanager/classes.html', {"classes": economy_classes}, content_type="text/html") business = render_to_response('dbmanager/classes.html', {"classes": business_classes}, content_type="text/html") return jsonresponse({"economy": economy, "business": business}) with error: django.http.response.httpresponse object @ 0x7f501dc56588 not json serializable" how can task? in js when response insert received html corespoding blocks. this: $.ajax({ # ajax-sending user&#

java - Netbeans GUI blocked , I can 't add, move or modify components on the JFrame form -

i'm developing interface app netbeans gui. everything perfect, coding , running interface no problems after last run form i've made blocked or locked. don't know, can't move or add on , when right click on component on frame there 2 options: copy properties when go properties, in grey can't modify anything! i'm lost spent lots of hours working on form , don't want start scratch again!

php - Laravel 5.1 - How to dynamically prefix all registered routes -

tl;dr: how prefix -already registered- laravel routes? details: - large laravel 5.1 application third-party packages, each register it's own routes. - multilingual support, routes have prefixed, without modifying these third-party packages. - know in laravel 5.1 router service being bound before custom service providers being called, if router rebound application have detached router. - how prefix registered routes? - if no straight forward solution, in other words: how replace default \illuminate\routing\router\router::prefix() seems possible solution.. you have posted no code snippet of attempt, seems looking route groups , allows prefix, use middlewares , other stuff bunch of defined routes. if still need add logic routing class may wish extend it.

oracle11g - Oracle SQL join three tables and group by column -

i have 3 tables , want query te select teacher names , number of classes each teacher has reserved. teacher: | idt | name | class: | idc | name | reserve: | idc | idt | my query: select t.name, count(distinct(r.idc)) teacher t join reserve r on r.idt = t.idt join class c on c.idc = r.idc group r.idc when run followin error: not group expression. the group by clause needs contain non-aggregated columns select statement; in case should t.name . also, distinct not function keyword , should not have parentheses. select t.name, count(distinct r.idc) number_of_classes teacher t join reserve r on r.idt = t.idt join class c on c.idc = r.idc group t.name

How to extract vell value by range in excel? -

i have excel sheet head in every 5th cell , cell between member of head how can extract member of head in format : head1,member1,member2,member3 head2,member1,member2 head3,member1,member2,member3,member4 my excel file : head1 - - member1 member2 - - head2 member1 - member2 - - - head3 member1 - member2 member3 member4 try this: sub extract() dim r range, textrow string, out range set r = [a1] set out = [b1] while r.value <> "" if instr(r.value, "head") > 0 if textrow <> "" out.value = textrow set out = out.offset(1) textrow = "" end if textrow = textrow & "," & r.value end if if instr(r.value, "member") > 0 textrow = textrow & "," & r.value set r = r.offset(1) loop if textrow <> "" out.value = textro

prolog - Split Number in its digits, grouped in all possble ways -

i have number, let's 123, , want generate set of possible ways split it: [[1, 23], [12, 3], [1, 2, 3]]. i have thought of creating powerset of [1,2,3]: ?- findall(powerset, powerset([1,2,3], powerset), z). z = [[1], [1, 2], [1, 2, 3], [2], [2, 3], [3]]. then combining sets , checking append/3 if concatenation initial set [1,2,3], i.e [[1], [2, 3]] -> [1, 23] [[1, 2], [3]] -> [12, 3] [[1], [2], [3]] -> [1, 2, 3] do think of simpler (more elegant) solution? i use predicate gnu prolog powerset modification powerset(l, [h|t]):- append([h|t], _, l). powerset([_|l], p):- powerset(l, p). no need use findall/3 here---use dcg ! int_split(x) --> int_split__aux(x,10,[]). int_split__aux(x,p,ds) --> ( { x =:= 0 } -> [ds] ; { x < p } -> [[x|ds]] ; { x0 x mod p, x1 x div p }, int_split__aux(x1,10,[x0|ds]), { p1 p*10 }, int_split__aux(x,p1,ds) ). sample use: ?- phrase(int_split(123),

asterisk - ConfBridge: end up conference when admin user exit -

i doing confbridge these days. used "confbridge kick all" end conferences when admin user exit, others in conference hear "you have been kick out conference.". not way end conference. there configure or command can set conference end when admin user exit conference? just set endmarked=yes on user profile you're using (found in confbridge.conf). the docs say: ;end_marked=yes ; option kick every user option set in ; user profile after last marked user exists conference. for more help, see wiki .

Why @throw in Objective-C is an expensive operation? -

i heard notion of @throw expensive in objective-c, reason behind it? throw in java expensive too? "exceptions in objective c implemented using c primitive: longjmp(). objective-c not c++. may have many layers of method call between code raises exception , method catches it. easy write memory leak." http://newsgroups.derkeiler.com/archive/comp/comp.sys.mac.programmer.help/2007-08/msg00020.html also... "a little more information. c++ exceptions and, under modern abi, objective-c exceptions extremely cheap set (@try), expensive @throw , @catch. when @throw happens, there heavy cost generating bits necessary unwind stack. unfortunately, appkit has issue causes unwind info generated normal part of operation (without throwing exception). thus, appkit operations in 64 bit can quite slow @ time. b.bum" http://www.cocoabuilder.com/archive/cocoa/217947-cocoa-application-running-very-slow-under-64-bit.html

How to check if HTML forms are empty or not with PHP -

i wondering if there way to check if html text inputs empty, , if so, execute php code, provide. html <input name="name" type="text" class="form-control form-control-lg" id="exampleinputname2" placeholder="your name" maxlength="36" value="<?php echo $name; ?>"> <input style="margin-top: 10px;" name="email" type="text" class="form-control form-control-lg" id="exampleinputemail2" placeholder="your email" maxlength="36" value="<?php echo $email; ?>"> <button name="mysubmitbtn" type="submit" class="btn btn-default btn-md">subscribe</button> php if(!isset(['name']) || !isset(['email']) == 0){ $msg_to_user = '<h1>fill out forms</h1>'; } i wondering if: my php code correct syntax, believe it's not is possible chec

ipython - Anaconda Python cannot find an installed package whereas System Python can -

i using opensuse 13.2 , have installed google protocol buffers library python via yast; altogether packages have installed are: libprotobuf-c0 -> c bindings libprotobuf-lite8 -> protocol buffers library libprotobuf8 -> protocol buffers library protobuf-devel -> headers & libraries python-protobuf -> python bindings i new using anaconda , ipython notebook trying use protocol buffers there. anaconda has installed via standard bash installer ~/anaconda , has not modified path . have started ipython notebook when try access protocol buffers error: # attempted code google.protobuf import text_format # error importerror: no module named google.protobuf however, when try importing same module when using system-installed python (installed via yast , accessed via python @ terminal) imports without problem. is there special need anaconda pick system-installed python libraries? try conda search google.... or binstar search -t cond