Posts

Showing posts from June, 2013

Perl Module using %EXPORT_TAGS -

i'm having trouble using %export_tags in perl module. in solver.pl have: use matrixfunctions qw(:normal); then inside matrixfunctions.pm , have: package matrixfunctions; use strict; use exporter; use vars qw($version @isa @export @export_ok %export_tags); $version = 1.00; @isa = qw(exporter); @export = (); @export_ok = qw(&det &identitymatrix &matrixadd &matrixscalarmultiply &matrixmultiplication); %export_tags = ( det => [qw(&det)], normal => [qw(&det &identitymatrix &matrixadd &matrixscalarmultiply &matrixmultiplication)]); however works when have @export_ok including methods. if have @export_ok = (); i have error: "matrixscalarmultiply" not exported matrixfunctions module "det" not exported matrixfunctions module "matrixadd" not exported matrixfunctions module "matrixmultiplication" not exported matrixfunctions module "i

mapreduce - pcap to Avro on Hadoop -

i need know if there way can convert pcap file avro , can write map reduce program on avro data using hadoop ? otherwise best practice when dealing pcap files on hadoop ? thanks a pcap file collection of records, each containing time stamp, packet length field, "amount of data packet captured , saved" length field, , unstructured blob of raw packet data. the avro documentation says: avro provides: rich data structures. .... "unstructured blob of raw packet data" , "rich data structures" don't go together; you'll have parse raw packet data, same way implementations of protocols in packet , same way tcpdump/wireshark/various other protocol analyzers do, turn structured data, can have data on can do processing. so, first, need figure out you're trying here. sort of analysis want do? packet data want process? packet time stamps? source , destination ip addresses? protocols within packet? in pa

javascript - What is `_dereq_()` inside React? -

i'm searching through react-0.13.3.js , 1 thing can't work out. @ start of source there's bunch of dereq() calls. 'use strict'; var eventpluginutils = _dereq_(19); var reactchildren = _dereq_(32); var reactcomponent = _dereq_(34); var reactclass = _dereq_(33); but see implementation function. , how work? , importantly, declared? update i'm still waiting more comprehensive answer accept. main question what _dereq_ function , how work. this derequire combined browserify (or other bundler?) module ids. it's way rename require in output bundle avoid collisions. read here more information: https://github.com/calvinmetcalf/derequire/issues/25 the basic idea different module loaders handle require differently. "derequire" strategy binding requires context via different keyword.

sql - FD theory and normal forms -

if have new r1 = {a,b,c,d} , r3 = {c,d,e,h} which know not in either bcnf or 3nf because candidate key not in fd. now, how can decompose both of them bcnf if functional dependencies are. f = {a->b,a->c,e->f,e->g,ae->h} to convert relation r , set of functional dependencies( fd's ) 3nf can use bernstein's synthesis . apply bernstein's synthesis - first make sure given set of fd's minimal cover second take each fd , make own sub-schema. third try combine sub-schemas for example in case: r = {a,b,c,d,e,f,g,h,i} ( according comment above ) fd's = {a->b,a->c,e->f,e->g,ae->h} first check whether fd's minimal cover ( singleton right-hand side , no extraneous left-hand side attribute, no redundant fd ). in case given fd's minimal cover . second make each fd own sub-schema. have - ( the keys each relation in bold ) r 1 ={ a ,b} r 2 ={ a ,c} r 3 ={ e ,f} r 4 ={ e ,g} r 5 ={ a,e ,h}

url - PHP: Get Domain (without subdomain) of any Address available as String -

recently question has been asked, how domain of url available string. unfortunately question has been closed, , far linked answers pointed solutions using regex (which fails special cases .co.uk ) , static solutions, considering exceptions (which ofc. might change on time). so, searching generic solution question, work @ time , found one. (at least couple of tests positive) if find domain attempted solution not work, feel free mention it, , i'll try imrpove snipped cover case well. to find domain of string given, three-step solution seems work best: first, actual hostname, using parse_url ( http://php.net/manual/en/function.parse-url.php ) second, query dns-server "top-most" a-record available. (i used checkdnsrr purpose: http://php.net/manual/en/function.checkdnsrr.php ) last not least: perform validations make sure not running "default response". i performed tests , seems result expected. method directly generates output, can modif

Create type with two possible variants in Typescript -

is there way in typescript declare variable can int16array or uint16array , nothing more? typescript 1.4 has support type unions , notation is: var arr: int16array|uint16array; common methods both of these have available on arr . if use instanceof or typeof checks on arr in conditional/branched code, infer type of arr in branches. typescript 1.4. has support type aliases: type my16array = int16array | uint16array; you can use: var arr: my16array;

mapbox - Leaflet: Keep PopUp Open -

i'm trying create popup stays open until click x in top right corner close down. best way this? code below, thanks! //pop code //create custom icon var newicon = l.icon({ iconurl: 'logo.png', }) // creating marker var marker = l.marker(new l.latlng(41.77, -87.6), { icon: l.mapbox.marker.icon({ 'marker-color': 'ff8888' }), icon: newicon, draggable: true, }).addto(map); // bind popup marker marker.bindpopup("i text stay open until closed").openpopup(); use: var newpopup = l.popup({ closeonclick: false }).setcontent("i text stay open until closed"); marker.bindpopup(newpopup);

java - How to place a JButton at a specific x - y point on a JPanel -

general code: issues below reference classes public class board extends jpanel { public board() { boardmethods = new boardmethods();//boardmethods handles logic a.printboard(getboard());//irrelevant question, helps determine winner jpanel panellordy = new jpanel(new flowlayout()); //jbutton alphabutton = new jbutton("hi"); //alphabutton.setbounds(213,131,100,100); //add(alphabutton); } public int[][] getboard(){ return boardevalmatrix; } public void paintcomponent(graphics g){ g.setcolor(color.blue); g.fillrect(0, 0, 1456, 916); graphics2d newg = (graphics2d) g; newg.setstroke(new basicstroke(15)); g.setcolor(color.yellow); for(int = 0; < 6; a++)//rows board --- rowheight 127 g.drawrect(128, 68 + (a*127), 1200, 127); g.setcolor(color.black); newg.setstroke(new basicstroke(8)); for(int = 0; < 6; a++)//columns board --- columnwidth 171 g.drawrect(128 + (a*171), 68, 171, 764);

intellij idea - Spring Data neo4j JUnit4 setup -

i confess total newbie @ java way of doing things , totally lost trying simple unit test running. i building data access library , want unit test it. using spring data neo4j 4.0.0.build-snapshot because need connect remote neo4j server in real world. after battling errors day @ point have test class: @runwith(springjunit4classrunner.class) @componentscan(basepackages = {"org.mystuff.data"}) @contextconfiguration(classes={neo4jtestconfiguration.class}) public class personrepositorytest { @autowired personrepository personrepository; protected graphdatabaseservice graphdb; @before public void setup() throws exception { graphdb = new testgraphdatabasefactory().newimpermanentdatabase(); } @after public void teardown() { graphdb.shutdown(); } @test public void testcreateperson() throws exception { assertnotnull(personrepository); person p = new person("test", "user");

virtual reality - Using Ubuntu to install Cardboard SDK for VR applications -

i trying install cardboard sdk on ubuntu 14.04 , needs "unity", download of "unity" seems windows , mac. has tried on ubuntu? unity3d has released beta linux version . it not perfect, stable enough. if want develop cardboard app on ubuntu, need it.

css - Inline-block containers do not sit site by side, cause expansion of container -

apologies, have attempted create js fiddle replication, issue not seem occur in js fiddle can think problem more general css on page. the js fiddle created not show error, here anyway: https://jsfiddle.net/j2qxh9zg/ i attempting line 2 elements side-by-side. use display:inline-block; , have width of 33.3% , 66.6% . body has font-size:0 set in order remove whitespace issues not believe issue whitespace between containers. <div class="grid one-third"> <div class="logo"> <img src="assets/logo.png" alt="something"/> </div> </div> <div class="grid two-thirds menu"> <ul> <li><a name="#home">home</a></li> <li><a name="#expertise">our expertise</a></li> <li><a name="#portfolio">portfolio&

php - How to check the validity of token by Oauth provider using Socialite in Laravel 5? -

i able use socialite in project per tutorial : http://www.codeanchor.net/blog/complete-laravel-socialite-tutorial/ everything worked fine have security concern in it. if (!$request) { return $this->getauthorizationfirst($provider); } this checks token. correct way check token? when @ tutorial noticed $this->getauthorizationfirst($provider) calls getauthorizationfirst method declared inside custom authenticateuser class. the getauthorizationfirst method forces socialite driver redirect user provide (facebook, github, twitter, etc.) in order authenticate user against provider. process returns authenticated user calling application. // authenticate connecting provider api private function getauthorizationfirst($provider) { return $this->socialite->driver($provider)->redirect(); } // provider returns authenticated user post-authentication processing private function getsocialuser($provider) { return $this->socialite->driver($pro

javascript - Disable Vertical scroll on mobile devices -

i using touchmove , touchstart , touchend functions jquery mobile . trying disable vertical scroll while touchstart , enable when touchend triggered. have tried few things: adding overflow: hidden body: works fine chrome browser doesn't work firefox android binding , unbinding scrolling event body when touchstart event fired , touched fired - didn't work @ all(im sure did wrong). below code. code: $(document).on("touchstart", ".amount-container", function(event){ $(".notify-cart").addclass("show"); if(event.touches.length == event.changedtouches.length) { monitor = { x: event.touches[0].clientx, y: event.touches[0].clienty }; } }).on("touchend", ".amount-container", function(){ $(".notify-cart").removeclass("show"); $("body").removeclass("overflowhide"); monitor = {}; }).on("touchmove mousem

github for windows - Cannot create local repository -

i have folder of scripts (e:\scheduledtasks) i'd put under source control. installed github windows did not link github account, not wish kind of integration github, nice ui features of local repository. when drag folder ui, "create" pop-up appears, when click "create repository" "failed create repository. error occurred while creating repository. might need open shell , debug state of repo." (what repo? doesn't exist yet) when click on "create", browse folder , enter name of repository, subfolder same name gets created (e:\scheduledtasks\scheduledtasks) , empty repository created. when click on "create", set local path e: , name scheduledtasks, same error above. when use git shell git init repo in e:scheduledtasks, proper e:\scheduledtasks.git. can add files. if try drag e:\scheduledtasks github windows, taken "create" popup , error message saying "repository same name exists @ location". (of c

Why Visual Studio makes duplicates of .dlls in build folder? -

Image
work on project have inherited developer. mix of vb.net & c#. solution made of multiple projects: config (start-up project), common , agent + project stdplugin under plugin folder. (plugins .dlls loaded during runtime). non-plugin projects, output path set bin\debug\ . plugins projects output path set config\bin\debug\plugins . after project compiled, config\bin\debug\ has .dll s + .pdb s , .exe projects. however, config\bin\debug\plugins contains copies of project .dll s + .pdb s , .ddl + .pdb stdplugin project. in other words, getting duplicates. on top of that, when run build->clean solution , config\bin\debug\ being cleaned out, config\bin\debug\plugins not. some clarifications: 1. project build debugging. 2. noticed above issues while investigating the source file different module build issue affects reader project. not stop on breakpoins in reader project.

javascript - Google Maps Roads API: Making 'snap to road' more forgiving -

i've been tasked using google maps api create tool restaurant can use define delivery zones. here progress: http://codepen.io/keithpickering/pen/nqdzko users should able draw polygon, after snap nearby roads accuracy. working relatively well, except fact google's built-in snap road functionality...well, sort of sucks. if points aren't close enough together, either refuse snap anything, or make weird janky line. what need tool more "forgiving" road snapping; in other words, should able lazily draw pretty sort of polygon zoom distance, , lines should forced snap 1 road or another. here part of code i'm using snap: ... // snap polygon roads placeidarray = []; runsnaptoroad(poly, path, color); }); // snap user-created polyline roads , draw snapped path function runsnaptoroad(poly, path, color) { var pathvalues = []; (var = 0; < path.getlength(); i++) { pathvalues.push(path.getat(i).tourlvalue()); } $.get('https://roads.googlea

wso2 - SAML 2.0 protocol exposed as Web Service -

i want implement sso system saml 2.0 protocol using wso2 identity provider. i've analyzed sso sample https://docs.wso2.com/display/is500/configuring+single+sign-on+with+saml+2.0 learn how implement service provider side generate saml 2.0 authentication request. afaik ways implement saml sp using either openam, opensaml or shibboleth. methods require programming knowledge service provider implement it. thus question: there web admin service in wso2 ease implementation of saml sp? i've find out saml2ssoauthenticationservice.wsdl i'm not sure how works , whether need other admin services in order implement desired solution. you can use https://localhost:9443/services/identityapplicationmanagementservice admin service createapplication method create service provider. or can create service provider using configuration files. please follow setps below 1) open /repository/conf/security/sso-idp-config.xml file , add following configuration it. adds traveloci

sql - Recordset is not updateable -

Image
i have query contains query, shown in picture (they separated solid black line). not contain criteria/conditions. when run query bottom one, unable modify recordset. explain why? , if it's possible work around that? thanks! in access queries created using multiple outer joins not updateable. easiest way around write first query temporary table first, use temporary table second query.

instance - property chaine for a data property -

according protege 4.x documentation property chain exists object properties in case need include data property follow: if builds(b, a) o has_name(a, "holly wood") -> has_name(b, "holly wood") to explain bit, imagine have street name "holly wood". street built of several segments (a segment part of street between junctions) name should same street name "holly wood". note that, street concept different segment not subclasses have above relation (builds). one solution make has_name object property, each name should object (instance). if is_name_of(name, a) o is_built_of(a, b) -> is_name_of(name, b) this not seem quite ok me think better use data-type. the other solution use swrl below: thing(?p), thing(?q), builds(?q, ?p), has_name(?p, ?name) -> has_name(?q, ?name) this not work!!!! can me figure out why or find proper solution? i think swrl rule is proper solution here. you've noted, can't use data pr

python - Timing packets on a traffic server -

i have proxy traffic server hop on network , handling large quantity's of traffic. i calculate cost in seconds of how long takes proxy server handle incoming request, process them , forward on. i had been playing write python script perform tcpdump , how time packets entering server until had left. i have perform tcpdump period of time , analysis calculate times? is way of achieving want or there more elegant solution? i found easier utilize switch's 'port mirror' copy data in , out of proxy's switchport separate port connects dedicated capture box, tcpdump work you. if switch(es) have capability, reduces load on busy proxy. if don't, yes, tcpdump full packets file: "tcpdump -i interface -s 0 -w /path/to/file". you can (on different machine) throw code examine , report on want, or open in wireshark detailed analysis.

excel - Using batch to find data in .csv and use output to continue batch -

i use batch retrieve first 2 letters of computer name (e.g. 'nl') , set %country% . what use %country% search in .csv file in column (eg 'a7'). when batch has found information, has return column b (eg 'b7') , set %adv% . @echo off :home setlocal enabledelayedexpansion set csvfile=c:\users\username\desktop\test2.csv set country=%computername:~0,2% :findit /f "tokens=*" %%a in (%csvfile%) ( set inline=%%a /f "tokens=1-2 delims=," %%1 in ("!inline!") ( set "area=%%~1" & set "adv=%%~2" goto :showres ) ) :showres echo %adv% pause

How to find bugs in new JavaFx bug tracker -

existing links javafx bugs dead. how can find bugs in new system? e.g. how find bug https://javafx-jira.kenai.com/browse/rt-28874 in https://bugs.openjdk.java.net as stated on " https://javafx-jira.kenai.com/ " the javafx bugs on bugs.openjdk.java.net, go there , search id rt-____ find bug looking for. after using search id, landed here: https://bugs.openjdk.java.net/browse/jdk-8090548 ;) seems pretty easy (checked correct mapping bug-id found myself, seems work)

sql - Group by month and add year and employee -

i have simple table every sale made in few past years. find out maximum sale per month , made , in year , month. table has following columns: id, date, amount, employeeid i group data year(date) , month(date) , employeeid , use sum(amount) find sale of each employee in each month. group further month(date) , use max on sum(amount) column find maximum sale per month. easy. after find out when (date) , (employeeid) made particular sale. group data year(date), month(date), employeeid , use sum(amount) find sale of each employee in each month order sum(amount) desc. highest sellers @ top of results.

Convert a number from scientific notation to decimal in JAVA -

i have problem: number showing in scientific notation if has 8 or more digits before decimal point. there simple way convert number decimal via library or something? began creating manual method parse out, seems overcomplicated. any appreciated. input example: 1.0225556677556e7 edit: need able identify number in scientific notation you can use numberformat accomplish goal easily. string scientificnotation = "1.0225556677556e7"; double scientificdouble = double.parsedouble(scientificnotation); numberformat nf = new decimalformat("################################################.###########################################"); decimalstring = nf.format(scientificdouble); to answer you're other question matching scientific notation strings- can use regex , string.matches(). 1 isn't perfect although probability of getting false positives should low: if(mystring.matches("-?[\\d.]+(?:e-?\\d+)?")){ //do work }

android - AlertDialog contextual actionbar bug on Support Library 22.2? -

Image
i think found bug in material alertdialog of support library 22.2, want check first community. context actionbar copy/cut text not work fine "android.support.v7.app.alertdialog". the result with android.support.v7.app.alertdialog (the actionbar copy/cut text not on top , not possible click on buttons): if change import use "android.app.alertdialog" actionbar looks fine on top: the code: styles.xml: <style name="apptheme" parent="theme.appcompat.light.darkactionbar"> <item name="windowactionmodeoverlay">true</item> <item name="android:windowactionmodeoverlay">true</item> </style> code fragment opens dialog: public static class mydialogfragment extends dialogfragment { @override public dialog oncreatedialog(bundle savedinstancestate) { alertdialog.builder builder = new alertdialog.builder(getactivity()); layoutinflater inflater =

facebook - Permissions for posting Unpublished Page Post -

i'm upgrading our application marketing api v2.2 work v2.3. in v2.2 worked fine, in v2.3 when try post unpublished post (with same user) following error: (oauthexception - #200) (#200) user hasn't authorized application perform action i use page access token following permissions: read_stream, read_page_mailboxes, rsvp_event, ads_management, ads_read, read_insights, manage_notifications, manage_pages, publish_actions i tried post user's accesstoken didn't work either. adding answer reflect comments on question in case trying create post on page failing (#200) user hasn't authorized application perform action reason exception text accurate - if have reason believe otherwise, must verify have correct permissions: publish_actions (if posting pages using graph api v2.2 , below), publish_pages (if posting pages in graph api v2.3 , above) manage_pages (needed act page , change page settings)} you'll need check on status & re

c++ - Size of class with virtual keyword and character in it -

this question has answer here: why isn't sizeof struct equal sum of sizeof of each member? 11 answers i ran following code. #include <iostream> using namespace std; class base { char c; public: virtual ~base() { } }; int main() { cout << sizeof(base) << endl; return 0; } 1) size 4 (for vptr) + 1(for char). result 8. why ? 2) replaced char int variable, still output 8. can explain me has caused issue? it's down padding. compiler has packed class multiple of 4 bytes.

javascript - On scroll, how to make a div in the background move up, while the div on top of it moves in the opposite direction? -

here website: http://kingston20x15.com/ what jquery should looking @ try , blocks in background move in opposite direction vertically blocks in front of text? so far i've been trying hack fiddle unsuccessfully: http://jsfiddle.net/5uutv/1/ var winheight = $(window).innerheight(); $(document).ready(function () { $(".panel").height(winheight); $("body").height(winheight*$(".panel").length); }); $(window).on('scroll',function(){ $(".panelcon").css('bottom',$(window).scrolltop()*-1); });

Regex pattern to filter only 2 or more digits -

the entire password length 8 characters or more, 1 uppercase letter or more, ok. i need regex pattern filter 2 or more digits. code doesn't work 2 digits: (?=.*\d)(?=.*[a-z])(?=.*[a-z])).{8,} it allows 1 or more digits, need 2 or more digits. i tried (both none of them work): (?=.*\d{2})(?=.*[a-z])(?=.*[a-z])).{8,} (?=.*\d){2})(?=.*[a-z])(?=.*[a-z])).{8,} to require 2 more digits, add \d*\d first look-ahead: ^(?=.*\d\d*\d)(?=.*[a-z])(?=.*[a-z]).{8,}$ see demo and idea use anchors ^ abd $ start , end of string.

multithreading - Hanging build in Jenkins/Hudson.Java thread -

when start build on jenkins(hudson then) goes , @ end , before end , starts hanging. after checking thread dump found hangs on same thread : id=81 group=main waiting on com.trilead.ssh2.channel.channel@76def13f @ java.lang.object.wait(native method) - waiting on com.trilead.ssh2.channel.channel@76def13f any suggestions on fixing issue? thank in advance!

java - Cassandra Data Modelling -

i'm trying out cassandra (being using elasticsearch lot) , technically new know what's best way make columns searchable. far, it's discourage not use secondary index if have lot's of unique values in columns true case. create table report( id int primary key, col1 varchar, createdat timestamp, col2 varchar, col3 varchar, ... #some more columns, col400 varchar ) clustering order (createdat desc); any thought ? i guess if you're using dse, choice use bundled solr index columns. there's stargate-core plugin cassandra allows have lucene-based indexes stored inside c*.

assembly - SHR and SAR Commands -

i make sure understanding concept 100% , if not clarification. in asm program, if perform shr 00110000b end 00011000b . however, if perform shr on 11111111b end incorrect answer , should use sar instead? because number signed? if perform shr 00110000b end 00011000b if shifted 1 bit right, yes. can specify shift amount, it's not fixed @ 1. however, if perform shr on 11111111b end incorrect answer if did logical shift of 11111111b 1 bit right you'd 01111111b. whether consider incorrect or not depends entirely on you're trying achieve. if wanted preserve sign should've used sar .

c# - Trying to add a controller, unable to retrieve metadata, no primary key define, even though it looks like there is -

all found far said define primary key [key] , must named id or yourclassname id. far can see have correct format i'm still getting error: ![unable retrieve metadata 'dartpro.models.members'. 1 or more validation errors detected during model generation: dartpro.models.playerscores: :entitytype 'playerscores' has no key defined. define key entitytype. players_scores: entitytype: entityset 'players_scores' based on tpye 'playerscores' has no keys defined.] 1 when creating controller this: ![model class: (dartpro.models) data context class: dartconnection(dartpro.models)] 2 here's code: using system; using system.collections.generic; using system.linq; using system.web; using system.data.entity; using system.componentmodel.dataannotations.schema; using system.componentmodel.dataannotations; namespace dartpro.models { public class dartconnection : dbcontext { public dbset<members> member_details { get; set;}

c++ - Shift operator usage in terms of classes -

i have line of c++ code , don't know shift operator does: vrecv >> locator >> hashstop identifiers of following types: vrecv: cdatastream cnetmessage::vrecv , instance of cdatastream class , public attribute of cnetmessage class locator: cblocklocator locator , instance of cblocklocator struct hashstop: uint256 hashstop , instance of uint256 class what important me know, in case? take @ bitcoin documentation . vrecv instance of cdatastream overloads operator>> read , unserialize data. background to understand expression, precedence , associativity of operators important. in c++, >> operator left-associative , means can rewrite expression (vrecv >> locator) >> hashstop; // or in terms of actual function calls... ( vrecv.operator>>(locator) ).operator>>(hashstop); interpretation looking @ code operator>> see method takes argument of type t , returns reference itself. in particular case,

Best way to transfer file from Local path to NFS path -

i looking best optimized way can use transfer large log files local path nfs path. here log files keep on changing dynamically time. what using java utility read file local path , transfer nfs path. seems consuming high time. we cant use copy commands, log file getting appended more new logs. not work. what looking .. there way other using java utility transfer details of log file local path nfs path. thanks in advance !! if network speed higher log growing speed, can cp src dst . if log grows fast , can't push data, want take current snapshot, see 3 options: like now, read whole file memory, now, , copy destination. large log files may result in large memory footprint. requires special utility or tmpfs. make local copy of file, move copy destination. quite obvious. requires have enough free space , increases storage device pressure. if temporary file in tmpfs, same first method, doesn't requires special tools (still needs memory , large enough tmp

counter - Count Edges over specific Period of Time in VHDL -

for speedmeasurement of electric motor count amount of rising , falling edges of encoder-input in time-intervall of 10ms. to have implementet clock divider 40 mhz clock follows: entity speedclk port ( clk : in std_logic; clkspeed : out std_logic); end speedclk; architecture behavioral of speedclk signal counterclk : natural range 0 400001; begin speedcounter : process begin wait until rising_edge(clk); counterclk <= counterclk + 1; if counterclk < 400000 clkspeed <= '0'; else clkspeed <= '1'; counterclk <= 0; end if; end process speedcounter; end behavioral; this should make clkspeed '1' every 10 ms. use block component in toplevel vhdl-module. in next block count edges encoderinput(qepa) shift register debounce input signal. entity speedmeasure port ( qepa : in std_logic; clk : in std_logic; clkspeed : in std_logic; speed

Remove app title and icon overlay on Google Glass app -

i've developed first google glass app (android studio) , hoping might me work through problem. developed app android , made necessary modifications able target glass (a few updates manifest , few new xml files). app installs , runs fine on glass, exception of 1 quirk: app icon , title overlaying top ~20% of glass display, title-bar banner. is there needs added/subtracted typical android development environment disable overlay? sorry don't have screenshot. can try figure out how capture 1 on glass if helps. i got bottom of if. remove app title bar android i failed put android:theme="@android:style/theme.notitlebar" declaration in correct place in manifest. thank you.

php - Insert id page on mysql table field -

how insert number(id) of curent page in mysql data base? i have query: $page = $_request['id']; addslashes($page); $query = "insert files (file_id,subid,fname,fdesc,tcid,floc) values ($newstd,'$page','" . htmlspecialchars($_request['fname'], ent_quotes) . "','" . htmlspecialchars($_request['fdesc'], ent_quotes) . "','" . $_session['tcid'] . "','" . htmlspecialchars($_request['floc'], ent_quotes) . "')"; page id index.php?id=2 i've tried $page = $_get['page']; addslashes($page); gets page value url, example if went index.php?page=lol return lol $page variable. apply addslashes() $page variable security reasons, going using in mysql query. but not working. table configuration: create table if not exists `files` ( `file_id` int(11) not null, `floc` varchar(50

Python Pulp does not add all variables constraints and forgets objective function -

i running in problems using module pulp. want create mixed integer linear programming problem , write lp file. after solve cplex. the problem when add second constraints, objective function becomes false(dummy added) , first constraint added decision variable x. this code: hope can me out! bay_model = pulp.lpproblem('bay problem', pulp.lpminimize) y = pulp.lpvariable.dicts(name = "y",indexs = (flight, flight, gates), lowbound = 0, upbound = 1,cat = pulp.lpinteger) x = pulp.lpvariable.dicts(name = "x",indexs = (flight,gates),lowbound = 0, upbound = 1, cat=pulp.lpinteger) bay_model += pulp.lpsum([x[i][j]*g.distance[j] in flight j in gates]) in flight: bay_model += pulp.lpsum([x[i][j] j in gates]) == 1 print "flight must assigned" + str(i) k in gates: bay_model += [y[i][j][k] * f.time_matrix[i][j] in flight j in flight if f.time_matrix[i][

sql - Merge Cells option is not available for columns -

Image
i have created 1 ssrs report. while trying merge 2 cells on top right corner option seems unavailable. why happened so? there idea make available.here snapshot of table , grouping. highlighted columns need merged. if i'm understanding correctly, you're attempting merge cell that's within column grouping cell that's outside group (i.e. top left one)? won't work - cell inside group can potentially generate multiple columns in rendered table, report builder won't allow merge cell isn't within same group. you perhaps remove/hide top row , instead place text box above table containing expression? you'll need consider size of make sure doesn't out of place though.

Parse and Facebook login and signup returning "User Cancelled Login" (iOS 8.1 + Swift 1.2) -

Image
i've been attempting use parse (version 1.7.4) login , sign users facebook's sdk (version 4.1), every time attempt signup, following code prints "user cancelled fb login", means user being returned nil, there isn't error. don't know if parse issue or facebook issue, if has idea how possibly solve issue, immensely grateful. this code login/signup view controller: let permissions = [ "email","user_birthday", "public_profile", "user_friends"] @iboutlet weak var lblstatus: uilabel! @ibaction func facebooklogindidpress(sender: anyobject) { self.lblstatus.alpha = 0 pffacebookutils.logininbackgroundwithreadpermissions(self.permissions, block: { (user: pfuser?, error: nserror?) -> void in if user == nil { if error == nil { println("user cancelled fb login") self.lblstatus.text = "user cancelled login" self.lblst

windows - Access database - Form -

simply 1 form open on top of (automatically).i've searched net , found nothing helps or works. in more details - when opening database, system automatically loads "form1", looks nice in middle of not screen, others well, hide visible sign's of access. yes can hide tool bars etc, looking create form "background", load automatically , load "form1" on top. for reason can't seem form1 load it's visible. yes loads, under background form. i've tried settings of popup, modal, visible, onload, onopen. i've set database open minimized (but not hide fact access). please can come solution. just clear things up: you want hidden form (background) loads form visible? needs done in windows form application (c#)? is want? you try vba. how form loaded. private sub form1_load() openform(formname, view, filtername, wherecondition, datamode, windowmode, openargs) end sub i don't have access ms-access now, believe sh

c++ - error C2039: 'get_quest_dynstr' : is not a member of '`global namespace' -

i error error 2 error c2039: 'get_quest_dynstr' : not member of '`global namespace'' e:\phase3a\tdisk\workspace\cbs\source\cbs\schedapp\source\treesearchbox.cpp 17 1 schedapp error 3 error c2039: 'checkcommand' : not member of '`global namespace'' e:\phase3a\tdisk\workspace\cbs\source\cbs\schedapp\source\treesearchbox.cpp 21 1 schedapp when try compile c++ application. treesearchbox.hpp #if !defined(tree_search_box) #define tree_search_box #include "standaloneconn.hpp" class tree_search_box : public standalone_conn { public: tree_search_box(); virtual int get_quest_dynstr(int idquest, lptstr opstr, pdynobj dynpobj); virtual int checkcommand(pbasewnd pwnd, int iditem, hwnd hwndctl, int wnotifycode, int indx); virtual lptstr get_classname(){return _text("tree_search_box");} }; #endif treesearchbox.cpp #include "cpptot.hpp" #include "apptot.hpp"

java - Change default "Program to Run" in Eclipse launch configuration -

Image
every , launching junit tests within eclipse using run > junit plug-in test by default eclipse assumes running requires workbench , chooses in "main" section of launch configuration launchconfig > main > program run > run application > org.eclipse.ui.ide.workbench i can understand why default, me (and in our team) never ever case. need run our junit plug-in tests as launchconfig > main > program run > run application > [no application] headless mode how change default behaviour? using eclipse 4.4. it seems custom launchconfiguration -extension viable solution attempt. did create new, custom launchconfiguration -extension 99.999% build on junitlaunchconfiguration . had add custom blablajunitplugintestlauncher extends launching.junitlaunchconfigurationdelegate which overrides launch(ilaunchconfiguration, string, ilaunch, iprogressmonitor) method adjust application parameters according our needs. blabl

Remotely edit excel files -

i have team sitting in different offices, hooked company server. each uses excel file carrying out calculations, has parameter values encoded in 1 of sheets. now, whenever parameter values change, have update excel file , circulate new file everyone. there way remotely? i.e. excel files connect master file in server parameter values, , whenever master file updated, excel files new parameter values automatically? i have basic knowledge of vba , hope there simple solution. otherwise have web-browser launched service cost lot of time , money. your setup unclear. does each team member work excel file on hard drive? , these files duplicates? or have individual files stored on server? who change parameter values? done 1 team member, or can change them? if can change them, happens when 2 team members make different changes? scenario getting version control software or database territory. if 1 person updates parameter values, makes things easier. need way (sharepoint, emai

android activity - Save Level screenshot and upload to Google+ in LIBGDX -

when in finished-level mode, i'm print-screening game screen in png , save file ( savescreenshotnamepath ). want upload level picture google+ using sharegoogleimage . tested share function text , works i'm having problems image sharing part. the print screen seen in google upload dialog appears, i see title text ; apparently image not attached. issue here? here's code: this saves print-screen file: public static string savescreenshotnamepath(string name){ try{ filehandle fh; do{ fh = new filehandle(name + ".png"); }while (fh.exists()); pixmap pixmap = getscreenshot(0, 0, gdx.graphics.getwidth(), gdx.graphics.getheight(), false); pixmapio.writepng(fh, pixmap); pixmap.dispose(); return fh.file().getabsolutepath(); }catch (exception e){ return ""; } } this starts intent: @override public void sharegoogleimage(int no_level, string path) { try {