Posts

Showing posts from March, 2015

git mirroring to GitHub and filtering private files -

currently working on project. want open-source our day-to-day commits full info (author, etc...) while filtering out specific private folders. let's commit a/file1 , b/file2 in branch master, have mirrored on github b folder filtered (this commit have a/file1). one way thinking remote update hook that: list new commits added newref (let's lastfoundcommit..newref) amend commits 1 one (from lastfoundcommit newref) remove unwanted files in process, might create local master-filtered branch (if helps have locally) push branch public repository somehow keep mapping of commit id between private , public commits, compute "lastfoundcommit" on next push ideally go both way (i.e., nice if import github branches , pull requests , have them "rebased" on top of our private repository, either automatically or simple process -- not hard rebase). this similar git-subtree can do, except not extract subdir filter various files instead. does seem feasible

javascript - How to decrease number [value] before post? -

i not sure possible if user type numbers in input, want decrease number in hidden before post? example if type 1 output 0 or if type 2 output 1 <input class="decrease" type="text" name="number" value="" /> <input class="output" type="hidden" name="number" value="//decrease number//" /> hope 1 helps. $(document).ready(function(){ $('.decrease').keyup(function(){ if($('.decrease').val()!="") { $('.output').val($('.decrease').val()-1); } else { $('.output').val(""); } }); }); you have make sure user types in numbers. if user types in character, value of hidden input nan. see documentation more examples , information.

vector graphics - What are binormals used for? -

i know binormal orthogonal both surface normal , tangent in point on plane used exactly? there lot of uses, more can covered in simple answer. one of common usage in shaders. normal, tangent , binormal can used navigate in surface space. can used create matrix lets transform vector model space surface space or texture space. in turn used lot of different shader effects, e.g. advanced lighting or effects parallax mapping.

How to copy all the files in certain Directory and recreate the directory structure dynamically using python -

i want move files of type existing directory structure new dynamic directory structure.for e.g: if file is c://users//desktop//635289512-251.txt i need place file in c://users//desktop//635_users//2895_access//635289512-251.txt should copy each , everyfile , paste them in directory or can zip them , unzip them dynamically? using below code create directory. please me if there better way of doing this. thank you help. src = "folder1/folder2/file1" dst = "folder3"+src dstfolder = os.path.dirname(dst) if not os.path.exists(dstfolder): os.makedirs(dstfolder) shutil.copy(src,dst) use shutil.copytree copy entire directory new location. import shutil src = "folder1/folder2/file1" dst = "folder3"+src dstfolder = os.path.dirname(dst) shutil.copytree(src,dstfolder)

json - Error getting Object from NSDictionary -

i have array below ( ( "id:19", "name:virgin club house heathrow", "address:heathrow airport, 234 bath road, hayes, middlesex", "postcode:ub3 5ap", "latitude:51.48127", "longitude:-0.448696" ), ( "id:20", "name:le bilboquet", "address:20 e 60th st, new york, united states", "postcode:ny 10022", "latitude:40.764072", "longitude:-73.970834" ) ) which enumerating through using [venuesarray enumerateobjectsusingblock:^(nsdictionary* obj, nsuinteger index, bool *stop) { nsstring* tmpstr; tmpstr = [obj objectforkey:@"id"]; }]; however i'm getting error -[__nscfarray objectforkey:]: unrecognized selector sent instance 0x7ff26866a690. like said, have array. though block calling objects getting nsdictionary , being gi

c# - WPF DataGrid shows no data -

this constructor of usercontrol includes datagrid element. public results(list<cartitem> items) { initializecomponent(); this.items.datacontext = items; } and xaml of datagrid. <datagrid autogeneratecolumns="false" name="items" isreadonly="true" minheight="300"> <datagrid.columns> <datagridcheckboxcolumn> <datagridcheckboxcolumn.headertemplate> <datatemplate> <checkbox style="{staticresource stylecheckbox}" ischecked="{binding isselected}"/> </datatemplate> </datagridcheckboxcolumn.headertemplate> </datagridcheckboxcolumn> <datagridtextcolumn header="abone no" binding="{binding subscriberno}" /> <datagridtextcolumn header="adı soyadı" binding=&quo

php - How to get user id in session? -

kinda noob problem i'm working on 2 hours , can't solve i have login system works fine (thanks tutorials), i'd save id in session when user's logging this login.php: <?php session_start(); require_once 'config.php'; if(isset($_post['btn-login'])){ $uname = $_post['txt_uname_email']; $umail = $_post['txt_uname_email']; $upass = $_post['txt_password']; $sth = $bdd->prepare("select user_id users user_name=$uname"); $sth->execute(); $result = $sth->fetch(pdo::fetch_assoc); $uid = $result; if($user->login($uname,$umail,$upass)){ $_session['user_name'] = $uname; $_session['user_mail'] = $umail; $_session['user_session'] = $userrow['user_id']; $_session['user_id'] = $uid; $uname = $_post['txt_uname_email']; $umail = $_post['txt_uname_email']; $upass = $_p

How to merge two branches in git -

i have branch name development . made 4 commits , needed revert first commit while preserving these 4 commits. checked out first commit new branch development_back . merge these 2 branches, not want continue in development_back branch in development branch. doable somehow? if understand correctly have this: a -> b -> c -> d -> e ^ ^ development_back development but want this: a -> b -> c -> d -> e ^ development ^ development_back if correct need merge development development_back , not in opposite way. checkout development_back branch , git merge --ff-only development . --ff-only flag ensures merge fast-forward.

javascript - SVG and TweenLite - Select class within parent -

i have script modified tutorial animates svg strokes when containing div comes view (using inview.js). have added tweenlite animation changes svg fill-opacity 0 1. problem addition not care whether containing div in view (i'm using getelementsbyclassname target svg elements). how can target elements class name if containing div in view? guess need use "parentelement" in tweenlite lines i'm not sure how. i have modified function within svglines.js (everything after drawsvgpaths): function replacerectswithpaths(parentelement) { var rects = $(parentelement).find('rect'); $.each(rects, function() { var rectx = $(this).attr('x'); var recty = $(this).attr('y'); var rectx2 = parsefloat(rectx) + parsefloat($(this).attr('width')); var recty2 = parsefloat(recty) + parsefloat($(this).attr('height')); var convertedpath = 'm' + rectx + ',' + recty + ' ' + rectx2 + ',' + recty + &#

Nuget sources update fails to update -

following nuget command line reference , update internal nuget source url new url. update fails. execute nuget sources output nuget.org [enabled] http://www.nuget.org/api/v2 internalfeed [enabled] http://oldserver:8888/nuget execute nuget sources update -name internalfeed -source http://newserver:8888/nuget package source "internalfeed" updated. nuget sources output nuget.org [enabled] http://www.nuget.org/api/v2 internalfeed [enabled] http://oldserver:8888/nuget expected output nuget.org [enabled] http://www.nuget.org/api/v2 internalfeed [enabled] http://newserver:8888/nuget actual output not match expected output. how can update internalfeed url? there file in root directory called nuget.config . file contained oldserver value. removed value nuget.config . update took after making said change.

php - Fixing 1064 SQL Error Importing Database into Wampserver -

when importing 636mb database wampserver below error. interesting have max execution time set 5000 in (php.ini). have tried numerous import methods , compression types same results: mysql console, phpmyadmin console, bigdump, zip, gzip , using config.inc.php upload specified directory. thank help, suggestions & advice. current settings: php.ini: post_max_size = 750m upload_max_filesize = 750m max_execution_time = 5000 max_input_time = 5000 memory_limit = 1000m config.inc.php: // maximum execution time in seconds (0 no limit) $cfg['exectimelimit'] = 0; my.ini: max_allowed_packet = 200m mysql said: 1064 - erreur de syntaxe près de '<br /> fatal error: maximum execution time of 300 seconds exceeded in <b' à la ligne 141 error sql query: insert `log_url_info` (`url_id`, `url`, `referer`) values (2287337, 'http://www.website12345.com/sendfriend/product/send/id/44894/', null), (2287338, 'http://www.website12345.com/sendfrie

amazon web services - AWS CLI for CloudFront create-invalidation returns old invalidation -

i'm trying use aws cli create invalidations on cloudfront in ci service automatically invalidate files on deployment. however, cli returns success message, invalidation referenced month old , no new invalidation created. i'm installing , enabling cloudfront: pip install awscli aws configure set preview.cloudfront true aws configure set preview.create-invalidation true then create invalidation: aws cloudfront create-invalidation --cli-input-json '{"distributionid":"abc123abc123","invalidationbatch":{"paths":{"quantity":1,"items":["/index.html"]},"callerreference":"codeship"}}' an example of response, when ran command on 7/13 @ 4pm et: { "invalidation": { "status": "completed", "invalidationbatch": { "paths": { "items": [ "/index.html" ], "quant

Run selenium node using batch file in windows -

i trying run selenium node batch file, there no errors not work @ all, here code: note: batch file gets ip address argument cd c:\ cls set s1=http:// set s2=%1 set s3=:1111/grid/register set ip_adress = %s1%%s2%%s3% echo %ip_adress% pause java -jar c:\selenium_standalone\selenium-server.jar -role node -hub %ip_adress% remove spaces before , after = set ip_adress = %s1%%s2%%s3% , , work. set ip_adress=%s1%%s2%%s3%

java - android EditText calculating wrong result -

i trying make simple app converts between celsius , fahrenheit: i wrote 2 edittext , 1 input , output, have 2 buttons ( toc , tof ). the code following: public class mainactivity extends actionbaractivity { private edittext edittext_input; private edittext edittext_output; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); edittext_input = (edittext) findviewbyid(r.id.input); edittext_output = (edittext) findviewbyid(r.id.output); button toc = (button) findviewbyid(r.id.c); toc.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { string inputs = edittext_input.gettext().tostring(); double inputd = double.parsedouble(inputs); double outputd = (5/9) * (inputd-32); string outputs = string.valueof(outputd); //toast.maketext(mainactivity.this,string.valueo

xml - How can I wrap a group of adjacent elements depending on the previous sibling using XSLT? -

i want wrap appendix elements, if first appendix element's preceding sibling part. so if input like <part> .. .. </part> <appendix href=".."> </appendix> <appendix href=".."> </appendix> then output like <part> .. .. </part> <appendices> <appendix href=".."> </appendix> <appendix href=".."> </appendix> </appendices> i'm new xslt. i've tried has failed till now. appreciated. with xslt 2.0 verbal description translates into <?xml version="1.0" encoding="utf-8" ?> <xsl:transform xmlns:xsl="http://www.w3.org/1999/xsl/transform" version="2.0"> <xsl:output indent="yes"/> <xsl:template match="*[appendix]"> <xsl:copy> <xsl:for-each-group select="*" group-adjacent="boolean(self::appendix)"

Scala has dynamic compilation? -

i have found many pages saying scala doesn't have dynamic compilation feature, whereas have achieved same using twitter util library . wrote scala code calling eval function mentioned lib , create scala class @ runtime. example val obj = eval[myscalatrait](new file("flat file having scala code"))) can please tell me dynamic compilation 1 better scala or groovy. want keep scripting part in flat file , @ run time create class. looks both solving problem, want see would best? i can't tell groovy, i'm using dynamic compilation of scala code in several projects. works flawlessly, compiler may take bit of warm-up time, don't expect give fantastic low latencies in "real-time" situations.

asp.net - Replacing desktop WPF Applications with HTML5 -

our little department has been working wpf number of years now, there 2 of us, designer , programmer (me). produce business applications our company such shipment tracking , like. we've began looking redesign of our company website , part of has been long running discussion on moving our desktop applications web applications via website, there numerous reasons wont go into. now problem i'm having wrapping head around html5 , isn't i've spent long hours googling , finding arguments against , that, still lack fundamental understanding of few points, i'm hoping cleared up. 1. html5 still need back-end code, such php or asp.net? this sticking point me, our needs pretty standard. need produce application can collect , display data database, need data manipulation nothing heavy. can html5 standalone? or still pretty ui front-end? 2. html5 applications - applications? this 1 seems give confusion, different sources different things on subject, html5 able of

javascript - Can 'Send to the Server' button functionality be by-passed in CKEDITOR image plugin? -

Image
in upload tab of image plugin in ckeditor, user has first choose file computer , has click 'send server' button send file server , fill ui elements in info tab. now looked @ code of upload tab.it - { id: 'upload', hidden: false, filebrowser: 'uploadbutton', label: lang.uploadtab, elements: [ { type: 'file', id: 'upload', label: lang.btnupload, style: 'height:40px' }, { type: 'filebutton', id: 'uploadbutton', filebrowser: 'info:src', label: lang.btnupload, 'for': [ 'upload', 'upload' ] } ] } it has no full description of how button 'send server' added di

php - Pass Javascript array containing objects using JQuery post -

i have javascript array containing javascript objects: var fruits = []; var fruit = new object; fruit.name = apple; fruit.color = red; fruits.push(fruit); how pass using jquery's post $.post contents accessible through php's $_post array? how object properties accessed php? you end object looking like: var fruit ={ name:'apple', color: 'red' } you can post object php $.post('path/to/server', fruit, function(resp){ // validate response , }); default contenttype $.ajax of $.post shorthand method application/x-www-form-urlencoded same sending form. jquery internals take care of encoding data object passed argument $.ajax or $.post or other shorthand methods in php $fruitname = $_post['name']; $fruitcolor = $_post['color']; if wanted send whole array do: $.post(url, {fruits: fruits}); then in php: $fruitsarray = $_post['fruits']; foreach($fruitsarray $item){ $name = $i

java - How to install android-maven-plugin? -

i need use android-maven-plugin project (especially multidex feature) can not figure out how configure actual pom.xml file (is standard file). using eclipse luna on windows. i did not manage find tutorial, has link how use , configure ? i want use plugin artifact : <plugin> <groupid>com.simpligility.maven.plugins</groupid> <artifactid>android-maven-plugin</artifactid> <version>4.3.0</version> </plugin> note : not confund groupid com.jayway.maven.plugins.android.generation2 note 2 : think not same problem , solution here : how start using android-maven-plugin? the android maven plugin used use jayway groupid , has migrated simpligility based one. all instructions find still valid apart differing groupid. suggest @ documentation website , example projects .

c# - ASP.NET MVC - Display name for the whole model -

i know there's displayname , display model properties : public class mymodel { [display(name = "licence")] public string licence { get; set; } } but there display whole model ? may : [display(name = "my beautiful model")] public class mymodel { ... and if so, how access html ? you add property model called title , in set so public string pagetitle { { return "attribut de licence"; } } this work. quite crude, don't think can add display attribute model itself.

c++ - Qt - Storing a widget pointer in a QAction? -

in qt have table each row has button in 1 of columns , button opens drop-down menu can click actions. connect triggered() signal of actions slot handle them, in slot have know row action triggered. can't store in setdata() , because stores qvariant . how else can store pointer widget? q_declare_metatype(qpushbutton *) ... qpushbutton *pb = new qpushbutton; qvariant v = qvariant::fromvalue(pb); qdebug() << pb << v.value < qpushbutton * >(); works me.

c - How to discover an image that was converted from one format to anothter? -

is possible trace image png image jpg? example image x.jpg converted x.png. there way of telling x.png x.jpg, difference being formats? if l convert img.jpg img.png posssible me img.jpg? intend check in c. as first question, meta-information stored in png can tell original format or file was. there no requirement store meta-information in file. as second question: png lossless format. if decompress jpeg image bitmap , encode bitmap png, can @ least th png bitmap of jpeg. getting jpeg means re-encoding (compressing) bitmap, arrive @ bitwise identical jpeg file means using same compressor settings used create original jpeg. don't know settings (and may depend on compressor code too), "no, can't original jpeg."

python - Find end date of quarter given date, pandas -

assume have table like table = [[datetime.datetime(2015, 1, 1), 1, 0.5], [datetime.datetime(2015, 1, 27), 1, 0.5], [datetime.datetime(2015, 1, 31), 1, 0.5], [datetime.datetime(2015, 2, 1), 1, 2], [datetime.datetime(2015, 2, 3), 1, 2], [datetime.datetime(2015, 2, 15), 1, 2], [datetime.datetime(2015, 2, 28), 1, 2], [datetime.datetime(2015, 3, 1), 1, 3], [datetime.datetime(2015, 3, 17), 1, 3], [datetime.datetime(2015, 3, 31), 1, 3]] df = pd.dataframe(table, columns=['date', 'id', 'value']) is there way specific end date of actual quarter given dates in column date ? e.g., add column q_date df such that date id value qdate 0 2015-01-01 1 0.5 2015-03-31 1 2015-01-27 1 0.5 2015-03-31 2 2015-01-31 1 0.5 2015-03-31 3 2015-02-01 1 2.0 2015-03-31 4 2015-02-03 1 2.0 2015-03-31 5 2015-02-15 1 2.0 2015-03-31 6 2015-02-28 1 2.0 20

Qt Image from resource file -

i'm trying insert image program via resource file, like: <rcc> <qresource prefix="/"> <file>green.png</file> <file>other files</file> </qresource> </rcc> and when i'm trying load using qimage or qpixmap, like: qimage *green = new qimage(":/green.png"); if(green->isnull()) qdebug("null"); i see null message, indicating i'm doing wrong. 1 solution may using absolute path like "c:\\users\\user\\documents\\project\\green.png", which works of course, i'd prefer implement using resource file. please give me advice? all work if png files located in same folder .pro, .qrc, , .cpp files of project. usually convenient put images special subfolder resources, example. in .qrc line like: <file>resources/green.png</file> and in .cpp file: qimage *green = new qimage(":/resources/green.png");

c# - Linq query to take the value from Array with matching sub string value -

i have string - filterarg , array of string - arraycoldef shown in below code. trying split string filterarg |~| , trying value filterarg matching arraycoldef value. can 1 let me know how value todo commented in code static void main(string[] args) { hashtable ht = new hashtable(); string filterarg = "zipcode=2130|~|zipplace=knapper"; string[] arraycoldef = { "zipcode", "space", "zipplace" }; foreach (var item in arraycoldef) { var key = item; var value = filterarg.split(new string[] { "|~|" }, stringsplitoptions.removeemptyentries);//todo: here value should hold = 2130 first itteration ht.add(item, value); } } i think complicated iterating on arraycoldef , it's easier iterate through splited string , extract values. can below. static void main(string[] args) { hashtabl

javascript - Jquery validation remote not working -

i using violin validate if email or username unique remote option not working , have no clue why. here js code $('.form').validate({ rules: { email: { required: true, email: true, remote: { url: "../app/codecourse/validation/validator.php/", type: "post", data: { email: function() { return $( "#email" ).val(); } } } }, username: { required: true, rangelength: [6,16], alpha: true, remote: { url: "../app/codecourse/validation/validator.php/", type: "post", data: { username: function() { return $( "#username" ).val(); }

android - How to change button text when audio playback is complete? -

i beginner in android studio, , made button plays , stops sound (labeled start/stop) after sound play complete, button doesn't show start text again. how can make button change text start when playback done? how can make sound stop when switching view? my code: public class insideaventador extends activity { mediaplayer mysound; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.insideaventador); mysound = mediaplayer.create(this, r.raw.lamborghini); } public void startup(view v) { button button = (button) v; if (mysound == null) { mysound = mediaplayer.create(insideaventador.this, r.raw.lamborghini); } if (mysound.isplaying()) { mysound.pause(); ((button) v).settext("start"); } else { mysound.start(); ((button) v).settext("stop");

javascript - How to get around the CORS issue in Google's API? -

i working on application have fetch elevation points using google's elevation api , stuck on infamous cors problem. var elevationurl = 'https://maps.googleapis.com/maps/api/elevation/json?locations=39.7391536,-104.9847034&key=aizasyagxfguvr4nia7pegx_0hcz0anevckaa58'; $.ajax({ url: elevationurl, type: 'get', // datatype: 'jsonp', success: function(){ } }); for starters tried query fixed point. when this, cors alert in browser's console. when tried datatype: 'jsonp' , works , response api browser complains response has error in response doesn't. trying parse json jsonp why getting syntax error in response. what way around this? how query elevation api via ajax calls?

c - How to compile Cogl hello example -

Image
my environment fedora 21, play around hello tutorial http://www.cogl3d.org/hello.html , shows: building example if save above code file named hello.c can compile example follows: gcc -o hello hello.c pkg-config --cflags --libs cogl2 glib-2.0 but can find cogl2 library ? if doesn't include cogl library: [xiaobai@xiaobai cogl]$ gcc -o hello hello.c `pkg-config --cflags --libs glib-2.0` hello.c:1:23: fatal error: cogl/cogl.h: no such file or directory #include <cogl/cogl.h> ^ compilation terminated. [xiaobai@xiaobai cogl]$ i tried dnf search cogl there's cogl, no such thing cogl2: [xiaobai@xiaobai cogl]$ dnf search cogl [sudo] password xiaobai: ================================================================= n/s matched: cogl ================================================================== cogl.x86_64 : library using 3d graphics hardware draw pretty pictures cogl.i686 : library using 3d graphics hardware draw p

php - Laravel Dropzone Request empty -

i'm uploading single file dropzone laravel application. it's worked fine, has stopped working. dropzone uploads plain text details along request. far can tell, upload going fine. can see in chrome developer tools form fields there etc (see request below). however, if dd($request->all()) returns empty array. this request seen through chrome developer tools: accept:application/json accept-encoding:gzip, deflate accept-language:en-gb,en-us;q=0.8,en;q=0.6 cache-control:no-cache connection:keep-alive content-length:10939930 content-type:multipart/form-data; boundary=----webkitformboundaryzcrfnssymqfou3uh cookie:xsrf-token=some_token_value host:gateway origin:http://gateway referer:http://gateway/tools/videos/create user-agent:mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, gecko) chrome/43.0.2357.130 safari/537.36 x-csrf-token:token_value x-requested-with:xmlhttprequest request payload ------webkitformboundaryzcrfnssymqfou3uh content-disposition: fo

algorithm - Why do we say that NP complete problems are NP? -

i have gone through links regarding topic still confused why consider np complete np. can verify in polynomial time np complete problems np, have np problems can solved in polynomial time np complete problems can't solved in polynomial time doesn't contradict property of calling np complete problems np? there's set p of decision problems can solved deterministic turing machine in polynomial time. then there's set np of decision problems can solved non-deterministic turing machine in polynomial time, i.e. solution can verified in polynomial time given witness string. a deterministic turing machine can simulate non-deterministic one, know there exponential-time algorithm solve np problems. don't know whether don't in fact have p = np. an np-complete problem np problem at least hard other np problem. example, sat np-complete because can encode non-deterministic turing machine , solving sat means simulating machine. can show np-completeness of

java - Loading local JsonData while no Internet connection is present -

Image
i making android app in want load json data. specification that, if there internet available, load data url provide. if there no internet, load local json.txt file. my app able load data url if there internet connection , can load local json data if there absolute no internet connection. however in meta state such this, app crashes. the log 07-14 09:56:21.258 22499-28349/scientist.jobless.foodmana e/log_tag﹕ error in http connection java.net.unknownhostexception: unable resolve host "lit-hamlet-6856.herokuapp.com": no address associated hostname 07-14 09:56:21.258 22499-28349/scientist.jobless.foodmana e/log_tag﹕ error converting result java.lang.nullpointerexception 07-14 09:56:21.258 22499-28349/scientist.jobless.foodmana e/log_tag﹕ error parsing data org.json.jsonexception: end of input @ character 0 of 07-14 09:56:21.266 22499-28349/scientist.jobless.foodmana e/androidruntime﹕ fatal exception: asynctask #1 java.lang.runtimeexception: error occured wh

ruby on rails - activeadmin edit prefill fields? -

in active admin belong_to/foreign key object fields being showed as drop down. requirement was, user should capable give input if input new create new entry of foreign key while creating entry. suppose have 2 table person , car, every person has 1 car. so added parameter car_name_str following way: form |f| inputs input :name input :address input :car_string end end i added controller can take car_string , create new car. problem is, when try edit, car_string remains empty. how can prefil it? have read nested resources in activeadmin? what can override new action initialise new car: controller def new @user = user.new @user.cars.build(name: 'my awesome car') end end then, in form can write this: form |f| inputs input :name input :address f.has_many :cars, heading: nil, allow_destroy: false, new_record: false |a| a.input :name end end end this way form initialised new car and, whe

excel - Loop each cell from sheet1 and always replace in 1 cell at sheet2 -

i had problem, when want use each name c1 c21 sheet1 , insert in nameuser url address. delete each name sheet1 c1 c21 not replace destination b2 @ sheet2 every name. sub url_get_query() dim wb workbook dim src worksheet dim tgt worksheet set wb = thisworkbook set src = wb.sheets("sheet1") set tgt = wb.sheets("sheet2") dim url string dim symbol string tgt.columns("b:c").select selection.clearcontents src.select dim c range dim rng range set rng = range("c3:c21") each c in rng msgbox (c.address) rng = namerange nameuser = namerange 'nameuser = src.range("c3") url1 = "url;http://my001vs0253:81/user.aspx?username=" url = url1 & nameuser & "&userdomain=tp" '"url;http://my001vs0253:81/user.aspx?username=afiqg&userdomain=tp", nameuser1 = "user.aspx?username=" nameurl = nameuser1 & nameuser & "&userdomain=tp_7" 'nameurl = nameuser1 & rrn

symfony - Symfony2 which doctrine relationship for blog between posts and comments -

i building blog symfony2 , wondering doctrine relation mapping should used comments. thing use comments in different parts, commenting on pictures (which not posts) or commenting on comments. need comment entity independent of post. i wanted try onetomany unidirectionnal forces unique key on post not great. thanks help simple way the simplest way create onetomany relationship each linked entity. it's quite ugly , maybe not effective when searching entities, works. the mapping similar this: class comment { /** * @orm\manytoone(targetentity="post") * @orm\joincolumn(nullable=true) **/ protected $post; /** * @orm\manytoone(targetentity="picture") * @orm\joincolumn(nullable=true) **/ protected $picture; /** * @orm\manytoone(targetentity="comment") * @orm\joincolumn(nullable=true) **/ protected $comment; } you'll have handle security make sure comment has @

javascript - oauth twitter not working in android devices -

i created twitter client app in cordova using oauth protocol. in windows phone, app fetching request token , retrieving tweets. in android device,fetch request token not working. receiving error {"text":"", "xml":"", requestheaders": {}, "responseheaders": {shouldinterceptrequest}} . using same code both platforms. i used following code fetching token: var oauth = oauth({ consumerkey: "xxxx", // replace here consumer key or api key consumersecret: "xxxx", // replace here consumer secret or api secret accesstoken: "xxxx", accesstokensecret: "xxxx", callbackurl: "http://twitter.com", requesttokenurl: "https://api.twitter.com/oauth/request_token", authorizationurl: "https://api.twitter.com/oauth/authenticate", accesstokenurl: "https://api.twitter.com/oauth/access_token" }); function onload() { oauth.fetchrequesttoken(function (url) { ale

android - MPAndroidChart OnClickListener is not working for PieChart -

i use mpandroidchart in project. there 4 graphs,displays information. want show detailed information user when clicks on specific chart. have used view.setonclicklistener(); not working. there other method listen click events chart. found onvalueselected(); method in mpchart documentation not useful me,because want id of chart clicked. i have used following chart = (piechart) findviewbyid(r.id.chart); chart.setonclicklistener(mainactivity.this); chart.settouchenabled(true); public void onclick(view v) { toast.maketext(mainactivity.this,"clicked",toast.length_short).show(); } also other way is chart.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { toast.maketext(mainactivity.this,"clicked",toast.length_short).show(); } }); but no luck. i have tried onclicklistener it's not working use following code comes library itself. mchart.setonchartgesturelis

ruby on rails - Using mobile number instead of using the default email in device -

i new ruby trying teach myself ruby on rails watching tutorial. last week came know device tried there way change default email attribute mobile numbers. i hope possible came cross of lots of things there nothing helpful. i hope help. in advance. new.html.erb-registration <div class="row vertical-offset-100"> <div class="col-md-4 col-md-offset-4"> <div class="row"> <div class="span4"> <%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name), html: {class: "well"}) |f| %> <fieldset> <h1 class="text-center login-title">get in it's free!</h1> <%= f.input :first_name, placeholder: "what's awesome name?" %> <%= f.input :last_name, placeholder: 'and beutiful last name' %> <%= f.input :phone_number, placeholder: 'number' %> <%= f.input

protractor - Atlassian Bamboo - Build Agent IP as variable? -

within atlassian bamboo, possible hold of ip address (or dns name) of build agent task being executed on? it's intention use execute functional tests machine using grunt , protractor. e.g. grunt acceptancetests --baseurl=${bamboo.buildagent.ip} you should able set bamboo agent ip/hostname agent capability , reference within build. alternatively can this: add script task this: #!/bin/bash rm -f agent.properties host=$(hostname) echo "agenthostname=$host" > agent.properties cat agent.properties add inject bamboo variables task loads in agent.properties file. in command reference ${bamboo.<namespace>.agenthostname} <namespace> defined in within inject bamboo variables task.

android - No resource found that matches the given name at icon/label -

Image
i've issue generate signed apk. i have these errors error:(5, -1) android resource packaging: [...] /applications/mamp/htdocs/cordova/[...]/platforms/android/androidmanifest.xml:5: error: error: no resource found matches given name (at 'icon' value '@drawable/icon'). error:(5, -1) android resource packaging: [...] /applications/mamp/htdocs/cordova/[...]/platforms/android/androidmanifest.xml:5: error: error: no resource found matches given name (at 'label' value '@string/app_name'). error:(6, -1) android resource packaging: [...] /applications/mamp/htdocs/cordova/[...]/platforms/android/androidmanifest.xml:6: error: error: no resource found matches given name (at 'label' value '@string/activity_name'). my strings.xml contains: <?xml version='1.0' encoding='utf-8'?> <resources> <string name="app_name">app</string> <string name="launcher_name">@string

visual studio - How to Publish an Umbraco Intranet? -

i have completed umbraco intranet using webmatrix. want publish our server can see , use it. webmatrix can web deploy or ftp, opened project in visual studio 2013 publish there. able publish desktop, have attempted running here before uploading server. in iis 'add website' , set project, using port 101. tried both on desktop , moved wwwroot , in both cases ie says 'this page can't displayed'. using ce database umbraco 7.2.4. help please. i've been @ days now.... i've tried umbraco forum , google , got nowhere. :( tony if have remote desktop access web server, don't need rely on web publishing. can build website in release mode, , copy folders web project onto webserver. on web server can manually set iis website , set host names etc. shouldn't need deploy using visual studio, way safer

lotus domino - Xpages mobile controls not visible on browser -

Image
i extremely new mobile controls of xpages, according documentation, have changes setting in "xsp properties page" selected check-box "use mobile theme xpages prefix: _m". checked source tab , status is xsp.ajax.renderwholetree=false xsp.error.page.default=true xsp.library.depends=com.ibm.xsp.extlib.library,com.ibm.xsp.extlibx.library xsp.persistence.mode=file xsp.resources.aggregate=true xsp.theme=oneuiv2.1 xsp.theme.mobile.pageprefix=m_ then have stated test xpages using mobile controls code test page is <?xml version="1.0" encoding="utf-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex"> <xe:singlepageapp id="singlepageapp1" selectedpagename="topiclist"> <xe:apppage id="apppage2" pagename="topiclist"> <xe:dataview id="dataview1"> <xe:th