Posts

Showing posts from July, 2010

javascript - Pagination in Angular UI Bootstrap -

there following code: <pagination total-items="20" ng-model="2" items-per-page="5" data-boundary-links="true"></pagination> i hoped code showed me 4 pages ( 20 / 5 = 4), got 1 page in pagination. what's wrong? in advance.

performance - Improving Matlab function within big simulation -

i have big matlab simulation project in hands, wanted optimize, since i'm running many times tune parameters , like. using matlab's profile identified 1 function eating of time, line output(i,1)= max(mean(dens(i+1:a,1)),dens(i+1,1)); this function called lot , input 10x1 double passed argument, , output 10x1 vector. function output = my_function(input) = size(input,1); output = input*0; dens = density(input); % each i, output(i) maximum between output(i+1) , mean(output(i+1:end)) = 1:a-1 output(i,1)= max(mean(dens(i+1:a,1)),dens(i+1,1)); end output(a,1) = dens(a,1); end my ideas: i think vectorization maybe rid of loop (?), i'm not familiar @ technique. is there faster/alternative way calculate mean (maybe without matlab's built-in function call?) edit tried vectorize function, , got following alternative result, performs same operations: function output = my_function_vectorized(input) = size(input,1); rho_ref = zeros(size(input));

java - How to display a custom dialog in netbeans JFrame editor? -

i using jframe feature in netbeans in order make simpler customize , edit. in program, clicking button calls action displays dialog box. want have image inside of dialog box. in netbeans along jframe editor can add boxes , customize them, along dialog box. means easier edit dialog box. how call custom dialog box display when button clicked? to put more without need puting code. have created cusome dialog box in netbeans gui builder. now, how call/use custome dialog box inside of actual jframe, coded inside netbeans gui editor, , located inside same package , all. first drag , drop swing windows >> dialog. inside code write line show jdialog1.setvisible (true); after double click on dialog design , add many components like best wishes

active directory - Is it possible to athenticate using Kerberos against a Kerberos enabled domain controller? -

we configuring siebel authenticate against microsoft active directory kerberos enabled. kerberos authentication not enabled in siebel under unix we're planning use simple authentication. it possible authenticate microsoft active directory without kerberos when kerberos enabled in domain controller? best regards, yes, can authenticate microsoft active directory without kerberos, using either ntlm or ldap. ntlm though, disabled default in ad 2008 , above. ldap authentication through bind calls can used application servers can't ether ntlm or kerberos. classically, ldap meant directory lookup protocol , not meant authentication protocol. typically, these scenarios involve application servers running on non-microsoft platforms. advised kerberos secure protocol of 3 , industry standard authentication.

internet explorer 8 - IE8 not prevent javascript alert? -

i using simple javascript function openalert(){ alert("hello world!"); } setinterval(openalert, 200); in chrome & firefox there option prevent page creating additional dialogues if check popup or alert diasable showing i've tested in internet explorer 8 , can't find option there. possible ie8 shows prevent javascript alerts.

javascript - AJAX returns previous value in array -

i'm making website host artwork. idea when page loads have javascript run php file makes query server names , ids of image files (artwork.jpg) , display them thumbnails on page. when scroll on thumbnail, artwork displayed larger on different part of screen , description, specs, etc piece of art fades in. issue when make second ajax call appends value of moused on image screen , nothing until you've moused on @ least 2 images. here's code first ajax call appends thumbnails page , creates form value of thumnbnail's id: function getartdescriptions() { $.post('../../path/to/script/get_art.php', function(json) { if (json.art.length > 0) { $.each(json.art,function() { var info = '<div class = "thumbnail_box">' + '<img src = "images/thumbnails/' + t

javascript - AngularJS Parameter in redirectTo escaped "?" breaks route -

i redirect error page parameter. gets encoded /error%3ftype=404 . this breaks routing. route never active. typing or location works charm. otherwise( { redirectto: "/error?type=404" }); you shouldn't manipulate ? in url through routing. rather, can use $location service in manner: $location.path('/error').search('type', 404) refer question more details: how pass "question mark" in url javascript

tfs2012 - TFS custom build process activity assemblies per branch -

what do if want 1 tfs 2012 build controller have access 2 versions of same custom build process assembly (one each of branches)? i have 1 build process template per branch, , 1 build definition per branch. each branch has it's own custom build process assembly, have same assembly name , namespace (e.g. company.build.activities.dll). (i realize make of go away having different names each branch's assembly, e.g. company.build.activities.dev.dll , company.build.activities.com.dll) my build controller points 1 location "version control path custom assemblies" ($/build/fortfs). tried putting 2 assemblies under different subfolders, build process causes error: tf215097: error occurred while initializing build build definition \company\dev_builddef: exception message: cannot set unknown member 'company.build.activities.lastactivity.customfolderpath'. (type xamlobjectwriterexception) it seems it's using wrong copy of assembly (customfolderpath de

ios - Adjust UIView inside UIScrollView MultiOrientation -

Image
in app receive image dynamically. after process image need add views on top of image (after user can drag views). accomplish that, put image on uiimageview , add views on uiimageview. according on dimension need adjust uimageview fit screen, but maintain original scale. . user can make zoom. the main problem appears when user rotate device. need adjust uiimageview , it´s subviews correctly maintain relationship image. for example in portrait: and lanscape: my doubts: correctly adjust uiimageview´s size, maintainig it´s original scale. adjust subviews maintain relation position uiimageview. thanks in advance

c# - Hybrid App development - iOS, Android, Windows Phone AND Desktop? -

i'm developing application on own want run web app, , on ios, android, windows phone , desktop application. the easiest way can see achieve develop hybrid app in visual studio in angular/ionic take care of mobile devices. for desktop app intending on creating c# application acted container web control deploy html/js/css in it. i'll replace ionic bootstrap layout means can keep 90% of js code between apps saving me lot of time. the reason need native desktop app needs access wcf communicate other parts of suite. i've looked @ metro apps they're horrific, having business application demands full screen isn't gonna good. know there options "fixing" metro apps still doesn't give need(like being able minimize tray & wcf) is workflow you'd expect or missing obvious? why not build app single page web application begin with, using angular.js , bootstrap (it "mobile first" framework after all)? run same app, minor change

windows - Change start -> run -> chrome to include switches -

i've looked around internet way use windows's windows+r shortcut run chrome (or app) with default command-line switches. my wife , share windows user, in chrome, have separate users don't have share settings, bookmarks, etc. chrome has switch --profile-directory="[somedir]" allow set user when it's run. i'm 1 uses windows+r shortcut, i'd set default setting, when type "chrome", run chrome instance user, regardless of last chrome window opened (which how decides user run). it looks right place make change in registry: hkey_local_machine\software\microsoft\windows\currentversion\app paths\chrome.exe if edit (default) key include --profile-directory="default" , windows can't find path, presumably because puts quotes around whole thing when press enter on run dialog box. using akin sql injection , adding strategically placed quotes doesn't work either--my guess escapes them. msdn hints might able add command-l

Google Sheets - Array Formula -

okay i'm trying simple yet still boggles me. in column a, have subsections or categories (1 / 2 / 3) etc. in column b, want setup arrayformual following. column a, , grab last subsection used. works when copy , paste formula in each row, want setup array automatically fills out sheet. =arrayformula( index( indirect("a$1:a" & row()), match(9.99999999999999e+307,indirect("a$1:a" & row())) ) ) link: https://docs.google.com/spreadsheets/d/1obpnq2teoif9ycgxshztonqv1azpcvcf15dhzc-eaxa/edit?usp=sharing maybe somehting this: =arrayformula(if(row(a:a) <= max(if(not(isblank(a:a)), row(a:a))),vlookup(row(a:a),filter({row(a:a),a:a},len(a:a)),2),))

java - Syntax problems in Matrix addition and multipication program -

i trying compile program entered 2 3*3 arrays , multipyling , adding both of them. giving me errors @ end due not running. cant remove these errors , need regarding how can remove them. import java.util.scanner; public class matrix{ public static void main(string [] args){ int [][]= new int [3][3]; int b [][]= new int [3][3]; int c [][]= new int [3][3]; int d [][]= new int [3][3]; scanner in= new scanner(system.in); system.out.println("enter numbers in first matrix"); for( int r=0; r<3; r++){ for( int c=0; c<3; c++){ [r][c]= in.nextint(); } } system.out.println("matrix 1 : "); for(int = 0; < 3; i++) { for(int j = 0; j < 3; j++) { system.out.print(" "+ a[i][j]); } system.out.println(); } system.out.println("enter numbers in 2nd matrix"); for( int n=0; n<3; n++){ for( int m=0; m<3; m++){ b [n][m]= in.nextint(); } } system.out.println("matrix 2 : "); for(int k = 0; k < 3; k++) { for

segmentation fault - C++ deque throwing Segfaults -

i have code project doesn't seem working. i trying make deque (of struct) static member of class. skeleton/basic code follows (i have retained datatypes - my_typedef_fn data type got typedef-ing function pointer) : 1.h file : class { struct bstruct { char * b_name; my_typedef_fn b_func; } static std::deque<bstruct> a_deque; static void func(); } 1.cpp file : std::deque<a::bstruct> a::a_deque; void a::func(char * name, my_typedef_fn fn) { a_deque.push_front((bstruct) {name, fn} ); // <<<< segfault ! } from understanding - .h file declares stuff (as usual) - first line in .cpp initializes static member a_deque - function func adds stuff deque using push_back but segmentation error @ line push_front called (found using gdb). also, when print a_deque.size() before push_front 4294967264 before segfault , when count number of elements in deque using loop : int counter = 0 for( std::deque<bstruct>

Force Facebook OG Image Consistency -

Image
facebook og image stuff nightmare. how tackle keeping images consistently appearing on facebook right? struggling default image setup forum of website. forum in phpbb. have added code header. <meta property="og:image" content="https://fyxtrpg.com/wp-content/gallery/assets/fyxt-rpg-forum-default-facebook-image.jpg" /> <meta property="og:image:type" content="image/jpeg"> <meta property="og:image:width" content="484"> <meta property="og:image:height" content="252"> the image set exact size supposed be. tell facebook that. still chops off both ends. i error saying can't download image or small. not small, exceeding 200px min. listed in debugger , showing facebook can indeed download fine. my url: https://fyxtrpg.com/fyxt-forum/viewtopic.php?f=7&t=128 facebook debug info time scraped 2 seconds ago response code 206 fetched url https://fyxtrpg.com/fyxt-forum/vi

change to columns and remove columns csv shell -

i have csv file containing several hundred lines of data. want able insert line on top remove columns has name data , put name of data on top of data value column. , convert text columns delimited space. looking have done in shell. see before , after exp below. before: 1 line of data work_needs_to_get_done_001 time 25000000 runs 28908331 other_data1 89708097 work_needs_to_get_done_002 time 25000000 runs 27285458 other_data1 89708097 work_needs_to_get_done_003 time 25000000 runs 27284897 other_data1 89708097 work_needs_to_get_done_004 time 25000000 runs 27280741 other_data1 89708097 after: individual columns delimited space workname time runs other_data1 other_data2 work_needs_to_get_done_001 25000000 28908331 89708097 89708097 work_needs_to_get_done_002 25000000 27285458 89708097 89708097 work_needs_to_get_done_003 25000000 27284897 89708097 89708097 work_needs_to_get_done_004 25000000 27280741 89708097 8970

image processing - Homography estimation from consecutive video frame lines gives bad results -

i trying build program detects offside situation in football video sequence. in order track better players , ball need estimate homography between consecutive frames. doing project in matlab. able find enough corresponding lines between frames seems me resulting homography isn't correct. i start following situation, have these 2 processed images (1280x720 px) corresponding lines: image 1 , image 2 . lines derive hough transform , of form cross(p1, p2) , p(i) [x y 1]' , 0 < x,y < 1 (devided image width , height). lines normalized too, devided third component). before lines normalization (just after cross product) have: lines frame 1 (one line per row). [ -0.9986 -0.2992 0.6792 -0.9986 -0.4305 0.5686 -0.8000 -0.4500 0.3613 -0.9986 -0.1609 0.7890 -0.9986 -0.0344 0.9074 -0.2500 -0.2164 0.0546] these lines frame 2: [-0.9986 -0.2984 0.6760 -0.9986 -0.4313 0.5678 -0.7903 -0.4523 0.3587 -0.9986

java - No header mapping was specified, the record values can't be accessed by name (Apache Commons CSV) -

i got error message happening when i'm trying read csv: exception in thread "main" java.lang.illegalstateexception: no header mapping specified, record values can't accessed name @ org.apache.commons.csv.csvrecord.get(csvrecord.java:99) @ mockdata.mockdata.main(mockdata.java:33) java result: 1 i'm using apache commons csv library 1.1. tried googling error message , thing code listing on sites grepcode. here's code: package mockdata; import java.io.fileinputstream; import java.io.filenotfoundexception; import java.io.ioexception; import java.io.inputstreamreader; import java.io.reader; import org.apache.commons.csv.csvformat; import org.apache.commons.csv.csvrecord; public class mockdata { /** * @param args command line arguments */ public static void main(string[] args) throws filenotfoundexception, ioexception { reader in = new inputstreamreader(mockdata.class.getclassloader() .get

ASP.NET MVC5 website and TypeScript app together on Azure -

i have 2 projects. 1st 1 asp.net mvc5 website king of administration panel. in same solution exists html typescript application works using ajax . it's client-like displaying data based on configuration made in admin module , database data. i publish them both 1 website in windows azure cloud. don't know how when have 2 projects. unlucky finding information in google :( i hope don't need move typescript project files asp.net mvc5 :/ hope don't need move typescript project files asp.net mvc5 :/ you should that. how else web app serve generated js if it's not part of webapplication.

Android Alert Dialogs -

i have class: public class fh_topodialog extends dialogfragment{ @override public dialog oncreatedialog(bundle savedinstancestate) { alertdialog.builder builder = new alertdialog.builder(getactivity()); layoutinflater inflater = getactivity().getlayoutinflater(); /* options */ this.setcancelable(false); builder.seticon(r.drawable.logonofill); builder.settitle("topo contour"); final charsequence[] items= {"stuff"}; builder.setmultichoiceitems(items, null, new dialoginterface.onmultichoiceclicklistener() { @override public void onclick(dialoginterface dialog, int which, boolean ischecked) { } }); builder.setpositivebutton("done", new dialoginterface.onclicklistener() { public void onclick(dialoginterface dialog, int id) { dialog.dismiss(); } }); builder.setnegative

excel - Attachment on IE email -

i trying send email (using microsoft 365) attachments automating ie using excel vba, trying add attachments , getting confused. in microsoft 365 email attachment can added clicking on insert attachment in sub-menu or dragging file directly body of email. have tried autoumating clicking of insert reffering following html code object: <button autoid="_mcp_8" type="button" class="_mcp_j1 ms-font-weight-regular includebutton o365button ms-font-color-neutralsecondary" tabindex="0" aria-label="insert" aria-haspopup="true" aria-disabled="true" aria-owns="_ariaid_118" aria-flowto="_ariaid_118"><span class="_fc_3 owaimg _mcp_l1 wf wf-size-x16 wf-owa-attachment wf-family-owa ms-font-color-neutralsecondary" role="presentation"></span><span class="_fc_4 o365buttonlabel _mcp_k1 _fc_2">insert</span></button> but error, following html cod

php - Stuck trying to create a login using object-orientation -

i following tutorial create login , register using oo php. https://www.youtube.com/watch?v=ativjv-kx5c&list=plfdtiltirhwf5rhuk7k4uau1_ylazzhwc#t=364 when enter in correct username , password displaying blank screen. far have been able follow videos minor issues have been able fix. this code have login page, can see wrong it? <?php require_once 'core/init.php'; if(input::exists()) { $validate = new validate(); $validation = $validate->check($_post, array( 'username'=> array('required' => true), 'password'=> array('required' => true) )); if($validation->passed()) { $user = new user(); $login = $user->login(input::get('username'), input::get('password')); if($login) { echo 'success'; } else { echo 'loggin failed'; } } else { foreach($validation->errors() $error) { echo $error . '<br>&#

c# - Human readable URL Scheme for ASP.NET MVC -

my asp site has database full of events. currently, action on controller linking particular event has url like: "mysite.com/events/5" this default behavior, , i'm looking how make url more like: "mysite.com/events/some-event-name-that-makes-sense i have plenty of properties on event entity map url, not sure how apply it, , how allow action find when linking it. what you're referring called slug. however, can't use old property on model stuff url. typically, you'll have separate property called slug store url-safe version of title or name of object. once you've done this, it's simple matter of using generate urls , objects. for example, have had like: url.action("events", new { id = item.id }) you'd use instead: url.action("events", new { slug = item.slug }) then, modify action accept slug instead of id , use query event: public actionresult eventdetail(string slug) { var evt = db.events.sin

python - accessing a list of tuples in html -

i have list of tuples called top_5 top 5 users usernames , corresponding post count. this list has 5 items , each item has 2 indexes. {% user in top_5 %} {{ user }} {% endfor %} returns user , post count there way can them separately? is django template? can access index values in django template using dot notation: {% user in top_5 %} {{ user.0 }} {{ user.1 }} {% endfor %} and mentioned in comments, unpacking tuples option: {% username, post_count in top_5 %} {{ username }} {{ post_count }} {% endfor %}

ruby - How to read an external YAML file on the internet and output to XML -

i need able make ruby application (no rails, if possible) opens external yaml file has on 104k lines of code in it, reads , filters out following 3 things: !ruby/object:evtevent !ruby/object:nwspost !ruby/object:asset and outputs these things xml file have built ruby program. i unclear how start setting up, junior-level developer 1 year's experience. although found on stack overflow shows snippet of code example on using nokogiri, don't know put code have modify situation: require 'yaml' require 'nokogiri' yaml = "getorderdetails: id: '114' name: 'xyz'" doc = yaml.load yaml output = nokogiri::xml::builder.new |xml| xml.product{ xml.id doc["getorderdetails"]["id"] xml.name doc["getorderdetails"]["name"] } end puts output.to_xml #=> <?xml version="1.0"?> #=> <product> #=> <id>114</id> #=> <name>xyz</name> #=> </product&

javascript - Does AngularJS store a value in the $error.maxlength object? -

i've got ui page setup through angular, , i'm trying take advantage of built in ng-maxlength validator on input element. long story short, know $scope.form.$error , how object has maxlength property in case validation fails. want display error message specific character length violated, , don't see anywhere length specified stored on object. know if it's possible access this, don't have write out separate error message each input has max length violated? edit: answer question, yes angular store boolean value in $error object accessible via key(s) set in object. in case of code provided below , in th jsfiddle, setting key angular, , value of either true or false. be mindful when setting value reversed. ex. $setvalidity( true ), flips $error false. ok, here think looking for... in angularjs v1.2.13 not have access ng-message or $validator pipeline, why are using $formatters , $parsers. in case, using named inputs, perhaps in case need dynamic

mysqli - How to migrate data from Table 1 to table 2 using php -

i want migrate data table 1 table 2 the same tables have same field_names , structure i used query: $sql1 = $mysqli->query("select * `table_1`"); while($data = $sql2->fetch_object()){ $sql2 = $mysqli->query("insert table_2 ('field_1','field_2','field_3') values('$data->value_1','$data->value_2','$data->value_3')"); } table_1 have 3000 records problem here query insert 700 records , gives me error message: fatal error: maximum execution time of 30 seconds exceeded in d:\xampp\htdocs\assadara-group.com\t2t.php on line 3 put following line in start of php code ini_set('max_execution_time', 0); you can change 0 (mean unlimited time execution) number in seconds (300 = 5 minutes) for more info. php manual http://php.net/manual/en/function.set-time-limit.php

c# - XML Deserialization from a StringReader Crashes -

i'm trying build simple c# app download latest rub-usd exchange rate. www.cbr.ru provides web service pull information from. first calling function latest exchange rate date. using datetime make call exchange rate on particular date. i'm able pull exchange rates xml , display through stringreader. used pasted xml classes create class using xml. when doing coding, seems working, rates variable autosuggests expected attributes, i.e. rates.vname, rates.vcode, etc... program crashes (generic windows error message - "newexchangerateservice has stopped working") when gets deserialization step. here's i've got, lines part of process , can ignored... public form1() { initializecomponent(); cbr.ru.dailyinfosoapclient rublesclient = new dailyinfosoapclient(); datetime lastrub = rublesclient.getlatestdatetime(); messagebox.show(lastrub.toshortdatestring()); var rubratexml = rublesclient.getcursondatexml(lastrub); dataset rubrate =

Facebook SDK android, get connected accounts -

a facebook user can control multiple pages. example, user can have personal facebook account, public figure page , business page. shows 3 distinct accounts own user information in facebook's server. i want list these things, how can retrieve these accounts using facebook sdk? i feel has request.newmerequest method, returns graphuser object. and request.newmyfriendsrequest returns list of users, not list of personal account's connected accounts. edit using this new com.facebook.request( session, "/me/accounts", null, httpmethod.get, new com.facebook.request.callback() { @override public void oncompleted(com.facebook.response response) { if(response!=null && response.getgraphobjectlist()!=null){

objective c - taking a picture in iOS app -

i cannot seem right. ive looked @ several tutorials no luck. realize simple task, why confused on why isnt working me. have programmatically made button inside expanding cell , when press it, suppose access camera take picture. have code: - (void)buttonpressed:(uibutton *)button { uiimagepickercontroller *picker = [[uiimagepickercontroller alloc] init]; picker.sourcetype = uiimagepickercontrollersourcetypecamera; [picker setdelegate:self]; //picker.allowsimageediting = no; [self presentmodalexpandingcell:picker animated:yes]; picker.showscameracontrols = yes; } the error appears in line 5. , says "no visible @interface 'expandingcell' declares selector 'presentmodalexpandingcell:animated:'" have "" in .h file have no idea do. appreciated. in advance. have declared method "presentmodalexpandingcell" in class? because, if not, why compiler throwing error.

php - JavaScript not Initializing in Drupal Block -

i have following fiddle: http://jsfiddle.net/vyblx/125/ the purpose update thumbnail appropriate selection in dropdown menu. i'm attempting implement piece of code inside of drupal block dropped specific page. the page implemented on is: http://sulzbachercenter.org/fundraisers/give-a-good-night in order implement code, i've rewritten js separate file , called this: <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="http://sulzbachercenter.org/sites/default/files/ggn_js/dyn.js"></script> the block can run php , html fully, know that's not issue - i'm out of troubleshooting ideas. can see why code won't work in drupal environment? the jquery selector looking '#dynselect', combobox in form not have 'id'. you can either add id="dynselect" combobox. or change $('#dynselect'

ruby on rails - Sorting and grouping array, hash with all items appears at the end -

i have table leaflets data sorted date in controller: @leaflets = leaflet.order(:date) and grouped dates in view (i found code somewhere on internet) <%= @leaflets.group_by(&:date).each |date, leaflets| %> <p><%= l(date, :format => '%a, %d %b %y') %></p> <!-- localized date formatting: weekday, day month year --> <table> <tr> <% leaflets.each |leaflet| %> <td style="border:dotted 1px; padding:5px;"> <strong><%= leaflet.place %></strong><br/> <%= leaflet.description %><br/> <%= link_to "zapisz siÄ™", leaflet_path(leaflet) %> </td> </a> <% end %> </tr> </table> <% end %> everything works great, prints items hash @ end: {tue, 11 nov 2014=>[#<leaflet id: 14, date: "2014-11-11", place: "miejsce11-11-a", description: nil

xml - android error in listview -

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/list_row_selector" android:padding="8dp" > <!-- thumbnail image --> <com.android.volley.toolbox.networkimageview android:id="@+id/thumbnail" android:layout_width="80dp" android:layout_height="80dp" android:layout_alignparentleft="true" android:layout_marginright="8dp" /> <!-- movie title --> <textview android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_aligntop="@+id/thumbnail"

c++ - WinAPI's control's positioning not working? -

when tried set static control position @ 0, 0 , size same window's size worked fine. control placed same window, when tried make control smaller , place there's equal amount of space on every side of control didn't work. @ top there more space @ bottom , on left side ther more space on right side. please tell me how wanted do? code using: 1: ghstatic = createwindowexw(ws_ex_clientedge, l"static", l"foo", ws_child | ws_visible | ss_center, 0, 0, 300, 300, hwnd, nullptr, hinstance, nullptr); 2: ghstatic = createwindowexw(ws_ex_clientedge, l"static", l"foo", ws_child | ws_visible | ss_center, 75, 75, 150, 150, hwnd, nullptr, hinstance, nullptr); are using createwindowexw function change size of hwnd? cannot use function change hwnd size, used create controls, because trying recreate created. try use movewindow function change position , size of hwnd: movewindow(yourhwnd, x, y, w, h, true); movewindow(ghstatic, 75, 75,

How can we deal with large number in vb.net -

Image
i have large number , when run below code doesn't handle it, should ? number = number ^ 103 mod 143 i got infinity . you need use biginteger.modpow : number = biginteger.modpow(number, 103, 143) here how add reference system.numerics vb.net project:

html - Combining two CSS elements -

how combined follow 1 block #idone td, th { ...... } #idtwo td, th { ...... } i tried #idone td, th, #idtwo td, th { ..... } but the th included own. any ideas? thanks you need specify parent each of td , th tags: #idone td, #idone th, #idtwo td, #idtwo th { ...... }

jQuery ajax with multiple nested .when inside. Returns undefined -

jquery ajax multiple nested .when not returning properly. getting error "uncaught syntaxerror: unexpected token u" because of undefined variable. below code , flow. this method called on event of button click internally calls multiple methods dependencies. in below example flow masterprocess->buildandroidapk->unlockandroidkey function masterprocess(thisform){ $.when(buildandroidapk()).then(function(result){ obj = json.parse(result); }); } function buildandroidapk(){ $.when(unlockandroidkey()).then(function(result){ obj = json.parse(result); //there other .when based on obj response return result; }); } function unlockandroidkey(){ //this function connects server via jquery ajax , gets json string inside success or error block return '{"success":"1","message":"","content":null}'; } the function unlockandroidkey gets json string , able receive inside buildandroidapk.

r - How to weight a TermDocumentMatrix by document length? -

i'm doing text mining in r using tm package. i'm familiar weighttfidf weighting option: dtm <- documenttermmatrix(docs, control = list(dictionary = c("argument"), weighting = weighttfidf)) however, documents deal contain term i'm looking for, different degrees - therefore tfidf not work. how can weight termdocumentmatrix length of documents?

java - android waiting on something -

i wondering how make program pause , wait event finish before starting event, example have text speech says , right after google voice recognizer should fire, both fire @ same time , makes speech recognizer listen text speech. tried searching on here , found answers not clear me, can me it? here example code tested out : protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_menu); tts=new texttospeech(getapplicationcontext(), new texttospeech.oninitlistener() { @suppresswarnings("deprecation") @override public void oninit(int status) { if(status != texttospeech.error){ tts.setlanguage(locale.uk); tts.speak("welcome", texttospeech.queue_flush, null); } } }); if(!(tts.isspeaking())){ startvoicerecognitionactivity(); } } p