Search Results

Search found 167 results on 7 pages for 'albert widjaja'.

Page 5/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Parameter Tuning for Perceptron Learning Algorithm

    - by Albert Diego
    Hi, I'm having sort of an issue trying to figure out how to tune the parameters for my perceptron algorithm so that it performs relatively well on unseen data. I've implemented a verified working perceptron algorithm and I'd like to figure out a method by which I can tune the numbers of iterations and the learning rate of the perceptron. These are the two parameters I'm interested in. I know that the learning rate of the perceptron doesn't affect whether or not the algorithm converges and completes. I'm trying to grasp how to change n. Too fast and it'll swing around a lot, and too low and it'll take longer. As for the number of iterations, I'm not entirely sure how to determine an ideal number. In any case, any help would be appreciated. Thanks.

    Read the article

  • C++: warning: '...' declared with greater visibility than the type of its field '...::<anonymous>'

    - by Albert
    I'm getting these two warnings (with GCC 4.2 on MacOSX): /Users/az/Programmierung/openlierox/build/Xcode/../../src/main.cpp:154:0 /Users/az/Programmierung/openlierox/build/Xcode/../../src/main.cpp:154: warning: 'startMainLockDetector()::MainLockDetector' declared with greater visibility than the type of its field 'startMainLockDetector()::MainLockDetector::<anonymous' /Users/az/Programmierung/openlierox/build/Xcode/../../src/main.cpp:154:0 /Users/az/Programmierung/openlierox/build/Xcode/../../src/main.cpp:154: warning: 'startMainLockDetector()::MainLockDetector' declared with greater visibility than its base 'Action' In this code: struct Action { virtual ~Action() {} virtual int handle() = 0; }; static void startMainLockDetector() { /* ... */ struct MainLockDetector : Action { bool wait(Uint32 time) { /* ... */ } int handle() { /* ... */ } }; /* ... */ } I'm not exactly sure what these warnings mean (what visibility?) and how to fix them. (I really want the class MainLockDetector to be local for that function only.) I have already compiled the same code with a lot of other compilers (clang, GCC 3.*, GCC 4.0, GCC 4.4, etc) and never got any warning for this code.

    Read the article

  • git: correct way to merge/rebase with respect to svn dcommit

    - by Albert
    I have the following situation (mostly because I didn't really thought it through in the beginning -- or more exactly, I thought it shouldn't be a problem the way I did this but now I am stumbled): ... --- A --- B1 --- ... --- Bn ... --- git-svn Whereby A and git-svn are at the same state (exactly the same files and file content) but they don't have any common point in history. And I want: ... --- git-svn --- B1 --- ... --- Bn Or at least, when I do the svn dcommit, I want exactly to get the commits B1 to Bn and nothing else. I am not exactly sure how dcommit works. So if I would get something like this: ... ------------ A --- B1 --- ... --- Bn \ \ ... --- git-svn -- A' ----------------- B' would the dcommit behave in the way I want? Because if so, that would be easy to get (merging A into git-svn does work just fine because they are content-wise the same). Or should I do some sort of rebase? But I don't want to rebase A on git-svn, just B1 to Bn.

    Read the article

  • JPA @Version behaviour

    - by Albert Kam
    Hello, im using JPA2 with Hibernate 3.6.x I have made a simple testing on the @Version. Let's say we have 2 entities, Entity Team has a List of Player Entities, bidirectional relationship, lazy fetchtype, cascade-type All Both entities have @Version And here are the scenarios : Whenever a modification is made to one of the team/player entity, the team/player's version will be increased when flushed/commited (version on the modified record is increased). Adding a new player entity to team's collection using persist, the entity the team's version will be assigned after persist (adding a new entity, that new entity will got it's version). Whenever an addition/modification/removal is made to one of the player entity, the team's version will be increased when flushed/commited. (add/modify/remove child record, parent's version got increased also) I can understand the number 1 and 2, but the number 3, i dont understand, why the team's version got increased ? And that makes me think of other questions : What if i got Parent <- child <- granchildren relation ship. Will an addition or modification on the grandchildren increase the version of child and parent ? In scenario number 2, how can i get the version on the team before it's commited, like perhaps by using flush ? Is it a recommended way to get the parent's version after we do something to the child[s] ? Here's a code sample from my experiment, proving that when ReceivingGoodDetail is the owning side, and the version got increased in the ReceivingGood after flushing. Sorry that this use other entities, but ReceivingGood is like the Team, ReceivingGoodDetail is like the Player. 1 ReceivingGood/Team, many ReceivingGoodDetail/Player. /* Hibernate: select receivingg0_.id as id9_14_, receivingg0_.creationDate as creation2_9_14_, .. too long Hibernate: select product0_.id as id0_4_, product0_.creationDate as creation2_0_4_, .. too long before persisting the new detail, version of header is : 14 persisting the detail 1c9f81e1-8a49-4189-83f5-4484508e71a7 printing the size of the header : Hibernate: select details0_.receivinggood_id as receivi13_9_8_, details0_.id as id8_, details0_.id as id10_7_, .. too long 7 after persisting the new detail, version of header is : 14 Hibernate: insert into ReceivingGoodDetail (creationDate, modificationDate, usercreate_id, usermodify_id, version, buyQuantity, buyUnit, internalQuantity, internalUnit, product_id, receivinggood_id, supplierLotNumber, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Hibernate: update ReceivingGood set creationDate=?, modificationDate=?, usercreate_id=?, usermodify_id=?, version=?, purchaseorder_id=?, supplier_id=?, transactionDate=?, transactionNumber=?, transactionType=?, transactionYearMonth=?, warehouse_id=? where id=? and version=? after flushing, version of header is now : 15 */ public void addDetailWithoutTouchingCollection() { String headerId = "3b373f6a-9cd1-4c9c-9d46-240de37f6b0f"; ReceivingGood receivingGood = em.find(ReceivingGood.class, headerId); // create a new detail ReceivingGoodDetail receivingGoodDetailCumi = new ReceivingGoodDetail(); receivingGoodDetailCumi.setBuyUnit("Drum"); receivingGoodDetailCumi.setBuyQuantity(1L); receivingGoodDetailCumi.setInternalUnit("Liter"); receivingGoodDetailCumi.setInternalQuantity(10L); receivingGoodDetailCumi.setProduct(getProduct("b3e83b2c-d27b-4572-bf8d-ac32f6de5eaa")); receivingGoodDetailCumi.setSupplierLotNumber("Supplier Lot 1"); decorateEntity(receivingGoodDetailCumi, getUser("3978fee3-9690-4377-84bd-9fb05928a6fc")); receivingGoodDetailCumi.setReceivingGood(receivingGood); System.out.println("before persisting the new detail, version of header is : " + receivingGood.getVersion()); // persist it System.out.println("persisting the detail " + receivingGoodDetailCumi.getId()); em.persist(receivingGoodDetailCumi); System.out.println("printing the size of the header : "); System.out.println(receivingGood.getDetails().size()); System.out.println("after persisting the new detail, version of header is : " + receivingGood.getVersion()); em.flush(); System.out.println("after flushing, version of header is now : " + receivingGood.getVersion()); }

    Read the article

  • pure/const functions in C++

    - by Albert
    Hi, I'm thinking of using pure/const functions more heavily in my C++ code. (pure/const attribute in GCC) However, I am curious how strict I should be about it and what could possibly break. The most obvious case are debug outputs (in whatever form, could be on cout, in some file or in some custom debug class). I probably will have a lot of functions, which don't have any side effects despite this sort of debug output. No matter if the debug output is made or not, this will absolutely have no effect on the rest of my application. Or another case I'm thinking of is the use of my own SmartPointer class. In debug mode, my SmartPointer class has some global register where it does some extra checks. If I use such an object in a pure/const function, it does have some slight side effects (in the sense that some memory probably will be different) which should not have any real side effects though (in the sense that the behaviour is in any way different). Similar also for mutexes and other stuff. I can think of many complex cases where it has some side effects (in the sense of that some memory will be different, maybe even some threads are created, some filesystem manipulation is made, etc) but has no computational difference (all those side effects could very well be left out and I would even prefer that). How does it work out in practice? If I mark such functions as pure/const, could it break anything (considering that the code is all correct)?

    Read the article

  • Dot Game and Dynamic Programming

    - by Albert Diego
    I'm trying to solve a variant of the dot game with dynamic programming. The regular dot game is played with a line of dots. Each player takes either one or two dots at their respective end of the line and the person who is left with no dots to take wins. In this version of the game, each dot has a different value. Each player takes alternate turns and takes either dot at either end of the line. I want to come up with a way to use dynamic programming to find the max amount that the first player is guaranteed to win. I'm having problems grasping my head around this and trying to write a recurrence for the solution. Any help is appreciated, thanks!

    Read the article

  • RegularExpressionValidator - Windows ID Validation

    - by Albert
    I'd like to setup a RegularExpressionValidator to ensure users are entering valid windows IDs in a textbox. Specifically, I'd like to ensure it's any three capital letters (for our range of domains), followed by a backslash, followed by any number of letters and numbers. Does anyone know where I can find some examples of this type of validation...or can somebody whip one up for me? :)

    Read the article

  • A potentially dangerous Request.Form value was detected: Dealing with these errors proactively, or a

    - by Albert
    I'm noticing this error more and more in my error logs. I've read through the questions here talking about this error, but they don't address what I would like to do (see below). I'm considering three options, in the order of preference: 1) When submitting a form (I use formviews almost exclusively, if that helps), if potentially dangerous characters are detected, automatically strip them out and submit. 2) When submitting a form, if potentially dangerous characters are detected, alert the user and let them fix it before trying again. 3) After the exception is generated, deal with it and alert the user. I'm hoping one of the first two options might be able to do somewhat globally...I know for the 3rd I'd have to alter a TON of Try-Catch blocks I already have in place. Doable, but labor intensive. I'd rather be proactive about it if at all possible and avoid the exception all together. Perhaps one approach to #1 would be to write a block of code that could loop through all text entry fields in a formview, during the insert/update event, and strip the characters out. I'm ok with that, but I'd rather not have to heavily alter all my Insert/Update events to accomplish this. Or maybe I just create a different class to do the text checking/deleting, and only insert 1 line of code in each Insert/Update event. If anyone can come up with some example code of any of these approaches that would be a help. Thanks for any ideas or information. I'm definitely open to other solutions too; these are only the 3 that came to mind. I can say that I don't want to turn request validation off though.

    Read the article

  • Transitioning from Domain Authentication to SQL Server Authentication

    - by Albert Perrien
    Greetings all, I've run into a problem that has me stumped. I've put together a database in SQL Server Express, and I'm having a strange permissions problem. The database is on my development machine with a domain user: DOMAIN\albertp. My development database server is set for "SQL Server and Windows Authentication" mode. I can edit and query my database without any problems when I log in using Windows Authentication. However, when I log in to any user that uses SQL Server authentication (Including sa) I get this message when I run queries against my database. SELECT * FROM [Testing].[dbo].[AuditingReport] I get: Msg 18456, Level 14, State 1, Line 1 Login failed for user 'auditor'. I'm logged into the server from SQL Server Management Studio as 'auditor' and I don't see anything in the error log about the login failure. I've already run: Use Testing; Grant All to auditor; Go And I still get the same error. What permissions do I have to set for the database to be usable by others outside of my personal domain login? Or am I looking at the wrong problem? My ultimate goal is to have the database be accessible from a set of PHP pages, using a either a common login (hence 'auditor') or a login specific to a set of individual users.

    Read the article

  • git: rename remote branch

    - by Albert
    I have the branch master which tracks the remote branch origin/master. I want to rename them to "master-old" both locally and remote. Is that possible? For other users who tracked origin/master (and who updated their local master branch always just via 'git pull'), what whould happen after I renamed the renamed the remote branch. Would their 'git pull' still work or would it throw an error that it coudln't find origin/master anymore? Then, further on, I want to create a new master branch (both locally and remote). Again, after I did this, what would happen now if the other users do the 'git pull' now? I guess all this would result in a lot of trouble. Is there a clean way to get what I want? Or should I just leave master as it is and create a new branch master-new and just work there further on?

    Read the article

  • Windows/C++: how to use a COM dll which is not registered

    - by Albert
    Hi, In our application, we need to use a COM dll (namely msdia100.dll) which was not registered in the system before. Earler, we have just called the DLL by calling its DllRegisterServer via this code: // Register DIA DLL required by Breakpad std::string diaLibPath = "msdia100"; HMODULE diaLib = LoadLibrary(diaLibPath.c_str()); if( diaLib == NULL ) { errors << "Cannot load DLL " << diaLibPath << endl; return; } typedef HRESULT ( __stdcall * regServer_t )(void); regServer_t regServer = (regServer_t)GetProcAddress(diaLib, "DllRegisterServer"); if( regServer == NULL ) { errors << "Cannot get method DllRegisterServer from " << diaLibPath << endl; FreeLibrary(diaLib); return; } if( regServer() != S_OK ) { errors << "Cannot call DllRegisterServer from " << diaLibPath << endl; } FreeLibrary(diaLib); This doesn't work anymore on Windows 7 (maybe also Vista, didn't tried) because to call this function, it needs Administrator privileges. All solutions to this problem I have found where about getting those Admin rights. That is no possible solution for us because our application must also work if the user is not able to get those Admin rights. It is also no solution for us to suddenly need an installer for our application which registeres this DLL. So, what possibilities are there? How can I use this DLL without Admin rights? Do I have to recode COM which works without the need to register a DLL first?

    Read the article

  • How to grant permissions to single SELECT/UPDATE statment (sql server) ?

    - by Albert
    I have a problem when trying to execute this update statement (below) using C# SqlCommand when I execute it locally it works fine, but when deployed to another machine I got a permission error The SELECT permission was denied on the object Order ... The UPDATE permission was denied on the object Order ... Update Statement "UPDATE Order SET Request = @request WHERE Id = @ID"; Is there any way to add GRANT SELECT and GRANT UPDATE to a single statement like the update above without using a stored procedure? or the SP is the way to go on this? Thanks in advance

    Read the article

  • GCC: visibility of symbols in standalone C++ applications

    - by Albert
    Hi, Because of a strange C++ warning about the visibility of some symbols and an interesting answer, linking to a paper which describes the different visibility types and cases (section 2.2.4 is about C++ classes), I started to wonder if it is needed for a standalone application to export symbols at all (except main - or is that needed?). Why exactly are they needed to be exported in standalone applications? Is "an exported symbol" an synomym for "visible symbol"? I.e. a hidden symbol is a symbol which is not exported? Do the object files already differ between visible symbols and hidden symbols? Or is this made at the linking step, so that only the visible symbols are exported? Does the visibility of symbols matter in case for debug information? Or is that completely independent, i.e. I would also get a nice backtrace if I have all symbols hidden? How is STABS/DWARF related to the visibility of symbols?

    Read the article

  • what practical proofs are there about the Turing completeness of neural nets? what nns can execute c

    - by Albert
    I'm interested in the computational power of neural nets. It is generally accepted that recurrent neural nets are Turing complete. Now I was searching for some papers which proofs this. What I found so far: Turing computability with neural nets, Hava T. Siegelmann and Eduardo D. Sontag, 1991 I think this is only interesting from a theoretical point of view because it needs to have the neuron activity of infinite exactness (to encode the state somehow as a rational number). S. Franklin and M. Garzon, Neural computability This needs an unbounded number of neurons and also doesn't really seem to be that much practical. (Note that another question of mine tries to point out this kind of problem between such theoretical results and the practice.) I'm searching mostly for some neural net which really can execute some code which I can also simulate and test in practice. Of course, in practice, they would have some kind of limited memory. Does anyone know something like this?

    Read the article

  • How can I control UISlider Value Changed-events frequncy?

    - by Albert
    I'm writing an iPhone app that is using two uisliders to control values that are sent using coreBluetooth. If I move the sliders quickly one value freezes at the receiver, presumably because the Value Changed events trigger so often that the write-commands stack up and eventually get thrown away. How can I make sure the events don't trigger too often? Edit: Here is a clarification of the problem; the bluetooth connection sends commands every 105ms. If the user generates a bunch of events during that time they seem to que up. I would like to throw away any values generated between the connection events and just send one every 105ms. This is basically what I'm doing right now: -(IBAction) sliderChanged:(UISlider *)sender{ static int8_t value = 0; int8_t new_value = (int8_t)sender.value; if ( new_value > value + threshold || new_value < value - threshold ) { value = new_value; [btDevice writeValue:value]; } } What I'm asking is how to implement something like -(IBAction) sliderChanged:(UISlider *)sender{ static int8_t value = 0; if (105msHasPassed) { int8_t new_value = (int8_t)sender.value; if ( new_value > value + threshold || new_value < value - threshold ) { value = new_value; [btDevice writeValue:value]; } } }

    Read the article

  • Python subprocess.Popen hangs in 'for l in p.stdout' until p terminates, why?

    - by Albert
    I have that code: #!/usr/bin/python -u localport = 9876 import sys, re, os from subprocess import * tun = Popen(["./newtunnel", "22", str(localport)], stdout=PIPE, stderr=STDOUT) print "** Started tunnel, waiting to be ready ..." for l in tun.stdout: sys.stdout.write(l) if re.search("Waiting for connection", l): print "** Ready for SSH !" break The "./newtunnel" will not exit, it will constantly output more and more data to stdout. However, that code will not give any output and just keeps waiting in the tun.stdout. When I kill the newtunnel process externally, it flushes all the data to tun.stdout. So it seems that I can't get any data from the tun.stdout while it is still running. Why is that? How can I get the information? Note that the default bufsize for Popen is 0 (unbuffered). I can also specify bufsize=0 but that doesn't change anything.

    Read the article

  • Threads are blocked in malloc and free, virtual size

    - by Albert Wang
    Hi, I'm running a 64-bit multi-threaded program on the windows server 2003 server (X64), It run into a case that some of the threads seem to be blocked in the malloc or free function forever. The stack trace is like follows: ntdll.dll!NtWaitForSingleObject() + 0xa bytes ntdll.dll!RtlpWaitOnCriticalSection() - 0x1aa bytes ntdll.dll!RtlEnterCriticalSection() + 0xb040 bytes ntdll.dll!RtlpDebugPageHeapAllocate() + 0x2f6 bytes ntdll.dll!RtlDebugAllocateHeap() + 0x40 bytes ntdll.dll!RtlAllocateHeapSlowly() + 0x5e898 bytes ntdll.dll!RtlAllocateHeap() - 0x1711a bytes MyProg.exe!malloc(unsigned __int64 size=0) Line 168 C MyProg.exe!operator new(unsigned __int64 size=1) Line 59 + 0x5 bytes C++ ntdll.dll!NtWaitForSingleObject() ntdll.dll!RtlpWaitOnCriticalSection() ntdll.dll!RtlEnterCriticalSection() ntdll.dll!RtlpDebugPageHeapFree() ntdll.dll!RtlDebugFreeHeap() ntdll.dll!RtlFreeHeapSlowly() ntdll.dll!RtlFreeHeap() MyProg.exe!free(void * pBlock=0x000000007e8e4fe0) C BTW, the param values passed to the new operator is not correct here maybe due to optimization. Also, at the same time, I found in the process Explorer, the virtual size of this program is 10GB, but the private bytes and working set is very small (<2GB). We did have some threads using virtualalloc but in a way that commit the memory in the call, and these threads are not blocked. m_pBuf = VirtualAlloc(NULL, m_size, MEM_COMMIT, PAGE_READWRITE); ...... VirtualFree(m_pBuf, 0, MEM_RELEASE); This looks strange to me, seems a lot of virtual space is reserved but not committed, and malloc/free is blocked by lock. I'm guessing if there's any corruptions in the memory/object, so plan to turn on gflag with pageheap to troubleshoot this. Does anyone has similar experience on this before? Could you share with me so I may get more hints? Thanks a lot!

    Read the article

  • SQL Script To Generate a Database Dictionary **With Linked Fields**

    - by Albert
    I would like to generate a Data Dictionary for a SQL Server 2008 database that has one row for each field, and the following columns: table_name field_name data_type link_table (for when the field in question is a foreign key) link_field (for when the field in question is a foreign key) I can get the first 3 columns with something like the SQL script below...but I don't know how to get the last two columns of foreign key information. INFORMATION_SCHEMA.TABLE_CONSTRAINTS gets close, but doesn't have the data I'm looking for. Can someone help with this point? SELECT TABLE_NAME,COLUMN_NAME,DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS Secondarily if anyone has any suggestions on additional fields which would be helpful please post.

    Read the article

  • git: better way for git revert without additional reverted commit

    - by Albert
    I have a commit in a remote+local branch and I want to throw that commit out of the history and put some of them into an own branch. Basically, right now I have: D---E---F---G master And I want: E---G topic / D master That should be both in my local and in the (there is only one, called origin) remote repository. Which is the cleanest way to get that? Also, there are also other people who have cloned that repo and who have checked out the master branch. If I would do such a change in the remote repo, would 'git pull' work for them to get also to the same state?

    Read the article

  • hibernate connection tomcat

    - by willson albert
    I was working in a web site (production) in Tomcat 7, so now I created a copy of this website and change the hibernate.cfg.xml to work with another database ( testing ). <property name="hibernate.connection.url">jdbc:mysql://127.0.0.1:3306/test</property> <property name="hibernate.connection.username">fake</property> <property name="hibernate.connection.password">fake</property> However, when I open the new new site, everything is ok, but, is still working with the production database even when I changed the connection string. Anybody knows if I need to change another thing?. I missing something?. I am quite new in tomcat. Thanks in advance.

    Read the article

  • How is the default constructor of System.Drawing.Graphics removed?

    - by Albert Iordache
    When I try to create an object of Graphics, why doesn't the following work? System.Drawing.Graphics graphicsObj = new System.Drawing.Graphics(); (I am aware that I could create a private System.Windows.Forms.Panel Obj; and then do CreateGraphics() if I wanted it to work) I tried to find a custom constructor for Graphics, but I couldn't find one. Where did Microsoft define it, or how did it block it?

    Read the article

  • what are the differences in the WebKit nightly build binary and in the Safari binary?

    - by Albert
    I know what the projects are about: Safari is Apples browser. WebKit is the engine used in Safari (and in many other browsers) which is open source. The WebKit source code contains also code to compile it as a standalone application. You can download the nightly build of WebKit here: http://nightly.webkit.org/ I have compared some of those nightly builds of WebKit to the official Safari application. And besides the slightly different logo and the different name, I haven't really seen any difference. Are there any? Or is it just the branding? Edit: I just tried again with the current nightly build of today and it even names itself "Safari" now.

    Read the article

  • Set global maxRequestLength value in web.config- for all pages

    - by Albert
    I currently have my web.config location section set up like this <location path="page1.aspx"> <system.web> <httpRuntime maxRequestLength="65536" executionTimeout="3600"/> </system.web> </location> <location path="page2.aspx"> <system.web> <httpRuntime maxRequestLength="65536" executionTimeout="3600"/> </system.web> </location> etc with one entry for each page. How can I set the maxRequestLength for all pages, instead of one at a time?

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >