Posts

Showing posts from January, 2014

eclipse - Error while installing Visual Page Editor in JBoss Developer Studio -

i trying install visual page editor in jboss developer studio (basically customized eclipse luna). per instrauctions should: visual page editor has experimental support windows 64-bit. follow link below details on how install. until can click on source tab hide error/info message. did , added " http://download.jboss.org/jbosstools/updates/integration/luna/core/xulrunner/xulrunner-1.9.2_win64-2014-08-22_09-55-58-b4/ " through install new software, fails error: org.jboss.tools.vpe.xulrunner.xulrunnerbundlenotfoundexception: bundle org.mozilla.xulrunner.win32.win32.x86_64 not found. @ org.jboss.tools.vpe.xulrunner.browser.xulrunnerbrowser.getxulrunnerpath(xulrunnerbrowser.java:233) @ org.jboss.tools.vpe.xulrunner.browser.xulrunnerbrowser.<init>(xulrunnerbrowser.java:117) @ org.jboss.tools.vpe.xulrunner.editor.xulrunnereditor.<init>(xulrunnereditor.java:128) @ org.jboss.tools.vpe.editor.mozilla.xulrunnereditor2.<init>(xulrunnereditor2.java

ecm - Sitecore Email Campaign Manager and MTA Logs -

i'm using email campaign manager version v2.1 rev 140214 along sitecore v6.6 send email. instance configured send email via sitecore's mta service. everything works of time, intermittently email not sent though in sitecore logs message flagged processed , finished. managedpoolthread #3 16:02:50 info job started: sending message (82da24e91d714756ac0173b590bf0b27) managedpoolthread #3 16:02:50 info emailcampaign: dispatch message ( xxx ): started managedpoolthread #3 16:03:20 info emailcampaign: 'xxx': 86 recipients added queue. managedpoolthread #3 16:03:40 info emailcampaign: message 'xxx': recipients processed: 86. generate: min: 00:00:00.0312000; avg: 00:00:00.1382235; max: 00:00:00.3900007; total: 00:00:11.8872213. send: min: 00:00:00.8424014; avg: 00:00:00.9278388; max: 00:00:01.9344034; total: 00:01:19.7941399. process: min: 00:00:00.9048016; avg: 00:00:01.0660623; max: 00:00:02.3244041; total: 00:01:31.6813612. managedpoolthread #3 16:03:

objective c - How to solve this wrong ADBannerContentSizeIdentifierPortrait is Deprecated in IOS 6.0? -

i updating app in ios 8, adbanner shows wrong, how solve issue. 'adbannercontentsizeidentifierportrait'is deprecated:first deprecated in ios 6.0 , 'requiredcontentsizeidentifiers' deprecated :first deprecated in ios 6.0. code, please check one. adview.requiredcontentsizeidentifiers = [nsset setwithobject:adbannercontentsizeidentifierportrait]; adview.currentcontentsizeidentifier = adbannercontentsizeidentifierportrait; replace lines with: [adview setautoresizingmask:uiviewautoresizingflexiblewidth];

sql server - How to Query 2 SQL databases and compare results -

i have 2 separate sql server databases i'd query , compare results. for example: db1 select * customers dtcreated > @startdate this query give me list of customers created after specific date. i take results above, , query database (db2) tell me of above query customers still active. something like: db2 select * customers bactive = 'true' (and exists in db1 query) is there way this? output: number of records db1 number active in db2 155 67 you can cross-database queries specifying databasename , schema + table name. select * customers b bactive = 'true' , exists (select 'x' database1.dbo.customers a.dtcreated > @startdate , a.key = b.key) i'm sorry i'm bit confused example querys , example output. using technique can count way like

vb.net - Process cannot access it is being used by another process -

i got solution 3 separated windows services. 1 services download files, second taking files , third 1 loading db. during downlading files, second process starting play during still downloading, or third process wants load file still parsing. heard mutex resolution in case not sure how in situation use other processes waits on files untill "free". below i'll present code: downlading process part of code file download doing: (in case each file downloading specific location folder) each item in remotefiles try session.getfiles(item, downloadfolder, true, transferoptions).check() catch ex exception end try next parsing win service process part of code parsing downloaded files: dim columnfound boolean = false using myreader new fileio.textfieldparser(filetobeparsedpath) dim currentrecord string()

c# - Change folder icon color programmatically -

i wanted changed color of folder icon of windows. possible means of shell or modifying desktop.ini through c#? if want programatically, start looking @ portable executable file format (wikipedia entry). resources section (.rsrc, see section 6.9) should contain icon. using information, can write tool modify icon.

ios - How to display my search results in UICollectionView -

Image
i have uiview has 2 textfield,two labels ,uicollectionview, , 1 search bar.i want add searchdisplaycontroller , searchbar uiview. i have linked datasources , delegate search. searchbar=[uisearchbar new]; searchdisplaycontroller=[[uisearchdisplaycontroller alloc]initwithsearchbar:searchbar contentscontroller:self]; searchdisplaycontroller.delegate=self; searchdisplaycontroller.searchresultsdelegate=self; searchdisplaycontroller.searchresultsdatasource=self; [self.view addsubview:searchbar]; my problem searchdisplaycontroller has results in searchresultstableview , can populated tableview delegates have uicollectionview. how can display search results in collection view delegate methods? view looks this: with uisearchdisplaycontroller, simple: create uisearchbar , add custom uicollectionview section header, initialize uisearchdisplaycontroller search bar have @ answer: https://stackoverflow.com/a/24992762/2082569

javascript - Dual Axes with column drill down, Cannot column click -

i have dual axes highchart, wit column drill down , spline, there problem column area below level of spline, nt goes in drill down of column. $(function() { highcharts.setoptions({ lang: { drilluptext: '<< go {series.name}' } }); highcharts .data({ csv: document.getelementbyid('tsv').innerhtml, itemdelimiter: '\t', parsed: function(columns) { var brands = {}, cpc = {}, brandsdata = [], cpcdata = [], temp = {}, versions = {}, drilldownseries = [], $container = $('#container'), chart = $('container').highcharts(), origchartwidth = 1500, origchartheight = 600, chartwidth = origchartwidth, chartheight = origchartheight; // parse percentage strings columns[1] = $ .map( co

php - pdo exception "colunt not find driver in ..." -

in mainpage.php file, use this: <?php $dsn = 'mysql:host=localhost;dbname=webfilter_schema'; $username = 'root'; $password = ''; $dbh = new pdo($dsn, $username, $password); //works. and fine. in php file: <?php class homecontroller { public $pdoobject; // handle of db connexion private static $instance; public function __construct() { $dsn = 'mysql:host=localhost;dbname=webfilter_schema'; $user = "root"; $password = ""; $this->$pdoobject = new pdo($dsn, $user, $password);// error line.. } public function createlocalobject(){ $query ="insert users set name = ?, password = ?,ipaddress=?,e_mail=?"; $process = $this->pdoobject->prepare($query); $insertresult = $process->execute(array("asd","ferfr","23","sadsads@hotmail.com")); if($insertresult) { return true; } return false; } } ?> it throws excep

jquery - Why cant null be returned to a $.getJSON() function? -

given following controller method public actionresult testjsonresult() { return json(true, jsonrequestbehavior.allowget); // return json(null, jsonrequestbehavior.allowget); // return null; } and client side script var url = '@url.action("testjsonresult", "test")'; $.getjson(url, function (result) { if (result) { console.log('returned result'); } else { console.log('returned null'); // never hit } }).fail(function (result) { console.log('failed'); // hit return json(null); , return null; // result status 200 ok }); then outputs 3 return value options are return json(true, jsonrequestbehavior.allowget); // outputs "returned result" return json(null, jsonrequestbehavior.allowget); // outputs "failed" return null; // outputs "failed" acording specification values a json value must object, array, number, or string, or 1 of following

haskell - How can I run a scaffolded Yesod website in a cabal sandbox? -

let's have cabal sandbox @ folder root , i've installed yesod packages in it. then, do: root> yesod init i go through prompts , end folder project inside root . yesod devel doesn't appear support passing sandbox arguments it, packages install in sandbox not visible scaffolded yesod site (and don't want install in global space, because that's impossible manage , replicate). i've tried the suggestion here , gives me these errors: root> runhaskell -no-user-package-db -package-db=.cabal-sandbox\x86_64-windows-ghc-7.8.4-packages.conf.d project/app/main.hs project\app\main.hs:2:8: not find module `application' use -v see list of files searched for. running inside root/project : root/project> runhaskell -no-user-package-db -package-db=../.cabal-sandbox\x86_64-windows-ghc-7.8.4-packages.conf.d app/main.hs foundation.hs:6:8: not find module `text.jasmine' use -v see list of files searched for. settings.hs:8:8: not find m

arrays - NSSortDescriptor using NSDate attribute of Entity (Swift) -

i have question similar this one little twist. i wondering how return specific attribute ('weight' in case) in fetch request when core data model follows: client <-->> assessment ('assessment' has weight attribute) here's client class: @objc(client) class client: nsmanagedobject { @nsmanaged var name: string @nsmanaged var assessment: nsset } and assessment class: @objc(assessment) class assessment: nsmanagedobject { @nsmanaged var weight: int16 @nsmanaged var nsdateofassessment: nsdate @nsmanaged var client: client } and here's fetch request have it. understand right 'weights' array being filled managed objects, need filled ints of 'weight' attribute, , sorted date 'nsdateofassessment' described in comments of code. in turn using array fill graph. var client: client! = nil var weights = [] func weightfetchrequest() -> nsfetchrequest { let appdelegate = uiapplication.sharedap

jquery - fail in transmitting data in ajax -

i want make vote page. when click "", amount of vote plus meets "404 not found".(there no vote2.jsp in project because want refresh part of page.) vote.jsp <body> <div class="testspan" data-id="1"><span>vote a</span> num:<em>0</em></div> <div class="testspan" data-id="2"><span>vote b</span> num:<em>0</em></div> <div class="testspan" data-id="3"><span>vote c</span> num:<em>0</em></div> <div class="testspan" data-id="4"><span>vote d</span> num:<em>0</em></div> </body> ajax: $(".testspan").click(function(){ var xsid = $(this).attr("data-id"); $.post("/vote/vote2",{ xsid:xsid },function(data, textstatus){ var xsmap = data.xsmap; $(".testspan").each(func

java - redirect doesnt include path -

<rule> <from>^/asd/(.*)/$</from> <to type="temporary-redirect">%{context-path}/?asd=$1</to> </rule> my website hosted myapp.com/testing , jetty context dev so myapp.com/testing/dev/ but when try myapp.com/testing/dev/asd/123/ instead of myapp.com/testing/dev/?asd=123 i redirected myapp.com/dev/?asd=123 i 'm using v 4.0 http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/4.0/index.html you have 2 things mucking request. your rewrite filter @ odds whatever have in front of jetty (hardware or software converting browser (http client) requests myapp.com/testing/dev/ jetty's myapp.com/dev/ . jetty isn't aware of /testing/ part of path, rewrite filter cannot add /testing/ piece 302 redirect. either you'll need make product in front of jetty smart enough rewrite location response header, or you'll need adjust rewrite filter include path information product in front of jetty

python - Plot Polar Gridded Sea Ice Concentrations using Cartopy -

i trying make plots of polar gridded sea ice concentrations nsidc. data delivered in polar stereographic projection , grid, example file (binary,arctic,25 km resolution) can downloaded at: http://nsidc.org/data/nsidc-0081 when read data using numpy, , plot using matplotlib's imshow function, works. import numpy np import matplotlib.pyplot plt infile='c:\\nt_20150326_f17_nrt_n.bin' fr=open(infile,'rb') hdr=fr.read(300) ice=np.fromfile(fr,dtype=np.uint8) ice=ice.reshape(448,304) #convert fractional parameter range of 0.0 1.0 ice = ice/250. #mask land , missing values ice=np.ma.masked_greater(ice,1.0) fr.close() #show ice concentration plt.imshow(ice) when try plot using cartopy, runs without errors returns empty coastline. import matplotlib.pyplot plt import cartopy.crs ccrs fig=plt.figure(figsize=(3, 3)) ax = plt.axes(projection=ccrs.northpolarstereo()) ax.coastlines(resolution='110m',linewidth=0.5) ax.set_extent([-180,180,50,90],crs=ccrs.platec

objective c - Parse.com - after remove row from Installation class at Data Table my device token is not rcognize anymore -

after remove row installation class data table device token not recognize anymore. the didregisterforremotenotificationswithdevicetoken method not called anymore when app load. i'v tried restore iphone, nothing happen. try un-installing application reinstalling it. should trick.

Printing the first value in an array instead of just the first letter? (Python) -

i have used python append data sqlite3 database array. have array, trying print appended data in format along lines of: print "team: " + new_array[0][0] + " score: " + new_array[0][1] + " overall: " + new_array[0][2] the code have okay this. however, trying create loop using counter print of data array in above format. the problem when try create loop , print first value in array, first letter of value printed. example: print new_array[0] ... print: team_6 team_3 team_5 team_1 team_2 team_4 ... and... print new_array[0][0] ... print: t t t t t t this have far: import sqlite3 new_array = [] conn = sqlite3.connect('league.db') c = conn.cursor() game = c.execute("select team,score,overall league order overall desc") items in game: new_array.append(items) print new_array[0][0] the code above print out 'team_6

python - Manually trigger Django email error report -

django error reporting handles uncaught exceptions sending email, , (optionally) shows user nice 500 error page. this works well, in few instances i'd allow users continue business uninterrupted, still have django send me email error report exception. so basically: can manually send email error report if catch exception? of course, i'd avoid manually generating error report email. you can use following code send manually email request , exception e : import sys import traceback django.core import mail django.views.debug import exceptionreporter def send_manually_exception_email(request, e): exc_info = sys.exc_info() reporter = exceptionreporter(request, is_email=true, *exc_info) subject = e.message.replace('\n', '\\n').replace('\r', '\\r')[:989] message = "%s\n\n%s" % ( '\n'.join(traceback.format_exception(*exc_info)), reporter.filter.get_request_repr(request) ) mai

vb.net - Conversion from type 'DBNull' to type 'Date' is not valid on tryparse -

i attempting datetime.tryparse date-formatted string, new column created part of dataview table. getting error when code runs conversion type 'dbnull' type 'date' not valid. this line of code: datetime.tryparse(dr("ix_articlestartdate"), dr("nstartdate")) and these values in watch when errors out. + dr("ix_articlestartdate") "2015/3/11" {string} object + dr("nstartdate") {} object i under impression tryparse return null value if fails convert datatypes. there should doing different convert string datetime datatype? dr instantiated datarow dim dr datarow = dv0.table.rows(i) vb implicitly try's cast dbnull value datetime, since method signature of datetime.tryparse is public shared function tryparse(s string, byref result date) boolean which fails. can use variable instead: dim startdate datetime if datetime.tryparse(dr("ix_articlestartdate").tostr

python - How to try all possible paths? -

i need try possible paths, branching every time hit point. there <128 possible paths problem, no need worry exponential scaling. i have player can take steps through field. player takes step, , on step there encounter. there 2 options when encounter found: i) input 'b' or ii) input 'g'. i try both , continue repeating until end of field reached. end goal have tried possibilities. here template, in python, talking ( step object returns next step using next() ): from row_maker_inlined import step def main(): initial_stats = {'n':1,'step':250,'o':13,'i':113,'dng':0,'inp':'empty'} player = step(initial_stats) end_of_field = 128 # walk until reaching encounter: while player.step['n'] < end_of_field: player.next() if player.step['enc']: print 'an encounter has been reached.' # perform input on encounter step:

javascript - Cant get server control's id using document.getElementById() -

i trying pass asp panel id button onclientclick method , intend show panel document.getelementbyid fetching null value. why not able fetch control's id. here's mark up: <asp:panel id="pnl1stdurationwaiverform" style="display: none" runat="server"></asp:panel> <asp:linkbutton id="lbtnyes" runat="server" onclientclick="showdurationwaiver(document.getelementbyid('<%= pnl1stdurationwaiverform.clientid %>'))" text="yes"></asp:linkbutton> here's javascript method: function showdurationwaiver(pnlctrl) { debugger; if (pnlctrl != null) { pnlctrl.style.display = 'block'; } return false; }

r - How to calculate accuracy from table matrix -

Image
i'm using table show results kmeans cluster vs. actual class values. how can calculate % accuracy based on table. know how manually. iris-setosa had 50 in cluster 2 while iris-versicolor had 2 in other cluster. is there way calculate % incorrectly classified instances: 52% i print confusion matrix classes , clusters. lke this: 0 1 <-- assigned cluster 380 120 | 1 135 133 | 0 cluster 0 <-- 1 cluster 1 <-- 0 incorrectly clustered instances : 255.0 33.2031 % you can use diag() select cases on diagonal , use calculate (in)accuracy shown below: sum(diag(d))/sum(d) #overall accuracy 1-sum(diag(d))/sum(d) #incorrect classification you can use calculate number of cases (in)correctly classified: sum(diag(d)) #n cases correctly classified sum(d)-sum(diag(d)) #n cases incorrectly classified where d confusion matrix

java - Android service is not starting -

i need start background service on click of android app icon. below activity oncreate() method. protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_executable_runner); startservice(new intent(this, exerunnerservice.class)); } and overridden service class rest default. public class exerunnerservice extends service{ public int onstartcommand(intent intent, int flags, int startid) { return start_sticky; } @override public void oncreate() { thread th = new thread(new runnable() { public void run() { log.d(tag, "service running"); } }); th.start(); } } i don't have initialization code same. when start application not getting service logs. i put , override on onstartcommand, , call super.oncreate() in overridden oncreate method; like this: public class myservice extends service { private static boolean isrunning = false; p

c# - Unity 2D particle collision not getting event -

Image
when turn on particle system in 2d game, , check collision button in inspector window, expect event on-particle-collision , never happens! i added thing named worldparticlecollider , also, no collisions. i have tried adding worldparticlecollider enemy(just no reason), , sure did not work. screenshot: why ? according question @ unity forums onparticlecollision may not support 2d games now. according unity roadmap, feature available unity 5.3 (dec 8, 2015). maybe can use 3d collider 2d game. remember collider cannot trigger!

c - Socket connect returns errno ETIMEOUT -

i have 1 tcp/ip ssl server enabled epoll can handle ten thousand connections simultaneously. when tried test server,i created thousand clients using thread. when tried connect server,after time connect() return etimeout. how overcome error? you change socket attributes recv , xmit timeout values same way set keepalive attribute

file - Powershell: Missing '=' operator after key in hash literal Error -

the code: $serverlistfile = "d:\scripts\serverlist.txt" $serverlist = get-content $serverlistfile -erroraction silentlycontinue $result = @() foreach($computername in $serverlist) { $avgproc = get-wmiobject -computername $computername win32_processor | measure-object -property loadpercentage -average | select average $os = gwmi -class win32_operatingsystem -computername $computername | select-object @{name = "memoryusage"; expression = {“{0:n2}” -f ((($_.totalvisiblememorysize - $_.freephysicalmemory)*100)/ $_.totalvisiblememorysize) } get-eventlog -logname security -newest 5000 | where-object {$_.eventid -eq "4624"} | select-object @{name ='username'; expression = {$_.replacementstrings[1]}} } $result += [pscustomobject] @{ servername = "$computername" cpuload = "$($avgproc.average)%" memload = "$($os.memoryusage)%" eventlog = "$username" }

mysql - Combine 3 columns (date, time, timezone as VARCHAR) and represent as UTC -

due specific reasons storing events' dates 3 separate columns (instead of single datetime column): day_begin (column type: date) hour_begin (column type: time) timezone (column type: varchar) here's example row of data data these 3 columns: 2015-01-27 09:00:00 europe/rome based on information, select , rows, start date within specific utc interval (e.g. these utc start utc end of january 2015). this quite trivial if time stored in single datetime column, since can't change product accomodate specific need - need work mysql gives functions compare utc. solution: select convert_tz(concat_ws(" ", day_begin, hour_begin), timezone, "utc") the function concatenates date , hour columns , uses value timezone column second parameter convert_tz() handles time zone conversions.

c# - Custom Model Binder for a base class in Web API -

given following models public class requestbase { public datetime transactiontimestamp { get; set; } public guid requestmessageid { get; set; } } [modelbinder(typeof(requestbasemodelbinder))] public class standardrequest : requestbase { public guid myguidid { get; set; } public int myintid { get; set; } } the values in requestbase sent via headers i'm trying implement custom model binder bind them model this i've got far public class requestbasemodelbinder :imodelbinder { public bool bindmodel(httpactioncontext actioncontext, modelbindingcontext bindingcontext) { var requestbase = bindingcontext.model requestbase; if (requestbase != null) { requestbase.requestmessageid = guid.parse(actioncontext.request.headers.getvalues("requestmessageid").firstordefault()); requestbase.transactiontimestamp = datetime.parse(actioncontext.request.headers.getval

c - Using "execv" or "execvp" to morph a program to isPrime? -

i have program called 'prime.c' below: #include "stdio.h" #include "stdlib.h" #include <unistd.h> int isprime(int number); void morph(char *number); int main(int argc, char *argv[]) { int i; int number; if (argc < 2) { printf("returning 2"); return(2); } else number = atoi(argv[1]); if (isprime(number)) { exit(1); } exit(0); } /* purpose: check if input number prime number input: number - number checked return: 0 - if number not prime number 1 - if number prime number */ int isprime(int number) { int i; for(i = 2; i*i < number; i++) { usleep(100); if (number % == 0) { printf("%d not prime number!",number); return(0); } } printf("%d prime number!",number); return(1); }

android - Send push notification with data using JSON -

i want send push notification data in it. example send parse { "phoneid": "ejw6pfsqny", "action": "com.parse.starter.update_status" } how can send android device. using following code jsonobject obj = null; try { obj = new jsonobject(); obj.put("phoneid",pass); obj.put("action","com.parse.starter.update_status"); } catch (jsonexception e) { e.printstacktrace(); } parsepush push = new parsepush(); parsequery query = parseinstallation.getquery(); // notification android users query.whereequalto("objectid", pass); log.d("log",pass); push.setquery(query); push.setdata(obj); push.setmessage(pass); push.sendinbackground(); and code use retrieve data jsonobject notificationpayload = new jsonobject(intent.getextras().getstring("com.parse.data")); id = notificationpayload.getstring("phoneid"); but not working. you can't bo

AppInviteDialog not working in Android Facebook SDK 4.0 -

Image
after long research , trying fix on own, haven't found acceptable working result. following this documentation i'm trying invite friends app. elements, such share buttons working properly. the problem "invite app" dialog. after selecting friend, dialog showing red alert icon , "send" button turns "retry" button. i have tried fix in many ways - configure app in fb dev page (like changing app category: game, travel .etc), adding new permission sharing (but haven't found, inviting required it), using gamesrequests (but app isn't game, it's android + canvas app). have returned again appinvitedialog. also, have trying use own instance of it, listeners, instead of static class. invitedialog = new appinvitedialog(this); invitedialog.registercallback(callbackmanager, new facebookcallback<result>() { @override public void onsuccess(result result) { log.i(tag, "mainactivity, invitecallback - success!&qu

Copy array of strings into another array in C -

i'm making word search program in c takes user input , chooses 1 of global arrays of words , uses generate word search. works when use 1 of global arrays not choice, want copy contents of category arrays, depending on users choice newarray can used word search. program crashes after entering option @ moment, here's have. switch(choice) { case 1: chosearray(newarray, masseffect); break; case 2: chosearray(newarray, fallout3); break; case 3: chosearray(newarray, elderscrolls); break; case 4: chosearray(newarray, gameofthrones); break; case 5: chosearray(newarray, breakingbad); break; default: printf("enter valid option!"); } void chosearray(char** newarray, char** category) { int i; for(i=0;i<6;i++) { strcpy(newarray[i], category[i]); } } the arrays , declared globally now char gameofthrones[6][250] = {"kingslanding", "tyrian", "stark", "lanisters&qu

model view controller - Configure Windows Azure webjobs sdk for visual studio 2012 -

i have existing application developed in visual studio 2012 .net framework 4. , project hosted on cloud azure. want add windows azure webjob project in cannot find extension configure this. i find extension given below not working 2012 https://visualstudiogallery.msdn.microsoft.com/f4824551-2660-4afa-aba1-1fcc1673c3d0 is there way configure 2012. have windows azure 2.2 sdk installed. sorry, tooling available vs 2013. however, if want use webjobs sdk, can nuget package , create webjob have deploy manually.

api - Heroku subdomains redirect -

so, have domain api.suapraia.org config custom domain of heroku app. but when send request on new domain resource exposed on api(api.suapraia.org /some_resource ) heroku redirects suapraia-api.herokuapp.com //some_resource is there need on domain config? i've deleted godaddy's config , started out 0 following post on heroku's blog: https://blog.heroku.com/archives/2009/10/7/heroku_casts_setting_up_custom_domains it working now

html - How to ensure that columns are contained within a row -

i'm trying create css grid system 6 columns. can see output of html , css at jsfiddle . problem appears columns overflowing rows supposed contained in. example, though row should able hold 6 'size 1' columns, sixth column in example spilling on row. how fix desired number of columns each row doesn't exceed width of row? <div class="grid-container outline"> <div class="row"> <div class="col-1"><p>col-1</p></div> <div class="col-1"><p>col-1</p></div> <div class="col-1"><p>col-1</p></div> <div class="col-1"><p>col-1</p></div> <div class="col-1"><p>col-1</p></div> <div class="col-1"><p>col-1</p></div> </div> <div class="r

c# - Cleaning up FileInfo.name switch/case statement with an interface -

i have following: foreach(var file in today.getfiles()) { if(file.length > 0 && file.extension == ".txt") { switch (file.name) { case "realy_long_ugly_file_name_0": //do break; case "realy_long_ugly_file_name_1": //do else break; } } } i have come across this post , thought clean code using interface . right application situation? have set interface , inheritance don't quite know how proceed. i understand interface calling different class based on ipizza member in ilist<ipizza> . have hard time understanding how can pass in file.name (formerly done switch/case ) interface call different classes. interface imyfiles { void process(fileinfo file); } public class filename0 : imyfiles { void imyfiles.process(fileinfo file) { //do somthing specific filename0 } } public class

powershell - Check for user in a group in a different domain -

i stuck piece of code. have 2 ad domains users , groups in them. trying run script check if user member of group disable ev access , if not member of group add them ev enable group. i have working 1 domain can't work across 2 domains have. want script check domain1 , add group in domain1 if doesn't find user check domain2 , add group in domain2. below extract of code have struggling recognise domain controller looks in right domain user. foreach ($u in $users){ foreach($domain in $domainlist) { $dom =get-addomain $domain.name $dm = $dom.distinguishedname $dname = $dom.name $domname = $dom.dnsroot $addc = get-addomaincontroller -discover -domain $domname $dc = $addc.hostname $user = get-aduser $u.name -server $dc $enablegroup = "cn=evenable,ou=users , computers," + $dom $disablegroup = "cn=evdisable,ou=users , computers," + $dom if ((get-aduser $u.name -server $dc -properties memberof).memb

c++ - Single make and parallel tests in Travis -

i need run once: autoreconf -i mkdir build && cd build ../configure make and run tests in different folders: make check -c path1 make check -c path2 the tests can parallelized matrix feature: language: - cpp compiler: - clang env: - test_path=path1 - test_path=path2 install: - autoreconf --install - mkdir build && cd build - ../configure - make script: - make check -c $test_path the problem is: install step runs twice , e.g.: install + test path1 install + test path2 is there way achieve like: install (runs once) run 2 jobs tests (the script part of travis config): test path1 test path2

sockets - Break a file into chunks and send it as binary from client to server in C using winsock? -

i created application send text file client server far i'm send string this: fp = fopen(filename, "r"); if (fp != null) { newlen = fread(source, sizeof(char), 5000, fp); if (newlen == 0) { fputs("error reading file", stderr); } else { source[++newlen] = '\0'; /* safe. */ } }else{ printf("the file %s not exist :("); return 1; } fclose(fp); send(s , source , strlen(source) , 0); //send file however professor told me must send file in binary , ready accept file of size i'm trying figure out how send file in binary , break chunks you can copy 1 byte @ time. reading/writing more byte @ time theoretically make read , write more efficiently disk. since binary short, , disk i/o internally buffered doesn't make noticeable difference. perror() convenient function displays text associated error code returned recent unix sy

java - How to know original class name if wrapped into proxy by Spring? -

i trying obtain classes name getclass().getsimplename() under spring , returns myclass$$enhancerbyspringcglib$$somehex this because spring wraps class proxy. is there portable way obtain original class name? spring provides utility this. http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/util/classutils.html#getuserclass-java.lang.class- public static class<?> getuserclass(class<?> clazz) "return user-defined class given class: given class, original class in case of cglib-generated subclass."

Ability to set JavaScript breakpoints in browser pointed at local environment -

unfortunately, while javascript breakpoints can set in production, cannot set in local. in local, on refresh, javascript execution proceeds unimpeded, if no breakpoint had ever been set. (this has been tested in chrome, safari , ff on mac os x.) the current local environment differs in headers javascript files. the headers pasted, below. there difference in headers being set, cause undesirable behavior in local. thanks! production general remote address:23.235.33.207:80 request url:http://www.example.com/wp-content/themes/example/js/header.top.min.js?ver=1427752599 request method:get status code:200 ok (from cache) response headers accept-ranges:bytes access-control-allow-origin:* age:149381 cache-control:max-age=31536000 connection:keep-alive content-encoding:gzip content-length:56250 content-type:application/javascript date:wed, 01 apr 2015 15:28:14 gmt etag:"2a5ce-5128893ad1780-gzip" last-modified:mon, 30 mar 2015 21:58:06 gmt server:apache varnish-x-cache:h

actionscript 3 - AS3 Array Display button not working properly -

i'm working on program learn how use arrays in computer course , display button doesn't work after first press. first time click it, works , displays 2nd time stop showing first value , starts showing last value twice, 3rd time cuts off 2nd value , displays last value 3 times , on. , when press button find sum of values gives me sum of of values show after hit display button. here's code, , sorry french commentary, it's school. function afficherfunction(event:mouseevent):void { // compose cette fonction visant à afficher tous les éléments du tableau. txtsortie.text = ""; var entier:int; entier = -1 (var i:int=entier; < mesentiers.length; i++) { if (i+1 < mesentiers.length) { mesentiers[i] = mesentiers[i+1]; affichage = affichage + mesentiers[i] + "\n" } } txtsortie.text = affichage; affichage = ""; = -1; } //fin fonction afficher. mesentiers[i] = mesenti

node.js - Can't install anything with npm ECONNRESET without proxy -

i used node.js install things via npm without problems. changed nothing on settings (win8; no proxy, internet working) , can't install (especially cordova , ionic). throws errors i'm behind proxy, i'm not. npm err! windows_nt 6.3.9600 npm err! argv "c:\\program files\\nodejs\\\\node.exe" "c:\\program files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "i" "-g" "ionic" npm err! node v0.12.1 npm err! npm v2.5.1 npm err! code econnreset npm err! errno econnreset npm err! syscall read npm err! network read econnreset npm err! network not problem npm npm err! network , related network connectivity. npm err! network in cases behind proxy or have bad network settings. npm err! network npm err! network if behind proxy, please make sure npm err! network 'proxy' config set properly. see: 'npm config' npm err! please include following file support request: npm err! d:\web\dierechnungsti