Posts

Showing posts from September, 2011

android - The method onListItemClick(ListView, View, int, long) is undefined for the type Fragment -

i getting method onlistitemclick(listview, view, int, long) undefined type fragment error: fragmentc.java: package com.example.fragment; import android.graphics.color; import android.os.bundle; import android.support.v4.app.fragment; import android.support.v4.app.fragmenttransaction; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import android.view.viewgroup.layoutparams; import android.widget.listview; import android.widget.textview; public class fragmentc extends fragment{ textview mtext; @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { textview mtext = new textview(getactivity()); mtext.settext("fragment c added. \n click button go previous state"); mtext.setbackgroundcolor(color.magenta); mtext.setlayoutparams(new layoutparams(layoutparams.match_parent, layoutparams.match_parent));

java - communicate with rest services via domino agent -

i need communicate external rest service. have 'sync' information between notes database , other system e.g. when user creates document in notes similar 'note' should created in other system. i have received info describes service (how perform crud operations). i assume agent should written in java instead of lotusscript. can provide example agent connect service , perform basic post/get calls?

sql - Insert records into two tables having common column -

i want insert name stud in foreign key t_id primary key in table (teacher) want know query that. insert stud s_id,name,t_id,username,password s_id="+s_id) this query writing in jsp page...but giving me error cannot add or update child row: foreign key constraint fails (`userdb`.`stud`, constraint `stud_ibfk_1` foreign key (`t_id`) references `teachers` (`t_id`)); ("insert stud(s_id,name,t_id,username,password) values ( " + s_id + "," + name + "," + t_id + "," + username + "," + password + ")") this correct parameterized insert query syntax. your query had 2 where clauses written incorrectly, plus values clause not there, plus didn't mention column names explicitly in syntax. hence, query doesn't make sense @ all. p.s. used dummy data. insert appropriate , relevant data in query. also, assumed parameter names same columns' names. please modify parameters according code if necess

maven - Error in neo4j connectivity with Java -

on adding "dependencies" given above pom file got following error message. dependencies: <dependencies> ... <dependency> <groupid>org.neo4j</groupid> <artifactid>neo4j-jdbc</artifactid> <version>1.9</version> </dependency> </dependencies> <repositories> <repository> <id>neo4j-maven</id> <name>neo4j maven</name> <url>http://m2.neo4j.org</url> </repository> </repositories> code : package javaapplication2; import java.sql.*; import java.io.*; import java.util.*; import java.sql.*; import javax.swing.joptionpane; /** * @author shanal */ public class neo { public static void main(string[] args) throws exception { // make sure neo4j driver registered class.forname("org.neo4j.jdbc.driver"); // connect connection con = drivermanager.getcon

mysql - PHP Form with required fields -

i want creat form can connect mysql , can insert records have done. want make fields mandatory, username , car example. showing error field required or "name cannot have numbers". stuff that. unable figure out. some please: i have index.html <form action="insert.php" method="post"> nume: <input type="text" name="name"><span class="error">* <?php echo $error;?></span><br> prenume: <input type="text" name="prenume"><br> masina: <input type="radio" name="masina" value="vito"> (vito) <input type="radio" name="masina" value="skoda"> (skoda) <input type="radio" name="masina" value="skoda2"> (skoda) <input type="radio" name="masina" value="audi"> (audi)<br><br> data: <input type="date" name

android - Onkeydown failed to work on (screen touch ) -

i have textbox default value onkeydown should cleared default value seems i'm not able fix please me on this. this script $('input').keydown(function () { this.value = "" }); $('input').blur(function () { if (this.value = "") { this.value = this.title; } }); you want use focus() not keydown() clearing default text, otherwise won't possible type in box. secondly, javascript case sensitive, should if , not if , , need use == comparison operator. $('input').focus(function () { this.value = "" }); $('input').blur(function () { if (this.value == "") { this.value = this.title; } });

bash - How to allocate array which is passed to a function by name -

i want create function iterates through array , inserts given value, if not yet included. using function on 2 different parts of code , have use different arrays. therefore delivering array names function. can't figure out how allocate slot of array store element @ place. here code: name=("hello" "world") function f { array_name=$2[@] array=("${!array_name}") length=${#array_name[@]} (( = 0; <= $length; i++ )); if [[ "${array[i]}" = "$1" ]]; break; fi if [[ "$i" = "$length" ]]; ${2[$length+1]=$1}; fi done } f "test" "name" edit: want array append given value this for in ${name[@]} echo $i done would have output: hello world test but apparently "${2[$length+1]=$1}" not working. (idea passing array here: bash how pass array argument function ) if understand correctly want

c# - How to check if slideshow is running -

i want check if slideshow running. here code: private void checkslideshow() { if (globals.thisaddin.application.activepresentation.slideshowwindow.active == msotrue) { //slideshow running } } i error: the name 'msotrue' not exist in current context what msotrue , need write here ... == ? write msotristate.msotrue http://msdn.microsoft.com/en-us/library/ms251168 .

Reading large XML files with MATLAB -

after searching online tonight i've failed find solid solution problem. i have large xml files, more n42 schema xml ( link ), i'd read matlab. size wise, these files 50mb - 300mb i.e. large. i need couple of tags within file it's proving difficult data! standard matlab xmlread() function uses dom access runs memory problems , takes forever. is there easy option matlab e.g. sax or using regular expressions? i'm happy if isn't elegant solution, allow me access data. thanks in advance! you can use java within matlab . use java sax parser.

python - Scrapy -- scrappy not returning information from a html tag -

i'm trying of scraping website, i'm using scraping scrapy , when make scraping html data, html tag need obtain data, i'm using xpath obtain of data tag not return nothing this website (" http://www.exito.com/products/0000293501259261/arroz+fortificado?cid=&page= ") , part of html i'm scraping <div class="pdpinfoproductprice"> <meta itemprop="currency" content="cop"> <h4 itemprop="price" class="price"> $5.350</h4> </div> i need use scrapy on tag h4 obtain price , when i'm scraping obtain class empty, class not have tag inside should simple thing do, can not get price in way i using xpath on page can obtain price sel.xpath('[@id="plpcontent"]/div[3]/div[5]/h4').extract() sel.xpath('//*[@id="atg_store_two_column_main"]/div[2]').extract() //*[@id="mainwhitecontent"]/div[2]/div[1]/div[1]/div[1]/d

eclipse - android app is crashing -

using big nerd ranch tutorial book , finished chapter or have 1 page left there points in quizactivity.java i'm not sure if i'm supposed delete. my quizactivity.java is package com.bignerdranch.android.geoquiz; import android.os.bundle; import android.support.v4.app.fragment; import android.support.v7.app.actionbaractivity; import android.view.layoutinflater; import android.view.menu; import android.view.menuitem; import android.view.view; import android.view.viewgroup; import android.widget.button; import android.widget.textview; import android.widget.toast; public class quizactivity extends actionbaractivity { private button mtruebutton; private button mfalsebutton; private button mnextbutton; private textview mquestiontextview; private truefalse[] mquestionbank = new truefalse [] { new truefalse(r.string.question_oceans, true), new truefalse(r.string.question_mideast, false), new truefalse(r.string.question_africa, fals

android - How to check an EditText has focus? -

how check edittext has focus? there method boolean hasfocus() yes, hasfocus() there, inherited android.view.view another way achieve edittext et = (edittext) findviewbyid(r.id.edittxt); if(this.getcurrentfocus().getid() == et.getid()){ // view in focus }else{ // not in focus }

python - DateTimeProperty time-zone -

using gea , trying set time-zone datetimeproperty below. set timezone in model class , not when creating entry. class person(ndb.model): date_created = ndb.datetimeproperty(auto_now_add=true) you not setting timezone, setting datetime, when create entity. timezone should stored seperately. appengine datetime functionality works utc. you should convert utc when performing queries, , timezone want when displaying content.

networking - Confusion regarding SSH Security after Authentication -

i have been reading ssh , how uses public key crytography authenticate client. have understood concepts have doubt: quoting archlinux wiki page: "when ssh server has public key on file , sees requesting connection, uses public key construct , send challenge. challenge coded message , must met appropriate response before server grant access. makes coded message particularly secure can understood private key. while public key can used encrypt message, cannot used decrypt same message. you, holder of private key, able correctly understand challenge , produce correct response." after authentication happens , server gives me access, how further messages encrypted? of commands run on server, how ensure response of of commands indeed valid/genuine? short version: during key exchange phase symmetric cipher chosen , new symmetric key generated. communications after point encrypted and, due properties of (good) key exchange protocol, session key known particular clie

asp.net - Debug VBScript from MSScriptControl.ScriptControlClass, Change DefaultAppPool registry -

i have asp.net application use msscriptcontrol.scriptcontrolclass execute vbscripts. however, breakpoints ('stop') ignored when eval() function runs script. i'd see jitdebugger triggered, allow me use microsoft script debugger debug script. has had similar issues? edit: after investigation found due our iis settings (we using windows authentication) asp.net worker process runs defaultapppool , not have same privileges or registry set logged on user. guess question "how change regsitry keys defaultapppool user?" edit2: asked question in separate thread , got answer: how change registry keys defaultapppool? the answers " debugging script in ms script control " list relevant options , registry values. if hints not help, try isolate culprit systematic checks. can debug a console script without script control a console script using code via script control an asp without script control

ascii - Java StringBuilder Appending Vertical-Tab Character Fails -

i receive data inputstream , have ascii character 11 vertical tab. can see vertical tab 11 in debugger. try append character stringbuilder appended , length increased. however, problem when string returned ascii character lost when doing stringbuilder.tostring().tochararray() ascii character 11 can seen. i need see in string ascii character 11. public static void main(string[] args) { // receive data inputstream int read = inputstream.read(); stringbuilder stringbuilder = new stringbuilder(); stringbuilder.append((char) read); // /u000b ' ' stringbuilder.append("h"); system.out.println(stringbuilder.tostring()); // prints h char[] characters = stringbuilder.tostring().tochararray(); // length 2 } how can achived? edit: i need see ascii character in original string in debugger. example: public string getoriginalstring() { return originalstring; } public string process(string originalstring) { return modifie

Restrict Kendo Grid to Current Route Id -

i'm trying include kendo ui asp.net mvc grid on edit page of mvc application , restrict grid return values current route id. i've been researching ways this, can't find that's need, or i'm new @ connect dots. my ideas far either apply filter datasource or send parameter controller , have restrict datasourceresult. for datasource filter in view, can this: .filter(filters => { filters.add(d => d.companyid).isequalto(2); }) but can't figure out how replace hardcoded 2 value from, say, @viewcontext.routedata.values["id"], or something. passing parameter controller, can following: public actionresult divisions_read([datasourcerequest]datasourcerequest request, int id) { using (var db = new appcontext()) { iqueryable<division> divisions = db.divisions; datasourceresult result = divisions.todatasourceresult(request, division => new divisionviewmodel { divisionid = division.divisionid,

C++ Can't find error -

not sure i'm doing wrong here. can't run. #include "stdafx.h" #include <iostream> #include <vector> using namespace std; int _tmain(int argc, _tchar* argv[]) { int a[] = { 2, 3, 4, 5 }; skipone(a, 2); } void skipone(int * array, int n) { int total = 0; (int = 0; < sizeof(array); i++) { if (i != n) { total = + array[i]; } } cout << "the total is: " << total << endl; } this went below. #include "stdafx.h" #include <iostream> #include <vector> using namespace std; void skipone(vector<int> & array, int n) { int total = 1; (int = 0; < array.size(); i++) { if (i != n) { total *= array[i]; } } cout << "the total is: " << total << endl; }

jquery - How to change the formatting (eg make bold) only the first 5 words typed in a form -

i change formatting of first 5 words user inputs textarea automatically (eg looks para). i know there way value of text input in jquery using: $('input').keyup(function() { $('span').text($(this).val()); }); however, have no idea whether possible change formatting of first few words user types, while typing it. reason wish because have comment system "title" of comment first 5 words of textarea of comment, , want people recognise while typing (as part of ui feedback). can done? how? thanks! $('input').keyup(function() { var txt = $(this).val(); var re=new regexp("\\s+(?: \\s+(?: \\s+(?: \\s+(?: \\s+)?)?)?)?"); var beginning = re.exec(txt); $('span').text(beginning); var rest = txt.substring(beginning.length); // start space });

string - python print invalid syntax -

print (n+1) ": x1= ",x1,"f(x)= ",fx i want print x1 , value of function @ x1 (fx), invalid syntax on end of first quotation. can explain me problem is. the problems there should comma(,) before 1st quotation. print (n+1), " : x1=",x1,"f(x)=",fx printing f(x) print correct value if have return statement in function

java - exception during convert html to pdf using itext -

i trying convert html pdf file in java using itext.i using eclipse editor,i have add 2 jar file xmlworker-5.4.3.jar, itextpdf-5.1.0.jar in classpath.my code given beloow document document = new document(); pdfwriter writer = pdfwriter.getinstance(document, new fileoutputstream("pdf.pdf")); document.open(); xmlworkerhelper.getinstance().parsexhtml(writer, document,new fileinputstream("index.html")); system.out.println( "pdf created!" ); when run above code gives me exception. don't know how solve it. exception given below exception in thread "main" java.lang.nosuchmethoderror: com.itextpdf.text.log.loggerfactory.getlogger(ljava/lang/class;)lcom/itextpdf /text/log/loger; @ com.itextpdf.tool.xml.net.fileretrieveimpl.<clinit> (fileretrieveimpl.java:67)at com.itextpdf.tool.xml.css.styleattrcssresolver.

entity framework - Do rowversion/timestamp columns in SQL Server need a nonclustered index when using EF code-first? -

all of tables have rowversion column ef uses optimistic concurrency checking. should create nonclustered index on column faster data retrieval? each table has clustered primary key named id . whenever updating data, ef/sql try locate row based on id first , run rowversion check? none of query plans seek on column. writes performed filtering on primary key columns causes seek on index provides primary key. rowversion index never helps. to answer such questions empirically, compare execution plans , without index in question.

metaprogramming - Any way to implement implicit "it" in Ruby blocks, like in Lisp? -

apparently in lisp when write block/lambda without parameters, word "it" takes value passed in block. this seems elegant; it; want in ruby. there way make work? 3.times { p } should print "0 1 2" obviously eval block in context included method_missing returned value :it (or maybe def object#it). value should return? if "yield 42" block, , block declared without parameters, there general way recover value 42? (the original version of question asked c#, hence comments. apparently c# doesn't have lisp does.) nope, don't think so. ruby has self it's not going out here you have do 3.times { |n| p n }

Java Servlet/JSP Custom Error Page -

i have custom error page setup basic debugging whilst i'm programming , reason none of values try catches through. error page says: "null null null". if can i'd grateful. servlet: package com.atrium.userservlets; import java.io.ioexception; import java.util.regex.matcher; import java.util.regex.pattern; import javax.servlet.servletexception; import javax.servlet.annotation.webservlet; import javax.servlet.http.httpservlet; import javax.servlet.http.httpservletrequest; import javax.servlet.http.httpservletresponse; import javax.servlet.http.httpsession; import com.atrium.daos.userdao; import com.atrium.userbeans.userregistrationbean; @webservlet("/register") public class userregistrationservlet extends httpservlet { private static final long serialversionuid = 1l; public userregistrationservlet() { super(); } protected void doget(httpservletrequest request, httpservletresponse response) throws servletexception, ioexcept

android - How to get a specific value which is displayed in ListView? -

in project, i've database in i've table called student. in table i've attributes roll_no, first_name, last_name, contact, class_name, password, email_id, gender. i'm reading students data database , showing "first_name, last_name , roll_no" in listview. code follows: listview = (listview) findviewbyid(r.id.id_student_list); db = new databasehelper(this); arraylist<hashmap<string, string>> items = new arraylist<hashmap<string, string>>(); // reading contacts log.d("reading: ", "reading students.."); list<student> studs = db.getallstudents(); (student cn : studs) { // writing values map hashmap<string, string> map = new hashmap<string, string>(); map.put("firstname", cn.getfirstname()); map.put("lastname", cn.getlastname()); map.put("roll", integer.tostring(cn.getroll_no())); items.add(map);

php - How to check form validation in controller in Zend Framework 1.12 -

how check if form validated or not, , how show error message if form not according validations in zf2 write as usercontroller $request = $this->getrequest(); $form = new form_loginform(); if($request->ispost()){ if($form->isvalid($this->_request->getpost())){ $authadapter = $this->getauthadapter(); $username = 'john'; $password = '123'; $authadapter->setidentity($email) ->setcredential($password); $auth = zend_auth::getinstance(); $result = $auth->authenticate($authadapter); if($result->isvalid()){ $identity = $authadapter->getresultrowobject(); $authstorage = $auth->getstorage(); $authstorage->write($identity); $this->_helper->redirector(register/user); echo 'valid'; } else { $this->view->errormessage = "user name or password incorrect"

regex - What's wrong with this particular regular expression? -

i need write regular expression validate input in form. want restrict use of these characters: \ / & < > " . else allowed. examples of valid inputs are: my basket , groceries , fruits , £$% , , += . examples of invalid inputs are: a&b , a > b , 2 / 3 , , a<>c . below code i'm using not working properly, because returns valid inputs invalids. public class main { public static void main(string[] args) throws ioexception { bufferedreader br = new bufferedreader(new inputstreamreader(system.in)); while (true) { system.out.print("\nenter text: "); string inputtext = br.readline(); system.out.println("\nthe input " + (isvalidinput(inputtext) ? "valid" : "invalid")); } } public static boolean isvalidinput(string inputtext) { pattern p = pattern.compile("[^/\\\\/&<>\"]"); matcher matcher = p.m

javascript - Chrome.runtime.onMessage doesn't work -

i building chrome.extension. in it, have button in popup.html (that appears in top-right toolbar). popup.html file linked htmljs.js file has following code: (function(){ window.onload = init; function init(){ if (!chrome.runtime) { // chrome 20-21 chrome.runtime = chrome.extension; } else if(!chrome.runtime.onmessage) { // chrome 22-25 chrome.runtime.onmessage = chrome.extension.onmessage; chrome.runtime.sendmessage = chrome.extension.sendmessage; chrome.runtime.onconnect = chrome.extension.onconnect; chrome.runtime.connect = chrome.extension.connect; } button.onclick = function(){ console.log("working onclick!"); // working! // send message content script chrome.runtime.sendmessage(["testing"]); } } })(); and popup.js (that operates on web pages stackoverflow, called content-s

vb.net - Trying to move items from one to the other -

Image
]i having strange problem when try move items 1 grid view using bindingsource adding in blank row reason private sub btnmove_click(sender system.object, e system.eventargs) handles btnmove.click dim bs new bindingsource dim integer dim removelist list(of inforemotefiles) = filelist = 0 grdavailfiles.selectedrows.count grdprocessfiles.rows.add(grdavailfiles.rows(a).cells("filename").value) removelist.removeall(function(p inforemotefiles) p.filename = grdavailfiles.rows(a).cells("filename").value) next bs.datasource = removelist grdavailfiles.datasource = bs end sub please see mean row below have selected dont no comming thanks the blank row added automatically if have allowusertoaddrows property set true on datagridview control. from documentation: if datagridview bound data, user allowed add rows if both property , data source's ibindinglist.allownew property set true. on separate not

wpf - Win 8 App: Access Object from Resource in app.xaml from -

how can access object thats defined in resource in app.xaml viewmodel class? you can access resource this: var resource = app.current.resources["resourcekey"]; but suggest not viewmodel class because that's not mvvm suggests. should not access ui component viewmodel.

In an Apigee API Proxy, why does rewriting "target.url" via a JavaScript policy not route to the new target? -

the use case here target endpoint url has changed based on conditions. javascript policy used overwrite "target.url" not call routed new target. still routes 'default target endpoint url' set on 'overview' tab of api proxy. here javascript: context.setvariable("target.url", url); where url new target url value needs set. http://apigee.com/docs/api-services/content/javascript-object-model shows similar example , http://apigee.com/docs/api-services/api/variables-reference confirms variable reference correct. please ensure policy javascript in targets side of flow (vs. proxies side). won't see change take in effect if policy executing in proxies side of flow.

xml - Get all nodes and values without knowing the nodes name and level C# -

i have 15,000 xml in form of string . each of xml has average of 1000 nodes. i not know nodes name, , hierarchical level of xml. each xml, need parse them list<string> elements , list<string> values . in case parent , child nodes present, parent node added list<string> elements , null or empty string added list<string> values what possible ways of achieving so? edited: supposed need know how parse 1 xml, , can loop same method 15,000 records. p/s: thought of using dictionary or multi-dimensional list have <key><value> pair, wasn't approved because affect other application significantly. has list of elements , list of values you can use linq nodes xml. you'll need add using system.xml.linq; parsing class, can grab data this. string xml = "your xml string" var myxmldata = xelement.parse(xml); //get names of nodes var allnames = (from e in myxmldata.descendants() select e.name.localnam

php - Adding select field after order notes for WooCommerce checkout -

i'm trying add bunch of custom fields @ end of checkout form collects additional data we'd need process order. this have: add_action( 'woocommerce_after_order_notes', 'student_info_fields' ); function student_info_fields( $checkout ) { echo '<div id="student_info"><span>the following information below used create account.</span>'; //this adds student_name field woocommerce_form_field( 'student_name', array( 'type' => 'text', 'class' => array('form-row-wide'), 'label' => __('student name'), 'placeholder' => __('eg: "john smith", "johnny", etc'), 'required' => 'true', ), $checkout->get_value( 'student_name' )); /* have 2 other text fields here follow same syntax student_name */ //this adds student_g

visual studio 2013 - T4 reports Compiling transformation: Invalid token 'this' in class, struct -

attempting run t4 templates immutable object graph gives errors of ╔═══════╦═══╦══════════════════════════════════════════════════════════════════════════════════════════════════╦═════════════════════════════════════════════════════════╦═══╦════╦══════╗ ║ error ║ 5 ║ compiling transformation: invalid token 'this' in class, struct, or interface member declaration ║ c:\dev\immutableobjectgraph-master\2013\demo\message.tt ║ 1 ║ 1 ║ demo ║ ║ error ║ 6 ║ compiling transformation: method must have return type ║ c:\dev\immutableobjectgraph-master\2013\demo\message.tt ║ 1 ║ 6 ║ demo ║ ║ error ║ 7 ║ compiling transformation: type expected ║ c:\dev\immutableobjectgraph-master\2013\demo\message.tt ║ 1 ║ 12 ║ demo ║ ╚═══════╩═══╩══════════════════════════════════════════════════════════════════════════════════════════════════╩═════════════════════════════════════════════════════════╩══

php array using in_array not working -

hi have object array ($perms_found) follow: array ( [0] => stdclass object ( [permissions_id] => 1 ) [1] => stdclass object ( [permissions_id] => 2 ) [2] => stdclass object ( [permissions_id] => 3 ) ) i want use in_array find of permissions_id , have tried this: var_dump(in_array(1, $perms_found , true)); but keep getting : bool(false) what doing wrong please help? in_array looking 1 in array, array contains objects, not numbers. use loop accesses object properties: $found = false; foreach ($perms_found $perm) { if ($perm->permissions_id == 1) { $found = true; break; } }

python - BeautifulSoup parsing numbers over text from HTML -

i'm learning python , trying parse data using beautifulsoup. wish print ipv4 rather ipv6 address whatsmyip website. can't seem figure out why parses ipv6 on ipv4 when first occurrence ipv4 address in html tags. appreciate on this. import urllib2 bs4 import beautifulsoup page = urllib2.urlopen("http://www.whatsmyip.net") pagehtml = page.read() page.close() soup = beautifulsoup(pagehtml) data = soup.find_all("input") input in data: ip = input.get('value') print ip just because ipv6 address last 1 found in <input> element. iterating on <input> elements , result ip variable remembers last one. try this: print data[0].get('value')

ios - Adding the NSObject to the a SKScene -

i making racing game using spritekit. create nsobject class called "gameobject" store properties, physics. create nsobject class called "gameworld" store game objects, creating player objects , other objects location , functions of direction buttons. however, when start write game scene class, cannot add world object scene, means car doesn't show in scene. can me question? codes of skscene class provided below, @interface gameplay : skscene @property (nonatomic) gameworld *world; -(void)update:(nstimeinterval)currenttime; -(id) initwithsize:(cgsize)s andworld:(gameworld *)w; @end @implementation gameplay - (id) initwithsize:(cgsize)s andworld:(gameworld *)w { self = [super initwithsize:s]; if (self) { _world = w; } return self; } -(void) didmovetoview:(skview *)view { if (!self.contentcreated ) { [self createscenecontents]; self.contentcreated = yes; } } -(void) createscenecontents { // turn off g

apache - How to make a 301 redirect for advanced condition? -

http://yourdomain.com/articles/[anything]/[anything]/[title] this needs this http://yourdomain.com/articles/[title] also http://yourdomain.com/blogs/[anything]/[anything]/[anything]/[anything]/[anything]/[title] this needs this http://yourdomain.com/articles/[title] is there way this? tia

android - Modifying TextView crashes program -

so i've defined layout in xml : <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:gravity="center"> <textview android:id="@+id/char_name" android:layout_width="fill_parent" android:layout_height="fill_parent"/> </linearlayout> but when try change in java program crashes. public class displaymessageactivity extends activity { @suppresslint("newapi") @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); textview charname = (textview) findviewbyid(r.id.char_name); charname.settext("bob"); setcontentview(r.layout.displayname); } } my app compiles , runs, when switches activity crashes. if set text in

How to display multiple html pages using single index.html -

i have multiple html pages , want display them using index.html, don't want use link button or thing. want display them after time period. how can so? you can use meta tag in every page header. , inside meta tag can put redirect link , time. <meta http-equiv="refresh" content="5;url=http://www.stackoverflow.com/"> this time in second. content="5;

java - scrollbars adjust when zooming using Jxlayer and PBar extensions -

i tried use jxlayer , pbar extensions (using response of madprogrammer here ) add zoom capability jpanel contained in jscrollpanel. zoom work fine when zoomed panel becomes larger containing jframe scrollbars doesn’t adjust , stay inactive. here code: jframe frame = new jframe("testing"); frame.setdefaultcloseoperation(jframe.exit_on_close); frame.setlayout(new borderlayout()); jpanel toppanel = new jpanel(); integer[] zoomlist = {50, 75, 100, 125, 150, 200}; jcombobox<integer> zoombox = new jcombobox<>(zoomlist); zoombox.addactionlistener(new actionlistener() { @override public void actionperformed(actionevent ae) { int value = (int) zoombox.getselecteditem(); double scale = value / 100d; transformmodel.setscale(scale); } }); toppanel.add(zoombox); panel centerpanel = new testpane(); jscrollpane scrollpane = ne

javascript - How can you transition between views containing Scrollviews in Famo.us? -

i looking re-tool mobile web application make use of famo.us. it's quite standard scrollviews embedded in standard surfaces. if me figure out how transition between surfaces containing scrollviews, i'd sincerely appreciate it. so far have basic series of scrollviews nested in surfaces , have them transitioning sequentially when clicked. it's based on rendercontroller example included in famo.us examples github repo. var maincontext = engine.createcontext(); var rendercontroller = new rendercontroller(); var surfaces = []; var counter = 0; var temp = []; (var = 0; < 10; i++) { var scrollview = new scrollview(); scrollview.sequencefrom(temp); (var = 0, temp; < 40; i++) { temp = new surface({ content: "surface: " + (i + 1), size: [undefined, 200], properties: { backgroundcolor: "hsl(" + (i * 360 / 40) + ", 100%, 50%)", lineheight: "200p

php - PHPMyAdmin error after updating EasyPHP -

i updated version of windows based apache server (i'm using easyphp) , i'm having issues php myadmin. old version(13.1 vc9), i'm able connect myadmin page, no problem. however, not able connect using new version(14.1 vc9). error new version is: object not found! requested url not found on server. if entered url manually please check spelling , try again. if think server error, please contact webmaster. error 404 127.0.0.1 apache/2.4.7 (win32) php/5.4.24 what need able re-access phpmyadmin. you should simple open http://127.0.0.1/home/ and here have sections modules. should have here @ least 1 phpmyadmin , when click it, open phpmyadmin. if want use alias - example want load phpmyadmin using http://phpmyadmin have create it. so go again http://127.0.0.1/home/ , check if below phpmyadmin modules have virtual hosts manager 1.4 . if not, close easyphp , go http://www.easyphp.org/modules.php , download , install virtual hosts manager (choose 1 14.1

Correlation between BindingType and CoercionType in the JavaScript API for Office (Word) -

its easy use bindings in office 2013 task pane apps office.context.document.bindings.addfromselectionasync . the documentaton telling me can insert html binding. (word only) when try this, in documentation, error the specified coercion type not compatible binding type. . so binding type should use? matrix , table seems not right oney, , text not working! the seems no corrent one! thanks! there great word sample wikipedia store app on github can pull down , see https://github.com/officedev/office-apps how injecting html word body.

ggplot2 - R highlight a point on a line -

here code produces plot. can run it: library(ggplot2) library(grid) time <- c(87,87.5, 88,87,87.5,88) value <- c(10.25,10.12,9.9,8,7,6) variable <-c("a","a","a","b","b","b") pointsize <-c(5,5,5,5,5,5) shapetype <-c(10,10,10,10,10,10) stacked <- data.frame(time, value, variable, pointsize, shapetype) stacked$pointsize <- ifelse(stacked$time==88, 8, 5) stacked$shapetype <- ifelse(stacked$time==88, 16,10) myplot <- ggplot(stacked, aes(x=time, y=value, colour=variable, group=variable)) + geom_line() + xlab("strike") + geom_point(aes(shape = shapetype, size = pointsize)) + theme(axis.text.x = element_text(angle = 90, hjust = 1), axis.text = element_text(size = 10), axis.title=element_text(size=14), plot.title = element_text(size = rel(2)) , legend.position = "bottom", legend.text = element_text(size = 10), legend.key.size = unit(1, "cm") ) + scale_shape_identity(

ibm mobilefirst - Migrate a 5.0.6 studio project into Worklight 6.1 studio -

is possible migrate wl 5.0.6 project wl 6.1 studio. project uses dojo, , cordova. initial results dojo not found, , java based cordova code not able find ::import org.apache.cordova.api.callbackcontext; import org.apache.cordova.api.cordovaplugin; apprecaite suggestions of steps tpo accomplish migration, or perhaps best appraoch create new 6.1 project , manually move in logic 5.0.6 project. thanks helpful advice. i cannot imagine worklight 5.0.6-based app dojo , cordova plug-in, migrate worklight 6.1.0.x as mention, dojo library missing, makes sense. dojo library separate entity worklight project. need import well. worklight 5.0.6 based on olden version of cordova 2. worklight 6.1.0.x uses cordova 3.1. in cordova 3, structure of config.xml way call cordova plug-in has changed (if memory serves me right), suggest here consult getting started training module creating cordova plug-ins (also check out sample project) , verify in migrated project follow

cordova - PushPlugin does not register device and return regid on onNotificationGCM -

Image
i have install pushplugin phonegap 3.4. the onnotificationgcm case:registered has never execute, unable store regid in server database , starts send notification. whenever app opens, shows deviceready event received registering android success ok i have done: changed senderid google cloud messaging android - on created server key (but should not important not @ sending portion) do need: to install google play service api? what missing ? i waited few minutes there no registered message like $("#app-status-ul").append('<li>registered -> regid:' + e.regid + "</li>"); i had problem you. remove line of codes contain html thing. if want retrieve it, store sessionstorage/localstorage, console or alert it. my html remove version var pushnotification; document.addeventlistener("deviceready", ondeviceready, false); // device apis available // function ondeviceready() { pushnotification =