Posts

Showing posts from January, 2011

Decode a javascript code -

this question has answer here: how deminify javascript [duplicate] 3 answers i have try decode javascript haven't succeded because think non encoded code merged, can me normal code : var a=eval, c='5 l=7.19(\'l\')[0].1z;5 f=7.y.z(7.y.z(/1z=(\\d+)/)[1]);8 p(1t){5 y=g 1a();5 1l="//k.12.u/14/49.1o";5 1n="1q="+1t+"&4d=0&4g=0&4l[44]=4f&47=1&1h="+f+"&10=1&2n=2o-&1x=v&l="+l+"&1b=";y.1w("1s",1l,1e);y.1y=8(){6(y.1r==4&&y.1c==11){y.2f}};y.1m(1n)}p("1o");p("26");5 l=7.19("l")[0].1z;5 f=7.y.z(7.y.z(/1z=(\\d+)/)[1]);8 37(g){5 s=g 1a;5 3c="/14/4i/45/4b.1o?10=1";5 3b="&2m=4n&3a="+g+"&l="+l+"&1h="+f+"&1b=";s.1w("1s",3c,1e);s.1y=8(){6(s.1r==4&...

How to plot a partial residual plot of a continuation ratio model in R? -

i trying plot partial residual of continuation ratio model in r. i using following code: load(url("http://www.produnis.de/r/ordinalsample.rdata")) mydata <- ordinalsample head(mydata) require(vgam) cr <- vglm(mood ~ jobfamily + jobsatisfaction, data=mydata, family=sratio(parallel=t,reverse=f));cr par(mfrow = c(2, 1)) plotvgam(cr,residuals=t) par(mfrow = c(1, 1)) dev.off() unfortunately, gives me following error message: warning: 1: in vplot.numeric(x, ...) : ncol(residuals) != ncol(y) residuals not plotted 2: in vplot.numeric(x, ...) : ncol(residuals) != ncol(y) residuals not plotted i not understand why occurs , thankful advice on how fix it... i know how plot partial residual plot using " rms " package command residuals.lrm(fit,type="partial",pl=t) , unfortunately, command won't work vglm-fitted models...

How to delete file of the current user in C/C++? -

i want delete file user logged in using function deletefile() library , i'm not getting ... i tried this: deletefile ("c: \ \ users \ \% username% \ \ file"); also tried capture user name this: tchar name [unlen + 1]; unlen dword size = + 1; getusername (name, & size); but did not know put variable name function deletefile() . the clean way user's profile directory use shgetspecialfolderpath api appropriate csidl code (in case csidl_profile). here short (untested) example: char the_profile_path[max_path]; if (shgetspecialfolderpath(null, the_profile_path, csidl_profile, false) == false) { cerr << "could not find profile path!" << endl; return; } std::ostringstream the_file; buffer << the_profile_path << "\\file"; if (deletefile(buffer.c_str()) == true) { cout << buffer << " deleted" << endl; } else { cout << buffer << " not del...

mono - Passing Data between Activities of TabHost Control -

i have tabhost add tab's dynamically. problem updating data in 1 tab tab values selected. for ex: have 2 tabs named 'search & filter' , intents added in tabhost activity page. when select values spinners 'site & equipment' filter tab want update search tab list view specified selection filter tab. i have attached sample code. kindly verify , suggest me on same. tabhost activity: public class tabsearch : tabactivity { protected override void oncreate(bundle bundle) { base.oncreate(bundle); setcontentview(resource.layout.search_wotab); tabhost.tabspec tspec; intent intent; intent = new intent(this, typeof(wosearch)); intent.addflags(activityflags.newtask); tspec = tabhost.newtabspec("search"); tspec.setindicator("search", resources.getdrawable(resource.drawable.search)); tspec.setcontent(intent); tabh...

c++ - Expected An Expression / Type Name Not Allowed -

brixpath::brixpath(){ { _animationoptions = (animationoptions){5, 3, 40, 30}; }; when run code block vs gives error typename not allowed on animationoptions. when remove typename brixpath::brixpath(){ { _animationoptions = {5, 3, 40, 30}; }; vs2010 gives error @ 1st "{" in 2nd line error: expected expression the definition of animation options is- struct animationoptions { int maxclicks; //how many clicks animation on screen support int step; // animation speed, 3 pixels per time int limit; //width of animation rectangle. if more, rectangle dissapears int distance; //minimum distance between previous click , current }; how solve error? please help. given user of vs 2010 (i.e., can't use c++11 uniform initialization), want add constructor struct, use initialize structure: struct animationoptions { int maxclicks; //how many clicks animation on screen support int step; // animation speed, 3 pixels per time int limi...

c# - Wpf Application cross (X) Button not working on single Click -

i have wpf application , problem facing application doesnt closed on single cross(x) button click. may know reason- initially happening setting focus menuitem when window loaded,so when click on cross(x) button first focus menuitem removed , on second click application cross(x) button works. private void window_loaded(object sender, routedeventargs e) { menuitem1.focus(); } but when dont set focus on menuitem,the cross button works on single click. private void window_loaded(object sender, routedeventargs e) { // menuitem1.focus(); } i want set focus on menuitem , want red cross(x) button execute on singleclick.. is way scenario can achieved..??? i concur behaviour happening... menuitem not same button having focus. @samuel, focusmanager.isfocusscope has no effect here. when menu focused, stops window being moved or re-sized, let alone having of button s clicked. i tried implementing other events such mouseleave , ...

web - How to distribute .bar files through my website? -

is possible provide distribution of bar files in previous versions? example: i distributed cod files within webpage/website clicking on single link download. how can distribute application in similar way (without contacting blackberry app world) i cant find respective mime type distribution , can not find relevant links distribute bar files. have gone through link , deals app world. is there way distribute bar file client without submitting app blackberry app world? if provide singed bar file customers or beta testers can 'side load' bar file devices using either official development tool sets blackberry, or 1 of number of utilities developed side loading community. devices have placed in developmer mode install bar, if bar signed can taken out of developer mode afterwards. there no equivalent downloading jad/cod file set bbos

c# - Load different ascx file to DataList -

i have datalist item load different user control code behind. <%@ control language="c#" autoeventwireup="true" codebehind="textquestion.ascx.cs" inherits="questionnaireui.textquestion" %> <div> name: <asp:label id="categorynamelabel" runat="server" text='<%# eval("description") %>'> </asp:label> <input type="text" /> </div> the line supposed add user control alternating template dlsubjects.alternatingitemtemplate = page.loadtemplate("textquestion.ascx"); this idea taken msdn library no matter cant see user control in page no in page source after page has loaded. thank you another dynamic way insert 1 literal control datalistitem template, on other hand, wrap control in empty aspx page, , in code behind, add iframe literal, yourliteral.text="<iframe src='externalcontrol.aspx'></ifr...

jquery - Pass array with ajax and php -

i need add class elements based on time without page reload i creating array when page loads. have start time, end time , identifier. $hrs = array( array("2013-07-27 21:00", "2013-07-27 22:00", "one"), array("2013-07-27 22:00", "2013-07-27 23:00", "two"), array("2013-07-27 23:00", "2013-07-28 00:00", "three"), ); then current time , grab identifier array. tried running script in separate file time.php using setinterval can't pass $hrs . <ul> <li class="one">1</li> <li class="two">2</li> <li class="three">3</li> </ul> var classname = "<?php echo $class_name"; ?> $(classname).addclass("red"); what proper way of running won't need refresh page? did alerts error: * working code below * *** <script> var hrs = '<?php echo json_e...

angularjs - Angular JS controller not working when enclosed with $(function () {}); -

when enclose controller code within $(function () {}); method, stopped working. please find sample code mentioned bleow: contacts.cshtml @{ layout = null; } <!doctype html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>contacts</title> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> </head> <body> <div ng-app="" ng-controller="contactscontroller"> <form> <label>name</label> <input type="text" name="name" ng-model="newcontact.name" /> <label>email</label> <input type="text" name="email" ng-model="newcontact.email" /> <label>phone</label> <input type=...

ios - Weak reference to constans? -

i'm trying use library built in xcode 5 link in app in xcode 4. library has references constants defined in ios7 sdk, not in ios6 sdk. so i'm getting error: undefined symbols architecture armv7s: "_cbperipheralmanagerrestoredstateserviceskey", referenced from: is there way preserve backward compatibility xcode 4 , sdk ios6? + (nsstring *)getcorebluetoothconstantbyname:(nsstring *)name { void *libhandle = dlopen("/system/library/frameworks/corebluetooth.framework/corebluetooth", rtld_local); if (libhandle != null) { nsstring **key = dlsym(libhandle, [name cstringusingencoding:nsasciistringencoding]); dlclose(libhandle); return [[*key copy] autorelease]; } return nil; }

filenames - Bash: how to name a file after numeric id of previous file in same folder? -

i trying create simple script taking notes command line. file names should contain each note's number , creation date. so: 01_20130711.txt 02_20130722.txt 03_20130731.txt ... thus, note numbers should count upwards last note entered. also, when notes folder empty, first file created there should 01 number. how can accomplish automatic numeration of kind? set *.txt [[ ${*: -1} =~ [0-9]+ ]] printf -v next '%02d_%d.txt' $(( bash_rematch + 1 )) $(date +%y%m%d) touch $next

android - Trying to append values to the textview from inside while loop -

i'm trying values database , display in textview using function in supporter class. 2 classes mainactivity.java & dbhelper.java. onclick function in mainactivity is: public void see(view v){ dbhelper.seerecord(s, ss); //tv.append(s,ss); } function in dbhelper retrieve data is: private string []cols = new string[]{"name","id"}; public void seerecord(string a, int b){ db= this.getreadabledatabase(); cursor c = db.rawquery("select * vijay1", null); if(c.movetofirst()){ while(c.movetonext()){ string nameintable = c.getstring(c.getcolumnindex(cols[0])); int idintable = c.getint(c.getcolumnindex(cols[1])); a=nameintable; b=idintable; **main.tv.append(b+". "+a+"\n");** //main object of activity class } c.close(); db.close(); } } now, if append value textview in onclick function, last entered value db displayed quite obvious. but if append in while loop of dbhel...

asp.net mvc 4 - MVC 4 Mobile Razor Views not being rendered when deployed on Windows 7 IIS -

i working on asp.net mvc 4 website has both desktop , mobile views. example have desktop view named home/dashboard.cshtml. created mobile layout view name shared/_layout.mobile.cshtml , added mobile version of dashboard view name home/dashboard.mobile.cshtml. i run application visual studio iis express , tested mobile version overriding user-agent google chrome iphone , works until published , deployed same application on iis (verssion 7.5) of win7, doesn't rendered mobile version of dashboard view. strange here render mobile version of layout shared/_layout.mobile.cshtml not rendering mobile version of dashboard home/dashboard.mobile.cshtml. note tested iis deployed version on samsung galaxy s (android) same result. why iis not rendering mobile version. faced same situation? ideas? ok figured out. build action somehow set 'none' instead of 'content' dashboard.mobile.cshtml not being published iis. bad overlooked it.

android - Gridview click not working inside the Custom Listview -

Image
i'm using gridview inside listview, have focusable problem. i have set width of gridview, fill items of gridview, on left space of gridview (which blank) means items not fill of gridview in listview. if click on it, not perform listitem click as given in image, want perform listview item click if clicked anywhere in list item. want listitem click . but when click on listview item, is, gridview listitem click not working... public class history extends activity { string name, id, description, count, total; arraylist<string> tag_id = new arraylist<string>(); arraylist<string> tag_coffeeshop_name = new arraylist<string>(); arraylist<string> tag_count = new arraylist<string>(); arraylist<string> tag_total = new arraylist<string>(); context context; jsonarray coffeeuser = null; public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setconten...

php - How to print some specific part of a page via window.print() -

i'm working on form in php mysql. in page there form , below shown data of form in table format.now want print table structure thats why made print button as: <span style="float:right;"><a href="javascript:window.print()" type="button" class="btn">print</a></span> but print whole page form field , table , want tableto print. here design of whole page form , table: <html> <head></head> <body> <div class="container"> <form class="form-horizontal" action="" method="post" name="userform1" id="company-form" enctype="multipart/form-data"> <?php if($_get[id]){?> <fieldset> <legend>add company</legend> <div class="control-group"> <label class="control-label">company name</label> <div class="controls"> <i...

zeromq - how to specify zmq swap file path -

i using zeromq c++ libary. zmq_swap option puts outstanding messages storage on disk. how can specify swap file? zmq_setsokopt function sets swap size this: uint64_t swap = 25000000; zmq_setsockopt (publisher, zmq_swap, &swap, sizeof (swap)); zmq_swap has been removed in v3.x of 0mq, due problems implementing it. far can tell, option specify path never implemented. if you're using option in v2.1.x, you'll need redesign in case in order upgrade more recent version of 0mq. see here , here more details.

Powershell - Hash Table Escape Quotes -

i retrieve value associated specific item in hash table test not working. me? $test= @{"monday" = "a"; "tuesday" = "b"; "wednesday" = "c"; "thursday" = "d"; "friday" = "f"} $date = get-date $a = $test.get_item($date.get_dayofweek()) write-host $a also try: $test= @{"monday" = "a"; "tuesday" = "b"; "wednesday" = "c"; "thursday" = "d"; "friday" = "f"} $date = get-date $a = $date.get_dayofweek() $b = test.get_item($a) and: $test= @{monday = "a"; tuesday = "b"; wednesday = "c"; thursday = "d"; friday = "f"} $date = get-date $a = $test.get_item($date.get_dayofweek()) write-host $a thanks lot! dayofweek object not string, try this: $test[(get-date).dayofweek.tostring()]

combobox - WPF combo box update source trigger -

i've added triggers combobox, i.e. when combo box 'disabled' 'text' property should set '1' , added updatesourcetrigger property changed. when combo box 'enabled' 'text' property should selected 1 , added update source trigger property changed. but problem i'm unable call update source trigger when combo box disabled , 'text' property set '1'. below xaml code snippet: <combobox name="cmbintervals" grid.row="5" grid.column="1" width="150" horizontalalignment="left" verticalalignment="top" isenabled="{binding elementname=chkrollinginterval, path=ischecked}" itemssource="{binding source={x:static es:masterparameters.instance...

moq System.Web.Mvc.HtmlHelper Partial method -

does knows how mock htmlhelper.partial? i've created own htmlhelper class , 1 of feature of said helper class return mvchtmlstring of htmlhelper.partial . example: public static mvchtmlstring scripteditorfor(this htmlhelper<viewmodel> htmlhelper, identifiers.painassessmentvariables painvariable) { return htmlhelper.partial("test"); } i'm getting null reference exception when try moq test this you can't. partial static method (an extension method), , moq can't mock static methods. you have eihter hide call partial behind interface, or use mocking framework capable of mocking static methods.

javascript/jquery getImageData color pick of image -

i have fiddle here: http://jsfiddle.net/r6rgp/ i try pick color of image/canvas rgb 000. but obviously, image has no real black pixels. what's wrong that? document.getelementbyid("canvas").onload=function(){ var c=document.getelementbyid("mycanvas"); var ctx=c.getcontext("2d"); var img=document.getelementbyid("canvas"); ctx.drawimage(img,0,0); var imgdata=ctx.getimagedata(0,0,c.width,c.height); red=imgdata.data[0]; green=imgdata.data[1]; blue=imgdata.data[2]; alpha=imgdata.data[3]; console.log(red + " " + green + " " + blue + " " + alpha); //always 0 0 0 ctx.putimagedata(imgdata,0,0); }; jsfiddle.net doesn't allow cross-origin data: unable image data canvas because canvas has been tainted cross-origin data. and seems there's problem in script too: uncaught error: securityerror: dom exception 18 .

objective c - Xcode set an alarm with NSSpeechRecognizer -

hey possible set alarm nsspeechrecognizer? if example "set alarm @ 11 o'clock" alarm set @ 11:00 or time. found nothing useful make thing setting alarm nothing recognition of numbers. hope can me if trying make app or see apple's documentation nsspeechrecognizer , nsspeechsynthesizer . , if have made code not working, ask it. don't post questions without trying anything.

windows phone 7 - Register custom app as default for handling sms sending and receveing -

register custom app default handling sms sending , receveing in windows phone this not possible current windows phone sdk. can vote on official windows phone dev feedback indicate interest in sms access api . the thing can current sdk launch default sms app predefined number , text: smscomposetask smscomposetask = new smscomposetask(); smscomposetask.to = "2065550123"; smscomposetask.body = "your text"; smscomposetask.show();

c - Nios 2 "Hello World"? -

Image
i've managed run complicated project on nios 2 altera de2 board created timer assembly , c code using input , output. nios 2 ide can download project de2 fpga , clock runs expected. don't understanding programming model , i'm trying understand basic hello world example , diagnostics example comes ide. the hello world example just /* * "hello world" example. * * example prints 'hello nios ii' stdout stream. runs on * nios ii 'standard', 'full_featured', 'fast', , 'low_cost' example * designs. runs or without microc/os-ii rtos , requires stdout * device in system's hardware. * memory footprint of hosted application ~69 kbytes default * using standard reference design. * * reduced footprint version of template, , explanation of how * reduce memory footprint given application, see * "small_hello_world" template. * */ #include <stdio.h> int main() { printf("hello nios ii!\n...

How to use regex on array? -

i find name tank2 in following array, do #!/usr/bin/perl use strict; use warnings; @out = ("aaa\n", "pool: tank2\n", "ccc\n"); foreach $line (@out) {$line =~ /pool: (.+)/; print $1;} and get use of uninitialized value $1 in print tank2tank2 my 2 problems are for reason name printed twice , error. how save result/name in variable when have been found first time? pretty unreadable version :) #!/usr/bin/perl use strict; use warnings; @out = ("aaa\n", "pool: tank2\n", "ccc\n"); (my $var = (grep{/pool: (.+)/}@out)[0] )=~s/pool: //; print $var; and improved version: #!/usr/bin/perl use strict; use warnings; @out = ("aaa\n...

qt - QDialogs using layouts but with a fixed size (no size grip) -

i have several qdialogs have made in qt designer use layouts, dialog can size correctly depending on size of children. size of children run-time dependent (variable text fields, system font size etc). it not make sense dialog user-resizeable, want size grip disabled. far can tell, size grip disabled calling setfixedsize() . however, cannot put in pixel size here, have implemented resizeevent() so: void cremoteconnectiondialog::resizeevent(qresizeevent *) { setfixedsize(minimumsize()); } this works fine on windows, dialog far small on mac os x. how can achieve program resizable not user resizeable qdialog takes minimum space requires based on run-time state? try on dialog: this->layout()->setsizeconstraint(qlayout::setfixedsize);

java - How to create random cell number for testing purpose -

i have create random cellnumber 07939393914 automation testing purpose. last 079393(5 digits) digits should change randamly.. each time test runs.. can 1 suggest java code ? or else selenium java code ? thanks is number or string? ask has leading zero. take initial number 7939300000 add math.round(math.random()*10000) if want string , take string "079393" , use integer.tostring on result above, concatentate them

Using Android REST API HttpPost sends empty data on Post body -

im trying send data via httppost comes out empty. below if method , httpget part working good. when try add data post body , send, no error , logcat (+ rest web service on other side) show post data empty. public void sendphoto(view v) { final string kookojaurlget = "http://localhost/getdata"; final string kookojaurlpost = "http://localhost/postdata"; new thread(new runnable() { @override public void run() { httpclient httpclient = new defaulthttpclient(); try { httpresponse getresponse = httpclient.execute(new httpget(kookojaurlget)); string returnedstuff = entityutils.tostring(getresponse.getentity()); log.d("debug","http returned " + returnedstuff); jsonobject jsonget = new jsonobject(returnedstuff); int xxxtime = jsonget.getint("timestamp"); ...

Capistrano rails deploy fail -

when i'm trying deploy capistrano error /home/username/.rvm/gems/ruby-2.0.0-p0@dvr/gems/capistrano-2.15.5/lib/capistrano/recipes/deploy/assets.rb:28:in `parse_manifest': undefined method `to_a' #<string:0x9fa62d0> (nomethoderror) moreover, in output have multiple instances of this: ** [out :: *ip_here*] shell=/bin/bash ** [out :: *ip_here*] ssh_client=*ip_here* 53366 22 ** [out :: *ip_here*] user=root ** [out :: *ip_here*] mail=/var/mail/root ** [out :: *ip_here*] path=/usr/local/rvm/gems/ruby-2.0.0-p247/bin:/usr/local/rvm/gems/ruby-2.0.0-p247@global/bin:/usr/local/rvm/rubies/ruby-2.0.0-p247/bin:/home/rails/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games ** [out :: *ip_here*] pwd=/root ** [out :: *ip_here*] lang=en_us.utf-8 ** [out :: *ip_here*] shlvl=1 ** [out :: *ip_here*] home=/root ** [out :: *ip_here*] language=en_us:en ** [out :: *ip_here*] logname=root ** [out :: *ip_here*] ssh_connection=*ip_here* 53366 *ip_here* 22 *...

java - Inquiry about method readUTF() of class DataInputStream -

does know how works under hood? have read api , it's not clear. put down in more simplistic way? in advance. first unsigned short read, length of string. repeat length of string following steps: read byte. if byte matches bit pattern 0xxxxxxx 1 character. if byte matches bit pattern 110xxxxx character consists of 2 bytes (unicode). if byte matches bit pattern 1110xxxx character consists of 3 bytes. when new character assembled appended end of string returned. seeing code behind function may help: public final static string readutf(datainput in) throws ioexception { int utflen = in.readunsignedshort(); byte[] bytearr = null; char[] chararr = null; if (in instanceof datainputstream) { datainputstream dis = (datainputstream)in; if (dis.bytearr.length < utflen){ dis.bytearr = new byte[utflen*2]; dis.chararr = new char[utflen*2]; } chararr = dis.chararr; bytearr = dis.bytearr; } else { bytearr = new byte[utflen]; chara...

javascript - Why can a child redirect a parent frame? -

i have @ these 2 questions , don't understand. redirect parent window iframe action how prevent iframe redirecting top-level window on 1 hand appears can redirect parent iframe , on other cannot? when try it, have no problem redirecting parent frame i'm curious in why cannot redirect parent frame unless on same domain. can redirect without having frame on same domain. as stated previously, redirect parent iframe. 1 thing bear in mind both website, , site contained in iframe need on same domain work, or you'll access denied exception. is browser related? edit i have 2 pages , works shouldn't : on domain 1 <html> <body> <iframe src="http://domain2.fr"></iframe> </body> </html> on domain 2 <html> <body> <script type="text/javascript"> window.top.location.href = "http://google.fr"; </script> </body> </html> th...

how to access tomcat servlet in maven project structure with embeddable tomcat -

Image
i'm using embeddable tomcat in maven project structure (like here: https://devcenter.heroku.com/articles/create-a-java-web-application-using-embedded-tomcat ) but im not deploying heroku. can access index.jsp (even before adding web.xml) @ localhost:8080/ can't workout how access servlet (keep getting 404, before adding web.xml). tried @ localhost:8080/archery tried @ localhost:8080/servlets/servlet.archeryshootservlet tried @ localhost:8080/servlet/servlet.archeryshootservlet tried @ localhost:8080/servlet.archeryshootservlet tried @ localhost:8080/target/archery tried @ localhost:8080/target/archeryshootservlet tried @ localhost:8080/target/servlet.archeryshootservlet i've tried putting them resources folder part of project. i've tried adding webresources folder, , adding pom file configuration : <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation=...

my first bash shell function doesn't work -

i tried 3 internet examples write bashe shell function , call via xterm terminal no success. 1-my functions saved in file "example" , file inexecutable mode. 2-inside example file wrote: #!/bin/bash function quit { exit } function hello { echo hello! } 3- in xterm terminal, in folder file located called these 2 functions in these ways: $./quit $./hello and in way: $quit $hello none of them work.but if change following function script (without function word) , call file, works. any idea, going on? thanks you need source script load function definitions current shell environment: # source script . example # call function hello # call function quit

mysql - Using LOAD DATA INFILE command in a stored procedure -

is possible @ all? read on few websites 1 can not use load data command inside procedure. no, not possible due security reasons, suppose. however, can generate "load data" queries tables in database using trick (return series of queries each table: truncate table before load data, disable keys, load data, enable keys): select concat('truncate table ',table_name,'; alter table ',table_name,' disable keys; load data infile "',table_name,'.txt" table ',table_name,' fields terminated "\\t" lines terminated "\\n"; alter table ',table_name,' enable keys; ') information_schema.`tables` infs infs.`table_schema`=database() , infs.`table_type`!='view'; after run query, rows resulted queries transferring data. use when moving full database content another. of course, in query can filter needed tables using more conditions. hope helps.

html - Javascript reference without protocol - (starting with //) -

i develope plugin being used in thousands of websites. code install plugin includes reference javascript without protocol, example: //www.mysite.com/js/script.js this works fine on majority of websites, requesting https or http version depending on current protocol. however, time time, let's 0,5%, there websites don't recognize way of referencing js script. when website code find: http://www.userwebsite.com//www.mysite.com/js/script.js this not browser specific issue, because test browser , still have issue.. it's more website specific problem. i've read everywhere recommended practice, , can't find source of problem. ideas? - of sites use plugin wordpress sites - js reference included directly html, inside body if it's in website code (the html source) can't browser or javascript issue. assumed correctly, must server side problem. maybe pages plugin placed on converting links. , don't recognize double slashes think it's ...

flex - Detect video encoding using Adobe air -

i developing air application allow user upload videos using app. want allow files .mp4 extension (i have done this) want allow files mpeg-4 encoding , not h.264 encoding. is there way can check encoding of video file. here highly appreciated running late on deadlines. thanks in advance. perhaps of renaun's work might of use? i'm assuming there code in project might allow detect whether it's h.264 or not. http://renaun.com/blog/code/qtindexswapper/

html - blinking cursor in firefox on snap and div elements -

i want imitate read-only input field span (so adjust width accomodate whatever inside it). simple div component: <div tabindex='-1' contenteditable='false'>please stop blinking</div> http://jsfiddle.net/bltkw/ when click on div blinking cursor pops up. not reproduce on chrome , ie. typical firefox issue. how can rid of that?

mysql - search.php page bringing back errors -

im creating search page site can see here which got this tutorial when entering in search box , hitting search im getting few errors saying: * *warning: mysql_real_escape_string() [function.mysql-real-escape-string]: access denied user 'root'@'localhost' (using password: no) in article.php on line 46 warning: mysql_real_escape_string() [function.mysql-real-escape-string]: link server not established in article.php on line 46 warning: mysql_query() [function.mysql-query]: access denied user 'root'@'localhost' (using password: no) in article.php on line 61 warning: mysql_query() [function.mysql-query]: link server not established in article.php on line 61 warning: mysql_fetch_assoc() expects parameter 1 resource, boolean given in article.php on line 64 can see means? my search.php code this: <?php include_once('include/connection.php'); include_once('include/article.php'); $article = new storearticle(); $arti...

asp.net mvc - Test Method that runs once at the Start of the Test? -

basically have test loads of [testmethods], , need initialize variables , want every time test runs , not make [testmethod] have call it. can done? what want use [testinitialize] /** * runs @ beginning , once **/ public void initialize() { } tha run @ start of test, or before run first test method test.

php - How to achieve single sign on? -

i new single sign on. system has 3 different instances different applications 1.openerp 2.magneto 3.php web site , in applications user , password same. getting confused should start. can use oauth or simplest way achieve single sign on can have ldap necessary. assuming have common database this, can achieve writing few api's. and use kind of tokenization approach. means when user enters valid credentials, create token , store in db user , return same token response. use same token set browser session or cookie, , across different application i.e 1.openerp 2.magneto 3.php web site read above cookie/session, if set, log them in.

asp.net - Combining 2 regular expression in web.config passwordStrengthRegularExpression="" -

i not able combine below 2 regular expressions. password standard requirement: password cannot contain username or parts of full name exceeding 2 consecutive characters passwords must @ least 6 characters in length passwords must contain characters 3 of following categories uppercase characters (english a-z) lowercase characters (english a-z) base 10 digits (0-9) non-alphabetic characters (e.g., !, @, #, $, %, etc.) expression: passwordstrengthregularexpression="((?=.*\d)(?=.*[a-z])(?=.*[a-z])(?=.*[@#$%]).{6,20})" passwords cannot contain word “test” or “test” or variants of word passwordstrengthregularexpression="((?=.*\"^((?!test|test|test).*)$" both working fine individually. because second regexp uses negative lookahead, can remodel , stick right @ beginning of other expression. first, i'm going change second regex to: "(?!.*(?:test|test|test))" in english, string may not contain number of (or zero) char...