Posts

Showing posts from March, 2013

ios - NSFetchedResultsController count in Swift -

i novice swift developer coming objective-c background. i have following code: class kpcoredataresultscontroller: nsobject, nsfetchedresultscontrollerdelegate { var fetchedresultscontroller: nsfetchedresultscontroller let managedobjectcontext = (uiapplication.sharedapplication().delegate as! appdelegate).managedobjectcontext! let entityname: nsstring var delegate: kpcoredataresultsdelegate? var predicate: nspredicate { { return fetchedresultscontroller.fetchrequest.predicate! } set { fetchedresultscontroller.fetchrequest.predicate = newvalue { try fetchedresultscontroller.performfetch() } catch { print(error) } } } var sortdescriptor: nssortdescriptor! var count: nsinteger { return (fetchedresultscontroller.sections!.first!).numberofobjects } init(entityname: string, predicate: nspredicate, s...

Local Spark talking to remote HDFS? -

i have file in hdfs inside hortonworks hdp 2.3_1 virtualbox vm. if go guest spark-shell , refer file thus, works fine val words=sc.textfile("hdfs:///tmp/people.txt") words.count however if try access local spark app on windows host, doesn't work val conf = new sparkconf().setmaster("local").setappname("my app") val sc = new sparkcontext(conf) val words=sc.textfile("hdfs://localhost:8020/tmp/people.txt") words.count emits exception in thread "main" org.apache.spark.sparkexception: job aborted due stage failure: task 0 in stage 0.0 failed 1 times, recent failure: lost task 0.0 in stage 0.0 (tid 0, localhost): org.apache.hadoop.hdfs.blockmissingexception: not obtain block: bp-452094660-10.0.2.15-1437494483194:blk_1073742905_2098 file=/tmp/people.txt @ org.apache.hadoop.hdfs.dfsinputstream.choosedatanode(dfsinputstream.java:838) @ org.apache.hadoop.hdfs.dfsinputstream.blockseekto(dfsinputstream.jav...

Trouble running Chicken Scheme in Emacs -

Image
i got scheme through racket , want use chicken scheme. emacs seems pretty option have developping in scheme other racket boot emacs not at. i had set emacs sbcl using this tutorial, not experienced emacs @ all. (note: on windows) what did: i set unix-like file structure tutorial above described, , installed chicken-scheme in z:\home\myname\bin\chicken-iup i tried following instructions on this page there wasn't much. says need quack doesn't explain lot, downloaded quack.el site , put in site-lisp folder i added following lines .emacs folder (setq scheme-program-name "csi -:c") (require 'quack) on page linked previously, there snapshot, want to you can see @ top there file open write text , repl @ bottom, however, when open emacs , m-x run-scheme, can't that i have 2 choices, m-x run-scheme , "chicken" gives me chicken intro screen says "process finished" on other hand, m-x run-scheme csi gives me blank buffer se...

asp.net - Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index gridview -

my grid has 1 row (always) based on unique condition in database. when try edit using rowcommand getting error "index out of range" here grid code , asp.net code: protected void grdedittemplate_rowcommand(object sender, gridviewcommandeventargs e) { if (e.commandname == "update") { int index = e.commandargument; label l0 = (label) grd.rows[index].cells[0].controls[1]; value.text = l0.text; label l1 = (label) grd.rows[index].cells[1].controls[1]; value1.text = l1.text; label l2 = (label) grd.rows[index].cells[2].controls[1]; value2.text = l2.text; label l3 = (label) grd.rows[index].cells[3].controls[1]; value3.text = l3.text; label l4 = (label) grd.rows[index].cells[4].controls[1]; value4.text = l4.text; label l5 = (label) grd.rows[index].cells[5].controls[1]; value5.text = .text label l6 = (label) grd.rows[index].cells[6].controls[1]; va...

c++ - What is the benefit of having a String class for Rcpp -

i wondering benefit having rcpp string class (documented here ). it possible convert between rcpp:string , std::string , why not use std::string since many of methods implemented. i'm guessing there must reason doing this. advice. easy: there strsxp , rcpp types first , foremost proxy objects underlying r types. no copies. using std::string entail copies on way in , out. don't want that.

javascript - How to make specific architecture in Firebase? -

i want create firebase following structure: firebasename: user1: name: name, email: email user2: name: name, email: email user3: name: name, email:email but can't seem add append data firebase without firebase creating custom key it. example, if want append user1 start out with, data gets created is firebasename: funkykey: user1 how this? yang li's solution work. here's 1 (requires firebase javascript sdk): var ref = new firebase('https://yours.firebaseio.com/'); var name = 'name'; var email = 'email'; ref.set({ firebasename: user1: name: name, email: email user2: name: name, email: email user3: name: name, email:email } }); or: [1,2,3].foreach(function(index) { ref.child('user'+index).set({ name: name, email: email }); });

sftp - vim save to remote server on write -

i'm trying enable sublime text sftp package saving on write vim, proving more difficult thought. i did manage find solution save files remote server, answer incomplete. hoping 1 can elaborate me how complete task. here example given in previous question cmap <leader>w :nwrite ftp://user@server/path/to/file.php this works well, has issue if wanted work @ time file hitting ctrl+w how work without manually writing out? does special variable exist open file? for example cmap <leader>w :nwrite ftp://user@server/file/path/from/project/root/$file_and_extension

objective c - What's the type of the first value of `NS_ENUM` actually is? -

as know ,the ns_enum macro defined apple,by can define enum type contain set of value. there 2 fact that: the type of value in enum nsinteger , c-base type. a c-base type variable can't pass objective-c type paramter. question description: i defined ns_enum type contains 3 value. , need use enum type value parameter of block varable declear id type. when passed first value of defined enum type paramter of block, complier didn't tip me anything. when pass second value of enum type complier reported me error says implicit conversion of 'nsinteger' (aka 'long') 'id' disallowed arc , warning says incompatible integer pointer conversion passing 'nsinteger' (aka 'long') parameter of type '__strong id' . it means varable based c-base type can't conversed objective - c type. so question is why can pass first value of not second value? when define enum, each enum value given next integer value starting 0...

android - How can I make my arrows invisible by setCurrentItem method of Viewpager? -

in oncreate of mainactivity add code: mdateareaslider.addonpagechangelistener(new viewpager.onpagechangelistener() { @override public void onpageselected(int arg0) { // hide right arrow if reach last position if (arg0 == adapter.datelist.length - 1) { mbuttonnext.setvisibility(view.invisible); mbuttonback.setvisibility(view.visible); } // hide left arrow if reach first position else if (arg0 == 0) { mbuttonback.setvisibility(view.invisible); mbuttonnext.setvisibility(view.visible); } // else show both arrows else { mbuttonback.setvisibility(view.visible); mbuttonnext.setvisibility(view.visible); } } } ...

URL modification/rewriting -

i wonder how possible make compatible both os depending if host website on windows or linux for example of link should rewritten: old: yourdomain.org/index.php?menu=register&action=create new: yourdomain.org/index/register/create i'm sorry if not correct board or something, hope made myself clear. this should work rewrite url http://yourdomain.org/index.php?menu=register&action=create to http://yourdomain.org/index/register/create rewriteengine on rewriterule ^index/([^/]*)/([^/]*)$ /index.php?menu=$1&action=$2 [l]

swift - Binding NSPopUpButton to core data hangs Xcode build -

my environment: mac os x v 10.10.4 version 6.4 (6e35b) my project: mac app using swift 1.2 storyboard a bit of background: got nstableview multiple columns hooked nsarraycontroller, in turn, hooked core data (say entity "car"). works - can load , edit column values, , save changes sqlite. of accomplished bindings via interface builder. want add new "color" column table, representing relationship entity, entity "color". each row have nspopupbutton new column; pop-up button should have values populated second nsarraycontroller linked "color" entity. thus, "color" many-to-one relationship between car , color (many cars can reference given color), , i'd values in pop-up button correspond "name" property color. what i've done: in storyboard (under controller scene containing car table), i've added second nsarraycontroller, "colors array controller": 1) under "attributes inspecto...

unit testing - Android instrumentation.callActivityOnPause causes "System services not available to Activities before onCreate()" -

i'm setting unit test test camera app release camera handle when app goes background via onpause callback. gets part call onpause method of activity i'd get: java.lang.illegalstateexception: system services not available activities before oncreate() @ android.app.activity.getsystemservice(activity.java:4738) @ android.app.activity.getmultiwindowstyle(activity.java:4563) @ android.app.activity.getmultiwindowstyle(activity.java:4568) @ android.app.activity.onpause(activity.java:1366) @ com.ricky.chow.cameraopencv.activity.maincameraactivity.onpause(maincameraactivity.java:57) @ android.app.activity.performpause(activity.java:5555) @ android.app.instrumentation.callactivityonpause(instrumentation.java:1239) @ com.ricky.chow.cameraopencv.activity.maincameraactivitytest.teardownthisactivity(maincameraactivitytest.java:58) @ com.ricky.chow.cameraopencv.activity.maincameraactivitytest.testcamerapreviewexists(maincameraactivitytest.java:78) @ java.lang.reflect.method.invokenative...

html - Is there a way for a drop down list to open automatically using an anchor point? -

in case matters, i'm using wordpress website tool. basically have <a name="title"></a>[expand title="title" trigclass=noarrow] various text [/expand] the anchor point linked menu. there can add when anchor point clicked, drop down menu opens up? either that, or there way happen? i'm new programming , i've tried looking on google no avail. i'd appreciate , help! thanks! yes there .. have use jquery happen...and instead of anchor ,, use button onclick expand function.. learn jquery thoroughly, helpful further programming.

java - No error yet no output. Help.(Sudoku solver getter) -

i want add text fields a01, a02, ... array a . want display value of val know if text being taken text fields. code not show errors, but, well, doesn't give me output well. int i, j; jtextfield[][] = new jtextfield[9][9]; int[][] val = new int[9][9]; (i = 0; < 9; i++) { (j = 0; j < 9; j++) { val[i][j] = integer.parseint(a[i][j].gettext()); system.out.println(val[i][j]); } } it old question here . you did not give them value int i,j; // counter jtextfield[][] = new jtextfield[9][9]; for(i=0;i<9;i++) { for(j=0;j<9;j++) { jtextfield tf = new jtextfield(); tf.settext("a"+i+j); a[i][j] = tf; } } in version call a[i][j].gettext() should throw nullpointerexception. should either kill application, end on console or have somewhere try { // more code here } catch (exception ex){} which silently swallow exception , veeeeery bad practice.

rest - grails 3 overriding queryForResource not working -

according grails web services i can override method queryforresource . way may able specify nested rest resource. e.g "/authors"(resources:'author') { "/books"(resources:'book') } but doc may wrong. because uses assigment operator = instead comparison 1 == . running way following error: ((id == id) && building.id) binary expression, should variable expression changing operator = == error cannot query property "params" - no such property on class clash.buildinglevel exists what correct way define nested rest resource? here queryforresource method: i tried both: @override protected buildinglevel queryforresource(serializable id) { if (params.buildingid) { return buildinglevel.where { id == id && building.id = params.buildingid }.find() } } @override protected buildinglevel queryforresource(serializable id) { if (params.buildingid) { return build...

html - After closing once and reopening, css modal cannot be dismissed -

this code using auto popup css modal. problem when auto popup comes on second time on same page, cannot close clicking close button. there way close clicking on background ? if yes code should add ? thanks. jsfiddle <div class="popup-wrapper" id="popup"> <div class="popup-container"> <!-- konten popup, silahkan ganti sesuai kebutuhan --> <form action="http://www.syakirurohman.net/2015/01/tutorial-membuat-popup-tanpa-javascript-jquery.html#" method="post" class="popup-form"> <h2>ikuti update !!</h2> <p>daripada hanya melihat demo untuk popup-nya saja, lebih baik masukkan juga email anda agar mendapatkan pemberitahuan saat ada update posting menarik lain seperti ini.<br/> <strong>percayalah, saya hanya akan mengirim sesuatu yang bermanfaat untuk anda :)</strong> </p> <div class="input-group"> ...

php - How to implement feature tracking? -

we begin development of application in laravel 5.1 requires tracking of every feature present in application , consequent granting of user access on fly. say eg - photos feature in application. owner can upload, view, delete, edit pictures. manager can have permission upload , view pictures (the other options though available, result in pop explaining restriction carry out action). architecture wise, have decided have database table listing features , id associated them. there table mapping user feature. however part struggling decide how track feature user trying access. our possible options till - aspect oriented programming. have join points defined , check user permission before method execution. storing feature id in session , using same on every call server check if user can access using mapping table which of above 2 better approach ? other better approach possible ?

ubuntu 14.04 - How to set permanent mtu size for ppp0 -

every time connect vpn, should run sudo ifconfig ppp0 mtu 1300 how make permanent? i'm using ubuntu 14.04 you can make custom script @ address : /etc/network/if-up.d , #!/bin/sh if [ "$iface" = "ppp0" ]; sudo ifconfig ppp0 mtu 1300 fi finally make executable , enjoy life ...

ios - Can I make my iphone app use only a portion of the screen -

i hoping create small windowed screen when home button pressed. keep portion of app process open while app isn't open. so had music playing on app , when home button gets pressed screen windowed or shrunk , displayed on main screen (kind of little button can moved around). using widgets in ios 8 work? when user presses home button, app goes background, , that's it. can't customize action. you notification user closed app can save app state or data next launch.

Bash - String Manipulation Minus Sign (-) (hyphen) -

this question has answer here: usage of :- (colon dash) in bash 2 answers while looking @ apache run script /etc/init.d/apache2 realise different in string manipulating substring extraction . example: if [ "${apache_confdir##/etc/apache2-}" != "${apache_confdir}" ] ; or if [ -n "${pidtmp:-}" ] && kill -0 "${pidtmp:-}" 2> /dev/null; the second 1 seems use default values if pidtmp unset or null didn't find logical in one. what use of minus sign ( - ) in each case? brief explanation helpful. note:i interested in minus signs in braces , checked :-word . it seems me has no real effect. :- supposed mean: "if not set, use following default value", since nothing follows, afaik has no effect: if variable set, default value not taken if variable unset, expand "", have hap...

jmeter - TestKichen, Serverspec and out-of-order command execution -

inside testkitchen describe blocks i'm running command, loading output variable running multiple expect statements on output validating different parts of it. end goal using part of ci builds blackbox testing. in instance i'm calling jmeter (using run remote agent perform off-dut tests) running through results returns checking each test (yeah yeah... it's little nasty works treat): describe "test transparent proxy (jmeter)" $jmeter_run = command("/usr/local/apache-jmeter-2.13/bin/jmeter -n -t /root/jmx/mytest.jmx -r -jremote_hosts=192.168.7.252 -gdut_ip=#$internal_ip -x -l /dev/stdout 2>&1").stdout 'test1' expect($jmeter_run).to match /text_to_match/ end 'test2' expect($jmeter_run).to match /more_text match/ end end the tests run fine, i'm finding i'm getting multiple jmeter runs (different test sets) being run out-of-order how they're defined in test spec. have other blo...

Nginx SSL certificates path format -

i'm newbie ngnix , server configurations in general , i'm trying implement ssl certificates in order move website https protocol. nginx doc's instruct add these lines point certificate , private key files: ssl_certificate www.example.com.crt; ssl_certificate_key www.example.com.key; can these in format: www.example.com/crt www.example.com/key else, i'm not sure hoy point address www.example.com.crt file the ssl_certificate , ssl_certificate_key directives should point files stored @ location on disk, , not on internet. e.g., ssl_certificate /etc/ssl/certs/mysite/chained.pem; ssl_certificate_key /etc/ssl/certs/mysite/private.key;

Oracle CLOB retrieval of entire field -

i need retrieve clob field oracle db i have no problems retrieve first n charachters (using dbms_lob.substr in query works limit 4000 chars), don't work if try retrieve largest field containing unicode chars (kanji). is there method so?

angularjs - How can I use a filter to all field in ng-table -

hi i'm learning angularjs, , i'm using ng-table, not know how multiple filter in 1 field. i know how 1 filter , sorting, searched , read couldn't find working me, guess there way. thanks , pardon english. edit: thats code $scope.init = function () { $http.post(slim + 'grupos2', $.extend({}, false, window.seguridad)).then(function(response) { $scope.grupos = response; var data2 = $scope.grupos.data; $scope.tableparams = new ngtableparams({ page: 1, count: 10, filter: { }, sorting: { nombre: 'asc' } }, { total: data2.length, getdata: function($defer, params) { var ordereddata = params.filter() ? $filter('filter')(data2, params.filter()) : data2; ...

jquery - Automatically push / nest object within a parent object in JavaScript -

i working on excel behaviour task. "tr"s bound variable $test var $test = $('tbody tr'); now use jquery .each function run throuhg trs , collect relevant contents : $test.each(function(index, element){ var $row_id = $(this).data("rowid"); var status = $(this).find('#status option:selected').val(); var ma_name = $(this).find('#ma-name').val(); var datum = $(this).find('#datum').val(); var firmenname1 = $(this).find('#firmenname1').val(); var firmenname2 = $(this).find('#firmenname2').val(); var limit = $(this).find('#limit').val(); var gruppe_kredit = $(this).find('#gruppe_kredit').val(); var omv_kdnr = $(this).find('#omv_kdnr').val(); var sap_kdnr = $(this).find('#sap_kdnr').val(); var fos = $(this).find('#fos').val(); var hga_kdnr = $(this).find('#fos').val(); var pushobj = {row_id: $row_id,....}; }); ...

c++ - How to remove punctuation around a string -

i want remove punctuation around string such string: !dont't?. will becomes: don't i have seem able remove punctuation in string with: int len = str.size(); (int = 0; < len; i++){ if (ispunct(str[i])){ str.erase(i--, 1); len = str.size(); } } do guys know simple way rid of punctuation front , only? yes, can use boost::trim_if ( see work ): boost::trim_if(str, boost::is_punct());

Query app pictures through Facebook graph api -

i've been reading through facebook's graph api documentation , i've found call read app's profile picture: get graph.facebook.com/v2.4/{app-id}/picture is there way query rest of app images (cover image, banner, web banner, app screenshots...)? have @ docs see fields/edges can queried: https://developers.facebook.com/docs/graph-api/reference/application#reading

python - What's the relationship between 'BeautifulSoup' and 'lxml'? -

in lxml 's doc , says: lxml can interface parsing capabilities of beautifulsoup through lxml.html.soupparser module. provides 3 main functions: fromstring() , parse() parse string or file using beautifulsoup lxml.html document, , convert_tree() convert existing beautifulsoup tree list of top-level elements. meanwhile, bs ' can use lxml parser. [ref] beautiful soup supports html parser included in python’s standard library, supports number of third-party python parsers. 1 lxml parser. bs suggests use lxml parser speed. so if lxml uses bs parsing when bs 's parser lxml conversely? i have been scratching head on understanding relationship. help. nothing should confusing bs parser , lxml.html parser. bs has html parser, , lxml has own html parser. bs documentation quoted says can parse html bs soup object using lxml parser or other possible third-party parsers, alternative using default bs parser : beautifulsoup(markup, ...

linux - Basic assembly calculator assignment not working -

we need addition, subtraction, multiplication , division single digits entered in using syscalls. reason addition thing works. cannot figure out why rest don't work. of them outputs nothing, except multiplication works if multiply 1. my subtract code: segment .data 1 db 0 2 db 0 diff db 0 segment .text global _start _start: mov rax, 0 mov rdi, 0 lea rsi, [one] mov rdx, 2 syscall mov rbx, [one] sub rbx, 48 mov rax, 0 mov rdi, 0 lea rsi, [two] mov rdx, 2 syscall sub rbx, [two] mov [diff], rbx ;xor rbx, rbx mov rax, 1 mov rdi, 1 mov rdx, 1 lea rsi, [diff] syscall mov rax, 60 xor rdi, rdi syscall my multiplication code: segment .data 1 db 0 2 db 0 multi db 0 segment .text global _start _start: mov eax, 0 mov edi, 0 lea esi, [one] mov edx, 2 syscall ;mov ebx, [one] ;sub ebx, '0' mov eax, 0 mov edi, 0 lea rsi, [two] mov edx, 2 syscall mov eax, [one] sub eax, ...

angularjs - Angular/Jasmine: is failing using classes for factory and services -

finally, got run test jasmine , succesfully of test standard mode. i tried change way declare factory , service class constructor each class , necessary parameters. failing test now. what don't understand opened in browser test , chrome set breakpoints. in factory call, in service call. in test set breakpoints after beforeeach , inside inject. set breakpòints inside factory class , chrom,e doesn't stop there. when execute test location handler returning undefined in lh variable, obiously, call of functions inside factory fails. my test is: /// <reference path="../../../_references.js" /> describe("factory - localizationhandler", function () { var lh; beforeeach(module('appcookin.factory')); beforeeach(function () { inject(function (localizationhandler, localizationservice, $http, $q) { lh = localizationhandler; }); }); /// /// testea que la funcion de getconcept la devuelva...

unit testing - How can I access inline style using React findDomNode function? -

i jest test react component, component's inline style changed according different props value. this example wanna do: let firstchild = testutils.findrendereddomcomponentwithtag(renderedcomponent, 'div'); expect(firstchild.getdomnode().style).toequal({ fontsize: '20px' }); this component props: let renderedcomponent = testutils.renderintodocument( <circleicon size="small" /> and component dom test with: return ( <div classname="circle-icon" style={boxstyle}> <span classname={this.props.icon}></span> </div> ); if can inside boxstyle, can assert test result it. thanks lot! actually works. usage: firstchild.getdomnode().style.backgroundcolor

Set user agent in PhantomJS and Protractor -

i using protractor phantomjs. how can set user agent phantomjs sends? can different different tests? set phantomjs.page.settings.useragent under capabilities : capabilities: { "browsername": "phantomjs", "phantomjs.page.settings.useragent": "mozilla/5.0 (x11; linux x86_64) applewebkit/53 (khtml, gecko) chrome/15.0.87" }

javascript - Facebook fbAsyncInit not loading when all.js loaded before -

i built module displays fb button on site. works fine excepting when there <script src="https://connect.facebook.net/en_us/all.js"></script> loaded before on same page. if all.js loaded before, fbasynciniti never triggered. my code: <div id="fb-root"></div> <li class="fblike"> <div data-share="false" data-show-faces="false" data-layout="box_count" data-href="<?php echo $share_url?>" data-action="like" class="fb-like"></div> </li> <script> window.fbasyncinit = function() { fb.init({ appid : 'app_id', xfbml : true, version : 'v2.1' }); }; (function(d, s, id){ var js, fjs = d.getelementsbytagname(s)[0]; if (d.getelementbyid(id)) {return;} js = d.createelement(s); js.id = id; js.src = "//connect.facebook.net/en_us/sdk.js"; fjs.parentnode.insertbefore(js,...

c# - WPF TabItem HeaderTemplate -

sample code: <tabcontrol> <tabitem> <tabitem.header> <stackpanel orientation="horizontal" margin="5"> <image source="/wpftutorialsamples;component/images/bullet_blue.png" /> <textblock text="blue" foreground="blue" /> </stackpanel> </tabitem.header> <label content="content goes here..." /> </tabitem> <tabitem> <tabitem.header> <stackpanel orientation="horizontal" margin="5"> <textblock text="red" foreground="red" /> </stackpanel> </tabitem.header> </tabitem> <tabitem> <tabitem.header> <stackpanel orientation="horizontal" margin="5"> <rectangle fill=...

jenkins - Speed up integration test that hits real SQL Server database -

my application has business layer heavily talks database. layer implemented bunch of ado.net calls wrapped dapper . initialise database schema, use entity framework 6 code first, has nice side-effect of being able use c# poco both ddl , dao. the raw sql use in dapper mixture of plain old sql, user-defined functions, , things specific sql server , e.g. built-in functions , full-text indices. in jenkins ci build, have integration test suite test layer using nunit . ensure tests isolated each other, database initialisation should happen on [setup] method. i went through several options implement integration test: use in-memory database. pros: test setup fast, running test logic fast. cons: non-option, because sql commands use specific sql server . use sqlite or sql compact . pros: syntax similar sql server , setting , tearing down matter of deleting files. cons: non-option moment start making use of user-defined functions , full-text index. use local sql express ser...

android - Launch activity by dialing a number -

i've created appropriate boradcastreceiver , registered in manifest.xml , here problem: if application has been launched , hanging in background, dialing number bring front. if has not been launched dialing number have no effect. how can fix this? test on xiaomi mi4 miui6 if that's important. here's code (i use scala): manifest.xml: <uses-permission android:name="android.permission.process_outgoing_calls"/> ... <receiver android:name="dialergate" android:enabled="true" android:exported="true"> <intent-filter android:priority="1"> <action android:name="android.intent.action.new_outgoing_call"/> </intent-filter> </receiver> broadcastreceiver: class dialergate extends broadcastreceiver { def onreceive(context: context, intent: intent) = if (intent.getaction equals intent.action_new_outgoing_call) { val ph...

sql - ASP Object required: 'Server -

i try handle http , insert data in oledb database using asp web application on visual studio 2012. create html item , change extention html asp. this code: <% 'declare variables dim connection dim recordset dim sql dim objrs dim objconn dim strconnect 'option explicit dim nome, id nome = request.querystring("name") id = request.querystring("id") 'declare sql statemant query db sql = "insert tablename (nomefilenotifica, iderrore, isnew) values ('"+nome+"', "+ id +", 1)" strconnect = "provider=microsoft.jet.oledb.4.0; data source = ***; database = dbname; user id = username; password=password;" set objconn = server.createobject(adodb.connection) objconn.open "tablename" , strconnect set objrs = server.createobject(adodb.recordset) objrs.open sql, objconn, 0 ,1 ' .. more processing...

Adjust the speed of playing videoview in Android -

i want adjust playback speed control. there + , - buttons increase , decrease playing speed. every time button clicked, speed increase/decrease 0.5 time ( -1 <--> -0.5 <--> 0 <--> 0.5 <--> 1). the speed change in range -2 2. <framelayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/framelayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" > <relativelayout android:layout_width="fill_parent" android:layout_height="fill_parent" > <videoview android:id="@+id/item_video" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignparentbottom="true" android:layout_alignparenttop="true" ...

visual c++ - how do I edit wavefront.obj file using c++ -

i edit .obj file using c++ or programming language can used 3d software (a 3d object scripting language). any suggestions of appreciated. thanks obj simple text format, positions of vertiles in plain ascii... can edit in notepad. there ready parsing modules c++, python, etc. the simplest way use python api choosen software, both maya , 3ds max has one.. you've got tell more on goal

php - Doctrine - FindBy on One To Many relation -

lets suppose have 'product' entity /** * @orm\entity * @orm\table(name="es_product") */ class product extends \kdyby\doctrine\entities\baseentity { /** * @orm\id * @orm\column(type="integer") * @orm\generatedvalue */ private $id; ... /** * @orm\onetomany(targetentity="productlang", mappedby="product", cascade={"all"}, indexby="iso") */ protected $contentlang; ... and productlang entity /** * @orm\entity * @orm\table(name="es_product_lang") */ class productlang extends \kdyby\doctrine\entities\baseentity { /** * @orm\id * @orm\manytoone(targetentity="\app\modules\cmsadmin\model\lang") */ protected $lang; /** * @orm\id * @orm\manytoone(targetentity="product", inversedby="contentlang") */ protected $product; /** * @orm\column(type="string") */ protected $name; as can see there 1 many connection between product , productlang the question...

spring - Junit Test cases are getting passed in Eclipse but getting exception when running with command line -

my junit test cases running fine in eclipse. fine mean either green or red. however, giving me following exception when try run test cases using options mvn test or mvn install . testpersistchannelresponsehdr(com.*.systemi.rga.dao.jpapopulatesubsres test) time elapsed: 0.65 sec <<< error! java.lang.illegalstateexception: failed load applicationcontext @ org.springframework.test.context.cacheawarecontextloaderdelegate.loadcontext(cacheawarecontextloaderdelegate.java:99) @ org.springframework.test.context.testcontext.getapplicationcontext(testcontext.java:122) @ org.springframework.test.context.support.dependencyinjectiontestexecutionlistener.injectdependencies(dependencyinjectiontestexecutionlistener.java:109) @ org.springframework.test.context.support.dependencyinjectiontestexecutionlistener.preparetestinstance(dependencyinjectiontestexecutionlistener.java:75) @ org.springframework.test.context.testcontextmanager.preparetestinstance(testcontext...

visual studio - XAML Designer Failed to load -

Image
i trying develop windows phone app , using visual studio 2013 update 4 development. i using pivot app (windows phone) development. my problem is, xaml designer failed load. did search on stackoverflow , google , found solutions , none of them worked. the solutions tried far : repair of visual studio . clearing contents in c:\users\<user>\appdata\local\microsoft\visualstudio\12.0\designer\shadowcache (answered here on stackoverflow deleting componentmodelcache c:\users\<user>\appdata\local\microsoft\visualstudio\12.0 and none of these worked. please me if have solution.

jquery - Convert bootstrap colums to tab in mobile view -

<div class="container-fluid"> <div class="row"> <div class="col-md-8 tab1"> <div class="title">content</div> <div>content1 content2</div> </div> <div class="col-md-4 tab2"> <div class="title">user</div> <div>user1 user2</div> </div> </div> </div> this code im using responsiveness client want in mobile should work tab. kindly me sort out. thanks got solution out using js, <div class="container"> <!-- nav tabs --> <ul class="nav nav-tabs device-small" role="tablist"> <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">home</a>...

c++ - How to read updating text file with Qt? -

i have 1 application(i dont have source code), prints output console. writing output file like; ./otherapp > out.txt and c++ qt programming, writing application should read output simultaneously . code reading out.txt file created. mean while otherapp continue write output, if project finished reading, not reading rest of output file. here usual method qtextstream reading output. qstring filename = "/.1/work/appoutput/out1"; qfile inputfile(filename); if(inputfile.open(qiodevice::readonly)) { qtextstream in(&inputfile); while(!in.atend()) { qstring line = in.readline(); qdebug() << line; } inputfile.close(); } my question how can read out text file until close otherapp or after not write inside? edit: thanks @bowdzone changed code , working. here code. qstring program = "/.1/work/otherapp"; qstringlist arguments; arguments << "-x" << "1002"; qproc...

php - NetSuite - add custom lines to purchase order -

i want add custom lines, po lines, po object. parent of these custom lines should po. want display them po lines (in separate block). you can create custom record called po lines. first field need "parent po" (choose own name) of type transaction , field should checked parent. add other fields desire custom lines you need build subtab , use record. you haven't mentioned how these lines create so: if user creation make sure intended audience has necessary privileges create & edit of new record if script creation, set parent po whatever po want on based on business logic