Search Results

Search found 3574 results on 143 pages for 'difficult'.

Page 84/143 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • Can I use Linq to project a new typed datarow?

    - by itchi
    I currently have a csv file that I'm parsing with an example from here: http://alexreg.wordpress.com/2009/05/03/strongly-typed-csv-reader-in-c/ I then want to loop the records and insert them using a typed dataset xsd to an Oracle database. It's not that difficult, something like: foreach (var csvItem in csvfile) { DataSet.MYTABLEDataTable DT = new DataSet.MYTABLEDataTable(); DataSet.MYTABLERow row = DT.NewMYTABLERow(); row.FIELD1 = csvItem.FIELD1; row.FIELD2 = csvItem.FIELD2; } I was wondering how I would do something with LINQ projection: var test = from csvItem in csvfile select new MYTABLERow { FIELD1 = csvItem.FIELD1, FIELD2 = csvItem.FIELD2 } But I don't think I can create datarows like this without the use of a rowbuilder, or maybe a better constructor for the datarow?

    Read the article

  • Are ASCII diagrams worth my time?

    - by Jesse Stimpson
    Are ASCII diagrams within source code worth the time they take to create? I could create a bitmap diagram much faster, but images are much more difficult to in line in a source file (until VS2010). For the record, I'm not talking about decorative ASCII art. Here's an example of a diagram I recently created for my code that I probably could have constructed in half the time in MS Paint. Scenario A: v (U)_________________(N)_______<--(P) Legend: ' / | J = ... ' / | P = ... ' /d | U = ... ' / | v = ... ' / | d = ... '/ | N = ... (J) | | | |___________________|

    Read the article

  • What would be the simplest way to deal with a text file using JSP?

    - by Nano Taboada
    First and foremost I should acknowledge that I have no experience at all using Java ServerPages, but I'm positive about achieving this task if you guys help me out a bit since it doesn't seem like something difficult for a seasoned JSP programmer. Anyway the thing is, there's an actual running JSP application within a *NIX box which I somewhat administer with kind of good permissions. The idea is to create a new but dead simple JSP page to control some Korn Shell scripts I've got running there. So the goal is to make some sort of HTML form that will be writing some kind of scriptStatus.on / scriptStatus.off file: #!usr/bin/ksh # coolScript.sh # This is my cool script that is being launched by cron every 10 minutes. if [ -e scriptStatus.off ] then # monitor disabled else # monitor enabled fi which then can be checked for existence within the running script, therefore allowing to easily activate / deactivate it without actually have do deal with cron. Please let me know if all this does make any sense and don't hesitate to ask as much questions as needed. Thanks much in advance!

    Read the article

  • Badword filter in PHP?

    - by morpheous
    I am writing a badword filter in PHP. I have a list of badwords in an array and the method cleanse_text() is written like this: public static function cleanse_text($originalstring){ if (!self::$is_sorted) self::doSort(); return str_ireplace(self::$badwords, '****', $originalstring); } This works trivially, for exact matches, but I wanted to also censor words that have been disguised like 'ab*d' where 'abcd' is a bad word. This is proving to be a bit more difficult. Here are my questions: Is a badword filter worth bothering with (it is a site for professionals so a certain minimum decorum is required - I would have thought) Is it worth the hustle of trying to capture obvious work arounds like 'f*ck' - or should I not attempt to filter those out. Is there a better way of writing the cleanse_text() method above?

    Read the article

  • Translate This git_parse_function to zsh?

    - by yar
    I am using this function in Bash function parse_git_branch { git_status="$(git status 2> /dev/null)" pattern="^# On branch ([^${IFS}]*)" if [[ ! ${git_status}} =~ "working directory clean" ]]; then state="*" fi # add an else if or two here if you want to get more specific if [[ ${git_status} =~ ${pattern} ]]; then branch=${BASH_REMATCH[1]} echo "(${branch}${state})" fi } but I'm determined to use zsh. While I can use this perfectly as a shell script (even without a shebang) in my .zshrc the error is a parse error on this line if [[ ! ${git_status}}... What do I need to do to get it ready for zshell? Note: I realize the answer could be "go learn zsh syntax," but I was hoping for a quick hand with this if it's not too difficult.

    Read the article

  • GWT: Loading different UI's based on URL

    - by jmccartie
    Trying to get a GWT project off the ground and finding it difficult to do any basic routing. Trying to fire up different UI's based on the URL. Thought I could set a string based on the getHash() and then switch off that, but seems cumbersome (and annoying since I can't do string-based switches in Java). There's got to be a best practice for this. I know Gerrit uses hashes for determining this type of information but couldn't find where they do it in the source. Or is this totally not GWT-related? Something I can handle in web.xml? Any help is much appreciated.

    Read the article

  • Creating a blocked user intercepter in Grails

    - by UltraVi01
    I am working on a social site where users can block other users. Throughout the site --dozens of places, user information is displayed. For example, user comments, reply forms, online user list.. etc etc.. The problem is that given the high number of places user info is displayed, it's becoming very difficult to check each time if that user is blocked. For example: <g:each var="comment" in="${comments}"> <g:if test="!${loggedInUser.blockedUsers.find { it == comment.user}"> show comment </g:if> </g:each> Does Grails provide any functionality that would facilitate creating some kind of filter or intercepter where I could simply exclude blocked users when iterating lists, etc? If not, what would you suggest I do?

    Read the article

  • Examples of both beautiful and ugly java code?

    - by tputkonen
    I would like to demonstrate how difficult it is for a layman to identify high quality code from flawed code. I'm thinking of doing this with the help of two java methods. Both of the methods should look like they do the same, pretty simple thing. However one of them should have several kind of flaws, for example: iteration with array off by one error string concatenations causing lots of objects to be created (as opposed to StringBuffer in the "good" code, which looks more complicated) possibly null pointer exception (but it should not be trivial to spot) Those are just some examples, all kinds of other issues including bugs and performance related structures are highly appreciated. Methods should be around 10-20 lines of length, and the task they do should be something simple - preferably printing something in an iteration.

    Read the article

  • New to Android I want to know more about it

    - by Lavan
    Well,Hello Everyone.I'am just 14 years old.I want to be a part of Android's Development. But were do I start.What should I learn? What are necessary Qualification to be a Part of Android's Development. Things what I know Basic PHP, HTML, PhotoShop, Video Editing, Basic Security and Fraud related matters, Some Microsoft Office Tools, Maya(Modelling only), Web Development, Dreamweaver, Blogging and Pawno (For Game Scripts..C Based Language) I hope that's all. I do things (for programming)without knowing about the basics it has. I feel difficult to understand the guides in android.com . I want a Step by Step guide. Thank you, Lavan

    Read the article

  • i want to start my own software/consulting company...ohhh the dilemma [closed]

    - by Andreas
    I know this is may not be the right place to ask this sort of question,,on the other hand i am sure that it maybe the best...as many of you own a startup. I've been in the industry since 2006, mostly in consulting/business system analysis/project management jobs, not so much coding etc, and although i like working for the companies i am in at the moment...i daily think of starting up something on my own, consulting company,a software company with a good product, but it's the dilemma of making the first step, havent got much money saved up, i have a mortgage and about to start a family so as you can see it's difficult to let the security of a job and take the risk to just do it.... I am sure many of you have been in this dilemma, how did you start off? advice is greatly appreciated Andy

    Read the article

  • trigger OS to copy (ctrl+c or Ctrl-x) programicly

    - by Crash893
    I'm working on a program to trigger cut and pastes Pastes i have no problem with (i just dump a string into the clipboard) Cut and or Copys are proving to be a little more difficult The program i have is out of focus and has several hot keys registered with the os ( ctrl+alt+2 ctrl+alt+3 etc) that i want to use to trigger Windows to copy anything that is highlighted in the window that is focused I tried doing a sendkeys SendKeys.Send("^c"); but that seems to work once or twice if at all then stop working. is there a better way to try to trigger windows into coping highlighted content on a different window

    Read the article

  • android spectrum analysis of streaming input

    - by TheBeeKeeper
    for a school project I am trying to make an android application that, once started, will perform a spectrum analysis of live audio received from the microphone or a bluetooth headset. I know I should be using FFT, and have been looking at moonblink's open source audio analyzer ( http://code.google.com/p/moonblink/wiki/Audalyzer ) but am not familiar with android development, and his code is turning out to be too difficult for me to work with. So I suppose my questions are, are there any easier java based, or open source android apps that do spectrum analysis I can reference? Or is there any helpful information that can be given, such as; steps that need be taken to get the microphone input, put it into an fft algorithm, then display a graph of frequency and pitch over time from its output? Any help would be appreciated, thanks.

    Read the article

  • Can I prevent a user from using windows task manager to end a process?

    - by Russ
    I have a c# 4.0 application that I hear grumblings and rumors about problems with. Now, this application has a global unhandled exception handler that reports back to me with errors. I also know that it works because SOME people fill it in, and submit it. It seems though; that a large number of people do NOT fill it in, but instead, use the Windows Taskmanager to end the process. Is it possible to prevent a user from using the Windows Taskmanager to end a specific process? My goal would be that if the application crashes, the form that the user is presented with prevents the process from being ended. I'll also accept steps that would prevent the Windows Taskmanager from being launched. I know I have seen some processes come up with an "Access Denied" prompt when I try to kill it in TaskManager, however I suspect that the windows team has made this very difficult, if not impossible to achieve.

    Read the article

  • What is the best way to write faster on Vim using a non-english keyboard?

    - by Martín Fixman
    I usually use Vim, and its great for the ability to do faster some actions than other editors. However, since I live in Argentina I have a Latin American keyboard, that makes everything in Vim pretty slower (to write / to search, I must press Shift+7). Since I don't want to be changing Keyboard layouts all the time (and its pretty difficult to get used to pressing symbols as in an English keyboard), I was wondering if there was a vim plugin (of .vimrc file) that may be useful for international users. Just for the sake of it, here's how the Latin American keyboard is laid out: By the way, I would love to go and buy an English keyboard, but unfortunately I use a Laptop.

    Read the article

  • jQuery sanitizing comments and linkifying URLs

    - by iWasRobbed
    In terms of jQuery (or Javascript), what happens behind the scenes when a person posts a comment on Facebook, Twitter, or a blog? For instance, do they sanitize the text first, and then pattern match URL's into an actual link? Are there other items of concern that the client-side should check in addition to doing some checks on the backend? I have found a few regex's for turning URL's into links, but I'm not sure if there are better solutions. I'm trying to wrap my head around the problem, but I'm having a difficult time knowing where to start. Any guidance you can provide is greatly appreciated!

    Read the article

  • Suppress checking for changes on file system in Eclipse RCP

    - by panschk
    Okay, I guess this question is too difficult, but it's worth a try. I have an eclipse RCP application that edits HTML-files. I deal with the content of the files only in a W3C-Dom representation. There is some stuff that I can not do with that, so I the program edits each file each time after it is saved (save, save as). Of course, the file is then out of synch with the file system, and the next time I touch it, eclipse complains: "The file has been changed on the file system. Do you want to replace the editor contents with these changes? (Yes/No)" I do not want to load the changes into the editor ("No") Maybe there is a way to tell Eclipse programmatically to not check that file for changes, or to configure it to not check for changes on any file? edit: Everything has to be done either programatically or by editing some XML files. I can not expect the user to do anything;-)

    Read the article

  • Visualizing branch topology in git

    - by Benjol
    I'm playing with git in isolation on my own machine, and even like that I find it difficult to maintain a mental model of all my branches and commits. I know I can do a git log to see the commit history from where I am, but is there a way to see the entire branch topography, something like these ascii maps that seem to be used everywhere for explaining branches? .-A---M---N---O---P / / / / / I B C D E \ / / / / `-------------' It just feels like someone coming along and trying to pick up my repository would have difficulty working out exactly what was going on. I guess I'm influenced by AccuRev's stream browser...

    Read the article

  • Concatenating Strings in Obj C

    - by eco_bach
    Hi It seems that Objective C jumps thru hoops to make seemingly simple tasks extremely difficult. I simply need to create a sequence of strings, image1.jpg, image2.jpg, etc etc ie in a loop var imgString:String='image'+i+'.jpg; I assume a best practice is to use a NSMutableString with appendString method? What am I doing wrong?? NSMutableString *imgString; for(int i=1;i<=NUMIMAGES;i++){ imgString.appendString(@"image"+i+@".jpg"); } I get the following error error: request for member 'appendString' in something not a structure or union

    Read the article

  • How to generate random strings that match a given regexp?

    - by Pies
    Duplicate: Random string that matches a regexp No, it isn't. I'm looking for an easy and universal method, one that I could actually implement. That's far more difficult than randomly generating passwords. I want to create an application that takes a regular expression, and shows 10 randomly generated strings that match that expression. It's supposed to help people better understand their regexps, and to decide i.e. if they're secure enough for validation purposes. Does anyone know of an easy way to do that? One obvious solution would be to write (or steal) a regexp parser, but that seems really over my head. I repeat, I'm looking for an easy and universal way to do that. Edit: Brute force approach is out of the question. Assuming the random strings would just be [a-z0-9]{10} and 1 million iterations per second, it would take 65 years to iterate trough the space of all 10-char strings.

    Read the article

  • Makefile automatic link dependency ?

    - by Kuang Chen
    It's easy to let program figure out the dependency at compile time, (with gcc -MM). Nevertheless, link dependency (deciding which libraries should be linked to) seems to be difficult to figure out. This issue become emergent when multiple targets with individual libraries to link to are needed. For instance, three dynamic library targets t1.so, t2.so and t3.so needs to be built. t1.so needs math library (-lm), while t2 and t3 don't. It would be tedious to write separate rules. A single rule requiring the three targets linked with math library saves the trouble. However, it causes inflation of target size since math library is unused for t2.so and t3.so. Any ideas?

    Read the article

  • Creating a computer with pencil and paper [closed]

    - by Justian Meyer
    This concept has been brought to my attention before, but many people might know it from this popular comic here, where he uses stones instead of points on a paper. This concept is so abstract to me. A full-functioning computer that can manage algorithms, input, output, etc. without electricity? Surely, it's difficult to visualize because my definition of a computer is not exactly what the word sounds like COMPUTE-ER. Can someone help me bring the concept to light - the understanding, how to make one, etc? It seems like it'd be an interesting read, although I think I wouldn't be able to make it do anything. Many thanks in advance for responses. I've tried searching Google, but all I got were ways to diagram code and chart ideas. -.Justian.

    Read the article

  • Problems with dynamic programming

    - by xan
    I've got difficulties with understanding dynamic programming, so I decided to solve some problems. I know basic dynamic algorithms like longest common subsequence, knapsack problem, but I know them because I read them, but I can't come up with something on my own :-( For example we have subsequence of natural numbers. Every number we can take with plus or minus. At the end we take absolute value of this sum. For every subsequence find the lowest possible result. in1: 10 3 5 4; out1: 2 in2: 4 11 5 5 5; out2: 0 in3: 10 50 60 65 90 100; out3: 5 explanation for 3rd: 5 = |10+50+60+65-90-100| what it worse my friend told me that it is simple knapsack problem, but I can't see any knapsack here. Is dynamic programming something difficult or only I have big problems with it?

    Read the article

  • indexing for faster search of lists in a file??

    - by kaushik
    i have a file having around 1 lakh lists and have a another file with again a list of around an average of 50.. I want to compare 2nd item of list in second file with the 2nd element of 1st file and repeat this for each of the 50 lists in 2nd file and get the result of all the matching element. I have written the code for all this,but this is taking a lot of time as it need to check the whole the 1lakh list some 50 times..i want to improve the speed... please tell me how can i do this.... i cant not post my code as it is part of big code and will be difficult to infer anything from that... please tell what can be done to improve the speed?? thank u,

    Read the article

  • Should default passwords always be empty?

    - by mafutrct
    I'm currently designing a system that requires an admin to log in using a password. For certain reasons, it is difficult to set this password during installation, but it can be changed later. My idea is this: If I leave the default password empty, it is so horridly insecure that every admin is going to fix this as soon as possible. If I were to use some kind of predefined password instead, admins may think "ah.. nobody would think I've got 'defaultpassword' as my password so it's not very important to change." So the basic thought is to make it so terrible that even the most lazy people are going to do something about it.

    Read the article

  • Program visible to Linux as normal directory

    - by Xam
    I'm trying to write program to work as programmable directory, in other words: User, or other systems open that directory and read/write files or dirs. I try to create program to cache most used files in memory (less I/O to HDD), but right now I don't know how to achive that. There are probably some docs about this but I can't find them. I know that there is FUSE, NFS and others, but reading their source is quite difficult. If any one has info about implementation in C lang I'll be very grateful. Sorry for my English..

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >