Posts

Showing posts from April, 2014

c# - Translate camera to rotate left ('Q') and right ('E') -

i'm trying translate camera when press q , e want example when press 'q' camera translate left , let me give movement camera rotation, that tried this: public class cameramove : monobehaviour { public gameobject player; //public variable store reference player game object private float movespeed; private vector3 offset; //private variable store offset distance between player , camera // use initialization void start () { //calculate , store offset value getting distance between player's position , camera's position. offset = transform.position - player.transform.position; } void update(){ if (input.getkey (keycode.q)) transform.position += vector3.up * movespeed * time.deltatime; else if (input.getkey (keycode.e)) transform.position += -vector3.up * movespeed * time.deltatime; } // lateupdate called after update each frame void lateupdate () { // set position of camera's transform same player

c# - UWP Crash on ContinuousRecognitionSession_Completed without error -

i using microsoft's speech recognition library in uwp app. speech recognition works fine on desktop. however, when runs on windows phone application crashes when enters continuousrecognitionsession_completed. private void continuousrecognitionsession_completed(speechcontinuousrecognitionsession sender, speechcontinuousrecognitioncompletedeventargs args) { //code stuff } then application on phone crashes without error. visual studio continue run time before giving exit code. when exit code receive either 'access violation', believe code '0xc0000005', or breakpoint exception. i @ wits end , if has tip on how fix appreciated!

php - How to Set A Custom Load order For My User display Table based on Ranks -

so building new cms community , have run minor issue. want able list ranks highest in chain of command lowest, cannot work out how using string based ranks. <?php include "dbh.php"; include "header.php"; $sql = "select * users_leo"; $result = $conn->query($sql); $row = $result->fetch_assoc(); $rank = $row["rank"]; $department = $row["department"]; ?> <div class="login-page"> </div> <div class='form'> <?php $sql = "select * users_leo"; $result = $conn->query($sql); if ($result->num_rows > 0) { echo "<table> <tr> <th>in-game name</th> <th>rank</th> <th>department</th> <th>profile</th> </tr>"; while($row = $result->fetch_assoc()) { echo "<tr>";

mysql - Merge two queries to get the combined value in SQL -

i have merge 2 sql queries values in 1 place. want show year date , week date show amounts , units in 1 table same cat sql query select `empsid`, `cat`, `chk_date`, sum(amount) currentamount, sum(units) currentunits `pays` `empsid` = 'semlad01' , `cat` in ('salary pay', 'truck allowance', 'expense reimbursement', 'bonus (accrued)', 'phone reimbursement') , date(`chk_date`) = '2016-11-12' group `cat` second query: select `empsid`, `cat`, `chk_date`, sum(amount) ytdamount, sum(units) ytdunits `pays` `empsid` = 'semlad01' , `cat` in ('salary pay', 'truck allowance', 'expense reimbursement', 'bonus (accrued)', 'phone reimbursement') , date(`chk_date`) <= '2016-11-12' group `cat` table structure empsid cat ytdamount ytdunits currentamount currentuni

node.js - Accesing Ghost AWS Ubuntu Server in production -

Image
i'm trying access ghost blog on aws ubuntu server via http://x.x.x.x:2368 , site can't reached. here steps made: - git cloned myblog - cd myblog , npm install --production - npm start or npm start --production console says site running ok config file var path = require('path'), config; config = { production: { url: 'http://127.0.0.1:2368', mail: {}, database: { client: 'sqlite3', connection: { filename: path.join(__dirname, '/content/data/ghost.db') }, debug: false }, server: { host: '127.0.0.1', port: '2368' } }, development: { url: 'http://127.0.0.1:2368', database: { client: 'sqlite3', connection: { filename: path.join(__dirname, '/content/data/ghost-dev.db') },

java - Hibernate HQL issue after migration from Jboss4.2 to Jboss7.2 -

recently have migrated jboss4.2 jboss 7.2. exact same hql query running fine jboss4.2. in jboss7.2 hql query not running in jboss7.2, it's giving error have mentioned below: no persistent classes found query class: select distinct pf.projectformid com.gsk.rd.craw.model.projectform pf left join pf.contacts c pf.createdby=:mudid or pf.modifiedby=:mudid or c.mudid=:mudid java.lang.illegalargumentexception: org.hibernate.queryparameterexception: not locate named parameter 18:33:04,338 trace [org.hibernate.engine.query.spi.queryplancache] (http-/127.0.0.1:8080-1) unable locate hql query plan in cache; generating (select distinct pf.projectformid com.gsk.rd.craw.model.projectform pf left join pf.contacts c pf.createdby=:mudid or pf.modifiedby=:mudid or c.mudid=:mudid ) 18:33:04,338 trace [org.jboss.modules] (http-/127.0.0.1:8080-1) finding class com.gsk.rd.craw.model.projectform module "deployment.craw.ear:main" service module loader 18:33:04,338 trace [org.jboss

c++ - How do I pass a truly immutable 2D array to a function? -

i have function: void foo(const double *const *matrix, unsigned num_rows, unsigned num_columns){ //matrix[0][0] = 5; // error: expression must modifiable lvalue (unsigned = 0; < num_rows; i++) delete matrix[i]; delete matrix; } ...wherein function cannot change values @ given index in matrix, yet still able delete matrix or of rows . there way pass in 2d matrix , guarantee not altered in way? edit: doesn't there's way this, i'll switch using vectors. no. delete can called on pointer if it's passed const & or declared const because pointer not going changed. there no way prevent doing unsigned char *p = (unsigned char *)your_precious_data_pointer; *p = 42; get on it. const correctness designed detect accidental mistakes, not preventing intentional actions programmers. it's not security. it can debated if it's tool preventing accidental mistakes.

c# - Store Data In a Generic List and use Linq -

model.cs contains data of user stored in list type have fetch students age more 25 . public class model { public int age { get; set; } public string name { get; set; } public string sports { get; set; } list<model> objmodels = new list<model>() { new model { name = "manish", age = 27, sports = "cricket" }, new model { name = "rajan", age = 25, sports = "football" }, new model { name = "prashant", age = 25, sports = "kabaddi" }, new model { name = "garima", age = 24, sports = "ludo" }, new model { name = "neha", age = 25, sports = "carom" } }; } modelcontroller.cs public class modelcontroller : controller { // get: model public actionresult index() { list<model> objmodel = new list<model>(); var query = models

css - materializecss style radio button as button -

i try style video controls. i want 2 radio buttons fast forward / rewind. <input name="group1" type="radio" id="ff" /> <label for="ff"><i class="material-icons">fast_forward</i></label> <input name="group1" type="radio" id="fr" /> <label for="fr"><i class="material-icons">fast_rewind</i></label> how can style them appear buttons pressed state selected radio button?

powershell - $lastExitCode not working for 7-Zip update -

what i'm trying databases , part of process zip them they're not in 1 file, smaller file have following code. # 0 = sunday, 1 = monday, 2 = tuesday, 3 = wednesday, etc $blocation = 'c:\sqlbackups' $7zlocation = 'c:\program files\7-zip\7z.exe' $date = get-date $daynum = [int]$date.dayofweek $month = get-date -format mm $day = (get-date).adddays(0).tostring('dd') $sqlfile = "*_backup_" + $date.year + "_" + $month + "_" + $day + "_*.bak" cd $blocation & $7zlocation d aboch2_sql_backup.zip *.bak & $7zlocation u aboch2_sql_backup.zip *.bak if($lastexitcode -eq 0) { del /q *.bak } after emptying out .zip file previous runs, update .zip file newly dumped databases , delete databases after .zip updated. issue i'm facing after running .zip file updated new databases. however, $lastexitcode not working databases added .zip never deleted , end backlog of old databases accumulating. am missing somet

vb.net - Entity Framework: How to make DataGridView Sortable? -

how make datagridview sort-able when using entity framework pull data database? i'm putting query datasource of datagridview. dim query = (from t in db.interview_task t.control = control , t.clientcode = clientcode order t.startdate descending select t.id, t.control, t.clientcode, t.tasktype, t.title, t.startdate, t.dueusername, status = if(t.completedate nothing, "in progress", "completed")).tolist dgvtasklist.datasource = query the way load data dgv turning .list makes grid unsortable. the examples i'm seeing on google outdated or complicated. feels should simple. dumping query datatable time isn't on column. so how put ef query on dgv , make sort-able? update: so able work using karen's answer, did following; public sub load_tasklist() using db new wotcdb dim query2 = t in db.interview_task t.control = control , t.clientcode = clientcode order t.startdate descending select new taskl

Jenkins seed job that executes only DSL scripts modified since the last run? -

Image
i have several source code repositories containing various bits of code built jenkins, one-to-one mapping between jenkins jobs , source repositories. separate these, have single repository containing job dsl scripts creating/updating jenkins jobs build other repos. situation looks this: i had hoped find way store job dsl scripts inside individual source repositories, right alongside code, , have single seed job triggered push notifications any of other repositories. unfortunately, appears not supported (see accepted answer this question ). given that, seems simplest leave dsls in single, separate repository, , let push notifications repository trigger reprocessing of groovy scripts. , works fine, more-or-less. that said, i'm concerned seed job—when triggered—re-runs all of dsl scripts, rather have changed. (i'm not sure whether 'problem', per se, worry lead surprising behavior later on.) is there way can restructure seed job re-runs scripts modified commi

What happens when Amazon Polly throttling limits are reached? -

the amazon polly tts service has throttle policy after threshold of between 10 , 40 requests per second, defined here: http://docs.aws.amazon.com/polly/latest/dg/limits.html the developer documentation doesn't specify happens when threshold passed. polly service block on requests maintain threshold, or throw error?

php - Why I can't access the array element using it's key? -

i have bellow php while , for loop. in while loop it's storing $ch_for data in $ch_for array. using print_r array showing these value : array ( [ch7] => 7 [ch8] => 8 ) and trying access array data in for loop using line : echo $ch_for["ch{$x}"]; but it's showing error message : illegal string offset 'ch7' in ... while , loop $ch_for = array(); $ch_name = array(); while ( $fetchchannel = mysqli_fetch_array($getchannel) ) { $ch_id = (int) $fetchchannel['ch_id']; $ch_for[$fetchchannel['ch_name']] = htmlspecialchars($fetchchannel['ch_for']); $ch_name[] = htmlspecialchars($fetchchannel['ch_name']); } ($x=1; $x<=12; $x++) { if( in_array('ch'.$x, $ch_name)) { $sel = 'checked = "checked" '; echo $ch_for["ch{$x}"]; } else { $sel = ''; $ch_for = ''; } ?> <div

google maps - Adding new addresses for Muncipality -

we 1 of municipality in canada , want add our rural addresses google maps. user can type rural address , find out location on google maps. knows process add these addresses google geo-coding, appreciate help. thanks, pm google map maker tool allows public users add, modify , remove data geo repositories @ google. user edits made in map maker subject community , internal google moderation before flowing production systems. you can read map maker tool here . google has base map partner program . using program , registering partner local authority can submit data in 1 of supported formats via basemap upload tool. you can read supported formats @ https://support.google.com/mapcontentpartners/topic/24789?hl=en https://support.google.com/mapcontentpartners/answer/144284?hl=en&ref_topic=22146 there center explains aspects of basemap partner program: https://support.google.com/mapcontentpartners#topic=21600

Java - Change one element in the grid presentation -

the code have prints out grid made array: //some code generates array gamecards[] = {'a','a','a','a','b','b','b','b'} //n size/length of array public string boardtostring(){ int gridcount = 1; int cardcount = 0; char[][] showboard = new char[n/4][4]; while (cardcount < n){ for(int row = 0; row < (n/4); row++){ for(int column = 0; column < 4; column++){ showboard[row][column] = gamecards[cardcount]; // how can use gamecards if it's generated in method within same class? system.out.print("x (" + gridcount + ") "); gridcount++; cardcount++; } if ((n/4) > 1) system.out.println(); } } } it print out this: // if n = 8 x(1) x(2) x(3) x(4) x(5) x(6) x(7) x(8) the presentation of grid corresponds order of elements in original array. if want achieve

python - How can I handle the output in multiple processes without passing parameters? -

how share queue number of processes,the code of these processes in multiple files, , don't want pass queue parameter. i try solve problem, failed. have 3 files main.py from p_1 import test p_2 import queue_run import multiprocessing if __name__ == '__main__': process_1 = multiprocessing.process(target=test) process_2 = queue_run() process_1.start() process_2.start() process_1.join() process_2.join() p_1.py import time p_2 import queue_put def test(): var = ['a', 'b', 'c', 'd'] v in var: queue_put('something : ' + v) time.sleep(0.8) p_2.py import multiprocessing queue = multiprocessing.queue() def queue_put(something): queue.put(something) class queue_run(multiprocessing.process): def __init__(self): multiprocessing.process.__init__(self) def run(self): while true: try: data = queue.get(timeout=1)

reactjs - React Redux SSR how to suppress initial actions called from componentDidMount? -

i able preload needed states in server-side , pass these initial states client application's redux store. i have enabled redux-logger see happens in application , states being refetched store. that's. because components call the necessary action during componentdidmount . here example reducer, action , component: // action: import axios 'axios'; export function fetchnewstop() { return { type: 'fetch_news_top', payload: axios.get('/news/top') }; } // reducer: export function newsarchive(state = { pending: false, response: { data: [] }, error: null }, action) { switch (action.type) { case 'fetch_news_top_pending': return { ...state, pending: true, response: { data: [] }, error: null }; case 'fetch_news_top_fulfilled': return { ...state, pending: false, response: action.payload.data, error: null }; case 'fetch_news_top_rejected': return { ...state,

android - start application knowing package name -

can tell me how start new application knowing package name? not have information activity main one. try using packagemanager , getlaunchintentforpackage()

java.util.zip.ZipException: invalid entry CRC (expected 0x0 but got 0xc86c27fe) -

this question has answer here: java.util.zip.zipexception: error in opening zip file 11 answers i extracting zip file through java code, giving below exception.## heading ## java.util.zip.zipexception: invalid entry crc (expected 0x0 got 0xc86c27fe) @ java.util.zip.zipinputstream.read(zipinputstream.java:221) @ java.io.filterinputstream.read(filterinputstream.java:107) @ zipextraction.unzip.unzipit(unzip.java:60) @ zipextraction.unzip.main(unzip.java:20) can tell me reason, why getting error. it means 1 of jar files bad (jar files zip files). you can login via ssh go directory containing jars , run: for in `ls *.jar`; unzip -qq -t $a &>/dev/null; if [ $? -ne 0 ]; echo "$a"; fi; this test jars , print ones errors.

javascript - md-dialog not recognizing angular filter -

i using angular material's md-dialog feature having issues getting date filter working. maybe can spot , let me know if have idea on how make work. can see {{item.presentation.end_time}} , {{confsessionobj.session_nr}} working when put angular date filter, doesn't recognize it. here's code. js $scope.showadvanced = function(ev, confsession) { var sessionid = confsession.id; $.ajax({ type: "get", url: "/session-detail.php", data: {id: sessionid}, success: function(data, response){ data = data.replace(/\\n/g, "\\n") .replace(/\\'/g, "\\'") .replace(/\\"/g, '\\"') .replace(/\\&/g, "\\&") .replace(/\\r/g, "\\r") .replace(/\\t/g, "\\t") .replace(/\\b/g, "\\b") .replace(/\\f/g, "\\f")

docker - create a "Best-effort" pod and its oom score not 1000 but -999 -

create deployment below: apiversion: extensions/v1beta1 kind: deployment metadata: labels: owt: hello pdl: com app: world idc: xg add: parameters-48 name: parameters-48 spec: replicas: 2 template: metadata: labels: name: parameters-48 spec: containers: - name: mofang-web image: registry.cc.com/online/mofang:stable nodeselector: node:cc login node found container's pid, check oom score: cat /proc/21606/oom_adj -16 cat /proc/21606/oom_score 0 cat /proc/21606/oom_score_adj -999 according user guide page: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/resource-qos.md , pod should "best-effort" pod, oom_score_adj not 1000 -999. way -999 means won't oom killed. following issue , it's maybe worth summarize how find correct container pid / proc pod: run application: $ kubectl run bootcamp --image=docker.io/jocatalin/kubernetes-boo

swift3 - Swift 3 Triggered Segue with variable -

i have tableview static cells - menu. articles reading list etc... the cells linked other storyboards , called triggered segue show i want use same view controller articles , reading list, change query db. how can tell view controller tableviewcell loaded it? if tableview static (having fixed number of each style cell), can try indexpath .if tableview dynamic, can divide menu, articles, reading list different uitableviewcell classes, , distinguish them checking cell's class

java - javax.ws.rs.core.Response.readEntity() stuck in infinite loop -

i'm using foo f = response.readentity(foo.class) entity javax.ws.rs.core.response object. the problem statement seemingly stuck in loop (using 100% of cpu according htop) until jvm terminates lack of memory. i've tried looking debugger, function time-sensitive , service throws timeoutexception when try execute step-by-step trace. the problem not directly related readentity() function: query parameters weren't being sent correctly api, search arguments ended being null in sql query. this, coupled default behavior of database being return complete dataset if no arguments passed, resulted in readentity() method being passed many entries process (neither infinite nor loop). if else ever has readentity() freeze up, consider possibility inadvertently passing inordinate amount of data in response object.

C++ Creating a function to get distance between two points -

in program have created constructor called point 2 values. have set , get , scale , translate function. i'm trying create function allows me distance between object , point. i'm have trouble though brilliant. #ifndef pointmodel #define pointmodel #define pointdeb ug #include <iostream> #include <string.h> using namespace std; class point { public: point(void); point(double anx, double ay); ~point(); void setpoint(double anx, double ay); double getx(); double gety(); double scalex(double thex); double scaley(double they); void translate(double thex, double they); void distance(const point& apoint); protected: private: double thex; double they; }; inline point::point(void) { thex = 1; = 1; cout << "\n default constructor called" << endl; } inline point::point(double anx, double ay) { cout << "\n regular constructor called"; } inline point::~poi

javascript - Reliable JS rounding numbers with toFixed(2) of a 3 decimal number -

Image
i trying round 1.275.tofixed(2) , expecting return of 1.28 , rather 1.27. using various calculators , simple method of rounding nearest hundredth, if last digit greater or equal to five, should round up. if doesn't work tofixed(2), how it? people asking whether console.log(1.275.tofixed(2)) prints off 1.28, here's quick screenshot macos chrome version 55.0.2883.95 (64-bit) the tofixed() method unreliable in rounding (see รlvaro gonzรกlez' answer why case). in both current chrome , firefox, calling tofixed() yields following inconsistent results: 35.655.tofixed(2) // yields "36.66" (correct) 35.855.tofixed(2) // yields "35.85" (wrong, should "35.86") mdn describes reliable rounding implementation : // closure (function() { /** * decimal adjustment of number. * * @param {string} type type of adjustment. * @param {number} value number. * @param {integer} exp exponent (the 10 logarithm of adju

yield - Scala beginner for-comprehensions and functions -

hey guys new scala , dont knowe doing wrrong right typ yield statement: def prim(n:int): (boolean, list[int]) = divsers(n) -> list(1,n) //flatmap for-comprehensions def divsers(n:int):boolean= (for{ d <- 1 n if((n%d)->0) }yield(d) // <- need put here make work function prim? ) prim(11); i want test if number prime number. realy have got realy problems syntac , typs.even if put "true" in yield dont work? you're doing kinds of things make no sense. divsers(n) -> list(1,n) point of returning tuple who's 2nd element list of 2 int s? 1st int 1 , 2nd int number passed argument prim() . if((n%d)->0) you've created tuple here. mean if (n%d) > 0 . yield ? for comprehension walking through sequence of numbers 1 n . of them pass through if condition , won't. you've got new list of numbers. how you're supposed turn boolean you.

sqoop export from Hive table stored in Parquet format to Oracle CLOB column results in (null) value -

i trying export string column hive table (stored in parquet format) oracle clob data type column using sqoop export . below commands run creation of tables in oracle & hive and, sqoop command use to export data. table creation & insert hive: create table default.sqoop_oracle_clob_test ( sample_id int, verylargestring string) stored parquet; [success] insert default.sqoop_oracle_clob_test ( sample_id , verylargestring ) values (123, "really large string"); insert default.sqoop_oracle_clob_test ( sample_id , verylargestring ) values (456, "another large string"); [success] table creation in oracle create table sqoop_exported_oracle ( sample_id number, verylargestring clob); [success] sqoop export command: sqoop \ export \ --connect jdbc:oracle:thin:@//host:port/ database_name \ --username ****** \ --password ****** \ --table sqoop_exported_oracle \ --columns sample_id,very

python - Why is the result of pandas.Series([numpy.nan]).astype("bool") is True? -

this question has answer here: why “not number” values equal true when cast boolean in python/numpy? 4 answers i wondering why result of pandas.series([numpy.nan]).astype("bool") is true ? probably because np.nan objects truthy : >>> bool(np.nan) true

swift - filter dictionary of type [String: [object]] for specific key in object arrays -

i'm showing users tableview looks contacts view in sense data source dictionary of type [string: [user]] , i'm showing section headers first letter of users name. now, want allow them search users first name... can't work. these dictionaries... friends hold data ["a" :[users first name start a]] , on var friends = [string: [user]]() var filteredfriends = [string: [user]]() this filtering code searchtext being first name want search by self.filteredfriends = self.friends.filter{friend in return friend.firstname.lowercased().contains(searchtext)} what want make filteredfriends have of values of friends users first names start text. how make work dictionary mine? thanks more info: class user { var firstname: string? init(name: string){ self.firstname = name } } sample scenario: friends = ["a" : [user(name: "anthony), user(name: "arnold")], "b" : [user(name: "barry")

tensorflow - GPU Ops not shown on tensorboard graph -

Image
i have made quick network using tensorflow, , seems training properly. uses gpu network operations, have verified creating session tf.session(config=tf.configproto(log_device_placement=true)) i set network this: train, image_guess = network(images, labels) tf.summary.image('guess', image_guess, max_outputs=3) tf.summary.image('input', images, max_outputs=3) tf.summary.image('target', tf.image.hsv_to_rgb(labels), max_outputs=3) sess.run([ tf.local_variables_initializer(), tf.global_variables_initializer(), ]) where network function sets graph , returns training op , resulting image tensor logging. def network(images, labels): tf.variable_scope("nn") scope: ... return train_step, image_guess the trouble comes visualizing graph in tensorboard. reason shows graph input handling operations so: how can display entire network?

javascript - What portion of input field is occupied by the text? -

i trying make auto (height) increasing text field. need know when increase height of input field. need know if text has filled input field or not. there way ? if can useful, quick solution textarea next one: javascript: function resizetext(){ var cont = document.getelementbyid("mytext"); while (cont.scrollheight == cont.clientheight) cont.rows--; while (cont.scrollheight > cont.clientheight) cont.rows++; } html: <textarea id="mytext" rows="1" cols="30" onkeypress="resizetext()"> write here text. </textarea>

android - In App Billing crashed in API 23 -

i upgrading project api 23. app crashed on in-app billing api 23 works on api 22. when purchasehandler calls purchaseitem method, app crash on launchpurchaseflow method. --------- beginning of crash 10-26 13:24:12.048 3031-3031/com.example.--- e/androidruntime: fatal exception: main process: com.example.---, pid: 3031 java.lang.illegalstateexception: iab helper not set up. can't perform operation: launchpurchaseflow @ com.android.vending.billing.util.iabhelper.checksetupdone(iabhelper.java:790) @ com.android.vending.billing.util.iabhelper.launchpurchaseflow(iabhelper.java:380) @ com.myqalam.inapppurchase.inapppurchasehandler.purchaseitem(inapppurchasehandler.java:31) @ com.myqalam.shalatindonesian.indexactivity.onmenuitemselected(indexactivity.java:95) @ com.android.internal.policy.phonewindow.onmenuitemselected(phonewindow.java:1151) @ com.android.internal.view.menu.menubuilder.dispatchmenuitemselected(menubuilder.java:

java - Transaction across multiple EJBs -

recently refactoring code, came across transaction rollback scenario 1 ejb bean calls another. in exception block each bean has context marked rollback. is practice or should re-throw exception & initiator bean rollback. also, if there single transaction spanned across ejb's, rollback should happen @ originator bean or encountered exception. transaction type jta persistence xa data source. with is marked rollback you mean ejb catch exception , use setrollbackonly ? if that's case, depends on design decide approach preferred. normally transaction rolled if system exception detected container. application exception on opposite not have effect. but, if business logic require business exception has important impact such must have effect of rolling whole transaction, have choice of setrollbackonly , or launch application exception rollback=true . this second approach has effect of not destroying bean. regarding second question: also, if

objective c - How to play a signal with AudioUnit (iOS)? -

i need generate signal , play iphone's speakers or headset. to generate interleaved signal. need instantiate audiounit inherited class object next info: 2 channels, 44100 khz sample rate, buffer size store few frames. then need write callback method take chink of signal , pit iphone's output buffer. the problem have no idea how write audiounit inherited class. can't understand apple's documentation regarding it, , examples find either read file , play huge lag or use depricated constructions. i start think stupid or something. please, help... to play audio iphone's hardware audiounit , don't derive audiounit coreaudio c framework - instead give render callback in feed unit audio samples. following code sample shows how. need replace assert s real error handling , you'll want change or @ least inspect audio unit's sample format using kaudiounitproperty_streamformat selector. format happens 48khz floating point interleaved stereo.

Google play android app apk download url -

i working on project requires url of file want download. it has permissions. not allow downloads occur unless in url list i tried downloading application google play store fails , says not allowed(internal message) how can find url app need download any appreciated. maybe point me in direction might able find answer

c++ - Modify the win32 window dragging/moving behavior -

i have child window in parent window. want child window not go out of parent border when drag , move child window. here current working code in child's callback: case wm_move: rect rect = getlocalcoordinates(hwnd); rect rectfather; getwindowrect(hwndfather, &rectfather); if (rect.left < 0) rect.left = 0; if (rect.top < 0) rect.top = 0; if (rect.bottom > rectfather.bottom - rectfather.top - 60) rect.top = rectfather.bottom - rectfather.top - 341; if (rect.right > rectfather.right - rectfather.left - 35) rect.left = rectfather.right - rectfather.left - 110; setwindowpos(hwnd, null,rect.left, rect.top, 0, 0, swp_nosize | swp_nozorder); break; the thing miss when dragging child window on parent border, child window keeps blinking. it because child window first moved out of border, wm_move message triggers setwindowpos . my question is: how prevent this, maybe overriding mouse drag event?

php - How to make a cache solution for a shared resource in laravel? -

i new caching , problem have in hand. conventional caching understand works in way resource cached when retrieved , cache used later on. on creation, updation , deletion, cache deleted made new 1 next time. in case of resource owned users, user id included in cache key somehow not clash cache of other users. now, problem unique. have resource shared ie of owned individual users of owned all. so now, when creation, updation , deletion happens, have delete cache users because might affected result sets since of items shared. , cache users have recalculated @ next retrieval particular user makes pretty inefficient. has encountered similar problem , can tell me how go around this?

go - How to get the POST params in revel golang -

how can parameters on post request in revel?? have this: func (c app) ndc() revel.result { fmt.println(c.params) //more simple code return json... } i have tested many things nothing works, prefer let code cleaner possible. output: &{map[origin:[lhr] destination:[dme] departuredate:[2016-10-31] arrivaldate:[]] map[] map[] map[] map[origin:[lhr] destination:[dme] departuredate:[2016-10-31] arrivaldate:[]] map[] []} the content good, but... how can 1 one these variables , values?? thank you. it's simple map , values in slice. origin value request: c.params["origin"][0] edit: above not work, should: c.params.get("origin")

sorting - Need extension controller for the following visual force page -

to have complete visualforce code provide pagination account records in table requirement try provide sorting function on table. so want extension controller provide sorting function ascending , descending functionality(because new in extension controller)for visual page. keep in mind pagination function worked in sorting function. my page followingly, <apex:page standardcontroller="account" recordsetvar="accountvar"> <apex:sectionheader title="my accounts" subtitle="account list view"/> <apex:form > <apex:pageblock > <apex:pagemessages id="error" /> <apex:panelgrid columns="7" id="buttons" > <!---<apex:pageblockbuttons>----> <apex:commandbutton rerender="error,blocktable,buttons" action="{!save}" value="save"/>

c# - ForeignKey displays a textbox instead of dropdownlist -

here issue : i have 2 project similar code display dropdownlist inside kendogrid. in first project works fine, in second project got textbox dipslaying instead of dropdown. i've searched around telerik nothing resolve issue. think missing in project make work fine. or blocking ! can't find .. hope me ! here grid : @(html.kendo().grid<displayunitemultiple>() .name("griddisplayunitemultiple") .toolbar(t => t.create().text("ajouter un couple valeur/ unite")) .columns(columns => { columns.bound(c => c.id).hidden(true); columns.bound(c => c.valeur); columns.foreignkey(c => c.unite, unitesdeconversion, "value", "text").title("unitรฉ").width(200); })

Python string.letters does not include locale diacritics -

i trying alphabet python string module depending on given locale no success (that diacritics, i.e. รฉรจรชร ... french). here minimal example : import locale, string locale.setlocale(locale.lc_all, 'en_us.utf-8') print string.letters # shows abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz locale.setlocale(locale.lc_all, 'fr_fr.utf-8') print string.letters # shows abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz in python documentation, said string.letters locale dependent , seems not work me. what doing wrong , right way obtain language-dependent alphabet ? edit: checked locale print locale.getlocale() after setting , correctly changed. in python 2.7 (there no string.letters in python 3.x) works if set locale 'fr_fr' (equivalent 'fr_fr.iso8859-1', not 'fr_fr.utf-8'). >>> import locale, string >>> locale.setlocale(locale.lc_all, 'es_es') 'es_es' >>> string.letters 'abcdef

linux - Does the memory used by tmpfs can be recycled just like page cache? -

i using tmpfs /tmp directory. however, when add files, output of free -h shows cached column value increase well. however, wondering page cache usage info added cached . memory used files in /tmp directory can recycled when lack of memory page cache . as said in kernel tmpfs : size: limit of allocated bytes tmpfs instance. default half of physical ram without swap. if oversize tmpfs instances machine deadlock since oom handler not able free memory. it said tmpfs memory can not recycled.

apache - Lighttpd How do i disable directly access my website by ip and name server? -

recently found website can access ip , name server. server using lighttpd , closed apache service.so don't know how disable access direct ip , name server on lighttpd. i have closed of apache service such httpd, mod_userdir tweak , etc. i've tried editing code in mod_userdir.conf file still not work. here how deny access requests not http://valid-hostname.example.com/ ... $http["host"] != "valid-hostname.example.com" { url.access-deny = ("") } https://redmine.lighttpd.net/projects/lighttpd/wiki/docs_modaccess

javascript - how to get time with some specific format? -

how should gettime specific format want time hh:mm am/pm , add minute . example have date 2016-09-16t11:40:50.000z first time 11:40 am , add 20 minutes , result 12:00 am so, how can task. try date.gettime() not give me proper time want. function gettime(date) { var hours = date.gethours(); var minutes = date.getminutes(); var ampm = hours >= 12 ? 'pm' : 'am'; hours = hours % 12; hours = hours ? hours : 12; // hour '0' should '12' minutes = minutes < 10 ? '0'+minutes : minutes; return = hours + ':' + minutes + ' ' + ampm; }

angularjs - Angular syntax not working after upgrading to Angular 1.3.20 -

recently have updated our application angular 1.3.20 version. after upgradation existing code throwing angular error. app.controller('searchcontroller', ['$scope','templateviewservice','$http','searchservice','$browser','$rootscope','$state','$location', '$uibmodal','readconfigurationservice','$filter','spinnerservice','$log', function($scope,templateviewservice,$http,searchservice,$browser,$rootscope,$state,$location, $uibmodal,readconfigurationservice,$filter,spinnerservice,$log){//pa1501-1206 var producttype = undefined; //pa1501-2173 start $scope.datalist = searchservice.getdatalist(); $scope.datalistcopy = searchservice.getdatalistcopy(); $scope.deletelist = []; $scope.displayartifactlist=[]; }; here @ line getting angular js error unknown provider templateviewservice <- searchcontroller

Why I can't autowire a controller instance into a JUnit class of this Spring Boot application? Unable to find a @SpringBootConfiguration -

i working on first spring boot application , finding difficulties trying test controller class using junit . so have following situation, controller class named placesearchercontroller : @restcontroller @requestmapping("/placesearcher") public class placesearchercontroller { private static final logger log = loggerfactory.getlogger(placesearchercontroller.class); @autowired private mainsearchservices mainsearchservices; @requestmapping(value = "hello") public string hello() { return "hello world"; } @requestmapping(value = "", method = requestmethod.get) public responseentity<string> home() { list<accomodationdto> accomodationdtos = new arraylist<>(); return responseentity.ok("c รจ figa"); } @requestmapping(value = "getbestlisthotel", method = requestmethod.post, consumes = mediatype.application_