Posts

Showing posts from February, 2014

javascript - How to convert AngularJS scope object into simple JS array? -

how convert angularjs scope object simple js array? this function checks if checkbox checked , adds corresponding value object. want transfer object values array , alert after press button. result undefined, why? var formapp = angular.module('formapp', []) .controller('formcontroller', function($scope) { // store our form data in object $scope.formdata = {}; }); var array = object.keys(formdata).map(function(k) { return obj[k] }); function test(){ alert(array); } <-- index.html --> <!doctype html> <html> <head> <!-- css --> <!-- load bootstrap , add spacing --> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> <style> body { padding-top:50px; } form { margin-bottom:50px; } </style> <!-- js --> <!-- lo...

What are the main differences between logstash and apache storm/spark streaming? -

i searching distributed real-time computing system collect data kafka server in order process data , store in elasticsearch. selected of them: apache storm apache spark streaming and logstash (which more descripted etl (extract, transform, load)) i found several tutorials comparing storm , spark streaming. however, did not find tutorial comparing logstash storm , spark streaming. confusing me because familiar logstash want sure select right tool needs. thank in advance logstash data collection engine real-time capabilities. supports analysis, archiving, monitoring, alerting..based on pre-defined metrics. --> logstash kind of specific product, solution apache spark , storm general distributed real-time computation systems. --> apache spark/storm frameworks/libraries general purposes.

ftp - PHP ftp_delete() generates warning "Command okay" -

i can not find answer problems revolve around file not existing or delete process not working. i have ftp device generate file php script. after that, try ftp in, file , after that, delete it. this works fine, can connect, file , save locally , delete it. except 1 thing, ftp_delete() function results in warning. php gives me following, when executing script: a php error encountered severity: warning message: ftp_delete(): command okay i looked error code, means successful. , because file deleted on ftp device. so why generate php error? cheers. the rfc 959 (ftp specification) mandates on successful completion of dele command, server should respond 250 status code. the php ftp implementation strict, yielding warning on other code, if indicates success ( 2xx class). your server uses other 2xx code, generic 200 command okay .

Why creating git branch doesn't copy all files? -

git branch shows me i'm on master . write git checkout -b newbranch . git branch shows me i'm on newly created branch newbranch . write git pull , following error: there no tracking information current branch. please specify branch want merge with. see git-pull(1) details. git pull <remote> <branch> if wish set tracking information branch can with: git branch --set-upstream-to=origin/<branch> newbranch i guess because couldn't pull branch created. write git pull origin master , million files differ between branches master , newbranch (taking full console can't see beginning of error) following ending: please move or remove them before can merge. aborting i don't understand why branch newbranch isn't exact copy of master . read when create new branch starts same commit branch on. wanted make git pull make sure files same on master. if new branch isn't exact copy of branch copied from, don't know files taken...

database - Why ENUM does not store multiple values in MySQL? -

i want use enum feature in table using mysql . i have created table tbl_test having id primary key , enum_col field enum data type. create table tbl_test( id int not null auto_increment, enum_col enum('a','b','c') not null, primary key ( id ) ); when try store single enum value , got inserted when try store multiple enum values throws sql error . error: data truncated column 'enum_col' @ row 1 single enum value (correct): insert tbl_test(id, enum_col) values(1, 'a'); multiple enum values (failed): insert tbl_test(id, enum_col) values(2, 'a,b'); any idea store multiple values in enum data type ? that because can store 1 value in , in fact absolutely should store 1 value in whatever type of column. use seperate table. can store values multiple records. example: tbl_test -------- id | name 1 | test_x 2 | test_y 3 | test_z tbl_test_enums -------------- test_id | enum_value 1 ...

vagrant - Couchbase can not access web console -

i running vagrant machine on windows 10 using centos 6.7 , have installed couchbase. reason can not access couchbase admin browser. when testing telnet 192.168.56.101 8091 this: connected 192.168.56.101. escape character '^]'. active network connections: proto recv-q send-q local address foreign address state tcp 0 0 127.0.0.1:9000 0.0.0.0:* listen tcp 0 0 0.0.0.0:11209 0.0.0.0:* listen tcp 0 0 0.0.0.0:11210 0.0.0.0:* listen tcp 0 0 127.0.0.1:3306 0.0.0.0:* listen tcp 0 0 0.0.0.0:11211 0.0.0.0:* listen tcp 0 0 0.0.0.0:52491 0.0.0.0:* listen tcp 0 0 0.0.0.0:21100 0.0.0.0:* listen tcp 0 0 0.0.0.0:59276 0.0.0.0:* ...

Logger Error when running through python -

i have python script takes in couple of command line arguments , executes function. when run shell runs perfectly $ ./test.py arg1 arg2 arg3 but when call through python function throws error os.system("./test.py arg1 arg2 arg3") this throws error traceback (most recent call last): file "/var/redshift/proj/query/test.py", line 4, in <module> new_main_queryandprocess import main_queryandprocess file "/var/redshift/proj/query/new_main_queryandprocess.py", line 7, in <module> import mdr_lib mdr file "/var/redshift/proj/query/mdr_lib.py", line 26, in <module> logging.config.fileconfig('logging.conf') file "/usr/lib/python3.4/logging/config.py", line 76, in fileconfig formatters = _create_formatters(cp) file "/usr/lib/python3.4/logging/config.py", line 109, in _create_formatters flist = cp["formatters"]["keys"] file "/usr/lib/python3.4/...

python - Django Queryset, accessing all query except those belongs to logged users? -

i know this: queryset = item.objects.filter(user=self.request.user) i want query opposite of that, items of user except logged one. the opposite of filter exclude : queryset = item.objects.exclude(user=self.request.user)

nested - Should I always nest selectors in other selectors when using sass? -

my question nesting in sass or scss. thing readability perspective can nest selectors inside selectors in sass must do? little bit confused because when run scss-lint, i'm getting errors nesting depth. red few articles , know should go deeper nesting more 3 rules 1 inside another. so have 2 questions: is there wrong if write rules in sass (without nesting): .my-class ... instead of writing that: header nav .myclass can explain why necessary nest in sass , advantages of nesting? know overriding rules, if don't need nest deep? appreciate answers or links articles explaining questions in more detail. you should avoid nesting selectors in sass if don't have reason to. see avoid nested selectors more modular css , beware of selector nesting in sass why should more selective nesting. regarding formatting, you're doing functionally equivalent nesting, shouldn't formatting line breaks , indentations mimic nesting when that...

ruby on rails - Get all related records using associations -

i'm unable understand how related records using associations instead of associated ids user_id , comment_id . lets suppose have 3 models user, post, comment, image , associations user has_many :posts has_many :comments post belongs_to :user has_many :comments has_many :images comment belongs_to :user belongs_to :post image belongs_to :post now have user_id of user , finding user as: @user = user.find_by_id(params[:id]) @comments = @user.comments now fetch these comments each of them related record of post. want post hash instead of post_id corresponding every comment. want in single query. if have idea, please suggest me. use includes(:association) : @user = user.find_by_id(params[:id]) @comments = @user.comments.includes(:post) note: make (second) query. alternatively, include in initial query: @user = user.where(id: params[:id]).includes(comments: :post)

How to create a search box with input in javascript or jquery -

how can create search box input in javascript or jquery. unfortunately know how in html?. have tried different things , have tried search everywhere ones see in html combined javascript. wanna able in javascript of jquery. if want create input in js have use createelement method : // create element var input = document.createelement('input'); // append element tot dom document.body.appendchild(input); you can append elements in other elements : don't have use document.body everywhere. can create other elements 'div', 'span' etc... using method. have on that understand dom management in javascript ;)

Sample http url for different HTTP response codes -

i need test script against urls different http response codes. how example/sample existing urls response codes 300 or 303 or 307 etc.? thanks! you can use httpbin purpose. for instance: https://httpbin.org/status/300 return 300 response code https://httpbin.org/status/303 return 303 response code etc...

algorithm - shortest path between all vertex using bfs -

i'm learning graph theory , need help. need algorithm shortest path between vertex in graph using bfs. know how bfs works don't know "remake" algorithm find shortest path between vertex in graph. the simple way repeated bfs each node, yerken said. time complexity o( (v+e)*v ), v , e number of vertices , edges, respectively. o(1) < e < o(v^2), if graph dense, o(v^3) algorithm. if graph sparse , complexity o(v^2), can done faster repeated dijkstra's, because complexity o(v * e * log(v)) = o(v*log(v)). alternatively can try floyd-warshall algorithm o(v^3), gives distances, not paths.

android - How to share folders via intent? -

i have found code sharing image files via bluetooth/cloud storage/wifi. how share whole folder instead? here code- private void shareimage() { intent share = new intent(intent.action_send); // if want share png image only, can do: // settype("image/png"); or jpeg: settype("image/jpeg"); share.settype("image/*"); // make sure put example png image named myimage.png in // directory string imagepath = environment.getexternalstoragedirectory() + "/myimage.png"; file imagefiletoshare = new file(imagepath); uri uri = uri.fromfile(imagefiletoshare); share.putextra(intent.extra_stream, uri); startactivity(intent.createchooser(share, "share image!")); } intent intent = new intent(); intent.setaction(intent.action_send_multiple); intent.putextra(intent.extra_subject, "here files."); intent.settype("*/*"); /* allow file type */ //get files in particula...

Angular 2 Web API calling Get -

Image
i calling api angular 2 sends data in format bellow.i need show picture(large) result how can this. image request response here admin.component.ts class code component import {component} '@angular/core'; import { routeconfig, router_directives, router_providers,routedefinition, router} '@angular/router-deprecated'; import {logincomponent} '../components/login.component'; import {observable} 'rxjs/rx'; import {http, headers} '@angular/http'; @component({ templateurl:'../../app/layouts/admin.html', selector:'admin', directives: [router_directives] }) export class admincomponent { randomquote: string; private _data: observable<any[]>; constructor(public http: http) { this.getrandomquote(); } getrandomquote() { this.http.get('https://randomuser.me/api/') .subscribe( data => this._data = data.json(), err => this.logerror(err), () => console.log('...

javascript - Handlebars - Using Partial View -

i new in express.js , handlebars.js , trying build app on "express": "~4.14.0" , "hbs": "~4.0.0" . i familiar laravel blade template engine. there features like- extending layout add section in layout implement , including partial views but not able find them from- https://github.com/wycats/handlebars.js#differences-between-handlebarsjs-and-mustache or http://handlebarsjs.com/ actually there way them? if yes , can please give me way or documentation on how can that. if not , can suggest view engine better in express.js that? thanks in advance helping.

ggplot2 - R Order of stacked areas with ggplot geom_area -

Image
i needed reinstall r , encounter little problem ggplot. sure there simple solution , appreciate hints! i using stacked area plot quite often, , got desired stacking , legend order defining factor levels , plotting in reverse order. however, not working more after re-installation. here example: dx <- data.frame(x=rep(1:8,3),y=rep(c(2,3,2,4,3,5,3,2),3),z=c(rep("bread",8),rep("butter",8),rep("fish",8))) ggplot() + geom_area(data=dx, aes(x=x, y=y, fill=z, order=-as.numeric(z))) this gives following plot: it looks if "order" did not have impact on plot. the desired plot stack areas shown in legend, i.e. red area on top, blue area @ bottom. where mistake? many in advance! you can either use (the colors reversed): dx$z <- factor(dx$z, levels = rev(levels(dx$z))) ggplot() + geom_area(data=dx, aes(x=x, y=y, fill=z)) or directly use (without reversing factor levels, won't change color): ggplot() + geom_area...

node.js - Request: How to set user agent for every request? -

using request possible set user agent every request? currently have set @ time of making request: request.post(url, { form: form, headers: { 'user-agent': ua }}, function(err, resp, body) { // stuff }) is possible? you can create request method own defaults: var customheaderrequest = request.defaults({ headers: {'user-agent': ua} }) then use it: customheaderrequest.post(url) see https://www.npmjs.com/package/request#requestdefaultsoptions

Weekly scheduler / timer user interface on Highcharts -

Image
we implement interactive weekly scheduler. using highcharts extensively on rest of our project , hoping use highcharts purpose rather create our own custom built interface. attached picture of intended user interface. idea user editing rights able click , drag anywhere in pane turn scheduled block on or off, depending on current state of block. use 5 minute intervals (ie 288 slots per day). is there way in highcharts able support functionality?

caching - Fully associative and Set Associative TLB operations compared to cache -

i going through mmu code arm processor(armv7). have made use of associative , set associative tlb. aware of implementation of cache using method. read tlb nothing cpu cache. failing join pieces purpose of tlb , cache different. know how set , full associativity works in context of tlb. this globally same behaviour: tlb use virtual address , size tag, instead of storing data, store attributes of associative page (physical address, protection, etc). set associative means limited number of pages can share same tag/attributes, while full associative means tag/attribute can stored @ location in tlb cache. far more efficient, can done small caches.

php - Doctrine 2 ObjectMultiCheckbox checked property -

i've got followed : zf2, doctrine 2, many many. question: how can make checkboxes checked in view? seems can done using name convensions. can give me advice please? relations are: portfolio.php /** * @var \doctrine\common\collections\collection * @orm\manytomany(targetentity="worker", inversedby="portfolio") * @orm\jointable(name="portfolio_workers", * joincolumns={@orm\joincolumn(name="portfolio_id",referencedcolumnname="id")}, * inversejoincolumns={@orm\joincolumn(name="worker_id",referencedcolumnname="id")} * ) */ private $workers; and worker.php /** * @orm\manytomany(targetentity="portfolio", mappedby="workers") */ private $portfolio; and element add code is: $this->add(array( 'name' => 'workerid', 'type' => 'doctrinemodule\form\element\objectmulticheckbox', 'options' => array( ...

dynamic - adding multiple jlabels at a specific position each time a jbutton is pressed -

private void btnactionperformed(java.awt.event.actionevent evt) { btn.addactionlistener(new actionlistener() { @override public void actionperformed(actionevent e) { jlabel label=new jlabel("test label"); label.setbounds(0,0,135,14); panel.add(label); panel.repaint(); } }); } i want add each label @ specific position in panel adding records table(suppose table has 4 columns). how achieve that. i not sure if looking (tell me if it's not), here : package test; import java.awt.borderlayout; import java.awt.color; import java.awt.graphics; import java.awt.gridlayout; import java.awt.event.actionevent; import java.awt.event.actionlistener; import javax.swing.*; public class testpanel extends jpanel{ jbutton button; jpanel innerpanel; testpanel() { setlayout (new borderlayout()); button = new jbutton("create ...

Auto-position CSS Tooltip according to element? -

i have built css tool tip: demo css: .help { position: relative } .help .help-text { display: none; background-color: #fdfcef; border: 1px solid #e8e5c1; border-radius: 4px; color: #333; font-size: 12px; font-weight: 400; padding: 5px; white-space: normal; position: absolute; z-index: 1000; box-shadow: 0 1px 3px 3px rgba(0, 0, 0, .05); transition: .3s ease; -webkit-transition: .3s ease; -moz-transition: .3s ease; -ms-transition: .3s ease; -o-transition: .3s ease; margin-left: 60px; margin-top: 12px; line-height: 1.2 } .help .help-text:after, .help .help-text:before { bottom: 100%; left: 50%; left: 13%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none } .help .help-text:after { border-color: transparent transparent #fdfcef; border-width: 8px; margin-left: -8px } .help .help-text:b...

minecraft - Bukkit EntityExplode physics and regeneration of blocks -

i having issue code when tnt or creeper explodes, blocks fly everywhere when blocks have landed should regenerate dosen't. has conclusion? here code: @eventhandler void onexplode1(entityexplodeevent event) { for(block block : event.blocklist()) { if(block.gettype() != material.tnt) { float x = -0.4f + (float) (math.random() * 0.9d); float y = -1.2f + (float) (math.random() * 1.9d); float z = -0.9f + (float) (math.random() * 1.4d); fallingblock falling = block.getworld().spawnfallingblock(block.getlocation(), block.gettype(), block.getdata()); falling.setvelocity(new vector(x, y, z)); falling.setdropitem(true); block.settype(material.air); } if(block.gettype() != material.air) { final blockstate state = block.getstate(); int delay; if(block.gettype().hasgravity()) { delay = 80; }...

svg - How to calculate the y coordinate of a rectangle without transforms in Inkscape? -

Image
imagine have inkscape file following rectangle: i want calculate y coordinate reported inkscape ( 596.654 ). how can (manually) ? i tried this: the top of page seems have y coordinate of 744. i subtract number y coordinate of rectangle in xml editor ( 417 ) , height ( 37 ) , 744 - 417 - 37 = 290 . note rectangle doesn't have transforms , doesn't belong group. here's simplified version of svg relevant information included: <svg width="297mm" height="210mm" viewbox="0 0 1052.3622 744.09448"> <g transform="translate(0,-308.26772)"> <rect x="216.1537" y="417.34927" width="385.25827" height="37.859257" style="stroke-width:1;" /> </g> </svg> despite thought, there is transform in there (in group). svg internal coordinates have origin in top left. whereas inkscape displays converted value re...

c - Assembly 2-dimentional array why addresses do not differ by the same number -

i created simple two-dimentional array in c , passed pointer assembly function. wanted process elements array assembly function. problem not understand (perhaps mistake) why addresses of elements in same row not differ same number. want process elements in assembly since addresses differ either $4 or $6, not know how it. adres 1156660110 adres 1156660114 adres 1156660120 adres 1156660124 adres 1156660130 adres 1156660134 adres 1156660140 adres 1156660144 adres 1156660150 adres 1156660154 adres 1156660160 adres 1156660164 adres 1156660170 adres 1156660174 adres 1156660200 adres 1156660210 adres 1156660214 adres 1156660220 adres 1156660224 adres 1156660230 adres 1156660234 adres 1156660240 adres 1156660244 adres 1156660250 adres 1156660254 adres 1156660260 adres 1156660264 adres 1156660270 adres 1156660274 adres 1156660300 adres 1156660310 adres 1156660314 adres 1156660320 adres 1...

Why a result of a division is automatically int in C#? -

Image
i have line: console.writeline((double)(1 / 4))); which outputs: 0 . i debugged it, , compiler treating 1 / 4 0: so understand it, compiler treats 1 / 4 int . why? note: when write line: console.writeline((double)1 / 4)); it outputs: 0.25 . because 1 , 4 both int s. there no reason compiler make type-conversions. run sample , see outputs: int x = 1, y = 4; console.writeline(x / y); double xx = 1; console.writeline(xx / y); double yy = 4; console.writeline(x / yy);

Facebook messenger bot using PHP - Postback example? -

i developing fb messenger bot using php, have query regarding button click event, how trigger & call new card/text. can please explain example button postback using php? is mean? https://github.com/pimax/fb-messenger-php-example/blob/master/index.php $data = json_decode(file_get_contents("php://input"), true, 512, json_bigint_as_string); if (!empty($data['entry'][0]['messaging'])) { foreach ($data['entry'][0]['messaging'] $message) { $command = ""; // when bot receive message user if (!empty($message['message'])) { $command = $message['message']['text']; } // when bot receive button click user else if (!empty($message['postback'])) { $command = $message['postback']['payload']; } } } // handle command switch ($command) { // when bot receive "tex...

amazon ec2 - Google location auto complete is not working on aws server -

Image
i using google location autocomplete @ aws server not working , same code using on server working fine can check here aws==> http://52.91.226.167/testgeo.php other server==> http://142.4.10.93/~vooap/alcohol/test.php geocomplete needs server side setting ? you should use valid api key mentionned in message received when autocomplete message sent: you can see message under network panel in developer console. each time hit key in input, ajax request sent , receive message.

extjs3 - Extjs move toolbar components to next line when they are moving out of screens -

2 . using toolbar contains 6 components, displaying horizontally on toolbar. when using application in smaller screens(mobile), right-sided 2 3 components of toolbar moving out of screen or browser. how can make these components should moved next line of same toolbar, when accessing application in smaller screens. what want not possible toolbar. toolbar's box layout has items aligned in 1 direction (top , bottom toolbars horizontally, left , right toolbars vertically), , not supported apply different layout toolbar. you can, however, equip toolbar arrows allow scroll, or menu takes items don't fit on screen. required configuration overflowhandler:'scroller' or overflowhandler:'menu' , respectively.

Implementing intersection operator for a set-like class in Python -

i'm trying implement wrapper class should ideally allow me intersection of elements using notation: a & b is there specific method can implement achieve this? (i know individual elements need implement __hash__ , __eq__ methods) i'm getting following error: typeerror: unsupported operand type(s) &: 'proparray' , 'proparray' try override: def __and__(self, *args, **kwargs): # real signature unknown """ return self&value. """ pass in class

if statement - Nested If-Else in batch command -

i trying check if 2 services present or not. if either 1 not present should print "no" else print "yes". tried is: @echo off set service1=present_service set service2=not_present sc query %service1% | find "does not exist" >nul if %errorlevel% equ 1 ( sc query %service2% | find "does not exist" >nul if %errorlevel% equ 1 ( echo yes ) else ( echo no ) ) else ( echo no ) if check single one, works fine. here %errorlevel% not changing value in second case. if service2 not present, prints yes . can on this. try this; @echo off setlocal enabledelayedexpansion set service1=present_service set service2=not_present sc query %service1% | find "does not exist" >nul if %errorlevel% equ 1 ( sc query !service2! | find "does not exist" >nul if !errorlevel! equ 1 ( echo yes ) else ( echo no ) ) else ( echo no ) this problem delayed expansion ...

Set matplotlib default figure window title -

i know how change title of figure: fig = pylab.gcf() fig.canvas.set_window_title('test') but how change default window title? not need change window title each time. did not find key in mpl.rcparams thanks

how can i show pop up with the help of shell scripting? -

in order track progress of particular process. want show progress bar percentage of completion of process. please advise, possible use pop-up show progress bar windows or pop-up specific message. please advise. thanks i know 2 simple tools purpose: the tool zenity allows create gui progress bar shell script, e.g. zenity --progress --auto-close . zenity preinstalled on many linux systems. tool starts, , shows gui progress bar, while on stdin expects percentage of completion. e.g.: seq 0 20 100 | while read x; sleep 1; echo $x; done | zenity --progress --auto-close the pv tool ("pipe viewer") can used replacement cat perk shows progress bar in text mode indicating amount/speed of data passing through pv . 1 has install it, not preinstalled. example, add progress bar decompression of large archive: pv large.tar.bz2 | tar -xjf -

powershell - Filtering files by partial name match -

i have network share 20.000 xml files in format username-computername.xml there duplicate entries in form of (when user received new comptuer) user1-computer1.xml user1-computer2.xml or blrppr-skb52084.xml blrsia-skb50871.xml s028ds-skb51334.xml s028ds-skb52424.xml s02fl6-skb51644.xml s02fl6-skb52197.xml s02vud-skb52083.xml since im going manipulate xmls later can't dismiss properties of array @ least need full path. aim is, if duplicate found, 1 newer timestamp being used. here snipet of code need logic $xmlfiles = get-childitem "network share" here i'm doing foreach loop: foreach ($xmlfile in $xmlfiles) { [xml]$xmlcontent = get-content -path $xmlfile.fullname -encoding utf8 select-xml -xml $xmlcontent -xpath " " # create [pscustomobject] etc... } essentially need is if ($xmlfiles.name.split("-")[0]) - duplicate) { # select 1 higher $xmlfiles.lastwritetime , store either # full object or $xmlfiles.f...

C++ Game Programming. Error: expected ')' before ':' token -

i'm going through tutorial on lazyfoo : 'beginning game programming'. i've completed tutorial number 4. my problem follows: the code works fine apart line: sdl_surface* loadsurface( std::string path ); the error reads: error: expected ')' before ':' token i've come conclusion error might have headers. it's possible should add sdl.h header. i added stdbool.h header fix separate problem. wonder if has caused issues. here's full code, tutorial code (edit: i've put problematic line in bold ) (or @ least stars have gone around it. doesn't appear bolding within code. it's near beginning, line 33): //using sdl , standard io #include <sdl.h> #include <stdio.h> #include <stdbool.h> #include <string.h> #include <stdlib.h> //screen dimension constants const int screen_width = 640; const int screen_height = 480; //key press surfaces constants enum keypresssurfaces { key_press_sur...

google apps script - Unable to create an event for calendar -

i trying create events dynamically based on data. able achieve using calendarapp. now, want add room event when event created. that, trying create event calendar of particular meeting room. calendar of meeting room using calendarapp.getcalendarbyid(calendarid); however, unable create event it. above line able retrieve calendar(its not null). however, when try add event via calendar.createevent gives me error saying 'action not allowed'. have subscribed above calendar. have tried using calendar.calendars.get(calendarid); retrieve calendar , calendar.events.insert(event, calendarid); add event it. however, result same. missing? not have admin rights room's calendar. reason? if yes how solve it? achieved subscribing calendar resource want book via calendar settings mail id going using , adding resource's mail id guest in invite. thank zig help!

unity3d - MissingReferenceException: Error after destroying a moving game object -

in game objects move every few seconds , others don't. have created method below handle movement of moving objects. private ienumerator moveobject(gameobject movingobject, float posx, float duration) { if(movingobject != null) { float elapsedtime = 0; vector3 startpos = movingobject.transform.position; vector3 endpos = new vector3(posx, objectpositiony, camera.nearclipplane);//hole.transform.position; while(movingobject != null && elapsedtime < duration) { movingobject.transform.position = vector3.lerp(startpos, endpos, elapsedtime / duration); elapsedtime += time.deltatime; yield return null; } } } also destroy moving objects using code below: for (int = 0; < holeobjects.count; i++) { debug.log ("countingholeobjectindex"+ ); if (col.gameobject.equals (holeobjects [i].getholeobject ())) { debug.log ("condition satisfied!" ); foreach( holeobjectsetup holeitem in holeobjec...

json - Jquery AutoComplete Shows all list Instead of search result -

i have jquery autocomplete source of json : $(function () { $('body').delegate('input.city', 'focusin', function () { $(this).autocomplete({ source: function (request, response) { response($.map(json.parse(cityjs), function (item) { return { label: item.cityname, value: item.cityid }; }))}, minlength: 3 }); }); }); }); now when search in box shows label results in list instead of auto complete. when use method : var availabletags = ["...some content,some content..."]; $('body').delegate('input.city', 'focusin', function () { $(this).autocomplete({ source: availabletags }); }); it works. problem need id of selected value box. cityjs json array comes in model pair of cityid , cityname. cityjs sample : [{"cityid":7,"cityname":"aa...

How would I create the database for this scenario in Prolog? -

Image
the first image image of symantic net diagram , image of scenario college assignment wondering if able me trying work out how fix database in prolog program scenario , having trouble please in advance! this diagram of scenario this have tried far in terms of database it of course depends on how structure database, relational databases store (no joke) relations , small example, 1 define 5 predicates: isa/2 ; owns/2 ; ako/2 ; made_of/2 ; and colour/2 . your database like: isa('pat',person). isa(herduvet,duvet). ako(cover,duvet). ako(duvet,bedding). owns('pat',herduvet). made_of(ducksfeathers,herduvet). colour(ducksfeathers,white).

c++ - Java JNI UnsatisfiedLinkError C char pointer to pointer -

hi working on project c++ framework shall integrated java program, started exploring jni. struggling type conversions , argument types should declared in java native method since new c++. in cpp-file have following method: using namespace std; int main(int argc,char**argv) { //do stuff } my corresponding java class looks this: public class jnitest { static { system.loadlibrary("plain2snt"); } public jnitest() { char[][] arguments = new char[][] {"resourcefile1.txt".tochararray(), "resourcefile2.txt".tochararray()}; main(2, arguments); } public native int main(int argc, char[][] argv); } and header file java class following: #include <jni.h> /* header class testpackage_jnitest */ #ifndef _included_testpackage_jnitest #define _included_testpackage_jnitest #ifdef __cplusplus extern "c" { #endif /* * class: testpackage_jnitest * method: main * signature: (i[[c)i */ jniexport jint jnicall java_tes...

database design - Excel: Dynamic counter for qualitative data -

Image
i have created workbook used schedule team different job functions on weekly basis. row headers each person's name, , column headers time intervals (however columns half hour , full hour. ex: 8:30 | 9:30 | 10:00 | 11:00). each cell features dropdown of 15 job functions. i wish create counter each job function related each team member counts how many hours person scheduled function. i know how use countif function purpose. 1 cell example, be: =0.5*countif([@[8:30am]],"coffee")+0.5*countif([@[9:00am]],"coffee")+0.5*countif([@[9:30am]],"coffee")+countif([@[10:00am]],"coffee")+countif([@[11:00am]],"coffee")+countif([@[12:00pm]],"coffee")+countif([@[1:00pm]],"coffee")+countif([@[2:00pm]],"coffee")+countif([@[3:00pm]],"coffee")+0.5*countif([@[4:00pm]],"coffee") and formula have longer, because want cell count how many times "coffee" comes person in entire week. table...

powershell - Search and Replace in files from windows command prompt -

i've 2 files properties.txt key1=value1 key2=value2 and template.txt uses file $key1 xcvsdf sfd $key1 sdf $key2 lorem $key2 ipsum i want replace properties properties.txt template.txt , write file. don't want run on python\java runtime since should run on machine without prerequirements how can using powershell? batch files? assuming needs able run on powershell 2.0, do: # read template file $template = get-content .\template.txt # copy template result variable $result = $template # loop through list of properties get-content c:\dev\properties.txt |foreach-object{ # split each line key-value pairs $key,$value = $_ -split '=',2 # replace placeholder appropriate value $result = $result -replace ('\${0}' -f $key),$value } # output final result $result |out-file .\result.txt

Wildfly 10 session replication fails in domain mode -

i followed instructions given @ https://docs.jboss.org/author/display/wfly10/clustering+and+domain+setup+walkthrough used mod_cluster 1.2.6 , wildfly 10. slave node registers master domain controller. load balancing working seen session replication not working. i realized artemismq configuration should set in domain.xml not mentioned in documentation. is there else configured. if there tutorial or sample configuration grateful.

jquery - My Bower files aren't being accessed through my browser -

i went through cmd , installed bootstrap, jquery , font-awesome , saved in bower_components file on computer. issue think when first saved these files, wer in different folder because of files webpage building not consolidated. deleted bower_components file , redownloaded 1 folder of other relevant files , folders saved underneath 1 all-encompassing folder. however, when open index.html file in chrome, error " failed load resource: net::err_file_not_found " though when go visual studio code , press ctrl , click, takes me directly file stored. <link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="bower_components/bootstrap/dist/css/bootstrap-theme.min.css" rel="stylesheet"> <link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet"> the example code looked @ has exact same link text, must issue on end how saved files on comp...

html - Force smaller screen to scale to a larger resolution? -

my site requires @ least 720px width. iphone 6 appears resolution of 1334x750 browser reports 667px. samsung s5 supposedly 1080x1920 browser reports 640. i know screen can handle details i'm not sure how larger resolution. need 720px minimum width do have phones <720px scale correctly? scale mean show 720px without scrolling you need start in head code <meta name="viewport" content="width=device-width,initial-scale=1"> then add media queries css sheet support current devices http://codepen.io/mlegg10/pen/jkdoaj

java - How to detect connection errors in Kafka -

i'm using kafkaproducer java. example of code: package com.mypackage.kafka.producer; import org.apache.kafka.clients.producer.kafkaproducer; import org.apache.kafka.clients.producer.producerrecord; import java.util.properties; public class producertotest { public static void main(string[] args) { properties props = new properties(); props.put("bootstrap.servers", "localhost:9092"); props.put("retries", 0); props.put("batch.size", 16384); props.put("linger.ms", 1); props.put("buffer.memory", 33554432); props.put("key.serializer", "org.apache.kafka.common.serialization.stringserializer"); props.put("value.serializer", "org.apache.kafka.common.serialization.stringserializer"); kafkaproducer<string, string> producer = new kafkaproducer<string, string>(props); (int = 0; < 100; ...