Posts

Showing posts from July, 2010

c++ - How to get address of printf function in arm executable -

i have assingment make loader arm elf relocatible files. have managed parse elf somehow, , managed make simple relocations, have following , have trouble. need call printf function inside elf file trying load, , must same printf function 1 program trying load it. (thats host program, writen in c++ arm arch). how can printf address, , after how can relocate symbol in elf file. (i googled , found out type of relocation uses 24-bit pc relative addressing) can me extract address of printf? thanx in advance! if can understand c++, use source luke. arm-reloc-property.cc arm-reloc-property.h arm-reloc.def elf32-arm.c see: assemblers , loader , david solomon . [some pearls of wisdom, archaic trivia] as understand, printf in same file , need patch address @ run-time. in case, relocation 24-bit pc relative relocation. answer nothing in case. executable , implementation both in same binary, 24-bit pc relative relocated no matter load address is. if relocating sha

database - SQL Server backup command fails via Perl/DBI but works via DOS> SqlCmd. Why? -

i have simple perl/dbi program backup sql server databases. program runs cleanly, produces no errors, supposedly creates database backups, backup files not exist! when execute following command via dbi, backup database dz disk='c:\sqlbackups\dz.perl' init no backup file created. perl , sql report "processed x pages database 'y', backup file not appear when execute dos> dir when execute similiar command via sqlcmd, backup database dz disk='c:\sqlbackups\dz.sqlcmd' init a backup file created. i'm running activestate perl version perl 5, version 16, subversion 1 (v5.16.1) built mswin32-x64-multi-thread on microsoft windows 7 professional build 6.1 (build 7601; service pack 1) here's program #!perl -w #test making database backups via perl dbi #preparations use strict; #require variable declaration use dbi; #database interface $dbhandle = dbi->connect("dbi:odbc:driver={sql server};se

.htaccess - htaccess regex Keep spiderbots outside -

i can't part of htaccess working : rewriteengine on rewritebase / rewritecond %{http_user_agent} ^(360spider|acoon|ahrefs|aihit|altushost|amazon|archive|airjordanin|applecreek|baidu|bezeqint|bilbo|bork|botje|butterfly|buy) [nc,or] rewritecond %{http_user_agent} ^(catchbot|career|cloud-ips|coach|contabo|corbina) [nc,or] rewritecond %{http_user_agent} ^(dataprovider|digext|discobot|dotbot|ec2|edisterbot|energis|ephorus|exabot|exigen|ezooms|fastlink|genieo|huaweisymantecspider) [nc,or] rewritecond %{http_user_agent} ^(iguana|ileadz|ipxserver|jaunty|jadynave|jikespider|keywordspy|kimsufi|kobala|komodiabot|koula|longchamp) [nc,or] rewritecond %{http_user_agent} ^(magpie|majestic12|malas|media|michael|mj12bot|modx|mohitseo|mor306|mulberryoculos) [nc,or] rewritecond %{http_user_agent} ^(nashirnet|ncsa|netwiz|obot|openindex|osso|panscient|pathcom|peoplepal|piki|presto|purity) [nc,or] rewritecond %{http_user_agent} ^(santrex|scoutjet|shabnet|sistrix|siteexplorer|softlayer|sogou|sos

hadoop - How to run large Mahout fuzzy kmeans clustering without running out of memory? -

i running mahout 0.7 fuzzy k-means clustering on amazon's emr (ami 2.3.1) , running out of memory. my overall question: how working easily? here invocation: ./bin/mahout fkmeans \ --input s3://.../foo/vectors.seq \ --output s3://.../foo/fuzzyk2 \ --numclusters 128 \ --clusters s3://.../foo/initial_clusters/ \ --maxiter 20 \ --m 2 \ --method mapreduce \ --distancemeasure org.apache.mahout.common.distance.tanimotodistancemeasure more detailed questions: how tell how memory i'm using? i'm on c1.xlarge instances. if believe aws docs , sets mapred.child.java.opts=-xmx512m. how tell how memory need? can try different sizes, gives me no idea of size of problem can handle. how change memory usage? start different workflow different class of machine? try setting mapred.child.java.opts? my dataset not seem large. it? vectors.seq collection of sparse vectors 50225 vectors (50225 things related 124420 others), total of 1.2m relationships.

Replace certain part of a php string -

i have text (in specific case $expression ) , quite long. want output text same way is, except outputting numbers % bold. spelled 3% , there's space 123 % . <?php $expression = 'here got number 23 % , on'; $tokens = "([0-9]+)[:space:]([\%])"; $pattern = '/[0-9][0-9] %/'; $keyword = array($pattern); $replacement = array("<b>$keyword</b>"); echo preg_replace($keyword, $replacement, $expression); ?> this have i'm not sure i'm doing wrong. outputs error on line $replacement = array("<b>$keyword</b>"); , outputs actual string except replaces number% <b>array</b> . try $expression = 'here got number 23 % , on'; var_dump(preg_replace('/(\d+\s*\%)/', "<b>$1</b>", $expression));

javascript - If there is no distinction between classes and objects why doesn't this code work? -

i taught in javascript there no distinction between objects , classes. can explain why code generate error: var firstobj = function() {}; firstobj.prototype.sayhi = function() { document.write("hi!"); }; firstobj.sayhi(); whereas 1 works: var firstobj = function() {}; firstobj.prototype.sayhi = function() { document.write("hi!"); }; new firstobj().sayhi(); what's difference? why isn't first 1 working? the key issue here firstobj variable function object, not firstobj object. subtle distinction, type of object determines prototype inherits. the prototype template applied newly created objects of particular type. must create firstobj object (usually new invokes constructor , assigns prototype) in order have template applied it. in first example, firstobj variable function object, not firstobj object has prototype of function not of else.. in second example, create firstobj object inherits prototype type of object. if

java - Constructor is undefined in ArrayAdapter -

i trying populate listview control in android app. have looked @ many code samples , seem suggest doing way. however, when try implement following error: the constructor arrayadapter(mainactivity.readjsontask, int, arraylist) undefined protected void onpostexecute(string result){ try{ listview lv = (listview)findviewbyid(r.id.lstitems); jsonobject jsonobj = new jsonobject(result); arraylist<string> items = new arraylist<string>(); iterator<string> looper = jsonobj.keys(); while(looper.hasnext()){ string key = looper.next(); items.add(jsonobj.get(key).tostring()); } adapter = new arrayadapter<string>(this, android.r.layout.simple_list_item_1, items); lv.setadapter(adapter); }catch(exception ex){ log.d("readadscendjsontask", ex.getlocalizedmessage()); } } wha

jquery mobile - Custom data attributes in WordPress widget links -

i'm building mobile website wordpress , jquery mobile. i create custom widget area appearing when user taps on button. i links contained in widget area jqm buttons. should add attribute data-role="button" 'a' elements in widget. is there way add custom attribute these 'a' elements functions.php? by default, code of link in widget: <h3 class="widget-title">categories</h3> <ul> <li class="cat-item cat-item-646"> <a title="some title" href="http://example.com/category/">category</a> </li> ... i need add data-role attribute inside 'a' element: <a title="some title" href="http://example.com/category/" data-role="button">category</a> i know if wp api provides filter functions.php, or if possible in way php to filter links , add data-role=button them, use below code. $('li.cat-

objective c - Regular expression for 10digit phonenumber in iOS -

i'm trying write regular expression match 10 digit number without other characters. eg. 2345678901 the first digit should between 2-9 while rest 9 digits can any i have tried writing different regular expressions none worked. nsstring *newstring = [textfield.text stringbyreplacingcharactersinrange:range withstring:string]; //^([0-9]+)?(([0-9]{9})?)?$ (([2-9]{1})?)?(([0-9]{8,9})?)? nsstring *expression = [nsstring stringwithformat:@"^(([2-9]{1})?)?(([0-9]{8,9})?)?$"]; nsregularexpression *regex = [nsregularexpression regularexpressionwithpattern:expression options:nsregularexpressioncaseinsensitive error:nil]; nsuinteger numberofmatches = [regex numberofmatchesinstring:newstring options:0 range:nsmakerange(0,

Can't use jQuery ($.Storage.get) in a Chrome extension -

when type in chrome console $.storage.get('ui_s') returns value "th_classic" website should. when try use in chrome extension returns error following text: typeerror: cannot call method 'get' of undefined do wrong? other jquery functions use in extension work fine. i couldn't find answer because search engines ignore "$." in seach requests.

angularjs - ngRepeat and directives execution order -

when angular directive contains ngrepeat element, ngrepeat execution appears to occur after containing directive's link execution. is there mechanism ($watch, $observe, etc) can use wire response after ngrepeat execution? here's example of behavior: http://plnkr.co/edit/ybisvveesissu7rik6kp?p=preview i want operate in state in directive inputs available. my primary goal alter elements of ngrepeat containing directive. the typical way determine when ng-repeat has finished write directive checks see if $last true. can call function (defined on parent/ancestor scope) or emit event, inside $timeout callback or $evalasync . for more details , examples, see calling function when ng-repeat has finished

design patterns - Service Locator - Disadvantages over DI -

both of these achieve same goal of decoupling. different patterns. 1.) disadvantages of service locator on di? couple of them if got right. needs container. component needs container code unit testing hard. 2.) advantages of sl on di? kind of provides encapsulation of dependencies. no need explicitly advertise dependencies. 3.) when use what? (di/sl). real life examples? this has been discussed in several thread. there no real concise answer this.

sqlite - Why is database time value different from the value created in the ruby time object? -

i have following code in seeds.rb file: # create 7 day wall day in 1..7 # create days d = day.create(day: day) # each day create time slots. use 15 minute timeslots start_time = time.new.beginning_of_day puts start_time end_time = start_time.end_of_day puts end_time begin d.time_slots << timeslot.create(time: start_time) start_time += 15.minutes puts start_time end while start_time <= end_time puts "start time after exit: #{start_time}" campaign.days << d end it creates right output 1 expect 2013-04-19 00:00:00 -0700 2013-04-19 23:59:59 -0700 2013-04-19 00:15:00 -0700 2013-04-19 00:30:00 -0700 2013-04-19 00:45:00 -0700 2013-04-19 01:00:00 -0700 2013-04-19 01:15:00 -0700 2013-04-19 01:30:00 -0700 2013-04-19 01:45:00 -0700 2013-04-19 02:00:00 -0700 2013-04-19 02:15:00 -0700 2013-04-19 02:30:00 -0700 2013-04-19 02:45:00 -0700 2013-04-19 03:00:00 -0700 2013-04-19 03:1

javascript - Form layout in jquery jTable? -

i using jquery jtable plugin edit data - , @ - can't control layout of generated form, can single column of controls headers. has found way layout table or else? edit: i found sort of solution, if set controls have widt 200 , set: form.jtable-dialog-form { width:440px; } div.jtable-input-field-container { float: left; margin: 0px 5px 5px 0; padding: 2px; } i 2 columns better before - has found better solution? css changes .custom_horizontal_form_field .jtable-input-field-container{ width: 400px !important; } .custom_horizontal_form_field .jtable-input-field-container .jtable-input-label{ width : 150px !important; float: left !important; } using formcreated event of jtable add custom class name form i.e., formcreated : function(event, data){ $(data.form).addclass("custom_horizontal_form_field"); }

c# - Content of NextSibling not being printed out -

i have piece of code, , can't figure out why it's not printing out content of next container. htmlagilitypack.htmldocument doc = new htmlagilitypack.htmldocument(); doc.load("billing106.htm"); foreach (htmlnode div in doc.documentnode.selectnodes("//div[starts-with(., ' semantic:')]")) { richtextbox1.text += "sc: " + div.nextsibling.innertext.tostring(); } i have several entries in html file followed: <div style="top: 232px; left: 332px;" class="s4"> semantic:</div> <div style="top: 233px; left: 377px;" class="s3"> sbr02 specifies relationship person insured.</div> i can't check class="s3" there multiple items using same class. if has idea how make work, appreciated, want go home , enjoy weekend, i'll sure send e-beer, hehe. note: print out 3 times "sc: " occurs 3 times in document.

python - Get contents of entire page using Selenium -

this question has answer here: python selenium accessing html source 6 answers using selenium browser automation (python). if understand correctly, following code used inputelement = driver.find_element_by_name("q") the_text = inputelement.text how go getting text on whole page opposed looking within particular element? thanks much! looks entire page text can found in: driver.page_source

multithreading - WCF Long Polling in 2013 -

having gone through few reads, including... http://anthymecaillard.wordpress.com/2012/06/06/wcf-real-time-web-development-with-long-polling/ how wcf server inform wcf client changes? (better solution simple polling, e.g. comet or long polling) ...i think i'm ready give long polling shot. from second link, understanding async pattern allows to: receive request on wcf server call beginmymethod returns iasyncresult hang onto iasyncresult somewhere while thread received request "safely rests" - or released? - without consuming additional resources "whip iasyncresult out" when relevant business logic event occurs use iasyncresult call endmymethod, during complete response (i.e., write data client) do assumptions sound correct? assume vastly scalable due above mechanism keeping 0 threads tied waiting events. is best way implement wcf long polling today , .net 4.5? i believe initial impressions wrong. when wcf request handler thread

Plotting a rectangle with colour representing a value in Matlab -

i plot number of rectangles, of have associated value. can plot points values using scatter(x,y,[],value); rectangle function not seem have such functionality. thank you you can set rectangle color, although not quite direct analog how scatter . when using rectangle , have 2 color options; edge color , face color. set edge color, use 3-element vector representing rgb values, such each element within range [0, 1]. e.g. %make arbitrary rectangle (in case, located @ (0,0) [width, height] of [10, 20]) rect_h = rectangle('position', [0, 0, 10, 20]); %sets edge green set(rect_h, 'edgecolor', [0, 1, 0]) the face color of rectangle fill-color -- can set using color string (e.g. 'g' green, 'r' red, etc) or using 3-element vector in same manner edge color property. e.g. these 2 commands have same effect: set(rect_h, 'facecolor', 'r'); set(rect_h, 'facecolor', [1, 0, 0]); in case, need mapping valu

regex - Regular expression incremental parsing -

are there languages or tools support parsing of regexes on character-by-character basis? i think may equivalent "regexes on streams" seems 1 of features of upcoming perl version 6. basically want because i'm building tool translation of terminal stream on pseudo-terminal, , occurred me ultimate sort of flexibility should attainable allowing specification of regex-replace expressions. the use case want allow mouse scroll events passed naive program such less pager, means tool (which spawns less on pty) doing issuing code \x1b[?1000h switches on mouse reporting, , subsequently translating every mouse wheel escape code received thereafter such \x1b[m!! (the last several chars encode mouse position within terminal , should ignored stripped) \x1b[a up-arrow code. as can see being able specify regex works on stdin terminal-reading stream generate translated stream send slave pty ideal. do need wait perl 6 able achieve this? there must particular reasons why r

ios - Get selected row of UIDatePicker while spinning -

i have uidatepicker in view controller in uinavigationcontroller . i'm registering changes in selected date this: [self.datepicker addtarget:self.alarm action:@selector(timechanged:) forcontrolevents:uicontroleventvaluechanged]; it works well, except if user presses button in uinavigationcontroller before date picker has settled. in case, timechanged: method isn't being called, , i'm not getting new date. nothing being released when press button, it's view controller being popped off. (a reference maintained). i've found solutions problem uipickerview involve implementing delegate methods picker view (eg: uipickerview: row value while spinning? ). unless i'm mistaken, that's not option uidatepicker . if possible, i'd stick uidatepicker rather custom uipickerview . there way this? doesn't have selected row (within row or 2 fine), closer better. edit: jailbreak app, private apis fine, if can figure out are. as current apis,

hook - gitolite emailprefix GL_REPO not expanded -

i using gitolite v2.2 on ubuntu 12.04. the gl_repo variable not expanded emailprefix. in gitolite.conf file have this: repo @all config hooks.mailinglist = xxx@somewhere config hooks.emailprefix = "[%gl_repo] " config hooks.emailmaxlines = 1000 ... repo testing rw+ = @all i getting email when push changes testing repo, subject line looks this: [%gl_repo] branch master updated. is there typo in configuration, setting missed, or problem in v2.2? the substitution of variable gl_repo in gitolite.conf file documented in gitolite v3 (or 'g3') pages: admin conf "git-config" keys , values the conf/gitolite.conf file for g2 (gitolite v2.x), mentioned (and expanded) gitolite hooks . upgrading v3 therefore way go, since won't affect of existing bare repos: see the migration page .

serial port - com0com intercept opos printer x is offline -

we trying intercept data between pos , printer. the problem have ran pos reports printer x offline when connect com0com endpoint. an instance of hyperterminal on each side of com0com endpoints communicate each other. i never knew there way detect if hardware connected serial port. write com port regardless if there device listening. know pos uses opos it's underlying way communicate printer. event opos firing notify pos application think printer offline? how hardware identify if device connected? there anyway circumvent event when using com0com? opos follows 3 step process: open(), claimdevice(), , enable. calling open() cause opos common control object (opos cco) construct vendor-provided device specific service object (so), , call open() method on so. initializes software, not attempt talk device @ time. claimdevice() negotiates make sure device shareable , available app. @ time device reported offline. claimdevice() raise exception resultcode indi

Undefined reference to error is showing an extra parameter for my function, GTKMM C++ -

i writing snakes , ladders game , defined function called draw_snake follows: void draw_snake(const cairo::refptr<cairo::context>& cr, std::pair<int,int> snake, std::vector< std::pair<int,int> > boardcoords); when make call function follows: pair<int, int> snake = make_pair(100,1); draw_snake(cr, snake, boardcoords); boardcoords vector of pair<int,int> . error message saying have fourth parameter when call function. error message this: myarea.cc:(.text+0x7db): undefined reference `myarea::draw_snake(cairo::refptr<cairo::context> const&, std::pair<int, int>, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >)' where getting allocator from? you're misreading error. function has 3 parameters. undefined reference `myarea::draw_snake( cairo::refptr<cairo::context> const&, std::pair<int, int&

javascript - Disable Browser onUnload on certain links? -

i working on web hosting panel has dns records manager. have use lot of javascript make perform desktop application. i wanted show custom dialog window when a browser runs beforeunload after research have discovered stuck using browsers default dialog window. so javascript code below that, problem need make sure not fired off on link clicks. i hoping able maintain array of css class names, , if link clicked in array not show onunload event. i'm sure easy javascript developer. show me how this? //sample class array safelinks = ['test', 'test2', 'test3', 'test4', 'test5']; // onunload event $(window).on('beforeunload', function(){ return 'are sure want leave?'; }); you remove event handler when they're clicked: var safelinks = ['.test', '.test2', '.test3', '.test4', '.test5']; function promptbeforeclose() { return 'are sure want leave?'; } $

ios - CCParticleSystemQuad not getting deallocated when added to a moving sprite -

i trying add particle trail effect in cocos2d, managed adding ccparticlesystemquad emitter child moving sprite. observing emitter not getting deallocated eventually. if add emitter same sprite, keep still , dont move @ all, emitter deallocated. i cant figure out why happening.. code this.. ccparticlesystemquad *emitter = [[[ccparticlesystemquad alloc] initwithfile:@"myeffect.plist"] autorelease]; emitter.positiontype = kccpositiontypefree; emitter.autoremoveonfinish = yes; [movingsprite addchild:emitter z:movingsprite.zorder + 1000]; make sure called [emitter removefromparentandcleanup:yes]; here 1 of similar question find out object retained, follow morion's answer in above thread. quick solution: ccparticlesystemquad *emitter = [ccparticlesystemquad particlewithfile:@"myeffect.plist"]; emitter.positiontype = kccpositiontypefree; emitter.autoremoveonfinish = yes; [movingsprite addchild:emitter z:movingsprite.zorder + 1000]; //to re

url rewriting - IIS URL Rewrite - if query parameter(s) is missing -

so "not everyday requirement" today :) i want create rule redirect other page if query parameters missing. i found few examples rewrite/redirect if parameters exists, how go if want check if dont exists? for example, test if parameters exist , redirect based on that: <rule name="redirectuserfriendlyurl1" stopprocessing="true"> <match url="^$" /> <conditions> <add input="{query_string}" pattern="^lon=([^=&amp;]+)&amp;lat=([^=&amp;]+)&amp;zoom=([^=&amp;]+)$" /> </conditions> <action type="redirect" url="/{c:1}/{c:2}/{c:3}" appendquerystring="false" /> </rule> how can change rule test if not exist? ^((?!regex).)*$ regular expression not contain regex. read more here http://bloggernitin.blogspot.in/2007/12/regex-for-doesnt-contain.html

nfc - How to build the nfcpy source code to a python module? -

i want use nfcpy lib read/write nfc tags. source code of python. how can buide python module can add import nfc program? here explained how can make module of python code: http://learnpythonthehardway.org/book/ex40.html your module (here should python code): # goes in mystuff.py def apple(): print "i apples!" access way: import mystuff mystuff.apple()

Vector Errors in C++ Program -

i working on miscellaneous theater seating program! starting progress through c++, can't figure out these errors. trying make program store user entered row numbers , row seats (only if multiple seats) in 2 vectors; vector seat_row() , vector seat_number(). know error stating, don't know how approach situation otherwise. sorry if being unclear, honest, don't know else include. please take @ code, feel program, , let me have ideas. please keep answers simple; again, i'm no master @ c++ p.s. sorry showing whole code... didn't know include, not to; , wanted people able feel program testing themselves... again! /* * program built team of students * local movie theaters sell tickets * * file: main.cpp * author(s): * * * created on april 15, 2013, 11:10 */ #include <cstdlib> #include <vector> #include <string> #include <fstream> #include <iostream> #include <cctype> #include <iomanip> using namespace std;

c - Is it possible to change the definition of structs at runtime? -

i don't know why ever want this, curious if knew answer. possible @ run time use 1 struct definition while, , later change definition? i.e. typedef struct { int a; int b; }my_struct; and later on... typedef struct { int a; int b; int c; }my_struct; no, can't change definition of given type, there's nothing wrong casting totally different type, assuming underlying data laid out , otherwise compatible. for example, consider: struct s_xyzzy { int a; int b; }; struct s_plugh { int a; char b0; char b1; char b2; char b3; }; struct s_xyzzy *xyzzy = malloc (sizeof (*xyzzy)); ((struct s_plugh *)xyzzy)->b0 = 'x'; by casting xyzzy different compatible type, can access fields in different way. keep in mind compatibility important , have know underlying memory correctly aligned between 2 structures. you can placing both structures union, using overlapped memory.

php - Combining Results into a single variable -

i have foreach loop in php script exports results need. i have these result combine 1 variable rather printing each result me. don't know function of i'm trying called, but know goes this: if($mins) { $ips .= $item++; } else { $has .= $item++; } therefore, want print out $items $mins this: "$item $item $item $item $item" i want $ips equal/hold entire "$item $item $item $item $item" not singular. any kind of can on appreciated! similarly can $ips = null; $has = null; foreach ( (array) $arr $key => $val){ if ($mins){ $ips .= $key; } $has .= $key; } $i++; }

ios - Not able to access the userdata property of the sprite -

in project having 10 sprite,each 1 having unique userdata value.during cctouch method copying sprite new sprite, but cant able sprite userdata value. my coding is (int i=1; i<=10; i++) { ccsprite *zig=[ccsprite spritewithfile:[nsstring stringwithformat:@"zig%d.png",i]]; zig.position=ccp(325,60); zig.tag=i+1; zig.userdata=[nsstring stringwithformat:@"%@",[zigpositionarray objectatindex:i-1]]; [self addchild:zig z:2]; [zigblurarray addobject:zig]; nslog(@"userdata%@",zig.userdata); } in cctouchbegan method: for(ccsprite *s in zigblurarray) { if (cgrectcontainspoint(s.boundingbox, newpt1)) { temp=s; temp.userdata=s.userdata; nslog(@"%d",temp.tag); nslog(@"userdata%@",temp.userdata); } finaly getting lldb error 0x170409b: movl 8(%edx), %edi exc_bad_access please 1 me problem. the string auto

How do i append some value to an instance variable in ruby on rails? -

here's trying in home controller: def view @product= product.find(params[:id]) rand_price = rand(202- @product.price.to_i) + @product.price.to_i old_price = rand_price + @product.price.to_i @product << old_price #error line end i want add 1 more value of old_price variable without adding column same in product model. error is: undefined method `<<' #<product:0x7f1362cc5b88> use serializers in model: class product << activerecord::base serialize :prices, array ... end column products.prices in database should string. and in controller def update @product= product.find(params[:id]) rand_price = rand(202- @product.price.to_i) + @product.price.to_i new_price = rand_price + @product.price.to_i @product.prices << new_price @product.save! end and may use it: @product.prices # => array of prices. @product.prices.last # => current price

How to display only the content of webpages(not any of the tags,links,image) by php script? -

i make 1 script, in that, put 1 textbox , submit button, when user enter url address or link in text box , press submit button. @ time want pure text of whole page enter in textbox. live link, mean direct internet. used file_get_content() , strip_tags() but, provide me result regular expression. suppose enter http://www.google.com got output like, google(function(){ window.google={kei:"mdpyuzpbg4alrqed0ocqbq",getei:function(a){for(var b;a&&(!a.getattribute||!(b=a.getattribute("eid")));)a=a.parentnode;return b||google.kei},https:function(){return"https:"==window.location.protocol},kexpi:"17259,39523,4000116,4001569,4001948,4001959,4003060,4003551,4003917,4003921,4004067,4004257,4004334,4004341,4004545,4004653,4004687,4004719,4004746,4004788,4004812,4004844,4004897,4004898,4004914,4004917,4004949,4004972,4005101,4005154,4005198,4005213,4005251,4005447,4005588,4005597,4005601,4005650,4005654,4005688,4005743,4005841,4006348,4006356",kc

ios - app get crash after contacts gets added from address book to sqlite database -

this how add contact information in database addressbook abaddressbookref addressbook = abaddressbookcreate(); cfarrayref allpeoplename = abaddressbookcopyarrayofallpeople(addressbook); cfindex npeoplename = abaddressbookgetpersoncount(addressbook); nsdateformatter *dateformat = [[nsdateformatter alloc] init]; [dateformat setdateformat:@"mm/dd/yyyy"]; for( int = 0 ; < npeoplename ; i++ ) { abrecordref ref = cfarraygetvalueatindex(allpeoplename, ); nsstring* personname = (__bridge_transfer nsstring*) abrecordcopyvalue(ref, kabpersonfirstnameproperty); nsdate* date = (__bridge_transfer nsdate*) abrecordcopyvalue(ref, kabpersonbirthdayproperty); cfstringref value, label; abmutablemultivalueref multi = abrecordcopyvalue(ref, kabpersonemailproperty); cfindex count = abmultivaluegetcount(multi); if (count == 1) { value = abmultivaluecopyvalueatindex(multi, 0); nsstrin