Daily Archives

Articles indexed Sunday June 13 2010

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

  • Community based translating system

    - by mike
    Since we don't funds to hire translators for getting multiple languages translated we want the community to do the translation for us. Its a social network. I can't find any good open souce framework to auto do this. Thinking something like: User selects a language, system displays random sentences and user will translate it. Then other users can vote on how good it is. If it's 100 votes + with 95% yes then it becomes official. Site is in PHP. Any ideas?

    Read the article

  • arrayListOutOfBoundsException... Please Help?

    - by Jacob
    This is my class Debugger. Can anyone try and run it and see whens wrong? Ive spent hours on it already. :( public class Debugger { private String codeToDebug = ""; public Debugger(String code) { codeToDebug = code; } /** * This method itterates over a css file and adds all the properties to an arraylist */ public void searchDuplicates() { boolean isInside = false; ArrayList<String> methodStorage = new ArrayList(); int stored = 0; String[] codeArray = codeToDebug.split(""); try { int i = 0; while(i<codeArray.length) { if(codeArray[i].equals("}")) { isInside = false; } if(isInside && !codeArray[i].equals(" ")) { boolean methodFound = false; String method = ""; int c = i; while(!methodFound) { method += codeArray[c]; if(codeArray[c+1].equals(":")) { methodFound = true; } else { c++; } } methodStorage.add(stored, method); System.out.println(methodStorage.get(stored)); stored++; boolean stillInside = true; int skip = i; while(stillInside) { if(codeArray[skip].equals(";")) { stillInside = false; } else { skip++; } } i = skip; } if(codeArray[i].equals("{")) { isInside = true; } i++; } } catch(ArrayIndexOutOfBoundsException ar) { System.out.println("------- array out of bounds exception -------"); } } /** * Takes in String and outputs the number of characters it contains * @param input * @return Number of characters */ public static int countString(String input) { String[] words = input.split(""); int counter = -1; for(int i = 0; i<words.length; i++){ counter++; } return counter; } public static void main(String[] args) { Debugger h = new Debugger("body {margin:;\n}"); h.searchDuplicates(); } }

    Read the article

  • subsonic.migrations and Oracle XE

    - by andrecarlucci
    Hello, Probably I'm doing something wrong but here it goes: I'm trying to create a database using subsonic.migrations in an OracleXE version 10.2.0.1.0. I have ODP v 10.2.0.2.20 installed. This is my app.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" requirePermission="false"/> </configSections> <connectionStrings> <add name="test" connectionString="Data Source=XE; User Id=test; Password=test;"/> </connectionStrings> <SubSonicService defaultProvider="test"> <providers> <clear/> <add name="test" type="SubSonic.OracleDataProvider, SubSonic" connectionStringName="test" generatedNamespace="testdb"/> </providers> </SubSonicService> </configuration> And that's my first migration: public class Migration001_Init : Migration { public override void Up() { //Create the records table TableSchema.Table records = CreateTable("asdf"); records.AddColumn("RecordName"); } public override void Down() { DropTable("asdf"); } } When I run the sonic.exe, I get this exception: Setting ConfigPath: 'App.config' Building configuration from D:\Users\carlucci\Documents\Visual Studio 2008\Projects\Wum\Wum.Migration\App.config Adding connection to test ERROR: Trying to execute migrate Error Message: System.Data.OracleClient.OracleException: ORA-02253: especifica‡Æo de restri‡Æo nÆo permitida aqui at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor) at System.Data.OracleClient.OracleCommand.ExecuteNonQuery() at SubSonic.OracleDataProvider.ExecuteQuery(QueryCommand qry) in D:\@SubSonic\SubSonic\SubSonic\DataProviders\OracleDataProvider.cs:line 350 at SubSonic.DataService.ExecuteQuery(QueryCommand cmd) in D:\@SubSonic\SubSonic\SubSonic\DataProviders\DataService.cs:line 544 at SubSonic.Migrations.Migrator.CreateSchemaInfo(String providerName) in D:\@SubSonic\SubSonic\SubSonic.Migrations\Migrator.cs:line 249 at SubSonic.Migrations.Migrator.GetCurrentVersion(String providerName) in D:\@SubSonic\SubSonic\SubSonic.Migrations\Migrator.cs:line 232 at SubSonic.Migrations.Migrator.Migrate(String providerName, String migrationDirectory, Nullable`1 toVersion) in D:\@SubSonic\SubSonic\SubSonic.Migrations\Migrator.cs:line 50 at SubSonic.SubCommander.Program.Migrate() in D:\@SubSonic\SubSonic\SubCommander\Program.cs:line 264 at SubSonic.SubCommander.Program.Main(String[] args) in D:\@SubSonic\SubSonic\SubCommander\Program.cs:line 90 Execution Time: 379ms What am I doing wrong? Thanks a lot for any help :) Andre Carlucci UPDATE: As pointed by Anton, the problem is the subsonic OracleSqlGenerator. It is trying to create the schema table using this sql: CREATE TABLE SubSonicSchemaInfo ( version int NOT NULL CONSTRAINT DF_SubSonicSchemaInfo_version DEFAULT (0) ) Which doesn't work on oracle. The correct sql would be: CREATE TABLE SubSonicSchemaInfo ( version int DEFAULT (0), constraint DF_SubSonicSchemaInfo_version primary key (version) ) The funny thing is that since this is the very first sql executed by subsonic migrations, NOBODY EVER TESTED it on oracle.

    Read the article

  • [Reloaded] Error while sorting filtered data from a GridView

    - by Bogdan M
    Hello guys, I have an error I cannot solve, on a ASP.NET website. One of its pages - Countries.aspx, has the following controls: a CheckBox called "CheckBoxNAME": < asp:CheckBox ID="CheckBoxNAME" runat="server" Text="Name" /> a TextBox called "TextBoxName": < asp:TextBox ID="TextBoxNAME" runat="server" Width="100%" Wrap="False"> < /asp:TextBox> a SQLDataSource called "SqlDataSourceCOUNTRIES", that selects all records from a Table with 3 columns - ID (Number, PK), NAME (Varchar2(1000)), and POPULATION (Number) called COUNTRIES < asp:SqlDataSource ID="SqlDataSourceCOUNTRIES" runat="server" ConnectionString="< %$ ConnectionStrings:myDB %> " ProviderName="< %$ ConnectionStrings:myDB.ProviderName %> " SelectCommand="SELECT COUNTRIES.ID, COUNTRIES.NAME, COUNTRIES.POPULATION FROM COUNTRIES ORDER BY COUNTRIES.NAME, COUNTRIES.ID"> < /asp:SqlDataSource> a GridView called GridViewCOUNTRIES: < asp:GridView ID="GridViewCOUNTRIES" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDataSourceCOUNTRIES" DataKeyNames="ID" DataMember="DefaultView"> < Columns> < asp:CommandField ShowSelectButton="True" /> < asp:BoundField DataField="ID" HeaderText="Id" SortExpression="ID" /> < asp:BoundField DataField="NAME" HeaderText="Name" SortExpression="NAME" /> < asp:BoundField DataField="POPULATION" HeaderText="Population" SortExpression="POPULATION" /> < /Columns> < /asp:GridView> a Button called ButtonFilter: < asp:Button ID="ButtonFilter" runat="server" Text="Filter" onclick="ButtonFilter_Click"/> This is the onclick event: protected void ButtonFilter_Click(object sender, EventArgs e) { Response.Redirect("Countries.aspx?" + (this.CheckBoxNAME.Checked ? string.Format("NAME={0}", this.TextBoxNAME.Text) : string.Empty)); } Also, this is the main onload event of the page: protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { if (Request.QueryString.Count != 0) { Dictionary parameters = new Dictionary(); string commandTextFormat = string.Empty; if (Request.QueryString["NAME"] != null) { if (commandTextFormat != string.Empty && commandTextFormat.EndsWith("AND") == false) { commandTextFormat += "AND"; } commandTextFormat += " (UPPER(COUNTRIES.NAME) LIKE '%' || :NAME || '%') "; parameters.Add("NAME", Request.QueryString["NAME"].ToString()); } this.SqlDataSourceCOUNTRIES.SelectCommand = string.Format("SELECT COUNTRIES.ID, COUNTRIES.NAME, COUNTRIES.POPULATION FROM COUNTRIES WHERE {0} ORDER BY COUNTRIES.NAME, COUNTRIES.ID", commandTextFormat); foreach (KeyValuePair parameter in parameters) { this.SqlDataSourceCOUNTRIES.SelectParameters.Add(parameter.Key, parameter.Value.ToUpper()); } } } } Basicly, the page displays in the GridViewCOUNTRIES all the records of table COUNTRIES. The scenario is the following: - the user checks the CheckBox; - the user types a value in the TextBox (let's say "ch"); - the user presses the Button; - the page loads displaying only the records that match the filter criteria (in this case, all the countries that have names containing "Ch"); - the user clicks on the header of the column called "Name" in order to sort the data in the GridView Then, I get the following error: ORA-01036: illegal variable name/number. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OracleClient.OracleException: ORA-01036: illegal variable name/number Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Any help is greatly appreciated, tnks. PS: I'm using ASP.NET 3.5, under Visual Studio 2008, with an OracleXE database.

    Read the article

  • ER Data Model - confused by diagram.

    - by Khou
    Hi im a little confused by this diagram http://www.b-eye-network.com/images/content/i030ht0104.gif (Last diagram in the article) 1 - In the "ACCOUNTING ENTRY" table it shows "DebitEntry" and "CreditEntry" i) is this two column or ii) is this two rows of data? or iii) is it two separate tables on its own, Acounting_entry_credit and Accounting_entry_debit? Same question with the "ACCOUNT" table, it shows asset account, livabilities account, equaity account? are they 3 columns or are they 3 rows? Source: http://www.tdan.com/view-articles/5227/

    Read the article

  • Oracle 10g express home page is not coming up

    - by Adnan Anwar
    Hello All: My Oracle 10g Express Edition , I can login in the SQL plus but I cannot login into oracle via SQL developer and cannot view the Home page at link http://127.0.0.1:8080/apex. This was working fine until yesterday. I have checked via (WINDOWS)netstat -ab and no other app is using the 8080 port. The only thing I did today was I changed my SQL server 2005 Developer edition from Windows authentication to Mixed Mode authentication. Can anyone let me know how to get the Oracle Web page and the SQL Developer to work. I will gratly appreciate that. Thanks! Adnan A.

    Read the article

  • OJB / Oracle XE sql debug-display problem

    - by Jay
    Hello, I have a Java application, and use OJB as my ORM technology. I have an Oracle XE installation locally to develop against. The problem is when I need to debug a problem, I like looking at the SQL output. Here is an example of SQL I can view through the "Top SQL" interface in Oracle XE: select a_bunch_of_fields from KREW_DOC_TYP_T A0 WHERE ((UPPER(A0.DOC_TYP_NM) LIKE :1) AND A0.ACTV_IND = :2) AND A0.CUR_IND = :3 The problem is I would like to see the real value instead of ":1". I can't seem to find how I can configure this. I know the real values are working, because the application is responding as expected, for the most part (hence the bugs I am working on). Thanks, Jay

    Read the article

  • How to install WE8EBCDIC500 on Oracle XE?

    - by wishihadabettername
    I need to make the "WE8EBCDIC500" character set available in an Oracle XE installation (on my desktop) to import a mainframe-generated file. Running SELECT value FROM v$nls_valid_values WHERE parameter='CHARACTERSET' does not show this character set to be installed and I get KUP-03006: error initializing handle for character set WE8EBCDIC500 when attempting to use it. How can this be done? Thanks.

    Read the article

  • Secure Apache Virtual Hosts?

    - by Dr Hydralisk
    I am going to host a few small sites on VPS, and each of them are going to run my own custom PHP scripts. I am fairly certain that they are secure (did everything in the book, plus some of which is not in the book) to make sure they can't be exploited. But just to be safe I want to know how I could secure each of the virtual hosts so that they can't escape from there virtual host (if a hacker uploaded a shell they could not go above the www folder a legitimate user can't do in ftp no matter how many times they click ..) folder on Debian and Apache.

    Read the article

  • How to access non-first matches with xpath in Selenium RC ?

    - by Gj
    I have 20 labels in my page: In [85]: sel.get_xpath_count("//label") Out[85]: u'20' And I can get the first one be default: In [86]: sel.get_text("xpath=//label") Out[86]: u'First label:' But, unlike the xpath docs I've found, I'm getting an error trying to subscript the xpath to get to the second label's text: In [87]: sel.get_text("xpath=//label[2]") ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (216, 0)) ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (1186, 0)) --------------------------------------------------------------------------- Exception Traceback (most recent call last) /Users/me/<ipython console> in <module>() /Users/me/selenium.pyc in get_text(self, locator) 1187 'locator' is an element locator 1188 """ -> 1189 return self.get_string("getText", [locator,]) 1190 1191 /Users/me/selenium.pyc in get_string(self, verb, args) 217 218 def get_string(self, verb, args): --> 219 result = self.do_command(verb, args) 220 return result[3:] 221 /Users/me/selenium.pyc in do_command(self, verb, args) 213 #print "Selenium Result: " + repr(data) + "\n\n" 214 if (not data.startswith('OK')): --> 215 raise Exception, data 216 return data 217 Exception: ERROR: Element xpath=//label[2] not found What gives?

    Read the article

  • Would a pointer to a pointer to nil match against NULL?

    - by dontWatchMyProfile
    Example: A validation method contains this check to see if an NSError object shall be created or not: - (BOOL)validateCompanyName:(NSString *)newName error:(NSError **)outError { if (outError != NULL) { // do it... Now I pass an NSError object, like this: NSError *error = nil; BOOL ok = [self validateCompanyName:@"Apple" error:&error]; I'm not sure if this matches the check for not NULL. I think it's not NULL, since I believe NULL is not nil. Maybe someone can clear this up?

    Read the article

  • echoing javascript when an ajax funtion is called

    - by Roland
    I'm doing a ajax call via the normal jquery ajax funtion My ajax looks as follows jQuery('#yt10').live('click',function(){jQuery.ajax({'data':{'set':$("#booking_set_id1").val(),'setStat':$("#booking_stockStatus").val(),'setNum':$("#booking_setNum").val()},'beforeSend':function(){ if($("#booking_set_id1").val() == "" || $("#booking_stockStatus").val() == "" || $("#booking_setNum").val() == ""){ $("#error").addClass("flash-error"); $("#error").html("Please fill in all relevant set details before adding a set"); return false; } },'dataType':'html','success':function(data,status){ $("#mainrow").show(); $("#error").removeClass("flash-error"); $("#error").html(""); $("#setTable tr:last").after(data); $("#booking_set_id1").val(""); $("#booking_stockStatus").val(""); $("#booking_setNum").val(""); },'url':'/booking/newSet','cache':false});return false;}); Now the function newSet needs to echo javascript to the bowser but somehow jquery filters the javscript out. Is it possible to echo javascript via ajax

    Read the article

  • Is it possible to override the behavior of a merge module.

    - by Kragen
    Supposing I have a merge module that installs a file "MyFile.txt" to a certain location, and that I wish to use that merge module, however I want to supply a different copy of "MyFile.txt" from the one supplied with the merge module. Is it possible to do this? (And for bonus points how can I do this using Wix)

    Read the article

  • Pass variable to Google Custom Search Engine

    - by Matt
    Is it possible to pass a search variable into the Google Custom Search Engine that I have embedded on my website? I can get the search engine to work, but I can't pass it a term via POST (it's coming from a search button on other pages of the website) I tried to hack the code I found here: http://code.google.com/apis/ajax/playground/?exp=search#hello_world And this is what I have so far... ($q is the term I am passing to it) <script type="text/javascript"> google.load('search', '1', {language : 'en'}); function OnLoad() { var customSearchControl = new google.search.CustomSearchControl('***my key****'); customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); customSearchControl.draw('cse'); searchControl.execute("$q"); } google.setOnLoadCallback(OnLoad); </script> Thanks

    Read the article

  • SVN - How to export changed files in dependency project when create updates?

    - by Relax
    I have a project with it depends on another project Core, i use svn:external to maintain the dependency. when i go to create an update of my project, i export those changed files of two tags of my project, but the changed files in Core won't be exported. For example, my project 2.0 depends on Core 1.0, where 3.0 depends on Core 2.0, then i create an update, changed files of my project 3.0 will all be exported, but none of those in Core 2.0 This can be done thru a two-steps process, first export changed files of the project 3.0, then the Core 2.0, it is ok if i can remember it everytime when i create an update, but in case i forget someday, the broken update will most probably cause a crash. I wonder, is there a way to cover this situation in TortoiseSVN, will let me do it in one operation? I use TortoiseSVN + VisualSVN

    Read the article

  • Threading in Android

    - by virsir
    I am currently developing Android app, it needs download content from internet. I use thread to do that and then call runOnUiThread method to update GUI. I placed a refresh menu on it, if user tried to refresh the content, the download thread will be created and started. The problem is that how can I control the thread order, I need to accept the latest request's response and abandon previous thread requests if there were some other requests still running because the request parameters may have been changed by user. Currently I was using a threadId to do this thing, when a thread finished, it will check its threadId, if it was the latest recored one, it then takes control and render the response. My question is that is there any other proper better solution for this? Do I need to stop threads when user exit the app? I remember that some book said that do not try stop thread manually and wait itself finish is a good practice, is that true? Should I stop them by calling "stop" or "interrupt" method? I read some documents around threading in Android and found the class HandlerThread, what is it? In what kind of situation I need to use it?

    Read the article

  • Application doesn't start

    - by Jay
    Hello, I am having a rather strange problem, I deployed 2 .NET applications on my machine. Both run on v2.0. Now, while one of it works smoothly, the other one doesn't even start! Moreover, it doesn't throw any error, I couldn't see any error listings in the Event Viewer. Becoming hard to debug. On every other machine, both the exe's work perfectly fine! Any known issues? Thanks

    Read the article

  • How can I retrieve cookies for webserver A when my project is deployed on webserver B?

    - by medopal
    The project is multiple modules, each of them is deployed to a separate webserver. All of them on the same mainframe. (same IP address) I have a main menu where I login and then list all the available modules on all servers. From here I can click and go to any of them modules. I send cookies in the response (when logging in, say Server A), then on Server B (one of the modules) when I want to go back to the main menu, I check the cookies to see if the user is logged in. The problem is, Server B isn't seeing cookies generated by Server A. So each time I return to main menu, the user will be logged out. Is there anyway to store cookies to be used by multiple virtual webservers (on same IP) or any other idea?

    Read the article

  • When am I supposed to use UITableViewCellSeparatorStyleSingleLineEtched?

    - by tewha
    I see a description of what UITableViewCellSeparatorStyleSingleLineEtched looks like in Apple's Class Reference, and can see it by running the application. But I can't find any mention of when it's appropriate to use UITableViewCellSeparatorStyleSingleLineEtched instead of UITableViewCellSeparatorStyleSingleLine. In other words, what does this etched line mean to the user? Can anyone explain?

    Read the article

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