Posts

Showing posts from January, 2014

php - Can't display image in listview from database mysql -

i display image in listview android mysql database using php, json image can't displayed. link_image should show location of image not display valid location. please me. thank you status.php <?php // array json response $response = array(); // include file koneksi.php include_once("connect.php"); $query = mysql_query("select * status order id_status desc"); if (mysql_num_rows($query) > 0) { $response["data_status"] = array(); while($baris = mysql_fetch_array ($query)) { $id_status=$baris['id_status']; $status=$baris['status']; $id1=$baris['id_user']; $id2=$baris['id_user_tujuan']; $tanggal=$baris['tgl']; $awalan = substr($id1, 0,2); $awalan2 = substr($id2, 0,2); switch($awalan) { case 'ad': $name=mysql_query("select * admin id_user = '$id1'"); // echo $nama; while($baris2 ...

python - How to Search in file with sub-string contain backslash and \n -

how search in file sub-string containing backslash? substring="test\\123\\n" filename="temp.txt" file = open(filename, "r") line in file: if re.search(substring, line): temp.txt sometexttest\123\ntest secoundline ... etc how search string contain backslash , \n "test\\123\\n" . tried adding 1 more backslash not working. is looking for? substring="test\\1234\\n" filename="temp.txt" file = open(filename, "r") line in file: if substring in line: print line giving output: sometexttest\1234\ntest

excel - Need to sum up worksheets into a "total" sheet but need the ability to be able to add worksheets on demand -

folks, my first time here gentle. i have n identically formatted worksheets (with same formulas) in work book. there total-up worksheet sums of data (in same rows/columns) individual worksheets. i need ability able insert new worksheet (identical in format original n worksheets) , have totals add up. i use following formula in cells in total-up worksheet: =sumthem( address(row(), column())) sumthem following function: public function sumthem(addy string) double dim ws worksheet dim tots double tots = 0 each ws in activeworkbook.worksheets if ws.name "*+" tots = tots + ws.range(addy).value end if next ws sumthem = tots end function my simple sumthem function adds cells row/column address (addy) across worksheets worksheet name ends in "+". this seems work until copy in worksheet (identical first n sheets in format , formulas). none of formulas recompute. my questions: is there better way this...

ruby - scripting logic : matching patterns -

i trying figure out regex/scripting logic parse out this; raw data {clndsdb=medgen:omim:snomed_ct;clndsdbid=c0432243:271640:254100000} here, value is; medgen = c0432243 omim = 271640 snomed_ct = 254100000 result: 271640 i envisaging convoluted if-else loop result. wanted know if there simple way of same result. appreciate answers. perhaps this: (assuming there 3 fields) (?<=[=:])(?<key>[^:;]+)(?=[:=;](?:[^:;=]+[=;:]){3}(?<val>[^:]+)) the idea capture field values inside lookahead assertion not interfering overlapping substrings. however, there cleaner way uses successive split.

android - Using Gson to parse string to object. Boolean value is always false -

i fecht json-string server: {"erfolgreich":"true","id":"14"} when call //result string above msgserver = gson.fromjson(result, msgspielererstellensa.class); the boolean false... what doing wrong? here msgspielererstellensa public class msgspielererstellensa { private long id; private boolean iserfolgreich; public msgspielererstellensa(long id, boolean iserfolgreich) { super(); this.id = id; this.iserfolgreich = iserfolgreich; } public boolean iserfolgreich() { return iserfolgreich; } public void seterfolgreich(boolean iserfolgreich) { this.iserfolgreich = iserfolgreich; } public long getid() { return id; } public void setid(long id) { this.id = id; } } because correct name boolean field erfolgreich , not iserfolgreich . please use following class: public class msgspielererstellensa { private long id; ...

symfony - Slug not generated when persisting Entity to Database -

i'm using doctrineextensions , followed docs. have entity field decorated sluggable annotation: use gedmo\mapping\annotation gedmo; . . . /** * @gedmo\slug(fields={"city"}, updatable=false) * @orm\column(length=255) */ private $slug; when try persist new entity sql error: persist: $em = $this->getdoctrine()->getmanager(); $em->persist($location); $em->flush(); error: sqlstate[23000]: integrity constraint violation: 1048 column 'slug' cannot null config.yml: # stof doctrine extensions stof_doctrine_extensions: orm: default: sluggable: true according docs need, yet slug not being generated. this simple on looked. did not have field mapped in orm.xml file... once added mapping worked: <field name="slug" type="string" column="slug" length="255" nullable="false"> <gedmo:slug fields...

ios - Blocks and messaging -

the question here more of educational one. began think of hour ago while flipping around lego block (silly, know). a block object created on stack, understand. let a object, means can do: [a message]; based on that, if block object, do: [block message]; am correct? and when runtime sees that, call: objc_msgsend(block, @selector(message), nil); so question is, how can send block message? and if possible, imagine possible send block message arguments being blocks well? and, if call block doing: block(); does mean make block message ( sel ) well, because blocks have signature void (^)(void) resembles of method? because if possible, following surprise me: objc_msgsend(block, @selector(block), block); or: objc_msgsend(block1, @selector(block2), block3); i hope imagination not running bit wild , understanding not off here (correct me, if is). blocks objects purposes of storage , referencing. making them objects, blocks can retain/release...

how to save images with metricam in c# console application -

i using code images webcam, guess metricam library anyone knows how images without using picturebox? webcam camera = new webcam(); camera.connect(); picturebox1.image = camera.getbitmap(); picturebox1.image.save(@"c:\image1 " + ".jpeg", imageformat.jpeg); picturebox1.image image type. can handle saving on own. handle saving when used picturebox too, notice how call save() method on image property , not on picturebox instance. webcam camera = new webcam(); camera.connect(); image image = camera.getbitmap(); image.save(@"c:\image1 " + ".jpeg", imageformat.jpeg);

javascript - Use a variable in setTimeout() to set the time -

here want timout in tout times, settimeout() not using tout timeout parameter. how solved. <script language="javascript" type="text/javascript"> var tout=10*1000; var t = settimeout(document.myform.submit(),tout)); </script> var tout = 10 * 1000; var t = settimeout(function() { document.myform.submit(); }, tout); read how use settimeout here . first argument should function reference , second timeout in milliseconds.

sql - Can one table field link 2 additional tables? -

hello i'm student doing course in database oracle rdbms being used. have problem figuring out how implement section of eerd i'm hoping insight in. have attached diagram below. the case blood bank. there 2 suppliers blood bank: donors give blood(identified id) other blood banks in area (identified id) i want able track supplied particular parcel of blood in inventory. try assess leading field in inventory table referencing 2 fields in 2 different tables don't think possible unless advance concept haven't learned. assumptions used creating eerd a donor donate multiple parcels of blood blood of varying types may supplied external blood banks in case of shortages customers (health centers) request blood taken inventory , recorded transaction transactions can reflect 1 customer a customer may perform multiple transactions a parcel of blood can reflected on 1 transaction a transaction reflect 1 parcel of blood in order distinguish between occasional ,...

php - symfony2 form builder date type -

i'm building booking system hotel website contains rezervations ability. rezervations form contains name, last name etc... , date of arrival , date of departure. 'date' type in form builder constructs 3 select tags; month, day, year in order. customize in various ways. i change order of select tags be: days, months, years. change default english months local ones (i'm croatian). so, how do in createformbuilder() funciton? tried adding 'choice' keys parameter array, keeps sending errors expected parameter long string given. also, advice welcome worked dates in forms in symfony2, pitfalls, common mistakes, should use or should not, stuff that. this you're looking fore $builder->add('date_field', 'date', array( 'format' => 'dd-mm-yyyy', )); moreover can add various type of customization date_field field such have not 3 differents selects 1 , on. take here

java - different generic type-erasure behaviour for Hashmap and EnumMap -

i noticed surprising(for me) difference between hashmap , enummap in 'generics behaviour'. what mean? consider following 2 code snippets: snippet 1 enum types { a, b, c } enum wrong { } public class test { public static void main(string... args) { enummap<types, integer> m = new enummap<types, integer>(types.class); enummap m1 = m; m1.put(wrong.a, 1); } } out: exception in thread "main" java.lang.classcastexception: class wrong != class types snippet 2 enum types { a, b, c } enum wrong { } public class test { public static void main(string... args) { hashmap<types, integer> m = new hashmap<types, integer>(); hashmap m1 = m; m1.put(wrong.a, 1); } } out: successful compilation! conclusion: therefore hashmap erasure fullfils same code enummap - not. why? your conclusion incorrect: erasure occurs in both cases...

scala - Confused about function literals -

scala newbie here. i have set defined , declared follows: var g = set(1,2,3) now want print out each element of set follows using function literal: scala> g.foreach(s => println(s)) 1 2 3 all good. i can more concise this: scala> g.foreach(println) 1 2 3 all good. now when this: scala> g.foreach(println()) <console>:9: error: type mismatch; found : unit required: int => ? g.foreach(println()) why fail? me (a newbie), seems equivalent of g.foreach(println) . please can explain error. when pass function literal or function directly, in first 2 examples, do not invoke function immediately. however, in last example do invoke it, because println() syntax calling functions , methods. because println() result type unit , you're in fact passing value of type unit method expects value of type (string) => unit , , of course these different values, compiler shows error.

Expand date ranges for aggregations on ElasticSearch -

i have create dimension series of values , from/to fields , stored on elasticsearch. i need create aggregations on attributes expanded day on range of dates given. instance, have following: location sales region san francisco west 1/1/2013 12/01/2013 oakland west 12/02/2013 04/05/2014 but now, need aggregate return date, location, count(*) 1/1/2013, san francisco, 1 1/2/2013, san francisco, 2 ... 12/02/2013 oakland 1 ... 04/05/2014 oakland 1 can give me tip how blow range can happen or if elastic search offers similar?

c++ - Save Mat image from camera prosilica -

i developping program acquire image prosilica camera. i recuperate frame strcut contains imagebuffer variable. to save recuperated image, this: tpvframe frame;// struct given sdk camera. mat image=mat(frame->height, frame->width, cv_32fc3, frame->imagebuffer); //the image depth 5. cout<<"depth image---------------------------"<<image.depth()<<endl; //the program has unexpectedly finished here imwrite("image.jpg", image); what problem please? mat image depth 3 if use cv_32fc3 . can't create mat image, , when try write image crashes.

c++ - Very Strange Behavior of LPCTSTR -

Image
i've been working on system reversivly search directories findfirstfile , findnextfile i've encountered issue don't understand. below code snippet. int winapi winmain(hinstance hinstance,hinstance hprevinstance,lpstr lpcmdline ,int ncmdshow) { searchdrive((lpctstr)"c:\\",(lpctstr)"*.bdjf"); return 0; } bool searchdrive(lpctstr lpfolder, lpctstr lpfilepattern) { tchar szfullpattern[max_path]; win32_find_data findfiledata; handle hfile = invalid_handle_value; pathcombine(szfullpattern, lpfolder, l"x"); messagebox(null,szfullpattern,lpfilepattern,mb_iconwarning | mb_canceltrycontinue | mb_defbutton2); handle hfind = findfirstfile(szfullpattern, &findfiledata); i'm using visual studio 2008. as can see except last character , '\' can't seen, the rest have come out in...

java - Trying to make custom control, need to notify when a change was made to the value -

i have datepicker, javafx import. need contain calendar property, why made custom control extends datepicker. however every time datepicker changed should call property thats why think have use .notify method when onaction event performed. throws java.lang.illegalmonitorstateexception exception. this code using custom control: public class datepickercontrol extends datepicker { private objectproperty<calendar> calendar; public datepickercontrol() { super(); setvalue(localdate.now()); } /** * value of calendar * * @return value of calendar */ public objectproperty<calendar> calendarproperty() { calendar calendar = new gregoriancalendar(); system.out.println("test"); calendar.set(getvalue().getyear(), getvalue().getmonthvalue(), getvalue().getdayofmonth()); return new simpleobjectproperty<>(calendar); } /** * set value of calendar * ...

php - Why is this MySQL select query slowing things down? -

i have query: "select * forum_posts post_deleted='0'" i can see via new relic it's eating 60% of mysql resources, , therefore slowing down entire website. i have no idea why such simple query slow down? table innodb table, index on "id". create index on post_deleted verify post_deleted of type boolean (tinyint, smallint, or integer outperform string) don't compare against string '0' against number 0.

Setting up Leaflet with Ruby on Rails -

i attempting leaflet setup in rails application properly, , having trouble. following steps outlined here github leaflet repo . have done trivial stuff @ top , under headers heading. i using openstreetmaps, leaflet.rb file looks this. (i had create file myself did not exist) leaflet.tile_layer = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' leaflet.attribution = '&copy; <a href="http://openstreetmap.org">openstreetmap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">cc-by-sa</a>' leaflet.max_zoom = 18 now view trying insert leaflet map in looks this. <% provide(:title, 'map') %> <h1>map</h1> <div id="map"><% map(:center => { :latlng => [51.52238797921441, -0.08366235665359283], :zoom => 18 }) %> </div> <p>find me in app/views/dynamic_pages/map.html.erb</p> when fire rails server, there ...

ios - How to get reference to current UITableViewCell -

at experiment need have reference first uitableviewcell in tableview. action need set image , other cell properties , keep state of cell if tableview scrolled. of properties can potentially nulled via scrolling (and are) because of reusing. set properties every time cell appears on screen, inside of `-cellforrowatindexpath' tried catch first cell using: uitableviewcell *firstcell = (uitableviewcell *)[atableview cellforrowatindexpath:[nsindexpath indexpathforrow:0 insection:0]]; but looks way can catch every next first cell on next scrollable "screen". so, how can ref first uitableview cell? if understand correctly, trying special if cell @ (0, 0) displayed, right? if that's case, can implement uitableviewdelegate 's tableview:willdisplaycell:forrowatindexpath: method follows: - (void)tableview:(uitableview *)tableview willdisplaycell:(uitableviewcell *)cell forrowatindexpath:(nsindexpath *)indexpath { if (indexpath) { // special } } ...

Bad performance compared to MySql with Neo4j -

i migrated mysql database neo4j , tested simple request. surprised see equivalent request 10 100 times longer in neo4j in mysql. i'm working on neo4j 2.0.1. in original mysql schema have 3 following tables : countries : containing 'code', 'continent_id' , 'selected' boolean, cities : containing 'country_code', 'name' , 'status' boolean, theaters : containing 'city_id' , 'public' boolean, with indexes on each property. want display theater count city given continent several conditions. request : select count(*) nb, c.name `cities` c left join theaters t on c.id = t.city_id c.country_code in (select code countries selected true , continent_id = 4) , c.status=1 , t.public = 1 group c.name order nb desc database schema in neo4j following : (:continent)-[:include]->(:country{selected: bool })-[:include]->(:city{name: string , status: bool })-[:include]->(:theater{public: bool }) the...

prepared statement help in php mysqli -

i can't seem prepared statements work me. i've tried several different examples php manual, no luck. for example, $mynumber = 1; $sql = ("select * finished_goods finished_goods_id2 = ? "); $stmt = $conn->prepare($sql); $smt = bind_param('i', $mynumber); $stmt->execute(); all variable have same, this: $mynumber = 1; $sql = ("select * finished_goods finished_goods_id2 = ? "); $stmt = $conn->prepare($sql); $stmt = bind_param('i', $mynumber); $stmt->execute(); you wrote $smt when binding parameter.

java - Cant pinpoint issue of when user inputs number less than 0 for my custom exception -

cant seem figure this. if user inputs invalid balance, how can reprompt them enter balance again , still continue program? //edited still wont work boolean again; while(again = true) { try { // pass object printwriter , pw write file pw = new printwriter(fw); system.out.print("input beginnning balance: "); balance = input.nextdouble(); again = false; // pass user input object accountwithexception acctexception = new accountwithexception(fullname, balance, id, rate); again = false; system.out.println(acctexception.tostring()); // copy object created file pw.println(acctexception.tostring()); again = false; // custom exception } catch (invalidbalanceexception e) { system.out.println(e.getmessage()); } catch(filenotfoundexception e) { system.out.println...

amazon web services - Creating EMR machine from an EC2 machine with boto (with IAM role) gets failed -

when try create emr machine boto created ec2 machine role (having authorities) gets failed error "access denied checking jar: s3n://us-east-1.elasticmapreduce/libs/script-runner/script-runner.jar". my question general steps follow run boto script iam role ec2 machine can create emr machine? thanks! answer original poster @user1010900 : got answer now: "emr cannot use iam role assigned ec2 instance launching emr job." ref: https://forums.aws.amazon.com/thread.jspa?messageid=531826&#531826 aws emr not support aws sts now. ref: http://docs.aws.amazon.com/sts/latest/usingsts/usingtokens.html thanks

php - Amazon CloudSearch throws HTTP 403 on document upload -

i trying integrate amazon cloudsearch silverstripe. want when pages published want curl request send data page json string search cloud. i using http://docs.aws.amazon.com/cloudsearch/latest/developerguide/uploading-data.html#uploading-data-api reference. every time try upload returns me 403. have allowed ip address in access policies search domain well. i using code reference: https://github.com/markwilson/awscloudsearchphp i think problem aws not authenticate correctly. how correctly authenticate this? if getting following error 403 forbidden, request forbidden administrative rules. and if sure have appropriate rules in effect, check api url using. make sure using correct endpoint. if doing batch upload api endpoint should below your-search-doc-endpoint/2013-01-01/documents/batch notice 2013-01-01, required part of url. api version using. cannot following though might make sense your-search-doc-endpoint/documents/batch <- won't work to search...

java - How we add data to grid view on successful -

Image
i created grid view show list. have issue when user successful post data want add in data in grid view, not want load whole grid view, want add data in previous grid. can body tell me if possible how achieve this? here code adapter:- package com.idea.remote; import android.view.view.onclicklistener; import java.util.list; import com.idea.*; import android.annotation.suppresslint; import android.app.activity; import android.content.context; import android.content.intent; import android.util.log; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import android.widget.arrayadapter; import android.widget.imageview; import android.widget.textview; import android.widget.toast; public class userpostslistviewadapter extends arrayadapter<userpostsitemform> { context context; ...

c++ - Why .join is still necessary when all other thread have finished before the main thread? -

learning c++ multi-threading. in example, thread helper1 , helper2 have finished executing before main thread finished. however, program crashes. specifically, took out .join() statements, see how program behave, expecting no errors, since main() calls std::terminate after 2 other threads have finished. void foo() { // simulate expensive operation std::this_thread::sleep_for(std::chrono::seconds(5)); std::cout << "t1\n"; } void bar() { // simulate expensive operation std::this_thread::sleep_for(std::chrono::seconds(1)); std::cout << "t2\n"; } int main() { std::cout << "starting first helper...\n"; std::thread helper1(foo); std::cout << "starting second helper...\n"; std::thread helper2(bar); std::this_thread::sleep_for(std::chrono::seconds(10)); std::cout << "waiting helpers finish..." << std::endl; //helper1.join(); //helper2...

c# - How to find face, eyes from photo/image? -

i doing project regarding image processing in c#. here don't know, how find face, eyes image (not webcam). image stored in specific folder. installing emgucv package, not @ work. questions means, is emgu cv works window 8 os? i searching via net, contents related find face through webcam. want find face photo/image. please tell solution. which compatible image processing library windows 8 , visual studio 2010? is there source code satisfies condition. please post here. thank you. you can use sdk. aforge should need. try looking @ of examples provided own source code point in right direction.

ruby - How to display DateTimes with am/pm without using custom formatting in Rails -

currently display datetime s in rails with: my_time.to_formatted_s(:long_ordinal) that produces date like: march 17th, 2014 14:44 perfect except 14:44 time. want 2:44pm (how 'pm' formatted doesn't matter me). needs easier common person read. know can use: my_time.strftime('%l:%m %p') however, i'd use predefined symbol more human readable format, because i'd more human readable in language. if browsing different language datetime s naturally little different, i'm hoping rails can, or @ least set to, automatically display datetime nicely. maybe i'm expecting of rails there? seems strange me though there isn't simple flag or setting more human readable datetime format. in case can add own humanized format # config/initializers/time_formats.rb time::date_formats[:custom_long_ordinal] = "%b %e, %y %l:%m %p" and use with my_time.to_formatted_s(:custom_long_ordinal)

android - How to insert a method in java code via aspect's pointcut? -

i new aspectj. i have android appplication activity. activity not show menu when press menu button. found that, application owner have not overridden method oncreateoptionsmenu(menu menu) want override method in application activity class. have been restricted not change original code, , make changes via aspect . want know there way through can add method code through aspectj's pointcut. here android file mainactivity.java : import android.os.bundle; import android.app.activity; import android.view.menu; public class mainactivity extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.sampleactivity); } } i want following method add in above code via pointcut : @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getm...

background - Android: delete blank screen displayed before Splash screen -

i created splash screen , works fine. problem before activity with background image displayed, second, screen appears default theme of android , background of app. can stop screen appearing on startup? thanks startactivity protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); this.requestwindowfeature(window.feature_no_title); setcontentview(r.layout.inicio); tareaasincinicio = new tareaasincronainicio(); tareaasincinicio.execute(); } styles <style name="apptheme2" parent="android:theme.holo"> <item name="android:windowbackground">@drawable/app_background</item> </style> give custom_title_splash_theme splash activity in manifest <style name="custom_title_splash_theme" parent="android:theme"> <item name="android:windowdisablepreview">true</item> </style> or add in style <item...

outline - HTML5 outliner uses some kind of cache -

this html5 outliner http://gsnedders.html5.org/outliner/ seems caching site because every time test site, shows same result if delete on it, shows same outline first time outlined it. this problem since have upload site different subdomains check new results, experience of outliner can me solve problem?

change user permissions through code in drupal -

i new drupal. i working on website many different type of users there. requirement allow bloggers delete comments related blogs. yes know can done admin. client telling, don't want admin rather need achieved through code itself. please guide me (module, features etc) need write code affect permissions. , how code should written. any type of highly appreciated. thanks in drupal can create roles users. can specify users have "blogger" role. , then, can add permissions role. in case, want set permission of delete comment. i think may find link useful: https://drupal.org/node/120614 regards.

arrays - How do I define QML states dynamically using JavaScript -

is there way of creating state object dynamically using javascript loop instance. result should like: states: [ state{ name: "name1" when: somevar === onevar //stuff }, state{ name: "name2" when: somevar === anothervar //stuff } ] but want start arbitrary javascript array, like var mystatesobj = [{ "name": "name1" "condition": onevar },{ "name": "name2" "condition": anothervar }] and use loop create states qml object. is possible? i did tests , don't think can dynamically modify states list (seems it's object , no array internally)!? here tests: create dynamic state (that work component template) component { id: statetemplate state {} } // use code create state object var st = statetemplate.createobject(parent, { name: "testsate", when: yourcondition }) try add state ...

.htaccess - htaccess redirect specific page of specific domains to specific pages -

i have created new wordpress site replace multi-domain website. server redirections has been done on different domains point of them same path. i need redirect pages based on parent domain , also, redirect specific domain pages new specific domain pages . for example, when "www.mysite-example.com.au/contact" requested should redirect "mysite.com.au/contact-us" , "www.mysite-example.com.au/contact/form" should redirect "mysite-example.com.au/request-contact-form" here current htaccess i'm doing global redirection options +followsymlinks rewriteengine on rewritecond %{http_host} ^www.abilitypeople.com$ [nc] rewriterule ^(.*)$ http://abilitypeople.co.uk/ [r=301,l] rewritecond %{http_host} ^www.abilitypeople.co.uk$ [nc] rewriterule ^(.*)$ http://abilitypeople.co.uk/ [r=301,l] rewritecond %{http_host} ^www.abilitypeople.com.au$ [nc] rewriterule ^(.*)$ http://abilitypeople.com.au/ [r=301,l] # begin wordpress <ifmodule mod_rewrit...

android - Need to find the location of .txt file in the root SD card -

i attempting write longitude , latitude values text file each time location changes. result of should text file, stored on sd card, contains list of longitude , latitude values. application gets longitude , latitude , toast notification pops saying file has been saved successfully. however, cannot find text file in root of sd card. here code: import java.io.file; import java.io.fileoutputstream; import java.io.outputstreamwriter; import android.location.location; import android.location.locationlistener; import android.location.locationmanager; import android.os.bundle; import android.app.activity; import android.content.context; import android.widget.textview; import android.widget.toast; public class mainactivity extends activity { textview textlat; textview textlong; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); textlat = (textview)findviewbyid(r.id.textlat); te...

regex - Performing validation with Regular expressions in vbscript -

i have validate string correct syntax is: ['#dog.attribute#'='1' , ['#cat.anotherattribute#' in ('1','2')] 'dog' , 'cat' stands special words in business rules... i'm doing validations , want find in string, using vbscript regular expressions, following errors (going left right): substrings can exist anywhere, starting '# between ' , # can't exist anything there exist 1 cardinal # after cardinal # must exist dog or cat (it case sensitive) after dog or cat there must dot . (without spaces on left , on right) after dot exist regex [a-za-z\.\\]* (at least 1 character) and after [a-za-z\.\\]* , string ends #' , without else, 1 # , 1 ' this seems easy, i'm having problems developing it. can me out?

boost - Library file placement in C++ -

i trying use dynamic bitset provided boost libraries. downloaded file boost_1_55_0.tar.bz2 , extracted folder named boost. in folder have put source code file #include directive #include <boost/dynamic_bitset.hpp> , when compile source code, compiler returns "no such file or directory". place source code? i managed compile program putting source code file in the same directory boost in, , compiling using command formula: g++ -i /your/source/root /your/source/root/a/code.cpp as mentioned in how make g++ search header files in specific directory?