Daily Archives

Articles indexed Wednesday June 2 2010

Page 31/120 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Memory-Mapped Files & Transparent Persistence of Java Objects

    - by geeko
    Greeting All, I want to achieve transparent persistence of Java objects through memory-mapped files (utilize the OS paging/swapping mechanism). My problem is: how can I move a Java object to my memory-mapped block ? Plus, how can I force a new object instance to reside in such blocks ? As you all know, a memory-mapped block can be seen as a byte array, and what I am really asking here is how to overlap the address space of Java objects with the one of such arrays ? If Java does not allow me for this, what cross-platform & garbage-collecting OO language would you advise me to use ? Thank you all in advance.

    Read the article

  • Is it possible to use HTTPS certificates for licensing?

    - by Ton van den Heuvel
    I am working on an application with multiple clients and a server running various web-services for the clients. To implement licensing I am thinking about using HTTPS as a protocol for the web-services using certificates that are issued by our company. By influencing the expiration date of a certificate for a client we can prevent them from using our software after their license term. It this possible and does it make sense to you? Additional information: I am planning on using Qt/C++ for the clients, and the Twisted framework for the web-services.

    Read the article

  • Vertical Align Issue

    - by Nasser Hajloo
    I have following styles which work greate but Vertical-Align:middle or bottom doesn't work in it. every thing inside goes top ofthe div .Progress { display: inline-block; z-index: 1000; width:auto; height: auto; background-color: #A9C646; vertical-align: bottom; text-align: center; text-align: -moz-center; !text-align: center; position: absolute; opacity: 0.4; filter: alpha(opacity = 40); }

    Read the article

  • Python template engine

    - by jturo
    Hello there, Could it be possible if somebody could help me get started in writing a python template engine? I'm new to python and as I learn the language I've managed to write a little MVC framework running in its own light-weight-WSGI-like server. I've managed to write a script that finds and replaces keys for values: (Obviously this is not how my script is structured or implemented. this is just an example) from string import Template html = '<html>\n' html += ' <head>\n' html += ' <title>This is so Cool : In Controller HTML</title>\n' html += ' </head>\n' html += ' <body>\n' html += ' Home | <a href="/hi">Hi ${name}</a>\n' html += ' </body>\n' html += '<html>' Template(html).safe_substitute(dict(name = 'Arturo')) My next goal is to implement custom statements, modifiers, functions, etc (like 'for' loop) but i don't really know if i should use another module that i don't know about. I thought of regular expressions but i kind feel like that wouldn't be an efficient way of doing it Any help is appreciated, and i'm sure this will be of use to other people too. Thank you

    Read the article

  • How can I share an OnEnter event for a TcxGrid ?

    - by Roland Bengtsson
    I want to standardize the behaviour on an Devexpress TcxGrid. So I have a unit ClientData with a event: procedure TClientData.grdOnEnter(Sender: TObject); begin mnuCxGridStandardMenu.Grid := TcxGrid(Sender); end; If I try to use that event from a TcxGrid.OnEnter event in another unit it refuse to work. If I paste in ClientData.grdOnEnter then a dialog says it is not an valid identifier. Is it possible to share an event for several units in Delphi 2007 ?

    Read the article

  • delete,copy,rename files and directories in WINAPI ..?

    - by Kristian
    hi I made a code that search in a givin path for a certain file name or folder and print the value BUT now how can i modify it to instead of printing its name perform on of the operations ( delete,copy,rename ) I searched on google and found nothin. #include "stdafx.h" #include <windows.h> int _tmain(int argc, _TCHAR* argv[]) { TCHAR *fn; fn=L"d:\\*"; HANDLE f; WIN32_FIND_DATA data; f=FindFirstFile(fn,&data); if(f==INVALID_HANDLE_VALUE){ printf("not found\n"); return 0; } else{ _tprintf(L"found this file: %s\n",data.cFileName); } while(FindNextFile(f,&data)){ { _tprintf(L"found this file: %s\n",data.cFileName); } } } FindClose(f); return 0; }

    Read the article

  • SQL SERVER – Stored Procedure and Transactions

    - by pinaldave
    I just overheard the following statement – “I do not use Transactions in SQL as I use Stored Procedure“. I just realized that there are so many misconceptions about this subject. Transactions has nothing to do with Stored Procedures. Let me demonstrate that with a simple example. USE tempdb GO -- Create 3 Test Tables CREATE TABLE TABLE1 (ID INT); CREATE TABLE TABLE2 (ID INT); CREATE TABLE TABLE3 (ID INT); GO -- Create SP CREATE PROCEDURE TestSP AS INSERT INTO TABLE1 (ID) VALUES (1) INSERT INTO TABLE2 (ID) VALUES ('a') INSERT INTO TABLE3 (ID) VALUES (3) GO -- Execute SP -- SP will error out EXEC TestSP GO -- Check the Values in Table SELECT * FROM TABLE1; SELECT * FROM TABLE2; SELECT * FROM TABLE3; GO Now, the main point is: If Stored Procedure is transactional then, it should roll back complete transactions when it encounters any errors. Well, that does not happen in this case, which proves that Stored Procedure does not only provide just the transactional feature to a batch of T-SQL. Let’s see the result very quickly. It is very clear that there were entries in table1 which are not shown in the subsequent tables. If SP was transactional in terms of T-SQL Query Batches, there would be no entries in any of the tables. If you want to use Transactions with Stored Procedure, wrap the code around with BEGIN TRAN and COMMIT TRAN. The example is as following. CREATE PROCEDURE TestSPTran AS BEGIN TRAN INSERT INTO TABLE1 (ID) VALUES (11) INSERT INTO TABLE2 (ID) VALUES ('b') INSERT INTO TABLE3 (ID) VALUES (33) COMMIT GO -- Execute SP EXEC TestSPTran GO -- Check the Values in Tables SELECT * FROM TABLE1; SELECT * FROM TABLE2; SELECT * FROM TABLE3; GO -- Clean up DROP TABLE Table1 DROP TABLE Table2 DROP TABLE Table3 GO In this case, there will be no entries in any part of the table. What is your opinion about this blog post? Please leave your comments about it here. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Regarding the ViewModel

    - by mizipzor
    Im struggling to understand the ViewModel part of the MVVM pattern. My current approach is to have a class, with no logic whatsoever (important), except that it implements INotifyPropertyChanged. The class is just a collection of properties, a struct if you like, describing an as small part of the data as possible. I consider this my Model. Most of the WPF code I write are settings dialogs that configure said Model. The code-behind of the dialog exposes a property which returns an instance of the Model. In the XAML code I bind to subproperties of that property, thereby binding directly to the Model's properties. Which works quite well since it implements the INotifyPropertyChanged. I consider this settings dialog the View. However, I havent really been able to figure out what in all this is the ViewModel. The articles Ive read suggests that the ViewModel should tie the View and the Model together, providing the logic the Model lacks but is still to complex to go directly into the View. Is this correct? Would, in my example, the code-behind of the settings dialog be considered the ViewModel? I just feel a bit lost and would like my peers to debunk some of my assumptions. Am I completely off track here?

    Read the article

  • How to pass msbuild properties to another msbuild script correctly?

    - by mark
    Dear ladies and sirs. I have a master.proj msbuild script which builds several projects using the MSBuild task. Here is a typical example: <Target Name="Log4PostSharp" DependsOnTargets="log4net"> <MSBuild Projects="Log4PostSharp\Log4PostSharp.sln" Properties="Configuration=$(Configuration)" /> </Target> But, my problem is that if more properties are given on the command line, they are not passed to the MSBuild task. Is there a way to pass the MSBuild task all the properties given on the command line? Thanks.

    Read the article

  • How did you get your first programming job?

    - by Gaz
    Hi All, I have some commercial programming experience although it was not my primary role (C# and Java), SCJP 6 cert, some SQL experience and have been doing a lot of Android programming (I have one app with 36,000 downloads). I have a degree in Chemistry and a Diploma in Programming (half a degree made up of 2nd/3rd year uni courses). I'm trying to get my first entry level programmer job but am finding it tough out there.......How did other people get there first jobs in programming?

    Read the article

  • Multiple Pre-Build Events in Visual Studio?

    - by Kirschstein
    I've followed a blog post by Scott Hanselman for managing configuration with PreBuild Events and have it working fine. I now want to split up my configuration into a couple of different files, so need to exectue the command again before the build. The problem is the PreBuild event text all gets executed as one console command. How can I split it up as several commands?

    Read the article

  • Limit TCP requests per IP

    - by asmo
    Hello! I'm wondering how to limit the TCP requests per client (per specific IP) in Java. For example, I would like to allow a maximum of X requests per Y seconds for each client IP. I thought of using static Timer/TimerTask in combination with a HashSet of temporary restricted IPs. private static final Set<InetAddress> restrictedIPs = Collections.synchronizedSet(new HashSet<InetAddress>()); private static final Timer restrictTimer = new Timer(); So when a user connects to the server, I add his IP to the restricted list, and start a task to unrestrict him in X seconds. restrictedIPs.add(socket.getInetAddress()); restrictTimer.schedule(new TimerTask() { public void run() { restrictedIPs.remove(socket.getInetAddress()); } }, MIN_REQUEST_INTERVAL); My problem is that at the time the task will run, the socket object may be closed, and the remote IP address won't be accessible anymore... Any ideas welcomed! Also, if someone knows a Java-framework-built-in way to achieve this, I'd really like to hear it.

    Read the article

  • How to Setup Eclipse to Start Writing Web Services using Axis2

    - by Mubashar Ahmad
    Dear Gurus I am a .net Developer but now a days i want to setup Eclipse to write a sample web services to test the capacity of Java/Axis over WCF/BasicHttpBindings. I found a couple of articles regarding the setup procedures but they are too old or their wording is may be for java or eclipse experts. Can anyone please give me detailed instruction on how can I get to work quickly. I tried my best but i can't even setup TomCat properly its not starting and throwing exception when i try to start it from eclipse servers windows. Please some one give me a latest and novice level article. Regards

    Read the article

  • Conditional compilation is turned off

    - by user285336
    Hello. I get a javascript error: Conditional compilation is turned off I found this link to fix : http://msdn.microsoft.com/en-us/library/5y5529x3(VS.90).aspx But after adding this field /*@cc_on @*/ I get new, another javascript error: Expected ')' How to fix it? Thanks

    Read the article

  • How to use Application Verifier to find memory leaks

    - by Patrick
    I want to find memory leaks in my application using standard utilities. Previously I used my own memory allocator, but other people (yes, you Neil) suggested to use Microsoft's Application Verifier, but I can't seem to get it to report my leaks. I have the following simple application: #include <iostream> #include <conio.h> class X { public: X::X() : m_value(123) {} private: int m_value; }; void main() { X *p1 = 0; X *p2 = 0; X *p3 = 0; p1 = new X(); p2 = new X(); p3 = new X(); delete p1; delete p3; } This test clearly contains a memory leak: p2 is new'd but not deleted. I build the executable using the following command lines: cl /c /EHsc /Zi /Od /MDd test.cpp link /debug test.obj I downloaded Application Verifier (4.0.0665) and enabled all checks. If I now run my test application I can see a log of it in Application Verifier, but I don't see the memory leak. Questions: Why doesn't Application Verifier report a leak? Or isn't Application Verifier really intended to find leaks? If it isn't which other tools are available to clearly report leaks at the end of the application (i.e. not by taking regular snapshots and comparing them since this is not possible in an application taking 1GB or more), including the call stack of the place of allocation (so not the simple leak reporting at the end of the CRT) If I don't find a decent utility, I still have to rely on my own memory manager (which does it perfectly).

    Read the article

  • List to Columns in LINQ

    - by Sam Saffron
    Given an IEnumerable<T> and row count, I would like to convert it to an IEnumerable<IEnumerable<T>> like so: Input: Row Count: 3 List: [1,2,3,4,5,6,7] Output [ [1,4,7] [2,5] [3,6] ] How can I do this using LINQ?

    Read the article

  • Highlight curret page in jquery

    - by 3gwebtrain
    Hi, I have the 12 html pages. and all this pages are loads when the left navigation bar link clicked. in this, i need to add a class to the current link, which is clicked and loaded the page. i tried with this: $(function(){ $('#container li a').click(function(){ $('#container li a').removeClass('current'); var pathname = (window.location.pathname.match(/[^\/]+$/)[0]); var currentPage = $(this).attr('href'); if(currentPage==pathname){ $(this).addClass('current'); } else{ alert('wrong'); } // alert(pathname+' currentPage: '+currentPage); }) }) it works, but on page load, the class is removed, i don't know why it's happening.. any help?

    Read the article

  • MS-SQL statement to replace/delete sub-strings

    - by StefanE
    Hi, I have a table with 6 columns containing HTML content with some markups in it and now when moving to a new designed site most of this HTML code has to be deleted. More or less all tags except and . Is there a nice way of doing this, identify all tags end delete them within the data? I'm sure there are no < symbols in the test so a regular expression would maybe work? My alternative is to fecth every row, process it and update the database but I'm guessing this is possible to do in SQL directly. Thanks, Stefan

    Read the article

  • Google MapView doesn't work after signed the app.

    - by user164589
    Hi guys, I am facing to android application signing problem. My application contains Google MapView. When I compile the app and run on the emulator, MapView works fine. But signed the app, MapView doesn't work. I've get Google Map API. This works on the simulator. I could sign the app once 2 months ago. Then I've upgraded the app. Now I need to sign the app again. Actually I don't know why signed app's mapView doesn't work. How to fix it ? Please advice. I used following steps when sign the app: Run Eclipse. Select the project. Right Click - Android Tools - Export Signed Application Package - Then Filled forms. (In forms, Validity years: 200, and all passwords are same.) Can you suggest me ? Thanks in advance.

    Read the article

  • login/logout problem in PHP

    - by user356170
    i have a question. I have a website in which i am giving security like login id and password( as usual). No what i want is that, 1) I don't want to allow a single user to login in different machine at the same time. 2) For this i am using a column in database which is keeping the current status of user(i.e. loging/logout). I am allowing user to login only when has session has not closed and status is login. 3) So my problem is that when i am logging out manually. it is closing the session as well as updating the database with status "logout". 4) but when i am closing the window from Cross buttonat top right corner. it is closing the ssion but table data is still "login". so later on i can't be able to login into the same user. 5) So how could i solve this problem. Please help me!

    Read the article

  • customisable JSLint

    - by Don
    Hi, I'm looking for a tool that checks JS code, which can be integrated into a Maven build. I need a tool that will check for errors such as use of reserved words as identifiers trailing semi-colon, e.g. var obj = { a: 1, b, 2, } JSLint seems like a perfect candidate, but the problem is that it is too strict, because it also checks for various coding patterns which are (arguably) bad style, but do not actually generate errors in a browser. Examples of such issues include Disallow ++ and -- and Allow one var statement per function If possible, I would like the errors to fail the build, and I would like the other rules to only print warnings (or disable them completely). Obviously, I need the ability to specify which of the available rules I consider errors and which I consider warnings. Thanks, Don

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >