Posts

android - How to set imageview fit to sreen? -

android - How to set imageview fit to sreen? - i have utilize android studio , set image view fit screen using relative background image give layout top margin , set image view fit screen below part android:layout_width="fill_parent" android:layout_height="match_parent" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" android:paddingbottom="@dimen/activity_vertical_margin" android:background="@drawable/backgroud"> <imageview android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margintop="500dp" android:background="@drawable/blacksquare" android:alpha=".33" /> write next imageview tag in parent layout. <imageview android:layout_width="match_parent...

How to pass a row object to the backing bean using JSF 2 and RichFaces? -

How to pass a row object to the backing bean using JSF 2 and RichFaces? - i using richfaces's ordering list display table custom command objects user. user uses form create new commands added list. here orderinglist implementation: app.xhtml <rich:orderinglist id="olist" value="#{commandbean.newbatch}" var="com" listheight="300" listwidth="350" converter="commandconverter"> <f:facet name="header"> <h:outputtext value="new batch details" /> </f:facet> <rich:column width="180"> <f:facet name="header"> <h:outputtext value="command type" /> </f:facet> <h:outputtext value="#{com.commandtype}"></h:outputtext> </rich:column> <rich:column> <f:facet name="header"> <h:outputtext value="parameters" /> </f:facet> ...

ios - How to add these two values together in objective c -

ios - How to add these two values together in objective c - i'm stuck adding these values together. both come .plist. both numbers. want add together values , display result string in label. nsinteger calories = [[self.main objectforkey:@"calories"] integervalue]; nsinteger calories2 = [[self.apps objectforkey:@"calories"] integervalue]; i want go nsstring *totalcalories = calories + calories2; self.calorielabel.text = totalcalories; but not work. i'm new , sense i'm missing little , obvious. any insight? you’re there far add-on itself: nsinteger totalcalories = calories + calories2; now need convert number string, can this: nsstring *totalcaloriestext = [nsstring stringwithformat:@"%d", totalcalories]; the problem trying treat integer look ( calories + calories2 ) string. valid thing in programming languages, in objective-c have explicit such conversions. ios objective-c iphone

html - PHP mail form doesn't complete sending e-mail -

html - PHP mail form doesn't complete sending e-mail - <?php $name = $_post['name']; $email = $_post['email']; $message = $_post['message']; $from = 'from: yoursite.com'; $to = 'contact@yoursite.com'; $subject = 'customer inquiry'; $body = "from: $name\n e-mail: $email\n message:\n $message"; if ($_post['submit']) { if (mail ($to, $subject, $body, $from)) { echo '<p>your message has been sent!</p>'; } else { echo '<p>something went wrong, go , seek again!</p>'; } } ?> i've tried creating simple mail service form. form on index.html page, submits separate give thanks submission page thankyou.php above php code embedded. code submits perfectly, never sends email.. please help... there variety of reasons script appears not sending emails. it's hard diagnose t...

c# - Method fails read all rows from .csv -

c# - Method fails read all rows from .csv - we have app utilize manage changes our voip system. uses upload of csv that's built custom export out of cisco scheme controls phones. failing, think, on bad row in .csv file there "-" character, removing character allowed file process way through. method reads file fed streamreader , staticconfig object entity store record each line in. method read rows of .csv: while ((linebuffer = sr.readline()) != null) { // loop through lines found in file string[] tmpstring = linebuffer.split(convert.tochar(",")); if (tmpstring[0] != "") { staticconfig staticentry = new staticconfig(); int extension; if (int32.tryparse(tmpstring[0].trim(), out extension)) { staticentry.directorynumber =...

c - how to link against sse intrinsics when using icc on OS X -

c - how to link against sse intrinsics when using icc on OS X - not sure gcc, using clang can take address of sse intrinsic, without much trouble, unfortunately when seek same thing using icc on os x, fails, precise linker unable locate underlying function ... for example: sse.h: #include <immintrin.h> static __m128i (*load)(const __m128i *) = &_mm_load_si128; main.c: #include <stdio.h> #include "sse.h" int main(void) { char buffer[sizeof(__m128i)] __attribute__((aligned(sizeof(__m128i)))); __m128i b = load((void *)buffer); printf("%i\n", _mm_extract_epi16(b, 0)); homecoming 0; } to clear not want utilize macros, curious why this, main goal create dispatcher, preferably @ compile time, depending on how aggressive compiler optimizes, thats story. $ gcc main.c -o0 $ $ gcc --version configured with: --prefix=/applications/xcode.app/contents/developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 apple l...

regex - Vim formula to leave only two first words in each line -

regex - Vim formula to leave only two first words in each line - how leave 2 first words (remove rest) in each line in vim? e.g. aa aa subst:pl:acc:m3+subst:pl:acc:n2 aa advertisement acta brev:npun into aa aa aa advertisement applied lines: :%s/\v^(\s*\s+\s+\s+).+/\1/ regex vim replace