Posts

Showing posts from July, 2011

r - Add geom_hline legend to existing geom bar legend -

Image
i want add legend under existing legend represents dashed line, such dashed line labeled "avg tx effect" , placed under study 3. library(ggplot2) library(ggthemes) #dput(df) df=structure(list(study = structure(c(1l, 2l, 3l, 1l, 2l, 3l, 1l, 2l, 3l, 1l, 2l, 3l, 1l, 2l, 3l), .label = c("study1", "study2", "study3"), class = "factor"), d = c(-0.205, 0.1075, 0.3525, -0.37, 0.3, 0.42, -0.28, 0.09, 0.59, 0.11, -0.05, 0.25, 0, 0.25, 0.49 ), outcome = c(1l, 1l, 1l, 2l, 2l, 2l, 3l, 3l, 3l, 4l, 4l, 4l, 5l, 5l, 5l), outcome2 = structure(c(1l, 1l, 1l, 4l, 4l, 4l, 7l, 7l, 7l, 10l, 10l, 10l, 13l, 13l, 13l), .label = c("1", "1", "1", "2", "2", "2", "3", "3", "3", "4", "4", "4", "5", "5", "5"), class = "factor")), .names = c("study", "d", "outcome",

ruby on rails - Query search, how to pass params from check_box form as a row sql? -

hi have controller function, based on check_box_form ( there can 1 or more value passed), this: def show_spells #there 3 params 'elemensts', 'levels', , 'tags' if params[:tags].blank? @chosen_spells = spell.where(element: params[:elements], level: params[:levels] ).to_a else @chosen_spells = spell.where( "element = ? , level = ? , tags = array[?]", params[:elements], params[:levels], params[:tags]).to_a end end and references object table: class createspells < activerecord::migration def change create_table :spells |t| t.string :element t.string :level t.string :desc t.text :tags, array: true, default: [] t.timestamps null: false end end end the firs query works perfect, second 1 making problem, when pass 1 value elements , levels doesn't show resoults, , when pass more 1 walue elements or levels show me error: pg::invalidtextrepresentation: error: invali

php - Unable to convert MySql query using doctrine DQL or QueryBuilder -

i cannot convert query : select c.title, count(*), ( select ba_thumb.link ba_video inner join video_channel on video_channel.video_id=ba_video.id inner join ba_thumb on ba_thumb.video_id=video_channel.video_id inner join ba_channel on ba_channel.id=video_channel.channel_id video_channel.channel_id=c.id order ba_video.views desc, ba_thumb.id asc limit 1 ) ba_thumb_link ba_channel c inner join video_channel on video_channel.channel_id=c.id inner join ba_video on ba_video.id=video_channel.video_id group video_channel.channel_id order count(*) desc into dql or using querybuilder. i tried in dql : return $this->_em->createquery(' select c.title, count(*), ( select t.link bavideogallerybundle:video v inner join v.channels c inner join v.thumbs t c.id=mc.id order v.views desc, t.id asc limit 1

stored procedures - MySQL - SELECT col, function(col) WHERE IN (..) returns same value -

i have defined function calculates nearest item using haversine formula. function works correctly when execute query in ad-hoc fashion such as: select concat(address, ", ", deadline, ", nc") addr tbltickets ticket = 'a152012363' limit 1 @address; select lat, lng addressgeocode address = @address limit 1 @lat, @lng; select round(( 3959 * acos( cos( radians(@lat) ) * cos( radians( startlat ) ) * cos( radians( startlon ) - radians(@lng) ) + sin( radians(@lat) ) * sin( radians( startlat ) ) ) ) * 5280.0 ) distance tblasbuiltpolys order distance limit 1 @ret; select @ret when place logic in function can re use it, result same until start session. i thought issue was using session variables adjusted function this: create function `getticketbuffer`(`ticket` varchar(50)) returns double language sql not deterministic reads sql data comment '' begin declare addr varchar(250) default null; declare lt double default null; declare

linux - Shared volume/file permissions/ownership (Docker) -

i'm having annoying issue while using docker container (i'm on ubuntu, no virtualization vmware or b2d). i've built image, , have running container has 1 shared (mounted) directory host, , 1 shared (mounted) file host. here's docker run command in full: docker run -dit \ -p 80:80 \ --name my-container \ -v $(pwd)/components:/var/www/components \ -v $(pwd)/index.php:/var/www/index.php \ my-image this works great, , both /components (and contents) , file shared appropriately. however, when want make changes either directory (e.g. adding new file or folder), or edit mounted file (or file in directory), i'm unable due incorrect permissions. running ls- lfh shows owner , group mounted items have been changed libuuid:libuuid . modifying either file or parent directory requires root permissions, impedes workflow (as i'm working sublime text, not terminal, i'm presented popup admin privs). why occur? how can work around / handle properly? managing d

unity3d - What is the code to add physics to the rigidbody in unity 5.0.0p2? -

the following code seems wrong in unity 5.0.0p2: rigidbody2d.velocity.x = input.getaxis("horizontal") * 10; so tried following code: getcomponent<rigidbody2d>().velocity.x = input.getaxis("horizontal") * 10; but still not working. several error messages appear follows. bce0043: unexpected token: ). bce0044: expecting ), found '.'. uce0001: ';' expected. insert semicolon @ end. what wrong code? your first line no longer work because rigidbody2d no longer property of monobehaviour. has been removed, have use getcomponent<rigidbody2d>() instead. that doesn't fix problem however. cannot update velocity do, setting x value. have assign full vector. copy current velocity vector3 of own, update x , replace whole velocity vector.

html - Reliable use of hammer.js to get pan events while still naturally scrolling in iOS ...? -

essentially, want able use hammer.js detect start , end of pan event (or @ least pan-x events), whilst still allowing natural overflow-scrolling on x-axis. touchaction declaration on pan recogniser allows work alongside natural overflow scrolling fine on android > chrome, not on ios > safari (touch-action declarations not being supported safari build). codepen(debug-mode) or codepen(normal-mode) eg. var hit = document.getelementbyid('hit'); var text = document.getelementbyid('text'); var hammer = new hammer.manager(hit); hammer.add(new hammer.pan({ direction: hammer.direction_all, touchaction: 'pan-x' })); hammer.on("panstart", function(ev){ console.log('panstart'); text.textcontent = ev.type +" detected."; }); hammer.on("panend pancancel", function(ev){ console.log('panend'); text.textcontent = ev.type +" detected."; }); is there reliable way detect directions (or x) of p

c++ - Single producer multiple consumer buffer pthread implementation using condition variables -

i'm writing naive implementation of single producer multiple consumer buffer pthreads , condition variables, using c++ list buffer. i'm not worried how fast code runs, want rid of errors. the producer thread reads string file , insert end of buffer while each 1 of consumers reads beginning , put on different matrix. so, essencialy, have fifo queue has max size , first element can erased when consumers have read it. here's important part of 3 functions of code: producer: void *feedbuffer(void *threadproducer){ //some declarations... while(!file->eof()) { pthread_mutex_lock(&mutex); while(*buffer_current_size == buffer_max_size) { // full // wait until elements consumed pthread_cond_wait(&can_produce, &mutex); } pthread_mutex_lock(&lock_buffer); *file >> temp.word; buffer->push_back(temp); (*buffer_current_size)++; pthread_mutex_unlock(&lock_buffer); pthread_co

php - drupal entity implementation, there is a mistake somewhere -

i'm starting out drupal , poking around entity api. i've tried write implementation not meant production, test case. but can't work. when try save new candidate error message: creating default object empty value in entity_form_submit_build_entity() (line 8213 of /wwwroot/drupal/public_html/includes/common.inc). the entity not being added database. it's stupid error can't track down. if more experience me out grateful. the audition.module file: <?php ###database schemas function audition_schema(){ $schema['audition_candidate'] = array( 'description'=>'stores candidates audition', 'fields'=>array( 'id'=>array( 'description'=>'identifier candidate', 'type'=>'serial', 'not null'=>true, 'unsigned'=>true, ), 'lastname'=>array( 'description'=>'candidate last

Maven Dependency Resolution Is Not Working Properly -

Image
as far read top level depths should chosen. can see below second level chosen. missing something? you're right, should have worked per dependency mediation rules , doesn't, because of constraints on jersey-spring.pom (see here ). the constraint allows versions 2.5.2 thru 3 of spring-core used itself. <spring25-release-version>[2.5.2,3)</spring25-release-version> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-core</artifactid> <version>${spring25-release-version}</version> <scope>compile</scope> </dependency> if know 4.1.7.release of spring-core plays 1.19 of jersey-spring , can try "managing" dependency , use did. <dependencymanagement> <dependencies> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-core</artifactid> <version>4.1.7.release&l

hadoop - Unable to open iterator for alias -Pig -

i trying load xml file using xmlloader(piggybank) in pig, error saying "unable open iterator alias b". have written following code: register /home/hdfs/spig/trunk/contrib/piggybank/java/piggybank.jar = load '/core-site.xml'using org.apache.pig.piggybank.storage.xmlloader('property') (x:chararray); b = foreach generate flatten(regex_extract_all(x,'<property>\\s*<name>(.*) </name>\\s*<value>(.*)</value>\\s*<description>(.*)</description>\\s*</property>')); dump b; the following log file: pig stack trace error 1066: unable open iterator alias a org.apache.pig.impl.logicallayer.frontendexception: error 1066: unable open iterator alias @ org.apache.pig.pigserver.openiterator(pigserver.java:935) @ org.apache.pig.tools.grunt.gruntparser.processdump(gruntparser.java:754) @ org.apache.pig.tools.pigscript.parser.pigscriptparser.parse(pigscriptparser.java:376) @ org.apac

Neo4j LOAD CSV fails when multiline fields are encountered -

neo4j-sh (?)$ using periodic commit > load csv headers "file:/home/ubuntu/data/woka-data/woka-data.csv" row > merge (woka:woka {woka_id: row.woka_id, woka_title: row.woka_title}); illegalmultilinefieldexception: @ file:/home/ubuntu/data/woka-data/woka-data.csv:834 - multi-line fields illegal in context , might suggest there's field start quote, missing end quote. my kernel version 2.2.3 , file quite large: -rwxr-xr-x 1 ubuntu ubuntu 2508218727 jul 21 17:54 woka-data.csv any clue how fix this? i changed order of fields in file , first error reported line 83. here line: 97801322605720000000,eng,addison wesley longman,,"wri& speakg @ work& build own cc& mst : perils" it new line before : perils how fix this? this error seems specific kernel version. before upgrading used similar file import same data having multiline fields , worked. what can now? the bug still persistent in kernel version 2.2.

Abap Data dictionary Field description -

i'm trying query sap's data dictionary through erpconnect's abap api. code below retrieves table names , various field properties fine fails show field description. knows why? thanks report zselectcommand. tables: dd02l, dd03l, dd02t, dd04t. data: begin of tb_meta, tabname type dd02l-tabname, fieldname type dd03l-fieldname, datatype type dd03l-datatype, leng type dd03l-leng, decimals type dd03l-decimals, position type dd03l-position, desc type dd04t-ddtext, end of tb_meta. data utb_meta standard table of tb_meta. data: ln_meta line of utb_meta, m1 type i, m2 type i. select tb~tabname fld~fieldname fld~datatype fld~leng fld~decimals fld~position x~ddtext corresponding fields of table utb_meta dd02l tb inner join dd03l fld on tb~tabname = fld~tabname inner join dd04t x on fld~rollname = x~rollname , x~ddlanguage = 'en' contflag in ('a', 'c', &#

laravel - Lumen and MongoDB? -

is somehow possible include mongodb connection settings lumen framework. saw config/database.php loaded internally in lumen package. there way extend somehow include mongodb connection settings? we're using lumen, laravel, mongo, , mysql in 1 giant project can through one. assuming want use mongodb eloquent instead of raw mongoclient. can find library i'm using jenssegers here . install mongodb extension firstly you'll need install dependencies php interact mongo. specifics installing mongo extension can found on php documentation . after you'll have edit php.ini files platforms (apache/cli/nginx) load extension. added following before module settings extension=mongo.so it goes without saying need restart apache/nginx after changing configuration. configuring lumen in root lumen folder can add requirements following command. composer require jenssegers/mongodb from there you'll need load mongodbserviceprovider before facades or eloque

javascript - Is there any way to detect if user has launched microsoft edge tablet or desktop browser? -

microsoft edge browser returning same user agent both windows 10 tablet , desktop. please me in differentiating micosoft edge tablet , desktop browsers through javascript features or useragent detection or other way. note: differentiate tablet , desktop browsers pointer events. tablet supports pointer events while desktop doesnt support. in windows 10 desktop supporting pointer events unlike windows 8/8.1 there 1 microsoft edge browser, rather “immersive” touch friendly browser , regular desktop win32 app. such can’t detect difference ua string, there no difference. however, if use-case give touch friendly layout touch devices (tablets , convertibles, 2-in-1s, etc) , more compact layout mouse , keyboard users, can use feature detection in css this. for can use css media queries interaction media features. if want detect there touch screen: @media (pointer: coarse) { ...styles touch screen... } if want detect user can’t hover (a common issue on touch screen

ember.js - Observe value of input component -

i have simple component input element via tagname . so far no problem. observe value attribute of input. anytime input changed fire observer. why not work? a jsfiddle can found here . <script type="text/x-handlebars"> {{my-input}} </script> <script type="text/x-handlebars" id="components/my-input"> </script> var app = ember.application.create(); app.myinputcomponent = ember.component.extend({ tagname: 'input', attributebinding: ['value'], onchange: ember.observer('value', function() { console.log('change'); }) }); disclaimer: solution applies version of ember used op (ember-1.0.0-rc.6.js) , in future versions concept remains same syntax changes bit. (example version 1.13.6 https://emberjs.jsbin.com/xuhavokubi/edit?html,js,output , code posted @ end) the issues original code following, 1.the property binding attribute attributebindings 2.th

Excel vba script: find() returns nothing on 2nd iteration -

for active_row = 9 last_row ws1_func_loc = thisworkbook.sheets(ws1).cells(active_row, "c").value ws1_mat_id = thisworkbook.sheets(ws1).cells(active_row, "d").value ws1_mat_qty = thisworkbook.sheets(ws1).cells(active_row, "i").value ws1_reason2 = "" zc_sum = worksheetfunction.sumifs(thisworkbook.sheets(ws2).range("f:f"), thisworkbook.sheets(ws2).range("k:k"), ws1_func_loc, thisworkbook.sheets(ws2).range("n:n"), ws1_mat_id, thisworkbook.sheets(ws2).range("s:s"), "zc") zk_sum = worksheetfunction.sumifs(thisworkbook.sheets(ws2).range("f:f"), thisworkbook.sheets(ws2).range("k:k"), ws1_func_loc, thisworkbook.sheets(ws2).range("n:n"), ws1_mat_id, thisworkbook.sheets(ws2).range("s:s"), "zk") 'some other if conditions... elseif zc_sum = 0 , zk_sum > 0 row_match_count = worksheetfunction.countif(this

view - execute html and PHP code into a variable -

i'm trying figure out how can execute html , php code class type controller , store result variable simulate behavior of mvc oriented frameworks, example: i have variable called $mystic_var , want use var strange function (i don't know function is) read .php file, execute , store result $mystic_var assume try.php has following content: <html> <head></head> <body><?php echo "hello world"; ?></body> </html> then execute $mystic_var = mystic_function('try.php'); , if check $mystic_var, have this: <html> <head></head> <body>hello world</body> </html> you can use output buffer <?php ob_start(); ?> <html> <head></head> <body><?php echo "hello world"; ?></body> </html> <?php $output = ob_get_clean(); ?>

.net - Serialize C# Objects while maintaining object references -

so have multiple custom classes referencing other classes in instances. know how serialization works in general, how deal object references? goal save objects in either xml or binary state can restored later. in simplified example persons identified id , have list of other person objects referenced called friends. public class person{ public int id; public list<person> friends; } how serialize , deserialize example , keep object references intact? think deserialization can tricky if it's trying restore refernces persons haven't been deserialized yet. [xmlrootattribute("person")] public class person{ [xmlattribute("_id")] public int id; [xmlelement("friends")] public list<person> friends; } and use xmlserializer class create xml file , / or object https://msdn.microsoft.com/en-us/library/58a18dwa.aspx

c - Where is a char-pointing string stored LOGICALLY? -

in c, can use char * point @ string. like char *s = "hello"; . as seen, neither variable located dynamically on heap because there no dynamical functions malloc, nor defined point other variable. so question is, where literal string variable [char *s] points stored logically? is stored in stack normal local variables? or, stack? actually, graduate of computer engineering department, haven't found , have been curious how [char * string] works logically. great honor ask right 1 now. the variable char* s stored on stack, assuming it's declared in function body. if declared in class, stored wherever object class stored. if declared global, stored in global memory. in fact, non- static , non- thread_local variable declare in these 3 positions behave same way, regardless of whether primitive (i.e. int ), object (i.e. vector<int> ), or pointer (i.e. const char* ). if variable static, stored in global space. if variable thread_local , ea

sql - Listing the permissions of a specific user or group in an MS Access security file? -

i'm trying set permissions groups in our ms access database using *.mdw security file. i'm on "user , group permissions screen", , not ideal finding out permissions have been set user concerning specific object. i'm given list of users/group names , have no trouble finding group there. however...when reach object name: list, ridiculously long , unable find permissions have been assigned group due enormous number of objects found there. the existing group has limited set of permissions (it appears of objects permissions checkboxes unchecked), there @ least thousand of these each of object types : table, queries, forms, etc...and find out ones have read data, or open/run checked off permissions. i've tried scrolling though object name: s group there many check without sort of query or code; there must way this. i don't have access main account database, don't believe able write code find answer. i able obtain list of objects using

javascript - Can iframes inside my website can access the webview-js bridge object? -

for android app using webview render website , have created javscriptinterface object communicate app , website. want allow other users put iframe inside website, thinking whether these iframes can access js interface object ? if possible how fix security issue ? yes - javascript in webview has access same javascript interface, regardless of server comes from, because it's executed locally. you can test running 2 python simplehttpserver instances on different ports on local network: considered different hosts (an xmlhttprequest example result in cross-origin request error), can still call methods javascript iframe coming different host. so far have not been able find way circumvent this. android docs recommend "exposing addjavascriptinterface() javascript contained within application apk", no mention of how achieve this. as java object passed on javascript, , of javascript executed within context of webview, guess android implementation of webview /

sql - Selecting row with latest timestamp MySQL with Duplicates -

i trying select row latest timestamp. here's sample of table: +--------+-------------+------------------+------------+--------+---------+-----------+---------------+----------------+---------------------+-----------------------------------------+ | id | tester_name | frame | board_name | config | part_no | serial_no | license_count | legal_enabling | last_checked | log_name | +--------+-------------+------------------+------------+--------+---------+-----------+---------------+----------------+---------------------+-----------------------------------------+ | 162936 | uflex-10 | test_head th 1 | hsd-m | 6 | 974-331-44 | 302501d | | | 2015-08-01 19:48:48 | igxleventlog.8.1.2015.19.48.15.054.log | | 162937 | uflex-10 | test_head th 1 | hsd-m | 7 | 974-331-44 | c0165ec | | | 2015-08-01 19:48:48 | igxleventlog.8.1.2015.19.48.15.054.log |

IF/ELSE condition in sql and php -

i'm inserting database id , hours, working successfully. when insert new value id has previous value, old val isn't replaced new, instead they're kept both. i'm trying update function if/else statement (commented part). still same result. if/else statement must check first if hours (a column in table) value empty, if perform sql insert, else perform sql update. please? if (isset($_post['submit'])) { $hours = $_post['hours']; $selectid = $_post['selectid']; $sql1 = "insert `editedworkhours` (`id`,`h`) values('$selectid','$hours')"; $getresult = mysql_query($sql1); if (mysql_affected_rows() > 0) { } else { } $tempname = $row['field']; $sql2 = "update editedworkhours set h ='" . $_get["hours"] . "' idnumber='" . $_get["selectid"] . "'"; $result2 = mysqli_query($con, $sql2); if ($con->query($s

java - cannot load css and js files when using spring mvc -

i new spring mvc. loading resources have use < mvc:resources mapping="/design/**" location="/design/" /> . although worked well, not. cannot understand problem. can me? here spring-dispatcher-servlet.xml. resource(design) folder in webcontent , has sub folders called css, js , images. < beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mongo="http://www.springframework.org/schema/data/mongo" xsi:schemalocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/sprin

javascript - How to get member variables in collision detection functions? -

i working on side scrolling game , using cocos2djs framework that. trying build collision detection functions, hit bump. i want update hud information regarding player's health, when collision occurs, however, not able access member variables inside these functions reason. this collision handler (i use chipmunk physics) this.space.addcollisionhandler(pape, obstacle, this.collisionobstaclebegin, null, null, null); i handle collision detection here addcollisionhandler : addcollisionhandler: function() { cc.log(this.healthstatus); } but console shows this.healthstatus undefined, though defined , has been used setting hud earlier in init function. can me out? i found mistake, forgot bind collisionobstaclebegin ...

asp.net - Source code of receiving email -

i making email client in asp.net c#. in it, gridview not taking data of more 5 rows. having 250 mails in mailbox. gridview not showing data. showing 5 rows , after 5 6 rows data presented out of gridview. <%@ page language="c#" autoeventwireup="true" codefile="cs.aspx.cs" inherits="cs" %> <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> </script> <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"> </script> <link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/start/jquery-ui.css"

c# - Bind Click function with parameter -

in mvvm cross android in xamarin studio, i can write in .axml file bind click function button: local:mvxbind="click sendmessage" sendmessage public method on mvxviewmodel signature public void sendmessage() { //do stuff } however, want like this, local:mvxbind="click sendmessage param1: foo, param2: bar" which should call method underneath signature this, public void sendmessage(t foo, t bar) { //do stuff } where foo , bar might current selected item, or object represented in particular row of table etc. i can't see anywhere points towards how this, , hoping native functionality! can help? the binding engine allows use either icommand instances or public void methods. latter works if install nuget package methodbinding . as amount of parameters supported, boils down single argument, should correspond viewmodel bound item in listview.

object - c# passing class argument to constructor -

the following codes works is, use reference myproperty class passed in constructor instead of typed references in inline code. how do this, expected pass ref myproperty have tried fails i propertyclass able handle myproperty classes i.e. no references myproperty in propertyclass still learning sorry if have missed obvious ! many help sarah propertyclass pc = new propertyclass(!here!); // pass myproperty class here pc.settings.add(new myproperty("fred", "monday")); pc.savexml("mytest.xml"); public class myproperty { [xmlattribute] public string mypropname { get; set; } [xmlelement] public string mypropdata { get; set; } // default constructor needs parameterless serialisation. public myproperty() { } public myproperty(string name, string data) { mypropname = name; mypropdata = data; } } public class propertyclass { public list<myproperty> settings { get; set;

php - Very simple insert function, no data get's stored and no errors received -

i'm trying add button generates dummy data table 1 click <?php ini_set('display_errors',1); ini_set('display_startup_errors',1); error_reporting(-1); include("classes/db.class.php"); $currenttime = time(); $totalusers = '20000'; $usersus1 = '5000'; $usersus2 = '5263'; $usersfr1 = '8000'; $usershk1 = '7425'; $usersuk1 = '0'; if(!empty($_post)) { $currenttime = time(); $db = new db(); $sql = "insert connections (users, us1, us2, fr1, hk1, time, uk1) values ('".$db->conn->real_escape_string($totalusers) ."' , '". $db->conn->real_escape_string($usersus1) ."' , '". $db->conn->real_escape_string($usersus2) ."' , '". $db->conn->real_escape_string($usersfr1) ."' , '". $db->conn->real_escape_string($usershk1) ."&

enable annotations shiro spring -

i followed this subject created "working" code. however, unauthenticated person may call method annotations: @requiresauthentication no exception thrown. (important thing: don't create web application. simple console program.)

c# - How to pass the ConditionQuery in Mongosis SSIS -

i using mongosis plugin in ssis package loading data mongodb collection sqlserver. able load data using mongosis dataflow task, condition query in monodb source component>> component properties>> conditionquery hardcoded.. example: {"name":"xyz", branch:"abc"} inside mongodb source>> component properties tab. i avoid hardcoding , pass conditionquery outside dataflow task. please suggest on how go this.

javascript - DataTable filtering (searching) add_column in Laravel project -

i have problem table rendered datatable bootstrap jquery in project (built in laravel 5). the search (filtering) working columns generated sql query, columns generated add_column not working. the javascript code php file: var otable; $(document).ready(function() { otable = $('#table').datatable({ "sdom" : "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>", "spaginationtype" : "bootstrap", "bprocessing" : true, "bserverside" : true, "sajaxsource" : "{{ url::to('employee/outputs/data/'.$invoice_status) }}", "fndrawcallback" : function(osettings) { $(".iframe").colorbox({ iframe : true, width : "60%", height : "60%",

java programming giving "symbol error" -

import java.util.scanner; class pyth{ public static void main(string[] args) { system.out.println("enter n"); scanner in=new scanner(system.in); int n=in.nextint(); { for(int a=1;a>n;a++) { for(int b=a+1;b>n;b++) { int c=n-a-b ; } if(c*c=a*a+b*b) { system.out.println(a+','+b+','+c+','); } } } } } i'm new programming, can't figure out problem. error: pyth.java:15: error: cannot find symbol if(c c=a a+b*b) ^ symbol: variable c location: class pyth firstly, syntax important. maintain indents. makes code easier read , understand , helps in maintenance. the errors in code : int c=n-a-b ; c being used in if comparison. needs declared beforehand. similarly, int b has declared before hand use in if statement. if(c*c=a*a+b*b)

python 2.7 - How to make Scrollable label in kivy using .kv file -

i trying make scrollable label has text here code here main.py from kivy.app import app import socket, sys, threading, os, time class exampleapp(app): def build(self): pass if __name__ == "__main__": exampleapp().run() here example.kv file scrollview: label: text:"hello world"*1000 i facing issues this....some 1 please post answer this

javascript - Checking innerHTML values if empty or not for Array of Object -

i trying check if below condition holds true: var elemarray = document.getelementsbyclassname('customers'); for(var = 0; < elemarray.length; i++){ elemarray[i].id = i; var elem = document.getelementbyid(elemarray[i].id); var text = elem.innerhtml; text = text.tostring(); alert(text); if(text=="<br>"){ alert('bingo'); elem.style.visibility="hidden"; } } in 1st alert can see values 1. <br>abc 2. <br>xyz and empty values get: 1. <br> 2. <br> so trying compare "bingo" not showing. missing? looks have either special characters or spaces in content. remember == compares exact strings. i.e. '<br>' , '<br> ' different. here working jsfiddle , prints bingo fine. http://jsfiddle.net/1nxzxjdd/ some answers mention using indexof or contains method might not useful ops

php - Request data from Laravel API into wordpress -

i working on project on laravel 5.1, , want make restful api later can use same code , request data mobile apps or other websites. project in initial stages , want make correct right beginning. suppose have simple route calling dashboard method on admincontroller. after logging in redirects admin dashboard page data. /******************** laravel project ***********************/ //routes.php route::group(['middleware' => 'auth'], function () { route::get('dashboard', 'admincontroller@dashboard'); }); // admincontroller public function index(){ $data = 'some data'; return view( 'superadmin.dashboard')->with('data', $data ); } now want same data in wordpress project. how use api fetch data variable (without view) ? dont want create method that, there way can use same function fetch data json? i read in forum can access d

Parse json in a list in logstash -

i have json in form of [ { "foo":"bar" } ] i trying filter using json filter in logstash. doesn't seem work. found can't parse list json using json filter in logstash. can please tell me workaround this? update my logs ip - - 0.000 0.000 [24/may/2015:06:51:13 +0000] *"post /c.gif http/1.1"* 200 4 * user_id=userid&package_name=somepackagename&model=titanium+s202&country_code=in&android_id=androidid&et=1432450271859&etz=gmt%2b05%3a30&events=%5b%7b%22ev%22%3a%22com.olx.southasia%22%2c%22ec%22%3a%22appupdate%22%2c%22ea%22%3a%22app_activated%22%2c%22etz%22%3a%22gmt%2b05%3a30%22%2c%22et%22%3a%221432386324909%22%2c%22el%22%3a%22packagename%22%7d%5d * "-" "-" "-" url decoded version of above log ip - - 0.000 0.000 [24/may/2015:06:51:13 0000] *"post /c.gif http/1.1"* 200 4 * user_id=userid&package_name=somepackagename&model=titanium s202&countr