Search Results

Search found 22 results on 1 pages for 'saturn'.

Page 1/1 | 1 

  • issue with std::advance on std::sets

    - by tim
    I've stumbled upon what I believe is a bug in the stl algorithm advance. When I'm advancing the iterator off of the end of the container, I get inconsistent results. Sometimes I get container.end(), sometimes I get the last element. I've illustrated this with the following code: #include <algorithm> #include <cstdio> #include <set> using namespace std; typedef set<int> tMap; int main(int argc, char** argv) { tMap::iterator i; tMap the_map; for (int i=0; i<10; i++) the_map.insert(i); #if EXPERIMENT==1 i = the_map.begin(); #elif EXPERIMENT==2 i = the_map.find(4); #elif EXPERIMENT==3 i = the_map.find(5); #elif EXPERIMENT==4 i = the_map.find(6); #elif EXPERIMENT==5 i = the_map.find(9); #elif EXPERIMENT==6 i = the_map.find(2000); #else i = the_map.end(); #endif advance(i, 100); if (i == the_map.end()) printf("the end\n"); else printf("wuh? %d\n", *i); return 0; } Which I get the following unexpected (according to me) behavior in experiment 3 and 5 where I get the last element instead of the_map.end(). [tim@saturn advance]$ uname -srvmpio Linux 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:37:32 EDT 2006 i686 athlon i386 GNU/Linux [tim@saturn advance]$ g++ --version g++ (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [tim@saturn advance]$ g++ -DEXPERIMENT=1 advance.cc [tim@saturn advance]$ ./a.out the end [tim@saturn advance]$ g++ -DEXPERIMENT=2 advance.cc [tim@saturn advance]$ ./a.out the end [tim@saturn advance]$ g++ -DEXPERIMENT=3 advance.cc [tim@saturn advance]$ ./a.out wuh? 9 [tim@saturn advance]$ g++ -DEXPERIMENT=4 advance.cc [tim@saturn advance]$ ./a.out the end [tim@saturn advance]$ g++ -DEXPERIMENT=5 advance.cc [tim@saturn advance]$ ./a.out wuh? 9 [tim@saturn advance]$ g++ -DEXPERIMENT=6 advance.cc [tim@saturn advance]$ ./a.out the end [tim@saturn advance]$ g++ -DEXPERIMENT=7 advance.cc [tim@saturn advance]$ ./a.out the end [tim@saturn advance]$ From the sgi website (see link at top), it has the following example: list<int> L; L.push_back(0); L.push_back(1); list<int>::iterator i = L.begin(); advance(i, 2); assert(i == L.end()); I would think that the assertion should apply to other container types, no? What am I missing? Thanks!

    Read the article

  • How to get N random string from a {a1|a2|a3} format string?

    - by Pentium10
    Take this string as input: string s="planets {Sun|Mercury|Venus|Earth|Mars|Jupiter|Saturn|Uranus|Neptune}" How would I choose randomly N from the set, then join them with comma. The set is defined between {} and options are separated with | pipe. The order is maintained. Some output could be: string output1="planets Sun, Venus"; string output2="planets Neptune"; string output3="planets Earth, Saturn, Uranus, Neptune"; string output4="planets Uranus, Saturn";// bad example, order is not correct Java 1.5

    Read the article

  • Why won't my logon scripts map drives under Windows 7?

    - by Steven
    Why won't my logon scripts map drives under Windows 7? I'm using a vb script similar to the one below, the script runs using a group policy. Dim WshNetwork Set WshNetwork = WScript.CreateObject("WScript.Network") WshNetwork.MapNetworkDrive "g:", "\\\Saturn\data\" WshNetwork.MapNetworkDrive "k:", "\\\Saturn\stuff\" Works fine for Windows XP. Update: Copying the script locally and running it runs fine so I suspect the Group Policy isn't running the script on Windows 7. Many thanks Steve

    Read the article

  • Strange network connectivity problem

    - by Marc
    Here is my network connectivity: cable modem | |(WAN) wrt54g (default gateway, 192.168.1.1) -- earth |(LAN) | Simple Switch1 | | | | | SimpleSwitch2- neptune | | | | mars mercury | |- venus | |- laptop | saturn (Windows AD DC) simpleSwitch2 was hanging off the wrt54g. I moved it to SW1 during troubleshooting. Nothing described below was any different. earth is connected via wireless to the wrt54g. I can ping from laptop to mars, neptune & mercury. I can ping from earth to venus, saturn & laptop. However, pinging mars, mercury or neptune from earth gives the following result. Pinging mars.XXX.XXX [192.168.1.105] with 32 bytes of data: Reply from 192.168.1.122: Destination host unreachable. Reply from 192.168.1.122: Destination host unreachable. Reply from 192.168.1.122: Destination host unreachable. Reply from 192.168.1.122: Destination host unreachable. Ping statistics for 192.168.1.105: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), .122 is the address of the machine from which I am pinging. earth is a Vista machine. Windows firewall is off. saturn is my DNS & DHCP server. Can anyone give me any ideas what the h*ll is going on? Clearly the topology is a factor And yes, I am a space geek.

    Read the article

  • how to make a function recursive

    - by tom smith
    i have this huge function and i am wondering how to make it recursive. i have the base case which should never come true, so it should always go to else and keep calling itself with the variable t increases. any help would be great thanks def draw(x, y, t, planets): if 'Satellites' in planets["Moon"]: print ("fillcircle", x, y, planets["Moon"]['Radius']*scale) else: while True: print("refresh") print("colour 0 0 0") print("clear") print("colour 255 255 255") print("fillcircle",x,y,planets['Sun']['Radius']*scale) print("text ", "\"Sun\"",x+planets['Sun']['Radius']*scale,y) if "Mercury" in planets: r_Mercury=planets['Mercury']['Orbital Radius']*scale; print("circle",x,y,r_Mercury) r_Xmer=x+math.sin(t*2*math.pi/planets['Mercury']['Period'])*r_Mercury r_Ymer=y+math.cos(t*2*math.pi/planets['Mercury']['Period'])*r_Mercury print("fillcircle",r_Xmer,r_Ymer,3) print("text ", "\"Mercury\"",r_Xmer+planets['Mercury']['Radius']*scale,r_Ymer) if "Venus" in planets: r_Venus=planets['Venus']['Orbital Radius']*scale; print("circle",x,y,r_Venus) r_Xven=x+math.sin(t*2*math.pi/planets['Venus']['Period'])*r_Venus r_Yven=y+math.cos(t*2*math.pi/planets['Venus']['Period'])*r_Venus print("fillcircle",r_Xven,r_Yven,3) print("text ", "\"Venus\"",r_Xven+planets['Venus']['Radius']*scale,r_Yven) if "Earth" in planets: r_Earth=planets['Earth']['Orbital Radius']*scale; print("circle",x,y,r_Earth) r_Xe=x+math.sin(t*2*math.pi/planets['Earth']['Period'])*r_Earth r_Ye=y+math.cos(t*2*math.pi/planets['Earth']['Period'])*r_Earth print("fillcircle",r_Xe,r_Ye,3) print("text ", "\"Earth\"",r_Xe+planets['Earth']['Radius']*scale,r_Ye) if "Moon" in planets: r_Moon=planets['Moon']['Orbital Radius']*scale; print("circle",r_Xe,r_Ye,r_Moon) r_Xm=r_Xe+math.sin(t*2*math.pi/planets['Moon']['Period'])*r_Moon r_Ym=r_Ye+math.cos(t*2*math.pi/planets['Moon']['Period'])*r_Moon print("fillcircle",r_Xm,r_Ym,3) print("text ", "\"Moon\"",r_Xm+planets['Moon']['Radius']*scale,r_Ym) if "Mars" in planets: r_Mars=planets['Mars']['Orbital Radius']*scale; print("circle",x,y,r_Mars) r_Xmar=x+math.sin(t*2*math.pi/planets['Mars']['Period'])*r_Mars r_Ymar=y+math.cos(t*2*math.pi/planets['Mars']['Period'])*r_Mars print("fillcircle",r_Xmar,r_Ymar,3) print("text ", "\"Mars\"",r_Xmar+planets['Mars']['Radius']*scale,r_Ymar) if "Phobos" in planets: r_Phobos=planets['Phobos']['Orbital Radius']*scale; print("circle",r_Xmar,r_Ymar,r_Phobos) r_Xpho=r_Xmar+math.sin(t*2*math.pi/planets['Phobos']['Period'])*r_Phobos r_Ypho=r_Ymar+math.cos(t*2*math.pi/planets['Phobos']['Period'])*r_Phobos print("fillcircle",r_Xpho,r_Ypho,3) print("text ", "\"Phobos\"",r_Xpho+planets['Phobos']['Radius']*scale,r_Ypho) if "Deimos" in planets: r_Deimos=planets['Deimos']['Orbital Radius']*scale; print("circle",r_Xmar,r_Ymar,r_Deimos) r_Xdei=r_Xmar+math.sin(t*2*math.pi/planets['Deimos']['Period'])*r_Deimos r_Ydei=r_Ymar+math.cos(t*2*math.pi/planets['Deimos']['Period'])*r_Deimos print("fillcircle",r_Xdei,r_Ydei,3) print("text ", "\"Deimos\"",r_Xpho+planets['Deimos']['Radius']*scale,r_Ydei) if "Ceres" in planets: r_Ceres=planets['Ceres']['Orbital Radius']*scale; print("circle",x,y,r_Ceres) r_Xcer=x+math.sin(t*2*math.pi/planets['Ceres']['Period'])*r_Ceres r_Ycer=y+math.cos(t*2*math.pi/planets['Ceres']['Period'])*r_Ceres print("fillcircle",r_Xcer,r_Ycer,3) print("text ", "\"Ceres\"",r_Xcer+planets['Ceres']['Radius']*scale,r_Ycer) if "Jupiter" in planets: r_Jupiter=planets['Jupiter']['Orbital Radius']*scale; print("circle",x,y,r_Jupiter) r_Xjup=x+math.sin(t*2*math.pi/planets['Jupiter']['Period'])*r_Jupiter r_Yjup=y+math.cos(t*2*math.pi/planets['Jupiter']['Period'])*r_Jupiter print("fillcircle",r_Xjup,r_Yjup,3) print("text ", "\"Jupiter\"",r_Xjup+planets['Jupiter']['Radius']*scale,r_Yjup) if "Io" in planets: r_Io=planets['Io']['Orbital Radius']*scale; print("circle",r_Xjup,r_Yjup,r_Io) r_Xio=r_Xjup+math.sin(t*2*math.pi/planets['Io']['Period'])*r_Io r_Yio=r_Yjup+math.cos(t*2*math.pi/planets['Io']['Period'])*r_Io print("fillcircle",r_Xio,r_Yio,3) print("text ", "\"Io\"",r_Xio+planets['Io']['Radius']*scale,r_Yio) if "Europa" in planets: r_Europa=planets['Europa']['Orbital Radius']*scale; print("circle",r_Xjup,r_Yjup,r_Europa) r_Xeur=r_Xjup+math.sin(t*2*math.pi/planets['Europa']['Period'])*r_Europa r_Yeur=r_Yjup+math.cos(t*2*math.pi/planets['Europa']['Period'])*r_Europa print("fillcircle",r_Xeur,r_Yeur,3) print("text ", "\"Europa\"",r_Xeur+planets['Europa']['Radius']*scale,r_Yeur) if "Ganymede" in planets: r_Ganymede=planets['Ganymede']['Orbital Radius']*scale; print("circle",r_Xjup,r_Yjup,r_Ganymede) r_Xgan=r_Xjup+math.sin(t*2*math.pi/planets['Ganymede']['Period'])*r_Ganymede r_Ygan=r_Yjup+math.cos(t*2*math.pi/planets['Ganymede']['Period'])*r_Ganymede print("fillcircle",r_Xgan,r_Ygan,3) print("text ", "\"Ganymede\"",r_Xgan+planets['Ganymede']['Radius']*scale,r_Ygan) if "Callisto" in planets: r_Callisto=planets['Callisto']['Orbital Radius']*scale; print("circle",r_Xjup,r_Yjup,r_Callisto) r_Xcal=r_Xjup+math.sin(t*2*math.pi/planets['Callisto']['Period'])*r_Callisto r_Ycal=r_Yjup+math.cos(t*2*math.pi/planets['Callisto']['Period'])*r_Callisto print("fillcircle",r_Xcal,r_Ycal,3) print("text ", "\"Callisto\"",r_Xcal+planets['Callisto']['Radius']*scale,r_Ycal) if "Saturn" in planets: r_Saturn=planets['Saturn']['Orbital Radius']*scale; print("circle",x,y,r_Saturn) r_Xsat=x+math.sin(t*2*math.pi/planets['Saturn']['Period'])*r_Saturn r_Ysat=y+math.cos(t*2*math.pi/planets['Saturn']['Period'])*r_Saturn print("fillcircle",r_Xsat,r_Ysat,3) print("text ", "\"Saturn\"",r_Xsat+planets['Saturn']['Radius']*scale,r_Ysat) if "Mimas" in planets: r_Mimas=planets['Mimas']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Mimas) r_Xmim=r_Xsat+math.sin(t*2*math.pi/planets['Mimas']['Period'])*r_Mimas r_Ymim=r_Ysat+math.cos(t*2*math.pi/planets['Mimas']['Period'])*r_Mimas print("fillcircle",r_Xmim,r_Ymim,3) print("text ", "\"Mimas\"",r_Xmim+planets['Mimas']['Radius']*scale,r_Ymim) if "Enceladus" in planets: r_Enceladus=planets['Enceladus']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Enceladus) r_Xenc=r_Xsat+math.sin(t*2*math.pi/planets['Enceladus']['Period'])*r_Enceladus r_Yenc=r_Ysat+math.cos(t*2*math.pi/planets['Enceladus']['Period'])*r_Enceladus print("fillcircle",r_Xenc,r_Yenc,3) print("text ", "\"Enceladus\"",r_Xenc+planets['Enceladus']['Radius']*scale,r_Yenc) if "Tethys" in planets: r_Tethys=planets['Tethys']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Tethys) r_Xtet=r_Xsat+math.sin(t*2*math.pi/planets['Tethys']['Period'])*r_Tethys r_Ytet=r_Ysat+math.cos(t*2*math.pi/planets['Tethys']['Period'])*r_Tethys print("fillcircle",r_Xtet,r_Ytet,3) print("text ", "\"Tethys\"",r_Xtet+planets['Tethys']['Radius']*scale,r_Ytet) if "Dione" in planets: r_Dione=planets['Dione']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Dione) r_Xdio=r_Xsat+math.sin(t*2*math.pi/planets['Dione']['Period'])*r_Dione r_Ydio=r_Ysat+math.cos(t*2*math.pi/planets['Dione']['Period'])*r_Dione print("fillcircle",r_Xdio,r_Ydio,3) print("text ", "\"Dione\"",r_Xdio+planets['Dione']['Radius']*scale,r_Ydio) if "Rhea" in planets: r_Rhea=planets['Rhea']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Rhea) r_Xrhe=r_Xsat+math.sin(t*2*math.pi/planets['Rhea']['Period'])*r_Rhea r_Yrhe=r_Ysat+math.cos(t*2*math.pi/planets['Rhea']['Period'])*r_Rhea print("fillcircle",r_Xrhe,r_Yrhe,3) print("text ", "\"Rhea\"",r_Xrhe+planets['Rhea']['Radius']*scale,r_Yrhe) if "Titan" in planets: r_Titan=planets['Titan']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Titan) r_Xtit=r_Xsat+math.sin(t*2*math.pi/planets['Titan']['Period'])*r_Titan r_Ytit=r_Ysat+math.cos(t*2*math.pi/planets['Titan']['Period'])*r_Titan print("fillcircle",r_Xtit,r_Ytit,3) print("text ", "\"Titan\"",r_Xtit+planets['Titan']['Radius']*scale,r_Ytit) if "Iapetus" in planets: r_Iapetus=planets['Iapetus']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Iapetus) r_Xiap=r_Xsat+math.sin(t*2*math.pi/planets['Iapetus']['Period'])*r_Iapetus r_Yiap=r_Ysat+math.cos(t*2*math.pi/planets['Iapetus']['Period'])*r_Iapetus print("fillcircle",r_Xiap,r_Yiap,3) print("text ", "\"Iapetus\"",r_Xiap+planets['Iapetus']['Radius']*scale,r_Yiap) if "Uranus" in planets: r_Uranus=planets['Uranus']['Orbital Radius']*scale; print("circle",x,y,r_Uranus) r_Xura=x+math.sin(t*2*math.pi/planets['Uranus']['Period'])*r_Uranus r_Yura=y+math.cos(t*2*math.pi/planets['Uranus']['Period'])*r_Uranus print("fillcircle",r_Xura,r_Yura,3) print("text ", "\"Uranus\"",r_Xura+planets['Uranus']['Radius']*scale,r_Yura) if "Puck" in planets: r_Puck=planets['Puck']['Orbital Radius']*scale; print("circle",r_Xura,r_Yura,r_Puck) r_Xpuc=r_Xura+math.sin(t*2*math.pi/planets['Puck']['Period'])*r_Puck r_Ypuc=r_Yura+math.cos(t*2*math.pi/planets['Puck']['Period'])*r_Puck print("fillcircle",r_Xpuc,r_Ypuc,3) print("text ", "\"Puck\"",r_Xpuc+planets['Puck']['Radius']*scale,r_Ypuc) if "Miranda" in planets: r_Miranda=planets['Miranda']['Orbital Radius']*scale; print("circle",r_Xura,r_Yura,r_Miranda) r_Xmira=r_Xura+math.sin(t*2*math.pi/planets['Miranda']['Period'])*r_Miranda r_Ymira=r_Yura+math.cos(t*2*math.pi/planets['Miranda']['Period'])*r_Miranda print("fillcircle",r_Xmira,r_Ymira,3) print("text ", "\"Miranda\"",r_Xmira+planets['Miranda']['Radius']*scale,r_Ymira) if "Ariel" in planets: r_Ariel=planets['Ariel']['Orbital Radius']*scale; print("circle",r_Xura,r_Yura,r_Ariel) r_Xari=r_Xura+math.sin(t*2*math.pi/planets['Ariel']['Period'])*r_Ariel r_Yari=r_Yura+math.cos(t*2*math.pi/planets['Ariel']['Period'])*r_Ariel print("fillcircle",r_Xari,r_Yari,3) print("text ", "\"Ariel\"",r_Xari+planets['Ariel']['Radius']*scale,r_Yari) if "Umbriel" in planets: r_Umbriel=planets['Umbriel']['Orbital Radius']*scale; print("circle",r_Xura,r_Yura,r_Umbriel) r_Xumb=r_Xura+math.sin(t*2*math.pi/planets['Umbriel']['Period'])*r_Umbriel r_Yumb=r_Yura+math.cos(t*2*math.pi/planets['Umbriel']['Period'])*r_Umbriel print("fillcircle",r_Xumb,r_Yumb,3) print("text ", "\"Umbriel\"",r_Xumb+planets['Umbriel']['Radius']*scale,r_Yumb) if "Titania" in planets: r_Titania=planets['Titania']['Orbital Radius']*scale; print("circle",r_Xura,r_Yura,r_Titania) r_Xtita=r_Xura+math.sin(t*2*math.pi/planets['Titania']['Period'])*r_Titania r_Ytita=r_Yura+math.cos(t*2*math.pi/planets['Titania']['Period'])*r_Titania print("fillcircle",r_Xtita,r_Ytita,3) print("text ", "\"Titania\"",r_Xtita+planets['Titania']['Radius']*scale,r_Ytita) if "Oberon" in planets: r_Oberon=planets['Oberon']['Orbital Radius']*scale; print("circle",r_Xura,r_Yura,r_Oberon) r_Xober=r_Xura+math.sin(t*2*math.pi/planets['Oberon']['Period'])*r_Oberon r_Yober=r_Yura+math.cos(t*2*math.pi/planets['Oberon']['Period'])*r_Oberon print("fillcircle",r_Xober,r_Yober,3) print("text ", "\"Oberon\"",r_Xober+planets['Oberon']['Radius']*scale,r_Yober) if "Neptune" in planets: r_Neptune=planets['Neptune']['Orbital Radius']*scale; print("circle",x,y,r_Neptune) r_Xnep=x+math.sin(t*2*math.pi/planets['Neptune']['Period'])*r_Neptune r_Ynep=y+math.cos(t*2*math.pi/planets['Neptune']['Period'])*r_Neptune print("fillcircle",r_Xnep,r_Ynep,3) print("text ", "\"Neptune\"",r_Xnep+planets['Neptune']['Radius']*scale,r_Ynep) if "Titan" in planets: r_Titan=planets['Titan']['Orbital Radius']*scale; print("circle",r_Xnep,r_Ynep,r_Titan) r_Xtita=r_Xnep+math.sin(t*2*math.pi/planets['Titan']['Period'])*r_Titan r_Ytita=r_Ynep+math.cos(t*2*math.pi/planets['Titan']['Period'])*r_Titan print("fillcircle",r_Xtita,r_Ytita,3) print("text ", "\"Titan\"",r_Xtita+planets['Titan']['Radius']*scale,r_Ytita) t += 0.003 print(draw(x, y, t, planets))

    Read the article

  • Search sort by parameter match count in the query? PostgreSQL

    - by Ben Dauphinee
    I am working on a search query in PostgreSQL, and one of the things I do is sort my query results by the number of parameters matched. I have no clue how this can be done. Does anyone have a suggestion or solution? Table brand color type engine Ford Blue 4-door V8 Maserati Blue 2-door V12 Saturn Green 4-door V8 GM Yellow 1-door V4 Current Query SELECT brand FROM table WHERE color = 'Blue' or type = '4-door' or engine = 'V8' Result Should Be Ford (3 match) Saturn (2 match) Maserati (1 match)

    Read the article

  • Running custom Javascript on every page in Mozilla Firefox

    - by saturn
    I have a custom piece of Javascript which I would like to run on every web page from specific domains, or perhaps simply on every web page. (If you are wondering: it is not malicious. It allows to display formulas by using MathJax.) Is that possible? I tried including it in userContent.css, that of course did not work. A simple Greasemonkey script I tried did not insert it. Is it because of the security precautions? (Which would be very logical). Still, there should be a way to do it on the machine I physically control, by changing something in Mozilla chrome directory, shouldn't it? Anyway, how can I do this for myself?

    Read the article

  • Run Javascript on the body of a Gmail message

    - by saturn
    I want to display LaTeX math in the gmail messages that I receive, so that for example $\mathbb P^2$ would show as a nice formula. Now, there are several Javascripts available (for example, this one, or MathJax which would do the job, I just need to call them at the right time to manipulate the gmail message. I know that this is possible to do in "basic HTML" and "print" views. Is it possible to do in the standard Gmail view? I tried to insert a call to the javascript right before the "canvas_frame" iframe, but that did not work. My suspicion is that manipulating a Gmail message by any Javascript would be a major security flaw (think of all the malicious links one could insert) and that Google does everything to prevent this. And so the answer to my question is probably 'no'. Am I right in this? Of course, it would be very easy for Google to implement viewing of LaTeX and MathML math simply by using MathJax on their servers. I made the corresponding Gmail Lab request, but no answer, and no interest from Google apparently. So, again: is this possible to do without Google's cooperation, on the client side?

    Read the article

  • What is up with the Joy of Clojure 2nd edition?

    - by kurofune
    Manning just released the second edition of the beloved Joy of Clojure book, and while I share that love I get the feeling that many of the examples are already outdated. In particular, in the chapter on optimization the recommended type-hinting seems not to be allowed by the compiler. I don't know if this was allowable for older versions of Clojure. For example: (defn factorial-f [^long original-x] (loop [x original-x, acc 1] (if (>= 1 x) acc (recur (dec x) (*' x acc))))) returns: clojure.lang.Compiler$CompilerException: java.lang.UnsupportedOperationException: Can't type hint a primitive local, compiling:(null:3:1) Likewise, the chapter on core.logic seems be using an old API and I have to find workarounds for each example to accommodate the recent changes. For example, I had to turn this: (logic/defrel orbits orbital body) (logic/fact orbits :mercury :sun) (logic/fact orbits :venus :sun) (logic/fact orbits :earth :sun) (logic/fact orbits :mars :sun) (logic/fact orbits :jupiter :sun) (logic/fact orbits :saturn :sun) (logic/fact orbits :uranus :sun) (logic/fact orbits :neptune :sun) (logic/run* [q] (logic/fresh [orbital body] (orbits orbital body) (logic/== q orbital))) into this, leveraging the pldb lib: (pldb/db-rel orbits orbital body) (def facts (pldb/db [orbits :mercury :sun] [orbits :venus :sun] [orbits :earth :sun] [orbits :mars :sun] [orbits :jupiter :sun] [orbits :saturn :sun] [orbits :uranus :sun] [orbits :neptune :sun])) (pldb/with-db facts (logic/run* [q] (logic/fresh [orbital body] (orbits orbital body) (logic/== q orbital)))) I am still pulling teeth to get the later examples to work. I am relatively new programming, myself, so I wonder if I am naively looking over something here, or are if these points I'm making legitimate concerns? I really want to get good at this stuff like type-hinting and core.logic, but wanna make sure I am studying up to date materials. Any illuminating facts to help clear up my confusion would be most welcome.

    Read the article

  • lxc containers fail to autoboot in 14.04 trusty using 'lxc.start.auto = 1'

    - by user273046
    In trusty 14.04 containers fail to autoboot despite all settings being set as 14.04 requires. They show all as STOPPED I have correctly configured 2 LXC containers: calypso encelado They run perfectly if I run sudo lxc-autostart then sudo lxc-ls --fancy results in: ubuntu@saturn:/etc/init$ sudo lxc-ls --fancy NAME STATE IPV4 IPV6 AUTOSTART calypso RUNNING 192.168.1.161 - YES encelado RUNNING 192.168.1.162 - YES The problem is trying to run them at boot. I have at: /var/lib/lxc/calypso/config: # Template used to create this container: /usr/share/lxc/templates/lxc-download # Parameters passed to the template: # For additional config options, please look at lxc.conf(5) # Distribution configuration lxc.include = /usr/share/lxc/config/ubuntu.common.conf lxc.arch = x86_64 # Container specific configuration lxc.rootfs = /var/lib/lxc/calypso/rootfs lxc.utsname = calypso # Network configuration lxc.network.type = veth lxc.network.flags = up #lxc.network.link = lxcbr0 lxc.network.link = br0 lxc.network.hwaddr = 00:16:3e:64:0b:6e # Assegnazione IP Address lxc.network.ipv4 = 192.168.1.161/24 lxc.network.ipv4.gateway = 192.168.1.1 # Autostart lxc.start.auto = 1 lxc.start.delay = 5 lxc.start.order = 100 and I have LXC_AUTO="false" as required inside /etc/default/lxc: LXC_AUTO="false" USE_LXC_BRIDGE="false" # overridden in lxc-net [ -f /etc/default/lxc-net ] && . /etc/default/lxc-net LXC_SHUTDOWN_TIMEOUT=120 Any idea on why the containers don't start at boot? At reboot they are always in the STOPPED state: ubuntu@saturn:~$ sudo lxc-ls --fancy NAME STATE IPV4 IPV6 AUTOSTART calypso STOPPED - - YES encelado STOPPED - - YES and then again they can be started manually, using sudo lxc-autostart

    Read the article

  • KVM + Cloudmin + IpTables

    - by Alex
    I have a KVM virtualization on a machine. I use Ubuntu Server + Cloudmin (in order to manage virtual machine instances). On a host system I have four network interfaces: ebadmin@saturn:/var/log$ ifconfig br0 Link encap:Ethernet HWaddr 10:78:d2:ec:16:38 inet addr:192.168.0.253 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::1278:d2ff:feec:1638/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:589337 errors:0 dropped:0 overruns:0 frame:0 TX packets:334357 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:753652448 (753.6 MB) TX bytes:43385198 (43.3 MB) br1 Link encap:Ethernet HWaddr 6e:a4:06:39:26:60 inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0 inet6 addr: fe80::6ca4:6ff:fe39:2660/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:16995 errors:0 dropped:0 overruns:0 frame:0 TX packets:13309 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2059264 (2.0 MB) TX bytes:1763980 (1.7 MB) eth0 Link encap:Ethernet HWaddr 10:78:d2:ec:16:38 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:610558 errors:0 dropped:0 overruns:0 frame:0 TX packets:332382 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:769477564 (769.4 MB) TX bytes:44360402 (44.3 MB) Interrupt:20 Memory:fe400000-fe420000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:239632 errors:0 dropped:0 overruns:0 frame:0 TX packets:239632 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:50738052 (50.7 MB) TX bytes:50738052 (50.7 MB) tap0 Link encap:Ethernet HWaddr 6e:a4:06:39:26:60 inet6 addr: fe80::6ca4:6ff:fe39:2660/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:17821 errors:0 dropped:0 overruns:0 frame:0 TX packets:13703 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:2370468 (2.3 MB) TX bytes:1782356 (1.7 MB) br0 is connected to a real network, br1 is used to create a private network shared between guest systems. Now I need to configure iptables for network access. First of all I allow ssh sessions on port 8022 on the host system, then I allow all connections in state RELATED, ESTABLISHED. This is working ok. I install another system as guest, it's IP address is 192.168.10.2, and now I have two problems: I want to allow the access from this host to the outside world, cannot accomplish this. I can ssh from the host. I want to be able to ssh to the guest from the outside world using 8023 port. Cannot accomplish this. Full iptables configuration is following: ebadmin@saturn:/var/log$ sudo iptables --list [sudo] password for ebadmin: Chain INPUT (policy DROP) target prot opt source destination ACCEPT all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere tcp dpt:8022 ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED LOG all -- anywhere anywhere LOG level warning Chain FORWARD (policy ACCEPT) target prot opt source destination LOG all -- anywhere anywhere LOG level warning Chain OUTPUT (policy ACCEPT) target prot opt source destination LOG all -- anywhere anywhere LOG level warning ebadmin@saturn:/var/log$ sudo iptables -t nat --list Chain PREROUTING (policy ACCEPT) target prot opt source destination DNAT tcp -- anywhere anywhere tcp spt:8023 to:192.168.10.2:22 Chain INPUT (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination The worst of all is that I don't know how to interpret iptables logs. I don't see the final decision of the firewall. Need help urgently.

    Read the article

  • What change in mindset are needed for a Jave/C# programmer when learning Swift?

    - by Ian
    Swift seem to fit into the same “space” as Java/C# as it was created to make it easier to create end user applications. It is also used to target smart phones like Java/C#. However reading it’s documentation it seems to come from anther universe, you could say it is from Jupiter while C#/Java is from Saturn. As a C# programmer I am finding myself making assumptions that are not true, so what are the conceptual “traps” that I should look out for while leaning about Swift?

    Read the article

  • CodePlex Daily Summary for Tuesday, September 04, 2012

    CodePlex Daily Summary for Tuesday, September 04, 2012Popular ReleasesPE file reader: READPE-e9ff717a638d.zip: Introduced some new code which parses the IMAGENTHEADERS. At the moment the command line options dosheader and imagentheaders are working and and example of their usage can be... D:\>readpe pe-files\main.exe dosheader imagentheadersMicrosoft Ajax Minifier: Microsoft Ajax Minifier 4.64: Another attempt to fix the fiasco that was my bad decision to rename the DLLs to get away from a strong-name collision that was causing lots of problems for me. Too many existing projects expected AjaxMin.dll, and lots of things broke downstream from me. This release keeps the .net 2.0 version named AjaxMin.dll. The new .net 3.5 and .net 4.0 versions are named AjaxMinLibrary.dll. If an existing project is expecting the old name, they should continue to pick up the .net 2.0 version (since the ...Nearforums - ASP.NET MVC forum engine: Nearforums v8.5: Version 8.5 of Nearforums, the ASP.NET MVC Forum Engine. New features include: Built-in search engine using Lucene.NET Flood control improvements Notifications improvements: sync option and mail body View Roadmap for more details webdeploy package sha1 checksum: 961aff884a9187b6e8a86d68913cdd31f8deaf83NWebsec: NWebsec 1.0.3: This release fixes two bugs in the NWebsec.Mvc package. Go get it on NuGet! http://nuget.org/packages/NWebsec.Mvc/ These work items made it into the release: 9 10 Check out the Documentation to learn how it works. This release has been tagged v1.0.3 in source control. Enjoy!RBAC Manager R2 for Exchange 2010 SP2, Exchange 2013 Preview and Office 365: RBAC Manager R2 1.5.5.0: now supports to manage RBAC on Office 365 'remember password' feature now saves the password as encrypted as opposed to plain-text format in version 1.5.0.0 DPAPI is used to encrypt the saved password; for more information about DPAPI please check: Managed DPAPI Part I: ProtectedData http://blogs.msdn.com/b/shawnfa/archive/2004/05/05/126825.aspx The tool requires HTTP/HTTPS network connection to the Exchange server Known Bugs: Active Directory lookup is not working remotely and crashes the ...WiX Toolset: WiX Toolset v3.6: WiX Toolset v3.6 introduces the Burn bootstrapper/chaining engine and support for Visual Studio 2012 and .NET Framework 4.5. Other minor functionality includes: WixDependencyExtension supports dependency checking among MSI packages. WixFirewallExtension supports more features of Windows Firewall. WixTagExtension supports Software Id Tagging. WixUtilExtension now supports recursive directory deletion. Melt simplifies pure-WiX patching by extracting .msi package content and updating .w...Iveely Search Engine: Iveely Search Engine (0.2.0): ????ISE?0.1.0??,?????,ISE?0.2.0?????????,???????,????????20???follow?ISE,????,??ISE??????????,??????????,?????????,?????????0.2.0??????,??????????。 Iveely Search Engine ?0.2.0?????????“??????????”,??????,?????????,???????,???????????????????,????、????????????。???0.1.0????????????: 1. ??“????” ??。??????????,?????????,???????????????????。??:????????,????????????,??????????????????。??????。 2. ??“????”??。?0.1.0??????,???????,???????????????,?????????????,????????,?0.2.0?,???????...GmailDefaultMaker: GmailDefaultMaker 3.0.0.2: Add QQ Mail BugfixSmart Data Access layer: Smart Data access Layer Ver 3: In this version support executing inline query is added. Check Documentation section for detail.Dynamics AX Build Scripts: AX TFS Build Library Beta - v0.2.0.0: Beta release of TFS 2010 workflow code activities for AX 2009 and AX 2012. Build template for AX 2012 included. There is one refactor of code that will break your existing workflows. The AOS workflow step to stop/start AOS now expects the actual windows service name, not the port number of the AOS. There now is a new step to retrieve server settings, which can get the service identifier based on the port number. The registry has to be read to retrieve these settings, and we didn't want to ke...Cosmo OS: Cosmo OS Lama Preview: Info Sulla Release Lama Preview ( Prima Preview Pubblica ) Data Di Rilascio: 2 / 09 / 12 Build: 1950 Ramo Di Sviluppo: cosmo_os.preview.lama.bid1535543 Tipo Release: Stable / PreviewNETDeob0: NETDeob 0.3.1 BETA binaries: 0.3.1Custom Captcha Plugin for Kooboo CMS for adding content or sending feedback: Custom Captcha Validator Plugin v1.1 for Kooboo: Download file CustomCaptchaValidatorPlugin.dll and install it to KooBoo CMS. Release 1.1: Fixed error: "A generic error occurred in GDI+" (if hosting is less than Windows Server 2008 or Windows 7) - http://forum.kooboo.com/yafpostsm6602Custom-captcha---any-best-practice.aspx#post6602TSQL Code Smells Finder: POC 1.01: Proof of concept 1.01 TSQLDomTest.ps1 and Errors.Txt are requiredSaturn Kinect: Saturn Kinect + Sample Applications - Release 3: This release includes : - Saturn Kinect Library - Kinect Motion Capture Application - Controlling mouse cursor sample - Hand swip detection sample + Source CodesDiscuzViet: DiscuzX2.5_02092012_Vietnam: DiscuzX2.502092012VietnamBookmark Collector: 01.00.00: This is the first release with a minimal feature set. You can save, edit, delete, and display a list of URLs from various sites.EntLib.com????????: EntLib.com???????? v3.0: EntLib eCommerce Solution ???Microsoft .Net Framework?????????????????????。Coevery - Free CRM: Coevery 1.0.0.24: Add a sample database, and installation instructions.Math.NET Numerics: Math.NET Numerics v2.2.1: Major linear algebra rework since v2.1, now available on Codeplex as well (previous versions were only available via NuGet). Since v2.2.0: Student-T density more robust for very large degrees of freedom Sparse Kronecker product much more efficient (now leverages sparsity) Direct access to raw matrix storage implementations for advanced extensibility Now also separate package for signed core library with a strong name (we dropped strong names in v2.2.0) Also available as NuGet packages...New ProjectsAction Bar: Action Bar is a SNS network based on activities.async/await C# Samples: Project demonstrating new C# feature - async and await. You can find here several solutions to make UI calls asynchronous: APM, EAP and async.Attribute Based Xaml Generator: Dynamic Xaml UI Generator and Editor Just point it to a dll or an exe and then navigate through your namespaces to your classB INI Sharp Library: Full support for INI files.brevis nopCommerce Extensions: Extensions for nopCommerce open soruce e-commerce solution (several Versions). !Contents nop 1.90 fpr testing the new Lib! This will be removed after 1. releaseConEmu - Windows console with tabs: ConEmu (short for Console Emulator) is a console window and tabbed environment for Windows. Tabs, Fonts, Quake style, Transparency and hundreds of other optionsContrib.Mod.AccountWidgets: Orchard module for adding login and registration widgetsCSharp GUI for Mono: This is an application which makes use of "Mono" to execute CSharp programs. It provides a graphical user interface to run the CSharp program. DocCollection: ???????????????http://www.qlili.comfanpages: Fanatics!ISIS Associations Manager: Application Web permettant la gestion d'Associations. (Membres, Emailing, Calendier)LogMan: ????????????b/s??,??python?? require: web.pyLucifure Stash - Azure Table Storage Client: Lucifure Stash is an alternate Azure table storage client, which supports arrays, enumerations, large data > 64KB, serialization, morphing and more.Mod.EverlastingLogin: Orchard module to allow a user to stay logged in for a certain amount of time using cookiesPHP Extra Functions: PHP Extra Functions is a suite of functions that extend common libraries with easy to use functions. For example, functions are added to MySQLi to simplify use.Raise events controlled: This is an example of raising you events controlled (with exception handling)sb0t v.5: sb0t 5 development page.SharePoint Mobile OA Platform: Via mobile device, by using the SharePoint Mobile Support, Web Service, Client OM, WCF Data Service bring about mobile office.Simple Guestbook: I just want to share simple code, may be will be helpful for newbies.SimplyWeather2.gadget: A neat little weather gadget for your Windows Desktop.Tanks: Required summary is hereUtility Project: Utilities ProjectWindows Phone: The goal of this project is to improve my skills in Windows Phonewords: ?????????Wpf Testing Lib: This is a project for auto testing wpf appswtstudy: wtstudy

    Read the article

  • What are some good Server Name Themes/Categories [duplicate]

    - by Arian
    This question already has an answer here: What are the most manageable and interesting server naming schemes being used? [closed] 17 answers I need to create a naming scheme for my servers, but I am having a hard time come by a good category list to go by. I want something with an abundance of names to use, so as I scale my server count I won't run out. Some that I have heard being used is greek philosophers (plato) planet names (saturn, mercury, venus, mars) Mario Characters (mario, luigi, yoshi, toad) I feel like the above categories are kind of limited. What are some good naming scheme that you use?

    Read the article

  • CodePlex Daily Summary for Wednesday, August 22, 2012

    CodePlex Daily Summary for Wednesday, August 22, 2012Popular ReleasesLINQ to Twitter: LINQ to Twitter Beta v2.0.29: Supports .NET 3.5, .NET 4.0, Silverlight 4.0, Windows Phone 7.1, Client Profile, and Windows 8. 100% Twitter API coverage. LINQ to Twitter Samples contains example code for using LINQ to Twitter with various .NET technologies. Downloadable source code also has C# samples in the LinqToTwitterDemo project and VB samples in the LinqToTwitterDemoVB project.OutlookGoogleSync: OutlookGoogleSync v1.0.5: 1.5: - changed Outlook Primary Interop Assembly to V11 (Ofice 2003) to support older Office versions - more info about start/end/needed time - got rid of app.config - changed double click to single click on tray iconZXing.Net: ZXing.Net 0.8.0.0: sync with rev. 2393 of the java version improved API, direct support for multiple barcode decoding, wrapper for barcode generating many other improvements and fixes encoder and decoder command line clients demo client for emguCV dev documentation startedScintillaNET: ScintillaNET 2.5.1: This release has been built from the 2.5 branch. Issues closed: Issue # Title 32524 32524 32550 32550 32552 32552 25148 25148 32449 32449 32551 32551 32711 32711 MFCMAPI: August 2012 Release: Build: 15.0.0.1035 Full release notes at SGriffin's blog. If you just want to run the MFCMAPI or MrMAPI, get the executables. If you want to debug them, get the symbol files and the source. The 64 bit builds will only work on a machine with Outlook 2010 64 bit installed. All other machines should use the 32 bit builds, regardless of the operating system. Facebook BadgeDocument.Editor: 2013.2: Whats new for Document.Editor 2013.2: New save as Html document Improved Traslate support Minor Bug Fix's, improvements and speed upsPulse: Pulse Beta 5: Whats new in this release? Well to start with we now have Wallbase.cc Authentication! so you can access favorites or NSFW. This version requires .NET 4.0, you probably already have it, but if you don't it's a free and easy download from Microsoft. Pulse can bet set to start on Windows startup now too. The Wallpaper setter has settings now, so you can change the background color of the desktop and the Picture Position (Tile/Center/Fill/etc...) I've switched to Windows Forms instead of WPF...Metro Paint: Metro Paint: Download it now , don't forget to give feedback to me at maitreyavyas@live.com or at my facebook page fb.com/maitreyavyas , Hope you enjoy it.MiniTwitter: 1.80: MiniTwitter 1.80 ???? ?? .NET Framework 4.5 ?????? ?? .NET Framework 4.5 ????????????? "&" ??????????????????? ???????????????????????? 2 ??????????? ReTweet ?????????????????、In reply to ?????????????? URL ???????????? ??????????????????????????????Droid Explorer: Droid Explorer 0.8.8.6 Beta: Device images are now pulled from DroidExplorer Cloud Service refined some issues with the usage statistics Added a method to get the first available value from a list of property names DroidExplorer.Configuration no longer depends on DroidExplorer.Core.UI (it is actually the other way now) fix to the bootstraper to only try to delete the SDK if it is a "local" sdk, not an existing. no longer support the "local" sdk, you must now select an existing SDK checks for sdk if it was ins...Path Copy Copy: 11.0.1: Bugfix release that corrects the following issue: 11365 If you are using Path Copy Copy in a network environment and use the UNC path commands, it is recommended that you upgrade to this version.ExtAspNet: ExtAspNet v3.1.9.1: +2012-08-18 v3.1.9 -??other/addtab.aspx???JS???BoundField??Tooltip???(Dennis_Liu)。 +??Window?GetShowReference???????????????(︶????、????、???、??~)。 -?????JavaScript?????,??????HTML????????。 -??HtmlNodeBuilder????????????????JavaScript??。 -??????WindowField、LinkButton、HyperLink????????????????????????????。 -???????????grid/griddynamiccolumns2.aspx(?????)。 -?????Type??Reset?????,??????????????????(e??)。 -?????????????????????。 -?????????int,short,double??????????(???)。 +?Window????Ge...AcDown????? - AcDown Downloader Framework: AcDown????? v4.0.1: ?? ●AcDown??????????、??、??????。????,????,?????????????????????????。???????????Acfun、????(Bilibili)、??、??、YouTube、??、???、??????、SF????、????????????。 ●??????AcPlay?????,??????、????????????????。 ● AcDown??????????????????,????????????????????????????。 ● AcDown???????C#??,????.NET Framework 2.0??。?????"Acfun?????"。 ????32??64? Windows XP/Vista/7/8 ??:????????Windows XP???,?????????.NET Framework 2.0???(x86),?????"?????????"??? ??????????????,??????????: ??"AcDown?????"????????? ...Fluent Validation for .NET: 3.4: Changes since 3.3: Make ValidationResut.IsValid virtual Add private no-arg ctor to ValidationFailure to help with serialization Add Turkish error messages Work-around for reflection bug in .NET 4.5 that caused VerificationExceptions Assemblies are now unsigned to ease with versioning/upgrades (especially where other frameworks depend on FV) (Note if you need signed assemblies then you can use the following NuGet packages: FluentValidation-signed, FluentValidation.MVC3-signed, FluentV...DotNetNuke® Feedback: 06.02.01: Official Release - 17th August 2012 Please look at the Release Notes file included in the module packages or available on this page as a separate download for a listing of the bug fixes and enhancements found in this version. NOTE: Feedback v 06.02.00 REQUIRES a minimum DotNetNuke framework version of 06.02.00 as well as ASP.Net 3.5 SP1 and MS SQL Server 2005 or 2008 (Express or standard versions). This release brings some enhancements to the module as well as fixing all known bugs. Bug Fi...AssaultCube Reloaded: 2.5.3 Unnamed Fixed: If you are using deltas, download 2.5.2 first, then overwrite with the delta packages. Linux has Ubuntu 11.10 32-bit precompiled binaries and Ubuntu 10.10 64-bit precompiled binaries, but you can compile your own as it also contains the source. If you are using Mac or other operating systems, please wait while we try to package for those OSes. Try to compile it. If it fails, download a virtual machine. The server pack is ready for both Windows and Linux, but you might need to compile your ...Coding4Fun Tools: Coding4Fun.Phone.Toolkit v1.6.1: Bug Fix release Bug Fixes Better support for transparent images IsFrozen respected if not bound to corrected deadlock stateWPF Application Framework (WAF): WPF Application Framework (WAF) 2.5.0.7: Version: 2.5.0.7 (Milestone 7): This release contains the source code of the WPF Application Framework (WAF) and the sample applications. Requirements .NET Framework 4.0 (The package contains a solution file for Visual Studio 2010) The unit test projects require Visual Studio 2010 Professional Changelog Legend: [B] Breaking change; [O] Marked member as obsolete WAF: Add CollectionHelper.GetNextElementOrDefault method. InfoMan: Support creating a new email and saving it in the Send b...myCollections: Version 2.2.3.0: New in this version : Added setup package. Added Amazon Spain for Apps, Books, Games, Movie, Music, Nds and Tvshow. Added TVDB Spain for Tvshow. Added TMDB Spain for Movies. Added Auto rename files from title. Added more filters when adding files (vob,mpls,ifo...) Improve Books author and Music Artist Credits. Rewrite find duplicates for better performance. You can now add Custom link to items. You can now add type directly from the type list using right mouse button. Bug ...Player Framework by Microsoft: Player Framework for Windows 8 Preview 5 (Refresh): Support for Windows 8 and Visual Studio RTM Support for Smooth Streaming SDK beta 2 Support for live playback New bitrate meter and SD/HD indicators Auto smooth streaming track restriction for snapped mode to conserve bandwidth New "Go Live" button and SeekToLive API Support for offset start times Support for Live position unique from end time Support for multiple audio streams (smooth and progressive content) Improved intellisense in JS version NEW TO PREVIEW 5 REFRESH:Req...New Projects.NET Winforms Gantt Chart Control: Gantt Chart Control allows user to quickly create charts for prototyping or simple use cases in bigger projects.BrowseByURL: Tool that will select the right browser for displaying your URLSdummy2: This is a test projectFit Protocol Library: A library to parse and edit FIT files, used by fitness devices, such as the Garmin series of fitness GPS devices.Guild Wars 2 Build and Rotation Generator: The Guild Wars 2 Build and Rotation Generator is an audacious attempt to make an automatic character build generator in C# using the AForge genetic libraries,ISMOT - Kinect Gesture Library: A Cool Gesture LibraryKaqaz: Kaqaz is a simple weblog engine based on Xoqal framework. You can find Xoqal project link at the related projects.OAuth Lite: An easy to use library to simplify access to web resources which use OAuth 2.0 for authentication.OutlookGoogleSync: A small tool to keep the Google calendar in sync with the Outlook calendar (one way: Outlook -> Google). Doesn't need admin rights and works behind a proxy.pboa1: ????Publishing Point: Hello, my name is Leonidas Fengos and i am developer. This is a tool of publishing point about media player and media element. Please you could use and try it!!Rubik Database Tools: coming soon...Saturn Kinect: Saturn Kinect is a Kinect Interaction Library that contains classes for managing skeleton motions and using it for detecting motions,moving mouse cursor and etcShammateh: Shammateh is a simple time tracking which tends to be a personal time-sheet manager. It's based on Xoqal framework.SharePoint Webtools: SharePoint Webtools is a web application that makes administering a SharePoint Team Site more convenient. It is fully client side and requires no installation.TestOAuth: This is a test project.Type Implementer: A small .NET library (based on System.Reflection.Emit) whose purpose is to facilitate dynamic type generation at run-time.Visualizer3D: TBAWarmMeUp: WarmMeUp is the first SharePoint 2013 (compatible 2010) warm Up tool designed for large SharePoint farms (warming on every server of the farm)Xoqal: Xoqal is an application framework targeting .NET 4+ platform. It supports both of the Web and Win applications with the same infrastructure.ZipFileEx: ZipFileEx add feature that support async/await and IProgress<T> to ZipFile/ZipArchive Classes.

    Read the article

  • How to tell if linux disk IO is causing excessive (> 1 second) application stalls

    - by noahz
    I have a Java application performing a large volume (hundreds of MB) of continuous output (streaming plain text) to about a dozen files a ext3 SAN filesystem. Occasionally, this application pauses for several seconds at a time. I suspect that something related to ext3 vsfs (Veritas Filesystem) functionality (and/or how it interacts with the OS) is the culprit. What steps can I take to confirm or refute this theory? I am aware of iostat and /proc/diskstats as starting points. Revised title to de-emphasize journaling and emphasize "stalls" I have done some googling and found at least one article that seems to describe behavior like I am observing: Solving the ext3 latency problem Additional Information Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-194.32.1.el5 Primary application disk is fiber-channel SAN: lspci | grep -i fibre 14:00.0 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel Host Adapter (rev 03) Mount info: type vxfs (rw,tmplog,largefiles,mincache=tmpcache,ioerror=mwdisable) 0 0 cat /sys/block/VxVM123456/queue/scheduler noop anticipatory [deadline] cfq

    Read the article

  • How to replace a regexp group with a post proceed value?

    - by Pentium10
    I have this code to public static String ProcessTemplateInput(String input, int count) { Pattern pattern = Pattern.compile("\\{([^\\}]+)\\}"); Matcher matcher = pattern.matcher(input); while (matcher.find()) { String newelem=SelectRandomFromTemplate(matcher.group(1), count); } return input; } Input is: String s1 = "planets {Sun|Mercury|Venus|Earth|Mars|Jupiter|Saturn|Uranus|Neptune}{?|!|.} Is this ok? "; Output example: String s2="planets Sun, Mercury. Is this ok? "; I would like to replace the {} set of templates with the picked value returned by the method. How do I do that in Java1.5?

    Read the article

  • how to change string values in dictionary to int values

    - by tom smith
    I have a dictionary such as: {'Sun': {'Satellites': 'Mercury,Venus,Earth,Mars,Jupiter,Saturn,Uranus,Neptune,Ceres,Pluto,Haumea,Makemake,Eris', 'Orbital Radius': '0', 'Object': 'Sun', 'RootObject': 'Sun', 'Radius': '20890260'}, 'Earth': {'Period': '365.256363004', 'Satellites': 'Moon', 'Orbital Radius': '77098290', 'Radius': '63710.41000.0', 'Object': 'Earth'}, 'Moon': {'Period': '27.321582', 'Orbital Radius': '18128500', 'Radius': '1737000.10', 'Object': 'Moon'}} I am wondering how to change just the number values to ints instead of strings. def read_next_object(file): obj = {} for line in file: if not line.strip(): continue line = line.strip() key, val = line.split(": ") if key in obj and key == "Object": yield obj obj = {} obj[key] = val yield obj planets = {} with open( "smallsolar.txt", 'r') as f: for obj in read_next_object(f): planets[obj["Object"]] = obj print(planets)

    Read the article

  • Converting the value from string to integer in a nested dictionary

    - by tom smith
    I want to change the numbers in my dictionary to int values for use later in my program. So far I have import time import math x = 400 y = 300 def read_next_object(file): obj = {} for line in file: if not line.strip(): continue line = line.strip() key, val = line.split(": ") if key in obj and key == "Object": yield obj obj = {} obj[key] = val yield obj planets = {} with open( "smallsolar.txt", 'r') as f: for obj in read_next_object(f): planets[obj["Object"]] = obj print(planets) scale=250/int(max([planets[x]["Orbital Radius"] for x in planets if "Orbital Radius" in planets[x]])) print(scale) and the output is {'Sun': {'Object': 'Sun', 'Satellites': 'Mercury,Venus,Earth,Mars,Jupiter,Saturn,Uranus,Neptune,Ceres,Pluto,Haumea,Makemake,Eris', 'Orbital Radius': '0', 'RootObject': 'Sun', 'Radius': '20890260'}, 'Moon': {'Object': 'Moon', 'Orbital Radius': '18128500', 'Period': '27.321582', 'Radius': '1737000.10'}, 'Earth': {'Object': 'Earth', 'Satellites': 'Moon', 'Orbital Radius': '77098290', 'Period': '365.256363004', 'Radius': '6371000.0'}} 3.2426140709476178e-06 I want to be able to convert the numbers in the dict to ints for further use. Any help in greatly appreciated.

    Read the article

  • Java not working on MacOS X Leopard

    - by eeeeaaii
    I'm running Leopard, xcode 3.1.3. When I type "java" at the command line I get this: dyld: could not load inserted library: /usr/lib/libSaturnFE.dylib Trace/BPT trap What did I do? I did do some profiling with Saturn a while back but I didn't know it was going to screw up my machine. I'm fairly sure it worked when I first installed xcode. I guess I could install a different Java SDK than the one that came with Xcode? I can't find an upgrade path for Xcode that doesn't require me to upgrade to Snow Leopard. I just don't feel like upgrading to Snow Leopard right now because I don't have good disk backups in place. edit: at least if anybody could point me to a resource or even a Mac forum where I could ask this question it would be really helpful.

    Read the article

  • Algorithm to Find the Aggregate Mass of "Granola Bar"-Like Structures?

    - by Stuart Robbins
    I'm a planetary science researcher and one project I'm working on is N-body simulations of Saturn's rings. The goal of this particular study is to watch as particles clump together under their own self-gravity and measure the aggregate mass of the clumps versus the mean velocity of all particles in the cell. We're trying to figure out if this can explain some observations made by the Cassini spacecraft during the Saturnian summer solstice when large structures were seen casting shadows on the nearly edge-on rings. Below is a screenshot of what any given timestep looks like. (Each particle is 2 m in diameter and the simulation cell itself is around 700 m across.) The code I'm using already spits out the mean velocity at every timestep. What I need to do is figure out a way to determine the mass of particles in the clumps and NOT the stray particles between them. I know every particle's position, mass, size, etc., but I don't know easily that, say, particles 30,000-40,000 along with 102,000-105,000 make up one strand that to the human eye is obvious. So, the algorithm I need to write would need to be a code with as few user-entered parameters as possible (for replicability and objectivity) that would go through all the particle positions, figure out what particles belong to clumps, and then calculate the mass. It would be great if it could do it for "each" clump/strand as opposed to everything over the cell, but I don't think I actually need it to separate them out. The only thing I was thinking of was doing some sort of N2 distance calculation where I'd calculate the distance between every particle and if, say, the closest 100 particles were within a certain distance, then that particle would be considered part of a cluster. But that seems pretty sloppy and I was hoping that you CS folks and programmers might know of a more elegant solution? Edited with My Solution: What I did was to take a sort of nearest-neighbor / cluster approach and do the quick-n-dirty N2 implementation first. So, take every particle, calculate distance to all other particles, and the threshold for in a cluster or not was whether there were N particles within d distance (two parameters that have to be set a priori, unfortunately, but as was said by some responses/comments, I wasn't going to get away with not having some of those). I then sped it up by not sorting distances but simply doing an order N search and increment a counter for the particles within d, and that sped stuff up by a factor of 6. Then I added a "stupid programmer's tree" (because I know next to nothing about tree codes). I divide up the simulation cell into a set number of grids (best results when grid size ˜7 d) where the main grid lines up with the cell, one grid is offset by half in x and y, and the other two are offset by 1/4 in ±x and ±y. The code then divides particles into the grids, then each particle N only has to have distances calculated to the other particles in that cell. Theoretically, if this were a real tree, I should get order N*log(N) as opposed to N2 speeds. I got somewhere between the two, where for a 50,000-particle sub-set I got a 17x increase in speed, and for a 150,000-particle cell, I got a 38x increase in speed. 12 seconds for the first, 53 seconds for the second, 460 seconds for a 500,000-particle cell. Those are comparable speeds to how long the code takes to run the simulation 1 timestep forward, so that's reasonable at this point. Oh -- and it's fully threaded, so it'll take as many processors as I can throw at it.

    Read the article

  • How to write Java-like enums in C++ ?

    - by Rahul G
    Coming from Java background, I find C++'s enums very lame. I wanted to know how to write Java-like enums (the ones in which the enum values are objects, and can have attributes and methods) in C++. As an example, translate the following Java code (a part of it, sufficient to demonstrate the technique) to C++ : public enum Planet { MERCURY (3.303e+23, 2.4397e6), VENUS (4.869e+24, 6.0518e6), EARTH (5.976e+24, 6.37814e6), MARS (6.421e+23, 3.3972e6), JUPITER (1.9e+27, 7.1492e7), SATURN (5.688e+26, 6.0268e7), URANUS (8.686e+25, 2.5559e7), NEPTUNE (1.024e+26, 2.4746e7); private final double mass; // in kilograms private final double radius; // in meters Planet(double mass, double radius) { this.mass = mass; this.radius = radius; } private double mass() { return mass; } private double radius() { return radius; } // universal gravitational constant (m3 kg-1 s-2) public static final double G = 6.67300E-11; double surfaceGravity() { return G * mass / (radius * radius); } double surfaceWeight(double otherMass) { return otherMass * surfaceGravity(); } public static void main(String[] args) { if (args.length != 1) { System.err.println("Usage: java Planet <earth_weight>"); System.exit(-1); } double earthWeight = Double.parseDouble(args[0]); double mass = earthWeight/EARTH.surfaceGravity(); for (Planet p : Planet.values()) System.out.printf("Your weight on %s is %f%n", p, p.surfaceWeight(mass)); } } Any hep would be greatly appreciated! Thanks!

    Read the article

1