Posts

Showing posts from February, 2010

ios - How to show date range by using UIDatePicker in Swift -

i have uidatepicker sheet used in project. naturally shows 1 day per date. wanna see day , 9 days after day. how can it? for example, ____________ july 13 2015 (today) july 14 2015 july 15 2015 ____________ july 16 2015 july 17 2015 july 18 2015 july 19 2015 july 20 2015 july 21 2015 only 9 days today. uidatepicker has 2 properties - minimumdate, maximumdate: nsdate? they nil default, can set them this: let currentdate: nsdate = nsdate() let calendar: nscalendar = nscalendar.currentcalendar() let components: nsdatecomponents = nsdatecomponents() components.calendar = calendar components.day = 9 let maxdate: nsdate = calendar.datebyaddingcomponents(components, todate: currentdate, options: nil)! self.mydatepicker.minimumdate = currentdate self.mydatepicker.maximumdate = maxdate

Is Borland delphi 5 compatible with Windows 2012 servers? -

we working on borland delphi 5 on windows 2003 r2x64 bit server os. now going upgrade our windows os 2003 2012. know whether borland delphi 5 version compatible windows 2012 server os. thanks in advance mannual joseph delphi 5 applications 32 bit applications, using win32 api, run on windows server 2012. but in respect application: as compiler, delphi 5 apps run on windows server 2010; you have check third-party components (visual or db); be aware system-level expectations did change since vista , windows server 2008 (e.g. how common folders work ); also note vcl ui won't themed default, , may have refreshing issues . the upcoming nano server edition of windows 2016 provide win64 apis, , won't allow 32 bit code execution more. not able run delphi 5 application in nano server - if windows 2016 (with full apis , gdi) told still win32 compatible - delphi 5 compatible.

How to represent a big number in Java -

this question has answer here: large numbers in java 7 answers how can represent , use large number in java? in scientific computing there number of times need numbers greater long . you should use biginteger this.. they can large need - until run out of memory. eg: biginteger bigintvar1 = new biginteger("1234567890123456890"); biginteger bigintvar2 = new biginteger("2743561234"); bigintvar1 = bigintvar1.add(bigintvar2);

c# - Why does asp.net copy DLLs to their own directory -

as part of dynamic compilation stage, asp.net copies dependent dlls web application temporary internet files directory. of files end in own directory randomly generated name. what purpose of this? why not directly copy /bin directory structure new location, without separating files own directories?

ios - selected row in custom cell doesn't pass complete data from segue to another view controller -

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath{ self.data= [self.namelist objectatindex:indexpath.row]; self.data= [self.rolllist objectatindex:indexpath.row]; [self performseguewithidentifier:@"detailvc" sender:self]; } i've displayed student's name , roll number in custom cell. when select 1 row pass data uiviewcontroller , display in labels. i've 1 nsobject type file called 'name' , i've 1 variable called 'data' of type 'name'. here's code in didselectrowatindexpath namelist overlapped rolllist stored on same variable self.data . if rolllist line removed works good. when store rolllist in self.data overlap other. where, self.namelist variable of type nsmutablearray contains name of student , similarly, self.rolllist contains student's roll. below code pass data segue. here detailvc destinationviewcontroller , vc....

node.js - How to produce errors\exceptions in callback functions in mongoose for testing purpose -

i working mongodb using mongoose. of opeartion works callback. error may occur while saving/updating/finding document. though can check if there error in callback function (as shown in below code) want know while developing how can generate error , test these blocks? tank.findbyid(id, function (err, tank) { if (err) return handleerror(err); tank.size = 'large'; tank.save(function (err) { if (err) return handleerror(err); res.send(tank); }); }); are familiar error class? emiting errors eventemitter ? throwing errors throw ? this link extensive overview on how deal errors in node. assuming using express, in case of example provided, create instance of error class doing like: exports.findtankbyid = function(req, res, next) { var id = req.params.id; tank.findbyid(id, function (err, tank) { if (err) { var e = new error("failed find tank"); e.data = err; // attach other usefu...

asp.net mvc - Can I use Sass(css preprocessor) in Visual Studio Express 2013 for web? -

Image
if yes how because mindscape web workbench , sassystudio (free plug-in) tool not support in vs express free version and how compile scss css done install-package sassandcoffee i got solution first add via nuget console install-package sassandcoffee and in page.cshtml page <link href="~/content/sassdemo.css?@viewbag.id" rel="stylesheet" type="text/css" /> viewbag.id no need clear cache of browser every time controller code public actionresult index() { viewbag.id = datetime.now.tostring("yyyymmddhhmmss"); return view(); } now run , change variable values colors u see effect in css sassdemo.scss $color: red; .a{ width: 100%; } .maindiv { @extend .a; /*extend/inheritance */ /*width: 100%;*/ border: 1px solid $color; height: 200px; padding: 10px; margin-top: 10px; } .childdiv { ...

utf 8 - Special characters (utf-8) in PHP contact message -

i have contact form. when receive message, can not read because special characters shown bizarrly. i saved file in utf-8 without bom, red , tried lot of variations subject not find right answer myself. the contact form in html : <meta charset="utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <form id="contactform" action="processform.php" method="post" accept-charset='utf-8'> <div class="form-label label-name">nom</div> <input type="text" name="name" id="name" /> <div class="form-label label-postcode">code postal</div> <input type="text" name="postcode" id="postcode" /> <div class="form-label label-email">e-mail</div> <input type="text" name="email" id="email" /> ...

c# - GroupPrincipal throws argument exception -

Image
i have static method validate, if user in adgroup or not. method looks like: public static bool isuserinadgroup(string groupname, string name) { if (string.isnullorempty(groupname) || string.isnullorempty(name)) { return false; } // create domain context var ctx = new principalcontext(contexttype.domain, configuration.getvalue("ad")); // find group in question var group = groupprincipal.findbyidentity(ctx, groupname); // find user var user = userprincipal.findbyidentity(ctx, name); if (user != null && group != null) { if (user.ismemberof(group)) { return true; } return false; } return false; } i wrote unittest method , works fine. when call method wpf application, i've got excep...

Multiple models to describe a rental process in rails -

i have two-sided rental marketplace , bookings have been described 1 model. stores status renter requesting, owner accepting / rejecting, booking finished etc. create_table "bookings" |t| # storing booking time info t.datetime "pickup_datetime" t.datetime "return_datetime" # create snapshots of state of product @ time of rental requests submission t.integer "hourly_rate" t.integer "weekly_rate" t.integer "daily_rate" # storing states t.datetime "requested_at" t.datetime "accepted_at" t.datetime "rejected_at" t.datetime "cancelled_at" t.datetime "created_at" t.datetime "updated_at" t.datetime "owner_reviewed_at" t.datetime "renter_reviewed_at" t.integer "renter_id" t.integer "product_id" end i found clumsy , decided break down 3 models rental::intent ->...

ibm mq - Websphere MQ using XMS.Net -

i wanted understand how can use web sphere mq following scenario: 1.how can read message queue without removing message queue. 2. have web application need listener read queue. there tool ? yes, it's possible read message without removing queue, it's known browsing. need create browser consumer read messages. have posted snippet here, same code available in tools\dotnet\samples\cs\xms\simple\wmq\simplequeuebrowser\simplequeuebrowser.cs also. // create connection. iconnection connectionwmq = cf.createconnection(); // create session isession sessionwmq = connectionwmq.createsession(false, acknowledgemode.autoacknowledge); // create destination idestination destination = sessionwmq.createqueue(queuename); // create consumer iqueuebrowser queuebrowser = sessionwmq.createbrowser(destination); // create message listener , assign consumer messagelistener messagelistener = new messagelistener(onmessagecallback); queuebrowser.messagelistener = mes...

Django - get in template reverse related many to many field -

i have 3 models, entry model , category model, , have created intermediate model categoryentry. class entry(models.model): entry_text = models.textfield() user = models.foreignkey(user) class category(models.model): user = models.foreignkey(user) category_text = models.charfield(max_length=200) entries = models.manytomanyfield(entry, through='categoryentry') class categoryentry(models.model): category = models.foreignkey(category) entry = models.foreignkey(entry) viewed = models.booleanfield(default=false) i have created view get_queryset method this def get_queryset(self): order_by = self.request.get.get('order_by') if not order_by: order_by = '-pub_date' return entry.objects.filter(category__id=self.kwargs.get('category_id', none), category__user__id=self.request.user.id).order_by(order_by)[:].select_related('user') i have category id kwargs. problem - how every entries rel...

javascript - Setting breakpoints on function calls in Chrome Dev. Mode -

is there way set breakpoints when specific functions about execute? it needn't explicit breakpoint - want execution pause when console.log() called. or should resort this method. i prefer accomplish without modifying code, or manually setting breakpoints @ every console.log . yes that's trick. create custom logging function, put debugger in , call console.log , have wanted: function log(message) { debugger; console.log(message) ; } edit: you can replace console.log similar fonction calls original: var clog = console.log; console.log = function(message) { if(message == '...') { debugger; } clog.apply(console, arguments); } this code affect log calls within page. check catch message. remove stop always.

How to enable FinderSync Extension in the System Preference in Cocoa - Objective C -

Image
i integrating findersync extension in cocoa application show badges in files , folders. @ below 2 scenario: 1) when run application using findersync extension (like demofindersync) @ blue popup in below image, in case extension added in system preference check mark , called principal class "findersync.m" well. 2) when run application using application scheme (like demoapp) @ blue popup in below image, in case extension added in system preference without check mark , principal class "findersync.m" not call , findersync extension not work in case. so have idea how enable finder extension in system preference using second scenario. any appreciated..!! non-debug scheme (#if !debug): system("pluginkit -e use -i com.domain.my-finder-extension"); when running under debugger give path extension directly: nsstring *pluginpath = [[[nsbundle mainbundle] builtinpluginspath] stringbyappendingpathcomponent:@"my finder extensi...

Why excel rounded but still shows more than 2 decimal points -

i have set of numbers rounded of 2. when sum range, ended on cell shows 762,078.31. copied cell , paste value , shows 762078.31. increased decimal , still shows 762078.3100. on 'formula bar' shows 762078.309999999. i show calculations here there ~359 rows. it's simple formula used follows; =round(q2*s2,2) , =sum(y2:y359). idea why happens, let me know. thanks. not sure why it's happening, can edit sum cell round well: =round(sum(y2:y359),2)

python - Having issues when install mitmproxy through pip -

i having following issue when installing mitmproxy through pip. have tried other fixed related egg error. here on stack overflow. can't install via pip because of egg_info error pip install matplotlib fails: 'cannot build package freetype; "python setup.py egg_info" failed error code 1' 104:bin user129856$ sudo pip install mitmproxy directory '/users/alokchoudhary/library/caches/pip/http' or parent directory not owned current user , cache has been disabled. please check permissions , owner of directory. if executing pip sudo, may want sudo's -h flag. directory '/users/alokchoudhary/library/caches/pip/http' or parent directory not owned current user , cache has been disabled. please check permissions , owner of directory. if executing pip sudo, may want sudo's -h flag. collecting mitmproxy /library/python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: insecureplatformwarning: true sslcon...

mysql - Update row with previous rows data -

good morning. stumped. have looked @ examples , explanation still stumped hope here can help. here sql query. select calls.`date_entered`, `call_date`,`calls_contacts`.`contact_id`,days calls inner join `calls_contacts` on calls.id = `calls_contacts`.`call_id` order `calls_contacts`.`contact_id`,calls.`date_entered`; this returns 2014-05-25| |252525| 2014-05-27| |252525| 2014-06-03| |252525| 2014-05-15| |425254| 2014-05-15| |425254| 2014-05-17| |425254| i need output like 2014-05-25|2014-05-27 |252525| 2014-05-27|2014-06-03 |252525|2 2014-06-03| |252525|7 2014-05-15|2014-05-15 |425254| 2014-05-15|2014-05-17 |425254|0 2014-05-17| |425254|2 where column 2 populated next rows column 1 date - field, , column 4 amount of days first call next call. thanking in advance

ios - Unable to archive project with xcodebuild command: code sign error, missing provisioning profile? -

i'm using xcode 6.4 , associated command tools. i'm trying archive create ipa of app command: xcodebuild -scheme myscheme -archivepath myprojectname archive but error message: check dependencies code sign error: no matching provisioning profile found: build settings specify provisioning profile uuid “xxxxxxxxxx”, however, no such provisioning profile found. codesign error: code signing required product type 'application' in sdk 'ios 8.4'quote but uuid said in such message, not uuid of provisioning profile i've set in target`s build settings > code signing > provisioning profile. in fact, don't know provisioning profile error message talking about... there other place in xcode provisioning profile set , haven't noticed it? how check provisioning corresponds such uuid? thanks this depend on how have project's build configuration setup, if inheriting build configurations other .xcconfig files, , automat...

Installer created with Wix fails to be installed as system -

i have quite simple installer created wix toolset. users complaints can't deploy installer system user. have user. however, have learned installers can deployed system user. tell me need in wxs file can deploy system user? we typically deploy our msis using microsoft sccm system. use psexec invoke cmd prompt system our dev testing before sending sccm. there 2 reasons installer fail system: 1) user error: can't tell how many times i've seen packages put sccm invalid command line arguments. 1 of favorite quotation marks turned unicode quotation marks via email transmission. logging directory doesn't exist. forgetting tell msi run silently. sits there , hangs. awesome 1 typing msi name wrong. it's awesome because give me sccm log when ask msi log. no msi log means it's not msi's fault. 2) installer design error: have tested silent installs? have custom actions make assumptions user context / environment? 1 of old favorites (not) ...

Overriding in C#, making two subsequent method virtual -

it's question of overriding in c#. when use following code: class program { class { public virtual void callme() { console.writeline("this a"); } } class b : { public new virtual void callme() { console.writeline("this b"); } } class c : b { public override void callme() { console.writeline("this c"); } } static void main(string[] args) { obj = new c(); obj.callme(); console.readkey(); } } output: this a and when use: class program { class { public virtual void callme() { console.writeline("this a."); } } class b : { public override void callme() { console.writeline("this b."); } } class c : b { public override void callme() ...

Countdown Timer is not showing in javascript -

i new in javascript, want create countdown timer localstorage starts given time , end 00:00:00, it's not working, when running code showing value "1506". here code <script type="text/javascript"> if (localstorage.getitem("counter")) { var currenttime = localstorage.getitem("counter"); } else { var hour = 3; var minute = 25; var second = 60; var currenttime = hour.tostring() + ":" + minute.tostring() + ":" + second.tostring(); } function countdown() { document.getelementbyid('lblduration').innerhtml = currenttime; second--; if (second == -1) { second = 59; minute--; } if (minute == -1) { minut...

c# - Attach VS debugger to executable file instead of running instance -

i'm trying attach vs debugger 1 of own applications running installation directory in release configuration. when app runs, shows messagebox saying app launched invalid command line arguments. these arguments have been passed app shell when associated file (*.myappfileextension) double clicked. the installer configures shell send these command lines. now has gone wrong , cannot seem set breakpoint after attaching vs debugger instance of app. allows setting breakpoint @ call messagebox.show time attach, call has been executed. no breakpoints settable after point. the error says breakpoint failed bind. the question is, possible debug release version without going trouble of compiling , installing debug version? also, possible vs debugger launch executable valid breakpoints may hit? edit: in case relevant, call messagebox.show last line of code. why breakpoints not settable @ closing braces follow? if can modify code, easiest way handle add debugger.lau...

Capture Screen in libGdx -

i want capture screen in libgdx . use code problem. on desktop work . when run on android , can't find image capture screen. how can fix it? reading question. public class screenshotfactory { private static int counter = 1; public static void savescreenshot() { try { filehandle fh; { if (gdx.app.gettype() == applicationtype.desktop) infor.linkscreenshot = "d://chupngoc" + counter + ".png"; else infor.linkscreenshot = gdx.files.getexternalstoragepath() + counter + ".png"; infor.nameimage = counter + ".png"; fh = new filehandle(infor.linkscreenshot); counter++; } while (fh.exists()); pixmap pixmap = getscreenshot(0, 0, gdx.graphics.getwidth(), gdx.graphics.getheight(), true); pixmapio.writepng(fh, pixmap); pixmap.dispose(); } catch (exception e) { ...

jquery - Find img tag and replace with another tag -

how can find img tag , replace span tag using jquery? <style> .box{ display:inline-block; width:100px; height:20px; line-height:20px; font-size:11px; } </style> <p id="recommend"> <img src="search.gif" alt="find"> <!-- find img tag without id , class--> </p> <!-- next --> <p id="recommend"> <span class="box">search</span><!-- replace --> </p> you can use jquery's replace() or replacewith() methods achieve trying. here links usage: https://api.jquery.com/category/manipulation/dom-replacement/ http://api.jquery.com/replacewith/

twitter bootstrap - href link and dropdown btn-group div are not aligned properly -

the editing link , button group not aligned properly. button group below when matched editing link button. want them both aligned. want without using css. here code: <div class="btn-group" role="group" aria-label="..."> <a href="/cs/roger/index.php?type=editing" class="btn btn-warning">editing</a> <div class="btn-group" role="group"> <button type="button" class="btn btn-default dropdown-toggle glyphicon glyphicon-list" data-toggle="dropdown" aria-expanded="false"> <span class="caret"></span> </button> <ul class="dropdown-menu dropdown-menu-right" role="menu"> <li><a href="/cs/roger/index.php?type=open" >open</a></li> <li><a href="/cs/roger/index.php?type=approved" >approved</a></li> ...

java - How to make api call between two separate google cloud endpoint APIs -

i have 2 separate projects in google app engine account. both have been used deploy clound endpoint service apis. using 1 project web application when user press submit button, data being pushed using web client libraries post request endpoint service api. i need push same data other project using api call only. want transfer data 1 api call in 1 project other api of other project. to achieve till have created simple httpsurlconnection post request xyzendpoint.java of xyz.java returns error: "errors": [ { "domain": "global", "reason": "backenderror", "message": "java.lang.classcastexception: com.google.apphosting.utils.security.urlfetch.urlfetchservicestreamhandler$connection cannot cast javax.net.ssl.httpsurlconnection" }

javascript - Boolean of one element with jQuery -

i have code <main class="ok">my text</main> <script> $(document).ready(function() { if ( $('body').not('main.ok') ) { // or if ( boolean ( $('main.ok') ) == false ) { // main element not available alert (' main element "ok class" not available '); } else { alert (' main element "ok class" available '); } }); </script> but code doesn't work ! and alert main element "ok class" not available so u guys suggest me ? use hasclass() determine whether of matched elements assigned given class. $('body main').length && $('body main').hasclass('ok') code if ($('body main').length && $('body main').hasclass('ok')) { alert(' main element "ok class" available '); } else { alert(' main element "ok class...

node.js - Why overriden toString() is not called in javascript -

i tried override tostring() found that, overridden function in not getting called @ all. i have gone through this , this , not able track mistake. my attempt: direction = { none : 0, diagonal: 1, up: 2, left: 3 }; var node = function () { this.direction = direction.none; this.weight = 0; }; node.prototype.tostring = function nodetosting(){ console.log('is called'); var ret = "this.weight"; return ret; }; (function driver(){ var node1 = new node(); console.log(node1); //findlcs("abcbdab", "bdcaba"); })(); output: { direction: 0, weight: 0 } console.log outputs literal value console - not coerce object string , therefore won't execute tostring implementation. you can force output string this: console.log(""+node1); example: direction = { none : 0, diagonal: 1, up: 2, left: 3 }; var node = function () { this.direction =...

azure mobile services - Authentication failed due to an invalid token -

Image
i'm looking in logs in azure portal. , i'm getting allot of errors text - authentication failed due invalid token no data. anyone can explain how happen , how prevent that. use custom login provider implemented example saw in azure documentation. thanks attached logs

unicode - Order_by queryset with a value in django -

i have 1 of below example model class title(models.model): name = models.charfield(max_length=200) provider_name = models.charfield(max_length=255, blank=true) keywords = models.charfield(max_length=200, null=true, blank=true) def __unicode__(self): return '{0} - {1} (name/provider)'.format(name, provider_name) so in order order_by title model queryset model field, can titles = title.objects.all().order_by('name') but possible order_by queryset particular value ? mean want order_by title model queryset return value of unicode method, i.e., combination of name , provider_name ('{0} - {1} (name/provider)'.format(name, provider_name)) so overall instead of doing order_by model fields/database columns, want order value(return value of unicode method in case) is possible order_by queryset value in orm or else need write raw sql in order achieve ? no, it's not possible use method in filter because orm cannot tran...

android studio - How to build rs fie in AndroidStudio -

i using androidstudio. want develop renderscript, when create file hello.rs , build project,then try use scriptc_hello in java file,but compiler cannot find scriptc_hello class,i think scriptc_hello.class did not create,but how create it? make sure .rs file in app/src/main/rs directory in project. unlike eclipse based projects, .rs files need reside here default rather alongside java files same package.

php - Laravel 5 HttpNotFoundException -

when validate incoming request in laravel 5.x, if validation fails, symfony\component\httpkernel\exception\notfoundhttpexception raised instead of expected httpresponseexception . if replace throw new httpresponseexception($this->buildfailedvalidationresponse( $request, $this->formatvalidationerrors($validator) )); code validator trait other exception, works well... routes // user login (logout handled frontend) route::post('login', [ 'as' => 'login', 'uses' => 'auth\authcontroller@login' ]); controller /** * login user. * @param \illuminate\http\request $request * @return \illuminate\contracts\routing\responsefactory|\symfony\component\httpfoundation\response * @throws \app\exceptions\authenticationfailedexception */ public function login(request $request) { $this->validate($request, [ 'username' => ['required'], 'password' => ...

python assignment of complex objects -

i have following code works fine. minute remove comment across statement print list(b) fails , returns empty list. i'm thinking perhaps x getting address location of list(b) executed part of print statement. import itertools = [1,2,3] b = itertools.product(a,repeat=2) print str(b) #print list(b) x = list(b) print x <itertools.product object @ 0x7f5ac40a9a50> [(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)] command took 0.03s b iterator . if ask list(b) exhaust iterator , causing empty next time list(b) . as rule-of-thumb: when dealing iterators, need assign them names. usually, either iterate on iterator for-in , or use list convert iterator list.

android - Instabug, is it possible to deactivate the shake for feedback, if there is no internet access? -

i have networkstatereceiver, checks if have internet or not. if do, reinitiate instabug, if not, want deactivate. how can that? tried setting null, doesn't work. if(haveconnectedmobile || haveconnectedwifi){ //todo need make queue, , go through queue pslocationcenter.getinstance().initinstabug(); }else{ pslocationcenter.getinstance().instabug = null; } this init: public void initinstabug() { string[] feedbackarray = getresources().getstringarray(r.array.feedback); string randomstr = feedbackarray[new random().nextint(feedbackarray.length)]; instabug.debug = true; instabug = instabug.initialize(this) .setannotationactivityclass(instabugannotationactivity.class) .setshowintrodialog(true, pstimelineactivity.class) .enableemailfield(true, false) .setenableoverflowmenuitem(true) .setdebugenabled(true) .setcommentrequired(true) ...

javascript - Jasmine how to test a file -

i've started testing jasmine-karma framework , confused. i'm trying test file called native.js. i've written test , i'm clueless causing test fail. here's native.js file var goback = function() { window.history.back(); }; document.addeventlistener("deviceready", ondeviceready, false); function ondeviceready() { navigator.splashscreen.hide() return "now"; } storage.prototype.setobject = function(key, value) { this.setitem(key, json.stringify(value)); }; storage.prototype.getobject = function(key) { var value = this.getitem(key); return value && json.parse(value); }; here's unit testing ondeviceready() function: native.test.js: describe("native.js", function() { var ondeviceready = new ondeviceready(); it("return 2 when device ready", function() { expect(ondeviceready()).toequal("now"); }); });

linux - Does Redis Windows fork use less RAM because is using memory-mapped files? -

i found following forum post in redis google group: verify redis on windows memory consumption , , microsoft open tech team member states: in order implement persistence , simulate fork() copy-on-write mechanism, windows port of redis places redis heap in memory mapped file can shared child processes. data stored in memory because of memory-mapped file working set accounted under "shared working set" instead of "private working set". can inspect shared working set of redis-server.exe using task manager or windows performance monitor. should see values closer reflect "used_memory_human" why i'm asking question? because found redis-server process takes significant less memory info command says (for example, info shows redis using 148mb while shared working set in task manager shows 48mb). since msopentech member says redis windows using memory-mapped files, does means redis on windows uses less ram linux version? . ...

Strange Symbols in browser -

Image
can me , how prevent it? not image now, symbols aswell ̇͋ͭ̂ͩ̄̌ͯ͊̆ͫ̂̅̊͒̽ͦ̒̆̐̾͆̓̔̓̂͋͆ͭ̐̌͛ͫ̃̾͑̽ͧͭ̎ͥ̓̂͆͊̈́͐́̓ͪͧ͋͋̽̍̆̊̋̐̈́̈͋ͬͯ̎̉̓͗̈̒ͪͭ̐͆̽̄͛̓ͣͦ̏̌ͪ̈̔̇̀͆̉͋̀́ͦ̃̓ͬ̉̒ͮͫͫ́̆̒͐̄̾̄͋̓̇ͤͯͨ͋ͧ̀̽ͮ͊̓ͮ̎͐̅̏̇͂̔̐̍͛̃̄͐ͯ̌̋̐ͪͭͣ̀ͫ̇ͮ͑̂ͫ̒͋̌̇̓̾͛̐͗ͬ͗ͤ̄̆̈́̇̔̂̌̍̉͂̄̒̾ͫ̀̉̐̑́̍̋͛͂̊ͭ̇̋͗̐̄ͦ̎ͪ̿͒͗̑ͧ̑̈̏̓̒͛ͫ͒̄ͩ̉̑̓̈͌͐ͨ̏͌͛ͥ̂̓̈́̉́ͩ͛̆͊̍̂́̌͂ͥͦͪ̆̆̃͊ͦ̓̉̌͊̑̊͌̋̽͂̉̒̋͑̈́ͬ̊ͪ̉ͯ͂͒̆̆ͭ̌͌̈́ͥͬ̔͑́̑̒̿ͭ̐ͬͧͥͣ͂̎̎̉ͦͤͬͦ͛̈́̆̅͋̄̏͗̽ͧ̅̓ͩͨ́̅ͯͦ̒̎ͪ͋͗̅͛̏͗̿̄̃̃̿̾ͤ̾̽̒̋̄̉̓͛̾̄ͤ̐̅̓͌ͫͪ̉̒̐̔̆͒ͧ͊̽͑̓̑̔ͦ͋̂̔̂̆̌̽ͤͤͩ̈́̆̋̉ͥ͒̏ͪͥ͒̿ͣ̇̉͋͊̂͑̌͂̒ͧͩ͊ͤͨͥ̄̓ͩ̿̾ͬ͆ͣ͆̿̂ͪͬ̑̆͛̊́ͫ̾͛̌ͩͤ̃͒̿͋̽̃̍̋̐̑ͤͩ̒̏̇͌̀ͭ̓̅͋́̃ͮͪ͛ͮ̔̽̐̄͐̐̄͗ͧͯ͑ͧ̉ͮͦ̂̏̐̈̃͗͗ͧ̀ͯ̄̉̋ͦͯͧ̃͐ͦ̉̊ͦͮͯ͑̈́̋̒̌̍͗̾͛́̓͒͐́͆ͣͦ̀̽̆͂ͧ̒̌͌̈́̾͒̏̓̽͋̒̓̎͆́ͫ̇̈́ͯ̋ͫ͑̂̃ͧͨ̇̈́̑ͥͧ̈ͧ̔ͤ̽̀̑͋̉͗̅ͮ̈́ͯͫ͆̑̓ͤ̓̆̌̌͂͐͂̄͐͗ͨ͋͊̂̈́̎́͆͊͆̑̓ͨ̔͒̓ͮ͂̎͑̑ͪͦ̀̈̎ͨ̊̃̓̏ͦͥ̎̀̄͊͂̇́̍ͣͯͫ̅ͫͪͯ̈́ͣ̍̅̀͌͛ͪͧ̄ͫͫ̒ͦ̈ͧ̑͂ͭ͊̀̋ͫ͐̈̆̊͒ͯ̄̓̄͐̄͌ͯ̿̾ͣͣ̆͂ͤ̊̑͗̍ͥ̀ͫ͛́ͤ̓̂̔̉ͧ̄ͥ͆̀̓͆͛͗̌̋̀̅̋̊̈́̾ͥ͂ͫ̍̎̐͆ͦ̇͋̇̔̂̃̈́̓̉ͤ̀ͣ͐̑ͪ͑ͪ͗̄̆̾ͣ̋̒̋ͩ̈̈̎̉̌͆̒͌ͭ̓͌͂̍͌͆ͭ̂̇ͩ͗ͩ̅ͮ̋͋̃̔̒̽̏̔̓̿ͤ́̌ͨ̃ͦͪ͗̓̈̌̏̓ͥ͛͑̇̽̀̍̀ͥͩͦ̾̏͛ͫ͐͂̂́̀ͨ́͐ͣ̈̉̓͑̓̒ͩͪ̀ͯ̓̿ͫ̿ͫ̋ͥ̄̑ͦ̿́͛ͥ̔ͦ̒̿̀ͨͤͨͥ̐̄̍̀̋ͤ͐̇͆̂̑̀̑̀͆̉̇̃̉̓ͧ͐ͦ̔̆̓͂͊̀̂ͣ͆̃̈̆ͮͬ͛ͪͬ̉̌̂ͩ̋͗ͪ̅̌͗̊̌͐̈́̎ͯ͋͛̃̽͋̿̽͛͒ͧ̓ͭ̐̏̂̂̇̈́͗ͯͩ͆̓̒ͭ̆̃̍̾ͮ̾̋̌͐̊...

node.js - Travis - Control Which Node Version is used for NPM Installs -

i attempting install an npm package (markdown-pdf) part of travis-ci build believe not compatible old versions of node. on local machine, running node version 0.10.36, , works here, added believe accepted way of defining specific version top of .travis.yml file (although i'm not clear on either). mcve version of full file below. language: node_js node_js: - "0.10" install: - sudo apt-get install npm - npm config set registry http://registry.npmjs.org/ - sudo npm install -g markdown-pdf script: - echo "stuff installed." at top of build log, see following, seems indicate change worked: $ nvm install 0.10 ######################################################################## 100.0% using node v0.10.40 $ node --version v0.10.40 $ npm --version 1.4.28 $ nvm --version 0.23.3 however, further down log, when travis attempts execute sudo npm install -g markdown-pdf , log reports following. notice suggests package might not compatible version of node insta...

Using variables in CSS -

is there/what best way set variable in css stylesheet cross browser compatible? i want set color: #123456; into variable since using in numerous different spots , if choose change colour want change. css variables thing browser has support @ time mozilla. alternative options: use javascript and/or server-side language set variables in css file programatically. use css preprocessor sass. allows create variables. have re-deploy css each time. consider handling colors different way in markup. regarding last one, instead of hardcoding color elements style: <div class="thiselement"></div> .thiselement { font-size: 13px background: red; color: #123456; } consider using classes instea: <div class="thiselement color1"></div> .thiselement { font-size: 13px background: red; } .color1 { color: #123456; } that way need declare color once in style sheet. ' object oriented css '. idea...

css - product additional images right to the product image in opencart 2.0 -

i want place additional images of products when open product right product image in default opencart 2.0.1.1 theme below product image how it.please me. first define class named "image1" first <li></li> in <ul></ul> class thumbnails. give width 50% both divs named "col-sm-4" product images , "col-sm-8" product name , description. remove float: left .thumbnails .image-additional in stylesheet.css , define margin 80%. then, define new class this: .thumbnails .image1 { width:70%; float:left; }

Rails closure_tree - how do I add Devise method current_user to Create action in PostsController? -

i built nested posts using closure_tree tutorial: [nested comments rails - sitepoint][1] then installed devise , began attributing posts users in postscontroller , post & user models. how can add current_user method create action (the 'if' portion, not 'else' portion) in postscontroller can track creator of post has replies? have tried several combinations including: @post = current_user.parent.children.build(post params) @post = current_user.posts.parent.children.build(post params) they throwing errors. here code: post.rb class post < activerecord::base belongs_to :user acts_as_tree order: 'created_at desc' end user.rb class user < activerecord::base has_many :posts, dependent: :destroy devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable end posts_controller.rb class postscontroller < applicationcontroller before_action :authenticate_user!, except: [:i...