Posts

Showing posts from May, 2011

javascript - How do I make sure my function works for my variable? -

function numbertotime(num){ var d = 0, h = 0, m = 0; var numtominutes = num*60; while(numtominutes > 59){ numtominutes -= 60; h++; if(h > 23){ h-= 24; d++; } m = numtominutes; } if( d > 0){ return d + " days " + h + " hours " + m +" minutes "; }else{ return h+":"+m; } this code given me nice user here on stack overflow. since new programming, javascript have no idea put variable. have var howlong = (0,1 * amount + 0,2 * time) want convert hours , minutes code above, don't know how tell function it's var howlong . can me out? may this? var ndays = math.floor(sec/86400); var nhours = math.floor((sec%86400)/3600); var nminutes = math.floor(((sec%86400)%3600)/60); var nseconds = ((sec%86400)%3600)%60; return ndays + " days " + nhours + " hours " + nminutes + " minutes " + nseconds + " seconds";

java - AspectJ: How to log the successful completion of a method? -

so working aspectj refactor program remove logging calls main classes. instead, logging calls occur via aspects. far, here's i've done successfully: catching exceptions. since have exception handling pretty unified begin (exceptions propagate call stack until reach controller, caught), wasn't difficult. using handle(exception) i've got every catch block tied aspect log exception before catch block executes. debug information logging. basic things entering particular method, etc. again, relatively simple using before() and, sometimes, args() or thisjoinpoint.getargs() capture parameters. the final thing need do, though, log successful completion of key methods. here minor example, of block of code exists in program, can better explain meaning here: private static void loaddefaultproperties(){ defaultproperties = new properties(); try { defaultproperties.load( main.class.getclassloader().getresourceasstream( ...

configuration - Why brunch compile everything it found when using function in joinTo -

i don't understand why brunchjs compile files (in bower_components) when use function (coffeescript): modules = ['i18n', 'pager', 'core', 'module-comment'] javascripts: jointo: # main '/js/master.js': () -> paths = ['bower_components/bootstrap/**/*', 'app/**/*'] o in modules fs.exists '../../../../workbench/dynamix/' + o, (exists) -> if exists paths.push '../../../../workbench/dynamix/' + o + '/public/public/**/*' else paths.push '../../../../vendor/dynamix/' + o + '/public/public/**/*' return paths i want test if path exist, if yes put complete path in variable return jointo. have successfuly files in workbench/vendor undesired files bower_components (don't specified?!) i optimize : javascripts: jointo: # main '/js/master.js': 'bower_components/boots...

Output custom query to Excel format in MS Access -

i know there docmd.transferspreadsheet acexport, requires hard query name. i trying loop on recordset , exporting file per view, example exporting excel file "select * myquery arguments=arg1" , file "select * myquery arguments=arg2" , , on. is there way create such excel file based on "custom" on fly sql query this? use copyfromrecordset dumps vba recordsets excel worksheet range (referencing the upper left corner cell). below subroutine using access vba: public sub actoxlrecordsets() dim xlapp object, xlwkb object dim db database dim rst recordset dim args collection, arg variant dim strpath string, strsql string dim integer dim fld field ' initialize objects set db = currentdb() set xlapp = createobject("excel.application") args.add ("arg1") args.add ("arg2") args.add ("arg3") strpath = "c:\path\to\excel\files" = 1 ...

android - Can I use Glide to have CircleImage with overlapping icon like in Facebook messenger? -

i'm searching library me make cricular image view's in facebook messenger (with z blue messenger icon or grey facebook icon). how came it? can done glide? if not, then? 1.i suggest checkout image management library facebook fresco pretty awesome , mature compared other image loading library. 2.fresco has simpledraweeview custom image view supports rounded corners , circles link , supports animated(.gif, .webp) normal images(.jpg, .png). 3.fresco handles things caching of images 3 tier architecture ( bitmap_memory_cache , encoded_memory_cache , disk_cache ). reduces oom(out of memory) issues. when image in view goes out of screen automatically recycles bitmap, hence releasing memory.

Autolayout differences between iOS 8 and iOS 9 -

Image
if run same code on ios 8 , ios 9 layout comes out differently. icon , label should even. i'm using custom font i'd assume font size / height same in both oses. if adjust spacing constraint right on 9 shows wrong on 8. any ideas? update here existing constraint:

Meteor AutoForm. How to button group for days of week in AutoForm and SimpleSchema -

i want this buttons each day of week . can pick monday , tuesday, no other days. there's couple of ways (with lots of template code), nothing awesome comes out. what's simplest simpleschema , autoform possibly work? here first attempt: officedaysofweek: { // mon,tue,wed,thu,fri,sat,sun - 7 booleans days of week. type: [boolean], defaultvalue: [true,false,true,false,false,false,false] }, after that, thought of making sub-schema individual days seemed alot of code in schema , template. any suggestions? thanks! mike as @mark recommended made sub-schema handle this.

How to disable redis-cli history -

i've searched around web, have been unable find way disable redis-cli generating file ~/.rediscli_history . concern file logs auth information file (more info. here: https://github.com/antirez/redis/pull/2413 ). ideas on how this? just set environment variable rediscli_histfile env rediscli_histfile=/dev/null redis-cli

xcode - Debug System Pref Pane w/10.11 and System Integrity Protection -

one of projects system preference pane. 10.11, xcode's debugger can't debug "can't attach system preferences because of system integrity protection". how can debug prefpane under 10.11, have done in every os 10.3? i ended making copy of system preferences, called "system preferences (signed)" , signed developerid replaces old code signature , allows run without sip getting in way.

java - Transaction spanning multiple WARs -

i have 2 wars running on same tomcat server, both using spring transactions , both writing same database. communicate each other through rest calls. now have business process starts foo.war , calls bar.war , returns foo.war . both of them write same database, not part of 1 transaction, if foo.war fails commit, bar.war doesn't rollback. how can solve problem without integrating 1 war other? i though standalone jta implementation might work, since different applications, i'm not sure if will. i believe use case suited transaction based on tcc architecture. pls find below links details on architecture :- a) link-1 b) link-2

php - Merge two multidimensional arrays, preserve numeric keys, and combine values inside array -

i have 2 arrays , combine / merge / put them together. $arr1 = array( 0 => array(1, 2), 1 => array(5, 6) ); $arr2 = array( 0 => array(2, 3), 1 => array(6, 7) ); come_together_right_now($arr1, $arr2); // missing function? and result be: array ( [0] => array ( [0] => 1 [1] => 2 [2] => 3 ) [1] => array ( [0] => 5 [1] => 6 [2] => 7 ) there way many array functions! array_merge , array_combine , recursive alternatives seem replace values , don't preserve numeric keys. how do this? assuming have same keys! $result = array(); foreach($arr1 $key=>$array) { $result[$key] = array_merge($array, $arr2[$key]); }

php - Symfony 2 best practice DBAL without object doctrine -

well started learn symfony , think peoples understand question (i hope) , wish structure code... well, create class called reception , class has sql let's in each methods/function. each , evry methods can return different nombre of column results. example : sql 1 : jo;date; sql 2 : client;car;time let's tell don't want create entity use doctrine... i use dbal (pdo doctrine sql query) execute queries... in normal php poo programming. finally question : wether should class service, entity? or can simple put pdo query in controller.... thanks in advance answers... avoid doctrine moment because principaly doing statistiques , play bit symfony , increase difficutly level progresivly... thanks understanding... day a service ( docs ) class responsible doing specific task. lets have statistics need updated whenever specific events occur (i.e. file downloaded, favored, etc) , have multiple controllers different events occur. bad idea "copy-paste...

javascript - Jquery submit form then redirect not working -

i have found many posts can't work life of me. on submit of form, need code 1) submit form , 2) redirect 1 of locations inside case statements. can form submit without cases , can form redirect, can't both. please tell me on right track have code in wrong spot, have been staring @ way long , have hit roadblock. $("#submitbtn").click(function (event) { event.preventdefault(); var validator = $(this).closest("form").kendovalidator({ messages: { required: function (input) { return getrequiredvalidationmessage(input) }, custom: function (input) { return getinvalidvalidationmessage(input) }, }, rules: { custom: function (input) { var minlength = $(input).attr('data-minlength'); var required = $(input).attr('required'); if (typeof minlength !== typeof undefined && minlength !==...

android - Building apk file with buildozer error Command failed: ./distribute.sh -m "kivy" -d -

i'm making apk python , kivy first time if newbie question sorry. i want build app android python , kivy scrips using buildozer tool. after few newbie errors didn't install javac etc., error occurred: command failed: ./distribute.sh -m "kivy" -d "carlockapp" additional info: os: fedora 22 32bit [agi@localhost carlockapp]$ buildozer android debug # check configuration tokens # ensure build layout # check configuration tokens # preparing build # check requirements android # run 'dpkg --version' # cwd none /bin/sh: dpkg: command not found # search git (git) # -> found @ /usr/bin/git # search cython (cython) # -> found @ /usr/bin/cython # search java compiler (javac) # -> found @ /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-14.b27.fc22.i386/bin/javac # search java keytool (keytool) # -> found @ /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-14.b27.fc22.i386/jre/bin/keytool # install platform # apache ant found @ /home/agi/.buildozer/an...

Unable to execute Ruby script in a Python script -

i'm having trouble executing ruby script python code. my server has cron job supposed execute python script , ruby script. however, ruby script has executed after python one, decided add line: os.system("ruby /home/username/helloworld.rb") at end of python script. it runs, i'm getting error in log file: /bin/sh 1: ruby not found i'm not sure why happening; i've tried calling exact same function in python console running python script manually, , both work perfectly. in other words, line of code doesn't work only when script triggered cron. is there else need put in crontab/python script perhaps? cron passes limited number of environment variables job. according crontab(5) man page : shell set /bin/sh path set /usr/bin:/bin logname , home set /etc/passwd line of crontab's owner. home , path , shell may overridden settings in crontab; logname may not. so if ruby executable not located in either /...

python - index out of range even after initialization of var serving as index -

i dont understand why out of range if initialize j. this expansion iterates preceding characters of slash, , when combined space, multiplied. ie 5</ --> 5<5< 5<// --> 5<5<5< 5</ / --> 5<5< 5<5< also, best way accomplish task? def ttexpand( program ) : """ expand string manipulation symbols in program tinyturtle language program. program -- tinyturtle string, possibly string manipulation symbols returns -- tinyturtle string after expansion """ new_program = '' array = [] = 0 j = 0 ch in program: #while program.index(ch) != len(program) - 1: if ch == '/': array.append(program.index(ch)) += 1 if len(array) == 0: return program while j <= len(array): new_program += (program[:array[j]]) ...

angularjs e2e - Protractor ignoreSynchronization issue -

i developing e2e test suite 1 of applications. have sso non angular site, our site angular site. in start of test make call sso settings: browser.ignoresynchronization = true; browser.get(browser.baseurl + '/agoda/home?mock=mock-jax); i able log on sucessfully , redirects application angular site. set browser.ignoresynchronization = false ; redirect application , loaded. after nothing works. i try read following: var books= element.all(by.repeater('book in books')); console.log(licenses.count()); results { ptor_: { controlflow: [function], schedule: [function], setfiledetector: [function], getsession: [function], getcapabilities: [function], quit: [function], actions: [function], touchactions: [function], executescript: [function], executeasyncscript: [function], call: [function], wait: [function], sleep: [function], getwindowhandle: [function], getallwindowhandles: [function]...

html - Phone Icon to only appear on mobile view -

on website have phone icon on mobile view can click on phone icon , ring business, can't figure out how have appear on mobile view. <style type="text/css"> #tel {display:none;} @media , (max-width: 1000px) { #tel {display:block;} } </style> <div class="tel"> <a href="tel:555-555-5555"><img src="images/phone.png" /></a> </div> #tel refers id, have use .tel in css

ruby - What limits performance of worker? -

i use sidekiq job processing. using foreman, set 6 processes in procfile: redirects: bundle exec sidekiq -c 10 -q redirects redirects2: bundle exec sidekiq -c 10 -q redirects redirects3: bundle exec sidekiq -c 10 -q redirects redirects4: bundle exec sidekiq -c 10 -q redirects redirects5: bundle exec sidekiq -c 10 -q redirects redirects6: bundle exec sidekiq -c 10 -q redirects these processes performed @ 1600+ jobs (simple job increment hashes in redis) per second 10 threads busy of time. scaled digital ocean droplet 8 12-core, , performance fell ~400 per second. each process, there 3-5 busy threads out of 10. what did try fix issue: make perform method empty use less/more process count use less/more concurrency split queue server-specific queues (there 3 express.js clients servers puts jobs in queues) trying different hz values in redis.conf setting somaxconn 1024 ( tcp-backlog in redis.conf too) turning off rdb save , use aof flush redis dbs (there 2 databases ...

c++ - I/O redirection in C using exe -

here code: #include<stdio.h> int main() { int = '\0'; while ((a = getchar()) != eof){ if (a != ' ' || != '\t' || != '\n' || != ';' || != ',' || != '.'){ putchar(a); } else{ continue; } } system("pause"); return 0; } i need read poem input file, , output poem no spaces or punctuation. must done using i/o variation. i've searched over, can't seem find how way need. appreciated... hope solves problem. use ascii values character. use fgetc/fputc/fscanf/fprintf etc file i/o related operations. ascii chart link here ascii chart values . #include<stdio.h> int main() { file *pfile=null; char data[255]; int i=0; pfile=fopen("poem.txt","r"); while((data[i]=fgetc(pfile)) != eof) { if(data[i]> 32 && data[i] < 123) { if(data[i] != 44 && data[i]!= 45 &...

ios - Xcode update - impossible to debug -

the recent xcode update has annihilated app. take things further, debugging issues impossible because works correctly, , doesn't. for example: when run app, textures , labels load properly. other times, 1 load in front of other. same goes labels. all can gather is not problem code, problem update. did syntax changes suggested when first installed program no avail. the hints have strangle console messages after running app: error loading /system/library/extensions/iohidfamily.kext/contents/plugins/iohidlib.plugin/contents/macos/iohidlib: dlopen(/system/library/extensions/iohidfamily.kext/contents/plugins/iohidlib.plugin/contents/macos/iohidlib, 262): no suitable image found. did find: /system/library/extensions/iohidfamily.kext/contents/plugins/iohidlib.plugin/contents/macos/iohidlib: mach-o, not built ios simulator cannot find function pointer iohidlibfactory factory 13aa9c44-6f1b-11d4-907c-0005028f18d5 in cfbundle/cfplugin 0x7ffe99729c20 ...

android - Attempt to invoke virtual method on a null object reference error -

i'm trying create song object insert object based array list (for music player app). song object should contain properties album, artist, title, etc. however, app crashes when run program, , error in log cat. java.lang.nullpointerexception: attempt invoke virtual method 'boolean java.util.arraylist.add(java.lang.object)' on null object reference here main class: private listview listview1; // list of song objects private arraylist<song> songobectlist; // song object passed songobjectlist private song songobject = new song(); @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); // add song objects songobjectlist getmusic(); // initialize adapter songadapter adapter = new songadapter(this, r.layout.listview_item_row, songobectlist); // initialize listview listview1 = (listview)findviewbyid(r.id.listview1); // initialize header ...

android - Can't instal LibGDX -

Image
i'm trying install libgdx on mac. asks reference android sdk downloaded here: http://developer.android.com/sdk/installing/index.html?pkg=tools but when link directory, error: what do? it means have not necessary verision , need update it. open sdk manager (it should in sdk directory or should able launch eclipse/android studio guess) , see: check , download - resolve problem (you can update sdk tools).

javascript - DOM access to different elements -

i’m trying learn how different levels of dom javascript, once i’ve made initial entry point. example, if want access following div element, target attribute: var divcontent = document.getelementbyid(‘box_1’); how access li tags? ultimately, want write event handler populate li tags, first need know how access them via id attribute div. <div id="box_1"> <ul> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> guess what: can elements tagname , having id parent node. cool, han? var parent = document.getelementbyid('box_1'), children = parent.getelementsbytagname('li'); // gets children of parent now need iterate on child 'li' nodes var i, e; (i = 0; < children.length; ++i) { e = children[i]; //do magic e }

datastax - Installing PHP Driver for Cassandra on Windows 7 with Xampp -

i'm trying implement https://github.com/datastax/php-driver on windows 7 xampp. i've downloaded required dependencies. when execute vc_build, hangs or stops after printing "building , installing cpp-driver". https://mail.google.com/mail/u/0/?ui=2&ik=3b8c444a04&view=fimg&th=14fc7e601acf5f83&attid=0.1&disp=emb&realattid=ii_14fc7e23a10fc709&attbid=angjdj9tovdh26lonz57m5zprwyh2opb0gvfwchzxhjosqbiu2kfddkvvgee2prfmoqud36lvi5jbwdyud0jz_n1bjaptmh9b0ztdgv1pya09fduehzi8ffpxxt0abi&sz=w908-h448&ats=1443579568911&rm=14fc7e601acf5f83&zw&atsh=1 any suggestion? have tried installing using pecl? https://github.com/datastax/php-driver/blob/master/ext/readme.md#installing-with-pecl

java - How do I fix the error of NumberFormatException everytime I run the program? -

i have create love calculator object computer science class. however, every time compile , run program keep ending error: java.lang.numberformatexception: for input string: "70.78%" (in sun.misc.floatingdecimal) my code method: public double calculate() { double value1; double value2; double sqrt1; double sqrt2; double relationship; sqrt1 = math.sqrt(name1.length()); sqrt2 = math.sqrt(name2.length()); value1 = (math.pow(name1.length(), 3)/(math.random()+0.1))* sqrt1; value2 = (math.pow(name2.length(), 3)/(math.random()+0.1))* sqrt2; if(value1 > value2) { relationship = value2 / value1; } else { relationship = value1 / value2; } numberformat nf = numberformat.getpercentinstance(); nf.setminimumfractiondigits(2); return double.parsedouble(nf.format(relationship)); } i attempted convert float. tried separate declaring , initializing double variable , returning instead didn...

Is it possible to bind multiple folders in Docker? -

is possible bind multiple folders in docker? example, ports: -p 3000:3000 -p 3022:22 the idea seems like: -v path:path -v path2:path2 is possible? no problem @ all. can specify files , directories in example taken tomcat container blend in certificates. ( :ro optional read only) -v $(pwd)/secret-files/certificates/verisign.keystore:$config_path/certificates/verisign.keystore:ro \ -v $(pwd)/secret-files/certificates/fuse/:$config_path/certificates/fuse/:ro \

ruby on rails - Rspec controller spec returning undefined method 'where' -

trying build controller spec using rspec on rails controller have named "api::zipscontroller". the controller accepts parameter called "zip_code" , returns active record model , 200 status. however, when run rspec test fails nomethoderror: undefined method 'where' zip:module . believe because 'where' instance method, not class method need stub/mock it? unfortunately have not had luck in resolving problem of yet. zips_controller_spec.rb: describe api::zipscontroller require 'spec_helper' "returns 200 status zones data" 'show', zip_code: "v9a1b2" response.should be_success end end api/zips_controller.rb - (working): class api::zipscontroller < applicationcontroller def show zip = zip.where(zip_code: params[:zip_code].upcase.slice(0..2)) render json: zip, status: 200 end end zip.rb (model): class zip < activerecord::base def as_json(options) super(:only => [:...

javascript - Saving Game Progress to Local Storage -

/* cursor section */ var cursorlvl = 1; function buycursor(){ var cursorcost = math.floor(25 * math.pow(1.2,cursorlvl)); if(fuel >= cursorcost)if(ammo >= cursorcost)if(steel >= cursorcost)if(bauxite >= cursorcost) {cursorlvl = cursorlvl + 1; fuel = fuel - cursorcost; ammo = ammo - cursorcost; steel = steel - cursorcost; bauxite = bauxite - cursorcost; document.getelementbyid('cursorlvl').innerhtml = cursorlvl; document.getelementbyid('fuel').innerhtml = fuel; document.getelementbyid('ammo').innerhtml = ammo; document.getelementbyid('steel').innerhtml = steel; document.getelementbyid('bauxite').innerhtml = bauxite;}; var nextcost = math.floor(25 * math.pow(1.2,cursorlvl)); document.getelementbyid('cursorcost').innerhtml = nextcost; }; /* enemy section */ function changee(){ var dropdownlist = document.getelementbyid('changeeid'); var selectedindex = dropdownlist.selectedindex; var...

php - Download product images in a zip on click of download button in magento -

i have custom page specific products of category. here link , code showing images only. <div style="float:left; width:100%;"> <?php $_helper = $this->helper('catalog/output'); ?> <?php $product = $this->getproduct(); ?> <?php foreach ($product->getmediagalleryimages() $image) :?> <div style="width: 48%; margin:1%;float:left"> <img width="100%;" src="<?php echo mage::helper('catalog/image')->init($product, 'image', $image->getfile()); ?>" alt="<?php echo $product->getname()?>" /> </div> <?php endforeach; ?> </div> <div style="float:left; width:100%;"> <button type="button" style="display:block;margin:0 auto;">download</button> </div> now need download images of product on click of button, link http://thevastrafashion.c...

android - How to place my text over the image in ScrollView -

i new android ,i had 4 textviews , 1 imageview,i want display image on 2 textview remaining textview display down image view should display scrollview [![i want scrollview] http://i.stack.imgur.com/bexvl.png <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <relativelayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="0.5"> <imageview android:id="@+id/image" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignparentbottom="true" android:layout_centerhorizontal="@+id/textvats" android:adjustviewbounds="true" android:background="@drawable...

php - Why do i get the null value in database? -

public function actionevent() { $event= new events(); $address=new addresses(); if($event->load(yii::$app->request->post()) && $event->save() && $address->load(yii::$app->request->post()) && $address->save()) { echo $event->name; return $this->render('sucess',['event'=>$event]); } else{ return $this->render('event',[ 'event'=>$event, 'address'=>$address, ]); } } i don't record have posted in view form ,i null in database.why? i think should indicate name of form element want load inside model given yii2 load documentation public boolean load ( $data, $formname = null ) the form name use load data model. if not set, formname() used. and in case form-name don't match model try way if($event->load(yii::$app->request->post('event')) &...

angularjs - Application insights in ASP.NET 5 -

Image
i have configured asp .net 5 application use application insights. angularjs web application pure html,java script , no server side code. steps followed added package microsoft.applicationinsights in project.json. added required javascript in head section of html. in azure portal, except server response time, server request , failed request data, else showing fine. i tried 2 things. hosted website in local machine(behind corportate proxy) 80 , 443 port opened. installed application insights status monitor tool appinsights enabled site. hosted site in azure website. in both cases, server response data not showing up.find below screenshot. please help. missing something.? as stated in question, application pure client application. thus, metrics reported javascript code inserted in <head> tag according application insights guidelines. you send no requests server side, there no occassion server-part send metrics application insights. on other han...

Is it possible to create a dynamic localized scope in Python? -

i have scenario i'm dynamically running functions @ run-time , need keep track of "localized" scope. in example below, "startscope" , "endscope" creating levels of "nesting" (in reality, stuff contained in localized scope isn't print statements...it's function calls send data elsewhere , nesting tracked there. startscope / endscope set control flags used start / end current nesting depth). this works fine tracking nested data, however, exceptions matter. ideally, exception result in "falling out" of current localized scope , not end entire function (myfunction in example below). def startscope(): #increment our control object's (not included in example) nesting depth control.incrementnestingdepth() def endscope(): #decrement our control object's (not included in example) nesting depth control.decrementnestingdepth() def myfunction(): print "a" print "b" st...

java - Decrypting files via Runtime.getRuntime().exec without Thread.sleep() -

my code decrypt encrypted files in folder, used thread.sleep(). if dont use thread.sleep(); program can't decrypt files. i'm looking better way how decrypt files without thread.sleep(); i need write conditions in code, code waiting until file decrypted. me? my code: public static void decrypt() throws interruptedexception, ioexception { file folder = new file("c:/users/hajdukri/desktop/src"); file[] files = folder.listfiles(); string pass; scanner in = new scanner(system.in); system.out.println("enter password"); pass = in.nextline(); if("pass123456".equals(pass)){ for(file :files){ thread.sleep(500); runtime.getruntime().exec("cmd /c start c:\\users\\hajdukri\\documents\\netbeansprojects\\javaapplication3\\gpg.bat"); if (a.isfile()) { string filename = a.getname(); // only last index (exeption) int co = fi...

c - What's the meaning of "0-big number" in syslog.h? -

i'm chinese.i'm reading syslog.h,and find term "0-big number" can't understand.i can understand hole paragraph meaning,but i'm still curious term "0-big number",could explain term? /* * priorities/facilities encoded single 32-bit quantity, * bottom 3 bits priority (0-7) , top 28 bits facility * (0-big number). both priorities , facilities map * one-to-one strings in syslogd(8) source code. mapping * included in file. /* facility codes */ #define log_kern (0<<3) /* kernel messages */ #define log_user (1<<3) /* random user-level messages */ .... */ the author decided call 28 set bits ( 2^28 - 1 ) big number instead of writing out. it's not term means zero big number .

javascript - NPM Error: Cannot find module 'are-we-there-yet' -

we use codeship continuous integration , modulus hosting our projects. code running until last week, i'm getting following error. → modulus deploy -p 'project_name' welcome modulus logged in user_name selecting project_name compressing project... 5.7 mb written uploading project... upload progress [===================] 100% deploying project... starting build. creating directories build environment. downloading source. executing build. package found: /package.json installing node 0.10.25 installing npm 3.3.4 installing packages /package.json module.js:340 throw err; ^ error: cannot find module 'are-we-there-yet' @ function.module._resolvefilename (module.js:338:15) @ function.module._load (module.js:280:25) @ module.require (module.js:364:17) @ require (module.js:380:17) @ object.<anonymous> (/mnt/home/.nvm/v0.10.25/lib/node_modules/npm/node_modules/npmlog/log.js:2:16) @ module._compile (module.js:456:26) @...

symfony - Issue with KnpPaginatorBundle\Helper\Processor router argument -

i have problem: cache file , knppaginatorbundle. getting weird error on prod server: php catchable fatal error: argument 1 passed knp\bundle\paginatorbundle\helper\processor::__construct() must instance of symfony\bundle\frameworkbundle\templating\helper\routerhelper, instance of besimple\i18nroutingbundle\routing\router given, called in /.../app/cache/prod/appprodprojectcontainer.php on line 809 , defined in /.../vendor/knplabs/knp-paginator-bundle/knp/bundle/paginatorbundle/helper/processor.php on line 27 i got when installed new bundle via composer , did 'composer update -o' . before 'composer update' command, had in appprodprojectcontainer.php on line 809: return $this->services['knp_paginator.helper.processor'] = new \knp\bundle\paginatorbundle\helper\processor($this->get('templating.helper.router'), $this->get('translator.default')); and worked fine on localhost , on prod server. after 'composer update' ha...