Posts

Showing posts from May, 2014

how to retrieve user name from cookie session data(RAILS) -

how to retrieve user name from cookie session data(RAILS) - i studying ror, have partial side bar gets rendered in user dashboard area, , returning user's name in dashboard so. dashboard layout included in user controller. need utilize new controller <h1>welcome back, <%= @user.name %> </h1> so changed to <h1>welcome back, <%= current_user %> </h1> but problem instead of returning username, current_user returns this #<user:0x007fa8ee293940> which assuming remember_token hash. since current_user have session cookie, not sure how traverse db the username. can help me tweak current_user current session user returns username? thanks! here session helper def sign_in(user) remember_token = user.new_remember_token cookies.permanent[:remember_token] = remember_token user.update_attribute(:remember_token, user.digest(remember_token)) self.current_user = user end d

Fiddler Extension DLL in VB.NET can't work -

Fiddler Extension DLL in VB.NET can't work - now, i'm studying programming vs2010 vb, , trying making extension dll fiddler. first i've got sample code "australianimages/imageflipper", , rewrote in vb.net. building dll file has completed (though hard) , copied "fiddler2\scripts" folder, fiddler seems not load it. using document folder, or changing .net framework version 2.0 doesn't work also. does have clues? thanks. public class myflip implements iautotamper private benabled boolean dim omenuitem menuitem = new menuitem("m&y flip") #region "iautotamper members" public sub onbeforereturningerror(byval osession session) implements iautotamper.onbeforereturningerror end sub public sub autotamperrequestafter(byval osession session) implements iautotamper.autotamperrequestafter end sub public sub autotamperrequestbefore(byval osession session) implements iautotamper.autotamperreq

path - Accessing folder in wpf app -

path - Accessing folder in wpf app - i have wpf app folder structure: in homecontroller, want access images folder. want store image in images folder homecontroller. how can this? tried using pack origin takes me bin. this should trick: pack://application:,,,/images/image.png can used in xaml or in code. more detailed explanation can review this microsoft page it. in code: uri uri = new uri("pack://application:,,,/images/image.png"); in xaml: <element attribute="pack://application:,,,/images/image.png"/> wpf path

Ionic framework - command 'ionic serve' returns 'multiple addresses available' -

Ionic framework - command 'ionic serve' returns 'multiple addresses available' - first time ionic (and stackoverflow) user here. i created new project. now, i'm trying view in chrome via local webserver running command 'ionic serve.' i prompt says: multiple addresses available. please select address utilize entering number list below: 1) [ip address] 2) localhost address selection: i can't seem find come in 'address selection.' own local ip address? also, when listed [ip address], mean literally local ip address. if take localhost run locally , not available outside of machine. take other ip expose service local network if wish. command-line ionic-framework localserver

node.js - Issue using instagram-node -

node.js - Issue using instagram-node - i issue using module instagram-node, i'm not able medias... there limit , don't want limit, want medias of current user... my code : self.api.user_media_recent(userid, function(err, medias, pagination, remaining, limit){ console.log(medias.length); // 35... should 200 or that... medias.foreach( function(media){ var url = media.images.thumbnail.url; }); response.render('home/photos', {medias: medias, type: request.query.state}); }); based on documenation, result paginated, need following: var hdl = function(err, result, pagination, remaining, limit) { // implementation here if(pagination.next) { pagination.next(hdl); // sec page results } }; ig.tag_media_recent('test', hdl); node.js instagram

php - sending mail inserts a random space at the 995th character in the "to:" email list -

php - sending mail inserts a random space at the 995th character in the "to:" email list - im using php's mail() function send e-mail multiple receivers. if come in first parameter of "mail" function "example1@example.com,example2@example.com,example3@example.com,example4@example.com,example5@example.com,example6@example.com........" string of more 1000 characters, when receive e-mail see " "(an empty space) beingness inserted @ 995th character , whatever e-mail @ position broken. i read because mail service server doesn't take long lines of string should insert "\n" @ every 70 or characters. therefore, tried using wordwrap($emaillist) should insert line-breaks. unfortunately doesn't solve problem , i'm running out of ideas right now. finally able solve problem this: have list in $strto variable contains emails "email1, email2, email3, email4, "... each email separated ", " . b

cmd - Get and use current folder name inside a batch file -

cmd - Get and use current folder name inside a batch file - on server have root folder several 100 other folders named %computername% within (created respective computers using mkdir). these %computername% folders contain bat file must unique folder (the %computername%). bat file consist of number of commands remote administration, example: schtasks /run /s %computername% /tn "task" is possible create bat file automatically grab folder's name (the %computername%) without having manually alter it, , utilize in specified commands above example. use cd command along for retrieve current path, output folder name , ping it. test.bat: @echo off /f %%i in ('cd') set address=%%~nxi ping %address% result: c:\users\aybe\127.0.0.1>test.bat pinging 127.0.0.1 32 bytes of data: reply 127.0.0.1: bytes=32 time<1ms ttl=128 reply 127.0.0.1: bytes=32 time<1ms ttl=128 reply 127.0.0.1: bytes=32 time<1ms ttl=128 reply 127.0.0.1: bytes=32

How can i input this formula into my c++ program? -

How can i input this formula into my c++ program? - wind chill = 35.74 + 0.6215t - 35.75(v^0.16) + 0.4275t(v^0.16) i need right way input above formula program. have next , it's giving me crazy number: windchill = ((35.74 + (0.6215 * temperature)) - (35.75 * pow(windspeed, 0.16)) + (0.4275 * temperature * pow(windspeed, 0.16))); i beginner programmer, c++ first language learning appreciate , help. give thanks you. you can simplify removing parenthesis. double wind_chill = 35.74 + 0.6215 * t - 35.75 * pow(v, 0.16) + 0.4275 * t * pow(v, 0.16); but in case calculate powerfulness 2 times. improve way : double pow_v = pow(v, 0.16); double wind_chill = 35.74 + 0.6215 * t - 35.75 * pow_v + 0.4275 * t * pow_v; c++ formula

umbraco7 - Umbraco - Editing courier.config kills Courier -

umbraco7 - Umbraco - Editing courier.config kills Courier - have issues courier - after installing courier within office asks come in location, come in location of sec instance of umbraco. after logging out , logging in menu item in content - good also in office when go courier section > locations shows url user id ect - good if open courier.config , alter (eg user id) save file, touch web-config file forcefulness recompile of site. if go courier section > locations see message location not loaded, configuration error, or because courier running in trial mode, , cannot not load locations not on local machine even if go courier.config , alter before, still shows same error. way have found prepare uninstall , reinstall courier. can 1 1 tell me why happens how can prepare it? not sure direction of question, how configure locations within courier.config. user 0 admin user i'm not sure thought alter that. <!-- repository connection set

Run glm.mids on a subset of imputed data from mice (R) -

Run glm.mids on a subset of imputed data from mice (R) - i error when seek run glm.mids on subset of mids imputation object: library(mice) imp2 = mice(nhanes) glm.mids( (hyp==2)~bmi+chl, data=imp2, subset=(age==1) ) gives cryptic error message "error in eval(expr, envir, enclos) : ..1 used in wrong context, no ... in" even though syntax works regular glm on original dataset: glm( (hyp==2)~bmi+chl, data=nhanes, subset=(age==1) ) the documentation ?glm.mids doesn't address subset says can pass additional parameters onto glm . if can't utilize subset glm.mids , there way subset mids list object directly? i have taken liberty of rewriting glm.mids . bit kludgy. issue seems stem implicit nature attributes passed glm. also see these post: https://stat.ethz.ch/pipermail/r-help/2003-november/041537.html http://r.789695.n4.nabble.com/question-on-passing-the-subset-argument-to-an-lm-wrapper-td3009725.html library(mice) glm.mids=

java - Find a string and display the line number and the line itself? -

java - Find a string and display the line number and the line itself? - i'm designing programme reads size of txt file, number of words, numbers, , characters contains, , ability search file given string. for example. a txt file has there 1 time land that land no longer exists. that land was... if wanted search "land" list 3 lines. the methods created search file , find string are: public string searchword(string key) throws exception { linenumberreader lnr = new linenumberreader(new filereader(f)); string line = null; line = recursivesearch(lnr.readline(), key, lnr); homecoming line; } public string recursivesearch(string currentlinetext, string key, linenumberreader lnr) throws exception { if (currentlinetext != null) { string lcase = currentlinetext.tolowercase(); if (lcase.contains(key.tolowercase())) { homecoming ("line " + lnr.getlinenumber() + ": "

c# - OleDbAdapters doesn't read dates in different formats from single excel column -

c# - OleDbAdapters doesn't read dates in different formats from single excel column - i reading excel file in application. utilize oledbdataadapter read , datatable store records .xlsx file. have problem reading different date formats single column. column looks that: 2014-02-07 2014-02-05 27.01.2014 19.11.2013 2014-02-07 2014-02-07 my programme loads dates in "yyyy-mm-dd" format , rest of them dbnull.value. there way read whole column strings (so can manipulate them manualy) or forcefulness oledbdataadapter read dates? thats code: var filename = string.format(@"c:\28.xlsx"); var connectionstring = string.format(@"provider=microsoft.ace.oledb.12.0;data source=" + filename + ";extended properties='excel 12.0 xml;hdr=no;imex=1'"); var adapter = new oledbdataadapter("select * [sheet1$b12:l]", connectionstring); var ds = new dataset(); adapter.fill(ds, "a

Php function zip folder no works -

Php function zip folder no works - i utilize 1 function see here zip folders , , works nice see great problem when utilize kind of slash ../ the function : <?php function zip($source, $destination) { if (!extension_loaded('zip') || !file_exists($source)) { homecoming false; } $zip = new ziparchive(); if (!$zip->open($destination, ziparchive::create)) { homecoming false; } $source = str_replace('\\', '/', realpath($source)); if (is_dir($source) === true) { $files = new recursiveiteratoriterator(new recursivedirectoryiterator($source), recursiveiteratoriterator::self_first); foreach ($files $file) { $file = str_replace('\\', '/', $file); // ignore "." , ".." folders if (in_array(substr($file, strrpos($file, '/') + 1), array('.', '..'))) continue; $file = rea

components - Error 500 in new extensions instales (Joomla 3.0 Gantry Framework & Magnus tmpl) -

components - Error 500 in new extensions instales (Joomla 3.0 Gantry Framework & Magnus tmpl) - on page developed joomla 3.0, gantry framework & magnus template has been running fine when installing new extensions rs_mediagallery , facegallery or rokgallery , installation finishs when trying access component configure (ie: components --> rsmediagallery) shows blank page , firebug indicates error " 500 internal server error". all site running including extensions installed. tmp , extension directories have right permissions. if has thought in order solve error, thanks campo joomla components

c# - How to use LOG4NET for specific events -

c# - How to use LOG4NET for specific events - hi learning log4net , stuck @ something i using info(...) write log files, need utilize info(...) email in specific events. so 1 phone call info(...) writes log , and sends email. probably best way accomplish add filter smtp appender: stringmatchfilter best bet. there illustration of using stringmatchfilter smtpappender @ http://maonet.wordpress.com/2012/01/06/use-log4net-filter-to-dispatch-email-notification-based-on-string-match the author notes: filter type set log4net.filter.stringmatchfilter each filter section can have 1 stringtomatch element end “log4net.filter.denyallfilter” filter switch default “accept unless instructed otherwise” filtering behavior “deny unless instructed otherwise” behavior. c# log4net

c# - ASP Identity 2.0: Regenerate Identity -

c# - ASP Identity 2.0: Regenerate Identity - i having problem getting asp identity refresh identity stored in cookie on demand. in startup.auth.cs file cookie set regenerate follows: app.usecookieauthentication(new cookieauthenticationoptions { authenticationtype = defaultauthenticationtypes.applicationcookie, loginpath = new pathstring("/account/login"), provider = new cookieauthenticationprovider { onvalidateidentity = securitystampvalidator.onvalidateidentity<quizsparkusermanager, quizsparkuser, int>( validateinterval: timespan.fromminutes(30), regenerateidentitycallback: ((manager, user) => manager.createidentityasync(user, defaultauthenticationtypes.applicationcookie)), getuseridcallback: ((claimsidentity) => int.parse(claimsidentity.getuserid()))) } }); however c

node.js inheritance prefer child constructor properties -

node.js inheritance prefer child constructor properties - var util = require('util'); function entity(){ //this.x == 10 @ point this.x = 0; this.y = 0; this.globalinit(); } entity.prototyp.globalinit = function(){ console.log("this.x ", x); }; function actor(){ this.x = 10; this.y = 10; actor.super_.apply(this, arguments); } util.inherits(entity, actor); var = new actor(); //outputs -> this.x 0 i have these 2 constructors. want have properties defined in kid constructor final properties. move actor.super_.apply top of constructor there initialization logic ( globalinit ) want maintain @ end of parent constructor i can see 2 solutions this. first, parent constructor take in parameters x , y , , default them parent class values. function entity(x, y){ this.x = typeof x === 'undefined' ? 0 : x; this.y = typeof y === 'undefined' ? 0 : y; this.globalinit(); } function actor(){ actor.super_.call(this,

sql - remove ON DELETE CASCADE -

sql - remove ON DELETE CASCADE - i have kid table. , foreign key there on delete cascade while creating table. there no records either in kid or parent table. i want primary key, foreign key want remove cascading alternative kid table . is there anyway can alter kid table. thank you. on delete { no action | cascade | set null | set default } the default no action. so seek altering kid table default. sql constraints cascade alter

Java append instances of a String to a String which separated by commas -

Java append instances of a String to a String which separated by commas - so have string variable meant hold names of cars separated commas. string cars = ""; what want append cars string. way new auto added: string newcar1 = "mini"; string newcar2 = "landrover"; appendtocars(newcar1); appendtocars(newcar2); then have this, need help with. public void appendtocars(string newcar) { cars = cars + "," + newcar; } so output should be: mini,landrover but it's: [,]mini been racking brain hours figuring out how it, can't result want. im using junit test reads : @test public void testappendtocars() { system.out.println("appendtocars"); string newcar1 = "mini"; string newcar2 = "landrover"; string expresult = newcar1 + "," + newcar2; testdel.appendtocars(newcar1); testdel.appendtocars(newcar2); string result = testdel.getcars(); asserte

Android - an app to disable facebook push notification -

Android - an app to disable facebook push notification - is possible create app it's sole purpose toggle on/off facebook force notifications? (like quiet facebook)? if give app notification-access permissions should able dismiss notifications pop-up, user still notified (sound or vibrating), although won't see notification when device unlocked app have dismissed it. pushbullet that. in case it's no use, user can go facebook app details , uncheck notifications box. android push-notification

ios - Play song from ipod library with superpowered -

ios - Play song from ipod library with superpowered - since apple anounced every app has back upwards 64-bit starting feb 1rst, can't utilize dirac3le anymore. found superpowered seems same. problem see is, can't play songs ipod library. i've tried importing song via avassetexportsession can't work. code i've tried far: nsurl *url = [playingsong valueforproperty:mpmediaitempropertyasseturl]; avurlasset *songasset = [avurlasset urlassetwithurl:url options:nil]; avassetexportsession *exporter = [[avassetexportsession alloc] initwithasset: songasset presetname: avassetexportpresetpassthrough]; exporter.outputfiletype = @"com.apple.coreaudio-format"; nsstring *fname = [[nsstring stringwithformat:@"tmp"] stringbyappendingstring:@".mp3"]; nsstring *temppath = nstemporarydirectory(); nsstring *exportfile = [temppath stringbyappendingpathcomponent: fname]; exporter.outputurl = [nsurl fileurlwithpath:exportfile]; [exporter exporta

javascript - Why "document.styleSheets" returns empty value after each 3 to 5 browser refreshes? -

javascript - Why "document.styleSheets" returns empty value after each 3 to 5 browser refreshes? - what want accomplish create user define specific stylesheets processed javascript file wrote , here code used specified stylesheets : <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>document</title> <link rel="stylesheet" href="sheet-1.css"> <link rel="stylesheet" href="sheet-2.css"> <link rel="stylesheet" href="sheet-3.css"> <!-- other css files --> <style> /* inline styles */ </style> </head> <body> <script src="jquery-2.1.1.min.js"></script> <!-- plugins --> <script> jquery(document).ready(function($) { // user specified stylesheets var watchedstylesheetsnames =

fps - CCActionMoveBy doesn't working properly when the action called for many of the sprite in cocos2d -

fps - CCActionMoveBy doesn't working properly when the action called for many of the sprite in cocos2d - i have issue ccactionmoveby when i phone call action many of sprite. need move position , remove scene. here sprites images. my problem if phone call action 1 or 2 position working fine. when phone call action more 5 position, sprite doesn't move on right position. i checked fps low 15 20 fps when game running. don't know how impact game. please can suggest how increment fps , electron motion correctly. here add together code [_sprite1[1][1] runaction:[ccactionsequence actions:[self movewithposition:ccp(60,-10)], remove, nil]]; [_sprite2[1][1] runaction:[ccactionsequence actions:[self movewithposition:ccp(10, 80)], remove, nil]]; [_sprite3[1][1] runaction:[ccactionsequence actions:[self movewithposition:ccp(-10,- 80)], remove, nil]]; [_sprite4[1][1] runaction:[ccactionsequence actions:[self movewithposition:ccp(-60, 10)], remove, nil]]; the above

c++ - Undefined reference to SOME_SIGNAL_NAME -

c++ - Undefined reference to SOME_SIGNAL_NAME - this question has reply here: qt connecting signal , slot in object fellow member of mainwindow 2 answers i have signal in class, called requestfinished . have slot _finished , should activate signal. have error undefined reference my_signal . here _finished : void vk::_finished(qnetworkreply *reply) { if (reply->error() != qnetworkreply::noerror) { qdebug() << (qstring) reply->readall(); } else { qstring json(reply->readall()); vkresponse *response = new vkresponse(json); vkerror *error = new vkerror(json); vkanswer *answer = new vkanswer(error, response); emit requestfinished(answer); } } here class vk : class vk { public: vk(qstring token); void request(qstring method, std::map<qstring, qstring> data);

html5 - Can SVG content line-break using entity (or something else)? -

html5 - Can SVG <title> content line-break using &#10; entity (or something else)? - i'm trying line-break content in mouseover ("tooltip"), placed svg document dom using <title> kid element. firefox seems respect , place line-break want it. ie11, not. have not tried other browsers. the xsl gens looks like, <title><xsl:value-of select="concat('foo','&#10;','bar')"/></title> i've tried <br/> no luck. the document served browser "pure svg" document, is, root element <svg> . i'm using html5 doctype header, nil intentionally backwards compatible there. thank you, stackoverflow friends! html5 svg mouseover title line-breaks

java - JavaFX 8: Stage insets (window decoration thickness)? -

java - JavaFX 8: Stage insets (window decoration thickness)? - how can determine stage/window insets in javafx? in swing simple write: class="lang-java prettyprint-override"> jframe frame = new jframe(); insets insets = frame.getinsets(); what equivalent in javafx size of border , titlebar of window? you can determine these looking @ bounds of scene relative width , height of window. given scene scene; , scene.getx() , scene.gety() give x , y coordinates of scene within window. these equivalent left , top insets, respectively. the right , bottom trickier, but scene.getwindow().getwidth()-scene.getwidth()-scene.getx() gives right insets, , similarly scene.getwindow().getheight()-scene.getheight()-scene.gety() gives bottom insets. these values of course of study create sense 1 time scene placed in window , window visible on screen. if want insets object can next (which remain valid if border or title bar changed size after wind

java - MySQLIntegrityConstraintViolationException crashes application -

java - MySQLIntegrityConstraintViolationException crashes application - this application, romecnn, uses rome 1.5.0 iterate through cnn news feed , persist url's database. database rejects duplicate links. that there mysqlintegrityconstraintviolationexception type exceptions ok, inserts should rejected database. perhaps there's improve way avoid duplicates, sufficient. (unless else happening? thinking "if link exists, grab exception, , move on next".) why application crash? after threshold of integrity constraint violations, connection broken? run: [java] [el info]: 2014-11-03 01:20:39.432--serversession(28432534)--eclipselink, version: eclipse persistence services - 2.5.2.v20140319-9ad6abd [java] [el info]: connection: 2014-11-03 01:20:40.173--serversession(28432534)--file:/home/thufir/netbeansprojects/romecnn/build/classes/_romereaderpu login successful [java] [el warning]: 2014-11-03 01:20:40.405--unitofwork(6261946)--exception [ec

java - How to read parameter in mule esb -

java - How to read parameter in mule esb - i sending parameter mule listening through http inbound in 8081 sending. http://localhost:8081/hey?age=manoj but don't know how can take message?? know can access message , payload when seek this #[message payload: ['age']] i getting error payload string type , much confuse in mule. want age value. if using mule 3.6 version or above, look has been changed .. now, need next look value :- #[message.inboundproperties.'http.query.params'.age] you can find reference here query :- https://developer.mulesoft.com/docs/display/current/http+listener+connector java mule mule-el mule-component mule-module-jpa

css - jQuery show elements with specific class -

css - jQuery show elements with specific class - i display elements within ul have class .active using jquery. would code this? if ($(this).hasclass('active')) { $( ".active" ).show(); } my html markup <ul> <li><a>menu item 1</a></li> <li class="active"><a>menu item 2</a> <ul> <li><a>menu item 2.1</a></li> <li class="active"><a>menu item 2.2</a> <ul> <li><a>menu item 2.2.1</a></li> <li class="active"><a>menu item 2.2.2</a></li> <li><a>menu item 2.2.3</a></li> </ul> </li> <li><a>menu item 2.3</a></li> </ul> </li> <li><

c# - Compare two dates, not allowed to overlap the first agenda event -

c# - Compare two dates, not allowed to overlap the first agenda event - i have calendar, , can set appointments on agenda, not allowed have sec appointment on th first appointment. not allowed intersect witch each other. seek this: public bool isoverlapping(agendaeventviewmodel viewmodel, agendaeventviewmodel newitem) { bool isoverlapping = false; datetime? begin = datetime.parse(viewmodel.start); datetime? end = datetime.parse(viewmodel.end); newitem = new agendaeventviewmodel(); datetime begin2 = datetime.parse(newitem.start); datetime end2 = datetime.parse(newitem.end); // todo: check if event overlapping other events :) dynamic roomrules check should implemented here if (begin > end || begin2 > end2) isoverlapping = false; if (begin == end || begin2 == end2) isoverlapping = false; // no actual date range

Angularjs watch service object -

Angularjs watch service object - why can't watch object in service. ive got simple variable working, object wont work. http://plnkr.co/edit/s4b2g3bas7dwqt3t8xek?p=preview var app = angular.module('plunker', []); app.service('test', ['$http', '$rootscope', function ($http, $rootscope) { var info = 0; var obj = { "data": 0 }; this.add = function(){ obj.data += 1; console.log('data:', obj); }; this.getdata = function() { homecoming obj; }; }]); app.controller('testcontroller', ['$scope', '$rootscope', '$filter', 'test', function($scope, $rootscope, $filter, test) { //test controller $scope.add = function(){ test.add(); }; $scope.test = test; $scope.$watch('test.getdata()', function(newval){ console.log('data changes into: ', newval) }); }]);

C++ STL : Including all libraries? -

C++ STL : Including all libraries? - how include libraries of stl in c++ code rather individually including them. illustration - #include <queue> #include <containers> a simple way include of them. please help ? you can't can create list , set them in header header guard ofc. // c++ total standard header include #include <cstdlib> #include <csignal> #include <csetjmp> #include <cstdarg> #include <typeinfo> #include <typeindex> #include <type_traits> #include <bitset> #include <functional> #include <utility> #include <ctime> #include <chrono> #include <cstddef> #include <initializer_list> #include <tuple> #include <new> #include <memory> #include <scoped_allocator> #include <climits> #include <cfloat> #include <cstdint> #include <cinttypes> #include <limits> #include <exception> #include <stdexcept>

How to create seperate lists from a list using scala? -

How to create seperate lists from a list using scala? - i have next list - list((name1,a1,176980), (name2,a2,0), (name3,a3,1948), (name4,a4,95676)) from above list want create separate lists of list elements like- element1, element2 , element3 respectively. i want separate lists like- list(name1,name2,name3,name4) list(a1,a2,a3,a4) list(176980,0,1948,95676) how above lists using scala??? naive solution: val list = list( ("name1","a1",176980), ("name2","a20",0), ("name3","a3",1948), ("name4","a4",95676)) list.map(_._1) list.map(_._2) list.map(_._3) some generalize version: def key(products: list[product], num: int) = { products.map(_.productelement(num)) } key(list, 0) // res3: list[any] = list(name1, name2, name3, name4) key(list, 1) // res4: list[any] = list(a1, a20, a3, a4) key(list, 2) // res5: list[any] = list(176980, 0, 1948, 95676) or

Android app upload picture to Instagram -

Android app upload picture to Instagram - question: it possible upload photo android app instagram? some says not possible because of http://instagram.com/developer/endpoints/media/ i want clarify if possible or not. if not possible if there way on how upload photo instagram? no not possible. instagram api supports retrieval of info (as can see based on of gets). there no alternatives either since instagram doesn't want allow other people have type of functionality (otherwise see ton of knockoff instagram apps). android instagram

oop - Correct class design for a web project in PHP -

oop - Correct class design for a web project in PHP - we're in process of rewriting our code in oop , i'm trying design general framework future projects (mostly comply dry , maintain code slim , consistent). for illustration think nice have base of operations class databaseobject , source properties database row. (among other things) utilize __call() , property_exists() automate getters. way we'd don't have potentially write 100+ getters every column in database row (or update class code every alter table). other classes customer , car or article extend databaseobject (if they're sourced database) , inherit these methods, don't have re-create database specific code every class separately (which more , more inconsistent on time). is correct...ish utilize of inheritance in web project, or bad design? colleague argues misuse of inheritance , client sourced csv file need separate class definition, valid point. with interfaces we'd stil

javascript - change background-image to image file in html 5 -

javascript - change background-image to image file in html 5 - i'm using html5 drag , drop image, code still running normally. but, can drop image background-image in dropbox, not image file. so, can't , insert image database. code: script var holder = document.getelementbyid('leftbox'), state = document.getelementbyid('status'); if ( typeof window.filereader === 'undefined') { state.classname = 'fail'; } else { state.classname = 'success'; state.innerhtml = 'drop files here' } holder.ondragover = function() { this.classname = ''; homecoming false; }; holder.ondragend = function() { this.classname = ''; homecoming false; }; holder.ondrop = function(e) { this.classname = ''; e.preventdefault(); var file = e.datatransfer.files[0], reader = new filereader(); reader.onload

c# - When mail is triggered getting blank fields in mail -

c# - When mail is triggered getting blank fields in mail - below code sending mail.iam not getting error or exception when mail service triggered iam getting blank fields part name,location name , partner code. partner name displayed. if (objuser.usermasterid == 0) { objuser.functionalityid = 10; //partner creation dtpartnermaildetails = usermasterbl.getpartnermaildetails(objuser); if (dtpartnermaildetails.rows.count > 0) { objuser.regionname = dtpartnermaildetails.rows[0]["regionname"].tostring(); objuser.locationname = dtpartnermaildetails.rows[0]["locationname"].tostring(); objuser.partnercode = dtpartnermaildetails.rows[0]["partnercode"].tostring(); objuser.partnername = dtpartnermaildetails.rows[0]["partnername"].tostring(); } dtmaildetails = usermasterbl.get

sql server 2008 - SQL passing table column to a function parameter -

sql server 2008 - SQL passing table column to a function parameter - i wish phone call function ( dbo.split ) column table ( u.ubicacionf ) doesn't work! please can u help me!! thanks select ee.idestatus, ee.idasignacion,ee.idunidad, ee.idequipo,ee.estatus,ee.bultestatus, a.iddestino, u.ubicacionf, ti.tiempo mar_estatusequipo ee left bring together mar_asignaciones on ee.idasignacion = a.idasignacion , ee.idunidad = a.idunidad left bring together mar_tmpubicaciones u on ee.idunidad = u.idunidad , u.idunidad = a.idunidad left bring together mar_tiemposarribopto ti on a.iddestino = ti.destino , ti.ubicacion '%' + (select * dbo.split(u.ubicacionf, ',', '1')) + '%' ee.idequipo = cast(ee.idunidad char) , ee.estatus in ('it','et') , a.iddestino = 'mzo' , ee.

How to change the Python Interpreter that gdb uses? -

How to change the Python Interpreter that gdb uses? - i'm using ubuntu 14.04, python3 default scheme package. i want debug python2.7 programs gdb, seem encounter issue: when i'm in gdb, using py command puts me in interpreter, ran these commands in interpreter: first check interpreter version: (gdb) py >import sys >print(sys.version) >end 3.4.0 (default, apr 11 2014, 13:08:40) [gcc 4.8.2] then check interpreter executable beingness used (gdb) py >import sys >print(sys.executable) >end /usr/bin/python (gdb) then in bash, check interpreter: 12:34]hostname ~ $ls -l /usr/bin/python lrwxrwxrwx 1 root root 9 dec 21 2013 /usr/bin/python -> python2.7 so although gdb says it's using 2.7 interpreter, it's using one. need 2.7 interpreter able utilize python specific extensions ubuntu bundle 'python2.7-dbg' provides, because far know there's no such bundle python 3.4 yet, , if there was, programs want debug run

java - Why does casting based on Class.class work but not getClass? -

java - Why does casting based on Class.class work but not getClass? - i've got next 3 tests. first 2 work, lastly 1 doesn't. motivation asking question i'd able cast object a has same class object b , when a known subtype of b . @test public void testworks() { object bar = "foobar"; string blah = (string) bar; system.out.println(blah); // outputs foobar } @test public void testalsoworks() { object bar = "helloworld"; string blah = string.class.cast(bar); system.out.println(blah); // outputs helloworld } @test public void testfails() { object bar = "foobar"; string thetype = "hello"; class stringclass = thetype.getclass(); string blah = stringclass.cast(bar); // compiler error: incompatible types: object cannot converted string system.out.println(blah);

css - Responsive layout side by side on desktop, overlay with nav on mobile -

css - Responsive layout side by side on desktop, overlay with nav on mobile - i'm looking responsive pattern have 2 pages side side (or phone call div's) |--------|--------| | | | | p1 | p2 | | | | | | | |--------|--------| as shrink width of page, or view on mobile, collapses single page. lets -> in upper right corner illustrates link access page two. |--------| | ->| | | | p1 | | | |--------| and similar on page two, <-- go page one |--------| |<- | | | | p2 | | | |--------| any thought how can accomplish this. there libraries out there supporting this, bootstrap or foundation or "do yourself". :) thanks, lars you accomplish using css @media queries this: jsfiddle - demo class="snippet-code-css lang-css prettyprint-override"> .div { width:50%; height:100px; float:left; } .div-1 {

unix - Find and tar files on Solaris -

unix - Find and tar files on Solaris - i've got little problem bash script. i'm newbie in unix world, find hard deal exercise. have find files on solaris server specific name, modified in specific time , archive them in 1 .tar file. first 2 points easy, i'm having nightmare trying archive it. thing is, archive whole tree of file (with file @ end) .tar file, need file. code looks this: find ~ -name "$maska" -mtime -$dni | xargs -t -l 1 tar -cvf $3 -c where $maska name of file, $dni refers modification time , $3 archive name. found out -c switch, let's me jump folder desired file is, when utilize xargs, seems jump there , nil else. so question is: 1) there possibility of achieving goal way? please remember, don't work on gnu tar. , have utilize commands: tar, find. edit: i'd specify more problem. when utilize script for, example, file a, should since point shown in script (it's ~ ) , find should in 1 tar file. what got right