Posts

Showing posts from March, 2010

java - Printing out specific name for a given random number; keeping a running total on the random numbers give -

my program needs print out 3 5 random numbers 10 times. skydiving problem in numbers 1-22 equal 1 point while 23-38 equal 2 points. have created program has 10 different rounds 5 random numbers in each round, can't seem print out formation related specific number i.e. if 1 number equal 1 print out "snowflake". i have tried using if statements way print out each of formations keep getting error saying int can't become boolean. package skydiving; import java.security.securerandom; public class skydiving{ public static void main(string[] args){ int = 1; securerandom randomnumbers = new securerandom(); while (i<=10){ system.out.printf("round %d",i++); system.out.println(""); int totalpoints = 0; (int counter = 1 ; counter <= 5; counter++) { int dive = 1 + randomnumbers.nextint(38); if(dive == 1) system.out.println("1: snowflake"); else if(dive == 2) system.out.println("2: sideb

java - Configuring build path works, but adding same dependency in pom does not -

Image
so i'm attempting use org.apache.cxf.binding.soap.interceptor.soapheaderinterceptor in 1 of modules of project in eclipse. since new jar adding, downloaded myself , added referenced library under project. good. had class extend soapheaderinterceptor, , hunky dory. so once done coding everything, removed jar referenced libraries , instead added module's pom so: <dependency> <groupid>org.apache.cxf</groupid> <artifactid>cxf-rt-bindings-soap</artifactid> <version>2.5.2</version> </dependency> i did maven update on project, , subsequently saw jar added under maven dependencies. opened local m2 repository , it's there well. but getting errors on class (shown below) public class authenticationinterceptor extends soapheaderinterceptor as follows: the project not built since build path incomplete. cannot find class file org.apache.cxf.interceptor.abstractindatabindinginterceptor. fix build path

c++ - Will not link, unless inlining method -

i facing strange error @ linking time. the headers: global.h #include <cmath> #include <iostream> #include <vector> #include <blitz/tinyvec2.h> typedef blitz::tinyvector<double,3> vettore; #include "animal.h" animal.h #ifndef __animal_h #define __animal_h //! basic data structure animal ------------------------- struct animal { int age; public: animal(int _age) : age(_age) {} }; //! contains info pair of animals ---------------------- struct animalpairs { vettore distance; animalpairs( const vettore& _distance ) : distance(_distance) {} }; typedef std::vector<animalpairs> pair_list; //! data structure group of animals ---------------------- class animalvector { private: std::vector<animal> animals; pair_list pairs; public: animalvector( const animalvector &other ); }; #endif and here *cpp files main.cpp #include "global.h" int main () { std::cout<< "h

ruby on rails - mismatch setting and preloading of polymorphic association for STI models -

github issue link let see have polymorphic table class db::document < activerecord::base # documentable_type, documentable_id belongs_to :documentable, polymorphic: true end class db::ticket < activerecord::base has_one :document, as: :documentable def self.find_sti_class(type_name) activesupport::dependencies.constantize("db::ticket::#{sti_type_for(type_name)}") end self.inheritance_column = :type self.store_full_sti_class = false def self.sti_name self.to_s.split('::').last end end class db::ticket::train < db::ticket end class ticket::airplain < db::ticket end when set association: doc = document.new doc.documentable = db::ticket::train.first! # docuementable_type 'db::ticket' when preload polymorphic association: db::ticket.where(id: [1,2]).preload(:document).to_a # select * documents documentable_id in (1,2) , documentable_type = 'ticket' i think because on association.writer uses name

yocto custom built linux iptables issue -

i beginner yocto user , working on custom linux build olinuxino a20-lime using yocto trying establish access point using rtl8192cu based dongle(tp-link wn823n) followed tutorial http://trac.gateworks.com/wiki/yocto/wireless when ran iptables -a forward -i eth0 -o wlan0 -m state --state related,established -j accept got no chain/target/match name do? change linux kernel build parameters or something? my ap mode working(i mean devices can connect) internet connection seems drop every , then. do? my best guess kernel not built conntrack support (or modules not loaded) not recognizing "-m state". connection tracking can allowed setting following kernel configuration items: config_nf_conntrack config_nf_conntrack_ipv4

java - Changing palindrome to fit numeric palindrome -

so i've figured out pretty effective way check palindromes, asked change fit numeric palindrome , again stuck. public boolean checknumericpalindrome() { string s = this.s.tolowercase(); string resultstring = ""; for(int i=0; i<s.length(); i++) { if(character.isdigit(s.charat(i))) { resultstring = resultstring + s.charat(i); } } int low = 0; int high = resultstring.length() - 1; boolean ispalindrome = true; while (low < high) { if (resultstring.charat(low) != resultstring.charat(high)) { ispalindrome = false; break; } low++; high--; } return ispalindrome; } ` i've figured out had change letters isdigits , , know should change or rid of tolowercase , s.length can't seem find numeric equivalent, or know if there one. if don't want make major changes logic, can make string input number , same thing. public boolean checknumericpalindrome(int number) { string resultstring = intege

android - How to solve rendering problems in AndroidStudio? -

i have started developing app android studio , , now, no apparent reason, 1 of content xml files having rendering problems, seemingly missing theme or something. in both files, 1 working , 1 not working, there no reference theme in file. i totally confused. not make sense me. please let me know files should post can take look! content of file seems miss theme, or whatever: android:layout_width="match_parent" android:layout_height="match_parent" android:usedefaultmargins="true" android:alignmentmode="alignbounds" android:columnorderpreserved="false" android:columncount="4" > <textview android:text="@string/maintitle" android:textsize="32dip" android:layout_columnspan="4" android:layout_gravity="center_horizontal" android:id="@+id/textvi

html - CSS layout, footer is midway-up the content -

i need me this. in css layout, footer midway contents instead of being positioned right below. code can seen here. pls me, not sure went wrong, spent time on this. html: <title>my reporting system</title> <link rel="stylesheet" type="text/css" href="style.css" /> <body> <div id="user-logged"> logged in : <strong>user</strong><br>logout </div> <hr> <div> <a id="logo" href="."> <img id="logo" src="images/logo.png" alt="brs"/> </a> <div id="sidebar"> <h1 style="color:#fff; padding-left:20px; font-size:15px;"> reporting system </h1> <ul> <li>outlet settings</li> <li>update daily stats</li>

javascript - $(...).serializeJSON is not a function -

i have no idea why getting error despite include jquery library. code: function create() { var employeeform = $("#createuser").serializejson(); var employee = json.stringify(employeeform); $.ajax({ url: uric, type: 'post', data: employee, success: function(results) { } }); the library: <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-2.0.3.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> what missing??? create new js script in project , paste script there : https://raw.githubusercontent.com/marioizquierdo/jquery.serializejson/master/jquery.serializejson.js . add script src page.

javascript - jQuery click event does not work when fullscreen iframe in the background? -

jquery click event won't fire when there fullscreen iframe in background : js : $( document ).ready(function() { $(document).click(function(){ if ($(this).find('.overlay').is(':visible')) { $('.overlay').hide(); } else { $('.overlay').show(); } }); }); html : <body> <div class="overlay">overlay</div> <iframe src="iframe.html" name="frame" style="position:fixed; top:0; left:0; right:0; bottom:0; width:100%; height:100%"></iframe> </body> css : body { margin: 0; } .overlay { width:200px; height:200px; background-color: green; position:fixed; top:0; left:0; z-index: 10; } i want hide/ toggle green box when click occurred outside box. any ideas how can fix this? to access iframe, .contents() can used : demo $(document).ready(function() { $('[name="

Return or Print StringBuilder? Java -

i bit confused stringbuilder. seems when print stringbuilder, there no need add .tostring() because automatically give me string representation. however, when return stringbuilder object, have add .tostring(). true? , why? also, bit confused following code: package com.tutorialspoint; import java.lang.*; public class stringbuilderdemo { public static void main(string[] args) { stringbuilder str = new stringbuilder("india "); system.out.println("string = " + str); // append character stringbuilder str.append('!'); // convert string object , print system.out.println("after append = " + str.tostring()); str = new stringbuilder("hi "); system.out.println("string = " + str); // append integer stringbuilder str.append(123); // convert string object , print system.out.println("after append = " + str.tostring());

How to get email id From Android Facebook SDK 4.6.0? -

here code getting user information after facebook login. trying emailid user getting name , id , not getting emailid .i have tried login button , login manager class both giving same results . how email id response : loginbutton.registercallback(callbackmanager, new facebookcallback<loginresult>() { @override public void onsuccess(final loginresult loginresult) { new graphrequest(accesstoken.getcurrentaccesstoken(), "/me", null , httpmethod.get, new graphrequest.callback() { public void oncompleted( graphresponse response) { handle result if (response !=null ) { //get user information toast.mak

google cloud messaging - ListView: instantly updating and time comparision -

i have work on application in getting list of orders(with details , display_time ) , have show them in list view, condition have show particular order on exact display_time . for example below orders display time: order_id: 101 | display_time (hh:mm:ss): 09:10:00 order_id: 102 | display_time (hh:mm:ss): 09:30:00 then requirement is: we have show orders on list on exact display time. all order should come instantly entered in database. edit the first thing need is: to order database (sql server) instantly without hitting api. push notification. then second need is: to compare device's time , order's display_time , if matched make visible order in listview . have each order think. i don't know how can this. so please suggest how can above task. i hope understand correctly. want list of items in order of time earliest latest. here 1 algorithm , enhanced. allocate 100 (arbitrary) items/rows in listview. if have 2 items or or

android - Displaying menu in all the activities without overriding onCreateOptionsMenu and onOptionsItemSelected each time -

while working application, had come come across situation supposed use menu has displayed in entire application when user click menu button. so used following code in default activity realized menu displaying in activity not in all. @override public boolean oncreateoptionsmenu(menu menu) { getmenuinflater().inflate(r.menu.del_boy_menu, menu); //below comented code changung dynamically // menuitem bedmenuitem = menu.finditem(r.id.home); // bedmenuitem.settitle("title changed"); // system.out.println("oncreate executed"); return true; } @override public boolean onoptionsitemselected(menuitem item) { // todo auto-generated method stub system.out.println("onoptionselected executed"); switch (item.getitemid()) { case r.id.home: // single menu item selected // ex: launching new activity/screen or show alert message toast.maketext(maindeliveryboyactivity.this, "home select

javascript - looping through key/value pair of promises in protractor -

i using protractor test series of webpages (actually 1 webpage of angular design, others well). have created series of page objects handle this. minimize code maintenance have created object key value pairs so: var object = { pagelogo: element(by.id('logo')), searchbar: element.all(by.classname('searchthing')), ... }; the assumption being need add object make usable everywhere in page object file. of course, file has functions (assuming not familiar page object pattern) such: var pagenamepageobject = function () { var object = {...}; //list of elements this.get = function() { brower.get('#/somewebtag'); } this.getelementtext = function(somename){ if (typeof somename == 'number') ... (convert or handle exception, whatever) return object[name].gettext(); } ... *note these examples , these promises can handled in variety of ways in page object or main tests the issue comes attempting "cycle&qu

java - Spring transactions: Method with requires_new called from a method with requires -

i understand when commit happens , when rollback happens in case of nested transaction different isolation levels calling , called methods, for example, have 2 spring services , i'm calling method2 of service2 method1 of service1. method1 having required transaction scope , method2 having requires_new transaction scope shown in program below. service1 { @transactional(propagation = propagation.required) method1() { for(int i=0; i<10; i++){ service2.method2(); } // more code takes time process } } service2 { @transactional(propagation = propagation.requires_new) method2() { //save information db // save object using jpa } } now question is, understand requires_new start new transaction, commit on existing method2 or spring waits till method1 completed , commits? i'm interested in @ point of time commit happens , row lock in db gets released persisted in method2. note: here have placed both methods in different services spr

sorting - Unix sort emits lines outside of expected order only when second column exists -

i have file 2 columns. first column has 2 underscore-separated numbers in it, , want sort file lexicgraphically column. now, if there no second column, default sort precisely want: $ { echo 211_284; ((i=2840;i<=2842;++i)); echo 211_$i; done; echo 211_284; } | sort -k1 211_284 211_284 211_2840 211_2841 211_2842 but if add second column (which should irrelevant sort!): $ { echo 211_284 x; ((i=2840;i<=2842;++i)); echo 211_$i y; done; echo 211_284 z; } | sort -k1 211_2840 y 211_2841 y 211_2842 y 211_284 x 211_284 z or adding second column 1 of rows: $ { echo 211_284 x; ((i=2840;i<=2842;++i)); echo 211_$i; done; echo 211_284; } | sort -k1 211_284 211_2840 211_2841 211_2842 211_284 x how sort on first column, real? if want ignore other first column, use sort -k1,1 ; otherwise, you're specifying start column not end column: also, if don't want locale's collation order impact lexographic sort relationship between digits , spaces, set lc_all=c ex

azure - How does the load balancer decide how to route requests? -

the titles says everything: let's created 3 vm's load balancing on port 80 in 1 cloud service. there request cloud service: how load balancer decide of these 3 vm's should route request? there specific metric or load balancer routes randomly? microsoft azure load balancer layer-4 type load balancer. microsoft azure load balancer distributes load among set of available servers (virtual machines) computing hash function on traffic received on given input endpoint. hash function computed such packets same connection (tcp or udp) end on same server. microsoft azure load balancer uses 5 tuple (source ip, source port, destination ip, destination port, protocol type) calculate hash used map traffic available servers. hash function chosen such distribution of connections servers random. however, depending on traffic pattern, possible different connections mapped same server. full details: https://azure.microsoft.com/en-us/blog/microsoft-azur

Java Mybatis multiple update statements -

java mybatis oracle i have following mybatis statement in xml file <update id="updateofferindex" parametertype="java.util.list"> <foreach collection="list" item="offer" index="index" separator=";" > update offer set indx=#{offer.idx} id=#{offer.eid} </foreach> i getting following error, can 1 ? ### error updating database. cause: java.sql.sqlsyntaxerrorexception: ora-00911: invalid character ### error may involve com.dao.linear.upsell.linearupselldao.updateofferindex-inline ### error occurred while setting parameters ### sql: update offer set indx=? id=? ; update offer set indx=? id=? ### cause: java.sql.sqlsyntaxerrorexception: ora-00911: invalid character looks last semicolon has not been appended: ### sql: update offer set indx=? id=?; update offer set indx=? id=?; and coherent mybatis documentation foreach's separator: the e

gridview - Grid View with Horizontal scrolling in android -

i want show images in gridview , want show them in single row. no of columns in gridview equal no of images. want when no. of images more , taking width more screen size, want enable horizontal scrolling gridview, images visible. how can achieve this, please me if have idea. have tried gallery widget not giving me desired results. here library called two way grid view can use gridview in both orientations (horizontal , vertical) link library : https://github.com/jess-anders/two-way-gridview sample usage: <?xml version="1.0" encoding="utf-8"?> <com.jess.ui.twowaygridview xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:background="#e8e8e8" android:id="@+id/gridview" android:layout_width="fill_parent" android:layout_height="fill_parent" app:cachecolorhint="#e8e8e8" app:columnwidth="80dp&qu

javascript - How dsiplay alert message after saving data using Jquery -

actually got alert message display before saving data please me out below code there (var = 0; < rows_count; i++) { var count = 0; $.ajax({ type: "post", url: "default.aspx/update_extrahoursworked", cache: false, data: "{'empid':'" + $("#emp_id" + i).text() + "','emp_code': '" + $("#emp_code" + i).text() + "','emp_category':'" + $("#emp_category" + i).text() + "','g1': '" + $("#txtgen_three" + i).val() + "','f1': '" + $("#txtfirst_three" + i).val() + "','s1': '" + $("#txtsecond_three" + i).val() + "','t1': '" + $("#txtthrid_three" + i).val() + "','g2': '" + $("#txtgen_four" + i).val() + "','f2': '&

logstash - how to write grok pattern upto particular word -

i need in writing grok pattern upto particular string. i have below types log lines in same log file: line 1: 20151012 00:59:03 main error java.lang.class - failed retrieve node - unable resolve path //mbeans/mbean[@id="audit-config"]/mbean-attributes line 2: 20151012 00:59:59 rmi tcp connection(5)-176.66.1.39 info net.cp.cluster.configstore.admin.impl.adminmanager - config up-to-date; local anchor [ac6c08e5-cded-43ca-8cb3-e8be1b85c453] - global anchor: [ac6c08e5-cded-43ca-8cb3-e8be1b85c453] here now, want loglevel words error or info severity field. my goal is, want after seconds field upto error or info in 1 field. how should that? i have tried below grok not working: %{year}%{monthnum}%{monthday}\s*%{hour}:%{minute}:%{second}\s*\(?<rawinfo>/^(?:(?!\s*\b(?:error | ?:info)\b).)*/\) any here? thanks!

c# - Can't find WCF end points -

i trying consume wcf end point .net class library project. added service references client project. following client try { serviceresult svcresult; using (myserviceclient myclient = new myserviceclient()) { svcresult = myclient.dosomething(param1, param2); } } catch (exception ex) { } my app.config file looks follows <system.servicemodel> <bindings> <wshttpbinding> <binding name="wshttpbinding_imyservice" /> </wshttpbinding> </bindings> <client> <endpoint address="http://localhost:1234/mywcfservices/myservice.svc" binding="wshttpbinding" bindingconfiguration="wshttpbinding_iauthenticationservice" contract="myservice.imyservice"

Why is my Visual Studio text editor font all bold now? -

Image
i must have hit hot key or , can't figure out how undo now. of text in text editor appears bold. example: here comparison sample in tools > options vs seeing in editor: i found setting in tools > options, doesn't seem change when ticked on or off: how fix madness? the solution kspearrin mentioned in comments section solved problem me: i trying adjust zoom level using mouse wheel , never went true 100%. when manually adjusted using dropdown @ bottom of editor window 100% looks fine now.

Crystal Reports: positioning image outside page margins -

in report have left page margin of 2.3cm. nothing allowed inside of margin except in cases specific image on first page. how can without changing page margins? margins have set way because of printing issues have change margins on every page.

python - Pythonic way to check if element in a list contains in key dictionary -

i have mapping keywords this. categories_mapping = { 'comics': 'comic books', 'cartoons': 'comic books', 'manga': 'comic books', 'video , computer games': 'video games', 'role playing games': 'video games', 'immigration': 'immigration', 'police': 'police', 'environmental': 'environment', 'celebrity fan , gossip': 'celebrity', 'space , technology': 'nasa / space', 'movies , tv': 'tv , movies', 'elections': 'elections', 'referendums': 'elections', 'sex': 'sex', 'music': 'music', 'technology , computing': 'technology'} and list this. labels = ['technology , computing', 'arts , technology

ios - Regex for html string in Objective C -

i getting html formatted string tags. there inconstancy " <br> " tag. getting" <br> " tag in random formats causes space in text. there solution trim these multiple " <br> " tags single one? example of text :- "some text..... <br>" "some text..... <br> <br>" // <-- cause space. "some text..... <br>\n" // <-- cause space. "some text..... <br>\n<br>" // <-- cause space. "some text..... <br><br>\n <br>" // <-- cause space. so in short, there can multiple " <br> " tags white spaces , \n character in it. i need replace single " <br> " tag. can me regex same? note:- don't want replace other string in between 2 "<br>" tags except white space , "\n" . code written till - nsmutablestring *temp = [[nsmutablestring alloc] initwithstring:html

r - Use reorder in ggplot2 wrapped in a function -

Image
background i building function wrap ggplot2 follow: df <- data.frame("variable" = c("chk_account3", "amount", "duration"), "overall_imp" = c(71.44, 54.24, 34.84)) clevelandplot <- function (dataframe, xvalue, yvalue) { ggplot(data = dataframe, aes_string(x=xvalue, y=yvalue)) + geom_segment(aes_string(yend = yvalue), xend = 0, colour = "grey50") + geom_point(size=3) + scale_x_continuous(expand = c(0.01, 0)) + theme_bw() + theme(panel.grid.major.y = element_blank()) + xlab("importance") + ylab("") } this function works: clevelandplot(df, "overall_imp", "variable") but when try reorder values following code, not work: clevelandplot <- function (dataframe, xvalue, yvalue) { ggplot(data = dataframe, aes_string(x=xvalue, y=reorder(yvalue, xvalue))) + geom_segment(aes_string(yend = yvalue), xend = 0, colour = "grey50&qu

How to prevent Android displaying app stopped message -

Image
android kill service when memory not enough. like this: i know can use foreground service prohibit android kill service public class myservice extends service { @override public ibinder onbind(intent intent) { return null; } @override public void oncreate() { super.oncreate(); try { notification notification = new notification(r.mipmap.ic_launcher,"this service", system.currenttimemillis()); intent intent = new intent(this, mainactivity.class); pendingintent contentintent = pendingintent.getactivity(this, 0,intent , 0); notification.setlatesteventinfo(this, "myapp", "myservice", contentintent); notification.flags =notification.flag_auto_cancel; startforeground(123,notification); } catch(exception e) { stopself(); } } @override public void ondestroy() { super.ondes

playframework - Intercept request and add a cookie -

i intercept requests play backend , add custom cookie them. know response has withcookie method, unable find similar request. facilities deal cookies in request seem read only, being complete novice play stuck i need because migrating existing webapp cordova based mobile app not allow cookies. our authentication system based on session cookies. have been able send session id in json format , want send header , if needed generate session cookie on filter or interceptor in play don't need change our authentication system in backend. both globalsettings or play filter candidates intercept request, still don't know how add cookie it. can give me small sample or explanation of how that?? thanks!! it seems bit stupid. i can provide cookies want play using cookie http header, no need intercept request here. sorry noise

ionic - How to upload an image with cordovaFileTransfer to my Spring service? -

i using ionic in project , need take picture phone , upload picture server , save it. i using next function upload image think sending image path , not image file $scope.upload = function() { var options = { filekey: "avatar", filename: "image.png", chunkedmode: false, mimetype: "image/png" }; $cordovafiletransfer.upload("http://192.168.56.1:1337/file/upload", "/android_asset/www/img/ionic.png", options).then(function(result) { console.log("success: " + json.stringify(result.response)); }, function(err) { console.log("error: " + json.stringify(err)); }, function (progress) { // constant progress updates }); } i have string on server. how can receive image file on spring service???

ruby on rails - How do I build a complex nested form to represent dynamic attributes -

Image
i've got data model represented following image: basically, idea there many different collections . items in single collection have same attributes , list of attributes different per collection. value of each attribute per item stored in item attribute values . i'm trying build single page user can populate attributes item. i'm assuming nested form way go i'm @ loss how represent in controller , on page, considering names of attributes in 1 table , values in another. if has encountered or had deal similar situation, appreciated. thanks here 1 potential solution. class collection has_and_belongs_to_many :items has_and_belongs_to_many :attributes end class item has_and_belongs_to_many :collections has_many :item_attributes has_many :attributes, though: :item_attributes end class attributes has_and_belongs_to_many :collections has_many :item_attributes has_many :items, though: :item_attributes end class itemattribute belong

spotify - Spoitfy and Echo Nest API Mismatches, How to Fix? -

i using spotify , echo nest apis audio information songs. basic flow is: search song spotify's api using track title , artist name get spotify url track response query echo nest api audio summary, using spotify id this has been working long time. in past few months have noticed more , more tracks cannot found in echo nest api given spotify id. here's example today. sufjan stevens's track "chicago" search on spotify. http://ws.spotify.com/search/1/track.json?q=artist:sufjan%20track:chicago first result gives spotify id: spotify:track:7bo0xlcxwx3pdhqwthqgaz query echo nest spotify id: http://developer.echonest.com/api/v4/song/profile?api_key=v91crteb0ifmajbmb&track_id=spotify:track:7bo0xlcxwx3pdhqwthqgaz&bucket=audio_summary (for url used example api key, can see result. of course in app using own api key.) the response "the identifier specified not exist: spotifyv2-zz:track:spotify:track:7bo0xlcxwx3pdhqwthqgaz" but echo ne

is watchman notifies for deleted files? -

i tried find in documentation , did not find indication. i read win32 watch code (because familiar api , seems not). tracking file deletion extremely convoluted on windows, because api provides file names "randomly" mangled , if file not there anymore resolve real name "long path" hard original. i have implemented such thing previous company, preserving current state of files , reconciling list of files every directory changes happening inside. worked well. my question is: did miss , watchman notifies deleted files? , if not - there plans these notifications added in near future. the short answer: yes. the longer answer: more convoluted portions not entirely windows specific. the bit handles mangled names can found here: https://github.com/facebook/watchman/blob/master/root.c#l748 the bit handles deletes in 2 parts; first handles things when we're checking file notified about: https://github.com/facebook/watchman/blob/master/root.c#l8

javascript - Bell Curve / Normal Disribution Curve On A NVD3 Discrete Bar Chart -

Image
i trying figure out way distribution curve / bell curve onto nvd3 chart. have searched net lot , found literally nothing work i've got. maybe isn't possible, thought worth asking , know else looks this. this example of need graph (found on google images) as can see example, line doesn't need second axis, there no need 'bar , line chart combo'. know can draw directly onto canvas d3 i'm little under experienced that. and here code , jsfiddle if look var json = [{ "values": [{"label":"450-456", "value":0, "color":"#d62728"},{"label":"456-462", "value":0, "color":"#d62728"},{"label":"462-468", "value":0, "color":"#d62728"},{"label":"468-474", "value":0, "color":"#d62728"},{"label":"474-480", "value":0, "color&q

linux - How to move all files of a folder to another folder in ssh console? -

i have tree structure in same level public_html connection & inside public_html have conn so want move files & folder of folder public_html/conn connection folder in level of public_html,so exact command of ssh can give me result? if want folder conn inside connection : mv -i public_html/conn/ connection alternatively, if want files inside conn , not conn folder itself, inside connection : mv -i public_html/conn/* connection mv -i public_html/conn/.* connection would suggest doing man mv beforehand avoid making mistake.

java - Maven still builds successfully with known errors -

i'm trying run .jar in ubuntu, , it's failing every time classnotfoundexception. thought problem jar file, after digging more thinking problem maven implementation. when run maven builds successfully, there errors in code. i've run same code using same method on several different computers, , has never happened. maven throws error when appropriate, fact it's allowing build after there clear errors makes me think might cause of .jar problems. i looking in target folder , noticed i'm missing "classes", "maven-status" , "generated-sources" folders in there. classpath variable set "/media/client-script/java-consumer-client" which should allow maven find classes, since in pom.xml has line <start-class>com.java.consumer.client.application</start-class> which package main class. i'm not sure why seems maven unable find classes in order run. here's screenshot of file structure. does have idea why

magento - How to display a list of all categories on the home page -

i want display list of categories on home page links, when clicks go page. i tried this: put code on content of cms -> home page {{block type="catalog/navigation" name="catalog.category" template="catalog/category/view.phtml"}} {{block type="catalog/product_list" category_id="2" template="catalog/product/list.phtml"}} but displays nothing.. home page becomes blank, when put this: {{block type="catalog/navigation" name="catalog.category" template="catalog/category/view.phtml"}} then products displayed correctly.. depending on wish place these links, there many ways achieve this. adding categories content if wish place category links in content of homepage can achieved heading cms > pages > homepage: design tab , adding following layout update xml: <reference name="content"> <block type="core/text_list" name="top.menu