Search Results

Search found 14958 results on 599 pages for 'non technical'.

Page 101/599 | < Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >

  • Java - Reading a csv file line by line - stuck with weird non-existent characters being read!

    - by rockit
    hello fellow java developers. I'm having a very strange issue. I'm trying to read a csv file line by line. Im at the point where Im just testing out the reading of the lines. ONly each time that I read a line, the line contains square characters between each character of text. I even saved the file as a txt file in wordpad and notepad with no change. Thus I must be doing something stupid... I have a csv file, standard csv file, yes a text file with commas in it. I try to read a line of text, but the text is all f-ed up and cannot find the phrase within the text. Any advice? code below. //open csv File filReadMe = new File(strRoot + "data2.csv"); BufferedReader brReadMe = new BufferedReader(new InputStreamReader(new FileInputStream(filReadMe))); String strLine = brReadMe.readLine(); //for all lines while (strLine != null){ //if line contains "(see also" if (strLine.toLowerCase().contains("(see also")){ //write line from "(see also" to ")" int iBegin = strLine.toLowerCase().indexOf("(see also"); String strTemp = strLine.substring(iBegin); int iLittleEnd = strTemp.indexOf(")"); System.out.println(strLine.substring(iBegin, iBegin + iLittleEnd)); } //update line strLine = brReadMe.readLine(); } //end for brReadMe.close();

    Read the article

  • How to create a non-persistent Elixir/SQLAlchemy object?

    - by siebert
    Hi, because of legacy data which is not available in the database but some external files, I want to create a SQLAlchemy object which contains data read from the external files, but isn't written to the database if I execute session.flush() My code looks like this: try: return session.query(Phone).populate_existing().filter(Phone.mac == ident).one() except: return self.createMockPhoneFromLicenseFile(ident) def createMockPhoneFromLicenseFile(self, ident): # Some code to read necessary data from file deleted.... phone = Phone() phone.mac = foo phone.data = bar phone.state = "Read from legacy file" phone.purchaseOrderPosition = self.getLegacyOrder(ident) # SQLAlchemy magic doesn't seem to work here, probably because we don't insert the created # phone object into the database. So we set the id fields manually. phone.order_id = phone.purchaseOrderPosition.order_id phone.order_position_id = phone.purchaseOrderPosition.order_position_id return phone Everything works fine except that on a session.flush() executed later in the application SQLAlchemy tries to write the created Phone object to the database (which fortunatly doesn't succeed, because phone.state is longer than the data type allows), which breaks the function which issues the flush. Is there any way to prevent SQLAlchemy from trying to write such an object? Ciao, Steffen

    Read the article

  • Can someone explain an Enterprise Service Bus to me in non-buzzspeak?

    - by Jason Baker
    Some of our partners are telling us that our software needs to interact with an Enterprise Service Bus. After researching this a bit, my instinct is to say that this is just buzz speak for saying that we need to have a platform-indpendent way to pass messages back and forth. I'm just trying to get a feel for what our partners are telling us. Am I correct in dismissing our partners' request as just trying to get our software to be more buzzword-compliant, or are they telling us something we should listen to (even if encoded in buzzspeak)?

    Read the article

  • How do you mentally handle going from writing managed to non-managed code?

    - by Glenn Sandoval
    ~80% of the code I write is in C#. The other ~20% is in C++. Whenever I have to switch from C# to C++, it takes me quite a while to mentally "shift gears" to thinking in C++. I make simple mistakes using pointers and memory allocation that I would not have made when I was in university. Is this normal? Does anyone else experience something similar and if so, what do you do to cut down on the time this wastes?

    Read the article

  • Is it "legal" for C++ runtime to call terminate() when the C++ code is used inside some non-C++ prog

    - by sharptooth
    In certain cases - especially when an exception escapes a destructor during stack unwinding - C++ runtime calls terminate() which must do something reasonable post-mortem and then exit the program. When a question "why so harsh" arises the answer is usually "there's nothing more reasonable to do in such error situations". That sounds reasonable if the whole program is in C++. Now what if the C++ code is in a library and the program that uses the library is not in C++? This happens quite often - for example I might have a native C++ COM component consumed by a .NET program. Once terminate() is called inside the component code the .NET program suddenly ends abnormally. The program author will first of all think "I don't care of C++, why the hell is this library make my program exit?" How do I handle the latter scenario when developing libraries in C++? Is it reasonable that terminate() unexpectedly ends the program? Is there a better way to handle such situations?

    Read the article

  • Attach 1 or more (non image) files to rails application, with having to install an image-processing

    - by Hinchy
    Hi all, I'm currently learning rails by creating a simple project management app. I've gotten to the point where I would like to be allow a user upload multiple files - pdfs, docs, xls etc. The user only needs to be able to attach one file at a time, but the possibilty to have multiple documents associated with a project is a must. I've spent quite a lot of time researching my options, and it appears the two main plugins are attachment_fu and paperclip. From what I've read though, these appear to concentrate specifically on the upload and subsequent resizing of images, something I couldn't care less about. Is there a simpler way to achieve what I'm trying? Thank you all in advance.

    Read the article

  • Any way to specify a non-positional parameter in a powershell script?

    - by Julian Birch
    I've got the following at the start of a script Param( [string]$command, [string]$version = "1.1.0" ) This is fine, only I need for $version to not be a positional parameter, so that if you type .\script.ps1 run argument Then $args should contain argument and $version should be 1.1.0. Is this even possible? I know I can do it with a c# cmdlet, but it would be massively more convenient if I could deliver this as a single script.

    Read the article

  • allow editing of config files by WIndows Server 2008 admins running non-elevated?

    - by Justin Grant
    My company produces a cross-platform server application which loads its configuration from user-editable configuration files. On Windows, config files are locked down at Setup time to allow reading by all users but restrict editing to Administrators only. Unfortunately, on Windows Server 2008, even local administrators no longer have admin privileges (because of UAC) unless they're running an elevated app. My question is: if a Windows Server 2008 admin wants to edit an admins-only config file, how does he normally do it? Is he forced to use a text editor which is smart enough to auto-elevate when elevation is needed, like Windows Explorer does in response to access denied errors? Or is there something that we can do in our app (e.g. in ACLs we lay down at setup time) which signal apps (or explorer) that elevation is needed before editing the file or which otherwise make our app friendlier to admins running on modern Windows OS's?

    Read the article

  • What encoding does Flash Builder use to send non-English data to servers?

    - by Ole Jak
    In my site I use Unicode... I hoped when I'll connect Flash Builder to my server (using Data - connect to HTTP ) It will work with my API sending Russian text as UTF-8 but instead it sends Þûõó ïúушúøý to my API and so to DB and so on instead of my favourite UTF-8 &#1056;&#1091;&#1089;&#1089;&#1082;&#1086;&#1077; &#1048;&#1084;&#1103; 2... So what encoding uses flash builder and How to make Flash Application send UTF-8 data to my server or some other readable format?

    Read the article

  • How to map non-REST URLS to REST ones?

    - by Krzysztof Luks
    I have a small rails app that has default scaffold generated routes eg. /stadia/1.xml. However I have to support legacy client app that can't construct such URLs correctly. What I need to do is to map URL in the form: /stadia?id=1?format=xml to /stadia/1.xml Or even something like: /myApp?model=<model_name>?id=<id>?format=xml to /<model_name/<id>.xml Is it possible to craft appropriate route in Rails?

    Read the article

  • How to display a non-model, temporary pop-up message in Android?

    - by chefgon
    For an example of what I'm looking for, hit the Home button while you're composing a message in the Gmail app. A little message will pop up at the bottom of the screen for a moment that says "Message saved as Draft." I can't figure out how to display one of those messages myself, and I'm not sure what to call it so I can't do a search for it.

    Read the article

  • Codeigniter error logs show a 404 non-existing images directory...need to worry?

    - by user342199
    I've recently started logging my errors through codeIgniter. Since doing so, I have noticed a lot of 404 errors for directories that don't exist. For example: ERROR - 2010-05-15 21:06:26 -- 404 Page Not Found -- someController/images Where someController is, obviously, a controller. The problem is, there are no functions within that controller called images, nor are there any links to a directory by that name. Could this be that someone is trying to hack my site? If so, do I need to worry? If not, why is this happening? Thanks, and forgive the newby-ness.

    Read the article

  • How can I make text in a UILabel non-centered?

    - by Sheehan Alam
    I have a UILabel: descriptionLabel = [[UILabel alloc] initWithFrame:CGRectMake(200, 30, 130, 150)]; [descriptionLabel setFont:[Utils getSystemFontWithSize:14]]; [descriptionLabel setBackgroundColor:[UIColor clearColor]]; [descriptionLabel setTextColor:[UIColor whiteColor]]; descriptionLabel.numberOfLines = 0; descriptionLabel.lineBreakMode = UILineBreakModeWordWrap; [self addSubview:descriptionLabel]; If the text is only 1 line long it will appear in the middle of the label. Is there anyway I can have the text display from the top left corner of the label instead of the middle center?

    Read the article

  • How to raise an error, if the parsed number of a C++ stdlib stream is immediatly followed by a non whitespace character?

    - by Micha Wiedenmann
    In the following example, I didn't expect, that 1.2345foo would be parsed. Since I am reading data files, it is probably better to raise an error and notify the user. Is peek() the correct thing to do here? #include <iostream> #include <sstream> int main() { std::stringstream in("1.2345foo"); double x; in >> x; if (in) { std::cout << "good\n"; } else { std::cout << "bad\n"; } } Output good

    Read the article

  • Prevent duplicate rows with all non-unique columns (only with MySQL)?

    - by letseatfood
    Ho do I prevent a duplicate row from being created in a table with two columns, neither of which are unique? And can this be done using MySQL only, or does it require checks with my PHP script? Here is the CREATE query for the table in question (two other tables exist, users and roles): CREATE TABLE users_roles ( user_id INT(100) NOT NULL, role_id INT(100) NOT NULL, FOREIGN KEY (user_id) REFERENCES users(user_id), FOREIGN KEY (role_id) REFERENCES roles(role_id) ) ENGINE = INNODB; I would like the following query, if executed more than once, to throw an error: INSERT INTO users_roles (user_id, role_id) VALUES (1, 2); Please do not recommend bitmasks as an answer. Thanks!

    Read the article

  • how to fetch more than 1000 entities NON keybased?

    - by user291071
    If I should be approaching this problem through a different method, please suggest so. I am creating an item based collaborative filter. I populate the db with the LinkRating2 class and for each link there are more than a 1000 users that I need to call and collect their ratings to perform calculations which I then use to create another table. So I need to call more than 1000 entities for a given link. For instance lets say there are over a 1000 users rated 'link1' there will be over a 1000 instances of this class for the given link property that I need to call. How would I complete this example? class LinkRating2(db.Model): user = db.StringProperty() link = db.StringProperty() rating2 = db.FloatProperty() query =LinkRating2.all() link1 = 'link string name' a = query.filter('link = ', link1) aa = a.fetch(1000)##how would i get more than 1000 for a given link1 as shown? ##keybased over 1000 in other post example i need method for a subset though not key class MyModel(db.Expando): @classmethod def count_all(cls): """ Count *all* of the rows (without maxing out at 1000) """ count = 0 query = cls.all().order('__key__') while count % 1000 == 0: current_count = query.count() if current_count == 0: break count += current_count if current_count == 1000: last_key = query.fetch(1, 999)[0].key() query = query.filter('__key__ > ', last_key) return count

    Read the article

  • What's the non brute force way to filter a Python dictionary?

    - by Thierry Lam
    I can filter the following dictionary like: data = { 1: {'name': 'stackoverflow', 'traffic': 'high'}, 2: {'name': 'serverfault', 'traffic': 'low'}, 3: {'name': 'superuser', 'traffic': 'low'}, 4: {'name': 'mathoverflow', 'traffic': 'low'}, } traffic = 'low' for k, v in data.items(): if v['traffic'] == traffic: print k, v Is there an alternate way to do the above filtering?

    Read the article

  • Is it possible, in ASP .net, to reference private assembly in a non-virtual subdirectory?

    - by Bago
    Is it possible to reference a private assembly in asp .net from a sub-folder that is not setup as a virtual directory? In other words, my page is setup in ~/subdir, I don't have access to ~/, and I am not an IIS admin. Can I reference a private assembly? How would I do this? I've tried <%@ Assembly Src="/subdir/bin/Assembly.dll % and <%@ Assembly Src="/subdir/bin/Assembly.dll % , but I get the messages "There is no build provider to match the extension .dll" or "Failed to map to path" respectively. Here is my folder structure: / | -subdir | | - Bin | | | *Assembly.dll | | *Default.aspx I've heard that in web.config might do the trick, but when I've tried it, it doesn't seem to work. Furthermore, I've read that only works in the application .config file. (i.e., the one in ~/). Anyhow, I already tried adding the following to web.config: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="/subdir/bin" /> <dependentAssembly> <codeBase href="/subdir/bin/Assembly.dll"/> </dependentAssembly> </assemblyBinding> For more background on my problem, I am simply using a shared host, all I have is access to is that subdirectory, and I am trying to use fckeditor.

    Read the article

  • Is it possible, in ASP.net, to reference private assembly in a non-virtual subdirectory?

    - by Bago
    Is it possible to reference a private assembly in asp .net from a sub-folder that is not setup as a virtual directory? In other words, my page is setup in ~/subdir, I don't have access to ~/, and I am not an IIS admin. Can I reference a private assembly? How would I do this? I've tried <%@ Assembly Src="/subdir/bin/Assembly.dll % and <%@ Assembly Src="/subdir/bin/Assembly.dll % , but I get the messages "There is no build provider to match the extension .dll" or "Failed to map to path" respectively. Here is my folder structure: / | -subdir | | - Bin | | | *Assembly.dll | | *Default.aspx I've heard that in web.config might do the trick, but when I've tried it, it doesn't seem to work. Furthermore, I've read that only works in the application .config file. (i.e., the one in ~/). Anyhow, I already tried adding the following to web.config: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="/subdir/bin" /> <dependentAssembly> <codeBase href="/subdir/bin/Assembly.dll"/> </dependentAssembly> </assemblyBinding> For more background on my problem, I am simply using a shared host, all I have is access to is that subdirectory, and I am trying to use fckeditor.

    Read the article

  • What do you call a generalized (non-GUI-related) "Model-View-Controller" architecture?

    - by dcuccia
    I am currently refactoring code that coordinates multiple hardware components for data acquisition, and feeling a bit like I'm recreating the wheel. In particular, an MVC-like pattern seems to be emerging. Except, this has nothing to do with a GUI and I'm worried that I'm forcing this particular pattern where another might be more appropriate. Here's my scenario: Individual hardware "component" classes obey interface contracts for each hardware type. Previously, component instances were orchestrated by a single monolithic InstrumentController class, which relied heavily on configuration + branching logic for executing a specific acquisition sequence. After an iteration, I have a separate controller for each component, with these controllers all managed by a small InstrumentControllerBase (or its derivatives). The composite system will receive "input" either programmatically or via inter-hardware component triggering - in either case these interactions are routed to, and handled by, the appropriate controller. So, I have something that feels MVC-esque, but I don't know if that's because I'm forcing the point. With little direct MVC experience in application development, it's hard to know if I'm just trying to make my scenario fit MVC, where another pattern might be a good alternative or complimentary. My problem is, search results and wiki documentation of these family of patterns seems to immediately drop me into GUI-specific discussions. I understand "M means Model data and the V means View" - but do you call the superset pattern? Component-Commander-Controller? Whence can I exhume examples exemplary?

    Read the article

< Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >