Posts

Showing posts from August, 2011

HTML Agility Pack SelectSingleNode method not listed on Universal Apps (C#) -

this question has answer here: htmlagilitypack.htmlnode no definition selectnodes 1 answer i developing simple web scraping app in c# , here code load html code received server htmldocument . string html = res.content.tostring(); htmldocument htmldoc = new htmldocument(); htmldoc.loadhtml(html); whenever try use htmldoc.documentnode.selectsinglenode method getting error: "html node not contain reference selectsinglenode". am missing something? i developing universal app in visual studio 2015. downloaded , installed html agility pack using nuget manager. universal app doesn't support xpath. can not use selectsinglenode or selectnodes methods. can use linq, like doc.documentnode.descendants("a") .where(a => a.innertext.contains("some text")) .select(a => a.attributes["href"

collision detection - How to detect contact regarding sprite texture -

i have bullet should fired @ block. bullet has 6 different random textures mimic different bullets. , block has 3 different textures chosen randomly there 3 different blocks. want specify in code if bullet texture red, , block texture red score should increase, if bullet red , block green game over. don't know how tell game in didbegincontact. by have this: in gamescene & didmovetoview: struct physicscategory { static let none : uint32 = 0 static let : uint32 = uint32.max static let cgyblock : uint32 = 0b1 static let bullet : uint32 = 0b10 } bullet.physicsbody = skphysicsbody(texture: bullet.texture, size: self.bullet.size) bullet.physicsbody?.categorybitmask = physicscategory.bullet bullet.physicsbody?.contacttestbitmask = physicscategory.cgyblock bullet.physicsbody?.collisionbitmask = physicscategory.none bullet.physicsbody?.affectedbygravity = false bullet.physicsbody?.usesprecisecollisiondetection = true in didbegincontact: func didbeginco

javascript - How to allow go to specified page in free jqgrid pager -

Image
free jqgrid has page number field. entering page number , pressing enter shold invoke specified table. stopped work @ time. remote json data used. entering page number , pressing enter nothing. i added alert(key); jqgrid source code shown in code below before line https://github.com/free-jqgrid/jqgrid/blob/master/js/jquery.jqgrid.src.js#l4045 if enter pressed, alert box not appear. if other keys pressed, alert box appears. how fix ? how find reason why enter ignored. maybe other method captures enter key , cancels event not passed handler. how find ? if (p.pginput === true) { $("input.ui-pg-input", pgcnt).bind("keypress.jqgrid", function (e) { var key = e.charcode || e.keycode || 0, newpage = intnum($(this).val(), 1); alert(key); // added if (key === 13) { if (!clearvals("user", newpage, intnum(p.rownum, 10)

Android: how to change dynamically the button icon color? -

i have button in layout: <button android:id="@+id/followers_right" android:drawableleft="@drawable/ic_team" android:text="@string/visibility_right_followers" /> by default, icons grey. in cases, want apply specific color. , drawable button, how can programmatically ? mybutton.setcolorfilter(getresources().getcolor(r.color.tint_selected)); this line doesn't work (build error). thanks help! i tried find solution myself interesting question not there yet. 1 work around have same icon in different colors drawable resources, and change icon of button grammatically, yourbuttom.setcompounddrawableswithintrinsicbounds(r.drawable.low, 0, 0, 0); but issue is, if want huge range of color chages

python - docopt's argument dictionary flags show the value of their arguments instead of True/False -

i have docopt docstring in python program looks this: """ program.py usage: program.py (-h | --help) program.py --version program.py word2vec directory [-u model] [-v] program.py word2vec directory [-o outputmodel] [-v] program.py tsneplot <model> <word> [-s <dest> <plotname>] options: -h --help show screen. --version show version. -o outputmodel specify name of output model -s <dest> <plotname> specify destination folder , name of plot saved (for tsne command) -u model specify name of model update -v verbose output """ when try command python program.py word2vec rootfolder -o outputmodel the output arguments dictionary of form {'--help': false, '--version': false, '-o': 'outputmodel', '-s': none, '-u': none, '-v': false, '<model>':

audio - Android - Installing Mp4Parser without Maven -

it's supposed simple, day couldn't find solution. i'm trying follow example in http://andrey.chernih.me/2014/06/28/video-recording-and-processing-in-android/ ( muxing audio ) so i've added project's libs directory both aspectjrt-1.8.6.jar , isoparser-1.0.6.jar found through https://code.google.com/p/mp4parser/ ( using without maven ) but can't implement "audiomuxer" in class. what missing ? thanks. you gotta add gradle file knows it's should added: compile files('libs/<filename>.jar') android studio: add jar library?

ios - unable to export a video file from device in the background -

i using sdavassetexportsession export video file in setup (video , audio) desire. works fine until switch background mode , starting av foundation error : averrorunknown - 11800. seems apple's avassetexportsession (regard app state) , because it's not customisable can't use in case. any recommendations ? until have been trying (with no luck) : 1. open background task . 2. create strong refence session just turn on (in project capabilities - > background mode setting) "audio , airplay"

Xamarin iOS image change transition -

i developing app xamarin.ios , not using xamarin.forms. have screen have set image view. change between 2/3/4 images transition (fade, move in ... not matter). there way can that? here code until now: imgview.animationimages = new uiimage[] { uiimage.frombundle ("tmp_running.jpg") , uiimage.frombundle ("tmp_cycling.jpg") } ; imgview.animationrepeatcount = 0; imgview.animationduration = 3; imgview.startanimating (); i have tried approach: catransition customtransition = new catransition(); customtransition.fadeinduration = 3.0f; customtransition.fadeoutduration = 3.0f; customtransition.timingfunction = camediatimingfunction.fromname( camediatimingfunction.easeineaseout); customtransition.type = catransition.transitionfade; , : imgview.layer.addanimation(customtransition, null); but nothing worked. do know how simple

html - Make a clickable, animated hover using css only -

the point making aside element enter when hover on image, using css, also, let children accept click events. so far have functioning animated hover, has button in , button does act on click events. have used pointer-events: none on sliding aside element, because otherwise animation jumpy point of breaking, so, pointer-events: none gets out of way , animation smooth , persistent long you're hovering. the problem occurs when hover on button . make aside transition out (see fiddle , it's better broken english). i'm looking way prevent aside returning initial, hidden position. , challenge of course, using css only! here code (it's in fiddle ): html: <div class="thumbnail"> <img src="http://i59.tinypic.com/10cvw8y.jpg" class="template-img"> <aside tab-index="1" class="hover"> <button class="button" onclick="alert('wow')">click me</button>

php - How to add ad code in wordpress Single page without affecting the second single page template -

i using 2 different template single page. 1 sidebar , 1 without sidebar. now want inject ad code in sidebar template. could 1 give me code one. note: the ad automatically inserted after every second paragraph. , have code. add_filter( 'the_content', 'prefix_insert_post_ads' ); function prefix_insert_post_ads( $content ) { if ( is_single() && ! is_admin()) { return prefix_insert_after_paragraph( $ad_code, 2, $content ); } return $content; } function prefix_insert_after_paragraph( $insertion, $paragraph_id, $content ) { $closing_p = '</p>'; $paragraphs = explode( $closing_p, $content ); foreach ($paragraphs $index => $paragraph) { if ( trim( $paragraph ) ) { $paragraphs[$index] .= $closing_p; } if ( $paragraph_id == $index + 1 ) { $paragraphs[$index] .= $insertion; } } return implode( '', $paragraphs ); }

SQL Server : select with "Value or All" -

i have table t1 columns id1 , id2 . i need write 1 "select" stored procedure this create sp_gett1byid1andid2 @id1 varchar(50), @id2 varchar(50) begin select * t1 // if (id1 = "all" , id2 = "all") have return data in table t1 // if (id1 = "all" , id2 != "all") have filter data according id2 // if (id1 != "all" , id2 = "all") have filter data according id1 // if (id1 != "all" , id2 != "all") have filter data according id1 , id2 end select * your_table (@id1 = 'all' or id1 = @id1) , (@id2 = 'all' or id2 = @id2)

linux - "Syntax error:word unexpected(expecting ")" )" when installing Qt using a .run file -

i tried install qt on linux using .run this: #sudo ./qt-opensource-linux-x64-5.6.0.run ./qt-opensource-linux-x64-5.6.0.run:1:./qt-opensource-linux-x64-5.6.0.run:syntax error:word unexpected(expecting")") when did this, got error saying syntax error:word unexpected(expecting")") , tried arm-linux-gcc-static failed. i'm working on ubuntu 17.04, need command on debian. how install qt-opensource-linux-x64-5.6.0.run ?

jquery - Javascript flot not showing data series -

i'm using flot display data on bar graph. data isn't displaying reason, , have no idea why. my data series correct far can see, still won't show. jsfiddle: http://jsfiddle.net/9jhpyne4/1/ code: var plotdata = [ [1, 12.35], [2, 34.6], [3, 56.7], [4, 4.35] ]; $.plot($("#main-chart"), plotdata, { bars: { show: true, linewidth: 0, fill: true, fillcolor: { colors: [{ opacity: 0.8 }, { opacity: 0.1 }] } } }); data pass plot function needs have metadata (like label , color): var data = [ [1, 12.35], [2, 34.6], [3, 56.7], [4, 4.35] ]; var dataset = [{ label: "a label", data: data, color: "red" }]; https://jsfiddle.net/9jhpyne4/3/

java - Abstract class cannot be instantiated -

i had create point program year ago, year ago worked fine. have revisit , upon compiling , trying run ran error of fact abstract class cannot instantiated. have done looking around online , figured out update or sort java has made method of using pointclass point1 = new pointclass(); no longer valid , through error. i have yet find answer fixing error when trying instantiate class using driver program. saw in order use abstract class now, subclass must present. thing is due instructions of program cannot use subclass. driver , point class. the program simple, declare points , call them abstract class in order print screen. need on figuring out updated method make work again without instantiated error. the pointclass public abstract class pointclass { private int pointx; private int pointy; //set instance variables public pointclass() { this.pointx = 10; this.pointy = 10; } public pointclass(int x, int y){ this.pointx = x; this.pointy = y; } //mak

javascript - Angular 2.0, Typescript and 'FORM_DIRECTIVES' module -

i using angular 2.0 alfa 35. when importing form_directives (which new name formdirectives on alfa 35) getting typescript error: error ts2305: module '"angular2/angular2"' has no exported member 'form_directives'. is bug in ts definitions? can fix/override it? as of today angular 2 beta should be: import {form_directives} 'angular2/common'

Handling HTTP session timeout and redirect in Eclipse RAP application -

i working on eclipse rap application (rcp web application). after servlet container has invalidated httpsession (session timeout, setmaxinactiveinterval exceeded) following exception thrown when clicking on application in browser: java.lang.nullpointerexception @ org.eclipse.rap.rwt.internal.service.lifecycleservicehandler.service(lifecycleservicehandler.java:66) @ org.eclipse.rap.rwt.engine.rwtservlet.handlevalidrequest(rwtservlet.java:135) ... so implemented javax.servlet.filter detects situation , should redirect somewhere display "session timeout, please reload" message. my preferred solution "session timeout" warning simple html5 page link application. don't know how integrate html5 pages rap application (and whether idea start with). not clear how , redirect should happen. for redirecting tried 2 variations in filter. first 1 gives me "error: syntaxerror: json.parse: unexpected character @ line 1 column 1 of json data": httpservletr

Trying to combine 2 data.frame on R with rbind and getting a error in match.names(clabs, names(xi)) : names do not match previous names -

trying combine 2 data.frame on r rbind line of code data.combined <- rbind(train, test.survived) getting error in match.names(clabs, names(xi)) : names not match previous names the solution problem following codeline while adding survived variable use this: test.survived <- data.frame(survived = rep("none", nrow(test)), test[,]) instead of this: test.survived <- data.frame(survived = rep("none", nrow(test)), test[,]) the difference capital "s" survived row data given in manner

ios - App crash on sendEvent method -

when rotate app twice after selecting few items, crashes. have overridden sendevent method , that's debugger stops. when try print event type, shows me weird (i think it's memory location doesn't exist): (lldb) print event.type (uieventtype) $r10 = <invalid> (0xff) somehow think related how handle rotation. have master-detail style application, uses different type of navigation pad-landscape, pad-portrait , phone. have created class named navigationflowcontroller handles navigational events , sets views accordingly. on rotation, breaks view trees , recomposes them correct navigation func changeviewhierarchyfordevideandorientation(neworientation:uiinterfaceorientation? = nil){ print("ma - calling master layout method") uiapplication.mydelegate().window?.frame = uiscreen.mainscreen().bounds let idiom = uidevice.currentdevice().userinterfaceidiom var orientation:uiinterfaceorientation! if let no = neworientation{ orienta

laravel - Clear views cache on Lumen -

Image
few weeks ago, had same problem in laravel 5.1, solve this solution . however, i'm facing same issue in lumen, can't call php artisan view:clear clear cached files. there other way? thanks! there's no command view cache in lumen, can create own or use mini package found @ end of answer. first, put file inside app/console/commands folder (make sure change namespace if app has different app): <?php namespace app\console\commands; use illuminate\console\command; class clearviewcache extends command { /** * name , signature of console command. * * @var string */ protected $name = 'view:clear'; /** * console command description. * * @var string */ protected $description = 'clear compiled view files.'; /** * create new command instance. * * @return void */ public function __construct() { parent::__construct(); } /** * execu

string - PHP preg_replace not replacing anything -

can tell me why when run code preg_replace function seems nothing? <?php $string = 'waka http://video.webmfiles.org/big-buck-bunny_trailer.webm waka'; $search = '#http\:\/\/.\.webm #'; $replace = '<video width="320" height="240" controls><source src="$1" type="video/webm"></video>'; $url = preg_replace($search,$replace,$string); echo $url; ?> is $search string wrong? if so, how can fix it? it's suppose replace strings starting in http:// , ending in .webm , surround them html code needed play .webm video. here's how i'd this... $string = 'waka http://video.webmfiles.org/big-buck-bunny_trailer.webm waka'; $search = '/(https?\:\/\/.+?\.webm)\h/'; $replace = '<video width="320" height="240" controls><source src="$1" type="video/webm"></video> '; $u

ios - swift xcode stack view option is not shown -

Image
i using swift on xcode version 6.4 (6e35b) , trying add views stack view. when select views , choose editor -> embed in , don't have stack view option. also @ button right of canvas, can't see stack view button, see in screenshot. how can find please? many efforts. you need upgrade xcode 7 , use latest sdk (ios 9). (i'm assuming wish use new uistackview controller, not exploded view / layering tool). if take xcode 7 beta can run them in same machine side-by-side (since name xcode-beta.app, recall). in fact, can release versions - name them appropriately. sure change version @ command line if you're doing things there well: see xcode select

How to make django admin site support non-standard American English characters -

is there way admin site support special characters ó á ¿?, etc ? every time want update textfield, using admin site, containing nonenglish characters 'ascii' codec can't encode character u'\xbf' is there way change that? edit 1: adding details model class question(models.model): question = models.textfield() and question register on admin.site, when want save text similar "¿cúal fue la descripción?" , click on save error page message: 'ascii' codec can't encode character u'\xbf' so had add model: def __unicode__(self): return u'%s' %(self.question)

Strange "Undefined reference" error on C++ Netbeans project -

this question has answer here: why can templates implemented in header file? 13 answers the solution duplicate question did not work i have following files: listaenc.hpp #include "elemento.hpp" template<typename t> class listaenc { public: listaenc(); ~listaenc(); // inicio void adicionanoinicio(const t& dado); t retiradoinicio(); void eliminadoinicio(); t pegarhead(); // posicao void adicionanaposicao(const t& dado, int pos); int posicao(const t& dado) const; t* posicaomem(const t& dado) const; bool contem(const t& dado); t retiradaposicao(int pos); // fim void adiciona(const t& dado); t retira(); // especifico t retiraespecifico(const t& dado); void adicionaemordem(const t& data); // outras bool listavazia() const; bool igual(t dado1,

python - Pandas can't join DataFrames after set_index with exception `IndexError: index 2 is out of bounds for axis 0 with size 2` -

when run code below join operation throws indexerror: index 2 out of bounds axis 0 size 2 . if change index's name before write file works, in context i'm trying use file writing operation hard change. to fair, pandas version bit old: 0.12.0. can't find evidence pandas bug has been fixed, wrong. import os import pandas pd filepath = os.path.expanduser("~/desktop/foo.csv") def write_df(filepath): # http://pandas.pydata.org/pandas-docs/version/0.16.2/dsintro.html#from-dict-of-series-or-dicts d = {'one' : pd.series([1., 2., 3., 4.], index=['a', 'b', 'c', 'd']), 'two' : pd.series([5., 6., 7., 8.], index=['a', 'b', 'c', 'd'])} df = pd.dataframe(d) #df.index.name = "letter" # fixes df.to_csv(filepath) def read_df(filepath): df = pd.read_csv(filepath) # inplace = false not here df.rename(columns={'unnamed: 0': 'letter&

java - Unable to run Spring REST application using Tomcat -

Image
i have spent weekend trying run simple spring rest applications. lots of examples on net. however, whenever got running these, application give me 404 - resource not found exception. ensure doing right, restarted applications scratch few times. if go project folder , run mvn tomcat7:run project works expected. however, when adding project tomcat7 server inside eclipse , running there, 404 error. any ideas on going wrong appreciated. i think problem src/main/java folder , said manually create it. did not add source after create it? update import code eclipse,and modify web module path ,and worked. here snap: and test url hope useful.

Logging from Java app to ELK without need for parsing logs -

i want send logs java app elasticsearch, , conventional approach seems to set logstash on server running app, , have logstash parse log files (with regex...!) , load them elasticsearch. is there reason it's done way, rather setting log4j (or logback) log things in desired format directly log collector can shipped elasticsearch asynchronously? seems crazy me have fiddle grok filters deal multiline stack traces (and burn cpu cycles on log parsing) when app log desired format in first place? on tangentially related note, apps running in docker container, best practice log directly elasticsearch, given need run 1 process? i think it's ill-advised log directly elasticsearch log4j/logback/whatever appender, agree writing logstash filters parse "normal" human-readable java log bad idea too. use https://github.com/logstash/log4j-jsonevent-layout everywhere can have log4j's regular file appenders produce json logs don't require further parsing logstas

ruby on rails - PG::UndefinedTable: ERROR: relation "..." does not exist -

on migration following error message: pg::undefinedtable: error: relation "actioncodes" not exist : alter table "organizations" add constraint "fk_rails_4ecaa2493e" foreign key ("actioncode_id") references "actioncodes" ("id") i have following migration file organizations: class createorganizations < activerecord::migration def change create_table :organizations |t| t.string :name, null: false, limit: 40 t.references :actioncode, index: true, foreign_key: true t.boolean :activated t.datetime :activated_at t.timestamps null: false end end end and actioncodes have migration file: class createactioncodes < activerecord::migration def change create_table :actioncodes |t| t.string :code, null: false, limit: 20 t.string :description, limit: 255 t.timestamps null: false end end end clas

How to process tab-separated files in Spark? -

i have file tab separated. third column should key , entire record should value (as per map reduce concept). val ceffile = sc.textfile("c:\\text1.txt") val cefdim1 = ceffile.filter { line => line.startswith("1") } val joinedrdd = ceffile.map(x => x.split("\\t")) joinedrdd.first().foreach { println } i able value of first column not third. can suggest me how accomplish this? after you've done split x.split("\\t") rdd (which in example called joinedrdd i'm going call parsedrdd since haven't joined yet) going rdd of arrays. turn array of key/value tuples doing parsedrdd.map(r => (r(2), r)) . being said - aren't limited map & reduce operations in spark possible data structure might better suited. tab separated files, use spark-csv along spark dataframes if fit eventual problem looking solve.

android - How to swipe between Fragments with FragmentPagerAdapter -

i can't figure out why swiping between fragments isn't working, here custom fragmentpageradapter : public class tabspageradapter extends fragmentpageradapter { public tabspageradapter(fragmentmanager fm) { super(fm); } @override public fragment getitem(int index) { switch (index) { case 0: return new prearrivalplan(); case 1: return new primarysurvey(); case 2: return new vitals(); case 3: return new secondarysurvey(); case 4: return new preparefortravel(); } return null; } @override public int getcount() { // item count - equal number of tabs return 5; } } and here activity uses it: public class mainactivity extends fragmentactivity implements actionbar.tablistener { private customviewpager viewpager; private tabspageradapter tabspageradapter; private actionbar actionbar; private string[] tabtitles = {"pre-arrival plan&qu

java - Create a PDF according to a given format using the iText library -

Image
i'm working on small project in java, there want fetch contents database , write them pdf file. i tried googling , came itext library . can guide create pdf looks enclosed image ps: i'm pretty new java.and it's first java project. i've done quick implementation of of use-case. here's code: first define small class acts single record in invoice. static class article{ int sno; string description; int quantity; double unitprice; public article(int sno, string description, int quantity, double unitprice) { this.sno = sno; this.description = description; this.quantity = quantity; this.unitprice = unitprice; } } then i've created method each of big blocks in invoice. starting title: public static void addtitle(document layoutdocument) { layoutdocument.add(new paragraph("retail invoice").setbold().setunderline().settextalignment(textalignment.center)); } then ad

javascript - mongoose object relationship -

i trying create new access token object. in debugger, can see user._id value returned correctly. when assigned token user field, value of token.user._id undefined , token.user.id garbage value. same behaviour observed after saving token. exports.create = function(user, client, deviceid, done) { if (!user) return done(new error('failed create client without user')); var token = new accesstoken({ user: user._id, client: client._id, deviceid: deviceid }); token.save(function(err) { if (err) return done(err); return done(null, token); }); }; with var token = new accesstoken({ user: user._id, client: client._id, deviceid: deviceid }); you're assigning user's id user can use token.user . if want access user's id token.user._id should : var token = new accesstoken({ user: user, client: client._id, deviceid: deviceid }); but have use .populate('user') when q

Breaking the loop properly in Python -

currently trying upload set of files via api call. files have sequential names: part0.xml, part1.xml, etc. loops through files , uploads them properly, seems doesn't break loop , after uploads last available file in directory getting error: no such file or directory. and don't understand how make stop last file in directory uploaded. dumb question, lost. how stop looping through non-existent files? the code: part = 0 open('part%d.xml' % part, 'rb') xml: #here goes api call code part +=1 i tried this: import glob part = 0 fname in glob.glob('*.xml'): open('part%d.xml' % part, 'rb') xml: #here goes api call code part += 1 edit: thank answers, learned lot. still lots learn. :) your for loop saying "for every file ends .xml "; if have file ends .xml isn't sequential part%d.xml , you're going error. imagine have part0.xml , foo.xml . for loop going loop twice; on sec

c# - Akka.net DI - How to inject two actors thru DI? -

what trying pass 2 actors (mummy actor , daddy actor) kid actor. it's best practice use actor reference instead of actor, used iactorref both mummy actor , daddy actor injected thru di named parameter. getting "mummyactor not unique" error. idea how solve it? using system; using system.threading.tasks; using akka.actor; using akka.di.autofac; using akka.di.core; using autofac; using autofac.core; namespace akka.di.autofac.exampleconsole { public class daddyactor : receiveactor { public daddyactor() { receive<doneeatingmessage>(m => { console.writeline("kid finished eating. what? ~ dad"); }); } } public class mummyactor : receiveactor { public mummyactor() { receive<doneeatingmessage>(m => { console.writeline("kid finished eating. time clean up! ~mummy"); }); } } public class kidactor : receive

php - MediaWiki: How do you put a period after the heading number? -

i've been unable find answer following online. i've enabled auto-numbered headings in mediawiki adding following localsettings.php: $wgdefaultuseroptions['numberheadings'] = 1; however, i'd there period after heading number, distinguish heading. that is, i'd like: 2. heading instead of: 2 heading however, i'd prefer number not have period after in case of sub-headings. that is, i'd like: 2.1 heading not: 2.1. heading does know how this? thanks in advance help the space hardcoded, see parser.php , have modify after created. best shot use the parsersectioncreate hook, or possible parserbeforetidy if want frontend: loop through headings class mw-headline-number , , apply logic there. also note these changes affect users have enabled numberheadings features in settings, or registered after changed default setting. edit: might want check language user viewing wiki in first, trailing dot might not used languages

asynchronous - Code after NSURLSession runs before session is over - Swift -

i have app accesses website , downloads html site, converts string, grabs information string, , uses app. problem code extracting string runs before data can loaded. tried putting code in completion handler, either didn't fix problem, or did wrong. here code: for var = 0; <= textviewcontentarray.count - 1; i++ { var dontcount = false istaskcomplete = false var currentword = textviewcontentarray[i] let url = nsurl(string: "http://words.bighugelabs.com/" + currentword) var request: nsurlrequest = nsurlrequest(url: url!) let config = nsurlsessionconfiguration.defaultsessionconfiguration() let session = nsurlsession(configuration: config) let task : nsurlsessiondatatask = session.datataskwithrequest(request, completionhandler: {(data, response, error) in if error == nil { //getting string url data let urlcontent = nsstring(data: data!, en

php - Use 301 Redirection Code But Finding 302 from Header Checker Tool -

right using ssl 3 sits , config on website. using apache server godaddy . i have redirect http:// https:// htaccess . using 301 redirection code , are: rewritecond %{server_port} 80 rewriterule ^(.*)$ https://www.your domain name.com/$1 [r,l] but finding redirection 302 header tool screaming frog. is there right solutions that?

PHP Mysql Update Query not working -

i have stupid question. before start know using deprecated version of mysql, haven't come around learn mysqli or pdo yet, soon. i have been working on whole administrative system, , have gotten point i'm creating functions administrators edit other accounts. i've made whole system on 1 page , code becoming little messy (this why i'm getting error). well i'll begin problem now: have update query doesn't seem working. form follows: <form action="" method="post"> <table class="table table-profile"> <thead> <tr> <th colspan="2"> <h4><?php echo $username; ?> <small><?php echo $fullname; ?></small></h4> </th> </tr> </thead> <tbody> <tr> <td colspan="2"><input type="hi