Posts

Showing posts from January, 2010

c# - Log4Net, Cannot use multiple RollingFileAppenders at a time -

i have strange problem. i'm trying create multiple rolling file appenders referencing same file, using 1 of theese appenders @ time. the matter is, if declare appender this: <appender name="app1" type="log4net.appender.rollingfileappender"> <file value="c:\log.txt" /> <layout type="log4net.layout.patternlayout,log4net"> <conversionpattern value="%date [%thread] %-5level %logger [%ndc] - message%newline" /> </layout> </appender> <logger name="app1" additivity="false"> <level value="debug" /> <appender-ref ref="app1" /> </logger> <appender name="app2" type="log4net.appender.rollingfileappender"> <file value="c:\log.txt" /> <layout type="log4net.layout.patternlayout,log4net"> <conversionpattern value="%date [%thread] %-5level %logger [%ndc] -...

php - unable to receive form info -

i creating email form using dreamweaver , wrote codes in php gather form info , send email. works fine have big problem. in fact want user right-to-left language persian or arabic form. when fill in form english words, in email receive stuff when type in if arabic, receive ناÙ… خانوادگÛŒ in email: here comes php code: <?php $_post['emailaddress'] = "info@behzadmoradi.com"; $to = "info@behzadmoradi.com"; $subject = "نظر در مورد سکان آکادمی"; $message .= "نام ".$_post['name'] . "\n"; $message .= "نام خانوادگی ".$_post['lastname'] . "\n"; $message .= "آدرس ایمیل ".$_post['email'] ."\n"; $message .= "نوع درخواست ".$_post['request'] . "\n"; $message .= "متن درخواست ".$_post['requesttext'] . "\n"; mail($to, $subject, $body, $message); header ( "location: commentthankyoupage.php "); ?...

c# - How to Programmatically switch between two screens -

i have program in c# uses 2 screens displayin few windows. there (simple) way switch between screens have content of 1 screen on other , vice versa? i've tried win32api option didn't find helpfull.... b.t.w i'm using windows xp. thanks, yossi.

Qt Creator / C++ - Bug that prevents use of pointers and auto-completion -

i'm having serious issue qt creator. can no longer use pointers other classes , autocompletion doesn't work in primary class. feels has become corrupt, code working few pointers existing, @ once none of them worked , errored out. line 21: inkpuppet *pointertopuppet; errors: x:\development\inkpuppet\newdialog.h:21: error: c2143: syntax error : missing ';' before '*' , x:\development\inkpuppet\newdialog.h:21: error: c4430: missing type specifier - int assumed. note: c++ not support default-int here .pro file: qt += core gui greaterthan(qt_major_version, 4): qt += widgets target = inkpuppet template = app sources += main.cpp\ inkpuppet.cpp \ aboutdialog.cpp \ inkspot.cpp \ newdialog.cpp headers += inkpuppet.h \ aboutdialog.h \ inkspot.h \ newdialog.h forms += inkpuppet.ui \ aboutdialog.ui \ newdialog.ui other_files += \ inkpuppet.pro.user resources += \ resources.qrc here default header...

How to combine 2 php array in different format -

i have 2 arrays - $a = (1,3,5,7,9); $b = (2,4,6,8,10); how can combine these arrays result like: $c = (1,2,3,4,5,6,7,8,9,10); assuming can't sort values after merging because have no natural order, here's i-know-php-tricks way: $c = call_user_func_array('array_merge', array_map(null, $a, $b)); and here's boring, sane way: $c = array(); foreach ($a $i => $value) { $c[] = $value; $c[] = $b[$i]; }

javascript - GetElementById how to get value of tabindex C# -

i'm trying choose 1 of country code in webbrowser windows form geting id code: webbrowser1.document.getelementbyid("ulcountrymenu_alt").setattribute("value", "uk"); it's not changing in webbrowser, or should use getelementbytagname? <div id="ulcountrymenu_alt"> <ul class="scroll-widget-scrollable scroll-widget-ulcountrymenu"> <li tabindex="109" data-attr-val="+93" data-attr-country-code="af"><a href="#" aria-label="afghanistacn"><span class="famfamfam-flag-af"></span>&nbsp;afghanistan (+93)</a></li><li tabindex="109" data-attr-val="+355" data-attr-country-code="al"><a href="#" aria-label="albania"><span class="famfamfam-flag-al"></span>&nbsp;albania (+355)</a></li><li tabindex=...

visual studio 2012 - Avoiding CA2122 from Code Analysis in VS2012 with SecuritySafeCritical fails -

i have here c++/cli solution isn't mixed native c++ (although have type too). consists of 3 projects, 2 relevant question. the first 1 static library (.lib) , deals acitve diretytory matters. second 1 executable main project (.exe) depends on other projects. i'm new visual studio 2012 , want use advantages of tools code analysis. running code analysis on solution reveals several ca2122 warnings: ca2122 not indirectly expose methods link demands i understand security concerns related warning , think understood how deal it, although i'm new security stuff. warnings related active directory code when whole solution examined, while examining lib-project not appear , seems ok. now core of problem: i tried mark methods i'm warned securitysafecritical attribute --> no changes, same warnings i've solved warning in project marking whole assembly securitycritical , adding securitysafecritical problematic method. not work since adding assemblyinfo...

MySQL Database - Table to share contents between users -

i wanted know 1 think it's best solution situation. i've got application in items can shared. these items, however, can of different types: photos, posts, "groups of posts", , on, there's table called 'posts', called 'media', etc. the users will able see items shared them , created . so, think it's better?: make table called 'shared_items' in i'd put item_id , user_id , item_type . make table each type of item (for example: shared_posts , shared_media , etc.), same structure above explained (but without item_type ). more solutions accepted , of course, these ones coming mind right now. if need database structure sample tell, think it's not necessary. thanks time! it depends on how going query data , how often. if need of shared items in 1 query, single table preferable. rid table joins. database normalization keep flies separately, soup separately , go shared media, shared posts, shared tables.

excel - Sum quarter data according to months completed -

i need sum quarter data kept in column c2 w2 . in cell w1 number of months passed, current purpose 7. sum in cell w2 . 7 months have passed, hence need sum c2 , d2 , 1/3* e2 , show value in w2 . e2 multiplied 1/3 because 7th month 1/3rd of 3rd quarter. quarters financial quaters, doesn't start fy start. hope clear. if point me in right direction appreciated. try formula c2 =if(w$1<3,0,sum(c2:index(c2:w2,w$1/3)))+index(c2:w2,w$1/3+1)*mod(w$1,3)/3 that calculates how many whole quarters need included, partial ones. if function deals small c1 values

android - How to check specific features through code? -

here <uses-feature> , <uses-permission> specified in manifest file android application <uses-feature android:name="android.hardware.telephony" android:required="false" /> <uses-feature android:name="android.hardware.location" android:required="false" /> <uses-permission android:name="android.permission.call_phone" /> <uses-permission android:name="android.permission.read_contacts" /> <uses-permission android:name="android.permission.read_phone_state" /> <uses-permission android:name="android.permission.process_outgoing_calls" /> <uses-permission android:name="android.permission.modify_phone_state" /> <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_wifi_state" /> <...

bash - ftp appends ^M to .Z file -

i doing ftp in binary mode , downloading compressed_file.z compressed_file.z^m , when using dos2unix creates new file ^m removed still when try uncompress it, error saying corrupt input or its not recognized tar file etc. if paste in windows machine using filezila, able open 7z. have used sed 's/^m$//' compressed_file.dmp.z^m>compressed_file.dmp.z still corrupt file. has faced similar issue? it's it's filenames contains ^m @ end. rename them with: for in *.z$'\x0d'; mv -i "$a" "${a%?}" # remove -i skip confirmation done

Trouble converting php array to json format slightly wrong -

i'm having trouble getting correct json format following php array array ( [0] => array ( [name] => name1 [data] => array ( [0] => array ( [5] => 2013-15-6,9 [6] => 2013-15-7,9 [7] => 2013-15-8,9 [8] => 2013-15-9,9 [9] => 2013-15-10,9 [10] => 2013-15-11,9 [11] => 2013-15-12,9 ) ) ) ) encoding json outputs [ { "name": "name1", "data": [ { "5": "2013-15-6,9", "6": "2013-15-7,9", "7": "2013-15-8,9", "8": "201...

xml - LINQPad throws System.OutOfMemoryException -

i've got simplest query ever in linqpad: var xml = xelement.load(@"c:\\users\\myth\sample.xml"); var query = e in xml.elements() select e; query.dump(); the problem gives me system.outofmemoryexception. xml file around 120mb. i've read here linqpad has limitation of returning 10000 rows. so, i've tried putting var query = (from e in xml.elements() select e).take(100); query.dump(); yet gave me same error. linqpad version: v4.45.05 figured out myself. when dealing huge xml files (>100mb) or other massive queries whatsoever, need have x64 build installed.

android - AsyncTask progress dialog not appearing in some fragments -

i have fragments of them uses simple asynctasks same , derived same base task. in of them see progress dialog circle spinnin while executed in 1 doesn't appear despite fact task correctly executed. why? i'm using default setting overriding doinbackground , onpostexecute. could cause layouts(but in case similar? this code of asynctask causing problem(both tasks , without progress dialog child of same task class) /** * asynctask che richiede dati al server * @author pc * */ class murotask extends getdatatask { jsonobject jobject; serverinterface server = new serverinterface(); @override protected boolean doinbackground(string... params) { try { jobject = server.runscriptobject(script_name, null); } catch (ioexception e) { e.printstacktrace(); return false; } return true; } @override protected void onpostexecute(final boolean success) { ...

jquery - How i do autoexpand input, not textarea? -

like http://www.jacklmoore.com/autosize/ not textarea, input. it's didn't work input.for example: <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script> <script src='jss/jquery.autosize.js'></script> <script> $(function () { $('.normal').autosize(); }); </script> <body> <textarea class='normal'></textarea> </body> i need- input of fixed width, height changes <input class='normal'/> help pls you can use contenteditable div: <div contenteditable="true" class="normal"></div> .normal { width: 150px; min-height: 16px; overflow: hidden; padding: 3px 3px 2px; border: 1px solid #aaa; border-radius: 2px; font-size: 11px; font-family: helvetica,arial; } jsfiddle: http://jsfiddle.net/z4ex6/...

oracle - fetching multiple data with sql query -

i have header , line detail table. such as; header table: transactions line detail table: transactions_line_detail in transactions table: sq_transaction_id, ch_transaction_name,.. columns included. in transactions_line_detail table: sq_transaction_line_detail_id, rf_transaction_id, ch_line_code,.. columns included. transactions_line_detail table keeps 1 or more detail line each transactions kept on transactions table. so problem is; i wanna write query fetches me transactions has x,y , z line codes together. (ch_line_code). i wrote this; select distinct tr.rf_transaction_id transactions_line_detail tr tr.ch_line_code in ('x','y','z') but code return me transcations hasn't got ''y' or 'x' or 'z'. mean want line codes included in transaciton. i want query fetches me transactions has x, y, z or a, b, c, x, y, z or x, y, z, p but not x or x, y or z, y, a,...

c++ - QGraphicsObject doesn't display QPixmap -

i'm developing simple application on win7 , running on win8. when run on win7 shows pixmap drawn qgraphicsobject subclass. when copy exe , dll's tablet doesn't show pixmap else same. another problem when quit application says unexpectedly closed. here related parts myimage::myimage(qgraphicsobject *parent) : qgraphicsobject(parent) { pxm = new qpixmap("://images/flower.jpg"); setscale(0.5); } qrectf myimage::boundingrect() const { qrectf rect(0,0,pxm->width(),pxm->height()); return rect; } void myimage::paint( qpainter* painter, const qstyleoptiongraphicsitem* /*option*/, qwidget* /*widget*/ ) { painter->drawpixmap( 0, 0, pxm->width(), pxm->height(), *pxm ); } and here main function int main(int argc, char *argv[]) { qapplication app(argc, argv); qgraphicsscene scene; myimage img; scene.additem(&img); qgraphicsview view(&scene); qwidget...

c# - How to Repeat Header in Datalist when Repeating Colums=2 -

my requirement display datalist below header1 header2 header1 header2 1 value 1 3 value 3 2 value 2 4 value 4 but i'm unable repeat header section of data list. complete code stuff datalist <asp:datalist id="datalstprofilecount" runat="server" repeatcolumns="2" repeatdirection="horizontal" repeatlayout="table" showheader="true" onitemdatabound="datalstprofilecount_itemdatabound"> <headertemplate> <table border="0" cellpadding="0" cellspacing="0" bordercolor="#e1e1e0" style="border: solid 1px #e1e1e0; font-family: segoe ui; font-size: 12px; font-weight: bold; width: 400px"> ...

Android AsyncTask getting error -

i little new connecting internet apps got error, , codes down here. 08-28 14:43:29.705: e/androidruntime(17341): fatal exception: asynctask #1 08-28 14:43:29.705: e/androidruntime(17341): java.lang.runtimeexception: error occured while executing doinbackground() 08-28 14:43:29.705: e/androidruntime(17341): @ android.os.asynctask$3.done(asynctask.java:200) 08-28 14:43:29.705: e/androidruntime(17341): @ java.util.concurrent.futuretask$sync.innersetexception(futuretask.java:274) 08-28 14:43:29.705: e/androidruntime(17341): @ java.util.concurrent.futuretask.setexception(futuretask.java:125) 08-28 14:43:29.705: e/androidruntime(17341): @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:308) 08-28 14:43:29.705: e/androidruntime(17341): @ java.util.concurrent.futuretask.run(futuretask.java:138) 08-28 14:43:29.705: e/androidruntime(17341): @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1088) 08-28 14:43:29.705: e/androidruntime...

Excel 2010 - change US dates to UK format -

i have imported csv file 2 long columns of dates. these dates in format aug/28/2013 , want them in standard uk dd/mm/yyyy format. i have tried formatting cells dates , converting them number-only formats, , various other permutations within date format box, no success. can rid me of these awful dates please? another solution without using formula: select relevant columns choose data → text columns… select “delimited” , click next untick delimiters , click next select data column format “date: mdy” , click finish the dates should converted uk dates.

java - Find the child nodes of a web page in javafx -

i want find nodes of web page , absolute position of them, how can via javafx?! (in other words, want find absolute position of each html tag when shown browser, how can work via javafx or else?!) using javafx 2-2. for more details, please see first 2 comments. i guess need this: javafx webview . honestly, have no idea how use it, looking @ examples (on same page) can see uses webkit , allows query rendered elements.

c# - Formatters for deep nested XML node serialization -

i need serialize c# class xml looking so: <request> <session>12345</session> <page>1</page> <elements_per_page>999</elements_per_page> <location> <zone>aaaa</zone> <region>bbbb</region> <coordinates> <lat>38.680632</lat> <lon>-96.5001</lon> </coordinates> </location> </request> what don't want 3 classes (request, location, coordinates), want 1 class changable attributes root of class , added serialization tags create nested xml, @ possible? let's start bare class: [xmlroot] class request { [xmlelement] public int session { get; set; } [xmlelement] public int page { get; set; } [xmlelement] public int elements_per_page { get; set; } [?] public string zone { get; set; } [?] public string region { get; set; } [?] public decimal lat { ...

php - How to pass a set of variables to a class -

this may bit of xy questions, i'm going explain i'm trying first. i'm attempting create single php file handle of page refresh ajax calls. means want able send class name, plus list of variables class constructor takes, , create class. i can create class fine. $class = new $classname(); works fine creating class. problem passing in default variables. of variables objects containing other classes, can't include once class created, need pass them class created. i thinking along lines of: $varstr = ''; $s = ''; foreach($vars $var) { switch($var['type']) { case 'object': $varstr .= $s . '$' . $var['value']; break; case 'variable': $varstr .= $s . $var['value']; } $s = ','; } $class = new $classname(echo $varstr); now echo $varstr isn't going work there, have no idea will. there can output variables array class constructor t...

How pygment JSON code on Jekyll? -

i'm newbie on jekyll , highlight json code. seems pygments has lexer javascript not json. how must proceed hightlight json code? thanks. how using javascript syntax highlighting? should highlighted js object.

php - sed can't edit ssl.conf "Permission denied" -

i'm trying edit /etc/httpd/conf.d/ssl.conf bash file called php exec : #comment lines in ssl.conf sed -i 's/^sslcertificatefile/#sslcertificatefile/g' /etc/httpd/conf.d/ssl.conf sed -i 's/^sslcertificatekeyfile/#sslcertificatekeyfile/g' /etc/httpd/conf.d/ssl.conf #uncomment lines in ssl.conf sed -i 's/^#sslcertificatefile/sslcertificatefile/g' /etc/httpd/conf.d/ssl.conf sed -i 's/^#sslcertificatekeyfile/sslcertificatekeyfile/g' /etc/httpd/conf.d/ssl.conf but i'm getting error : sed: couldn't open temporary file /etc/httpd/conf.d/sed3nribg: permission denied sed: couldn't open temporary file /etc/httpd/conf.d/sed2asgeg: permission denied i changed owner apache , permission a+xw of ssl.conf file didn't . idea ? sed tries create temp file... see errors... , has no permission write directory ( /etc/httpd/conf.d ) see sed command creates randomly named files possible other solutions ...

In PHP string I want extract ID and replace with name player -

i extract #id1234 , use function replace name in link form. the id number dynamic. so from $string = 'hello #id1234 , rest of text'; to $string = 'hello , <a href="#">john</a> , rest of text'; i need function name , sort link. okay code not sure how extact #id1234 convert player number 1234. the player number can put anyway easy , fast extract ideas welcome ie {1234} assuming function get_name($id) returns name of user, try: preg_match_all('/\d+/', $string, $id); $name = get_name($id) preg_replace("/#id[0-9]*/", "<a href='/whatever_url?id=".$id."'>".$name."</a>", $string);

sql - Case statement with aggregate and like clause - MSSQL 2012 -

i'm struggling case statement in mssql 2012. i've looked around other answers, although i've got help, none seem fix problem. case firstname when len(ltrim(rtrim(firstname))) > 11 'blah' else 'blahblah' end test i getting syntax error, on '>' character. originally, case firstname when ltrim(rtrim(firstname)) '% %' 'blah' else 'blahblah' end test but thought there may have been sensitivity on keyword, changed '>', same thing. probably dumb question, i've been banging head couple of hours , insight appreciated. try version: (case when len(ltrim(rtrim(firstname))) > 11 'blah' else 'blahblah' end) test the case statement has 2 versions. 1 variable used constant expressions: (case firstname when 'arnold' . . . when 'betty' . . . end) the second version (which 1 use) takes conditional each part: (case whe...

iphone - How to get calendar provider (Google, Apple, Yahoo etc.) from EKEventStore -

i'm pulling calendars synced on device eventkit framework , getting calendar title myname@gmail.com in ekcalendar object great! must know service provider account. ww have if suffix "@gmail.com" know google account, google account "@mycoolsite.com" here? how can service provider system? here how account title: ekeventstore * eventstore = [[ekeventstore alloc] init]; nsmutablearray*calendars = [[nsmutablearray alloc]init]; [eventstore requestaccesstoentitytype:ekentitytypeevent completion:^(bool granted, nserror *error) { if (granted) { dispatch_async(dispatch_get_main_queue(), ^{ nsarray * accountsarray = [eventstore calendarsforentitytype:ekentitytypeevent];// ios 6 ^ (int = 0; < [accountsarray count]; i++) { nsstring *cal = [[accountsarray objectatindex:i] valueforkey:@"title"]; if ([cal rangeofstring:@"@"].location != nsnotfound) { ...

performance - MDX Selecting date dimension consumes huge amount of memory -

Image
a following query takes 1 or 2 seconds execute: select { [measures].[premium], [measures].[revenue] } on columns, non empty { ( [insured].[pk insured].[pk insured].allmembers * [insured].[named insured].[named insured].allmembers * [producer].[name].[name].allmembers * [producer].[pk producer].[pk producer].allmembers * [coverage category].[name].[name].allmembers * [company].[name].[name].allmembers * [company].[pk company].[pk company].allmembers * [market ownership group].[pk market ownership group].[pk market ownership group].allmembers * [agency ownership group].[pk agency ownership group].[pk agency ownership group].allmembers * [company].[type].[type].allmembers ) } on rows ( select ( { [marketing rep].[pk non broker].&[820676] } ) on columns ( select ( [expiration date].[date hierarchy].[date].&[2013-08-27t00:00:00] : [expiration date].[date hierarchy].[date].&[2013-11-25t00:00:00] ) on columns ( select ( { [policy].[status].&[pif], [policy].[st...

rails g creates haml file, need erb files to be generated -

i have comfortable-mexican-sofa gem installed app. has haml-rails dependency. when run rails g scaffold scaffoldname files .haml extension in view. don't want .haml need .erb files generated. how do that? you can set default template engine erb. see documentation here changes can make in config/application.rb .

Dojo form.FilteringSelect store doesn't get filled immediately -

i dynamically create dojo.form.filteringselect component this: new dijit.form.filteringselect({ id: 'form_resselect', name: 'resselect', store: store, style: {width: '250px'} }, resourcecontainer ); i have noticed store gets filled after clicking on widget on rendered form. there properties can fix immediate or doing wrong? assuming store itemfilereadstore , can call _forceload function on store. var store = ... store._forceload(); new dijit.form.filteringselect({ id: 'form_resselect', name: 'resselect', store: store, style: {width: '250px'} }, resourcecontainer );

c# - Does composition root needs unit testing? -

i trying find answer seems it's not directly discussed lot. have composition root of application create di-container , register there , resolve needed top-level classes gets dependencies. happening internally - becomes hard unit test composition root. can virtual methods, protected fields , on, not big fan of introducing such things able unit test. there no big problems other classes use constructor injection. question - make sense test composition root @ all? have additional logic, not , in cases failures there pop during application start. code have: public void initialize(/*some configuration parameters here*/) { m_container = new unitycontainer(); /*regestering dependencies*/ m_distributor = m_container.resolve<isimplefeedmessagedistributor>(); } public void start() { if (m_distributor == null) { throw new applicationexception("initialize should called before start"); } ...

javascript - Adding a line break to D3 graph y-axis labels -

i trying add line break y-axis labels on d3 graph, displays bandwidth moved. @ moment displays inline 5 gb , display so, 5 gb so, since there no easy way of adding line break svg text element, opted selecting of text elements after have been rendered, split them @ space , positioned them in <tspan> elements inside of text element, gb positioned lower value, seemed work, except labels not displaying @ all, though did exist on page. here snippet of code, function init(svg,data,width,height,margin){ var x = d3.scale.linear() .domain([0,data[0].length-1]) .range([margin.left, width-margin.right]), y = d3.scale.linear() .domain([0,d3.max(data[0])]) .range([height-margin.bottom, margin.top]), /* define stock x , y axis */ xaxis = d3.svg .axis() .ticks(data[0].length) .tickformat(function(d) { return d+1; }) .scale(x) .orient('b...

xml - split nodes and assign them to variables for matching -

this question similar merge 2 elements using xslt based on attribute values trying put in different way understand better. i have xml file 2 elements names same, second element part of first element. example: <?xml version="1.0" encoding="utf-8" standalone="no"?> <!-- first element--> <book> <mbean code="org.book.mybooks" name="mycompany.props.jndi:name=mybookprops"> <attribute name="bookprops"> abc.mybook.onebook=@value@ def.mybook.twobook=@value@ ghi.myebook.threebook=@value@ </attribute> </mbean> <!--this second element , part of first element--> <book> <mbean code="org.book.mybooks" name="mycompany.props.jndi:name=mybookprops"> <attribute name="bookprops"> abc.mybook.onebook=@new_value@ def.mybook.twob...

php - jQuery tablesorter don't work -

the table diplayed normal can not sort it. both .js files in same directory .php file itself. <html> <head> <script src="jquery-1.6.2.js" type="text/javascript"></script> <script src="jquery.tablesorter.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#tabel").tablesorter(); }); </script> </head> <body> <?php $con = pg_connect("user=bct password=bct host=localhost port=5432 dbname=users ") or die (pg_last_error()); $query = "select * users"; $result = pg_query($con, $query); $t = '<table id="tabel" class="tablesorter">'; $t .= '<thead>'; //next code column names for($i=0; $i < pg_num_fields($result); $i++){ $field_info = pg_field_name($result, $i); $t .= '<th>' . $field_info . '</th>...

ruby on rails - With devise, how can I dynamically set config options such as password length? -

in application, want users able specify own password security. i'm using devise , devise security extension looks good. the downside suggested configurations in devise security extension takes place in devise.rb config file in initializers directory. able selectively include configuration options. i guess could, example, enable everything, , @ user model, override methods such need_change_password? in user model expiring passwords. i'm not sure if that's best approach. any guidance best practices appreciated.

Tableau-error while connecting to oracle DB -

i'm trying use tableau desktop version 8, statistics s/w. i've connect enterprise db. it asks server name, service name , port. i'm giving host name(abc.xyz.com) server name. i'm putting other 2 is, copying directly sql developer. i'm giving user name/pwd schema authentication. but while trying connect gives me error "unable connect server, check server running , have required previlages". i'm able connect db sql developer. i'f has faced issue, kindly me out. thanks sagar at first pass, suspicion 64-bit driver being used instead of 32-bit driver. try downloading , installing officially supported driver , see if resolves issue.

apache - htaccess blocking css and jscript -

hi have htaccess working, when go https blocks scripts , css. here example of error [blocked] page @ https://bctech.com/checkout.php?session=41fb31bc29722f2e520877d612e0ea4b ran insecure content http://bctech.com/scripts/superfish.js. im @ lost im new htacces here example of css url im useing <script type="text/javascript" src="/scripts/jquery-1.10.2.js"> and here attemp @ htaccess file, works blocks css , jscript files going wrong,, must close .htacces code <ifmodule mod_rewrite.c> rewriteengine on rewritecond %{https} off rewriterule ^(checkout\.php|final\.php|admin/(.*))$ https://{http_host}/$1[r=301,l] rewritecond %{https} on rewritecond %{request_uri} !/(checkout\.php|final\.php|admin/(.*))$ rewritecond %{request_uri} !\.(css|js)$ [nc] rewriterule ^(.*)$ http://%{http_host}%{request_uri} [r=301,l] # sales: rewriterule ^shop/sales/?$ sales.php # primary categories: rewriterule ^shop/([a-z-aa-z\+]+)/?$ shop.php?type=$1 # specifi...

deployment - Deploy repackaged android (BB10) APP in Blackberry Enterprise Server within workspace -

i created android application using eclipse editor. repacked , signed application blackberry 10 device. have signed .bar file. want release application. allow type of application host in blackberry enterprise server in workspace? bb employees have stated @ various events have been to, android runtime not supported in work perimeter. and though following kb article not directly, indicate error when attempting add android app, , design. http://btsc.webapps.blackberry.com/btsc/viewdocument.do;jsessionid=26b86d58fa9ecfa716dd1f2de34df4aa?externalid=kb30356&sliceid=2&cmd=displaykc&doctype=kc&nocount=true&vieweddocslisthelper=com.kanisa.apps.common.basevieweddocslisthelperimpl

authentication - Authenticate against Drupal users database table from Django application -

i'm working with: a) large drupal 7.23 application running @ https://sitename.com using mysql database thousands of users, around 30 of staff. b) small django 1.3.7 application running @ http://dj.sitename.com using postgresql database few (only drupal app's staff) users, who need able login django app using existing drupal credentials . the workflow this: staff users manually created identical usernames in each of applications. a staff user goes dj.sitename.com , inputs same username , password of account created @ sitename.com, , clicks submit. django checks username , password against users table in drupal mysql database , compares details in django users table. if match, user logged in. when staff user logged drupal app , visits django app @ dj.sitename.com, automatically logged in, , vice-versa. when staff user logs out django app, logged out drupal, too, , vice-versa. when user changes password in either drupal or django applications, automatically ch...

vb.net - VS .Net reference issue -

can explain why code line works fine in method in class, yet in class working on vs says reference missing? both have import statement system.web.security dim newuser membershipuser = membership.getuser(username) here error message error 1 type 'system.web.security.membershipuser' in assembly 'system.web, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a' has been forwarded assembly 'system.web.applicationservices'. either reference 'system.web.applicationservices' missing project or type 'system.web.security.membershipuser' missing assembly 'system.web.applicationservices'. reference not same import . according the documentation , membership class located in system.web.dll . thus, need add system.web.dll project references.

openvpn ios client custom url scheme -

my application have ios openvpn connect app dependency. so have check if app installed or not if open app using openurl scheme else open appstore link user install it. so problem here couldn't find open url associated app. any appreciated ! it exports doctype. use uidocumentinteractioncontroller check if filetype can opened , app installed. uti net.openvpn.formats.ovpn copy file of type (you can make such file on osx) bundle , attempt present interaction controller using presentopeninmenufromrect set delegate , if fires willshowmenu, no app there - , dismiss menu. so started this: nsstring *file = ... //path file uti in question uidocumentinteractioncontroller *c = ... //init file c.delegate = self; _hasappinstalledforuti = no; [c present...]; if(!_hasappinstalledforuti) { //act } ... - willpresentopeninmenu { [c dismissanimated:no]; _hasappinstalledforuti = yes; } btw: checked app -- there no url scheme.

neo4j database consistency errors -

some time ago had hosting provider storage issues, , (not sure if realted our problem) have consisteny problems within database. starting clean slave empty graph.db folder, not result in slave geting full copy od data master. also, when doing backups, consistency check errors time: full consistency check .................... 10% .................... 20% .................... 30% .................... 40% .................... 50% .................... 60% .................... 70% .................... 80% ...........2013-08-28 08:50:28.184+0000 info [org.neo4j]: error: next block not in use. dynamicrecord[2987807,used=true,light=false(120),type=0,data=byte[size=120],next=2987808] inconsistent with: dynamicrecord[2987808,used=false,light=false(105),type=0,data=byte[size=105],next=-1] ......... 90% ...................2013-08-28 08:50:29.653+0000 info [org.neo4j]: warning: name empty. propertyindexrecord[2035,in use,nameid=2036,propcount=0] in...