Search Results

Search found 15210 results on 609 pages for 'technical writing'.

Page 106/609 | < Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >

  • how to write sql script to achieve the following

    - by 3nigma
    hi, so i have a table lets say call it "tbl.items" and there is a column "title" in "tbl.items" i want to loop through each row and for each "title" in "tbl.items" i want to do following: the column has the datatype nvarchar(max) and contains a string... filter the string to remove words like in,out, where etc (stopwords) compare the rest of the string to a predefined list and if there is a match perform some action which involves inserting data in other tables as well.. the problem is im ignotent when it comes to writing T-sql scripts, plz help and guide me how can i achieve this? whether it can be achieved by writing a sql script?? or i have to develope a console application in c# or anyother language?? im using mssql server 2008 thanks in advance

    Read the article

  • Design pattern for extending Android's activities?

    - by Carl
    While programming on Android, I end up writing a parent activity which is extended by several others. A bit like ListActivity. My parent activity extends Activity. if I intend to use a Map or a List, I can't use my parent activity as superclass - the child activity can only extend one activity obviously. As such I end up writing my parent activities with the same logic for Activity, ListActivity, MapActivity and so forth. What am I looking for is some sort of trait functionality/design pattern which would help in this case. Any suggestions?

    Read the article

  • .Net programming on a Apple computer

    - by VoodooChild
    Hello, I really would like to write an app or apps for iPhone / iPad. I've never done this so far because most of my work has been in windows environment. I recently got an i7 with windows 7 and love it, and this is what I am using to do development on currently. I would love to try out writing a simple App on a mac for either an iPhone or iPad. The question I had was are there any developers using a macbook to do windows based programming as well as writing apps? And what is their setups like? (example: using bootcamp) Most importantly, is it recommended based on the experience they had doing so? any problems / performance issue? These are the concerns I have to address before justifying spending time and money on this. Thanks, Voodoo

    Read the article

  • Java/C++ communication via pipe on Windows

    - by Warlax
    Hi, I have two separate programs, one in Java and one in C++, both running on Windows. We need to do bidirectional interprocess communication between the two. Up until now, we were using this awkward solution of writing to text files and reading them on the other side, where the producer would generate a .lock file when it's done writing and the consumer would remove that when it's done reading... like I said, awkward. If we were on *nix, we would use a pipe using popen() on the C++ and RadomAccessFile on the Java side. It seems to work well. What can we do on Windows? Can we use named pipes? Thank you.

    Read the article

  • How to sanely read and dump structs to disk when some fields are pointers?

    - by bp
    Hello, I'm writing a FUSE plugin in C. I'm keeping track of data structures in the filesystem through structs like: typedef struct { block_number_t inode; filename_t filename; //char[SOME_SIZE] some_other_field_t other_field; } fs_directory_table_item_t; Obviously, I have to read (write) these structs from (to) disk at some point. I could treat the struct as a sequence of bytes and do something like this: read(disk_fd, directory_table_item, sizeof(fs_directory_table_item_t)); ...except that cannot possibly work as filename is actually a pointer to the char array. I'd really like to avoid having to write code like: read(disk_df, *directory_table_item.inode, sizeof(block_number_t)); read(disk_df, directory_table_item.filename, sizeof(filename_t)); read(disk_df, *directory_table_item.other_field, sizeof(some_other_field_t)); ...for each struct in the code, because I'd have to replicate code and changes in no less than three different places (definition, reading, writing). Any DRYer but still maintainable ideas?

    Read the article

  • Flexibility starting to develop applications and DB

    - by kristaps
    Hi! First of all I want to say some info for admins. This post can help to all DBA and developers. Hope You don't close this. I'm writing about widespread problem I'm writing master work and I want that You will had little time to answer my questions in my form. These questions are about db structures. Visit here: http://spreadsheets.google.com/embeddedform?formkey=dEhmOWFGb2twWVFreWJwWXp2U3c5a1E6MQ After I summarized results, I insert it in new post and developers can choose which structure to use to reach needed requirements developing new applications. I think that my test will help a lot of people. Best regards, Kristaps

    Read the article

  • Get command object

    - by user198147
    Hi all, I am writing a spring 2.5 application and in my jsp I'm writing my own tags. It's about a list of objects...when I change the number of rows that list shows(a combobox), I am doing a submit on my form returning back to the view(obviosly with the new number of rows returned). When listing with my own tags I need to get the properties from my command object. I have access to the pageContext object but I can't figure where the command object is stored. Could someoane please help me? Thanks in advance, Luisa

    Read the article

  • How to append text to a text file in WinAPI?

    - by Bruce
    Hi guys, Ive got an annoying problem, I cant append any text to the text file. Every time I open it for writing, I overwrite the data. I tried to move the file pointer to the end of the file, but no result (no writing to the file at all). Here is the code: INVOKE CreateFile, offset filePath, GENERIC_WRITE, FILE_SHARE_WRITE, 0, OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,0 mov hFile, eax mov edx, 10 INVOKE SetFilePointer, hFile, 0, 0, FILE_END INVOKE WriteFile, hFile, offset buffer, edx, ADDR SizeReadWrite, NULL INVOKE CloseHandle, hFile Any ideas? Thank you in advance!

    Read the article

  • Are today's young programmers getting wrapped around the axle with patterns and practices?

    - by Robert Harvey
    Recently I have noticed a number of questions on SO that look something like this: I am writing a small program to keep a list of the songs that I keep on my ipod. I'm thinking about writing it as a 3-tier MVC Ruby on Rails web application with TDD, DDD and IOC, using a factory pattern to create the classes and a singleton to store my application settings. Do you think I'm taking the right approach? Do you think that we're handing novice programmers a very sharp knife and telling them, "Don't cut yourself with this"? NOTE: Despite the humorous tone, this is a serious (and programming-related) question.

    Read the article

  • Print styles: How to ensure image doesn't span a page break

    - by notJim
    This is a problem I've had a few times, and I'm not sure how to deal with it. When writing a print stylesheet, is there a way to ensure that an image is always only on a single page. An example of the behavior I'm seeing is below: Page 1 | | | (text text text) | | (text text text) | | ________________ | | | Top of image | | |____________________| ------page break------ ____________________ Page 2 | | Rest of image | | | |________________| | | … | What I'd like Page 1 | | | (text text text) | | (text text text) | | | | | |____________________| ------page break------ ____________________ | ________________ | | | Full image | | | | | | | |________________| | | … | All those times I bitching about floats in LaTeX, and here I am asking for the same functionality... Can this be done? I'm not necessarily concerned about it working in all browsers, since this is often just a one-off document I'm writing to be turned into a PDF.

    Read the article

  • Grails unit testing domain classes with Set properties - is this safe?

    - by Ali G
    I've created a domain class in Grails like this: class MyObject { static hasMany = [tags: String] // Have to declare this here, as nullable constraint does not seem to be honoured Set tags = new HashSet() static constraints = { tags(nullable: false) } } Writing unit tests to check the size and content of the MyObject.tags property, I found I had to do the following: assertLength(x, myObject.tags as Object[]) assertEquals(new HashSet([...]), myObject.tags) To make the syntax nicer for writing the tests, I implemented the following methods: void assertEquals(List expected, Set actual) { assertEquals(new HashSet(expected), actual) } void assertLength(int expected, Set set) { assertLength(expected, set as Object[]) } I can now call the assertLength() and assertEquals() methods directly on an instance of Set, e.g. assertLength(x, myObject.tags) assertEquals([...], myObject.tags) I'm new to Groovy and Grails, so unaware how dangerous method overloading like this is. Is it safe? If so, I'm slightly* surprised that these methods (or similar) aren't already available - please let me know if they are. * I can see how these methods could also introduce ambiguity if people weren't expecting them. E.g. assertLength(1, set) always passes, no matter what the content of set

    Read the article

  • Using typedefs (or #defines) on built in types - any sensible reason?

    - by jb
    Well I'm doing some Java - C integration, and throught C library werid type mappings are used (theres more of them;)): #define CHAR char /* 8 bit signed int */ #define SHORT short /* 16 bit signed int */ #define INT int /* "natural" length signed int */ #define LONG long /* 32 bit signed int */ typedef unsigned char BYTE; /* 8 bit unsigned int */ typedef unsigned char UCHAR; /* 8 bit unsigned int */ typedef unsigned short USHORT; /* 16 bit unsigned int */ typedef unsigned int UINT; /* "natural" length unsigned int*/ Is there any legitimate reason not to use them? It's not like char is going to be redefined anytime soon. I can think of: Writing platform/compiler portable code (size of type is underspecified in C/C++) Saving space and time on embedded systems - if you loop over array shorter than 255 on 8bit microprocessor writing: for(uint8_t ii = 0; ii < len; ii++) will give meaureable speedup.

    Read the article

  • What is the initiating actor for the usecase shown here

    - by Illep
    I am new to drawing use case and writing use case descriptions. I have an Actor called User , an abstract usecase called Work Type and another use case called Manager. The usecase Manager has a generalized relationship with the Work Type use case. I'm now writing the use case description for Manager use case. And what is the initiating Actor for this use case. Is it the Actor User ? or doesn't it have an initiating Actor ? Note: I only want to know the initiating Actor for the use case Manager

    Read the article

  • Halting Django's dev server via page request?

    - by Ben Blank
    I'm looking at writing a portable, light-weight Python app. As the "GUI toolkit" I'm most familiar with — by a wide margin! — is HTML/CSS/JS, I thought to use Django as a framework for the project, using its built-in "development server" (manage.py runserver). I've been banging on a proof-of-concept for a couple hours and the only real problem I've encountered so far is shutting down the server once the user has finished using the app. Ideally, I'd like there to be a link on the app's pages which shuts down the server and closes the page, but nothing I see in the Django docs suggests this is possible. Can this be done? For that matter, is this a reasonable approach for writing a small, portable GUI tool?

    Read the article

  • How long does a MailItem.Property[myProperty] live?

    - by Darien Ford
    I'm writing a TransportAgent for Exchange and want to tag a MailItem with some identifying information. The MailItem class seems to have this functionality with the MailItem.Properties property; however, my question is to the length of time an entry would remain available. e.g. e.MailItem.Properties.Add(new KeyValuePair<string,object>("MyKey", "myValue")); After this MailItem is delivered to the correct mailbox, if someone were to reply to the email, would the newly created reply retain that set value? I think while writing this question out I have answered it for myself (which rationally would be no) but any practical experience and insight would be appreciated.

    Read the article

  • .NET/C# Drizzle database client

    - by FlappySocks
    I am planning to use Drizzle in my next C# Mono app. Since there is no C# client available for Drizzle, I thought I would have a stab at writing my own by converting the Java client, and then making it work with DBLinq. Having seen the Java client, I realise that it's a longer job that I had anticipated, and I don't have the time. Besides the Java client is not all that mature yet. Since there is an official Drizzle C client library (libdrizzle), writing a C# wrapper might be the best solution. Are there any tools available that can assist in generating the code for this?

    Read the article

  • How to apply encoding when reading from a serial port

    - by rross
    I'm reading data from a serial port. I read this posting: http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/a709d698-5099-4e37-9e10-f66ff22cdd1e He is writing about many of the issues I have encounter, but in his writing he refers to using: System.Text.Encoding.GetEncoding("Windows-1252"). The problem I'm having is when and how to apply this. There are three potitional spots in my opinion. When the serial port object is define: private SerialPort comport = new SerialPort(); The Event handler: comport.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived); Or when reading the data: string data = comport.ReadExisting(); No matter where I add it. I seem to get errors. How would one use Encoding?

    Read the article

  • As a team should we develop locally and merge into the dev server, or develop on the dev server?

    - by CogitoErgoSum
    Hey, Recently I was tasked with writing up formal procedures for a team based development enviroment. We have several projects with multiple modules each. Right now there are only two programmers, however there are plans to expand to 4-6 programmers. Each programmer will be working on the same project and possibly pages which may cause over writing or error issues. So far the ideal solution I have thought up is: Local development (WAMP/VM or some virtual server instance on their own machine). Once a developer has finished their developments, they check it into the CVS Repository and merge it wih other fixes etc. The CVS version is then deployed to the primary dev server for testing by the devs. The MySQL DAtabases are kept on the primary dev server and users may remotely connect to it. Any Schema / Data alterations are run through a DB Admin who will notify all devs of any DB Changes (Which should be rare). Does anyone see an issue with this or have a better solution?

    Read the article

  • what is a fast way to output h5py dataset to text?

    - by user362761
    I am using the h5py python package to read files in HDF5 format. (e.g. somefile.h5) I would like to write the contents of a dataset to a text file. For example, I would like to create a text file with the following contents: 1,20,31,75,142,324,78,12,3,90,8,21,1 I am able to access the dataset in python using this code: import h5py f = h5py.File('/Users/Me/Desktop/thefile.h5', 'r') group = f['/level1/level2/level3'] dset = group['dsetname'] My naive approach is too slow, because my dataset has over 20000 entries: # write all values to file for index in range(len(dset)): # do not add comma after last value if index == len(dset)-1: txtfile.write(repr(dset[index])) else: txtfile.write(repr(dset[index])+',') txtfile.close() return None Is there a faster way to write this to a file? Perhaps I could convert the dataset into a NumPy array or even a Python list, and then use some file-writing tool? (I could experiment with concatenating the values into a larger string before writing to file, but I'm hoping there's something entirely more elegant)

    Read the article

  • Sql query builder c# for windows mobile

    - by pdiddy
    I'm building a windows mobile app. And using SqlCe. I'm looking for a good sql query builder. So instead of writing "SELECT COLUMNS FROM TABLE WHERE etc... Is there a good free library that can build this sort of query? EDIT: You know when you write your code with ADO.net something like this SqlCeCommand command = new SqlCeCommand(Connection); command.CommandText = "SELECT * FROM Orders WHERE customerId = @customerId"; Well i'm looking for some library that could build that SELECT statement using classes instead of writing it through string. So something like: SqlCeCommand command = new SqlCeCommand(Connection); SqlQueryBuilder query = new SqlQueryBuilder(); query.Table = "Orders"; query.AddWhere("customerId", myValue) command.CommandText = query.toString(); Something like that .... so a class that will build the query..

    Read the article

  • Putting a simple if-then statement on one line

    - by Abizern
    I'm just getting into Python and I really like the terseness of the syntax. However; is there an easier way of writing an if-then statement so it fits on one line? For example; say I have the simple test: if count == N: count = 0 else: count = N + 1 is there a simpler way of writing this? I mean, in Objective-C I would write this as: count = count == N ? count = 0 : count = N + 1; Is there something similar for python? Edit I know that in this instance I can use count == count % N. I'm asking about the general syntax.

    Read the article

  • Rails architecture questions

    - by justinbach
    I'm building a Rails site that, among other things, allows users to build their own recipe repository. Recipes are entered either manually or via a link to another site (think epicurious, cooks.com, etc). I'm writing scripts that will scrape a recipe from these sites given a link from a user, and so far (legal issues notwithstanding) that part isn't giving me any trouble. However, I'm not sure where to put the code that I'm writing for these scraper scripts. My first thought was to put it in the recipes model, but it seems a bit too involved to go there; would a library or a helper be more appropriate? Also, as I mentioned, I'm building several different scrapers for different food websites. It seems to me that the elegant way to do this would be to define an interface (or abstract base class) that determines a set of methods for constructing a recipe object given a link, but I'm not sure what the best approach would be here, either. How might I build out these OO relationships, and where should the code go?

    Read the article

  • X264 encoding using Opencv

    - by user573193
    I am working with a high resolution camera: 4008x2672. I a writing a simple program which grabs frame from the camera and sends the frame to a avi file. For working with such a high resolution, I found only x264 codec that could do the trick (Suggestions welcome). I am using opencv for most of the image handling stuff. As mentioned in this post http://doom10.org/index.php?topic=1019.0 , I modified the AVCodecContext members as per ffmpeg presets for libx264 (Had to do this to avoid broken ffmpeg defaults settings error). This is output I am getting when I try to run the program [libx264 @ 0x992d040]non-strictly-monotonic PTS 1294846981.526675 1 0 //Timestamp camera_no frame_no 1294846981.621101 1 1 1294846981.715521 1 2 1294846981.809939 1 3 1294846981.904360 1 4 1294846981.998782 1 5 1294846982.093203 1 6 Last message repeated 7 times [avi @ 0x992beb0]st:0 error, non monotone timestamps -614891469123651720 = -614891469123651720 OpenCV Error: Unspecified error (Error while writing video frame) in icv_av_write_frame_FFMPEG, file /home/ajoshi/ext/OpenCV-2.2.0/modules/highgui/src/cap_ffmpeg.cpp, line 1034 terminate called after throwing an instance of 'cv::Exception' what(): /home/ajoshi/ext/OpenCV-2.2.0/modules/highgui/src/cap_ffmpeg.cpp:1034: error: (-2) Error while writing video frame in function icv_av_write_frame_FFMPEG Aborted Modifications to the AVCodecContext are: if(codec_id == CODEC_ID_H264) { //fprintf(stderr, "Trying to parse a preset file for libx264\n"); //Setting Values manually from medium preset c-me_method = 7; c-qcompress=0.6; c-qmin = 10; c-qmax = 51; c-max_qdiff = 4; c-i_quant_factor=0.71; c-max_b_frames=3; c-b_frame_strategy = 1; c-me_range = 16; c-me_subpel_quality=7; c-coder_type = 1; c-scenechange_threshold=40; c-partitions = X264_PART_I8X8 | X264_PART_I4X4 | X264_PART_P8X8 | X264_PART_B8X8; c-flags = CODEC_FLAG_LOOP_FILTER; c-flags2 = CODEC_FLAG2_BPYRAMID | CODEC_FLAG2_MIXED_REFS | CODEC_FLAG2_WPRED | CODEC_FLAG2_8X8DCT | CODEC_FLAG2_FASTPSKIP; c-keyint_min = 25; c-refs = 3; c-trellis=1; c-directpred = 1; c-weighted_p_pred=2; } I am probably not setting the dts and pts values which I believed ffmpeg should be setting it for me. Any sugggestions welcome. Thanks in advance

    Read the article

  • How to dump STDIN to a file, using C++ STL?

    - by Jimm Chen
    HHello all, this is a straight forward question, but not a straight forward answer can be found by just Googling today. Hope someone can show me a concise answer before I dig into those thick C++ books and finally find the solution out. Thank you. I'm writing this program so to make a workaround in this issue: Why do I get 'Bad file descriptor' when trying sys.stdin.read() in subversion pre-revprop-change py script? Note: Content from STDIN may be arbitrary binary data. Please use C++ STL functions, iostream, ifstream etc . If the file creation/writing failed, I'd like to catch the exception to know the case.

    Read the article

< Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >