Posts

Showing posts from September, 2010

c# - Caliburn.micro and devexpress: insert tabs (dockpanel) from viewmodel when user clicks -

cheers all, i'm searching use devexpress tool in visual c# project (vs2013). i'm using caliburn.micro , i've inserted caliburn.micro.devexpress reference. so, environment. the problem: want create container, can open predefined tabs. can navigate in open tabs, close them , open others. i'm in stuck integration of devexpress , caliburn. without caliburn , without mvvm pattern , it's easy. how can using viewmodel ? the result want example "simple mdi" in [the official caliburn.micro documentation1] . instead of button "open tab", i've menu in upper side and, depending on button clicked, want open relative dockpanel/tab. now, in xaml file, container devexpress object, "documentgroup". goal add dynamically documentpanel(s), written above. is clear problem? ideas solution? update: in viewmodel have: namespace **.viewmodels { class mainwindowviewmodel : conductor<iscreen>.collection.oneactive { public void a

php - Excluding <h3> from strip_tags -

i'm trying exclude <h3> tag in strip_tags function. result i'm getting is: <h>blabla</h3> , instead of <h3>blabla</h3> the code: $this->adverttext = strip_tags($this->adverttext, '<p><b><i><em><strong><br><ul><li><ol><dl><dd><dt><div><h3>'); so ... can tell me what's wrong here?

Winamp can't be closed with my plugin written in C++/WinApi -

i have written winamp plugin winapi. when i'm closing winamp, gui (both winamp's , plugin's windows) disappearing... can still see winamp.exe in windows taskmanager. after deleting gen_mood.dll (my plug-in file) winamp's plug-ins directory, ok - can close winamp correctly. here minimal code. can tell me wrong? i'm using visual studio 2013 , winamp 5.666. gen_mood.cpp: #include "stdafx.h" #include <windows.h> #include "gen_mood.h" // these callback functions/events called winamp int init(void); void config(void); void quit(void); void makesetlist(); using namespace std; // structure contains plugin information, version, name... // gpphdr_ver version of winampgeneralpurposeplugin (gpp) structure winampgeneralpurposeplugin plugin = { gpphdr_ver, // version of plugin, defined in "gen_mood.h" plugin_name, // name/title of plugin, defined in "gen_mood.h" init, // function name executed on init event

sql - Crystal reports, trying to use: startswith and looking for 2 values -

i new crystal reporting. need search records , find records start letter "p" , "w" would this? {mnbdd.bd_ord} startswith ["w", "p"] or like, {mnbdd.bd_ord} startswith ["w" or "p"] or like, {mnbdd.bd_ord} startswith ["w" , "p"] what wanting return records p , w in front. but, don't want leave out. you can try in crystal reports: {mnbdd.bd_ord} "p*" , {mnbdd.bd_ord} "w*"

java - Deleting filesystem from AWS- Hadoop -

i'm trying launch amazon aws emr jar map reduce job. therefore exception exception in thread "main" org.apache.hadoop.mapred.filealreadyexistsexception: output directory s3://bi/stuff exists in hadoop enter command like: hadoop fs -rmr /bi the thing haven't found simular command in aws commandline jet. can please tell me how delete the hadoop filesystem in amazon s3 cloud from aws doc : aws s3 rb s3://bucket-name however, why don't implement in jar via aws s3client library?

create whatsapp emoticon in android -

i want create app send whats app emoticon i typing emoticon in whatsapp , copy them clipboard , airdriod clipboard . :         ___________ / \\ / | \\ / 🚔 \\ / | \\ / | 🚔 \\ / 🚔 | \\ / 🚔 | 🚔 \\ / | \\ / 🚘 \\ see me rollin hatin' this design whatsapp emotiicon . want create button when clicked button shared text string havent problem share have problem string eclips error . i convert text html entities decimal string set error no building xml. i write string string.xml q : best way put several emoticon , symbol in android share ?

intellij idea - WildFly 8.1: Server is not connected. Deploy is not available -

i'm running wildfly 8.1 in intellij 14. server starts , accessible @ localhost:8080 . artefact deployed , web site can opened. but as redeploy , get: server not connected. deploy not available nothing written server.log ideas? make sure ip in stanalone.xml set 127.0.0.1 :). this 1 works:).

c# - Resolving a class with a custom parameter in Simple Injector -

i'm creating wpf mvvm application using simple injector di container. i'm having issues when i'm trying resolve view simple injector, because i'm in need of passing parameter constructor @ construction time (not when registering view container, not applicable: simple injector pass values constructor ). what i'm after this: var item = container.getinstance<mytype>(myparameter); i've read several places not possible in simple injector because should not done (including here: https://simpleinjector.codeplex.com/discussions/397080 ). is true, , if so, how instead? background information i have collection of multiple view models , models looked specific key, , parameter want pass view key view model use. i've found necessary because view models , models used in multiple locations of application, , need stay in sync / same instances if have same key. don't think i'm able use lifetime scope solve this, , there no way know keys when

objective c - NSTableView cells are not getting data from the delegate method -

Image
i working on simple tableview , stumped here. table view cells not getting data tableview:objectvaluefortablecolumn:row: method. i supposed this: but getting this: here .h , .m files of tablecontroller class @interface tablecontroller : nsobject <nstableviewdatasource, nstableviewdelegate> @property (nonatomic, strong) nsarray *numbers; @property (nonatomic, strong) nsarray *numbercodes; @end and #import "tablecontroller.h" @implementation tablecontroller #pragma mark - custom initialisers - (nsarray *)numbers { if (!_numbers) { _numbers = @[@"1", @"2", @"3", @"4", @"5", @"6", @"7", @"8", @"9", @"10"]; } return _numbers; } - (nsarray *)numbercodes { if (!_numbercodes) { _numbercodes = @[@"one", @"two", @"three", @"four", @"five", @"six", @"seven&qu

ios - Build CSV from Array of Strings in Swift in a single line of code -

i have array of strings in swift , thought do: array.join(",") return comma separated list of elements the error i'm getting is: array<string> not convertible 'string' how can correctly in little code possible. i can loop build string thought there simpler way this. in swift 2 , array.joinwithseparator(",")

python - correct template location for django generics? -

according django docs , template loader load templates django apps on filesystem. each app in installed_apps, loader looks templates subdirectory. going on: ...then get_template('foo.html') foo.html in these directories, in order: /path/to/myproject/polls/templates/ /path/to/myproject/music/templates/ so... inside " website " project, have " www " app. directory structure /path/to/project/website/www/ i created " templates " directory inside " www ", , put there " page_list.html " ( /path/to/project/website/www/page_list.html ) the app listed inside "installed_apps", when try in urls.py: url('^$', listview.as_view(model=page,)) i " templatedoesnotexist ", , error says django.template.loaders.app_directories.loader looking " /path/to/project/website/templates/www/page_list.html " or /path/to/project/website/www/templates/www/page_list.html if put template i

Excel loses link to ODBC data (Sql) -

we using excel query sql database , have multiple queries in 1 workbook. every , (and on different users) spreadsheet come error , lose of connections although not of them. on 25 sheet/query workbook may lose last 5 sheets links , flatfile them. does know may cause or can stop happening? it not happen time makes more frustrating !

What's the point of the WixMbaPrereqPackageId and WixMbaPrereqLicenseUrl wix variables? -

what's point of wixmbaprereqpackageid , wixmbaprereqlicenseurl wix variables? <wixvariable id="wixmbaprereqpackageid" value="netfx4full" /> <wixvariable id="wixmbaprereqlicenseurl" value="netfxlicense.rtf" /> are required if bootstrapper application of type managedbootstrapperapplicationhost ? i've seen examples them having "netfx" values: is case? does imply custom bootstrapper library need .net framework pre-requisite? in case can't have packagegroup exepackage .net framework installer? if there official documentation these 2 variables, it? yes variables relevant managed bootstrapper applications. i believe can reference other package groups , include packages mba prerequisites i've never tried it. no, managed bootstrappers require .net framework. can implement native bootstrapper application (c++/com). http://wixtoolset.org/documentation/manual/v3/bundle/ba/ remember there

python - pyinstaller causing weird issues -

i trying use pyinstaller create standalone exe of script wrote, have done in past -f flag. time around, having issue. the exe builds fine , can run, when run cmdline arguments besides -h (help), program repeatedly prints "argument -f/--file required" (which is). happens if put -f 'filename', , program supposed exit on error, hangs , repeatedly prints error. has seen similar issue this? .py file runs expected build exe starts exhibiting weird behavior. edit: okay, have done little more research , thinking issue weirder... have argparse stuff separated own function, such: def parseargs(): ''' parse command line arguments ''' parser = argparse.argumentparser(description="desc") parser.add_argument('-f', '--file', required=true, dest='input_file', help='text file containing list of hosts') parser.add_argument('-p', '--processors', required=false, dest='processors', help

How to change javadoc comments language when generate java from wsdl with CXF wsdl2java? -

i generated java sources wsdl file using cxf wsdl2java command : wsdl2java -impl -server -d <path_to_wsdl> <path_to_generated_java_source> but generated comments in french. how possible change comments language (i want comments in english). not find option in cxf wsdl2java documentation . thanks in advance answers. unfortunately there not yet option change language, see jaxb jira issue . if generated output language (e.g. german) causes encoding problems can @ least specify encoding of generated files (since version 2.5.4): wsdl2java ... -encoding utf-8 ....

redirect - Forward requests and headers to different host using tomcat -

i have stand-alone tomcat server (no apache/nginx in front) need configure reroute incoming requests and headers specific application different host. in other words, need url https://host.company.com/app/<anything here after> redirected to https://newhost.company.com/app/<anything here after> such that https://host.company.com/app/v1/explore?id=foo&pw=bar&more=crap is redirected to https://newhost.company.com/app/v1/explore?id=foo&pw=bar&more=crap while not interfering https://host.company.com/app2 or https://host.company.com/app3 . currently, have urlrewrite installed in webapps/app so: webapps/app/web-inf/urlrewrite.xml: <?xml version="1.0" encoding="utf-8"?> <!doctype urlrewrite public "-//tuckey.org//dtd urlrewrite 4.0//en" "https://www.tuckey.org/res/dtds/urlrewrite4.0.dtd"> <urlrewrite> <rule> <name>requests /app/ redirected https:/

How can I change the domain axis values Dynamically in AndroidPlot? -

hi problem is: doing android app there plot plots data in real time reads bluetooh, can add y-values plot dynamically without problem,but i'd change every second values of domain, plot plots new data value every second i'd domain axis updates it's values every second. how can can u please me??? thanks take @ solution provided in this question . should able adapt needs injecting own logic format(...) method.

jquery - Making a responsive navigation bar with a search button -

i trying make responsive navigation bar using bootstrap. want build http://wordpress.org/support/topic/want-to-move-search-option-from-header-to-navigation-bar . . but search button don't go right , when collapsed tabs split , move line below. @ place of download wordpress button want login , signup buttons. on collapsing brand name, search button , bars opening menu should shown in same line. can please tell how it? see code <!-- brand , toggle grouped better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>

javascript - Convert search feature from searchlogic to ransack rails 3 -

i'm trying convert syntax searchlogic , use ransack after upgrade rails 2.3.5 3.2.17 my search_users method in controller: def search_users term = params[:search] show = show.find(params[:show_id]) if params[:show_id] # users in show audiences show_user_ids = show.audiences.map(&:user_ids).flatten # remove users have full access show_user_ids -= show.show_permissions.full.map(&:user_id) @users = user.first_name_or_last_name_or_company_like(term).id_is(show_user_ids) render 'shared/search_users' end the outdated code is: @users = user.first_name_or_last_name_or_company_like(term).id_is(show_user_ids) first_name_or_last_name_or_company_like syntax searchlogic , since don't have on app anymore, undefined. i can use @users = user.where(...) , pass in term = params[:search] ? how pass in user.where first_name or last_name or company term ? tried: @users = user.where(["first_name = :first_name or email = :email&qu

javascript - add meta tag on Iframe parent head element -

i have need add meta tag element on iframe parent head element, had tried window.parent.$('head').append('sometext'); this 1 working on source file , iframe file in same folder, not working on cross domain, causes window.parent.$ not function issue. $('head', window.parent.document).append("test") you'll want use .data() instead of .append() though http://api.jquery.com/data/ the second argument of $() search context, default document .

actionscript 3 - How do I create an object using code in AS3 and give it a picture as display? -

package { import flash.events.*; public class declareimage extends sprite { var ship:sprite = new sprite(); public function declareimage() { } } } i declared object. want give background picture compute should use sprite data type or else? here example. of course, it's simple case (using fixed file name, etc), illustrate how achieve want , provide foundation move on. a tip, begin class name uppercase letter. package { import flash.display.loader; import flash.display.sprite; import flash.events.event; import flash.events.progressevent; import flash.net.urlrequest; public class declareimage extends sprite { private const image_url:string = 'myimage.jpg'; private var ship:sprite; private var loader:loader; public function declareimage() { ship = new sprite(); addchild(ship); loader.

python - Function sequence error in PYODBC -

i using pyodbc connect database , extract data it. here code: con = pyodbc.connect("driver={sql server};server= myserver;database= mydatabase;trusted_connection=true") cursor = con.cursor() sql_command = """ select rowid = isnull ( ( select top 1 rowid [mydatabase].[admin].[mytable] [queue] = ? , processed null ) ,-1 ) """ cursor.execute(sql_command, queuenumber) cursor.commit() con.commit() result_set = cursor.fetchall() and got following error after run above code: pyodbc.error: ('hy010', '[hy010] [microsoft][odbc sql server driver]function sequence error (0) (sqlfetch)') may know caused such problem, , how can fix it? thanks. i believe probl

Python 3.4 Tkinter - Object has no attribute -

i'm making program kind of simulate console. code far (i started today, learning tkinter, although i'm not sure if tkinter best choice): from tkinter import * class app: def __init__(self, master): self.frame = frame(master, bg = 'black') self.bottomframe = frame(master, bg = 'black') self.elabel = label(master, text = '>', bg = 'black', font = 'system', fg = 'white') self.einput = entry(master, bd =0, bg = 'black', font = 'system', fg = 'white', command = self.update_text()) # packing self.frame.pack() self.bottomframe.pack(side = bottom) self.elabel.pack(side = left) self.einput.pack(side = left) def update_text(self): self.einput.insert(0, '>') root = tk() app = app(root) root.mainloop() the error is traceback (most recent call last): file "c:/users/*/pycharmprojects/consoledungeon/g

php - Undefined index when accessing multi-dimensional array -

i having multi-dimensional array. when access undefined index can't see doing wrong. appreciate if has glue devastating quite while now. thanks! dump: array ( [922] => array ( [products] => array ( [169] => http://www.golf-safari.com/golf_regions/cape_town.asp ) [company] => stdclass object ( [id] => 922 [category_id] => 42 [language_id] => 1 [shipping_from_id] => 0 [name] => golf-safari.com [logo] => [company_id] => 922 [area_id] => 414 [country_id] => [city_id] => 260 [product_id] => 169 [url] => http://www.golf-safari.com/golf_regions/cape_town.asp [likes] => 0 [dislikes] => 0 [views] => 0 )

ios - Using Storyboard Segues with Segmented Control -

Image
i have segmented control i'm using switch between 3 view controllers. first tableview embedded in navigation controller segmented control in navigation controller. have 2 custom segues in storyboard (with animations coming left , right). in "main" controller class - middle of segmented control - use code - (ibaction)indexchanged:(id)sender { if ([sender selectedsegmentindex] == 0) { [self performseguewithidentifier:@"leftsegue" sender:self]; } else if ([sender selectedsegmentindex] == 1){ } else { [self performseguewithidentifier:@"rightsegue" sender:self]; } } this works great 2 controllers. when view controllers put on screen, can still move between far left , right controllers, going main controllers crashing under each attempt i've tried. think has me not understanding either self i'm sending performseguewithidentifier message or self i'm passing sender: . example: if in else if ([sen

php - Replaceing mysqli query in while loop with one query using JOIN -

i read mysql(i) queries used in while loops not performance friendly , i'm going rewrite code because think better. here's question if join can work here. it's single post viewing function should see every comment got posted below. got comment loop in loop post printed. <?php $result = (empty($_get['hash'])) ? $_get['hash'] = '' : mysqli_query($conn, "select * `userposts` `hash`='".$_get['hash']."' limit 1"); while($rows = mysqli_fetch_array($result)){ //output of single post $commentresult = mysqli_query($conn, "select * `comments` `postid`='".$rows['id']."'"); while($commentrows = mysqli_fetch_array($commentresult)){ //output of comments } } so think gets better query join should like: $result = (empty($_get['hash'])) ? $_get['hash'] = '' : mysqli_query($conn, "select * `userposts` join comments on userposts.id = c

Include OCaml binary library -

i'm trying use ocamlgraph library , it's not clear me how add project. suggested me compile source of library along source of project, there has way of linking binary of precompiled library without using opam. can done, , if so, how? thanks. compiling: ocamlc -i /path/to/ocamlgraph -c mysource.ml (as suggested ocamlfind ocamlc -package ocamlgraph -c -only-show , if ocamlfind , ocamlgraph installed) linking: ocamlc -i /path/to/ocamlgraph /path/to/ocamlgraph/graph.cma mysource.cmo -o test.byte (as suggested ocamlfind ocamlc -linkpkg -package ocamlgraph -only-show ) but normally, should use ocamlfind , ocamlgraph package of opam or distribution.

c# - How to avoid mapping all children of a TPT inheritance in Code First when needing just one of them in EF 4.4? -

i have table per type inheritance implemented in system. used main framework use in app, shouldn't modify structure, but, time time, new children may implemented. up now, didn't need reference models directly our business services , classes, 1 of them. have "contentitem" table parent, around 15 tables children. need use 1 child (an consequence, parent). as we're using ef code first, i've defined mappings required child. modelbuilder.entity<contentitemc>().totable("contentitemc"); modelbuilder.entity<contentitemc>().haskey(c => c.contentitemid); modelbuilder.entity<contentitemc>().hasrequired(c => c.anothermodel).withmany().hasforeignkey(c => c.anothermodel); the thing is, once this, need map parent table, need use relationships other models references in parent (contentitemtag instance). that: modelbuilder.entity<contentitem>().totable("contentitem"); modelbu

javascript - Click list item, page transits but details page shows only no item details except for () -

currently, main list html works <div class="post row" ng-repeat="(postid, post) in posts"> <a href="{{ post.url }}">{{ post.title }}</a> but when click item (one of many in list) , go page, new page not display item in detail? when add line below, including $stateparams in dependencies, controller js file, {{ post.title }} appears data not pass through. $scope.post = $scope.posts[$stateparams.id] update states code. (ignore missing syntax...im shortening it). helped resolved previous issue , provided below codes viewing part (the last 2 states). .state('tab.view', { url: '/posts/:postid', views: { 'tab-view': { templateurl: 'templates/tab-showpost.html', controller: 'postviewctrl' how details access after clicking on list item. app.controller('postviewctrl', function ($scope, $stateparams, post) { $scope.post =

c# - Acumatica Web Services API Login -

i attempting perform basic integration using acumatica's web services. unfortunatly, i'm having problems logging in. according documentation, process should like: apitest.screen context = new apitest.screen(); context.cookiecontainer = new system.net.cookiecontainer(); context.allowautoredirect = true; context.enabledecompression = true; context.timeout = 1000000; context.url = "http://localhost/webapivirtual/soap/apitest.asmx"; loginresult result = context.login("admin", "e618"); simple enough. however, after creating , importing wsdl file acumatica visual studio, found don't have screen object. do, have screensoapclient object, has similar login() method. screensoapclient context = new acumatica.screensoapclient("screensoap"); loginresult result = context.login("username", "password"); that part works. in fact, loginresult give me session id. however, if try make calls service, such as: cr401000cont

actionscript 3 - AS3: Maintain Checkbox state when returning to a frame with checkboxes -

so asked question yesterday how control state of checkboxes here: getting checkboxes retain state on return frame however has caused problem. whilst values of checkboxes retained, relationship objects represent not.. example, on return home screen checkbox value filled in true button that checkbox represents won't visible until uncheck , recheck box. i've been trying store boolean value of checkbox in variable , re use upon return screen don't' understand enough of syntax work. looking @ code below i'm wondering whether it's because i'm setting default state of button visibility right @ start of code false? need area_1_btn.visible check boolean state? any appreciated i'm getting more , more frustrated @ lack of understanding heh. import flash.events.event; /* ensures checkboxes begin in off state.*/ area_1_btn.visible = false; area_1_chk.visible = true; area_2_btn.visible = false; area_2_chk.visible = true; showall_chk.visible = true; /*

string - Java I/O to a .txt file -

i learning java , far have been able troubleshoot problems of google , trail , error/reading. little lost here: i have list of names. have method takes string argument , deletes name list , returns rest of names. created file holds names. once name deleted want stay deleted week, @ beginning of next week want names listed again. initial thought use arrays wouldn't work since washed out of memory end of program execution. tried writing data file , reading , writing every time. here current problem: person1,person2, person3.... when remove person1, rewrite file person2 , person3 only. if person2 removed rewrite file person3. problem have remove sequentially otherwise strings removed rewritten. want remove 1 string list when ever string selected without affecting rest. (this first time posting here if there missing let me know , try improve question. didn't post code because decided start on , code didn't make sense anyways.) if want start scratch can use

VLC .NET C# Auto play media only after buffering up to the set postion? -

i'm trying use vlc dotnet libraries available here. able load video , show within form. however, having trouble doing following: when set media of vlccontrol, control auto plays media. not want. see other examples online explicit call play method made start media. i need set position of video , buffer position before playing media. possible in way? can set position every time shows first frame until buffers set position. how can play media starting @ position after media finished buffering set position? here code have far: public partial class vlcform : form { public vlcform() { initializecomponent(); loadmedia(@"c:\users\jonathan.trowbridge.wvs\desktop\samplevideo.mkv"); setstartposition((float)new random().nextdouble()); application.run(this); } private void setstartposition(float position) { vlccontrol.position = position; } private void loadmedia(string path) { try

Who needs to program what with Android Intents? -

we working on concept app more powerful if users can share images our app using other apps. our app appear when users press share on many apps possibe. i still don´t know how android intents work. i know this: with android intents, apps-to-share-to appear if users have them installed on device some apps on android have customised (limited) menu after share button. example instagram app offers option share fb, twitter, tumblr , flickr. not clear me: do other apps need authorise/know about/pick our app appear 1 of options in share menu? (assuming implement android intents version of share function) do need develop apps want appear in? write targetted code 100+ apps? .. or can program 1 api saying: our app "listen" app android intents sharing, , appear 1 of options when installed. clarification welcome. bonus answers same questions ios8 extensions.. this done through intent-filters tell device app should listed on when launches intent share o

json - Blogger API Call returning 401 Error Android -

i trying retrieve json list of blogger posts inside of android app, keep getting json result: { "error": { "errors": [ { "domain": "global", "reason": "required", "message": "login required", "locationtype": "header", "location": "authorization" } ], "code": 401, "message": "login required" } } here format of api call. https://www.googleapis.com/blogger/v3/blogs/blog_id/posts?key=api_key with blog_id , api_key being placeholders actual values used in code. here code retrieving json. private class asynccaller extends asynctask<void, void, string> { @override protected string doinbackground(void... params) { // todo auto-generated method stub defaulthttpclient httpclient = new defaulthttpclient( new basichttpparams()); httppost httppost = new httppost(constants.b

Matlab: Extract Data from Structure and Transfer it into Cell Array -

i quite new matlab , can't come solution following problem: from single particle tracking program uses matlab (utrack, precise) tracking results structure. inside strucutre, tracks of every particle stored within structure. in structure, tracks can found matrix (two other matrices there other information) in following way: x coord / y coord / z coord / amplitude / dx / dy / dz / da ... this first time point. starts again x coord, y coord, , on second time point until end. for further evaluation, need x , y coordinates in cell array in following form [t1 x1 y1; t2 x2 y2; t3 x3 y3; ...] with 1 element in cell array each particle. therefore, need somehow extract x , y coordinates, transfer them , add time information in first column correct lenght. i have tried convert data matrix, problem here tracks have of course not same lengths. lot of nan cause problems in following steps... any appreciated! here bit of code fetch data want in structure containi

javascript - Is there a way to persist changes to CKEDITOR using a button outside the editor? -

i have button in page , when click button call: editor.insertelement(link); when inserts html correctly in editor, when changes (ex: click show source-code button) html code inserted lost. there command persist code ckeditor? found answer. had set config allowedcontent allow links.

unity3d - Unity - How can I add or subtract a chosen number of degrees from an angle? -

i wondering if there's way add (in case) 120 degrees everytime push 'buttona', , subtract 120 degrees everytime push 'buttonb', z-axis rotation of 2d sprite (prefab). this code i'm using @ moment, rotates once left, , once right: function touchonscreen () { if (input.touchcount > 0) { var touch = input.touches[0]; if (touch.position.x < screen.width/2) { var rspeed = 10.0f transform.rotation = quaternion.lerp ( transform.rotation,quaternion.euler(0,0,120), time.deltatime*rspeed); debug.log("rotateright"); } else if (touch.position.x > screen.width/2) { var lspeed = 10.0f transform.rotation = quaternion.lerp ( transform.rotation,quaternion.euler(0,0,-120), time.deltatime*lspeed); debug.log("rotateleft"); } } } thanks in advance! note: please use unityscript if can, i'm pretty ne

active directory - How do you send a user's manager user id via claims -

i have set manager of user in ad , want send user id, email address, given name , surname of manager ldap attribute claim (adfs set up). may ask how achieve this? for attributes in ad don't appear in dropdown when setting claims rules, aware dropdown editable. refer: adfs : selecting claim that's not in default drop down . so go through normal procedure selecting attributes appear in dropdown (e.g. email) , typing in ones don't (e.g. manager). for claim type, it's uri can use like: http://company/claims/manager

jquery - Ajax autocomplete with List of object in .Net not working -

i'm trying users name contains string ajax autocomplete without result here code client js $("#<%= username.clientid %>").autocomplete({ // autofocus: true, minlength: 1, delay: 1000, source: function (request, response) { $.ajax({ url: "default.aspx/ajaxgetusers", type: "post", datatype: "json", contenttype: "application/json; charset=utf-8", data: "{ 'nametosearch' : '" + $("#<%=username.clientid %>").val() + "'}", // datafilter: function (data) { return data; }, success: function (data) { response($.map(data, function (item) { return {

jquery find by attr and change parent -

i want change class of parent element found find method of jquery: $("#navi").find("a[href='" + ultiparent + "']").addclass("active"); works, result <a class="active" href="blub"> $("#navi").find("a[href='" + ultiparent + "']").parent().addclass("active"); does not work! i need <li class="active"><a href="blub"> thank you! i think want this onclick of link href , add class parent li js $("ul li a").click(function(e) { event.preventdefault(); var = $(this).attr("href") $("ul li").removeclass("active") $(this).parents("li").addclass("active") alert(a) }); http://jsfiddle.net/victor_007/5umm5aee/

video - FFMPEG Cutting Commercials puts audio out of sync -

ubuntu 14.04.1 real ffmpeg loaded (same problem avconv version). i'm trying take files created in mythtv hdpvr, cut commercials , put video mp4 container use mythroku. the command ffmpeg -i $file -acodec copy -vcodec copy -f mp4 file.mp4 works fine. once update database, can watch file in mythroku or plex. however, when try cut out commercials, audio gets out of sync on 1 second (audio delayed) whenever cut past 0 mark. totem video player , vlc both play resulting video fine, can see "hitch" @ beginning while syncing audio, know information on audio sync in file somewhere. mythroku , plex both out of sync when playing file. mythtv frontend player play correctly, , can hear "hitch" syncs audio. after hours of reading posts , playing settings, i've got down this: if say: ffmpeg -i $file -acodec copy -vcodec copy -f mp4 -ss 0 -t <anything> out.mp4 the file fine, plays both locally , in mythroku/plex but if advance start amount -