Daily Archives

Articles indexed Friday September 14 2012

Page 1/11 | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • Ten Things I Wish I’d Known When I Started Using tSQLt and SQL Test

    The open-source Unit Test framework tSQLt is a great way of writing unit tests in the same language as the one being tested. In retrospect, after using tSQLt for a while, what are the 'gotchas'; those things that you'd have been better off knowing about before you get started? David Green lists a few tips he wished he'd read beforehand. Learn Agile Database Development Best PracticesAgile database development experts Sebastian Meine and Dennis Lloyd are running day-long classes designed to complement Red Gate’s SQL in the City US tour. Classes will be held in San Francisco, Chicago, Boston and Seattle. Register Now.

    Read the article

  • Monitoring the Application alongside SQL Server

    - by Tony Davis
    Sometimes, on Simple-Talk, it takes a while to spot strange and unexpected patterns of user activity, or small bugs. For example, one morning we spotted that an article’s comment count had leapt to 1485, but that only four were displayed. With some rooting around in Google Analytics, and the endlessly annoying Community Server admin-interface, we were able to work out that a few days previously the article had been subject to a spam attack and that the comment count was for some reason including both accepted and unaccepted comments (which in turn uncovered a bug in the SQL). This sort of incident made us a lot keener on monitoring Simple-talk website usage more effectively. However, the metrics we wanted are troublesome, because they are far too specific for Google Analytics to measure, and the SQL Server backend doesn’t keep sufficient information to enable us to plot trends. The latter could provide, for example, the total number of comments made on, or votes cast for, articles, over all time, but not the number that occur by hour over a set time. We lacked a baseline, in other words. We couldn’t alter the database, as it is a bought-in package. We had neither the resources nor inclination to build-in dedicated application monitoring. Possibly, we could investigate a third-party tool to do the job; but then it occurred to us that we were already using a monitoring tool (SQL Monitor) to keep an eye on the database. It stored data, made graphs and sent alerts. Could we get it to monitor some aspects of the application as well? Of course, SQL Monitor’s single purpose is to check and monitor SQL Server, over time, rather than to monitor applications that use SQL Server. However, how different is the business of gathering and plotting SQL Server Wait Stats, from gathering and plotting various aspects of user activity on the site? Not a lot, it turns out. The latest version allows us to write our own custom monitoring scripts, meaning that we could now monitor any metric in the application that returns an integer. It took little time to write a simple SQL Query that collects basic metrics of the total number of subscribers, votes cast, comments made, or views of articles, over time. The SQL Monitor database polls Simple-Talk every second or so in order to get the latest totals, and can then store and plot this information, or even correlate SQL Server usage to application usage. You can see the live data by visiting monitor.red-gate.com. Click the "Analysis" tab, and select one of the "Simple-talk:" entries in the "Show" box and an appropriate data range (e.g. last 30 days). It’s nascent, and we’re still working on it, but it’s already given us more confidence that we’ll spot quickly trends, bugs, or bursts of ‘abnormal’ activity. If there is a sudden rise in comments, we get an alert, and if it’s due to a spam attack, we can moderate or ban the perpetrator very quickly. We’ve often argued that a tool should perform a single job well rather than turn into a Swiss-army knife, but ironically we’ve rather appreciated being able to make best use of what’s there anyway for a slightly different purpose. Is this a good or common practice? What do you think? Cheers, Tony.

    Read the article

  • Replacing “if”s with your own number system

    - by Michael Williamson
    During our second code retreat at Red Gate, the restriction for one of the sessions was disallowing the use of if statements. That includes other constructs that have the same effect, such as switch statements or loops that will only be executed zero or one times. The idea is to encourage use of polymorphism instead, and see just how far it can be used to get rid of “if”s. The main place where people struggled to get rid of numbers from their implementation of Conway’s Game of Life was the piece of code that decides whether a cell is live or dead in the next generation. For instance, for a cell that’s currently live, the code might look something like this: if (numberOfNeighbours == 2 || numberOfNeighbours == 3) { return CellState.LIVE; } else { return CellState.DEAD; } The problem is that we need to change behaviour depending on the number of neighbours each cell has, but polymorphism only allows us to switch behaviour based on the type of a value. It follows that the solution is to make different numbers have different types: public interface IConwayNumber { IConwayNumber Increment(); CellState LiveCellNextGeneration(); } public class Zero : IConwayNumber { public IConwayNumber Increment() { return new One(); } public CellState LiveCellNextGeneration() { return CellState.DEAD; } } public class One : IConwayNumber { public IConwayNumber Increment() { return new Two(); } public CellState LiveCellNextGeneration() { return CellState.LIVE; } } public class Two : IConwayNumber { public IConwayNumber Increment() { return new ThreeOrMore(); } public CellState LiveCellNextGeneration() { return CellState.LIVE; } } public class ThreeOrMore : IConwayNumber { public IConwayNumber Increment() { return this; } public CellState LiveCellNextGeneration() { return CellState.DEAD; } } In the code that counts the number of neighbours, we use our new number system by starting with Zero and incrementing when we find a neighbour. To choose the next state of the cell, rather than inspecting the number of neighbours, we ask the number of neighbours for the next state directly: return numberOfNeighbours.LiveCellNextGeneration(); And now we have no “if”s! If C# had double-dispatch, or if we used the visitor pattern, we could move the logic for choosing the next cell out of the number classes, which might feel a bit more natural. I suspect that reimplementing the natural numbers is still going to feel about the same amount of crazy though.

    Read the article

  • Software development stack 2012

    A couple of months ago, I posted on Google+ about my evaluation period for a new software development stack in general. "Analysing existing 'jungle' of multiple applications and tools in various languages for clarification and future design decisions. Great fun and lots of headaches... #DevelopersLife" Surprisingly, there was response... ;-) - And this series of articles is initiated by this post. Thanks Olaf. The past few years... Well, after all my first choice of software development in the past was Microsoft Visual FoxPro 6.0 - 9.0 in combination with Microsoft SQL Server 2000 - 2008 and Crystal Reports 9.x - XI. Honestly, it is my main working environment due to exisiting maintenance and support plans with my customers, but also for new project requests. And... hands on, it is still my first choice for data manipulation and migration options. But the earth is spinning, and as a software craftsman one has to be flexible with the choice of tools. In parallel to my knowledge and expertise in the above mentioned tools, I already started very early to get my hands dirty with the Microsoft .NET Framework. If I remember correctly, I started back in 2002/2003 with the first version ever. But this was more out of curiousity. During the years this kind of development got more serious and demanding, and I focused myself on interop and integrational libraries and applications. Mainly, to expose exisitng features of the .NET Framework to Visual FoxPro - I even had a session about that at the German Developer's Conference in Frankfurt. Observation of recent developments With the recent hype on Javascript and HTML5, especially for Windows 8 and Windows Phone 8 development, I had several 'Deja vu' events... Back in early 2006 (roughly) I had a conversation on the future of Web and Desktop development with my former colleagues Golo Roden and Thomas Wilting about the underestimation of Javascript and its root as a prototype-based, dynamic, full-featured programming language. During this talk with them I took the Mozilla applications, namely Firefox and Thunderbird, as a reference which are mainly based on XML, CSS, Javascript and images - besides the core rendering engine. And that it is very simple to write your own extensions for the Gecko rendering engine. Looking at the Windows Vista Sidebar widgets, just underlines this kind of usage. So, yes the 'Modern UI' of Windows 8 based on HTML5, CSS3 and Javascript didn't come as any surprise to me. Just allow me to ask why did it take so long for Microsoft to come up with this step? A new set of tools Ok, coming from web development in HTML 4, CSS and Javascript prior to Visual FoxPro, I am partly going back to that combination of technologies. What is the other part of the software development stack here at IOS Indian Ocean Software Ltd? Frankly, it is easy and straight forward to describe: Microsoft Visual FoxPro 9.0 SP 2 - still going strong! Visual Studio 2012 (C# on latest .NET Framework) MonoDevelop Telerik DevCraft Suite WPF ASP.NET MVC Windows 8 Kendo UI OpenAccess ORM Reporting JustCode CODE Framework by EPS Software MonoTouch and Mono for Android Subversion and additional tools for the daily routine: Notepad++, JustCode, SQL Compare, DiffMerge, VMware, etc. Following the principles of Clean Code Developer and the Agile Manifesto Actually, nothing special about this combination but rather a solid fundament to work with and create line of business applications for customers.Honestly, I am really interested in your choice of 'weapons' for software development, and hopefully there might be some nice conversations in the comment section. Over the next coming days/weeks I'm going to describe a little bit more in detail about the reasons for my decision. Articles will be added bit by bit here as reference, too. Please bear with me... Regards, JoKi

    Read the article

  • MySQL differences between to select queries

    - by bpmccain
    I have two mysql queries that return a column of phone numbers. I want am trying to end up with a list of phone numbers that are in one list, but not in the other. So the two queries I have are: SELECT phone FROM civicrm_phone phone LEFT JOIN civicrm_participant participant ON phone.contact_id = participant.contact_id WHERE phone.is_primary = 1 AND participant.id IS NULL and SELECT phone FROM civicrm_phone phone LEFT JOIN civicrm_participant participant ON phone.contact_id = participant.contact_id WHERE phone.is_primary = 1 AND participant.id IS NOT NULL And before anyone asks, the above two queries do not provide mutually exclusive results (based on using IS NULL and IS NOT NULL for the last WHERE statement), since we have related individuals in the database who use the same phone number, but do not necessarily all have a participant.id. Thanks for any help.

    Read the article

  • Does hibernate query result always return a list?

    - by Phoenix
    Does a query execution always have to return a list ? How do I replace the code below if I am sure it will only return a single object ? @Override public List<DocInfo> findAllByDocId(String docId) { Query q = getCurrentSession().createQuery("from DocInfo item where item.id = :docId"); q.setString("docId", docId); List<DocInfo> docInfoList = q.list(); return docInfoList; }

    Read the article

  • MonoTouch and CoreBluetooth Low Energy Required?

    - by user856232
    We are making MFi hardware and an iOS app. We will want to have the BT device notify our app even if we are not running periodically when certain events happen. I know the CoreBluetooth API is the one to use, but can't tell for sure if that API only works with BT Low Energy devices or if it will also work with regular (MFi of course) BT 2.1 and higher devices. So my question is: Does the CoreBluetooth API only work with Bluetooth Low Energy devices or will it also work with 2.1 devices?

    Read the article

  • how to organise my abstraction?

    - by DaveM
    I have a problem that I can't decide how to best handle, so I'm asking for advice. Please bear with me if my question isn't clear, it is possiblybecause I'm not sure exacly how to solve! I have a set of function that I have in a class. These function are a set of lowest commonality. To be able to run this I need to generate certain info. But this info can arrive with my class from one of 2 routes. I'll try to summarise my situation.... Lets say that I have a class as follows. public class onHoliday(){ private Object modeOfTravel; private Object location; public onHoliday(Object vehicle, Location GPScoords) { private boolean haveFun(){//function to have fun, needs 4 people }//end haveFun() } } Lets imagine I can get to my holiday either by car or by bike. my haveFun() function is dependant my type of vehicle. But only loosely. I have another function that determines my vehicle type, and extracts the required values. for example if I send a car I may get 4 people in one go, but if I send I bike I need at least 2 to get the required 4 I have currently 2 options: Overload my constructor, so as I can send either 2 bikes or a single car into it, then I can call one of 2 intermediate functions (to get the names of my 4 people for instance) before I haveFun() - this is what I am currently doing. split the 2 constructors into 2 separate classes, and repeat my haveFun() in a third class, that becomes an object of my 2 other classes. my problem with this is that my intermediate functions are all but a few lines of code, and I don't want to have them in a separate file! (I allways put classes in separate files!) Please note, my haveFun() isn't something that I'm going to need outside of these 2 classes, or even being onHoliday (ie. there is no chance of me doing some haveFun() over a weekend or of an evening!). I have though about putting haveFun() into an interface, but it seems a bit worthless having an interface with only a single method! Even then I would have to have the method in both of the classes -one for bike and another for car! I have thought about having my onHoliday class accepting any object type, but then I don't want someone accidentally sending in a boat to my onHoliday class (imagine I can't swim, so its not about to happen). It may be important to note that my onHoliday class is package private, and final. It in fact is only accessed via other 'private methods' in other classes, and has only private methods itself. Thanks in advance. David

    Read the article

  • Status of Data in Rollback of Large Transaction in SQL Server

    - by Lloyd Banks
    I have a data warehousing procedure that downloads and replaces dozens of tables from a linked server to a local database. Every once in a while, the code will get stuck on one of the tables on the linked server because the table on the linked server is in a state of transition. I am under the assumption that since the entire procedure is considered one transaction commit, when the procedure gets stuck, none of the changes made by the procudure so far would have committed. But the opposite seems to be true, tables that were "downloaded" before the procedure got stuck would have been updated with today's versions on the local server. Shouldn't SQL Server wait for the entire procedure to finish before the changes are durable? CREATE PROCEDURE MYIMPORT AS BEGIN SET NOCOUNT ON IF EXISTS (SELECT * FROM INFORMATION.SCHEMA.TABLES WHERE TABLE_NAME = 'TABLE1') DROP TABLE TABLE1 SELECT COLUMN1, COLUMN2, COLUMN3 INTO TABLE1 FROM OPENQUERY(MYLINK, 'SELECT COLUMN1, COLUMN2, COLUMN3 FROM TABLE1') IF EXISTS (SELECT * FROM INFORMATION.SCHEMA.TABLES WHERE TABLE_NAME = 'TABLE2') DROP TABLE TABLE2 SELECT COLUMN1, COLUMN2, COLUMN3 INTO TABLE2 FROM OPENQUERY(MYLINK, 'SELECT COLUMN1, COLUMN2, COLUMN3 FROM TABLE2') --IF THE PROCEDURE GETS STUCK HERE, THEN CHANGES TO TABLE1 WOULD HAVE BEEN MADE ON THE LOCAL SERVER WHILE NO CHANGES WOULD HAVE BEEN MADE TO TABLE3 ON THE LOCAL SERVER IF EXISTS (SELECT * FROM INFORMATION.SCHEMA.TABLES WHERE TABLE_NAME = 'TABLE3') DROP TABLE TABLE3 SELECT COLUMN1, COLUMN2, COLUMN3 INTO TABLE3 FROM OPENQUERY(MYLINK, 'SELECT COLUMN1, COLUMN2, COLUMN3 FROM TABLE3') END

    Read the article

  • Making a switch statement in C with an array?

    - by Eric
    I am trying to make a switch statement that takes in a word into an array and then throws each letter through a switch statement and allocates a point to each letter depending on which letter it is and giving a final point value for the word, and I can't seem to get the array part right. Any help would be appreciated! int main(){ int letter_points = 0; char word[7]; int word_length = 7; int i; printf("Enter a Word\n"); scanf("%s", word); for(i = 0; i < word_length; i++){ switch(word){ //1 point case 'A': case 'E': case 'I': case 'L': case 'N': case 'O': case 'R': case 'S': case 'T': case 'U': letter_points++; break; //2 points case 'D': case 'G': letter_points += 2; break; //3 points case 'B': case 'C': case 'M': case 'P': letter_points += 3; break; //4 points case 'F': case 'H': case 'V': case 'W': case 'Y': letter_points += 4; break; //5 points case 'K': letter_points += 5; break; //8 points case 'J': case 'X': letter_points += 8; break; //10 points case 'Q': case 'Z': letter_points += 10; break; } } printf("%d\n", letter_points); return; }

    Read the article

  • assembler - understanding of some lines

    - by user1571682
    with the help of some tutorials, i wrote a little piece of code, to display me a string, after booting from my floppy. my problem is now, that dont understand some lines, were i hope u can help me, or just tell me, if im right. code: mov ax, 07C0h add ax, 288 ; (512 + 4096) / 16 = 288 mov ss, ax mov sp, 4096 mov ax, 07C0h mov ds, ax line: start the program @ the adress 07C0h (could i change this?) Add space for 288 paragraphs to ax ? Space of 4096 bytes for my program (to store variables and stuff?) Go to the start adress ? thanks for your help.

    Read the article

  • How to combine a relative top with an absolute bottom in CSS?

    - by ceving
    I need to define a div which must stay with the top at the normal position, which differs from the top of the surrounding element: position:relative top:0 and which grows in the height up to the size of the surrounding element: position:absolute bottom:0 I have no idea how to combine the both. Whenever I use a relative box I loose the absolute bottom and whenever I use an absolute box I loose the relative top. Can anybody help me how to do this in CSS? Here is an example: <html> <head> </head> <style type="text/css"> @media screen { body { position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: 0; padding: 0; } #head { background-color: gray; } #rel { background-color: green; position: relative; top: 0; bottom: 0; float: left; } #abs { background-color: red; position: absolute; top: 0; bottom: 0; float: left; } } </style> <body> <div id="head"> <h1>Head</h1> </div> <div id="abs"> <h2>absolute</h2> </div> <div id="rel"> <h2>relative</h2> </div> </body> </html> "relative" does not grow at all and "absolute" grows too much.

    Read the article

  • Creating Dynamic Objects

    - by Ramesh Durai
    How to dynamically create objects? string[] columnNames = { "EmpName", "EmpID", "PhoneNo" }; List<string[]> columnValues = new List<string[]>(); for (int i = 0; i < 10; i++) { columnValues.Add(new[] { "Ramesh", "12345", "12345" }); } List<Dictionary<string, object>> testData = new List<Dictionary<string, object>>(); foreach (string[] columnValue in columnValues) { Dictionary<string, object> data = new Dictionary<string, object>(); for (int j = 0; j < columnNames.Count(); j++) { data.Add(columnNames[j], columnValues[j]); } testData.Add(data); } Imaginary Class(Class is not available in code): class Employee { string EmpName { get;set; } string EmpID { get;set; } string PhoneNo { get;set; } } Note: Property/column names are dynamic. Now I want to convert the List<Dictionary<string, object>> to a class of type List<object> (i.e) List<Employee>. Is it Possible? Suggestions please.

    Read the article

  • Get checked Listitems from ListView and pass that to another activity

    - by Rajesh Rajaram
    I'm developing a Androidapplication using ListView. ListView have a one file in each and every ListItem. Here, I have set onItemClickin ListView. So, that if user clicks the ListItememail application gets open and attach the particular file in email. Its for the single File, this gets implemented and working fine. Now I want attach the multiple file in email. i.e. the implementing the CheckBoxin each ListItemand checked items have to attached into the Mail. I know its possible because its very similar to the file manager application that checking the multiple file and deleting the all file by clicking the single Button. But don't know how to do.

    Read the article

  • Create array of objects based on another array?

    - by xckpd7
    I want to take an array like this: var food = [ { name: 'strawberry', type: 'fruit', color: 'red', id: 3483 }, { name: 'apple', type: 'fruit', color: 'red', id: 3418 }, { name: 'banana', type: 'fruit', color: 'yellow', id: 3458 }, { name: 'brocolli', type: 'vegetable', color: 'green', id: 1458 }, { name: 'steak', type: 'meat', color: 'brown', id: 2458 }, ] And I want to create something like this dynamically: var foodCategories = [ { name: 'fruit', items: [ { name: 'apple', type: 'fruit', color: 'red', id: 3418 }, { name: 'banana', type: 'fruit', color: 'yellow', id: 3458 } ] }, { name: 'vegetable', items: [ { name: 'brocolli', type: 'vegetable', color: 'green', id: 1458 }, ] }, { name: 'meat', items: [ { name: 'steak', type: 'meat', color: 'brown', id: 2458 } ] } ] What's the best way to go about doing this?

    Read the article

  • combine two arrays and sort

    - by Jun
    Given two arrays like the following: a = array([1,2,4,5,6,8,9]) b = array([3,4,7,10]) I would like the output to be: c = array([1,2,3,4,5,6,7,8,9,10]) or: c = array([1,2,3,4,4,5,6,7,8,9,10]) I'm aware that I can do the following: c = sort(unique(concatenate((a,b))) I'm just wondering if there is a faster way to do it as the arrays I'm dealing with have millions of elements. Any idea is welcomed. Thanks

    Read the article

  • How to eliminate a sub-directory level from all URLs in Website

    - by frank13
    I have a website and I just setup an os shopping cart (ie., Magento) I installed the cart in a sub-directory off the document root as /magento/ per the installation guidelines. So my web site cart's URL is http://mydomain.com/magento/ I have no public pages off the document root and I actually want my cart to be my home page -- in other words, I want http://mydomain.com/magento/ to resolve as http://mydomain.com/ Is it possible? Can I use mod-rewrite to make it happen? If so, can you suggest what the mod-rewrite directives would look like? Or is it simply a permanent redirect like: redirect 301 /magento http://mydomain.com/ Thanks.

    Read the article

  • Tridion Installation

    - by Kevin Brydon
    I am currently upgrading an installation of Tridion from 5.3 to 2011 starting almost from scratch (aside from migrating the database), brand new virtual servers. I just want to ask for some advice on my current server setup... a sanity check. All servers are running Windows Server 2008. The pages on our website are all classic ASP. Database SQL Server cluster. The 5.3 database has been migrated using the DatabaseManager. This is pretty standard and works well (in test anyway). Content Manager A single server to run the Content Manager and the Publisher. There are around 10 people using it at any one time so not under a particularly heavy load. Content Data Store Filesystem located somewhere on the network. One directory for live and one for staging. Content Delivery Two servers (cd1 and cd2) each with the the following server roles installed. cd1 writes to a filesystem content data store for the live website, cd2 writes to the content data store for the staging website. Presentation Two public facing web servers (web1 and web2) serving both the live and staging websites. The web servers read directly from the content data store as its a filesystem. Each of the web servers have the Content Delivery Server installed so that I can use dynamic linking (and other features?). I've so far set up everything but the web servers. Any thoughts? edit Thanks to Ram S who linked me to a decent walkthrough, upvoted. I suppose I should have posed some questions as I didn't really ask a question. I guess I'm a little confused over the content deliver aspect. I have the Content Delivery split in two separate parts. cd1 and cd2 do the work of shifting information from the Content Manager to the Staging/Live web directories. web1 and web2 should do the work of serving the web pages to the outside world and will interact with the content data store (file system). Is this a correct setup? I need some parts of the Content Delivery on my web servers right? Theoretically I could get rid of the cd1 and cd2 servers and use web1 and web2 to do the deployment right? But I suspect this will put the web servers under unnecessary strain should there ever be a big publish. I've been reading the 2011 Installation Manual, Content Delivery section, and I'm finding it quite hard to get my head around!

    Read the article

  • Possible mem leak?

    - by LCD Fire
    I'm new to the concept so don't be hard on me. why doesn't this code produce a destructor call ? The names of the classes are self-explanatory. The SString will print a message in ~SString(). It only prints one destructor message. int main(int argc, TCHAR* argv[]) { smart_ptr<SString> smt(new SString("not lost")); new smart_ptr<SString>(new SString("but lost")); return 0; } Is this a memory leak? The impl. for smart_ptr is from here edited: //copy ctor smart_ptr(const smart_ptr<T>& ptrCopy) { m_AutoPtr = new T(ptrCopy.get()); } //overloading = operator smart_ptr<T>& operator=(smart_ptr<T>& ptrCopy) { if(m_AutoPtr) delete m_AutoPtr; m_AutoPtr = new T(*ptrCopy.get()); return *this; }

    Read the article

  • Convert javascript ticks to date in Flot jQuery-plugin issue

    - by Kasper Skov
    I have a dynamic Flot graph with dates on the x-axis and numbers on the y-axis. To get the Flot-plugin to read the date object correctly, I had to convert the dates to ticks (with getTime()). My problem is that I can't revers the ticks back to a normal date in my tooltip hover on the graph. I've tried to revers it with this: dateTimeObject = new Date((jsTicks - 621355968000000000) / 10000); All I get, no matter what jsTicks is, is "Jan 02 0001 hh:mm:ss (almost current time)" What am I doing wrong?

    Read the article

  • Phonegap Screenshot plugin in Cordova 2.0.0

    - by ObjectiveJ
    I have set up the screenshot plugin from github, located here: https://github.com/phonegap/phonegap-plugins/tree/master/Android/Screenshot I set it up as instructed and with 1.8.1 of cordova. It worked and the screenshot was saved to the phone. However it fails with cordova 2.0.0. Screenshot.java code: https://github.com/phonegap/phonegap-plugins/blob/master/Android/Screenshot/src/org/apache/cordova/Screenshot.java Screenshot.js code: https://github.com/phonegap/phonegap-plugins/blob/master/Android/Screenshot/www/Screenshot.js Due to the advice of a very clever man called Simon MacDonald, I removed line 31 and 38 from the JS file shown above. However when I try to use the screenshot plugin with cordova 2.0.0 I receive these errors: ERROR: org.json.JSONException: Value undefined of type java.lang.String cannot be converted to JSONArray. Error: Status=8 Message=JSON error file:///android_asset/www/cordova-2.0.0.js: Line 938 : Error: Status=8 Message=JSON error Error: Status=8 Message=JSON error at file:///android_asset_/www/cordova-2.0.0.js:938 line 938 of the cordova.js is: // If error, then display error else { console.log("Error: Status="+v.status+" Message="+v.message); but im almost certain this is a compatibility error. Does anyone know a fix for this, or even a reason. Im abit lost. Any help is appreciated. I call the screenshot.js with this code: function takeScreenShot() { cordovaRef.exec("Screenshot.saveScreenshot"); } Any help massively appreciated.

    Read the article

  • NSIS IfFileExists - more than one line

    - by metRo_
    I'm using the IfFileExists function but I think it only include the first line after the jump. How can I do something similar to C like {..../.../....}?! IfFileExists "$PROGRAMFILES\InduSoft Web Studio v7.0\Bin\RunStartUp.exe" StartUpExists PastStartUpExists StartUpExists: StrCpy $Text "$PROGRAMFILES\InduSoft Web Studio v7.0\Bin\RunStartUp.exe" PastStartUpExists: nsDialogs::Create 1018 Pop $Dialog nsDialogs::SelectFileDialog open "$PROGRAMFILES\InduSoft Web Studio v7.0\Bin\RunStartUp.exe" "*.exe" Pop $Text ${NSD_CreateText} 0 13u 100% -13u $Text Pop $Text ${NSD_CreateText} 0 ${NSD_GetText} $Text $0 CreateShortCut "$SMPROGRAMS\Advanlab\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url" CreateShortCut "$SMPROGRAMS\Advanlab\Uninstall.lnk" "$INSTDIR\uninst.exe" CreateShortCut "$SMPROGRAMS\Advanlab\Advanlab.lnk" "$0" CreateShortCut "$DESKTOP\Advanlab.lnk" "$0"

    Read the article

  • It is possible to override a plugin's Controller from another plugin?

    - by fabschu
    I'm developing a plugin (MyPlugin) which combines some security functions to use it as a standard plugin for my next Grails application. It integrates the Spring-Security-Core and Spring-Security-UI plugins, and by its installation all dependencies should be installed automatically by adding the dependencies in the BuildConfig like: plugins { compile: ...} So far everything works fine, but in MyPlugin I'm changing the behaviour of the Spring-Security-UI plugin (password encoding in User Domain), by overwriting the UserController. Executing MyPlugin leads to the expected behaviour and new Users are created using the correct Controller. However, when installing MyPlugin in another Grails application, this behaviour fails and the original UserController of the Spring-Security-Ui plugin is used. I tried to solve this by configuring the dependsOn and loadAfter properties in the GrailsPlugin file, but without any success. Is it possible to fix this? Or is it only possible to overwrite behaviour/controllers in the main application?

    Read the article

  • FILESTREAM/FILETABLE Clarifications for Implementation

    - by user1209734
    Recently our team was looking at FILESTREAM to expand the capabilities of our proprietary application. The main purpose of this app is managing the various PDFS, Images and documents to all of the parts we manufacture. Our ASP application uses a few third party tools to allow viewing of these files. We currently have 980GB of data on the Fileserver. We have around 200GB of Binary data in SQL Server that we would like to extract since it is not performing well hence FILESTREAM seems to be a good compromise to the two major data storage/access issues. A few things are not exactly clear to us: FILESTREAM Can or Cannot store its data on a drive that is not locally attached. We already have a File Server with a RAID 10 (1.5TB drives). This server stores all of the documents right now, would we have to move these drives to the SQL Server for FILESTREAM? That would be a tough bullet to bite since the server also is doubling as the Application Server (Two VMs on one physical server). FILETABLE stores the common metadata about the files but where is the Full Text part of it stored to allow searching of files like doc/docx? Is this separate? Are you able to freely add criteria to this to search by? If so any links to clarify would be appreciated. Can FILETABLE be referenced in another table with a foreign key? Thank you in advance EDIT: For those having these questions this web video covered everything and more in terms of explaining filestream from 2008 to 2012 and the cavets to consider (I would seriously rep him if I could): http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2270 In conclusion we will not be using FILESTREAM as it would be way to huge of an upsurge to accommodate for investment. EDIT 2: Update to #1 - After carefully assessing FileTable in addition to FILESTREAM we got a winning combination. We did have to move the files over to the new server (wasn't to painful since they were on the same VM).It honestly took more time to write an extraction tool to dump the binary data within SQL to the File System. Update to #2 - This was seperate but again Bob had an excellent webinar explaining this: http://channel9.msdn.com/Events/TechEd/Europe/2012/DBI411 Update to #3 - Using TFT inheritance we recycled the Docs table we had (minus the huge binary blobs) which required very little changes in our legacy apps. This was a huge upshot for the developer team.

    Read the article

  • Timer or Thread?

    - by Pradeep Singh
    I have a method(say method1) that writes to database(sqlserver)and another method(say method2) that tries to access the same database after some time and updates the data row that was created by method1. The problem arises when method1 fails to access db due to the LAN being disconnected (this is not an exception this is a scenario that will definitely arise in my software, getting into details will make the question too complex) if method1 fails to access db method2 cannot work. What I want to do is to make method1 store values to local db instead of server if the LAN is disconnected and as soon as it enters value in local db the application should start trying to access the server after ever 10-15 seconds. What should I use timer or create a new thread?

    Read the article

1 2 3 4 5 6 7 8 9 10 11  | Next Page >