Posts

Showing posts from September, 2013

coffeescript - calling 2 https requests simultaneously in hubot coffescript -

module.exports = (robot) -> robot.respond /log (.*)/i, (msg) -> group = "test" incident_message = msg.match[0] service_key = keys[group] curtime = new date().gettime() incident_key = "hubot/#{curtime}" reporter = msg.message.user.name query = { "service_key": service_key, "incident_key": incident_key, "event_type": "trigger", "description": "change log #{reporter}", "details": "#{incident_message}" } string_query = json.stringify(query) content_length = string_query.length msg .http("https://events.pagerduty.com/generic/2010-04-15/create_event.json") .headers "content-type": "application/json", "content-length": content_length .post(string_query) (err, res, body) -> result = json.parse(body) if result.status == "su

the amount of dynamic allocated memory a pointer would take in c++ -

i have program: #include <iostream> using namespace std; int main(){ const int size = 1000; typedef int* intpointer; intpointer ip; { ip = new int[ size ]; cout << "memory allocated " << endl << flush; } while (ip != nullptr); } this code suppose test amount of memory used ip every time loops. tried print out value of ip, memory address in hex believe, can see everytime loops once, address increase 4000 in dec. so, correct every ip take 4000 bytes memory? wondering if there function value of memory used every ip? if not, how size of cumulative memory use within loop? appreciate answer. thank you! i don't know why have allocate memory know this. to size of 1 pointer use below, cout << "memory allocated 1 intpointer :"<<sizeof(intpointer); to size of 1000 int* objects use below, cout << "memory allocated "<< size <<" intpointers :"<<sizeof(intpointer*size );

How to implement complicated animation at android platform -

  now developing android app, , there lots of animations , image resources, ui design , logic complex.   i tried use tween animation , android layout implement, code complex, , can't implement parts of animations. know how handle such complex animation @ android platform? dose android have tool flash tool design animation? in android 3 type of anmiations. 1)translateanimation an animation controls position of object 2)scaleanimation an animation controls scale of object. can specify point use center of scaling. 3)alphaanimation an animation controls alpha level of object. useful fading things in , out. animation ends changing alpha property of transformation check example.

Limit on number of subscriptions per azure account? -

i know can create multiple subscriptions per azure account. there limit on number of subscriptions in single windows azure account ? not i'm aware of. don't see @ http://msdn.microsoft.com/en-us/library/windowsazure/hh531793.aspx suggest limit.

assembly - Encoding ADC EAX, ECX - 2 different ways to encode? (arch x86) -

i'm looking through intel instruction set manual, , looks there 2 different forms of adc match/encode adc eax, ecx follows: adc r/m32, r32 (11 /r , encodes 11c8) or adc r32, r/m32 (13 /r, encodes 13c1) my question (given did math correctly), 11c8 , 13c1 equivalent? factors assembler consider in selecting 1 encoding on another? question perspective of implementing assembler, question in general, not particular hypothetical instruction. if it's lengthy answer, please point me in right direction attempts @ googling failed. this redundancy of instruction encoding. architecture use multiple parameters in instruction has this. think of risc architecture have add rx, ry, rz assigns sum of ry , rz rx can encode add rx, ry, rz or add rx, rz, ry , they'll equivalent. in x86 (normally) have 2 parameters each instruction can select direction between them since can store or read memory. if don't use memory can choose direction between 2 registers,

android - How to getItemID from sqlite with BaseAdapter? -

i have sqlite column defined this: public final static string s_id = "_id"; public final static string s_photopath = "photopath"; public final static string s_name = "name"; public final static string s_pos = "pos"; public final static string s_score = "score"; public final static string s_fixed = "fixed"; i'd getitemid sqlite helper class adapter class extends baseadapter. here code: public class page1listadapter extends baseadapter { private layoutinflater adapterinflater; public cursor mcursor; tagview tag; public page1listadapter(context context, cursor cursor) { super(); mcursor = cursor; adapterinflater=layoutinflater.from(context); } @override public int getcount() { return mcursor.getcount(); } @override public view getview(int position, view convertview, viewgroup parent) { if (convertview == null) { tag

android - How to set ImageView using Bitmap Array -

i'm doing 1 demo of getting image urls through json , after getting ulr i'm downloading images , display them gridview . storing downloaded images i'm using bitmap array , passing imageadapter . , want display images on next activity on imageview i'm using following code in second activity.. // intent data intent = getintent(); // selected image id int position = i.getextras().getint("id"); imageadapter imageadapter = new imageadapter(this); imageview imageview = (imageview) findviewbyid(r.id.full_image_view); imageview.setbackgrounddrawable(imageadapter.bm[position]); but giving me error the method setimagedrawable(drawable) in type imageview not applicable arguments (bitmap) . please tell me how can set image bitmap array imageview .. imageadapter class: public class imageadapter extends baseadapter { private context mcontext; public bitmap bm[]=new bitmap[4]; imageview imageview; // const

ipad - What ARM Floating Point Performance Comparison across the product line A9, A12, A15, A17, A53 etc -

i've been research relative performance of arm parts, , have found difficult come comparisons... new a12, a17 , 64 bit a53 a57s; what i've come far, based on linpack scores of different phone/tablets this: a9 = 32 mflops/core/ghz a15 = 100 mflops/core/ghz apple a7 = 350 mflops /core/ghz (!) so couple questions arise: where a12, a17, a53, a57 fit spectrum why apple's a7 floating point good? purely due 64bit internals, or else? those linpack results via java. below linpack results via c , java. see following lots more mflops speeds. http://www.roylongbottom.org.uk/android%20benchmarks.htm system arm mhz android linpackv5 linpackv7 linpacksp neonlinpack linpackjava mflops mflops mflops mflops mflops t1 926ej 800 2.2 5.63 5.67 9.61 n/a 2.33 p4 v7-a8 800 2.3.5 80.18 28.34 @g t2 v7-a9

ios - dateFormatter returns different dates according to device -

i have been using following code format date value: nsdateformatter *dateformat = [[nsdateformatter alloc] init]; [dateformat setlocale:[nslocale systemlocale]]; [dateformat setdateformat:@"yyyy-mm-dd hh:mm:ss"]; nsdate *mydate = [dateformat datefromstring:@"2014-03-06 06:42:21"]; here mydate object value different different devices. how can make mydate object value same, regardless of device. you need set date formatter's locale special locale of en_us_posix. [dateformat setlocale:[nslocale localewithlocaleidentifier:@"en_us_posix"]];

javascript - angular controller and http variable -

i have angular service uses $http json file. app.factory('jsonfile', function($http) { var promise; var jsondata = { get: function() { if ( !promise ) { var promise = $http.get('src/app_preprocess/data_json.js').success(function(response) { return response.data; }); return promise; } } }; return jsondata; }); and controller app.controller('firstctrl', function (jsonfile , $scope) { jsonfile.get().then(function(d) { $scope.header = d.data.package.item[0] }) }); this works well. my question why can not add outcome of http variable instead of scope so...? app.controller('firstctrl', function (jsonfile , $scope) { var output; output = jsonfile.get().then(function(d) { return d.data.package.item }); $scope.header = output[0]; }); because jsonfile returns promise , try use

bash - Excel xlsx password - remove or crack? -

i have excel file , set password 'bashing' @ keyboard.. i testing , pressed everything.. got me thinking, way crack/remove password? i'm not on sheet, mean actual file.. when click open xlsx file pop box comes asking password.. easy way around it? no there isn't. xlsx (which zip file) uses far superior encryption model earlier excel formats (e.g. xls ). in short, whole file encrypted opposed password hash being embedded in otherwise readable file. your hope write brute force cracker mimics bashing behaviour describe. (e.g. unlikely have mixed case etc.).

css - Vertically Align a Span within a TD -

Image
i running troubles css formatting of table columns bootstrap. normal td looks this: <td style="vertical-align: middle; font-size: 10px;"> <span class="edit-icon glyphicon glyphicon-pencil" style="vertical-align: top !important;"></span> content </td> with edit-icon class looking like: .edit-icon { float: right; padding-top: 3px; padding-right: 3px; } ideally, content in cell should centered vertically , icon should in top right corner. i've tried hours, no avail, figure out how align 1 element middle vertically , 1 element top vertically in same cell. to further display problem, here current look: here i'm looking for: any how solve css conundrum appreciated! single cell one way make span position absolute. see this fiddle . the changes (the height , width demonstration): css: table { position:relative; } td { height:300px; width:300px; backgrou

objective c - Make NSDate mutable -

is there way change value of nsdate without creating new instance of nsdate? i'd keep pointer same , replace underlying data. first idea sublass nsdate , adding property keeps nsdate value... i understand reasoning, yet think idea of mutable subclass dangerous: the problem frameworks don't expect nsdate instances change. thus, don't copy them in case of nsstring or other classes conforming nsmutablecopying . also, nsdate implements copy retaining same instance , returning it. you'd have override behavior which, again, might unexpected. the idea of nsdate (similar nsnumber ) represent immutable value. it's difficult imagine how , frameworks rely on fact.

iphone - Force particular rotation mode on a view controller -

hi have following scenario : 1) viewcontrollera >> pushes viewcontrollerb 2) in viewcontrollerb have 3 buttons auto , landscape, portrait. 3) if user clicks on auto button particular view controller should visible in portrait + landscape mode depending on orientation mode 4) if user clicks on landscape button particular view controller should visible in landscape mode irrespective of orientation of device. 5) if user clicks on portrait particular view controller should visible in portrait mode irrespective of orientation of device. forcing orientation on particular view controller i working on ios 7.0 both ipad , iphone. tried many links on stack overflow give suggestions 6.0 , doesn't work out in 7.0 can suggest me how achieve this.. try this.. create property orientationstyle nsinteger in appdelegate , change value of orientationstyle viewcontrollerb according button click. add below method in appdelegate. - (nsuinteger)application:(uia

Shadow beneath Android TextView -

Image
i've been trying add shadow effect beneath textview, reason, it's not working! layout xml given below. can please find out reason that? <textview android:id="@+id/textview1" android:text="hello world!" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentbottom="true" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:layout_alignparenttop="true" android:background="@drawable/myshape" android:shadowcolor="#ff0000" android:shadowradius="3" android:shadowdx="2" android:shadowdy="2" android:gravity="center" android:textappearance="?android:attr/textappearancemedium" /> myshape drawable: <?xml version="1.0" encoding="utf-8"?> <shape xmlns

reporting services - What should be data source to access ssrs local report using entity framework? -

i have made application entity framework.now want include local ssrs report in this..so please tell me should write in datasource.add() ??? employeeentities ent = new employeeentities(); rptviewer.processingmode = processingmode.local; localreport localreport = rptviewer.localreport; localreport.reportpath = @"c:\users\shoaib\documents\visual studio 2012\projects\testing\report project5\report project5\report2.rdl"; localreport.datasources.clear(); rptviewer.localreport.datasources.add("employeedataset", ent.employeeinfoes);error occurs rptviewer.refreshreport(); the code should be rptviewer.localreport.datasources.add(new reportdatasource("employeedataset", ent.employeeinfoes));

php - How to get last id for relationships in a transaction between models in Codeigniter? -

i have code inside function in user-controller. i'm, using codeigniter. $name_user = $this->input->post('contact-company'); $company_name = $this->input->post('name-company'); $company_orgnr = $this->input->post('orgnr-company'); $phone_company = $this->input->post('phone-company'); $email_company = $this->input->post('email-company'); //insert a new user $user_info = array( 'username' => $email_company, 'name_user' => $name_user ); $company_info = array( 'name' => $company_name, 'orgnr' => $company_orgnr, 'phone' => $phone_company, 'email' => $email_company ); //insert new user in db $query_insertuser = "start transaction"; //get sql inserting new user $um = new usermodel(); $query_ins

c++ - Writing Unicode string to XML with Boost Property Tree -

#include <boost/property_tree/ptree.hpp> #include <boost/property_tree/xml_parser.hpp> #include <string> using namespace std; int main() { wstring s(l"alex"); boost::property_tree::wptree maintree; boost::property_tree::wptree datatree; datatree.put(l"name", s); maintree.add_child(l"data", datatree); boost::property_tree::xml_writer_settings<wchar_t> w(l' ', 3); try { write_xml("data.xml", maintree, std::locale(), w); } catch(boost::property_tree::xml_parser_error& error) { cout << error.message().c_str() << endl; return 1; } cout << "ok" << endl; return 0; } this program prints ok , writes xml file expected: <?xml version="1.0" encoding="utf-8"?> <data> <name>alex</name> </data> now replace s value non-ascii characters: //w

php - Add something before custom post type in permalink -

how add example "en" (for english) before custom post typ in wordpress permalink? for example: http://example.com/en/post_type/postname i've tried plugin ( http://wordpress.org/plugins/custom-post-type-permalinks/ ), allows me change permalink structure after post type.

javascript - Add class with delay JQuery then remove and loop this function -

got problem need function work loop (or atleast think thats want). it works first time enter #nav , leave second time want enter navigation addclass function not working. $("#nav").mouseenter(function() { $(".desktop a").delay(300).queue(function(){$(this).addclass('showhidden')}); }); $("#nav").mouseleave(function() { $(".desktop a").removeclass("showhidden"); }); you need dequeue it: $(".desktop a").dequeue().delay(300).queue(function(){$(this).addclass('showhidden')}); and: $(".desktop a").dequeue().removeclass("showhidden"); or use: $(".desktop a").clearqueue().removeclass("showhidden");

java - RMI: ClassNotFoundException thrown while binding two remote objects to same registry -

i have 2 remote objects i'm trying bind same rmi registry. here's project structure: my first class(remoteserver1.java) package com.abc.rmi; import java.rmi.accessexception; import java.rmi.alreadyboundexception; import java.rmi.remote; import java.rmi.remoteexception; import java.rmi.registry.locateregistry; import java.rmi.registry.registry; import java.rmi.server.unicastremoteobject; import org.apache.log4j.logger; public class remoteserver1 implements iserver1interface{ private logger logger = logger.getlogger(remoteserver1.class); public void init(){ registry localregistry = null; iserver1interface server1 = null; try { int port = 1099; logger.info("service property rmiregistryport: " + port); server1 = (iserver1interface)unicastremoteobject.exportobject(this, 0); logger.info("locating registry"); localregistry = locateregistry.getregistry(); try { localregistry.list();

c++ - Mouse handling on PixelToaster lib -

i'm using pixeltoaster (a c++ library draw framebuffer) simple 3d (ehm.. 2.5d) raycasting engine. use old school wasd key configuration move camera around (w=forward, s=backward, a=turn left, d=turn right) want use mouse modern freelock approach (wasd moving , strafing, mouse turn head around). i noticed pixeltoaster gives mouselistener in absolute mouse coordinate x,y given (relative window width,height). using such coordinate system not want because turning stops mouse x coordinate reaches margin of screen. (in commercial games can turn around endlessly swiping continuously mouse in 1 direction). how can same behaviour using pixeltoaster mouse listener? what need simple implement. simply reset mouse pointer centre of screen when hit margins. note work should not "map" 2d screen space coordinates angular rotation of character. instead have accumulator keeps adding incremental changes in angle (calculated 2d screen space movements of mouse pointer).

Link URL that includes JavaScript -

Image
my scenario involve imgur: in imgur can link comments display style on comment chains set display , threads expand incredibly large different branches aren't relevant want link somebody. my question is: possible link comment this ...and have javascript activate hide child comments? usually click on comment or symbol left of collapse i'm wondering if there's way link automatically collapse person receives link. please don't try find solution scenario. need know how like: www.myurl.com/awebpage[javascriptcodethatwillrun] edit: seeing isn't possible wondering if possible: javascript in url bar: using window.location.href set url run javascript edit page locally after loads javascript:window.location.href=www.myurl.com/webpage;[code after page loads] okay, think understand want. want able automatically run javascript on third party site? this can not do. 1 browser goes next page, can not execute of code. if execute url via js, bro

windows phone 8 - datepicker in popup directly open when I click a button? -

Image
as described input datepicker in xaml file when run page ,datepicker show this: then have tap datepicker enter select page : now i need directly open fullscreen datepicker select page when click button the address give way can navigate select page, but don't know how ? i'm poster. i find solution myself override datepicker class our custom datepickercustom class. create new class "datepickercustom.cs" public class datepickercustom : datepicker { public void clicktemplatebutton() { button btn = (gettemplatechild("datetimebutton") button); buttonautomationpeer peer = new buttonautomationpeer(btn); iinvokeprovider provider = (peer.getpattern(patterninterface.invoke) iinvokeprovider); provider.invoke(); } } then in mainpage.xaml.cs private datepickercustom datepicker; // constructor public mainpage() { initializecomponent(); loaded += new routede

html - Internet Explorer 8 - title of the page showing on print -

Image
when print page ie8 includes page title on top of every page. chrome not show title. how hide title on print in ie ? thanks in advance. under print -> page setup, can choose elements of page should printed.

c# - bootstrap Jquery datepicker issues -

Image
i'm using datepicker such: $('#fromdate').datepicker({ "changemonth": true, "changeyear": true, "numberofmonths": 2, "onclose": function(selecteddate) { $('#todate').datepicker("option", "mindate", selecteddate); } }); $('#todate').datepicker({ //"defaultdate": "+1w", "changemonth": true, "changeyear": true, "numberofmonths": 2, "onclose": function(selecteddate) { $('#fromdate').datepicker("option", "maxdate", selecteddate); } }); i set default date in c# codebind such: var dt = datetime.now; todate.value = dt.toshortdatestring(); fromda

WSO2 Governance Registry not publishing Service into WSO2 API Manager -

on "publish" button click (current service state "production") getting below error in wso2 governance registry console. failed invoke aspect: exception occurred while executing handler chain. apimanager endpoint url or credentials not definedapi publish might fail** below wso2 gov reg configuration described in link . <state id="production"> <datamodel> <data name="transitionexecution"> <execution forevent="demote" class="org.wso2.carbon.governance.registry.extensions.executors.demoteactionexecutor"> </execution> <execution forevent="publish" class="org.wso2.carbon.governance.registry.extensions.executors.apistore.apistoreexecutor"> <parameter name="apim.endpoint" value="http://localhost:9763/store"

How to Create Wallpaper Slider App (Android) -

i new in android programing and want create image sliding / image slide show app, contains images. there 3 buttons in app: previous button: navigate previous image set wallpaper button: set current showing image as wallpaper next button: navigate next image this app should show provided images, should not show images phone / sd card. check following links hope it's work , him idea it: android how can implement 2 on click on image slider android how open slider images when onclick image , swipe fingers

javascript - horizontal menu li hover div content show -

i have 2 div elements in html page.left side div contains horizontal list of anchor elements.right side div contains content current anchor element on mouse hovers,it should change when hover mouse on link present in left side div.when hover mouse outside, last items content should display on right side div. any using javascript or jquery? you can add data-showdiv attribute link div id in it. put content div class , id in display:none; jquery : $('a.item').hover(function(){ $('.class').hide(); $('#'+$(this).data('showdiv')).show(); });

c# - open page to use navigation and token system to show a pdf file -

Image
i have download 1 mupdf project pdfreader , have changes. i stuck when click on list pdf file open return null navigation error. when going place click on list working.my code , fileinfo property correct problem in _navigation. please me... public void openfile(ifileinfo fileinfo) { if (isloading) return; _navigationservice.urifor<fileviewerpageviewmodel>().withparam(x => x.currentfileid, fileinfo.id).navigate(); }

Notice: Undefined index: elegido in C:\xampp\htdocs\cars\index1.php on line -

i have dynamic select category menu, error notice: undefined index: elegido in c:\xampp\htdocs\cars\index.php on line 30 , 40 & 48 makes menu not work properly. what causing error? lines 30, 40 & 48: 30 if ($_post["elegido"]==1) { 40 if ($_post["elegido"]==2) { 48 if ($_post["elegido"]==3) { here code <script ="javascript"> $(document).ready(function(){ $("#marca").change(function () { $("#marca option:selected").each(function () { elegido=$(this).val(); $.post("modelos.php", { elegido: elegido }, function(data){ $("#modelo").html(data); }); }); }) }); </script> <p>marca: <select name="marca" id="marca"> <option value="1">renault</option> <option value="2">seat</option> <option value="3&q

c++ - Accessing a vector from a DLL -

am working in project have build library , use library in main function.the library .dll , has 7 headers , 5 source files.in header declared vector , implemented in 1 of source files.since have access vector in main program declared global in source file , extern in header file.now after build dll , linked main program cannot able access vector showing "unresolved external".i don't know mistake working load time linking getting error during run time linking.please welcomed.my code this ntfs-struct.h ---- > library header _cdecl(dllexports) extern std::vector<std::string>files; ntfs-search.cpp ------ > library source file #include "ntfs-struct.h" vector<string>files; ---> global vector accessing in main program mft-list --- > main program #include "ntfs-struct.h" cout << "vector size" << files.size(); p.s since used dll link main program has run time linkin

What is the difference between if(isset($a)) and if($a) in php? -

what difference between if(isset($a)) , if($a) or if_exist($a) , if($a) in php? with $a = false; : if ($a) {} return false, whereas if (isset($a)) {} return true. i not know if_exist speak of. :) edit: please check @utkanos's answer excellent , more expansive explanation. :)

c++ - Macro or inline function to iterate over OpenCV matrices -

does opencv provide macro or function iterate on matrices without knowing channel depth? eventually implemented myself, wonder whether available somewhere within opencv source, or if there better way achieve same result? #define cv_eval(src,i,j,c,dst) \ if(src.depth() == cv_8u) { \ dst = ((uchar*)(src.data))[ i*src.step1()+ j*src.channels() + c]; } \ else if(src.depth() == cv_8s) { \ dst = ((schar*)(src.data))[ i*src.step1()+ j*src.channels() + c]; }

Using wildcard when listing files in directory with java -

why wildcard not work in java code below? request looks http://localhost:8080/app/dataaccess?location=dublin rob@work:~$ ls /usr/local/customappresults/dublin/*/.history /usr/local/customappresults/dublin/team1/.history /usr/local/customappresults/dublin/team2/.history /usr/local/customappresults/dublin/team3/.history servlet code (dataaccess.java). (dataaccess.java:27) refers loop .. protected void doget(httpservletrequest request, httpservletresponse response) throws servletexception, ioexception { file[] files = finder("/usr/local/customappresults/" + request.getparameter("location") + "/*/"); (int = 0; < files.length; i++){ system.out.println(files[i].getname()); } } private file[] finder(string dirname) { file dir = new file(dirname); return dir.listfiles(new filenamefilter() { public boolean accept(file dir, string filena

javascript - Disable zoom and links on google map -

i have disabled controls on google map , using following parameters , var mapoptions = { zoom: 15, center: new google.maps.latlng(latitude,longitude), maptypeid: google.maps.maptypeid.roadmap, disabledefaultui: true, draggable: false, zoomcontrol: false, scrollwheel: false, }; but user can still zoom in , zoom out map using double click. there popups on map displays information place. how can disable double click zoom in , popups gives information. there missed in settings ? update finally got solution disabling popups , links on google map here . here demo call function when map finished loading. function fixinfowindow() { var set = google.maps.infowindow.prototype.set; google.maps.infowindow.prototype.set = function (key, val) { if (key === 'map') { if (!this.get('nosupress')) { return; } } set.ap

HTML create shorthand for multiple spaces -

i have write documentation program in classis html (no css/xml etc.). problem appears when have enter multiple spaces/tabs in document. since there no "tab" in html, using 4 non-breakable spaces tab character. however, when need 2 tabs, becomes repetitive enter &nbsp; 8 times. is there possibility create/define custom shorthand/shortcut notation this, e.g. instead of entering &nbsp; 8 times, can use &_8nbsp; create 8 inline spaces ? to respect whitespace in html, can use pre element or equivalent css ( white-space: pre ).

XCode Debugging - how to observe a certain object without breakpoint -

let's there object want keep eye on, meaning want know current values of member fields of object while use app - can somehow without having set breakpoint within routine has reference object? for example, somehow possible breaking debugger in moment object created, somehow keep open view particular object within debugger see how variables change? i know it's possible set watchpoints break whenever variable changes, becomes difficult work variables change - i'd rather have live view of objects content. hope question understandable. good thought. been long time after question asked. off course it possible. can use watchpoints in xcode 5 onwards. watchpoints pause program if value getting accessed. you can set watchpoints in 2 ways given below. ( 1 ) use following lldb command (lldb) w s v self->_your_variable ( 2 ) select left debugging pane. select variable want watch, select on option watch "_your_variable". hope you.

webview - Adding dynamic web views in android -

i going through various links on topic. haven't found useful in case. want create web view in android dynamically. add nothing onto xml layout file. want 2 things in particular: 1. want set size of web view custom width , height , set @ bottom of layout. 2. once page loads in web view. on click on web view should resize , go full screen(which means fill_parent on width , height web view in parent layout). my current code looks below not work particularly full screen not fit content screen: public class mainactivity extends activity { relativelayout layout; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); layout=(relativelayout)findviewbyid(r.id.test); final webview web = new webview(this); //web.setid(1); web.getsettings().setjavascriptenabled(true); web.loaddata("<script type=\"text/javascript\&

cmd - Matlab, dos() command : files remain "in use" -

after executing simple commands like dos('copy *.txt new.txt', '-echo') dos('echo. 2 > emptyfile.txt', '-echo') i tried delete folder in these files created. however, windows gives me message "cannot delete "foldername": folder being used person/program". have close matlab make work. how solve this? guess it's closing "session" of cmd commands... what you're not showing change of working directory folder. windows won't let delete folder process has current working directory. the solution simple: change working directory out of folder. say: cd('..')

3d - Cesium JavaScript Globe Setting Night Image -

i used able set night image centralbody, no longer available in latest version downloaded - b26. is there alternative previous: centralbody.nightimagesource or increase overall brightness reduce shadow opacity previous: centralbody.daynightblenddelta and centralbody.nightintensity ? this feature removed on year ago (in b11) pull request #348 . currently, night shading supported cesium via centralbody.enablelighting property; example if you're using viewer widget can enable lighting with viewer.centralbody.enablelighting = true; . being said, plan put similar capability. you can read more @ linked pull request, summarize, reason removed because major performance killer, not in overall framerate in shader compile , link time well, caused startup extremely slow. removing cleaned overall code tremendously. (the cesium team) plan on re-introducing capability in future, using different techniques , fixing of usability issues old implementation (such fadi

jquery - In Joomla 3.2 for Unite Revolution Slider, the first slide is coming , then others are not coming. Only taking the space for slide -

i installed unite revolution slider on joomla 3.2 administrator part. assigned unite revolution slider module specific postion mentioned in template's templatedetails.xml. on front end, sliders not coming . sliders coming top of page, not coming @ exact position mentioned. not this, 1st slide's image being placed @ proper postion after coming top. other slide's images becoming hidden after coming top once. here attaching how slide coming. on top slider image coming, under exact position, should come, not coming:

What would be the alternative to active objects in jira plugin development? -

this issue here says trasnactions don't work in jira. i guess means active objects useless, , unusable in production environment. so alternative? i'm new jira plugin development, , i'm working on first project, doing java backend part. had hard time getting active objects stuff work, , spent(wasted?) week on it. i need full database support, moving key-value pair system not enough. any appreciated. edit, trying clarify: i'm creating plugin jira, enables track users time logging. want save users input of worktime data, , show in meaningful way. (warning) please note, jira not support transactions active objects (as of jira 6.0). public void somemethod(final activeobjects ao) { ao.executeintransaction(new transactioncallback<object>() { @override public object dointransaction() { // ao. according docs, not run in transaction. return null; } }); } so if still want use d

Error in determine positive\negative number in JAVA -

below snippet find sign(+/-) of number without using > or < conditional operators basically! scanner s = new scanner(system.in); int n = s.nextint(); /**take user input / /* stretch user input either of infinity */ n *= double.negative_infinity; /* compare result */ if(n == double.negative_infinity) { system.out.println("number positive "); } else if (n == double.positive_infinity ) { system.out.println("number negative" ); } else { system.out.println("could not determine number type!!" ); } i added system.out.println("nmbr , negtive infinity : "+n+" "+double.negative_infinity); for user input : -12, shows : /* ideally should "infinity -infinity" according me */ nmbr , negtive infinity : 2147483647 -infinity after doing multiplication see resultant value, reason. dont nmbr equal infinite value 2 questions : when ta

java - Eclipse Bug on My PC only -

the code works on of other pc's have used before, , after, reasons when run on computer has odd bug. when click on square , circle new colour of square clicked on become colour of background circle clicked on, not fill of circle actual background. also when circle clicked on first time there outline of blue circle right of circle clicked on. please need can code on computer, , able coursework. have switched between computers use 1.6 , 1.7 , changed them work, , okay. have seen pc, have updated of java programs can (jdk, drivers graphics card, eclipse) cant seem figure out. import java.awt.*; import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.awt.event.mouseevent; import java.awt.event.mouselistener; import java.awt.geom.ellipse2d; import java.awt.geom.rectangle2d; import java.awt.geom.rectangularshape; import java.awt.graphics2d; import java.util.random; import javax.swing.*; public clas

Rollback Update Operation in SQL Server -

i executed update operation every row in table mistake. there way can take back? use sql server 2005. i ran same situation latter used third party tool , worked ! http://www.apexsql.com/sql_tools_log.aspx read thread might help and.. if have executed update query , want roll back,your real option restore database backup. if using full backups, should able restore database specific point in time.

jqgrid add row without url instead call a javascript function on popup submit -

i displaying data using jqgrid, have used jqgrid('navgrid', '#pager', {add:true. edit:true, delete:true}... screen displays different icons on screen top left (for add, edit, delete) instead of using url, want call function on submit button of popup, manipulations on data , make ajax call. i tried search on internet, not find solution. thanks, shivey

windows - Is it safe to remove .pdb directory from a symbol storage if I don't use them anymore? -

my local symbol storage directory contains plenty of files i'd erase (because think unused) or move separate directory. i'm know agestore , symstore can used trim symbol storage - neither seems support use case of removing information specific files symbol storage. my local symbol storage looks like d:\symbols\ +-> 000admin\ +-> myownlibrary.pdb\ | +->123456789\ | +->abcdef\ +-> vc60.pdb\ | +->123456789\ | +->abcdef\ ... +-> ws2_32.pdb\ | +->123456789\ | +->abcdef\ ... is safe remove directories vc60.pdb , beneath altogether, or break fetching symbols/binaries symbol storage?

php - Let a div get a value from a fetch-array-table row after click on a cell with jquery -

first want question related jquery replacewith data ajax after click on cell , if against rule sorry , delete post. i tried value of cell in mysql-generated table (with fetch_array). want click on cell in same , receive value of first cell in row in div-container. thanks several entries here found example "static" tables. this: <table id="choose-address-table" class="ui-widget ui-widget-content"> <thead> <tr class="ui-widget-header "> <th>name/nr.</th> <th>street</th> <th>town</th> <th>postcode</th> <th>country</th> <th>options</th> </tr> </thead> <tbody> <tr> <td class="nr"><span>50</span> </td> <td>some street 1</td> <td>glasgow</td> <td>g0 0xx</td> <td>unit