Posts

Showing posts from September, 2011

ruby on rails - Can't login using devise, migrating from restful_authentication -

i migrating restful_authentification devise. follow every steps. succeed sign new user, confirm it. login it's user. going right. until found bugs. of current user able login restful_authentification, cannot login. returns "invalid username , password". it possible reason coursed different password encryption system between restful_authentification , devise? or devise didn't allow characters on password? please me? 2 days find ways resolve issue thanks i not know restful_authentication, think have reset passwords of users existed before. safe assume devise uses different algorithm encode password. when resetting password console, need specify :password , :password_confirmation , otherwise not work.

html5 - Close of video player in iphone -

am using html5 play video on iphone. there way know when video player close because want call function after clicking on done button. can't use 'ended' event occurs after completion of video. appreciate suggesions. look at: html 5 video onended event not firing

.net - WPF Binding problem -

i want create wpf user control exposing property called innercaption. code below xaml code <usercontrol x:class="mycontrol.usercontrol1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <grid> <textblock name="_innercaption" > hello</textblock> </grid> </usercontrol> cs code behind namespace mycontrol { /// <summary> /// interaction logic usercontrol1.xaml /// </summary> public partial class usercontrol1 : usercontrol { public usercontrol1() { initializecomponent(); } public textblock innercaption { { return (textblock)this.getvalue(innercaptionproperty); } set { this.setvalue(innercaptionproperty, value); } } public static readonly dependencyproperty innercaptionproperty = dependencyprope...

Path of kerberos tickets TGT and service tickets in windows XP and unix? -

could please send across path of kerberos tickets tgt , service tickets in windows xp , unix? also, how know version of kerberos being used in windows , unix? many thanks, you can use klist kerberos tickets on unix. ticket path different os os. klist command should tell path. on unix platforms, can specify -4 or -5 show v4 tickets or v5 tickets. you can use kerbtray or klist see details of kerberos ticket on windows xp. both of them can found windows server 2003 resource kit . actually, should have v5 kerberos tickets if windows joined active directory. if don't have permission install windows server 2003 resource kit on windows xp machine, try google "tktview". it's tool written keith brown long time ago. source code included in 1 of msdn articles year 2000

Error in mysql Trigger -

i trying create trigger. first of created table employees , table employees_audit: create table employees ( employeenumber int(11) not null, lastname varchar(50) not null, firstname varchar(50) not null, extension varchar(10) not null, email varchar(100) not null, officecode varchar(10) not null, reportsto int(11) default null, jobtitle varchar(50) not null, primary key (employeenumber) ) create table employees_audit ( id int(11) not null auto_increment, employeenumber int(11) not null, lastname varchar(50) not null, changedon datetime default null, action varchar(50) default null, primary key (id) ) then created trigger: delimiter $$ create trigger before_employee_update before update on employees each row begin insert employees_audit set action = 'update', employeenumber = old.employeenumber, lastname = old.lastname, changedon = now(); end$$ delimiter ; both first table , second created when execute trigger error #1...

C++ - struct vs. class -

possible duplicates: c/c++ struct vs class what pod types in c++? hi, in c++ in nutshell book , in chapter 6: classes , unders access specifiers , mentioned following: in class definition, default access members , base classes private. in struct definition, default public. that difference between class , struct , although convention, programmers use struct pod classes , use class all other classes . my questions here are: isn't there difference between classes , structs in structs don't hold functions , hold data? what pod classes? and, meant other classes here? there special classes? thanks. the other difference that template<class t> ... is allowed, but template<struct t> ... is not.

java - Not able to configure JPA with ehcache -

i have been trying configure jpa ehcache no success till now. configurations doing : persistence.xml <persistence-unit name="customdatabase"> <jta-data-source>jdbc/oraclexe_ds</jta-data-source> <class>com.td.waw.cse.entities.product</class> <properties> <property name="openjpa.log" value="defaultlevel=trace, runtime=info, tool=info, sql=trace"/> <property name="openjpa.querycache" value="net.sf.ehcache.openjpa.datacache.ehcachequerycache"/> <property name="openjpa.datacachemanager" value="net.sf.ehcache.openjpa.datacache.ehcachedatacachemanager"/> <property name="openjpa.datacache" value="net.sf.ehcache.openjpa.datacache.ehcachedatacache"/> <property name="openjpa.remotecommitprovider" value="net.sf.ehcache.openjpa.datacache.noopremotecommitprovider"/> </pr...

c# - Is it necessary to throw a NullReferenceException from an extension method? -

this question has answer here: argumentnullexception or nullreferenceexception extension method? 5 answers if define extension method such this: static public string totitlecase(this string instance, cultureinfo culture) { if (instance == null) throw new nullreferenceexception(); if (culture == null) throw new argumentnullexception("culture"); return culture.textinfo.totitlecase(instance); } is necessary me check string instance null , throw null reference exception myself? or clr treat extension methods instance methods in case , handle checking/throwing me? i know extension methods syntactic sugar static methods, perhaps c# compiler adds in check @ compile time? please clarify :) no. should never throw nullreferenceexception manually. should ever thrown framework itself. in context, should throwing argument...

Visual Representation of a plugin in a use case diagram built with starUML -

the question says all, how can build visual representation of plugin? have idea should regard else or not display can't find evidence (in high enough amount) sure of this. should not display plugin in use case in situation @ all? do need represent plugin package or actor instead? (if connection should have, include?) or should represent interface? maybe i'm off track here, last time made ucd year ago or something, it's slipping away when don't use stuff! wouldn't mind "beginners" advice here :) use cases analysis, not design, therefore should omit architecture structure. when have plugin, system , therefore might system under development or actor. if system under development , use cases consider plugin, show using boundary box in diagram encompassing use cases (some tools don't allow that, make implicit). otherwise, if have use cases describe behaviour of system, interacts plugin, depict plugin actor.

jmf - Run Java ScreenGrabber example -

i'm trying test screen grabber sample jmf. tell me how write main method run example?. i have reviewed lot in google , have not found way make work. because not know of 2 classes (livestream or datasource) must use in main method. otherwise, tried running command: java jmstudio screen://0,0,160,120/10 but shows me following exception: unable_create_player*javax.media.noplayerexception: cannot find player :screen://0,0,160,120/10 thanks help. greetings! don't. jmf never worked out , has been abandon. ( google: "jmf dead" .) find mechanism screen grabbing.

3dsmax - calculate total angle between selected faces -

i have framework selecting holes in objects. right works manually clicking inside hole (with “by angle” option on), selects inside of hole. delete faces, select “open edge” cap it. script now. all of works fine, not want click each hole separately. to put perspective: i’ve got 10 models (engineering models, hardsurface), each model @ least 5000 separate parts, have go through , remove holes using above way of doing it. so think might trick: 1) select each face 1 1 softselection. 2) each time check angles in selection. 3) if it’s hole, it’s ~360 angle, know want remove. the part need with, getting total angle of selected faces. the rest of done. the case simple box,with cylinder through it, use boolean create hole in box. this basic function use in scripts, facenormals normalised vectors ( lenght = 1.0 , start in [0,0,0]) point out of face. fn getanglebetweentwofaces face1 face2 = (-- returns angle between 2 facenormals theangle = acos(dot face1 face2...

c# - Asp .NET MVC OutputCache stored in SQL db -

how can configure outputcache in asp .net mvc 2 (with .net 3.5) cached data stored in sql database? this achieved in asp.net 4.0 can write custom cache provider . quote same blog post: one limitation of output caching asp.net v1->v3.5, though, cache store not extensible – , cached content has stored in-memory. time upgrade :-)

iis 6 - How to Recover from a temporary exception in ASP.NET 3.5 Application on IIS6? -

scenario: database server not running during application start. starting afterwards. global.asax' application_start initialization, loading stuff database. means subsequent requests not able run properly. iis 7 handles elegantly: application stay in temporary mode, subsequent clients see first error, , requests not executed. after 12 seconds new attempt application_start(), etc. if temporary external error condition gone, clean startup done. my iis 6 installation worse: first request crash application nevertheless start running , requests served. not want, since there kind of unpredictable consecutive faults due missing uncomplete application initalization. how can setup iis 6 / web.config behave same way in iis 7? thanks replys.

java - Difference between StringBuilder and StringBuffer -

what main difference between stringbuffer , stringbuilder ? there performance issues when deciding on 1 of these? stringbuffer synchronized, stringbuilder not.

c# - Check for MS Access database table if not exist create it -

how programmatically check ms access database table, if not exist create it? simply execute following code if table exist return error other wise create new one: try { oledbconnection myconnection = new oledbconnection("provider=microsoft.jet.oledb.4.0; data source=" + frmmain.strfilepath + "\\configstructure.mdb"); myconnection.open(); oledbcommand mycommand = new oledbcommand(); mycommand.connection = myconnection; mycommand.commandtext = "create table <yourtable name>(<columns>)"; mycommand.executenonquery(); mycommand.connection.close(); } catch(oledbexception e) { if(e.errorcode == 3010 || e.errorcode == 3012) // if error table exist processing required } those error codes returned if table exists - check here all.

c# - DateTime.AddDays vs Calendar.AddDays -

what difference between datetime.adddays , calendar.adddays ? datetime type calendar independent? datetime.adddays converts days ticks , adds number of ticks date time. default implementation of calendar.adddays same. however, since virtual method can implemented in specific calendar in more complicated way, e.g. here: http://codeblog.jonskeet.uk/2010/12/01/the-joys-of-date-time-arithmetic/

Getting xml string from Document in Java -

i have java program aiming consider xml dom , write string. using these packages: org.w3c.dom.* , javax.xml.parsers.*; so have documentbuilder , document , element objects... is there way string representing xml dom in 1 call???? its not 1 call but: transformerfactory transfac = transformerfactory.newinstance(); transformer trans = transfac.newtransformer(); trans.setoutputproperty(outputkeys.method, "xml"); trans.setoutputproperty(outputkeys.indent, "yes"); trans.setoutputproperty("{http://xml.apache.org/xslt}indent-amount", integer.tostring(2)); stringwriter sw = new stringwriter(); streamresult result = new streamresult(sw); domsource source = new domsource(doc.getdocumentelement()); trans.transform(source, result); string xmlstring = sw.tostring(); the setoutputproperty method makes string output prettier can take out.

c# - How to grow/shrink a TextBlock (Font Size) to the available space in WPF? -

i've seen question asked lot, however, opposite of i'm looking for. while other people want control size based on size of text, i'm trying figure out if there way grow size of text amount of space available. take idea of digital clock window , want numbers stating time grow (or shrink) based on size of window clock in. if there isn't way automatically pointers programmatic way can accomplished? the wpf viewbox control grow / shrink contents available space: http://www.wpftutorial.net/viewbox.html just place textblock within viewbox: <viewbox stretch="uniform" width="50" height="50"> <textblock text="test" /> </viewbox> of course, viewbox typically scaled container, idea!

html5 - HTML 5 Canvas draw image over other image -

i have 2 images want draw on 1 canvas. problem first image draw might take longer load second one. since pictures drawn on onload event occur first image drawn on top of second picture. this not want, want second image drawn on top of first image. ideas? var imgsrcs = ['url1', 'url2']; // <- put image urls here var imgs = []; var loaded = 0; var loadcallback = function () { loaded++; if (loaded == imgsrcs.length) { // draw imgs in correct order } }; (var = 0; < imgsrcs.length; i++) { imgs[i] = new image(); imgs[i].addeventlistener('load', loadcallback, false); imgs[i].src = imgsrcs[i]; }

Inserting Data into Rails -

i'm new rails , had trouble figuring out how insert data db. i'm reading csv , load values db. model looks this. class book < activerecord::base belongs_to :subject end class subject < activerecord::base has_many :books end ...and data this: science, book science, book b history, book c math, book d i'm splitting csv rows delimiter. how can insert data in way if subject exists, child book record added existing subject in event subject doesn't exist, new subject created too? is best way go or recommend better approach. no need reinvent wheel. add header row csv file, save subjects.csv , use built in fixtures library load data: http://api.rubyonrails.org/classes/fixtures.html

jQuery Raty: how to disable one rating box in a group of rating boxes? -

i'm using jquery raty plugin nice , rather complete plugin create ratings (a row clickable stars in itunes). in project i'm working on have number of elements (images) contain rating box. on html level these rating boxes have same classname raty plugin can activate them in 1 call: $('.rating').raty this call makes possible disable (make 'readonly') these rating boxes, command disables rating boxes. activate rating boxes using aforementioned command, , disable 1 or more of rating boxes inside group. anyone know if possible? if want adjust settings while code running, can this: var iseven = false; $('.raty').each(function(i) { iseven = (++i % 2 == 0); $(this).raty({ readonly: iseven, start: (iseven) ? 3 : 0 }); }); if have code , want change later, can this: $(function() { var targetid = $('.raty').attr('id'); $.fn.raty.start(5, '#' + targetid); });

sql - How to remove column name when selecting from a XMLTYPE column using FOR XML PATH -

i have table xmltype column named 'invoicexml'. the data in column xml in form: <invoice customernum="1234" > <customdeliverydetails /> </invoice> when select ... xml path(''), root('invoices') i end with: <invoices> <invoicexml> <invoice customernum="1234" > <customdeliverydetails /> </invoice> </invoicexml> </invoices> how stop column name invoicexml appearing in output? declare @t table (invoicexml xml) insert @t values ( '<invoice customernum="1234" > <customdeliverydetails /> </invoice> ') insert @t values ( '<invoice customernum="4321" > <customdeliverydetails /> </invoice> ') select (select t.invoicexml) @t t xml path(''), root('invoices') edit 1 subqeery (select t.invoicexml) has no column name removed.

python - Running a Twisted Application in PyDev -

i debug twisted application (10.0.0) using eclipse (3.5.2) pydev module (1.6.4) , python (2.6.5). run application command line specify following: c:\python26\python c:\python26\scripts\twistd.py -ny mytwistedapp.py to accomplish using pydev created new pydev project , imported mytwistedapp.py , twistd.py. under project's run configuration specified c:\python26\scripts\twistd.py main module. if select run -> debug configurations runs twistd.py no parameters (half-way there, right?). if try add program arguments run configuration (-ny mytwistedapp.py) processed pydev debugger instead of twistd.py. 2 questions: is specifying twistd.py main module right approach? if so, how can pass twistd.py parameters needs run mytwistedapp.py (-ny mytwistedapp.py)? first off, thank kind , gracious support in matter! the key running twisted application via pydev module of eclipse define twistd.py main module in run configuration. following steps can used: these instru...

c++ - error LNK2005: _sprintf already defined in ntdll.lib(ntdll.dll) -

Image
i'm linking against ntdll.lib use zwqueryinformationprocess , using multi-threaded runtime library. ntdll seems define of crt functions. so, when link against , use runtime library, linker errors. can force linker use crt functions , ignore ntdll symbols rid of error? or somehow else solve error. i know documentation of zwqueryinformationprocess suggests dynamic loading, it's used in static lib main project linking to, , has been working fine long time, i'd prefer not change it. thanks. i've found few discussions on other sites, eg: http://www.codeguru.com/forum/archive/index.php/t-414274.html haven't seen seems provide solution. there mentions of changing link order, can't see how change order in runtime library links via project settings. changing link order seems solve it. change order of automatically linked libs, need ignore them adding "ignore specific library" , re-add them "additional dependencies" in order wan...

c++ - Which are the best practices for data intensive reading and writing in a HD? -

i'm developing c++ application (running in linux box) intensive in reading log files , writing derived results in disk. i'd know best practices optimizing these kind of applications: which os tweaks improve performance? which programming patterns boost io throughput? is pre-processing data (convert binary, compress data, etc...) helpful measure? does chunking/buffering data helps in performance? which hardware capabilities should aware of? which practices best profiling , measuring performance in these applications? (express here concern i'm missing) is there read basics of adapt existing know-how problem? thanks compression may lot , simpler tweaking os. check out gzip , bzip2 support in boost.iostreams library. takes toll on processor, though. measuring these kinds of jobs starts time command. if system time high compared user time, program spends lot of time doing system calls. if wall-clock ("real") time high compared system , ...

graphics - Drawing millions of segments on screen -

i draw millions of line segments screen. of time user see area of "universe", user should have ability "zoom" out see line segments @ once. my understanding primitive "triangle", have express line segments triangles. millions of triangles. is xna right tool job, or slow? additional detail: this not game, modeling program of processes. i not care language use (xna recommended me) p.s.: please let me know if need additional detail. my understanding primitive "triangle", have express line segments triangles. millions of triangles. incorrect, xna can draw lines in following manner: graphicsdevice.drawindexedprimitives(primitivetype.linelist, vertexoffset, 0, numvertices, startindex, primitivecount); (or primitivetype.linestrip if end vertex of line1 start vertex of line2). is xna right tool job, or slow? xna "a tool", , if you're drawing lot of lines definately going faster gdi+ , easy...

iphone - Game Center score posting/leaderboard creation isn't working -

i'm trying games center work with, no luck. i'm using apple sample code. when go view leaderboard in app, see "unable load" under leaderboard in game center. things i've checked: my bundle id on itunesconnect same in info.plist that leaderboard set on itunesconnect that leaderboard id correctly entered code #import included in .m file the code have in .h file: int *scoreint; } -(ibaction)subscore; -(ibaction)showleader; code in .m file: -(ibaction)subscore { { gkscore *scorereporter = [[[gkscore alloc] initwithcategory:@"1234567"] autorelease]; //in tuturial value = scoreint, not label. //try either i_startpt or finalstarpt scorereporter.value = scoreint; [scorereporter reportscorewithcompletionhandler:^(nserror *error) { if (error != nil) { nslog(@"failed!!!"); nslog(scoreint); } }]; } } -(i...

javascript - Problem when attaching a Custom Validator to a control dynamicly -

anyone have idea why code doesnt work? <script type="text/javascript"> function bookdeskvalidation(source, arguments) { var deskcombo = $find("<%=radcomboboxdesk.clientid%>"); var bookcombo = $find("<%=radcomboboxbook.clientid%>"); if (bookcombo.get_text() != "" && deskcombo.get_text() == "") { arguments.isvalid = false; } else { arguments.isvalid = true; } } function attachvalidator(combobox) { var validator = document.getelementbyid("<%= customvalidatordeskbook.clientid %>"); validator.controltovalidate = combobox.get_id(); validator.clientvalidationfunction = "bookdeskvalidation"; validatorhookupcontrol(combobox, validator); } </script> <td>book:&nbsp;</td> <td> <telerik:radcombobox id="radcomboboxbook...

jquery - What does: "$("#somediv").css('top', pos > 0 ? pos : 0);" mean -

i have jquery expression toolbar.css('top', pos > 0 ? pos : 0); ... pos numeric variable calculated above (but not shown here, it's not relevant). i trying work out pos > 0 ? pos : 0 means? can help. if pos greater 0, return pos, otherwise return 0 its called ternary operation: http://en.wikipedia.org/wiki/ternary_operation

c# - XML data in binary files or straight XML file for asp.net application? -

we have need save of our configuration items files. have been told localization features going use. have been told, faster read binary file straight xml file. true, , ideal save xml data in binary format or there way should save data pull web application? i able read data using linq or casting object. also, best way parse file sepecific data? suggestions appreciated? i recommend using xml on binary because it's easier work with. binary faster doubt notice speed gain in application, if cache values read file. the easiest way parse xml file deserialize object using xmlserializer class. absolutely painless way parse xml in opinion.

Are there any frameworks developed over Ruby on Rails -

i know there framework uses ruby on rails framework beneath it. regards, deimus yes there are, example hobo (but world favor , don't use please ). there other rails-enhancing frameworks cells , apotomo , , "generic controller" frameworks inherited_resources , (discontinued) resourcelogic ( here can read author of resourcelogic thinks kind of frameworks, , why discontinued it). the bottom line is: there many frameworks build on top of rails, should careful when adopting them - rails powerful (if not bloated) framework enough is, , in long run additions can slow down instead of helping you.

language agnostic - Pretending that a 64-bit integer has unlimited range -

i implementing compiler proprietary language. the language has 1 built-in integer type, unlimited range. variables represented using smaller types, example if a , b integer variables b ever assigned value of expression a % 100000 or a & 0xffffff , b can represented int32 instead. i considering implementing following optimization. suppose sees equivalent of c# method: public static void main(string[] args) { bigint = 0; while (true) { dostuff(i++); } } mathematically speaking, transforming following not valid: public static void main(string[] args) { int64 = 0; while (true) { dostuff(i++); } } because have replaced bigint int64 , overflow if loop runs forever. suspect can ignore possibility because: i initialized 0 , modified repeatedly adding 1 it, means take 2 63 iterations of loop make overflow if dostuff useful work, take centuries (extrapolated crude tests) i overflow. machine program runs on no...

c# - Regular expression question: Until next match OR End Of Document -

i'm working on document parser extract data documents i've been given , i'm coding in c#. documents in form: (type 1): (potentially multi-lined string) (type 2): (potentially multi-lined string) (type 3): (potentially multi-lined string) ... (type n): (potentially multi-lined string) (type 1): (potentially multi-lined string) ... end of document. the document repeats (type 1)-(type n) m times in same format i'm having trouble multi-lined strings , finding last iteration of (type 1)-(type n) what need capture (potentially multi-lined string) in group named preceeding (type #) here snippet of document i'm trying match: name: john dow position: vp. on development bio: here long string of un important stuff include words "bio" or "name". times have problems here, part should normal bio information position history: vp. on development sr. project manager jr. project manager developer peon notes: here notes may or may not multilined ...

Clipboard Copy with JavaScript -

possible duplicate: how copy clipboard in javascript? i want when users clicks on link near text box, content of text box gets copied clipboard. how can this? you can't in javascript security restrictions. there few excellent cross browser ways perform this.

jQuery Sortable applied to table rows makes rows taller -

i'm preparing custom positioning table rows jquery ui sortable, i've run major problem. whenever grab row, gains 2px height. however, margin, height, padding etc. remain same. i've created test page, without additional scripts or styles. here can prevent rows getting taller issue happening? thanks. jquery: 1.4.4, jquery ui: 1.8.9 edit: happes in chrome , safari (haven't tested other browsers) on mac. example on jsfiddle works fine: http://jsfiddle.net/ya47c/ , i'm not quite sure different there. <!doctype html> <html> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script> </head> <body> <table> <thead> <tr><th>header<...

select - Looking for a cross platform small footprint database -

i have following scenario. need db store xml messages have been created reader. want use transport (wcf) read db external populating app , send messages central db db needs run on mono, , windows. i did @ sqlite3, , seemed fit requirements, i'm reading not on multi process access , t's moving away sweet spot, these last couple of days. thanks. have considered using xml store data? doesn't more portable , work fine long client-side storage needs simple. e.g. not large amount of many domain objects need stored. additionally using xml data store solves lot of setup , installation headaches. reference file (or files) relative executable. don't need worry installing db engines variety of platforms , worry upgrading.

c# - JSON Serialization of Dictionary into name:value instead of {name:name, value:value} -

using asp.net 4.0 c#, how able change serialization of list containing name/value object json object of format: { name:value, name1:value1, name2:value2 } instead of { {name:name, value:value}, {name:name1, value:value1}, {name:name2, value:value2} } the name/value object in dictionary dynamic in terms of keys exist inside. 1 workarounds create custom object have explicit properties available - approach not scalable, therefore question :) thanks. you implement custom javascriptconverter , you're in full control of serialization. or put properties idictionary , json , think come out in format you're after.

MMS sending connectivity issues when wifi is active (Android) -

i'm working on android application send mms internally without using native messaging app. i've been using code native app found @ https://android.googlesource.com guide , have managed create working prototype. however, i'm having slight issue when trying make http_post when phone connected wifi. in code snippet below request mms network feature , wait android.net.conn.connectivity_change intent indicating connection active. request networkinfo type_mobile , check connected. hit issue. if wifi connected, when call info.isconnected() returns false , mms httppost cannot made post must made through 3g/gprs connection. connectivitymanager.startusingnetworkfeature(connectivitymanager.type_mobile, "enablemms"); //wait android.net.conn.connectivity_change intent networkinfo info = connmgr.getnetworkinfo(connectivitymanager.type_mobile); if (!info.isconnected()) return; the way can work disconnecting wifi @ point info.isconnected() returns true , can go o...

PDF generated by Latex doesn't open in 100% zoom -

i created pdf in latex. well, except want have generated pdf open @ 100% zoom level default when opened in adobe pdf reader. currently, being displayed @ 57%. have noticed other instances of pdf generated other latex code being displayed @ zoom levels other 100%. is issue viewer or deviation 100% zoom has latex code in itself. mean, if change page borders or (or document type article , not book or else); effect default zoom? i not remember latex defaults, sure can control zoom level using hyperref package if not doing so. direct link manual: here \usepackage{hyperref} \hypersetup{pdfstartview={xyz null null 1.00}} please note not have acrobat reader installed on machine i'm writing these, don't hesitate report if somethings wrong. also, assuming compilation pdflatex.

Look for Basic Introduction of TCP/IP in C++ -

i looking primer learn tcp/ip basic knowledge. can give me suggestions on books or online resources? thank you // update title based on comments two books used in studies: http://www.amazon.com/computer-networking-top-down-approach-5th/dp/0136079679/ref=dp_ob_title_bk http://www.amazon.com/internetworking-tcp-ip-vol-5th/dp/0131876716/ref=dp_ob_title_bk/184-0356931-5226767

objective c - Set Button Image to Finder Icon -

how set nsbutton's image finder icon (programmatically) ? i'm trying in objective-c/cocoa ( mac ) any appreciated! alternate solution: nsworkspace *wksp = [nsworkspace sharedworkspace]; nsimage *image = [wksp iconforfiletype:nsfiletypeforhfstypecode(kfindericon)]; [image setsize:(nssize){ 128.0f, 128.0f }]; [button setimage:image]; you may need include <coreservices/coreservices.h> in order compiler know kfindericon .

CodeIgniter - showing original URL of index function? -

i'm not sure if i'm approaching fundamentally wrong or if i'm missing something. i have controller , within index function is, obviously, default loaded when controller called: function index($showmessage = false) { $currentemployee = $this->getcurrentemployee(); $data['currentemp'] = $currentemployee; $data['calllist'] = $currentemployee->getdirectreports(); $data['showmessage'] = $showmessage; $this->load->view('main', $data); } i have function within controller bulk update. after updates complete, want original page show again message showing, tried this: /** * save employee information , return call sheet page */ function bulksave() { //update each employee ($x = 0; $x < sizeof($_post['id']); $x++) { $success = employee::updateemployeemanualdata($_post['id'][$x], $_post['ext'][$x], $_post['pager'][$x], $_post['cell'][$x], $_post['o...

Images visible in Firefox but not in Internet Explorer -

i'm having trouble in having ie display pictures have in 1 of joomla menus. i've read similar thread ( problem quite same ) , solved going ps , change mode rgb. don't know if it's different, attempted set mode rgb in gimp, rgb, can't tell what's wrong. any attempt of helping more welcome!

Visual Studio 2010 breaks HTML formatting -

is there way visual studio 2010 format html code when reformatting? in html, <div><span></span></div> is different <div> <span></span> </div> because of space after <div> . once there space, doesn't matter how many spaces or line breaks there are... so <div> <span></span> </div> is same as <div> <span></span> </div> however, editor quite happy insert or remove spaces/linebreaks between tags. cases, won't matter much, in cases, critical control whether there whitespace between tags. similarly, may want have <span> </span> space between tags, editor removes space! is there solution this? use &nbsp; if want make sure space conserved. browsers may optimize out empty divs example (see this question ), , containing whitespace considered being empty.

iphone - Combination of UIScrollView - CATiledLayer - PDF and Quartz drawing -

i want draw lines, rectangles, ... on full zoomable pdf (so without quality loss) in iphone/ipad project. first: have based me on sample: http://www.olivetoast.com/blog/2009/08/simple-uiscrollview-catiledlayer-pdf-example/ this sample makes possible zoom on pdf full quality second: , have based on sample: http://www.iphonedevbook.com/forum/viewforum.php?f=1&sid=6d52a0d08a8c6a807cdedfde6a041088 the sample named quartzfun of book. it's drawing line, rectangle, ... these 2 samples working separate, when want combine them can't draw line... making thins more simple have combined code here: http://www.megafileupload.com/en/file/297790/simpletiledscrollexample-1-zip.html can tell me change let work? thanks in advance first of all, not use quartz draw onto existing pdf files. works mostly, doesn't work when fonts used in original file not available on iphone/ipad , kinds of results. secondly, think of drawing lines on screen , writing them pdf fil...

json - Problem with a simple jQuery Templates example -

i using jquery-tmpl , receiving following json data, using form validation in asp.net mvc3: {"status":1,"message":"oh dear, have done. check list of errors dude!","errors":["the contents field required.","the date created field required.","the date updated field required.","the updated field required."]} my template looks this: <script id="responsetemplate" type="text/x-jquery-tmpl"> {{each(i, error) errors}} <li>${error}</li> {{/each}} </script> my json post follows: var data = { contents: "this test", datecreated: "", dateupdated: "", updatedby: "ben" }; $.ajax({ url: '@url.action("save", "note")', data: json.stringify(data), type: 'post', contenttype: 'application/json', datatype: 'json', success: function (re...

scrum - Alternatives to Jira in an Enterprise Agile Development Environment -

we using jira create transparency management in our agile development cycle. find overly cumbersome , burdensome on developers, scrum master, product owners... although charts produced liked management. what alternatives on " enterprise " level exist aiding agile development without creating hurdles in productivity. ideally should elegant agile , allow developers dance without stepping on toes of product owners. if interested in alternative tools, pivotaltracker, rally , versionone alternatives. pivotaltracker self-organized small teams, rally , versionone better suitable larger enterprises several teams on board. said that, still believe can use jira efficiently without adding overhead process. in our team use jira , greenhopper , happy that.

java - Encoding of the exported jar on Eclipse -

i have many projects @ home work in mac os, , work on windows. so, in eclipse change encode of projects utf-8. but when export jars or generate plugins, , want use these jars, seems exported jar not in encode want. to work exportation need externalize strings, , when import in other project lib, wit works well. do need externalize strings export libs? jar files not have encoding - zip container. if have resource files copied jar file. may forgot specify encoding when loading resource files containing externalized strings in program. in case default encoding used different on different platforms. therefore if can change resource loading source code check if uses specific encoding. if can't change resource loading source have convert encoding of resource file.

dyndns.org update via php/curl? -

im attempting maintain account @ dyndns.org via php/curl. im using (per rtfm): https://$account:$pw@members.dyndns.org/nic/update?hostname=$host&myip=$ip but 'nohost' response if $host new. if $host existing entry works. has used method of communicating dyndns? api used update existing entries? you can send ip address updates existing dyndns hostnames dyndns api, cannot create new hostnames. if need full api creating/deleting/changing hostnames, dynect smb may interest you: http://www.dyndns.com/services/dynectsmb/

security - MonoTouch - How do you use SecKeyChain.QueryAsRecord() to get a list of certificates? -

i emailed ipad .p12 certificate , installed in settings under settings->profiles->configuration profiles. i tried using following code array of certificates on ipad: secrecord myquery = new secrecord(seckind.identity); secstatuscode resultcode; secrecord[] arrayrecords = seckeychain.queryasrecord(myquery, 10, out resultcode); the resultcode set itemnotfound when returning queryasrecord(). tried creating myquery as: secrecord myquery = new secrecord(seckind.certificate); but caused resultcode set itemnotfound. how use seckeychain.queryasrecord() list of installed certificates? the keychain not useful think is. keychain gives access certificates manually added, wont give access system ones. or @ least, have never found way of doing , googling few months ago turned out no answers problem.

networking - Locating computer on subnet/network -

here situation: have special device can communicate via ethernet. it's connected computer via ethernet cable , problem these devices changed time time , have different ip addresses. start 192.168. , rest might different. device answers imcp (ping). right have list of ips , ping them find device. know there 2 devices on network (this special device , laptop). so looking solution find computers on 192.168.255.255 subnet , according reconfigure interfaces, bring them down/up , after connect device. how have manually configure stuff. ideas how locate computers under subnet? know can broadcast ping, like: ping 192.168.1.255 doesn't work 192.168.255.255 i use nmap, take time, like: nmap -n -sp 192.168.0.0/24 but have on subnet 192.168.255.255 understand. i looking why how configure , find machines on small local network 2 machines. thanks, -david you try pinging global broadcast address - 255.255.255.255 .

Embedding lua in my C# application : require "luainterface" fails -

i downloaded newest version of luainterface site, , referenced luainterface.dll , lua51.dll. interpreter works fine, when try require("luainterface"), exception : error loading module 'luainterface' file '.\luainterface.dll': specified procedure not found. here's example code produces behavior : static void main(string[] args) { lua lua = new lua(); lua.dofile("test.lua"); } the test.lua script has : luanet = require("luainterface"); also, i've made sure lua_path points luanet.dll is. what problem? for .dll's looked in lua_cpath in case... http://www.lua.org/manual/5.1/manual.html#pdf-package.cpath

svn - client side pre-commit hooks in subversion -

is way setup pre-commit hooks on client side svn client, example through eclipse or command line svn client ? no. can alias own script svn, gets called every time type svn . script calls actual svn. how that?

HAML in Rails 3 produces only doctype html -

hey guys running problem: if use this: !!! xml !!! %html %head %title myspace %body %h1 international space station %p sign guestbook i source: <!doctype html> <html> <head> <title>myspace</title> </head> <body> <h1>i international space station</h1> <p>sign guestbook</p> </body> </html> thanks :) according haml documentation , xhtml default doctype apart rails 3 uses html5. can set :format option override. in config/environment.rb : haml::template.options[:format] = :xhtml

How do I get line previews in Eclipse's context intelligent 'Java Search' (vs. context unaware 'File Search') -

Image
when using search functionality in eclipse, especially, example, java method or field, 'reference in workspace'. (control+shift+g) when the cursor on method, say. how have search results show 1 line preview. (think -- every other search tool i've used can offer, grep visual studio?) if search on 'bit of text' (without benefit of scope parsing provided 'references' search, offers it), can't seem figure out how when search references.? (which, for, say, class variables public double x , absolutely critically useful vs. sea of false listing come searching on 'x ') ////////////////////////////////////////////////////// clarifying question example: in screen shot1 attached, there 111 references method getheight() . but, without pop-pop-pop, jumping entry entry entry, there's no way see them? screenshot a: ( not letting me include directly due weird, kinda dumb annoying, account restriction thing...) whereas, if sear...

php - Dashes In the Url Causing 404 Error -

i'm working in php (5.2.14) on apache server (1.3.33) mysql, , problem has emerged pretty url's produced our .htaccess file. example, www.example.com/pages/page work, while www.example.com/page/this-other-page not work anymore. if type in underscores instead, 404 goes away, page uri's stored in database dashes, returns "page not found" cms error. here rewrite rules put in dashes. rewriterule ^([a-za-z0-9\-\_]+)/([a-za-z0-9\-\_]+)/?$ page.php?module=$1&uri=$2 [l] rewriterule ^([a-za-z0-9\-\_]+)/([a-za-z0-9\-\_]+)/([a-za-z0-9\-\_]+)/?$ page.php?module=$1&uri=$2&sec_uri=$3 [l] rewriterule ^([a-za-z0-9\-\_]+)/([a-za-z0-9\-\_]+)/([a-za-z0-9\-\_]+)/([a-za-z0-9\-\_]+)/?$ page.php?module=$1&uri=$2&sec_uri=$3&tri_uri=$4 [l] i suspect there configuration rule on server not dashes, it's not on our server. client hosting elsewhere, , server admin has not helped @ all. or there php configuration rule might fix it? as far know, ...

xml - How can I add line break into text that I am creating with XSLT? -

i trying create text output xml file using xslt. xslt creates sql code. here part outputs create table statements: create table dbo.[<xsl:value-of select="@physicalname"/>] ( <xsl:for-each select="entityattributes/entityattribute"> <xsl:apply-templates select="attributes/attribute[@attributeid = current()/@entityattributeid]"/> ... </xsl:for-each>) i want have line break after "(" in first line cannot manage find out how so. can help? if put <xsl:text> </xsl:text> in xslt give line break. not clear wish put this. guessing want: <xsl:text>create table dbo.[</xsl:text><xsl:value-of select="@physicalname"/><xsl:text>] ( </xsl:text> in general should wrap text output in ... looks horrid in xsl preserves spacing. note can break lines in xslt without affecting result - e.g. <xsl:text>create table dbo.[</xsl:text> <xsl:value...

mysql use CASE to update multiple rows with a for loop -

i need update 360 rows. doesn't work properly. help, please for ($i = 1; $i <= 360; $i++) { $info = mysql_real_escape_string($_post[$i]); $check = mysql_real_escape_string($_post[''.$i.'check']); $case = "when '$i' '$info'"; } $sql = "update $table set info = case id $case end id in (1-360)"; mysql_query($sql) or die (mysql_error()); there's @ least 1 (not very?) obvious reason why doesn't work - you're replacing contents of $case every iteration of loop. $case .= "when '$i' '$info'\n"; (note dot before equal sign) might further. 1 $i put in single quotes inside query while id columns tend numeric. i didn't try , run code. if still "doesn't work", should edit question , add more info table structure , error messages. apart that, do: $sql = "update $table set\n"; ($i =...

access SQL query - group by date range (after midnight problem) -

need populate list of days # of recordings each day grouped day. here problem: data recorded after midnight going next day: need go previous day . i tried this: select recordedondate, count(recordedondate) rowcount, count(songid) [total amount] infotable (recordedondate > dateadd('h', 5, #1/23/2011#)) , (recordedondate < dateadd('h', 5, #1/24/2011#)) group recordedondate order recordedondate desc but cannot group thanks what want offset times 5 hours "appear" on previous day. select dateadd('h', -5, recordedondate) recordedondate, count(recordedondate) rowcount, count(songid) [total amount] infotable (recordedondate > dateadd('h', 5, #1/23/2011#)) , (recordedondate < dateadd('h', 5, #1/24/2011#)) group dateadd('h', -5, recordedondate) order recordedondate desc fix clause require, group 5am 5am next day "today"

Using Facebook API im getting wired string encoding, how to convert it to something readable? -

im querying data facebook using qt , c++ query successful there section in result string not in english ( hebrew) , see them instaed encoded string im getting looks this: "\u05e4\u05d5\u05e8\u05d5\u05dd \u05d6\u05e7\u05e0\u05d9 \u05d4\u05e4\u05d9\u05e0\u05d2\u05d5\u05d5\u05d9\u05df " how can convert original string ( hebrew char's)

java - Handling GUI with SWING with multithreading when the GUI does not update informations -

so have desktop application designed using mvc pattern inspired this tutorial (but modified). application needs copy list of file directory another. update gui after every file copied. first of let me show code. in model have dummy method (not real method logic behind same): public void dummymethod(integer k) throws interruptedexception{ for(int i=0;i<10;i++){ system.out.println(i); thread.sleep(1000); this.firepropertychange(defaultcontroller.backup_dummy, i-1, i); } } in view have this: @override public void modelpropertychange(propertychangeevent evt) { // ....... else if( evt.getpropertyname().equals( defaultcontroller.backup_dummy ) ){ system.out.println("what?"); this.dummy.settext(evt.getnewvalue().tostring()); } } as can imagine what? printed every time gui not updated until loop has finished thing. that's classic problem when you're working swing , edt , ...

c# - Getting SQL Connection fragmentation, different way to connect to DB's -

we have multiple db servers. on 1 of servers have master config table holds instructions db server , database name agency supposed use. currently each database has 2 connections on them, if they're not being used (which fixing). however, we're trying find way make our connections not on place, , relieve of stress on our db servers. after lot of research found articles saying connections central location, , change database we're using through sqlconnection object. seems bit roundabout, work. so i'm wondering others in situation? the current path is: -user logs in -system access configtable find out database user going connect to. -system loads agency connection settings memory (session) user. -every request directly hits users database. is there more efficient way of doing this? open connections late, , close them early. for example: string result; using (var con = new sqlconnection(...)) { con.open(); var com = con.createcommand(); ...

cocoa - What is the maximum value of NSInteger? -

i need store maximum value of nsinteger nsinteger? correct syntax it? thanks. the maximum value of nsinteger nsintegermax .

Visual Studio: have region description be based on text within the region -

with method this: #region _description_ [author("a")] [city("b")] [year("2009")] #endregion void method() { } i'd _description_ reflect value of author method attribute. any ideas on how implement this? reason have many attributes, long, contain them within region. i'd region description reflect value of 1 attribute in particular, automatically (otherwise need remember update both each time). i'm using vs 2010. thanks. i don't think doable @ language level. #region preprocessor directive in c#, , c# spec not offer this. visualstudio 2010 implemented feature when mouse on collapsed block, show first several lines of block. otherwise way maybe this #region [author("a")]

Rails Method not available in View -

i strange error. have defined method model class rating < activerecord::base [...] belongs_to :user belongs_to :movie [...] def to_text texto = case self.grade when 0..1 "horrible" when 2..3 "bad" when 4..5 "not bad" when 6..7 "good" when 8..9 "very good" when 10 "master piece" end end end then, on controller, define instance: @current_user_rating=@movie.ratings.where(:user_id => current_user) and find it, works. then, when call method, or property like <%= @current_user_rating.grade %> <%= @current_user_rating.to_text %> i error undefined method `grade' []:activerecord::relation undefined method `to_text' []:activerecord::relation why variable not behaving instance appropriate attributes , methods relation? it work on console, not on server... since movie has mult...

sql server - Tools for visualising execution xml plans as HTML -

Image
are there tools / xslt style sheets around transforming xml execution plans returned microsoft visual studio html? failing that, know of techniques can used display charts in html suitable displaying execution plans? i couldn't find 1 made 1 myself https://github.com/justinpealing/html-query-plan it may need little polishing, pretty there , basic query plan summary: its being used on stack exchange data explorer

php - RETS (Real Estate Transaction Standard) project? -

i have realtor client add mls listings website. understand can access data feed based on rets. my question is, should develop myself, or third party provider? i'm decent php coder used dealing data feeds. don't want reinvent wheel if there more cost effective alternative. there quite few specialists in field can rets data db. there's open source projects phrets , vielerets , librets can handle lot of heavy lifting you. i've used of them @ various times. phrets personally, since it's more of wrapper rets in php, makes easy deploy on other servers. if working on own server, librets might better option, since can compile variety of languages (ruby, java, c, etc). may bit more powerful phrets. vielerets "product"-like that's downfall in opinion, since it's less flexible others. anyway-- depending on db scheme need import into, provider hire have mapping meet schema, may make cost/time effective using 1 of libraries i've ment...

javascript - tinyMCE paste as word -

hello: know how paste word newest version of tinymce (3-3-9-3)? thanks. as of number of versions ago, pasting word tinymce window easy copying word document (control-c or x) , pasting tinymce window. should convert office code html. edit: in order preserve office stylings, need add paste_retain_style_properties tinymce.init declaration. example: tinymce.init({      ....      paste_retain_style_properties : "margin, padding, width, height, font-size, font-weight, font-family, color, text-align, ul, ol, li, text-decoration, border, background, float, display",      .... });

Best scripting language for prototyping large-scale projects -

the last time attacked large-scale c/c++/asm project [involving many moving parts having work together], took following approach: built quick prototype in python piece piece, built efficient c version. python c api , boost::python used integrate c code in python skeleton link link, python glue replaced appropriate c or c++ version once python extricated, code base cleaned there many reasons why not best approach attacking large scale project, let's accept framework now. python in context predilection. not wed python. want replicate process scripting language powerful -- should able rapidly prototype application flexible -- should able integrate language features custom library light -- should not need legwork integrate c , c++ routines / structs / classes. nicer if process automated :) what language best? for lightweight , flexible parts, many go lua (including myself, though experience limited). lua intended embedding, c api best of scripting la...

visual studio 2010 - XNA 4.0 + VS2010: Symbols not loaded -

i've installed xna game studio 4.0 along phone development tools play xna/wp in vs2010 installation. all fine, altough cannot vs2010 load symbols , e.g: xna assemblies. i'm using vs2008 sp1 installation side-by-side no symbols configured in ide via env vars (since need use windbg). my local symbol path setup as: _nt_symbol_path=srv*c:\symbols*http://msdl.microsoft.com/download/symbols vs2008 sp1 works caching symbols specified folder. however, cannot make work in vs2010. looking @ target symbols folder, found failedloads folder lot of text files containing "pdb not found". vs2010 modules window shows many 'cannot find or open pdb' files microsoft.xna.* assemblies. i didn't find anything in google or msdn forums. any appreciated. thank you. i assume no public symbols available ms, :p.

hyperlink - Add a cart link (with number of items) in the sidebar in Magento -

i'm faced unique problem unique customer. in magento's account screen, there typically 2 places "my cart" makes appearance; top bar, , in sidebar block. however, i've been tasked removing , placing link (with number of items in cart) in "my account" section of sidebar. it appears new user, cannot post images. going pose problem. my account dashboard address book cart (2 items) <---- link here. within area, , showing number of items orders product reviews may tags newsletter subscriptions now, adding link problem. in fact, it's quite simple , accomplished <action method="addlink" translate="label" module="checkout"><name>cart</name><path>checkout/cart/</path><label>my cart</label></action> within customer.xml file. the problem stems listing items in cart within area. if site in english, few "if" statements inside of c...

javascript rollover effects question -

i learning js js book. rollover effects example got me, need help. i upload snapshot on flickr.com. url : http://www.flickr.com/photos/58745632@n05/5389380030/ the left side of snapshot page , right side of snapshot javascript code. question can change content in red box codes in green box. if can, why author bother add line "thislink.imgtochange = thisimage"? , relationship between "thislink.imgtochange" , "thisimage"? same 1 or identical ones? explain me? thank much. thisimage reference image object. being passed variable function. an image object has properties source (.src), .width. height etc. thislink object, , can have properites too. so, thislink.imgtochange = thisimage sets "imgtochange" image fed function. imgtochange arbitrary property chosen programmer. it's being used stash data used later. all code demonstrates "hard way" of doing rollover. having type (or use) "document.getelementby...

tortoisesvn - Is there any way to update source from SVN except tags? -

as know, svn root dir have 3 sub-dir.(trunk, tags, branches) , have lot of tags in tags dir. so when performed update command tortoisesvn on root, takes long time , consumes disk space lot. don't need access tags. thus, don't want update tags dir. is there way update sources except tags? you not need check out root dir normal work. if need trunk, checkout root/trunk. if need particular branch, checkout root/branch. in case tags not touched on svn update .

Safe Lua invoke C++ registered function -

hey,everyone! i've c++ app embedded lua script. non-programmer edits lua script, c++ app invoke lua script , lua script invokes c++ registered function. i use luaplus above job. question is: when script-editor makes mistakes such misspelling the parameter, c++ app crashes! can prevent happening? thanks look @ lua_cpcall , lua_pcall. both allow protected function calls of lua in c. if return non-negative number call failed , lua stack contains error string. in cpcalls case stack otherwise unmodified. pcall you'll need @ lua_pushcclosure invoke cfunction safely. what this: create c function of lua_* calls want, such loadfile , dofile. call function using lua_cpcall or lua_pushcclosure amd lua_pcall. allows detect if error occured in t function passed cpcall. examples: function hello() { string hello_ = "hello lua!"; struct c { static int call(lua_state* l) { c *p = static_cast<c*>(lua_touserdata(l,-1)); lua_pushstring(l,...