Posts

Showing posts from February, 2013

php - Download file Curl with url var -

i download file curl. problem download link not direct, example: http://localhost/download.php?id=13456 when try download file curl, download file download.php! here curl code: ### function downloadtorrent($a) { $save_to = $this->torrentfolder; // set torrent folder download $filename = str_replace('.torrent', '.stf', basename($a)); $fp = fopen ($this->torrentfolder.strtolower($filename), 'w+');//this file save information $ch = curl_init($a);//here file downloading curl_setopt($ch, curlopt_encoding, "gzip"); // important curl_setopt($ch, curlopt_timeout, 50); curl_setopt($ch, curlopt_url, $fp); curl_setopt($ch, curlopt_header,0); // none header curl_setopt($ch, curlopt_binarytransfer,1); // binary trasfer 1 curl_exec($ch); curl_close($ch); fclose($fp); } is there way download file without knowing path? you may try curlopt_followlocation true follow "location: " header server sends part of http header (note recursive, php f...

asp.net - WCF - More than one endpoint configuration for that contract was found - Error -

we have working asp.net web application wcf. wcf service hosted windows service. fine. made change service contract have different namespace (from namespace1.iservicecontract namespace2.iservicecontract). after change deployed server , getting following error when try instantiate service object. system.invalidoperationexception: endpoint configuration section contract 'namespace2.iservicecontract' not loaded because more 1 endpoint configuration contract found. please indicate preferred endpoint configuration section name. generated: fri, 06 jul 2012 21:02:56 gmt system.web.httpunhandledexception: exception of type 'system.web.httpunhandledexception' thrown. ---> system.invalidoperationexception: endpoint configuration section contract 'namespace2.iservicecontract' not loaded because more 1 endpoint configuration contract found. please indicate preferred endpoint configuration section name. @ system.servicemodel.description.configloader.lookupchannel(strin...

iphone - Table View Customization -

Image
i creating application, , have form needs filled out. implement solution similar photo below. in particular want implement top section. photo right next table cells. any suggestions or ideas how how table view. know group table, never seen cells push on that. i doubt top section 1 tableview. it's grouped table (first, last initial) section header (name) , uiimageview next (add photo). if entire thing moves , down (scrollable) it's embedded in scrollview.

javascript - Ajax in Tinybox 2 -

i have tinybox 2 popup opening when clicking 'register'. user has choose if he/she wants register user or performer. i'd show different registration page each, first asking it, handling ajax best. can done, shown here , in 5th example. here current code: <!doctype html> <html> <head> <title>regisztrációs típus kiválasztása</title> <meta charset="utf-8"/> <link rel="stylesheet" type="text/css" href="../css/soon.css"/> <script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script> </head> <body> <div id="teljes"> <h1>miként szeretnél regisztrálni?</h1> <div id="felhasznalo"> <a href="#felhaszlano_regisztracio" id="felireg">felhasználóként</a> </div> <div id="eloado"> <a href="../php/register_performer.php">elÃ…‘adókÃ...

php - How to add trigger event at end of this line of code at bottom -

at top of page, have option , answer control user able select option grid , relevant answer buttons appear depending on option selected. below html code stores option , answer control features: option , answer control on top of page: <table id="optionandanswer" class="optionandanswer"> <tr class="option"> <td>1. option type:</td> <td> <div class="box"> <input type="text" name="gridvalues" class="gridtxt maxrow" id="maingridtxt" readonly="readonly" /> <span href="#" class="showgrid" id="showgridid">[open grid]</span> </div> <?php $num = range("3","26"); ?> <table class="optiontypetbl"> <tr> <?php $i = 1; foreach($num $key => $val){ if($i%7 == 1) echo"<tr><td>"; echo"<input type=\"button\" value=\"$val\" ...

c# - Mouse hovering over menu options -

i having trouble mouse hovering on menu. trying highlight various menu options when mouse on them not sure doing wrong. right not cycles through them fast when move mouse on them. appreciated. problem either in update function or measuremenu function. way have keyboard part working fine. using system; using system.collections.generic; using system.linq; using microsoft.xna.framework; using microsoft.xna.framework.audio; using microsoft.xna.framework.content; using microsoft.xna.framework.gamerservices; using microsoft.xna.framework.graphics; using microsoft.xna.framework.input; using microsoft.xna.framework.media; namespace blocks { /// <summary> /// game component implements iupdateable. /// </summary> public class menucomponents : microsoft.xna.framework.drawablegamecomponent { string[] menuitems; int selectedindex; color normal = color.white; color hilite = color.yellow; keyboardstate keyboardstate; keyboardstate oldkeyboardstate; spritebatch spritebatch; spritefont sp...

ruby - Google shared contact API -

i looking googoe shared conatact api ruby gem. there ruby gem google shared contacts api? this 1 have found has not been maintained while. might need work. this blog post has discussion of how on own if interested (and more recent).

java - JSF2.0 @EJB Injection into @ViewScoped causing MyFaces to CFNE -

i'm running jsf project in tomee. upgraded myface 2.1.8. i'm running on osx oracle jvm 1.7.04 so have managedbean viewscoped: @managedbean @viewscoped public class blogmb implements serializable { private static final long serialversionuid = 1l; @ejb private categoryservice categoryservice; } here's view code: <h:commandlink value="#{category.name}"> <f:setpropertyactionlistener target="#{blogmb.selectedcategory}" value="#{category}" /> <f:ajax listener="#{blogmb.filterpostsbycategory()}" execute="@this" render=":blogposts" /> </h:commandlink> results in stack trace. heck going on? know needs deserialize handles, why have trouble finding service class on classpath? jul 06, 2012 8:25:51 pm org.apache.myfaces.renderkit.serversidestatecacheimpl deserializeview severe: exiting deserializeview - not deserialize state: com.xxx.blog.service.categoryservice java.lang.classnotfoundexception: c...

java - How to filter a single URI from a group of URI's in a Mule inbound endpoint? -

i have following code configure jersey service @ "http://localhost:8080/alpha": *** mule config *** <flow name="flow1"> <inbound-endpoint address="http://localhost:8080/" exchange-pattern="request-response" /> <jersey:resources> <component> <singleton-object class="com.address.flow1resource"/> </component> </jersey:resources> </flow> *** flow1resource.java *** @path("/alpha") public class flow1resource {...} i want add new inbound-endpoint handles addresses under "http://localhost:8080" except "http://localhost:8080/alpha" (e.g. "http://localhost:8080/beta"). these new addresses need single jersey resource. example: *** mule config *** <flow name="flow1"> <inbound-endpoint address="http://localhost:8080/" exchange-pattern="request-response" /> <jersey:resources> <component> <singleton-objec...

jquery - json jqmodal populate dropdown -

i'm trying populate dropdown in jqmodal different product sizes. can't work. appreciated. my json { "product": { "variants": { "3394248": { "id": 3394248, "code": "19", "ean": "19", "sku": "19", "price": { "price": 19.95, "price_incl": 23.7405, "price_excl": 19.95, "price_old": 0, "price_old_incl": 0, "price_old_excl": 0 }, "title": "maat 95", "active": false }, "3376388": { "id": 3376388, "code": "19", "ean": "19", "sku": "19", "price": { "price": 19.95, "price_incl": 23.7405, "price_excl": 19.95, "price_old": 0, "price_old_incl": 0, "price_old_excl": 0 }, "title": "maat 100", "active": true } }, } } ...

How to save android acvitiy history and retrieve at later time? -

how save previous activity , have update listview when user launches app @ later time can click on menu option called history bring listview of last few activities. let's listview holds 5 activies , after 5 activies deletes oldest activity saved , saves new activity in it's place. for example if wants view history of android activity viewed 2 days ago, can click on button called history , view past 5 entries displayed in listview. any ideas? you can't default android activities method. just save state in onresume/oncreate (as file in filesystem or sharedpreference) , read yours history activity. sorry bad english)) ask if don't understand something.

java - In JXTable, root column is not taking other column color -

Image
i used swingx table.the first column not taking color rendering of jxtable. plz give valuable suggestion. thanx in advance. java - in jxtable, root column not taking other column color - stack overflow stack overflow questions developer jobs documentation beta tags users current community help chat stack overflow meta stack overflow communities sign up or log in customize list. more stack exchange communities company blog tour start here quick overview of site center detailed answers questions might have meta discuss workings , policies of site learn more stack overflow company business learn more hiring developers or posting ads log in sign up learn, share, build each month, on 50 million developers come stack overflow learn, share knowledge, , build careers. join world̢۪s largest developer community. sign up in jxtable, root col...