Posts

Showing posts from August, 2013

php - Website security - help me suck less -

php - Website security - help me suck less - i'm bit behind times when comes website security. know basics - validate incoming data, escape info beingness saved db, utilize salt passwords, etc. sense there's lot i'm missing can bite me in butt. true slow migration .net. i'm not sure how replicate know in php in .net. so, below things i've been thinking i'm sure need help with. problem: securing sessions php: utilize session_regenerate_id() whenever user important. .net: no thought how replicate here. general: else missing? problem: xss php: utilize htmlentities() convert potentially unsafe code can rendered (mostly) harmlessly. .net: believe in mvc, using <%: %> tags in view same thing. general: there more can block javascript? denying html entirely? how 1 secure textarea? problem: remote execution php: utilize regex find , remove eval() function calls. .net: unsurprisingly, no idea. general: again, there more should for? prob...

powershell - How can I compress my $path on Windows? -

powershell - How can I compress my $path on Windows? - windows has 260 character limit path. i've blown way past it, , it's aggravating. i'd find way bypass that. so far, i've had thought of writing script in powershell path variable, parse it, , set path windows shortpath representations of strings inside. here's have far: function get-shortname { begin { $fso = new-object -comobject scripting.filesystemobject } process { if ($_.psiscontainer) {$fso.getfolder($_.fullname).shortname} else {$fso.getfile($_.fullname).shortname} } } function get-shortpath { begin { $fso = new-object -comobject scripting.filesystemobject } process { if ($_.psiscontainer) {$fso.getfolder($_.fullname).shortpath} else {$fso.getfile($_.fullname).shortpath} } } i'm total beginner powershell, , i'm stumped how parse semicolon delimited list $env:path returns...

c# - MVC-5: Show Full Names -

c# - MVC-5: Show Full Names - i show fullname computed property @ top of view. can see fullname property when @ autos log. lambda look used in html helper shows property name, not data. there way display info log seems show available? update: the finish view: @model ienumerable<slamjammersdata.model.attendances> @{ viewbag.title = "rosters"; } <div class="container container-fluid"> <div class="panel panel-info"> <div class="panel-body"> <div class="container"> @using (html.beginform("index", "attendances", formmethod.get)) { <div class="row"> <div class="col-md-4"> <p> <h3>attendances player: @html.displaynamefor(model => model.fullname) </h3> ...

jquery - fabric js clone path-group type object -

jquery - fabric js clone path-group type object - i'm trying in fabricjs clone svg object. ok first time clones 2 times , 4 , on. couln't find solution problem. here tried: $('#duplicate-item').on('click', function(event) { event.preventdefault(); var obj = selectedobject; if (fabric.util.getklass(obj.type).async) { obj.clone(function (clone) { clone.set({ left: 200, top: 100 }); canvas.add(clone); }); } }); i added little code loads svg image , adds on canvas. same way (select svg , press button) can clone svg object. hope helps. var site_url = 'http://fabricjs.com/assets/1.svg'; fabric.loadsvgfromurl(site_url, function(objects) { var grouping = new fabric.pathgroup(objects, { left: 165, top: 100, width: 295, height: 211 }); canvas.add(group); canvas...

ios - Setting label with property observer in UITableViewCell, what's happening -

ios - Setting label with property observer in UITableViewCell, what's happening - in custom uitableviewcell when property set, if there no label create label , set text etc. if label exists, shouldn't anything. unusual thing is, when tap cell first time creates label should be. when tap cell again, label disappears. i've recreated in clean project , same thing happening. what's cause of odd behavior? customtableviewcell: class tableviewcell: uitableviewcell { var numberlabel: uilabel! var views = [string: uilabel]() var number: int = 5 { didset { println("amount: accessed") if numberlabel == nil { println("amount: amount nil") // create amount label numberlabel = uilabel() if number > 0 { numberlabel.text = string(number) } numberlabel.settranslatesautoresizingmaskintoconstraints(false) contentv...

c++ - Opencv height/width of part of image -

c++ - Opencv height/width of part of image - i've image 1 ![enter image description here][1]. non-black part expanded @ each iteration. so, after point, need enlarge final image non-black 1 can fit in. now, i'm doing find contour of non-black image,find bounding box of contours , check width/height of box. @ first time works, after iterations programme finds bounding box of size 1 (it seems doesn't find contour). problem be? ps: programme mosaic video file, followed opencv tutorial find homography , other stuff. edit sorry had remove images just suggestion: it's easier iterate through each element in matrix , record coordinates of uppermost, bottommost, leftmost , rightmost non-zero elements. these 4 corners of up-right bounding rectangle. of course of study not rectangle of minimum area enclosing non-zero pixels (not rotated rectangle), farther can used roi. c++ opencv contour bounding-box image-stitching

hashtable - how to perform opertions on a hash table? -

hashtable - how to perform opertions on a hash table? - for illustration hash function hash(x) = x mod 10. perform operation on examples , create hash table add(17, a) remove(17) add(27, a) add(27,b) how perform operation on , create hash table? hashtable

c++ - Identifying squares of dots with opencv -

c++ - Identifying squares of dots with opencv - i have image 4 squares of points in it, each 4 corner points , other, interior points... what best way identify each separate square can process individually mat, or roi? they may tilted, sides in 2d might not equal, each have same number of points, , each can contained in 4-sided polygon. i have this: http://i58.tinypic.com/wwdw0l.jpg ...and want this: http://i59.tinypic.com/2dm9gtl.jpg many thanks. c++, visual studio, opencv first of all, little blobs should detected, i.e. through cv::simpleblobdetector class, using cv::kmeans() find centers of blob clusters , grouping blobs around clusters, finally, cv::minarearect() find rotated rectangle of minimum area enclosing clustered 2d point set. c++ opencv

ssl - PJSIP TLS verify error (PJSIP_TLS_ECERTVERIF) -

ssl - PJSIP TLS verify error (PJSIP_TLS_ECERTVERIF) - i have started develop tiny sip softphone application using pj project , gtk+. main goal create softphone supports both tls , srtp encryption (and mwi). have got stuck right @ part library registers business relationship because application has failed verify server when asked it. thought misunderstood while coding i'm newbie today i've tested library using pjsua application attached in source code , register sip business relationship unless i've started programme --tls-verify-server flag. create clear i've created asterisk own certificate authority, keys , certificate , i've installed ca machine. must note setup works commercial software, can verify certificate without problem. the pjsua flags i've used: --use-tls --tls-ca-file /etc/ssl/certs/ca-certificates.crt --id=sip:u-kuklinistvan1@kingdom.info.tm;transport=tls --registrar=sip:kingdom.info.tm;transport=tls --realm=kingdom.info.tm --username...

php - Why won't my foreign key create in MySQL? -

php - Why won't my foreign key create in MySQL? - i've tried many different ways create table foreign key , trying insert phpmyadmin. however, not working expected. here i've far: create table user ( user_id bigint(10) unsigned auto_increment primary key, user_name varchar(50) not null, user_password varchar(50) not null); this works fine. however, if seek add together table foreign key thus, refuses create: create table article ( article_id int(20) unsigned auto_increment primary key, article_title varchar(100) not null, article_content varchar(1000) not null, user_id int(10) not null, foreign key (user_id) references user (user_id)); this not work expected , not add together table mysql database. error: cannot add together foreign key constraint how can prepare it? we discovered in comments if primary key defined thus: user_id bigint(10) unsigned then foreign key not work, since needs match on ...

jquery dynamic select append options expecting alert("text") -

jquery dynamic select append options expecting alert("text") - i have pulled info backend using ajax/json, , trying append info select box using jquery. info appended select box properly, showing on page when set alert("some text") . here code: jquery.ajax({ url: "the_url.php" success: function(data) { var comp_select = jquery("select[class='xf-depselect-selector depselect-fragment']").get(3); alert("ready now"); (var = 0; < data.length; i++) { jquery(comp_select).append(jquery('<option>', { value: data[i]["component_name"] }).text(data[i]["component_name"])); } }, complete: function() {}, async: false, datatype: 'json' }); jquery select dynamic append xataface

java - Multi-Band Image raster to RGB -

java - Multi-Band Image raster to RGB - i have image dataset multiband dataset of arff format. looks this: 8.3000000e+001 9.3000000e+001 9.6000000e+001 7.5000000e+001 1.0000000e+000 8.3000000e+001 9.3000000e+001 9.6000000e+001 7.5000000e+001 1.0000000e+000 8.3000000e+001 9.3000000e+001 9.6000000e+001 7.5000000e+001 1.0000000e+000 8.3000000e+001 9.3000000e+001 9.6000000e+001 7.5000000e+001 1.0000000e+000 7.4000000e+001 8.4000000e+001 8.6000000e+001 7.1000000e+001 1.0000000e+000 7.4000000e+001 8.4000000e+001 8.6000000e+001 7.1000000e+001 1.0000000e+000 7.4000000e+001 8.4000000e+001 8.6000000e+001 7.1000000e+001 1.0000000e+000 7.4000000e+001 8.4000000e+001 8.6000000e+001 7.1000000e+001 1.0000000e+000 the first 4 attributes specify multiband values of pixel , lastly attribute specifies class label. possible convert rgb format? have java code classify image based on rgb values. if right reply yes clarification how see it: you got 4 bands ...

google app engine - GAE python webapp2 authentication setting max token age -

google app engine - GAE python webapp2 authentication setting max token age - i'm using webapp2 authentication based on next article: http://blog.abahgat.com/2013/01/07/user-authentication-with-webapp2-on-google-app-engine/ currently 1 time user has logged in, remain logged in 3 weeks until logs out. i'd happens when user has checked "remember me" checkbox. if box not checked, should expire session finished. currently when user logs in, next code used login , set token: self.auth.get_user_by_password(username, password, remember=true, save_session=true) what recommended way this? found documentation in next link, not sure how implement this. https://webapp-improved.appspot.com/api/webapp2_extras/auth.html i didn't figure out how set actual max_age, setting remember=false, user logged_out session ends. therewith login is: self.auth.get_user_by_password(username, password, remember=false, save_session=true) python google-app-...

android - Appium: Unable to launch the application in real device -

android - Appium: Unable to launch the application in real device - i'm new appium. have installed pre-requisite , run script in eclipse got below error in console. please help me. script: public void testsample() throws malformedurlexception{ desiredcapabilities cap = new desiredcapabilities(); cap.setcapability(mobilecapabilitytype.version,"4.0.4"); cap.setcapability(mobilecapabilitytype.platform_name, "android"); cap.setcapability(mobilecapabilitytype.device_name,"yt9100lvgt"); cap.setcapability(mobilecapabilitytype.app_package, "com.android.calculator2"); cap.setcapability(mobilecapabilitytype.app_activity, "com.android.calculator2.calculator"); androiddriver driver = new androiddriver(new url("http://127.0.0.1:4723/wd/hub"),cap); error in console: org.openqa.selenium.sessionnotcreatedexception: new session not created. (original error: 'java -version' failed. error: c...

plot - R: xlab of multiple variables being cut off in barplot -

plot - R: xlab of multiple variables being cut off in barplot - hi have r barplot barplot(data, xlab = num, cex.names = 0.5) the label created num <- c(var1, var2, var3) when plot created each variable takes newline , lastly cutting off. there way create them go on same line? thanks these types of values in vector plus how obtained in code. examplefunc<-function(word="category") rangestart<-rangestartvaluesvectorized[1] rangeend<-rangeendvaluesvectorized[length(rangeendvaluesvectorized)] num<-as.character(c(word, rangestart, rangeend)) result<-barplot(info, main="mean plot", xlab=num,cex.names=.5) rangeend=1000 rangestart=2000 you need utilize little paste trick turn string of length 3 string of length 1 same contents: rangestart <- 5 rangeend <- 22 word <- "category" label <- c(word, as.character(c(rangestart, rangeend))) label <- paste(label, collapse = " ") barplot(vad...

php - Adding some more fields to the form in yii2 using ajax -

php - Adding some more fields to the form in yii2 using ajax - i have yii2 form : <?php $form = activeform::begin(['id' => 'que']); ?> <?php echo $form->field($model, 'type') ->dropdownlist($questiontypes, [ 'class' => 'form-control ng-pristine ng-valid ng-touched', 'prompt' => 'select question type', 'ng-model' => 'que.type', 'ng-change' => 'addansweroptions(que);', ]); ?> <?php activeform::end(); ?> on basis of selected dropdown value, have add together more fields same form of same model. fields added, totally depend on dropdown value. how can this? from info give out here suggest. 1) dynamic - no ajax build form fields need, contain each "scenario" in separate div follows: <?php $form = activeform::begin(['id' => ...

asp.net - How process JSON encounter Null DateTime column -

asp.net - How process JSON encounter Null DateTime column - oracle db dds new column type datetime because default = null run here have error t.t datatable dt = sql.filltable(); string rtnjson = jsonconvert.serializeobject(dt, formatting.indented); // ↑ // oracle db dds new column type datetime // because default = null // run here have error t.t // ↓ datatable dt = jsonconvert.deserializeobject<datatable>(jsonstring); asp.net json oracle datetime null

Java Audio - How to play song during game (Application, not Applet) -

Java Audio - How to play song during game (Application, not Applet) - last edit - 2 simple answers needed. 1) able code working url (it's code 1 of responses below). song in wav file. when seek file url = new file("---");, doesn't work. instead, in stack trace (thanks tip!), says "failed allocate clip data: requested buffer large" the song i'm trying play techno, 3 minutes long. how work around clip info size issue? look @ classes of java sound api sampled sound. particularly clip interface , audiosystem class. java sound uses spi add together back upwards formats defaults built in j2se. can add together jmf based mp3plugin.jar provide back upwards mp3s javasound. playing wavs in loop, see little example.. import java.net.url; import javax.sound.sampled.*; public class loopsound { public static void main(string[] args) throws exception { url url = new url( "http://pscode.org/media/leftright.wav...

delphi - TListViewItem Checked property isn't visually synced -

delphi - TListViewItem Checked property isn't visually synced - i have tlistview, add together new item when user drops file onto it. when clicks on item toggles between checked , unchecked states. procedure tmainform.ui_worklistitemclickex(const sender: tobject; itemindex: integer; const localclickpos: tpointf; const itemobject: tlistitemobject); begin tlistview(sender).items[itemindex].checked:=not tlistview(sender).items[itemindex].checked; end; the problem is, visually nil happens. delphi firemonkey delphi-xe7

android - Trying to creat a layout whare one text view is on the left hand side and the other on the left hand side -

android - Trying to creat a layout whare one text view is on the left hand side and the other on the left hand side - i'm trying create a layout have 1 text view on right, other on left. i set each set of text views in horizontal container width set fill_parent. first text view has gravity set right. next text vie has gravity set right. both text views drawn on right side <scrollview android:layout_height="fill_parent" android:layout_width="fill_parent"> <linearlayout android:id="@+id/mainlayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <textview android:id="@+id/textmarketnam...

How to store multiple movie titles in an array in java using a for loop -

How to store multiple movie titles in an array in java using a for loop - i working on project school, in must prompt multiple film titles, , amount of copies of each film , store them in array. however, appears though each time inquire new title, writes on lastly title(s). have 2 files rentalplace.java , video.java (the contents of both included @ bottom). prompting 3 movies entered. looks this: title of video?lion kingnumber of copies?3title of video?finding nemonumber of copies?5title of video?monsters inc.number of copies?1 what happens when input these answers on lastly iteration (where set in "monsters inc.") prints spaces in array. this: title ----------#copies-------#available monsters inc-----1---------------1 monsters inc-----1---------------1 monsters inc-----1---------------1 i need find way without overwriting previous values in array first position [0] show "lion king" , sec position [1] show "finding ...

Openssl handshake failed when using getInputStream() on Facebook profile picture in android sdk -

Openssl handshake failed when using getInputStream() on Facebook profile picture in android sdk - i trying create user profile page app. succeed connecting facebook, have user basic profile using userprofile = profile.getcurrentprofile(); trying create drawable of user profile image set in image view. created inputstream fetch image(running on asynctask) bitmap x; url = new url("https://graph.facebook.com/939344862743414/picture?height=200&width=200"); httpurlconnection connection = (httpurlconnection) url.openconnection(); connection.setrequestproperty("user-agent","mozilla/4.0"); connection.setconnecttimeout(100000); connection.connect(); bufferedinputstream buf = new bufferedinputstream(connection.getinputstream()); x = bitmapfactory.decodestream(buf); however no matter do,the app failed , crash when reach connection.getinput...

Using enumerate loop to update a list of dicts in python not working as expected -

Using enumerate loop to update a list of dicts in python not working as expected - this question has reply here: python list of lists, changes reflected across sublists unexpectedly 7 answers i have list of dictionaries in python. want update 1 key:value pair dicts unique values instead of them getting same value. here's code: num_cntxts=4 pkt_eop =[{'type' : 'eop', 'number':1}] pkt_eop_pattern = pkt_eop*num_cntxts #i want add together 'cntxt' key each of 4 dicts #which should have value list position i,pkt_eop_inst in enumerate(pkt_eop_pattern): print i,pkt_eop_inst pkt_eop_inst['cntxt']=i >0 {'cntxt': 0, 'type': 'eop', 'number': 1} 1 {'cntxt': 2, 'type': 'eop', 'number': 1} 2 {'cntxt': 4, 'type': 'eop', 'number...

Using ajax to post multiple checkbox selection for google forms -

Using ajax to post multiple checkbox selection for google forms - i'm trying post google spreadsheet using modified version of form generated. i'm using json script populate list of checkboxes selecting , able display fine. however, when trying post form using javascript/ajax i'm running issues. followed directions @ base22 me there, checkbox info giving me problems. using firebug , original form see each checked checkbox should posted such: entry.978961699 alternative 1 entry.978961699 alternative 2 however, i'm not sure how this. i'm able different variations: entry.978961699[] alternative 1 entry.978961699[] alternative 2 or entry.978961699 alternative 1, alternative 2 or entry.978961699[arrayname[]][] alternative 1 entry.978961699[arrayname[]][] alternative 2 none of allow form post. can point me in right direction? thanks. ajax google-form

asp.net - Is it possible to send email if IIS/SMTP agents are not installed on my pc? -

asp.net - Is it possible to send email if IIS/SMTP agents are not installed on my pc? - is possible send email using asp.net if local pc dont have iis/smtp agent installed. ps i'm using windows 7 i've tried loads of code: i'm using dim message new mailmessage("abc@xyz.com", "pqr.@xyz.com", "sub: testing email", "sending email vai asp.net") dim emailclient new smtpclient("xxx.xxx.xxx.xxx") emailclient.send(message) msgbox("message sent") error message: no connection made because target machine actively refused [webexception: unable connect remote server] [smtpexception: failure sending mail.] smtp not have installed on same server ip address should permitted. you can utilize gmail own business relationship smtp server. asp.net vb.net smtp

java - Auto redeploy JavaScript and html files in InteliJ like Ecplipse -

java - Auto redeploy JavaScript and html files in InteliJ like Ecplipse - i swapped eclipse intelij programme doesn't auto update html, css, js files eclipse. how can alter this? the question not clear, if understand correctly ( lot guess work here ) have create sure deploy project exploded war/ear. then, right click , declare source file in ide each folder containing frontend code need hot swapped. now whenever update resources, frontend changes reflected automatically , won't need re-deployment. java

Using Delphi object constructors on preallocated memory -

Using Delphi object constructors on preallocated memory - in c++, there exists inplace-new operator create object using preallocated memory. there equivalent alternative in delphi? there no direct equivalent (that know of), can accomplish much same effect (controlling how , memory object type allocated) overriding newinstance class function in custom class , providing implementation, provides space new instance custom heap pool. delphi

Getting error when try to pass data from a php file back to JSON javascript -

Getting error when try to pass data from a php file back to JSON javascript - let's me describe i'm working on before inquire question: i'm building clinic queuing management system, in part of system, have 3 files here, index.php, test.php , test.js respectively. ==> test.js send request test.php 2 json data, there $queuenumber , $room stored in test.php. after append new in index.php , under append 2 shows $queuenumber , $room. ==> test.php produce ticket number , room number stored in $queuenumber , $room respectively. ==> index.php file contain 2 table, 1 table header , 1 table show ticket number , room number. the next code of index.php class="snippet-code-html lang-html prettyprint-override"> <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>and san king emr</title> </head> <body> ...

javascript - Proper filtrify month sorting -

javascript - Proper filtrify month sorting - i using flirty plugin on website , works except 1 thing: want month category filter in month order instead of alphabetical order. how possible do? in other words: how can alter sorting order filtrify plugin categories? example: http://test.fantazia-svit.com.ua/tours "Месяц" month in russian. upd: @seamus initialize filtrify, have code: $(function() { $.filtrify("search", "placeholder", { 'close': true, 'match': true, 'noresults': "Критериев нет", callback: function ( query, match, mismatch ) { $('.ft-label').parent() .find('li[data-count=0]').hide().end() .find(':not(li[data-count=0])').show().end(); } }); }); for info show in html: <div data-Месяц="month1, month2, month3">some data</div>' upd since nobody knows...

How to get the deep-link URI of current android activity from outside as a third party app? -

How to get the deep-link URI of current android activity from outside as a third party app? - there detailed explanations of android deep-link tech at: https://developer.android.com/training/app-indexing/deep-linking.html we can search/start/see activity content of app without logging in (first click free), important in connecting apps. created uri activity through android.intent.action.view, , tested through adb am. question: when going code app, want find way uri of current activity of app outside 3rd party app. example, user opened app a, activity of app on screen top. want develop app b this: if user click button or motion when activity of app on screen top, uri of current activity of app obtained , saved in app b. (if there no uri of it, toast notice.) is there way realize this? android android-intent uri deep-linking

ios - Error: updates without prompting for location authorization -

ios - Error: updates without prompting for location authorization - 2015-04-07 13:26:10.767 harita[1690:821533] trying start mapkit location updates without prompting location authorization. must phone call -[cllocationmanager requestwheninuseauthorization] or -[cllocationmanager requestalwaysauthorization] first. in ios8 have write below code self.locationmanager = [[cllocationmanager alloc] init]; self.locationmanager.desiredaccuracy = kcllocationaccuracyhundredmeters; // code check if app can respond new selector found in ios 8. if so, request it. if([self.locationmanager respondstoselector:@selector(requestalwaysauthorization)]) { [self.locationmanager requestalwaysauthorization]; // or [self.locationmanager requestwheninuseauthorization]; } [self.locationmanager startupdatinglocation]; and have add together nslocationalwaysusagedescription , message want display app in plist file. check tutorial http://www.devfright.com/ios-6-core-location-tutorial/ ...

Passing data from Python POST request to PHP -

Passing data from Python POST request to PHP - using php laravel 5. can't seem find out how specific thing. have info in python script. running python command post php method , execute next when hard code api key , secret. $api_key = 1; $api_secret = 'sesame'; //if api id , secret match, oldest job available timestamp before current time status of 0 if ($api_key == 1 , $api_secret == 'sesame') { $current_dt = ''; $current_dt = date('y.m.d h:i:s'); $first_job_that_qualifies = \app\job::orderby('created_at', 'desc') ->where('status', 0) ->where('available_ts', '<', $current_dt) ->first(); if ($first_job_that_qualifies != null){ $first_job_that_qualifies->status = 1; $first_job_that_qualifies->save(); } } } now take hard-coded values away , check them...

java - Implements Runnable over Extends Thread with EJB -

java - Implements Runnable over Extends Thread with EJB - let's class mycoolprocess has logic of app needed called in it's own thread. we'll create thread, phone call , go on application. class ejb; annotated @stateless now have mycontroller class; going phone call new thread. code: public class mycontroller { @ejb mycoolprocess p; public response foo() { thread t = new thread() { public void run() { p.run(); } }; t.start(); // continues ... } } @stateless public class mycoolprocess { public void run() { // heavy task } } that working fine; point is... before solution i've tried runnable interface. wanted @ first time. approach be: public class mycontroller { @ejb mycoolprocess p; public response foo() { thread t = new thread(p); t.start(); // continues ... } } @stateless public class mycoolprocess implements runnable { @override public void run() { ...

scala - "could not find implicit ... flash" in invoking nested view template -

scala - "could not find implicit ... flash" in invoking nested view template - note problem described in "flash not found in products.scala" not same, , has been addressed. the chapter 2 walkthrough in "play scala" book includes "editproduct.scala.html" reads: @(productform: form[product]) (implicit flash:flash, lang:lang) @import helper.twitterbootstrap._ @main(messages("products.form")){ ... } } the play 2.3.8 compiler errors out with: error:(4, 33) play 2 compiler: .../editproduct.scala.html:4: not find implicit value parameter flash: play.api.mvc.flash @main(messages("products.form")){ ^ i interpret mean reason, "flash" on first line not satisfactory invoking "main" template on line 4. "main" template begins with: @(title: string)(content: html)(implicit flash: flash, lang: lang) i don't think it's relevant, controller code...

ssl - How to ensure HTTPS root domain requests are redirected to www for Heroku -

ssl - How to ensure HTTPS root domain requests are redirected to www for Heroku - i'm using wildcard certificate heroku rails 4.2 project provides users subdomains accounts. i've got working have few kinks iron out. if type http://example.com in brower, get's redirected https://www.example.com , resolves fine. however if type https://example.com next in browser unable connect. firefox can't found connection server @ mydomain.com. site temporarily unavailable or busy. seek 1 time again in few moments.... these dns settings @ ----> http://www.example.com url-redirect (this intentional - heroku cant utilize naked domains ssl) www ----> blahblah-1234.herokussl.com cname subdomains * ----> blahblah-1234.herokussl.com. cname as dns 'url-redirect' mentioned above have configured rails rewrite rootdomain requests. (i dont think reqest hitting rails though) i have created middleware rewrite requests 'exampl...

Sharepoint 2010 List item dropdown options cascading -

Sharepoint 2010 List item dropdown options cascading - i have 2 dropdowns "department" , "employees", section dropdown cascades employees dropdown. need select employees departments on alternative "all". note: there no section 'all', has select employees. using $().spservices.spcascadedropdowns http://spcd.codeplex.com/ have tried camquery not achieve. so far, have not found way cascading dropdowns in sharepoint. here few avenues hack way solution: sharepoint designer (spd) has many ways customize (and break) pages. not sure recommend using spd since experiance has caused more side effects solutions far maintainability concerned. if have nintex forms available, there ways psudo-cascading drop downs editing input form. working in enterprise setting sharepoint, has been alternative me. on page fields, include webpart javascript filters list options based on selection of first column. has worked me in past it's been while do...

doctrine - Zend Studio 7.2 showing error on namespaces? -

doctrine - Zend Studio 7.2 showing error on namespaces? - i have these namespaces defined in bootstrap file: use doctrine\common\classloader, doctrine\common\annotations\annotationreader, doctrine\odm\mongodb\documentmanager, doctrine\odm\mongodb\mongo, doctrine\odm\mongodb\configuration, doctrine\odm\mongodb\mapping\driver\annotationdriver; but there error on first line above: syntax error, unexpected 'doctrine', expecting '(' 7.x supposed have namespace support, it's showing errors throughout project. thought why? just thought, have project configured php 5.3 support? our installation here defaults php 5.2 new projects. doctrine zend-studio

Meteor JS on Windows, support for iOS and Android -

Meteor JS on Windows, support for iOS and Android - i wondering if windows version of meteor js supports developing , running ios and/or android apps. i hoping @ to the lowest degree supports android. februar 2016 - works version 1.3-cordova-beta.5. you manually have install jdk (java) adroid sdk try release running meteor update --release 1.3-cordova-beta.5 in app directory. afterwards meteor run android-device works fine see more details here https://github.com/meteor/meteor/issues/6050 android ios windows meteor

javascript - Hiding HTML5 Video Controls -

javascript - Hiding HTML5 Video Controls - im trying implement show , hide video element button here 2 buttons alongside play/pause/restart <div class="rightcontent"> <p class="center">video command options</p> <p class="videocontrols"> <input type="button" value=" play " onclick="video.play()"/> </p> <p class="videocontrols"> <input type="button" value=" pause " onclick="video.pause();" /> </p> <p class="videocontrols"> <input type="button" value=" restart " onclick="video.currenttime =0;"/> </p> <p class="videocontrols"> <input type="button" value=" show controls " onclick="show()"/> </p> <...

c# - Can't Serialize Dictionary with the XML Serializer -

c# - Can't Serialize Dictionary with the XML Serializer - i have problem serializing class. made sure classes component classes public , made sure there non null values in each class variables. there reason why cant serialize this? exceptions: an unhandled exception of type 'system.invalidoperationexception' occurred in system.xml.dll additional information: there error reflecting type 'somenamespace.tmpclass . below code: public class tmpclass : icloneable { public list<string> str_pattern { get; set; } public int grouping { get; set; } public double tp { get; set; } public double sl { get; set; } public int index { get; set; } public int num { get; set; } public string direction { get; set; } public string open; public string close; public tmpclass () { open= "na"; close= "na"; direction = "na"; } public dictionary<string, someclas...

php - Search engine error? -

php - Search engine error? - image of code , phpmyadmin: http://www.dodaj.rs/f/z/d0/2bo43mya/dwm-2015-04-08-19-27-19-.png i thing error in $query = $db->query ... i have 2 errors: notice: trying property of non-object in c:\xampp32\htdocs\ceragem\search.php on line 78 notice: trying property of non-object in c:\xampp32\htdocs\ceragem\search.php on line 82 php code <?php require_once 'connect.php'; if(isset($_get['qsearch'])){ $search = $db->escape_string($_get['qsearch']); $query = $db->query(" select ime, prezime data_users body like'%{$search}%' or ime '%{$search}%' "); ?> <div class="naso_res"> nadjeno je <?php echo $query->num_rows;?> // line 78 </div> <?php if($query-...

python remove http hyperlink -

python remove http hyperlink - i remove hyperlinks tweets instance: have: "reform health care serve patients, not corporate medicine http://t.co/wmkjku4hl7 @pnhp #singlepayersunday http://t.co/i4bnrruuns" want get:"reform health care serve patients, not corporate medicine" how possible? ahead! upon suggestions, rewrite code whole list of tweets. wrote loop, did not work: i tried one, because have list of tweets., did not work for in range(len(cleandata)): finaldata=[] if 'http://' in cleandata[i]: post = cleandata[i] position = post.index('http://') finaldata.append(post[:position]) else: finaldata.append(cleandata[i]) cleandata tweet list guys have idea? you can find position http:// , , piece it. post = "reform health care serve patients, not corporate medicine http://t.co/wmkjku4hl7 @pnhp #singlepayersunday http://t.co/i4bnrruuns" position = post.index('http://...

database - MySQL Merge tables - high-traffic and large amounts of data -

database - MySQL Merge tables - high-traffic and large amounts of data - my work uses mysql (myisam) exclusively info storage. have on 300 webservers , 150 databases. unfortunately i'm in position have write table construction back upwards on 100 1000000 rows in 30 day period. thought is: high volume inserts (no updates or deletes , @ end of table) 1 row selects data older 30 days thrown away the best solution seems to have table each day combined merge table selects. there duplicate info indeed, select pull recent row based on timestamp , int field. having 30 tables isn't ideal goes life. are there inherent flaws approach? there other ways approach missing (we stuck @ 5.0)? table locking huge issue when performing alter table on merge table when new day's table created? have table rotation construction in place if go single table having select info want out of old table new 1 quite slow approaches 100 1000000 rows. there other technologies out ther...

php - Waitting Time ( TTFB ) is above 4 seconds result from `get_headers()` -

php - Waitting Time ( TTFB ) is above 4 seconds result from `get_headers()` - i using apache version ( httpd-2.4.10-win64-vc11 ) on windows 2012. trying when click on image item open dialog inforamation item. : var self = $(this), vaid = "1", btnhref = self.attr('href'), itemid = getvar("item",btnhref); $.ajax({ type: 'post', url: '/action.php', data: {"itemid" : itemid}, datatype: 'json', beforesend: function(xhr) { xhr.setrequestheader('va', vaid); }, statuscode: { 401:function() { validation('401 unauthorized</br>error: invalid action'); } }, complete: function() { var state = { "dialog": true }; history.pushstate(state, document.title, btnhref); }, success: function(response){}, cache: true, contenttype: "application/x-www-for...