Posts

Showing posts from April, 2010

asp.net - ~/Views/Web.config and its content -

i'm creating website since zero, , i've used mvc pattern. ~/web.config has assembly references dlls, has ~/views/web.config? yes, file block access controllers , more., file adding namespaces (and more things), example. why necessary? <?xml version="1.0"?> <configuration> <configsections> <sectiongroup name="system.web.webpages.razor" type="system.web.webpages.razor.configuration.razorwebsectiongroup, system.web.webpages.razor, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35"> <section name="host" type="system.web.webpages.razor.configuration.hostsection, system.web.webpages.razor, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="false" /> <section name="pages" type="system.web.webpages.razor.configuration.razorpagessection, system.web.webpages.razor, version=3.0.0.0, culture=neutral, publick...

c - Valgrind blocks are lost -

i'm trying write data structure stack in c. each element of stack string. below 3 files used. first 1 main other ones header stack.h , file stack.c. declared stackelement pointer element. stackt struct define stack. problem appears when trying free allocate memory, because when run valgrind ==31235== error summary: 2 errors 2 contexts (suppressed: 0 0) ==31235== ==31235== 1 errors in context 1 of 2: ==31235== invalid free() / delete / delete[] / realloc() ==31235== @ 0x4c2bdec: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==31235== 0x400893: stackdestroy (in /test) ==31235== 0x400b61: main (in /test) ==31235== address 0x51fc150 0 bytes inside block of size 4 free'd ==31235== @ 0x4c2bdec: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==31235== 0x400b55: main (in /test) 24 bytes in 1 blocks lost in loss record 1 of 1 could me please? int main(){ stackt s; int r = 3, i; stackinit(&s, 2, r); printf("test\n")...

ios - Xcode 7 show project navigator and symbol navigator in the one column? -

is possible split xcode 7 navigator column cells , display selected navigators in each? i.e. have project navigator in top cell , symbol navigator in bottom cell. i have reviewed this answer xcode 4, asking see if there have been advancements layout options available in xcode 7. unfortunately, no :\ tried while achieve same thing. best thing use hotkeys, cmd+1 , cmd+2. or if using 1 or other reference, can open new xcode window

java - Rest Webservice in Controller or Service Layer? -

while developing rest based web service in jee 6 web application, containing jsf 2.0, cdi , ejb 3, make sense combine controller class (normally annotated @requestscoped ) rest service definition @path ? or, should inside it's own *restservice class definition? the project working follows below architecture requirement have rest services cater jsf clients, direct accesses other technologies. jsf --> controller method (calls using rest client)--> rest service --> stateless business service --> dao (also stateless) if combine controller , rest service (annotating methods @path), jsf client directly call controller method, , other client directly invoke rest service via url or rest client. this permit take out rest client code invoking rest service controller. thanks time in looking this.

php - File rename no longer working -

i have update controller function in laravel resource controller thats pretty basic. updates title, body etc. in db normal (no issues data updates). the issue images. image directory each project follows slug naming convention based on title of project. built update function directory , images renamed if title changed. working fine built it, it's stopped. directory renames, files not. here relevant snippet controller: $count = 0; $slug = input::get('title'); $prefix = str::slug($slug); $oldprefix = $project->imagesprefix; $path = public_path().'/img/projects/'; $directory = $path . $prefix; rename($path.$oldprefix, $directory); //dumped directory here , it's set $files = preg_grep('~\.(jpg)$~', scandir($directory)); //dumped $files here , array set foreach($files $file){ rename($directory.'/'.$file, $directory.'/'.$prefix.'-'.$count.'.jpg'); ++$count...

Using PostgreSQL-PostGIS for coordinates -

i'm trying create database storing coordinates lets x has: latitude 20°20’20.00’’ , longitude 20°20’20.00’’e , 1 mile range. y has: latitude 20°21’21.00 , longitude 20°21’21.00’’ i want know whether y location lies within x range. i've been trying days find way manage that; came across quad tree, k-d tree, not find way represent in database. i stumbled on postgis don't know how create , manage simple latitude longitude interaction whit it. the first thing want learn more postgis . after installed postgis extension, can use geography type purposes: create table locations ( id serial primary key, loc geography(point, 4326), -- see postgis docs type modifiers rng double precision, -- in miles, postgis uses km ... ); create index locations_geo on locations using gist (loc); your lat,long pairs go loc column geography type; postgis spatial analysis data. can find points within range of x point (say, id=12 ) follows: selec...

regex - Awk/sed solution for replacing/prepending subset of lines in between 2 patterns -

i use sed/awk edit/prepend specific lines in between 2 patterns (east_40_1_ep00 &arr , #pchan 5). here block of text: east_40_1_ep00 &arr{ # template 6-channel units @ brtt # nothing specified means use global parameters pchan_map &arr{ #these map q330 physical channels seed net-sta-chan-loc codes # pchan net_sta_chan[_loc] calib calper segtype 0 $dlnet_$dlsta_bhz_00 $db 1 $dlnet_$dlsta_bhn_00 $db 2 $dlnet_$dlsta_bhe_00 $db 0 $dlnet_$dlsta_lhz_00 $db 1 $dlnet_$dlsta_lhn_00 $db 2 $dlnet_$dlsta_lhe_00 $db 3 $dlnet_$dlsta_bhz_01 $db 4 $dlnet_$dlsta_bhn_01 $db 5 $dlnet_$dlsta_bhe_01 $db 3 ...

C: Realloc issues with double pointer -

i trying copy char word[50] array char **wordlist double pointer , realloc(wordlist, (numwords+1)*sizeof(char*)) increase size of word list 1 more char* hold next word . i keep getting *** glibc detected *** ./program: realloc(): invalid next size error i declaring wordlist = realloc(wordlist, (numwords+1)*sizeof(char*)) void outfile(char *argv[], char **wordlist) { if((infileptr = fopen(argv[2], "r")) != null) { if((outfileptr = fopen(endoffile, "w")) != null) { while((c = fgetc(infileptr)) != eof) { if(!(isspace(c))) { word[wordindex] = c; wordindex++; rowlim++; } if(isspace(c)) { wordindex = 0; if(rowlim < limit) { rowlim++; ...

Parsing a message with various special characters and splitting into a list (re and regex) Python 2.7 -

i trying parse message receives following delimiters (without quotes): delimiter1: "@@@" - followed message delimiter2: "!!!" - signal delimiter3: "---" - followed message delimiter4: "###" - followed message delimiter5: "$$$" - followed message i have far: import re mystring = '@@@useradd---userfirstadded###userremoved!!!$$$message' result = re.split('\\@\@\@|\\!\!\!|\\---|\\#\#\#|\\$\$\$',mystring) print result my result far: ['', 'useradd', 'userfirstadded', 'userremoved', '', 'message'] i want result printed console: ['@@@useradd','---userfirstadded','###userremoved','!!!','$$$message'] is possible using re.split or need use re.find or lot better? have been playing re.split delimiters can see maybe guys have lot more experience using functionality within python. edited solution #1 using re (from @thefou...

android - Using TLS only with Retrofit in RoboSpice -

i've got basic setup using robospice retrofit in shell android application making rest calls, parsing json response pojo , can use render in activity. want use tls transport security (not ssl). i've read retrofit okhttp can used achieve don't know make update in code. i have basic interface: public interface randomapi { @get("/users") list<user> getusers(@path("owner") string owner, @path("repo") string repo); @get("/users/{userid}") user getuser(@path("userid") int userid); } i have service: public class randomservice extends retrofitgsonspiceservice { private final static string base_url = "http://jsonplaceholder.typicode.com"; @override public void oncreate() { super.oncreate(); addretrofitinterface(randomapi.class); } @override protected string getserverurl() { return base_url; } } and request: public class randomrequest extends retrofitspicerequest<user,...

c++ heap allocations 32 byte aligned by default? -

i decided test memory consumption visual studio 2013 community edition, , noticed on computer memory consumption skyrocketed when using pointers, example: int _tmain(int argc, _tchar* argv[]) { auto n = 1000000; std::vector<int> numbers; numbers.reserve(n); (auto = 0; < n; i++){ numbers.emplace_back(0); } return 0; } i 4 bytes per int, total of 3.8mb, can corroborate via task manager. but if decide change std::vector<int> std::vector<int*> : int _tmain(int argc, _tchar* argv[]) { auto n = 1000000; std::vector<int*> numbers; numbers.reserve(n); (auto = 0; < n; i++){ numbers.emplace_back(new int(0)); } return 0; } i original 3.8mb indicate pointers in computer 4 bytes, plus 30.5mb indicates every new int() used 32 bytes, incurring 28 bytes of overhead per int. if change raw pointer std::unique_ptr uses same memory expected, changing std::shared_ptr (without using std::make...

java - Error Parsing XML response attributes with ksoap2 returns ClassCastException -

i'm trying figure out how cast response of consume of webservice, when casting response envelope.bodyin extended class object "biometricconfigurationresponse" i'm getting error: java.lang.classcastexception: org.ksoap2.serialization.soapobject cannot cast org.tempuri.biometricconfigurationresponse the service responding , if not cast dump right. ideas? this i'm doing: biometricconfigurationresponse response= null; soapobject obj = new soapobject (wsnamespace, methodname); soapserializationenvelope envelope = new soapserializationenvelope(soapenvelope.ver11); envelope.implicittypes = true; envelope.dotnet = true; envelope.setoutputsoapobject(obj); envelope.addmapping(wsnamespace, "biometricconfigurationresponse", new biometricconfigurationresponse().getclass()); httptransportse androidhttptransport = new httptransportse(wsurl); androidhttptransport.debug = true; try { string soapaction=wsnamespace + methodname; androidhtt...

Python for loop - why does this not infinite loop? -

consider following snippet of python code: x = 14 k in range(x): x += 1 at end of execution, x equal 28. my question: shouldn't code loop forever? @ each iteration, checks if k less x . however, x incremented within loop, has higher value next comparison. range(x) not "command". creates range object 1 time, , loop iterates on that. changing x not change objects made using it. >>> x = 2 >>> k = range(x) >>> list(k) [0, 1] >>> x += 1 >>> list(k) [0, 1]

java - Overriden method does not throw -

i'm having errors here. cant quite figure out. hmmm. class myexception extends exception { interface myinterface { void mymethod () throws myexception; } class myimplementation implements myinterface { @override public void mymethod() throws myexception { system.out.println("in mymethod()"); throw new myexception(); } } class theinterface { } public static void main(string[] args) { myimplementation m; m = new myimplementation(); try { m.mymethod(); } catch (myexception e) { system.out.println("myexception caught"); } } } please help. you using user defined exception , have not created that. try or use generic exception public class myimplementation implements myinterface { @override public void mymethod() throws myexception { system.out.println("in mymethod()"); ...

Get updated value from bean through JavaScript in JSF -

i have context menu in itemcomp.xhtml , if click on item in context menu action itemdisplay.refreshitems called , on complete of action javascript function showpanel() called itemcomp.xhtml <rich:contextmenu disabledefaultmenu="true" event="oncontextmenu" submitmode="ajax"> <rich:menuitem disabled="true" style="color:black; font-weight:bold;" value="items"/> <rich:menuseparator/> <c:foreach items="#{itemdisplay.componenttypemap.keyset}" var="itemvalue"> <rich:menuitem value="#{itemvalue}" rendered="#{(itemvalue == 'bags report') or (itemvalue == 'chairs report') or (itemvalue == 'tables report')}" action="#{itemdisplay.refreshitems}" oncomplete="showpanel(...

java - NumberFormatException: For input string: "8:00" -

so problem this? gives me error exception in thread "main" java.lang.numberformatexception: input string: "8:00" @ java.lang.numberformatexception.forinputstring(unknown source) @ java.lang.integer.parseint(unknown source) @ java.lang.integer.parseint(unknown source) @ payroll.main(payroll.java:49) here code: import java.io.*; import java.text.*; public class payroll{ static bufferedreader in = new bufferedreader(new inputstreamreader(system.in)); public static void main(string [] args) throws ioexception { string empcode = ""; while(!empcode.equals('0')) { system.out.print("enter employee code: " ); empcode = in.readline(); string empinfo[] = getinfo(empcode); double basicsalary = double.parsedouble(empinfo[3]); system.out.println("read me first : ****************************"); system.out.println(...

file upload using requests library in python -

i have following script allows me upload files usersfiles. not work large files (eg 1gb). change make? import requests import random import re filehandle = open("menu.avi", "rb") resp=requests.get("https://usersfiles.com/") sess_id = re.search('sess_id.*=?"(.*)?"', str(resp.text)).group(1) srv_tmp_url = re.search('srv_tmp_url.*=?"(.*)?"', str(resp.text)).group(1) upload_type = re.search('upload_type.*=?"(.*)?"', str(resp.text)).group(1) uid = '' in range(0, 12): uid = uid + '' + str(random.randint(0,10)) url2="https://up11.usersfiles.com/cgi-bin/upload.cgi?upload_id="+uid+"&js_on=1&utype=reg&upload_type="+upload_type r = requests.post(url2, data={"upload_type":upload_type , "sess_id":sess_id, "srv_tmp_url":srv_tmp_url}, files = {"file_0":filehandle}) link_usersfi...

How do you check that a dictionary is in an array even in the worng order in python? -

lets have : winning_numbers = [{345}, {238}, {321} ] players_numbers = {435} i want return true players_numbers in the array if not in right order. how can tackle doing this? you should make winning numbers set >>> winning_numbers = [ {3, 4, 5}, {2, 3, 8}, {3, 2, 1} ] >>> players_numbers = {4, 3, 5} >>> players_numbers in winning_numbers true

c# - How do I compare data in a List to Data in a DataView? -

Image
i have dataview containing data, need compare dataview list<string> , data list<string> not in dataview . list populated using listbox . here list: //populate list<string> listbox private void loadlist() { var vehicle = new list<string>(); var model = new list<string>(); foreach (listitem automobile in listbox1.items) { var components = automobile.value.split('\\'); vehicle.add(components.first()); model.add(components.last()); } (var = 0; < vehicle.count; i++) { // compare items in list<string> dataview // data list not in dataview } } this listbox , list<string> before , after. the dataview data structure: the vehicle , model both primary key (composite). *this dataview member: private static dataview localdataview { get; set; } how compare list against...

Is Spring HATEOAS production ready? -

i'm in doubt whether spring hateoas (latest v0.17.0) can used in production or not. i've seen it's used in spring data rest 2.3.0 ( major version > 0 ). but, spring hateoas major version still zero . yes spring-hateoas doesn't have major release yet, had many minor releases pretty stable. we using spring-hateoas @ major telco company , in production time now. i don't expect backwards-compatibility breaking changes should safe use it. oliver gierke (project lead) actively fixing defects wouldn't worry.

objective c - Retrieving images once saved to a server -

i have code written uploads image server, not sure how retrieve images after upload them. tried using nsurl request, did receivedata delegate method never called. below i've included relevant code related uploading picture, , attempt @ pulling data using nsurl request. there conceptually i'm doing wrong? thank you. - (ibaction)nextbuttonpressed:(id)sender { [self.signupcontroller uploadprofilepicture:uiimagepngrepresentation(self.imageview.image) completion:^(nserror *error){ [[nsoperationqueue mainqueue] addoperationwithblock:^{ [[synccontroller sharedinstance] sync]; [self performseguewithidentifier:@"addfriendssegue" sender:self]; }]; }]; } and uploadprofilepicture method: - (void)uploadprofilepicture:(nsdata *)imagedata completion:(void (^)(nserror *error))completion { bruser *user = [brsession userwithcontext:[[brcoredatamanager sharedmanager] maincontext]]; [self.apiclient uploadprofilepicture:imagedata foruser:user parameters:n...

java - POST using jersey not converting JSON to JAXBObject in REST service -

i writing post rest api service , , service class is @post @path("/create") @consumes({ mediatype.application_xml, mediatype.application_json }) @produces({ mediatype.application_xml, mediatype.application_json }) public response producejson(student student) { system.out.println("===============" + student.getfirstname()); return response.ok().build(); } i using dev http client , sending xml request complete student object , working fine. when sending json request student object , provides me student object null values. student.getfirstname() coming null , though setting value. solutions ?

oracle - How to export half a million records from PL/SQL -

i've table around 500,000 records. need records exported in excel. when query i'm not able said out of memory table doesn't have primary key/index. is there way extract? it easy in write file output form sqlplus . mycsv.sql: set define off set echo off set serveroutput off set termout off set verify off set feedback off set pagesize 10000 set arraysize 5000 rem set head off set line 500 spool /tmp/mycsvfile.csv; select * my_table; spool off; exit; and linux prompt can run $> sqlplus username/password @/tmp/mycsv.sql

Where perforce workspace keeps information regarding perforce [p4 info] -

when run p4 info in perforce workspace shows me perforce client information of workspace. want see, picking information. tried google everywhere telling command , it's output, need know source of info command. the following items read client environment (see "p4 environment" more information, , run "p4 set" see each 1 coming from): user name: sam_stafford client name: samwise-silver client host: forge current directory: c:\ the client root stored in server database ("p4 client -o"): client root: c:\public the server address determined p4port setting ("p4 set p4port"), normalized via reverse dns lookup. client address , client port refer machine , port being used make connection server: server address: wayfarer-p4d:1666 peer address: 10.23.2.15:54416 client address: 10.23.2.15 license info comes server's license file: server license: perforce software, inc. 5000 users (expires 2018/03/18) server license-ip: 10....

c# - FakeItEasy error: No calls were made to the fake object -

i have small class has small method gets invoked when event raised. public class demoui { public demoui(testrunner runner) { runner.usermessage += oneventrunthis; } protected void oneventrunthis(object sender, usermessageeventargs e) { console.writeline(e.message); } } now in test create object of type testrunner , execute execute method on it. raises event intercepted , oneventrunthis dutifully runs printing message. fake easy reports error "no calls made fake object". var _suttestrunner = new testrunner(); var fakedemoui = a.fake<demoui>(x => x.withargumentsforconstructor(() => new demoui(_suttestrunner))); _suttestrunner.execute(); a.callto(fakedemoui).where(x => x.method.name == "oneventrunthis").musthavehappened(); the method oneventrunthis getting called because see output getting printed in output window. in limited understanding means call has been made fake object. or missing someth...

Create a job in Jenkins automatically when a repo is created in Phabricator -

i have repo in phabricator , cloned in local machine. now want create new jenkins job automatically after creating new repo in phabricator. jenkins api available create new job remotely. according jenkins: to create new job, post config.xml url query parameter name=jobname. need send content-type: application/xml header. i can create job following command using terminal . curl -x post -h "content-type:application/xml" -d "<project><builders/><publishers/><buildwrappers/></project>" "http://ip:port/createitem?name=aa_test_job1" question: how can run command harbormaster create jenkins job , send config.xml file configuration of new job? guy warner ( http://www.guywarner.com/ ) has done lot of work show how possible. can visit blog post more details: http://www.guywarner.com/2014/05/integrating-jenkins-and-phabricator.html (part 1) , http://www.guywarner.com/2014/06/part-2-integrating-phabricato...

scala - how to deal with error SPARK-5063 in spark -

i error message spark-5063 in line of println val d.foreach{x=> for(i<-0 until x.length) println(m.lookup(x(i)))} d rdd[array[string]] m rdd[(string, string)] . there way print way want? or how can convert d rdd[array[string]] array[string] ? spark-5063 relates better error messages when trying nest rdd operations, not supported. it's usability issue, not functional one. root cause nesting of rdd operations , solution break up. here trying join of drdd , mrdd . if size of mrdd large, rdd.join recommended way otherwise, if mrdd small, i.e. fits in memory of each executor, collect it, broadcast , 'map-side' join. join a simple join go this: val rdd = sc.parallelize(seq(array("one","two","three"), array("four", "five", "six"))) val map = sc.parallelize(seq("one" -> 1, "two" -> 2, "three" -> 3, "four" -> 4, "...

java - Convert PostgreSQL Serial Primary Key to Oracle Statement -

i have java file connects database , code: package movies; import java.sql.*; public class createtable { public static void main(string args[]) { connection c = null; statement stmt = null; string sql; try { class.forname("oracle.jdbc.oracledriver");//driver c = drivermanager.getconnection("jdbc:oracle:thin:@localhost:1521/xe", "username", "password");//put database connection info system.out.println("opened database within createtable.java"); stmt = c.createstatement(); sql = "create table movies " //+ "(id serial primary key,"//can't figure out statement , works if comment out. + " (name nvarchar2(255) primary key,"//i don't want primary key. + " year nvarchar2(255)," + " rating nvarchar2(16)," + " actors ...

c - Get list of libraries used in a library -

i trying compile library " a " on machine, & have "c" & "d" optional dependencies of a installed @ standard path local/custom path , libraries @ custom path( -o3 ) more optimized compared libraries @ standard path( -o0 ). i compile library "a" supplying path of local libraries using ldflags(-l) , libs (-l) . , library gets generated (liba.so or liba.a)! ldd tool can tell libraries linked against executable . is there equivalent tool can tell libraries linked against library ( i.e. ldd libscalapack.a )? is there way make sure weather optional libraries libraries used while creating library a( liba.so/liba.a ) ? is there way surely tell out of standard & local libraries used while compiling ? eagerly awaiting replies. tell linker want load map ( -wl,-map -wl,mapfile if you're using gcc). tell libraries have been used during link phase. in case of shared libraries, doesn't mean exact same librari...

Php exec() function is not working on heroku with command nice -

i using following lines of php code in heroku php app, these lines not working : $exec = "ps -p pid | grep pid.php"; $cmd='nice -n15 ' . php path . ' external.php '; $cmd.=" > /dev/null 2>/dev/null & echo $!"; $out=array(); exec($cmd, $out); could please suggest other alternative of or mistake code have?

c# - FAXCOMLib is not working in windows service -

i want send fax computer, using faxcomlib. working on windows based application, not working on windows service. i found thread across shows faxcomlib not work on windows server. is true? if yes. can body let me know how send fax using windows service? thanks in advance...

sql server - How to add column dynamically to temporary table? -

i'm trying size of tables in list of databases. problem have is, tables have same name in each database. how can add first column #tmptablesizes database name: create table #tmptablesizes ( tablename varchar(100), numberofrows varchar(100), reservedsize varchar(50), datasize varchar(50), indexsize varchar(50), unusedsize varchar(50) ) insert #tmptablesizes exec aaabd.dbo.sp_msforeachtable @command1="exec sp_spaceused '?'" insert #tmptablesizes exec bbbdb.dbo.sp_msforeachtable @command1="exec sp_spaceused '?'" insert #tmptablesizes exec cccdb.dbo.sp_msforeachtable @command1="exec sp_spaceused '?'" straightforward solution: use 1 more "buffer" table, first insert buffer table , "main" temporary table specification of dbname create table #tmptablesizes ( dbname varchar(100), tablename varchar(100), numberofrows varchar(100), reservedsize varchar(50), ...

Fixed text size in WebView Android (Lollipop) -

Image
i have simple code in webview <tr><td valign='top' width='30%'><span style='font-size:11px !important;'> @label</span></td><td valign='top' width='2%'><span style='font-size:11px !important;'>:</span></td><td ><span style='font-size:11px !important;word-break:keep-all;'> @val</span></td></tr> how have fixed font size of 11px? if increase/decrease system font-size in display settings, above code works fine in pre-lollipop version. in lollipop font size changing. want fixed. have attached screen shots reference. pre-lollipop lollipop any appreciated. p.s : target sdk version 15 i solved this. settings.settextzoom(100); @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); webview webview = (webview) findviewbyid(r.id.webview); ...

Scala : modify values in a TreeMap -

this scala newbie question. i'm storing data in treemap , values keep on modifying. example, in below class there map contains orders being sent market , want keep track of quantity of orders , each price. map change @ each order goes market. class mydata { // price -> quantity map var orders: treemap[int, int] = treemap.empty } now, when new order comes @ price of 100, can add map. var = new mydata; // new order @ price 5 qty 200 a.orders += (5 -> 200) now, order @ price 5 has been modified 100. how here treemap ? a.orders ??? well... treemap found in scala.collection.immutable package. notice immutable thing. treemap immutable data-structures means... can not modify in-place. no insertions, no updates, no changes @ all. can copy of modifications applied. so... modify, have reassign a.orders modified copy. a.orders = a.orders + ( 5, 100 )

Rational clearcase explorer throws error like "Encountered an improper argument" -

i using rational clearcase explorer view vob. created dynamic view in view server,but not able access directory or folder. when tried access throws error "encountered improper argument" in rational clearcase explorer dialog box. in clearcase explorer, when accessing folder, must first access vob. that means need make sure vob mounted: cleartool mount \myvob # unix: cleartool mount /vobs/myvob if vob visible, folder not accessible, need check status seen parent folder: cd /myview/myvob/parent/folder cleartool ls that give clue why cannot access subfolder. as mentioned in technote " "encountered improper argument" error displayed in clearcase native gui ", can right issue: if principal has not been granted access vob, attempt access vob ibm® rational® clearcase explorer returns error, "encountered improper argument." resolving problem this error might imply insufficient permissions. to determine ef...

jquery - date filter type is not working in yadcf plugin -

i have column display date in it. using datatable display tables. have render date column using datatable's column render function , use yadcf column filter plugin filter data. display datepicker in filter element not filter data after selecting date it. $(table_id).datatable({ aadata: $.parsejson(records), "aocolumndefs": [{ "bsortable": false, "atargets": [1], // <-- gets last column , turns off sorting "mdata": null, "mrender": function(data, type, full) { var cdate = row.date; return cdate.replace(/(\d{4})-(\d{2})-(\d{2})/, "$3-$2-$1"); }}] }).yadcf([{column_number: 1, filter_type: "date"}]); try latest yadcf version , since using - date sepaartor need feed yadcf date_format: 'dd-mm-yy' updated code: .yadcf([{column_number: 1, filter_type: "date...

remote debugging - Access Denied when trying to debug on Windows Phone 8.1 device -

Image
i've been working on windows phone 8.1 application using emulator , nokia lumia 520. up until yesterday, debugging on device working fine. however, because wanted out of pending update windows 10 on device i ran windows phone recovery tool (i never updated windows 10). now i've reinstalled wp8.1 on device, i'm having trouble debugging. this error message i'm getting: (the pixelated part points bin\debug path of project). note though says "windows store app", windows phone app. deploying device works fine. i've tried debugging on 2 different machines now, same result. i've discovered if explicitly set cpu type in visual studio arm , debugging works, although seems lot slower before. does know why i'm getting weird error message , why need compile arm cpus debug on phone?

Can't compile a LESS file into CSS -

my less file looks this: /*style*/ .themestyle(){ font-weight:normal; text-transform:capitalize; text-transform:none; } .styletitleblock(@padding; @margin){ text-transform:uppercase; padding:@padding; margin:@margin; text-align: left; } .hidetext(){ display: inline-block; text-indent: -99999px; overflow: hidden; vertical-align: middle; text-align: left; float: left; .themestyle(); } .themeposition(){ position:absolute; top:0; left:0; } /*color text * color text hover*/ .link(@color; @colorhover){ color: @color; &:hover, &:focus, &:active { color: @colorhover; text-decoration:none; } } /*========================= functions==================*/ /*change font*/ .changefont (@font){ font: @font; } /*change text color*/ .changecolor (@color){ color: @color; } /*change line*/ .changeline (@linecolor){ border-color: @linecolor; } /*change background color*/ .ch...

javascript - Angular Runnning Controller twice on browser reload -

problem: i have angular app works fine. has 4 main page controllers loaded inside ng-view. there controllers connected pages routed via ngroute. when app loaded first time works ok. if go of these pages , press browser's refresh(f5) controllers called twice. there reason why run once in first instance , twice in reload? regards, ish common problem, must have loaded controller on ui-router , in html file. remove html file, use router inject controllers, practice.

selenium - PHPUnit Selenium2 Error on getting current input text value -

i'm having strange behavior while trying input text value: $this->byxpath( "//input[contains(@id, '_rule_1_display_times')]" )->value(); error output: phpunit_extensions_selenium2testcase_webdriverexception : /session/3ef42f7e-f5f5-459d-92e2-6377c6f05e61/element/4/value build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50' system info: host: 'vytautas', ip: '127.0.1.1', os.name: 'linux', os.arch: 'amd64', os.version: '3.13.0-49-generic', java.version: '1.7.0_75' driver info: driver.version: unknown it's strange cause can set value input without problem: $this->byxpath( "//input[contains(@id, '_rule_1_display_times')]" )->value(8); any ideas what's wrong getting current input text value? value gives current value of field vs attribute(value) gives original value. asked here: difference between...

Ansible: remove a program and say 'yes' to the command prompt? -

i trying remove system gem in ansible playbook, command i'm running requires user input before can complete: - name: uninstall graphviz gem command: sudo -i gem uninstall ruby-graphviz sudo: true when run playbook find ansible hangs when gets code above. figure it's because user input required in order complete task. so how can tell ansible remove gem, , 'yes' follow-up question os might have user? from documentation: rubygems ask confirmation if attempting uninstall gem dependency of existing gem. can use –ignore-dependencies option skip check. so change command gem uninstall -​-ignore-dependencies ruby-graphviz . p.s. should better use sudo or become directives instead of sudo command.

cordova - PDF viewer in phonegap that work cross platform -

i trying implement pdf viewer when should pdf url display in same application. use inappbrowser,pdf.js,mupdf none of them working. can me fix out? i don't know why said " none of them working " because of them work fine me. maybe should post more details can you. this post how display pdf file in same app in phonegap similar question. maybe you.

android - ViewStub not working in App widget -

below view stub trying use in widget layout app widgets. <viewstub android:id="@+id/test_viewstub" android:layout_width="50dp" android:layout_height="30dp" android:inflatedid="@+id/test_viewstub" android:layout_alignparenttop="true" android:layout="@layout/test_viewstub"/> the issue when add widget layout widget ui lost , 'problem loading widget' message displayed in place of widget. but when use same view stub in activity layout working fine. any suggestions or on issue. thanks in advance

html - How do I order multiple items from my database on the same row? -

i want have 4 items database listed on same row, of now, code putting break between each item. {% if latest_shoop_list %} {% shoop in latest_shoop_list %} <table> <tr> <td> <img src='images/{{ shoop.shoop_image }}' width='250'/> </td> <td> <img src='images/{{ shoop.shoop_image }}' width='250'/> </td> </tr> </table> {% endfor %} any appreciated! you can take table , row tags out of loop. <table> <tr> {% shoop in latest_shoop_list %} <td> <img src='images/{{ shoop.shoop_image }}' width='250'/> </td> {% endfor %} </tr> </table>

foreach - Netlogo - expected constant error -

i have line of code: set ssb sum [foreach [foglie [ipotetico? = false]] [((([media] of self ) - media-tot ) ^ 2) * ([larg] of self * [altez] of self)]] foglie agentlist; media-tot global variable i cannot figure out why gives me error: expected constant i found following loophole looks me not elegant , maybe slower: set ssb 0 ask foglie [ipotetico? = false] [ set ssb (ssb + (( [media] of self - media-tot) ^ 2) * ([larg] of self * [altez] of self)) ] what think? how can make first code work? is second code equivalent? a question include minimal example of problem. in case, in first attempt above, looks not understand difference between agentsets , lists, nor use of foreach . need read this. sum requires list input to make list bracket notation, need include constants; otherwise, use list putting agentset in brackets not produce list, above reason, if used list list containing agentset element, not list of agents foreach not return li...

Load image in PictureBox of Winform C# from SQL Server 2008 r2 -

Image
i using sql server 2008 r2 database , winform c# 2010. in table able save image winform. when tried view image, there error showing. table is create table [dbo].[tbl_image]( [id] [char](7) not null, [photo] [image] null) and data in table i trying show photo in piturebox using bellow code sqlconnection con; sqldataadapter adapter; dataset ds; int rno = 0; memorystream ms; byte[] photo_aray; con = new sqlconnection("user id=sa;password=123;database=dbtest"); adapter = new sqldataadapter("select [id],[photo] [tbl_image] [id]='0321253'", con); adapter.missingschemaaction = missingschemaaction.addwithkey; ds = new dataset(); adapter.fill(ds, "student"); if (ds.tables[0].rows.count > 0) { picturebox2.image = null; if (ds.tables[0].rows[rno][4] != system.dbnull.value) { photo_aray = (byte[])ds.tables[0].rows[rno][1]; memorystream ms = new memory...