Daily Archives

Articles indexed Thursday March 18 2010

Page 14/133 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Japanese character stored in SQL Server DB using ASP page that assumed it as ISO-8859-1 encoding

    - by Vishal Seth
    We have a legacy ASP based product that allowed the UI and Data languages of user groups to be configured according to their locations. CodePage and CharSet in ASP pages collecting data was set accordingly. I've noticed few instances in the SQL Server DB where users posted Japanese characters in the ASP page that assumes the oncoming stream to be of ISO-8859-1/Western and as a result, the data in the SQL table has gobbled up. While upgrading the client to our new product, I want to back-convert those "garbage" Japanese (in some instances Chinese) characters back to their actual form. Can I create some utility ASP page that would go through such data values and "fix" the wrongly-encoded strings and store everything back as utf-8 strings? In any case, I don't want to affect my French/Spanish/English characters that might be there as well.

    Read the article

  • Line breaks in "NSString"s returned from PList don't work.

    - by Moshe
    I've seen this post: http://stackoverflow.com/questions/2035567/nsstring-newline-escape-in-plist but I'd like to know if there's a way to pragmatically render \n line breaks. I'm currently using: decisionText.text = [NSString stringWithFormat: (@"%@", [replies objectAtIndex:(arc4random() % [replies count])])]; Which randomly grabs a String from the replies array. The array was loaded from a plist like so: replies = [[NSMutableArray alloc] initWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"AdviceList" ofType:@"plist"]]; What am I missing? The answer can't be to manually enter line breaks. That's not programming! (Sounds like word processing to me.)

    Read the article

  • Reading a file from a jar, or anywhere on the classpath?

    - by Stefan Kendall
    I'm trying to build an application that builds a resource file into a jar, but I'd like to have the project runnable within eclipse. I have a basic maven 2 structure for my project, and I'm unsure how to read in the file such that it's found and used when run from the JAR or from within eclipse. Thought? Structure: src/main/java src/main/resources/file.txt Current reading method: getClass().getResourceAsStream("/file.txt") Is there reading method that will pick up src/main/resources/*, as well as the root level of the JAR (where resources are deployed)?

    Read the article

  • Can I redistribute Phing with non-free software?

    - by Matt1776
    I am having trouble understanding the terms of the LGPL in light of a program that is not written in C or C++. They speak of libraries being linked and 'derivitive' works. If I were to package a php program and sell it, but within the program the deployment mechanism used the phing package (full up with the entire contents as is and un modified) - would I be violating the terms of the LGPL? For example, If this was a C program that was compiled by linking the phing 'library' then the answer would be easier, it is a derivitive work and therefore unless released under the GPL will not be considered free and also a violation. But this situation is different. I am not linking and not producing a derivitive, i am simply using phing as a deployment tool to move files around and set up the enviornment. Can someone shed some light? Thank you!

    Read the article

  • R looking for the wrong java version

    - by Veit
    Hi, I installed/uninstalled java jre/jdk now many times and finally installed the older version 1.6.0_17 which is now located at "C:\Program Files\Java\jre6\bin". Now after all if I call 'java -version' within R i can see that R is looking for Java at the old path which is now wrong. The question is: Why is R looking for Java at the wrong path even so the windows path is set correctly? There are no double entrys within the windows path as far as I can see and I restarted R as well as Windows more then once since then. Any Ideas where R takes the wrong path from? On windows shell: $set [..] OS=Windows_NT Path=C:\Program Files\Java\jre6\bin; [..] $ java -version java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode) within R: $system("java -version") Error: could not open `C:\Program Files (x86)\Java\jre6\lib\i386\jvm.cfg'

    Read the article

  • Dual DVI and VGA Out

    - by Michael
    I am wanting to add a third monitor with one graphic card. I have been told that a DVI to Dual DVI will display separate views. Right now I do DVI and VGA out. If I get a DVI to Dual DVI out will my VGA still work? Thanks

    Read the article

  • AutoAudit 1.10c

    - by Paul Nielsen
    AutoAudit is a free SQL Server (2005, 2008) Code-Gen utility that creates Audit Trail Triggers with: · Created, Modified, and RowVersion (incrementing INT) columns to table · Creates View to reconstruct deleted rows · Creates UDF to reconstruct Row History · Schema Audit Trigger to track schema changes · Re-code-gens triggers when Alter Table changes the table Version 1.10c Adds: · Createdby and ModifiedBy columns. Pass the user to the column and AutoAudit records that username instead of the Suser_Sname...(read more)

    Read the article

  • Crontab no error but doesn't execute script

    - by crontabOnFreebsd
    I'm trying to execute a shell script from cron on Freebsd. To test wether crontab is working at all, i wrote the line * * * * * echo "Hello" /home/myuser/logile and it work fine. But when trying to execute any script it doesn't do anything, not even an error. (In the script i tried to run is just the same echo command) Below is the output of crontab -l: SHELL=/bin/sh PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin HOME=/home/myuser MAILTO=myuser * * * * * /home/myuser/shellscript.sh /home/myuser/logfile why is the script not getting executed, although crontab is obviously running? permission for all files are set to rwxr-xr-x

    Read the article

  • JSon/Jquery request with a setTimeout always returns a "null" result? (for Twitter Search API)

    - by supermogx
    I make a call to the twitter API. 100 posts are retreived + a properties that tells me what the next page to call is. So I wait 5 sec. and call that next page, but the JSon results in the callback function is always null the second time... I think it's probably a JQuery problem... Here's a complete sample HTML code : <html> <head> <script type="text/javascript" src="./jquery-1.4.2.min.js"></script> <script> function test() { var rqUrl = "http://search.twitter.com/search.json?q=%23apple+OR+%23ipad&rpp=100&callback=?" callTwitterSearchApi(rqUrl); } function callTwitterSearchApi(tiwtterRequestUrl) { debug("request to twitter : " + tiwtterRequestUrl); // *** FIRST CALL WORKS GREAT... *** $.getJSON(tiwtterRequestUrl, callTwitterSearchApi_callback); } function callTwitterSearchApi_callback(jsonPostsResults) { debug("callback"); if (jsonPostsResults == null) { debug("Why is jsonPostsResults null? If I copy paste the request inside a browser, I get something =("); return; } if (jsonPostsResults.error != undefined && jsonPostsResults.error != "") { debug("twitter api error"); } var posts = new Array(); $(jsonPostsResults.results).each(function() { posts.push(this); }); debug("Number of posts : " + posts.length); if (jsonPostsResults.next_page != undefined && jsonPostsResults.next_page.trim() != "") { debug("calling next request in 5 sec..."); // *** WHEN COMMING BACK FROM THAT LINE, JSON RESULTS == NULL?! **** setTimeout("callTwitterSearchApi(\"http://search.twitter.com/search.json" + jsonPostsResults.next_page + "\")", 5000); } } function debug(message) { document.getElementById('debug').innerHTML = message + "\n" + document.getElementById('debug').innerHTML; } </script> </head> <body> <input type="button" onclick="test();" value="test" /><br /> <textarea id="debug" cols="80" rows="20"></textarea> </body> </html> at line 18, at the second callback (back from the setTimeout), the parameter "jsonPostsResults" is always returned as null... I have no idea why. If I copy paste that 2nd request in a browser, it returns 100 results. Anybody had a problem like that with the Ajax JQuery functions when calling it with a setTimeout?

    Read the article

  • How can Safari be prevented from scrolling an overflow:hidden iframe?

    - by Alexander Ljungberg
    With Safari you can disable most iframe scrolling by setting style="overflow: hidden;" on the iframe. However, if you click in the iframe and move the mouse the content scrolls anyhow. Example: <html> <body> <iframe style="width: 100%; height:100px; overflow: hidden;" scrolling="no" src="scrollcontent.html"> </iframe> </body> </html> scrollcontent.html: <html scroll="no" style="overflow:hidden;"> <body scroll="no" style="overflow:hidden;"> <div style="background-color: green; height:100px;">A</div> <div style="background-color: red; height:100px;">B</div> </body> </html> In this example, the iframe should only show a green area and it should be impossible to reveal the red area. This is mostly true: there is no scrollbar, the mouse wheel doesn't do anything and neither do the arrow keys. However click and drag still scrolls the view. This is particularly noticeable when selecting text. Does anyone know any trick to stop Safari from doing this?

    Read the article

  • Bottom of page gets cut off in Safari

    - by VUELA
    I can't figure out why this page: http://wohf.squarespace.com/newsletter/ gets cut off at the bottom in safari, seems to work fine in all other browsers (as far as I found so far)!! I am using some jquery and css for the sidebar and the content to match heights and for the canvas to run top to bottom with the footer always at the very bottom of the page. everything is working (as far as I can tell so far) on the rest of the site, the problem is only on this newsletter page and only in safari. Can anyone see the problem?

    Read the article

  • What's the best SOAP client library for Python, and where is the documentation for it?

    - by blackrobot
    I've never used SOAP before and I'm sort of new to Python. I'm doing this to get myself acquainted with both technologies. I've installed SOAPlib and I've tried to read their Client documentation, but I don't understand it too well. Is there anything else I can look into which is more suited for being a SOAP Client library for Python? Edit: Just in case it helps, I'm using Python 2.6.

    Read the article

  • Magento- custom attribute causes blank order number.

    - by frank
    Hi- I created a simple custom attribute on the sales/order entity. Now, for new orders, order number is null. I looked at the sales_order table, and sure enough, increment_id is null... can anyone help me out, I am stumped? This is my setup.php: `public function getDefaultEntities() { return array( 'order' => array( 'entity_model' => 'sales/order', //'attribute_model' => 'catalog/resource_eav_attribute', 'table' => 'sales/order', 'attributes' => array( 'pr_email_sent' => array( 'label' => 'prEmailSent', 'type' => 'varchar', 'default' => 'false' ), ) ) ); }` This is my config.xml <fieldsets> <sales_order> <pr_email_sent><create>1</create><update>1</update></pr_email_sent> </sales_order> </fieldsets> Thanks.

    Read the article

  • Select the Initial Text in a Silverlight TextBox

    - by Dan Auclair
    I am trying to figure out the best way to select all the text in a TextBox the first time the control is loaded. I am using the MVVM pattern, so I am using two-way binding for the Text property of the TextBox to a string on my ViewModel. I am using this TextBox to "rename" something that already has a name, so I would like to select the old name when the control loads so it can easily be deleted and renamed. The initial text (old name) is populated by setting it in my ViewModel, and it is then reflected in the TextBox after the data binding completes. What I would really like to do is something like this: <TextBox x:Name="NameTextBox" Text="{Binding NameViewModelProperty, Mode=TwoWay}" SelectedText="{Binding NameViewModelProperty, Mode=OneTime}" /> Basically just use the entire text as the SelectedText with OneTime binding. However, that does not work since the SelectedText is not a DependencyProperty. I am not completely against adding the selection code in the code-behind of my view, but my problem in that case is determining when the initial text binding has completed. The TextBox always starts empty, so it can not be done in the constructor. The TextChanged event only seems to fire when a user enters new text, not when the text is changed from the initial binding of the ViewModel. Any ideas are greatly appreciated!

    Read the article

  • Java InputReader. Detect if file being read is binary?

    - by Trizicus
    I had posted a question in regards to this code. I found that JTextArea does not support the binary type data that is loaded. So my new question is how can I go about detecting the 'bad' file and canceling the file I/O and telling the user that they need to select a new file? class Open extends SwingWorker<Void, String> { File file; JTextArea jta; Open(File file, JTextArea jta) { this.file = file; this.jta = jta; } @Override protected Void doInBackground() throws Exception { BufferedReader br = null; try { br = new BufferedReader(new FileReader(file)); String line = br.readLine(); while(line != null) { publish(line); line = br.readLine(); } } finally { try { br.close(); } catch (IOException e) { } } return null; } @Override protected void process(List<String> chunks) { for(String s : chunks) jta.append(s + "\n"); } }

    Read the article

  • Window message procedures in Linux vs Windows

    - by mizipzor
    In Windows when you create a window, you must define a (c++) LRESULT CALLBACK message_proc(HWND Handle, UINT Message, WPARAM WParam, LPARAM LParam); to handle all the messages sent from the OS to the window, like keypresses and such. Im looking to do some reading on how the same system works in Linux. Maybe it is because I fall a bit short on the terminology but I fail to find anything on this through google (although Im sure there must be plenty!). Is it still just one single C function that handles all the communication? Does the function definition differ on different WMs (Gnome, KDE) or is it handled on a lower level in the OS? Edit: Ive looked into tools like QT and WxWidgets, but those frameworks seems to be geared more towards developing GUI extensive applications. Im rather looking for a way to create a basic window (restrict resize, borders/decorations) for my OGL graphics and retrieve input on more than one platform. And according to my initial research, this kind of function is the only way to retrieve that input. What would be the best route? Reading up, learning and then use QT or WxWidgets? Or learning how the systems work and implement those few basic features I want myself?

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >