Daily Archives

Articles indexed Wednesday May 28 2014

Page 16/18 | < Previous Page | 12 13 14 15 16 17 18  | Next Page >

  • Producing JSON Documents from SQL Server queries via TSQL

    Although SQL Server supports XML well, XML's little cousin JSON gets no love. This is frustrating now that JSON is in so much demand. Maybe, Phil Factor suggests, it is possible to leverage all that XML, and XPath, goodness in SQL Server to produce JSON in a versatile way from SQL Queries? Yes, it so happens that there are plenty of alternatives. FREE eBook – "45 Database Performance Tips for Developers"Improve your database performance with 45 tips from SQL Server MVPs and industry experts. Get the eBook here.

    Read the article

  • Would opencv be a good choice for image colour summarization?

    - by codecowboy
    I would like to analyse a set of hundreds of thousands of product images (clothing, electronic goods etc) and retrieve the dominant colours in each. I'm only interested in the top 3 or 4 colours. The aim is to achieve a degree of certainty that x image is mostly red or image y is mostly orange and blue. The images are likely to be colour jpegs of reasonable quality and approximately 100kb in size. I would like to use C# and the solution should run on a Linux server, preferably using open source libraries. Would opencv be a good choice for this? What other libraries or specific algorithms might be helpful?

    Read the article

  • What happens differently when you add a task Asynchronously on GAE?

    - by Ben Grunfeld
    Google's doc on async tasks assumes knowledge of the difference between regular and asynchronously added tasks. add_async(task, transactional=False, rpc=None) Asynchronously add a Task or a list of Tasks to this Queue. How is adding tasks asynchronously different to adding them regularly. I.e. what is the difference between using add(task, transactional=False) and add_async(task, transactional=False, rpc=None) I've heard that adding tasks regularly blocks certain things. Any explanation of what it blocks and how, and how async tasks don't block would be greatly appreciated.

    Read the article

  • Semantic algorithms

    - by Mythago
    I have a more theoretical than practical question. I'll start with an example - when I get an email and open it on my iPad, there is a feature, which recognizes the timestamp from the text and offers me to create an event in the calendar. Simply told, I want to know theoretically how it's done - I believe it's some kind of semantic parsing, and I would like if someone could point me to some resources, where I can read more about this.

    Read the article

  • What options should I consider for a modern Web/Mobile development stack? [on hold]

    - by jimmy_terra
    I'm a long time server side dev who has been tasked with building a bleeding edge web UI (go figure), so apologies for the very broad nature of the question. What are the best modern libraries, tools, languages and patterns for building a dynamic web application that will run seamlessly on mobiles also? My requirements are that it must be dynamic (push updates), support automated testing, and should allow 'componentization' (a team of devs will be working on this). What should I check out and why? I will start off with some of the things I'm looking at already: Front-end HTML5 CSS3 JavaScript AngularJs Testing Karma Testem Jasmine Patterns Single Page Applications

    Read the article

  • "bug" in C++11 text by Stroustrup?

    - by Astara
    I found an apparent contradiction in the c++ text having to do with the result of the c_str() function operating on std:strings (in my copy, the definition and contradiction are on p1040). First it defines the c_str() function as something that produces a 'C-style' (zero-terminated) string, but later it talks about how a C++ c_str value can have embed a 'C'-style, end-of-string terminators (i.e. NUL's) embedded in the string (that is defined by being NUL terminated). Um... does anyone else feel that this is a 'stretching' of the definition of a C-string beyond it's definition? I.e. I think what it means, is that if you were to look at the length() function as applied to the string, it will show a different end of string than using the C-definition of a z-string -- one that can contain any character except NUL, and is terminated by NUL. I likely don't have to worry about it in my of my programs, but it seems like a subtle distinction that makes a C++ c_str, not really a 'C'-string. Am I misunderstanding this issue? Thanks!

    Read the article

  • How to diagram custom programming languages, non textual?

    - by Adam
    I've used and created domain-specific languages before, plenty of times (e.g. using yacc/lex). Normally we'd start with grammar written in BNF, and a bunch of keywords. This is easy to do, easy to share. Recently, I've started working with diagrammatic programming languages - closest parallel is circuit-diagrams in electronics, where it's very difficult to express ideas in text, but very easy to express them in wiring-diagrams. This is a new and novel problem for me: how to efficiently express these mini-languages, and share concepts in them with colleagues? (i.e. how to whiteboard-program within them. Actual programming is easy - you have physical components to hand) Are there tools for this? Or good/best practices (e.g. equivalent of "always use BNF as starting point for your new DSL, and use tools like yacc to generate the parser, compiler, etc"). My googlefu is proving weak - all I get is false positives for wiring diagrams, and UML editors (since these are custom languages, UML doesn't seem to help)

    Read the article

  • Single or multiple return statements in a function [on hold]

    - by Juan Carlos Coto
    When writing a function that can have several different return values, particularly when different branches of code return different values, what is the cleanest or sanest way of returning? Please note the following are really contrived examples meant only to illustrate different styles. Example 1: Single return def my_function(): if some_condition: return_value = 1 elif another_condition: return_value = 2 else: return_value = 3 return return_value Example 2: Multiple returns def my_function(): if some_condition: return 1 elif another_condition: return 2 else: return 3 The second example seems simpler and is perhaps more readable. The first one, however, might describe the overall logic a bit better (the conditions affect the assignment of the value, not whether it's returned or not). Is the second way preferable to the first? Why?

    Read the article

  • Automatic language transformation in editor or IDE [on hold]

    - by Rumca
    Are there any tools that are capable of editing code but in different language? To be more concrete, I want to parse java source file in editor, compile it to my language X, edit in X and compile back to java on save. Or edit pom.xml file using non-XML syntax. Which editor or IDE would be easiest to use for implementing such prototype? Option to transform only a snippet would be ideal to limit effort on parsing. For one example, Intellij IDEA can display anonymous class so it looks like lambda expression hiding some of boilerplate.

    Read the article

  • Does GPG allow encryption of multiple files using a wild card like *filename*? [on hold]

    - by user47427
    I am trying to automate the encryption of files on a windows server using a .bat file I created. As long as the filename is hardcoded in the .bat file this works. I want to encrypt numerous files using this .bat file but files are not encrypted when I use wildcards in the filename like filename.txt. I've been trying various version of the following command at the DOS prompt to no avail. All attempts have returned syntax for usage. C:\gpg -v --batch -- yes --always-trust -e -r <encryption-key> *part-of-the-file-name* usage: gpg [options] --encrypt [filename] I received the same usage message with this command: C:\gpg -v --batch -- yes --always-trust -e -r --encrypt part-of-the-file-name I tried without the -v and some of the other options and I still received the same message. I have spent hours today searching the internet for an answer and I can't find one anywhere? Please help.

    Read the article

  • Getting data from csv file and returning objects in collections

    - by Jacob
    I have very simple class of person as below: public class Person { int ID; Gender gender; Date dateOfBirth; public Person(final int iD, final Gender gender,final Date dateOfBirth) { ID = iD; this.gender = gender; this.dateOfBirth = dateOfBirth; } } Gender is enum : public enum Gender { Male, Female } In CSV file i will have data, for example: 1;Male;23-02-2001 2;Female;11-06-1989 3;Male;02-12-1999 Is in java any simple way to get all persons from csv file and return it as ArrayList<Person> persons ?

    Read the article

  • What is a better language to use when building a database: Visual C# or Visual Basic (VB.net)? [on hold]

    - by user3413537
    I'm building a GUI and a database which is using SQL as a server (internal database not a web application). Which language is more of a "right tool" when it comes to building a not very structurally complicated database? What are the advantages and disadvantages of Visual C# / VB.net? I've been reading a lot of stuff online and they said that VB.net is not as capable and it doesn't have as much support as Visual C#, and it seems that VB.net is on a decline in terms of popularity.

    Read the article

  • Who should have full visibility of all (non-data) requirements information?

    - by ebyrob
    I work at a smallish mid-size company where requirements are sometimes nothing more than an email or brief meeting with a subject matter manager requiring some new feature. Should a programmer working on a feature reasonably expect to have access to such "request emails" and other requirements information? Is it more appropriate for a "program manager" (PGM) to rewrite all requirements before sharing with programmers? The company is not technology-centric and has between 50 and 250 employees. (fewer than 10 programmers in sum) Our project management "software" consists of a "TODO.txt" checked into source control in "/doc/". Note: This is nothing to do with "sensitive data access". Unless a particular subject matter manager's style of email correspondence is top secret. Given the suggested duplicate, perhaps this could be a turf war, as the PGM would like to specify HOW. Whereas WHY is absent and WHAT is muddled by the time it gets through to the programmer(s)... Basically. Should specification be transparent to programmers? Perhaps a history of requirements might exist. Shouldn't a programmer be able to see that history of reqs if/when they can tell something is hinky in the spec? This isn't a question about organizing requirements. It is a question about WHO should have full VISIBILITY of requirements. I'd propose it should be ALL STAKEHOLDERS. Please point out where I'm wrong here.

    Read the article

  • "Collection Wrapper" pattern - is this common?

    - by Prog
    A different question of mine had to do with encapsulating member data structures inside classes. In order to understand this question better please read that question and look at the approach discussed. One of the guys who answered that question said that the approach is good, but if I understood him correctly - he said that there should be a class existing just for the purpose of wrapping the collection, instead of an ordinary class offering a number of public methods just to access the member collection. For example, instead of this: class SomeClass{ // downright exposing the concrete collection. Things[] someCollection; // other stuff omitted Thing[] getCollection(){return someCollection;} } Or this: class SomeClass{ // encapsulating the collection, but inflating the class' public interface. Thing[] someCollection; // class functionality omitted. public Thing getThing(int index){ return someCollection[index]; } public int getSize(){ return someCollection.length; } public void setThing(int index, Thing thing){ someCollection[index] = thing; } public void removeThing(int index){ someCollection[index] = null; } } We'll have this: // encapsulating the collection - in a different class, dedicated to this. class SomeClass{ CollectionWrapper someCollection; CollectionWrapper getCollection(){return someCollection;} } class CollectionWrapper{ Thing[] someCollection; public Thing getThing(int index){ return someCollection[index]; } public int getSize(){ return someCollection.length; } public void setThing(int index, Thing thing){ someCollection[index] = thing; } public void removeThing(int index){ someCollection[index] = null; } } This way, the inner data structure in SomeClass can change without affecting client code, and without forcing SomeClass to offer a lot of public methods just to access the inner collection. CollectionWrapper does this instead. E.g. if the collection changes from an array to a List, the internal implementation of CollectionWrapper changes, but client code stays the same. Also, the CollectionWrapper can hide certain things from the client code - from example, it can disallow mutation to the collection by not having the methods setThing and removeThing. This approach to decoupling client code from the concrete data structure seems IMHO pretty good. Is this approach common? What are it's downfalls? Is this used in practice?

    Read the article

  • Are sequence designs appropriate for GUI button design?

    - by JustADude
    Specifically, I have numerous buttons that will be changing color based on state information from operator input and input from various subcomponents and sensors. I would like to use UML or some other type of design diagrams to be able to capture the color transition. Some folks have suggested sequence diagrams, but I haven't been able to find any good examples that show how to incorporate this design artifact. I would really like to head in this direction to help developers. Are sequence designs in fact, appropriate, or is there a more appropriate design?

    Read the article

  • WPF properties memory management

    - by mrpyo
    I'm trying to build binding system similar to the one that is used in WPF and I ran into some memory leaking problems, so here comes my question - how is memory managed in WPF property system? From what I know in WPF values of DependencyProperties are stored in external containers - what I wanna know is how are they collected when DependencyObject dies? Simplest solution would be to store them is some weak reference dictionary - but here comes the main problem I ran into - when there is a listener on property that needs reference to its (this property) parent it holds it (the parent) alive (when value of weak reference dictionary points somewhere, even indirectly, to key - it can't be collected). How is it avoided in WPF without the need of using weak references everywhere?

    Read the article

  • Origins of code indentation

    - by Daniel Mahler
    I am interested in finding out who introduced code indentation, as well as when and where it was introduced. It seems so critical to code comprehension, but it was not universal. Most Fortran and Basic code was (is?) unindented, and the same goes for Cobol. I am pretty sure I have even seen old Lisp code written as continuous, line-wrapped text. You had to count brackets in your head just to parse it, never mind understanding it. So where did such a huge improvement come from? I have never seen any mention of its origin. Apart from original examples of its use, I am also looking for original discussions of indentation.

    Read the article

  • Does anyone have a specific example of using the Flyweight Pattern?

    - by Jeremy E
    I have been studying design patterns and came accross the fly weight pattern. I have been trying to see opportunities to use the pattern in my applications but I am having trouble seeing how to use it. Also, what are some signs that a fly weight pattern is being used when I read other peoples code? According to the definition it says: Use sharing to support large numbers of fine-grained objects efficiently. If I read it right Dictionaries and Hashtables could be instances of fly weights is this correct? Thanks in advance.

    Read the article

  • All tweak settings not saving?

    - by mawburn
    I am running Ubuntu GNOME 14.04. After the last 2 updates, all settings in the Tweak menu are no saving. It will also not switch to the Gnome Dark theme at all. This includes all Startup Application changes as well as any changes to Extension settings. I'm not sure if I need to include any sort of log records or anything like that, so if you need any more information please ask. I've noticed the default fonts seem to be different. I don't remember that being part of the theme settings. It's almost like I'm running in Safe Mode.

    Read the article

  • gstreamer pulseaudio echo cancellation

    - by user3618055
    I'm implementing a voip application using gstreamer, i use the example of the rtp in the plugin-good! i want to implement echo cancellation, i couldn't use the speex echo canceller with gstreamer because the input and the output are not in the same process. So, i want to use pulse audio to make echo cancellation? can any one help me how to deal with? the sender voice is pipeline = gst_pipeline_new (NULL); g_assert (pipeline); /* the audio capture and format conversion */ audiosrc = gst_element_factory_make (pulsesrc, "audiosrc"); g_assert (audiosrc); audioconv = gst_element_factory_make ("audioconvert", "audioconv"); g_assert (audioconv); audiores = gst_element_factory_make ("audioresample", "audiores"); g_assert (audiores); /* the encoding and payloading */ audioenc = gst_element_factory_make (AUDIO_ENC, "audioenc"); g_assert (audioenc); audiopay = gst_element_factory_make (AUDIO_PAY, "audiopay"); g_assert (audiopay); /* add capture and payloading to the pipeline and link */ gst_bin_add_many (GST_BIN (pipeline), audiosrc, audioconv, audiores, audioenc, audiopay, NULL); if (!gst_element_link_many (audiosrc, audioconv, audiores, audioenc, audiopay, NULL)) { g_error ("Failed to link audiosrc, audioconv, audioresample, " "audio encoder and audio payloader"); } and the receiver is : gst_bin_add_many (GST_BIN (pipeline), rtpsrc, rtcpsrc, rtcpsink, NULL); /* the depayloading and decoding */ audiodepay = gst_element_factory_make (AUDIO_DEPAY, "audiodepay"); g_assert (audiodepay); audiodec = gst_element_factory_make (AUDIO_DEC, "audiodec"); g_assert (audiodec); /* the audio playback and format conversion */ audioconv = gst_element_factory_make ("audioconvert", "audioconv"); g_assert (audioconv); audiores = gst_element_factory_make ("audioresample", "audiores"); g_assert (audiores); audiosink = gst_element_factory_make (pulsesink, "audiosink"); g_assert (audiosink); /* add depayloading and playback to the pipeline and link */ gst_bin_add_many (GST_BIN (pipeline), audiodepay, audiodec, audioconv, audiores, audiosink, NULL); res = gst_element_link_many (audiodepay, audiodec, audioconv, audiores, audiosink, NULL); g_assert (res == TRUE); i tried to change gstreamer proprietes to pulseaudio server in input and output and i used "pactl load-module module-echo-cancel aec_method=adrian" but i still listen to echo!! any one could help please thanks!!

    Read the article

  • sound cuts out at random times

    - by jayb151
    Since I updated to 14.04, I have been having a problem with my sound. Every once in a while it "skips a beat." and when I say every once in a while, I mean 2-4 times a minute. It's literally that the sounds goes a way for about half a second. It doesn't pick up where it left off, but rather continues from where it should be...if that makes sense. So, if it cut in mid word, I wouldn't hear the end of the word. I didn't have this problem before I updated from 12.04. There is no popping or static, it just cuts for a fraction of a second. Any thoughts? Thanks!

    Read the article

  • Looking for a way to give acces to some programs for a limited period of time

    - by R. L.
    I install Linux on computers and add to the base installation some other programs. This computer then is sold to a customer as a larger instrument. Now, I am looking for a way to implement some kind licence for this computer so the user can use it for a year and then he would need to "renew" the licence. It is not my intention to lock the whole computer , blocking or deleting some folders should be enough. The only way I could think of was to setup a cron job that deletes my programs, or a second way would be to set the user account to expire after a year. But I give the computer with sudo privilages so the above solutions wouldn't be 100% safe. It is not my intention to encrypt any code, I just want block the possibility to execute certain programs. Is there a way or a program that would "licence the computer" ? Ideally it should be invisible to the user. After one year the program stops working and "he doesn't know why."

    Read the article

  • permission denied errors while starting namenode in hadoop 2.2.0

    - by Riddle
    I recently installed hadoop2.2.0 on my desktop running : Linux livingstream 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Lin I am able to format the namenode just fine , however when I start the namenode using the following command: hadoop-daemon.sh start namenode I get the following permission errors , can anyone please help me with these errors: hduser@livingstream:/usr/local/hadoop$ hadoop-daemon.sh start namenode mkdir: cannot create directory `/var/run/hadoop': Permission denied starting namenode, logging to /var/log/hadoop/hduser/hadoop-hduser-namenode- livingstream.out /usr/sbin/hadoop-daemon.sh: line 138: /var/run/hadoop/hadoop-hduser-namenode.pid: No such file or directory Can you please help me with these errors. Best Regards, Ishan

    Read the article

  • I cant acess my HDD

    - by user286283
    First of all, I'm a total Linux noob. I was running the latest version of Ubuntu but eventually I wasn't able to boot no more, the Ubuntu logo appeared and then it was only a blinking white bar indefinitely, without charging. Now, my problem is the following. I want to do a fresh install and I am trying to recover my latest files from the HDD using the Ubuntu live CD. I click on the HDD and obtain the following I honestly don't really know whats going on. Looking at disks I have this... Can anyone help me out? Cheers.

    Read the article

  • "selected bootable device failed" error dual boot ubuntu alongside windows8.1

    - by user286280
    i have hp laptop i had installed windows 8 which i upgraded to 8.1 i wanted to dual boot ubuntu 14.04 with windows 8.1 i diasbled secure boot and fast startup then used a liveusb to boot then an error msg pops up saying "the selected bootable device failed" my system boot order is : os boot manager usb hdd internal hdd so my question is that y this msg(selected boot device failed) is popping up and should i try to keep usb hdd on the top of my sysytem boot order in order to get it working??? pls reply soon

    Read the article

< Previous Page | 12 13 14 15 16 17 18  | Next Page >