Posts

Showing posts from April, 2014

c# - How can I implement IEnumerator<T>? -

this code not compiling, , it's throwing following error: the type 'testesinterfaces.mycollection' contains definition 'current' but when delete ambiguous method, keeps giving other errors. can help? public class mycollection<t> : ienumerator<t> { private t[] vector = new t[1000]; private int actualindex; public void add(t elemento) { this.vector[vector.length] = elemento; } public bool movenext() { actualindex++; return (vector.length > actualindex); } public void reset() { actualindex = -1; } void idisposable.dispose() { } public object current { { return current; } } public t current { { try { t element = vector[actualindex]; return element; } catch (indexoutofrangeexception e) {

sql - Get all rows with a matching field in a different row in the same table -

let's have table this: |id|userid|email |website | -------------------------------------- |1 |user1 |user1@test.com|website.com| |2 |user2 |user2@test.com|website.com| |3 |user3 |user3@test.com|website.com| |4 |user1 |user1@test.com|foo.com | |5 |user2 |user2@test.com|foo.com | and want of rows website='website.com' , have corresponding row matching userid website='foo.com' so, in instance return rows 1 , 2. any ideas? to user can do select userid your_table website in ('website.com', 'foo.com') group userid having count(distinct website) = 2 but if need complete row do select * your_table userid in ( select userid your_table website in ('website.com', 'foo.com') group userid having count(distinct website) = 2 )

wcf - The security protocol cannot secure the outgoing message -

i trying return custom fault exception using unity following error during rst\issue action: [service trace viewer exceptions][1] image: [1]: http://i.stack.imgur.com/oaxgt.png no signature message parts specified messages ' http://tempuri.org/iwcfservicelayer/getfirstorder ' action. the security protocol cannot secure outgoing message requestcontext aborted i using custmbinding resembles wshttpbinding. here manually throw exception in wcf method, in order test behaviour. when comment out throw new exception statement, service works fine , returns expected results. service cannot handle exceptions currently. so why can't service secure outgoing message when exception occurs? edit (bindingconfig): <custombinding> <binding name="myservicebinding" closetimeout="00:05:00" opentimeout="00:05:00" receivetimeout="00:05:00" sendtimeout="00:05:00"> <transactionflow /> &l

c# - Programmatically Assigning Roles to User in MVC 4 via Checkboxes -

i using mvc 4 razor engine , c# code behind logic. customised version of simplemembership database has been built meet requirements of website. the website can create , edit roles , users intended, having problem assigning role user. search results provide code assign particular role user on account creation. our requirements not have this, instead need manually assign them using ui via website. there plenty of tutorials asp.net (example below), finding difficult locate relevant tutorial mvc 4. http://www.asp.net/web-forms/tutorials/security/roles/assigning-roles-to-users-cs after reading above, asking following questions. question one: there mvc tutorial assigning user roles via ui? if so, can provide link tutorial. question two: if not have link tutorial, provide advice on following: when administrator loads user management ui table load list of users, when click edit button particular user following take effect , pass data view called 'edit.cshtml'. pu

Unable to play video in android -

i want play video in video player unable so. when start application shows list of videos details thumbnail, video url, time, total no of views etc. want play video clicking on thumbnail, when click on thumbnail different event, , video_url must lost in event. how can capture ?

PDF Parsing tables in java with Pdfbox -

i've been looking quite long time answer, haven't found anything. problem in parsing pdf, have page made kind of tables. i've written code via can extract iformation specified rectangle, declaring values in code , not dynamic should. want find information cells , information able string need. in pdfbox api haven't found useful. graceful tips.

sql - One synonym in SSMS isn't showing up in the intellisense. But every other synonym is. -

Image
in following image, can see small section of our synonym list. in intellisense, can't see dbo.syn_mc_asset , see other synonyms. ideas on why occurring?

How do i go from one function (main) to another without finishing main?(in C) -

Image
i beginner in c , there 1 problem can't seem solve. want go main() example, function line or 2 of code. have searched internet , nothing has answered specific question, or seems amateur eyes. example, want this: int main(void){ /*here need line of code make program run functiontocall*/ } int functiontocall(void){ printf ("you went function! congratulations!\n"); } i hope helps sorry unclear question! i think in understanding how method call works so when call method x method y control x passes y , return x when return statement/last statement of called method encountered

php - Dropdown values are not inserting in mysql -

in code dropdown values not inserting mysql database.the exam_name inserting course_code col.and course_code value not inserting in mysql.so please me.the exam_name populate examcourse when selected course_code corresponding exam_name wil display exam_course. upload2_view.php <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $(".hai").change(function() { var id=$(this).val(); // please find course_code, course_code not found var datastring = 'course_code='+ id; $.ajax ({ type: "post", url: "upload_view2.php", data: datastring, cache: false, success: function(html) { $(".hai2").html(html); } });

symfony - How to get child object in embedded Admin class in Sonata Admin? -

i'm trying , manipulate actual object related imageadmin class in sonataadmin (using symfony 2.3). works fine when imageadmin class 1 being used. when imageadmin embedded in admin goes horribly wrong. here's works when don't have embedded admins: class imageadmin extends admin { protected $baseroutepattern = 'image'; protected function configureformfields(formmapper $formmapper) { $subject = $this->getsubject(); } } but when embed imageadmin in parentadmin using this: class pageadmin extends admin { protected function configureformfields(formmapper $formmapper) { $formmapper->add('image1', 'sonata_type_admin'); } } then when you're editing parent item id 10 , call getsubject() in imageadmin image id 10! in other words getsubject() extracts id url calls $this->getmodelmanager()->find($this->getclass(), $id); , cross-references parent id , image id. oops! so... want able hold

Python text file searching for values and compiling results found -

i have large text file of lots of experimental results search through specific pieces of data, need compile. text file has results many different experiments, , need keep data each experiment together. e.g. (not actual data) object 1 colour of object blue. size of object 0.5 m^3 mass of object 0.8 g object 2 colour of object pink. size of object 0.3m^3 etc. i know values want be, can search text specific phrase know present on line data on. one way thought of doing search through file each specific line (i'm looking 2 different variables), , add value needed list. create dictionary each object, assuming @ same number in each list data same object. e.g. variable_one = [] variable_two = [] def get_data(file): open("filename.txt", "r") file: line in file: if "the colour" in line: variable_one.append(line.split()[6]) if "the mass" in line: variable_two.append

java - String.replaceAll() with [\d]* appends replacement String inbetween characters, why? -

i have been trying hours regex statement match unknown quantity of consecutive numbers. believe [0-9]* or [\d]* should want yet when use java's string.replaceall adds replacement string in places shouldn't matching regex. for example: have input string of "this my99string problem" if replacement string "~" when run this mystring.replaceall("[\\d]*", "~" ) or mystring.replaceall("[0-9]*", "~" ) my return string "~t~h~i~s~ ~i~s~ ~m~y~~s~t~r~i~n~g~ ~p~r~o~b~l~e~m~" as can see numbers have been replaced why appending replacement string in between characters. i want "this my~string problem" what doing wrong , why java matching this. \\d* matches 0 or more digits, , matches empty string. , have empty string before every character in string. so, each of them, replaces ~ , hence result. try using \\d+ instead. , don't need include \\d in character class.

fault tolerance - Reconnection to Redis after reboot -

i've bunch long running processes connect redis server (using jedis). works fine long don't reboot machine running redis or restart redis server. reboot or restart connection lost. there standard way of dealing use case in redis/jedis or need put logic in clients myself? redis failure/connection dropped in case, redis either goes down or drops connection while process remains active. ensure process gets connection, use testonborrow=true in jedis connection/pool config. jedis test each connection 'ping' before using it; if redis not respond, connection discarded , try connection. machine reboot/restart (not redis) if application node fails or reboots, "processes" should configured restart automatically upon reboot (if that's behavior desire), or starts manually. in either case, i'd expect process create , initialize new jedis connection before real work...so else need beyond that?

Rails Associations -

i have 2 tables, movies , likes. movie has_many :likes, dependent: :destroy, foreign_key: "movie_id" , belongs_to :movie in likes controller there 2 actions: uplikes (where :vote=>1) , dislikes (where :vote=>2) in movies/show.html.erb show amount of uplikes , dislikes movie has such : view show.html.erb <%= @uplikes.size %> <%= @dislikes.size %> controller def show @uplikes = like.where(:movie_id => params[:id], :vote => '1') @dislikes = like.where(:movie_id => params[:id], :vote => '2') this works fine. have problems displaying amount of dislikes , uplikes of movie in index action when calling movies.each i have pasted above controller code def show action def index action , changed params[:id] params[:movie_id] but when call <%= @uplikes.size %> <%= @dislikes.size %> to view, displays 0 if rid of :movie_id => params[:id], in controller, shows number of uplikes , d

stored procedures - Return row ID from StoredProcedure MySQL -

i attempting return value of row statement: insert systemname (systemname) select * (select v_systemname) tmp not exists ( select * systemname systemname = v_systemname ) limit 1; set id = last_insert_id(); if insert need return row id, otherwise needs return new row id. tried use last_insert_id() didn't return needed because if didn't insert give wrong result. have idea make work? http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id assuming procedure expects row id , no further processing done can try: select last_insert_id();

Google chrome wont display SVG search icon, but the SVG background is OK -

i have svg background, looks find in both ff & chrome, search icon, ok in ff , wont display in chrome. both svgs load external css stylesheet. here shot: http://imgs.ir/imgs/201308/svg.png let me know if jsfiddle needed.

.net - Extension can't be found -

my wcf - configuration runs fine on developer machine. when try release demonstration environment (another server), give me following error: an error occurred creating configuration section handler system.servicemodel/behaviors: extension element 'log4net' cannot added element. verify extension registered in extension collection @ system.servicemodel/extensions/behaviorextensions. my configuration, in both cases same: <system.servicemodel> <services> <service name="ui.ws.services.myservice" behaviorconfiguration="servicebehavior"> <endpoint address="" binding="wshttpbinding" contract="ui.ws.services.imyservice" bindingconfiguration="wssecuritymode"> <identity> <dns value="localhost" /> </identity> </endpoint>

html - how to make this div resizable -

i have these 2 divs: <div class="bubble"> blablablabla <div class="arrow-left"></div> </div> . .bubble{ background-color:#156ac6; padding: 15px 10px 10px 10px; color: white; font-family:georgia; } .arrow-left { position:relative; top:42px; right:0; border-left: 42px solid transparent; border-right: 0px solid transparent; border-top: 42px solid #156ac6; margin: 10px; } http://jsfiddle.net/jgwmm/ i want flexible, e.g. if resize browser, should shrink according width of browser. dont want media queries. css. how possible? since haven't set widths on divs, should resize according browser default. however, can set widths in percent sure: .bubble { width: 100%; } .arrow-left { width: 100%; } also don't need media queries media queries css.

c# - How to emit LDC_I8 for a ulong.Parse call? -

i'm having issue emitting il set uint64 property value. below minimal code reproduce issue. using system; using system.reflection; using system.reflection.emit; namespace consoleapplication1 { class program { static void main(string[] args) { assemblybuilder assemblybuilder = appdomain.currentdomain.definedynamicassembly( new assemblyname("test"), assemblybuilderaccess.runandsave); modulebuilder m_modulebuilder = assemblybuilder.definedynamicmodule("test.dll", "test.dll"); typebuilder typebuilder = m_modulebuilder.definetype("class1", typeattributes.public | typeattributes.class | typeattributes.autoclass | typeattributes.ansiclass | typeattributes.beforefieldinit | typeattributes.autolayout, null); fieldbuilder fieldbuilder = typebuilder.definefield("m_prop1", typeof(ulong), fieldattributes.private); methodb

android - Open Web Browser from App - Always Crashes -

i'm trying open web browser app using: intent browser = new intent(intent.action_view, uri.parse("http://developer.android.com/")); startactivity(browser); but app crashes: 08-07 17:18:29.912: e/androidruntime(751): fatal exception: main 08-07 17:18:29.912: e/androidruntime(751): java.lang.nullpointerexception 08-07 17:18:29.912: e/androidruntime(751): @ android.app.activity.startactivityforresult(activity.java:3131) 08-07 17:18:29.912: e/androidruntime(751): @ android.app.activity.startactivity(activity.java:3237) 08-07 17:18:29.912: e/androidruntime(751): @ com.co.drumkit$9.onclick(drumkit.java:658) 08-07 17:18:29.912: e/androidruntime(751): @ android.view.view.performclick(view.java:3110) 08-07 17:18:29.912: e/androidruntime(751): @ android.view.view$performclick.run(view.java:11934) 08-07 17:18:29.912: e/androidruntime(751): @ android.os.handler.handlecallback(handler.java:587) 08-07 17:18:29.912: e/androidruntime(751): @ android.os.hand

Equivalent of C's pointer to pointer in Java -

this question has answer here: c++ pointers pointers in java 5 answers i unable pass pointer pointer argument function in java.i know java don't have pointers instead pass reference objects. want know how done. clear doubt pasting code snippet of program implementing. in following program calling method "partition" method "quicksortrecur". work on c of time don't know how send parameters newhead , newend pointer pointer . i have mentioned c equivalent of below lines , want know how can implement same in java? java : public listnode partition(listnode lhead,listnode lend,listnode newhead,listnode newend){ --------- --------- --------- } public listnode quicksortrecur(listnode lhead,listnode lend){ listnode newhead=null; listnode newend=null; listnode pivot; pivot=partition(lh

python - Take certain words and print the frequency of each phrase/word? -

i have file has list of bands , album , year produced. need write function go through file , find different names of bands , count how many times each of bands appear in file. the way file looks this: beatles - revolver (1966) nirvana - nevermind (1991) beatles - sgt pepper's lonely hearts club band (1967) u2 - joshua tree (1987) beatles - beatles (1968) beatles - abbey road (1969) guns n' roses - appetite destruction (1987) radiohead - ok computer (1997) led zeppelin - led zeppelin 4 (1971) u2 - achtung baby (1991) pink floyd - dark side of moon (1973) michael jackson -thriller (1982) rolling stones - exile on main street (1972) clash - london calling (1979) u2 - can't leave behind (2000) weezer - pinkerton (1996) radiohead - bends (1995) smashing pumpkins - mellon collie , infinite sadness (1995) . . . the output has in descending order of frequency , this: band1: number1 band2: number2 band3: number3 here code have far: def read_albums(filename) : fi

ASP.NET web service does not connect with database in IIS7 -

when try publish asp.net web service application on iis7, application works perfect when debugging visual studio. but, when try access webservice iis typing on browser: http://localhost:port/service1.asmx , click on method , click "invoke" gives me error: system.data.sqlclient.sqlexception: select permission denied on object &#39;marimi&#39;, database &#39;emagazin&#39;, schema &#39;dbo&#39;. @ system.data.sqlclient.sqlconnection.onerror(sqlexception exception, boolean breakconnection, action`1 wrapcloseinaction) @ system.data.sqlclient.sqlinternalconnection.onerror(sqlexception exception, boolean breakconnection, action`1 wrapcloseinaction) @ system.data.sqlclient.tdsparser.throwexceptionandwarning(tdsparserstateobject stateobj, boolean callerhasconnectionlock, boolean asyncclose) @ system.data.sqlclient.tdsparser.tryrun(runbehavior runbehavior, sqlcommand cmdhandler, sqldatareader datastream, bulkcopysimpleresultset bulkcopyhandler

2d - R aggregate data in one column based on 2 other columns -

so, have these data given below, , goal aggregate column v3 in terms of columns v1 , v2 , add v3 values each bin of v1 , v2. example, first line correspond interval v1=21, v2=16, value of v3 aggregated on (v1,v2) interval. , repeat rest of rows. want use mean aggregation function! > df v1 v2 v3 1 21.359 16.234 24.283 2 47.340 9.184 21.328 3 35.363 -13.258 14.556 4 -29.888 14.154 17.718 5 -10.109 -16.994 20.200 6 -32.387 1.722 15.735 7 49.240 -5.266 17.601 8 -38.933 2.558 16.377 9 41.213 5.937 21.654 10 -33.287 -4.028 19.525 11 -10.223 11.961 16.756 12 -48.652 16.558 20.800 13 44.778 27.741 17.793 14 -38.546 29.708 13.948 15 -45.622 4.729 17.793 16 -36.290 12.383 18.014 17 -19.626 19.767 18.182 18 -32.248 29.480 15.108 19 -41.859 35.502 8.490 20 -36.058 21.191 16.714 21 -23.588 0.524 21.471 22 -24.423 39.963 18.257 23 -0.042 -45.899 17.654 24 -35.479 32.049 9.294 25 -24.632 20.603 17.757 26

caching - How to LRU-cache numerous objects made of C++ STL heavy structures? -

i have big c++/stl data structures (mystructtype) imbricated lists , maps. have many objects of type want lru-cache key. can reload objects disk when needed. moreover, has shared in multiprocessing high performance application running on bsd plateform. i can see several solutions: i can consider life-time sorted list of pair<size_t lifetime, mystructtype v> plus map o(1) access index of desired object in list key, can use shm , mmap store everything, , lock manage access (cf here ). i can use redis server configured lru, , redesign data structures redis key/value , key/lists pairs. i can use redis server configured lru, , serialise data structures (mystructtype) have simple key/value manage redis. there may other solutions of course. how that, or better, how have done that, keeping in mind high performance ? in addition, avoid heavy dependencies boost. i built caches (not lru) recently. options 2 , 3 quite not faster re-reading disk. that's no cach

c++ - A function that will take a tree as argument and return the number of ints that were typed? -

i need function in project take tree argument , return number of integers typed , correct call. wouldn't preorder? below. please. thanks #include "t.h" void preorder(tnode * t){ if (t == null) return; cout << t->info <<endl; preorder(t->left); preorder(t->right); } call preorder(t). this original function have #ifndef t_h #define t_h #include <iostream> #include <iomanip> using namespace std; struct tnode { int info ; int count; tnode * right, *left; }; tnode * insert(int target,tnode * t); tnode * makenode(int x); tnode * tsearch(int x,tnode * t); void inorder(tnode * t); int height(tnode * t); int count(tnode * t) ; int total(tnode * t) ; #endif int main() { int n,c; tnode * t = null, *x; while (cin >> n) {t=insert(n,t);cout << n <<' ';} cout << endl; inorder(t); cout << endl; c = count(t); cout << "count: "<< c <<e

javascript - Facebook Like Box Disappearing -

so whenever add first part of script (everything window.fbasyncinit way fb.canvas.setautoresize(100);), facebook box doesn't pop up. all i'm trying remove iframe scrollbars box, has done in submission facebook. why adding function @ top make box disappear? how make scrollbars go away? i trying follow instructions here: http://clockworkcoder.blogspot.com/2011/02/how-to-removing-facebook-application-i.html here's code: <script> window.fbasyncinit = function() { fb.init({ appid: '388149184641600', status: true, cookie: true, xfbml: true }); fb.canvas.setautoresize(100); (function(d, s, id) { var js, fjs = d.getelementsbytagname(s)[0]; if (d.getelementbyid(id)) return; js = d.createelement(s); js.id = id; js.src = "//connect.facebook.net/en_us/all.js#xfbml=1&appid=388149184641600"; fjs.parentnode.insertbefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</scri

delphi - Upload file to DataSnap REST server via TStream -

i've built datasnap rest server using delphi xe2 , i've added server method uploading files via tstream : function tservermethods.updateuploadfile(sfilename: string; uploadstream: tstream): string; i want able call number of different clients (android, ios etc) , i've been testing method using various rest clients such postman (chrome plugin). far cannot accept content http post body. whenever send post command following response : {"error":"message content not valid json value."} i've tried using various different 'content-type' settings nothing seems work. looks though datasnap insisting on content being json? i've tried pasting valid json content area gave same error response. has used tstream input parameter datasnap server method? should doing way? i've used tstream output parameter downloading files many times , works well, first attempt @ uploading. update i made quick delphi datasnap client test uploadf

ruby on rails - undefined method `sub' for nil:NilClass when calling bundle exec db operations -

i getting following error: undefined method `sub' nil:nilclass /users/jdrm/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:68:in `connection_url_to_hash' when try run bundle exec db operation on rails project example: bundle exec rake db:migrate my os mac os x 10.8.4 , installed ruby using rvm , tried following versions: ruby-1.9.3-p448 [ x86_64 ] ruby-2.0.0-p0 [ x86_64 ] ruby-2.0.0-p247 [ x86_64 ] also tried rails 3.13 , 3.14. i appreciate advise on problem. the relevant code connection_specification.rb : spec = { :adapter => adapter, :username => config.user, :password => config.password, :port => config.port, => :database => config.path.sub(%r{^/},""), :host => config.host } the error occurring because adapter doesn't have entry path database. how

java - Convert 8-bit Indexed color to RGB -

i cannot find conversion routine converting 8-bit indexed color rgb. background details, using poi read xlsx file , 1 of cells has background color indexed value 64. when attempt create pdfpcell in itext value background basecolor, navy blue , correct color should black. need routine convert value of 64 rgb(0, 0, 0). this code sets background navy blue short c = ((xssfcolor) color).getindexed(); basecolor base = new basecolor(c); i found similar question here on "packed" routine failed "color value outside range 0-255". short packed = ((xssfcolor) color).getindexed(); log.debug("indexed {}", packed); int r = (packed >> 5) * 32; int g = ((packed >> 2) << 3) * 32; int b = (packed << 6) * 64; basecolor base = new basecolor(r, g, b); update 1: seems there palette somewhere in document, in case xssfpalette. once find answer i'll update here. update 2: xssfworkbook doesn't provide access palette, hence follow que

android - How to save and retrieve InputStream in text file with less overhead -

i retrieving/downloading json feed inputstreamreader , need pass inputstreamreader jsonreader parsing it. jsonreader reader = new jsonreader(isr); // isr inputstreamreader instance everything okay. want cache inputstreamreader or data in other format internal storage later use. caching, using text file save. (afaik, android default cache saves data in external storage , devices have no external storage). for saving file, using .txt file. able save/cache string formatted data file , read string . code have written far write & read file: public static void writeobject(context context, string key, object object) throws ioexception { fileoutputstream fos = context .openfileoutput(key, context.mode_private); objectoutputstream oos = new objectoutputstream(fos); oos.writeobject(object); oos.close(); fos.close(); } public static object readobject(context context, string key) throws ioexception, classnotfoundexception {

graph - How to keep gridlines on but turn ytick off in MATLAB -

i trying put grid lines on plot turn off numbered markers on axis. i first turn on grid lines using: grid on; however when rid of markers using set(gca,'ytick',[]); % rid of markers the y grid turns off! how stay? i don't know if there more elegant solution set tick labels empty strings. set(gca, 'yticklabel', []) this way tick marks still there.

How to exclude or trim blank cells from datagridview using RowFilter in vb.net -

i'm trying find way delete or trim blank cells in datagridview on import. found few things online rowfilter works data source. right how i'm declaring data source datagridview1.datasource = ds.tables(0).defaultview if can give me suggestions or tell me how trim blank cells row filter appreciate it! if don't want delete rows blank cells hide them linq: public sub hidedatagridviewcells(byval dgv datagridview) dim emptycells = (from cell datagridviewcell in (from row datagridviewrow in dgv.rows.cast(of datagridviewrow)() select row.cells).cast(of datagridviewcell)() trim(cell.value.tostring).equals("") select cell) each cell datagridviewcell in emptycells cell.owningrow.visible = false next end sub

jquery - validate a drop down list using javascript? -

<form name="form1" method="post" action="survey.php"> <p>q1: how rate ahmed ebaid? <p> <input type='radio' name='q1' value='1' id='q1'>1 <p> <input type='radio' name='q1' value='2' id='q1'>2 <p> <input type='radio' name='q1' value='3' id='q1'>3 <p> <input type='radio' name='q1' value='4' id='q1'>4 <p> <input type='radio' name='q1' value='5' id='q1'>5<span style='color:red' id='radio_error'></span><pre class='xdebug-var-dump' dir='ltr'><small>string</small> <font color='#cc0000

xcode - How can I find the address of a stack trace in LLDB for iOS -

when crash report, offending part of code this, instead of showing me actual line number, though crash report symbolicated: -[viewcontroller mymethod:] + 47 in order debug this, need know line of code represents can visually inspect it, set breakpoint, etc. what way address of method plus offset, shown above, using lldb? note: question not duplicate of how read crash report . know how read crash report. asking how corresponding line using lldb. nothing in other answers shows how that. quite verbose , go kinds of things dealing crash reports , debugging in general, don't show specific steps on lldb are. please not duplicate bug. your steps ( image lookup + p/x addr + offset ) give raw address, found. original crash report included address before method + offset --- easy slide binary correct address using target modules load . @ end of crash report there should list of binary images present in program, including load address , uuid. but more importantly, w

SSIS process having insert blocking the select same table -

i have ssis package queries both source , target tables, full-outer-join merge-join , uses conditional split detect differences insert/update/delete accordingly. done 80 tables , part process completes successfully. though, have had issues in job hangs because of blocking queries. the process hang if data bulk inserted target table before target data source has completed retrieving existing data. is there way can have process wait until existing data queried before data inserted. or there better strategy handling inserting data target table while table read. having done bunch of these, have moved more complex pattern performs lot better. others may differently, works me. first, instead of merge join, use lookup transformation. lookup transforms set full caching (the default) load data before data flow executes. should identify inserts , updated quickly. inserts can run directly data flow, updates... the real way updates part of data flow use oledb command tran

jquery - Check IFRAME URL and reload if found - Javascript -

i'm trying page name of iframe page (that on same server) , if it's not following name(s): 'index1.php' or 'indextom.php' don't if page name reload iframe. here have set doesn't work reason resultnfo true , iframe never reloads? //check url of iframe var currenturl = document.getelementbyid("frmcontent").contentwindow.location.href; var word = 'index1.php'; var regex = new regexp( '\\b' + word + '\\b' ); var resultnfo = regex.test( currenturl ); if (resultnfo = true){ document.getelementbyid("frmcontent").contentdocument.location.reload(true); } var word = 'indextom.php'; var regex = new regexp( '\\b' + word + '\\b' ); var resultnfo = regex.test( currenturl ); if (resultnfo = true){ document.getelementbyid("frmcontent").contentdocument.location.reload(true); } alert('url is: '+currenturl+'\n'+resultnfo); why don't resultnfo = currenturl.in

freepascal - Pascal double value is not exact, how to fix this? -

i have been solving programming challenge in uva , got problem, strange. here flawed code: program wtf; begin writeln(trunc(2.01 * 100)); readln(); end. obviously, need 201 integer , 200 , happens because double somehow doesn't store exact value... it's 2.01 = 2.00(9) reasons unbeknownst me, can explain , provide solution? edit: yet, figgured using round() instead of trunc() fixes this... still, why wouldn't trunc() work? double stores numbers of form s*2 p s , p integers. number 2.01 not of form s*2 p integers s, p cannot stored in double . the solution here round 2.01 * 100 nearest integer instead of truncating it. although 2.01 not 2.01, little bit below. rounding nearest integer result in 201. note if 2.00(9) mean 2.0099999999… repeating indefinitely, 2.00(9) is not double when write 2.01 . nearest double real 2.01, , number got, 2.0099999999999997868371792719699442386627197265625 . of form s * 2 p : 9052235251014696 * 2 -52