Search Results

Search found 3299 results on 132 pages for 'mr cool'.

Page 83/132 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • How often do you review fundamentals?

    - by mlnyc
    So I've been out of school for a year and a half now. In school, of course we covered all the fundamentals: OS, databases, programming languages (i.e. syntax, binding rules, exception handling, recursion, etc), and fundamental algorithms. the rest were more in-depth topics on things like NLP, data mining, etc. Now, a year ago if you would have told me to write a quicksort, or reverse a singly-linked list, analyze the time complexity of this 'naive' algorithm vs it's dynamic programming counterpart, etc I would have been able to give you a decent and hopefully satisfying answer. But if you would have asked me more real world questions I might have been stumped (things like how would handle logging for an application, or security difference between GET and POST, differences between SQL Server and Oracle SQL, anything I list on my resume as currently working with [jQuery questions, ColdFusion questions, ...] etc) Now, I feel things are the opposite. I haven't wrote my own sort since graduating, and I don't really have to worry much about theoretical things that do not naturally fall into problems I am trying to solve. For example, I might give you some great SQL solutions using an analytical function that I would have otherwise been stumped on or write a cool web application using angular or something but ask me to write an algo for insertAfter(Element* elem) and I might not be able to do it in a reasonable time frame. I guess my question here to the experienced programmers is how do you balance the need to both learn and experiment with new technologies (fun!), working on personal projects (also fun!) working and solving real world problems in a timeboxed environment (so I might reach out to a library that does what I want rather than re-invent the wheel so that I can focus on the problem I am trying to solve) (work, basically), and refreshing on old theoretical material which is still valid for interviews and such (can be a drag)? Do you review older material (such as famous algorithms, dynamic programming, Big-O analysis, locking implementations) regularly or just when you need it? How much time do you dedicate to both in your 'deliberate practice' and do you have a certain to-do list of topics that you want to work on?

    Read the article

  • Did you know documentation is built-in to usp_ssiscatalog?

    - by jamiet
    I am still working apace on updates to my open source project SSISReportingPack, specifically I am working on improvements to usp_ssiscatalog which is a stored procedure that eases the querying and exploration of the data in the SSIS Catalog. In this blog post I want to share a titbit of information about usp_ssiscatalog, that all the actions that you can take when you execute usp_ssiscatalog are documented within the stored procedure itself. For example if you simply execute EXEC usp_ssiscatalog @action='exec' in SSMS then switch over to the messages tab you will see some information about the action: OK, that’s kinda cool. But what if you only want to see the documentation and don’t actually want any action to take place. Well you can do that too using the @show_docs_only parameter like so: EXEC dbo.usp_ssiscatalog @a='exec',@show_docs_only=1; That will only show the documentation. Wanna read all of the documentation? That’s simply: EXEC dbo.usp_ssiscatalog @a='exec',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='execs',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='configure',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_created',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_running',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_canceled',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_failed',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_pending',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_ended_unexpectedly',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_succeeded',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_stopping',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_completed',@show_docs_only=1; I hope that comes in useful for you sometime. Have fun exploring the documentation on usp_ssiscatalog. If you think the documentation can be improved please do let me know. @jamiet

    Read the article

  • Test JPQL with NetBeans IDE 7.3 Tools

    - by Geertjan
    Since I pretty much messed up this part of the "Unlocking Java EE 6 Platform" demo, which I did together with PrimeFaces lead Çagatay Çivici during JavaOne 2012, I feel obliged to blog about it to clarify what should have happened! In my own defense, I only learned about this feature 15 minutes before the session started. In 7.3 Beta, it works for Java SE projects, while for Maven-based web projects, you need a post 7.3 Beta build, which is what I set up for my demo right before it started. Then I saw that the feature was there, without actually trying it out, which resulted in that part of the demo being a bit messy. And thanks to whoever it was in the audience who shouted out how to use it correctly! Screenshots below show everything related to this new feature, available from 7.3 onwards, which means you can try out your JPQL queries right within the IDE, without deploying the application (you only need to build it since the queries are run on the compiled classes): SQL view: Result view for the above: Here, you see the result of a more specific query, i.e., check that a record with a specific name value is present in the database: Also note that there is code completion within the editor part of the dialog above. I.e., as you press Ctrl-Space, you'll see context-sensitive suggestions for filling out the query. All this is pretty cool stuff! Saves time because now there's no need to deploy the app to check the database connection.

    Read the article

  • I need a decent alternative to c++ [closed]

    - by wxiiir
    I've learned php and c++, i will list the things i liked and didn't liked on each of them, how i decided to learn them in the first place and why i feel the need to learn a decent alternative to c++, i'm not a professional programmer and only do projects for myself. PHP - Decided to learn because i wanted to build a dynamic website, that i did and turned out very good, i even coded a 'not so basic' search engine for it that would display the results 'google style' and really fast, pretty cool stuff. PROS - Pretty consistent syntax for all stuff (minor caveats), great functionality, a joy for me to code in it (it seems to 'know' what i want it to do and just does it) CONS - Painfully slow for number crunching (which takes me to c++ that i only learned because i wanted to do some number crunching and it had to be screaming fast) C++ - Learned because number crunching was so slow in php and manipulating large amounts of data was very difficult, i thought, it's popular programming language and all, and tests show that it's fast, the basic stuff resemble php so it shouldn't be hard to pick up PROS - It can be used to virtually anything, very very fast CONS - Although fun to code at the start, if i need to do something out of the ordinary, memory allocation routines, pointer stuff, stack sizes etc... will get me tired really quick, syntax is a bit inconsistent some times (more caveats) I guess that from what i wrote you guys will understand what i'm looking for, there are thousands of languages out there, it's likely that one of them will suit my needs, i've been seeing stuff today and a friend of mine that is a professional programmer tried OCaml and Fortran and said that both are fast for numerical stuff, i've been inclined to test Fortran, but i need some more input because i want to have some other good 'candidates' to choose from, for example the python syntax seemed great to me, but then i found out from some tests that it was a lot slower than c++ and i simply don't want to twiddle my thumbs all day.

    Read the article

  • [Silverlight 4] New PathListBox Control

    - by FernandoCortes
    One of the new features of Silverlight 4 is the new PathListBox Control. This control is basically a Listbox control witch takes the layout of a shape that you want, so we can represent our data as we want without limits.   So we are ready to open the new Microsoft Blend 4 Beta. First, we going to create a new Silverlight Data Driven Application (MVVM) project.   Open the main view (MainView.xaml), you can find it in Views folder, i look for the new control.   Once you add the PathListbox Control to the main layout of the MainView.xaml, we will add a Line Shape. Now, we are in the main step. Set the LayoutPaths property of the PathListbox control with the line shape that is just created.   The final step is set the ItemsSource property of the PathListbox control. We are going to use a mock object collection from the main view model. I have created the object collection on the main view model created by the Silverlight MVVM project template.   This is the result that we can improve with some animations. This a basic basic use of the PathListbox but using your imagination you can do very cool things.

    Read the article

  • Should I Open Source? [closed]

    - by Howdy_McGee
    My company recently created a full javascript, html & css Virtual Tour. Since it is html based there is no real way of securing our information/code so selling it could be flimsy. We are an extremely small company, barely on the map so I was thinking that by making this an open source project it could give us a chance to jump start our SEO by page views alone, especially if we provide documentation. Not to mention hopefully bring a community following on our blog. On the other hand though could this possibly hurt our sales as a web development company? If we are handing out this cool "plugin" we made what keeps people from making it commercial somehow? So I'm trying to weigh the options on whether I should make this Open Source or not and the pros / cons of each especially for a small business. What do you guys think about making things Open Source? How do I know if this product is the right thing to make Open Source? What are some pros and cons to going Open Source?

    Read the article

  • Top down or bottom up approach?

    - by george_zakharov
    this is the closest I think I can get to define my problem. I'm an interface designer and now I'm working with a team of programmers to develop a new CMS for a heavy media site. I'm sorry if it's a very, very dumb question to ask here, but I really need some help. As I've started developing a specification list for a prototype it turned out a very big one. I do realize now that the client-side will be JS heavy, with lots of DnD and other "cool designer stuff". The CMS will even include a small project management system for its users, nothing big like Basecamp, but with a live feed of comments etc. The problem is the the team has now separated. Someone is proposing the existing backend solution used in other CMS, someone is proposing to rewrite everything from scratch. The point to keep the code is that it is faster, the point to rewrite is to make it better for the proposed design (include Node.js and other stuff I don't actually get). The question is — can the UI specs influence back-end? The guys that propose to use the existing solution did everything with the Yii framework (as far as I know), and they say that everything on server is not affected by this "interface coolness". Others say that it does, that even autosave can't work without server load. Please, if this is really incomprehensible, again, I'm sorry, and I'll happy to clarify it after your questions. Thanks in advance

    Read the article

  • How to manage a lot of Action Listeners for multiple buttons

    - by Wumbo4Dayz
    I have this Tic Tac Toe game and I thought of this really cool way to draw out the grid of 9 little boxes. I was thinking of putting buttons in each of those boxes. How should I give each button (9 buttons in total) an ActionListener that draws either an X or O? Should they each have their own, or should I do some sort of code that detects turns in this? Could I even do a JButton Array and do some for loops to put 9 buttons. So many possibilities, but which one is the most proper? Code so far: import javax.swing.*; import java.awt.event.*; import java.awt.*; public class Board extends JPanel implements ActionListener{ public Board(){ Timer timer = new Timer(25,this); timer.start(); } @Override protected void paintComponent(Graphics g){ for(int y = 0; y < 3; y++){ for(int x = 0; x < 3; x++){ g.drawRect(x*64, y*64, 64, 64); } } } public void actionPerformed(ActionEvent e){ repaint(); } }

    Read the article

  • High-level strategy for distinguishing a regular string from invalid JSON (ie. JSON-like string detection)

    - by Jonline
    Disclaimer On Absence of Code: I have no code to post because I haven't started writing; was looking for more theoretical guidance as I doubt I'll have trouble coding it but am pretty befuddled on what approach(es) would yield best results. I'm not seeking any code, either, though; just direction. Dilemma I'm toying with adding a "magic method"-style feature to a UI I'm building for a client, and it would require intelligently detecting whether or not a string was meant to be JSON as against a simple string. I had considered these general ideas: Look for a sort of arbitrarily-determined acceptable ratio of the frequency of JSON-like syntax (ie. regex to find strings separated by colons; look for colons between curly-braces, etc.) to the number of quote-encapsulated strings + nulls, bools and ints/floats. But the smaller the data set, the more fickle this would get look for key identifiers like opening and closing curly braces... not sure if there even are more easy identifiers, and this doesn't appeal anyway because it's so prescriptive about the kinds of mistakes it could find try incrementally parsing chunks, as those between curly braces, and seeing what proportion of these fractional statements turn out to be valid JSON; this seems like it would suffer less than (1) from smaller datasets, but would probably be much more processing-intensive, and very susceptible to a missing or inverted brace Just curious if the computational folks or algorithm pros out there had any approaches in mind that my semantics-oriented brain might have missed. PS: It occurs to me that natural language processing, about which I am totally ignorant, might be a cool approach; but, if NLP is a good strategy here, it sort of doesn't matter because I have zero experience with it and don't have time to learn & then implement/ this feature isn't worth it to the client.

    Read the article

  • Did you know documentation is built-in to usp_ssiscatalog?

    - by jamiet
    I am still working apace on updates to my open source project SSISReportingPack, specifically I am working on improvements to usp_ssiscatalog which is a stored procedure that eases the querying and exploration of the data in the SSIS Catalog. In this blog post I want to share a titbit of information about usp_ssiscatalog, that all the actions that you can take when you execute usp_ssiscatalog are documented within the stored procedure itself. For example if you simply execute EXEC usp_ssiscatalog @action='exec' in SSMS then switch over to the messages tab you will see some information about the action: OK, that’s kinda cool. But what if you only want to see the documentation and don’t actually want any action to take place. Well you can do that too using the @show_docs_only parameter like so: EXEC dbo.usp_ssiscatalog @a='exec',@show_docs_only=1; That will only show the documentation. Wanna read all of the documentation? That’s simply: EXEC dbo.usp_ssiscatalog @a='exec',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='execs',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='configure',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_created',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_running',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_canceled',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_failed',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_pending',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_ended_unexpectedly',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_succeeded',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_stopping',@show_docs_only=1; EXEC dbo.usp_ssiscatalog @a='exec_completed',@show_docs_only=1; I hope that comes in useful for you sometime. Have fun exploring the documentation on usp_ssiscatalog. If you think the documentation can be improved please do let me know. @jamiet

    Read the article

  • How to Draw Lines on the Screen (Part 2)

    - by Geertjan
    In part 1, I showed how you can click on the screen to create widgets and then connect those widgets together. But that's not really drawing, is it? (And I'm surprised nobody made that point in the comments to that blog entry.) Drawing doesn't really revolve around connecting dots together. It's more about using a free-flow style and being able to randomly write stuff onto a screen, without constraints. Something like this: I achieved the above by changing one line of code from the original referred to above. Instead of using a "mousePressed" event, I'm now using a "mouseDragged" event. That's all. And now the widgets are created when I drag my mouse on the scene. (I removed the rectangular select action, since that's also invoked during dragging and since that doesn't apply to the above scenario.) Now, the next step is to rewrite the NetBeans Platform Paint Application Tutorial, so that the Visual Library is used. That would be pretty cool.

    Read the article

  • When and how does one become a good programmer these days? [closed]

    - by YoungMoney
    I mean, good enough to make software people want and get paid for it. Maybe even good enough to launch a company or something. I'm also concerned that I'm not applying the finer points of my algorithms/data structures/software design knowledge. Background: I'm 20 and have been struggling with programming for about two years now, trying to become a software engineer. I started with a few university courses that I did quite poorly in. I learned how to make websites with HTML/JavaScript and PHP/MySQL, but feel like I know very relevant theory for making good databases - how does something like Facebook serve hundreds of millions of people? What would be smart ways to store data? I don't know. Now I'm doing some android application development, but again I have no idea about good Java design theory (I use static variables like they're going out of fashion) and feel more like I'm gluing stuff together and letting Eclipse slowly autocomplete my project. In short, I'm not sure if I'm becoming a legitimate software developer or just "doing what's cool". At least I've taken some data structures and Algorithms courses and plan to take more in the next years. But I'm having a really tough time applying this stuff to my fun little apps that I'm building. Every language higher level than C++ seems to have its own quicksort function already built-in, for example. Similarly, I can't remember ever needing to implement a linked-list, heap, binary tree, or or worry about pointers and memory management. But maybe this is a good thing so that I focus on other things? I'm not too sure what those other things are though. Hopefully something more than building another photo sharing app. Anyways that's it for me, I look forward to your responses!

    Read the article

  • Insanity Day 3

    - by D'Arcy Lussier
    So on Tuesday (Sept 25th) I did my 2nd Insanity workout (for those keeping track, I’m not counting the fit test as #1) and it was MURDER on my legs. I wasn’t able to get to it yesterday, and I’m noticing a trend in this first week – I can easily push to do it every 2nd day, but life is just too crazy busy right now (yeah yeah, excuses right? I look at it more like priorities – I have a tech conference I’m running next week, crazy days right now). Today I moved to the 3rd workout – but honestly I couldn’t get into it. It was the cardio recovery day, which is a lot of stretching and stuff. I think if I had been doing the first two sessions back to back I’d need it, but I didn’t want to cool down today – I wanted to push! So I moved to the next DVD in the series but for some reason couldn’t get it to run on my computer, even with SlyDVD. So – back to Disc 1 and the Plyometric Cardio Circuit! Fantastic workout again this morning. Don’t get me wrong, I’m not all of a sudden in amazing shape, but I am noticing already that I seem to be somewhat better – I’m really looking forward to my next fit test at the end of the month!

    Read the article

  • Configuring correct port for Oozie (invoking PIG script) in Cloudera Hue

    - by user2985324
    I am new to CDH4 Oozie workflow editor. While trying to invoke a pig script from Oozie workflow editor, i am getting the following error. HadoopAccessorException: E0900: Jobtracker [mymachine:8032] not allowed, not in Oozies whitelist It looks like Oozie is submitting the job to Yarn port (8032). I want it to submit to 8021 (MR jobtracker) port. Can someone help me in identify where to set the job tracker URL or port so that oozie picks up the correct one (using Hue or Cloudera manager). Previously I tried the following but none of them helped Modfied workflow.xml file /user/hue/oozie/workspaces/../workflow.xml file. However it gets overwritten when I submit the job from workflow editor. In cloudera Manager -- oozie -- configuration --Oozie Server (advanced) -- Oozie Server Configuration Safety Valve for oozie-site.xml property I set the following- <property> <name>oozie.service.HadoopAccessorService.nameNode.whitelist</name> <value>mymachine:8020</value> oozie.service.HadoopAccessorService.jobTracker.whitelist mymachine:8021 and restarted the oozie service. 3. Tried to override 'jobTracker' property while configuring the pig task. This appears as follows in the workflow file however it doesn't take effect (or doesn't override) and still uses 8032 port. <global> <configuration> <property> <name>jobTracker</name> <value>mymachine:8021</value> </property> </configuration> </global> I am using CDH4 version. Thanks for looking into my question.

    Read the article

  • C# Design How to Elegantly wrap a DAL class

    - by guazz
    I have an application which uses MyGeneration's dOODads ORM to generate it's Data Access Layer. dOODad works by generating a persistance class for each table in the database. It works like so: // Load and Save Employees emps = new Employees(); if(emps.LoadByPrimaryKey(42)) { emps.LastName = "Just Got Married"; emps.Save(); } // Add a new record Employees emps = new Employees(); emps.AddNew(); emps.FirstName = "Mr."; emps.LastName = "dOOdad"; emps.Save(); // After save the identity column is already here for me. int i = emps.EmployeeID; // Dynamic Query - All Employees with 'A' in thier last name Employees emps = new Employees(); emps.Where.LastName.Value = "%A%"; emps.Where.LastName.Operator = WhereParameter.Operand.Like; emps.Query.Load(); For the above example(i.e. Employees DAL object) I would like to know what is the best method/technique to abstract some of the implementation details on my classes. I don't believe that an Employee class should have Employees(the DAL) specifics in its methods - or perhaps this is acceptable? Is it possible to implement some form of repository pattern? Bear in mind that this is a high volume, perfomacne critical application. Thanks, j

    Read the article

  • Facebooker Causing Problems with Rails Integration Testing

    - by Eric Lubow
    I am (finally) attempting to write some integration tests for my application (because every deploy is getting scarier). Since testing is a horribly documented feature of Rails, this was the best I could get going with shoulda. class DeleteBusinessTest < ActionController::IntegrationTest context "log skydiver in and" do setup do @skydiver = Factory( :skydiver ) @skydiver_session = SkydiverSession.create(@skydiver) @biz = Factory( :business, :ownership = Factory(:ownership, :skydiver = @skydiver )) end context "delete business" do setup do @skydiver_session = SkydiverSession.find post '/businesses/destroy', :id = @biz.id end should_redirect_to('businesses_path()'){businesses_path()} end end end In theory, this test seems like it should pass. My factories seem like they are pushing the right data in: Factory.define :skydiver do |s| s.sequence(:login) { |n| "test#{n}" } s.sequence(:email) { |n| "test#{n}@example.com" } s.crypted_password '1805986f044ced38691118acfb26a6d6d49be0d0' s.password 'secret' s.password_confirmation { |u| u.password } s.salt 'aowgeUne1R4-F6FFC1ad' s.firstname 'Test' s.lastname 'Salt' s.nickname 'Mr. Password Testy' s.facebook_user_id '507743444' end The problem I am getting seems to be from Facebooker only seems to happen on login attempts. When the test runs, I am getting the error: The error occurred while evaluating nil.set_facebook_session. I believe that error is to be expected in a certain sense since I am not using Facebook here for this session. Can anyone provide any insight as to how to either get around this or at least help me out with what is going wrong?

    Read the article

  • Make a Crystal Report with data fetched from two differents tables

    - by Selom
    Hi, Im using vb.net and I need to fetch data from two different tables and display it in form of report. These are the schemas and data of my two tables: CREATE TABLE personal_details (staff_ID integer PRIMARY KEY, title varchar(10), fn varchar(250), ln varchar(250), mn varchar(250), dob varchar(50), hometown varchar(250), securityno varchar(50), phone varchar(15), phone2 varchar(15), phone3 varchar(15), email varchar(250), address varchar(300), confirmation varchar(50), retirement varchar(50), designation varchar(250), region varchar(250)); INSERT INTO personal_details VALUES(1,'Mr.','Selom','AMOUZOU','Kokou','Sunday, March 28, 2010','Ho',7736,'024-747-4883','277-383-8383','027-838-3837','[email protected]','Lapaz Kum Hotel','Sunday, March 28, 2010','Sunday, March 28, 2010','Designeur','Brong Ahafo'); CREATE TABLE training( training_ID integer primary key NOT NULL, staff_ID varchar(100), training_level varchar (60), school_name varchar(100), start_date varchar(100), end_date varchar(100)); INSERT INTO training VALUES(1,1,'Primary School','New School','Feb 1955','May 1973'); INSERT INTO training VALUES(2,1,'Middle/JSS','Ipmc','Feb 1955','May 1973'); Im trying to fetch and display data from the tables above the following way: Dim rpt As New CrystalReport1() Dim da As New SQLiteDataAdapter Dim ds As New presbydbDataSet ds.EnforceConstraints = False If conn.State = ConnectionState.Closed Then conn.Open() End If Dim cmd As New SQLiteCommand("SELECT p.fn, t.training_level FROM personal_details p INNER JOIN training t ON p.staff_ID = t.staff_ID", conn) cmd.ExecuteNonQuery() da.SelectCommand = cmd da.Fill(ds) rpt.SetDataSource(ds) CrystalReportViewer1.ReportSource = rpt conn.Close() My problem is that nothing displays on the report unless I take off either the training fields or the personal_details fields from the report. Need your help. Thanks

    Read the article

  • What was Tim Sweeney thinking? (How does this C++ parser work?)

    - by Frank Krueger
    Tim Sweeney of Epic MegaGames is the lead developer for Unreal and a programming language geek. Many years ago posted the following screen shot to VoodooExtreme: As a C++ programmer and Sweeney fan, I was captivated by this. It shows generic C++ code that implements some kind of scripting language where that language itself seems to be generic in the sense that it can define its own grammar. Mr. Sweeney never explained himself. :-) It's rare to see this level of template programming, but you do see it from time to time when people want to push the compiler to generate great code or because they want to create generic code (for example, Modern C++ Design). Tim seems to be using it to create a grammar in Parser.cpp - you can see what look like prioritized binary operators. If that is the case, then why does Test.ae look like it's also defining a grammar? Obviously this is a puzzle that needs to be solved. Victory goes to the answer with a working version of this code, or the most plausible explanation, or to Tim Sweeney himself if he posts an answer. :-)

    Read the article

  • Using inotify-tools and ruby to push uploads to Cloud Files

    - by Christian
    Hi Guys, I wrote a few scripts to monitor an uploads directory for changes, then capture the file uploaded/changed and push it to cloud files using a ruby script. This all works well 95% of the time, the only exception is that occasionally, ruby fails with a 'file does not exist' exception. I am assuming that the ruby 'push' script is being called before the file is 100% in its new location, so the script is being called a little prematurely. I tried adding a little function to my script to check if the file exists, if it doesn't, sleep 5 then try again, but this seems to snowball and eventually dies. I then just added a sleep 2 to all calls, but it hasn't helped as I now get the 'file does not exist' error again. #!/bin/sh function checkExists { if [ ! -e "$1" ] then sleep 5 checkExists $1 fi } inotifywait -mr --timefmt '%d/%m/%y-%H:%M' --format '%T %w %f' -e modify,moved_to,create,delete /home/skylines/html/forums/uploads | while read date dir file; do cloudpath=${dir:20}${file} localpath=${dir}${file} #checkExists $localpath sleep 2 ruby /home/cbiggins/bin/pushToCloud.rb skylinesaustralia.com $cloudpath $localpath echo "${date} ruby /home/cbiggins/bin/pushToCloud.rb skylinesaustralia.com $cloudpath $localpath" >> /var/log/pushToCloud.log done I am looking for any suggestions to help me make this 100% stable (eventually, I'll serve the uploaded files from Cloud FIles, so I need to make sure its perfect) Thanks in advance!

    Read the article

  • Qt Object Linker Problem " undefined reverence to vtable"

    - by Thomas
    This is my header: #ifndef BARELYSOCKET_H #define BARELYSOCKET_H #include <QObject> //! The First Draw of the BarelySocket! class BarelySocket: public QObject { Q_OBJECT public: BarelySocket(); public slots: void sendMessage(Message aMessage); signals: void reciveMessage(Message aMessage); private: // QVector<Message> reciveMessages; }; #endif // BARELYSOCKET_H This is my class: #include <QTGui> #include <QObject> #include "type.h" #include "client.h" #include "server.h" #include "barelysocket.h" BarelySocket::BarelySocket() { //this->reciveMessages.clear(); qDebug("BarelySocket::BarelySocket()"); } void BarelySocket::sendMessage(Message aMessage) { } void BarelySocket::reciveMessage(Message aMessage) { } I get the Linker Problem : undefined reference to 'vtable for barelySocket' This should mean, i have a virtual Function not implemented. But as you can see, there is non. I comment the vector cause that should solve the Problem, but i does not. The Message is a complex struct, but even converting it to int did not solve it. I searched Mr G but he could not help me. Thank you for your support, Thomas

    Read the article

  • scipy.io typeerror:buffer too small for requested array

    - by kartiku
    I have a problem in python. I'm using scipy, where i use scipy.io to load a .mat file. The .mat file was created using MATLAB. listOfFiles = os.listdir(loadpathTrain) for f in listOfFiles: fullPath = loadpathTrain + '/' + f mat_contents = sio.loadmat(fullPath) print fullPath Here's the error: Traceback (most recent call last): File "tryRankNet.py", line 1112, in demo() File "tryRankNet.py", line 645, in demo mat_contents = sio.loadmat(fullPath) File "/usr/lib/python2.6/dist-packages/scipy/io/matlab/mio.py", line 111, in loadmat matfile_dict = MR.get_variables() File "/usr/lib/python2.6/dist-packages/scipy/io/matlab/miobase.py", line 356, in get_variables getter = self.matrix_getter_factory() File "/usr/lib/python2.6/dist-packages/scipy/io/matlab/mio5.py", line 602, in matrix_getter_factory return self._array_reader.matrix_getter_factory() File "/usr/lib/python2.6/dist-packages/scipy/io/matlab/mio5.py", line 274, in matrix_getter_factory tag = self.read_dtype(self.dtypes['tag_full']) File "/usr/lib/python2.6/dist-packages/scipy/io/matlab/miobase.py", line 171, in read_dtype order='F') TypeError: buffer is too small for requested array The whole thing is in a loop, and I checked the size of the file where it gives the error by loading it interactively in IDLE. The size is (9,521), which is not at all huge. I tried to find if I'm supposed to clear the buffer after each iteration of the loop, but I could not find anything. Any help would be appreciated. Thanks.

    Read the article

  • Issues in Convergence of Sequential minimal optimization for SVM

    - by Amol Joshi
    I have been working on Support Vector Machine for about 2 months now. I have coded SVM myself and for the optimization problem of SVM, I have used Sequential Minimal Optimization(SMO) by Mr. John Platt. Right now I am in the phase where I am going to grid search to find optimal C value for my dataset. ( Please find details of my project application and dataset details here http://stackoverflow.com/questions/2284059/svm-classification-minimum-number-of-input-sets-for-each-class) I have successfully checked my custom implemented SVM`s accuracy for C values ranging from 2^0 to 2^6. But now I am having some issues regarding the convergence of the SMO for C 128. Like I have tried to find the alpha values for C=128 and it is taking long time before it actually converges and successfully gives alpha values. Time taken for the SMO to converge is about 5 hours for C=100. This huge I think ( because SMO is supposed to be fast. ) though I`m getting good accuracy? I am screwed right not because I can not test the accuracy for higher values of C. I am actually displaying number of alphas changed in every pass of SMO and getting 10, 13, 8... alphas changing continuously. The KKT conditions assures convergence so what is so weird happening here? Please note that my implementation is working fine for C<=100 with good accuracy though the execution time is long. Please give me inputs on this issue. Thank You and Cheers.

    Read the article

  • c#: how to read parts of a file? (DICOM)

    - by Xaisoft
    I would like to read a DICOM file in C#. I don't want to do anything fancy, I just for now would like to know how to read in the elements, but first I would actually like to know how to read the header to see if is a valid DICOM file. It consists of Binary Data Elements. The first 128 bytes are unused (set to zero), followed by the string 'DICM'. This is followed by header information, which is organized into groups. A sample DICOM header First 128 bytes: unused DICOM format. Followed by the characters 'D','I','C','M' Followed by extra header information such as: 0002,0000, File Meta Elements Groups Len: 132 0002,0001, File Meta Info Version: 256 0002,0010, Transfer Syntax UID: 1.2.840.10008.1.2.1. 0008,0000, Identifying Group Length: 152 0008,0060, Modality: MR 0008,0070, Manufacturer: MRIcro In the above example, the header is organized into groups. The group 0002 hex is the file meta information group which contains 3 elements: one defines the group length, one stores the file version and the their stores the transfer syntax. Questions How to I read the header file and verify if it is a DICOM file by checking for the 'D','I','C','M' characters after the 128 byte preamble? How do I continue to parse the file reading the other parts of the data?

    Read the article

  • What would be the equivalent VB.NET code for this C# FluentNHibernate component mapping?

    - by Will Marcouiller
    I'm a C# programmer constrained to write VB.NET code. While exploring NHibernate further for my current client, I encountered FluentNHibernate, which I find real attractive. But now, I wonder how to "translate" this C# code for component mapping into VB.NET code: Component(x => x.Address, m => { m.Map(x => x.Number); m.Map(x => x.Street); m.Map(x => x.PostCode); }); I know from here: Component(Of Client)(Function(c) c.Address, ...) what I miss is how to continue with the brackets in VB.NET, since there's no Begin End keywords or so. EDIT 1: Following Mr. JaredPar instructions, I figured that his solution might work. If we take the time to read his answer, we may notice that we both don't know what the MType is within his solution. I might have found out that the MType is: FluentNHibernate.Mapping.ComponentPart(Of TComponent) Thus, TComponent is, from my understanding, an anonymous type that I shall parameter to use. From this point of view, since I wish to map the properties of my Address object, replacing TComponent in my help method signature seems not to work. Private Sub MapAdresseHelper(Of Adresse)(ByVal a As FluentNHibernate.Mapping.ComponentPart(Of Adresse)) a.Map(Function(m) m.Number) a.Map(Function(m) m.Street).Length(50) a.Map(Function(m) m.PostCode).Length(10) End Sub The error I get is that my Address class doesn't have a property member named Street, for instance. It sees my Address type, it recognizes it, but it seems buggy somehow. I guess VBNET is poorly designed for lambda expressions and is less evolved than C# (Sorry, a bit of frustration due to the constraint of working with it and not being capable of doing things VERY easily done in C#.) Thanks!

    Read the article

  • Using Regex Replace when looking for un-escaped characters

    - by Daniel Hollinrake
    I've got a requirement that is basically this. If I have a string of text such as "There once was an 'ugly' duckling but it could never have been \'Scarlett\' Johansen" then I'd like to match the quotes that haven't already been escaped. These would be the ones around 'ugly' not the ones around 'Scarlett'. I've spent quite a while on this using a little C# console app to test things and have come up with the following solution. private static void RegexFunAndGames() { string result; string sampleText = @"Mr. Grant and Ms. Kelly starred in the film \'To Catch A Thief' but not in 'Stardust' because they'd stopped acting by then"; string rePattern = @"\\'"; string replaceWith = "'"; Console.WriteLine(sampleText); Regex regEx = new Regex(rePattern); result = regEx.Replace(sampleText, replaceWith); result = result.Replace("'", @"\'"); Console.WriteLine(result); } Basically what I've done is a two step process find those characters that have already been escaped, undo that then do everything again. It sounds a bit clumsy and I feel that there could be a better way.

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >