Posts

Showing posts from January, 2013

java - Spring/Hibernate/Flex = Unknown Entity -

i having bit of trouble spring+hibernate throwing error org.springframework.orm.hibernate3.hibernatesystemexception: unknown entity: com.rottmanj.domain.user.useraccount; nested exception org.hibernate.mappingexception: unknown entity: com.rottmanj.domain.user.useraccount i have debugged code , have researched issue, appears normal posted fixes issue not work me. appreciated. i have dao should save correctly, instead throws error above. @override public useraccount save(useraccount obj) { list<useraccount> userlist = template.findbyexample(obj); try { if (!userlist.isempty()) { throw new exception( "a user these credentials exists. please try again."); } else { template.saveorupdate(obj); } } catch (exception e) { logger.debug(e.tostring()); } return obj; } this dao called service below, exposed remoting destination. @service @remotingdestination(channels = {...

c++ - How to expose a map of pointers as a map of const pointers? -

i have class std::map of pointers member. now, i'd expose member in read fashion: modification not allowed neither map, nor objects pointed to. internally need pointers non-const, , want expose them const. i have solution compiles @ least, i'd know if there's hidden problems i'll run this. class { public: const std::map<int, const float*>& getmap() const { return *(reinterpret_cast< const std::map<int, const float*>* >( &m_map)); } private: std::map<int, float*> m_map; }; there's possible problem can think of: if internal layout of std::map different maps of pointers , maps of const pointers, cause ugly bugs. cannot think of sane reason why case. has idea? to clarify: aware hack, , there safer solutions (like separate accessor functions). wondering if break right away because of piece of information i'm missing. this of course undefined (edit: looks it's unspecified) behavior because 2 maps (from lang...

php - Cannot save cookies or use a db, need to display a message only once -

i'm developing pre built php based system. for restrains cannot explain, cannot use cookies, sessions or db link. i need display message once every visitor comes in. any creative ideas guys can think of? thanks, here ideas use browser's localstorage pass message using post or on querystring. not safe option use flash store. same #1 don't need flash! use file disk need able remember owns file since multiple people on same server. without using cookies, not sure how this. i using localstorage. first page create javascript stores message on browser's storage , second request pull message , display it.

objective c - dispatch_sync vs. dispatch_async on main queue -

bear me, going take explaining. have function looks 1 below. context: "aproject" core data entity named lpproject array named 'memberfiles' contains instances of core data entity called lpfile. each lpfile represents file on disk , want open each of files , parse text, looking @import statements point other files. if find @import statements, want locate file point , 'link' file 1 adding relationship core data entity represents first file. since of can take time on large files, we'll off main thread using gcd. - (void) establishimportlinksforfilesinproject:(lpproject *)aproject { dispatch_queue_t taskq = dispatch_get_global_queue(dispatch_queue_priority_default, 0); (lpfile *filetocheck in aproject.memberfiles) { if (//some condition met) { dispatch_async(taskq, ^{ // here, scanning @import statements. // when find valid one, put whole path imported file array called 'verifiedimports...

excel - when using the sumif function how do you get the [sum_range] to only add the positive numbers? -

when using sumif function how [sum_range] add positive numbers? so if function =sumif(a:h,c34,h:h) how add positive numbers in column h in posted formula =sumif(a:h,c34,h:h) because test range a:h , range summed h:o (the shape of a:h = 8 columns starting @ top left cellof h:h) not sure if intended. given overlap in criterai , sum ranges suspect not. btw means cell j34 included in sum sumifs available in exel 2007 , later , work =sumifs(h:h, a:a, c34, h:h, ">0") unlike range , criteria arguments in sumif function, in sumifs function, each criteria_range argument must contain same number of rows , columns sum_range argument. if using excel 2003 or earlier, or if range behviour described above required, can use somthing like, =sum(h:h*(a:a=$c$34)*(h:h>0)) or =sum(h:o*(a:h=$c$34)*(h:o>0)) ' 1 won't work is, have resolve overlapping ranges entered array formula (ctrl-shift-enter)

c# - How to access a function within a namespace -

please facing problem while accessing function within class inside namespace in c#. the format know follows: namespace.classname.functionname(); however, above method reporting me following error: an object reference required non-static field, method or property "namespace.classname.functionname()". you need declare instance of class contains function namespace.classname yourclass = new namespace.classname(); then can use function follows yourclass.functionname(); if want able use function without declaring instance of class needs static funciton.

php - Atomicity in Map/Reducing over new records (MongoDB) -

here's situation: i've got mongodb cluster , web-app, pretty intensive map/reduce query. query happens periodically (every 5min) in cron job, , results stored (using $merge ) collection. what works: currently, query performs on every record in collection. said collection growing millions of rows, , each time runs, takes little longer. the obvious solution run map/reduce on new records, , use reduce function on old stored values calculate correct value. mongodb great, lets specify reduce option instead of merge that. what can't figure out: how correctly perform m/r on new records in initial collection. see 2 potential solutions, neither of good. ideas? i flag records have been processed. problem how flag same records m/r'd over? i query matching items, pass list of ids $in: [id1, id2, ...] query map/reduce, , send update set flag using same $in . that's inelegant, , don't know how that's going perform when list of records huge. tl;dr: ...

How to use Httpresponse in view in django while using Ajax -

i using this def ajax_create( request ): if request.is_ajax(): form = sourceform() template = 'ajax_form.html' data = { 'form': form, } return render_to_response( template, data, context_instance = requestcontext( request ) ) i error ajax_create didn't return httpresponse object perhaps if request.is_ajax(): returning false, if that's entire view function? typically, should follow pattern when making django view functions: def my_view(request): if request.method == 'post': form = myform(data=request.post, files=request.files) if form.is_valid(): # form... else: initial = {...} form = myform(initial=initial) context = {'form':form, ...} return render_to_response('path/to/template.html', context, context_instance=requestcontext(request))

sax - Writing Console Output to File in Java -

so wondering if possible write console output separate file outside of java? know printwriter , filewriter method. however, in experience work if using them within 1 method, don't think can code have right now. below have... java code import java.io.bufferedwriter; import java.io.file; import java.io.filewriter; import java.io.ioexception; import java.io.printwriter; import org.xml.sax.*; import org.xml.sax.helpers.defaulthandler; import javax.xml.parsers.saxparser; import javax.xml.parsers.saxparserfactory; public class xmltagparser extends defaulthandler { private int i; public xmltagparser() { traverse(new file("c:/documents , settings/user/workspace/intern project/proposals/converted proposals/extracted items")); } private static final class saxhandler extends defaulthandler { private stringbuffer buffer; private string heading; private boolean inheading; public void startelement(string ur...

.net - TFS mapping vs Subversion -

i new tfs, have been using subversion. confused "mapping" concept. looks tfs maps local folder source controlled folder. every local change make "automatically" gets added source control??? i ask b/c got latest version of project built using visual studio 2005, , have visual studio 2010. of course have convert on "local" folder, source folder "sees" have made change. tried undo pending changes, solution in source control still shows vs2010 icon. did not change solution else vs2010 when didn't commit changes. is there way out changes? no problem yeah getting used tfs vss, subversion or other tool can tricky. mapping allows to, guessed, map sourced folder local folder. "so every local change make "automatically" gets added source control???" it doesn't work quite that. tfs control files have explicitly added source control. so, instance, if add 50 files inside of folder have mapped...

flash - how to load interactive .swf in mobile flex application? -

i have mobile application attempting use load interactive .swf file. @ first, going use .mxml applications other project file in flex, they're desktop apps , running on flex 3.6, , mobile apps can't built on less 4.5 :p so, figured i'd export first project .swf, , load in mobile application, nothing show up. know solution? here's code: <?xml version="1.0" encoding="utf-8"?> <s:view xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="task graphic novels"> <fx:declarations> <!-- place non-visual elements (e.g., services, value objects) here --> </fx:declarations> <s:swfloader width="100%" height="100%" loadforcompatibility="true" id="bookloader" enabled="false"/> <fx:script> <![cdata[ import ...

How to best inspect and transform every cell in a sql server table when copying it to another database? -

i have series of tables have move database. in process of moving them, need inspect every cell , if has specific value, null cell. i have table containing meta data attributes point each cell, , list of bad values must removed original tables. for example have following table table1 columna | columnb | columnc | 7 | 10 | dk | 83 | -7 | | 16 | 0 | true | then meta table has tablename | column | bad value 1 | bad value 2 | table1 |columnc | dk | bol | table1 |columna | -99 | -1 | table1 |columnb | -1 | -7 | in copied , transformed table1 have table1 columna | columnb | columnc | 7 | 10 | null | 83 | null | | 16 | 0 | true | i want understand going best way this. have considered writing function gets called each cell. passed meta information needed lookup cell in meta "bad values" table, , cur...

sql - MySql count occurences of failure codes -

i trying count number of times happened failure status in database , retrieve name of failure. have table builds holds failurearea , table called failureareas has names of failurearea codes. want able count these can graph out data , tell our devs how builds commonly fail. this trying, isn't working: select count(b.id), f.name builds b join failureareas f on b.failurearea = f.id date(b.submittime) >= date_sub(curdate(), interval 30 day) , b.buildstatus != 2 any great. thanks. you need use group by: select count(b.id), f.name builds b join failureareas f on b.failurearea = f.id date(b.submittime) >= date_sub(curdate(), interval 30 day) , b.buildstatus != 2 group f.name

ruby - How to configure god/redis for two environments? -

i want use god monitor redis server . problem in different locations locally , on server. tried doing causes god fail. %w{6379}.each |port| god.watch |w| w.name = "redis" w.interval = 30.seconds if rails_env == 'development' w.start = "/usr/local/bin/redis-server /usr/local/bin" w.stop = "/usr/local/bin/redis-cli -p 6379 shutdown" else # in production w.start = "/usr/local/etc/redis-server /usr/local/etc" w.stop = "/usr/local/etc/redis-cli -p 6379 shutdown" end end end use if env["rails_env"] == 'development' and call script using rails_env=development sudo god ... in dev environment. and in production: sudo god ...

Hide a column in display(view form) in Sharepoint 2007 using JQUERY -

i trying hide column in sharepoint 2007 using jquery. code working hide columns <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"> </script> <script type="text/javascript"> columnstohide = new array(); columnstohide[0]='first name'; columnstohide[1]='last name'; $(document).ready(function() { (var i=0; < columnstohide.length;i++) { querystring='nobr:contains("' + columnstohide[i] + '")'; $(querystring).hide().parents('tr:first').hide(); } }); </script> i tried hide column using various code 1 $('nobr:contains("first name")').closest('tr').hide(); 2 $(":input[title='first name']").parent().parent().hide() ; 3 $("#ms-formbody").hide(); 4 $('input[title=first name]').parent().parent().parent().hide(); by using above ways couldn't able hide columns. guide me through since...

sql - If I insert rows or update values in an existing row, are those indexes for the updated columns updates at that time? -

or need update them specifically. situation this: have table 1.5 million rows , 90 columns. have done massive amount of cleanup on data , need know if should rebuild indexes or if rebuilt during update , insert operation on table. there up-to-date. when update or insert (or delete) completes, constraints have been checked, indexes updated , triggers have run ok too. includes indexed views on tables. this consistency in acid : statistics not updated until needed (which query compile time) irrelevant

python - Updating a TKinter GUI from a multiprocessing calculation -

i'm creating gui python simulator. gui provides tools set simulation , run it. while simulation running want pass progress information gui , have displayed on label in simulation_frame . because simulations need run multiprocessing, i'm using queue pass updated information gui . the way have set up, running simulations blocks tk mainloop since need able close pool @ end of call. i'm calling update_idletasks() force gui update progress information. this seems me inelegant , potentially risky solution. moreover, while works in ubuntu , not seem work in windows xp --the window goes blank after second or of running. may able make work in windows calling update() rather update_idletasks() , seems worse me. is there better solution? the relevant code: sims = [] queues = [] svars = [] names = [] = 0 manager = mp.manager() config in self.configs: name, file, num = config.get() j = 0 _ in range(num): #progress monitor label q = ma...

jquery - passing javascript to a javascript function -

i pass function javascript executed when user presses 1 of buttons, when press "no" or "yes" buttons on dialog box nothing happens, sits there...no error shows in firebug. if hard code "alert('hi')" dialog button works fine, there must in passing javascript part of function parameters. how can work? in advance. heres javascript function: function confirm_yes_no(xtitle,msg, btn_yes_txt, btn_no_txt, btn_yes_js, btn_no_js) { var button_yes = btn_yes_txt; var button_no = btn_no_txt; var dialog_buttons = {}; dialog_buttons[button_yes] = function(){ btn_yes_js } dialog_buttons[button_no] = function(){ btn_no_js } $("#modal_confirm_yes_no").html(msg); $("#modal_confirm_yes_no").dialog({ title: xtitle, bgiframe: true, autoopen: false, height: 150, width: 300, modal: true, buttons: dia...

Connecting to socket with authentication in python -

i'm trying connect mongodb instance through python socket. url looks this username:password@host.com:port how can connect python socket? the following code gives me error: [errno -5] no address associated hostname import socket import tornado full_url = '%s:%s@%s' % (username, password, host) s = socket.socket() s.connect((full_url, port)) stream = iostream.iostream(s) edit - reason ask because asyncmongo doesn't support type of url right now. i'm trying see if can write patch. asyncmongo library connects using socket 1 in code above. you should use driver connect mongodb. if using tornado (it looks intend so), try asyncmongo ; if using threaded web server/application framework (django, pylons, etc) can use pymongo directly. edit: why code doesn't work, socket module doesn't accept urls connection, hostname , port. low-level library. connect (web) urls, consider using urllib2 or httplib . edit 2: authentication in mongodb...

Python Imaging Library (PIL) in virtualenv on windows -

i've got python program using ridiculous amount of extensions, i'm trying set virtualenv it. however, 1 of libraries uses pil. after installing it, import error on pil. this problem has been identified @ link below, solution there not work me (possibly because i'm using windows? don't know.) the problem installing pil using virtualenv or buildout i used easy_install on repackaged package in fresh virtualenv, no luck. have ideas might causing this, or diagnose problem? the issue whether importing pil.image or image. virtualenv used image, whereas python installation used pil.image.

C++ to Java conversion question about extern "C" -

i have convert c/c++ code java. c++ extremely rusty. in .h file, have following: #ifdef __cplusplus extern "c" { #endif /* tons of declarations */ #ifdef __cplusplus } /* extern c */ #endif what use of extern "c" ? mean? telling compiler corresponding code should interpreted pure c, rather c++? edit thanks answers far. history of code have convert seems part written in c first, rest written in c++. header file seems correspond 'old' c code. i'll convert code public final class static method , attributes. no overriding. it's telling compiler function signatures should c compatible. name mangling different in c , c++ (i.e. c++ supports method overloading while c not) in order make function calls (i.e. dll dynamic calls) compatible c signature, use extern c in c++ code. take @ stackoverflow question great explanation on topic .

jquery - ajax file upload -

i struggling file uploaded, processed , displayed without reloading page. use jquery file posted server properly? <html> <body> <form action="upload.php" method="post" enctype="multipart/form-data" id="uploadform"> <label for="file">filename:</label> <input type="file" name="file" id="file" /> <br /> <input type="submit" id="submit" /> </form> </body> </html> you can putting upload form in iframe , communicating between main window , frame javascript. it's ugly it's way in browsers. jquery file upload awesome plugin incorporates async xhr uploads , falls on iframe browsers not capable. supports drag , drop (for capable browsers) out of box. it's not simplest plug-in in world use, worth effort, covers bases.

android - One element fill the whole screen after another gets Invisible? -

how make textview fill whole screen after button gets invisible? <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <linearlayout android:layout_width="wrap_content" android:layout_height="fill_parent" > <textview android:layout_width="wrap_content" android:layout_height="wrap_content" /> </linearlayout> <linearlayout android:layout_width="wrap_content" android:layout_height="fill_parent" > <button android:layout_width="wrap_content" android:layout_height="wrap_content" /> </linearlayout> </linearlayo...

Decimals and commas when entering a number into a Ruby on Rails form -

what's best ruby/rails way allow users use decimals or commas when entering number form? in other words, user able enter 2,000.99 , not 2.00 in database. is there best practice this? -- update --- does gsub work floats or bigintegers? or rails automatically cut number off @ , when entering floats or ints form? tried using self.price.gsub(",", "") "undefined method `gsub' 8:fixnum" 8 whatever number entered in form. i had similar problem trying use localized content inside forms. localizing output relatively simple using actionview::helpers::numberhelper built-in methods, parsing localized input not supported activerecord . this solution, please, tell me if i'm doing wrong. seems me simple right solution. thanks! :) first of all, let's add method string . class string def to_delocalized_decimal delimiter = i18n::t('number.format.delimiter') separator = i18n::t('number.format.separator') ...

php - Handling hundreds of simultaneous requests in rails -

i writing ruby on rails application , 1 of important featuers of website live voting. expect 10k voting requests in little 1 minutes. along other requests means getting ton of requests. my initial idea set server use apache + phusion, however, voting i'm thinking writing php script on side , write/read information in memcached. data needs persist 15 minutes, writing database 10,000 times in 1 minute seems pointless. need mark ip of user don't vote twice being complicated in memcached. if has suggestions or ideas make work best possible, please help. if you're architecting app kind of massive influx, you're going need strip down essential components of absolute minimum. using full rails stack kind of intensity isn't practical, nor necessary. better build thin rack layer handles voting making direct db calls, skipping orm, being wrapper around insert statement. sinatra , sequel, serves efficient query generator, might with. you should sure tune d...

c# - Object reference not set to an instance of an object -

this question has answer here: what nullreferenceexception, , how fix it? 29 answers i had working yesterday must of changed listactivelogins.activelogins null, did do? public partial class form1 : form { public form1() { initializecomponent(); new listlogin(2); console.writeline(listlogin.loginlist.length); console.writeline(listlogin.loginc); new listactivelogins(2); console.writeline(listactivelogins.activelogins.length); } } public class listlogin { public static int loginc; public static string[,] loginlist; public listlogin(int logincount) { loginlist = new string[logincount, 3]; loginc = logincount; } public int logincount { { return loginc; } } public string this[int row, int col] { { return loginlist[row, ...

data structures - picking without replacement in java -

i often* find myself in need of data structure has following properties: can initialized array of n objects in o(n). one can obtain random element in o(1), after operation picked element removed structure. (without replacement) one can undo p 'picking without replacement' operations in o(p) one can remove specific object (eg id) structure in o(log(n)) one can obtain array of objects in structure in o(n). the complexity (or possibility) of other actions (eg insert) not matter. besides complexity should efficient small numbers of n. can give me guidelines on implementing such structure? implemented structure having above properties, except picking of element takes o(d) d number of past picks (since explicitly check whether 'not yet picked'). can figure out structures allowing picking in o(1), these have higher complexities on @ least 1 of other operations. btw: note o(1) above implies complexity independent #earlier picked elements ...

css - Background image that repeats to a dynamic length with a fixed footer image -

how go creating background has, header, body , footer? header , footer wouldn't need repeat down page, horizontally, middle body section depend on how big main content div is, needs repeat vertically i'm unsure of how footer @ end. thanks in advance. =) you're either going have use multiple background images (css3, no pre-ie9 support) or break @ least 2 block level elements each apply own background image - long image repeat horizontally (has longer possible anticipated content grow content vertically).

Is there any general purpose perl module with helpers for web applications? -

is there general purpose perl module helpers web development? form-builders, url helper, etc? based on searches, couldn't find anything. i'm using mason, not want define helpers components scratch. your question open-ended , sounds want eat framework , have it. still, here starting points. form helpers in approximately order of preference: html::formhandler html::formfu rose::html::objects cgi::formbuilder (i think abandoned) url helpers uri uri::queryparam uri::escape path::class mojolicious has discrete pieces might worth looking @ too. if don't use framework, should @ them , choices make plugins , helpers.

iphone - Ios app icon class -

is there ui class corresponds app icons on home screen? or kind of button similar , has method wobble effect? short answer, no. it's developer recreate these effects using sdk. it's simple enough make custom uibutton image (app icon). it's matter of adding in appropriate long press gesture handling activate editable status of button , start wiggling. -(void)viewdidload { // make uibutton uibutton *mywigglebutton = [uibutton buttonwithtype:uibuttontypecustom]; // set image button [mywigglebutton setimage:[uiimage imagenamed:@"my_app_image.png"] forstate:uicontrolstatenormal]; // add action , target button [mywigglebutton addtarget:self action:@selector(mybuttontapped:) forcontrolevents:uicontroleventtouchupinside]; // add long touch gesture recognizer uilongpressgesturerecognizer *longpressgesture = [[[uilongpressgesturerecognizer alloc] initwithtarget:self action:@selector(startwiggle...

php - Social Network CMS with complex user management -

i'm looking open source cms/framework allows me build complex social networking website. the complexity of website build cater more towards user management. these breakdown, user registration profile management (add details bio, sports, etc) find , add user friend data management (which allow other user view data choose publish) user permission user able choose whether sort of information put out public a wall system facebook allow user post "messages" internal messaging system among members probably payment management user can pay, renew or cancel recurring payment i have read through of post in stackoverflow , have found out recommendation buddypress, joomsocial. wondering there more towards mvc can more customization of own? i have did research on yii framework, however, need plugins/framework have functionality ready made. have checked out drupal? http://drupal.org/ has ton of premade 'modules' can customize pretty easily. ...

c# - HtmlAgilityPACK showing Error " The given path's format is not supported" when loading html page from web server -

i using local apache server , address 127.0.0.1 . , trying load html page server c# programme using html agility pack showing error : given path's format not supported. htmlagilitypack.htmldocument dochtml = new htmlagilitypack.htmldocument(); dochtml.load(@"htttp://127.0.0.1/2.htm"); // <--- error pointer showing here foreach(htmlnode link in dochtml.documentnode.selectnodes("//a[@href]")) { link.attributes.append("class","personal_info"); } dochtml.save("testhtml.html"); } thank @slaks after suggesion changed code , working fine htmlagilitypack.htmldocument dochtml = new htmlagilitypack.htmldocument(); htmlagilitypack.htmlweb dochfile = new htmlweb(); dochtml = dochfile.load("http://127.0.0.1/2.html"); doc.load takes path local file on disk. you should use htmlweb class: htmldocument dochtml = new htmlweb(...

c# - Disabling transparency in Winforms -

Image
i working on application themeable, impossible me pick color guaranteed not exist. unfortunately, can't find option disable transparency key on form. if set transparency key transparent, have issue shown below: would form.allowtransparency job?

objective c - Pointer to a property in singleton -

nsmutabledictionary *searchfilters = [globaldata instance].searchfilters; if([searchfilters count] == 0) { nslog(@"no more keys, destroy global filters"); [globaldata instance].searchfilters = nil; // okay // searchfilters = nil; <-- not okay } hi guys, can me understand better pointers in objective c? shown above, have dictionary property stored in singleton called 'globaldata', using pointer *searchfilters can point dictionary , read values correctly, but, if want modify value, code 'searchfilters = nil' not modify value in global singleton @ all. i need shortcut [globaldata instance].searchfilters not need retype "[globaldata instance].searchfilters" each time... pointer, pointer pointer, watever, want know there wat address property in singleton faster. your pointer searchfilters pointing same location [globaldata instance].searchfilters, it's not same pointer, created alias. so searchfilters = nil assignin...

objective c - typedef enum scope in xcode projects -

so, current understanding of enum can use make constants correspond numbers. so, typedef enum { number0 = 0, number1 = 1, . . . } numbers; would allow me refer 0 number0 in every part of code. seems work fine. however, i'm having trouble figuring out how use in xcode project. example, write 1 class, numbercounter , , include code in header file. then, write class, numbercalculator . if want use same definitions in second class, have a) write classes in same source file, or b) include above code in every file want use numbers? if include code in 1 class, , exclude in second, (when trying have function return of type numbers ) parse issue expected type error, if include code in both, gives error 'redefinition of enumerator'. currently, workaround include code in every file, use preprocessor make sure executed once - i.e: #ifndef numberdef #define numberdef typedef enum { number0 = 0, number1 = 1, . . . } numbers; #endif ...

jquery - How to break the html in append()? -

any trick can use break html in append() ? for instance, great! // append popup displaying security checking form. $(document.body).append(" <div id='popup-result' class='popup-outer'> <div class='popup-inner'> <div class='close'><a href='#' class='button-close'>x close</a></div> <div class='respond-message'></div> <div class='form-confirm'></div> </div> </div>"); so don't have html in 1 line - it's difficult read , debug! you have 2 options. can use new line literal syntax: // append popup displaying security checking form. $(document.body).append("\ <div id='popup-result' class='popup-outer'>\ <div class='popup-inner'>\ <div class='close'><a href='#' class='button-close'>x close</a></div>\ <div class=...

Visual FoxPro driver for 64 bit Windows 7 -

i've installed visual foxpro driver link on 64 bit windows 7 home premium os , tried register vfpoledb.dll using regsvr32. able register dll when run application accesses vfp database throwing following error: system.invalidoperationexception: 'vfpoledb.1' provider not registered on local machine. the same application working fine in 32 bit windows 7 home premium os without issues. have googled 64 bit vfp driver , found out there no vfp drivers 64 bit os link . kindly me resolve issue. i have found out there no 64 bit vfp driver 64 bit os. have change build option in project properties , set platform target x86 instead of cpu. build application x86. please refer this more details.

validate user name and password from existing data base when click login button android -

dear have 2 buttons in main view "signup" , "login" when click signup next view loaded 2 text box field "user name" , "password" , submitt button when click on button sending data data base , return main activity using finish () in on buttonclick() event. when click on login button opens next view user name , password when fill , click submitt button force close ..i use validate() method in content provider database...so not able find bug pls see code , me pls...thanks in adv.and 1 question how check wheather data inserted in database or not ... my content provider class is public class mycontentprovider extends contentprovider { private sqlitedatabase sqldb; public databasehelper dbhelper; private static final string database_name = "users.db"; private static final int database_version = 1; private static final string table_name = "user"; private static final string tag = "mycontentprovider"; pub...

asp.net - Jquery issue with IE 9 -

i'm getting following error when i'm trying implement drag , drop functionality in ie 9 browser.it works fine in google crome , fire fox microsoft jscript runtime error:unable value of property 'prototype'.object null or undefined error occurs @ ui.mouse.js 1 know solution? jquery-ui-1.8.14.custom.min.js , jquery-1.5.1.min.js version solved issue.

Configuring Aptana FTP -

i wanted configure aptana show files need upload still. there option in aptana? make changes files locally , test them. forget ftp them server. aptana smart enough show that. know would, if server svn repo plugins installed. if server not svn or cvs repo? can me this? thanks, murali. there no direct decoration or sign on files themselves, in aptana studio 3, set connection between local project , ftp server , use deploy > deploy app generate smart sync dialog shows files changed between 2 end points.

asp.net mvc - Static Content on Development and Production Envoirnment -

i using asp.net mvc 2 build web application. question regarding static content. in production, static content residing @ sub domain http://static.jobsora.com/content/css/ . while, in development residing @ default location of ../content/css/. example: for production: <link rel="stylesheet" type="text/css" href="http://static.jobsora.com/content/css/search-min.css" /> for development: <link rel="stylesheet" type="text/css" href="<%= url.content("~/content/css/search-min.css") %>" /> i know change of codebase production not @ approach. so, looking better approach. think can trick down absolute url, how? no idea! thanks. consider programmably adding links page adding link elements head. can done code-behind, , work around way using: #if debug #else #endif or other construct. hth.

xml - SOAP Request not working -

i'm consuming sap pi web service , reason it's not working. i'm thinking due incorrect soap xml below: this sap pi expecting: <?xml version="1.0" encoding="utf-8"?> <ns0:a_request xmlns:ns0="http://domain.co.au/abc"> <root> <element1>a</element1> <element1>a</element1> </recordset> </ns0:a_request> this i'm sending: <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <a_request xmlns="http://domain.co.au/abc" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <root> <element1>a</element1> <element1>a</element1> </recordset> </a_request> is there way (programatically or config) can done on client side in order form...

php - Verify Files in a folder -

i want verify files stored in directory, wrote script. <?php $files = scandir('..'); ($i=0;$i<count($files);$i++) { $file2 = realpath($files[$i]); if (!is_dir($file2)) $hash = sha1_file($file2); else $hash = 'dir'; echo '<tr><td>'.$i.'</td><td>'.$file2.'</td><td>'.$hash.'</td><td>'.date ("f d y h:i:s.",filemtime($file2)).'</td></tr>'; $i; } ?> it works nice, if include script deeper directory fails. -www |_sou |_inner |_moreinner my script located in inner folder , want access moreinner folder using include shows error file not found/ permission denied what want sha1_file of files stored in above directory. using recurisvedirectoryiterator elegant way: $it = new recursivedirectoryiterator('..', filesystemiterator::current_as_fileinfo | filesystemiterator::skip_dots); foreach (new recursiveiteratori...

html - IE7 does not understand display: inline-block -

can please me head around bug? firefox working fine internet explorer 7 not. seems not understand display: inline-block; . html: <div class="frame-header"> <h2>...</h2> </div> css: .frame-header { height:25px; display:inline-block; } the ie7 display: inline-block; hack follows: display: inline-block; *display: inline; zoom: 1; by default, ie7 supports inline-block on naturally inline elements ( quirksmode compatibility table ), need hack other elements. zoom: 1 there trigger haslayout behaviour, , use star property hack setting display inline in ie7 , lower (newer browsers won't apply that). haslayout , inline trigger inline-block behaviour in ie7, happy. this css not validate, , can make stylesheet messed anyways, using ie7-only stylesheet through conditional comments idea. <!–-[if ie 7]> <link rel="stylesheet" href="ie7.css" type="text/css" /> <...

javascript - Disable right click on browser's back and forward button -

is there way disable right click , forward button of browser using javascript or silverlight? don't want users access list of histories shown via context menu when right click on buttons. want user able left click on , forward button navigate. as per pekka's answer. suggestion make open application/page/whatever in new window, using javascript window.open method, , specify parameters of new window address bar etc hidden.

Ckeditor - How do I "save" to the web page I am editing? -

php version 5.3.3-1 ubuntu 10.10 apache 2.2 ckeditor 3.6.1 i can edit , save web page editing not update ? edited text appears in new window. want web page editing updated. ckeditor.js , test.html , posteddata.php in same directory /var/www/ test.html < head> < title>test page < /title > < meta http-equiv="content-type" content="text/html; charset=utf-8"/ > < script type="text/javascript" src="ckeditor.js">< /script > < /head > < body > < form action="posteddata.php" method="post" > < textarea id="editor1" name="editor1" > &lt;p&gt;your text goes here&lt;/p&gt; < /textarea> < script type="text/javascript" > window.onload = function() {ckeditor.replace( 'editor1' );}; < /script> < input type="submit" value="submit"/ > < /form> < /body> ...

OpenX has been installed, but no configuration file was found -

i installed openx in server, i've created campaign , banner campaign , linked campaign zone. took javascript invocation code, banner not coming. took iframe tage, , getting error openx has been installed, no configuration file found please me in this have tried go configuration area using administrator account? do have file under dir /var on openx installation .conf.php extension?

I am getting the problem while deploying the sharepoint 2010 Site Definition(List Def,List instance,Fields -

error occurred in deployment step 'activate features': cannot complete action. how solvee issue.exactly while actiating list instance feature getting above error. are using columns in list, if columns looking list , if list has not been created far problem happen.

android - How do i draw a semitransparent white line? -

i have hexcode #70ffffff color , canvas.drawline() , paint has color set hex. p = new paint(); p.setcolor(r.color.transparentwhite); p.setstrokewidth(15); canvas.drawline(a.getcenterx(), a.getcentery(), a.getprevious().getcenterx(), a.getprevious().getcentery(), p); please try this.. p.setcolor(color.parsecolor("#70ffffff")); instead of p.setcolor(r.color.transparentwhite);

Employee Manager Report - Sql Server -

i have below table empid empname managerid 1 null 2 b 1 3 c 1 4 d 2 the ddl under declare @t table(empid int, empname varchar(20), managerid int) insert @t select 1,'a',null union select 2,'b',1 union select 3,'c',1 union select 4,'d',2 what have prepare report indicate employees report manager. i have soved using select empname = e.empname, managername = m.empname @t e left join @t m on e.managerid = m.empid and desired output being empname managername null b c d b what other ways of doing so? declare @t table(empid int, empname varchar(20), managerid int) insert @t select 1,'a',null union select 2,'b',1 union select 3,'c',1 union select 4,'d',2 ;with cte ( select empid,empname,managerid, cast(empname varchar(max)) reportingmanager @t managerid n...

python - Help with validation in Models and Forms -

i have few questions validation in models , forms. me out these: where should validation done? should in model or form? right way go have validators in form , constraints in mode? what difference between writing 'clean_' method in form , writing validator? i've seen people put validation checks in 'clean_' method. in request i'm handling, have param in url string called 'alive'. 1 or 0. correct way of defining in form? need validate number , can 1 or 0. right way? alive = models.integerfield(null=false, max_value=1, min_value=0) how define default value field i.e. if parameter isn't passed, default 0 (false). i don't have form on client side. i'm using django form validate js post request. in 1 of model fields need store screen resolution in format 1234x4321. should declare charfield add regular expression validation in both model , form? examples of regular expression validations helpful. thanks. the ...