Search Results

Search found 26214 results on 1049 pages for 'farm solution'.

Page 36/1049 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • online backup solution with api for desktop

    - by user161179
    I made a small backup application that simply creates an archive out specified files and folders. Now I need an online service to backup that online. Which service can i use that can be integrated into my app ? Options I considered: dropbox is ideal, but they have all but abandoned the desktop. skydrive has no api. I couldn't find any free reliable backup service that uses ftp . anything else ? it should provide 1-2 gb of free space and be reasonably reliable. Thanks My app is in C#, but can be ported to any other language as well..

    Read the article

  • Porting Python algorithm to C++ - different solution

    - by cb0
    Hello, I have written a little brute string generation script in python to generate all possible combinations of an alphabet within a given length. It works quite nice, but for the reason I wan't it to be faster I try to port it to C++. The problem is that my C++ Code is creating far too much combination for one word. Heres my example in python: ./test.py gives me aaa aab aac aad aa aba .... while ./test (the c++ programm gives me) aaa aaa aaa aaa aa Here I also get all possible combinations, but I get them twice ore more often. Here is the Code for both programms: #!/usr/bin/env python import sys #Brute String Generator #Start it with ./brutestringer.py 4 6 "abcdefghijklmnopqrstuvwxyz1234567890" "" #will produce all strings with length 4 to 6 and chars from a to z and numbers 0 to 9 def rec(w, p, baseString): for c in "abcd": if (p<w - 1): rec(w, p + 1, baseString + "%c" % c) print baseString for b in range(3,4): rec(b, 0, "") And here the C++ Code #include <iostream> using namespace std; string chars="abcd"; void rec(int w,int b,string p){ unsigned int i; for(i=0;i<chars.size();i++){ if(b < (w-1)){ rec(w, (b+1), p+chars[i]); } cout << p << "\n"; } } int main () { int a=3, b=0; rec (a+1,b, ""); return 0; } Does anybody see my fault ? I don't have much experience with C++. Thanks indeed

    Read the article

  • SQL Design Question regarding schema and if Name value pair is the best solution

    - by Aur
    I am having a small problem trying to decide on database schema for a current project. I am by no means a DBA. The application parses through a file based on user input and enters that data in the database. The number of fields that can be parsed is between 1 and 42 at the current moment. The current design of the database is entirely flat with there being 42 columns; some have repeated columns such as address1, address2, address3, etc... This says that I should normalize the data. However, data integrity is not needed at this moment and the way the data is shaped I'm looking at several joins. Not a bad thing but the data is still in a 1 to 1 relationship and I still see a lot of empty fields per row. So my concerns are that this does not allow the database or the application to be very extendable. If they want to add more fields to be parsed (which they do) than I'd need to create another table and add another foreign key to the linking table. The third option is I have a table where the fields are defined and a table for each record. So what I was thinking is to make a table that stores the value and then links to those two tables. The problem is I can picture the size of that table growing large depending on the input size. If someone gives me a file with 300,000 records than 300,000 x 40 = 12 million so I have some reservations. However I think if I get to that point than I should be happy it is being used. This option also allows for more custom displaying of information albeit a bit more work but little rework even if you add more fields. So the problem boils down to: 1. Current design is a flat file which makes extending it hard and it is not normalized. 2. Normalize the tables although no real benefits for the moment but requirements change. 3. Normalize it down into the name value pair and hope size doesn't hurt. There are a large number of inserts, updates, and selects against that table. So performance is a worry but I believe the saying is design now, performance testing later? I'm probably just missing something practical so any comments would be appreciated even if it’s a quick sanity check. Thank you for your time.

    Read the article

  • finding a solution to a giving maze txt.file

    - by alberto
    how can i fix this program, the problem is when it print out the coordinate it give me a 7 for the start and finish, i would appreciated you help, thanks start = (len(data)) finish = (len(data)) pos= [] for i in range(len(pos)): for j in range(len(pos[i])): if pos[i][j] == "S": start=(i,j) elif pos[i][j] == "F": finish=(i,j) print "S found in",start, print "\nF found in",finish,"\n"

    Read the article

  • FOSS solution for a local machine: DNS

    - by Shyam
    Hi, I love my Mac. But I have always found that my DNS lookups are as slow, even while flushing caches and I travel over know roads on the Internet. I was wondering if someone would know something a bit more automatic/intelligent than /etc/hosts and less complex and iron forged as BIND. Thank you for your feedback and answers!

    Read the article

  • A better solution than element.Elements("Whatever").First()?

    - by codeka
    I have an XML file like this: <SiteConfig> <Sites> <Site Identifier="a" /> <Site Identifier="b" /> <Site Identifier="c" /> </Sites> </SiteConfig> The file is user-editable, so I want to provide reasonable error message in case I can't properly parse it. I could probably write a .xsd for it, but that seems kind of overkill for a simple file. So anyway, when querying for the list of <Site> nodes, there's a couple of ways I could do it: var doc = XDocument.Load(...); var siteNodes = from siteNode in doc.Element("SiteConfig").Element("SiteUrls").Elements("Sites") select siteNode; But the problem with this is that if the user has not included the <SiteUrls> node (say) it'll just throw a NullReferenceException which doesn't really say much to the user about what actually went wrong. Another possibility is just to use Elements() everywhere instead of Element(), but that doesn't always work out when coupled with calls to Attribute(), for example, in the following situation: var siteNodes = from siteNode in doc.Elements("SiteConfig") .Elements("SiteUrls") .Elements("Sites") where siteNode.Attribute("Identifier").Value == "a" select siteNode; (That is, there's no equivalent to Attributes("xxx").Value) Is there something built-in to the framework to handle this situation a little better? What I would prefer is a version of Element() (and of Attribute() while we're at it) that throws a descriptive exception (e.g. "Looking for element <xyz> under <abc> but no such element was found") instead of returning null. I could write my own version of Element() and Attribute() but it just seems to me like this is such a common scenario that I must be missing something...

    Read the article

  • Django1.1 file based session backend multi-threaded solution

    - by Satoru.Logic
    Hi, all. I read django.contrib.sessions.backend.file today, in the save method of SessionStore there is something as the following that's used to achieve multi-threaded saving integrity: output_file_fd, output_file_name = tempfile.mkstemp(dir=dir, prefix=prefix + '_out_') renamed = False try: try: os.write(output_file_fd, self.encode(session_data)) finally: os.close(output_file_fd) os.rename(output_file_name, session_file_name) renamed = True finally: if not renamed: os.unlink(output_file_name) I don't quite understand how this solve the integrity problem.

    Read the article

  • Guidelines for solution source code organisation(OO/DDD)

    - by fearofawhackplanet
    I'm starting on my first business project (.NET) and am trying to follow DDD principles. Are there any guidelines or common patterns for orgaining source code and namespaces? For example, do your domain objects go in a namespace MyProject.Domain or whatever? Would you separate the concrete implementations and the interfaces? In different namespaces? Different folders? Different solutions? I know a lot of this is subjective and dependent on project size, but a few pointers or suggestions to get started on a relatively small but extensible n-tier project would be useful.

    Read the article

  • Javascript: best solution to wait for all ajax callbacks to be executed

    - by glaz666
    Hi! Imagine we have to sources to be requested by ajax. I want to perform some actions when all callbacks are triggered. How this can be done besides this approach: (function($){ var sources = ['http://source1.com', 'http://source2.com'], guard = 0, someHandler = function() { if (guard != sources.length) { return; } //do some actions }; for (var idx in sources) { $.getJSON(sources[idx], function(){ guard++; someHandler(); }) } })(jQuery) What I don't like here is that in this case I can't handle response failing (eg. I can't set timeout for response to come) and overall approach (I suppose there should be a way to use more power of functional programming here) Any ideas? Regards!

    Read the article

  • Need a set based solution to group rows

    - by KM
    I need to group a set of rows based on the Category column, and also limit the combined rows based on the SUM(Number) column to be less than or equal to the @Limit value. For each distinct Category column I need to identify "buckets" that are <=@limit. If the SUM(Number) of all the rows for a Category column are <=@Limit then there will be only 1 bucket for that Category value (like 'CCCC' in the sample data). However if the SUM(Number)@limit, then there will be multiple bucket rows for that Category value (like 'AAAA' in the sample data), and each bucket must be <=@Limit. There can be as many buckets as necessary. Also, look at Category value 'DDDD', its one row is greater than @Limit all by itself, and gets split into two rows in the result set. Given this simplified data: DECLARE @Detail table (DetailID int primary key, Category char(4), Number int) SET NOCOUNT ON INSERT @Detail VALUES ( 1, 'AAAA',100) INSERT @Detail VALUES ( 2, 'AAAA', 50) INSERT @Detail VALUES ( 3, 'AAAA',300) INSERT @Detail VALUES ( 4, 'AAAA',200) INSERT @Detail VALUES ( 5, 'BBBB',500) INSERT @Detail VALUES ( 6, 'CCCC',200) INSERT @Detail VALUES ( 7, 'CCCC',100) INSERT @Detail VALUES ( 8, 'CCCC', 50) INSERT @Detail VALUES ( 9, 'DDDD',800) INSERT @Detail VALUES (10, 'EEEE',100) SET NOCOUNT OFF DECLARE @Limit int SET @Limit=500 I need one of these result set: DetailID Bucket | DetailID Category Bucket -------- ------ | -------- -------- ------ 1 1 | 1 'AAAA' 1 2 1 | 2 'AAAA' 1 3 1 | 3 'AAAA' 1 4 2 | 4 'AAAA' 2 5 3 OR 5 'BBBB' 1 6 4 | 6 'CCCC' 1 7 4 | 7 'CCCC' 1 8 4 | 8 'CCCC' 1 9 5 | 9 'DDDD' 1 9 6 | 9 'DDDD' 2 10 7 | 10 'EEEE' 1

    Read the article

  • Database solution for 200million writes/day, monthly summarization queries

    - by sb
    Hello. I'm looking for help deciding on which database system to use. (I've been googling and reading for the past few hours; it now seems worthwhile to ask for help from someone with firsthand knowledge.) I need to log around 200 million rows (or more) per 8 hour workday to a database, then perform weekly/monthly/yearly summary queries on that data. The summary queries would be for collecting data for things like billing statements, eg. "How many transactions of type A did each user run this month?" (could be more complex, but that's the general idea). I can spread the database amongst several machines, as necessary, but I don't think I can take old data offline. I'll definitely need to be able to query a month's worth of data, maybe a year. These queries would be for my own use, and wouldn't need to be generated in real-time for an end-user (they could run overnight, if needed). Does anyone have any suggestions as to which databases would be a good fit? P.S. Cassandra looks like it would have no problem handling the writes, but what about the huge monthly table scans? Is anyone familiar with Cassandra/Hadoop MapReduce performance?

    Read the article

  • How to make your more experienced and authoritative teammates not to create 'fast temporary solution

    - by Roman
    I'm currently working on a small short-lived project. But despite the size it's complicated enough with very unclear logic. That's why it was started by more experienced developers. They work on it from time to time because it's not their main project. They made some code drafts with numerous places which 'would be rewritten in the nearest future'. After that they added several another 'temporary pieces'. And then again.. So, now the project is a mess of 'half-working' pieces of code with some hardcoded values, like file names or some constants which 'will be replaced latter with working parts'. The API is awful (nobody thinks about it actually). And it's really, really hard to do development now (for me it's the main and only project). I caught myself thinking that I spent about an hour every day just to understand again all that tricky 'temporary' things and API weaknesses. And after that hour my brain melts. I can't just say that "guys, your code smells like a trash dump". What's the correct way?

    Read the article

  • Mysql query, need suggestion or solution

    - by Xi Kam
    Can anyone help me, i have two tables and i need records from both the table //////////////////////////////++ Query 1 ++//////////////////////////////////// SELECT SUM(rec_issued) AS issed, regen_id, YEAR(issue_date) AS iYear, MONTH(issue_date) AS iMonth FROM `view_rec_issued` WHERE `regen_id` = 2 GROUP BY YEAR(issue_date) DESC, MONTH(issue_date) DESC ORDER BY issue_date ASC issed regen_id iYear iMonth 424 2 2011 3 4340 2 2011 4 4235 2 2011 5 10570 2 2012 2 4761 2 2012 3 5000 2 2012 4 3700 2 2012 5 3414 2 2012 6 3700 2 2012 7 2992 2 2012 8 995 2 2012 10 ![Result from Query 1][1] //////////////////////////////++ Query 2 ++//////////////////////////////////// SELECT SUM(total_redem) AS redemed, regen_id, YEAR(redemption_date) AS rYear, MONTH(redemption_date) AS rMonth FROM `recredem_month_wise` WHERE `regen_id` = 2 GROUP BY YEAR(redemption_date) DESC, MONTH(redemption_date) DESC order by redemption_date ASC redemed regen_id rYear rMonth 424 2 2011 3 260 2 2011 4 6523 2 2011 5 1070 2 2011 6 200 2 2011 10 500 2 2011 11 9750 2 2012 2 5000 2 2012 3 5500 2 2012 4 3803 2 2012 5 3700 2 2012 7 3000 2 2012 8 ![Result from Query 2][2] But i want it as - issed regen_id iYear iMonth redemed regen_id rYear rMonth 424 2 2011 3 424 2 2011 3 4340 2 2011 4 260 2 2011 4 4235 2 2011 5 6523 2 2011 5 NULL NULL NULL NULL 1070 2 2011 6 NULL NULL NULL NULL 200 2 2011 10 NULL NULL NULL NULL 500 2 2011 11 10570 2 2012 2 9750 2 2012 2 4761 2 2012 3 5000 2 2012 3 5000 2 2012 4 5500 2 2012 4 3700 2 2012 5 3803 2 2012 5 3414 2 2012 6 NULL NULL NULL NULL 3700 2 2012 7 3700 2 2012 7 2992 2 2012 8 3000 2 2012 8 995 2 2012 10 NULL NULL NULL NULL ![I want this output][3] In these table regen_id is unique and i need data as YEAR and MONTH, if in any table not have the records in perticular month and year it should retrieve zero or null. But in every record year and month should equal like this - iYear = rYear and iMonth = rMonth So we can merge both the fields - No need to show year and month twice iYear and rYear = year iMonth and rMonth = month Thank You Please look at this problem.

    Read the article

  • Ruby - RegEx problem or maybe another solution altogether

    - by r3nrut
    Ok the problem I'm having is that I have a block of javascript I've successfully scraped out of a websites source and now I have to sift through the js to get the specific values I'm looking for. Below is the chunk i'm needing to deal with. I need to find "flvFileName" and get all the file names listed. In this case its: trailer1,trailer2,trailer3. At first I started using regex to match the start and end tags and them match the file names and extract them to an array but the problem is that there isn't always 3 videos in the list. Could be 0, 1, 2, 3, 4 etc. So matching doesn't work. Any thoughts on a way to approach this that won't make me continue to abuse my laptop? ["", "\r\n", "\n", "\r\n function IgnoreEnter(e) {\r\n var code;\r\n if (!e) // IE\r\n {\r\n var e = window.event;\r\n }\r\n if (e.keyCode) {\r\n code = e.keyCode;\r\n }\r\n else if (e.which) // Firefox, Opera\r\n {\r\n code = e.which;\r\n }\r\n\r\n if (code == 13) {\r\n e.cancelBubble = true;\r\n e.returnValue = false;\r\n }\r\n }\r\n\r\n function ResetDefault() {\r\n __defaultFired = false;\r\n }\r\n", "", "\r\n// <![CDATA[\r\n$(doc).ready(function () { $('#VideoObject').flash({ swf: '/scinema/video.swf', height: 300, width: 480, hasVersion: 8, menu: false, wmode: 'transparent', bgcolor: '#000',flashvars: {flvFileName: 'trailer1,trailer2,trailer3', age: 'no', isForced: 'true'} }); });

    Read the article

  • TinyMCE: Looking for line count solution.

    - by Thariama
    I am looking for a plugin or code with a functionality like the "line count" or "line number" in common editors. The line number usually is shown on the left border of the editors content. Anyone got an idea how to do it with TinyMCE? Example: line number | content line number one number two 3. one line skipped (three is empty) 5. contents end

    Read the article

  • the possible solution to this design issue??

    - by Sachindra
    I need to know how to fix this issue in the designs of forms.. Getting this in firefox and this in IE... the color is not an issue.. juz need the alignment to be fixed... The code goes like this : <div class="content_form_box7_main"> <div class="content_form_box7_main1"> <input type="text" name="email" value="Comments" class="content_form_box7_inside"/> </div> </div> the style goes like : .content_form_box7_main{ float:left; color:#FFFFFF; padding:5px 0px 2px 0px; width:281px; } .content_form_box7_main1{ float:left; padding:0px 0px 0px 40px; } .content_form_box7_inside{ float:left; background-image:url(images/amcro_contact4.gif); width:206px; height:43px; background-repeat:no-repeat; border:none; background-color:#E0D1B4; vertical-align:top; } apologies if it looks complex ...

    Read the article

  • Solution for this SQL query?

    - by homeWorkBoy
    Suppose you have these tables: Table Name: Salesman Fields: S_ID(Primary Key), Name Table Name: Region_1 Fields: Reg_ID(Primary Key), S_ID(Foreign Key), sales Table Name: Region_2 Fields: Reg_ID(Primary Key), S_ID(Foreign Key), sales Table Name: Region_3 Fields: Reg_ID(Primary Key), S_ID(Foreign Key), sales Table Name: Region_4 Fields: Reg_ID(Primary Key), S_ID(Foreign Key), sales Query 1: Find out total of sales of each salesman in all the regions. Query 2: Find out total of sales of a particual salesman in all the regions. (if the first one is solved I think this will be easy. :-) )

    Read the article

  • Passing enum or object through an intent (the best solution)

    - by jax
    I have an activity that when started needs access to two different ArrayLists. Both Lists are different Objects I have created myself. Basically I need a way to pass these objects to the activity from an Intent. I can use addExtras() but this requires a Parceable compatible class. I could make my classes to be passed serializable but as I understand this slows down the program. What are my options? Can I pass an Enum? As an an aside: is there a way to pass parameters to an Activity Constructor from an Intent?

    Read the article

  • Creating a good search solution

    - by Daniel
    I have an app where users have a role,a username,faculty and so on.When I'm looking for a list of users by their role or faculty or anything they have in common I can call (among others possible) @users = User.find_by_role(params[:role]) #or @users = User.find_by_shift(params[:shift]) So it keeps the system Class.find_by_property So the question is: What if at different points users lists should be generated based on different properties.I mean: I'm passing from different links params[:role] or params[:faculty] or params[:department] to my list action in my users controller.As I see it all has to be in that action,but which parameter should the search be made by?

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >