Posts

Showing posts from April, 2013

java - How to set system properties of embedded tomee? -

i have read link: embedded configuration , trying set "openejb.deployments.classpath=true" this code: public class run { private static ejbcontainer ejbcontainer; public static void main( string[] args ) throws namingexception, interruptedexception, ioexception { properties props = new properties(); props.setproperty(ejbcontainer.provider, "tomee-embedded"); props.setproperty("openejb.deployments.classpath", "true"); ejbcontainer = ejbcontainer.createejbcontainer(props); } } pom.xml: <dependency> <groupid>org.apache.openejb</groupid> <artifactid>tomee-embedded</artifactid> <version>1.6.0.2</version> </dependency> but still outputs like: info - openejb configuration file 'c:\cygwin\tmp\apache-tomee1917201117325246334-home\conf\openejb.xml' info - configuring service(id=tomcat security service, type=securityservice, provider-id=tomcat secu

Retrieving information from another package in Perl - Syntax -

i have package called pack1::i1 , package called pack2::i2. inside pack2 there sub called foo. syntax me retrieve sub pack2 if in pack1? something this?: package pack1 sub hello { $self = shift; $x = pack2::i2->foo; } thanks you need use qualified name of subroutine. here example. use strict; use warnings; package pack1::i1; sub hello { $self = shift; print pack2::i2::foo(), "\n"; # qualified name } # sub found because in namespace pack1::i1 hello(); package pack2::i2; sub foo { return "foo pack2::i2::foo()"; } however, more common approach use module exporter . there con export functions namspace pack1::i1 namespace pack2::i2. also please not the convention capitalise namespaces.

excel - Loop won't stop, leads to overflow -

i new vba, seems simple, when run code continues create random numbers until gives me overflow message. can tell can read total, don't know why won't stop. dim integer dim total integer = 1 total = range("c1") while total < 180 cells(i, 1).value = int((10 - 3 + 1) * rnd + 3) = + 1 loop thanks help. i assuming c1 has type of sum or growing while vba populating numbers if case need re-evaluate total @ end of each loop. working me... dim integer dim total integer = 1 total = range("c1") while total < 180 cells(i, 1).value = int((10 - 3 + 1) * rnd + 3) = + 1 application.calculate 'only needed if manual calculation on total = range("c1") loop

Record locked in Archer GRC -

when try edit record within archer grc, says user has open, user has told me no longer have record open in session. do? have other user log out of archer. happening because user still has open session archer grc. alternatively administrator can force user off system via access control, former recommended in case other user in middle of doing work can finish.

excel - Cross Referencing a sheet to a master data sheet -

i have macro allows cross reference "sheet2" in "sheet1" where"sheet1" sheet contain master data. idea here compare sheet 2 master data , see if matches. problem macro compares within limited amount of range. wondering how make more dynamic or flexible should add column used cross reference. here sample of sheets. example: sheet1 name id class name taken? john riley 0001 painting yes bob johnson 0101 painting no matthew ward 1111 math yes sheet 2: name id class name taken? matthew ward 1111 math yes bob johnson 0101 painting no warren renner 2222 drama no john riley 0001 painting yes what need change in macro make compare should add additional columns in sheet

c++ - Threads looping system() and cout corrupt the stack -

the process running following code crashes segmentation fault: #include <stdlib.h> #include <iostream> #include <pthread.h> void* f( void* ) { while( true ) { // crashes inside call (with cerr, too). std::cout << 0; } return null; } int main() { pthread_t t; pthread_create( &t, null, &f, null ); while( true ) { // crashes script/app; true simple. system( "true" ); } return 0; } it crashes every other execution within few seconds (output has anywhere thousands millions of '0's). crashes few functions deep in cout << 0 call above code. depending on functions called or data put on stack in f() , crashes in different places. in gdb, stack doesn't make sense regard order of function calls. deduce stack corrupted. i found there problems multi-threaded applications calling fork() (see 2 of comments mentioning stack corruption). forking/cloning process copies fi

c - most efficient way to get through array? -

i have been thinking , wondering fastest algorithm through every element of (large - lets more 10,000 sized) unsorted int array. first thought go through linear motion , check every element @ time - mind wandered recursion , wondered if cutting array parallels each time , check elements fine. the goal i'm trying figure out if number (in kind of array) multiple of seemingly "randomly" generated int. after progress try , find if subset of large array equate multiple of number well. (but part day!) what of thoughts? questions? comments? concerns? you seem under false impression bottleneck running through array sequentially ist cpu: isn't, memory bus. modern platforms in predicting sequential access , doing streamline access, can't more that. parallelizing not help, since have 1 memory bus, bottleneck, in contrary risking false sharing worse. if reason doing lot of computation on each element of array, picture changes. then, can start try parallel s

is putting token in URL secure to prevent CSRF attacks in PHP applications? -

i want use token prevent csrf attacks on website (written php). i've used in forms , works well. logout link not form; hyperlink. secure if put token in query string this: <a href="logout.php?token=9ae328eea8a72172a2426131a6a41adb">logout</a> if has problem, suggestions , solutions ? i think 1 of main disadvantages of using csrf-token in requests possibility of incompetent user disclose token copying link token , paste in public content comment/post/etc... query parameters including csrf-tokens logged http servers/proxies , introduces risk. so suggest implement csrf-secure links using this: <form name="logout" action="logout.php" method="post"> <input type="hidden" name="token" value="9ae328eea8a72172a2426131a6a41adb"/> </form> ... <a href="/nojs.html" onclick="document.logout.submit(); return false">logout</a>

Android : LibGDX button -

how can create libgdx button , set touch listener it?i want create main menu of game , put 3 buttons there (play,settings,about).i tried sprite how saw sprite doesnt have touch listener. you can use stage , button class, this: button btn = new button(new spritedrawable(youridlesprite), new spritedrawable(yourpressedsprite)); btn.addlistener(new clicklistener() { public void clicked(inputevent event, float x, float y) { //your code } }); stage stage= new stage(); stage.addactor(btn); there lots of ways create own button class, can find lot of examples in official documentation -> https://github.com/libgdx/libgdx/wiki

html - Opening hyperlinks in one tab only. -

so i'm new web development, , wanted know if there way have hyperlink in html, opened in new tab, once clicked on. there, want have hyperlink open in exact same new tab opened previous hyperlink. have 2 hyperlinks open in new same tab, versus having hyperlinks opening in each of own new tabs. i've been programing webpage in html. own project, not school related! compare test <a href="http://www.w3schools.com/css/css_examples.asp">some text</a> <a href="http://www.w3schools.com/css/css_examples.asp" target ="_blank">some text</a>

php - Url manager rule preventing from entering into a module -

i using yii 1.1.14 , getting problem due url manager in url manager (in main.php) have created rule '<controller:\w+>/<action:\w+>/<bookingid:\w+>'=>'<controller>/<action>', this rule prevent me entering admin module. whenever try enter admin module, shows page redirecting problem might because of soome redirection loop. but whenever following things, can enter admin module:- if change <bookingid:\w+> <bookingid:\d+> . changing w d if change '<controller:\w+>/<action:\w+>/<bookingid:\w+>' '<controller:\w+>/<action:\w+>/<abc:\w+>/<bookingid:\w+>' . adding 1 more parameter but both of them change url this controller/action?bookingid=adasasd so wanna ask why rule affecting admin module. there wrong ? you should specify second rule module: '<module:(yourmodulename)>/<controller:\w+>/<action:\w+>/<bookingid:\w+

c# - SingalR2 / WCF Service to run continuously windows service -

please me take critical design decision. looks wide discussion basic question developer or designer know can create singalr windows service , how. there no discussed , documented or mentioned whether singalr can used in below scenario. hope question not me loads of developers , designers. in singnalr , how can create service , runs continuously market prices fix connection, when ever client connect updates prices client changes. number of clients can connect service. so how can create singalr windows service running continuously , updates clients seamlessly parallel ui in wpf , asp.net mvc web , html5 mobile for singnalr2 best 1 or wcf best option thanks, ineffablep for can use hubs , signalr windows service http://www.asp.net/signalr/overview/signalr-20/hubs-api/hubs-api-guide-server in onconnected() event, happens when client logged in singnalr server, notify client connected on change of stock price public override task onconnected() { // stock price

c++ - How to Access data on cuda by openGL? -

i have learned opengl interoperability cuda, problem this: i have lot of arrays, vertex, norm , alpha value alone, , pointers these arrays on device memory (something dev_ver, dev_norm) used in kernel. have mapped resource , want use these data in shaders make effects. rendering code this: gluseprogram (programid); glbindbuffer (gl_array_buffer, vertexbuffer_0); glbufferdata(gl_array_buffer, size, _data_on_cpu_0, gl_dynamic_draw); glvertexattribpointer (0, 3, gl_float, gl_false, 0, (void*)0); glbindbuffer (gl_array_buffer, vertexbuffer_1); glbufferdata(gl_array_buffer, size, _data_on_cpu_1, gl_dynamic_draw); glvertexattribpointer (1, 3, gl_float, gl_false, 0, (void*)0); glbindbuffer (gl_array_buffer, vertexbuffer_2); glbufferdata(gl_array_buffer, size, _data_on_cpu_2, gl_dynamic_draw); glvertexattribpointer (2, 3, gl_float, gl_false, 0, (void*)0); glenablevertexattribarray (0); glenablevertexatt

java - Getting Null Pointer Exception when trying to get the value from global variable -

this class stores global variables public class globalvariables extends application { private string usertoken; private string userid; private string username; public string getusername() { return username; } public string getuserid() { return userid; } public string getusertoken() { return usertoken; } public void setusername(string username) { this.username = username; } public void setuserid(string userid) { this.userid = userid; } public void setusertoken(string usertoken) { this.usertoken = usertoken; } } now setting values in login class globalvariables newobj = new globalvariables(); newobj.setuserid(user_values.getstring("id")); newobj.setusername(user_values.getstring("name")); system.out.println(newobj.getuserid()); i getting value in systemout ,,, when try fetch value class getting null pointer exception protected void oncreate(bundle savedinsta

ruby on rails - Can't install Bluecloth 2.2.0 gem in windows 7 -

when running bundle install getting below error. note: tried gem install bluecloth --platform=ruby same problem. gem::installer::extensionbuilderror: error: failed build gem native extension. c:/ruby200/bin/ruby.exe extconf.rb checking srand()... yes checking random()... no checking rand()... yes checking bzero() in string.h,strings.h... no checking strcasecmp()... yes checking strncasecmp()... yes checking mkdio.h... yes checking ruby/encoding.h... yes creating extconf.h creating makefile make "destdir=" generating bluecloth_ext-i386-mingw32.def compiling bluecloth.c in file included c:\devkit\mingw\bin\../lib/gcc/i686-w64- mingw32/4.7.2/../../../../i686-w64-mingw32/include/windows.h:59:0, c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/winsock2.h:23, c:/ruby200/include/ruby-2.0.0/ruby/win32.h:40, c:/ruby200/include/ruby-2.0.0/ruby/defines.h:153, c:/ruby200/include

angularjs and google chrome extension -

i have simpe google-chrome extension app. i'm using bookmarks , present in manifest file. firstly, use chrome bookmarks api in controller, , works well. decided use factory clear code , best practices. my index.html file <!doctype html> <html lang="en" ng-app="bookmarkssharer" ng-csp> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>bokmarks sharer</title> <link rel="stylesheet" href="/css/main.css"/> <script src="/javascript/jquery-2.1.1.min.js"></script> <script src="/javascript/angular.min.js"></script> <script src="/javascript/bookmark_sharer.js"></script> <script src="/javascript/maincontroller.js"></script> <script src="/javascript/bookmarkservice.js"></script> </head> <body> <d

javascript - nextSibling NextElementSibling not reaching class -

i trying element through next sibling couldnt reach :( <div id="main"> <ul > <li class="playerr">zero</li> <li>one</li> <li>two<div></div></li> </ul> <ul> <li>four</li> <li>five<div></div></li> <li class='playerr'>six</li> </ul> </div> the li class of playerr(2.one) element want if click example one or zero doesnt work, works if click li within same function kappa(o){ if (o.nextelementsibling) { o = o.nextelementsibling; } else { o = o.nextsibling; // move original node.. while (o && o.nextsibling && o.nextsibling.nodetype !== 1) { o = o.nextsibling; } } if (o.nodename.tolowercase() !== 'li') { return o; } else { return o; } } // capture propagated clicks document.getelementbyid("main"

php - jQuery click functions in included files not firing -

this question kind of duplicate, answer provided doesn't solve issue. here's related question: why jquery click doesn't work when included in separate file i've got php template has overlay div dynamically populating different content, depending upon link clicked. example, have in template: <a class="icon-search" href="#"></a> <div id="overlay" class="hidden"></div> in global.js file, have these functions: $(document).ready(function(){ $("a.icon-search").click(function () { $("#overlay").load("inc/search.php"); $("#overlay").toggleclass('show hidden'); }); $("#cancel").click(function() { $("#overlay").toggleclass('show hidden'); }); }); the cancel button in "inc/search.php" when click "icon-search", overlay toggles properly, , content of search.php gets loaded, pressing cancel button doesn't

javascript - Getting the time remaining until a date -

i'm trying generate string says how long left deadline can't figure out how work out amount of time because of how inconsistent calender is. i want output string such "1 month, 6 days , 10 hours remaining". here have: this.getremainingtimestring = function() { if(this.ispastdeadline()) return 'past deadline'; var str = ''; var diffms = - this.enddate - (new date()).gettime(); var diff = new date(diffms); var defdate = new date(0); var years = diff.getfullyear() - defdate.getfullyear(); var months = diff.getmonth(); var days = diff.getdate(); if(years > 0) { str += years + ' year' + (years != 1 ? 's' : '') + ' '; } if(months != 0) { str += months + ' month' + (months != 1 ? 's' : ''); } if(days != 1) { str += days + ' day' + (days != 1 ? 's' : ''); } return str; };

embedded linux - How to insert hwmon module (ARM) -

i fear specific question. hardware: gumstix overo fire (arm cortex a8) distro: poky (customized yocto project) kernel: 3.5.7 i tried write program read hih6130 i2c sensor, using /dev/i2c-3 , < linux/i2c-dev.h> , despite works every other i2c device, not work one. happens because particularity of reading protocol, anyway, that's not topic. i found this code implements driver sensor, , inside called "hwmon" , seems collection of sensor drivers. after compiled , inserted module expecting see entry humidity1_input somewhere under hwmon didn't find it. root@overo:/sys# find -name hum* root@overo:/sys# find -name hih* ./bus/i2c/drivers/hih6130 ./module/hih6130 root@overo:/sys# ls ./bus/i2c/drivers/hih6130 bind module uevent unbind root@overo:/sys# ls ./module/hih6130 coresize holders initstate refcnt srcversion uevent drivers initsize notes sections taint do have else enable reading of sensor? ideas? i ended using

Apply jquery validation on bootstrap drop-down menu -

i have following bootstrap drop-down menu: <div class="form-group"> <label for="name" class="col-md-3 control-label">pens</label> <div class="col-md-9"> <div class="btn-group btn-input"> <button id="penslist" type="button" class="btn btn-default dropdown-toggle form-control" data-toggle="dropdown"> <span data-bind="label">nothing selected</span> <span class="caret"></span> </button> <ul id="elements" class="dropdown-menu"> <li id="my_li_id_0"><a href="#">nothing selected</a></li> <li id="my_li_id_1"><a href="#">ballpoint pens</a></li> <

generic makefile to create multiple executable using different flags -

i create generic makefile builds several executables using different compiler flags each executable without using shell commands. executable file name should composed source file , unique post fixed name. should produce assembly or preprocessor file per source file if needed. target bin_bdg_files, "$<" (exercise-1.1.0.c ) first item list (exercise-1.1.0.c exercise-1.1.1.c exercise-1.2.0.c exercise-1.2.1.c) expected. tried without success modify src_files using filter-out function. intent remove first item list each target, first item corresponds correct target. not sure correct approach. comments welcome. i.e. attempt @ using built in make constructs. $(bin_dbg_files): $(src_files) $(cc) $(dbg_cflags) $(iflags) $< -o $@ echo src_files := $(filter-out $<, $(src_files)) makefile shell = bash src_files = $(wildcard *.c) bin_files = $(patsubst %.c,%,$(src_files)) bin_dbg_files = $(patsubst %.c,%-dbg,$(src_files)) src_

javascript - AJAX improvement for validation -

so have piece of ajax work should want add validation it.i dont want send empty information.the ajax done comment system.it takes value form , php inserts databse. problem haveing insert empty comment database index.php <?php require_once("menu.php"); ?> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script> <script src="comments.js" type="text/javascript" ></script> <script type="text/javascript"> function validateform() { var comment = document.getelementsbyname('comment').value; if (comment == "" ) { alert("please fill in fields"); return false; } else { return true; }

objective c - iOS - removing all references/connectios -

i same problem ios - removing reference of property had deleted i created view 2 inputs , own controller "homecontroller". connected inputs controller names "inputlogin" , "inputpassword". then worked few times unless decided rename controller parameterscontroller. i tried lot of things, such : - renaming classes (.h/.m) , custom class name in storyboard. - delete whole things (classes, views) , recreated new view nothing inside , no custom class. but still, error <uiviewcontroller 0xxxxxxxx> setvalue:forundefinedkey:]: class not key value coding-compliant key inputlogin . i check of "connections", there no references inputlogin. if have suggestion. thanks. added: in fact, seems running project isn't current version. in storyboard, removed views, these still there when run project :( try cleaning project (product > clean). quite safe, xcode precompile lots of things speedup build time. downside (of precom

svn - Is it possible to show subversion log in mediawiki page? -

in release notes i'm interested of showing log of committed svn revisions since last release. i'm looking show log in mediawiki page. i know there several extensions svn integration: svn integration - shows information file. subversion changes - doesn't work out of box. i'm using mediawiki 1.22.2 do know other option? what have used (also on mediawiki.org) web interface repository provides rss feeds , rss extension embed feed on wiki pages.

linux - Expect never matches the pattern -

i trying write script enter password automatically, seems expect never matches pattern. #!/usr/bin/expect -- set pass "test" set timeout 5 spawn sudo ssh -i ~/.ssh/id_rsa stricthostkeychecking=no vongrad@localhost expect { timeout { send_user "\nfailed password prompt\n"; exit 1 } "*ssword*" { send "$pass\r" } } do have suggestions? how using key (without password) logging in instead of password write in script? way avoid being promped passwords ssh. example described here: http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/

spring boot - Disable Logback in SpringBoot -

it appears springboot autoconfigures use logback tomcat. disable , use 1 provide in classpath. the error message below. loggerfactory not logback loggercontext logback on classpath. either remove logback or competing implementation (class org.slf4j.impl.simpleloggerfactory) object of class [org.slf4j.impl.simpleloggerfactory] must instance of class ch.qos.logback.classic.loggercontext <?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <parent> <artifactid>spring-boot-starter-parent</artifactid> <groupid>org.springframework.boot</groupid> <version>1.0.1.release</version> </parent>

sql - SSRS 2008 R2 calulate new date from existing that's 1 year later and on Monday? -

hoping can help. have textbox on report need calculate new date value date on report. i need take existing shipping date (say 5/5/2014) , calculate new date 1 year later on monday of week (so 5/4/2015) -- ship product on mondays. i know need use dateadd , datepart have been unable find proper formula. can help? figured out -- help. took idea gordon had, putting in select statement rather trying manipulate in expression area of textbox on report:`select dateadd(wk,datediff(wk,0,dateadd(yy,1,o.req_date)),0) newdate' works great! :)

resharper - Should I use both NotNull and ContractAnnotation("null => halt")? -

it seems notnull , contractannotation("key: null => halt") similar in effect on r#. there missing? should apply both? they're similar, semantically different. notnull states target expected not null, makes no statements consequences. there might null check throws argumentnullexception , or might use without checking, , runtime nullreferenceexception . equally, application might check null, log , continue safely. contractannotation("key: null => halt") tells resharper if key parameter null, program flow terminates. resharper can use so: string foo = null; assert.notnull(foo); // contractannotation("null => halt") assert.equal(12, foo.length); the second assert in snippet marked dead code, because resharper knows first assert throw when passed null. however, if assert.notnull marked notnull attribute, resharper highlight foo parameter warning, telling you shouldn't passing null value, doesn't know happen i

rails polymorphic Association doesn't save id -

this weird , don't it. i got polymorphic new form storing address, create method doesn't create association. location/new %= form_for [@mappable, @location] |form| %> <div class="inline-label-container"> <%= form.label :street_address, "street address", :class => "inline" %> <%= form.text_field :street_address, :onkeyup => 'timed_input(this)', :value => current_user.location.address, :autocomplete => :off %> <%= form.label :location_description, "found location"%> <%= form.text_field :address, :value => @user.location.address, :disabled => :true%> <%= form.hidden_field :google_address, :value => @user.location.address %> <%= form.hidden_field :latitude, :value => @user.location.latitude %> <%= form.hidden_field :longitude, :value => @user.location.longitude %> <%= form.submit "enter location", :class => "btn

javascript - Undefined is not a function -

currently learning native js , trying create interactive menu. i'm trying run function once menubtn has been clicked have following error in console. undefined not function is global function issue here? (function () { 'use strict'; var menubtn = document.getelementsbyclassname('btn-nav'); menubtn.addeventlistener('click', function() { console.log('clicked'); }, false); }()); html <a href="#" class="btn-nav"> <span></span> <span>menu</span> <span></span> </a> you trying add event listener nodelist. need single element. var menubtn = document.getelementsbyclassname('btn-nav')[0];

sql - Get data use between date -

i have query data cost_month / month : select sum(xscf_cost_month) cost_month ncloud_data_service_cof join ncloud_data_ba b on b.xcba_cof_no = a.xscf_cof_no to_time('2014-05', 'yyyy-mm') between to_char(b.xcba_activation_date, 'yyyy-mm') , to_char(b.xcba_end_activation_date, 'yyyy-mm') query above display error : "error: operator not exist: date >= text line 4: to_date('2014-05', 'yyyy-mm') between to_char(b.xcba_a..." how fix it? try change to_char to_time no solution. please me.. do intend this? select sum(xscf_cost_month) cost_month ncloud_data_service_cof join ncloud_data_ba b on b.xcba_cof_no = a.xscf_cof_no '2014-05' between to_char(b.xcba_activation_date, 'yyyy-mm') , to_char(b.xcba_end_activation_date, 'yyyy-mm'); you don't need convert string '2014-05' . string.

Jquery select/unselect works on simple html but not with php loop -

when click on select all, checkboxes checked , disabled, , when uncheck select all, checkboxes become unchecked , normal again. then tried exact same thing retrieving data db loop , can select all, when deselect 'select all' unchecked disabled.. how can "undisable" it? demo simple html version: http://jsfiddle.net/k6r7g/11/ the php version doesn't work: <?php echo '<input type="checkbox" name="category[]" class="category_all" value="0">all'; if ( $db_conn = conndb() ){ $sql_categories = "select * cat"; $rs = getrows($sql_categories, $db_conn); foreach ($rs $row) { echo '<input type="checkbox" class="categories_list" name="category[]" value="'.$row['cat_id'].'">'.$row['cat_name'].''; } $db_conn = null; } ?> the rows echo fine in d

php - Extracted data/text from a webpage is not inserted into mysql db -

i trying insert text extracted webpage not inserted db. using xpath expression extract data , data on webpage within multiple html para or list item tags. here code <?php set_time_limit(0); $dbhost = "localhost"; $dbuser = "root"; $dbpass = ""; $dbname = "olx"; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ("error connecting database"); mysql_select_db($dbname, $conn); $res1 = mysql_query("select * `item_url` id=10"); while($r1 = mysql_fetch_array($res1)) { $url = $r1['url']; $html = file_get_contents($url); $doc = new domdocument(); @$doc->loadhtml($html); $xpath = new domxpath($doc); $details = $xpath->evaluate("//div[@id='description-text']/child::div"); foreach ($details $detail) { $nodes = $detail->childnodes; foreach ($nodes $node) { $string = $node->nodevalue; $string = preg_replace('

asp.net mvc - MVC | Kendo Grid | Pass the data from View to the controller -

i using kendoui grid populated data. grid has 1 template column, of check-box , other columns client template includes text-box in it. i need pass data of rows, selected using check-box, controller action. the updated values in text-box should passed controller. let me know if has solution same. this grid @(html.kendo().grid<mmm.lumos.entities.customentities.testplantestpointmappingviewmodel>() .name("atpgrid") .columns(columns => { columns.bound(p => p.isselected).clienttemplate("<input type='checkbox' value='#= isselected #' " + "# if (isselected) { #" + "checked='checked'" + "# } #" + "/>").width(40); columns.bound(p => p.testpointname).filterable(false).width(60); columns.bound(p => p.passthreshold).clienttem

Open new activity by clicking the button in fragment android -

i use swipe action tab have 3 tabs (tab 1,tab 2,tab 3) how can open new activity clicking button in fragment android in tab 1 page there multiple buttons want click example button 1 open new page how can that? how can open new page fragment ? <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="#2e2e2e" > <button android:id="@+id/button1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:layout_margintop="15dp" android:backg

ios - how to login facebook api ver 1.0 using fb sdk 3.14.1? -

it seems using fb sdk 3.14.1, users automatically login facebook api ver 2.0, if app created before april 30th. there way force login api ver 1.0 using 3.14.1, [fbrequest overrideversionpartwith:@"v1.0"] ? thanks! i looking , found this: [fbsettings enableplatformcompatibility:true]; you can go through standard v1.0 login procedure. warned, while turned on, disable parts of 3.14 sdk require api v2.0 features. you can turn off this: [fbsettings enableplatformcompatibility:false]; see documentation , upgrade guide more details fb.

windows phone 8 - How to change the position of dynamic buttons in wp8 c# -

in windows phone application creating dynamic button below: <grid x:name="contentpanel" grid.row="1" margin="24,0,0,0"> <textbox x:name="tb_groupname" height="90" background="white" margin="0,0,125,517" foreground="blue" textchanged="tb_groupname_textchanged" gotfocus="tb_groupname_gotfocus" lostfocus="tb_groupname_lostfocus"/> <button x:name="btn_groupname" content="add" background="aliceblue" foreground="blue" fontsize="25" width="120" height="90" horizontalalignment="right" verticalalignment="top" click="btn_groupname_click"></button> <li