Posts

Showing posts from February, 2012

javascript - jQuery animate to screen using (x)% -

i running little problem in want space out div div (x)px. currently have original div @ left: '30%'; but want second div be left: '30%' + (width of first div) + (5px of border space); currently can't work since percentage can't added px value (i believe). just wondering if there way around this, easy understand. thanks! yes can added. use calc() demo left: calc(30% + 250px + 5px); /* assuming width of div 250px;*/ edit: op needed animation. demo

how to know if the data is clicked or enabled in android -

i'm trying implement location tracker app, , 1 of requirements send/check location every time data available. right have application running on background , set timer every after hour check if data available, believe not appropriate way. it's this: new countdowntimer(30000, 1000){ public void ontick(long millisuntilfinished) { mtextfield.settext("seconds remaining: " + millisuntilfinished / 1000); } public void onfinish() { if(dataisenabled()) { dothis(); } else { dothis(); } }.start(); is there way know if data button clicked? thank you

php - Mail::send() with 'mail' driver is not delivered -

so started using laravel, , right want send email mail::send() method without using smtp. wan't send email anonymously because school project, simple , don't want share password. if enter gmail account, works perfectly, when set mail driver 'mail' uses default php mail() function, not delivered. i tried unsetting values in mail.php (username, pass, host, port , encryption) without success. also, i'm using localhost (mamp) send email, don't know if maybe issue. ps, not in spam either. (wouldn't matter if did since it's school) mail() requires mail transport agent (like unix sendmail or postfix) present , configured on server. function doesn't "send emails anonymously", passes message mta (if present) , returns boolean value indicating whether accepted delivery or not. if it's school project you're working on, stick gmail, because setting mta tedious work.

python - Multidimensional Array sets multiple rows/columns -

so having strange problem in python. using code below create plot of places object has been. here code: def goforward(self, duration): if (self.towardsx - self.x == 0): myro.robot.motors(self.speed, self.speed) myro.wait(abs(duration)) myro.robot.stop() #get amount of points forward divisible = (int) (duration / self.scale) #add them direction self.towardsy += divisible tempy = self.y y in xrange(self.y, divisible + tempy): if (y % self.scale == 0): self.plot[(int) (self.x)][y] = 1 return #calc slope slope = (self.towardsy - self.y) / (self.towardsx - self.x) tempx = self.x tempy = self.y #go forward #get amount of points forward divisible = duration / self.scale #add them direction self.towardsx += divisible self.towardsy += divisible xs = [] ys = [] x in xrange(self.x, tempx + divisible): #find out if plottab

ios - When I run pod install, using cocoapods gem, I get a LoadError -

i've installed ruby 2.1.1 , rails 4 via rvm. i'm able install cocoapods gem fine, if put in pods in pods file installed , run 'pod install', following error ――― markdown template ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ### report * did do? * did expect happen? * happened instead? ### stack ``` cocoapods : 0.29.0 ruby : ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0] rubygems : 2.2.2 host : mac os x 10.9.1 (13b42) xcode : 5.0.2 (5a3005) ruby lib dir : /users/mwallace/.rvm/rubies/ruby-2.1.1/lib repositories : master - https://github.com/cocoapods/specs.git @ 358968cdff6fe6a41e7861b805f6f4ac573c9fad ``` ### podfile ```ruby platform :ios, '7.0' pod 'svprogresshud' ``` ### error ``` loaderror - dlopen(/users/mwallace/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/digest/sha1.bundle, 9): symbol not found: _rb_digest_sha1_finish referenced from: /users/mwallace/.rvm/rubi

android:alwaysRetainTaskState = false not being respected, task state always retained -

i app exhibit default behaviour described android:alwaysretaintaskstate in android documentation : normally, system clears task (removes activities stack above root activity) in situations when user re-selects task home screen. typically, done if user hasn't visited task amount of time, such 30 minutes. this isn't i'm seeing. after >1 day, re-starting app using launcher icon returns user place left it. example, after fresh install app displays home screen activity h when launched. user navigates detail activities: h -> j. on relaunching after long time, user see h, instead see j. these flags set on activity in androidmanifest.xml: <activity android:name=".apphomescreen" android:label="@string/app_name" android:alwaysretaintaskstate="false" android:launchmode="singletop" android:windowsoftinputmode="stateunchanged"> <intent-filter> <action android:n

How do I use an iterator on an ifstream twice in C++? -

i'm new c++ , i'm confused using iterators ifstream. in following code have ifstream variable called datafile. in code first iterate through file once count how many characters has (is there more efficient way this?). create matrix of size, , iterate through again fill matrix. the problem iterator refuses iterate second time around, , not anything. tried resetting ifstream beginning using datafile.clear(), didn't work, because have deep misunderstanding iterators. me please? typedef istreambuf_iterator<char> dataiterator; (dataiterator counter(datafile), end; counter != end; ++counter, ++numcodons) {} // finds file size in characters. matrixxd ymatrix = matrixxd::constant(3, numcodons, 0); datafile.clear(); // resets ifstream used again. (dataiterator counter(datafile), end; counter != end; ++counter) {...} istreambuf_iterator input iterator once has been incremented, copies of previous value may invalidated, not forward iterator guarantees validit

xilinx - Implementing the PMod-ALS on the Basys2 Board in VHDL -

i'm attempting use als pmod basys2 board in vhdl. how go doing so? with 3-wire spi™ communication interface . texas instruments adc081s021 single channel, 50 200 ksps, 8-bit a/d converter (pdf data sheet) intended polled. note ti datasheet don't need full spi slave interface, it's read only, simple port. schematic pmod-als appears operates in continuous tracking mode.

html - rails select_tag, how to generate dropdown list with json value and custom text from an array -

i'ved got json array , want create dropdown selection list. , because json, dont want display json based on readable name. i tried 2 methods came closest, cant want. controller: @books = [{"code"=>"pa1","name"=>"james","type"=>"novel"},{"code"=>"pa2","name"=>"john","type"=>"science"}] method 1 form.html.erb: <%= select "book", "book", @books.each_with_index.map {|name, index| [name,name["name"]]} %> the generated html: <select id="book_book" name="book[book]"><option code="pa1" name="james" type="novel" value="james">james</option> <option code="pa2" name="john" type="science" value="john">john</option></select></div> method 2 form.html.erb: <

apache pig - Error starting out with pig -

i started pig , simple line of code supposed read in data file called mary- input = load 'mary' (line); is not working me. have file in folder ran pig , error - grunt - error 1200: <line 1, column 0> mismatched input 'input' expecting eof this piece of code taken first example of book programming_pig. using name input relation not work reserved keyword in pig. use name relation such as a = load 'mary' (line); and work. my guess version used "programming pig" did not yet have reserved keyword or wrong.

Copying from global variables to class members - C++ -

i have multiple threads instantiate same class. have no concurrency problem. question performance-wise. i have realized accessing global variables sometime make notable difference in performance. why that? ans best practice? should copy global variables member variables? should avoid global variables if not make concurrency problems?

html - Word wrapping around image using floats -

Image
can me problem? trying float .imgfloat p.lead wraps around it. here codes <article> <div class="imgfloat"> </div> <p class="lead">to continue our visual clues editable , non-editable regions, give second row lighter gray background (since editable, in 1st-level template), , nested table white background (since it's editable in both). 2nd_level_template.dwt should figure 5.to continue our visual clues editable , non-editable regions, give second row lighter gray background (since editable, in 1st-level template), , nested table white background (since it's editable in both). 2nd_level_template.dwt should figure 5. </p> </article> css article p{ text-align:left; float:left; } .imgfloat{ float:right; height:200px; width:300px; background-color:#ccc; } but result this: don't float

c++ - What does this expression mean float pay(float hoursWorked) const; -

this question has answer here: meaning of “const” last in c++ method declaration? 7 answers what expression mean float pay(float hoursworked) const; in c, if return const one, const float f ()... mean putting const in last it declaration of non-static member function of class float pay(float hoursworked) const; the last qualifier const means object function called considered constant object , function may no change data members except declared specifier mutable.

jsf 2 - direction="right-down" in rich:menuGroup tag? -

Image
i have problem direction attribute in rich:menugroup tag : pictures : rich:menuitem tag . want rich:menuitem moved position pictures. search link has example similar problem : live demo richfaces here code : <rich:dropdownmenu showdelay="250" hidedelay="0" submitmode="none" direction="bottom-right" rendered="#{identity.loggedin , s:hasrole('p01')}"> <f:facet name="label">báo cáo</f:facet> <rich:menugroup value="báo cáo bán hàng" direction="auto"> <rich:menuitem rendered="#{s:hasrole('p01')}"> <s:link view="/report/reportrevenuebyitems.xhtml" value="báo cáo doanh thu theo mặt hàng" id="reportrevenuebyitem" includepageparams="false" propagation="none" /> </rich:menuitem> <rich:menuitem rendered="#{

flash - How do I play an animation in a specific place controlled by actionscript? -

i have moving character , when press button want shoot @ object pointed mouse. character moving don't know how make animation in specific place. using flash, actionscript 2 or 3 there many ways in can done, 1 known 1 of simplest: given source point , target point b: calculate distance between , b var distance:number = computedistance(a,b); //define function computedistance returns pythagorean distance between , b calculate x , y difference var dx:number = b.x - a.x; var dy:number = b.y - a.y; // normalization. think of ratio of legs relative hypotenuse dx = dx / distance; dy = dy / distance;` calcualate xspeed , yspeed multiplying dx , dy speedperframe (arbitrary) var xspeed:number = dx*speedperframe; var yspeed:number = dy*speedperframe; increment object's x , y position using xspeed , yspeed in main game loop (respectively). make sure add check if object has arrived @ destination point.

sql - how to join two tables together with condition and sum them up? -

i had sql command display income report product contain sum of vat , non-vat , gross total in specific year. want report show income year year. i've tried modified existing sql command when executed it, result incorrect. kindly me check this? limited skill of sql, stuck here months. my tables below tbl_bill_total bill_id | bill_total | cust_id | shown date 1 | 500 | 12 | 6/6/12 2 | 500 | 14 | 8/8/12 3 | 1000 | 13 | 10/11/12 4 | 1000 | 12 | 12/10/13 5 | 1200 | 13 | 1/11/13 6 | 500 | 12 | 3/11/13 tbl_vat_bill_total vat_id | vat_total | if_paid| showndate | cust_id 1 | 100 | false | 1/6/12 | 10 2 | 200 | true | 2/6/12 | 11 3 | 100 | true | 7/8/12 | 12 1 | 400 | false | 13/10/13 | 14 2 | 500 | true | 14/11/13 | 12 3 | 100 | false | 15/11/13 | 11 4

python - Fast array/list type for holding numpy ndarrays -

i have lot of list of numpy ndarrays, of different sizes, in code. (i have lists of lists of numpy ndarrays, less issue lists small (<5 elements).) i have learn ndarrays of ndarrays of different dimention, doesn't workout. . operations tend on it: accessing/writing in reverse. (currently writing done reversing list twice) appending it applying functions on contained ndarrays, eg summing 2 lists of ndarrrays elementwise, multipliplying -1 etc. i manipulating them following functions (as more direct operations) def uniop_nested(func,o_list): def inner(i_list): ¦ if isinstance(i_list[0],np.ndarray): ¦ ¦ ¦return map(func, i_list) ¦ else: ¦ ¦ ¦return map(inner, i_list) return inner(o_list) def binop_nested(func, o1, o2): if not isinstance(o1,np.ndarray): ¦ return [binop_nested(func, i1, i2) (i1,i2) in zip(o1,o2)] else: ¦ return func(o1,o2) def add_nested(s1,s2): return binop_nested(np.add,s1,s2) i&

ios - Find Argument Class / Type From Selector Variable - Objective-C -

i'm working on class involves sending selector variable used later. selector required take 1 argument, bool value. executed so: imp imp = [ob methodforselector:selector]; void (*func)(id, sel, bool) = (void *)imp; func(ob, selector, yes); if tries set selector variable doesn't match bool, i'd return error. there way, when receiving selector can check whether or not argument bool, or in general, class or type of argument has been passed? why? i'm setting quasi notification center in 1 of classes can add observers , have more control on information distribution. look @ method signature: nsmethodsignature * sig = [ob methodsignatureforselector:selector]; nsassert(0 == strcmp(@encode(bool), [sig getargumenttypeatindex:2]), @"method must take bool sole argument.");

cant use javascript from included ajax page xmlhttp -

got little ajax happening using xmlhttprequest, replaces div , works intended. but cant seem included ajax page run javascript. how can run javascript included ajax page? ie: mainpage.php has select form, on select change event includepage.php gets loaded div on page , changes based on selected in select box, works fine , intended using xmlhttp, issue im having trying run javascript included page, ie: simple alertbox. there no code past, , maybe standard behaviour acnt find infomation on on how run javascript within included ajax page replaces div appreciated. when insert scripts in content via innerhtml , scripts don't run browser. if want them run, need find scripts in content, text them , insert them new scripts inserted document. long scripts don't need run in place using document.write() , work fine , libraries jquery automatically when inserting html document. here's basic demo how works: http://jsfiddle.net/jfriend00/2trqw/ // insert dynam

java - JRadio Buttons and Font change -

i having little bit of trouble trying jradio buttons change color of text depending on player chooses. making gui game setup page. like, choose army, followed choose number of players want interact with. here have: package systemanddesign.risk; import java.awt.flowlayout; import java.awt.font; import java.awt.color; import java.awt.event.itemlistener; import java.awt.event.itemevent; import javax.swing.jtextfield; import javax.swing.jradiobutton; import javax.swing.jframe; import javax.swing.buttongroup; public class charactercreation extends jframe{ private font redfont; private font bluefont; private font greenfont; private font yellowfont; private font grayfont; private font blackfont; private jradiobutton three; private jradiobutton four; private jradiobutton five; private jradiobutton six; private jradiobutton red; private jradiobutton blue; private jradiobutton green; private jradiobutton yellow; private jradiobutton gray; private jradio

git - repo sync stopped when download firefox code -

when download code firefox, repo sync stopped. the following command use: git clone git://github.com/mozilla-b2g/b2g.git cd b2g ./config.sh nexus-s and stopped @ fetching projects: 87% (69/79) fetching project platform_external_opensans fetching projects: 88% (70/79) fetching project platform/external/openssl fetching projects: 89% (71/79) fetching project gaia.git fetching projects: 91% (72/79) fetching project platform/external/dbus remote: counting objects: 49, done. remote: compressing objects: 100% (4/4), done. remote: total 26 (delta 22), reused 26 (delta 22) unpacking objects: 100% (26/26), done. https://git.mozilla.org/releases/gaia 8c9191d..d4760ba master -> mozillaorg/master fetching projects: 92% (73/79) fetching project platform/system/core fetching projects: 93% (74/79) fetching project platform/system/media fetching projects: 94% (75/79) fetching project platform/external/strace fetching projects: 100% (79/79), done. i chec

java - How to create a custom form tag -

i planning create new web application framework struts 2 , jsf , how create custom tags form, inputtext in jsf? and have idea regarding custom tag development, problem unable set request parameters, using setparameter because such method not exist already tried posting in javaranch no luck please guide me thanks lot in advance regards, siddartha c.s

java - How to provide a preference settings for long running jobs in RCP? -

i facing issue long running job in rcp application .on starting job have progressbar 3 buttons , 1 checkbox .and if user checked checkbox , pressed run in background progressbar dialog not coming back. tried use preference page user can check , unchecked settings .but learnt have use internal things workbenchplugin.platformui.getpreferencestore().setvalue( ipreferenceconstants.run_in_background, false ); and according practice should not .so there better way or there way remove run in background checkbox progressbar dilaog. any on appreciated . you can without using internal classes with: ipersistentpreferencestore store = new scopedpreferencestore(instancescope.instance, "org.eclipse.ui.workbench"); store.setvalue("run_in_background", false); store.save();

tokenize - IOS: Tokenizer on UITextInput is never called -

i have uitextinput implementation 1 small problem seems screwing ability have autocapitalization: the tokenizer property never gets called (even after calling becomefirstresponder), custom tokenizer never gets instantiated or used. - (id<uitextinputtokenizer>)tokenizer { nslog(@"%s", __func__); if (tokenizer == nil) { tokenizer = [mycustomtokenizer alloc] initwithtextinput:self]; } return tokenizer; does have idea why happen? more info may help: uitextinput implementation on subclass of uicollectionview figured out. returning nil selectedtextrange when should have been returning selection of length 0.

jquery mobile listview if there is no result -

i'm trying make search listview item. the problem when results has not found item, want display message "no result found"... so searched example here http://jsfiddle.net/6vu4r/1/ , doesn't work jqm version 1.4.2... how do ? plz help~ this code <ul data-role="listview" data-filter="true" data-filter-placeholder="search fruits..." data-inset="true"> <li><a href="#">apple</a></li> <li><a href="#">banana</a></li> <li><a href="#">cherry</a></li> <li><a href="#">cranberry</a></li> <li><a href="#">grape</a></li> <li><a href="#">orange</a></li> </ul> jqm version 1.4.2 adds "ui-screen-hidden" class each li item

MIPS assembly statement - solution unclear -

reviewing practice exam questions class , 1 of questions ask write assembly statements task... set 0 bit in flag register solution - add r1, r0, r0 ( there many ways of doing ) i'm not clear on why apply 0 bit in flag register? real mips processors (normally) not have "flags". however universitary mips variants (i found in google) add flags educational purposes. unlike mips cpus other cpu types not have conditional jump instructions can jump dependent on register value (like "bltz"). instead have conditional jump instructions jump dependent on result of previous arithmethic operation. therefore these cpus must have special "register" saving information last result (like "result negative"). register contains special bits - so-called "flags". 1 of these bits "zero flag" indicates result zero. note: the sparc cpus have instruction set similar mips use flag register instead of "bltz"-st

c# - AsyncPostBackTimeout not updating data in updatepanel -

i wanted update data inside update panel without postback. i made following code on aspx: <asp:scriptmanager id="scriptmanager1" runat="server" asyncpostbacktimeout="30"> </asp:scriptmanager> <asp:updatepanel id="uppanel" runat="server"> <contenttemplate> <asp:label id="lblcount" runat="server"></asp:label> </contenttemplate> </asp:updatepanel> for updating label on every half minute, written following code on pageload: protected void page_load(object sender, eventargs e) { lblcount.text = datetime.now.toshorttimestring(); } but not updating label though given asyncpostbacktimeout="30" in script manager. is mistaking?? i want update label inside updatepanel without postback on time interval. edit: <asp:updatepanel id="uppanel" runat="server"> <

excel - VBA call same C++ dll return different results -

i have test dll function reads string , display it: int _stdcall test(lpstr mystring) { messageboxa(null, (lpcstr)mystring, "test", mb_ok); return 0;} the excel vba declaration is declare function test lib "test.dll" (byval text string) long there sub calls function. reads excel cell value "abcde" , able display correct result. sub code is: sub testcode() test (cells(1,1).value) end sub however when call dll function using excel formula =test(a1) , message box display first char "a" of string. i had spent entire weekend reading bstr, etc, still not able solve this. going on here? declare imported function private: private declare function test_internal lib "test.dll" alias "test" (byval text string) long and create wrapper function excel use: public function test (byval text string) long test = test_internal(text) end functin because apparently, while vb(a) converts string arguments asc

video - Android VideoView won't Play -

so i'm trying play basic avi video in android, seems run fine on windows media player, vlc, etc. doesn't it's requiring complicated codecs. have video view in app , that's it, , have video in resources directory under: res/raw/my_video.avi this code i'm using load video: setcontentview(r.layout.activity_main); videoview videoview = (videoview) findviewbyid(r.id.videoview1); uri video = uri.parse("android.resource://" + getpackagename() + "/" + r.raw.my_video); videoview.setvideouri(video); videoview.start(); and not work. popup saying "can't play video" along logcat message: 03-10 01:42:12.102: e/(185): failed open file 'android.resource://com.securespaces.android.bootstrap/2130968576'. (no such file or directory) 03-10 01:42:12.102: e/mediaplayer(9737): error (1, -2147483648) 03-10 01:42:12.142: e/mediaplayer(9737): error (1,-2147483648) i'm running on nexus 5 running 4.4.2 stock way. i'm following i

postgresql - Can access production database from Rails console but not Rails App -

when try login devise app using rails console on production database, can no trouble, cannot when using rails app. i launch rails console rails c -e production , home environment (not sshing int or anything) , proceed execute app.post('/users/sign_in', {"user"=>{"email"=>"email", "password"=>"password"}}) , succeeds with: started post "/users/sign_in" 127.0.0.1 @ 2014-03-10 05:37:31 +0000 started post "/users/sign_in" 127.0.0.1 @ 2014-03-10 05:37:31 +0000 processing devisesessionscontroller#create html processing devisesessionscontroller#create html parameters: {"user"=>{"email"=>"amar@sittr.co.nz", "password"=>"[filtered]"}} parameters: {"user"=>{"email"=>"amar@sittr.co.nz", "password"=>"[filtered]"}} redirected http://www.example.com/dashboard redirected http://www.examp

c# - RadWindow is closed when page is refreshed -

radwindow closed when page refreshed. have radwindow has button in <contenttemplate> , , when click on button radwindow closed. should not close radwindow? <telerik:radwindowmanager id="radwindowmanager1" showcontentduringload="true" visiblestatusbar="false" registerwithscriptmanager="true" enableshadow="true" reloadonshow="true" width="760px" height="350px" runat="server"> <windows> <telerik:radwindow id="modalpopup" runat="server" modal="true" openerelementid="btnshowwindow"> <contenttemplate> <asp:button id="button1" runat="server" text="addname" onclick="button1_click" /> <asp:label id="lblname" runat="server" ></asp:label> </contenttemplate> </teler

php - Wordpress wp-admin redirect loop -

i know question asked many times here. none of answers solved problem. when try log-in site through wordpress-admin, this, mysite.com/wp-admin gives me error "this webpage has redirect loop". when try mysite.com/wp-admin/index.php, works fine. one conclusion came to, is, there no problem plugins. tried changing plugins directory name. doesn't work. i tried changing file permissions. doesn't work. added following code .htaccess file rewritebase / rewriterule /wp-admin/ /wp-admin/index\.php [l,p] it doesn't work me. please me. else can do? can give me suggestions? insert code in functions.php file function admin_default_page() { return 'http://staging.bestbodybootcamp.com/wp-admin/index.php'; } add_filter('login_redirect', 'admin_default_page');

probability - Multinomial regression using multinom function in R -

Image
i thinking posting question in cross-validated, decided come here. using multinom() function nnet package estimate odds of becoming employed, unemployed, or out of labor force conditioned on age , education. need interpretation. i have following dataset of 1 dependent categorical variable employment status(empst) , 2 independent categorical variables: age (age) , education level (education). >head(df) empst age education 1 employed 61+ less high school diploma 2 employed 50-60 high school graduates, no college 3 not in labor force 50-60 less high school diploma 4 employed 30-39 bachelor's degree or higher 5 employed 20-29 college or associate degree 6 employed 20-29 college or associate degree here summary levels: >summary(df) empst age education not in universe : 0 16-19: 6530 less high

php - file --mime doc.html return : doc.html: text/x-c++; charset=utf-8 on debian -

have problem on use php mimetype detection. think related debian config files command : file --mime doc.html return : doc.html: text/x-c++; charset=utf-8 doc.html file: http://dpaste.com/hold/1709425/ tried <?php echo mime_content_type('doc.html') ;?> that return: text/x-c++ when use command : mimetype doc.html return text/html. problem cause on using ojs when upload html files detect text/x-c++ , name untitled instead of html read ojs faq problem , try them no success http://pkp.sfu.ca/wiki/index.php/pkp_frequently_asked_questions#html_galleys_don.27t_display_properly_.2f_files_i_upload_aren.27t_being_identified_properly . i found solution, related special character inside html codes. when use site: http://infohound.net/tidy/ make html code clean, ojs detect html code , command: file --mime doc.html detect file , html

python - Compare two lists, dictionaries in easy way -

how compare 2 lists or dictionaries in easy way, eg. assert orig_list == new_list if want check 2 lists in python nose tests, is there built-in function can let me use? does compare 2 lists bad practice when doing testing ?(because i've never see it) if there no built-in, plugin in nose, there handy package can me. you can use assertlistequal(a, b) , assertdictequal(a, b) unittest library.

asp.net - disabling the list link on a wiki page in sharepoint 2013 -

Image
i have wikipage within website.a list has been added page.but apart adding new item list whenever title link list clicked takes user directly main list user can view items added employees.how can list name on wikipage can disabled clicking on user stays on same page , not redirected towards original list , content. have @ image above.i using sharepoint foundation 2013 can done using out of box feature or using coding? add script editor webpart <style> .ms-webpart-titletext { display: none; } </style>" click edit web part of script editor , under layout check hidden.

Server side had nothing changed after I used "git push" successfully -

i created bare repo on vps the repo's file folder "~/repo" , used "git init --bare" @ "~/rpeo/.git" , did nothing then cloned , pushed got result : $ git push origin master counting objects: 19, done. delta compression using 4 threads. compressing objects: 100% (14/14), done. writing objects: 100% (19/19), 797.99 kib, done. total 19 (delta 1), reused 0 (delta 0) ssh://xxxx@xxxx.com:3344/~/root * [new branch] master -> master i can see log on server side , use "git pull" these files the log : commit 833ad06648f999f51d54c9e082a136270cbd3686 author: xxxx <xxxx@gmail.com> date: mon mar 10 14:45:49 2014 +0800 init web but ~/repo still empty please me , thank u much! ~/repo still empty what mean this? if mean there no source code inside it, yes, bare repository will not contain working copies of source files . the repo's file folder "~/repo" , used "git init --ba

profiling - Java VisualVM does not show/list my tomcat java process -

i using jdk64 , java version 1.6.0_24 . running both (tomcat java process , visualvm) processes administrator on windows server 2008. tomcat running -xmx7196m , jvisualvm running -xms24m , -xmx256m . cause? you need add jmx parameters enable jmx connection application, add following parameters: -dcom.sun.management.jmxremote -dcom.sun.management.jmxremote.authenticate=false -dcom.sun.management.jmxremote.port=8484 -dcom.sun.management.jmxremote.ssl=false then need add tomcat process manually, right click on localhost node -> add jmx connection -> type port -> ok . your tomcat process listed in under localhost node.

ios - Strange behavior of UIScrollView with Constraints and RTL -

Image
i have horizontal scroll view on add views dynamically. on ltr languages work fine, add views 1 after other left right. on rtl problem views added left of scroll instead of right in every other controller, really strange staff order of views added correctly, left of first view ordered right left outside of scroll view on -x. here code when add new view: tag* tag = [self.storyboard instantiateviewcontrollerwithidentifier:@"tag" ]; [_scroller addsubview:tag.view]; [tags addobject:tag]; tag* prev = nil (tag* tag in tags) { if (prev == nil) { [_scroller addconstraint:[nslayoutconstraint constraintwithitem:tag.view attribute:nslayoutattributeleading relatedby:nslayoutrelationequal toitem:_sc

Pass value from javascript function in client side to server side in asp.net -

the web form has grid view contains delete link. on clicking link, confirmation message should displayed. using function displays confirmation dialog box. on clicking ok button, respective record should deleted. how can pass value on clicking ok button in dialog box perform delete operation? void confirmmsg(string cmsg) { type cstype = this.gettype(); // clientscriptmanager reference page class. clientscriptmanager cs = page.clientscript; string cstext = "confirm('" + cmsg + "');"; cs.registerstartupscript(cstype, "popupscript", cstext, true); } just use line in place of ur delete button.nothing needed: <asp:linkbutton id="lbdelete" runat="server" onclientclick="return confirm('are sure want delete company information?')" causesvalidation="false" commandname="delete" text="delete"></asp:linkbutto

MongoDB with iOS app -

my case is: have ios application, want use mongodb store data. but when tried connect this: nserror *error = nil; self.mongo = [mongoconnection connectionforserver:@"127.0.0.1:27017" error:&error]; i receive mogo object null . can it? if yes, how should it? okay, let me explain: your ios app describe trying use connection string contains address 127.0.0.1 . localhost adapter, , yet have not heard of mongodb running on ios. related point above doing wrong thing, again you doing wrong thing . do not want connect application directly mongodb. for kinds of reasons, security, not want database openly exposed web. has always been , in 2014, remains bad idea. you need "webservice" of sorts, act go between phone application , database. can find some links in mongodb documentation possible solutions. otherwise google or build own. rest api's not hard. do not connect directly.

listview - Android List view layout Similar to Google play cell (like square)? -

Image
i know how implement listview custom cell, need custom listview cell square, , have no idea. please help.. thanks update: there new fork @ https://github.com/elliottsj/cards-ui cards-ui library might that.

objective c - Dropbox file downloading is not working when iOS application is goes to Background or screen locked? -

i integrated dropboxsdk [core api] in application. can able view contents through application , can able download. problem is, when press home button or locked idevice download canceled. and showing error this. "[warning] dropboxsdk: error making request /1/files/dropbox/shadow 30s_mpeg4.mp4 - (1002) error domain=dropbox.com code=1002 operation couldn’t completed. (dropbox.com error 1002.)" userinfo=0x1681f2b0 {path=/shadow 30s_mpeg4.mp4, destinationpath=/var/mobile/applications/728071a1-1bb9-481d-a3fe-07c791397568/documents/shadow 30s_mpeg4.mp4}.. please. can me out of problem. in advance. - (void)applicationdidenterbackground:(uiapplication *)application { __block uibackgroundtaskidentifier taskid = 0; taskid = [application beginbackgroundtaskwithexpirationhandler:^{ taskid = uibackgroundtaskinvalid; }]; } just add code appdelegate.m , give 10 min after app enter background

Javascript Regex - Remove single spaces NOT double spaces -

i need remove singles spaces string not double spaces. using regex i've tried this, invalid , i'm not sure how fix it: \s+{1,1} this want achieve: raw string: "okay, let ’s star ted, bret t " after regex replace (keeping double spacing): "okay, let’s started, brett" since javascript doesn't support lookbehinds, believe have to can resort callback function: str = str.replace(/\s+/g, function(m) { return m.length === 1 ? '' : m; });

c# - Error: Help D: System.IO.IOException: The process cannot access the file because it is being used by another process -

code here ._. using system; using system.collections.generic; using system.linq; using system.text; namespace consoleapplication1 { class program { static void main(string[] args) { system.io.streamwriter file = new system.io.streamwriter("c:\\users\\public\\usernames.txt"); file.writeline(); file.close(); int usertype = 0; system.io.streamreader fileusername = new system.io.streamreader("c:\\users\\public\\usernames.txt"); file.close(); string retrievedusername = fileusername.readtoend(); file.close(); console.writeline("please note prototype, passwords not hashed/encrypted ^_^"); console.writeline("welcome medata service! ver. 0.01 beta, made mechron"); console.writeline("please enter username below or type register register new account on device"); string loginusername = console.readline()

Export MS Visual Studio environment with Windows executable file -

i've developed jni application in ms visual studio calls java methods within c++ file. necessary files, such jvm.lib , jvm.dll , have been included in "debbuging->environment" , "linker->input->additional dependencies" , linker->general->additional library directories configuration properties. application runs fine inside visual studio, when running .exe file directly, complains jvm.dll missing. i've copied file c:\program files\java\jdk1.6.0_45\jre\bin\server vs project executable resides, receive error the application unable start correctly (0x000007b) . how can reference third party libraries in .exe file? preferably want export environment paths , dependencies during vs build process. regards, chris windows 7 64bit java jdk 1.6.45 64bit ms visual studio 2012 the application unable start correctly (0x000007b) error, in context, typically caused building 32 bits exe , trying run against 64 bits dll. check files ind

Bluetooth Windows Phone Communicating with the device after the app terminates -

i working on app send's , receive message embedded device through bluetooth using stream-socket . here problem if user closes app in middle of communication the connection between bluetooth device , phone getting terminated. there way still make connection alive , process message. thanks no, when user leaves application, either terminated or suspended. in either case app cannot work when not active. won't work under lock screen default , must explicitly enable.

c# - How can i customize my own P.D.F form using ITextsharper? -

Image
here had enclosed code generate p.d.f document using code can p.d.f stucture want design form here like(salary slip)... public void add(int employeenumber, string fromdate, string todate) { string pdffilepath = null; document doc = new document(itextsharp.text.pagesize.letter, 10, 10, 42, 35); try { pdffilepath = server.mappath("~/uploads/bankformedited.pdf"); //string pdffilepath = server.mappath(".") + "/pdf/mypdf.pdf"; //create document class object , set size letter , give space left, right, top, bottom margin pdfwriter wri = pdfwriter.getinstance(doc, new filestream(pdffilepath, filemode.create)); doc.open();//open document write font font8 = fontfactory.getfont("arial", 7); //write content paragraph paragraph = new paragraph("monday ventures private ltd..."); //this imag