Search Results

Search found 1675 results on 67 pages for 'basis vasis'.

Page 55/67 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • Fastest way to become a MySQL expert?

    - by Kerry
    I have been using MySQL for years, mainly on smaller projects until the last year or so. I'm not sure if it's the nature of the language or my lack of real tutorials that gives me the feeling of being unsure if what I'm writing is the proper way for optimization purposes and scaling purposes. While self-taught in PHP I'm very sure of myself and the code I write, easily can compare it to others and so on. With MySQL, I'm not sure whether (and in what cases) an INNER JOIN or LEFT JOIN should be used, nor am I aware of the large amount of functionality that it has. While I've written code for databases that handled tens of millions of records, I don't know if it's optimum. I often find that a small tweak will make a query take less than 1/10 of the original time... but how do I know that my current query isn't also slow? I would like to become completely confident in this field in the ability to optimize databases and be scalable. Use is not a problem -- I use it on a daily basis in a number of different ways. So, the question is, what's the path? Reading a book? Website/tutorials? Recommendations?

    Read the article

  • If I use Unicode on a ISO-8859-1 site, how will that be interpreted by a browser?

    - by grg-n-sox
    So I got a site that uses ISO-8859-1 encoding and I can't change that. I want to be sure that the content I enter into the web app on the site gets parsed correctly. The parser works on a character by character basis. I also cannot change the parser, I am just writing files for it to handle. The content in my file I am telling the app to display after parsing contains Unicode characters (or at least I assume so, even if they were produced by Windows Alt Codes mapped to CP437). Using entities is not an option due to the character by character operation of the parser. The only characters that the parser escapes upon output are markup sensitive ones like ampersand, less than, and greater than symbols. I would just go ahead and put this through to see what it looks like, but output can only be seen on a publishing, which has to spend a couple days getting approved and such, and that would be asking too much for just a test case. So, long story short, if I told a site to output ?ÇÑ¥?? on a site with a meta tag stating it is supposed to use ISO-8859-1, will a browser auto-detect the Unicode and display it or will it literally translate it as ISO-8859-1 and get a different set of characters?

    Read the article

  • Druapl & Regular PHP Integration

    - by user333128
    I'm building a new website which has one core application and many content pages. Content pages are mostly dynamic and I require a way to manage this dynamic content on a regular basis. The core application's main functionality is a 3 step process or reading user data (input page), reading data from MySQL (product page) and submitting an application to an email address (application page). Ideally I would like to build the core application in regular PHP and leverage Drupal for its content management capabilities. Can Drupal and regular PHP be integrated as I suggest easily? My feeling is that coding the core application as a Drupal module(s) will add layers of complexity that could be difficult to code from the outset and maintain later on as the system matures - so I would really like to just use regular PHP. Let me explain where dynamic content (managed by the CMS) intersects with the core application: Dynamic content such as FAQ data is used both on the 'normal' help pages and also within a mini-feed displayed within core application pages down a right hand side column. In this column, 3 random questions are pulled from the database and displayed as a feed. When users click on FAQ question they are not taken away from the core application product page but are instead shown data in a pop-up window displaying the question and answer. In addition, users can browse other questions and answers through a simple navigation menu within this popup. There are 3 such like feeds as I describe above that I require on the core application product page. So, what is the ideal solution here in terms of 'keeping things simple' for both the management of dynamic content and the ease of coding the core application? Can 'regular PHP' and Drupal co-exist 'peacefully'? If so, how is this technically possible? Because there is some content managed by Drupal contained within core application pages, can the core application still be coded in regular PHP? Any advice / suggestions? Thank you! Jim.

    Read the article

  • How to paginate json data?

    - by Pandiya Chendur
    I used json data and iterated div elements to get my result.... function Iteratejsondata(HfJsonValue) { //var jsonObj = eval('(' + HfJsonValue + ')'); var jsonObj = JSON.parse(HfJsonValue); for (var i = jsonObj.Table.length - 1; i >= 0; i--) { var employee = jsonObj.Table[i]; $('<div class="resultsdiv"><br /><span class="resultName">' + employee.Emp_Name + '</span><span class="resultfields" style="padding-left:100px;">Category&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" class="resultfields">Salary Basis&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.SalaryBasis + '</span><span class="resultfields" style="padding-left:25px;">Salary&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.FixedSalary + '</span><span style="font-size:110%;font-weight:bolder;padding-left:25px;">Address&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Address + '</span></div>').insertAfter('#ResultsDiv'); } $(".resultsdiv:even").addClass("resultseven"); $(".resultsdiv").hover(function() { $(this).addClass("resultshover"); }, function() { $(this).removeClass("resultshover"); }); } I get 22 records in total... Now i want to paginate these divs (i.e) 5 divs per page... Any suggestion...

    Read the article

  • How to do an additional search on archive in rails if record not found, by extending model?

    - by Nick Gorbikoff
    Hello, I was wondering if somebody knows an elegant solution to the following: Suppose I have a table that holds orders, with a bunch of data. So I'm at 1M records, and searches begin to take time. So I want to speed it up by archiving some data that is more than 3 years old - saving it into a table called orders-archive, and then purging them from the orders table. So if we need to research something or customer wants to pull older information - they still can, but 99% of the lookups are done on the orders no older than a year and a half - so there is no reason to keep looking through older data all the time. These move & purge operations can be then croned to be done on a weekly basis. I already did some tests and I know that I will slash my search times by about 4 times. So far so good, right? However I was thinking about how to implement older archival lookups and the only reasonable thing I can think of is some sort of if-else If not found in orders, do a search in orders-archive. However - I have about 20 tables that I want to archive and god knows how many searches / finds are done through out the code, that I don't want to modify. So I was wondering if there is an elegant rails-way solution to this problem, by extending a model somehow? Has anyone dealt with similar case before? Thank you.

    Read the article

  • using spring, hibernate and scala, is there a better way to load test data than dbunit?

    - by egervari
    Here are some things I really dislike about dbunit: 1) You cannot specify the exact ordering the inserts because dbunit likes to group your inserts by table name, and not by the order you define them in the XML file. This is a problem when you have records depending on other records in other tables, so you have to disable foreign key constraints during your tests... which actually sucks because these foreign key constraints will get fired in production while your tests won't be aware of them! 2) They seem hellbent on forcing you to use an xml namespace to define your xml... and I honestly can't be bothered to do this. I like the data.xml without any namespace. It works. But they are so hellbent on deprecating it. 3) Creating different xml files is hard on a per test basis, so it actually encourages creating data for your entire app. Unfortunately, this process is a little bloated too once the data grows in size and things get inter tangled. There has got to be a better way to split up your test data into chunks without having to copy/paste a lot of the test data across all of your tests. 4) Keeping track of id references in a big xml file is just impossible. If you have 130 domain classes, it just gets bewildering. This model simply does not scale. Is there something less bloated and better in the Spring/Hibernate space? db unit has worn out its welcome and I'm really looking for something better.

    Read the article

  • Export large amount of data from Oracle 10G to SQL Server 2005

    - by uniball
    Dear all, I need to export 100 million data rows (avg row length ~ 100 bytes) from Oracle 10G database table into SQL server (over WAN/VLAN with 6MBits/sec capacity) on a regular basis. So far, these are the options that I have tried and a quick summary. Has anyone tried this before? Are there other better options? Which option would be the best in terms of performance and reliability? The time taken has been calculated using tests on smaller amounts of data and then extrapolating it to estimate the time required. Using data import wizard on the SQL server or SSIS packages to import the data. It will take around 150 hours to complete the task. Using Oracle batch job to spool data into a comma-delimited flat-file. Then using SSIS package to FTP this file to the SQL server and then load directly from the flat-file. The issue here is the size of the flat-file which is expected to run in GBs. Although this option is drastically different, I am even considering the option of using Linked Server to query the Oracle data directly at run-time to avoid bringing in data. Performance is a big problem and I have limited control over the Oracle database in terms of creating table indexes. Regards, Uniball

    Read the article

  • Insert text depending on time of day and day of week.

    - by ploughansen
    I'm trying to piece together a php script to output different text depending on what day it is and the time of day. Example: On weekdays (mon-fri), I would like to output text according to the following periods of time (24H, server time, UTC): 00:00-08:00: "Lorem ipsum" 08:00-13:00: "dolor sit amet" 13:00-15:00: "Pellentesque habitant" 15:00-15:30: "dolor sit amet" 15:30-24:00: "Lorem ipsum" On weekends (sat-sun), I would like to output the following text in this time period: 00:00-24:00 "Lorem ipsum" Can anyone help with a php script to do that? I've already gotten some help over at the css-tricks forum. They supplied this code: <?php $date = strtotime("now"); $hour = date("H", $date); switch($hour) { case 00: case 01: case 02: case 03: case 04: case 05: case 06: case 07: case 08: $dets = array("img" => "image1.png", "txt" => "Lorem ipsum"); break; case 09: case 10: case 11: case 12: case 13: $dets = array("img" => "image2.png", "txt" => "dolor sit amet"); break; case 14: case 15: case 16: $dets = array("img" => "image3.png", "txt" => "Pellentesque habitant"); break; case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: $dets = array("img" => "image1.png", "txt" => "Lorem ipsum"); break; } echo "<img src='$dets[img]' alt='$dets[txt]' />"; ?> But it works for all days, and only in full hours. I want to be able to specify per half-hour and on a day to day basis. Still a php-noob so I'm hoping someone can help me.

    Read the article

  • Scalable Full Text Search With Per User Result Ordering

    - by jeremy
    What options exist for creating a scalable, full text search with results that need to be sorted on a per user basis? This is for PHP/MySQL (Symfony/Doctrine as well, if relevant). In our case, we have a database of workouts that have been performed by users. The workouts that the user has done before should appear at the top of the results. The more frequently they've done the workout, the higher it should appear in search matches. If it helps, you can assume we know the number of times a user has done a workout in advance. Possible Solutions Sphinx - Use Sphinx to implement full text search, do all the querying and sorting in MySQL. This seems promising (and there's a Symfony Plugin!) but I don't know much about it. Lucene - Use Lucene to perform full text search and put the users' completions into the query. As is suggested in this Stack Overflow thread. Alternatively, use Lucene to retrieve the results, then reorder them in PHP. However, both solutions seem clunky and potentially unscalable as a user may have completed hundreds of workouts. Mysql - No native full text support (InnoDB), so we'd have use LIKE or REGEX, which isn't scalable.

    Read the article

  • Classical task-scheduling assignment

    - by Bruno
    I am working on a flight scheduling app (disclaimer: it's for a college project, so no code answers, please). Please read this question w/ a quantum of attention before answering as it has a lot of peculiarities :( First, some terminology issues: You have planes and flights, and you have to pair them up. For simplicity's sake, we'll assume that a plane is free as soon as the flight using it prior lands. Flights are seen as tasks: They have a duration They have dependencies They have an expected date/time for beginning Planes can be seen as resources to be used by tasks (or flights, in our terminology). Flights have a specific type of plane needed. e.g. flight 200 needs a plane of type B. Planes obviously are of one and only one specific type, e.g., Plane Airforce One is of type C. A "project" is the set of all the flights by an airline in a given time period. The functionality required is: Finding the shortest possible duration for a said project The earliest and latest possible start for a task (flight) The critical tasks, with basis on provided data, complete with identifiers of preceding tasks. Automatically pair up flights and planes, so as to get all flights paired up with a plane. (Note: the duration of flights is fixed) Get a Gantt diagram with the projects scheduling, in which all flights begin as early as possible, showing all previously referred data graphically (dependencies, time info, etc.) So the questions is: How in the world do I achieve this? Particularly: We are required to use a graph. What do the graph's edges and nodes respectively symbolise? Are we required to discard tasks to achieve the critical tasks set? If you could also recommend some algorithms for us to look up, that'd be great.

    Read the article

  • Error in merging two sequences of timestamps to yield strings

    - by AruniRC
    The code sorts two input sequences - seq01 and seq02 - on the basis of their timestamp values and returns a sequence that denotes which sequence is to be read for the values to be in order. For cases where seq02's timestamp value is lesser than seq01's timestamp value we yield a "2" to the sequence being returned, else a "1". These denote whether at that point seq01 is to be taken or seq02 is to be taken for the data to be in order (by timestamp value). let mergeSeq (seq01:seq<_>) (seq02:seq<_>) = seq { use iter01 = seq01.GetEnumerator() use iter02 = seq02.GetEnumerator() while iter01.MoveNext() do let _,_,time01 = iter01.Current let _,_,time02 = iter02.Current while time02 < time01 && iter02.MoveNext() do yield "2" yield "1" } To test it in the FSI created two sequences a and b, a={1;3;5;...} and b={0;2;4;...}. So the expected values for let c = mergeSeq a b would have been {"2","1","2","1"...}. However I am getting this error: error FS0001: The type ''a * 'b * 'c' does not match the type 'int' EDIT After correcting: let mergeSeq (seq01:seq<_>) (seq02:seq<_>) = seq { use iter01 = seq01.GetEnumerator() use iter02 = seq02.GetEnumerator() while iter01.MoveNext() do let time01 = iter01.Current let time02 = iter02.Current while time02 < time01 && iter02.MoveNext() do yield "2" yield "1" } After running this, there's another error: call MoveNext. Somehow the iteration is not being performed.

    Read the article

  • How to work with CTE. There is some error related to anchor.

    - by Shantanu Gupta
    I am creating a hierarchy representaion of a column. But an error occurs Details are Msg 240, Level 16, State 1, Line 1 Types don't match between the anchor and the recursive part in column "DISPLAY" of recursive query "CTE". I know there is some typecasting error. But I dont know how to remove error. Please just dont only sort out my error. I need explanation why this error is coming. When this error occurs. I am trying to sort table on the basis of sort col that i m introducing. I want to add '-' at every level and want to sort accordingly. Please help WITH CTE (PK_CATEGORY_ID, [DESCRIPTION], FK_CATEGORY_ID, DISPLAY, SORT, DEPTH) AS ( SELECT PK_CATEGORY_ID, [DESCRIPTION], FK_CATEGORY_ID, '-' AS DISPLAY, '--' AS SORT, 0 AS DEPTH FROM dbo.L_CATEGORY_TYPE WHERE FK_CATEGORY_ID IS NULL UNION ALL SELECT T.PK_CATEGORY_ID, T.[DESCRIPTION], T.FK_CATEGORY_ID, CAST(DISPLAY+T.[DESCRIPTION] AS VARCHAR(1000)), '--' AS SORT, C.DEPTH +1 FROM dbo.L_CATEGORY_TYPE T JOIN CTE C ON C.PK_CATEGORY_ID = T.FK_CATEGORY_ID --SELECT T.PK_CATEGORY_ID, C.SORT+T.[DESCRIPTION], T.FK_CATEGORY_ID --, CAST('--' + C.SORT AS VARCHAR(1000)) AS SORT, CAST(DEPTH +1 AS INT) AS DEPTH --FROM dbo.L_CATEGORY_TYPE T JOIN CTE C ON C.FK_CATEGORY_ID = T.PK_CATEGORY_ID ) SELECT PK_CATEGORY_ID, [DESCRIPTION], FK_CATEGORY_ID, DISPLAY, SORT, DEPTH FROM CTE ORDER BY SORT

    Read the article

  • Update Options on Existing jQuery Object

    - by Vince Kronlein
    I'm using Bootstrap and DataTables in my app and I have a default initializer for tables based on class. I can just add the class data-table to the table and it gets instantiated with the default values I want. I'd like to know how to change or update specific options based on a specific table. if ($.fn.dataTable) { $('.data-table').dataTable( { sDom: "R<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>", sPaginationType: "bootstrap", oLanguage: { "sLengthMenu": "_MENU_ &nbsp; records per page" }, aoColumnDefs: [ { "bSortable": false, "aTargets": [ 0 ] } ] }); } All my data tables have a checkbox in the first column so the above removal of sorting works for all of them. But I'd like to be able to update the aoColumnDefs on a table by table basis so I can add other columns that I don't want sorted. So let's say I have a table: $('#member-list'), how do I access this object and update it's datatables options in jQuery? I can't find any reference or help anywhere. Thanks a lot! -V

    Read the article

  • Quantifying the amount of change in a git diff?

    - by Alex Feinman
    I use git for a slightly unusual purpose--it stores my text as I write fiction. (I know, I know...geeky.) I am trying to keep track of productivity, and want to measure the degree of difference between subsequent commits. The writer's proxy for "work" is "words written", at least during the creation stage. I can't use straight word count as it ignores editing and compression, both vital parts of writing. I think I want to track: (words added)+(words removed) which will double-count (words changed), but I'm okay with that. It'd be great to type some magic incantation and have git report this distance metric for any two revisions. However, git diffs are patches, which show entire lines even if you've only twiddled one character on the line; I don't want that, especially since my 'lines' are paragraphs. Ideally I'd even be able to specify what I mean by "word" (though \W+ would probably be acceptable). Is there a flag to git-diff to give diffs on a word-by-word basis? Alternately, is there a solution using standard command-line tools to compute the metric above?

    Read the article

  • Best Practice: Protecting Personally Identifiable Data in a ASP.NET / SQL Server 2008 Environment

    - by William
    Thanks to a SQL injection vulnerability found last week, some of my recommendations are being investigated at work. We recently re-did an application which stores personally identifiable information whose disclosure could lead to identity theft. While we read some of the data on a regular basis, the restricted data we only need a couple of times a year and then only two employees need it. I've read up on SQL Server 2008's encryption function, but I'm not convinced that's the route I want to go. My problem ultimately boils down to the fact that we're either using symmetric keys or assymetric keys encrypted by a symmetric key. Thus it seems like a SQL injection attack could lead to a data leak. I realize permissions should prevent that, permissions should also prevent the leaking in the first place. It seems to me the better method would be to asymmetrically encrypt the data in the web application. Then store the private key offline and have a fat client that they can run the few times a year they need to access the restricted data so the data could be decrypted on the client. This way, if the server get compromised, we don't leak old data although depending on what they do we may leak future data. I think the big disadvantage is this would require re-writing the web application and creating a new fat application (to pull the restricted data). Due to the recent problem, I can probably get the time allocated, so now would be the proper time to make the recommendation. Do you have a better suggestion? Which method would you recommend? More importantly why?

    Read the article

  • Can TFS workspaces be used without being tied to a specific machine?

    - by GWLlosa
    So I've got a situation where we have a project with 10 developers. Each developer, when they come in for the day, is randomly issued a machine to use for development that day. The machine names are different, say DEV01 - DEV10. At the time that they are issued to the developers, the machines are identical, and no changes the developers make during the day are persisted on the machines (source code changes are stored in TFS, not locally). These are of course actually virtual machines, but that's not really relevant to the point at hand. The problem is that each morning, the developers run into 3 issues: 1) The machine that they are assigned may not be the same machine they were last assigned to. For example, DevMan A might have used DEV04 yesterday, and received DEV06 today. His workspace definitions are now tied to DEV06; he must create a new workspace, or migrate the old workspace to DEV04. 2) The machine that they are assigned may have been in use yesterday, and some of the mappings may conflict. For example, DevMan A might have DEV04 today, and wish to create a workspace mapping the project folder to "C:\MyProj\Solution". However, DevMan B had DEV04 yesterday, and he used the same project folder. TFS now complains. 3) This may be the first time they are on a given machine. They now need to recreate for this machine all of their source-control mappings for the new machine. All of these issues can be resolved in a straightforward fashion on a case-by-case basis, but it does sap some productivity from the morning. We'd much prefer if the TFS workspace definitions could be 'relaxed', such that they did not include the machine name in the definition somehow. Barring that, if anyone is aware of a solution to the above problems that can run automatically, or with limited user intervention, that would also be ideal.

    Read the article

  • How to send data from an opened window back to its opener in WPF.

    - by TravisPUK
    In WPF I have one window opening a second window that allows some data selections to occur on. Once the selections have been made I then want to submit/close the second/sub window and have the data pushed back to the opening/parent window. I can push data into the sub window from the parent via public properties, but have not worked out how to get it back the other way. Can anyone help please? The code I am using to open the window and set some properties is has follows: Dim wdwContacts As New appContacts() wdwContacts.selClientID = selClientID wdwContacts.selEmailToCCType = selEmailToCCType wdwContacts.pullToAddresses = txEmailTo.Text wdwContacts.pullCCAddresses = txEmailCC.Text wdwContacts.Owner = Me wdwContacts.WindowStartupLocation = Windows.WindowStartupLocation.CenterOwner wdwContacts.Show() The basis is that I have the first window as an email composition page that has a button that when clicked brings up a list of email contacts. It brings through any previously selected email addresses from the first window and auto selects them on the sub window/email list. If further selections are made on the email list, when the op clicks the done/submit/close button it pushes the new selection list back into the relevant TextBox on the first/parent window. Thanks

    Read the article

  • odd behavior with C# ftp client class

    - by geoff
    I found an ftp client class in c# over a year ago and have been using it in a process that uploads files on a nightly basis. A few days ago we started having a problem where it would time out. I'm not well versed in this so I'm not sure why it's doing this. When the program starts uploading a file it checks to see if it's logged in and if not, it calls the login method. In that method is this block of code. if (this.resultCode != 230) { this.sendCommand("PASS " + password); if (!(this.resultCode == 230 || this.resultCode == 202)) { this.cleanup(); throw new FtpException(this.result.Substring(4)); } } On the line that says this.sendCommand("PASS"... it goes into this code. private void sendCommand(String command) { if (this.verboseDebugging) Debug.WriteLine(command, "FtpClient"); Byte[] cmdBytes = Encoding.ASCII.GetBytes((command + "\r\n").ToCharArray()); clientSocket.Send(cmdBytes, cmdBytes.Length, 0); this.readResponse(); } If I let the program run, it times out. However if I step through it into the sendCommand method it executes fine. Does anyone know why it would work fine when I step through it? Nothing on our end has changed and I've been told nothing on the client's end has changed so I'm stumped. Thanks.

    Read the article

  • VBA does not run Powerpoint

    - by user1557188
    This is very frustrating, first lines of programming Powerpoint VBA after a long while .... Please help this is killing me Writing a small sub connecting to an action using name test Sub test() MSGBOX "this is a test " end sub I placed this in a module I just created and it works I copy the same test in named as a module and it does not work any more .... I'm trying to make PPT connect to events to do things on a per slide basis ..... using google.... this worked a few times ... but now nothing works any more. The simple test above fails since I renamed the module. As I further change the second routine to test1() ipv test None of the macros can be executed any more (module1 NOT CHNANGED) Module NAME..... contains the same code, except test1() ipv test. ... now all macro processing stops the color of text changes (as is clicked on it) but nothing gets obviously executed. Are things that unstable recenty in VBA for powerpoint 2010 how did I run: connect to empty slide using 3 lines test 1 test 2 test 3 on each of the lines I defined an action for each in different modules run: Go into slide show and on the first slide just click.... color changes but nothing happens any more Saved all closed restarted .... simply refuses except on first created pptm

    Read the article

  • what use does the javascript for each method have (that map can't do)?

    - by JohnMerlino
    Hey all, The only difference I see in map and foreach is that map is returning an array and foreach is not. However, I don't even understand the last line of the foreach method "func.call(scope, this[i], i, this);". For example, isn't "this" and "scope" referring to same object and isn't this[i] and i referring to the current value in the loop? I noticed on another post someone said "Use forEach when you want to do something on the basis of each element of the list. You might be adding things to the page, for example. Essentially, it's great for when you want "side effects". I don't know what is meant by side effects. Array.prototype.map = function(fnc) { var a = new Array(this.length); for (var i = 0; i < this.length; i++) { a[i] = fnc(this[i]); } return a; } Array.prototype.forEach = function(func, scope) { scope = scope || this; for (var i = 0, l = this.length; i < l; i++) func.call(scope, this[i], i, this); } Finally, are there any real uses for these methods in javascript (since we aren't updating a database) other than to manipulate numbers like this: alert([1,2,3,4].map(function(x){ return x + 1})); //this is the only example I ever see of map in javascript. Thanks for any reply.

    Read the article

  • Turning a series of raw images into movie frames in Android

    - by Nicholas Killewald
    I've got an Android project I'm working on that, ultimately, will require me to create a movie file out of a series of still images taken with a phone's camera. That is to say, I want to be able to take raw image frames and string them together, one by one, into a movie. Audio is not a concern at this stage. Looking over the Android API, it looks like there are calls in it to create movie files, but it seems those are entirely geared around making a live recording from the camera on an immediate basis. While nice, I can't use that for my purposes, as I need to put annotations and other post-production things on the images as they come in before they get fed into a movie (plus, the images come way too slowly to do a live recording). Worse, looking over the Android source, it looks like a non-trivial task to rewire that to do what I want it to do (at least without touching the NDK). Is there any way I can use the API to do something like this? Or alternatively, what would be the best way to go about this, if it's even feasible on cell phone hardware (which seems to keep getting more and more powerful, strangely...)?

    Read the article

  • How to get a debug flow of execution in C++

    - by Rich
    Hi, I work on a global trading system which supports many users. Each user can book,amend,edit,delete trades. The system is regulated by a central deal capture service. The deal capture service informs all the user of any updates that occur. The problem comes when we have crashes, as the production environment is impossible to re-create on a test system, I have to rely on crash dumps and log files. However this doesn't tell me what the user has been doing. I'd like a system that would (at the time of crashing) dump out a history of what the user has been doing. Anything that I add has to go into the live environment so it can't impact performance too much. Ideas wise I was thinking of a MACRO at the top of each function which acted like a stack trace (only I could supply additional user information, like trade id's, user dialog choices, etc ..) The system would record stack traces (on a per thread basis) and keep a history in a cyclic buffer (varying in size, depending on how much history you wanted to capture). Then on crash, I could dump this history stack. I'd really like to hear if anyone has a better solution, or if anyone knows of an existing framework? Thanks Rich

    Read the article

  • Suggestions for opening the Rails toolbox to design a challenge game?

    - by keruilin
    How would you suggest designing a challenge system as part of a food-eating game so that it's automated as possible? All RoR tools, design patterns and logic are at your disposal (e.g., admin consoles, crontab, arch, etc.). Prize goes to whoever can suggest the simplest and most-automated design! Here are the requirements: User has many challenges. Badge has many challenges. (A unique badge is awarded for each challenge won.) Only one challenge can run at a time. Each challenge has a limited number of days that it runs. For example, one challenge can run 3 days, while another runs 7 days. Challenges can be seasonal. For example, "Eat 13 Pumpkins" only runs during the Fall. New challenges are added to the game on an ongoing basis. For example, a new challenge every week. Each challenge has a certain probability of being selected to run. For example, "Eat 10 Pies" challenge has 10% chance of being selected to run. As each new challenge is added to the database, I want the probabilities of running to change dynamically. I want to avoid the scenario where I'm manually updating a database field just to change the probability from 10% to 5%, for example. Challenges act like Easter eggs. Challenge icons pop-up at different places on the webpage. User is awarded a badge for successfully completing a challenge, but only when it's active. There is some wait time between each challenge. Between 1 and 7 days. Which wait time is random, but the probability of the wait time being short is high and the probability of it being a long wait time is low.

    Read the article

  • Tell bots apart from human visitors for stats?

    - by Pekka
    I am looking to roll my own simple web stats script. The only major obstacle on the road, as far as I can see, is telling human visitors apart from bots. I would like to have a solution for that which I don't need to maintain on a regular basis (i.e. I don't want to update text files with bot-related User-agents). Is there any open service that does that, like Akismet does for spam? Or is there a PHP project that is dedicated to recognizing spiders and bots and provides frequent updates? To clarify: I'm not looking to block bots. I do not need 100% watertight results. I just want to exclude as many as I can from my stats. In know that parsing the user-Agent is an option but maintaining the patterns to parse for is a lot of work. My question is whether there is any project or service that does that already. Bounty: I thought I'd push this as a reference question on the topic. The best / most original / most technically viable contribution will receive the bounty amount.

    Read the article

  • How make this jquery function reusable?

    - by Pandiya Chendur
    Comsider this jquery function, function showresults(jsonobj) { $.each(jsonobj, function(i, employee) { divs += '<div class="resultsdiv"><br /><span style="display: inline-block;width:150px;" class="resultName">' + employee.Emp_Name + '</span><span class="resultfields" style="padding-left:100px;">Category&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" class="resultfields">Salary Basis&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.SalaryBasis + '</span><span class="resultfields" style="padding-left:25px;">Salary&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.FixedSalary + '</span><span style="font-size:110%;font-weight:bolder;padding-left:25px;">Address&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Address + '</span></div>'; }); } Here i am iterating my json data and drawing div elements.... As you see these div elements are hardcoded how to pass these html div elements dynamically by a variable... var divs=<div></div> function showresults(jsonobj,divs) { $.each(jsonobj, function(i, employee) { divs += divs Is this correct way of doing but there will be an error employee object wont be there know when my divs variable declared outside the function... Any suggestion...

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >